From 328328617863de6599282a7be5dbf9a78af5abdc Mon Sep 17 00:00:00 2001 From: Thomas Burke Date: Mon, 21 Dec 2015 09:36:16 -0800 Subject: [PATCH 0001/1877] Removed event.stopPropogation() from Select's clearValue --- src/Select.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Select.js b/src/Select.js index 71e26ee4b0..5aed05e3f3 100644 --- a/src/Select.js +++ b/src/Select.js @@ -390,7 +390,6 @@ const Select = React.createClass({ if (event && event.type === 'mousedown' && event.button !== 0) { return; } - event.stopPropagation(); event.preventDefault(); this.setValue(null); this.setState({ From 6d473b3ef7288fbc181d513c54a5c461e9eb23ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rui=20Ara=C3=BAjo?= Date: Fri, 26 Feb 2016 00:38:52 +0100 Subject: [PATCH 0002/1877] Test hidden values for multi option. --- test/Select-test.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/Select-test.js b/test/Select-test.js index 4aa88ca67f..7b7bf9e32d 100644 --- a/test/Select-test.js +++ b/test/Select-test.js @@ -457,6 +457,7 @@ describe('Select', () => { wrapper = createControlWithWrapper({ value: [2, 1], + name: 'test', options: options, multi: true, searchable: true @@ -472,6 +473,13 @@ describe('Select', () => { ]); }); + it('selects the initial hidden value', () => { + expect(ReactDOM.findDOMNode(wrapper).querySelectorAll(FORM_VALUE_SELECTOR),'to satisfy', [ + expect.it('to have attributes', { 'value': '2' }), + expect.it('to have attributes', { 'value': '1' }) + ]); + }); + it('calls onChange with the correct value when 1 option is selected', () => { var removeIcons = ReactDOM.findDOMNode(instance).querySelectorAll('.Select-value .Select-value-icon'); From d18272c7d35e082fe435eb92c6fe49c0b0f4b7de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rui=20Ara=C3=BAjo?= Date: Fri, 26 Feb 2016 01:18:29 +0100 Subject: [PATCH 0003/1877] Add more tests. Fix key using index vas an argument which is always a bug detected by the added tests. ;-) --- src/Select.js | 19 +++++++++++-------- test/Select-test.js | 36 +++++++++++++++++++++++++++++++++++- 2 files changed, 46 insertions(+), 9 deletions(-) diff --git a/src/Select.js b/src/Select.js index 94a47a0302..7baf7a149d 100644 --- a/src/Select.js +++ b/src/Select.js @@ -719,14 +719,17 @@ const Select = React.createClass({ renderHiddenField (valueArray) { if (!this.props.name) return; - return valueArray.map((item, index) => ( - - )); + return valueArray.map((item, index) => { + const value = stringifyValue(item[this.props.valueKey]); + return ( + + ); + }); }, getFocusableOption (selectedOption) { diff --git a/test/Select-test.js b/test/Select-test.js index 7b7bf9e32d..259b8ab1d9 100644 --- a/test/Select-test.js +++ b/test/Select-test.js @@ -474,7 +474,7 @@ describe('Select', () => { }); it('selects the initial hidden value', () => { - expect(ReactDOM.findDOMNode(wrapper).querySelectorAll(FORM_VALUE_SELECTOR),'to satisfy', [ + expect(ReactDOM.findDOMNode(wrapper), 'queried for', '.Select > input','to satisfy', [ expect.it('to have attributes', { 'value': '2' }), expect.it('to have attributes', { 'value': '1' }) ]); @@ -500,6 +500,17 @@ describe('Select', () => { ]); }); + it('supports updating the hidden values via props', () => { + + wrapper.setPropsForChild({ + value: [3, 4] + }); + expect(ReactDOM.findDOMNode(wrapper), 'queried for', '.Select > input','to satisfy', [ + expect.it('to have attributes', { 'value': '3' }), + expect.it('to have attributes', { 'value': '4' }) + ]); + }); + it('supports updating the value to a single value', () => { wrapper.setPropsForChild({ @@ -512,6 +523,17 @@ describe('Select', () => { ]); }); + it('supports updating the hidden fields to a single value', () => { + + wrapper.setPropsForChild({ + value: 1 + }); + + expect(ReactDOM.findDOMNode(wrapper), 'queried for', '.Select > input', 'to satisfy', [ + expect.it('to have attributes', { 'value': '1' }) + ]); + }); + it('supports updating the value to single value of 0', () => { // This test is specifically in case there's a "if (value) {... " somewhere @@ -525,6 +547,18 @@ describe('Select', () => { ]); }); + it('supports updating the hidden fields to a single of 0', () => { + + // This test is specifically in case there's a "if (value) {... " somewhere + wrapper.setPropsForChild({ + value: 0 + }); + + expect(ReactDOM.findDOMNode(wrapper), 'queried for', '.Select > input', 'to satisfy', [ + expect.it('to have attributes', { 'value': '0' }) + ]); + }); + it('calls onChange with the correct values when multiple options are selected', () => { typeSearchText('fo'); From 4822d431417f9599c0aefb9b797d611973f52600 Mon Sep 17 00:00:00 2001 From: Dave Birch Date: Tue, 2 Aug 2016 16:40:34 -0500 Subject: [PATCH 0004/1877] adding a nvmrc file - also adding coverage to exclusion in eslintignore --- .eslintignore | 1 + .nvmrc | 1 + 2 files changed, 2 insertions(+) create mode 100644 .nvmrc diff --git a/.eslintignore b/.eslintignore index fd87c8299d..756c5aabf9 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,5 +1,6 @@ lib/* dist/* +coverage/* examples/dist/* node_modules/* bower_components/* diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000000..c966188e11 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +4.4.7 From 6b3a763bfaaeb7fa2560cce290fbba7bb80fdd4b Mon Sep 17 00:00:00 2001 From: Jacob Hilker Date: Thu, 22 Sep 2016 16:31:01 -0400 Subject: [PATCH 0005/1877] Update aria-only class to have absolute positioning When the component is restyled using flex, the width of the aria-only box causes the width of the `Select-multi-value-wrapper` to fluctuate when clicking into the input, and starting to type. Making this `position: absolute` removes it from the flow of flex, and thus solves this issue. This seems to be a standard way to do this, while keeping it accessible. See: http://a11yproject.com/posts/how-to-hide-content/ http://itstiredinhere.com/accessibility/ --- less/control.less | 1 + 1 file changed, 1 insertion(+) diff --git a/less/control.less b/less/control.less index 625cc3d2e1..428e6fc47e 100644 --- a/less/control.less +++ b/less/control.less @@ -249,6 +249,7 @@ display: inline-block; } .Select .Select-aria-only { + position: absolute; display: inline-block; height: 1px; width: 1px; From 32bde1618fe72eb9c72f08da459639600d2e71c2 Mon Sep 17 00:00:00 2001 From: Kevin Huang Date: Fri, 18 Nov 2016 11:58:40 -0800 Subject: [PATCH 0006/1877] Fix description & default value of cache in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 34c096ca2b..ed64fb3091 100644 --- a/README.md +++ b/README.md @@ -346,7 +346,7 @@ function onInputKeyDown(event) { autosize | bool | true | If enabled, the input will expand as the length of its value increases backspaceRemoves | bool | true | whether pressing backspace removes the last item when there is no input value backspaceToRemoveMessage | string | 'Press backspace to remove {last label}' | prompt shown in input when at least one option in a multiselect is shown, set to '' to clear - cache | bool | true | enables the options cache for `asyncOptions` (default: `true`) + cache | any | {} | Sets the cache object used for Select.Async. Set to `false` if you would like to disable caching. className | string | undefined | className for the outer element clearable | bool | true | should it be possible to reset value clearAllText | string | 'Clear all' | title for the "clear" control when `multi` is true From cce53da4eb105972b6fce136e5e0253cea7dc4e2 Mon Sep 17 00:00:00 2001 From: Anton Alexandrenok Date: Tue, 21 Feb 2017 10:12:53 +0300 Subject: [PATCH 0007/1877] Added .focus() instance method --- src/Creatable.js | 4 ++++ test/Creatable-test.js | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/Creatable.js b/src/Creatable.js index 145c568aa3..f1f3fe33e5 100644 --- a/src/Creatable.js +++ b/src/Creatable.js @@ -203,6 +203,10 @@ const Creatable = React.createClass({ } }, + focus () { + this.select.focus(); + }, + render () { const { newOptionCreator, diff --git a/test/Creatable-test.js b/test/Creatable-test.js index 968478fd9a..45014c105a 100644 --- a/test/Creatable-test.js +++ b/test/Creatable-test.js @@ -237,4 +237,17 @@ describe('Creatable', () => { createControl({ onInputKeyDown: event => done() }); return creatableInstance.onInputKeyDown({ keyCode: 97 }); }); + + describe('.focus()', () => { + beforeEach(() => { + createControl({}); + TestUtils.Simulate.blur(filterInputNode); + }); + + it('focuses the search input', () => { + expect(filterInputNode, 'not to equal', document.activeElement); + creatableInstance.focus(); + expect(filterInputNode, 'to equal', document.activeElement); + }); + }); }); From af0f77fe742fef8765b8578ff9486075991d1177 Mon Sep 17 00:00:00 2001 From: Eric Lee Date: Tue, 21 Feb 2017 14:30:57 -0800 Subject: [PATCH 0008/1877] Add aria-describedby support --- src/Select.js | 2 ++ test/Select-test.js | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/Select.js b/src/Select.js index fc09e715f0..4960865cf6 100644 --- a/src/Select.js +++ b/src/Select.js @@ -48,6 +48,7 @@ const Select = React.createClass({ addLabelText: React.PropTypes.string, // placeholder displayed when you want to add a label on a multi-value input 'aria-label': React.PropTypes.string, // Aria label (for assistive tech) 'aria-labelledby': React.PropTypes.string, // HTML ID of an element that should be used as the label (for assistive tech) + 'aria-describedby': React.PropTypes.string, // HTML ID(s) of element(s) that should be used to describe this input (for assistive tech) arrowRenderer: React.PropTypes.func, // Create drop-down caret element autoBlur: React.PropTypes.bool, // automatically blur the component when an option is selected autofocus: React.PropTypes.bool, // autofocus the component on mount @@ -854,6 +855,7 @@ const Select = React.createClass({ 'aria-haspopup': '' + isOpen, 'aria-activedescendant': isOpen ? this._instancePrefix + '-option-' + focusedOptionIndex : this._instancePrefix + '-value', 'aria-labelledby': this.props['aria-labelledby'], + 'aria-describedby': this.props['aria-describedby'], 'aria-label': this.props['aria-label'], className: className, tabIndex: this.props.tabIndex, diff --git a/test/Select-test.js b/test/Select-test.js index d8df285436..10a2c6afb1 100644 --- a/test/Select-test.js +++ b/test/Select-test.js @@ -3803,6 +3803,19 @@ describe('Select', () => { 'to contain', ); }); + it('passes through the aria-describedby prop', () => { + + instance = createControl({ + options: defaultOptions, + value: 'one', + 'aria-describedby': 'test-label1-id test-label2-id' + }); + + expect(instance, + 'to contain', ); + }); + + it('passes through the aria-label prop', () => { instance = createControl({ From ba7dc9fa143f3c41a7a6960e1ece6cb8597a5fe2 Mon Sep 17 00:00:00 2001 From: Eric Lee Date: Tue, 21 Feb 2017 14:53:32 -0800 Subject: [PATCH 0009/1877] Sort aria-describedby propTypes alphabetically --- src/Select.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Select.js b/src/Select.js index 4960865cf6..5149cd65c8 100644 --- a/src/Select.js +++ b/src/Select.js @@ -46,9 +46,9 @@ const Select = React.createClass({ propTypes: { addLabelText: React.PropTypes.string, // placeholder displayed when you want to add a label on a multi-value input + 'aria-describedby': React.PropTypes.string, // HTML ID(s) of element(s) that should be used to describe this input (for assistive tech) 'aria-label': React.PropTypes.string, // Aria label (for assistive tech) 'aria-labelledby': React.PropTypes.string, // HTML ID of an element that should be used as the label (for assistive tech) - 'aria-describedby': React.PropTypes.string, // HTML ID(s) of element(s) that should be used to describe this input (for assistive tech) arrowRenderer: React.PropTypes.func, // Create drop-down caret element autoBlur: React.PropTypes.bool, // automatically blur the component when an option is selected autofocus: React.PropTypes.bool, // autofocus the component on mount @@ -854,8 +854,8 @@ const Select = React.createClass({ 'aria-owns': ariaOwns, 'aria-haspopup': '' + isOpen, 'aria-activedescendant': isOpen ? this._instancePrefix + '-option-' + focusedOptionIndex : this._instancePrefix + '-value', - 'aria-labelledby': this.props['aria-labelledby'], 'aria-describedby': this.props['aria-describedby'], + 'aria-labelledby': this.props['aria-labelledby'], 'aria-label': this.props['aria-label'], className: className, tabIndex: this.props.tabIndex, From 476392c42baa6e34e63bbb7b806b80e26d7ec115 Mon Sep 17 00:00:00 2001 From: wagoid Date: Thu, 9 Mar 2017 20:15:33 -0300 Subject: [PATCH 0010/1877] Update tabIndex propType to string or number --- src/Select.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Select.js b/src/Select.js index fc09e715f0..691dd65bb2 100644 --- a/src/Select.js +++ b/src/Select.js @@ -37,6 +37,10 @@ const stringOrNode = React.PropTypes.oneOfType([ React.PropTypes.string, React.PropTypes.node ]); +const stringOrNumber = React.PropTypes.oneOfType([ + React.PropTypes.string, + React.PropTypes.number +]); let instanceId = 1; @@ -107,7 +111,7 @@ const Select = React.createClass({ searchable: React.PropTypes.bool, // whether to enable searching feature or not simpleValue: React.PropTypes.bool, // pass the value to onChange as a simple value (legacy pre 1.0 mode), defaults to false style: React.PropTypes.object, // optional style to apply to the control - tabIndex: React.PropTypes.string, // optional tab index of the control + tabIndex: stringOrNumber, // optional tab index of the control tabSelectsValue: React.PropTypes.bool, // whether to treat tabbing out while focused to be value selection value: React.PropTypes.any, // initial field value valueComponent: React.PropTypes.func, // value component to render From 1b06702ef4a15be0ab495995f8ca4a020bbb845f Mon Sep 17 00:00:00 2001 From: Edmond Pruteanu Date: Sun, 12 Mar 2017 02:56:17 +0200 Subject: [PATCH 0011/1877] Fixed Numeric Values Multi-Select MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Selected options weren’t being added to the input in Multi-Select mode for Numeric Values --- src/Select.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Select.js b/src/Select.js index fc09e715f0..fdc7935f5f 100644 --- a/src/Select.js +++ b/src/Select.js @@ -568,7 +568,13 @@ const Select = React.createClass({ /** support optionally passing in the `nextProps` so `componentWillReceiveProps` updates will function as expected */ const props = typeof nextProps === 'object' ? nextProps : this.props; if (props.multi) { - if (typeof value === 'string') value = value.split(props.delimiter); + if (typeof value === 'string') { + value = value.split(props.delimiter); + // convert string array to numbers array if made of numbers only + if (!value.some(isNaN)) { + value = value.map(Number); + } + } if (!Array.isArray(value)) { if (value === null || value === undefined) return []; value = [value]; From 5513893df6bbd3eb06470c29e2120971202baa50 Mon Sep 17 00:00:00 2001 From: Anton Alexandrenok Date: Tue, 14 Mar 2017 12:03:35 +0300 Subject: [PATCH 0012/1877] Added .focus() to AsyncCreatable --- src/AsyncCreatable.js | 5 +++++ test/AsyncCreatable-test.js | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/AsyncCreatable.js b/src/AsyncCreatable.js index edc51ee10b..eb87b51459 100644 --- a/src/AsyncCreatable.js +++ b/src/AsyncCreatable.js @@ -13,6 +13,10 @@ function reduce(obj, props = {}){ const AsyncCreatable = React.createClass({ displayName: 'AsyncCreatableSelect', + focus () { + this.select.focus(); + }, + render () { return ( @@ -26,6 +30,7 @@ const AsyncCreatable = React.createClass({ return asyncProps.onInputChange(input); }} ref={(ref) => { + this.select = ref; creatableProps.ref(ref); asyncProps.ref(ref); }} diff --git a/test/AsyncCreatable-test.js b/test/AsyncCreatable-test.js index e1dd788238..de1e821126 100644 --- a/test/AsyncCreatable-test.js +++ b/test/AsyncCreatable-test.js @@ -59,4 +59,17 @@ describe('AsyncCreatable', () => { class: ['foo'] }); }); + + describe('.focus()', () => { + beforeEach(() => { + createControl({}); + TestUtils.Simulate.blur(filterInputNode); + }); + + it('focuses the search input', () => { + expect(filterInputNode, 'not to equal', document.activeElement); + creatableInstance.focus(); + expect(filterInputNode, 'to equal', document.activeElement); + }); + }); }); From da6a5f75e989afb84359c7630553f7147903ada5 Mon Sep 17 00:00:00 2001 From: Dekel Date: Tue, 21 Mar 2017 18:32:53 +0200 Subject: [PATCH 0013/1877] added rtl support --- examples/src/components/Multiselect.js | 12 +++++++++++- examples/src/components/States.js | 7 ++++++- less/control.less | 9 +++++++++ less/multi.less | 16 +++++++++++++++- src/Select.js | 2 ++ 5 files changed, 43 insertions(+), 3 deletions(-) diff --git a/examples/src/components/Multiselect.js b/examples/src/components/Multiselect.js index 3142e75ef9..7122b1aba5 100644 --- a/examples/src/components/Multiselect.js +++ b/examples/src/components/Multiselect.js @@ -25,6 +25,7 @@ var MultiSelectField = React.createClass({ crazy: false, options: FLAVOURS, value: [], + rtl: false, }; }, handleSelectChange (value) { @@ -41,11 +42,16 @@ var MultiSelectField = React.createClass({ options: crazy ? WHY_WOULD_YOU : FLAVOURS, }); }, + toggleRtl (e) { + let rtl = e.target.checked; + this.setState({ rtl }); + }, + render () { return (

{this.props.label}

-
+
); diff --git a/examples/src/components/States.js b/examples/src/components/States.js index 8103c2eb90..01c8e54734 100644 --- a/examples/src/components/States.js +++ b/examples/src/components/States.js @@ -22,6 +22,7 @@ var StatesField = React.createClass({ searchable: this.props.searchable, selectValue: 'new-south-wales', clearable: true, + rtl: false, }; }, switchCountry (e) { @@ -51,7 +52,7 @@ var StatesField = React.createClass({ return (

{this.props.label}

-
@@ -67,6 +68,10 @@ var StatesField = React.createClass({ Clearable +
; + * } + * }); + * + * 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
diff --git a/test/Select-test.js b/test/Select-test.js index 8cc43a8c1a..9569a24a8e 100644 --- a/test/Select-test.js +++ b/test/Select-test.js @@ -3916,4 +3916,27 @@ describe('Select', () => { expect(input, 'to equal', document.activeElement); }); }); + + describe('arrowRenderer', () => { + beforeEach(() => { + options = [ + { value: 'one', label: 'One' }, + { value: 'two', label: 'Two' }, + { value: 'three', label: 'Three' } + ]; + + instance = createControl({ + name: 'form-field-name', + value: 'one', + options: options, + arrowRenderer: null + }); + }); + + it('doesn\'t render arrow if arrowRenderer props is null', () => { + + var arrow = ReactDOM.findDOMNode(instance).querySelectorAll('.Select-arrow-zone')[0]; + + expect(arrow, 'to be', undefined); + }); }); From ebf75980ab2248093ffe130120fed2a201d07d90 Mon Sep 17 00:00:00 2001 From: Roland Johann Date: Sat, 27 May 2017 12:11:48 -0400 Subject: [PATCH 0036/1877] simplified test --- test/Select-test.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/test/Select-test.js b/test/Select-test.js index 9569a24a8e..ec5b380fb3 100644 --- a/test/Select-test.js +++ b/test/Select-test.js @@ -3919,16 +3919,7 @@ describe('Select', () => { describe('arrowRenderer', () => { beforeEach(() => { - options = [ - { value: 'one', label: 'One' }, - { value: 'two', label: 'Two' }, - { value: 'three', label: 'Three' } - ]; - instance = createControl({ - name: 'form-field-name', - value: 'one', - options: options, arrowRenderer: null }); }); From 4c9e8d303e23c75cefd237b07212f00f470ffb14 Mon Sep 17 00:00:00 2001 From: Roland Johann Date: Sat, 27 May 2017 12:15:50 -0400 Subject: [PATCH 0037/1877] fixed missing closing paranthesis --- test/Select-test.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/Select-test.js b/test/Select-test.js index ec5b380fb3..40470bfde3 100644 --- a/test/Select-test.js +++ b/test/Select-test.js @@ -3930,4 +3930,5 @@ describe('Select', () => { expect(arrow, 'to be', undefined); }); + }); }); From 85a8279a4fc71843214e6bdbafb07348bee77c58 Mon Sep 17 00:00:00 2001 From: Roland Johann Date: Sat, 27 May 2017 12:59:51 -0400 Subject: [PATCH 0038/1877] control conditional rendering inside render method to be consistent with conditional rendering of loading indicator and clear button --- src/Select.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Select.js b/src/Select.js index 9db08afc56..85be1266d7 100644 --- a/src/Select.js +++ b/src/Select.js @@ -921,6 +921,10 @@ const Select = createClass({ }, renderArrow () { + if (this.props.arrowRenderer === null) { + return null; + } + const onMouseDown = this.handleMouseDownOnArrow; const isOpen = this.state.isOpen; const arrow = this.props.arrowRenderer({ onMouseDown, isOpen }); @@ -1126,7 +1130,7 @@ const Select = createClass({ {removeMessage} {this.renderLoading()} {this.renderClear()} - {this.props.arrowRenderer !== null ? this.renderArrow() : null} + {this.renderArrow()} {isOpen ? this.renderOuter(options, !this.props.multi ? valueArray : null, focusedOption) : null} From 40db51720dcf9973c3d8f2bbfbe71cb11cfb00ca Mon Sep 17 00:00:00 2001 From: cbergmiller Date: Sat, 3 Jun 2017 15:53:45 +0200 Subject: [PATCH 0039/1877] [FIX] #1651 moved option prop sync to componentWillReceiveProps (#1765) * [FIX] #1651 moved option prop sync to componentWillReceiveProps * [ADD] test for option prop sync by componentWillReceiveProps --- src/Async.js | 15 ++++++--------- test/Async-test.js | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/Async.js b/src/Async.js index de2c8ad9ad..f4dafd19a3 100644 --- a/src/Async.js +++ b/src/Async.js @@ -68,15 +68,12 @@ export default class Async extends Component { } } - componentWillUpdate (nextProps, nextState) { - const propertiesToSync = ['options']; - propertiesToSync.forEach((prop) => { - if (this.props[prop] !== nextProps[prop]) { - this.setState({ - [prop]: nextProps[prop] - }); - } - }); + componentWillReceiveProps(nextProps) { + if (nextProps.options !== this.props.options) { + this.setState({ + options: nextProps.options, + }); + } } clearOptions() { diff --git a/test/Async-test.js b/test/Async-test.js index 8742e315ff..dd5a38fa62 100644 --- a/test/Async-test.js +++ b/test/Async-test.js @@ -447,4 +447,20 @@ describe('Async', () => { expect(input, 'to equal', document.activeElement); }); }); + + + describe('props sync test', () => { + it('should update options on componentWillReceiveProps', () => { + createControl({ + }); + asyncInstance.componentWillReceiveProps({ + options: [{ + label: 'bar', + value: 'foo', + }] + }); + expect(asyncNode.querySelectorAll('[role=option]').length, 'to equal', 1); + expect(asyncNode.querySelector('[role=option]').textContent, 'to equal', 'bar'); + }); + }); }); From 07dc061f7fb2c6eb8db120f5315f57352cb867f2 Mon Sep 17 00:00:00 2001 From: cbergmiller Date: Tue, 6 Jun 2017 07:04:20 +0200 Subject: [PATCH 0040/1877] [ADD] Clarified the onInputChange prop signature in the docs (#1773) * [ADD] Clarified the onInputChange prop signature in the docs * [ADD] requested changes --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4ab43b05ae..f6b3f9e660 100644 --- a/README.md +++ b/README.md @@ -303,7 +303,8 @@ The custom `menuRenderer` property accepts the following named parameters: ### Updating input values with onInputChange -You can manipulate the input using the onInputChange and returning a new value. +You can manipulate the input by providing a `onInputChange` callback that returns a new value. +**Please note:** When you want to use `onInputChange` only to listen to the input updates, you still have to return the unchanged value! ```js function cleanInput(inputValue) { @@ -385,7 +386,7 @@ function onInputKeyDown(event) { | onClose | func | undefined | handler for when the menu closes: `function () {}` | | onCloseResetsInput | bool | true | whether to clear input when closing the menu through the arrow | | onFocus | func | undefined | onFocus handler: `function(event) {}` | -| onInputChange | func | undefined | onInputChange handler: `function(inputValue) {}` | +| onInputChange | func | undefined | onInputChange handler/interceptor: `function(inputValue: string): string` | | onInputKeyDown | func | undefined | input keyDown handler; call `event.preventDefault()` to override default `Select` behavior: `function(event) {}` | | onOpen | func | undefined | handler for when the menu opens: `function () {}` | | onValueClick | func | undefined | onClick handler for value labels: `function (value, event) {}` | From ec53f0b2aa1d8287a7050b8d3f13b9b8a203c93f Mon Sep 17 00:00:00 2001 From: Nikita Balabaev Date: Wed, 7 Jun 2017 16:37:46 +0700 Subject: [PATCH 0041/1877] Update Select.js Replace whitespaces with tabs and vice versa for consistency reasons --- src/Select.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Select.js b/src/Select.js index 63d08bc800..11c69af5c3 100644 --- a/src/Select.js +++ b/src/Select.js @@ -48,19 +48,19 @@ const Select = createClass({ propTypes: { addLabelText: PropTypes.string, // placeholder displayed when you want to add a label on a multi-value input - 'aria-describedby': PropTypes.string, // HTML ID(s) of element(s) that should be used to describe this input (for assistive tech) + 'aria-describedby': PropTypes.string, // HTML ID(s) of element(s) that should be used to describe this input (for assistive tech) 'aria-label': PropTypes.string, // Aria label (for assistive tech) - 'aria-labelledby': PropTypes.string, // HTML ID of an element that should be used as the label (for assistive tech) - arrowRenderer: PropTypes.func, // Create drop-down caret element + 'aria-labelledby': PropTypes.string, // HTML ID of an element that should be used as the label (for assistive tech) + arrowRenderer: PropTypes.func, // Create drop-down caret element autoBlur: PropTypes.bool, // automatically blur the component when an option is selected autofocus: PropTypes.bool, // autofocus the component on mount autosize: PropTypes.bool, // whether to enable autosizing or not backspaceRemoves: PropTypes.bool, // whether backspace removes an item if there is no text input backspaceToRemoveMessage: PropTypes.string, // Message to use for screenreaders to press backspace to remove the current item - {label} is replaced with the item label className: PropTypes.string, // className for the outer element - clearAllText: stringOrNode, // title for the "clear" control when multi: true + clearAllText: stringOrNode, // title for the "clear" control when multi: true clearRenderer: PropTypes.func, // create clearable x element - clearValueText: stringOrNode, // title for the "clear" control + clearValueText: stringOrNode, // title for the "clear" control clearable: PropTypes.bool, // should it be possible to reset value deleteRemoves: PropTypes.bool, // whether backspace removes an item if there is no text input delimiter: PropTypes.string, // delimiter to use to join multiple values for the hidden field value @@ -84,12 +84,12 @@ const Select = createClass({ menuStyle: PropTypes.object, // optional style to apply to the menu multi: PropTypes.bool, // multi-value input name: PropTypes.string, // generates a hidden tag with this field name for html forms - noResultsText: stringOrNode, // placeholder displayed when there are no matching search results + noResultsText: stringOrNode, // placeholder displayed when there are no matching search results onBlur: PropTypes.func, // onBlur handler: function (event) {} onBlurResetsInput: PropTypes.bool, // whether input is cleared on blur onChange: PropTypes.func, // onChange handler: function (newValue) {} onClose: PropTypes.func, // fires when the menu is closed - onCloseResetsInput: PropTypes.bool, // whether input is cleared when menu is closed through the arrow + onCloseResetsInput: PropTypes.bool, // whether input is cleared when menu is closed through the arrow onFocus: PropTypes.func, // onFocus handler: function (event) {} onInputChange: PropTypes.func, // onInputChange handler: function (inputValue) {} onInputKeyDown: PropTypes.func, // input keyDown handler: function (event) {} @@ -103,7 +103,7 @@ const Select = createClass({ optionRenderer: PropTypes.func, // optionRenderer: function (option) {} options: PropTypes.array, // array of options pageSize: PropTypes.number, // number of entries to page when using page up/down keys - placeholder: stringOrNode, // field placeholder, displayed when there's no value + placeholder: stringOrNode, // field placeholder, displayed when there's no value required: PropTypes.bool, // applies HTML5 required attribute when needed resetValue: PropTypes.any, // value to use when you clear the control scrollMenuIntoView: PropTypes.bool, // boolean to enable the viewport to shift so that the full menu fully visible when engaged @@ -922,7 +922,7 @@ const Select = createClass({ renderArrow () { const onMouseDown = this.handleMouseDownOnArrow; - const isOpen = this.state.isOpen; + const isOpen = this.state.isOpen; const arrow = this.props.arrowRenderer({ onMouseDown, isOpen }); return ( From 1d390267068a11745aff6557a1c06448f41ba1c9 Mon Sep 17 00:00:00 2001 From: Dekel Date: Sun, 11 Jun 2017 01:52:58 +0300 Subject: [PATCH 0042/1877] added rtl prop test --- test/Select-test.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/Select-test.js b/test/Select-test.js index d8df285436..53ee46d48f 100644 --- a/test/Select-test.js +++ b/test/Select-test.js @@ -3893,4 +3893,15 @@ describe('Select', () => { expect(input, 'to equal', document.activeElement); }); }); + + describe('rtl', () => { + describe('className', () => { + it('assigns the className Select-rtl to the outer-most element', () => { + var instance = createControl({ rtl: true }); + expect(ReactDOM.findDOMNode(instance), 'to have attributes', { + class: 'Select-rtl' + }); + }); + }); + }); }); From 40a9eb231b505b23dafbde43db11a66ce57fda5b Mon Sep 17 00:00:00 2001 From: Jeremy Liberman Date: Tue, 13 Jun 2017 20:55:49 -0500 Subject: [PATCH 0043/1877] Fix backspace handling for non-multi select controls. Fixes #638 (#773) --- src/Select.js | 2 +- test/Select-test.js | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Select.js b/src/Select.js index 63d08bc800..bcf0cebb3f 100644 --- a/src/Select.js +++ b/src/Select.js @@ -644,7 +644,7 @@ const Select = createClass({ var valueArray = this.getValueArray(this.props.value); if (!valueArray.length) return; if (valueArray[valueArray.length-1].clearableValue === false) return; - this.setValue(valueArray.slice(0, valueArray.length - 1)); + this.setValue(this.props.multi ? valueArray.slice(0, valueArray.length - 1) : null); }, removeValue (value) { diff --git a/test/Select-test.js b/test/Select-test.js index 8cc43a8c1a..26080bed06 100644 --- a/test/Select-test.js +++ b/test/Select-test.js @@ -1850,6 +1850,19 @@ describe('Select', () => { ]); }); + it('removes the last item with backspace', () => { + + wrapper.setPropsForChild({ + multi: false, + value: 'one' + }); + onChange.reset(); // Ignore previous onChange calls + + pressBackspace(); + + expect(onChange, 'was called with', null); + }); + it('doesn\'t show the X if clearableValue=false', () => { setValueProp(['two']); From ce81389fe826929f9e29a013d49f0fea446ba1dc Mon Sep 17 00:00:00 2001 From: Jed Watson Date: Fri, 16 Jun 2017 14:21:36 +1000 Subject: [PATCH 0044/1877] Adding merged changes to changelog --- HISTORY.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/HISTORY.md b/HISTORY.md index 9bcf688f1e..77270ce54e 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,10 @@ # React-Select +## Next + +* fixed; issues synchronising options props in `Async`, thanks [cbergmiller](https://github.com/cbergmiller) +* fixed; backspace handling for non-multi select controls, thanks [Jeremy Liberman](https://github.com/MrLeebo) + ## v1.0.0-rc.5 / 2017-05-25 * fixed; Allow `falsey` values to be clearable, thanks [Simon Gaestel](https://github.com/sgaestel) From d8a34ec4e6e28eb6ce8a2eaac76a20e1945b35ae Mon Sep 17 00:00:00 2001 From: Lukas Stuart-Fry Date: Wed, 21 Jun 2017 10:05:35 -0700 Subject: [PATCH 0045/1877] Update README.md to include 'valueComponent' prop (#1803) * Update README.md to include 'valueComponent' prop Thanks to some very helpful feedback I received in this repo (and reading through some issues other users were having) I found there was a valueComponent prop that I could utilize that made my life so much easier. I think it needs to be included in the list of available props in the docs. * Update README.md to include 'valueComponent' prop (edited with suggested changes made) * Minor copy edits of valueComponent description --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f6b3f9e660..18b0731aa9 100644 --- a/README.md +++ b/README.md @@ -400,6 +400,7 @@ function onInputKeyDown(event) { | loadingPlaceholder | string\|node | 'Loading...' | label to prompt for loading search result | | tabSelectsValue | bool | true | whether to select the currently focused value when the `[tab]` key is pressed | | value | any | undefined | initial field value | +| valueComponent | func | | function which returns a custom way to render/manage the value selected `` | | valueKey | string | 'value' | the option property to use for the value | | valueRenderer | func | undefined | function which returns a custom way to render the value selected `function (option) {}` | From b06824784cd3b523bffb0fa621dc298ad1751a16 Mon Sep 17 00:00:00 2001 From: andreme Date: Fri, 23 Jun 2017 13:48:45 +1000 Subject: [PATCH 0046/1877] Hide create option after closing menu (#1306) * hide create option after closing menu * cleaned up tests --- src/Select.js | 32 +++++++++++++++++++------------- test/Creatable-test.js | 29 +++++++++++++++++++++++++---- 2 files changed, 44 insertions(+), 17 deletions(-) diff --git a/src/Select.js b/src/Select.js index ea78da39c8..54c6634a21 100644 --- a/src/Select.js +++ b/src/Select.js @@ -396,13 +396,12 @@ const Select = createClass({ this.setState({ isOpen: false, isPseudoFocused: this.state.isFocused && !this.props.multi, - inputValue: '' + inputValue: this.handleInputValueChange('') }); } else { this.setState({ isOpen: false, - isPseudoFocused: this.state.isFocused && !this.props.multi, - inputValue: this.state.inputValue + isPseudoFocused: this.state.isFocused && !this.props.multi }); } this.hasScrolledToOption = false; @@ -437,7 +436,7 @@ const Select = createClass({ isPseudoFocused: false, }; if (this.props.onBlurResetsInput) { - onBlurredState.inputValue = ''; + onBlurredState.inputValue = this.handleInputValueChange(''); } this.setState(onBlurredState); }, @@ -445,12 +444,8 @@ const Select = createClass({ handleInputChange (event) { let newInputValue = event.target.value; - if (this.state.inputValue !== event.target.value && this.props.onInputChange) { - let nextState = this.props.onInputChange(newInputValue); - // Note: != used deliberately here to catch undefined and null - if (nextState != null && typeof nextState !== 'object') { - newInputValue = '' + nextState; - } + if (this.state.inputValue !== event.target.value) { + newInputValue = this.handleInputValueChange(newInputValue); } this.setState({ @@ -460,6 +455,17 @@ const Select = createClass({ }); }, + handleInputValueChange(newValue) { + if (this.props.onInputChange) { + let nextState = this.props.onInputChange(newValue); + // Note: != used deliberately here to catch undefined and null + if (nextState != null && typeof nextState !== 'object') { + newValue = '' + nextState; + } + } + return newValue; + }, + handleKeyDown (event) { if (this.props.disabled) return; @@ -610,7 +616,7 @@ const Select = createClass({ this.hasScrolledToOption = false; if (this.props.multi) { this.setState({ - inputValue: '', + inputValue: this.handleInputValueChange(''), focusedIndex: null }, () => { this.addValue(value); @@ -618,7 +624,7 @@ const Select = createClass({ } else { this.setState({ isOpen: false, - inputValue: '', + inputValue: this.handleInputValueChange(''), isPseudoFocused: this.state.isFocused, }, () => { this.setValue(value); @@ -664,7 +670,7 @@ const Select = createClass({ this.setValue(this.getResetValue()); this.setState({ isOpen: false, - inputValue: '', + inputValue: this.handleInputValueChange(''), }, this.focus); }, diff --git a/test/Creatable-test.js b/test/Creatable-test.js index 45014c105a..08118d62a4 100644 --- a/test/Creatable-test.js +++ b/test/Creatable-test.js @@ -19,7 +19,7 @@ var TestUtils = require('react-addons-test-utils'); var Select = require('../src/Select'); describe('Creatable', () => { - let creatableInstance, creatableNode, filterInputNode, innserSelectInstance, renderer; + let creatableInstance, creatableNode, filterInputNode, innerSelectInstance, renderer; beforeEach(() => renderer = TestUtils.createRenderer()); @@ -36,7 +36,7 @@ describe('Creatable', () => { ); creatableNode = ReactDOM.findDOMNode(creatableInstance); - innserSelectInstance = creatableInstance.select; + innerSelectInstance = creatableInstance.select; findAndFocusInputControl(); }; @@ -106,7 +106,7 @@ describe('Creatable', () => { createControl({ filterOptions: () => null }); - typeSearchText('test');; + typeSearchText('test'); }); it('should not show a "create..." prompt if current filter text is not a valid option (as determined by :isValidNewOption prop)', () => { @@ -150,7 +150,6 @@ describe('Creatable', () => { const options = [{ label: 'One', value: 1 }]; createControl({ options, - shouldKeyDownEventCreateNewOption: ({ keyCode }) => keyCode === 13 }); typeSearchText('on'); // ['Create option "on"', 'One'] TestUtils.Simulate.keyDown(filterInputNode, { keyCode: 40, key: 'ArrowDown' }); // Select 'One' @@ -158,6 +157,28 @@ describe('Creatable', () => { expect(options, 'to have length', 1); }); + it('should remove the new option after closing on selecting option', () => { + createControl(); + typeSearchText('9'); + TestUtils.Simulate.keyDown(filterInputNode, { keyCode: 40, key: 'ArrowDown' }); + TestUtils.Simulate.keyDown(filterInputNode, { keyCode: 13 }); + expect(creatableInstance.inputValue, 'to equal', ''); + }); + + it('should remove the new option after closing on escape', () => { + createControl(); + typeSearchText('9'); + TestUtils.Simulate.keyDown(filterInputNode, { keyCode: 27 }); + expect(creatableInstance.inputValue, 'to equal', ''); + }); + + it('should remove the new option after closing on blur', () => { + createControl(); + typeSearchText('9'); + TestUtils.Simulate.blur(filterInputNode); + expect(creatableInstance.inputValue, 'to equal', ''); + }); + it('should allow a custom select type to be rendered via the :children property', () => { let childProps; createControl({ From 26169305a721ec3099a912cea2f6ed38e6dc9c4c Mon Sep 17 00:00:00 2001 From: Roman Masyhar Date: Mon, 26 Jun 2017 11:49:49 +0700 Subject: [PATCH 0047/1877] Fix Usage Docs Example (#1799) Before this change, console log in browser will throw > Selected: [object Object] After this change console log in browser will throw some nice information. > Selected: {"value":"three","label":"Three"} --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 18b0731aa9..e06550feaa 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ var options = [ ]; function logChange(val) { - console.log("Selected: " + val); + console.log("Selected: " + JSON.stringify(val)); } tag with this field name for html forms - noResultsText: stringOrNode, // placeholder displayed when there are no matching search results - onBlur: PropTypes.func, // onBlur handler: function (event) {} - onBlurResetsInput: PropTypes.bool, // whether input is cleared on blur - onChange: PropTypes.func, // onChange handler: function (newValue) {} - onClose: PropTypes.func, // fires when the menu is closed - onCloseResetsInput: PropTypes.bool, // whether input is cleared when menu is closed through the arrow - onFocus: PropTypes.func, // onFocus handler: function (event) {} - onInputChange: PropTypes.func, // onInputChange handler: function (inputValue) {} - onInputKeyDown: PropTypes.func, // input keyDown handler: function (event) {} - onMenuScrollToBottom: PropTypes.func, // fires when the menu is scrolled to the bottom; can be used to paginate options - onOpen: PropTypes.func, // fires when the menu is opened - onValueClick: PropTypes.func, // onClick handler for value labels: function (value, event) {} - openAfterFocus: PropTypes.bool, // boolean to enable opening dropdown when focused - openOnFocus: PropTypes.bool, // always open options menu on focus - optionClassName: PropTypes.string, // additional class(es) to apply to the