diff --git a/HISTORY.md b/HISTORY.md
index 5862bb2f37..6fecdaf70a 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -1,5 +1,13 @@
# React-Select
+## v1.0.0-rc.4 / 2017-05-14
+
+* fixed; no more warning when using React 15.5, thanks [Adam Girton](https://github.com/agirton)
+* fixed; issue comparing objects in `getFocusableOptionIndex`, thanks [rndm2](https://github.com/rndm2)
+* fixed; missing .focus() method in `Creatable`, thanks [Anton Alexandrenok](https://github.com/the-spyke)
+* added; support for `aria-describedby` attribute, thanks [Eric Lee](https://github.com/ericj17)
+* added; `.is-clearable` className when clearable is true, thanks [Dan Diaz](https://github.com/dan-diaz)
+
## v1.0.0-rc.3 / 2017-02-01
* added; `arrowRenderer` prop, thanks [Brian Vaughn](https://github.com/bvaughn)
diff --git a/bower.json b/bower.json
index 19cc369235..97ed501c5b 100644
--- a/bower.json
+++ b/bower.json
@@ -4,7 +4,7 @@
"dist/react-select.min.js",
"dist/react-select.min.css"
],
- "version": "1.0.0-beta14",
+ "version": "1.0.0-rc.4",
"homepage": "https://github.com/JedWatson/react-select",
"authors": [
"Jed Watson"
diff --git a/dist/react-select.js b/dist/react-select.js
index caad9d23f4..a5ad82f310 100644
--- a/dist/react-select.js
+++ b/dist/react-select.js
@@ -24,6 +24,10 @@ var _react = (typeof window !== "undefined" ? window['React'] : typeof global !=
var _react2 = _interopRequireDefault(_react);
+var _propTypes = require('prop-types');
+
+var _propTypes2 = _interopRequireDefault(_propTypes);
+
var _Select = require('./Select');
var _Select2 = _interopRequireDefault(_Select);
@@ -33,24 +37,25 @@ var _utilsStripDiacritics = require('./utils/stripDiacritics');
var _utilsStripDiacritics2 = _interopRequireDefault(_utilsStripDiacritics);
var propTypes = {
- autoload: _react2['default'].PropTypes.bool.isRequired, // automatically call the `loadOptions` prop on-mount; defaults to true
- cache: _react2['default'].PropTypes.any, // object to use to cache results; set to null/false to disable caching
- children: _react2['default'].PropTypes.func.isRequired, // Child function responsible for creating the inner Select component; (props: Object): PropTypes.element
- ignoreAccents: _react2['default'].PropTypes.bool, // strip diacritics when filtering; defaults to true
- ignoreCase: _react2['default'].PropTypes.bool, // perform case-insensitive filtering; defaults to true
- loadingPlaceholder: _react2['default'].PropTypes.oneOfType([// replaces the placeholder while options are loading
- _react2['default'].PropTypes.string, _react2['default'].PropTypes.node]),
- loadOptions: _react2['default'].PropTypes.func.isRequired, // callback to load options asynchronously; (inputValue: string, callback: Function): ?Promise
- options: _react.PropTypes.array.isRequired, // array of options
- placeholder: _react2['default'].PropTypes.oneOfType([// field placeholder, displayed when there's no value (shared with Select)
- _react2['default'].PropTypes.string, _react2['default'].PropTypes.node]),
- noResultsText: _react2['default'].PropTypes.oneOfType([// field noResultsText, displayed when no options come back from the server
- _react2['default'].PropTypes.string, _react2['default'].PropTypes.node]),
- onChange: _react2['default'].PropTypes.func, // onChange handler: function (newValue) {}
- searchPromptText: _react2['default'].PropTypes.oneOfType([// label to prompt for search input
- _react2['default'].PropTypes.string, _react2['default'].PropTypes.node]),
- onInputChange: _react2['default'].PropTypes.func, // optional for keeping track of what is being typed
- value: _react2['default'].PropTypes.any };
+ autoload: _propTypes2['default'].bool.isRequired, // automatically call the `loadOptions` prop on-mount; defaults to true
+ cache: _propTypes2['default'].any, // object to use to cache results; set to null/false to disable caching
+ children: _propTypes2['default'].func.isRequired, // Child function responsible for creating the inner Select component; (props: Object): PropTypes.element
+ ignoreAccents: _propTypes2['default'].bool, // strip diacritics when filtering; defaults to true
+ ignoreCase: _propTypes2['default'].bool, // perform case-insensitive filtering; defaults to true
+ loadingPlaceholder: _propTypes2['default'].oneOfType([// replaces the placeholder while options are loading
+ _propTypes2['default'].string, _propTypes2['default'].node]),
+ loadOptions: _propTypes2['default'].func.isRequired, // callback to load options asynchronously; (inputValue: string, callback: Function): ?Promise
+ multi: _propTypes2['default'].bool, // multi-value input
+ options: _propTypes2['default'].array.isRequired, // array of options
+ placeholder: _propTypes2['default'].oneOfType([// field placeholder, displayed when there's no value (shared with Select)
+ _propTypes2['default'].string, _propTypes2['default'].node]),
+ noResultsText: _propTypes2['default'].oneOfType([// field noResultsText, displayed when no options come back from the server
+ _propTypes2['default'].string, _propTypes2['default'].node]),
+ onChange: _propTypes2['default'].func, // onChange handler: function (newValue) {}
+ searchPromptText: _propTypes2['default'].oneOfType([// label to prompt for search input
+ _propTypes2['default'].string, _propTypes2['default'].node]),
+ onInputChange: _propTypes2['default'].func, // optional for keeping track of what is being typed
+ value: _propTypes2['default'].any };
// initial field value
var defaultCache = {};
@@ -263,11 +268,11 @@ Async.defaultProps = defaultProps;
function defaultChildren(props) {
return _react2['default'].createElement(_Select2['default'], props);
-};
+}
module.exports = exports['default'];
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./Select":5,"./utils/stripDiacritics":11}],2:[function(require,module,exports){
+},{"./Select":5,"./utils/stripDiacritics":11,"prop-types":undefined}],2:[function(require,module,exports){
(function (global){
'use strict';
@@ -279,6 +284,10 @@ var _react = (typeof window !== "undefined" ? window['React'] : typeof global !=
var _react2 = _interopRequireDefault(_react);
+var _createReactClass = require('create-react-class');
+
+var _createReactClass2 = _interopRequireDefault(_createReactClass);
+
var _Select = require('./Select');
var _Select2 = _interopRequireDefault(_Select);
@@ -293,9 +302,13 @@ function reduce(obj) {
}, props);
}
-var AsyncCreatable = _react2['default'].createClass({
+var AsyncCreatable = (0, _createReactClass2['default'])({
displayName: 'AsyncCreatableSelect',
+ focus: function focus() {
+ this.select.focus();
+ },
+
render: function render() {
var _this = this;
@@ -313,6 +326,7 @@ var AsyncCreatable = _react2['default'].createClass({
return asyncProps.onInputChange(input);
},
ref: function (ref) {
+ _this.select = ref;
creatableProps.ref(ref);
asyncProps.ref(ref);
}
@@ -327,7 +341,7 @@ var AsyncCreatable = _react2['default'].createClass({
module.exports = AsyncCreatable;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./Select":5}],3:[function(require,module,exports){
+},{"./Select":5,"create-react-class":undefined}],3:[function(require,module,exports){
(function (global){
'use strict';
@@ -341,6 +355,14 @@ var _react = (typeof window !== "undefined" ? window['React'] : typeof global !=
var _react2 = _interopRequireDefault(_react);
+var _createReactClass = require('create-react-class');
+
+var _createReactClass2 = _interopRequireDefault(_createReactClass);
+
+var _propTypes = require('prop-types');
+
+var _propTypes2 = _interopRequireDefault(_propTypes);
+
var _Select = require('./Select');
var _Select2 = _interopRequireDefault(_Select);
@@ -353,52 +375,52 @@ var _utilsDefaultMenuRenderer = require('./utils/defaultMenuRenderer');
var _utilsDefaultMenuRenderer2 = _interopRequireDefault(_utilsDefaultMenuRenderer);
-var Creatable = _react2['default'].createClass({
+var Creatable = (0, _createReactClass2['default'])({
displayName: 'CreatableSelect',
propTypes: {
// Child function responsible for creating the inner Select component
// This component can be used to compose HOCs (eg Creatable and Async)
// (props: Object): PropTypes.element
- children: _react2['default'].PropTypes.func,
+ children: _propTypes2['default'].func,
// See Select.propTypes.filterOptions
- filterOptions: _react2['default'].PropTypes.any,
+ filterOptions: _propTypes2['default'].any,
// Searches for any matching option within the set of options.
// This function prevents duplicate options from being created.
// ({ option: Object, options: Array, labelKey: string, valueKey: string }): boolean
- isOptionUnique: _react2['default'].PropTypes.func,
+ isOptionUnique: _propTypes2['default'].func,
// Determines if the current input text represents a valid option.
// ({ label: string }): boolean
- isValidNewOption: _react2['default'].PropTypes.func,
+ isValidNewOption: _propTypes2['default'].func,
// See Select.propTypes.menuRenderer
- menuRenderer: _react2['default'].PropTypes.any,
+ menuRenderer: _propTypes2['default'].any,
// Factory to create new option.
// ({ label: string, labelKey: string, valueKey: string }): Object
- newOptionCreator: _react2['default'].PropTypes.func,
+ newOptionCreator: _propTypes2['default'].func,
// input change handler: function (inputValue) {}
- onInputChange: _react2['default'].PropTypes.func,
+ onInputChange: _propTypes2['default'].func,
// input keyDown handler: function (event) {}
- onInputKeyDown: _react2['default'].PropTypes.func,
+ onInputKeyDown: _propTypes2['default'].func,
// new option click handler: function (option) {}
- onNewOptionClick: _react2['default'].PropTypes.func,
+ onNewOptionClick: _propTypes2['default'].func,
// See Select.propTypes.options
- options: _react2['default'].PropTypes.array,
+ options: _propTypes2['default'].array,
// Creates prompt/placeholder option text.
// (filterText: string): string
- promptTextCreator: _react2['default'].PropTypes.func,
+ promptTextCreator: _propTypes2['default'].func,
// Decides if a keyDown event (eg its `keyCode`) should result in the creation of a new option.
- shouldKeyDownEventCreateNewOption: _react2['default'].PropTypes.func
+ shouldKeyDownEventCreateNewOption: _propTypes2['default'].func
},
// Default prop methods
@@ -554,6 +576,10 @@ var Creatable = _react2['default'].createClass({
}
},
+ focus: function focus() {
+ this.select.focus();
+ },
+
render: function render() {
var _this = this;
@@ -647,7 +673,7 @@ function shouldKeyDownEventCreateNewOption(_ref6) {
module.exports = Creatable;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./Select":5,"./utils/defaultFilterOptions":9,"./utils/defaultMenuRenderer":10}],4:[function(require,module,exports){
+},{"./Select":5,"./utils/defaultFilterOptions":9,"./utils/defaultMenuRenderer":10,"create-react-class":undefined,"prop-types":undefined}],4:[function(require,module,exports){
(function (global){
'use strict';
@@ -657,25 +683,31 @@ var _react = (typeof window !== "undefined" ? window['React'] : typeof global !=
var _react2 = _interopRequireDefault(_react);
+var _createReactClass = require('create-react-class');
+
+var _createReactClass2 = _interopRequireDefault(_createReactClass);
+
+var _propTypes = require('prop-types');
+
+var _propTypes2 = _interopRequireDefault(_propTypes);
+
var _classnames = (typeof window !== "undefined" ? window['classNames'] : typeof global !== "undefined" ? global['classNames'] : null);
var _classnames2 = _interopRequireDefault(_classnames);
-var Option = _react2['default'].createClass({
- displayName: 'Option',
-
+var Option = (0, _createReactClass2['default'])({
propTypes: {
- children: _react2['default'].PropTypes.node,
- className: _react2['default'].PropTypes.string, // className (based on mouse position)
- instancePrefix: _react2['default'].PropTypes.string.isRequired, // unique prefix for the ids (used for aria)
- isDisabled: _react2['default'].PropTypes.bool, // the option is disabled
- isFocused: _react2['default'].PropTypes.bool, // the option is focused
- isSelected: _react2['default'].PropTypes.bool, // the option is selected
- onFocus: _react2['default'].PropTypes.func, // method to handle mouseEnter on option element
- onSelect: _react2['default'].PropTypes.func, // method to handle click on option element
- onUnfocus: _react2['default'].PropTypes.func, // method to handle mouseLeave on option element
- option: _react2['default'].PropTypes.object.isRequired, // object that is base for that option
- optionIndex: _react2['default'].PropTypes.number },
+ children: _propTypes2['default'].node,
+ className: _propTypes2['default'].string, // className (based on mouse position)
+ instancePrefix: _propTypes2['default'].string.isRequired, // unique prefix for the ids (used for aria)
+ isDisabled: _propTypes2['default'].bool, // the option is disabled
+ isFocused: _propTypes2['default'].bool, // the option is focused
+ isSelected: _propTypes2['default'].bool, // the option is selected
+ onFocus: _propTypes2['default'].func, // method to handle mouseEnter on option element
+ onSelect: _propTypes2['default'].func, // method to handle click on option element
+ onUnfocus: _propTypes2['default'].func, // method to handle mouseLeave on option element
+ option: _propTypes2['default'].object.isRequired, // object that is base for that option
+ optionIndex: _propTypes2['default'].number },
// index of the option, used to generate unique ids for aria
blockEvent: function blockEvent(event) {
event.preventDefault();
@@ -762,7 +794,7 @@ var Option = _react2['default'].createClass({
module.exports = Option;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{}],5:[function(require,module,exports){
+},{"create-react-class":undefined,"prop-types":undefined}],5:[function(require,module,exports){
(function (global){
/*!
Copyright (c) 2016 Jed Watson.
@@ -788,6 +820,14 @@ var _react = (typeof window !== "undefined" ? window['React'] : typeof global !=
var _react2 = _interopRequireDefault(_react);
+var _createReactClass = require('create-react-class');
+
+var _createReactClass2 = _interopRequireDefault(_createReactClass);
+
+var _propTypes = require('prop-types');
+
+var _propTypes2 = _interopRequireDefault(_propTypes);
+
var _reactDom = (typeof window !== "undefined" ? window['ReactDOM'] : typeof global !== "undefined" ? global['ReactDOM'] : null);
var _reactDom2 = _interopRequireDefault(_reactDom);
@@ -849,84 +889,85 @@ function stringifyValue(value) {
}
}
-var stringOrNode = _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.node]);
+var stringOrNode = _propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].node]);
var instanceId = 1;
-var Select = _react2['default'].createClass({
+var Select = (0, _createReactClass2['default'])({
displayName: 'Select',
propTypes: {
- addLabelText: _react2['default'].PropTypes.string, // placeholder displayed when you want to add a label on a multi-value input
- 'aria-label': _react2['default'].PropTypes.string, // Aria label (for assistive tech)
- 'aria-labelledby': _react2['default'].PropTypes.string, // HTML ID of an element that should be used as the label (for assistive tech)
- arrowRenderer: _react2['default'].PropTypes.func, // Create drop-down caret element
- autoBlur: _react2['default'].PropTypes.bool, // automatically blur the component when an option is selected
- autofocus: _react2['default'].PropTypes.bool, // autofocus the component on mount
- autosize: _react2['default'].PropTypes.bool, // whether to enable autosizing or not
- backspaceRemoves: _react2['default'].PropTypes.bool, // whether backspace removes an item if there is no text input
- backspaceToRemoveMessage: _react2['default'].PropTypes.string, // Message to use for screenreaders to press backspace to remove the current item - {label} is replaced with the item label
- className: _react2['default'].PropTypes.string, // className for the outer element
+ addLabelText: _propTypes2['default'].string, // placeholder displayed when you want to add a label on a multi-value input
+ 'aria-describedby': _propTypes2['default'].string, // HTML ID(s) of element(s) that should be used to describe this input (for assistive tech)
+ 'aria-label': _propTypes2['default'].string, // Aria label (for assistive tech)
+ 'aria-labelledby': _propTypes2['default'].string, // HTML ID of an element that should be used as the label (for assistive tech)
+ arrowRenderer: _propTypes2['default'].func, // Create drop-down caret element
+ autoBlur: _propTypes2['default'].bool, // automatically blur the component when an option is selected
+ autofocus: _propTypes2['default'].bool, // autofocus the component on mount
+ autosize: _propTypes2['default'].bool, // whether to enable autosizing or not
+ backspaceRemoves: _propTypes2['default'].bool, // whether backspace removes an item if there is no text input
+ backspaceToRemoveMessage: _propTypes2['default'].string, // Message to use for screenreaders to press backspace to remove the current item - {label} is replaced with the item label
+ className: _propTypes2['default'].string, // className for the outer element
clearAllText: stringOrNode, // title for the "clear" control when multi: true
- clearRenderer: _react2['default'].PropTypes.func, // create clearable x element
+ clearRenderer: _propTypes2['default'].func, // create clearable x element
clearValueText: stringOrNode, // title for the "clear" control
- clearable: _react2['default'].PropTypes.bool, // should it be possible to reset value
- deleteRemoves: _react2['default'].PropTypes.bool, // whether backspace removes an item if there is no text input
- delimiter: _react2['default'].PropTypes.string, // delimiter to use to join multiple values for the hidden field value
- disabled: _react2['default'].PropTypes.bool, // whether the Select is disabled or not
- escapeClearsValue: _react2['default'].PropTypes.bool, // whether escape clears the value when the menu is closed
- filterOption: _react2['default'].PropTypes.func, // method to filter a single option (option, filterString)
- filterOptions: _react2['default'].PropTypes.any, // boolean to enable default filtering or function to filter the options array ([options], filterString, [values])
- ignoreAccents: _react2['default'].PropTypes.bool, // whether to strip diacritics when filtering
- ignoreCase: _react2['default'].PropTypes.bool, // whether to perform case-insensitive filtering
- inputProps: _react2['default'].PropTypes.object, // custom attributes for the Input
- inputRenderer: _react2['default'].PropTypes.func, // returns a custom input component
- instanceId: _react2['default'].PropTypes.string, // set the components instanceId
- isLoading: _react2['default'].PropTypes.bool, // whether the Select is loading externally or not (such as options being loaded)
- joinValues: _react2['default'].PropTypes.bool, // joins multiple values into a single form field with the delimiter (legacy mode)
- labelKey: _react2['default'].PropTypes.string, // path of the label value in option objects
- matchPos: _react2['default'].PropTypes.string, // (any|start) match the start or entire string when filtering
- matchProp: _react2['default'].PropTypes.string, // (any|label|value) which option property to filter on
- menuBuffer: _react2['default'].PropTypes.number, // optional buffer (in px) between the bottom of the viewport and the bottom of the menu
- menuContainerStyle: _react2['default'].PropTypes.object, // optional style to apply to the menu container
- menuRenderer: _react2['default'].PropTypes.func, // renders a custom menu with options
- menuStyle: _react2['default'].PropTypes.object, // optional style to apply to the menu
- multi: _react2['default'].PropTypes.bool, // multi-value input
- name: _react2['default'].PropTypes.string, // generates a hidden tag with this field name for html forms
+ clearable: _propTypes2['default'].bool, // should it be possible to reset value
+ deleteRemoves: _propTypes2['default'].bool, // whether backspace removes an item if there is no text input
+ delimiter: _propTypes2['default'].string, // delimiter to use to join multiple values for the hidden field value
+ disabled: _propTypes2['default'].bool, // whether the Select is disabled or not
+ escapeClearsValue: _propTypes2['default'].bool, // whether escape clears the value when the menu is closed
+ filterOption: _propTypes2['default'].func, // method to filter a single option (option, filterString)
+ filterOptions: _propTypes2['default'].any, // boolean to enable default filtering or function to filter the options array ([options], filterString, [values])
+ ignoreAccents: _propTypes2['default'].bool, // whether to strip diacritics when filtering
+ ignoreCase: _propTypes2['default'].bool, // whether to perform case-insensitive filtering
+ inputProps: _propTypes2['default'].object, // custom attributes for the Input
+ inputRenderer: _propTypes2['default'].func, // returns a custom input component
+ instanceId: _propTypes2['default'].string, // set the components instanceId
+ isLoading: _propTypes2['default'].bool, // whether the Select is loading externally or not (such as options being loaded)
+ joinValues: _propTypes2['default'].bool, // joins multiple values into a single form field with the delimiter (legacy mode)
+ labelKey: _propTypes2['default'].string, // path of the label value in option objects
+ matchPos: _propTypes2['default'].string, // (any|start) match the start or entire string when filtering
+ matchProp: _propTypes2['default'].string, // (any|label|value) which option property to filter on
+ menuBuffer: _propTypes2['default'].number, // optional buffer (in px) between the bottom of the viewport and the bottom of the menu
+ menuContainerStyle: _propTypes2['default'].object, // optional style to apply to the menu container
+ menuRenderer: _propTypes2['default'].func, // renders a custom menu with options
+ menuStyle: _propTypes2['default'].object, // optional style to apply to the menu
+ multi: _propTypes2['default'].bool, // multi-value input
+ name: _propTypes2['default'].string, // generates a hidden tag with this field name for html forms
noResultsText: stringOrNode, // placeholder displayed when there are no matching search results
- onBlur: _react2['default'].PropTypes.func, // onBlur handler: function (event) {}
- onBlurResetsInput: _react2['default'].PropTypes.bool, // whether input is cleared on blur
- onChange: _react2['default'].PropTypes.func, // onChange handler: function (newValue) {}
- onClose: _react2['default'].PropTypes.func, // fires when the menu is closed
- onCloseResetsInput: _react2['default'].PropTypes.bool, // whether input is cleared when menu is closed through the arrow
- onFocus: _react2['default'].PropTypes.func, // onFocus handler: function (event) {}
- onInputChange: _react2['default'].PropTypes.func, // onInputChange handler: function (inputValue) {}
- onInputKeyDown: _react2['default'].PropTypes.func, // input keyDown handler: function (event) {}
- onMenuScrollToBottom: _react2['default'].PropTypes.func, // fires when the menu is scrolled to the bottom; can be used to paginate options
- onOpen: _react2['default'].PropTypes.func, // fires when the menu is opened
- onValueClick: _react2['default'].PropTypes.func, // onClick handler for value labels: function (value, event) {}
- openAfterFocus: _react2['default'].PropTypes.bool, // boolean to enable opening dropdown when focused
- openOnFocus: _react2['default'].PropTypes.bool, // always open options menu on focus
- optionClassName: _react2['default'].PropTypes.string, // additional class(es) to apply to the elements
- optionComponent: _react2['default'].PropTypes.func, // option component to render in dropdown
- optionRenderer: _react2['default'].PropTypes.func, // optionRenderer: function (option) {}
- options: _react2['default'].PropTypes.array, // array of options
- pageSize: _react2['default'].PropTypes.number, // number of entries to page when using page up/down keys
+ onBlur: _propTypes2['default'].func, // onBlur handler: function (event) {}
+ onBlurResetsInput: _propTypes2['default'].bool, // whether input is cleared on blur
+ onChange: _propTypes2['default'].func, // onChange handler: function (newValue) {}
+ onClose: _propTypes2['default'].func, // fires when the menu is closed
+ onCloseResetsInput: _propTypes2['default'].bool, // whether input is cleared when menu is closed through the arrow
+ onFocus: _propTypes2['default'].func, // onFocus handler: function (event) {}
+ onInputChange: _propTypes2['default'].func, // onInputChange handler: function (inputValue) {}
+ onInputKeyDown: _propTypes2['default'].func, // input keyDown handler: function (event) {}
+ onMenuScrollToBottom: _propTypes2['default'].func, // fires when the menu is scrolled to the bottom; can be used to paginate options
+ onOpen: _propTypes2['default'].func, // fires when the menu is opened
+ onValueClick: _propTypes2['default'].func, // onClick handler for value labels: function (value, event) {}
+ openAfterFocus: _propTypes2['default'].bool, // boolean to enable opening dropdown when focused
+ openOnFocus: _propTypes2['default'].bool, // always open options menu on focus
+ optionClassName: _propTypes2['default'].string, // additional class(es) to apply to the elements
+ optionComponent: _propTypes2['default'].func, // option component to render in dropdown
+ optionRenderer: _propTypes2['default'].func, // optionRenderer: function (option) {}
+ options: _propTypes2['default'].array, // array of options
+ pageSize: _propTypes2['default'].number, // number of entries to page when using page up/down keys
placeholder: stringOrNode, // field placeholder, displayed when there's no value
- required: _react2['default'].PropTypes.bool, // applies HTML5 required attribute when needed
- resetValue: _react2['default'].PropTypes.any, // value to use when you clear the control
- scrollMenuIntoView: _react2['default'].PropTypes.bool, // boolean to enable the viewport to shift so that the full menu fully visible when engaged
- searchable: _react2['default'].PropTypes.bool, // whether to enable searching feature or not
- simpleValue: _react2['default'].PropTypes.bool, // pass the value to onChange as a simple value (legacy pre 1.0 mode), defaults to false
- style: _react2['default'].PropTypes.object, // optional style to apply to the control
- tabIndex: _react2['default'].PropTypes.string, // optional tab index of the control
- tabSelectsValue: _react2['default'].PropTypes.bool, // whether to treat tabbing out while focused to be value selection
- value: _react2['default'].PropTypes.any, // initial field value
- valueComponent: _react2['default'].PropTypes.func, // value component to render
- valueKey: _react2['default'].PropTypes.string, // path of the label value in option objects
- valueRenderer: _react2['default'].PropTypes.func, // valueRenderer: function (option) {}
- wrapperStyle: _react2['default'].PropTypes.object },
+ required: _propTypes2['default'].bool, // applies HTML5 required attribute when needed
+ resetValue: _propTypes2['default'].any, // value to use when you clear the control
+ scrollMenuIntoView: _propTypes2['default'].bool, // boolean to enable the viewport to shift so that the full menu fully visible when engaged
+ searchable: _propTypes2['default'].bool, // whether to enable searching feature or not
+ simpleValue: _propTypes2['default'].bool, // pass the value to onChange as a simple value (legacy pre 1.0 mode), defaults to false
+ style: _propTypes2['default'].object, // optional style to apply to the control
+ tabIndex: _propTypes2['default'].string, // optional tab index of the control
+ tabSelectsValue: _propTypes2['default'].bool, // whether to treat tabbing out while focused to be value selection
+ value: _propTypes2['default'].any, // initial field value
+ valueComponent: _propTypes2['default'].func, // value component to render
+ valueKey: _propTypes2['default'].string, // path of the label value in option objects
+ valueRenderer: _propTypes2['default'].func, // valueRenderer: function (option) {}
+ wrapperStyle: _propTypes2['default'].object },
// optional style to apply to the component wrapper
statics: { Async: _Async2['default'], AsyncCreatable: _AsyncCreatable2['default'], Creatable: _Creatable2['default'] },
@@ -961,7 +1002,6 @@ var Select = _react2['default'].createClass({
noResultsText: 'No results found',
onBlurResetsInput: true,
onCloseResetsInput: true,
- openAfterFocus: false,
optionComponent: _Option2['default'],
pageSize: 5,
placeholder: 'Select...',
@@ -1087,12 +1127,6 @@ var Select = _react2['default'].createClass({
focus: function focus() {
if (!this.input) return;
this.input.focus();
-
- if (this.props.openAfterFocus) {
- this.setState({
- isOpen: true
- });
- }
},
blurInput: function blurInput() {
@@ -1706,6 +1740,7 @@ var Select = _react2['default'].createClass({
'aria-owns': ariaOwns,
'aria-haspopup': '' + isOpen,
'aria-activedescendant': isOpen ? this._instancePrefix + '-option-' + focusedOptionIndex : this._instancePrefix + '-value',
+ 'aria-describedby': this.props['aria-describedby'],
'aria-labelledby': this.props['aria-labelledby'],
'aria-label': this.props['aria-label'],
className: className,
@@ -1877,7 +1912,14 @@ var Select = _react2['default'].createClass({
var focusedOption = this.state.focusedOption || selectedOption;
if (focusedOption && !focusedOption.disabled) {
- var focusedOptionIndex = options.indexOf(focusedOption);
+ var focusedOptionIndex = -1;
+ options.some(function (option, index) {
+ var isOptionEqual = option.value === focusedOption.value;
+ if (isOptionEqual) {
+ focusedOptionIndex = index;
+ }
+ return isOptionEqual;
+ });
if (focusedOptionIndex !== -1) {
return focusedOptionIndex;
}
@@ -1933,6 +1975,7 @@ var Select = _react2['default'].createClass({
var className = (0, _classnames2['default'])('Select', this.props.className, {
'Select--multi': this.props.multi,
'Select--single': !this.props.multi,
+ 'is-clearable': this.props.clearable,
'is-disabled': this.props.disabled,
'is-focused': this.state.isFocused,
'is-loading': this.props.isLoading,
@@ -1993,7 +2036,7 @@ exports['default'] = Select;
module.exports = exports['default'];
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./Async":1,"./AsyncCreatable":2,"./Creatable":3,"./Option":4,"./Value":6,"./utils/defaultArrowRenderer":7,"./utils/defaultClearRenderer":8,"./utils/defaultFilterOptions":9,"./utils/defaultMenuRenderer":10}],6:[function(require,module,exports){
+},{"./Async":1,"./AsyncCreatable":2,"./Creatable":3,"./Option":4,"./Value":6,"./utils/defaultArrowRenderer":7,"./utils/defaultClearRenderer":8,"./utils/defaultFilterOptions":9,"./utils/defaultMenuRenderer":10,"create-react-class":undefined,"prop-types":undefined}],6:[function(require,module,exports){
(function (global){
'use strict';
@@ -2003,21 +2046,29 @@ var _react = (typeof window !== "undefined" ? window['React'] : typeof global !=
var _react2 = _interopRequireDefault(_react);
+var _createReactClass = require('create-react-class');
+
+var _createReactClass2 = _interopRequireDefault(_createReactClass);
+
+var _propTypes = require('prop-types');
+
+var _propTypes2 = _interopRequireDefault(_propTypes);
+
var _classnames = (typeof window !== "undefined" ? window['classNames'] : typeof global !== "undefined" ? global['classNames'] : null);
var _classnames2 = _interopRequireDefault(_classnames);
-var Value = _react2['default'].createClass({
+var Value = (0, _createReactClass2['default'])({
displayName: 'Value',
propTypes: {
- children: _react2['default'].PropTypes.node,
- disabled: _react2['default'].PropTypes.bool, // disabled prop passed to ReactSelect
- id: _react2['default'].PropTypes.string, // Unique id for the value - used for aria
- onClick: _react2['default'].PropTypes.func, // method to handle click on value label
- onRemove: _react2['default'].PropTypes.func, // method to handle removal of the value
- value: _react2['default'].PropTypes.object.isRequired },
+ children: _propTypes2['default'].node,
+ disabled: _propTypes2['default'].bool, // disabled prop passed to ReactSelect
+ id: _propTypes2['default'].string, // Unique id for the value - used for aria
+ onClick: _propTypes2['default'].func, // method to handle click on value label
+ onRemove: _propTypes2['default'].func, // method to handle removal of the value
+ value: _propTypes2['default'].object.isRequired },
// the option object for this value
handleMouseDown: function handleMouseDown(event) {
@@ -2103,7 +2154,7 @@ var Value = _react2['default'].createClass({
module.exports = Value;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{}],7:[function(require,module,exports){
+},{"create-react-class":undefined,"prop-types":undefined}],7:[function(require,module,exports){
(function (global){
"use strict";
diff --git a/dist/react-select.min.js b/dist/react-select.min.js
index 7d2a0b0309..a030384152 100644
--- a/dist/react-select.min.js
+++ b/dist/react-select.min.js
@@ -1,2 +1,2 @@
-!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Select=e()}}(function(){return function e(t,u,n){function s(i,a){if(!u[i]){if(!t[i]){var r="function"==typeof require&&require;if(!a&&r)return r(i,!0);if(o)return o(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var p=u[i]={exports:{}};t[i][0].call(p.exports,function(e){var u=t[i][1][e];return s(u?u:e)},p,p.exports,e,t,u,n)}return u[i].exports}for(var o="function"==typeof require&&require,i=0;ie.props.value.length&&e.clearOptions(),e.props.onChange(t)}};return u(l({},this.props,r,{isLoading:i,onInputChange:this._onInputChange}))}}]),t}(c.Component);u["default"]=C,C.propTypes=b,C.defaultProps=m,t.exports=u["default"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./Select":5,"./utils/stripDiacritics":11}],2:[function(e,t,u){(function(u){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function s(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return Object.keys(e).reduce(function(t,u){var n=e[u];return void 0!==n&&(t[u]=n),t},t)}var o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(u[n]=e[n]);return u}function o(e){return f["default"].createElement(E["default"],e)}function i(e){var t=e.option,u=e.options,n=e.labelKey,s=e.valueKey;return 0===u.filter(function(e){return e[n]===t[n]||e[s]===t[s]}).length}function a(e){var t=e.label;return!!t}function r(e){var t=e.label,u=e.labelKey,n=e.valueKey,s={};return s[n]=t,s[u]=t,s.className="Select-create-option-placeholder",s}function l(e){return'Create option "'+e+'"'}function p(e){var t=e.keyCode;switch(t){case 9:case 13:case 188:return!0}return!1}var d=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(u[n]=e[n]);return u}function i(e,t,u){return t in e?Object.defineProperty(e,t,{value:u,enumerable:!0,configurable:!0,writable:!0}):e[t]=u,e}function a(e){var t=typeof e;return"string"===t?e:"object"===t?JSON.stringify(e):"number"===t||"boolean"===t?String(e):""}Object.defineProperty(u,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;ta.bottom||i.topt.offsetHeight&&!(t.scrollHeight-t.offsetHeight-t.scrollTop)&&this.props.onMenuScrollToBottom()}},handleRequired:function(e,t){return!e||(t?0===e.length:0===Object.keys(e).length)},getOptionLabel:function(e){return e[this.props.labelKey]},getValueArray:function(e,t){var u=this,n="object"==typeof t?t:this.props;if(n.multi){if("string"==typeof e&&(e=e.split(n.delimiter)),!Array.isArray(e)){if(null===e||void 0===e)return[];e=[e]}return e.map(function(e){return u.expandValue(e,n)}).filter(function(e){return e})}var s=this.expandValue(e,n);return s?[s]:[]},expandValue:function(e,t){var u=typeof e;if("string"!==u&&"number"!==u&&"boolean"!==u)return e;var n=t.options,s=t.valueKey;if(n)for(var o=0;on&&this.focusOption(u[n+1])},popValue:function(){var e=this.getValueArray(this.props.value);e.length&&e[e.length-1].clearableValue!==!1&&this.setValue(e.slice(0,e.length-1))},removeValue:function(e){var t=this.getValueArray(this.props.value);this.setValue(t.filter(function(t){return t!==e})),this.focus()},clearValue:function(e){e&&"mousedown"===e.type&&0!==e.button||(e.stopPropagation(),e.preventDefault(),this.setValue(this.getResetValue()),this.setState({isOpen:!1,inputValue:""},this.focus))},getResetValue:function(){return void 0!==this.props.resetValue?this.props.resetValue:this.props.multi?[]:null},focusOption:function(e){this.setState({focusedOption:e})},focusNextOption:function(){this.focusAdjacentOption("next")},focusPreviousOption:function(){this.focusAdjacentOption("previous")},focusPageUpOption:function(){this.focusAdjacentOption("page_up")},focusPageDownOption:function(){this.focusAdjacentOption("page_down")},focusStartOption:function(){this.focusAdjacentOption("start")},focusEndOption:function(){this.focusAdjacentOption("end")},focusAdjacentOption:function(e){var t=this._visibleOptions.map(function(e,t){return{option:e,index:t}}).filter(function(e){return!e.option.disabled});if(this._scrollToFocusedOptionOnUpdate=!0,!this.state.isOpen)return void this.setState({isOpen:!0,inputValue:"",focusedOption:this._focusedOption||(t.length?t["next"===e?0:t.length-1].option:null)});if(t.length){for(var u=-1,n=0;n0?u-=1:u=t.length-1;else if("start"===e)u=0;else if("end"===e)u=t.length-1;else if("page_up"===e){var s=u-this.props.pageSize;u=s<0?0:s}else if("page_down"===e){var s=u+this.props.pageSize;u=s>t.length-1?t.length-1:s}u===-1&&(u=0),this.setState({focusedIndex:t[u].index,focusedOption:t[u].option})}},getFocusedOption:function(){return this._focusedOption},getInputValue:function(){return this.state.inputValue},selectFocusedOption:function(){if(this._focusedOption)return this.selectValue(this._focusedOption)},renderLoading:function(){if(this.props.isLoading)return p["default"].createElement("span",{className:"Select-loading-zone","aria-hidden":"true"},p["default"].createElement("span",{className:"Select-loading"}))},renderValue:function(e,t){var u=this,n=this.props.valueRenderer||this.getOptionLabel,s=this.props.valueComponent;if(!e.length)return this.state.inputValue?null:p["default"].createElement("div",{className:"Select-placeholder"},this.props.placeholder);var o=this.props.onValueClick?this.handleValueClick:null;return this.props.multi?e.map(function(e,t){return p["default"].createElement(s,{id:u._instancePrefix+"-value-"+t,instancePrefix:u._instancePrefix,disabled:u.props.disabled||e.clearableValue===!1,key:"value-"+t+"-"+e[u.props.valueKey],onClick:o,onRemove:u.removeValue,value:e},n(e,t),p["default"].createElement("span",{className:"Select-aria-only"}," "))}):this.state.inputValue?void 0:(t&&(o=null),p["default"].createElement(s,{id:this._instancePrefix+"-value-item",disabled:this.props.disabled,instancePrefix:this._instancePrefix,onClick:o,value:e[0]},n(e[0])))},renderInput:function(e,t){var u,n=this,s=(0,y["default"])("Select-input",this.props.inputProps.className),a=!!this.state.isOpen,l=(0,y["default"])((u={},i(u,this._instancePrefix+"-list",a),i(u,this._instancePrefix+"-backspace-remove-message",this.props.multi&&!this.props.disabled&&this.state.isFocused&&!this.state.inputValue),u)),d=r({},this.props.inputProps,{role:"combobox","aria-expanded":""+a,"aria-owns":l,"aria-haspopup":""+a,"aria-activedescendant":a?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value","aria-labelledby":this.props["aria-labelledby"],"aria-label":this.props["aria-label"],className:s,tabIndex:this.props.tabIndex,onBlur:this.handleInputBlur,onChange:this.handleInputChange,onFocus:this.handleInputFocus,ref:function(e){return n.input=e},required:this.state.required,value:this.state.inputValue});if(this.props.inputRenderer)return this.props.inputRenderer(d);if(this.props.disabled||!this.props.searchable){var c=this.props.inputProps,f=(c.inputClassName,o(c,["inputClassName"]));return p["default"].createElement("div",r({},f,{role:"combobox","aria-expanded":a,"aria-owns":a?this._instancePrefix+"-list":this._instancePrefix+"-value","aria-activedescendant":a?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value",className:s,tabIndex:this.props.tabIndex||0,onBlur:this.handleInputBlur,onFocus:this.handleInputFocus,ref:function(e){return n.input=e},"aria-readonly":""+!!this.props.disabled,style:{border:0,width:1,display:"inline-block"}}))}return this.props.autosize?p["default"].createElement(h["default"],r({},d,{minWidth:"5"})):p["default"].createElement("div",{className:s},p["default"].createElement("input",d))},renderClear:function(){if(this.props.clearable&&this.props.value&&0!==this.props.value&&(!this.props.multi||this.props.value.length)&&!this.props.disabled&&!this.props.isLoading){var e=this.props.clearRenderer();return p["default"].createElement("span",{className:"Select-clear-zone",title:this.props.multi?this.props.clearAllText:this.props.clearValueText,"aria-label":this.props.multi?this.props.clearAllText:this.props.clearValueText,onMouseDown:this.clearValue,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEndClearValue},e)}},renderArrow:function(){var e=this.handleMouseDownOnArrow,t=this.state.isOpen,u=this.props.arrowRenderer({onMouseDown:e,isOpen:t});return p["default"].createElement("span",{className:"Select-arrow-zone",onMouseDown:e},u)},filterOptions:function K(e){var t=this.state.inputValue,u=this.props.options||[];if(this.props.filterOptions){var K="function"==typeof this.props.filterOptions?this.props.filterOptions:m["default"];return K(u,t,e,{filterOption:this.props.filterOption,ignoreAccents:this.props.ignoreAccents,ignoreCase:this.props.ignoreCase,labelKey:this.props.labelKey,matchPos:this.props.matchPos,matchProp:this.props.matchProp,valueKey:this.props.valueKey})}return u},onOptionRef:function(e,t){t&&(this.focused=e)},renderMenu:function(e,t,u){return e&&e.length?this.props.menuRenderer({focusedOption:u,focusOption:this.focusOption,
-instancePrefix:this._instancePrefix,labelKey:this.props.labelKey,onFocus:this.focusOption,onSelect:this.selectValue,optionClassName:this.props.optionClassName,optionComponent:this.props.optionComponent,optionRenderer:this.props.optionRenderer||this.getOptionLabel,options:e,selectValue:this.selectValue,valueArray:t,valueKey:this.props.valueKey,onOptionRef:this.onOptionRef}):this.props.noResultsText?p["default"].createElement("div",{className:"Select-noresults"},this.props.noResultsText):null},renderHiddenField:function(e){var t=this;if(this.props.name){if(this.props.joinValues){var u=e.map(function(e){return a(e[t.props.valueKey])}).join(this.props.delimiter);return p["default"].createElement("input",{type:"hidden",ref:function(e){return t.value=e},name:this.props.name,value:u,disabled:this.props.disabled})}return e.map(function(e,u){return p["default"].createElement("input",{key:"hidden."+u,type:"hidden",ref:"value"+u,name:t.props.name,value:a(e[t.props.valueKey]),disabled:t.props.disabled})})}},getFocusableOptionIndex:function(e){var t=this._visibleOptions;if(!t.length)return null;var u=this.state.focusedOption||e;if(u&&!u.disabled){var n=t.indexOf(u);if(n!==-1)return n}for(var s=0;s-1)return!1;if(n.filterOption)return n.filterOption.call(s,e,t);if(!t)return!0;var o=String(e[n.valueKey]),a=String(e[n.labelKey]);return n.ignoreAccents&&("label"!==n.matchProp&&(o=(0,i["default"])(o)),"value"!==n.matchProp&&(a=(0,i["default"])(a))),n.ignoreCase&&("label"!==n.matchProp&&(o=o.toLowerCase()),"value"!==n.matchProp&&(a=a.toLowerCase())),"start"===n.matchPos?"label"!==n.matchProp&&o.substr(0,t.length)===t||"value"!==n.matchProp&&a.substr(0,t.length)===t:"label"!==n.matchProp&&o.indexOf(t)>=0||"value"!==n.matchProp&&a.indexOf(t)>=0})}var o=e("./stripDiacritics"),i=n(o);t.exports=s},{"./stripDiacritics":11}],10:[function(e,t,u){(function(e){"use strict";function u(e){return e&&e.__esModule?e:{"default":e}}function n(e){var t=e.focusedOption,u=e.instancePrefix,n=(e.labelKey,e.onFocus),s=e.onSelect,i=e.optionClassName,r=e.optionComponent,l=e.optionRenderer,p=e.options,d=e.valueArray,c=e.valueKey,f=e.onOptionRef,h=r;return p.map(function(e,r){var p=d&&d.indexOf(e)>-1,E=e===t,y=(0,o["default"])(i,{"Select-option":!0,"is-selected":p,"is-focused":E,"is-disabled":e.disabled});return a["default"].createElement(h,{className:y,instancePrefix:u,isDisabled:e.disabled,isFocused:E,isSelected:p,key:"option-"+r+"-"+e[c],onFocus:n,onSelect:s,option:e,optionIndex:r,ref:function(e){f(e,E)}},l(e,r))})}var s="undefined"!=typeof window?window.classNames:"undefined"!=typeof e?e.classNames:null,o=u(s),i="undefined"!=typeof window?window.React:"undefined"!=typeof e?e.React:null,a=u(i);t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],11:[function(e,t,u){"use strict";var n=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}];t.exports=function(e){for(var t=0;te.props.value.length&&e.clearOptions(),e.props.onChange(t)}};return u(l({},this.props,r,{isLoading:i,onInputChange:this._onInputChange}))}}]),t}(c.Component);u["default"]=O,O.propTypes=m,O.defaultProps=F,t.exports=u["default"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./Select":5,"./utils/stripDiacritics":11,"prop-types":void 0}],2:[function(e,t,u){(function(u){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function s(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return Object.keys(e).reduce(function(t,u){var n=e[u];return void 0!==n&&(t[u]=n),t},t)}var o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(u[n]=e[n]);return u}function o(e){return f["default"].createElement(y["default"],e)}function i(e){var t=e.option,u=e.options,n=e.labelKey,s=e.valueKey;return 0===u.filter(function(e){return e[n]===t[n]||e[s]===t[s]}).length}function a(e){var t=e.label;return!!t}function r(e){var t=e.label,u=e.labelKey,n=e.valueKey,s={};return s[n]=t,s[u]=t,s.className="Select-create-option-placeholder",s}function l(e){return'Create option "'+e+'"'}function p(e){var t=e.keyCode;switch(t){case 9:case 13:case 188:return!0}return!1}var d=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(u[n]=e[n]);return u}function i(e,t,u){return t in e?Object.defineProperty(e,t,{value:u,enumerable:!0,configurable:!0,writable:!0}):e[t]=u,e}function a(e){var t=typeof e;return"string"===t?e:"object"===t?JSON.stringify(e):"number"===t||"boolean"===t?String(e):""}Object.defineProperty(u,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;ta.bottom||i.topt.offsetHeight&&!(t.scrollHeight-t.offsetHeight-t.scrollTop)&&this.props.onMenuScrollToBottom()}},handleRequired:function(e,t){return!e||(t?0===e.length:0===Object.keys(e).length)},getOptionLabel:function(e){return e[this.props.labelKey]},getValueArray:function(e,t){var u=this,n="object"==typeof t?t:this.props;if(n.multi){if("string"==typeof e&&(e=e.split(n.delimiter)),!Array.isArray(e)){if(null===e||void 0===e)return[];e=[e]}return e.map(function(e){return u.expandValue(e,n)}).filter(function(e){return e})}var s=this.expandValue(e,n);return s?[s]:[]},expandValue:function(e,t){var u=typeof e;if("string"!==u&&"number"!==u&&"boolean"!==u)return e;var n=t.options,s=t.valueKey;if(n)for(var o=0;on&&this.focusOption(u[n+1])},popValue:function(){var e=this.getValueArray(this.props.value);e.length&&e[e.length-1].clearableValue!==!1&&this.setValue(e.slice(0,e.length-1))},removeValue:function(e){var t=this.getValueArray(this.props.value);this.setValue(t.filter(function(t){return t!==e})),this.focus()},clearValue:function(e){e&&"mousedown"===e.type&&0!==e.button||(e.stopPropagation(),e.preventDefault(),this.setValue(this.getResetValue()),this.setState({isOpen:!1,inputValue:""},this.focus))},getResetValue:function(){return void 0!==this.props.resetValue?this.props.resetValue:this.props.multi?[]:null},focusOption:function(e){this.setState({focusedOption:e})},focusNextOption:function(){this.focusAdjacentOption("next")},focusPreviousOption:function(){this.focusAdjacentOption("previous")},focusPageUpOption:function(){this.focusAdjacentOption("page_up")},focusPageDownOption:function(){this.focusAdjacentOption("page_down")},focusStartOption:function(){this.focusAdjacentOption("start")},focusEndOption:function(){this.focusAdjacentOption("end")},focusAdjacentOption:function(e){var t=this._visibleOptions.map(function(e,t){return{option:e,index:t}}).filter(function(e){return!e.option.disabled});if(this._scrollToFocusedOptionOnUpdate=!0,!this.state.isOpen)return void this.setState({isOpen:!0,inputValue:"",focusedOption:this._focusedOption||(t.length?t["next"===e?0:t.length-1].option:null)});if(t.length){for(var u=-1,n=0;n0?u-=1:u=t.length-1;else if("start"===e)u=0;else if("end"===e)u=t.length-1;else if("page_up"===e){var s=u-this.props.pageSize;u=s<0?0:s}else if("page_down"===e){var s=u+this.props.pageSize;u=s>t.length-1?t.length-1:s}u===-1&&(u=0),this.setState({focusedIndex:t[u].index,focusedOption:t[u].option})}},getFocusedOption:function(){return this._focusedOption},getInputValue:function(){return this.state.inputValue},selectFocusedOption:function(){if(this._focusedOption)return this.selectValue(this._focusedOption)},renderLoading:function(){if(this.props.isLoading)return p["default"].createElement("span",{className:"Select-loading-zone","aria-hidden":"true"},p["default"].createElement("span",{className:"Select-loading"}))},renderValue:function(e,t){var u=this,n=this.props.valueRenderer||this.getOptionLabel,s=this.props.valueComponent;if(!e.length)return this.state.inputValue?null:p["default"].createElement("div",{className:"Select-placeholder"},this.props.placeholder);var o=this.props.onValueClick?this.handleValueClick:null;return this.props.multi?e.map(function(e,t){return p["default"].createElement(s,{id:u._instancePrefix+"-value-"+t,instancePrefix:u._instancePrefix,disabled:u.props.disabled||e.clearableValue===!1,key:"value-"+t+"-"+e[u.props.valueKey],onClick:o,onRemove:u.removeValue,value:e},n(e,t),p["default"].createElement("span",{className:"Select-aria-only"}," "))}):this.state.inputValue?void 0:(t&&(o=null),p["default"].createElement(s,{id:this._instancePrefix+"-value-item",disabled:this.props.disabled,instancePrefix:this._instancePrefix,onClick:o,value:e[0]},n(e[0])))},renderInput:function(e,t){var u,n=this,s=(0,m["default"])("Select-input",this.props.inputProps.className),a=!!this.state.isOpen,l=(0,m["default"])((u={},i(u,this._instancePrefix+"-list",a),i(u,this._instancePrefix+"-backspace-remove-message",this.props.multi&&!this.props.disabled&&this.state.isFocused&&!this.state.inputValue),u)),d=r({},this.props.inputProps,{role:"combobox","aria-expanded":""+a,"aria-owns":l,"aria-haspopup":""+a,"aria-activedescendant":a?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value","aria-describedby":this.props["aria-describedby"],"aria-labelledby":this.props["aria-labelledby"],"aria-label":this.props["aria-label"],className:s,tabIndex:this.props.tabIndex,onBlur:this.handleInputBlur,onChange:this.handleInputChange,onFocus:this.handleInputFocus,ref:function(e){return n.input=e},required:this.state.required,value:this.state.inputValue});if(this.props.inputRenderer)return this.props.inputRenderer(d);if(this.props.disabled||!this.props.searchable){var c=this.props.inputProps,f=(c.inputClassName,o(c,["inputClassName"]));return p["default"].createElement("div",r({},f,{role:"combobox","aria-expanded":a,"aria-owns":a?this._instancePrefix+"-list":this._instancePrefix+"-value","aria-activedescendant":a?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value",className:s,tabIndex:this.props.tabIndex||0,onBlur:this.handleInputBlur,onFocus:this.handleInputFocus,ref:function(e){return n.input=e},"aria-readonly":""+!!this.props.disabled,style:{border:0,width:1,display:"inline-block"}}))}return this.props.autosize?p["default"].createElement(v["default"],r({},d,{minWidth:"5"})):p["default"].createElement("div",{className:s},p["default"].createElement("input",d))},renderClear:function(){if(this.props.clearable&&this.props.value&&0!==this.props.value&&(!this.props.multi||this.props.value.length)&&!this.props.disabled&&!this.props.isLoading){var e=this.props.clearRenderer();return p["default"].createElement("span",{className:"Select-clear-zone",title:this.props.multi?this.props.clearAllText:this.props.clearValueText,"aria-label":this.props.multi?this.props.clearAllText:this.props.clearValueText,onMouseDown:this.clearValue,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEndClearValue},e)}},renderArrow:function(){var e=this.handleMouseDownOnArrow,t=this.state.isOpen,u=this.props.arrowRenderer({onMouseDown:e,isOpen:t});return p["default"].createElement("span",{className:"Select-arrow-zone",onMouseDown:e},u)},filterOptions:function q(e){var t=this.state.inputValue,u=this.props.options||[];if(this.props.filterOptions){var q="function"==typeof this.props.filterOptions?this.props.filterOptions:w["default"];return q(u,t,e,{filterOption:this.props.filterOption,ignoreAccents:this.props.ignoreAccents,ignoreCase:this.props.ignoreCase,labelKey:this.props.labelKey,matchPos:this.props.matchPos,matchProp:this.props.matchProp,valueKey:this.props.valueKey})}return u},onOptionRef:function(e,t){t&&(this.focused=e)},renderMenu:function(e,t,u){return e&&e.length?this.props.menuRenderer({focusedOption:u,focusOption:this.focusOption,instancePrefix:this._instancePrefix,labelKey:this.props.labelKey,onFocus:this.focusOption,onSelect:this.selectValue,optionClassName:this.props.optionClassName,optionComponent:this.props.optionComponent,optionRenderer:this.props.optionRenderer||this.getOptionLabel,options:e,selectValue:this.selectValue,valueArray:t,valueKey:this.props.valueKey,onOptionRef:this.onOptionRef}):this.props.noResultsText?p["default"].createElement("div",{className:"Select-noresults"},this.props.noResultsText):null},renderHiddenField:function(e){var t=this;if(this.props.name){if(this.props.joinValues){var u=e.map(function(e){return a(e[t.props.valueKey])}).join(this.props.delimiter);
+return p["default"].createElement("input",{type:"hidden",ref:function(e){return t.value=e},name:this.props.name,value:u,disabled:this.props.disabled})}return e.map(function(e,u){return p["default"].createElement("input",{key:"hidden."+u,type:"hidden",ref:"value"+u,name:t.props.name,value:a(e[t.props.valueKey]),disabled:t.props.disabled})})}},getFocusableOptionIndex:function(e){var t=this._visibleOptions;if(!t.length)return null;var u=this.state.focusedOption||e;if(u&&!u.disabled){var n=-1;if(t.some(function(e,t){var s=e.value===u.value;return s&&(n=t),s}),n!==-1)return n}for(var s=0;s-1)return!1;if(n.filterOption)return n.filterOption.call(s,e,t);if(!t)return!0;var o=String(e[n.valueKey]),a=String(e[n.labelKey]);return n.ignoreAccents&&("label"!==n.matchProp&&(o=(0,i["default"])(o)),"value"!==n.matchProp&&(a=(0,i["default"])(a))),n.ignoreCase&&("label"!==n.matchProp&&(o=o.toLowerCase()),"value"!==n.matchProp&&(a=a.toLowerCase())),"start"===n.matchPos?"label"!==n.matchProp&&o.substr(0,t.length)===t||"value"!==n.matchProp&&a.substr(0,t.length)===t:"label"!==n.matchProp&&o.indexOf(t)>=0||"value"!==n.matchProp&&a.indexOf(t)>=0})}var o=e("./stripDiacritics"),i=n(o);t.exports=s},{"./stripDiacritics":11}],10:[function(e,t,u){(function(e){"use strict";function u(e){return e&&e.__esModule?e:{"default":e}}function n(e){var t=e.focusedOption,u=e.instancePrefix,n=(e.labelKey,e.onFocus),s=e.onSelect,i=e.optionClassName,r=e.optionComponent,l=e.optionRenderer,p=e.options,d=e.valueArray,c=e.valueKey,f=e.onOptionRef,h=r;return p.map(function(e,r){var p=d&&d.indexOf(e)>-1,E=e===t,b=(0,o["default"])(i,{"Select-option":!0,"is-selected":p,"is-focused":E,"is-disabled":e.disabled});return a["default"].createElement(h,{className:b,instancePrefix:u,isDisabled:e.disabled,isFocused:E,isSelected:p,key:"option-"+r+"-"+e[c],onFocus:n,onSelect:s,option:e,optionIndex:r,ref:function(e){f(e,E)}},l(e,r))})}var s="undefined"!=typeof window?window.classNames:"undefined"!=typeof e?e.classNames:null,o=u(s),i="undefined"!=typeof window?window.React:"undefined"!=typeof e?e.React:null,a=u(i);t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],11:[function(e,t,u){"use strict";var n=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}];t.exports=function(e){for(var t=0;t tag with this field name for html forms
+ clearable: _propTypes2['default'].bool, // should it be possible to reset value
+ deleteRemoves: _propTypes2['default'].bool, // whether backspace removes an item if there is no text input
+ delimiter: _propTypes2['default'].string, // delimiter to use to join multiple values for the hidden field value
+ disabled: _propTypes2['default'].bool, // whether the Select is disabled or not
+ escapeClearsValue: _propTypes2['default'].bool, // whether escape clears the value when the menu is closed
+ filterOption: _propTypes2['default'].func, // method to filter a single option (option, filterString)
+ filterOptions: _propTypes2['default'].any, // boolean to enable default filtering or function to filter the options array ([options], filterString, [values])
+ ignoreAccents: _propTypes2['default'].bool, // whether to strip diacritics when filtering
+ ignoreCase: _propTypes2['default'].bool, // whether to perform case-insensitive filtering
+ inputProps: _propTypes2['default'].object, // custom attributes for the Input
+ inputRenderer: _propTypes2['default'].func, // returns a custom input component
+ instanceId: _propTypes2['default'].string, // set the components instanceId
+ isLoading: _propTypes2['default'].bool, // whether the Select is loading externally or not (such as options being loaded)
+ joinValues: _propTypes2['default'].bool, // joins multiple values into a single form field with the delimiter (legacy mode)
+ labelKey: _propTypes2['default'].string, // path of the label value in option objects
+ matchPos: _propTypes2['default'].string, // (any|start) match the start or entire string when filtering
+ matchProp: _propTypes2['default'].string, // (any|label|value) which option property to filter on
+ menuBuffer: _propTypes2['default'].number, // optional buffer (in px) between the bottom of the viewport and the bottom of the menu
+ menuContainerStyle: _propTypes2['default'].object, // optional style to apply to the menu container
+ menuRenderer: _propTypes2['default'].func, // renders a custom menu with options
+ menuStyle: _propTypes2['default'].object, // optional style to apply to the menu
+ multi: _propTypes2['default'].bool, // multi-value input
+ name: _propTypes2['default'].string, // generates a hidden tag with this field name for html forms
noResultsText: stringOrNode, // placeholder displayed when there are no matching search results
- onBlur: _react2['default'].PropTypes.func, // onBlur handler: function (event) {}
- onBlurResetsInput: _react2['default'].PropTypes.bool, // whether input is cleared on blur
- onChange: _react2['default'].PropTypes.func, // onChange handler: function (newValue) {}
- onClose: _react2['default'].PropTypes.func, // fires when the menu is closed
- onCloseResetsInput: _react2['default'].PropTypes.bool, // whether input is cleared when menu is closed through the arrow
- onFocus: _react2['default'].PropTypes.func, // onFocus handler: function (event) {}
- onInputChange: _react2['default'].PropTypes.func, // onInputChange handler: function (inputValue) {}
- onInputKeyDown: _react2['default'].PropTypes.func, // input keyDown handler: function (event) {}
- onMenuScrollToBottom: _react2['default'].PropTypes.func, // fires when the menu is scrolled to the bottom; can be used to paginate options
- onOpen: _react2['default'].PropTypes.func, // fires when the menu is opened
- onValueClick: _react2['default'].PropTypes.func, // onClick handler for value labels: function (value, event) {}
- openAfterFocus: _react2['default'].PropTypes.bool, // boolean to enable opening dropdown when focused
- openOnFocus: _react2['default'].PropTypes.bool, // always open options menu on focus
- optionClassName: _react2['default'].PropTypes.string, // additional class(es) to apply to the elements
- optionComponent: _react2['default'].PropTypes.func, // option component to render in dropdown
- optionRenderer: _react2['default'].PropTypes.func, // optionRenderer: function (option) {}
- options: _react2['default'].PropTypes.array, // array of options
- pageSize: _react2['default'].PropTypes.number, // number of entries to page when using page up/down keys
+ onBlur: _propTypes2['default'].func, // onBlur handler: function (event) {}
+ onBlurResetsInput: _propTypes2['default'].bool, // whether input is cleared on blur
+ onChange: _propTypes2['default'].func, // onChange handler: function (newValue) {}
+ onClose: _propTypes2['default'].func, // fires when the menu is closed
+ onCloseResetsInput: _propTypes2['default'].bool, // whether input is cleared when menu is closed through the arrow
+ onFocus: _propTypes2['default'].func, // onFocus handler: function (event) {}
+ onInputChange: _propTypes2['default'].func, // onInputChange handler: function (inputValue) {}
+ onInputKeyDown: _propTypes2['default'].func, // input keyDown handler: function (event) {}
+ onMenuScrollToBottom: _propTypes2['default'].func, // fires when the menu is scrolled to the bottom; can be used to paginate options
+ onOpen: _propTypes2['default'].func, // fires when the menu is opened
+ onValueClick: _propTypes2['default'].func, // onClick handler for value labels: function (value, event) {}
+ openAfterFocus: _propTypes2['default'].bool, // boolean to enable opening dropdown when focused
+ openOnFocus: _propTypes2['default'].bool, // always open options menu on focus
+ optionClassName: _propTypes2['default'].string, // additional class(es) to apply to the elements
+ optionComponent: _propTypes2['default'].func, // option component to render in dropdown
+ optionRenderer: _propTypes2['default'].func, // optionRenderer: function (option) {}
+ options: _propTypes2['default'].array, // array of options
+ pageSize: _propTypes2['default'].number, // number of entries to page when using page up/down keys
placeholder: stringOrNode, // field placeholder, displayed when there's no value
- required: _react2['default'].PropTypes.bool, // applies HTML5 required attribute when needed
- resetValue: _react2['default'].PropTypes.any, // value to use when you clear the control
- scrollMenuIntoView: _react2['default'].PropTypes.bool, // boolean to enable the viewport to shift so that the full menu fully visible when engaged
- searchable: _react2['default'].PropTypes.bool, // whether to enable searching feature or not
- simpleValue: _react2['default'].PropTypes.bool, // pass the value to onChange as a simple value (legacy pre 1.0 mode), defaults to false
- style: _react2['default'].PropTypes.object, // optional style to apply to the control
- tabIndex: _react2['default'].PropTypes.string, // optional tab index of the control
- tabSelectsValue: _react2['default'].PropTypes.bool, // whether to treat tabbing out while focused to be value selection
- value: _react2['default'].PropTypes.any, // initial field value
- valueComponent: _react2['default'].PropTypes.func, // value component to render
- valueKey: _react2['default'].PropTypes.string, // path of the label value in option objects
- valueRenderer: _react2['default'].PropTypes.func, // valueRenderer: function (option) {}
- wrapperStyle: _react2['default'].PropTypes.object },
+ required: _propTypes2['default'].bool, // applies HTML5 required attribute when needed
+ resetValue: _propTypes2['default'].any, // value to use when you clear the control
+ scrollMenuIntoView: _propTypes2['default'].bool, // boolean to enable the viewport to shift so that the full menu fully visible when engaged
+ searchable: _propTypes2['default'].bool, // whether to enable searching feature or not
+ simpleValue: _propTypes2['default'].bool, // pass the value to onChange as a simple value (legacy pre 1.0 mode), defaults to false
+ style: _propTypes2['default'].object, // optional style to apply to the control
+ tabIndex: _propTypes2['default'].string, // optional tab index of the control
+ tabSelectsValue: _propTypes2['default'].bool, // whether to treat tabbing out while focused to be value selection
+ value: _propTypes2['default'].any, // initial field value
+ valueComponent: _propTypes2['default'].func, // value component to render
+ valueKey: _propTypes2['default'].string, // path of the label value in option objects
+ valueRenderer: _propTypes2['default'].func, // valueRenderer: function (option) {}
+ wrapperStyle: _propTypes2['default'].object },
// optional style to apply to the component wrapper
statics: { Async: _Async2['default'], AsyncCreatable: _AsyncCreatable2['default'], Creatable: _Creatable2['default'] },
@@ -1229,7 +1278,6 @@ var Select = _react2['default'].createClass({
noResultsText: 'No results found',
onBlurResetsInput: true,
onCloseResetsInput: true,
- openAfterFocus: false,
optionComponent: _Option2['default'],
pageSize: 5,
placeholder: 'Select...',
@@ -1355,12 +1403,6 @@ var Select = _react2['default'].createClass({
focus: function focus() {
if (!this.input) return;
this.input.focus();
-
- if (this.props.openAfterFocus) {
- this.setState({
- isOpen: true
- });
- }
},
blurInput: function blurInput() {
@@ -1974,6 +2016,7 @@ var Select = _react2['default'].createClass({
'aria-owns': ariaOwns,
'aria-haspopup': '' + isOpen,
'aria-activedescendant': isOpen ? this._instancePrefix + '-option-' + focusedOptionIndex : this._instancePrefix + '-value',
+ 'aria-describedby': this.props['aria-describedby'],
'aria-labelledby': this.props['aria-labelledby'],
'aria-label': this.props['aria-label'],
className: className,
@@ -2145,7 +2188,14 @@ var Select = _react2['default'].createClass({
var focusedOption = this.state.focusedOption || selectedOption;
if (focusedOption && !focusedOption.disabled) {
- var focusedOptionIndex = options.indexOf(focusedOption);
+ var focusedOptionIndex = -1;
+ options.some(function (option, index) {
+ var isOptionEqual = option.value === focusedOption.value;
+ if (isOptionEqual) {
+ focusedOptionIndex = index;
+ }
+ return isOptionEqual;
+ });
if (focusedOptionIndex !== -1) {
return focusedOptionIndex;
}
@@ -2201,6 +2251,7 @@ var Select = _react2['default'].createClass({
var className = (0, _classnames2['default'])('Select', this.props.className, {
'Select--multi': this.props.multi,
'Select--single': !this.props.multi,
+ 'is-clearable': this.props.clearable,
'is-disabled': this.props.disabled,
'is-focused': this.state.isFocused,
'is-loading': this.props.isLoading,
@@ -2260,4 +2311,4 @@ var Select = _react2['default'].createClass({
exports['default'] = Select;
module.exports = exports['default'];
-},{"./Async":1,"./AsyncCreatable":2,"./Creatable":3,"./Option":4,"./Value":5,"./utils/defaultArrowRenderer":6,"./utils/defaultClearRenderer":7,"./utils/defaultFilterOptions":8,"./utils/defaultMenuRenderer":9,"classnames":undefined,"react":undefined,"react-dom":undefined,"react-input-autosize":undefined}]},{},[]);
+},{"./Async":1,"./AsyncCreatable":2,"./Creatable":3,"./Option":4,"./Value":5,"./utils/defaultArrowRenderer":6,"./utils/defaultClearRenderer":7,"./utils/defaultFilterOptions":8,"./utils/defaultMenuRenderer":9,"classnames":undefined,"create-react-class":undefined,"prop-types":undefined,"react":undefined,"react-dom":undefined,"react-input-autosize":undefined}]},{},[]);
diff --git a/examples/dist/common.js b/examples/dist/common.js
index 164c27ac52..abb01903c8 100644
--- a/examples/dist/common.js
+++ b/examples/dist/common.js
@@ -1,4 +1,912 @@
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;oHello World;
+ * }
+ * });
+ *
+ * The class specification supports a specific protocol of methods that have
+ * special meaning (e.g. `render`). See `ReactClassInterface` for
+ * more the comprehensive protocol. Any other properties and methods in the
+ * class specification will be available on the prototype.
+ *
+ * @interface ReactClassInterface
+ * @internal
+ */
+ var ReactClassInterface = {
+
+ /**
+ * An array of Mixin objects to include when defining your component.
+ *
+ * @type {array}
+ * @optional
+ */
+ mixins: 'DEFINE_MANY',
+
+ /**
+ * An object containing properties and methods that should be defined on
+ * the component's constructor instead of its prototype (static methods).
+ *
+ * @type {object}
+ * @optional
+ */
+ statics: 'DEFINE_MANY',
+
+ /**
+ * Definition of prop types for this component.
+ *
+ * @type {object}
+ * @optional
+ */
+ propTypes: 'DEFINE_MANY',
+
+ /**
+ * Definition of context types for this component.
+ *
+ * @type {object}
+ * @optional
+ */
+ contextTypes: 'DEFINE_MANY',
+
+ /**
+ * Definition of context types this component sets for its children.
+ *
+ * @type {object}
+ * @optional
+ */
+ childContextTypes: 'DEFINE_MANY',
+
+ // ==== Definition methods ====
+
+ /**
+ * Invoked when the component is mounted. Values in the mapping will be set on
+ * `this.props` if that prop is not specified (i.e. using an `in` check).
+ *
+ * This method is invoked before `getInitialState` and therefore cannot rely
+ * on `this.state` or use `this.setState`.
+ *
+ * @return {object}
+ * @optional
+ */
+ getDefaultProps: 'DEFINE_MANY_MERGED',
+
+ /**
+ * Invoked once before the component is mounted. The return value will be used
+ * as the initial value of `this.state`.
+ *
+ * getInitialState: function() {
+ * return {
+ * isOn: false,
+ * fooBaz: new BazFoo()
+ * }
+ * }
+ *
+ * @return {object}
+ * @optional
+ */
+ getInitialState: 'DEFINE_MANY_MERGED',
+
+ /**
+ * @return {object}
+ * @optional
+ */
+ getChildContext: 'DEFINE_MANY_MERGED',
+
+ /**
+ * Uses props from `this.props` and state from `this.state` to render the
+ * structure of the component.
+ *
+ * No guarantees are made about when or how often this method is invoked, so
+ * it must not have side effects.
+ *
+ * render: function() {
+ * var name = this.props.name;
+ * return
Hello, {name}!
;
+ * }
+ *
+ * @return {ReactComponent}
+ * @nosideeffects
+ * @required
+ */
+ render: 'DEFINE_ONCE',
+
+ // ==== Delegate methods ====
+
+ /**
+ * Invoked when the component is initially created and about to be mounted.
+ * This may have side effects, but any external subscriptions or data created
+ * by this method must be cleaned up in `componentWillUnmount`.
+ *
+ * @optional
+ */
+ componentWillMount: 'DEFINE_MANY',
+
+ /**
+ * Invoked when the component has been mounted and has a DOM representation.
+ * However, there is no guarantee that the DOM node is in the document.
+ *
+ * Use this as an opportunity to operate on the DOM when the component has
+ * been mounted (initialized and rendered) for the first time.
+ *
+ * @param {DOMElement} rootNode DOM element representing the component.
+ * @optional
+ */
+ componentDidMount: 'DEFINE_MANY',
+
+ /**
+ * Invoked before the component receives new props.
+ *
+ * Use this as an opportunity to react to a prop transition by updating the
+ * state using `this.setState`. Current props are accessed via `this.props`.
+ *
+ * componentWillReceiveProps: function(nextProps, nextContext) {
+ * this.setState({
+ * likesIncreasing: nextProps.likeCount > this.props.likeCount
+ * });
+ * }
+ *
+ * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
+ * transition may cause a state change, but the opposite is not true. If you
+ * need it, you are probably looking for `componentWillUpdate`.
+ *
+ * @param {object} nextProps
+ * @optional
+ */
+ componentWillReceiveProps: 'DEFINE_MANY',
+
+ /**
+ * Invoked while deciding if the component should be updated as a result of
+ * receiving new props, state and/or context.
+ *
+ * Use this as an opportunity to `return false` when you're certain that the
+ * transition to the new props/state/context will not require a component
+ * update.
+ *
+ * shouldComponentUpdate: function(nextProps, nextState, nextContext) {
+ * return !equal(nextProps, this.props) ||
+ * !equal(nextState, this.state) ||
+ * !equal(nextContext, this.context);
+ * }
+ *
+ * @param {object} nextProps
+ * @param {?object} nextState
+ * @param {?object} nextContext
+ * @return {boolean} True if the component should update.
+ * @optional
+ */
+ shouldComponentUpdate: 'DEFINE_ONCE',
+
+ /**
+ * Invoked when the component is about to update due to a transition from
+ * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
+ * and `nextContext`.
+ *
+ * Use this as an opportunity to perform preparation before an update occurs.
+ *
+ * NOTE: You **cannot** use `this.setState()` in this method.
+ *
+ * @param {object} nextProps
+ * @param {?object} nextState
+ * @param {?object} nextContext
+ * @param {ReactReconcileTransaction} transaction
+ * @optional
+ */
+ componentWillUpdate: 'DEFINE_MANY',
+
+ /**
+ * Invoked when the component's DOM representation has been updated.
+ *
+ * Use this as an opportunity to operate on the DOM when the component has
+ * been updated.
+ *
+ * @param {object} prevProps
+ * @param {?object} prevState
+ * @param {?object} prevContext
+ * @param {DOMElement} rootNode DOM element representing the component.
+ * @optional
+ */
+ componentDidUpdate: 'DEFINE_MANY',
+
+ /**
+ * Invoked when the component is about to be removed from its parent and have
+ * its DOM representation destroyed.
+ *
+ * Use this as an opportunity to deallocate any external resources.
+ *
+ * NOTE: There is no `componentDidUnmount` since your component will have been
+ * destroyed by that point.
+ *
+ * @optional
+ */
+ componentWillUnmount: 'DEFINE_MANY',
+
+ // ==== Advanced methods ====
+
+ /**
+ * Updates the component's currently mounted DOM representation.
+ *
+ * By default, this implements React's rendering and reconciliation algorithm.
+ * Sophisticated clients may wish to override this.
+ *
+ * @param {ReactReconcileTransaction} transaction
+ * @internal
+ * @overridable
+ */
+ updateComponent: 'OVERRIDE_BASE'
+
+ };
+
+ /**
+ * Mapping from class specification keys to special processing functions.
+ *
+ * Although these are declared like instance properties in the specification
+ * when defining classes using `React.createClass`, they are actually static
+ * and are accessible on the constructor instead of the prototype. Despite
+ * being static, they must be defined outside of the "statics" key under
+ * which all other static methods are defined.
+ */
+ var RESERVED_SPEC_KEYS = {
+ displayName: function (Constructor, displayName) {
+ Constructor.displayName = displayName;
+ },
+ mixins: function (Constructor, mixins) {
+ if (mixins) {
+ for (var i = 0; i < mixins.length; i++) {
+ mixSpecIntoComponent(Constructor, mixins[i]);
+ }
+ }
+ },
+ childContextTypes: function (Constructor, childContextTypes) {
+ if ("production" !== 'production') {
+ validateTypeDef(Constructor, childContextTypes, 'childContext');
+ }
+ Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes);
+ },
+ contextTypes: function (Constructor, contextTypes) {
+ if ("production" !== 'production') {
+ validateTypeDef(Constructor, contextTypes, 'context');
+ }
+ Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes);
+ },
+ /**
+ * Special case getDefaultProps which should move into statics but requires
+ * automatic merging.
+ */
+ getDefaultProps: function (Constructor, getDefaultProps) {
+ if (Constructor.getDefaultProps) {
+ Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps);
+ } else {
+ Constructor.getDefaultProps = getDefaultProps;
+ }
+ },
+ propTypes: function (Constructor, propTypes) {
+ if ("production" !== 'production') {
+ validateTypeDef(Constructor, propTypes, 'prop');
+ }
+ Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
+ },
+ statics: function (Constructor, statics) {
+ mixStaticSpecIntoComponent(Constructor, statics);
+ },
+ autobind: function () {} };
+
+ function validateTypeDef(Constructor, typeDef, location) {
+ for (var propName in typeDef) {
+ if (typeDef.hasOwnProperty(propName)) {
+ // use a warning instead of an _invariant so components
+ // don't show up in prod but only in __DEV__
+ "production" !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : void 0;
+ }
+ }
+ }
+
+ function validateMethodOverride(isAlreadyDefined, name) {
+ var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null;
+
+ // Disallow overriding of base class methods unless explicitly allowed.
+ if (ReactClassMixin.hasOwnProperty(name)) {
+ _invariant(specPolicy === 'OVERRIDE_BASE', 'ReactClassInterface: You are attempting to override ' + '`%s` from your class specification. Ensure that your method names ' + 'do not overlap with React methods.', name);
+ }
+
+ // Disallow defining methods more than once unless explicitly allowed.
+ if (isAlreadyDefined) {
+ _invariant(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', 'ReactClassInterface: You are attempting to define ' + '`%s` on your component more than once. This conflict may be due ' + 'to a mixin.', name);
+ }
+ }
+
+ /**
+ * Mixin helper which handles policy validation and reserved
+ * specification keys when building React classes.
+ */
+ function mixSpecIntoComponent(Constructor, spec) {
+ if (!spec) {
+ if ("production" !== 'production') {
+ var typeofSpec = typeof spec;
+ var isMixinValid = typeofSpec === 'object' && spec !== null;
+
+ "production" !== 'production' ? warning(isMixinValid, '%s: You\'re attempting to include a mixin that is either null ' + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec) : void 0;
+ }
+
+ return;
+ }
+
+ _invariant(typeof spec !== 'function', 'ReactClass: You\'re attempting to ' + 'use a component class or function as a mixin. Instead, just use a ' + 'regular object.');
+ _invariant(!isValidElement(spec), 'ReactClass: You\'re attempting to ' + 'use a component as a mixin. Instead, just use a regular object.');
+
+ var proto = Constructor.prototype;
+ var autoBindPairs = proto.__reactAutoBindPairs;
+
+ // By handling mixins before any other properties, we ensure the same
+ // chaining order is applied to methods with DEFINE_MANY policy, whether
+ // mixins are listed before or after these methods in the spec.
+ if (spec.hasOwnProperty(MIXINS_KEY)) {
+ RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
+ }
+
+ for (var name in spec) {
+ if (!spec.hasOwnProperty(name)) {
+ continue;
+ }
+
+ if (name === MIXINS_KEY) {
+ // We have already handled mixins in a special case above.
+ continue;
+ }
+
+ var property = spec[name];
+ var isAlreadyDefined = proto.hasOwnProperty(name);
+ validateMethodOverride(isAlreadyDefined, name);
+
+ if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
+ RESERVED_SPEC_KEYS[name](Constructor, property);
+ } else {
+ // Setup methods on prototype:
+ // The following member methods should not be automatically bound:
+ // 1. Expected ReactClass methods (in the "interface").
+ // 2. Overridden methods (that were mixed in).
+ var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
+ var isFunction = typeof property === 'function';
+ var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false;
+
+ if (shouldAutoBind) {
+ autoBindPairs.push(name, property);
+ proto[name] = property;
+ } else {
+ if (isAlreadyDefined) {
+ var specPolicy = ReactClassInterface[name];
+
+ // These cases should already be caught by validateMethodOverride.
+ _invariant(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY'), 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', specPolicy, name);
+
+ // For methods which are defined more than once, call the existing
+ // methods before calling the new property, merging if appropriate.
+ if (specPolicy === 'DEFINE_MANY_MERGED') {
+ proto[name] = createMergedResultFunction(proto[name], property);
+ } else if (specPolicy === 'DEFINE_MANY') {
+ proto[name] = createChainedFunction(proto[name], property);
+ }
+ } else {
+ proto[name] = property;
+ if ("production" !== 'production') {
+ // Add verbose displayName to the function, which helps when looking
+ // at profiling tools.
+ if (typeof property === 'function' && spec.displayName) {
+ proto[name].displayName = spec.displayName + '_' + name;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ function mixStaticSpecIntoComponent(Constructor, statics) {
+ if (!statics) {
+ return;
+ }
+ for (var name in statics) {
+ var property = statics[name];
+ if (!statics.hasOwnProperty(name)) {
+ continue;
+ }
+
+ var isReserved = name in RESERVED_SPEC_KEYS;
+ _invariant(!isReserved, 'ReactClass: You are attempting to define a reserved ' + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + 'as an instance property instead; it will still be accessible on the ' + 'constructor.', name);
+
+ var isInherited = name in Constructor;
+ _invariant(!isInherited, 'ReactClass: You are attempting to define ' + '`%s` on your component more than once. This conflict may be ' + 'due to a mixin.', name);
+ Constructor[name] = property;
+ }
+ }
+
+ /**
+ * Merge two objects, but throw if both contain the same key.
+ *
+ * @param {object} one The first object, which is mutated.
+ * @param {object} two The second object
+ * @return {object} one after it has been mutated to contain everything in two.
+ */
+ function mergeIntoWithNoDuplicateKeys(one, two) {
+ _invariant(one && two && typeof one === 'object' && typeof two === 'object', 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.');
+
+ for (var key in two) {
+ if (two.hasOwnProperty(key)) {
+ _invariant(one[key] === undefined, 'mergeIntoWithNoDuplicateKeys(): ' + 'Tried to merge two objects with the same key: `%s`. This conflict ' + 'may be due to a mixin; in particular, this may be caused by two ' + 'getInitialState() or getDefaultProps() methods returning objects ' + 'with clashing keys.', key);
+ one[key] = two[key];
+ }
+ }
+ return one;
+ }
+
+ /**
+ * Creates a function that invokes two functions and merges their return values.
+ *
+ * @param {function} one Function to invoke first.
+ * @param {function} two Function to invoke second.
+ * @return {function} Function that invokes the two argument functions.
+ * @private
+ */
+ function createMergedResultFunction(one, two) {
+ return function mergedResult() {
+ var a = one.apply(this, arguments);
+ var b = two.apply(this, arguments);
+ if (a == null) {
+ return b;
+ } else if (b == null) {
+ return a;
+ }
+ var c = {};
+ mergeIntoWithNoDuplicateKeys(c, a);
+ mergeIntoWithNoDuplicateKeys(c, b);
+ return c;
+ };
+ }
+
+ /**
+ * Creates a function that invokes two functions and ignores their return vales.
+ *
+ * @param {function} one Function to invoke first.
+ * @param {function} two Function to invoke second.
+ * @return {function} Function that invokes the two argument functions.
+ * @private
+ */
+ function createChainedFunction(one, two) {
+ return function chainedFunction() {
+ one.apply(this, arguments);
+ two.apply(this, arguments);
+ };
+ }
+
+ /**
+ * Binds a method to the component.
+ *
+ * @param {object} component Component whose method is going to be bound.
+ * @param {function} method Method to be bound.
+ * @return {function} The bound method.
+ */
+ function bindAutoBindMethod(component, method) {
+ var boundMethod = method.bind(component);
+ if ("production" !== 'production') {
+ boundMethod.__reactBoundContext = component;
+ boundMethod.__reactBoundMethod = method;
+ boundMethod.__reactBoundArguments = null;
+ var componentName = component.constructor.displayName;
+ var _bind = boundMethod.bind;
+ boundMethod.bind = function (newThis) {
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ args[_key - 1] = arguments[_key];
+ }
+
+ // User is trying to bind() an autobound method; we effectively will
+ // ignore the value of "this" that the user is trying to use, so
+ // let's warn.
+ if (newThis !== component && newThis !== null) {
+ "production" !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : void 0;
+ } else if (!args.length) {
+ "production" !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : void 0;
+ return boundMethod;
+ }
+ var reboundMethod = _bind.apply(boundMethod, arguments);
+ reboundMethod.__reactBoundContext = component;
+ reboundMethod.__reactBoundMethod = method;
+ reboundMethod.__reactBoundArguments = args;
+ return reboundMethod;
+ };
+ }
+ return boundMethod;
+ }
+
+ /**
+ * Binds all auto-bound methods in a component.
+ *
+ * @param {object} component Component whose method is going to be bound.
+ */
+ function bindAutoBindMethods(component) {
+ var pairs = component.__reactAutoBindPairs;
+ for (var i = 0; i < pairs.length; i += 2) {
+ var autoBindKey = pairs[i];
+ var method = pairs[i + 1];
+ component[autoBindKey] = bindAutoBindMethod(component, method);
+ }
+ }
+
+ var IsMountedMixin = {
+ componentDidMount: function () {
+ this.__isMounted = true;
+ },
+ componentWillUnmount: function () {
+ this.__isMounted = false;
+ }
+ };
+
+ /**
+ * Add more to the ReactClass base class. These are all legacy features and
+ * therefore not already part of the modern ReactComponent.
+ */
+ var ReactClassMixin = {
+
+ /**
+ * TODO: This will be deprecated because state should always keep a consistent
+ * type signature and the only use case for this, is to avoid that.
+ */
+ replaceState: function (newState, callback) {
+ this.updater.enqueueReplaceState(this, newState, callback);
+ },
+
+ /**
+ * Checks whether or not this composite component is mounted.
+ * @return {boolean} True if mounted, false otherwise.
+ * @protected
+ * @final
+ */
+ isMounted: function () {
+ if ("production" !== 'production') {
+ "production" !== 'production' ? warning(this.__didWarnIsMounted, '%s: isMounted is deprecated. Instead, make sure to clean up ' + 'subscriptions and pending requests in componentWillUnmount to ' + 'prevent memory leaks.', this.constructor && this.constructor.displayName || this.name || 'Component') : void 0;
+ this.__didWarnIsMounted = true;
+ }
+ return !!this.__isMounted;
+ }
+ };
+
+ var ReactClassComponent = function () {};
+ _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);
+
+ /**
+ * Creates a composite component class given a class specification.
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
+ *
+ * @param {object} spec Class specification (which must define `render`).
+ * @return {function} Component constructor function.
+ * @public
+ */
+ function createClass(spec) {
+ // To keep our warnings more understandable, we'll use a little hack here to
+ // ensure that Constructor.name !== 'Constructor'. This makes sure we don't
+ // unnecessarily identify a class without displayName as 'Constructor'.
+ var Constructor = identity(function (props, context, updater) {
+ // This constructor gets overridden by mocks. The argument is used
+ // by mocks to assert on what gets mounted.
+
+ if ("production" !== 'production') {
+ "production" !== 'production' ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : void 0;
+ }
+
+ // Wire up auto-binding
+ if (this.__reactAutoBindPairs.length) {
+ bindAutoBindMethods(this);
+ }
+
+ this.props = props;
+ this.context = context;
+ this.refs = emptyObject;
+ this.updater = updater || ReactNoopUpdateQueue;
+
+ this.state = null;
+
+ // ReactClasses doesn't have constructors. Instead, they use the
+ // getInitialState and componentWillMount methods for initialization.
+
+ var initialState = this.getInitialState ? this.getInitialState() : null;
+ if ("production" !== 'production') {
+ // We allow auto-mocks to proceed as if they're returning null.
+ if (initialState === undefined && this.getInitialState._isMockFunction) {
+ // This is probably bad practice. Consider warning here and
+ // deprecating this convenience.
+ initialState = null;
+ }
+ }
+ _invariant(typeof initialState === 'object' && !Array.isArray(initialState), '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent');
+
+ this.state = initialState;
+ });
+ Constructor.prototype = new ReactClassComponent();
+ Constructor.prototype.constructor = Constructor;
+ Constructor.prototype.__reactAutoBindPairs = [];
+
+ injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
+
+ mixSpecIntoComponent(Constructor, IsMountedMixin);
+ mixSpecIntoComponent(Constructor, spec);
+
+ // Initialize the defaultProps property after all mixins have been merged.
+ if (Constructor.getDefaultProps) {
+ Constructor.defaultProps = Constructor.getDefaultProps();
+ }
+
+ if ("production" !== 'production') {
+ // This is a tag to indicate that the use of these method names is ok,
+ // since it's used with createClass. If it's not, then it's likely a
+ // mistake so we'll warn you to use the static property, property
+ // initializer or constructor respectively.
+ if (Constructor.getDefaultProps) {
+ Constructor.getDefaultProps.isReactClassApproved = {};
+ }
+ if (Constructor.prototype.getInitialState) {
+ Constructor.prototype.getInitialState.isReactClassApproved = {};
+ }
+ }
+
+ _invariant(Constructor.prototype.render, 'createClass(...): Class specification must implement a `render` method.');
+
+ if ("production" !== 'production') {
+ "production" !== 'production' ? warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component') : void 0;
+ "production" !== 'production' ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : void 0;
+ }
+
+ // Reduce time spent doing lookups by setting these on the prototype.
+ for (var methodName in ReactClassInterface) {
+ if (!Constructor.prototype[methodName]) {
+ Constructor.prototype[methodName] = null;
+ }
+ }
+
+ return Constructor;
+ }
+
+ return createClass;
+}
+
+module.exports = factory;
+
+},{"fbjs/lib/emptyObject":3,"fbjs/lib/invariant":4,"fbjs/lib/warning":5,"object-assign":29}],2:[function(require,module,exports){
+"use strict";
+
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ *
+ */
+
+function makeEmptyFunction(arg) {
+ return function () {
+ return arg;
+ };
+}
+
+/**
+ * This function accepts and discards inputs; it has no side effects. This is
+ * primarily useful idiomatically for overridable function endpoints which
+ * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
+ */
+var emptyFunction = function emptyFunction() {};
+
+emptyFunction.thatReturns = makeEmptyFunction;
+emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
+emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
+emptyFunction.thatReturnsNull = makeEmptyFunction(null);
+emptyFunction.thatReturnsThis = function () {
+ return this;
+};
+emptyFunction.thatReturnsArgument = function (arg) {
+ return arg;
+};
+
+module.exports = emptyFunction;
+},{}],3:[function(require,module,exports){
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+'use strict';
+
+var emptyObject = {};
+
+if ("production" !== 'production') {
+ Object.freeze(emptyObject);
+}
+
+module.exports = emptyObject;
+},{}],4:[function(require,module,exports){
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+'use strict';
+
+/**
+ * Use invariant() to assert state which your program assumes to be true.
+ *
+ * Provide sprintf-style format (only %s is supported) and arguments
+ * to provide information about what broke and what you were
+ * expecting.
+ *
+ * The invariant message will be stripped in production, but the invariant
+ * will remain to ensure logic does not differ in production.
+ */
+
+var validateFormat = function validateFormat(format) {};
+
+if ("production" !== 'production') {
+ validateFormat = function validateFormat(format) {
+ if (format === undefined) {
+ throw new Error('invariant requires an error message argument');
+ }
+ };
+}
+
+function invariant(condition, format, a, b, c, d, e, f) {
+ validateFormat(format);
+
+ if (!condition) {
+ var error;
+ if (format === undefined) {
+ error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
+ } else {
+ var args = [a, b, c, d, e, f];
+ var argIndex = 0;
+ error = new Error(format.replace(/%s/g, function () {
+ return args[argIndex++];
+ }));
+ error.name = 'Invariant Violation';
+ }
+
+ error.framesToPop = 1; // we don't care about invariant's own frame
+ throw error;
+ }
+}
+
+module.exports = invariant;
+},{}],5:[function(require,module,exports){
+/**
+ * Copyright 2014-2015, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+'use strict';
+
+var emptyFunction = require('./emptyFunction');
+
+/**
+ * Similar to invariant but only logs a warning if the condition is not met.
+ * This can be used to log issues in development environments in critical
+ * paths. Removing the logging code for production environments will keep the
+ * same logic and follow the same code paths.
+ */
+
+var warning = emptyFunction;
+
+if ("production" !== 'production') {
+ (function () {
+ var printWarning = function printWarning(format) {
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ args[_key - 1] = arguments[_key];
+ }
+
+ var argIndex = 0;
+ var message = 'Warning: ' + format.replace(/%s/g, function () {
+ return args[argIndex++];
+ });
+ if (typeof console !== 'undefined') {
+ console.error(message);
+ }
+ try {
+ // --- Welcome to debugging React ---
+ // This error was thrown as a convenience so that you can use this stack
+ // to find the callsite that caused this warning to fire.
+ throw new Error(message);
+ } catch (x) {}
+ };
+
+ warning = function warning(condition, format) {
+ if (format === undefined) {
+ throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
+ }
+
+ if (format.indexOf('Failed Composite propType: ') === 0) {
+ return; // Ignore CompositeComponent proptype check.
+ }
+
+ if (!condition) {
+ for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
+ args[_key2 - 2] = arguments[_key2];
+ }
+
+ printWarning.apply(undefined, [format].concat(args));
+ }
+ };
+ })();
+}
+
+module.exports = warning;
+},{"./emptyFunction":2}],6:[function(require,module,exports){
'use strict';
/**
@@ -82,7 +990,7 @@ var EventListener = {
};
module.exports = EventListener;
-},{"./emptyFunction":8}],2:[function(require,module,exports){
+},{"./emptyFunction":13}],7:[function(require,module,exports){
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
@@ -118,7 +1026,7 @@ var ExecutionEnvironment = {
};
module.exports = ExecutionEnvironment;
-},{}],3:[function(require,module,exports){
+},{}],8:[function(require,module,exports){
"use strict";
/**
@@ -150,7 +1058,7 @@ function camelize(string) {
}
module.exports = camelize;
-},{}],4:[function(require,module,exports){
+},{}],9:[function(require,module,exports){
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
@@ -190,7 +1098,7 @@ function camelizeStyleName(string) {
}
module.exports = camelizeStyleName;
-},{"./camelize":3}],5:[function(require,module,exports){
+},{"./camelize":8}],10:[function(require,module,exports){
'use strict';
/**
@@ -230,7 +1138,7 @@ function containsNode(outerNode, innerNode) {
}
module.exports = containsNode;
-},{"./isTextNode":18}],6:[function(require,module,exports){
+},{"./isTextNode":23}],11:[function(require,module,exports){
'use strict';
/**
@@ -357,7 +1265,7 @@ function createArrayFromMixed(obj) {
}
module.exports = createArrayFromMixed;
-},{"./invariant":16}],7:[function(require,module,exports){
+},{"./invariant":21}],12:[function(require,module,exports){
'use strict';
/**
@@ -441,66 +1349,11 @@ function createNodesFromMarkup(markup, handleScript) {
}
module.exports = createNodesFromMarkup;
-},{"./ExecutionEnvironment":2,"./createArrayFromMixed":6,"./getMarkupWrap":12,"./invariant":16}],8:[function(require,module,exports){
-"use strict";
-
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- *
- */
-
-function makeEmptyFunction(arg) {
- return function () {
- return arg;
- };
-}
-
-/**
- * This function accepts and discards inputs; it has no side effects. This is
- * primarily useful idiomatically for overridable function endpoints which
- * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
- */
-var emptyFunction = function emptyFunction() {};
-
-emptyFunction.thatReturns = makeEmptyFunction;
-emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
-emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
-emptyFunction.thatReturnsNull = makeEmptyFunction(null);
-emptyFunction.thatReturnsThis = function () {
- return this;
-};
-emptyFunction.thatReturnsArgument = function (arg) {
- return arg;
-};
-
-module.exports = emptyFunction;
-},{}],9:[function(require,module,exports){
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- */
-
-'use strict';
-
-var emptyObject = {};
-
-if ("production" !== 'production') {
- Object.freeze(emptyObject);
-}
-
-module.exports = emptyObject;
-},{}],10:[function(require,module,exports){
+},{"./ExecutionEnvironment":7,"./createArrayFromMixed":11,"./getMarkupWrap":17,"./invariant":21}],13:[function(require,module,exports){
+arguments[4][2][0].apply(exports,arguments)
+},{"dup":2}],14:[function(require,module,exports){
+arguments[4][3][0].apply(exports,arguments)
+},{"dup":3}],15:[function(require,module,exports){
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
@@ -527,7 +1380,7 @@ function focusNode(node) {
}
module.exports = focusNode;
-},{}],11:[function(require,module,exports){
+},{}],16:[function(require,module,exports){
'use strict';
/**
@@ -562,7 +1415,7 @@ function getActiveElement() /*?DOMElement*/{
}
module.exports = getActiveElement;
-},{}],12:[function(require,module,exports){
+},{}],17:[function(require,module,exports){
'use strict';
/**
@@ -657,7 +1510,7 @@ function getMarkupWrap(nodeName) {
}
module.exports = getMarkupWrap;
-},{"./ExecutionEnvironment":2,"./invariant":16}],13:[function(require,module,exports){
+},{"./ExecutionEnvironment":7,"./invariant":21}],18:[function(require,module,exports){
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
@@ -696,7 +1549,7 @@ function getUnboundedScrollPosition(scrollable) {
}
module.exports = getUnboundedScrollPosition;
-},{}],14:[function(require,module,exports){
+},{}],19:[function(require,module,exports){
'use strict';
/**
@@ -729,7 +1582,7 @@ function hyphenate(string) {
}
module.exports = hyphenate;
-},{}],15:[function(require,module,exports){
+},{}],20:[function(require,module,exports){
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
@@ -768,7 +1621,11 @@ function hyphenateStyleName(string) {
}
module.exports = hyphenateStyleName;
-},{"./hyphenate":14}],16:[function(require,module,exports){
+},{"./hyphenate":19}],21:[function(require,module,exports){
+arguments[4][4][0].apply(exports,arguments)
+},{"dup":4}],22:[function(require,module,exports){
+'use strict';
+
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
@@ -777,54 +1634,97 @@ module.exports = hyphenateStyleName;
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
+ * @typechecks
+ */
+
+/**
+ * @param {*} object The object to check.
+ * @return {boolean} Whether or not the object is a DOM node.
*/
+function isNode(object) {
+ return !!(object && (typeof Node === 'function' ? object instanceof Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
+}
+module.exports = isNode;
+},{}],23:[function(require,module,exports){
'use strict';
/**
- * Use invariant() to assert state which your program assumes to be true.
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
*
- * Provide sprintf-style format (only %s is supported) and arguments
- * to provide information about what broke and what you were
- * expecting.
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
*
- * The invariant message will be stripped in production, but the invariant
- * will remain to ensure logic does not differ in production.
+ * @typechecks
*/
-var validateFormat = function validateFormat(format) {};
+var isNode = require('./isNode');
-if ("production" !== 'production') {
- validateFormat = function validateFormat(format) {
- if (format === undefined) {
- throw new Error('invariant requires an error message argument');
+/**
+ * @param {*} object The object to check.
+ * @return {boolean} Whether or not the object is a DOM text node.
+ */
+function isTextNode(object) {
+ return isNode(object) && object.nodeType == 3;
+}
+
+module.exports = isTextNode;
+},{"./isNode":22}],24:[function(require,module,exports){
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ *
+ * @typechecks static-only
+ */
+
+'use strict';
+
+/**
+ * Memoizes the return value of a function that accepts one string argument.
+ */
+
+function memoizeStringOnly(callback) {
+ var cache = {};
+ return function (string) {
+ if (!cache.hasOwnProperty(string)) {
+ cache[string] = callback.call(this, string);
}
+ return cache[string];
};
}
-function invariant(condition, format, a, b, c, d, e, f) {
- validateFormat(format);
+module.exports = memoizeStringOnly;
+},{}],25:[function(require,module,exports){
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @typechecks
+ */
- if (!condition) {
- var error;
- if (format === undefined) {
- error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
- } else {
- var args = [a, b, c, d, e, f];
- var argIndex = 0;
- error = new Error(format.replace(/%s/g, function () {
- return args[argIndex++];
- }));
- error.name = 'Invariant Violation';
- }
+'use strict';
- error.framesToPop = 1; // we don't care about invariant's own frame
- throw error;
- }
+var ExecutionEnvironment = require('./ExecutionEnvironment');
+
+var performance;
+
+if (ExecutionEnvironment.canUseDOM) {
+ performance = window.performance || window.msPerformance || window.webkitPerformance;
}
-module.exports = invariant;
-},{}],17:[function(require,module,exports){
+module.exports = performance || {};
+},{"./ExecutionEnvironment":7}],26:[function(require,module,exports){
'use strict';
/**
@@ -838,18 +1738,27 @@ module.exports = invariant;
* @typechecks
*/
+var performance = require('./performance');
+
+var performanceNow;
+
/**
- * @param {*} object The object to check.
- * @return {boolean} Whether or not the object is a DOM node.
+ * Detect if we can use `window.performance.now()` and gracefully fallback to
+ * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now
+ * because of Facebook's testing infrastructure.
*/
-function isNode(object) {
- return !!(object && (typeof Node === 'function' ? object instanceof Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
+if (performance.now) {
+ performanceNow = function performanceNow() {
+ return performance.now();
+ };
+} else {
+ performanceNow = function performanceNow() {
+ return Date.now();
+ };
}
-module.exports = isNode;
-},{}],18:[function(require,module,exports){
-'use strict';
-
+module.exports = performanceNow;
+},{"./performance":25}],27:[function(require,module,exports){
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
@@ -859,516 +1768,1001 @@ module.exports = isNode;
* of patent rights can be found in the PATENTS file in the same directory.
*
* @typechecks
+ *
+ */
+
+/*eslint-disable no-self-compare */
+
+'use strict';
+
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+/**
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
+ */
+function is(x, y) {
+ // SameValue algorithm
+ if (x === y) {
+ // Steps 1-5, 7-10
+ // Steps 6.b-6.e: +0 != -0
+ // Added the nonzero y check to make Flow happy, but it is redundant
+ return x !== 0 || y !== 0 || 1 / x === 1 / y;
+ } else {
+ // Step 6.a: NaN == NaN
+ return x !== x && y !== y;
+ }
+}
+
+/**
+ * Performs equality by iterating through keys on an object and returning false
+ * when any key has values which are not strictly equal between the arguments.
+ * Returns true when the values of all keys are strictly equal.
*/
+function shallowEqual(objA, objB) {
+ if (is(objA, objB)) {
+ return true;
+ }
+
+ if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
+ return false;
+ }
+
+ var keysA = Object.keys(objA);
+ var keysB = Object.keys(objB);
+
+ if (keysA.length !== keysB.length) {
+ return false;
+ }
+
+ // Test for A's keys different from B.
+ for (var i = 0; i < keysA.length; i++) {
+ if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+module.exports = shallowEqual;
+},{}],28:[function(require,module,exports){
+arguments[4][5][0].apply(exports,arguments)
+},{"./emptyFunction":13,"dup":5}],29:[function(require,module,exports){
+/*
+object-assign
+(c) Sindre Sorhus
+@license MIT
+*/
+
+'use strict';
+/* eslint-disable no-unused-vars */
+var getOwnPropertySymbols = Object.getOwnPropertySymbols;
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+var propIsEnumerable = Object.prototype.propertyIsEnumerable;
+
+function toObject(val) {
+ if (val === null || val === undefined) {
+ throw new TypeError('Object.assign cannot be called with null or undefined');
+ }
+
+ return Object(val);
+}
+
+function shouldUseNative() {
+ try {
+ if (!Object.assign) {
+ return false;
+ }
+
+ // Detect buggy property enumeration order in older V8 versions.
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
+ test1[5] = 'de';
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
+ return false;
+ }
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
+ var test2 = {};
+ for (var i = 0; i < 10; i++) {
+ test2['_' + String.fromCharCode(i)] = i;
+ }
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
+ return test2[n];
+ });
+ if (order2.join('') !== '0123456789') {
+ return false;
+ }
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
+ var test3 = {};
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
+ test3[letter] = letter;
+ });
+ if (Object.keys(Object.assign({}, test3)).join('') !==
+ 'abcdefghijklmnopqrst') {
+ return false;
+ }
+
+ return true;
+ } catch (err) {
+ // We don't expect any of the above to throw, but better to be safe.
+ return false;
+ }
+}
+
+module.exports = shouldUseNative() ? Object.assign : function (target, source) {
+ var from;
+ var to = toObject(target);
+ var symbols;
+
+ for (var s = 1; s < arguments.length; s++) {
+ from = Object(arguments[s]);
+
+ for (var key in from) {
+ if (hasOwnProperty.call(from, key)) {
+ to[key] = from[key];
+ }
+ }
+
+ if (getOwnPropertySymbols) {
+ symbols = getOwnPropertySymbols(from);
+ for (var i = 0; i < symbols.length; i++) {
+ if (propIsEnumerable.call(from, symbols[i])) {
+ to[symbols[i]] = from[symbols[i]];
+ }
+ }
+ }
+ }
+
+ return to;
+};
+
+},{}],30:[function(require,module,exports){
+// shim for using process in browser
+var process = module.exports = {};
+
+// cached from whatever global is present so that test runners that stub it
+// don't break things. But we need to wrap it in a try catch in case it is
+// wrapped in strict mode code which doesn't define any globals. It's inside a
+// function because try/catches deoptimize in certain engines.
+
+var cachedSetTimeout;
+var cachedClearTimeout;
+
+function defaultSetTimout() {
+ throw new Error('setTimeout has not been defined');
+}
+function defaultClearTimeout () {
+ throw new Error('clearTimeout has not been defined');
+}
+(function () {
+ try {
+ if (typeof setTimeout === 'function') {
+ cachedSetTimeout = setTimeout;
+ } else {
+ cachedSetTimeout = defaultSetTimout;
+ }
+ } catch (e) {
+ cachedSetTimeout = defaultSetTimout;
+ }
+ try {
+ if (typeof clearTimeout === 'function') {
+ cachedClearTimeout = clearTimeout;
+ } else {
+ cachedClearTimeout = defaultClearTimeout;
+ }
+ } catch (e) {
+ cachedClearTimeout = defaultClearTimeout;
+ }
+} ())
+function runTimeout(fun) {
+ if (cachedSetTimeout === setTimeout) {
+ //normal enviroments in sane situations
+ return setTimeout(fun, 0);
+ }
+ // if setTimeout wasn't available but was latter defined
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
+ cachedSetTimeout = setTimeout;
+ return setTimeout(fun, 0);
+ }
+ try {
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedSetTimeout(fun, 0);
+ } catch(e){
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedSetTimeout.call(null, fun, 0);
+ } catch(e){
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
+ return cachedSetTimeout.call(this, fun, 0);
+ }
+ }
-var isNode = require('./isNode');
-/**
- * @param {*} object The object to check.
- * @return {boolean} Whether or not the object is a DOM text node.
- */
-function isTextNode(object) {
- return isNode(object) && object.nodeType == 3;
}
+function runClearTimeout(marker) {
+ if (cachedClearTimeout === clearTimeout) {
+ //normal enviroments in sane situations
+ return clearTimeout(marker);
+ }
+ // if clearTimeout wasn't available but was latter defined
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
+ cachedClearTimeout = clearTimeout;
+ return clearTimeout(marker);
+ }
+ try {
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedClearTimeout(marker);
+ } catch (e){
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedClearTimeout.call(null, marker);
+ } catch (e){
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
+ return cachedClearTimeout.call(this, marker);
+ }
+ }
-module.exports = isTextNode;
-},{"./isNode":17}],19:[function(require,module,exports){
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- *
- * @typechecks static-only
- */
-'use strict';
-/**
- * Memoizes the return value of a function that accepts one string argument.
- */
+}
+var queue = [];
+var draining = false;
+var currentQueue;
+var queueIndex = -1;
-function memoizeStringOnly(callback) {
- var cache = {};
- return function (string) {
- if (!cache.hasOwnProperty(string)) {
- cache[string] = callback.call(this, string);
+function cleanUpNextTick() {
+ if (!draining || !currentQueue) {
+ return;
+ }
+ draining = false;
+ if (currentQueue.length) {
+ queue = currentQueue.concat(queue);
+ } else {
+ queueIndex = -1;
+ }
+ if (queue.length) {
+ drainQueue();
}
- return cache[string];
- };
}
-module.exports = memoizeStringOnly;
-},{}],20:[function(require,module,exports){
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- * @typechecks
- */
-
-'use strict';
+function drainQueue() {
+ if (draining) {
+ return;
+ }
+ var timeout = runTimeout(cleanUpNextTick);
+ draining = true;
-var ExecutionEnvironment = require('./ExecutionEnvironment');
+ var len = queue.length;
+ while(len) {
+ currentQueue = queue;
+ queue = [];
+ while (++queueIndex < len) {
+ if (currentQueue) {
+ currentQueue[queueIndex].run();
+ }
+ }
+ queueIndex = -1;
+ len = queue.length;
+ }
+ currentQueue = null;
+ draining = false;
+ runClearTimeout(timeout);
+}
-var performance;
+process.nextTick = function (fun) {
+ var args = new Array(arguments.length - 1);
+ if (arguments.length > 1) {
+ for (var i = 1; i < arguments.length; i++) {
+ args[i - 1] = arguments[i];
+ }
+ }
+ queue.push(new Item(fun, args));
+ if (queue.length === 1 && !draining) {
+ runTimeout(drainQueue);
+ }
+};
-if (ExecutionEnvironment.canUseDOM) {
- performance = window.performance || window.msPerformance || window.webkitPerformance;
+// v8 likes predictible objects
+function Item(fun, array) {
+ this.fun = fun;
+ this.array = array;
}
+Item.prototype.run = function () {
+ this.fun.apply(null, this.array);
+};
+process.title = 'browser';
+process.browser = true;
+process.env = {};
+process.argv = [];
+process.version = ''; // empty string to avoid regexp issues
+process.versions = {};
-module.exports = performance || {};
-},{"./ExecutionEnvironment":2}],21:[function(require,module,exports){
-'use strict';
-
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- * @typechecks
- */
+function noop() {}
-var performance = require('./performance');
+process.on = noop;
+process.addListener = noop;
+process.once = noop;
+process.off = noop;
+process.removeListener = noop;
+process.removeAllListeners = noop;
+process.emit = noop;
-var performanceNow;
+process.binding = function (name) {
+ throw new Error('process.binding is not supported');
+};
-/**
- * Detect if we can use `window.performance.now()` and gracefully fallback to
- * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now
- * because of Facebook's testing infrastructure.
- */
-if (performance.now) {
- performanceNow = function performanceNow() {
- return performance.now();
- };
-} else {
- performanceNow = function performanceNow() {
- return Date.now();
- };
-}
+process.cwd = function () { return '/' };
+process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported');
+};
+process.umask = function() { return 0; };
-module.exports = performanceNow;
-},{"./performance":20}],22:[function(require,module,exports){
+},{}],31:[function(require,module,exports){
/**
- * Copyright (c) 2013-present, Facebook, Inc.
+ * Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
- *
- * @typechecks
- *
*/
-/*eslint-disable no-self-compare */
-
'use strict';
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-
-/**
- * inlined Object.is polyfill to avoid requiring consumers ship their own
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
- */
-function is(x, y) {
- // SameValue algorithm
- if (x === y) {
- // Steps 1-5, 7-10
- // Steps 6.b-6.e: +0 != -0
- // Added the nonzero y check to make Flow happy, but it is redundant
- return x !== 0 || y !== 0 || 1 / x === 1 / y;
- } else {
- // Step 6.a: NaN == NaN
- return x !== x && y !== y;
- }
+if ("production" !== 'production') {
+ var invariant = require('fbjs/lib/invariant');
+ var warning = require('fbjs/lib/warning');
+ var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
+ var loggedTypeFailures = {};
}
/**
- * Performs equality by iterating through keys on an object and returning false
- * when any key has values which are not strictly equal between the arguments.
- * Returns true when the values of all keys are strictly equal.
+ * Assert that the values match with the type specs.
+ * Error messages are memorized and will only be shown once.
+ *
+ * @param {object} typeSpecs Map of name to a ReactPropType
+ * @param {object} values Runtime values that need to be type-checked
+ * @param {string} location e.g. "prop", "context", "child context"
+ * @param {string} componentName Name of the component for error messages.
+ * @param {?Function} getStack Returns the component stack.
+ * @private
*/
-function shallowEqual(objA, objB) {
- if (is(objA, objB)) {
- return true;
- }
-
- if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
- return false;
- }
-
- var keysA = Object.keys(objA);
- var keysB = Object.keys(objB);
-
- if (keysA.length !== keysB.length) {
- return false;
- }
+function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
+ if ("production" !== 'production') {
+ for (var typeSpecName in typeSpecs) {
+ if (typeSpecs.hasOwnProperty(typeSpecName)) {
+ var error;
+ // Prop type validation may throw. In case they do, we don't want to
+ // fail the render phase where it didn't fail before. So we log it.
+ // After these have been cleaned up, we'll let them throw.
+ try {
+ // This is intentionally an invariant that gets caught. It's the same
+ // behavior as without this statement except with a better message.
+ invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
+ } catch (ex) {
+ error = ex;
+ }
+ warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
+ // Only monitor this failure once because there tends to be a lot of the
+ // same error.
+ loggedTypeFailures[error.message] = true;
- // Test for A's keys different from B.
- for (var i = 0; i < keysA.length; i++) {
- if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
- return false;
+ var stack = getStack ? getStack() : '';
+
+ warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
+ }
+ }
}
}
-
- return true;
}
-module.exports = shallowEqual;
-},{}],23:[function(require,module,exports){
+module.exports = checkPropTypes;
+
+},{"./lib/ReactPropTypesSecret":34,"fbjs/lib/invariant":36,"fbjs/lib/warning":37}],32:[function(require,module,exports){
/**
- * Copyright 2014-2015, Facebook, Inc.
+ * Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
- *
*/
'use strict';
-var emptyFunction = require('./emptyFunction');
-
-/**
- * Similar to invariant but only logs a warning if the condition is not met.
- * This can be used to log issues in development environments in critical
- * paths. Removing the logging code for production environments will keep the
- * same logic and follow the same code paths.
- */
-
-var warning = emptyFunction;
-
-if ("production" !== 'production') {
- (function () {
- var printWarning = function printWarning(format) {
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- var argIndex = 0;
- var message = 'Warning: ' + format.replace(/%s/g, function () {
- return args[argIndex++];
- });
- if (typeof console !== 'undefined') {
- console.error(message);
- }
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- throw new Error(message);
- } catch (x) {}
- };
-
- warning = function warning(condition, format) {
- if (format === undefined) {
- throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
- }
+var emptyFunction = require('fbjs/lib/emptyFunction');
+var invariant = require('fbjs/lib/invariant');
+var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
- if (format.indexOf('Failed Composite propType: ') === 0) {
- return; // Ignore CompositeComponent proptype check.
- }
+module.exports = function() {
+ function shim(props, propName, componentName, location, propFullName, secret) {
+ if (secret === ReactPropTypesSecret) {
+ // It is still safe when called from React.
+ return;
+ }
+ invariant(
+ false,
+ 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
+ 'Use PropTypes.checkPropTypes() to call them. ' +
+ 'Read more at http://fb.me/use-check-prop-types'
+ );
+ };
+ shim.isRequired = shim;
+ function getShim() {
+ return shim;
+ };
+ // Important!
+ // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
+ var ReactPropTypes = {
+ array: shim,
+ bool: shim,
+ func: shim,
+ number: shim,
+ object: shim,
+ string: shim,
+ symbol: shim,
+
+ any: shim,
+ arrayOf: getShim,
+ element: shim,
+ instanceOf: getShim,
+ node: shim,
+ objectOf: getShim,
+ oneOf: getShim,
+ oneOfType: getShim,
+ shape: getShim
+ };
- if (!condition) {
- for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
- args[_key2 - 2] = arguments[_key2];
- }
+ ReactPropTypes.checkPropTypes = emptyFunction;
+ ReactPropTypes.PropTypes = ReactPropTypes;
- printWarning.apply(undefined, [format].concat(args));
- }
- };
- })();
-}
+ return ReactPropTypes;
+};
-module.exports = warning;
-},{"./emptyFunction":8}],24:[function(require,module,exports){
-/*
-object-assign
-(c) Sindre Sorhus
-@license MIT
-*/
+},{"./lib/ReactPropTypesSecret":34,"fbjs/lib/emptyFunction":35,"fbjs/lib/invariant":36}],33:[function(require,module,exports){
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ */
'use strict';
-/* eslint-disable no-unused-vars */
-var getOwnPropertySymbols = Object.getOwnPropertySymbols;
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-var propIsEnumerable = Object.prototype.propertyIsEnumerable;
-
-function toObject(val) {
- if (val === null || val === undefined) {
- throw new TypeError('Object.assign cannot be called with null or undefined');
- }
- return Object(val);
-}
-
-function shouldUseNative() {
- try {
- if (!Object.assign) {
- return false;
- }
+var emptyFunction = require('fbjs/lib/emptyFunction');
+var invariant = require('fbjs/lib/invariant');
+var warning = require('fbjs/lib/warning');
- // Detect buggy property enumeration order in older V8 versions.
+var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
+var checkPropTypes = require('./checkPropTypes');
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
- test1[5] = 'de';
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
- return false;
- }
+module.exports = function(isValidElement, throwOnDirectAccess) {
+ /* global Symbol */
+ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
+ var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test2 = {};
- for (var i = 0; i < 10; i++) {
- test2['_' + String.fromCharCode(i)] = i;
- }
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
- return test2[n];
- });
- if (order2.join('') !== '0123456789') {
- return false;
- }
+ /**
+ * Returns the iterator method function contained on the iterable object.
+ *
+ * Be sure to invoke the function with the iterable as context:
+ *
+ * var iteratorFn = getIteratorFn(myIterable);
+ * if (iteratorFn) {
+ * var iterator = iteratorFn.call(myIterable);
+ * ...
+ * }
+ *
+ * @param {?object} maybeIterable
+ * @return {?function}
+ */
+ function getIteratorFn(maybeIterable) {
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
+ if (typeof iteratorFn === 'function') {
+ return iteratorFn;
+ }
+ }
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test3 = {};
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
- test3[letter] = letter;
- });
- if (Object.keys(Object.assign({}, test3)).join('') !==
- 'abcdefghijklmnopqrst') {
- return false;
- }
+ /**
+ * Collection of methods that allow declaration and validation of props that are
+ * supplied to React components. Example usage:
+ *
+ * var Props = require('ReactPropTypes');
+ * var MyArticle = React.createClass({
+ * propTypes: {
+ * // An optional string prop named "description".
+ * description: Props.string,
+ *
+ * // A required enum prop named "category".
+ * category: Props.oneOf(['News','Photos']).isRequired,
+ *
+ * // A prop named "dialog" that requires an instance of Dialog.
+ * dialog: Props.instanceOf(Dialog).isRequired
+ * },
+ * render: function() { ... }
+ * });
+ *
+ * A more formal specification of how these methods are used:
+ *
+ * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
+ * decl := ReactPropTypes.{type}(.isRequired)?
+ *
+ * Each and every declaration produces a function with the same signature. This
+ * allows the creation of custom validation functions. For example:
+ *
+ * var MyLink = React.createClass({
+ * propTypes: {
+ * // An optional string or URI prop named "href".
+ * href: function(props, propName, componentName) {
+ * var propValue = props[propName];
+ * if (propValue != null && typeof propValue !== 'string' &&
+ * !(propValue instanceof URI)) {
+ * return new Error(
+ * 'Expected a string or an URI for ' + propName + ' in ' +
+ * componentName
+ * );
+ * }
+ * }
+ * },
+ * render: function() {...}
+ * });
+ *
+ * @internal
+ */
- return true;
- } catch (err) {
- // We don't expect any of the above to throw, but better to be safe.
- return false;
- }
-}
+ var ANONYMOUS = '<>';
+
+ // Important!
+ // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
+ var ReactPropTypes = {
+ array: createPrimitiveTypeChecker('array'),
+ bool: createPrimitiveTypeChecker('boolean'),
+ func: createPrimitiveTypeChecker('function'),
+ number: createPrimitiveTypeChecker('number'),
+ object: createPrimitiveTypeChecker('object'),
+ string: createPrimitiveTypeChecker('string'),
+ symbol: createPrimitiveTypeChecker('symbol'),
+
+ any: createAnyTypeChecker(),
+ arrayOf: createArrayOfTypeChecker,
+ element: createElementTypeChecker(),
+ instanceOf: createInstanceTypeChecker,
+ node: createNodeChecker(),
+ objectOf: createObjectOfTypeChecker,
+ oneOf: createEnumTypeChecker,
+ oneOfType: createUnionTypeChecker,
+ shape: createShapeTypeChecker
+ };
-module.exports = shouldUseNative() ? Object.assign : function (target, source) {
- var from;
- var to = toObject(target);
- var symbols;
+ /**
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
+ */
+ /*eslint-disable no-self-compare*/
+ function is(x, y) {
+ // SameValue algorithm
+ if (x === y) {
+ // Steps 1-5, 7-10
+ // Steps 6.b-6.e: +0 != -0
+ return x !== 0 || 1 / x === 1 / y;
+ } else {
+ // Step 6.a: NaN == NaN
+ return x !== x && y !== y;
+ }
+ }
+ /*eslint-enable no-self-compare*/
- for (var s = 1; s < arguments.length; s++) {
- from = Object(arguments[s]);
+ /**
+ * We use an Error-like object for backward compatibility as people may call
+ * PropTypes directly and inspect their output. However, we don't use real
+ * Errors anymore. We don't inspect their stack anyway, and creating them
+ * is prohibitively expensive if they are created too often, such as what
+ * happens in oneOfType() for any type before the one that matched.
+ */
+ function PropTypeError(message) {
+ this.message = message;
+ this.stack = '';
+ }
+ // Make `instanceof Error` still work for returned errors.
+ PropTypeError.prototype = Error.prototype;
- for (var key in from) {
- if (hasOwnProperty.call(from, key)) {
- to[key] = from[key];
- }
- }
+ function createChainableTypeChecker(validate) {
+ if ("production" !== 'production') {
+ var manualPropTypeCallCache = {};
+ var manualPropTypeWarningCount = 0;
+ }
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
+ componentName = componentName || ANONYMOUS;
+ propFullName = propFullName || propName;
+
+ if (secret !== ReactPropTypesSecret) {
+ if (throwOnDirectAccess) {
+ // New behavior only for users of `prop-types` package
+ invariant(
+ false,
+ 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
+ 'Use `PropTypes.checkPropTypes()` to call them. ' +
+ 'Read more at http://fb.me/use-check-prop-types'
+ );
+ } else if ("production" !== 'production' && typeof console !== 'undefined') {
+ // Old behavior for people using React.PropTypes
+ var cacheKey = componentName + ':' + propName;
+ if (
+ !manualPropTypeCallCache[cacheKey] &&
+ // Avoid spamming the console because they are often not actionable except for lib authors
+ manualPropTypeWarningCount < 3
+ ) {
+ warning(
+ false,
+ 'You are manually calling a React.PropTypes validation ' +
+ 'function for the `%s` prop on `%s`. This is deprecated ' +
+ 'and will throw in the standalone `prop-types` package. ' +
+ 'You may be seeing this warning due to a third-party PropTypes ' +
+ 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
+ propFullName,
+ componentName
+ );
+ manualPropTypeCallCache[cacheKey] = true;
+ manualPropTypeWarningCount++;
+ }
+ }
+ }
+ if (props[propName] == null) {
+ if (isRequired) {
+ if (props[propName] === null) {
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
+ }
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
+ }
+ return null;
+ } else {
+ return validate(props, propName, componentName, location, propFullName);
+ }
+ }
- if (getOwnPropertySymbols) {
- symbols = getOwnPropertySymbols(from);
- for (var i = 0; i < symbols.length; i++) {
- if (propIsEnumerable.call(from, symbols[i])) {
- to[symbols[i]] = from[symbols[i]];
- }
- }
- }
- }
+ var chainedCheckType = checkType.bind(null, false);
+ chainedCheckType.isRequired = checkType.bind(null, true);
- return to;
-};
+ return chainedCheckType;
+ }
-},{}],25:[function(require,module,exports){
-// shim for using process in browser
-var process = module.exports = {};
+ function createPrimitiveTypeChecker(expectedType) {
+ function validate(props, propName, componentName, location, propFullName, secret) {
+ var propValue = props[propName];
+ var propType = getPropType(propValue);
+ if (propType !== expectedType) {
+ // `propValue` being instance of, say, date/regexp, pass the 'object'
+ // check, but we can offer a more precise error message here rather than
+ // 'of type `object`'.
+ var preciseType = getPreciseType(propValue);
-// cached from whatever global is present so that test runners that stub it
-// don't break things. But we need to wrap it in a try catch in case it is
-// wrapped in strict mode code which doesn't define any globals. It's inside a
-// function because try/catches deoptimize in certain engines.
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
+ }
+ return null;
+ }
+ return createChainableTypeChecker(validate);
+ }
-var cachedSetTimeout;
-var cachedClearTimeout;
+ function createAnyTypeChecker() {
+ return createChainableTypeChecker(emptyFunction.thatReturnsNull);
+ }
-function defaultSetTimout() {
- throw new Error('setTimeout has not been defined');
-}
-function defaultClearTimeout () {
- throw new Error('clearTimeout has not been defined');
-}
-(function () {
- try {
- if (typeof setTimeout === 'function') {
- cachedSetTimeout = setTimeout;
- } else {
- cachedSetTimeout = defaultSetTimout;
+ function createArrayOfTypeChecker(typeChecker) {
+ function validate(props, propName, componentName, location, propFullName) {
+ if (typeof typeChecker !== 'function') {
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
+ }
+ var propValue = props[propName];
+ if (!Array.isArray(propValue)) {
+ var propType = getPropType(propValue);
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
+ }
+ for (var i = 0; i < propValue.length; i++) {
+ var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
+ if (error instanceof Error) {
+ return error;
}
- } catch (e) {
- cachedSetTimeout = defaultSetTimout;
+ }
+ return null;
}
- try {
- if (typeof clearTimeout === 'function') {
- cachedClearTimeout = clearTimeout;
- } else {
- cachedClearTimeout = defaultClearTimeout;
- }
- } catch (e) {
- cachedClearTimeout = defaultClearTimeout;
+ return createChainableTypeChecker(validate);
+ }
+
+ function createElementTypeChecker() {
+ function validate(props, propName, componentName, location, propFullName) {
+ var propValue = props[propName];
+ if (!isValidElement(propValue)) {
+ var propType = getPropType(propValue);
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
+ }
+ return null;
}
-} ())
-function runTimeout(fun) {
- if (cachedSetTimeout === setTimeout) {
- //normal enviroments in sane situations
- return setTimeout(fun, 0);
+ return createChainableTypeChecker(validate);
+ }
+
+ function createInstanceTypeChecker(expectedClass) {
+ function validate(props, propName, componentName, location, propFullName) {
+ if (!(props[propName] instanceof expectedClass)) {
+ var expectedClassName = expectedClass.name || ANONYMOUS;
+ var actualClassName = getClassName(props[propName]);
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
+ }
+ return null;
+ }
+ return createChainableTypeChecker(validate);
+ }
+
+ function createEnumTypeChecker(expectedValues) {
+ if (!Array.isArray(expectedValues)) {
+ "production" !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
+ return emptyFunction.thatReturnsNull;
}
- // if setTimeout wasn't available but was latter defined
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
- cachedSetTimeout = setTimeout;
- return setTimeout(fun, 0);
+
+ function validate(props, propName, componentName, location, propFullName) {
+ var propValue = props[propName];
+ for (var i = 0; i < expectedValues.length; i++) {
+ if (is(propValue, expectedValues[i])) {
+ return null;
+ }
+ }
+
+ var valuesString = JSON.stringify(expectedValues);
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
}
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedSetTimeout(fun, 0);
- } catch(e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedSetTimeout.call(null, fun, 0);
- } catch(e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
- return cachedSetTimeout.call(this, fun, 0);
+ return createChainableTypeChecker(validate);
+ }
+
+ function createObjectOfTypeChecker(typeChecker) {
+ function validate(props, propName, componentName, location, propFullName) {
+ if (typeof typeChecker !== 'function') {
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
+ }
+ var propValue = props[propName];
+ var propType = getPropType(propValue);
+ if (propType !== 'object') {
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
+ }
+ for (var key in propValue) {
+ if (propValue.hasOwnProperty(key)) {
+ var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
+ if (error instanceof Error) {
+ return error;
+ }
}
+ }
+ return null;
}
+ return createChainableTypeChecker(validate);
+ }
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
+ if (!Array.isArray(arrayOfTypeCheckers)) {
+ "production" !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
+ return emptyFunction.thatReturnsNull;
+ }
-}
-function runClearTimeout(marker) {
- if (cachedClearTimeout === clearTimeout) {
- //normal enviroments in sane situations
- return clearTimeout(marker);
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
+ var checker = arrayOfTypeCheckers[i];
+ if (typeof checker !== 'function') {
+ warning(
+ false,
+ 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' +
+ 'received %s at index %s.',
+ getPostfixForTypeWarning(checker),
+ i
+ );
+ return emptyFunction.thatReturnsNull;
+ }
}
- // if clearTimeout wasn't available but was latter defined
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
- cachedClearTimeout = clearTimeout;
- return clearTimeout(marker);
+
+ function validate(props, propName, componentName, location, propFullName) {
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
+ var checker = arrayOfTypeCheckers[i];
+ if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
+ return null;
+ }
+ }
+
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
}
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedClearTimeout(marker);
- } catch (e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedClearTimeout.call(null, marker);
- } catch (e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
- return cachedClearTimeout.call(this, marker);
+ return createChainableTypeChecker(validate);
+ }
+
+ function createNodeChecker() {
+ function validate(props, propName, componentName, location, propFullName) {
+ if (!isNode(props[propName])) {
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
+ }
+ return null;
+ }
+ return createChainableTypeChecker(validate);
+ }
+
+ function createShapeTypeChecker(shapeTypes) {
+ function validate(props, propName, componentName, location, propFullName) {
+ var propValue = props[propName];
+ var propType = getPropType(propValue);
+ if (propType !== 'object') {
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
+ }
+ for (var key in shapeTypes) {
+ var checker = shapeTypes[key];
+ if (!checker) {
+ continue;
+ }
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
+ if (error) {
+ return error;
}
+ }
+ return null;
}
+ return createChainableTypeChecker(validate);
+ }
+ function isNode(propValue) {
+ switch (typeof propValue) {
+ case 'number':
+ case 'string':
+ case 'undefined':
+ return true;
+ case 'boolean':
+ return !propValue;
+ case 'object':
+ if (Array.isArray(propValue)) {
+ return propValue.every(isNode);
+ }
+ if (propValue === null || isValidElement(propValue)) {
+ return true;
+ }
+ var iteratorFn = getIteratorFn(propValue);
+ if (iteratorFn) {
+ var iterator = iteratorFn.call(propValue);
+ var step;
+ if (iteratorFn !== propValue.entries) {
+ while (!(step = iterator.next()).done) {
+ if (!isNode(step.value)) {
+ return false;
+ }
+ }
+ } else {
+ // Iterator will provide entry [k,v] tuples rather than values.
+ while (!(step = iterator.next()).done) {
+ var entry = step.value;
+ if (entry) {
+ if (!isNode(entry[1])) {
+ return false;
+ }
+ }
+ }
+ }
+ } else {
+ return false;
+ }
-}
-var queue = [];
-var draining = false;
-var currentQueue;
-var queueIndex = -1;
+ return true;
+ default:
+ return false;
+ }
+ }
-function cleanUpNextTick() {
- if (!draining || !currentQueue) {
- return;
+ function isSymbol(propType, propValue) {
+ // Native Symbol.
+ if (propType === 'symbol') {
+ return true;
}
- draining = false;
- if (currentQueue.length) {
- queue = currentQueue.concat(queue);
- } else {
- queueIndex = -1;
+
+ // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
+ if (propValue['@@toStringTag'] === 'Symbol') {
+ return true;
}
- if (queue.length) {
- drainQueue();
+
+ // Fallback for non-spec compliant Symbols which are polyfilled.
+ if (typeof Symbol === 'function' && propValue instanceof Symbol) {
+ return true;
}
-}
-function drainQueue() {
- if (draining) {
- return;
+ return false;
+ }
+
+ // Equivalent of `typeof` but with special handling for array and regexp.
+ function getPropType(propValue) {
+ var propType = typeof propValue;
+ if (Array.isArray(propValue)) {
+ return 'array';
}
- var timeout = runTimeout(cleanUpNextTick);
- draining = true;
+ if (propValue instanceof RegExp) {
+ // Old webkits (at least until Android 4.0) return 'function' rather than
+ // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
+ // passes PropTypes.object.
+ return 'object';
+ }
+ if (isSymbol(propType, propValue)) {
+ return 'symbol';
+ }
+ return propType;
+ }
- var len = queue.length;
- while(len) {
- currentQueue = queue;
- queue = [];
- while (++queueIndex < len) {
- if (currentQueue) {
- currentQueue[queueIndex].run();
- }
- }
- queueIndex = -1;
- len = queue.length;
+ // This handles more types than `getPropType`. Only used for error messages.
+ // See `createPrimitiveTypeChecker`.
+ function getPreciseType(propValue) {
+ if (typeof propValue === 'undefined' || propValue === null) {
+ return '' + propValue;
}
- currentQueue = null;
- draining = false;
- runClearTimeout(timeout);
-}
+ var propType = getPropType(propValue);
+ if (propType === 'object') {
+ if (propValue instanceof Date) {
+ return 'date';
+ } else if (propValue instanceof RegExp) {
+ return 'regexp';
+ }
+ }
+ return propType;
+ }
-process.nextTick = function (fun) {
- var args = new Array(arguments.length - 1);
- if (arguments.length > 1) {
- for (var i = 1; i < arguments.length; i++) {
- args[i - 1] = arguments[i];
- }
+ // Returns a string that is postfixed to a warning about an invalid type.
+ // For example, "undefined" or "of type array"
+ function getPostfixForTypeWarning(value) {
+ var type = getPreciseType(value);
+ switch (type) {
+ case 'array':
+ case 'object':
+ return 'an ' + type;
+ case 'boolean':
+ case 'date':
+ case 'regexp':
+ return 'a ' + type;
+ default:
+ return type;
}
- queue.push(new Item(fun, args));
- if (queue.length === 1 && !draining) {
- runTimeout(drainQueue);
+ }
+
+ // Returns class name of the object, if any.
+ function getClassName(propValue) {
+ if (!propValue.constructor || !propValue.constructor.name) {
+ return ANONYMOUS;
}
-};
+ return propValue.constructor.name;
+ }
-// v8 likes predictible objects
-function Item(fun, array) {
- this.fun = fun;
- this.array = array;
-}
-Item.prototype.run = function () {
- this.fun.apply(null, this.array);
+ ReactPropTypes.checkPropTypes = checkPropTypes;
+ ReactPropTypes.PropTypes = ReactPropTypes;
+
+ return ReactPropTypes;
};
-process.title = 'browser';
-process.browser = true;
-process.env = {};
-process.argv = [];
-process.version = ''; // empty string to avoid regexp issues
-process.versions = {};
-function noop() {}
+},{"./checkPropTypes":31,"./lib/ReactPropTypesSecret":34,"fbjs/lib/emptyFunction":35,"fbjs/lib/invariant":36,"fbjs/lib/warning":37}],34:[function(require,module,exports){
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ */
-process.on = noop;
-process.addListener = noop;
-process.once = noop;
-process.off = noop;
-process.removeListener = noop;
-process.removeAllListeners = noop;
-process.emit = noop;
+'use strict';
-process.binding = function (name) {
- throw new Error('process.binding is not supported');
-};
+var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
-process.cwd = function () { return '/' };
-process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
-};
-process.umask = function() { return 0; };
+module.exports = ReactPropTypesSecret;
-},{}],26:[function(require,module,exports){
+},{}],35:[function(require,module,exports){
+arguments[4][2][0].apply(exports,arguments)
+},{"dup":2}],36:[function(require,module,exports){
+arguments[4][4][0].apply(exports,arguments)
+},{"dup":4}],37:[function(require,module,exports){
+arguments[4][5][0].apply(exports,arguments)
+},{"./emptyFunction":35,"dup":5}],38:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -1442,7 +2836,7 @@ var ARIADOMPropertyConfig = {
};
module.exports = ARIADOMPropertyConfig;
-},{}],27:[function(require,module,exports){
+},{}],39:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -1466,7 +2860,7 @@ var AutoFocusUtils = {
};
module.exports = AutoFocusUtils;
-},{"./ReactDOMComponentTree":58,"fbjs/lib/focusNode":10}],28:[function(require,module,exports){
+},{"./ReactDOMComponentTree":70,"fbjs/lib/focusNode":15}],40:[function(require,module,exports){
/**
* Copyright 2013-present Facebook, Inc.
* All rights reserved.
@@ -1851,7 +3245,7 @@ var BeforeInputEventPlugin = {
};
module.exports = BeforeInputEventPlugin;
-},{"./EventPropagators":44,"./FallbackCompositionState":45,"./SyntheticCompositionEvent":109,"./SyntheticInputEvent":113,"fbjs/lib/ExecutionEnvironment":2}],29:[function(require,module,exports){
+},{"./EventPropagators":56,"./FallbackCompositionState":57,"./SyntheticCompositionEvent":121,"./SyntheticInputEvent":125,"fbjs/lib/ExecutionEnvironment":7}],41:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -1999,7 +3393,7 @@ var CSSProperty = {
};
module.exports = CSSProperty;
-},{}],30:[function(require,module,exports){
+},{}],42:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -2208,7 +3602,7 @@ var CSSPropertyOperations = {
};
module.exports = CSSPropertyOperations;
-},{"./CSSProperty":29,"./ReactInstrumentation":87,"./dangerousStyleValue":126,"fbjs/lib/ExecutionEnvironment":2,"fbjs/lib/camelizeStyleName":4,"fbjs/lib/hyphenateStyleName":15,"fbjs/lib/memoizeStringOnly":19,"fbjs/lib/warning":23}],31:[function(require,module,exports){
+},{"./CSSProperty":41,"./ReactInstrumentation":99,"./dangerousStyleValue":138,"fbjs/lib/ExecutionEnvironment":7,"fbjs/lib/camelizeStyleName":9,"fbjs/lib/hyphenateStyleName":20,"fbjs/lib/memoizeStringOnly":24,"fbjs/lib/warning":28}],43:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -2327,7 +3721,7 @@ var CallbackQueue = function () {
}();
module.exports = PooledClass.addPoolingTo(CallbackQueue);
-},{"./PooledClass":49,"./reactProdInvariant":145,"fbjs/lib/invariant":16}],32:[function(require,module,exports){
+},{"./PooledClass":61,"./reactProdInvariant":157,"fbjs/lib/invariant":21}],44:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -2648,7 +4042,7 @@ var ChangeEventPlugin = {
};
module.exports = ChangeEventPlugin;
-},{"./EventPluginHub":41,"./EventPropagators":44,"./ReactDOMComponentTree":58,"./ReactUpdates":102,"./SyntheticEvent":111,"./getEventTarget":134,"./isEventSupported":142,"./isTextInputElement":143,"fbjs/lib/ExecutionEnvironment":2}],33:[function(require,module,exports){
+},{"./EventPluginHub":53,"./EventPropagators":56,"./ReactDOMComponentTree":70,"./ReactUpdates":114,"./SyntheticEvent":123,"./getEventTarget":146,"./isEventSupported":154,"./isTextInputElement":155,"fbjs/lib/ExecutionEnvironment":7}],45:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -2873,7 +4267,7 @@ var DOMChildrenOperations = {
};
module.exports = DOMChildrenOperations;
-},{"./DOMLazyTree":34,"./Danger":38,"./ReactDOMComponentTree":58,"./ReactInstrumentation":87,"./createMicrosoftUnsafeLocalFunction":125,"./setInnerHTML":147,"./setTextContent":148}],34:[function(require,module,exports){
+},{"./DOMLazyTree":46,"./Danger":50,"./ReactDOMComponentTree":70,"./ReactInstrumentation":99,"./createMicrosoftUnsafeLocalFunction":137,"./setInnerHTML":159,"./setTextContent":160}],46:[function(require,module,exports){
/**
* Copyright 2015-present, Facebook, Inc.
* All rights reserved.
@@ -2991,7 +4385,7 @@ DOMLazyTree.queueHTML = queueHTML;
DOMLazyTree.queueText = queueText;
module.exports = DOMLazyTree;
-},{"./DOMNamespaces":35,"./createMicrosoftUnsafeLocalFunction":125,"./setInnerHTML":147,"./setTextContent":148}],35:[function(require,module,exports){
+},{"./DOMNamespaces":47,"./createMicrosoftUnsafeLocalFunction":137,"./setInnerHTML":159,"./setTextContent":160}],47:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -3011,7 +4405,7 @@ var DOMNamespaces = {
};
module.exports = DOMNamespaces;
-},{}],36:[function(require,module,exports){
+},{}],48:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -3221,7 +4615,7 @@ var DOMProperty = {
};
module.exports = DOMProperty;
-},{"./reactProdInvariant":145,"fbjs/lib/invariant":16}],37:[function(require,module,exports){
+},{"./reactProdInvariant":157,"fbjs/lib/invariant":21}],49:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -3458,7 +4852,7 @@ var DOMPropertyOperations = {
};
module.exports = DOMPropertyOperations;
-},{"./DOMProperty":36,"./ReactDOMComponentTree":58,"./ReactInstrumentation":87,"./quoteAttributeValueForBrowser":144,"fbjs/lib/warning":23}],38:[function(require,module,exports){
+},{"./DOMProperty":48,"./ReactDOMComponentTree":70,"./ReactInstrumentation":99,"./quoteAttributeValueForBrowser":156,"fbjs/lib/warning":28}],50:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -3506,7 +4900,7 @@ var Danger = {
};
module.exports = Danger;
-},{"./DOMLazyTree":34,"./reactProdInvariant":145,"fbjs/lib/ExecutionEnvironment":2,"fbjs/lib/createNodesFromMarkup":7,"fbjs/lib/emptyFunction":8,"fbjs/lib/invariant":16}],39:[function(require,module,exports){
+},{"./DOMLazyTree":46,"./reactProdInvariant":157,"fbjs/lib/ExecutionEnvironment":7,"fbjs/lib/createNodesFromMarkup":12,"fbjs/lib/emptyFunction":13,"fbjs/lib/invariant":21}],51:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -3532,7 +4926,7 @@ module.exports = Danger;
var DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];
module.exports = DefaultEventPluginOrder;
-},{}],40:[function(require,module,exports){
+},{}],52:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -3632,7 +5026,7 @@ var EnterLeaveEventPlugin = {
};
module.exports = EnterLeaveEventPlugin;
-},{"./EventPropagators":44,"./ReactDOMComponentTree":58,"./SyntheticMouseEvent":115}],41:[function(require,module,exports){
+},{"./EventPropagators":56,"./ReactDOMComponentTree":70,"./SyntheticMouseEvent":127}],53:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -3910,7 +5304,7 @@ var EventPluginHub = {
};
module.exports = EventPluginHub;
-},{"./EventPluginRegistry":42,"./EventPluginUtils":43,"./ReactErrorUtils":78,"./accumulateInto":122,"./forEachAccumulated":130,"./reactProdInvariant":145,"fbjs/lib/invariant":16}],42:[function(require,module,exports){
+},{"./EventPluginRegistry":54,"./EventPluginUtils":55,"./ReactErrorUtils":90,"./accumulateInto":134,"./forEachAccumulated":142,"./reactProdInvariant":157,"fbjs/lib/invariant":21}],54:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -4165,7 +5559,7 @@ var EventPluginRegistry = {
};
module.exports = EventPluginRegistry;
-},{"./reactProdInvariant":145,"fbjs/lib/invariant":16}],43:[function(require,module,exports){
+},{"./reactProdInvariant":157,"fbjs/lib/invariant":21}],55:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -4391,7 +5785,7 @@ var EventPluginUtils = {
};
module.exports = EventPluginUtils;
-},{"./ReactErrorUtils":78,"./reactProdInvariant":145,"fbjs/lib/invariant":16,"fbjs/lib/warning":23}],44:[function(require,module,exports){
+},{"./ReactErrorUtils":90,"./reactProdInvariant":157,"fbjs/lib/invariant":21,"fbjs/lib/warning":28}],56:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -4525,7 +5919,7 @@ var EventPropagators = {
};
module.exports = EventPropagators;
-},{"./EventPluginHub":41,"./EventPluginUtils":43,"./accumulateInto":122,"./forEachAccumulated":130,"fbjs/lib/warning":23}],45:[function(require,module,exports){
+},{"./EventPluginHub":53,"./EventPluginUtils":55,"./accumulateInto":134,"./forEachAccumulated":142,"fbjs/lib/warning":28}],57:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -4620,7 +6014,7 @@ _assign(FallbackCompositionState.prototype, {
PooledClass.addPoolingTo(FallbackCompositionState);
module.exports = FallbackCompositionState;
-},{"./PooledClass":49,"./getTextContentAccessor":139,"object-assign":24}],46:[function(require,module,exports){
+},{"./PooledClass":61,"./getTextContentAccessor":151,"object-assign":29}],58:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -4832,7 +6226,7 @@ var HTMLDOMPropertyConfig = {
};
module.exports = HTMLDOMPropertyConfig;
-},{"./DOMProperty":36}],47:[function(require,module,exports){
+},{"./DOMProperty":48}],59:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -4891,7 +6285,7 @@ var KeyEscapeUtils = {
};
module.exports = KeyEscapeUtils;
-},{}],48:[function(require,module,exports){
+},{}],60:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -5026,7 +6420,7 @@ var LinkedValueUtils = {
};
module.exports = LinkedValueUtils;
-},{"./ReactPropTypesSecret":95,"./reactProdInvariant":145,"fbjs/lib/invariant":16,"fbjs/lib/warning":23,"react/lib/React":154}],49:[function(require,module,exports){
+},{"./ReactPropTypesSecret":107,"./reactProdInvariant":157,"fbjs/lib/invariant":21,"fbjs/lib/warning":28,"react/lib/React":166}],61:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -5138,7 +6532,7 @@ var PooledClass = {
};
module.exports = PooledClass;
-},{"./reactProdInvariant":145,"fbjs/lib/invariant":16}],50:[function(require,module,exports){
+},{"./reactProdInvariant":157,"fbjs/lib/invariant":21}],62:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -5466,7 +6860,7 @@ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
});
module.exports = ReactBrowserEventEmitter;
-},{"./EventPluginRegistry":42,"./ReactEventEmitterMixin":79,"./ViewportMetrics":121,"./getVendorPrefixedEventName":140,"./isEventSupported":142,"object-assign":24}],51:[function(require,module,exports){
+},{"./EventPluginRegistry":54,"./ReactEventEmitterMixin":91,"./ViewportMetrics":133,"./getVendorPrefixedEventName":152,"./isEventSupported":154,"object-assign":29}],63:[function(require,module,exports){
(function (process){
/**
* Copyright 2014-present, Facebook, Inc.
@@ -5622,7 +7016,7 @@ var ReactChildReconciler = {
module.exports = ReactChildReconciler;
}).call(this,require('_process'))
-},{"./KeyEscapeUtils":47,"./ReactReconciler":97,"./instantiateReactComponent":141,"./shouldUpdateReactComponent":149,"./traverseAllChildren":150,"_process":25,"fbjs/lib/warning":23,"react/lib/ReactComponentTreeHook":158}],52:[function(require,module,exports){
+},{"./KeyEscapeUtils":59,"./ReactReconciler":109,"./instantiateReactComponent":153,"./shouldUpdateReactComponent":161,"./traverseAllChildren":162,"_process":30,"fbjs/lib/warning":28,"react/lib/ReactComponentTreeHook":170}],64:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -5652,7 +7046,7 @@ var ReactComponentBrowserEnvironment = {
};
module.exports = ReactComponentBrowserEnvironment;
-},{"./DOMChildrenOperations":33,"./ReactDOMIDOperations":62}],53:[function(require,module,exports){
+},{"./DOMChildrenOperations":45,"./ReactDOMIDOperations":74}],65:[function(require,module,exports){
/**
* Copyright 2014-present, Facebook, Inc.
* All rights reserved.
@@ -5698,7 +7092,7 @@ var ReactComponentEnvironment = {
};
module.exports = ReactComponentEnvironment;
-},{"./reactProdInvariant":145,"fbjs/lib/invariant":16}],54:[function(require,module,exports){
+},{"./reactProdInvariant":157,"fbjs/lib/invariant":21}],66:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -6600,7 +7994,7 @@ var ReactCompositeComponent = {
};
module.exports = ReactCompositeComponent;
-},{"./ReactComponentEnvironment":53,"./ReactErrorUtils":78,"./ReactInstanceMap":86,"./ReactInstrumentation":87,"./ReactNodeTypes":92,"./ReactReconciler":97,"./checkReactTypeSpec":124,"./reactProdInvariant":145,"./shouldUpdateReactComponent":149,"fbjs/lib/emptyObject":9,"fbjs/lib/invariant":16,"fbjs/lib/shallowEqual":22,"fbjs/lib/warning":23,"object-assign":24,"react/lib/React":154,"react/lib/ReactCurrentOwner":159}],55:[function(require,module,exports){
+},{"./ReactComponentEnvironment":65,"./ReactErrorUtils":90,"./ReactInstanceMap":98,"./ReactInstrumentation":99,"./ReactNodeTypes":104,"./ReactReconciler":109,"./checkReactTypeSpec":136,"./reactProdInvariant":157,"./shouldUpdateReactComponent":161,"fbjs/lib/emptyObject":14,"fbjs/lib/invariant":21,"fbjs/lib/shallowEqual":27,"fbjs/lib/warning":28,"object-assign":29,"react/lib/React":166,"react/lib/ReactCurrentOwner":171}],67:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -6711,7 +8105,7 @@ if ("production" !== 'production') {
}
module.exports = ReactDOM;
-},{"./ReactDOMComponentTree":58,"./ReactDOMInvalidARIAHook":64,"./ReactDOMNullInputValuePropHook":65,"./ReactDOMUnknownPropertyHook":72,"./ReactDefaultInjection":75,"./ReactInstrumentation":87,"./ReactMount":90,"./ReactReconciler":97,"./ReactUpdates":102,"./ReactVersion":103,"./findDOMNode":128,"./getHostComponentFromComposite":135,"./renderSubtreeIntoContainer":146,"fbjs/lib/ExecutionEnvironment":2,"fbjs/lib/warning":23}],56:[function(require,module,exports){
+},{"./ReactDOMComponentTree":70,"./ReactDOMInvalidARIAHook":76,"./ReactDOMNullInputValuePropHook":77,"./ReactDOMUnknownPropertyHook":84,"./ReactDefaultInjection":87,"./ReactInstrumentation":99,"./ReactMount":102,"./ReactReconciler":109,"./ReactUpdates":114,"./ReactVersion":115,"./findDOMNode":140,"./getHostComponentFromComposite":147,"./renderSubtreeIntoContainer":158,"fbjs/lib/ExecutionEnvironment":7,"fbjs/lib/warning":28}],68:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -7712,7 +9106,7 @@ ReactDOMComponent.Mixin = {
_assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin);
module.exports = ReactDOMComponent;
-},{"./AutoFocusUtils":27,"./CSSPropertyOperations":30,"./DOMLazyTree":34,"./DOMNamespaces":35,"./DOMProperty":36,"./DOMPropertyOperations":37,"./EventPluginHub":41,"./EventPluginRegistry":42,"./ReactBrowserEventEmitter":50,"./ReactDOMComponentFlags":57,"./ReactDOMComponentTree":58,"./ReactDOMInput":63,"./ReactDOMOption":66,"./ReactDOMSelect":67,"./ReactDOMTextarea":70,"./ReactInstrumentation":87,"./ReactMultiChild":91,"./ReactServerRenderingTransaction":99,"./escapeTextContentForBrowser":127,"./isEventSupported":142,"./reactProdInvariant":145,"./validateDOMNesting":151,"fbjs/lib/emptyFunction":8,"fbjs/lib/invariant":16,"fbjs/lib/shallowEqual":22,"fbjs/lib/warning":23,"object-assign":24}],57:[function(require,module,exports){
+},{"./AutoFocusUtils":39,"./CSSPropertyOperations":42,"./DOMLazyTree":46,"./DOMNamespaces":47,"./DOMProperty":48,"./DOMPropertyOperations":49,"./EventPluginHub":53,"./EventPluginRegistry":54,"./ReactBrowserEventEmitter":62,"./ReactDOMComponentFlags":69,"./ReactDOMComponentTree":70,"./ReactDOMInput":75,"./ReactDOMOption":78,"./ReactDOMSelect":79,"./ReactDOMTextarea":82,"./ReactInstrumentation":99,"./ReactMultiChild":103,"./ReactServerRenderingTransaction":111,"./escapeTextContentForBrowser":139,"./isEventSupported":154,"./reactProdInvariant":157,"./validateDOMNesting":163,"fbjs/lib/emptyFunction":13,"fbjs/lib/invariant":21,"fbjs/lib/shallowEqual":27,"fbjs/lib/warning":28,"object-assign":29}],69:[function(require,module,exports){
/**
* Copyright 2015-present, Facebook, Inc.
* All rights reserved.
@@ -7730,7 +9124,7 @@ var ReactDOMComponentFlags = {
};
module.exports = ReactDOMComponentFlags;
-},{}],58:[function(require,module,exports){
+},{}],70:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -7925,7 +9319,7 @@ var ReactDOMComponentTree = {
};
module.exports = ReactDOMComponentTree;
-},{"./DOMProperty":36,"./ReactDOMComponentFlags":57,"./reactProdInvariant":145,"fbjs/lib/invariant":16}],59:[function(require,module,exports){
+},{"./DOMProperty":48,"./ReactDOMComponentFlags":69,"./reactProdInvariant":157,"fbjs/lib/invariant":21}],71:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -7958,7 +9352,7 @@ function ReactDOMContainerInfo(topLevelWrapper, node) {
}
module.exports = ReactDOMContainerInfo;
-},{"./validateDOMNesting":151}],60:[function(require,module,exports){
+},{"./validateDOMNesting":163}],72:[function(require,module,exports){
/**
* Copyright 2014-present, Facebook, Inc.
* All rights reserved.
@@ -8018,7 +9412,7 @@ _assign(ReactDOMEmptyComponent.prototype, {
});
module.exports = ReactDOMEmptyComponent;
-},{"./DOMLazyTree":34,"./ReactDOMComponentTree":58,"object-assign":24}],61:[function(require,module,exports){
+},{"./DOMLazyTree":46,"./ReactDOMComponentTree":70,"object-assign":29}],73:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -8037,7 +9431,7 @@ var ReactDOMFeatureFlags = {
};
module.exports = ReactDOMFeatureFlags;
-},{}],62:[function(require,module,exports){
+},{}],74:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -8071,7 +9465,7 @@ var ReactDOMIDOperations = {
};
module.exports = ReactDOMIDOperations;
-},{"./DOMChildrenOperations":33,"./ReactDOMComponentTree":58}],63:[function(require,module,exports){
+},{"./DOMChildrenOperations":45,"./ReactDOMComponentTree":70}],75:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -8349,7 +9743,7 @@ function _handleChange(event) {
}
module.exports = ReactDOMInput;
-},{"./DOMPropertyOperations":37,"./LinkedValueUtils":48,"./ReactDOMComponentTree":58,"./ReactUpdates":102,"./reactProdInvariant":145,"fbjs/lib/invariant":16,"fbjs/lib/warning":23,"object-assign":24}],64:[function(require,module,exports){
+},{"./DOMPropertyOperations":49,"./LinkedValueUtils":60,"./ReactDOMComponentTree":70,"./ReactUpdates":114,"./reactProdInvariant":157,"fbjs/lib/invariant":21,"fbjs/lib/warning":28,"object-assign":29}],76:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -8442,7 +9836,7 @@ var ReactDOMInvalidARIAHook = {
};
module.exports = ReactDOMInvalidARIAHook;
-},{"./DOMProperty":36,"fbjs/lib/warning":23,"react/lib/ReactComponentTreeHook":158}],65:[function(require,module,exports){
+},{"./DOMProperty":48,"fbjs/lib/warning":28,"react/lib/ReactComponentTreeHook":170}],77:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -8485,7 +9879,7 @@ var ReactDOMNullInputValuePropHook = {
};
module.exports = ReactDOMNullInputValuePropHook;
-},{"fbjs/lib/warning":23,"react/lib/ReactComponentTreeHook":158}],66:[function(require,module,exports){
+},{"fbjs/lib/warning":28,"react/lib/ReactComponentTreeHook":170}],78:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -8608,7 +10002,7 @@ var ReactDOMOption = {
};
module.exports = ReactDOMOption;
-},{"./ReactDOMComponentTree":58,"./ReactDOMSelect":67,"fbjs/lib/warning":23,"object-assign":24,"react/lib/React":154}],67:[function(require,module,exports){
+},{"./ReactDOMComponentTree":70,"./ReactDOMSelect":79,"fbjs/lib/warning":28,"object-assign":29,"react/lib/React":166}],79:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -8808,7 +10202,7 @@ function _handleChange(event) {
}
module.exports = ReactDOMSelect;
-},{"./LinkedValueUtils":48,"./ReactDOMComponentTree":58,"./ReactUpdates":102,"fbjs/lib/warning":23,"object-assign":24}],68:[function(require,module,exports){
+},{"./LinkedValueUtils":60,"./ReactDOMComponentTree":70,"./ReactUpdates":114,"fbjs/lib/warning":28,"object-assign":29}],80:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -9020,7 +10414,7 @@ var ReactDOMSelection = {
};
module.exports = ReactDOMSelection;
-},{"./getNodeForCharacterOffset":138,"./getTextContentAccessor":139,"fbjs/lib/ExecutionEnvironment":2}],69:[function(require,module,exports){
+},{"./getNodeForCharacterOffset":150,"./getTextContentAccessor":151,"fbjs/lib/ExecutionEnvironment":7}],81:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -9184,7 +10578,7 @@ _assign(ReactDOMTextComponent.prototype, {
});
module.exports = ReactDOMTextComponent;
-},{"./DOMChildrenOperations":33,"./DOMLazyTree":34,"./ReactDOMComponentTree":58,"./escapeTextContentForBrowser":127,"./reactProdInvariant":145,"./validateDOMNesting":151,"fbjs/lib/invariant":16,"object-assign":24}],70:[function(require,module,exports){
+},{"./DOMChildrenOperations":45,"./DOMLazyTree":46,"./ReactDOMComponentTree":70,"./escapeTextContentForBrowser":139,"./reactProdInvariant":157,"./validateDOMNesting":163,"fbjs/lib/invariant":21,"object-assign":29}],82:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -9344,7 +10738,7 @@ function _handleChange(event) {
}
module.exports = ReactDOMTextarea;
-},{"./LinkedValueUtils":48,"./ReactDOMComponentTree":58,"./ReactUpdates":102,"./reactProdInvariant":145,"fbjs/lib/invariant":16,"fbjs/lib/warning":23,"object-assign":24}],71:[function(require,module,exports){
+},{"./LinkedValueUtils":60,"./ReactDOMComponentTree":70,"./ReactUpdates":114,"./reactProdInvariant":157,"fbjs/lib/invariant":21,"fbjs/lib/warning":28,"object-assign":29}],83:[function(require,module,exports){
/**
* Copyright 2015-present, Facebook, Inc.
* All rights reserved.
@@ -9480,7 +10874,7 @@ module.exports = {
traverseTwoPhase: traverseTwoPhase,
traverseEnterLeave: traverseEnterLeave
};
-},{"./reactProdInvariant":145,"fbjs/lib/invariant":16}],72:[function(require,module,exports){
+},{"./reactProdInvariant":157,"fbjs/lib/invariant":21}],84:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -9592,7 +10986,7 @@ var ReactDOMUnknownPropertyHook = {
};
module.exports = ReactDOMUnknownPropertyHook;
-},{"./DOMProperty":36,"./EventPluginRegistry":42,"fbjs/lib/warning":23,"react/lib/ReactComponentTreeHook":158}],73:[function(require,module,exports){
+},{"./DOMProperty":48,"./EventPluginRegistry":54,"fbjs/lib/warning":28,"react/lib/ReactComponentTreeHook":170}],85:[function(require,module,exports){
/**
* Copyright 2016-present, Facebook, Inc.
* All rights reserved.
@@ -9953,7 +11347,7 @@ if (/[?&]react_perf\b/.test(url)) {
}
module.exports = ReactDebugTool;
-},{"./ReactHostOperationHistoryHook":83,"./ReactInvalidSetStateWarningHook":88,"fbjs/lib/ExecutionEnvironment":2,"fbjs/lib/performanceNow":21,"fbjs/lib/warning":23,"react/lib/ReactComponentTreeHook":158}],74:[function(require,module,exports){
+},{"./ReactHostOperationHistoryHook":95,"./ReactInvalidSetStateWarningHook":100,"fbjs/lib/ExecutionEnvironment":7,"fbjs/lib/performanceNow":26,"fbjs/lib/warning":28,"react/lib/ReactComponentTreeHook":170}],86:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -10021,7 +11415,7 @@ var ReactDefaultBatchingStrategy = {
};
module.exports = ReactDefaultBatchingStrategy;
-},{"./ReactUpdates":102,"./Transaction":120,"fbjs/lib/emptyFunction":8,"object-assign":24}],75:[function(require,module,exports){
+},{"./ReactUpdates":114,"./Transaction":132,"fbjs/lib/emptyFunction":13,"object-assign":29}],87:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -10107,7 +11501,7 @@ function inject() {
module.exports = {
inject: inject
};
-},{"./ARIADOMPropertyConfig":26,"./BeforeInputEventPlugin":28,"./ChangeEventPlugin":32,"./DefaultEventPluginOrder":39,"./EnterLeaveEventPlugin":40,"./HTMLDOMPropertyConfig":46,"./ReactComponentBrowserEnvironment":52,"./ReactDOMComponent":56,"./ReactDOMComponentTree":58,"./ReactDOMEmptyComponent":60,"./ReactDOMTextComponent":69,"./ReactDOMTreeTraversal":71,"./ReactDefaultBatchingStrategy":74,"./ReactEventListener":80,"./ReactInjection":84,"./ReactReconcileTransaction":96,"./SVGDOMPropertyConfig":104,"./SelectEventPlugin":105,"./SimpleEventPlugin":106}],76:[function(require,module,exports){
+},{"./ARIADOMPropertyConfig":38,"./BeforeInputEventPlugin":40,"./ChangeEventPlugin":44,"./DefaultEventPluginOrder":51,"./EnterLeaveEventPlugin":52,"./HTMLDOMPropertyConfig":58,"./ReactComponentBrowserEnvironment":64,"./ReactDOMComponent":68,"./ReactDOMComponentTree":70,"./ReactDOMEmptyComponent":72,"./ReactDOMTextComponent":81,"./ReactDOMTreeTraversal":83,"./ReactDefaultBatchingStrategy":86,"./ReactEventListener":92,"./ReactInjection":96,"./ReactReconcileTransaction":108,"./SVGDOMPropertyConfig":116,"./SelectEventPlugin":117,"./SimpleEventPlugin":118}],88:[function(require,module,exports){
/**
* Copyright 2014-present, Facebook, Inc.
* All rights reserved.
@@ -10127,7 +11521,7 @@ module.exports = {
var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
module.exports = REACT_ELEMENT_TYPE;
-},{}],77:[function(require,module,exports){
+},{}],89:[function(require,module,exports){
/**
* Copyright 2014-present, Facebook, Inc.
* All rights reserved.
@@ -10157,7 +11551,7 @@ var ReactEmptyComponent = {
ReactEmptyComponent.injection = ReactEmptyComponentInjection;
module.exports = ReactEmptyComponent;
-},{}],78:[function(require,module,exports){
+},{}],90:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -10234,7 +11628,7 @@ if ("production" !== 'production') {
}
module.exports = ReactErrorUtils;
-},{}],79:[function(require,module,exports){
+},{}],91:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -10267,7 +11661,7 @@ var ReactEventEmitterMixin = {
};
module.exports = ReactEventEmitterMixin;
-},{"./EventPluginHub":41}],80:[function(require,module,exports){
+},{"./EventPluginHub":53}],92:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -10422,7 +11816,7 @@ var ReactEventListener = {
};
module.exports = ReactEventListener;
-},{"./PooledClass":49,"./ReactDOMComponentTree":58,"./ReactUpdates":102,"./getEventTarget":134,"fbjs/lib/EventListener":1,"fbjs/lib/ExecutionEnvironment":2,"fbjs/lib/getUnboundedScrollPosition":13,"object-assign":24}],81:[function(require,module,exports){
+},{"./PooledClass":61,"./ReactDOMComponentTree":70,"./ReactUpdates":114,"./getEventTarget":146,"fbjs/lib/EventListener":6,"fbjs/lib/ExecutionEnvironment":7,"fbjs/lib/getUnboundedScrollPosition":18,"object-assign":29}],93:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -10444,7 +11838,7 @@ var ReactFeatureFlags = {
};
module.exports = ReactFeatureFlags;
-},{}],82:[function(require,module,exports){
+},{}],94:[function(require,module,exports){
/**
* Copyright 2014-present, Facebook, Inc.
* All rights reserved.
@@ -10512,7 +11906,7 @@ var ReactHostComponent = {
};
module.exports = ReactHostComponent;
-},{"./reactProdInvariant":145,"fbjs/lib/invariant":16}],83:[function(require,module,exports){
+},{"./reactProdInvariant":157,"fbjs/lib/invariant":21}],95:[function(require,module,exports){
/**
* Copyright 2016-present, Facebook, Inc.
* All rights reserved.
@@ -10546,7 +11940,7 @@ var ReactHostOperationHistoryHook = {
};
module.exports = ReactHostOperationHistoryHook;
-},{}],84:[function(require,module,exports){
+},{}],96:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -10580,7 +11974,7 @@ var ReactInjection = {
};
module.exports = ReactInjection;
-},{"./DOMProperty":36,"./EventPluginHub":41,"./EventPluginUtils":43,"./ReactBrowserEventEmitter":50,"./ReactComponentEnvironment":53,"./ReactEmptyComponent":77,"./ReactHostComponent":82,"./ReactUpdates":102}],85:[function(require,module,exports){
+},{"./DOMProperty":48,"./EventPluginHub":53,"./EventPluginUtils":55,"./ReactBrowserEventEmitter":62,"./ReactComponentEnvironment":65,"./ReactEmptyComponent":89,"./ReactHostComponent":94,"./ReactUpdates":114}],97:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -10704,7 +12098,7 @@ var ReactInputSelection = {
};
module.exports = ReactInputSelection;
-},{"./ReactDOMSelection":68,"fbjs/lib/containsNode":5,"fbjs/lib/focusNode":10,"fbjs/lib/getActiveElement":11}],86:[function(require,module,exports){
+},{"./ReactDOMSelection":80,"fbjs/lib/containsNode":10,"fbjs/lib/focusNode":15,"fbjs/lib/getActiveElement":16}],98:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -10752,7 +12146,7 @@ var ReactInstanceMap = {
};
module.exports = ReactInstanceMap;
-},{}],87:[function(require,module,exports){
+},{}],99:[function(require,module,exports){
/**
* Copyright 2016-present, Facebook, Inc.
* All rights reserved.
@@ -10776,7 +12170,7 @@ if ("production" !== 'production') {
}
module.exports = { debugTool: debugTool };
-},{"./ReactDebugTool":73}],88:[function(require,module,exports){
+},{"./ReactDebugTool":85}],100:[function(require,module,exports){
/**
* Copyright 2016-present, Facebook, Inc.
* All rights reserved.
@@ -10813,7 +12207,7 @@ var ReactInvalidSetStateWarningHook = {
};
module.exports = ReactInvalidSetStateWarningHook;
-},{"fbjs/lib/warning":23}],89:[function(require,module,exports){
+},{"fbjs/lib/warning":28}],101:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -10863,7 +12257,7 @@ var ReactMarkupChecksum = {
};
module.exports = ReactMarkupChecksum;
-},{"./adler32":123}],90:[function(require,module,exports){
+},{"./adler32":135}],102:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -11401,7 +12795,7 @@ var ReactMount = {
};
module.exports = ReactMount;
-},{"./DOMLazyTree":34,"./DOMProperty":36,"./ReactBrowserEventEmitter":50,"./ReactDOMComponentTree":58,"./ReactDOMContainerInfo":59,"./ReactDOMFeatureFlags":61,"./ReactFeatureFlags":81,"./ReactInstanceMap":86,"./ReactInstrumentation":87,"./ReactMarkupChecksum":89,"./ReactReconciler":97,"./ReactUpdateQueue":101,"./ReactUpdates":102,"./instantiateReactComponent":141,"./reactProdInvariant":145,"./setInnerHTML":147,"./shouldUpdateReactComponent":149,"fbjs/lib/emptyObject":9,"fbjs/lib/invariant":16,"fbjs/lib/warning":23,"react/lib/React":154,"react/lib/ReactCurrentOwner":159}],91:[function(require,module,exports){
+},{"./DOMLazyTree":46,"./DOMProperty":48,"./ReactBrowserEventEmitter":62,"./ReactDOMComponentTree":70,"./ReactDOMContainerInfo":71,"./ReactDOMFeatureFlags":73,"./ReactFeatureFlags":93,"./ReactInstanceMap":98,"./ReactInstrumentation":99,"./ReactMarkupChecksum":101,"./ReactReconciler":109,"./ReactUpdateQueue":113,"./ReactUpdates":114,"./instantiateReactComponent":153,"./reactProdInvariant":157,"./setInnerHTML":159,"./shouldUpdateReactComponent":161,"fbjs/lib/emptyObject":14,"fbjs/lib/invariant":21,"fbjs/lib/warning":28,"react/lib/React":166,"react/lib/ReactCurrentOwner":171}],103:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -11851,7 +13245,7 @@ var ReactMultiChild = {
};
module.exports = ReactMultiChild;
-},{"./ReactChildReconciler":51,"./ReactComponentEnvironment":53,"./ReactInstanceMap":86,"./ReactInstrumentation":87,"./ReactReconciler":97,"./flattenChildren":129,"./reactProdInvariant":145,"fbjs/lib/emptyFunction":8,"fbjs/lib/invariant":16,"react/lib/ReactCurrentOwner":159}],92:[function(require,module,exports){
+},{"./ReactChildReconciler":63,"./ReactComponentEnvironment":65,"./ReactInstanceMap":98,"./ReactInstrumentation":99,"./ReactReconciler":109,"./flattenChildren":141,"./reactProdInvariant":157,"fbjs/lib/emptyFunction":13,"fbjs/lib/invariant":21,"react/lib/ReactCurrentOwner":171}],104:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -11891,7 +13285,7 @@ var ReactNodeTypes = {
};
module.exports = ReactNodeTypes;
-},{"./reactProdInvariant":145,"fbjs/lib/invariant":16,"react/lib/React":154}],93:[function(require,module,exports){
+},{"./reactProdInvariant":157,"fbjs/lib/invariant":21,"react/lib/React":166}],105:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -11985,7 +13379,7 @@ var ReactOwner = {
};
module.exports = ReactOwner;
-},{"./reactProdInvariant":145,"fbjs/lib/invariant":16}],94:[function(require,module,exports){
+},{"./reactProdInvariant":157,"fbjs/lib/invariant":21}],106:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -12010,7 +13404,7 @@ if ("production" !== 'production') {
}
module.exports = ReactPropTypeLocationNames;
-},{}],95:[function(require,module,exports){
+},{}],107:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -12027,7 +13421,7 @@ module.exports = ReactPropTypeLocationNames;
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
module.exports = ReactPropTypesSecret;
-},{}],96:[function(require,module,exports){
+},{}],108:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -12205,7 +13599,7 @@ _assign(ReactReconcileTransaction.prototype, Transaction, Mixin);
PooledClass.addPoolingTo(ReactReconcileTransaction);
module.exports = ReactReconcileTransaction;
-},{"./CallbackQueue":31,"./PooledClass":49,"./ReactBrowserEventEmitter":50,"./ReactInputSelection":85,"./ReactInstrumentation":87,"./ReactUpdateQueue":101,"./Transaction":120,"object-assign":24}],97:[function(require,module,exports){
+},{"./CallbackQueue":43,"./PooledClass":61,"./ReactBrowserEventEmitter":62,"./ReactInputSelection":97,"./ReactInstrumentation":99,"./ReactUpdateQueue":113,"./Transaction":132,"object-assign":29}],109:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -12373,7 +13767,7 @@ var ReactReconciler = {
};
module.exports = ReactReconciler;
-},{"./ReactInstrumentation":87,"./ReactRef":98,"fbjs/lib/warning":23}],98:[function(require,module,exports){
+},{"./ReactInstrumentation":99,"./ReactRef":110,"fbjs/lib/warning":28}],110:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -12462,7 +13856,7 @@ ReactRef.detachRefs = function (instance, element) {
};
module.exports = ReactRef;
-},{"./ReactOwner":93}],99:[function(require,module,exports){
+},{"./ReactOwner":105}],111:[function(require,module,exports){
/**
* Copyright 2014-present, Facebook, Inc.
* All rights reserved.
@@ -12552,7 +13946,7 @@ _assign(ReactServerRenderingTransaction.prototype, Transaction, Mixin);
PooledClass.addPoolingTo(ReactServerRenderingTransaction);
module.exports = ReactServerRenderingTransaction;
-},{"./PooledClass":49,"./ReactInstrumentation":87,"./ReactServerUpdateQueue":100,"./Transaction":120,"object-assign":24}],100:[function(require,module,exports){
+},{"./PooledClass":61,"./ReactInstrumentation":99,"./ReactServerUpdateQueue":112,"./Transaction":132,"object-assign":29}],112:[function(require,module,exports){
/**
* Copyright 2015-present, Facebook, Inc.
* All rights reserved.
@@ -12691,7 +14085,7 @@ var ReactServerUpdateQueue = function () {
}();
module.exports = ReactServerUpdateQueue;
-},{"./ReactUpdateQueue":101,"fbjs/lib/warning":23}],101:[function(require,module,exports){
+},{"./ReactUpdateQueue":113,"fbjs/lib/warning":28}],113:[function(require,module,exports){
/**
* Copyright 2015-present, Facebook, Inc.
* All rights reserved.
@@ -12917,7 +14311,7 @@ var ReactUpdateQueue = {
};
module.exports = ReactUpdateQueue;
-},{"./ReactInstanceMap":86,"./ReactInstrumentation":87,"./ReactUpdates":102,"./reactProdInvariant":145,"fbjs/lib/invariant":16,"fbjs/lib/warning":23,"react/lib/ReactCurrentOwner":159}],102:[function(require,module,exports){
+},{"./ReactInstanceMap":98,"./ReactInstrumentation":99,"./ReactUpdates":114,"./reactProdInvariant":157,"fbjs/lib/invariant":21,"fbjs/lib/warning":28,"react/lib/ReactCurrentOwner":171}],114:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -13168,7 +14562,7 @@ var ReactUpdates = {
};
module.exports = ReactUpdates;
-},{"./CallbackQueue":31,"./PooledClass":49,"./ReactFeatureFlags":81,"./ReactReconciler":97,"./Transaction":120,"./reactProdInvariant":145,"fbjs/lib/invariant":16,"object-assign":24}],103:[function(require,module,exports){
+},{"./CallbackQueue":43,"./PooledClass":61,"./ReactFeatureFlags":93,"./ReactReconciler":109,"./Transaction":132,"./reactProdInvariant":157,"fbjs/lib/invariant":21,"object-assign":29}],115:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -13182,7 +14576,7 @@ module.exports = ReactUpdates;
'use strict';
module.exports = '15.4.2';
-},{}],104:[function(require,module,exports){
+},{}],116:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -13484,7 +14878,7 @@ Object.keys(ATTRS).forEach(function (key) {
});
module.exports = SVGDOMPropertyConfig;
-},{}],105:[function(require,module,exports){
+},{}],117:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -13675,7 +15069,7 @@ var SelectEventPlugin = {
};
module.exports = SelectEventPlugin;
-},{"./EventPropagators":44,"./ReactDOMComponentTree":58,"./ReactInputSelection":85,"./SyntheticEvent":111,"./isTextInputElement":143,"fbjs/lib/ExecutionEnvironment":2,"fbjs/lib/getActiveElement":11,"fbjs/lib/shallowEqual":22}],106:[function(require,module,exports){
+},{"./EventPropagators":56,"./ReactDOMComponentTree":70,"./ReactInputSelection":97,"./SyntheticEvent":123,"./isTextInputElement":155,"fbjs/lib/ExecutionEnvironment":7,"fbjs/lib/getActiveElement":16,"fbjs/lib/shallowEqual":27}],118:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -13903,7 +15297,7 @@ var SimpleEventPlugin = {
};
module.exports = SimpleEventPlugin;
-},{"./EventPropagators":44,"./ReactDOMComponentTree":58,"./SyntheticAnimationEvent":107,"./SyntheticClipboardEvent":108,"./SyntheticDragEvent":110,"./SyntheticEvent":111,"./SyntheticFocusEvent":112,"./SyntheticKeyboardEvent":114,"./SyntheticMouseEvent":115,"./SyntheticTouchEvent":116,"./SyntheticTransitionEvent":117,"./SyntheticUIEvent":118,"./SyntheticWheelEvent":119,"./getEventCharCode":131,"./reactProdInvariant":145,"fbjs/lib/EventListener":1,"fbjs/lib/emptyFunction":8,"fbjs/lib/invariant":16}],107:[function(require,module,exports){
+},{"./EventPropagators":56,"./ReactDOMComponentTree":70,"./SyntheticAnimationEvent":119,"./SyntheticClipboardEvent":120,"./SyntheticDragEvent":122,"./SyntheticEvent":123,"./SyntheticFocusEvent":124,"./SyntheticKeyboardEvent":126,"./SyntheticMouseEvent":127,"./SyntheticTouchEvent":128,"./SyntheticTransitionEvent":129,"./SyntheticUIEvent":130,"./SyntheticWheelEvent":131,"./getEventCharCode":143,"./reactProdInvariant":157,"fbjs/lib/EventListener":6,"fbjs/lib/emptyFunction":13,"fbjs/lib/invariant":21}],119:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -13942,7 +15336,7 @@ function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, na
SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface);
module.exports = SyntheticAnimationEvent;
-},{"./SyntheticEvent":111}],108:[function(require,module,exports){
+},{"./SyntheticEvent":123}],120:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -13980,7 +15374,7 @@ function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, na
SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);
module.exports = SyntheticClipboardEvent;
-},{"./SyntheticEvent":111}],109:[function(require,module,exports){
+},{"./SyntheticEvent":123}],121:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -14016,7 +15410,7 @@ function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent,
SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface);
module.exports = SyntheticCompositionEvent;
-},{"./SyntheticEvent":111}],110:[function(require,module,exports){
+},{"./SyntheticEvent":123}],122:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -14052,7 +15446,7 @@ function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeE
SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface);
module.exports = SyntheticDragEvent;
-},{"./SyntheticMouseEvent":115}],111:[function(require,module,exports){
+},{"./SyntheticMouseEvent":127}],123:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -14320,7 +15714,7 @@ function getPooledWarningPropertyDefinition(propName, getVal) {
"production" !== 'production' ? warning(warningCondition, 'This synthetic event is reused for performance reasons. If you\'re seeing this, ' + 'you\'re %s `%s` on a released/nullified synthetic event. %s. ' + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
}
}
-},{"./PooledClass":49,"fbjs/lib/emptyFunction":8,"fbjs/lib/warning":23,"object-assign":24}],112:[function(require,module,exports){
+},{"./PooledClass":61,"fbjs/lib/emptyFunction":13,"fbjs/lib/warning":28,"object-assign":29}],124:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -14356,7 +15750,7 @@ function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, native
SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);
module.exports = SyntheticFocusEvent;
-},{"./SyntheticUIEvent":118}],113:[function(require,module,exports){
+},{"./SyntheticUIEvent":130}],125:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -14393,7 +15787,7 @@ function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, native
SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface);
module.exports = SyntheticInputEvent;
-},{"./SyntheticEvent":111}],114:[function(require,module,exports){
+},{"./SyntheticEvent":123}],126:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -14477,7 +15871,7 @@ function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nat
SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface);
module.exports = SyntheticKeyboardEvent;
-},{"./SyntheticUIEvent":118,"./getEventCharCode":131,"./getEventKey":132,"./getEventModifierState":133}],115:[function(require,module,exports){
+},{"./SyntheticUIEvent":130,"./getEventCharCode":143,"./getEventKey":144,"./getEventModifierState":145}],127:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -14549,7 +15943,7 @@ function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, native
SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);
module.exports = SyntheticMouseEvent;
-},{"./SyntheticUIEvent":118,"./ViewportMetrics":121,"./getEventModifierState":133}],116:[function(require,module,exports){
+},{"./SyntheticUIEvent":130,"./ViewportMetrics":133,"./getEventModifierState":145}],128:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -14594,7 +15988,7 @@ function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, native
SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);
module.exports = SyntheticTouchEvent;
-},{"./SyntheticUIEvent":118,"./getEventModifierState":133}],117:[function(require,module,exports){
+},{"./SyntheticUIEvent":130,"./getEventModifierState":145}],129:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -14633,7 +16027,7 @@ function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, n
SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface);
module.exports = SyntheticTransitionEvent;
-},{"./SyntheticEvent":111}],118:[function(require,module,exports){
+},{"./SyntheticEvent":123}],130:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -14692,7 +16086,7 @@ function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEve
SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface);
module.exports = SyntheticUIEvent;
-},{"./SyntheticEvent":111,"./getEventTarget":134}],119:[function(require,module,exports){
+},{"./SyntheticEvent":123,"./getEventTarget":146}],131:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -14746,7 +16140,7 @@ function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, native
SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface);
module.exports = SyntheticWheelEvent;
-},{"./SyntheticMouseEvent":115}],120:[function(require,module,exports){
+},{"./SyntheticMouseEvent":127}],132:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -14971,7 +16365,7 @@ var TransactionImpl = {
};
module.exports = TransactionImpl;
-},{"./reactProdInvariant":145,"fbjs/lib/invariant":16}],121:[function(require,module,exports){
+},{"./reactProdInvariant":157,"fbjs/lib/invariant":21}],133:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -14998,7 +16392,7 @@ var ViewportMetrics = {
};
module.exports = ViewportMetrics;
-},{}],122:[function(require,module,exports){
+},{}],134:[function(require,module,exports){
/**
* Copyright 2014-present, Facebook, Inc.
* All rights reserved.
@@ -15056,7 +16450,7 @@ function accumulateInto(current, next) {
}
module.exports = accumulateInto;
-},{"./reactProdInvariant":145,"fbjs/lib/invariant":16}],123:[function(require,module,exports){
+},{"./reactProdInvariant":157,"fbjs/lib/invariant":21}],135:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -15100,7 +16494,7 @@ function adler32(data) {
}
module.exports = adler32;
-},{}],124:[function(require,module,exports){
+},{}],136:[function(require,module,exports){
(function (process){
/**
* Copyright 2013-present, Facebook, Inc.
@@ -15189,7 +16583,7 @@ function checkReactTypeSpec(typeSpecs, values, location, componentName, element,
module.exports = checkReactTypeSpec;
}).call(this,require('_process'))
-},{"./ReactPropTypeLocationNames":94,"./ReactPropTypesSecret":95,"./reactProdInvariant":145,"_process":25,"fbjs/lib/invariant":16,"fbjs/lib/warning":23,"react/lib/ReactComponentTreeHook":158}],125:[function(require,module,exports){
+},{"./ReactPropTypeLocationNames":106,"./ReactPropTypesSecret":107,"./reactProdInvariant":157,"_process":30,"fbjs/lib/invariant":21,"fbjs/lib/warning":28,"react/lib/ReactComponentTreeHook":170}],137:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -15221,7 +16615,7 @@ var createMicrosoftUnsafeLocalFunction = function (func) {
};
module.exports = createMicrosoftUnsafeLocalFunction;
-},{}],126:[function(require,module,exports){
+},{}],138:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -15300,7 +16694,7 @@ function dangerousStyleValue(name, value, component) {
}
module.exports = dangerousStyleValue;
-},{"./CSSProperty":29,"fbjs/lib/warning":23}],127:[function(require,module,exports){
+},{"./CSSProperty":41,"fbjs/lib/warning":28}],139:[function(require,module,exports){
/**
* Copyright 2016-present, Facebook, Inc.
* All rights reserved.
@@ -15423,7 +16817,7 @@ function escapeTextContentForBrowser(text) {
}
module.exports = escapeTextContentForBrowser;
-},{}],128:[function(require,module,exports){
+},{}],140:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -15483,7 +16877,7 @@ function findDOMNode(componentOrElement) {
}
module.exports = findDOMNode;
-},{"./ReactDOMComponentTree":58,"./ReactInstanceMap":86,"./getHostComponentFromComposite":135,"./reactProdInvariant":145,"fbjs/lib/invariant":16,"fbjs/lib/warning":23,"react/lib/ReactCurrentOwner":159}],129:[function(require,module,exports){
+},{"./ReactDOMComponentTree":70,"./ReactInstanceMap":98,"./getHostComponentFromComposite":147,"./reactProdInvariant":157,"fbjs/lib/invariant":21,"fbjs/lib/warning":28,"react/lib/ReactCurrentOwner":171}],141:[function(require,module,exports){
(function (process){
/**
* Copyright 2013-present, Facebook, Inc.
@@ -15561,7 +16955,7 @@ function flattenChildren(children, selfDebugID) {
module.exports = flattenChildren;
}).call(this,require('_process'))
-},{"./KeyEscapeUtils":47,"./traverseAllChildren":150,"_process":25,"fbjs/lib/warning":23,"react/lib/ReactComponentTreeHook":158}],130:[function(require,module,exports){
+},{"./KeyEscapeUtils":59,"./traverseAllChildren":162,"_process":30,"fbjs/lib/warning":28,"react/lib/ReactComponentTreeHook":170}],142:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -15592,7 +16986,7 @@ function forEachAccumulated(arr, cb, scope) {
}
module.exports = forEachAccumulated;
-},{}],131:[function(require,module,exports){
+},{}],143:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -15642,7 +17036,7 @@ function getEventCharCode(nativeEvent) {
}
module.exports = getEventCharCode;
-},{}],132:[function(require,module,exports){
+},{}],144:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -15744,7 +17138,7 @@ function getEventKey(nativeEvent) {
}
module.exports = getEventKey;
-},{"./getEventCharCode":131}],133:[function(require,module,exports){
+},{"./getEventCharCode":143}],145:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -15787,7 +17181,7 @@ function getEventModifierState(nativeEvent) {
}
module.exports = getEventModifierState;
-},{}],134:[function(require,module,exports){
+},{}],146:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -15822,7 +17216,7 @@ function getEventTarget(nativeEvent) {
}
module.exports = getEventTarget;
-},{}],135:[function(require,module,exports){
+},{}],147:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -15852,7 +17246,7 @@ function getHostComponentFromComposite(inst) {
}
module.exports = getHostComponentFromComposite;
-},{"./ReactNodeTypes":92}],136:[function(require,module,exports){
+},{"./ReactNodeTypes":104}],148:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -15893,7 +17287,7 @@ function getIteratorFn(maybeIterable) {
}
module.exports = getIteratorFn;
-},{}],137:[function(require,module,exports){
+},{}],149:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -15914,7 +17308,7 @@ function getNextDebugID() {
}
module.exports = getNextDebugID;
-},{}],138:[function(require,module,exports){
+},{}],150:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -15988,7 +17382,7 @@ function getNodeForCharacterOffset(root, offset) {
}
module.exports = getNodeForCharacterOffset;
-},{}],139:[function(require,module,exports){
+},{}],151:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -16021,7 +17415,7 @@ function getTextContentAccessor() {
}
module.exports = getTextContentAccessor;
-},{"fbjs/lib/ExecutionEnvironment":2}],140:[function(require,module,exports){
+},{"fbjs/lib/ExecutionEnvironment":7}],152:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -16122,7 +17516,7 @@ function getVendorPrefixedEventName(eventName) {
}
module.exports = getVendorPrefixedEventName;
-},{"fbjs/lib/ExecutionEnvironment":2}],141:[function(require,module,exports){
+},{"fbjs/lib/ExecutionEnvironment":7}],153:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -16250,7 +17644,7 @@ function instantiateReactComponent(node, shouldHaveDebugID) {
}
module.exports = instantiateReactComponent;
-},{"./ReactCompositeComponent":54,"./ReactEmptyComponent":77,"./ReactHostComponent":82,"./getNextDebugID":137,"./reactProdInvariant":145,"fbjs/lib/invariant":16,"fbjs/lib/warning":23,"object-assign":24}],142:[function(require,module,exports){
+},{"./ReactCompositeComponent":66,"./ReactEmptyComponent":89,"./ReactHostComponent":94,"./getNextDebugID":149,"./reactProdInvariant":157,"fbjs/lib/invariant":21,"fbjs/lib/warning":28,"object-assign":29}],154:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -16310,7 +17704,7 @@ function isEventSupported(eventNameSuffix, capture) {
}
module.exports = isEventSupported;
-},{"fbjs/lib/ExecutionEnvironment":2}],143:[function(require,module,exports){
+},{"fbjs/lib/ExecutionEnvironment":7}],155:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -16361,7 +17755,7 @@ function isTextInputElement(elem) {
}
module.exports = isTextInputElement;
-},{}],144:[function(require,module,exports){
+},{}],156:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -16387,7 +17781,7 @@ function quoteAttributeValueForBrowser(value) {
}
module.exports = quoteAttributeValueForBrowser;
-},{"./escapeTextContentForBrowser":127}],145:[function(require,module,exports){
+},{"./escapeTextContentForBrowser":139}],157:[function(require,module,exports){
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
@@ -16426,7 +17820,7 @@ function reactProdInvariant(code) {
}
module.exports = reactProdInvariant;
-},{}],146:[function(require,module,exports){
+},{}],158:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -16442,7 +17836,7 @@ module.exports = reactProdInvariant;
var ReactMount = require('./ReactMount');
module.exports = ReactMount.renderSubtreeIntoContainer;
-},{"./ReactMount":90}],147:[function(require,module,exports){
+},{"./ReactMount":102}],159:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -16540,7 +17934,7 @@ if (ExecutionEnvironment.canUseDOM) {
}
module.exports = setInnerHTML;
-},{"./DOMNamespaces":35,"./createMicrosoftUnsafeLocalFunction":125,"fbjs/lib/ExecutionEnvironment":2}],148:[function(require,module,exports){
+},{"./DOMNamespaces":47,"./createMicrosoftUnsafeLocalFunction":137,"fbjs/lib/ExecutionEnvironment":7}],160:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -16592,7 +17986,7 @@ if (ExecutionEnvironment.canUseDOM) {
}
module.exports = setTextContent;
-},{"./escapeTextContentForBrowser":127,"./setInnerHTML":147,"fbjs/lib/ExecutionEnvironment":2}],149:[function(require,module,exports){
+},{"./escapeTextContentForBrowser":139,"./setInnerHTML":159,"fbjs/lib/ExecutionEnvironment":7}],161:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -16634,7 +18028,7 @@ function shouldUpdateReactComponent(prevElement, nextElement) {
}
module.exports = shouldUpdateReactComponent;
-},{}],150:[function(require,module,exports){
+},{}],162:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -16810,7 +18204,7 @@ function traverseAllChildren(children, callback, traverseContext) {
}
module.exports = traverseAllChildren;
-},{"./KeyEscapeUtils":47,"./ReactElementSymbol":76,"./getIteratorFn":136,"./reactProdInvariant":145,"fbjs/lib/invariant":16,"fbjs/lib/warning":23,"react/lib/ReactCurrentOwner":159}],151:[function(require,module,exports){
+},{"./KeyEscapeUtils":59,"./ReactElementSymbol":88,"./getIteratorFn":148,"./reactProdInvariant":157,"fbjs/lib/invariant":21,"fbjs/lib/warning":28,"react/lib/ReactCurrentOwner":171}],163:[function(require,module,exports){
/**
* Copyright 2015-present, Facebook, Inc.
* All rights reserved.
@@ -17192,11 +18586,11 @@ if ("production" !== 'production') {
}
module.exports = validateDOMNesting;
-},{"fbjs/lib/emptyFunction":8,"fbjs/lib/warning":23,"object-assign":24}],152:[function(require,module,exports){
-arguments[4][47][0].apply(exports,arguments)
-},{"dup":47}],153:[function(require,module,exports){
-arguments[4][49][0].apply(exports,arguments)
-},{"./reactProdInvariant":174,"dup":49,"fbjs/lib/invariant":16}],154:[function(require,module,exports){
+},{"fbjs/lib/emptyFunction":13,"fbjs/lib/warning":28,"object-assign":29}],164:[function(require,module,exports){
+arguments[4][59][0].apply(exports,arguments)
+},{"dup":59}],165:[function(require,module,exports){
+arguments[4][61][0].apply(exports,arguments)
+},{"./reactProdInvariant":186,"dup":61,"fbjs/lib/invariant":21}],166:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -17285,7 +18679,7 @@ var React = {
};
module.exports = React;
-},{"./ReactChildren":155,"./ReactClass":156,"./ReactComponent":157,"./ReactDOMFactories":160,"./ReactElement":161,"./ReactElementValidator":163,"./ReactPropTypes":166,"./ReactPureComponent":168,"./ReactVersion":169,"./onlyChild":173,"fbjs/lib/warning":23,"object-assign":24}],155:[function(require,module,exports){
+},{"./ReactChildren":167,"./ReactClass":168,"./ReactComponent":169,"./ReactDOMFactories":172,"./ReactElement":173,"./ReactElementValidator":175,"./ReactPropTypes":178,"./ReactPureComponent":180,"./ReactVersion":181,"./onlyChild":185,"fbjs/lib/warning":28,"object-assign":29}],167:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -17476,7 +18870,7 @@ var ReactChildren = {
};
module.exports = ReactChildren;
-},{"./PooledClass":153,"./ReactElement":161,"./traverseAllChildren":175,"fbjs/lib/emptyFunction":8}],156:[function(require,module,exports){
+},{"./PooledClass":165,"./ReactElement":173,"./traverseAllChildren":187,"fbjs/lib/emptyFunction":13}],168:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -18193,7 +19587,7 @@ var ReactClass = {
};
module.exports = ReactClass;
-},{"./ReactComponent":157,"./ReactElement":161,"./ReactNoopUpdateQueue":164,"./ReactPropTypeLocationNames":165,"./reactProdInvariant":174,"fbjs/lib/emptyObject":9,"fbjs/lib/invariant":16,"fbjs/lib/warning":23,"object-assign":24}],157:[function(require,module,exports){
+},{"./ReactComponent":169,"./ReactElement":173,"./ReactNoopUpdateQueue":176,"./ReactPropTypeLocationNames":177,"./reactProdInvariant":186,"fbjs/lib/emptyObject":14,"fbjs/lib/invariant":21,"fbjs/lib/warning":28,"object-assign":29}],169:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -18311,7 +19705,7 @@ if ("production" !== 'production') {
}
module.exports = ReactComponent;
-},{"./ReactNoopUpdateQueue":164,"./canDefineProperty":170,"./reactProdInvariant":174,"fbjs/lib/emptyObject":9,"fbjs/lib/invariant":16,"fbjs/lib/warning":23}],158:[function(require,module,exports){
+},{"./ReactNoopUpdateQueue":176,"./canDefineProperty":182,"./reactProdInvariant":186,"fbjs/lib/emptyObject":14,"fbjs/lib/invariant":21,"fbjs/lib/warning":28}],170:[function(require,module,exports){
/**
* Copyright 2016-present, Facebook, Inc.
* All rights reserved.
@@ -18645,7 +20039,7 @@ var ReactComponentTreeHook = {
};
module.exports = ReactComponentTreeHook;
-},{"./ReactCurrentOwner":159,"./reactProdInvariant":174,"fbjs/lib/invariant":16,"fbjs/lib/warning":23}],159:[function(require,module,exports){
+},{"./ReactCurrentOwner":171,"./reactProdInvariant":186,"fbjs/lib/invariant":21,"fbjs/lib/warning":28}],171:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -18676,7 +20070,7 @@ var ReactCurrentOwner = {
};
module.exports = ReactCurrentOwner;
-},{}],160:[function(require,module,exports){
+},{}],172:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -18846,7 +20240,7 @@ var ReactDOMFactories = {
};
module.exports = ReactDOMFactories;
-},{"./ReactElement":161,"./ReactElementValidator":163}],161:[function(require,module,exports){
+},{"./ReactElement":173,"./ReactElementValidator":175}],173:[function(require,module,exports){
/**
* Copyright 2014-present, Facebook, Inc.
* All rights reserved.
@@ -19187,9 +20581,9 @@ ReactElement.isValidElement = function (object) {
};
module.exports = ReactElement;
-},{"./ReactCurrentOwner":159,"./ReactElementSymbol":162,"./canDefineProperty":170,"fbjs/lib/warning":23,"object-assign":24}],162:[function(require,module,exports){
-arguments[4][76][0].apply(exports,arguments)
-},{"dup":76}],163:[function(require,module,exports){
+},{"./ReactCurrentOwner":171,"./ReactElementSymbol":174,"./canDefineProperty":182,"fbjs/lib/warning":28,"object-assign":29}],174:[function(require,module,exports){
+arguments[4][88][0].apply(exports,arguments)
+},{"dup":88}],175:[function(require,module,exports){
/**
* Copyright 2014-present, Facebook, Inc.
* All rights reserved.
@@ -19423,7 +20817,7 @@ var ReactElementValidator = {
};
module.exports = ReactElementValidator;
-},{"./ReactComponentTreeHook":158,"./ReactCurrentOwner":159,"./ReactElement":161,"./canDefineProperty":170,"./checkReactTypeSpec":171,"./getIteratorFn":172,"fbjs/lib/warning":23}],164:[function(require,module,exports){
+},{"./ReactComponentTreeHook":170,"./ReactCurrentOwner":171,"./ReactElement":173,"./canDefineProperty":182,"./checkReactTypeSpec":183,"./getIteratorFn":184,"fbjs/lib/warning":28}],176:[function(require,module,exports){
/**
* Copyright 2015-present, Facebook, Inc.
* All rights reserved.
@@ -19519,9 +20913,9 @@ var ReactNoopUpdateQueue = {
};
module.exports = ReactNoopUpdateQueue;
-},{"fbjs/lib/warning":23}],165:[function(require,module,exports){
-arguments[4][94][0].apply(exports,arguments)
-},{"dup":94}],166:[function(require,module,exports){
+},{"fbjs/lib/warning":28}],177:[function(require,module,exports){
+arguments[4][106][0].apply(exports,arguments)
+},{"dup":106}],178:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -19955,9 +21349,9 @@ function getClassName(propValue) {
}
module.exports = ReactPropTypes;
-},{"./ReactElement":161,"./ReactPropTypeLocationNames":165,"./ReactPropTypesSecret":167,"./getIteratorFn":172,"fbjs/lib/emptyFunction":8,"fbjs/lib/warning":23}],167:[function(require,module,exports){
-arguments[4][95][0].apply(exports,arguments)
-},{"dup":95}],168:[function(require,module,exports){
+},{"./ReactElement":173,"./ReactPropTypeLocationNames":177,"./ReactPropTypesSecret":179,"./getIteratorFn":184,"fbjs/lib/emptyFunction":13,"fbjs/lib/warning":28}],179:[function(require,module,exports){
+arguments[4][107][0].apply(exports,arguments)
+},{"dup":107}],180:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -19999,9 +21393,9 @@ _assign(ReactPureComponent.prototype, ReactComponent.prototype);
ReactPureComponent.prototype.isPureReactComponent = true;
module.exports = ReactPureComponent;
-},{"./ReactComponent":157,"./ReactNoopUpdateQueue":164,"fbjs/lib/emptyObject":9,"object-assign":24}],169:[function(require,module,exports){
-arguments[4][103][0].apply(exports,arguments)
-},{"dup":103}],170:[function(require,module,exports){
+},{"./ReactComponent":169,"./ReactNoopUpdateQueue":176,"fbjs/lib/emptyObject":14,"object-assign":29}],181:[function(require,module,exports){
+arguments[4][115][0].apply(exports,arguments)
+},{"dup":115}],182:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -20027,7 +21421,7 @@ if ("production" !== 'production') {
}
module.exports = canDefineProperty;
-},{}],171:[function(require,module,exports){
+},{}],183:[function(require,module,exports){
(function (process){
/**
* Copyright 2013-present, Facebook, Inc.
@@ -20116,9 +21510,9 @@ function checkReactTypeSpec(typeSpecs, values, location, componentName, element,
module.exports = checkReactTypeSpec;
}).call(this,require('_process'))
-},{"./ReactComponentTreeHook":158,"./ReactPropTypeLocationNames":165,"./ReactPropTypesSecret":167,"./reactProdInvariant":174,"_process":25,"fbjs/lib/invariant":16,"fbjs/lib/warning":23}],172:[function(require,module,exports){
-arguments[4][136][0].apply(exports,arguments)
-},{"dup":136}],173:[function(require,module,exports){
+},{"./ReactComponentTreeHook":170,"./ReactPropTypeLocationNames":177,"./ReactPropTypesSecret":179,"./reactProdInvariant":186,"_process":30,"fbjs/lib/invariant":21,"fbjs/lib/warning":28}],184:[function(require,module,exports){
+arguments[4][148][0].apply(exports,arguments)
+},{"dup":148}],185:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -20156,9 +21550,9 @@ function onlyChild(children) {
}
module.exports = onlyChild;
-},{"./ReactElement":161,"./reactProdInvariant":174,"fbjs/lib/invariant":16}],174:[function(require,module,exports){
-arguments[4][145][0].apply(exports,arguments)
-},{"dup":145}],175:[function(require,module,exports){
+},{"./ReactElement":173,"./reactProdInvariant":186,"fbjs/lib/invariant":21}],186:[function(require,module,exports){
+arguments[4][157][0].apply(exports,arguments)
+},{"dup":157}],187:[function(require,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
@@ -20334,7 +21728,7 @@ function traverseAllChildren(children, callback, traverseContext) {
}
module.exports = traverseAllChildren;
-},{"./KeyEscapeUtils":152,"./ReactCurrentOwner":159,"./ReactElementSymbol":162,"./getIteratorFn":172,"./reactProdInvariant":174,"fbjs/lib/invariant":16,"fbjs/lib/warning":23}],"classnames":[function(require,module,exports){
+},{"./KeyEscapeUtils":164,"./ReactCurrentOwner":171,"./ReactElementSymbol":174,"./getIteratorFn":184,"./reactProdInvariant":186,"fbjs/lib/invariant":21,"fbjs/lib/warning":28}],"classnames":[function(require,module,exports){
/*!
Copyright (c) 2016 Jed Watson.
Licensed under the MIT License (MIT), see
@@ -20384,35 +21778,101 @@ module.exports = traverseAllChildren;
}
}());
-},{}],"react-dom":[function(require,module,exports){
+},{}],"create-react-class":[function(require,module,exports){
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+'use strict';
+
+var React = require('react');
+var factory = require('./factory');
+
+// Hack to grab NoopUpdateQueue from isomorphic React
+var ReactNoopUpdateQueue = new React.Component().updater;
+
+module.exports = factory(
+ React.Component,
+ React.isValidElement,
+ ReactNoopUpdateQueue
+);
+
+},{"./factory":1,"react":"react"}],"prop-types":[function(require,module,exports){
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ */
+
+if ("production" !== 'production') {
+ var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
+ Symbol.for &&
+ Symbol.for('react.element')) ||
+ 0xeac7;
+
+ var isValidElement = function(object) {
+ return typeof object === 'object' &&
+ object !== null &&
+ object.$$typeof === REACT_ELEMENT_TYPE;
+ };
+
+ // By explicitly using `prop-types` you are opting into new development behavior.
+ // http://fb.me/prop-types-in-prod
+ var throwOnDirectAccess = true;
+ module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);
+} else {
+ // By explicitly using `prop-types` you are opting into new production behavior.
+ // http://fb.me/prop-types-in-prod
+ module.exports = require('./factoryWithThrowingShims')();
+}
+
+},{"./factoryWithThrowingShims":32,"./factoryWithTypeCheckers":33}],"react-dom":[function(require,module,exports){
'use strict';
module.exports = require('./lib/ReactDOM');
-},{"./lib/ReactDOM":55}],"react-input-autosize":[function(require,module,exports){
+},{"./lib/ReactDOM":67}],"react-input-autosize":[function(require,module,exports){
'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var React = require('react');
+var PropTypes = require('prop-types');
+var createClass = require('create-react-class');
+
+var sizerStyle = {
+ position: 'absolute',
+ top: 0,
+ left: 0,
+ visibility: 'hidden',
+ height: 0,
+ overflow: 'scroll',
+ whiteSpace: 'pre'
+};
-var sizerStyle = { position: 'absolute', top: 0, left: 0, visibility: 'hidden', height: 0, overflow: 'scroll', whiteSpace: 'pre' };
-
-var AutosizeInput = React.createClass({
- displayName: 'AutosizeInput',
-
+var AutosizeInput = createClass({
propTypes: {
- className: React.PropTypes.string, // className for the outer element
- defaultValue: React.PropTypes.any, // default field value
- inputClassName: React.PropTypes.string, // className for the input element
- inputStyle: React.PropTypes.object, // css styles for the input element
- minWidth: React.PropTypes.oneOfType([// minimum width for input element
- React.PropTypes.number, React.PropTypes.string]),
- onChange: React.PropTypes.func, // onChange handler: function(newValue) {}
- placeholder: React.PropTypes.string, // placeholder text
- placeholderIsMinWidth: React.PropTypes.bool, // don't collapse size to less than the placeholder
- style: React.PropTypes.object, // css styles for the outer element
- value: React.PropTypes.any },
+ className: PropTypes.string, // className for the outer element
+ defaultValue: PropTypes.any, // default field value
+ inputClassName: PropTypes.string, // className for the input element
+ inputStyle: PropTypes.object, // css styles for the input element
+ minWidth: PropTypes.oneOfType([// minimum width for input element
+ PropTypes.number, PropTypes.string]),
+ onAutosize: PropTypes.func, // onAutosize handler: function(newWidth) {}
+ onChange: PropTypes.func, // onChange handler: function(newValue) {}
+ placeholder: PropTypes.string, // placeholder text
+ placeholderIsMinWidth: PropTypes.bool, // don't collapse size to less than the placeholder
+ style: PropTypes.object, // css styles for the outer element
+ value: PropTypes.any },
// field value
getDefaultProps: function getDefaultProps() {
return {
@@ -20425,44 +21885,64 @@ var AutosizeInput = React.createClass({
};
},
componentDidMount: function componentDidMount() {
+ this.mounted = true;
this.copyInputStyles();
this.updateInputWidth();
},
- componentDidUpdate: function componentDidUpdate() {
+ componentDidUpdate: function componentDidUpdate(prevProps, prevState) {
+ if (prevState.inputWidth !== this.state.inputWidth) {
+ if (typeof this.props.onAutosize === 'function') {
+ this.props.onAutosize(this.state.inputWidth);
+ }
+ }
this.updateInputWidth();
},
+ componentWillUnmount: function componentWillUnmount() {
+ this.mounted = false;
+ },
+ inputRef: function inputRef(el) {
+ this.input = el;
+ },
+ placeHolderSizerRef: function placeHolderSizerRef(el) {
+ this.placeHolderSizer = el;
+ },
+ sizerRef: function sizerRef(el) {
+ this.sizer = el;
+ },
copyInputStyles: function copyInputStyles() {
- if (!this.isMounted() || !window.getComputedStyle) {
+ if (this.mounted || !window.getComputedStyle) {
return;
}
- var inputStyle = window.getComputedStyle(this.refs.input);
+ var inputStyle = this.input && window.getComputedStyle(this.input);
if (!inputStyle) {
return;
}
- var widthNode = this.refs.sizer;
+ var widthNode = this.sizer;
widthNode.style.fontSize = inputStyle.fontSize;
widthNode.style.fontFamily = inputStyle.fontFamily;
widthNode.style.fontWeight = inputStyle.fontWeight;
widthNode.style.fontStyle = inputStyle.fontStyle;
widthNode.style.letterSpacing = inputStyle.letterSpacing;
+ widthNode.style.textTransform = inputStyle.textTransform;
if (this.props.placeholder) {
- var placeholderNode = this.refs.placeholderSizer;
+ var placeholderNode = this.placeHolderSizer;
placeholderNode.style.fontSize = inputStyle.fontSize;
placeholderNode.style.fontFamily = inputStyle.fontFamily;
placeholderNode.style.fontWeight = inputStyle.fontWeight;
placeholderNode.style.fontStyle = inputStyle.fontStyle;
placeholderNode.style.letterSpacing = inputStyle.letterSpacing;
+ placeholderNode.style.textTransform = inputStyle.textTransform;
}
},
updateInputWidth: function updateInputWidth() {
- if (!this.isMounted() || typeof this.refs.sizer.scrollWidth === 'undefined') {
+ if (!this.mounted || !this.sizer || typeof this.sizer.scrollWidth === 'undefined') {
return;
}
var newInputWidth = undefined;
if (this.props.placeholder && (!this.props.value || this.props.value && this.props.placeholderIsMinWidth)) {
- newInputWidth = Math.max(this.refs.sizer.scrollWidth, this.refs.placeholderSizer.scrollWidth) + 2;
+ newInputWidth = Math.max(this.sizer.scrollWidth, this.placeHolderSizer.scrollWidth) + 2;
} else {
- newInputWidth = this.refs.sizer.scrollWidth + 2;
+ newInputWidth = this.sizer.scrollWidth + 2;
}
if (newInputWidth < this.props.minWidth) {
newInputWidth = this.props.minWidth;
@@ -20474,19 +21954,25 @@ var AutosizeInput = React.createClass({
}
},
getInput: function getInput() {
- return this.refs.input;
+ return this.input;
},
focus: function focus() {
- this.refs.input.focus();
+ this.input.focus();
},
blur: function blur() {
- this.refs.input.blur();
+ this.input.blur();
},
select: function select() {
- this.refs.input.select();
+ this.input.select();
},
render: function render() {
- var sizerValue = this.props.defaultValue || this.props.value || '';
+ var sizerValue = [this.props.defaultValue, this.props.value, ''].reduce(function (previousValue, currentValue) {
+ if (previousValue !== null && previousValue !== undefined) {
+ return previousValue;
+ }
+ return currentValue;
+ });
+
var wrapperStyle = this.props.style || {};
if (!wrapperStyle.display) wrapperStyle.display = 'inline-block';
var inputStyle = _extends({}, this.props.inputStyle);
@@ -20499,19 +21985,20 @@ var AutosizeInput = React.createClass({
delete inputProps.inputClassName;
delete inputProps.inputStyle;
delete inputProps.minWidth;
+ delete inputProps.onAutosize;
delete inputProps.placeholderIsMinWidth;
return React.createElement(
'div',
{ className: this.props.className, style: wrapperStyle },
- React.createElement('input', _extends({}, inputProps, { ref: 'input' })),
+ React.createElement('input', _extends({}, inputProps, { ref: this.inputRef })),
React.createElement(
'div',
- { ref: 'sizer', style: sizerStyle },
+ { ref: this.sizerRef, style: sizerStyle },
sizerValue
),
this.props.placeholder ? React.createElement(
'div',
- { ref: 'placeholderSizer', style: sizerStyle },
+ { ref: this.placeHolderSizerRef, style: sizerStyle },
this.props.placeholder
) : null
);
@@ -20519,9 +22006,9 @@ var AutosizeInput = React.createClass({
});
module.exports = AutosizeInput;
-},{"react":"react"}],"react":[function(require,module,exports){
+},{"create-react-class":"create-react-class","prop-types":"prop-types","react":"react"}],"react":[function(require,module,exports){
'use strict';
module.exports = require('./lib/React');
-},{"./lib/React":154}]},{},[]);
+},{"./lib/React":166}]},{},[]);
diff --git a/examples/dist/standalone.js b/examples/dist/standalone.js
index caad9d23f4..a5ad82f310 100644
--- a/examples/dist/standalone.js
+++ b/examples/dist/standalone.js
@@ -24,6 +24,10 @@ var _react = (typeof window !== "undefined" ? window['React'] : typeof global !=
var _react2 = _interopRequireDefault(_react);
+var _propTypes = require('prop-types');
+
+var _propTypes2 = _interopRequireDefault(_propTypes);
+
var _Select = require('./Select');
var _Select2 = _interopRequireDefault(_Select);
@@ -33,24 +37,25 @@ var _utilsStripDiacritics = require('./utils/stripDiacritics');
var _utilsStripDiacritics2 = _interopRequireDefault(_utilsStripDiacritics);
var propTypes = {
- autoload: _react2['default'].PropTypes.bool.isRequired, // automatically call the `loadOptions` prop on-mount; defaults to true
- cache: _react2['default'].PropTypes.any, // object to use to cache results; set to null/false to disable caching
- children: _react2['default'].PropTypes.func.isRequired, // Child function responsible for creating the inner Select component; (props: Object): PropTypes.element
- ignoreAccents: _react2['default'].PropTypes.bool, // strip diacritics when filtering; defaults to true
- ignoreCase: _react2['default'].PropTypes.bool, // perform case-insensitive filtering; defaults to true
- loadingPlaceholder: _react2['default'].PropTypes.oneOfType([// replaces the placeholder while options are loading
- _react2['default'].PropTypes.string, _react2['default'].PropTypes.node]),
- loadOptions: _react2['default'].PropTypes.func.isRequired, // callback to load options asynchronously; (inputValue: string, callback: Function): ?Promise
- options: _react.PropTypes.array.isRequired, // array of options
- placeholder: _react2['default'].PropTypes.oneOfType([// field placeholder, displayed when there's no value (shared with Select)
- _react2['default'].PropTypes.string, _react2['default'].PropTypes.node]),
- noResultsText: _react2['default'].PropTypes.oneOfType([// field noResultsText, displayed when no options come back from the server
- _react2['default'].PropTypes.string, _react2['default'].PropTypes.node]),
- onChange: _react2['default'].PropTypes.func, // onChange handler: function (newValue) {}
- searchPromptText: _react2['default'].PropTypes.oneOfType([// label to prompt for search input
- _react2['default'].PropTypes.string, _react2['default'].PropTypes.node]),
- onInputChange: _react2['default'].PropTypes.func, // optional for keeping track of what is being typed
- value: _react2['default'].PropTypes.any };
+ autoload: _propTypes2['default'].bool.isRequired, // automatically call the `loadOptions` prop on-mount; defaults to true
+ cache: _propTypes2['default'].any, // object to use to cache results; set to null/false to disable caching
+ children: _propTypes2['default'].func.isRequired, // Child function responsible for creating the inner Select component; (props: Object): PropTypes.element
+ ignoreAccents: _propTypes2['default'].bool, // strip diacritics when filtering; defaults to true
+ ignoreCase: _propTypes2['default'].bool, // perform case-insensitive filtering; defaults to true
+ loadingPlaceholder: _propTypes2['default'].oneOfType([// replaces the placeholder while options are loading
+ _propTypes2['default'].string, _propTypes2['default'].node]),
+ loadOptions: _propTypes2['default'].func.isRequired, // callback to load options asynchronously; (inputValue: string, callback: Function): ?Promise
+ multi: _propTypes2['default'].bool, // multi-value input
+ options: _propTypes2['default'].array.isRequired, // array of options
+ placeholder: _propTypes2['default'].oneOfType([// field placeholder, displayed when there's no value (shared with Select)
+ _propTypes2['default'].string, _propTypes2['default'].node]),
+ noResultsText: _propTypes2['default'].oneOfType([// field noResultsText, displayed when no options come back from the server
+ _propTypes2['default'].string, _propTypes2['default'].node]),
+ onChange: _propTypes2['default'].func, // onChange handler: function (newValue) {}
+ searchPromptText: _propTypes2['default'].oneOfType([// label to prompt for search input
+ _propTypes2['default'].string, _propTypes2['default'].node]),
+ onInputChange: _propTypes2['default'].func, // optional for keeping track of what is being typed
+ value: _propTypes2['default'].any };
// initial field value
var defaultCache = {};
@@ -263,11 +268,11 @@ Async.defaultProps = defaultProps;
function defaultChildren(props) {
return _react2['default'].createElement(_Select2['default'], props);
-};
+}
module.exports = exports['default'];
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./Select":5,"./utils/stripDiacritics":11}],2:[function(require,module,exports){
+},{"./Select":5,"./utils/stripDiacritics":11,"prop-types":undefined}],2:[function(require,module,exports){
(function (global){
'use strict';
@@ -279,6 +284,10 @@ var _react = (typeof window !== "undefined" ? window['React'] : typeof global !=
var _react2 = _interopRequireDefault(_react);
+var _createReactClass = require('create-react-class');
+
+var _createReactClass2 = _interopRequireDefault(_createReactClass);
+
var _Select = require('./Select');
var _Select2 = _interopRequireDefault(_Select);
@@ -293,9 +302,13 @@ function reduce(obj) {
}, props);
}
-var AsyncCreatable = _react2['default'].createClass({
+var AsyncCreatable = (0, _createReactClass2['default'])({
displayName: 'AsyncCreatableSelect',
+ focus: function focus() {
+ this.select.focus();
+ },
+
render: function render() {
var _this = this;
@@ -313,6 +326,7 @@ var AsyncCreatable = _react2['default'].createClass({
return asyncProps.onInputChange(input);
},
ref: function (ref) {
+ _this.select = ref;
creatableProps.ref(ref);
asyncProps.ref(ref);
}
@@ -327,7 +341,7 @@ var AsyncCreatable = _react2['default'].createClass({
module.exports = AsyncCreatable;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./Select":5}],3:[function(require,module,exports){
+},{"./Select":5,"create-react-class":undefined}],3:[function(require,module,exports){
(function (global){
'use strict';
@@ -341,6 +355,14 @@ var _react = (typeof window !== "undefined" ? window['React'] : typeof global !=
var _react2 = _interopRequireDefault(_react);
+var _createReactClass = require('create-react-class');
+
+var _createReactClass2 = _interopRequireDefault(_createReactClass);
+
+var _propTypes = require('prop-types');
+
+var _propTypes2 = _interopRequireDefault(_propTypes);
+
var _Select = require('./Select');
var _Select2 = _interopRequireDefault(_Select);
@@ -353,52 +375,52 @@ var _utilsDefaultMenuRenderer = require('./utils/defaultMenuRenderer');
var _utilsDefaultMenuRenderer2 = _interopRequireDefault(_utilsDefaultMenuRenderer);
-var Creatable = _react2['default'].createClass({
+var Creatable = (0, _createReactClass2['default'])({
displayName: 'CreatableSelect',
propTypes: {
// Child function responsible for creating the inner Select component
// This component can be used to compose HOCs (eg Creatable and Async)
// (props: Object): PropTypes.element
- children: _react2['default'].PropTypes.func,
+ children: _propTypes2['default'].func,
// See Select.propTypes.filterOptions
- filterOptions: _react2['default'].PropTypes.any,
+ filterOptions: _propTypes2['default'].any,
// Searches for any matching option within the set of options.
// This function prevents duplicate options from being created.
// ({ option: Object, options: Array, labelKey: string, valueKey: string }): boolean
- isOptionUnique: _react2['default'].PropTypes.func,
+ isOptionUnique: _propTypes2['default'].func,
// Determines if the current input text represents a valid option.
// ({ label: string }): boolean
- isValidNewOption: _react2['default'].PropTypes.func,
+ isValidNewOption: _propTypes2['default'].func,
// See Select.propTypes.menuRenderer
- menuRenderer: _react2['default'].PropTypes.any,
+ menuRenderer: _propTypes2['default'].any,
// Factory to create new option.
// ({ label: string, labelKey: string, valueKey: string }): Object
- newOptionCreator: _react2['default'].PropTypes.func,
+ newOptionCreator: _propTypes2['default'].func,
// input change handler: function (inputValue) {}
- onInputChange: _react2['default'].PropTypes.func,
+ onInputChange: _propTypes2['default'].func,
// input keyDown handler: function (event) {}
- onInputKeyDown: _react2['default'].PropTypes.func,
+ onInputKeyDown: _propTypes2['default'].func,
// new option click handler: function (option) {}
- onNewOptionClick: _react2['default'].PropTypes.func,
+ onNewOptionClick: _propTypes2['default'].func,
// See Select.propTypes.options
- options: _react2['default'].PropTypes.array,
+ options: _propTypes2['default'].array,
// Creates prompt/placeholder option text.
// (filterText: string): string
- promptTextCreator: _react2['default'].PropTypes.func,
+ promptTextCreator: _propTypes2['default'].func,
// Decides if a keyDown event (eg its `keyCode`) should result in the creation of a new option.
- shouldKeyDownEventCreateNewOption: _react2['default'].PropTypes.func
+ shouldKeyDownEventCreateNewOption: _propTypes2['default'].func
},
// Default prop methods
@@ -554,6 +576,10 @@ var Creatable = _react2['default'].createClass({
}
},
+ focus: function focus() {
+ this.select.focus();
+ },
+
render: function render() {
var _this = this;
@@ -647,7 +673,7 @@ function shouldKeyDownEventCreateNewOption(_ref6) {
module.exports = Creatable;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./Select":5,"./utils/defaultFilterOptions":9,"./utils/defaultMenuRenderer":10}],4:[function(require,module,exports){
+},{"./Select":5,"./utils/defaultFilterOptions":9,"./utils/defaultMenuRenderer":10,"create-react-class":undefined,"prop-types":undefined}],4:[function(require,module,exports){
(function (global){
'use strict';
@@ -657,25 +683,31 @@ var _react = (typeof window !== "undefined" ? window['React'] : typeof global !=
var _react2 = _interopRequireDefault(_react);
+var _createReactClass = require('create-react-class');
+
+var _createReactClass2 = _interopRequireDefault(_createReactClass);
+
+var _propTypes = require('prop-types');
+
+var _propTypes2 = _interopRequireDefault(_propTypes);
+
var _classnames = (typeof window !== "undefined" ? window['classNames'] : typeof global !== "undefined" ? global['classNames'] : null);
var _classnames2 = _interopRequireDefault(_classnames);
-var Option = _react2['default'].createClass({
- displayName: 'Option',
-
+var Option = (0, _createReactClass2['default'])({
propTypes: {
- children: _react2['default'].PropTypes.node,
- className: _react2['default'].PropTypes.string, // className (based on mouse position)
- instancePrefix: _react2['default'].PropTypes.string.isRequired, // unique prefix for the ids (used for aria)
- isDisabled: _react2['default'].PropTypes.bool, // the option is disabled
- isFocused: _react2['default'].PropTypes.bool, // the option is focused
- isSelected: _react2['default'].PropTypes.bool, // the option is selected
- onFocus: _react2['default'].PropTypes.func, // method to handle mouseEnter on option element
- onSelect: _react2['default'].PropTypes.func, // method to handle click on option element
- onUnfocus: _react2['default'].PropTypes.func, // method to handle mouseLeave on option element
- option: _react2['default'].PropTypes.object.isRequired, // object that is base for that option
- optionIndex: _react2['default'].PropTypes.number },
+ children: _propTypes2['default'].node,
+ className: _propTypes2['default'].string, // className (based on mouse position)
+ instancePrefix: _propTypes2['default'].string.isRequired, // unique prefix for the ids (used for aria)
+ isDisabled: _propTypes2['default'].bool, // the option is disabled
+ isFocused: _propTypes2['default'].bool, // the option is focused
+ isSelected: _propTypes2['default'].bool, // the option is selected
+ onFocus: _propTypes2['default'].func, // method to handle mouseEnter on option element
+ onSelect: _propTypes2['default'].func, // method to handle click on option element
+ onUnfocus: _propTypes2['default'].func, // method to handle mouseLeave on option element
+ option: _propTypes2['default'].object.isRequired, // object that is base for that option
+ optionIndex: _propTypes2['default'].number },
// index of the option, used to generate unique ids for aria
blockEvent: function blockEvent(event) {
event.preventDefault();
@@ -762,7 +794,7 @@ var Option = _react2['default'].createClass({
module.exports = Option;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{}],5:[function(require,module,exports){
+},{"create-react-class":undefined,"prop-types":undefined}],5:[function(require,module,exports){
(function (global){
/*!
Copyright (c) 2016 Jed Watson.
@@ -788,6 +820,14 @@ var _react = (typeof window !== "undefined" ? window['React'] : typeof global !=
var _react2 = _interopRequireDefault(_react);
+var _createReactClass = require('create-react-class');
+
+var _createReactClass2 = _interopRequireDefault(_createReactClass);
+
+var _propTypes = require('prop-types');
+
+var _propTypes2 = _interopRequireDefault(_propTypes);
+
var _reactDom = (typeof window !== "undefined" ? window['ReactDOM'] : typeof global !== "undefined" ? global['ReactDOM'] : null);
var _reactDom2 = _interopRequireDefault(_reactDom);
@@ -849,84 +889,85 @@ function stringifyValue(value) {
}
}
-var stringOrNode = _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.node]);
+var stringOrNode = _propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].node]);
var instanceId = 1;
-var Select = _react2['default'].createClass({
+var Select = (0, _createReactClass2['default'])({
displayName: 'Select',
propTypes: {
- addLabelText: _react2['default'].PropTypes.string, // placeholder displayed when you want to add a label on a multi-value input
- 'aria-label': _react2['default'].PropTypes.string, // Aria label (for assistive tech)
- 'aria-labelledby': _react2['default'].PropTypes.string, // HTML ID of an element that should be used as the label (for assistive tech)
- arrowRenderer: _react2['default'].PropTypes.func, // Create drop-down caret element
- autoBlur: _react2['default'].PropTypes.bool, // automatically blur the component when an option is selected
- autofocus: _react2['default'].PropTypes.bool, // autofocus the component on mount
- autosize: _react2['default'].PropTypes.bool, // whether to enable autosizing or not
- backspaceRemoves: _react2['default'].PropTypes.bool, // whether backspace removes an item if there is no text input
- backspaceToRemoveMessage: _react2['default'].PropTypes.string, // Message to use for screenreaders to press backspace to remove the current item - {label} is replaced with the item label
- className: _react2['default'].PropTypes.string, // className for the outer element
+ addLabelText: _propTypes2['default'].string, // placeholder displayed when you want to add a label on a multi-value input
+ 'aria-describedby': _propTypes2['default'].string, // HTML ID(s) of element(s) that should be used to describe this input (for assistive tech)
+ 'aria-label': _propTypes2['default'].string, // Aria label (for assistive tech)
+ 'aria-labelledby': _propTypes2['default'].string, // HTML ID of an element that should be used as the label (for assistive tech)
+ arrowRenderer: _propTypes2['default'].func, // Create drop-down caret element
+ autoBlur: _propTypes2['default'].bool, // automatically blur the component when an option is selected
+ autofocus: _propTypes2['default'].bool, // autofocus the component on mount
+ autosize: _propTypes2['default'].bool, // whether to enable autosizing or not
+ backspaceRemoves: _propTypes2['default'].bool, // whether backspace removes an item if there is no text input
+ backspaceToRemoveMessage: _propTypes2['default'].string, // Message to use for screenreaders to press backspace to remove the current item - {label} is replaced with the item label
+ className: _propTypes2['default'].string, // className for the outer element
clearAllText: stringOrNode, // title for the "clear" control when multi: true
- clearRenderer: _react2['default'].PropTypes.func, // create clearable x element
+ clearRenderer: _propTypes2['default'].func, // create clearable x element
clearValueText: stringOrNode, // title for the "clear" control
- clearable: _react2['default'].PropTypes.bool, // should it be possible to reset value
- deleteRemoves: _react2['default'].PropTypes.bool, // whether backspace removes an item if there is no text input
- delimiter: _react2['default'].PropTypes.string, // delimiter to use to join multiple values for the hidden field value
- disabled: _react2['default'].PropTypes.bool, // whether the Select is disabled or not
- escapeClearsValue: _react2['default'].PropTypes.bool, // whether escape clears the value when the menu is closed
- filterOption: _react2['default'].PropTypes.func, // method to filter a single option (option, filterString)
- filterOptions: _react2['default'].PropTypes.any, // boolean to enable default filtering or function to filter the options array ([options], filterString, [values])
- ignoreAccents: _react2['default'].PropTypes.bool, // whether to strip diacritics when filtering
- ignoreCase: _react2['default'].PropTypes.bool, // whether to perform case-insensitive filtering
- inputProps: _react2['default'].PropTypes.object, // custom attributes for the Input
- inputRenderer: _react2['default'].PropTypes.func, // returns a custom input component
- instanceId: _react2['default'].PropTypes.string, // set the components instanceId
- isLoading: _react2['default'].PropTypes.bool, // whether the Select is loading externally or not (such as options being loaded)
- joinValues: _react2['default'].PropTypes.bool, // joins multiple values into a single form field with the delimiter (legacy mode)
- labelKey: _react2['default'].PropTypes.string, // path of the label value in option objects
- matchPos: _react2['default'].PropTypes.string, // (any|start) match the start or entire string when filtering
- matchProp: _react2['default'].PropTypes.string, // (any|label|value) which option property to filter on
- menuBuffer: _react2['default'].PropTypes.number, // optional buffer (in px) between the bottom of the viewport and the bottom of the menu
- menuContainerStyle: _react2['default'].PropTypes.object, // optional style to apply to the menu container
- menuRenderer: _react2['default'].PropTypes.func, // renders a custom menu with options
- menuStyle: _react2['default'].PropTypes.object, // optional style to apply to the menu
- multi: _react2['default'].PropTypes.bool, // multi-value input
- name: _react2['default'].PropTypes.string, // generates a hidden tag with this field name for html forms
+ clearable: _propTypes2['default'].bool, // should it be possible to reset value
+ deleteRemoves: _propTypes2['default'].bool, // whether backspace removes an item if there is no text input
+ delimiter: _propTypes2['default'].string, // delimiter to use to join multiple values for the hidden field value
+ disabled: _propTypes2['default'].bool, // whether the Select is disabled or not
+ escapeClearsValue: _propTypes2['default'].bool, // whether escape clears the value when the menu is closed
+ filterOption: _propTypes2['default'].func, // method to filter a single option (option, filterString)
+ filterOptions: _propTypes2['default'].any, // boolean to enable default filtering or function to filter the options array ([options], filterString, [values])
+ ignoreAccents: _propTypes2['default'].bool, // whether to strip diacritics when filtering
+ ignoreCase: _propTypes2['default'].bool, // whether to perform case-insensitive filtering
+ inputProps: _propTypes2['default'].object, // custom attributes for the Input
+ inputRenderer: _propTypes2['default'].func, // returns a custom input component
+ instanceId: _propTypes2['default'].string, // set the components instanceId
+ isLoading: _propTypes2['default'].bool, // whether the Select is loading externally or not (such as options being loaded)
+ joinValues: _propTypes2['default'].bool, // joins multiple values into a single form field with the delimiter (legacy mode)
+ labelKey: _propTypes2['default'].string, // path of the label value in option objects
+ matchPos: _propTypes2['default'].string, // (any|start) match the start or entire string when filtering
+ matchProp: _propTypes2['default'].string, // (any|label|value) which option property to filter on
+ menuBuffer: _propTypes2['default'].number, // optional buffer (in px) between the bottom of the viewport and the bottom of the menu
+ menuContainerStyle: _propTypes2['default'].object, // optional style to apply to the menu container
+ menuRenderer: _propTypes2['default'].func, // renders a custom menu with options
+ menuStyle: _propTypes2['default'].object, // optional style to apply to the menu
+ multi: _propTypes2['default'].bool, // multi-value input
+ name: _propTypes2['default'].string, // generates a hidden tag with this field name for html forms
noResultsText: stringOrNode, // placeholder displayed when there are no matching search results
- onBlur: _react2['default'].PropTypes.func, // onBlur handler: function (event) {}
- onBlurResetsInput: _react2['default'].PropTypes.bool, // whether input is cleared on blur
- onChange: _react2['default'].PropTypes.func, // onChange handler: function (newValue) {}
- onClose: _react2['default'].PropTypes.func, // fires when the menu is closed
- onCloseResetsInput: _react2['default'].PropTypes.bool, // whether input is cleared when menu is closed through the arrow
- onFocus: _react2['default'].PropTypes.func, // onFocus handler: function (event) {}
- onInputChange: _react2['default'].PropTypes.func, // onInputChange handler: function (inputValue) {}
- onInputKeyDown: _react2['default'].PropTypes.func, // input keyDown handler: function (event) {}
- onMenuScrollToBottom: _react2['default'].PropTypes.func, // fires when the menu is scrolled to the bottom; can be used to paginate options
- onOpen: _react2['default'].PropTypes.func, // fires when the menu is opened
- onValueClick: _react2['default'].PropTypes.func, // onClick handler for value labels: function (value, event) {}
- openAfterFocus: _react2['default'].PropTypes.bool, // boolean to enable opening dropdown when focused
- openOnFocus: _react2['default'].PropTypes.bool, // always open options menu on focus
- optionClassName: _react2['default'].PropTypes.string, // additional class(es) to apply to the elements
- optionComponent: _react2['default'].PropTypes.func, // option component to render in dropdown
- optionRenderer: _react2['default'].PropTypes.func, // optionRenderer: function (option) {}
- options: _react2['default'].PropTypes.array, // array of options
- pageSize: _react2['default'].PropTypes.number, // number of entries to page when using page up/down keys
+ onBlur: _propTypes2['default'].func, // onBlur handler: function (event) {}
+ onBlurResetsInput: _propTypes2['default'].bool, // whether input is cleared on blur
+ onChange: _propTypes2['default'].func, // onChange handler: function (newValue) {}
+ onClose: _propTypes2['default'].func, // fires when the menu is closed
+ onCloseResetsInput: _propTypes2['default'].bool, // whether input is cleared when menu is closed through the arrow
+ onFocus: _propTypes2['default'].func, // onFocus handler: function (event) {}
+ onInputChange: _propTypes2['default'].func, // onInputChange handler: function (inputValue) {}
+ onInputKeyDown: _propTypes2['default'].func, // input keyDown handler: function (event) {}
+ onMenuScrollToBottom: _propTypes2['default'].func, // fires when the menu is scrolled to the bottom; can be used to paginate options
+ onOpen: _propTypes2['default'].func, // fires when the menu is opened
+ onValueClick: _propTypes2['default'].func, // onClick handler for value labels: function (value, event) {}
+ openAfterFocus: _propTypes2['default'].bool, // boolean to enable opening dropdown when focused
+ openOnFocus: _propTypes2['default'].bool, // always open options menu on focus
+ optionClassName: _propTypes2['default'].string, // additional class(es) to apply to the elements
+ optionComponent: _propTypes2['default'].func, // option component to render in dropdown
+ optionRenderer: _propTypes2['default'].func, // optionRenderer: function (option) {}
+ options: _propTypes2['default'].array, // array of options
+ pageSize: _propTypes2['default'].number, // number of entries to page when using page up/down keys
placeholder: stringOrNode, // field placeholder, displayed when there's no value
- required: _react2['default'].PropTypes.bool, // applies HTML5 required attribute when needed
- resetValue: _react2['default'].PropTypes.any, // value to use when you clear the control
- scrollMenuIntoView: _react2['default'].PropTypes.bool, // boolean to enable the viewport to shift so that the full menu fully visible when engaged
- searchable: _react2['default'].PropTypes.bool, // whether to enable searching feature or not
- simpleValue: _react2['default'].PropTypes.bool, // pass the value to onChange as a simple value (legacy pre 1.0 mode), defaults to false
- style: _react2['default'].PropTypes.object, // optional style to apply to the control
- tabIndex: _react2['default'].PropTypes.string, // optional tab index of the control
- tabSelectsValue: _react2['default'].PropTypes.bool, // whether to treat tabbing out while focused to be value selection
- value: _react2['default'].PropTypes.any, // initial field value
- valueComponent: _react2['default'].PropTypes.func, // value component to render
- valueKey: _react2['default'].PropTypes.string, // path of the label value in option objects
- valueRenderer: _react2['default'].PropTypes.func, // valueRenderer: function (option) {}
- wrapperStyle: _react2['default'].PropTypes.object },
+ required: _propTypes2['default'].bool, // applies HTML5 required attribute when needed
+ resetValue: _propTypes2['default'].any, // value to use when you clear the control
+ scrollMenuIntoView: _propTypes2['default'].bool, // boolean to enable the viewport to shift so that the full menu fully visible when engaged
+ searchable: _propTypes2['default'].bool, // whether to enable searching feature or not
+ simpleValue: _propTypes2['default'].bool, // pass the value to onChange as a simple value (legacy pre 1.0 mode), defaults to false
+ style: _propTypes2['default'].object, // optional style to apply to the control
+ tabIndex: _propTypes2['default'].string, // optional tab index of the control
+ tabSelectsValue: _propTypes2['default'].bool, // whether to treat tabbing out while focused to be value selection
+ value: _propTypes2['default'].any, // initial field value
+ valueComponent: _propTypes2['default'].func, // value component to render
+ valueKey: _propTypes2['default'].string, // path of the label value in option objects
+ valueRenderer: _propTypes2['default'].func, // valueRenderer: function (option) {}
+ wrapperStyle: _propTypes2['default'].object },
// optional style to apply to the component wrapper
statics: { Async: _Async2['default'], AsyncCreatable: _AsyncCreatable2['default'], Creatable: _Creatable2['default'] },
@@ -961,7 +1002,6 @@ var Select = _react2['default'].createClass({
noResultsText: 'No results found',
onBlurResetsInput: true,
onCloseResetsInput: true,
- openAfterFocus: false,
optionComponent: _Option2['default'],
pageSize: 5,
placeholder: 'Select...',
@@ -1087,12 +1127,6 @@ var Select = _react2['default'].createClass({
focus: function focus() {
if (!this.input) return;
this.input.focus();
-
- if (this.props.openAfterFocus) {
- this.setState({
- isOpen: true
- });
- }
},
blurInput: function blurInput() {
@@ -1706,6 +1740,7 @@ var Select = _react2['default'].createClass({
'aria-owns': ariaOwns,
'aria-haspopup': '' + isOpen,
'aria-activedescendant': isOpen ? this._instancePrefix + '-option-' + focusedOptionIndex : this._instancePrefix + '-value',
+ 'aria-describedby': this.props['aria-describedby'],
'aria-labelledby': this.props['aria-labelledby'],
'aria-label': this.props['aria-label'],
className: className,
@@ -1877,7 +1912,14 @@ var Select = _react2['default'].createClass({
var focusedOption = this.state.focusedOption || selectedOption;
if (focusedOption && !focusedOption.disabled) {
- var focusedOptionIndex = options.indexOf(focusedOption);
+ var focusedOptionIndex = -1;
+ options.some(function (option, index) {
+ var isOptionEqual = option.value === focusedOption.value;
+ if (isOptionEqual) {
+ focusedOptionIndex = index;
+ }
+ return isOptionEqual;
+ });
if (focusedOptionIndex !== -1) {
return focusedOptionIndex;
}
@@ -1933,6 +1975,7 @@ var Select = _react2['default'].createClass({
var className = (0, _classnames2['default'])('Select', this.props.className, {
'Select--multi': this.props.multi,
'Select--single': !this.props.multi,
+ 'is-clearable': this.props.clearable,
'is-disabled': this.props.disabled,
'is-focused': this.state.isFocused,
'is-loading': this.props.isLoading,
@@ -1993,7 +2036,7 @@ exports['default'] = Select;
module.exports = exports['default'];
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./Async":1,"./AsyncCreatable":2,"./Creatable":3,"./Option":4,"./Value":6,"./utils/defaultArrowRenderer":7,"./utils/defaultClearRenderer":8,"./utils/defaultFilterOptions":9,"./utils/defaultMenuRenderer":10}],6:[function(require,module,exports){
+},{"./Async":1,"./AsyncCreatable":2,"./Creatable":3,"./Option":4,"./Value":6,"./utils/defaultArrowRenderer":7,"./utils/defaultClearRenderer":8,"./utils/defaultFilterOptions":9,"./utils/defaultMenuRenderer":10,"create-react-class":undefined,"prop-types":undefined}],6:[function(require,module,exports){
(function (global){
'use strict';
@@ -2003,21 +2046,29 @@ var _react = (typeof window !== "undefined" ? window['React'] : typeof global !=
var _react2 = _interopRequireDefault(_react);
+var _createReactClass = require('create-react-class');
+
+var _createReactClass2 = _interopRequireDefault(_createReactClass);
+
+var _propTypes = require('prop-types');
+
+var _propTypes2 = _interopRequireDefault(_propTypes);
+
var _classnames = (typeof window !== "undefined" ? window['classNames'] : typeof global !== "undefined" ? global['classNames'] : null);
var _classnames2 = _interopRequireDefault(_classnames);
-var Value = _react2['default'].createClass({
+var Value = (0, _createReactClass2['default'])({
displayName: 'Value',
propTypes: {
- children: _react2['default'].PropTypes.node,
- disabled: _react2['default'].PropTypes.bool, // disabled prop passed to ReactSelect
- id: _react2['default'].PropTypes.string, // Unique id for the value - used for aria
- onClick: _react2['default'].PropTypes.func, // method to handle click on value label
- onRemove: _react2['default'].PropTypes.func, // method to handle removal of the value
- value: _react2['default'].PropTypes.object.isRequired },
+ children: _propTypes2['default'].node,
+ disabled: _propTypes2['default'].bool, // disabled prop passed to ReactSelect
+ id: _propTypes2['default'].string, // Unique id for the value - used for aria
+ onClick: _propTypes2['default'].func, // method to handle click on value label
+ onRemove: _propTypes2['default'].func, // method to handle removal of the value
+ value: _propTypes2['default'].object.isRequired },
// the option object for this value
handleMouseDown: function handleMouseDown(event) {
@@ -2103,7 +2154,7 @@ var Value = _react2['default'].createClass({
module.exports = Value;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{}],7:[function(require,module,exports){
+},{"create-react-class":undefined,"prop-types":undefined}],7:[function(require,module,exports){
(function (global){
"use strict";
diff --git a/lib/Async.js b/lib/Async.js
index bcc34b5197..fa1e208c21 100644
--- a/lib/Async.js
+++ b/lib/Async.js
@@ -22,6 +22,10 @@ var _react = require('react');
var _react2 = _interopRequireDefault(_react);
+var _propTypes = require('prop-types');
+
+var _propTypes2 = _interopRequireDefault(_propTypes);
+
var _Select = require('./Select');
var _Select2 = _interopRequireDefault(_Select);
@@ -31,24 +35,25 @@ var _utilsStripDiacritics = require('./utils/stripDiacritics');
var _utilsStripDiacritics2 = _interopRequireDefault(_utilsStripDiacritics);
var propTypes = {
- autoload: _react2['default'].PropTypes.bool.isRequired, // automatically call the `loadOptions` prop on-mount; defaults to true
- cache: _react2['default'].PropTypes.any, // object to use to cache results; set to null/false to disable caching
- children: _react2['default'].PropTypes.func.isRequired, // Child function responsible for creating the inner Select component; (props: Object): PropTypes.element
- ignoreAccents: _react2['default'].PropTypes.bool, // strip diacritics when filtering; defaults to true
- ignoreCase: _react2['default'].PropTypes.bool, // perform case-insensitive filtering; defaults to true
- loadingPlaceholder: _react2['default'].PropTypes.oneOfType([// replaces the placeholder while options are loading
- _react2['default'].PropTypes.string, _react2['default'].PropTypes.node]),
- loadOptions: _react2['default'].PropTypes.func.isRequired, // callback to load options asynchronously; (inputValue: string, callback: Function): ?Promise
- options: _react.PropTypes.array.isRequired, // array of options
- placeholder: _react2['default'].PropTypes.oneOfType([// field placeholder, displayed when there's no value (shared with Select)
- _react2['default'].PropTypes.string, _react2['default'].PropTypes.node]),
- noResultsText: _react2['default'].PropTypes.oneOfType([// field noResultsText, displayed when no options come back from the server
- _react2['default'].PropTypes.string, _react2['default'].PropTypes.node]),
- onChange: _react2['default'].PropTypes.func, // onChange handler: function (newValue) {}
- searchPromptText: _react2['default'].PropTypes.oneOfType([// label to prompt for search input
- _react2['default'].PropTypes.string, _react2['default'].PropTypes.node]),
- onInputChange: _react2['default'].PropTypes.func, // optional for keeping track of what is being typed
- value: _react2['default'].PropTypes.any };
+ autoload: _propTypes2['default'].bool.isRequired, // automatically call the `loadOptions` prop on-mount; defaults to true
+ cache: _propTypes2['default'].any, // object to use to cache results; set to null/false to disable caching
+ children: _propTypes2['default'].func.isRequired, // Child function responsible for creating the inner Select component; (props: Object): PropTypes.element
+ ignoreAccents: _propTypes2['default'].bool, // strip diacritics when filtering; defaults to true
+ ignoreCase: _propTypes2['default'].bool, // perform case-insensitive filtering; defaults to true
+ loadingPlaceholder: _propTypes2['default'].oneOfType([// replaces the placeholder while options are loading
+ _propTypes2['default'].string, _propTypes2['default'].node]),
+ loadOptions: _propTypes2['default'].func.isRequired, // callback to load options asynchronously; (inputValue: string, callback: Function): ?Promise
+ multi: _propTypes2['default'].bool, // multi-value input
+ options: _propTypes2['default'].array.isRequired, // array of options
+ placeholder: _propTypes2['default'].oneOfType([// field placeholder, displayed when there's no value (shared with Select)
+ _propTypes2['default'].string, _propTypes2['default'].node]),
+ noResultsText: _propTypes2['default'].oneOfType([// field noResultsText, displayed when no options come back from the server
+ _propTypes2['default'].string, _propTypes2['default'].node]),
+ onChange: _propTypes2['default'].func, // onChange handler: function (newValue) {}
+ searchPromptText: _propTypes2['default'].oneOfType([// label to prompt for search input
+ _propTypes2['default'].string, _propTypes2['default'].node]),
+ onInputChange: _propTypes2['default'].func, // optional for keeping track of what is being typed
+ value: _propTypes2['default'].any };
// initial field value
var defaultCache = {};
@@ -261,5 +266,5 @@ Async.defaultProps = defaultProps;
function defaultChildren(props) {
return _react2['default'].createElement(_Select2['default'], props);
-};
+}
module.exports = exports['default'];
\ No newline at end of file
diff --git a/lib/AsyncCreatable.js b/lib/AsyncCreatable.js
index 18491df46a..ca31aa7a08 100644
--- a/lib/AsyncCreatable.js
+++ b/lib/AsyncCreatable.js
@@ -8,6 +8,10 @@ var _react = require('react');
var _react2 = _interopRequireDefault(_react);
+var _createReactClass = require('create-react-class');
+
+var _createReactClass2 = _interopRequireDefault(_createReactClass);
+
var _Select = require('./Select');
var _Select2 = _interopRequireDefault(_Select);
@@ -22,9 +26,13 @@ function reduce(obj) {
}, props);
}
-var AsyncCreatable = _react2['default'].createClass({
+var AsyncCreatable = (0, _createReactClass2['default'])({
displayName: 'AsyncCreatableSelect',
+ focus: function focus() {
+ this.select.focus();
+ },
+
render: function render() {
var _this = this;
@@ -42,6 +50,7 @@ var AsyncCreatable = _react2['default'].createClass({
return asyncProps.onInputChange(input);
},
ref: function (ref) {
+ _this.select = ref;
creatableProps.ref(ref);
asyncProps.ref(ref);
}
diff --git a/lib/Creatable.js b/lib/Creatable.js
index b5d0101115..be584fe684 100644
--- a/lib/Creatable.js
+++ b/lib/Creatable.js
@@ -10,6 +10,14 @@ var _react = require('react');
var _react2 = _interopRequireDefault(_react);
+var _createReactClass = require('create-react-class');
+
+var _createReactClass2 = _interopRequireDefault(_createReactClass);
+
+var _propTypes = require('prop-types');
+
+var _propTypes2 = _interopRequireDefault(_propTypes);
+
var _Select = require('./Select');
var _Select2 = _interopRequireDefault(_Select);
@@ -22,52 +30,52 @@ var _utilsDefaultMenuRenderer = require('./utils/defaultMenuRenderer');
var _utilsDefaultMenuRenderer2 = _interopRequireDefault(_utilsDefaultMenuRenderer);
-var Creatable = _react2['default'].createClass({
+var Creatable = (0, _createReactClass2['default'])({
displayName: 'CreatableSelect',
propTypes: {
// Child function responsible for creating the inner Select component
// This component can be used to compose HOCs (eg Creatable and Async)
// (props: Object): PropTypes.element
- children: _react2['default'].PropTypes.func,
+ children: _propTypes2['default'].func,
// See Select.propTypes.filterOptions
- filterOptions: _react2['default'].PropTypes.any,
+ filterOptions: _propTypes2['default'].any,
// Searches for any matching option within the set of options.
// This function prevents duplicate options from being created.
// ({ option: Object, options: Array, labelKey: string, valueKey: string }): boolean
- isOptionUnique: _react2['default'].PropTypes.func,
+ isOptionUnique: _propTypes2['default'].func,
// Determines if the current input text represents a valid option.
// ({ label: string }): boolean
- isValidNewOption: _react2['default'].PropTypes.func,
+ isValidNewOption: _propTypes2['default'].func,
// See Select.propTypes.menuRenderer
- menuRenderer: _react2['default'].PropTypes.any,
+ menuRenderer: _propTypes2['default'].any,
// Factory to create new option.
// ({ label: string, labelKey: string, valueKey: string }): Object
- newOptionCreator: _react2['default'].PropTypes.func,
+ newOptionCreator: _propTypes2['default'].func,
// input change handler: function (inputValue) {}
- onInputChange: _react2['default'].PropTypes.func,
+ onInputChange: _propTypes2['default'].func,
// input keyDown handler: function (event) {}
- onInputKeyDown: _react2['default'].PropTypes.func,
+ onInputKeyDown: _propTypes2['default'].func,
// new option click handler: function (option) {}
- onNewOptionClick: _react2['default'].PropTypes.func,
+ onNewOptionClick: _propTypes2['default'].func,
// See Select.propTypes.options
- options: _react2['default'].PropTypes.array,
+ options: _propTypes2['default'].array,
// Creates prompt/placeholder option text.
// (filterText: string): string
- promptTextCreator: _react2['default'].PropTypes.func,
+ promptTextCreator: _propTypes2['default'].func,
// Decides if a keyDown event (eg its `keyCode`) should result in the creation of a new option.
- shouldKeyDownEventCreateNewOption: _react2['default'].PropTypes.func
+ shouldKeyDownEventCreateNewOption: _propTypes2['default'].func
},
// Default prop methods
@@ -223,6 +231,10 @@ var Creatable = _react2['default'].createClass({
}
},
+ focus: function focus() {
+ this.select.focus();
+ },
+
render: function render() {
var _this = this;
diff --git a/lib/Option.js b/lib/Option.js
index 5c8334ed7c..7fa96950ea 100644
--- a/lib/Option.js
+++ b/lib/Option.js
@@ -6,25 +6,31 @@ var _react = require('react');
var _react2 = _interopRequireDefault(_react);
+var _createReactClass = require('create-react-class');
+
+var _createReactClass2 = _interopRequireDefault(_createReactClass);
+
+var _propTypes = require('prop-types');
+
+var _propTypes2 = _interopRequireDefault(_propTypes);
+
var _classnames = require('classnames');
var _classnames2 = _interopRequireDefault(_classnames);
-var Option = _react2['default'].createClass({
- displayName: 'Option',
-
+var Option = (0, _createReactClass2['default'])({
propTypes: {
- children: _react2['default'].PropTypes.node,
- className: _react2['default'].PropTypes.string, // className (based on mouse position)
- instancePrefix: _react2['default'].PropTypes.string.isRequired, // unique prefix for the ids (used for aria)
- isDisabled: _react2['default'].PropTypes.bool, // the option is disabled
- isFocused: _react2['default'].PropTypes.bool, // the option is focused
- isSelected: _react2['default'].PropTypes.bool, // the option is selected
- onFocus: _react2['default'].PropTypes.func, // method to handle mouseEnter on option element
- onSelect: _react2['default'].PropTypes.func, // method to handle click on option element
- onUnfocus: _react2['default'].PropTypes.func, // method to handle mouseLeave on option element
- option: _react2['default'].PropTypes.object.isRequired, // object that is base for that option
- optionIndex: _react2['default'].PropTypes.number },
+ children: _propTypes2['default'].node,
+ className: _propTypes2['default'].string, // className (based on mouse position)
+ instancePrefix: _propTypes2['default'].string.isRequired, // unique prefix for the ids (used for aria)
+ isDisabled: _propTypes2['default'].bool, // the option is disabled
+ isFocused: _propTypes2['default'].bool, // the option is focused
+ isSelected: _propTypes2['default'].bool, // the option is selected
+ onFocus: _propTypes2['default'].func, // method to handle mouseEnter on option element
+ onSelect: _propTypes2['default'].func, // method to handle click on option element
+ onUnfocus: _propTypes2['default'].func, // method to handle mouseLeave on option element
+ option: _propTypes2['default'].object.isRequired, // object that is base for that option
+ optionIndex: _propTypes2['default'].number },
// index of the option, used to generate unique ids for aria
blockEvent: function blockEvent(event) {
event.preventDefault();
diff --git a/lib/Select.js b/lib/Select.js
index f3fb8bb8c8..ea34e932ea 100644
--- a/lib/Select.js
+++ b/lib/Select.js
@@ -22,6 +22,14 @@ var _react = require('react');
var _react2 = _interopRequireDefault(_react);
+var _createReactClass = require('create-react-class');
+
+var _createReactClass2 = _interopRequireDefault(_createReactClass);
+
+var _propTypes = require('prop-types');
+
+var _propTypes2 = _interopRequireDefault(_propTypes);
+
var _reactDom = require('react-dom');
var _reactDom2 = _interopRequireDefault(_reactDom);
@@ -83,84 +91,85 @@ function stringifyValue(value) {
}
}
-var stringOrNode = _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.node]);
+var stringOrNode = _propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].node]);
var instanceId = 1;
-var Select = _react2['default'].createClass({
+var Select = (0, _createReactClass2['default'])({
displayName: 'Select',
propTypes: {
- addLabelText: _react2['default'].PropTypes.string, // placeholder displayed when you want to add a label on a multi-value input
- 'aria-label': _react2['default'].PropTypes.string, // Aria label (for assistive tech)
- 'aria-labelledby': _react2['default'].PropTypes.string, // HTML ID of an element that should be used as the label (for assistive tech)
- arrowRenderer: _react2['default'].PropTypes.func, // Create drop-down caret element
- autoBlur: _react2['default'].PropTypes.bool, // automatically blur the component when an option is selected
- autofocus: _react2['default'].PropTypes.bool, // autofocus the component on mount
- autosize: _react2['default'].PropTypes.bool, // whether to enable autosizing or not
- backspaceRemoves: _react2['default'].PropTypes.bool, // whether backspace removes an item if there is no text input
- backspaceToRemoveMessage: _react2['default'].PropTypes.string, // Message to use for screenreaders to press backspace to remove the current item - {label} is replaced with the item label
- className: _react2['default'].PropTypes.string, // className for the outer element
+ addLabelText: _propTypes2['default'].string, // placeholder displayed when you want to add a label on a multi-value input
+ 'aria-describedby': _propTypes2['default'].string, // HTML ID(s) of element(s) that should be used to describe this input (for assistive tech)
+ 'aria-label': _propTypes2['default'].string, // Aria label (for assistive tech)
+ 'aria-labelledby': _propTypes2['default'].string, // HTML ID of an element that should be used as the label (for assistive tech)
+ arrowRenderer: _propTypes2['default'].func, // Create drop-down caret element
+ autoBlur: _propTypes2['default'].bool, // automatically blur the component when an option is selected
+ autofocus: _propTypes2['default'].bool, // autofocus the component on mount
+ autosize: _propTypes2['default'].bool, // whether to enable autosizing or not
+ backspaceRemoves: _propTypes2['default'].bool, // whether backspace removes an item if there is no text input
+ backspaceToRemoveMessage: _propTypes2['default'].string, // Message to use for screenreaders to press backspace to remove the current item - {label} is replaced with the item label
+ className: _propTypes2['default'].string, // className for the outer element
clearAllText: stringOrNode, // title for the "clear" control when multi: true
- clearRenderer: _react2['default'].PropTypes.func, // create clearable x element
+ clearRenderer: _propTypes2['default'].func, // create clearable x element
clearValueText: stringOrNode, // title for the "clear" control
- clearable: _react2['default'].PropTypes.bool, // should it be possible to reset value
- deleteRemoves: _react2['default'].PropTypes.bool, // whether backspace removes an item if there is no text input
- delimiter: _react2['default'].PropTypes.string, // delimiter to use to join multiple values for the hidden field value
- disabled: _react2['default'].PropTypes.bool, // whether the Select is disabled or not
- escapeClearsValue: _react2['default'].PropTypes.bool, // whether escape clears the value when the menu is closed
- filterOption: _react2['default'].PropTypes.func, // method to filter a single option (option, filterString)
- filterOptions: _react2['default'].PropTypes.any, // boolean to enable default filtering or function to filter the options array ([options], filterString, [values])
- ignoreAccents: _react2['default'].PropTypes.bool, // whether to strip diacritics when filtering
- ignoreCase: _react2['default'].PropTypes.bool, // whether to perform case-insensitive filtering
- inputProps: _react2['default'].PropTypes.object, // custom attributes for the Input
- inputRenderer: _react2['default'].PropTypes.func, // returns a custom input component
- instanceId: _react2['default'].PropTypes.string, // set the components instanceId
- isLoading: _react2['default'].PropTypes.bool, // whether the Select is loading externally or not (such as options being loaded)
- joinValues: _react2['default'].PropTypes.bool, // joins multiple values into a single form field with the delimiter (legacy mode)
- labelKey: _react2['default'].PropTypes.string, // path of the label value in option objects
- matchPos: _react2['default'].PropTypes.string, // (any|start) match the start or entire string when filtering
- matchProp: _react2['default'].PropTypes.string, // (any|label|value) which option property to filter on
- menuBuffer: _react2['default'].PropTypes.number, // optional buffer (in px) between the bottom of the viewport and the bottom of the menu
- menuContainerStyle: _react2['default'].PropTypes.object, // optional style to apply to the menu container
- menuRenderer: _react2['default'].PropTypes.func, // renders a custom menu with options
- menuStyle: _react2['default'].PropTypes.object, // optional style to apply to the menu
- multi: _react2['default'].PropTypes.bool, // multi-value input
- name: _react2['default'].PropTypes.string, // generates a hidden tag with this field name for html forms
+ clearable: _propTypes2['default'].bool, // should it be possible to reset value
+ deleteRemoves: _propTypes2['default'].bool, // whether backspace removes an item if there is no text input
+ delimiter: _propTypes2['default'].string, // delimiter to use to join multiple values for the hidden field value
+ disabled: _propTypes2['default'].bool, // whether the Select is disabled or not
+ escapeClearsValue: _propTypes2['default'].bool, // whether escape clears the value when the menu is closed
+ filterOption: _propTypes2['default'].func, // method to filter a single option (option, filterString)
+ filterOptions: _propTypes2['default'].any, // boolean to enable default filtering or function to filter the options array ([options], filterString, [values])
+ ignoreAccents: _propTypes2['default'].bool, // whether to strip diacritics when filtering
+ ignoreCase: _propTypes2['default'].bool, // whether to perform case-insensitive filtering
+ inputProps: _propTypes2['default'].object, // custom attributes for the Input
+ inputRenderer: _propTypes2['default'].func, // returns a custom input component
+ instanceId: _propTypes2['default'].string, // set the components instanceId
+ isLoading: _propTypes2['default'].bool, // whether the Select is loading externally or not (such as options being loaded)
+ joinValues: _propTypes2['default'].bool, // joins multiple values into a single form field with the delimiter (legacy mode)
+ labelKey: _propTypes2['default'].string, // path of the label value in option objects
+ matchPos: _propTypes2['default'].string, // (any|start) match the start or entire string when filtering
+ matchProp: _propTypes2['default'].string, // (any|label|value) which option property to filter on
+ menuBuffer: _propTypes2['default'].number, // optional buffer (in px) between the bottom of the viewport and the bottom of the menu
+ menuContainerStyle: _propTypes2['default'].object, // optional style to apply to the menu container
+ menuRenderer: _propTypes2['default'].func, // renders a custom menu with options
+ menuStyle: _propTypes2['default'].object, // optional style to apply to the menu
+ multi: _propTypes2['default'].bool, // multi-value input
+ name: _propTypes2['default'].string, // generates a hidden tag with this field name for html forms
noResultsText: stringOrNode, // placeholder displayed when there are no matching search results
- onBlur: _react2['default'].PropTypes.func, // onBlur handler: function (event) {}
- onBlurResetsInput: _react2['default'].PropTypes.bool, // whether input is cleared on blur
- onChange: _react2['default'].PropTypes.func, // onChange handler: function (newValue) {}
- onClose: _react2['default'].PropTypes.func, // fires when the menu is closed
- onCloseResetsInput: _react2['default'].PropTypes.bool, // whether input is cleared when menu is closed through the arrow
- onFocus: _react2['default'].PropTypes.func, // onFocus handler: function (event) {}
- onInputChange: _react2['default'].PropTypes.func, // onInputChange handler: function (inputValue) {}
- onInputKeyDown: _react2['default'].PropTypes.func, // input keyDown handler: function (event) {}
- onMenuScrollToBottom: _react2['default'].PropTypes.func, // fires when the menu is scrolled to the bottom; can be used to paginate options
- onOpen: _react2['default'].PropTypes.func, // fires when the menu is opened
- onValueClick: _react2['default'].PropTypes.func, // onClick handler for value labels: function (value, event) {}
- openAfterFocus: _react2['default'].PropTypes.bool, // boolean to enable opening dropdown when focused
- openOnFocus: _react2['default'].PropTypes.bool, // always open options menu on focus
- optionClassName: _react2['default'].PropTypes.string, // additional class(es) to apply to the elements
- optionComponent: _react2['default'].PropTypes.func, // option component to render in dropdown
- optionRenderer: _react2['default'].PropTypes.func, // optionRenderer: function (option) {}
- options: _react2['default'].PropTypes.array, // array of options
- pageSize: _react2['default'].PropTypes.number, // number of entries to page when using page up/down keys
+ onBlur: _propTypes2['default'].func, // onBlur handler: function (event) {}
+ onBlurResetsInput: _propTypes2['default'].bool, // whether input is cleared on blur
+ onChange: _propTypes2['default'].func, // onChange handler: function (newValue) {}
+ onClose: _propTypes2['default'].func, // fires when the menu is closed
+ onCloseResetsInput: _propTypes2['default'].bool, // whether input is cleared when menu is closed through the arrow
+ onFocus: _propTypes2['default'].func, // onFocus handler: function (event) {}
+ onInputChange: _propTypes2['default'].func, // onInputChange handler: function (inputValue) {}
+ onInputKeyDown: _propTypes2['default'].func, // input keyDown handler: function (event) {}
+ onMenuScrollToBottom: _propTypes2['default'].func, // fires when the menu is scrolled to the bottom; can be used to paginate options
+ onOpen: _propTypes2['default'].func, // fires when the menu is opened
+ onValueClick: _propTypes2['default'].func, // onClick handler for value labels: function (value, event) {}
+ openAfterFocus: _propTypes2['default'].bool, // boolean to enable opening dropdown when focused
+ openOnFocus: _propTypes2['default'].bool, // always open options menu on focus
+ optionClassName: _propTypes2['default'].string, // additional class(es) to apply to the elements
+ optionComponent: _propTypes2['default'].func, // option component to render in dropdown
+ optionRenderer: _propTypes2['default'].func, // optionRenderer: function (option) {}
+ options: _propTypes2['default'].array, // array of options
+ pageSize: _propTypes2['default'].number, // number of entries to page when using page up/down keys
placeholder: stringOrNode, // field placeholder, displayed when there's no value
- required: _react2['default'].PropTypes.bool, // applies HTML5 required attribute when needed
- resetValue: _react2['default'].PropTypes.any, // value to use when you clear the control
- scrollMenuIntoView: _react2['default'].PropTypes.bool, // boolean to enable the viewport to shift so that the full menu fully visible when engaged
- searchable: _react2['default'].PropTypes.bool, // whether to enable searching feature or not
- simpleValue: _react2['default'].PropTypes.bool, // pass the value to onChange as a simple value (legacy pre 1.0 mode), defaults to false
- style: _react2['default'].PropTypes.object, // optional style to apply to the control
- tabIndex: _react2['default'].PropTypes.string, // optional tab index of the control
- tabSelectsValue: _react2['default'].PropTypes.bool, // whether to treat tabbing out while focused to be value selection
- value: _react2['default'].PropTypes.any, // initial field value
- valueComponent: _react2['default'].PropTypes.func, // value component to render
- valueKey: _react2['default'].PropTypes.string, // path of the label value in option objects
- valueRenderer: _react2['default'].PropTypes.func, // valueRenderer: function (option) {}
- wrapperStyle: _react2['default'].PropTypes.object },
+ required: _propTypes2['default'].bool, // applies HTML5 required attribute when needed
+ resetValue: _propTypes2['default'].any, // value to use when you clear the control
+ scrollMenuIntoView: _propTypes2['default'].bool, // boolean to enable the viewport to shift so that the full menu fully visible when engaged
+ searchable: _propTypes2['default'].bool, // whether to enable searching feature or not
+ simpleValue: _propTypes2['default'].bool, // pass the value to onChange as a simple value (legacy pre 1.0 mode), defaults to false
+ style: _propTypes2['default'].object, // optional style to apply to the control
+ tabIndex: _propTypes2['default'].string, // optional tab index of the control
+ tabSelectsValue: _propTypes2['default'].bool, // whether to treat tabbing out while focused to be value selection
+ value: _propTypes2['default'].any, // initial field value
+ valueComponent: _propTypes2['default'].func, // value component to render
+ valueKey: _propTypes2['default'].string, // path of the label value in option objects
+ valueRenderer: _propTypes2['default'].func, // valueRenderer: function (option) {}
+ wrapperStyle: _propTypes2['default'].object },
// optional style to apply to the component wrapper
statics: { Async: _Async2['default'], AsyncCreatable: _AsyncCreatable2['default'], Creatable: _Creatable2['default'] },
@@ -195,7 +204,6 @@ var Select = _react2['default'].createClass({
noResultsText: 'No results found',
onBlurResetsInput: true,
onCloseResetsInput: true,
- openAfterFocus: false,
optionComponent: _Option2['default'],
pageSize: 5,
placeholder: 'Select...',
@@ -321,12 +329,6 @@ var Select = _react2['default'].createClass({
focus: function focus() {
if (!this.input) return;
this.input.focus();
-
- if (this.props.openAfterFocus) {
- this.setState({
- isOpen: true
- });
- }
},
blurInput: function blurInput() {
@@ -407,7 +409,7 @@ var Select = _react2['default'].createClass({
});
} else {
// otherwise, focus the input and open the menu
- this._openAfterFocus = this.props.openOnFocus;
+ this._openAfterFocus = true;
this.focus();
}
},
@@ -940,6 +942,7 @@ var Select = _react2['default'].createClass({
'aria-owns': ariaOwns,
'aria-haspopup': '' + isOpen,
'aria-activedescendant': isOpen ? this._instancePrefix + '-option-' + focusedOptionIndex : this._instancePrefix + '-value',
+ 'aria-describedby': this.props['aria-describedby'],
'aria-labelledby': this.props['aria-labelledby'],
'aria-label': this.props['aria-label'],
className: className,
@@ -1111,7 +1114,14 @@ var Select = _react2['default'].createClass({
var focusedOption = this.state.focusedOption || selectedOption;
if (focusedOption && !focusedOption.disabled) {
- var focusedOptionIndex = options.indexOf(focusedOption);
+ var focusedOptionIndex = -1;
+ options.some(function (option, index) {
+ var isOptionEqual = option.value === focusedOption.value;
+ if (isOptionEqual) {
+ focusedOptionIndex = index;
+ }
+ return isOptionEqual;
+ });
if (focusedOptionIndex !== -1) {
return focusedOptionIndex;
}
@@ -1167,6 +1177,7 @@ var Select = _react2['default'].createClass({
var className = (0, _classnames2['default'])('Select', this.props.className, {
'Select--multi': this.props.multi,
'Select--single': !this.props.multi,
+ 'is-clearable': this.props.clearable,
'is-disabled': this.props.disabled,
'is-focused': this.state.isFocused,
'is-loading': this.props.isLoading,
@@ -1224,4 +1235,4 @@ var Select = _react2['default'].createClass({
});
exports['default'] = Select;
-module.exports = exports['default'];
+module.exports = exports['default'];
\ No newline at end of file
diff --git a/lib/Value.js b/lib/Value.js
index 5d578eac2d..af5c7c42ca 100644
--- a/lib/Value.js
+++ b/lib/Value.js
@@ -6,21 +6,29 @@ var _react = require('react');
var _react2 = _interopRequireDefault(_react);
+var _createReactClass = require('create-react-class');
+
+var _createReactClass2 = _interopRequireDefault(_createReactClass);
+
+var _propTypes = require('prop-types');
+
+var _propTypes2 = _interopRequireDefault(_propTypes);
+
var _classnames = require('classnames');
var _classnames2 = _interopRequireDefault(_classnames);
-var Value = _react2['default'].createClass({
+var Value = (0, _createReactClass2['default'])({
displayName: 'Value',
propTypes: {
- children: _react2['default'].PropTypes.node,
- disabled: _react2['default'].PropTypes.bool, // disabled prop passed to ReactSelect
- id: _react2['default'].PropTypes.string, // Unique id for the value - used for aria
- onClick: _react2['default'].PropTypes.func, // method to handle click on value label
- onRemove: _react2['default'].PropTypes.func, // method to handle removal of the value
- value: _react2['default'].PropTypes.object.isRequired },
+ children: _propTypes2['default'].node,
+ disabled: _propTypes2['default'].bool, // disabled prop passed to ReactSelect
+ id: _propTypes2['default'].string, // Unique id for the value - used for aria
+ onClick: _propTypes2['default'].func, // method to handle click on value label
+ onRemove: _propTypes2['default'].func, // method to handle removal of the value
+ value: _propTypes2['default'].object.isRequired },
// the option object for this value
handleMouseDown: function handleMouseDown(event) {
diff --git a/package.json b/package.json
index 0ef1a9e7e9..34798c9956 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "react-select",
- "version": "1.0.0-rc.3",
+ "version": "1.0.0-rc.4",
"description": "A Select control built with and for ReactJS",
"main": "lib/Select.js",
"style": "dist/react-select.min.css",
diff --git a/src/Select.js b/src/Select.js
index e8d7c4c688..e4de56176c 100644
--- a/src/Select.js
+++ b/src/Select.js
@@ -151,7 +151,6 @@ const Select = createClass({
noResultsText: 'No results found',
onBlurResetsInput: true,
onCloseResetsInput: true,
- openAfterFocus: false,
optionComponent: Option,
pageSize: 5,
placeholder: 'Select...',
@@ -277,12 +276,6 @@ const Select = createClass({
focus () {
if (!this.input) return;
this.input.focus();
-
- if (this.props.openAfterFocus) {
- this.setState({
- isOpen: true,
- });
- }
},
blurInput () {
@@ -363,7 +356,7 @@ const Select = createClass({
});
} else {
// otherwise, focus the input and open the menu
- this._openAfterFocus = this.props.openOnFocus;
+ this._openAfterFocus = true;
this.focus();
}
},