diff --git a/dist/react-select.css b/dist/react-select.css
index 154eadc3c3..fa8febbb50 100644
--- a/dist/react-select.css
+++ b/dist/react-select.css
@@ -103,6 +103,7 @@
vertical-align: middle;
}
.Select-input > input {
+ width: 100%;
background: none transparent;
border: 0 none;
box-shadow: none;
diff --git a/dist/react-select.js b/dist/react-select.js
index 753a87565d..db721e2e73 100644
--- a/dist/react-select.js
+++ b/dist/react-select.js
@@ -341,6 +341,7 @@ var Select = _react2['default'].createClass({
allowCreate: _react2['default'].PropTypes.bool, // whether to allow creation of new entries
autoBlur: _react2['default'].PropTypes.bool,
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
className: _react2['default'].PropTypes.string, // className for the outer element
clearAllText: stringOrNode, // title for the "clear" control when multi: true
@@ -355,11 +356,13 @@ var Select = _react2['default'].createClass({
ignoreCase: _react2['default'].PropTypes.bool, // whether to perform case-insensitive filtering
inputProps: _react2['default'].PropTypes.object, // custom attributes for the Input
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
@@ -374,6 +377,8 @@ var Select = _react2['default'].createClass({
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
+ optionClassName: _react2['default'].PropTypes.string, // additional class(es) to apply to the elements
optionComponent: _react2['default'].PropTypes.func, // option component to render in dropdown
optionRenderer: _react2['default'].PropTypes.func, // optionRenderer: function (option) {}
options: _react2['default'].PropTypes.array, // array of options
@@ -396,6 +401,7 @@ var Select = _react2['default'].createClass({
getDefaultProps: function getDefaultProps() {
return {
addLabelText: 'Add "{label}"?',
+ autosize: true,
allowCreate: false,
backspaceRemoves: true,
clearable: true,
@@ -409,6 +415,7 @@ var Select = _react2['default'].createClass({
ignoreCase: true,
inputProps: {},
isLoading: false,
+ joinValues: false,
labelKey: 'label',
matchPos: 'any',
matchProp: 'any',
@@ -416,6 +423,7 @@ var Select = _react2['default'].createClass({
multi: false,
noResultsText: 'No results found',
onBlurResetsInput: true,
+ openAfterFocus: false,
optionComponent: _Option2['default'],
placeholder: 'Select...',
required: false,
@@ -444,6 +452,14 @@ var Select = _react2['default'].createClass({
}
},
+ componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
+ if (this.props.value !== nextProps.value && nextProps.required) {
+ this.setState({
+ required: this.handleRequired(nextProps.value, nextProps.multi)
+ });
+ }
+ },
+
componentWillUpdate: function componentWillUpdate(nextProps, nextState) {
if (nextState.isOpen !== this.state.isOpen) {
var handler = nextState.isOpen ? nextProps.onOpen : nextProps.onClose;
@@ -489,6 +505,12 @@ var Select = _react2['default'].createClass({
focus: function focus() {
if (!this.refs.input) return;
this.refs.input.focus();
+
+ if (this.props.openAfterFocus) {
+ this.setState({
+ isOpen: true
+ });
+ }
},
blurInput: function blurInput() {
@@ -930,17 +952,32 @@ var Select = _react2['default'].createClass({
ref: 'input',
style: { border: 0, width: 1, display: 'inline-block' } }));
}
- return _react2['default'].createElement(_reactInputAutosize2['default'], _extends({}, this.props.inputProps, {
- className: className,
- tabIndex: this.props.tabIndex,
- onBlur: this.handleInputBlur,
- onChange: this.handleInputChange,
- onFocus: this.handleInputFocus,
- minWidth: '5',
- ref: 'input',
- required: this.state.required,
- value: this.state.inputValue
- }));
+ if (this.props.autosize) {
+ return _react2['default'].createElement(_reactInputAutosize2['default'], _extends({}, this.props.inputProps, {
+ className: className,
+ tabIndex: this.props.tabIndex,
+ onBlur: this.handleInputBlur,
+ onChange: this.handleInputChange,
+ onFocus: this.handleInputFocus,
+ minWidth: '5',
+ ref: 'input',
+ required: this.state.required,
+ value: this.state.inputValue
+ }));
+ }
+ return _react2['default'].createElement(
+ 'div',
+ { className: className },
+ _react2['default'].createElement('input', _extends({}, this.props.inputProps, {
+ tabIndex: this.props.tabIndex,
+ onBlur: this.handleInputBlur,
+ onChange: this.handleInputChange,
+ onFocus: this.handleInputFocus,
+ ref: 'input',
+ required: this.state.required,
+ value: this.state.inputValue
+ }))
+ );
},
renderClear: function renderClear() {
@@ -1007,42 +1044,53 @@ var Select = _react2['default'].createClass({
var _this4 = this;
if (options && options.length) {
- var _ret = (function () {
- var Option = _this4.props.optionComponent;
- var renderLabel = _this4.props.optionRenderer || _this4.getOptionLabel;
-
- return {
- v: options.map(function (option, i) {
- var isSelected = valueArray && valueArray.indexOf(option) > -1;
- var isFocused = option === focusedOption;
- var optionRef = isFocused ? 'focused' : null;
- var optionClass = (0, _classnames2['default'])({
- 'Select-option': true,
- 'is-selected': isSelected,
- 'is-focused': isFocused,
- 'is-disabled': option.disabled
- });
-
- return _react2['default'].createElement(
- Option,
- {
- className: optionClass,
- isDisabled: option.disabled,
- isFocused: isFocused,
- key: 'option-' + i + '-' + option[_this4.props.valueKey],
- onSelect: _this4.selectValue,
- onFocus: _this4.focusOption,
- option: option,
- isSelected: isSelected,
- ref: optionRef
- },
- renderLabel(option)
- );
- })
- };
- })();
-
- if (typeof _ret === 'object') return _ret.v;
+ if (this.props.menuRenderer) {
+ return this.props.menuRenderer({
+ focusedOption: focusedOption,
+ focusOption: this.focusOption,
+ labelKey: this.props.labelKey,
+ options: options,
+ selectValue: this.selectValue,
+ valueArray: valueArray
+ });
+ } else {
+ var _ret = (function () {
+ var Option = _this4.props.optionComponent;
+ var renderLabel = _this4.props.optionRenderer || _this4.getOptionLabel;
+
+ return {
+ v: options.map(function (option, i) {
+ var isSelected = valueArray && valueArray.indexOf(option) > -1;
+ var isFocused = option === focusedOption;
+ var optionRef = isFocused ? 'focused' : null;
+ var optionClass = (0, _classnames2['default'])(_this4.props.optionClassName, {
+ 'Select-option': true,
+ 'is-selected': isSelected,
+ 'is-focused': isFocused,
+ 'is-disabled': option.disabled
+ });
+
+ return _react2['default'].createElement(
+ Option,
+ {
+ className: optionClass,
+ isDisabled: option.disabled,
+ isFocused: isFocused,
+ key: 'option-' + i + '-' + option[_this4.props.valueKey],
+ onSelect: _this4.selectValue,
+ onFocus: _this4.focusOption,
+ option: option,
+ isSelected: isSelected,
+ ref: optionRef
+ },
+ renderLabel(option)
+ );
+ })
+ };
+ })();
+
+ if (typeof _ret === 'object') return _ret.v;
+ }
} else if (this.props.noResultsText) {
return _react2['default'].createElement(
'div',
@@ -1058,10 +1106,25 @@ var Select = _react2['default'].createClass({
var _this5 = this;
if (!this.props.name) return;
- var value = valueArray.map(function (i) {
- return stringifyValue(i[_this5.props.valueKey]);
- }).join(this.props.delimiter);
- return _react2['default'].createElement('input', { type: 'hidden', ref: 'value', name: this.props.name, value: value, disabled: this.props.disabled });
+ if (this.props.joinValues) {
+ var value = valueArray.map(function (i) {
+ return stringifyValue(i[_this5.props.valueKey]);
+ }).join(this.props.delimiter);
+ return _react2['default'].createElement('input', {
+ type: 'hidden',
+ ref: 'value',
+ name: this.props.name,
+ value: value,
+ disabled: this.props.disabled });
+ }
+ return valueArray.map(function (item, index) {
+ return _react2['default'].createElement('input', { key: 'hidden.' + index,
+ type: 'hidden',
+ ref: 'value' + index,
+ name: _this5.props.name,
+ value: stringifyValue(item[_this5.props.valueKey]),
+ disabled: _this5.props.disabled });
+ });
},
getFocusableOption: function getFocusableOption(selectedOption) {
diff --git a/dist/react-select.min.css b/dist/react-select.min.css
index f882afeaf7..03de7e4e54 100644
--- a/dist/react-select.min.css
+++ b/dist/react-select.min.css
@@ -1 +1 @@
-.Select,.Select-control{position:relative}.Select-arrow-zone,.Select-clear-zone,.Select-loading-zone{text-align:center;cursor:pointer}.Select,.Select div,.Select input,.Select span{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.Select.is-disabled>.Select-control{background-color:#f9f9f9}.Select.is-disabled>.Select-control:hover{box-shadow:none}.Select.is-disabled .Select-arrow-zone{cursor:default;pointer-events:none}.Select-control{background-color:#fff;border-radius:4px;border:1px solid #ccc;color:#333;cursor:default;display:table;height:36px;outline:0;overflow:hidden;width:100%}.is-searchable.is-focused:not(.is-open)>.Select-control,.is-searchable.is-open>.Select-control{cursor:text}.Select-control:hover{box-shadow:0 1px 0 rgba(0,0,0,.06)}.is-open>.Select-control{border-bottom-right-radius:0;border-bottom-left-radius:0;background:#fff;border-color:#b3b3b3 #ccc #d9d9d9}.is-open>.Select-control>.Select-arrow{border-color:transparent transparent #999;border-width:0 5px 5px}.is-focused:not(.is-open)>.Select-control{border-color:#007eff;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 0 3px rgba(0,126,255,.1)}.Select-placeholder,:not(.Select--multi)>.Select-control .Select-value{bottom:0;color:#aaa;left:0;line-height:34px;padding-left:10px;padding-right:10px;position:absolute;right:0;top:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.Select-arrow-zone,.Select-clear-zone,.Select-loading,.Select-loading-zone{position:relative;vertical-align:middle}.has-value.is-pseudo-focused:not(.Select--multi)>.Select-control>.Select-value .Select-value-label,.has-value:not(.Select--multi)>.Select-control>.Select-value .Select-value-label{color:#333}.has-value.is-pseudo-focused:not(.Select--multi)>.Select-control>.Select-value a.Select-value-label,.has-value:not(.Select--multi)>.Select-control>.Select-value a.Select-value-label{cursor:pointer;text-decoration:none}.has-value.is-pseudo-focused:not(.Select--multi)>.Select-control>.Select-value a.Select-value-label:focus,.has-value.is-pseudo-focused:not(.Select--multi)>.Select-control>.Select-value a.Select-value-label:hover,.has-value:not(.Select--multi)>.Select-control>.Select-value a.Select-value-label:focus,.has-value:not(.Select--multi)>.Select-control>.Select-value a.Select-value-label:hover{color:#007eff;outline:0;text-decoration:underline}.Select-input{height:34px;padding-left:10px;padding-right:10px;vertical-align:middle}.Select-input>input{background:none;border:0;box-shadow:none;cursor:default;display:inline-block;font-family:inherit;font-size:inherit;height:34px;margin:0;outline:0;padding:0;-webkit-appearance:none}.is-focused .Select-input>input{cursor:text}.has-value.is-pseudo-focused .Select-input{opacity:0}.Select-control:not(.is-searchable)>.Select-input{outline:0}.Select-loading-zone{display:table-cell;width:16px}.Select-loading{-webkit-animation:Select-animation-spin .4s infinite linear;-o-animation:Select-animation-spin .4s infinite linear;animation:Select-animation-spin .4s infinite linear;width:16px;height:16px;box-sizing:border-box;border-radius:50%;border:2px solid #ccc;border-right-color:#333;display:inline-block}.Select-clear-zone{-webkit-animation:Select-animation-fadeIn .2s;-o-animation:Select-animation-fadeIn .2s;animation:Select-animation-fadeIn .2s;color:#999;display:table-cell;width:17px}.Select-clear-zone:hover{color:#D0021B}.Select-clear{display:inline-block;font-size:18px;line-height:1}.Select--multi .Select-clear-zone{width:17px}.Select-arrow-zone{display:table-cell;width:25px;padding-right:5px}.Select-arrow{border-color:#999 transparent transparent;border-style:solid;border-width:5px 5px 2.5px;display:inline-block;height:0;width:0}.Select-noresults,.Select-option{box-sizing:border-box;display:block;padding:8px 10px}.Select-arrow-zone:hover>.Select-arrow,.is-open .Select-arrow{border-top-color:#666}@-webkit-keyframes Select-animation-fadeIn{from{opacity:0}to{opacity:1}}@keyframes Select-animation-fadeIn{from{opacity:0}to{opacity:1}}.Select-menu-outer{border-bottom-right-radius:4px;border-bottom-left-radius:4px;background-color:#fff;border:1px solid #ccc;border-top-color:#e6e6e6;box-shadow:0 1px 0 rgba(0,0,0,.06);box-sizing:border-box;margin-top:-1px;max-height:200px;position:absolute;top:100%;width:100%;z-index:1;-webkit-overflow-scrolling:touch}.Select-menu{max-height:198px;overflow-y:auto}.Select-option{background-color:#fff;color:#666;cursor:pointer}.Select-option:last-child{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.Select-option.is-focused{background-color:rgba(0,126,255,.08);color:#333}.Select-option.is-disabled{color:#ccc;cursor:default}.Select-noresults{color:#999;cursor:default}.Select--multi .Select-input{vertical-align:middle;margin-left:10px;padding:0}.Select--multi.has-value .Select-input{margin-left:5px}.Select--multi .Select-value{background-color:rgba(0,126,255,.08);border-radius:2px;border:1px solid rgba(0,126,255,.24);color:#007eff;display:inline-block;font-size:.9em;line-height:1.4;margin-left:5px;margin-top:5px;vertical-align:top}.Select--multi .Select-value-icon,.Select--multi .Select-value-label{display:inline-block;vertical-align:middle}.Select--multi .Select-value-label{border-bottom-right-radius:2px;border-top-right-radius:2px;cursor:default;padding:2px 5px}.Select--multi a.Select-value-label{color:#007eff;cursor:pointer;text-decoration:none}.Select--multi a.Select-value-label:hover{text-decoration:underline}.Select--multi .Select-value-icon{cursor:pointer;border-bottom-left-radius:2px;border-top-left-radius:2px;border-right:1px solid rgba(0,126,255,.24);padding:1px 5px 3px}.Select--multi .Select-value-icon:focus,.Select--multi .Select-value-icon:hover{background-color:rgba(0,113,230,.08);color:#0071e6}.Select--multi .Select-value-icon:active{background-color:rgba(0,126,255,.24)}.Select--multi.is-disabled .Select-value{background-color:#fcfcfc;border:1px solid #e3e3e3;color:#333}.Select--multi.is-disabled .Select-value-icon{cursor:not-allowed;border-right:1px solid #e3e3e3}.Select--multi.is-disabled .Select-value-icon:active,.Select--multi.is-disabled .Select-value-icon:focus,.Select--multi.is-disabled .Select-value-icon:hover{background-color:#fcfcfc}@keyframes Select-animation-spin{to{transform:rotate(1turn)}}@-webkit-keyframes Select-animation-spin{to{-webkit-transform:rotate(1turn)}}
\ No newline at end of file
+.Select,.Select-control{position:relative}.Select-arrow-zone,.Select-clear-zone,.Select-loading-zone{text-align:center;cursor:pointer}.Select,.Select div,.Select input,.Select span{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.Select.is-disabled>.Select-control{background-color:#f9f9f9}.Select.is-disabled>.Select-control:hover{box-shadow:none}.Select.is-disabled .Select-arrow-zone{cursor:default;pointer-events:none}.Select-control{background-color:#fff;border-radius:4px;border:1px solid #ccc;color:#333;cursor:default;display:table;height:36px;outline:0;overflow:hidden;width:100%}.is-searchable.is-focused:not(.is-open)>.Select-control,.is-searchable.is-open>.Select-control{cursor:text}.Select-control:hover{box-shadow:0 1px 0 rgba(0,0,0,.06)}.is-open>.Select-control{border-bottom-right-radius:0;border-bottom-left-radius:0;background:#fff;border-color:#b3b3b3 #ccc #d9d9d9}.is-open>.Select-control>.Select-arrow{border-color:transparent transparent #999;border-width:0 5px 5px}.is-focused:not(.is-open)>.Select-control{border-color:#007eff;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 0 3px rgba(0,126,255,.1)}.Select-placeholder,:not(.Select--multi)>.Select-control .Select-value{bottom:0;color:#aaa;left:0;line-height:34px;padding-left:10px;padding-right:10px;position:absolute;right:0;top:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.has-value.is-pseudo-focused:not(.Select--multi)>.Select-control>.Select-value .Select-value-label,.has-value:not(.Select--multi)>.Select-control>.Select-value .Select-value-label{color:#333}.has-value.is-pseudo-focused:not(.Select--multi)>.Select-control>.Select-value a.Select-value-label,.has-value:not(.Select--multi)>.Select-control>.Select-value a.Select-value-label{cursor:pointer;text-decoration:none}.has-value.is-pseudo-focused:not(.Select--multi)>.Select-control>.Select-value a.Select-value-label:focus,.has-value.is-pseudo-focused:not(.Select--multi)>.Select-control>.Select-value a.Select-value-label:hover,.has-value:not(.Select--multi)>.Select-control>.Select-value a.Select-value-label:focus,.has-value:not(.Select--multi)>.Select-control>.Select-value a.Select-value-label:hover{color:#007eff;outline:0;text-decoration:underline}.Select-input{height:34px;padding-left:10px;padding-right:10px;vertical-align:middle}.Select-input>input{width:100%;background:none;border:0;box-shadow:none;cursor:default;display:inline-block;font-family:inherit;font-size:inherit;height:34px;margin:0;outline:0;padding:0;-webkit-appearance:none}.Select-loading,.Select-loading-zone{width:16px;position:relative;vertical-align:middle}.is-focused .Select-input>input{cursor:text}.has-value.is-pseudo-focused .Select-input{opacity:0}.Select-control:not(.is-searchable)>.Select-input{outline:0}.Select-loading-zone{display:table-cell}.Select-loading{-webkit-animation:Select-animation-spin .4s infinite linear;-o-animation:Select-animation-spin .4s infinite linear;animation:Select-animation-spin .4s infinite linear;height:16px;box-sizing:border-box;border-radius:50%;border:2px solid #ccc;border-right-color:#333;display:inline-block}.Select-clear-zone{-webkit-animation:Select-animation-fadeIn .2s;-o-animation:Select-animation-fadeIn .2s;animation:Select-animation-fadeIn .2s;color:#999;display:table-cell;position:relative;vertical-align:middle;width:17px}.Select-clear-zone:hover{color:#D0021B}.Select-clear{display:inline-block;font-size:18px;line-height:1}.Select--multi .Select-clear-zone{width:17px}.Select-arrow-zone{display:table-cell;position:relative;vertical-align:middle;width:25px;padding-right:5px}.Select-arrow{border-color:#999 transparent transparent;border-style:solid;border-width:5px 5px 2.5px;display:inline-block;height:0;width:0}.Select-noresults,.Select-option{box-sizing:border-box;display:block;padding:8px 10px}.Select-arrow-zone:hover>.Select-arrow,.is-open .Select-arrow{border-top-color:#666}@-webkit-keyframes Select-animation-fadeIn{from{opacity:0}to{opacity:1}}@keyframes Select-animation-fadeIn{from{opacity:0}to{opacity:1}}.Select-menu-outer{border-bottom-right-radius:4px;border-bottom-left-radius:4px;background-color:#fff;border:1px solid #ccc;border-top-color:#e6e6e6;box-shadow:0 1px 0 rgba(0,0,0,.06);box-sizing:border-box;margin-top:-1px;max-height:200px;position:absolute;top:100%;width:100%;z-index:1;-webkit-overflow-scrolling:touch}.Select-menu{max-height:198px;overflow-y:auto}.Select-option{background-color:#fff;color:#666;cursor:pointer}.Select-option:last-child{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.Select-option.is-focused{background-color:rgba(0,126,255,.08);color:#333}.Select-option.is-disabled{color:#ccc;cursor:default}.Select-noresults{color:#999;cursor:default}.Select--multi .Select-input{vertical-align:middle;margin-left:10px;padding:0}.Select--multi.has-value .Select-input{margin-left:5px}.Select--multi .Select-value{background-color:rgba(0,126,255,.08);border-radius:2px;border:1px solid rgba(0,126,255,.24);color:#007eff;display:inline-block;font-size:.9em;line-height:1.4;margin-left:5px;margin-top:5px;vertical-align:top}.Select--multi .Select-value-icon,.Select--multi .Select-value-label{display:inline-block;vertical-align:middle}.Select--multi .Select-value-label{border-bottom-right-radius:2px;border-top-right-radius:2px;cursor:default;padding:2px 5px}.Select--multi a.Select-value-label{color:#007eff;cursor:pointer;text-decoration:none}.Select--multi a.Select-value-label:hover{text-decoration:underline}.Select--multi .Select-value-icon{cursor:pointer;border-bottom-left-radius:2px;border-top-left-radius:2px;border-right:1px solid rgba(0,126,255,.24);padding:1px 5px 3px}.Select--multi .Select-value-icon:focus,.Select--multi .Select-value-icon:hover{background-color:rgba(0,113,230,.08);color:#0071e6}.Select--multi .Select-value-icon:active{background-color:rgba(0,126,255,.24)}.Select--multi.is-disabled .Select-value{background-color:#fcfcfc;border:1px solid #e3e3e3;color:#333}.Select--multi.is-disabled .Select-value-icon{cursor:not-allowed;border-right:1px solid #e3e3e3}.Select--multi.is-disabled .Select-value-icon:active,.Select--multi.is-disabled .Select-value-icon:focus,.Select--multi.is-disabled .Select-value-icon:hover{background-color:#fcfcfc}@keyframes Select-animation-spin{to{transform:rotate(1turn)}}@-webkit-keyframes Select-animation-spin{to{-webkit-transform:rotate(1turn)}}
\ No newline at end of file
diff --git a/dist/react-select.min.js b/dist/react-select.min.js
index 888ecdbfbb..c2b986f4f5 100644
--- a/dist/react-select.min.js
+++ b/dist/react-select.min.js
@@ -1 +1,2 @@
-!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var u;u="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,u.Select=e()}}(function(){return function e(u,t,s){function o(i,r){if(!t[i]){if(!u[i]){var a="function"==typeof require&&require;if(!r&&a)return a(i,!0);if(n)return n(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var p=t[i]={exports:{}};u[i][0].call(p.exports,function(e){var t=u[i][1][e];return o(t?t:e)},p,p.exports,e,u,t,s)}return t[i].exports}for(var n="function"==typeof require&&require,i=0;i=0;--t){var s=u.slice(0,t);if(e[s]&&(u===s||e[s].complete))return e[s]}}function r(e,u){return e&&"function"==typeof e.then?e.then(function(e){u(null,e)},function(e){u(e)}):void 0}var a=Object.assign||function(e){for(var u=1;ur.bottom||i.topu.offsetHeight&&!(u.scrollHeight-u.offsetHeight-u.scrollTop)&&this.props.onMenuScrollToBottom()}},handleRequired:function(e,u){return e?u?0===e.length:0===Object.keys(e).length:!0},getOptionLabel:function(e){return e[this.props.labelKey]},getValueArray:function(){var e=this.props.value;if(this.props.multi){if("string"==typeof e&&(e=e.split(this.props.delimiter)),!Array.isArray(e)){if(null===e||void 0===e)return[];e=[e]}return e.map(this.expandValue).filter(function(e){return e})}var u=this.expandValue(e);return u?[u]:[]},expandValue:function(e){if("string"!=typeof e&&"number"!=typeof e)return e;var u=this.props,t=u.options,s=u.valueKey;if(t)for(var o=0;o-1&&t0?u[t-1]:u[u.length-1]),this.setState({focusedOption:o})}},selectFocusedOption:function(){return this._focusedOption?this.selectValue(this._focusedOption):void 0},renderLoading:function(){return this.props.isLoading?a["default"].createElement("span",{className:"Select-loading-zone","aria-hidden":"true"},a["default"].createElement("span",{className:"Select-loading"})):void 0},renderValue:function(e,u){var t=this,s=this.props.valueRenderer||this.getOptionLabel,o=this.props.valueComponent;if(!e.length)return this.state.inputValue?null:a["default"].createElement("div",{className:"Select-placeholder"},this.props.placeholder);var n=this.props.onValueClick?this.handleValueClick:null;return this.props.multi?e.map(function(e,u){return a["default"].createElement(o,{disabled:t.props.disabled||e.clearableValue===!1,key:"value-"+u+"-"+e[t.props.valueKey],onClick:n,onRemove:t.removeValue,value:e},s(e))}):this.state.inputValue?void 0:(u&&(n=null),a["default"].createElement(o,{disabled:this.props.disabled,onClick:n,value:e[0]},s(e[0])))},renderInput:function(e){var u=(0,f["default"])("Select-input",this.props.inputProps.className);return this.props.disabled||!this.props.searchable?a["default"].createElement("div",i({},this.props.inputProps,{className:u,tabIndex:this.props.tabIndex||0,onBlur:this.handleInputBlur,onFocus:this.handleInputFocus,ref:"input",style:{border:0,width:1,display:"inline-block"}})):a["default"].createElement(c["default"],i({},this.props.inputProps,{className:u,tabIndex:this.props.tabIndex,onBlur:this.handleInputBlur,onChange:this.handleInputChange,onFocus:this.handleInputFocus,minWidth:"5",ref:"input",required:this.state.required,value:this.state.inputValue}))},renderClear:function(){return!this.props.clearable||!this.props.value||this.props.multi&&!this.props.value.length||this.props.disabled||this.props.isLoading?void 0:a["default"].createElement("span",{className:"Select-clear-zone",title:this.props.multi?this.props.clearAllText:this.props.clearValueText,"aria-label":this.props.multi?this.props.clearAllText:this.props.clearValueText,onMouseDown:this.clearValue,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEndClearValue},a["default"].createElement("span",{className:"Select-clear",dangerouslySetInnerHTML:{__html:"×"}}))},renderArrow:function(){return a["default"].createElement("span",{className:"Select-arrow-zone",onMouseDown:this.handleMouseDownOnArrow},a["default"].createElement("span",{className:"Select-arrow",onMouseDown:this.handleMouseDownOnArrow}))},filterOptions:function(e){var u=this,t=this.state.inputValue,s=this.props.options||[];return"function"==typeof this.props.filterOptions?this.props.filterOptions.call(this,s,t,e):this.props.filterOptions?(this.props.ignoreAccents&&(t=(0,g["default"])(t)),this.props.ignoreCase&&(t=t.toLowerCase()),e&&(e=e.map(function(e){return e[u.props.valueKey]})),s.filter(function(s){if(e&&e.indexOf(s[u.props.valueKey])>-1)return!1;if(u.props.filterOption)return u.props.filterOption.call(u,s,t);if(!t)return!0;var o=String(s[u.props.valueKey]),n=String(s[u.props.labelKey]);return u.props.ignoreAccents&&("label"!==u.props.matchProp&&(o=(0,g["default"])(o)),"value"!==u.props.matchProp&&(n=(0,g["default"])(n))),u.props.ignoreCase&&("label"!==u.props.matchProp&&(o=o.toLowerCase()),"value"!==u.props.matchProp&&(n=n.toLowerCase())),"start"===u.props.matchPos?"label"!==u.props.matchProp&&o.substr(0,t.length)===t||"value"!==u.props.matchProp&&n.substr(0,t.length)===t:"label"!==u.props.matchProp&&o.indexOf(t)>=0||"value"!==u.props.matchProp&&n.indexOf(t)>=0})):s},renderMenu:function(e,u,t){var s=this;if(!e||!e.length)return this.props.noResultsText?a["default"].createElement("div",{className:"Select-noresults"},this.props.noResultsText):null;var o=function(){var o=s.props.optionComponent,n=s.props.optionRenderer||s.getOptionLabel;return{v:e.map(function(e,i){var r=u&&u.indexOf(e)>-1,l=e===t,p=l?"focused":null,d=(0,f["default"])({"Select-option":!0,"is-selected":r,"is-focused":l,"is-disabled":e.disabled});return a["default"].createElement(o,{className:d,isDisabled:e.disabled,isFocused:l,key:"option-"+i+"-"+e[s.props.valueKey],onSelect:s.selectValue,onFocus:s.focusOption,option:e,isSelected:r,ref:p},n(e))})}}();return"object"==typeof o?o.v:void 0},renderHiddenField:function(e){var u=this;if(this.props.name){var t=e.map(function(e){return n(e[u.props.valueKey])}).join(this.props.delimiter);return a["default"].createElement("input",{type:"hidden",ref:"value",name:this.props.name,value:t,disabled:this.props.disabled})}},getFocusableOption:function(e){var u=this._visibleOptions;if(u.length){var t=this.state.focusedOption||e;if(t&&u.indexOf(t)>-1)return t;for(var s=0;s=0;--t){var s=u.slice(0,t);if(e[s]&&(u===s||e[s].complete))return e[s]}}function r(e,u){return e&&"function"==typeof e.then?e.then(function(e){u(null,e)},function(e){u(e)}):void 0}var a=Object.assign||function(e){for(var u=1;ur.bottom||i.topu.offsetHeight&&!(u.scrollHeight-u.offsetHeight-u.scrollTop)&&this.props.onMenuScrollToBottom()}},handleRequired:function(e,u){return e?u?0===e.length:0===Object.keys(e).length:!0},getOptionLabel:function(e){return e[this.props.labelKey]},getValueArray:function(){var e=this.props.value;if(this.props.multi){if("string"==typeof e&&(e=e.split(this.props.delimiter)),!Array.isArray(e)){if(null===e||void 0===e)return[];e=[e]}return e.map(this.expandValue).filter(function(e){return e})}var u=this.expandValue(e);return u?[u]:[]},expandValue:function(e){if("string"!=typeof e&&"number"!=typeof e)return e;var u=this.props,t=u.options,s=u.valueKey;if(t)for(var o=0;o-1&&t0?u[t-1]:u[u.length-1]),this.setState({focusedOption:o})}},selectFocusedOption:function(){return this._focusedOption?this.selectValue(this._focusedOption):void 0},renderLoading:function(){return this.props.isLoading?a["default"].createElement("span",{className:"Select-loading-zone","aria-hidden":"true"},a["default"].createElement("span",{className:"Select-loading"})):void 0},renderValue:function(e,u){var t=this,s=this.props.valueRenderer||this.getOptionLabel,o=this.props.valueComponent;if(!e.length)return this.state.inputValue?null:a["default"].createElement("div",{className:"Select-placeholder"},this.props.placeholder);var n=this.props.onValueClick?this.handleValueClick:null;return this.props.multi?e.map(function(e,u){return a["default"].createElement(o,{disabled:t.props.disabled||e.clearableValue===!1,key:"value-"+u+"-"+e[t.props.valueKey],onClick:n,onRemove:t.removeValue,value:e},s(e))}):this.state.inputValue?void 0:(u&&(n=null),a["default"].createElement(o,{disabled:this.props.disabled,onClick:n,value:e[0]},s(e[0])))},renderInput:function(e){var u=(0,f["default"])("Select-input",this.props.inputProps.className);return this.props.disabled||!this.props.searchable?a["default"].createElement("div",i({},this.props.inputProps,{className:u,tabIndex:this.props.tabIndex||0,onBlur:this.handleInputBlur,onFocus:this.handleInputFocus,ref:"input",style:{border:0,width:1,display:"inline-block"}})):this.props.autosize?a["default"].createElement(c["default"],i({},this.props.inputProps,{className:u,tabIndex:this.props.tabIndex,onBlur:this.handleInputBlur,onChange:this.handleInputChange,onFocus:this.handleInputFocus,minWidth:"5",ref:"input",required:this.state.required,value:this.state.inputValue})):a["default"].createElement("div",{className:u},a["default"].createElement("input",i({},this.props.inputProps,{tabIndex:this.props.tabIndex,onBlur:this.handleInputBlur,onChange:this.handleInputChange,onFocus:this.handleInputFocus,ref:"input",required:this.state.required,value:this.state.inputValue})))},renderClear:function(){return!this.props.clearable||!this.props.value||this.props.multi&&!this.props.value.length||this.props.disabled||this.props.isLoading?void 0:a["default"].createElement("span",{className:"Select-clear-zone",title:this.props.multi?this.props.clearAllText:this.props.clearValueText,"aria-label":this.props.multi?this.props.clearAllText:this.props.clearValueText,onMouseDown:this.clearValue,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEndClearValue},a["default"].createElement("span",{className:"Select-clear",dangerouslySetInnerHTML:{__html:"×"}}))},renderArrow:function(){return a["default"].createElement("span",{className:"Select-arrow-zone",onMouseDown:this.handleMouseDownOnArrow},a["default"].createElement("span",{className:"Select-arrow",onMouseDown:this.handleMouseDownOnArrow}))},filterOptions:function(e){var u=this,t=this.state.inputValue,s=this.props.options||[];return"function"==typeof this.props.filterOptions?this.props.filterOptions.call(this,s,t,e):this.props.filterOptions?(this.props.ignoreAccents&&(t=(0,g["default"])(t)),this.props.ignoreCase&&(t=t.toLowerCase()),e&&(e=e.map(function(e){return e[u.props.valueKey]})),s.filter(function(s){if(e&&e.indexOf(s[u.props.valueKey])>-1)return!1;if(u.props.filterOption)return u.props.filterOption.call(u,s,t);if(!t)return!0;var o=String(s[u.props.valueKey]),n=String(s[u.props.labelKey]);return u.props.ignoreAccents&&("label"!==u.props.matchProp&&(o=(0,g["default"])(o)),"value"!==u.props.matchProp&&(n=(0,g["default"])(n))),u.props.ignoreCase&&("label"!==u.props.matchProp&&(o=o.toLowerCase()),"value"!==u.props.matchProp&&(n=n.toLowerCase())),"start"===u.props.matchPos?"label"!==u.props.matchProp&&o.substr(0,t.length)===t||"value"!==u.props.matchProp&&n.substr(0,t.length)===t:"label"!==u.props.matchProp&&o.indexOf(t)>=0||"value"!==u.props.matchProp&&n.indexOf(t)>=0})):s},renderMenu:function(e,u,t){var s=this;if(!e||!e.length)return this.props.noResultsText?a["default"].createElement("div",{className:"Select-noresults"},this.props.noResultsText):null;if(this.props.menuRenderer)return this.props.menuRenderer({focusedOption:t,focusOption:this.focusOption,labelKey:this.props.labelKey,options:e,selectValue:this.selectValue,valueArray:u});var o=function(){var o=s.props.optionComponent,n=s.props.optionRenderer||s.getOptionLabel;return{v:e.map(function(e,i){var r=u&&u.indexOf(e)>-1,l=e===t,p=l?"focused":null,d=(0,f["default"])(s.props.optionClassName,{"Select-option":!0,"is-selected":r,"is-focused":l,"is-disabled":e.disabled});return a["default"].createElement(o,{className:d,isDisabled:e.disabled,isFocused:l,key:"option-"+i+"-"+e[s.props.valueKey],onSelect:s.selectValue,onFocus:s.focusOption,option:e,isSelected:r,ref:p},n(e))})}}();return"object"==typeof o?o.v:void 0},renderHiddenField:function(e){var u=this;if(this.props.name){if(this.props.joinValues){var t=e.map(function(e){return n(e[u.props.valueKey])}).join(this.props.delimiter);return a["default"].createElement("input",{type:"hidden",ref:"value",name:this.props.name,value:t,disabled:this.props.disabled})}return e.map(function(e,t){return a["default"].createElement("input",{key:"hidden."+t,type:"hidden",ref:"value"+t,name:u.props.name,value:n(e[u.props.valueKey]),disabled:u.props.disabled})})}},getFocusableOption:function(e){var u=this._visibleOptions;if(u.length){var t=this.state.focusedOption||e;if(t&&u.indexOf(t)>-1)return t;for(var s=0;s
*/
-},{"./components/Contributors":2,"./components/CustomComponents":3,"./components/CustomRender":4,"./components/Multiselect":5,"./components/NumericSelect":6,"./components/States":7,"react":undefined,"react-dom":undefined,"react-select":undefined}],2:[function(require,module,exports){
+},{"./components/Cities":2,"./components/Contributors":3,"./components/CustomComponents":4,"./components/CustomRender":5,"./components/Multiselect":6,"./components/NumericSelect":7,"./components/States":8,"react":undefined,"react-dom":undefined,"react-select":undefined}],2:[function(require,module,exports){
+'use strict';
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+
+var _react = require('react');
+
+var _react2 = _interopRequireDefault(_react);
+
+var _reactSelect = require('react-select');
+
+var _reactSelect2 = _interopRequireDefault(_reactSelect);
+
+var _reactVirtualized = require('react-virtualized');
+
+var DATA = require('../data/cities');
+
+var OPTION_HEIGHT = 35;
+var MAX_OPTIONS_HEIGHT = 200;
+
+var CitiesField = _react2['default'].createClass({
+ displayName: 'CitiesField',
+ propTypes: {
+ label: _react2['default'].PropTypes.string,
+ searchable: _react2['default'].PropTypes.bool
+ },
+ getDefaultProps: function getDefaultProps() {
+ return {
+ label: 'Cities:',
+ searchable: true
+ };
+ },
+ getInitialState: function getInitialState() {
+ return {
+ country: 'AU',
+ disabled: false,
+ searchable: this.props.searchable,
+ selectValue: 'new-south-wales',
+ clearable: true
+ };
+ },
+ switchCountry: function switchCountry(e) {
+ var newCountry = e.target.value;
+ console.log('Country changed to ' + newCountry);
+ this.setState({
+ country: newCountry,
+ selectValue: null
+ });
+ },
+ updateValue: function updateValue(newValue) {
+ console.log('State changed to ' + newValue);
+ this.setState({
+ selectValue: newValue
+ });
+ },
+ focusStateSelect: function focusStateSelect() {
+ this.refs.stateSelect.focus();
+ },
+ toggleCheckbox: function toggleCheckbox(e) {
+ var newState = {};
+ newState[e.target.name] = e.target.checked;
+ this.setState(newState);
+ },
+ renderMenu: function renderMenu(_ref) {
+ var focusedOption = _ref.focusedOption;
+ var focusOption = _ref.focusOption;
+ var labelKey = _ref.labelKey;
+ var options = _ref.options;
+ var selectValue = _ref.selectValue;
+ var valueArray = _ref.valueArray;
+
+ var focusedOptionIndex = options.indexOf(focusedOption);
+ var height = Math.min(MAX_OPTIONS_HEIGHT, options.length * OPTION_HEIGHT);
+
+ return _react2['default'].createElement(
+ _reactVirtualized.AutoSizer,
+ { disableHeight: true },
+ function (_ref2) {
+ var width = _ref2.width;
+ return _react2['default'].createElement(_reactVirtualized.VirtualScroll, {
+ ref: 'VirtualScroll',
+ height: height,
+ rowHeight: OPTION_HEIGHT,
+ rowRenderer: function (index) {
+ return _react2['default'].createElement(
+ 'div',
+ {
+ onMouseOver: function () {
+ return focusOption(options[index]);
+ },
+ onClick: function () {
+ return selectValue(options[index]);
+ },
+ style: {
+ backgroundColor: options[index] === focusedOption ? '#eee' : '#fff',
+ height: OPTION_HEIGHT,
+ display: 'flex',
+ alignItems: 'center',
+ padding: '0 .5rem'
+ }
+ },
+ options[index][labelKey]
+ );
+ },
+ rowsCount: options.length,
+ scrollToIndex: focusedOptionIndex,
+ width: width
+ });
+ }
+ );
+ },
+ render: function render() {
+ var options = DATA.CITIES;
+ return _react2['default'].createElement(
+ 'div',
+ { className: 'section' },
+ _react2['default'].createElement(
+ 'h3',
+ { className: 'section-heading' },
+ 'World\'s Largest Cities'
+ ),
+ _react2['default'].createElement(
+ 'h4',
+ null,
+ 'Uses react-virtualized to display data'
+ ),
+ _react2['default'].createElement(_reactSelect2['default'], { ref: 'stateSelect',
+ autofocus: true,
+ options: options,
+ simpleValue: true,
+ clearable: this.state.clearable,
+ name: 'selected-state',
+ disabled: this.state.disabled,
+ value: this.state.selectValue,
+ onChange: this.updateValue,
+ searchable: this.state.searchable,
+ labelKey: 'name',
+ valueKey: 'name',
+ menuStyle: { overflow: 'hidden' },
+ menuRenderer: this.renderMenu
+ })
+ );
+ }
+});
+
+module.exports = CitiesField;
+
+},{"../data/cities":9,"react":undefined,"react-select":undefined,"react-virtualized":43}],3:[function(require,module,exports){
'use strict';
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
@@ -161,7 +313,7 @@ var Contributors = _react2['default'].createClass({
module.exports = Contributors;
-},{"../data/contributors":8,"react":undefined,"react-select":undefined}],3:[function(require,module,exports){
+},{"../data/contributors":10,"react":undefined,"react-select":undefined}],4:[function(require,module,exports){
'use strict';
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
@@ -310,7 +462,7 @@ var UsersField = _react2['default'].createClass({
module.exports = UsersField;
-},{"../data/users":10,"react":undefined,"react-gravatar":19,"react-select":undefined}],4:[function(require,module,exports){
+},{"../data/users":12,"react":undefined,"react-gravatar":17,"react-select":undefined}],5:[function(require,module,exports){
'use strict';
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
@@ -386,7 +538,7 @@ var DisabledUpsellOptions = _react2['default'].createClass({
});
module.exports = DisabledUpsellOptions;
-},{"react":undefined,"react-select":undefined}],5:[function(require,module,exports){
+},{"react":undefined,"react-select":undefined}],6:[function(require,module,exports){
'use strict';
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
@@ -470,7 +622,7 @@ var MultiSelectField = _react2['default'].createClass({
module.exports = MultiSelectField;
-},{"react":undefined,"react-select":undefined}],6:[function(require,module,exports){
+},{"react":undefined,"react-select":undefined}],7:[function(require,module,exports){
'use strict';
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
@@ -602,7 +754,7 @@ var ValuesAsNumbersField = _react2['default'].createClass({
module.exports = ValuesAsNumbersField;
-},{"react":undefined,"react-select":undefined}],7:[function(require,module,exports){
+},{"react":undefined,"react-select":undefined}],8:[function(require,module,exports){
'use strict';
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
@@ -740,176 +892,380 @@ var StatesField = _react2['default'].createClass({
module.exports = StatesField;
-},{"../data/states":9,"react":undefined,"react-select":undefined}],8:[function(require,module,exports){
+},{"../data/states":11,"react":undefined,"react-select":undefined}],9:[function(require,module,exports){
+'use strict';
+
+exports.CITIES = [{ name: 'Abilene' }, { name: 'Addison' }, { name: 'Akron' }, { name: 'Alameda' }, { name: 'Albany' }, { name: 'Albany' }, { name: 'Albany' }, { name: 'Albuquerque' }, { name: 'Alexandria' }, { name: 'Alexandria' }, { name: 'Alhambra' }, { name: 'Aliso Viejo' }, { name: 'Allen' }, { name: 'Allentown' }, { name: 'Alpharetta' }, { name: 'Altamonte Springs' }, { name: 'Altoona' }, { name: 'Amarillo' }, { name: 'Ames' }, { name: 'Anaheim' }, { name: 'Anchorage' }, { name: 'Anderson' }, { name: 'Ankeny' }, { name: 'Ann Arbor' }, { name: 'Annapolis' }, { name: 'Antioch' }, { name: 'Apache Junction' }, { name: 'Apex' }, { name: 'Apopka' }, { name: 'Apple Valley' }, { name: 'Apple Valley' }, { name: 'Appleton' }, { name: 'Arcadia' }, { name: 'Arlington' }, { name: 'Arlington Heights' }, { name: 'Arvada' }, { name: 'Asheville' }, { name: 'Athens-Clarke County' }, { name: 'Atlanta' }, { name: 'Atlantic City' }, { name: 'Attleboro' }, { name: 'Auburn' }, { name: 'Auburn' }, { name: 'Augusta-Richmond County' }, { name: 'Aurora' }, { name: 'Aurora' }, { name: 'Austin' }, { name: 'Aventura' }, { name: 'Avondale' }, { name: 'Azusa' }, { name: 'Bakersfield' }, { name: 'Baldwin Park' }, { name: 'Baltimore' }, { name: 'Barnstable Town' }, { name: 'Bartlett' }, { name: 'Bartlett' }, { name: 'Baton Rouge' }, { name: 'Battle Creek' }, { name: 'Bayonne' }, { name: 'Baytown' }, { name: 'Beaumont' }, { name: 'Beaumont' }, { name: 'Beavercreek' }, { name: 'Beaverton' }, { name: 'Bedford' }, { name: 'Bell Gardens' }, { name: 'Belleville' }, { name: 'Bellevue' }, { name: 'Bellevue' }, { name: 'Bellflower' }, { name: 'Bellingham' }, { name: 'Beloit' }, { name: 'Bend' }, { name: 'Bentonville' }, { name: 'Berkeley' }, { name: 'Berwyn' }, { name: 'Bethlehem' }, { name: 'Beverly' }, { name: 'Billings' }, { name: 'Biloxi' }, { name: 'Binghamton' }, { name: 'Birmingham' }, { name: 'Bismarck' }, { name: 'Blacksburg' }, { name: 'Blaine' }, { name: 'Bloomington' }, { name: 'Bloomington' }, { name: 'Bloomington' }, { name: 'Blue Springs' }, { name: 'Boca Raton' }, { name: 'Boise City' }, { name: 'Bolingbrook' }, { name: 'Bonita Springs' }, { name: 'Bossier City' }, { name: 'Boston' }, { name: 'Boulder' }, { name: 'Bountiful' }, { name: 'Bowie' }, { name: 'Bowling Green' }, { name: 'Boynton Beach' }, { name: 'Bozeman' }, { name: 'Bradenton' }, { name: 'Brea' }, { name: 'Bremerton' }, { name: 'Brentwood' }, { name: 'Brentwood' }, { name: 'Bridgeport' }, { name: 'Bristol' }, { name: 'Brockton' }, { name: 'Broken Arrow' }, { name: 'Brookfield' }, { name: 'Brookhaven' }, { name: 'Brooklyn Park' }, { name: 'Broomfield' }, { name: 'Brownsville' }, { name: 'Bryan' }, { name: 'Buckeye' }, { name: 'Buena Park' }, { name: 'Buffalo' }, { name: 'Buffalo Grove' }, { name: 'Bullhead City' }, { name: 'Burbank' }, { name: 'Burien' }, { name: 'Burleson' }, { name: 'Burlington' }, { name: 'Burlington' }, { name: 'Burnsville' }, { name: 'Caldwell' }, { name: 'Calexico' }, { name: 'Calumet City' }, { name: 'Camarillo' }, { name: 'Cambridge' }, { name: 'Camden' }, { name: 'Campbell' }, { name: 'Canton' }, { name: 'Cape Coral' }, { name: 'Cape Girardeau' }, { name: 'Carlsbad' }, { name: 'Carmel' }, { name: 'Carol Stream' }, { name: 'Carpentersville' }, { name: 'Carrollton' }, { name: 'Carson' }, { name: 'Carson City' }, { name: 'Cary' }, { name: 'Casa Grande' }, { name: 'Casper' }, { name: 'Castle Rock' }, { name: 'Cathedral City' }, { name: 'Cedar Falls' }, { name: 'Cedar Hill' }, { name: 'Cedar Park' }, { name: 'Cedar Rapids' }, { name: 'Centennial' }, { name: 'Ceres' }, { name: 'Cerritos' }, { name: 'Champaign' }, { name: 'Chandler' }, { name: 'Chapel Hill' }, { name: 'Charleston' }, { name: 'Charleston' }, { name: 'Charlotte' }, { name: 'Charlottesville' }, { name: 'Chattanooga' }, { name: 'Chelsea' }, { name: 'Chesapeake' }, { name: 'Chesterfield' }, { name: 'Cheyenne' }, { name: 'Chicago' }, { name: 'Chico' }, { name: 'Chicopee' }, { name: 'Chino' }, { name: 'Chino Hills' }, { name: 'Chula Vista' }, { name: 'Cicero' }, { name: 'Cincinnati' }, { name: 'Citrus Heights' }, { name: 'Clarksville' }, { name: 'Clearwater' }, { name: 'Cleveland' }, { name: 'Cleveland' }, { name: 'Cleveland Heights' }, { name: 'Clifton' }, { name: 'Clovis' }, { name: 'Clovis' }, { name: 'Coachella' }, { name: 'Coconut Creek' }, { name: 'Coeur d\'Alene' }, { name: 'College Station' }, { name: 'Collierville' }, { name: 'Colorado Springs' }, { name: 'Colton' }, { name: 'Columbia' }, { name: 'Columbia' }, { name: 'Columbus' }, { name: 'Columbus' }, { name: 'Columbus' }, { name: 'Commerce City' }, { name: 'Compton' }, { name: 'Concord' }, { name: 'Concord' }, { name: 'Concord' }, { name: 'Conroe' }, { name: 'Conway' }, { name: 'Coon Rapids' }, { name: 'Coppell' }, { name: 'Coral Gables' }, { name: 'Coral Springs' }, { name: 'Corona' }, { name: 'Corpus Christi' }, { name: 'Corvallis' }, { name: 'Costa Mesa' }, { name: 'Council Bluffs' }, { name: 'Covina' }, { name: 'Covington' }, { name: 'Cranston' }, { name: 'Crystal Lake' }, { name: 'Culver City' }, { name: 'Cupertino' }, { name: 'Cutler Bay' }, { name: 'Cuyahoga Falls' }, { name: 'Cypress' }, { name: 'Dallas' }, { name: 'Daly City' }, { name: 'Danbury' }, { name: 'Danville' }, { name: 'Danville' }, { name: 'Davenport' }, { name: 'Davie' }, { name: 'Davis' }, { name: 'Dayton' }, { name: 'Daytona Beach' }, { name: 'DeKalb' }, { name: 'DeSoto' }, { name: 'Dearborn' }, { name: 'Dearborn Heights' }, { name: 'Decatur' }, { name: 'Decatur' }, { name: 'Deerfield Beach' }, { name: 'Delano' }, { name: 'Delray Beach' }, { name: 'Deltona' }, { name: 'Denton' }, { name: 'Denver' }, { name: 'Des Moines' }, { name: 'Des Plaines' }, { name: 'Detroit' }, { name: 'Diamond Bar' }, { name: 'Doral' }, { name: 'Dothan' }, { name: 'Dover' }, { name: 'Downers Grove' }, { name: 'Downey' }, { name: 'Draper' }, { name: 'Dublin' }, { name: 'Dublin' }, { name: 'Dubuque' }, { name: 'Duluth' }, { name: 'Duncanville' }, { name: 'Dunwoody' }, { name: 'Durham' }, { name: 'Eagan' }, { name: 'East Lansing' }, { name: 'East Orange' }, { name: 'East Providence' }, { name: 'Eastvale' }, { name: 'Eau Claire' }, { name: 'Eden Prairie' }, { name: 'Edina' }, { name: 'Edinburg' }, { name: 'Edmond' }, { name: 'Edmonds' }, { name: 'El Cajon' }, { name: 'El Centro' }, { name: 'El Monte' }, { name: 'El Paso' }, { name: 'Elgin' }, { name: 'Elizabeth' }, { name: 'Elk Grove' }, { name: 'Elkhart' }, { name: 'Elmhurst' }, { name: 'Elyria' }, { name: 'Encinitas' }, { name: 'Enid' }, { name: 'Erie' }, { name: 'Escondido' }, { name: 'Euclid' }, { name: 'Eugene' }, { name: 'Euless' }, { name: 'Evanston' }, { name: 'Evansville' }, { name: 'Everett' }, { name: 'Everett' }, { name: 'Fairfield' }, { name: 'Fairfield' }, { name: 'Fall River' }, { name: 'Fargo' }, { name: 'Farmington' }, { name: 'Farmington Hills' }, { name: 'Fayetteville' }, { name: 'Fayetteville' }, { name: 'Federal Way' }, { name: 'Findlay' }, { name: 'Fishers' }, { name: 'Fitchburg' }, { name: 'Flagstaff' }, { name: 'Flint' }, { name: 'Florence' }, { name: 'Florence' }, { name: 'Florissant' }, { name: 'Flower Mound' }, { name: 'Folsom' }, { name: 'Fond du Lac' }, { name: 'Fontana' }, { name: 'Fort Collins' }, { name: 'Fort Lauderdale' }, { name: 'Fort Myers' }, { name: 'Fort Pierce' }, { name: 'Fort Smith' }, { name: 'Fort Wayne' }, { name: 'Fort Worth' }, { name: 'Fountain Valley' }, { name: 'Franklin' }, { name: 'Frederick' }, { name: 'Freeport' }, { name: 'Fremont' }, { name: 'Fresno' }, { name: 'Friendswood' }, { name: 'Frisco' }, { name: 'Fullerton' }, { name: 'Gainesville' }, { name: 'Gaithersburg' }, { name: 'Galveston' }, { name: 'Garden Grove' }, { name: 'Gardena' }, { name: 'Garland' }, { name: 'Gary' }, { name: 'Gastonia' }, { name: 'Georgetown' }, { name: 'Germantown' }, { name: 'Gilbert' }, { name: 'Gilroy' }, { name: 'Glendale' }, { name: 'Glendale' }, { name: 'Glendora' }, { name: 'Glenview' }, { name: 'Goodyear' }, { name: 'Goose Creek' }, { name: 'Grand Forks' }, { name: 'Grand Island' }, { name: 'Grand Junction' }, { name: 'Grand Prairie' }, { name: 'Grand Rapids' }, { name: 'Grapevine' }, { name: 'Great Falls' }, { name: 'Greeley' }, { name: 'Green Bay' }, { name: 'Greenacres' }, { name: 'Greenfield' }, { name: 'Greensboro' }, { name: 'Greenville' }, { name: 'Greenville' }, { name: 'Greenwood' }, { name: 'Gresham' }, { name: 'Grove City' }, { name: 'Gulfport' }, { name: 'Hackensack' }, { name: 'Hagerstown' }, { name: 'Hallandale Beach' }, { name: 'Haltom City' }, { name: 'Hamilton' }, { name: 'Hammond' }, { name: 'Hampton' }, { name: 'Hanford' }, { name: 'Hanover Park' }, { name: 'Harlingen' }, { name: 'Harrisburg' }, { name: 'Harrisonburg' }, { name: 'Hartford' }, { name: 'Hattiesburg' }, { name: 'Haverhill' }, { name: 'Hawthorne' }, { name: 'Hayward' }, { name: 'Hemet' }, { name: 'Hempstead' }, { name: 'Henderson' }, { name: 'Hendersonville' }, { name: 'Hesperia' }, { name: 'Hialeah' }, { name: 'Hickory' }, { name: 'High Point' }, { name: 'Highland' }, { name: 'Hillsboro' }, { name: 'Hilton Head Island' }, { name: 'Hoboken' }, { name: 'Hoffman Estates' }, { name: 'Hollywood' }, { name: 'Holyoke' }, { name: 'Homestead' }, { name: 'Honolulu' }, { name: 'Hoover' }, { name: 'Houston' }, { name: 'Huber Heights' }, { name: 'Huntersville' }, { name: 'Huntington' }, { name: 'Huntington Beach' }, { name: 'Huntington Park' }, { name: 'Huntsville' }, { name: 'Huntsville' }, { name: 'Hurst' }, { name: 'Hutchinson' }, { name: 'Idaho Falls' }, { name: 'Independence' }, { name: 'Indianapolis' }, { name: 'Indio' }, { name: 'Inglewood' }, { name: 'Iowa City' }, { name: 'Irvine' }, { name: 'Irving' }, { name: 'Jackson' }, { name: 'Jackson' }, { name: 'Jacksonville' }, { name: 'Jacksonville' }, { name: 'Janesville' }, { name: 'Jefferson City' }, { name: 'Jeffersonville' }, { name: 'Jersey City' }, { name: 'Johns Creek' }, { name: 'Johnson City' }, { name: 'Joliet' }, { name: 'Jonesboro' }, { name: 'Joplin' }, { name: 'Jupiter' }, { name: 'Jurupa Valley' }, { name: 'Kalamazoo' }, { name: 'Kannapolis' }, { name: 'Kansas City' }, { name: 'Kansas City' }, { name: 'Kearny' }, { name: 'Keizer' }, { name: 'Keller' }, { name: 'Kenner' }, { name: 'Kennewick' }, { name: 'Kenosha' }, { name: 'Kent' }, { name: 'Kentwood' }, { name: 'Kettering' }, { name: 'Killeen' }, { name: 'Kingsport' }, { name: 'Kirkland' }, { name: 'Kissimmee' }, { name: 'Knoxville' }, { name: 'Kokomo' }, { name: 'La Crosse' }, { name: 'La Habra' }, { name: 'La Mesa' }, { name: 'La Mirada' }, { name: 'La Puente' }, { name: 'La Quinta' }, { name: 'Lacey' }, { name: 'Lafayette' }, { name: 'Lafayette' }, { name: 'Laguna Niguel' }, { name: 'Lake Charles' }, { name: 'Lake Elsinore' }, { name: 'Lake Forest' }, { name: 'Lake Havasu City' }, { name: 'Lake Oswego' }, { name: 'Lakeland' }, { name: 'Lakeville' }, { name: 'Lakewood' }, { name: 'Lakewood' }, { name: 'Lakewood' }, { name: 'Lakewood' }, { name: 'Lancaster' }, { name: 'Lancaster' }, { name: 'Lancaster' }, { name: 'Lancaster' }, { name: 'Lansing' }, { name: 'Laredo' }, { name: 'Largo' }, { name: 'Las Cruces' }, { name: 'Las Vegas' }, { name: 'Lauderhill' }, { name: 'Lawrence' }, { name: 'Lawrence' }, { name: 'Lawrence' }, { name: 'Lawton' }, { name: 'Layton' }, { name: 'League City' }, { name: 'Lee\'s Summit' }, { name: 'Leesburg' }, { name: 'Lehi' }, { name: 'Lenexa' }, { name: 'Leominster' }, { name: 'Lewisville' }, { name: 'Lexington-Fayette' }, { name: 'Lima' }, { name: 'Lincoln' }, { name: 'Lincoln' }, { name: 'Lincoln Park' }, { name: 'Linden' }, { name: 'Little Rock' }, { name: 'Littleton' }, { name: 'Livermore' }, { name: 'Livonia' }, { name: 'Lodi' }, { name: 'Logan' }, { name: 'Lombard' }, { name: 'Lompoc' }, { name: 'Long Beach' }, { name: 'Longmont' }, { name: 'Longview' }, { name: 'Lorain' }, { name: 'Los Angeles' }, { name: 'Louisville/Jefferson County' }, { name: 'Loveland' }, { name: 'Lowell' }, { name: 'Lubbock' }, { name: 'Lynchburg' }, { name: 'Lynn' }, { name: 'Lynwood' }, { name: 'Macon' }, { name: 'Madera' }, { name: 'Madison' }, { name: 'Madison' }, { name: 'Malden' }, { name: 'Manassas' }, { name: 'Manchester' }, { name: 'Manhattan' }, { name: 'Mankato' }, { name: 'Mansfield' }, { name: 'Mansfield' }, { name: 'Manteca' }, { name: 'Maple Grove' }, { name: 'Maplewood' }, { name: 'Marana' }, { name: 'Margate' }, { name: 'Maricopa' }, { name: 'Marietta' }, { name: 'Marlborough' }, { name: 'Martinez' }, { name: 'Marysville' }, { name: 'McAllen' }, { name: 'McKinney' }, { name: 'Medford' }, { name: 'Medford' }, { name: 'Melbourne' }, { name: 'Memphis' }, { name: 'Menifee' }, { name: 'Mentor' }, { name: 'Merced' }, { name: 'Meriden' }, { name: 'Meridian' }, { name: 'Meridian' }, { name: 'Mesa' }, { name: 'Mesquite' }, { name: 'Methuen' }, { name: 'Miami' }, { name: 'Miami Beach' }, { name: 'Miami Gardens' }, { name: 'Middletown' }, { name: 'Middletown' }, { name: 'Midland' }, { name: 'Midland' }, { name: 'Midwest City' }, { name: 'Milford' }, { name: 'Milpitas' }, { name: 'Milwaukee' }, { name: 'Minneapolis' }, { name: 'Minnetonka' }, { name: 'Minot' }, { name: 'Miramar' }, { name: 'Mishawaka' }, { name: 'Mission' }, { name: 'Mission Viejo' }, { name: 'Missoula' }, { name: 'Missouri City' }, { name: 'Mobile' }, { name: 'Modesto' }, { name: 'Moline' }, { name: 'Monroe' }, { name: 'Monrovia' }, { name: 'Montclair' }, { name: 'Montebello' }, { name: 'Monterey Park' }, { name: 'Montgomery' }, { name: 'Moore' }, { name: 'Moorhead' }, { name: 'Moreno Valley' }, { name: 'Morgan Hill' }, { name: 'Mount Pleasant' }, { name: 'Mount Prospect' }, { name: 'Mount Vernon' }, { name: 'Mountain View' }, { name: 'Muncie' }, { name: 'Murfreesboro' }, { name: 'Murray' }, { name: 'Murrieta' }, { name: 'Muskegon' }, { name: 'Muskogee' }, { name: 'Nampa' }, { name: 'Napa' }, { name: 'Naperville' }, { name: 'Nashua' }, { name: 'Nashville-Davidson' }, { name: 'National City' }, { name: 'New Bedford' }, { name: 'New Berlin' }, { name: 'New Braunfels' }, { name: 'New Britain' }, { name: 'New Brunswick' }, { name: 'New Haven' }, { name: 'New Orleans' }, { name: 'New Rochelle' }, { name: 'New York' }, { name: 'Newark' }, { name: 'Newark' }, { name: 'Newark' }, { name: 'Newport Beach' }, { name: 'Newport News' }, { name: 'Newton' }, { name: 'Niagara Falls' }, { name: 'Noblesville' }, { name: 'Norfolk' }, { name: 'Normal' }, { name: 'Norman' }, { name: 'North Charleston' }, { name: 'North Las Vegas' }, { name: 'North Lauderdale' }, { name: 'North Little Rock' }, { name: 'North Miami' }, { name: 'North Miami Beach' }, { name: 'North Port' }, { name: 'North Richland Hills' }, { name: 'Northglenn' }, { name: 'Norwalk' }, { name: 'Norwalk' }, { name: 'Norwich' }, { name: 'Novato' }, { name: 'Novi' }, { name: 'O\'Fallon' }, { name: 'Oak Lawn' }, { name: 'Oak Park' }, { name: 'Oakland' }, { name: 'Oakland Park' }, { name: 'Oakley' }, { name: 'Ocala' }, { name: 'Oceanside' }, { name: 'Ocoee' }, { name: 'Odessa' }, { name: 'Ogden' }, { name: 'Oklahoma City' }, { name: 'Olathe' }, { name: 'Olympia' }, { name: 'Omaha' }, { name: 'Ontario' }, { name: 'Orange' }, { name: 'Orem' }, { name: 'Orland Park' }, { name: 'Orlando' }, { name: 'Ormond Beach' }, { name: 'Oro Valley' }, { name: 'Oshkosh' }, { name: 'Overland Park' }, { name: 'Owensboro' }, { name: 'Oxnard' }, { name: 'Pacifica' }, { name: 'Palatine' }, { name: 'Palm Bay' }, { name: 'Palm Beach Gardens' }, { name: 'Palm Coast' }, { name: 'Palm Desert' }, { name: 'Palm Springs' }, { name: 'Palmdale' }, { name: 'Palo Alto' }, { name: 'Panama City' }, { name: 'Paramount' }, { name: 'Park Ridge' }, { name: 'Parker' }, { name: 'Parma' }, { name: 'Pasadena' }, { name: 'Pasadena' }, { name: 'Pasco' }, { name: 'Passaic' }, { name: 'Paterson' }, { name: 'Pawtucket' }, { name: 'Peabody' }, { name: 'Peachtree Corners' }, { name: 'Pearland' }, { name: 'Pembroke Pines' }, { name: 'Pensacola' }, { name: 'Peoria' }, { name: 'Peoria' }, { name: 'Perris' }, { name: 'Perth Amboy' }, { name: 'Petaluma' }, { name: 'Pflugerville' }, { name: 'Pharr' }, { name: 'Phenix City' }, { name: 'Philadelphia' }, { name: 'Phoenix' }, { name: 'Pico Rivera' }, { name: 'Pine Bluff' }, { name: 'Pinellas Park' }, { name: 'Pittsburg' }, { name: 'Pittsburgh' }, { name: 'Pittsfield' }, { name: 'Placentia' }, { name: 'Plainfield' }, { name: 'Plainfield' }, { name: 'Plano' }, { name: 'Plantation' }, { name: 'Pleasanton' }, { name: 'Plymouth' }, { name: 'Pocatello' }, { name: 'Pomona' }, { name: 'Pompano Beach' }, { name: 'Pontiac' }, { name: 'Port Arthur' }, { name: 'Port Orange' }, { name: 'Port St. Lucie' }, { name: 'Portage' }, { name: 'Porterville' }, { name: 'Portland' }, { name: 'Portland' }, { name: 'Portsmouth' }, { name: 'Poway' }, { name: 'Prescott' }, { name: 'Prescott Valley' }, { name: 'Providence' }, { name: 'Provo' }, { name: 'Pueblo' }, { name: 'Puyallup' }, { name: 'Quincy' }, { name: 'Quincy' }, { name: 'Racine' }, { name: 'Raleigh' }, { name: 'Rancho Cordova' }, { name: 'Rancho Cucamonga' }, { name: 'Rancho Palos Verdes' }, { name: 'Rancho Santa Margarita' }, { name: 'Rapid City' }, { name: 'Reading' }, { name: 'Redding' }, { name: 'Redlands' }, { name: 'Redmond' }, { name: 'Redondo Beach' }, { name: 'Redwood City' }, { name: 'Reno' }, { name: 'Renton' }, { name: 'Revere' }, { name: 'Rialto' }, { name: 'Richardson' }, { name: 'Richland' }, { name: 'Richmond' }, { name: 'Richmond' }, { name: 'Rio Rancho' }, { name: 'Riverside' }, { name: 'Riverton' }, { name: 'Roanoke' }, { name: 'Rochester' }, { name: 'Rochester' }, { name: 'Rochester Hills' }, { name: 'Rock Hill' }, { name: 'Rock Island' }, { name: 'Rockford' }, { name: 'Rocklin' }, { name: 'Rockville' }, { name: 'Rockwall' }, { name: 'Rocky Mount' }, { name: 'Rogers' }, { name: 'Rohnert Park' }, { name: 'Romeoville' }, { name: 'Rosemead' }, { name: 'Roseville' }, { name: 'Roseville' }, { name: 'Roswell' }, { name: 'Roswell' }, { name: 'Round Rock' }, { name: 'Rowlett' }, { name: 'Roy' }, { name: 'Royal Oak' }, { name: 'Sacramento' }, { name: 'Saginaw' }, { name: 'Salem' }, { name: 'Salem' }, { name: 'Salina' }, { name: 'Salinas' }, { name: 'Salt Lake City' }, { name: 'Sammamish' }, { name: 'San Angelo' }, { name: 'San Antonio' }, { name: 'San Bernardino' }, { name: 'San Bruno' }, { name: 'San Buenaventura (Ventura)' }, { name: 'San Clemente' }, { name: 'San Diego' }, { name: 'San Francisco' }, { name: 'San Gabriel' }, { name: 'San Jacinto' }, { name: 'San Jose' }, { name: 'San Leandro' }, { name: 'San Luis Obispo' }, { name: 'San Marcos' }, { name: 'San Marcos' }, { name: 'San Mateo' }, { name: 'San Rafael' }, { name: 'San Ramon' }, { name: 'Sandy' }, { name: 'Sandy Springs' }, { name: 'Sanford' }, { name: 'Santa Ana' }, { name: 'Santa Barbara' }, { name: 'Santa Clara' }, { name: 'Santa Clarita' }, { name: 'Santa Cruz' }, { name: 'Santa Fe' }, { name: 'Santa Maria' }, { name: 'Santa Monica' }, { name: 'Santa Rosa' }, { name: 'Santee' }, { name: 'Sarasota' }, { name: 'Savannah' }, { name: 'Sayreville' }, { name: 'Schaumburg' }, { name: 'Schenectady' }, { name: 'Scottsdale' }, { name: 'Scranton' }, { name: 'Seattle' }, { name: 'Shakopee' }, { name: 'Shawnee' }, { name: 'Sheboygan' }, { name: 'Shelton' }, { name: 'Sherman' }, { name: 'Shoreline' }, { name: 'Shreveport' }, { name: 'Sierra Vista' }, { name: 'Simi Valley' }, { name: 'Sioux City' }, { name: 'Sioux Falls' }, { name: 'Skokie' }, { name: 'Smyrna' }, { name: 'Smyrna' }, { name: 'Somerville' }, { name: 'South Bend' }, { name: 'South Gate' }, { name: 'South Jordan' }, { name: 'South San Francisco' }, { name: 'Southaven' }, { name: 'Southfield' }, { name: 'Spanish Fork' }, { name: 'Sparks' }, { name: 'Spartanburg' }, { name: 'Spokane' }, { name: 'Spokane Valley' }, { name: 'Springdale' }, { name: 'Springfield' }, { name: 'Springfield' }, { name: 'Springfield' }, { name: 'Springfield' }, { name: 'Springfield' }, { name: 'St. Charles' }, { name: 'St. Clair Shores' }, { name: 'St. Cloud' }, { name: 'St. Cloud' }, { name: 'St. George' }, { name: 'St. Joseph' }, { name: 'St. Louis' }, { name: 'St. Louis Park' }, { name: 'St. Paul' }, { name: 'St. Peters' }, { name: 'St. Petersburg' }, { name: 'Stamford' }, { name: 'Stanton' }, { name: 'State College' }, { name: 'Sterling Heights' }, { name: 'Stillwater' }, { name: 'Stockton' }, { name: 'Streamwood' }, { name: 'Strongsville' }, { name: 'Suffolk' }, { name: 'Sugar Land' }, { name: 'Summerville' }, { name: 'Sumter' }, { name: 'Sunnyvale' }, { name: 'Sunrise' }, { name: 'Surprise' }, { name: 'Syracuse' }, { name: 'Tacoma' }, { name: 'Tallahassee' }, { name: 'Tamarac' }, { name: 'Tampa' }, { name: 'Taunton' }, { name: 'Taylor' }, { name: 'Taylorsville' }, { name: 'Temecula' }, { name: 'Tempe' }, { name: 'Temple' }, { name: 'Terre Haute' }, { name: 'Texarkana' }, { name: 'Texas City' }, { name: 'The Colony' }, { name: 'Thornton' }, { name: 'Thousand Oaks' }, { name: 'Tigard' }, { name: 'Tinley Park' }, { name: 'Titusville' }, { name: 'Toledo' }, { name: 'Topeka' }, { name: 'Torrance' }, { name: 'Tracy' }, { name: 'Trenton' }, { name: 'Troy' }, { name: 'Troy' }, { name: 'Tucson' }, { name: 'Tulare' }, { name: 'Tulsa' }, { name: 'Turlock' }, { name: 'Tuscaloosa' }, { name: 'Tustin' }, { name: 'Twin Falls' }, { name: 'Tyler' }, { name: 'Union City' }, { name: 'Union City' }, { name: 'Upland' }, { name: 'Urbana' }, { name: 'Urbandale' }, { name: 'Utica' }, { name: 'Vacaville' }, { name: 'Valdosta' }, { name: 'Vallejo' }, { name: 'Valley Stream' }, { name: 'Vancouver' }, { name: 'Victoria' }, { name: 'Victorville' }, { name: 'Vineland' }, { name: 'Virginia Beach' }, { name: 'Visalia' }, { name: 'Vista' }, { name: 'Waco' }, { name: 'Walnut Creek' }, { name: 'Waltham' }, { name: 'Warner Robins' }, { name: 'Warren' }, { name: 'Warren' }, { name: 'Warwick' }, { name: 'Washington' }, { name: 'Waterbury' }, { name: 'Waterloo' }, { name: 'Watsonville' }, { name: 'Waukegan' }, { name: 'Waukesha' }, { name: 'Wausau' }, { name: 'Wauwatosa' }, { name: 'Wellington' }, { name: 'Weslaco' }, { name: 'West Allis' }, { name: 'West Covina' }, { name: 'West Des Moines' }, { name: 'West Haven' }, { name: 'West Jordan' }, { name: 'West New York' }, { name: 'West Palm Beach' }, { name: 'West Sacramento' }, { name: 'West Valley City' }, { name: 'Westerville' }, { name: 'Westfield' }, { name: 'Westland' }, { name: 'Westminster' }, { name: 'Westminster' }, { name: 'Weston' }, { name: 'Weymouth Town' }, { name: 'Wheaton' }, { name: 'Wheeling' }, { name: 'White Plains' }, { name: 'Whittier' }, { name: 'Wichita' }, { name: 'Wichita Falls' }, { name: 'Wilkes-Barre' }, { name: 'Wilmington' }, { name: 'Wilmington' }, { name: 'Wilson' }, { name: 'Winston-Salem' }, { name: 'Winter Garden' }, { name: 'Woburn' }, { name: 'Woodbury' }, { name: 'Woodland' }, { name: 'Woonsocket' }, { name: 'Worcester' }, { name: 'Wylie' }, { name: 'Wyoming' }, { name: 'Yakima' }, { name: 'Yonkers' }, { name: 'Yorba Linda' }, { name: 'York' }, { name: 'Youngstown' }, { name: 'Yuba City' }, { name: 'Yucaipa' }, { name: 'Yuma' }];
+
+},{}],10:[function(require,module,exports){
'use strict';
module.exports = [{ github: 'jedwatson', name: 'Jed Watson' }, { github: 'bruderstein', name: 'Dave Brotherstone' }, { github: 'jossmac', name: 'Joss Mackison' }, { github: 'jniechcial', name: 'Jakub Niechciał' }, { github: 'craigdallimore', name: 'Craig Dallimore' }, { github: 'julen', name: 'Julen Ruiz Aizpuru' }, { github: 'dcousens', name: 'Daniel Cousens' }, { github: 'jgautsch', name: 'Jon Gautsch' }, { github: 'dmitry-smirnov', name: 'Dmitry Smirnov' }];
-},{}],9:[function(require,module,exports){
+},{}],11:[function(require,module,exports){
'use strict';
exports.AU = [{ value: 'australian-capital-territory', label: 'Australian Capital Territory', className: 'State-ACT' }, { value: 'new-south-wales', label: 'New South Wales', className: 'State-NSW' }, { value: 'victoria', label: 'Victoria', className: 'State-Vic' }, { value: 'queensland', label: 'Queensland', className: 'State-Qld' }, { value: 'western-australia', label: 'Western Australia', className: 'State-WA' }, { value: 'south-australia', label: 'South Australia', className: 'State-SA' }, { value: 'tasmania', label: 'Tasmania', className: 'State-Tas' }, { value: 'northern-territory', label: 'Northern Territory', className: 'State-NT' }];
exports.US = [{ value: 'AL', label: 'Alabama', disabled: true }, { value: 'AK', label: 'Alaska' }, { value: 'AS', label: 'American Samoa' }, { value: 'AZ', label: 'Arizona' }, { value: 'AR', label: 'Arkansas' }, { value: 'CA', label: 'California' }, { value: 'CO', label: 'Colorado' }, { value: 'CT', label: 'Connecticut' }, { value: 'DE', label: 'Delaware' }, { value: 'DC', label: 'District Of Columbia' }, { value: 'FM', label: 'Federated States Of Micronesia' }, { value: 'FL', label: 'Florida' }, { value: 'GA', label: 'Georgia' }, { value: 'GU', label: 'Guam' }, { value: 'HI', label: 'Hawaii' }, { value: 'ID', label: 'Idaho' }, { value: 'IL', label: 'Illinois' }, { value: 'IN', label: 'Indiana' }, { value: 'IA', label: 'Iowa' }, { value: 'KS', label: 'Kansas' }, { value: 'KY', label: 'Kentucky' }, { value: 'LA', label: 'Louisiana' }, { value: 'ME', label: 'Maine' }, { value: 'MH', label: 'Marshall Islands' }, { value: 'MD', label: 'Maryland' }, { value: 'MA', label: 'Massachusetts' }, { value: 'MI', label: 'Michigan' }, { value: 'MN', label: 'Minnesota' }, { value: 'MS', label: 'Mississippi' }, { value: 'MO', label: 'Missouri' }, { value: 'MT', label: 'Montana' }, { value: 'NE', label: 'Nebraska' }, { value: 'NV', label: 'Nevada' }, { value: 'NH', label: 'New Hampshire' }, { value: 'NJ', label: 'New Jersey' }, { value: 'NM', label: 'New Mexico' }, { value: 'NY', label: 'New York' }, { value: 'NC', label: 'North Carolina' }, { value: 'ND', label: 'North Dakota' }, { value: 'MP', label: 'Northern Mariana Islands' }, { value: 'OH', label: 'Ohio' }, { value: 'OK', label: 'Oklahoma' }, { value: 'OR', label: 'Oregon' }, { value: 'PW', label: 'Palau' }, { value: 'PA', label: 'Pennsylvania' }, { value: 'PR', label: 'Puerto Rico' }, { value: 'RI', label: 'Rhode Island' }, { value: 'SC', label: 'South Carolina' }, { value: 'SD', label: 'South Dakota' }, { value: 'TN', label: 'Tennessee' }, { value: 'TX', label: 'Texas' }, { value: 'UT', label: 'Utah' }, { value: 'VT', label: 'Vermont' }, { value: 'VI', label: 'Virgin Islands' }, { value: 'VA', label: 'Virginia' }, { value: 'WA', label: 'Washington' }, { value: 'WV', label: 'West Virginia' }, { value: 'WI', label: 'Wisconsin' }, { value: 'WY', label: 'Wyoming' }];
-},{}],10:[function(require,module,exports){
+},{}],12:[function(require,module,exports){
'use strict';
module.exports = [{ value: 'John Smith', label: 'John Smith', email: 'john@smith.com' }, { value: 'Merry Jane', label: 'Merry Jane', email: 'merry@jane.com' }, { value: 'Stan Hoper', label: 'Stan Hoper', email: 'stan@hoper.com' }];
-},{}],11:[function(require,module,exports){
-var charenc = {
- // UTF-8 encoding
- utf8: {
- // Convert a string to a byte array
- stringToBytes: function(str) {
- return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));
- },
-
- // Convert a byte array to a string
- bytesToString: function(bytes) {
- return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));
+},{}],13:[function(require,module,exports){
+// shim for using process in browser
+
+var process = module.exports = {};
+var queue = [];
+var draining = false;
+var currentQueue;
+var queueIndex = -1;
+
+function cleanUpNextTick() {
+ draining = false;
+ if (currentQueue.length) {
+ queue = currentQueue.concat(queue);
+ } else {
+ queueIndex = -1;
}
- },
+ if (queue.length) {
+ drainQueue();
+ }
+}
- // Binary encoding
- bin: {
- // Convert a string to a byte array
- stringToBytes: function(str) {
- for (var bytes = [], i = 0; i < str.length; i++)
- bytes.push(str.charCodeAt(i) & 0xFF);
- return bytes;
- },
+function drainQueue() {
+ if (draining) {
+ return;
+ }
+ var timeout = setTimeout(cleanUpNextTick);
+ draining = true;
+
+ 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;
+ clearTimeout(timeout);
+}
- // Convert a byte array to a string
- bytesToString: function(bytes) {
- for (var str = [], i = 0; i < bytes.length; i++)
- str.push(String.fromCharCode(bytes[i]));
- return str.join('');
+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) {
+ setTimeout(drainQueue, 0);
}
- }
};
-module.exports = charenc;
+// 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 = {};
+
+function noop() {}
+
+process.on = noop;
+process.addListener = noop;
+process.once = noop;
+process.off = noop;
+process.removeListener = noop;
+process.removeAllListeners = noop;
+process.emit = noop;
+
+process.binding = function (name) {
+ throw new Error('process.binding is not supported');
+};
-},{}],12:[function(require,module,exports){
-(function() {
- var base64map
- = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
+process.cwd = function () { return '/' };
+process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported');
+};
+process.umask = function() { return 0; };
- crypt = {
- // Bit-wise rotation left
- rotl: function(n, b) {
- return (n << b) | (n >>> (32 - b));
- },
+},{}],14:[function(require,module,exports){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
- // Bit-wise rotation right
- rotr: function(n, b) {
- return (n << (32 - b)) | (n >>> b);
- },
+'use strict';
- // Swap big-endian to little-endian and vice versa
- endian: function(n) {
- // If number given, swap endian
- if (n.constructor == Number) {
- return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;
- }
+// If obj.hasOwnProperty has been overridden, then calling
+// obj.hasOwnProperty(prop) will break.
+// See: https://github.com/joyent/node/issues/1707
+function hasOwnProperty(obj, prop) {
+ return Object.prototype.hasOwnProperty.call(obj, prop);
+}
- // Else, assume array and swap all items
- for (var i = 0; i < n.length; i++)
- n[i] = crypt.endian(n[i]);
- return n;
- },
+module.exports = function(qs, sep, eq, options) {
+ sep = sep || '&';
+ eq = eq || '=';
+ var obj = {};
- // Generate an array of any length of random bytes
- randomBytes: function(n) {
- for (var bytes = []; n > 0; n--)
- bytes.push(Math.floor(Math.random() * 256));
- return bytes;
- },
+ if (typeof qs !== 'string' || qs.length === 0) {
+ return obj;
+ }
- // Convert a byte array to big-endian 32-bit words
- bytesToWords: function(bytes) {
- for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)
- words[b >>> 5] |= bytes[i] << (24 - b % 32);
- return words;
- },
+ var regexp = /\+/g;
+ qs = qs.split(sep);
- // Convert big-endian 32-bit words to a byte array
- wordsToBytes: function(words) {
- for (var bytes = [], b = 0; b < words.length * 32; b += 8)
- bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);
- return bytes;
- },
+ var maxKeys = 1000;
+ if (options && typeof options.maxKeys === 'number') {
+ maxKeys = options.maxKeys;
+ }
- // Convert a byte array to a hex string
- bytesToHex: function(bytes) {
- for (var hex = [], i = 0; i < bytes.length; i++) {
- hex.push((bytes[i] >>> 4).toString(16));
- hex.push((bytes[i] & 0xF).toString(16));
- }
- return hex.join('');
- },
+ var len = qs.length;
+ // maxKeys <= 0 means that we should not limit keys count
+ if (maxKeys > 0 && len > maxKeys) {
+ len = maxKeys;
+ }
- // Convert a hex string to a byte array
- hexToBytes: function(hex) {
- for (var bytes = [], c = 0; c < hex.length; c += 2)
- bytes.push(parseInt(hex.substr(c, 2), 16));
- return bytes;
- },
+ for (var i = 0; i < len; ++i) {
+ var x = qs[i].replace(regexp, '%20'),
+ idx = x.indexOf(eq),
+ kstr, vstr, k, v;
- // Convert a byte array to a base-64 string
- bytesToBase64: function(bytes) {
- for (var base64 = [], i = 0; i < bytes.length; i += 3) {
- var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];
- for (var j = 0; j < 4; j++)
- if (i * 8 + j * 6 <= bytes.length * 8)
- base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));
- else
- base64.push('=');
- }
- return base64.join('');
- },
+ if (idx >= 0) {
+ kstr = x.substr(0, idx);
+ vstr = x.substr(idx + 1);
+ } else {
+ kstr = x;
+ vstr = '';
+ }
- // Convert a base-64 string to a byte array
- base64ToBytes: function(base64) {
- // Remove non-base-64 characters
- base64 = base64.replace(/[^A-Z0-9+\/]/ig, '');
+ k = decodeURIComponent(kstr);
+ v = decodeURIComponent(vstr);
- for (var bytes = [], i = 0, imod4 = 0; i < base64.length;
- imod4 = ++i % 4) {
- if (imod4 == 0) continue;
- bytes.push(((base64map.indexOf(base64.charAt(i - 1))
- & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))
- | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));
- }
- return bytes;
+ if (!hasOwnProperty(obj, k)) {
+ obj[k] = v;
+ } else if (isArray(obj[k])) {
+ obj[k].push(v);
+ } else {
+ obj[k] = [obj[k], v];
}
- };
+ }
- module.exports = crypt;
-})();
+ return obj;
+};
-},{}],13:[function(require,module,exports){
-/**
- * Determine if an object is Buffer
- *
- * Author: Feross Aboukhadijeh
- * License: MIT
- *
- * `npm install is-buffer`
- */
+var isArray = Array.isArray || function (xs) {
+ return Object.prototype.toString.call(xs) === '[object Array]';
+};
-module.exports = function (obj) {
- return !!(obj != null &&
- (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor)
- (obj.constructor &&
- typeof obj.constructor.isBuffer === 'function' &&
- obj.constructor.isBuffer(obj))
- ))
+},{}],15:[function(require,module,exports){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+'use strict';
+
+var stringifyPrimitive = function(v) {
+ switch (typeof v) {
+ case 'string':
+ return v;
+
+ case 'boolean':
+ return v ? 'true' : 'false';
+
+ case 'number':
+ return isFinite(v) ? v : '';
+
+ default:
+ return '';
+ }
+};
+
+module.exports = function(obj, sep, eq, name) {
+ sep = sep || '&';
+ eq = eq || '=';
+ if (obj === null) {
+ obj = undefined;
+ }
+
+ if (typeof obj === 'object') {
+ return map(objectKeys(obj), function(k) {
+ var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;
+ if (isArray(obj[k])) {
+ return map(obj[k], function(v) {
+ return ks + encodeURIComponent(stringifyPrimitive(v));
+ }).join(sep);
+ } else {
+ return ks + encodeURIComponent(stringifyPrimitive(obj[k]));
+ }
+ }).join(sep);
+
+ }
+
+ if (!name) return '';
+ return encodeURIComponent(stringifyPrimitive(name)) + eq +
+ encodeURIComponent(stringifyPrimitive(obj));
+};
+
+var isArray = Array.isArray || function (xs) {
+ return Object.prototype.toString.call(xs) === '[object Array]';
+};
+
+function map (xs, f) {
+ if (xs.map) return xs.map(f);
+ var res = [];
+ for (var i = 0; i < xs.length; i++) {
+ res.push(f(xs[i], i));
+ }
+ return res;
}
-},{}],14:[function(require,module,exports){
+var objectKeys = Object.keys || function (obj) {
+ var res = [];
+ for (var key in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);
+ }
+ return res;
+};
+
+},{}],16:[function(require,module,exports){
+'use strict';
+
+exports.decode = exports.parse = require('./decode');
+exports.encode = exports.stringify = require('./encode');
+
+},{"./decode":14,"./encode":15}],17:[function(require,module,exports){
+// Generated by CoffeeScript 1.10.0
+var React, isRetina, md5, querystring;
+
+React = require('react');
+
+md5 = require('md5');
+
+querystring = require('querystring');
+
+isRetina = require('is-retina');
+
+module.exports = React.createClass({
+ displayName: 'Gravatar',
+ propTypes: {
+ email: React.PropTypes.string,
+ md5: React.PropTypes.string,
+ size: React.PropTypes.number,
+ rating: React.PropTypes.string,
+ https: React.PropTypes.bool,
+ "default": React.PropTypes.string,
+ className: React.PropTypes.string
+ },
+ getDefaultProps: function() {
+ return {
+ size: 50,
+ rating: 'g',
+ https: false,
+ "default": "retro"
+ };
+ },
+ render: function() {
+ var base, hash, modernBrowser, query, retinaQuery, retinaSrc, src;
+ base = this.props.https ? "https://secure.gravatar.com/avatar/" : 'http://www.gravatar.com/avatar/';
+ query = querystring.stringify({
+ s: this.props.size,
+ r: this.props.rating,
+ d: this.props["default"]
+ });
+ retinaQuery = querystring.stringify({
+ s: this.props.size * 2,
+ r: this.props.rating,
+ d: this.props["default"]
+ });
+ if (this.props.md5) {
+ hash = this.props.md5;
+ } else if (this.props.email) {
+ hash = md5(this.props.email);
+ } else {
+ console.warn('Gravatar image can not be fetched. Either the "email" or "md5" prop must be specified.');
+ return React.createElement("script", null);
+ }
+ src = base + hash + "?" + query;
+ retinaSrc = base + hash + "?" + retinaQuery;
+ modernBrowser = true;
+ if (typeof window !== "undefined" && window !== null) {
+ modernBrowser = 'srcset' in document.createElement('img');
+ }
+ if (!modernBrowser && isRetina()) {
+ return React.createElement("img", React.__spread({
+ "style": this.props.style,
+ "className": "react-gravatar " + this.props.className,
+ "src": retinaSrc,
+ "height": this.props.size,
+ "width": this.props.size
+ }, this.props));
+ } else {
+ return React.createElement("img", React.__spread({
+ "style": this.props.style,
+ "className": "react-gravatar " + this.props.className,
+ "src": src,
+ "srcSet": retinaSrc + " 2x",
+ "height": this.props.size,
+ "width": this.props.size
+ }, this.props));
+ }
+ }
+});
+
+},{"is-retina":18,"md5":19,"querystring":16,"react":undefined}],18:[function(require,module,exports){
module.exports = function() {
var mediaQuery;
if (typeof window !== "undefined" && window !== null) {
@@ -924,7 +1280,7 @@ module.exports = function() {
return false;
};
-},{}],15:[function(require,module,exports){
+},{}],19:[function(require,module,exports){
(function(){
var crypt = require('crypt'),
utf8 = require('charenc').utf8,
@@ -1086,263 +1442,3545 @@ module.exports = function() {
})();
-},{"charenc":11,"crypt":12,"is-buffer":13}],16:[function(require,module,exports){
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-'use strict';
+},{"charenc":20,"crypt":21,"is-buffer":22}],20:[function(require,module,exports){
+var charenc = {
+ // UTF-8 encoding
+ utf8: {
+ // Convert a string to a byte array
+ stringToBytes: function(str) {
+ return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));
+ },
-// If obj.hasOwnProperty has been overridden, then calling
-// obj.hasOwnProperty(prop) will break.
-// See: https://github.com/joyent/node/issues/1707
-function hasOwnProperty(obj, prop) {
- return Object.prototype.hasOwnProperty.call(obj, prop);
-}
+ // Convert a byte array to a string
+ bytesToString: function(bytes) {
+ return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));
+ }
+ },
-module.exports = function(qs, sep, eq, options) {
- sep = sep || '&';
- eq = eq || '=';
- var obj = {};
+ // Binary encoding
+ bin: {
+ // Convert a string to a byte array
+ stringToBytes: function(str) {
+ for (var bytes = [], i = 0; i < str.length; i++)
+ bytes.push(str.charCodeAt(i) & 0xFF);
+ return bytes;
+ },
+
+ // Convert a byte array to a string
+ bytesToString: function(bytes) {
+ for (var str = [], i = 0; i < bytes.length; i++)
+ str.push(String.fromCharCode(bytes[i]));
+ return str.join('');
+ }
+ }
+};
+
+module.exports = charenc;
+
+},{}],21:[function(require,module,exports){
+(function() {
+ var base64map
+ = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
+
+ crypt = {
+ // Bit-wise rotation left
+ rotl: function(n, b) {
+ return (n << b) | (n >>> (32 - b));
+ },
+
+ // Bit-wise rotation right
+ rotr: function(n, b) {
+ return (n << (32 - b)) | (n >>> b);
+ },
+
+ // Swap big-endian to little-endian and vice versa
+ endian: function(n) {
+ // If number given, swap endian
+ if (n.constructor == Number) {
+ return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;
+ }
+
+ // Else, assume array and swap all items
+ for (var i = 0; i < n.length; i++)
+ n[i] = crypt.endian(n[i]);
+ return n;
+ },
+
+ // Generate an array of any length of random bytes
+ randomBytes: function(n) {
+ for (var bytes = []; n > 0; n--)
+ bytes.push(Math.floor(Math.random() * 256));
+ return bytes;
+ },
+
+ // Convert a byte array to big-endian 32-bit words
+ bytesToWords: function(bytes) {
+ for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)
+ words[b >>> 5] |= bytes[i] << (24 - b % 32);
+ return words;
+ },
+
+ // Convert big-endian 32-bit words to a byte array
+ wordsToBytes: function(words) {
+ for (var bytes = [], b = 0; b < words.length * 32; b += 8)
+ bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);
+ return bytes;
+ },
+
+ // Convert a byte array to a hex string
+ bytesToHex: function(bytes) {
+ for (var hex = [], i = 0; i < bytes.length; i++) {
+ hex.push((bytes[i] >>> 4).toString(16));
+ hex.push((bytes[i] & 0xF).toString(16));
+ }
+ return hex.join('');
+ },
+
+ // Convert a hex string to a byte array
+ hexToBytes: function(hex) {
+ for (var bytes = [], c = 0; c < hex.length; c += 2)
+ bytes.push(parseInt(hex.substr(c, 2), 16));
+ return bytes;
+ },
+
+ // Convert a byte array to a base-64 string
+ bytesToBase64: function(bytes) {
+ for (var base64 = [], i = 0; i < bytes.length; i += 3) {
+ var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];
+ for (var j = 0; j < 4; j++)
+ if (i * 8 + j * 6 <= bytes.length * 8)
+ base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));
+ else
+ base64.push('=');
+ }
+ return base64.join('');
+ },
+
+ // Convert a base-64 string to a byte array
+ base64ToBytes: function(base64) {
+ // Remove non-base-64 characters
+ base64 = base64.replace(/[^A-Z0-9+\/]/ig, '');
+
+ for (var bytes = [], i = 0, imod4 = 0; i < base64.length;
+ imod4 = ++i % 4) {
+ if (imod4 == 0) continue;
+ bytes.push(((base64map.indexOf(base64.charAt(i - 1))
+ & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))
+ | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));
+ }
+ return bytes;
+ }
+ };
+
+ module.exports = crypt;
+})();
+
+},{}],22:[function(require,module,exports){
+/**
+ * Determine if an object is Buffer
+ *
+ * Author: Feross Aboukhadijeh
+ * License: MIT
+ *
+ * `npm install is-buffer`
+ */
+
+module.exports = function (obj) {
+ return !!(obj != null &&
+ (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor)
+ (obj.constructor &&
+ typeof obj.constructor.isBuffer === 'function' &&
+ obj.constructor.isBuffer(obj))
+ ))
+}
+
+},{}],23:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _react = require('react');
+
+var _react2 = _interopRequireDefault(_react);
+
+var _reactAddonsShallowCompare = require('react-addons-shallow-compare');
+
+var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+/**
+ * This HOC decorates a virtualized component and responds to arrow-key events by scrolling one row or column at a time.
+ */
+
+var ArrowKeyStepper = function (_Component) {
+ _inherits(ArrowKeyStepper, _Component);
+
+ function ArrowKeyStepper(props, context) {
+ _classCallCheck(this, ArrowKeyStepper);
+
+ var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(ArrowKeyStepper).call(this, props, context));
+
+ _this.state = {
+ scrollToColumn: 0,
+ scrollToRow: 0
+ };
+
+ _this._columnStartIndex = 0;
+ _this._columnStopIndex = 0;
+ _this._rowStartIndex = 0;
+ _this._rowStopIndex = 0;
+
+ _this._onKeyDown = _this._onKeyDown.bind(_this);
+ _this._onSectionRendered = _this._onSectionRendered.bind(_this);
+ return _this;
+ }
+
+ _createClass(ArrowKeyStepper, [{
+ key: 'render',
+ value: function render() {
+ var _props = this.props;
+ var className = _props.className;
+ var children = _props.children;
+ var _state = this.state;
+ var scrollToColumn = _state.scrollToColumn;
+ var scrollToRow = _state.scrollToRow;
+
+
+ return _react2.default.createElement(
+ 'div',
+ {
+ className: className,
+ onKeyDown: this._onKeyDown
+ },
+ children({
+ onSectionRendered: this._onSectionRendered,
+ scrollToColumn: scrollToColumn,
+ scrollToRow: scrollToRow
+ })
+ );
+ }
+ }, {
+ key: 'shouldComponentUpdate',
+ value: function shouldComponentUpdate(nextProps, nextState) {
+ return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState);
+ }
+ }, {
+ key: '_onKeyDown',
+ value: function _onKeyDown(event) {
+ var _props2 = this.props;
+ var columnsCount = _props2.columnsCount;
+ var rowsCount = _props2.rowsCount;
+
+ // The above cases all prevent default event event behavior.
+ // This is to keep the grid from scrolling after the snap-to update.
+
+ switch (event.key) {
+ case 'ArrowDown':
+ event.preventDefault();
+ this.setState({
+ scrollToRow: Math.min(this._rowStopIndex + 1, rowsCount - 1)
+ });
+ break;
+ case 'ArrowLeft':
+ event.preventDefault();
+ this.setState({
+ scrollToColumn: Math.max(this._columnStartIndex - 1, 0)
+ });
+ break;
+ case 'ArrowRight':
+ event.preventDefault();
+ this.setState({
+ scrollToColumn: Math.min(this._columnStopIndex + 1, columnsCount - 1)
+ });
+ break;
+ case 'ArrowUp':
+ event.preventDefault();
+ this.setState({
+ scrollToRow: Math.max(this._rowStartIndex - 1, 0)
+ });
+ break;
+ }
+ }
+ }, {
+ key: '_onSectionRendered',
+ value: function _onSectionRendered(_ref) {
+ var columnStartIndex = _ref.columnStartIndex;
+ var columnStopIndex = _ref.columnStopIndex;
+ var rowStartIndex = _ref.rowStartIndex;
+ var rowStopIndex = _ref.rowStopIndex;
+
+ this._columnStartIndex = columnStartIndex;
+ this._columnStopIndex = columnStopIndex;
+ this._rowStartIndex = rowStartIndex;
+ this._rowStopIndex = rowStopIndex;
+ }
+ }]);
+
+ return ArrowKeyStepper;
+}(_react.Component);
+
+ArrowKeyStepper.propTypes = {
+ children: _react.PropTypes.func.isRequired,
+ className: _react.PropTypes.string,
+ columnsCount: _react.PropTypes.number.isRequired,
+ rowsCount: _react.PropTypes.number.isRequired
+};
+exports.default = ArrowKeyStepper;
+},{"react":undefined,"react-addons-shallow-compare":49}],24:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.ArrowKeyStepper = exports.default = undefined;
+
+var _ArrowKeyStepper2 = require('./ArrowKeyStepper');
+
+var _ArrowKeyStepper3 = _interopRequireDefault(_ArrowKeyStepper2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = _ArrowKeyStepper3.default;
+exports.ArrowKeyStepper = _ArrowKeyStepper3.default;
+},{"./ArrowKeyStepper":23}],25:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _react = require('react');
+
+var _react2 = _interopRequireDefault(_react);
+
+var _reactAddonsShallowCompare = require('react-addons-shallow-compare');
+
+var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+/**
+ * Decorator component that automatically adjusts the width and height of a single child.
+ * Child component should not be declared as a child but should rather be specified by a `ChildComponent` property.
+ * All other properties will be passed through to the child component.
+ */
+
+var AutoSizer = function (_Component) {
+ _inherits(AutoSizer, _Component);
+
+ function AutoSizer(props) {
+ _classCallCheck(this, AutoSizer);
+
+ var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(AutoSizer).call(this, props));
+
+ _this.state = {
+ height: 0,
+ width: 0
+ };
+
+ _this._onResize = _this._onResize.bind(_this);
+ _this._onScroll = _this._onScroll.bind(_this);
+ _this._setRef = _this._setRef.bind(_this);
+ return _this;
+ }
+
+ _createClass(AutoSizer, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ // Defer requiring resize handler in order to support server-side rendering.
+ // See issue #41
+ this._detectElementResize = require('../vendor/detectElementResize');
+ this._detectElementResize.addResizeListener(this._parentNode, this._onResize);
+
+ this._onResize();
+ }
+ }, {
+ key: 'componentWillUnmount',
+ value: function componentWillUnmount() {
+ this._detectElementResize.removeResizeListener(this._parentNode, this._onResize);
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props = this.props;
+ var children = _props.children;
+ var disableHeight = _props.disableHeight;
+ var disableWidth = _props.disableWidth;
+ var _state = this.state;
+ var height = _state.height;
+ var width = _state.width;
+
+ // Outer div should not force width/height since that may prevent containers from shrinking.
+ // Inner component should overflow and use calculated width/height.
+ // See issue #68 for more information.
+
+ var outerStyle = { overflow: 'visible' };
+
+ if (!disableHeight) {
+ outerStyle.height = 0;
+ }
+
+ if (!disableWidth) {
+ outerStyle.width = 0;
+ }
+
+ return _react2.default.createElement(
+ 'div',
+ {
+ ref: this._setRef,
+ onScroll: this._onScroll,
+ style: outerStyle
+ },
+ children({ height: height, width: width })
+ );
+ }
+ }, {
+ key: 'shouldComponentUpdate',
+ value: function shouldComponentUpdate(nextProps, nextState) {
+ return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState);
+ }
+ }, {
+ key: '_onResize',
+ value: function _onResize() {
+ var onResize = this.props.onResize;
+
+ var _parentNode$getBoundi = this._parentNode.getBoundingClientRect();
+
+ var height = _parentNode$getBoundi.height;
+ var width = _parentNode$getBoundi.width;
+
+
+ var style = getComputedStyle(this._parentNode);
+ var paddingLeft = parseInt(style.paddingLeft, 10);
+ var paddingRight = parseInt(style.paddingRight, 10);
+ var paddingTop = parseInt(style.paddingTop, 10);
+ var paddingBottom = parseInt(style.paddingBottom, 10);
+
+ this.setState({
+ height: height - paddingTop - paddingBottom,
+ width: width - paddingLeft - paddingRight
+ });
+
+ onResize({ height: height, width: width });
+ }
+ }, {
+ key: '_onScroll',
+ value: function _onScroll(event) {
+ // Prevent detectElementResize library from being triggered by this scroll event.
+ event.stopPropagation();
+ }
+ }, {
+ key: '_setRef',
+ value: function _setRef(autoSizer) {
+ // In case the component has been unmounted
+ this._parentNode = autoSizer && autoSizer.parentNode;
+ }
+ }]);
+
+ return AutoSizer;
+}(_react.Component);
+
+AutoSizer.propTypes = {
+ /**
+ * Function respondible for rendering children.
+ * This function should implement the following signature:
+ * ({ height, width }) => PropTypes.element
+ */
+ children: _react.PropTypes.func.isRequired,
+
+ /** Disable dynamic :height property */
+ disableHeight: _react.PropTypes.bool,
+
+ /** Disable dynamic :width property */
+ disableWidth: _react.PropTypes.bool,
+
+ /** Callback to be invoked on-resize: ({ height, width }) */
+ onResize: _react.PropTypes.func.isRequired
+};
+AutoSizer.defaultProps = {
+ onResize: function onResize() {}
+};
+exports.default = AutoSizer;
+},{"../vendor/detectElementResize":44,"react":undefined,"react-addons-shallow-compare":49}],26:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.AutoSizer = exports.default = undefined;
+
+var _AutoSizer2 = require('./AutoSizer');
+
+var _AutoSizer3 = _interopRequireDefault(_AutoSizer2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = _AutoSizer3.default;
+exports.AutoSizer = _AutoSizer3.default;
+},{"./AutoSizer":25}],27:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _react = require('react');
+
+var _reactAddonsShallowCompare = require('react-addons-shallow-compare');
+
+var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);
+
+var _Grid = require('../Grid');
+
+var _Grid2 = _interopRequireDefault(_Grid);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+/**
+ * High-order component that auto-calculates column-widths for `Grid` cells.
+ */
+
+var ColumnSizer = function (_Component) {
+ _inherits(ColumnSizer, _Component);
+
+ function ColumnSizer(props, context) {
+ _classCallCheck(this, ColumnSizer);
+
+ var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(ColumnSizer).call(this, props, context));
+
+ _this._registerChild = _this._registerChild.bind(_this);
+ return _this;
+ }
+
+ _createClass(ColumnSizer, [{
+ key: 'componentDidUpdate',
+ value: function componentDidUpdate(prevProps, prevState) {
+ var _props = this.props;
+ var columnMaxWidth = _props.columnMaxWidth;
+ var columnMinWidth = _props.columnMinWidth;
+ var columnsCount = _props.columnsCount;
+ var width = _props.width;
+
+
+ if (columnMaxWidth !== prevProps.columnMaxWidth || columnMinWidth !== prevProps.columnMinWidth || columnsCount !== prevProps.columnsCount || width !== prevProps.width) {
+ if (this._registeredChild) {
+ this._registeredChild.recomputeGridSize();
+ }
+ }
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props2 = this.props;
+ var children = _props2.children;
+ var columnMaxWidth = _props2.columnMaxWidth;
+ var columnMinWidth = _props2.columnMinWidth;
+ var columnsCount = _props2.columnsCount;
+ var width = _props2.width;
+
+
+ var safeColumnMinWidth = columnMinWidth || 1;
+
+ var safeColumnMaxWidth = columnMaxWidth ? Math.min(columnMaxWidth, width) : width;
+
+ var columnWidth = width / columnsCount;
+ columnWidth = Math.max(safeColumnMinWidth, columnWidth);
+ columnWidth = Math.min(safeColumnMaxWidth, columnWidth);
+ columnWidth = Math.floor(columnWidth);
+
+ var adjustedWidth = Math.min(width, columnWidth * columnsCount);
+
+ return children({
+ adjustedWidth: adjustedWidth,
+ getColumnWidth: function getColumnWidth() {
+ return columnWidth;
+ },
+ registerChild: this._registerChild
+ });
+ }
+ }, {
+ key: 'shouldComponentUpdate',
+ value: function shouldComponentUpdate(nextProps, nextState) {
+ return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState);
+ }
+ }, {
+ key: '_registerChild',
+ value: function _registerChild(child) {
+ if (child !== null && !(child instanceof _Grid2.default)) {
+ throw Error('Unexpected child type registered; only Grid children are supported.');
+ }
+
+ this._registeredChild = child;
+
+ if (this._registeredChild) {
+ this._registeredChild.recomputeGridSize();
+ }
+ }
+ }]);
+
+ return ColumnSizer;
+}(_react.Component);
+
+ColumnSizer.propTypes = {
+ /**
+ * Function respondible for rendering a virtualized Grid.
+ * This function should implement the following signature:
+ * ({ adjustedWidth, getColumnWidth, registerChild }) => PropTypes.element
+ *
+ * The specified :getColumnWidth function should be passed to the Grid's :columnWidth property.
+ * The :registerChild should be passed to the Grid's :ref property.
+ * The :adjustedWidth property is optional; it reflects the lesser of the overall width or the width of all columns.
+ */
+ children: _react.PropTypes.func.isRequired,
+
+ /** Optional maximum allowed column width */
+ columnMaxWidth: _react.PropTypes.number,
+
+ /** Optional minimum allowed column width */
+ columnMinWidth: _react.PropTypes.number,
+
+ /** Number of columns in Grid or FlexTable child */
+ columnsCount: _react.PropTypes.number.isRequired,
+
+ /** Width of Grid or FlexTable child */
+ width: _react.PropTypes.number.isRequired
+};
+exports.default = ColumnSizer;
+},{"../Grid":36,"react":undefined,"react-addons-shallow-compare":49}],28:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.ColumnSizer = exports.default = undefined;
+
+var _ColumnSizer2 = require('./ColumnSizer');
+
+var _ColumnSizer3 = _interopRequireDefault(_ColumnSizer2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = _ColumnSizer3.default;
+exports.ColumnSizer = _ColumnSizer3.default;
+},{"./ColumnSizer":27}],29:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.defaultCellRenderer = defaultCellRenderer;
+exports.defaultCellDataGetter = defaultCellDataGetter;
+exports.defaultHeaderRenderer = defaultHeaderRenderer;
+
+var _react = require('react');
+
+var _react2 = _interopRequireDefault(_react);
+
+var _SortIndicator = require('./SortIndicator');
+
+var _SortIndicator2 = _interopRequireDefault(_SortIndicator);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+/**
+ * Default cell renderer that displays an attribute as a simple string
+ * You should override the column's cellRenderer if your data is some other type of object.
+ */
+function defaultCellRenderer(cellData, cellDataKey, rowData, rowIndex, columnData) {
+ if (cellData === null || cellData === undefined) {
+ return '';
+ } else {
+ return String(cellData);
+ }
+}
+
+/**
+ * Default accessor for returning a cell value for a given attribute.
+ * This function expects to operate on either a vanilla Object or an Immutable Map.
+ * You should override the column's cellDataGetter if your data is some other type of object.
+ */
+function defaultCellDataGetter(dataKey, rowData, columnData) {
+ if (rowData.get instanceof Function) {
+ return rowData.get(dataKey);
+ } else {
+ return rowData[dataKey];
+ }
+}
+
+/**
+ * Default table header renderer.
+ */
+function defaultHeaderRenderer(_ref) {
+ var columnData = _ref.columnData;
+ var dataKey = _ref.dataKey;
+ var disableSort = _ref.disableSort;
+ var label = _ref.label;
+ var sortBy = _ref.sortBy;
+ var sortDirection = _ref.sortDirection;
+
+ var showSortIndicator = sortBy === dataKey;
+ var children = [_react2.default.createElement(
+ 'div',
+ {
+ className: 'FlexTable__headerTruncatedText',
+ key: 'label',
+ title: label
+ },
+ label
+ )];
+
+ if (showSortIndicator) {
+ children.push(_react2.default.createElement(_SortIndicator2.default, {
+ key: 'SortIndicator',
+ sortDirection: sortDirection
+ }));
+ }
+
+ return children;
+}
+
+/**
+ * Describes the header and cell contents of a table column.
+ */
+
+var Column = function (_Component) {
+ _inherits(Column, _Component);
+
+ function Column() {
+ _classCallCheck(this, Column);
+
+ return _possibleConstructorReturn(this, Object.getPrototypeOf(Column).apply(this, arguments));
+ }
+
+ return Column;
+}(_react.Component);
+
+Column.defaultProps = {
+ cellDataGetter: defaultCellDataGetter,
+ cellRenderer: defaultCellRenderer,
+ flexGrow: 0,
+ flexShrink: 1,
+ headerRenderer: defaultHeaderRenderer
+};
+Column.propTypes = {
+ /** Optional CSS class to apply to cell */
+ cellClassName: _react.PropTypes.string,
+
+ /**
+ * Callback responsible for returning a cell's data, given its :dataKey
+ * (dataKey: string, rowData: any): any
+ */
+ cellDataGetter: _react.PropTypes.func,
+
+ /**
+ * Callback responsible for rendering a cell's contents.
+ * (cellData: any, cellDataKey: string, rowData: any, rowIndex: number, columnData: any): element
+ */
+ cellRenderer: _react.PropTypes.func,
+
+ /** Optional additional data passed to this column's :cellDataGetter */
+ columnData: _react.PropTypes.object,
+
+ /** Uniquely identifies the row-data attribute correspnding to this cell */
+ dataKey: _react.PropTypes.any.isRequired,
+
+ /** If sort is enabled for the table at large, disable it for this column */
+ disableSort: _react.PropTypes.bool,
+
+ /** Flex grow style; defaults to 0 */
+ flexGrow: _react.PropTypes.number,
+
+ /** Flex shrink style; defaults to 1 */
+ flexShrink: _react.PropTypes.number,
+
+ /** Optional CSS class to apply to this column's header */
+ headerClassName: _react.PropTypes.string,
+
+ /**
+ * Optional callback responsible for rendering a column header contents.
+ * ({ columnData: object, dataKey: string, disableSort: boolean, label: string, sortBy: string, sortDirection: string }): PropTypes.node
+ */
+ headerRenderer: _react.PropTypes.func.isRequired,
+
+ /** Header label for this column */
+ label: _react.PropTypes.string,
+
+ /** Maximum width of column; this property will only be used if :flexGrow is > 0. */
+ maxWidth: _react.PropTypes.number,
+
+ /** Minimum width of column. */
+ minWidth: _react.PropTypes.number,
+
+ /** Flex basis (width) for this column; This value can grow or shrink based on :flexGrow and :flexShrink properties. */
+ width: _react.PropTypes.number.isRequired
+};
+exports.default = Column;
+},{"./SortIndicator":32,"react":undefined}],30:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _classnames = require('classnames');
+
+var _classnames2 = _interopRequireDefault(_classnames);
+
+var _FlexColumn = require('./FlexColumn');
+
+var _FlexColumn2 = _interopRequireDefault(_FlexColumn);
+
+var _react = require('react');
+
+var _react2 = _interopRequireDefault(_react);
+
+var _reactDom = require('react-dom');
+
+var _reactAddonsShallowCompare = require('react-addons-shallow-compare');
+
+var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);
+
+var _Grid = require('../Grid');
+
+var _Grid2 = _interopRequireDefault(_Grid);
+
+var _SortDirection = require('./SortDirection');
+
+var _SortDirection2 = _interopRequireDefault(_SortDirection);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+/**
+ * Table component with fixed headers and virtualized rows for improved performance with large data sets.
+ * This component expects explicit width, height, and padding parameters.
+ */
+
+var FlexTable = function (_Component) {
+ _inherits(FlexTable, _Component);
+
+ function FlexTable(props) {
+ _classCallCheck(this, FlexTable);
+
+ var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(FlexTable).call(this, props));
+
+ _this.state = {
+ scrollbarWidth: 0
+ };
+
+ _this._createRow = _this._createRow.bind(_this);
+ return _this;
+ }
+
+ /**
+ * See Grid#recomputeGridSize
+ */
+
+
+ _createClass(FlexTable, [{
+ key: 'recomputeRowHeights',
+ value: function recomputeRowHeights() {
+ this.refs.Grid.recomputeGridSize();
+ }
+ }, {
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ this._setScrollbarWidth();
+ }
+ }, {
+ key: 'componentDidUpdate',
+ value: function componentDidUpdate() {
+ this._setScrollbarWidth();
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _this2 = this;
+
+ var _props = this.props;
+ var className = _props.className;
+ var disableHeader = _props.disableHeader;
+ var headerHeight = _props.headerHeight;
+ var height = _props.height;
+ var noRowsRenderer = _props.noRowsRenderer;
+ var onRowsRendered = _props.onRowsRendered;
+ var _onScroll = _props.onScroll;
+ var overscanRowsCount = _props.overscanRowsCount;
+ var rowClassName = _props.rowClassName;
+ var rowHeight = _props.rowHeight;
+ var rowsCount = _props.rowsCount;
+ var scrollToIndex = _props.scrollToIndex;
+ var scrollTop = _props.scrollTop;
+ var width = _props.width;
+ var scrollbarWidth = this.state.scrollbarWidth;
+
+
+ var availableRowsHeight = height - headerHeight;
+
+ // This row-renderer wrapper function is necessary in order to trigger re-render when the
+ // sort-by or sort-direction have changed (else Grid will not see any props changes)
+ var rowRenderer = function rowRenderer(index) {
+ return _this2._createRow(index);
+ };
+
+ var rowClass = rowClassName instanceof Function ? rowClassName(-1) : rowClassName;
+
+ return _react2.default.createElement(
+ 'div',
+ {
+ className: (0, _classnames2.default)('FlexTable', className)
+ },
+ !disableHeader && _react2.default.createElement(
+ 'div',
+ {
+ className: (0, _classnames2.default)('FlexTable__headerRow', rowClass),
+ style: {
+ height: headerHeight,
+ paddingRight: scrollbarWidth,
+ width: width
+ }
+ },
+ this._getRenderedHeaderRow()
+ ),
+ _react2.default.createElement(_Grid2.default, {
+ ref: 'Grid',
+ className: 'FlexTable__Grid',
+ columnWidth: width,
+ columnsCount: 1,
+ height: availableRowsHeight,
+ noContentRenderer: noRowsRenderer,
+ onScroll: function onScroll(_ref) {
+ var clientHeight = _ref.clientHeight;
+ var scrollHeight = _ref.scrollHeight;
+ var scrollTop = _ref.scrollTop;
+ return _onScroll({ clientHeight: clientHeight, scrollHeight: scrollHeight, scrollTop: scrollTop });
+ },
+ onSectionRendered: function onSectionRendered(_ref2) {
+ var rowOverscanStartIndex = _ref2.rowOverscanStartIndex;
+ var rowOverscanStopIndex = _ref2.rowOverscanStopIndex;
+ var rowStartIndex = _ref2.rowStartIndex;
+ var rowStopIndex = _ref2.rowStopIndex;
+ return onRowsRendered({
+ overscanStartIndex: rowOverscanStartIndex,
+ overscanStopIndex: rowOverscanStopIndex,
+ startIndex: rowStartIndex,
+ stopIndex: rowStopIndex
+ });
+ },
+ overscanRowsCount: overscanRowsCount,
+ renderCell: function renderCell(_ref3) {
+ var columnIndex = _ref3.columnIndex;
+ var rowIndex = _ref3.rowIndex;
+ return rowRenderer(rowIndex);
+ },
+ rowHeight: rowHeight,
+ rowsCount: rowsCount,
+ scrollToRow: scrollToIndex,
+ scrollTop: scrollTop,
+ width: width
+ })
+ );
+ }
+ }, {
+ key: 'shouldComponentUpdate',
+ value: function shouldComponentUpdate(nextProps, nextState) {
+ return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState);
+ }
+ }, {
+ key: '_createColumn',
+ value: function _createColumn(column, columnIndex, rowData, rowIndex) {
+ var _column$props = column.props;
+ var cellClassName = _column$props.cellClassName;
+ var cellDataGetter = _column$props.cellDataGetter;
+ var columnData = _column$props.columnData;
+ var dataKey = _column$props.dataKey;
+ var cellRenderer = _column$props.cellRenderer;
+
+ var cellData = cellDataGetter(dataKey, rowData, columnData);
+ var renderedCell = cellRenderer(cellData, dataKey, rowData, rowIndex, columnData);
+
+ var style = this._getFlexStyleForColumn(column);
+
+ var title = typeof renderedCell === 'string' ? renderedCell : null;
+
+ return _react2.default.createElement(
+ 'div',
+ {
+ key: 'Row' + rowIndex + '-Col' + columnIndex,
+ className: (0, _classnames2.default)('FlexTable__rowColumn', cellClassName),
+ style: style
+ },
+ _react2.default.createElement(
+ 'div',
+ {
+ className: 'FlexTable__truncatedColumnText',
+ title: title
+ },
+ renderedCell
+ )
+ );
+ }
+ }, {
+ key: '_createHeader',
+ value: function _createHeader(column, columnIndex) {
+ var _props2 = this.props;
+ var headerClassName = _props2.headerClassName;
+ var onHeaderClick = _props2.onHeaderClick;
+ var sort = _props2.sort;
+ var sortBy = _props2.sortBy;
+ var sortDirection = _props2.sortDirection;
+ var _column$props2 = column.props;
+ var dataKey = _column$props2.dataKey;
+ var disableSort = _column$props2.disableSort;
+ var headerRenderer = _column$props2.headerRenderer;
+ var label = _column$props2.label;
+ var columnData = _column$props2.columnData;
+
+ var sortEnabled = !disableSort && sort;
+
+ var classNames = (0, _classnames2.default)('FlexTable__headerColumn', headerClassName, column.props.headerClassName, {
+ 'FlexTable__sortableHeaderColumn': sortEnabled
+ });
+ var style = this._getFlexStyleForColumn(column);
+
+ // If this is a sortable header, clicking it should update the table data's sorting.
+ var newSortDirection = sortBy !== dataKey || sortDirection === _SortDirection2.default.DESC ? _SortDirection2.default.ASC : _SortDirection2.default.DESC;
+ var onClick = function onClick() {
+ sortEnabled && sort(dataKey, newSortDirection);
+ onHeaderClick(dataKey, columnData);
+ };
+
+ var renderedHeader = headerRenderer({
+ columnData: columnData,
+ dataKey: dataKey,
+ disableSort: disableSort,
+ label: label,
+ sortBy: sortBy,
+ sortDirection: sortDirection
+ });
+
+ return _react2.default.createElement(
+ 'div',
+ {
+ key: 'Header-Col' + columnIndex,
+ className: classNames,
+ style: style,
+ onClick: onClick
+ },
+ renderedHeader
+ );
+ }
+ }, {
+ key: '_createRow',
+ value: function _createRow(rowIndex) {
+ var _this3 = this;
+
+ var _props3 = this.props;
+ var children = _props3.children;
+ var onRowClick = _props3.onRowClick;
+ var rowClassName = _props3.rowClassName;
+ var rowGetter = _props3.rowGetter;
+ var scrollbarWidth = this.state.scrollbarWidth;
+
+
+ var rowClass = rowClassName instanceof Function ? rowClassName(rowIndex) : rowClassName;
+ var rowData = rowGetter(rowIndex);
+
+ var renderedRow = _react2.default.Children.map(children, function (column, columnIndex) {
+ return _this3._createColumn(column, columnIndex, rowData, rowIndex);
+ });
+
+ return _react2.default.createElement(
+ 'div',
+ {
+ key: rowIndex,
+ className: (0, _classnames2.default)('FlexTable__row', rowClass),
+ onClick: function onClick() {
+ return onRowClick(rowIndex);
+ },
+ style: {
+ height: this._getRowHeight(rowIndex),
+ paddingRight: scrollbarWidth
+ }
+ },
+ renderedRow
+ );
+ }
+
+ /**
+ * Determines the flex-shrink, flex-grow, and width values for a cell (header or column).
+ */
+
+ }, {
+ key: '_getFlexStyleForColumn',
+ value: function _getFlexStyleForColumn(column) {
+ var flexValue = column.props.flexGrow + ' ' + column.props.flexShrink + ' ' + column.props.width + 'px';
+
+ var style = {
+ flex: flexValue,
+ msFlex: flexValue,
+ WebkitFlex: flexValue
+ };
+
+ if (column.props.maxWidth) {
+ style.maxWidth = column.props.maxWidth;
+ }
+
+ if (column.props.minWidth) {
+ style.minWidth = column.props.minWidth;
+ }
+
+ return style;
+ }
+ }, {
+ key: '_getRenderedHeaderRow',
+ value: function _getRenderedHeaderRow() {
+ var _this4 = this;
+
+ var _props4 = this.props;
+ var children = _props4.children;
+ var disableHeader = _props4.disableHeader;
+
+ var items = disableHeader ? [] : children;
+
+ return _react2.default.Children.map(items, function (column, index) {
+ return _this4._createHeader(column, index);
+ });
+ }
+ }, {
+ key: '_getRowHeight',
+ value: function _getRowHeight(rowIndex) {
+ var rowHeight = this.props.rowHeight;
+
+
+ return rowHeight instanceof Function ? rowHeight(rowIndex) : rowHeight;
+ }
+ }, {
+ key: '_setScrollbarWidth',
+ value: function _setScrollbarWidth() {
+ var Grid = (0, _reactDom.findDOMNode)(this.refs.Grid);
+ var clientWidth = Grid.clientWidth || 0;
+ var offsetWidth = Grid.offsetWidth || 0;
+ var scrollbarWidth = offsetWidth - clientWidth;
+
+ this.setState({ scrollbarWidth: scrollbarWidth });
+ }
+ }]);
+
+ return FlexTable;
+}(_react.Component);
+
+FlexTable.propTypes = {
+ /** One or more FlexColumns describing the data displayed in this row */
+ children: function children(props, propName, componentName) {
+ var children = _react2.default.Children.toArray(props.children);
+ for (var i = 0; i < children.length; i++) {
+ if (children[i].type !== _FlexColumn2.default) {
+ return new Error('FlexTable only accepts children of type FlexColumn');
+ }
+ }
+ },
+
+ /** Optional CSS class name */
+ className: _react.PropTypes.string,
+
+ /** Disable rendering the header at all */
+ disableHeader: _react.PropTypes.bool,
+
+ /** Optional CSS class to apply to all column headers */
+ headerClassName: _react.PropTypes.string,
+
+ /** Fixed height of header row */
+ headerHeight: _react.PropTypes.number.isRequired,
+
+ /** Fixed/available height for out DOM element */
+ height: _react.PropTypes.number.isRequired,
+
+ /** Optional renderer to be used in place of table body rows when rowsCount is 0 */
+ noRowsRenderer: _react.PropTypes.func,
+
+ /**
+ * Optional callback when a column's header is clicked.
+ * (dataKey: string): void
+ */
+ onHeaderClick: _react.PropTypes.func,
+
+ /**
+ * Callback invoked when a user clicks on a table row.
+ * (rowIndex: number): void
+ */
+ onRowClick: _react.PropTypes.func,
+
+ /**
+ * Callback invoked with information about the slice of rows that were just rendered.
+ * ({ startIndex, stopIndex }): void
+ */
+ onRowsRendered: _react.PropTypes.func,
+
+ /**
+ * Callback invoked whenever the scroll offset changes within the inner scrollable region.
+ * This callback can be used to sync scrolling between lists, tables, or grids.
+ * ({ clientHeight, scrollHeight, scrollTop }): void
+ */
+ onScroll: _react.PropTypes.func.isRequired,
+
+ /**
+ * Number of rows to render above/below the visible bounds of the list.
+ * These rows can help for smoother scrolling on touch devices.
+ */
+ overscanRowsCount: _react.PropTypes.number.isRequired,
+
+ /**
+ * Optional CSS class to apply to all table rows (including the header row).
+ * This property can be a CSS class name (string) or a function that returns a class name.
+ * If a function is provided its signature should be: (rowIndex: number): string
+ */
+ rowClassName: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.func]),
+
+ /**
+ * Callback responsible for returning a data row given an index.
+ * (index: number): any
+ */
+ rowGetter: _react.PropTypes.func.isRequired,
+
+ /**
+ * Either a fixed row height (number) or a function that returns the height of a row given its index.
+ * (index: number): number
+ */
+ rowHeight: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.func]).isRequired,
+
+ /** Number of rows in table. */
+ rowsCount: _react.PropTypes.number.isRequired,
+
+ /** Row index to ensure visible (by forcefully scrolling if necessary) */
+ scrollToIndex: _react.PropTypes.number,
+
+ /** Vertical offset. */
+ scrollTop: _react.PropTypes.number,
+
+ /**
+ * Sort function to be called if a sortable header is clicked.
+ * (dataKey: string, sortDirection: SortDirection): void
+ */
+ sort: _react.PropTypes.func,
+
+ /** FlexTable data is currently sorted by this :dataKey (if it is sorted at all) */
+ sortBy: _react.PropTypes.string,
+
+ /** FlexTable data is currently sorted in this direction (if it is sorted at all) */
+ sortDirection: _react.PropTypes.oneOf([_SortDirection2.default.ASC, _SortDirection2.default.DESC]),
+
+ /** Width of list */
+ width: _react.PropTypes.number.isRequired
+};
+FlexTable.defaultProps = {
+ disableHeader: false,
+ headerHeight: 0,
+ noRowsRenderer: function noRowsRenderer() {
+ return null;
+ },
+ onHeaderClick: function onHeaderClick() {
+ return null;
+ },
+ onRowClick: function onRowClick() {
+ return null;
+ },
+ onRowsRendered: function onRowsRendered() {
+ return null;
+ },
+ onScroll: function onScroll() {
+ return null;
+ },
+ overscanRowsCount: 10
+};
+exports.default = FlexTable;
+},{"../Grid":36,"./FlexColumn":29,"./SortDirection":31,"classnames":undefined,"react":undefined,"react-addons-shallow-compare":49,"react-dom":undefined}],31:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+var SortDirection = {
+ /**
+ * Sort items in ascending order.
+ * This means arranging from the lowest value to the highest (e.g. a-z, 0-9).
+ */
+ ASC: 'ASC',
+
+ /**
+ * Sort items in descending order.
+ * This means arranging from the highest value to the lowest (e.g. z-a, 9-0).
+ */
+ DESC: 'DESC'
+};
+
+exports.default = SortDirection;
+},{}],32:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = SortIndicator;
+
+var _react = require('react');
+
+var _react2 = _interopRequireDefault(_react);
+
+var _classnames = require('classnames');
+
+var _classnames2 = _interopRequireDefault(_classnames);
+
+var _SortDirection = require('./SortDirection');
+
+var _SortDirection2 = _interopRequireDefault(_SortDirection);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Displayed beside a header to indicate that a FlexTable is currently sorted by this column.
+ */
+function SortIndicator(_ref) {
+ var sortDirection = _ref.sortDirection;
+
+ var classNames = (0, _classnames2.default)('FlexTable__sortableHeaderIcon', {
+ 'FlexTable__sortableHeaderIcon--ASC': sortDirection === _SortDirection2.default.ASC,
+ 'FlexTable__sortableHeaderIcon--DESC': sortDirection === _SortDirection2.default.DESC
+ });
+
+ return _react2.default.createElement(
+ 'svg',
+ {
+ className: classNames,
+ width: 18,
+ height: 18,
+ viewBox: '0 0 24 24',
+ xmlns: 'http://www.w3.org/2000/svg'
+ },
+ sortDirection === _SortDirection2.default.ASC ? _react2.default.createElement('path', { d: 'M7 14l5-5 5 5z' }) : _react2.default.createElement('path', { d: 'M7 10l5 5 5-5z' }),
+ _react2.default.createElement('path', { d: 'M0 0h24v24H0z', fill: 'none' })
+ );
+}
+SortIndicator.propTypes = {
+ sortDirection: _react.PropTypes.oneOf([_SortDirection2.default.ASC, _SortDirection2.default.DESC])
+};
+},{"./SortDirection":31,"classnames":undefined,"react":undefined}],33:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.SortIndicator = exports.SortDirection = exports.FlexColumn = exports.FlexTable = exports.default = undefined;
+
+var _FlexTable2 = require('./FlexTable');
+
+var _FlexTable3 = _interopRequireDefault(_FlexTable2);
+
+var _FlexColumn2 = require('./FlexColumn');
+
+var _FlexColumn3 = _interopRequireDefault(_FlexColumn2);
+
+var _SortDirection2 = require('./SortDirection');
+
+var _SortDirection3 = _interopRequireDefault(_SortDirection2);
+
+var _SortIndicator2 = require('./SortIndicator');
+
+var _SortIndicator3 = _interopRequireDefault(_SortIndicator2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = _FlexTable3.default;
+exports.FlexTable = _FlexTable3.default;
+exports.FlexColumn = _FlexColumn3.default;
+exports.SortDirection = _SortDirection3.default;
+exports.SortIndicator = _SortIndicator3.default;
+},{"./FlexColumn":29,"./FlexTable":30,"./SortDirection":31,"./SortIndicator":32}],34:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _GridUtils = require('./GridUtils');
+
+var _classnames = require('classnames');
+
+var _classnames2 = _interopRequireDefault(_classnames);
+
+var _raf = require('raf');
+
+var _raf2 = _interopRequireDefault(_raf);
+
+var _scrollbarSize = require('dom-helpers/util/scrollbarSize');
+
+var _scrollbarSize2 = _interopRequireDefault(_scrollbarSize);
+
+var _react = require('react');
+
+var _react2 = _interopRequireDefault(_react);
+
+var _reactAddonsShallowCompare = require('react-addons-shallow-compare');
+
+var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+/**
+ * Specifies the number of miliseconds during which to disable pointer events while a scroll is in progress.
+ * This improves performance and makes scrolling smoother.
+ */
+var IS_SCROLLING_TIMEOUT = 150;
+
+/**
+ * Controls whether the Grid updates the DOM element's scrollLeft/scrollTop based on the current state or just observes it.
+ * This prevents Grid from interrupting mouse-wheel animations (see issue #2).
+ */
+var SCROLL_POSITION_CHANGE_REASONS = {
+ OBSERVED: 'observed',
+ REQUESTED: 'requested'
+};
+
+/**
+ * Renders tabular data with virtualization along the vertical and horizontal axes.
+ * Row heights and column widths must be known ahead of time and specified as properties.
+ */
+
+var Grid = function (_Component) {
+ _inherits(Grid, _Component);
+
+ function Grid(props, context) {
+ _classCallCheck(this, Grid);
+
+ var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Grid).call(this, props, context));
+
+ _this.state = {
+ computeGridMetadataOnNextUpdate: false,
+ isScrolling: false,
+ scrollLeft: 0,
+ scrollTop: 0
+ };
+
+ // Invokes onSectionRendered callback only when start/stop row or column indices change
+ _this._onGridRenderedMemoizer = (0, _GridUtils.createCallbackMemoizer)();
+ _this._onScrollMemoizer = (0, _GridUtils.createCallbackMemoizer)(false);
+
+ // Bind functions to instance so they don't lose context when passed around
+ _this._computeColumnMetadata = _this._computeColumnMetadata.bind(_this);
+ _this._computeRowMetadata = _this._computeRowMetadata.bind(_this);
+ _this._invokeOnGridRenderedHelper = _this._invokeOnGridRenderedHelper.bind(_this);
+ _this._onScroll = _this._onScroll.bind(_this);
+ _this._updateScrollLeftForScrollToColumn = _this._updateScrollLeftForScrollToColumn.bind(_this);
+ _this._updateScrollTopForScrollToRow = _this._updateScrollTopForScrollToRow.bind(_this);
+ return _this;
+ }
+
+ /**
+ * Forced recompute of row heights and column widths.
+ * This function should be called if dynamic column or row sizes have changed but nothing else has.
+ * Since Grid only receives :columnsCount and :rowsCount it has no way of detecting when the underlying data changes.
+ */
+
+
+ _createClass(Grid, [{
+ key: 'recomputeGridSize',
+ value: function recomputeGridSize() {
+ this.setState({
+ computeGridMetadataOnNextUpdate: true
+ });
+ }
+ }, {
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ var _props = this.props;
+ var scrollLeft = _props.scrollLeft;
+ var scrollToColumn = _props.scrollToColumn;
+ var scrollTop = _props.scrollTop;
+ var scrollToRow = _props.scrollToRow;
+
+
+ this._scrollbarSize = (0, _scrollbarSize2.default)();
+
+ if (scrollLeft >= 0 || scrollTop >= 0) {
+ this._setScrollPosition({ scrollLeft: scrollLeft, scrollTop: scrollTop });
+ }
+
+ if (scrollToColumn >= 0 || scrollToRow >= 0) {
+ this._updateScrollLeftForScrollToColumn();
+ this._updateScrollTopForScrollToRow();
+ }
+
+ // Update onRowsRendered callback
+ this._invokeOnGridRenderedHelper();
+
+ // Initialize onScroll callback
+ this._invokeOnScrollMemoizer({
+ scrollLeft: scrollLeft || 0,
+ scrollTop: scrollTop || 0,
+ totalColumnsWidth: this._getTotalColumnsWidth(),
+ totalRowsHeight: this._getTotalRowsHeight()
+ });
+ }
+
+ /**
+ * @private
+ * This method updates scrollLeft/scrollTop in state for the following conditions:
+ * 1) New scroll-to-cell props have been set
+ */
+
+ }, {
+ key: 'componentDidUpdate',
+ value: function componentDidUpdate(prevProps, prevState) {
+ var _props2 = this.props;
+ var columnsCount = _props2.columnsCount;
+ var columnWidth = _props2.columnWidth;
+ var height = _props2.height;
+ var rowHeight = _props2.rowHeight;
+ var rowsCount = _props2.rowsCount;
+ var scrollToColumn = _props2.scrollToColumn;
+ var scrollToRow = _props2.scrollToRow;
+ var width = _props2.width;
+ var _state = this.state;
+ var scrollLeft = _state.scrollLeft;
+ var scrollPositionChangeReason = _state.scrollPositionChangeReason;
+ var scrollTop = _state.scrollTop;
+
+ // Make sure requested changes to :scrollLeft or :scrollTop get applied.
+ // Assigning to scrollLeft/scrollTop tells the browser to interrupt any running scroll animations,
+ // And to discard any pending async changes to the scroll position that may have happened in the meantime (e.g. on a separate scrolling thread).
+ // So we only set these when we require an adjustment of the scroll position.
+ // See issue #2 for more information.
+
+ if (scrollPositionChangeReason === SCROLL_POSITION_CHANGE_REASONS.REQUESTED) {
+ if (scrollLeft >= 0 && scrollLeft !== prevState.scrollLeft && scrollLeft !== this.refs.scrollingContainer.scrollLeft) {
+ this.refs.scrollingContainer.scrollLeft = scrollLeft;
+ }
+ if (scrollTop >= 0 && scrollTop !== prevState.scrollTop && scrollTop !== this.refs.scrollingContainer.scrollTop) {
+ this.refs.scrollingContainer.scrollTop = scrollTop;
+ }
+ }
+
+ // Update scroll offsets if the current :scrollToColumn or :scrollToRow values requires it
+ (0, _GridUtils.updateScrollIndexHelper)({
+ cellsCount: columnsCount,
+ cellMetadata: this._columnMetadata,
+ cellSize: columnWidth,
+ previousCellsCount: prevProps.columnsCount,
+ previousCellSize: prevProps.columnWidth,
+ previousScrollToIndex: prevProps.scrollToColumn,
+ previousSize: prevProps.width,
+ scrollOffset: scrollLeft,
+ scrollToIndex: scrollToColumn,
+ size: width,
+ updateScrollIndexCallback: this._updateScrollLeftForScrollToColumn
+ });
+ (0, _GridUtils.updateScrollIndexHelper)({
+ cellsCount: rowsCount,
+ cellMetadata: this._rowMetadata,
+ cellSize: rowHeight,
+ previousCellsCount: prevProps.rowsCount,
+ previousCellSize: prevProps.rowHeight,
+ previousScrollToIndex: prevProps.scrollToRow,
+ previousSize: prevProps.height,
+ scrollOffset: scrollTop,
+ scrollToIndex: scrollToRow,
+ size: height,
+ updateScrollIndexCallback: this._updateScrollTopForScrollToRow
+ });
+
+ // Update onRowsRendered callback if start/stop indices have changed
+ this._invokeOnGridRenderedHelper();
+ }
+ }, {
+ key: 'componentWillMount',
+ value: function componentWillMount() {
+ this._computeColumnMetadata(this.props);
+ this._computeRowMetadata(this.props);
+ }
+ }, {
+ key: 'componentWillUnmount',
+ value: function componentWillUnmount() {
+ if (this._disablePointerEventsTimeoutId) {
+ clearTimeout(this._disablePointerEventsTimeoutId);
+ }
+
+ if (this._setNextStateAnimationFrameId) {
+ _raf2.default.cancel(this._setNextStateAnimationFrameId);
+ }
+ }
+
+ /**
+ * @private
+ * This method updates scrollLeft/scrollTop in state for the following conditions:
+ * 1) Empty content (0 rows or columns)
+ * 2) New scroll props overriding the current state
+ * 3) Cells-count or cells-size has changed, making previous scroll offsets invalid
+ */
+
+ }, {
+ key: 'componentWillUpdate',
+ value: function componentWillUpdate(nextProps, nextState) {
+ if (nextProps.columnsCount === 0 && nextState.scrollLeft !== 0 || nextProps.rowsCount === 0 && nextState.scrollTop !== 0) {
+ this._setScrollPosition({
+ scrollLeft: 0,
+ scrollTop: 0
+ });
+ } else if (nextProps.scrollLeft !== this.props.scrollLeft || nextProps.scrollTop !== this.props.scrollTop) {
+ this._setScrollPosition({
+ scrollLeft: nextProps.scrollLeft,
+ scrollTop: nextProps.scrollTop
+ });
+ }
+
+ // Update scroll offsets if the size or number of cells have changed, invalidating the previous value
+ (0, _GridUtils.computeCellMetadataAndUpdateScrollOffsetHelper)({
+ cellsCount: this.props.columnsCount,
+ cellSize: this.props.columnWidth,
+ computeMetadataCallback: this._computeColumnMetadata,
+ computeMetadataCallbackProps: nextProps,
+ computeMetadataOnNextUpdate: nextState.computeGridMetadataOnNextUpdate,
+ nextCellsCount: nextProps.columnsCount,
+ nextCellSize: nextProps.columnWidth,
+ nextScrollToIndex: nextProps.scrollToColumn,
+ scrollToIndex: this.props.scrollToColumn,
+ updateScrollOffsetForScrollToIndex: this._updateScrollLeftForScrollToColumn
+ });
+ (0, _GridUtils.computeCellMetadataAndUpdateScrollOffsetHelper)({
+ cellsCount: this.props.rowsCount,
+ cellSize: this.props.rowHeight,
+ computeMetadataCallback: this._computeRowMetadata,
+ computeMetadataCallbackProps: nextProps,
+ computeMetadataOnNextUpdate: nextState.computeGridMetadataOnNextUpdate,
+ nextCellsCount: nextProps.rowsCount,
+ nextCellSize: nextProps.rowHeight,
+ nextScrollToIndex: nextProps.scrollToRow,
+ scrollToIndex: this.props.scrollToRow,
+ updateScrollOffsetForScrollToIndex: this._updateScrollTopForScrollToRow
+ });
+
+ this.setState({
+ computeGridMetadataOnNextUpdate: false
+ });
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props3 = this.props;
+ var className = _props3.className;
+ var columnsCount = _props3.columnsCount;
+ var height = _props3.height;
+ var noContentRenderer = _props3.noContentRenderer;
+ var overscanColumnsCount = _props3.overscanColumnsCount;
+ var overscanRowsCount = _props3.overscanRowsCount;
+ var renderCell = _props3.renderCell;
+ var rowsCount = _props3.rowsCount;
+ var width = _props3.width;
+ var _state2 = this.state;
+ var isScrolling = _state2.isScrolling;
+ var scrollLeft = _state2.scrollLeft;
+ var scrollTop = _state2.scrollTop;
+
+
+ var childrenToDisplay = [];
+
+ // Render only enough columns and rows to cover the visible area of the grid.
+ if (height > 0 && width > 0) {
+ var visibleColumnIndices = (0, _GridUtils.getVisibleCellIndices)({
+ cellsCount: columnsCount,
+ cellMetadata: this._columnMetadata,
+ containerSize: width,
+ currentOffset: scrollLeft
+ });
+
+ var visibleRowIndices = (0, _GridUtils.getVisibleCellIndices)({
+ cellsCount: rowsCount,
+ cellMetadata: this._rowMetadata,
+ containerSize: height,
+ currentOffset: scrollTop
+ });
+
+ // Store for _invokeOnGridRenderedHelper()
+ this._renderedColumnStartIndex = visibleColumnIndices.start;
+ this._renderedColumnStopIndex = visibleColumnIndices.stop;
+ this._renderedRowStartIndex = visibleRowIndices.start;
+ this._renderedRowStopIndex = visibleRowIndices.stop;
+
+ var overscanColumnIndices = (0, _GridUtils.getOverscanIndices)({
+ cellsCount: columnsCount,
+ overscanCellsCount: overscanColumnsCount,
+ startIndex: this._renderedColumnStartIndex,
+ stopIndex: this._renderedColumnStopIndex
+ });
+
+ var overscanRowIndices = (0, _GridUtils.getOverscanIndices)({
+ cellsCount: rowsCount,
+ overscanCellsCount: overscanRowsCount,
+ startIndex: this._renderedRowStartIndex,
+ stopIndex: this._renderedRowStopIndex
+ });
+
+ // Store for _invokeOnGridRenderedHelper()
+ this._columnStartIndex = overscanColumnIndices.overscanStartIndex;
+ this._columnStopIndex = overscanColumnIndices.overscanStopIndex;
+ this._rowStartIndex = overscanRowIndices.overscanStartIndex;
+ this._rowStopIndex = overscanRowIndices.overscanStopIndex;
+
+ for (var rowIndex = this._rowStartIndex; rowIndex <= this._rowStopIndex; rowIndex++) {
+ var rowDatum = this._rowMetadata[rowIndex];
+
+ for (var columnIndex = this._columnStartIndex; columnIndex <= this._columnStopIndex; columnIndex++) {
+ var columnDatum = this._columnMetadata[columnIndex];
+ var renderedCell = renderCell({ columnIndex: columnIndex, rowIndex: rowIndex });
+ var key = rowIndex + '-' + columnIndex;
+
+ // any other falsey value will be rendered
+ // as a text node by React
+ if (renderedCell == null || renderedCell === false) {
+ continue;
+ }
+
+ var child = _react2.default.createElement(
+ 'div',
+ {
+ key: key,
+ className: 'Grid__cell',
+ style: {
+ height: rowDatum.size,
+ left: columnDatum.offset,
+ top: rowDatum.offset,
+ width: columnDatum.size
+ }
+ },
+ renderedCell
+ );
+
+ childrenToDisplay.push(child);
+ }
+ }
+ }
+
+ var gridStyle = {
+ height: height,
+ width: width
+ };
+
+ var totalColumnsWidth = this._getTotalColumnsWidth();
+ var totalRowsHeight = this._getTotalRowsHeight();
+
+ // Force browser to hide scrollbars when we know they aren't necessary.
+ // Otherwise once scrollbars appear they may not disappear again.
+ // For more info see issue #116
+ if (totalColumnsWidth <= width) {
+ gridStyle.overflowX = 'hidden';
+ }
+
+ if (totalRowsHeight <= height) {
+ gridStyle.overflowY = 'hidden';
+ }
+
+ return _react2.default.createElement(
+ 'div',
+ {
+ ref: 'scrollingContainer',
+ className: (0, _classnames2.default)('Grid', className),
+ onScroll: this._onScroll,
+ tabIndex: 0,
+ style: gridStyle
+ },
+ childrenToDisplay.length > 0 && _react2.default.createElement(
+ 'div',
+ {
+ className: 'Grid__innerScrollContainer',
+ style: {
+ width: totalColumnsWidth,
+ height: totalRowsHeight,
+ maxWidth: totalColumnsWidth,
+ maxHeight: totalRowsHeight,
+ pointerEvents: isScrolling ? 'none' : 'auto'
+ }
+ },
+ childrenToDisplay
+ ),
+ childrenToDisplay.length === 0 && noContentRenderer()
+ );
+ }
+ }, {
+ key: 'shouldComponentUpdate',
+ value: function shouldComponentUpdate(nextProps, nextState) {
+ return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState);
+ }
+
+ /* ---------------------------- Helper methods ---------------------------- */
+
+ }, {
+ key: '_computeColumnMetadata',
+ value: function _computeColumnMetadata(props) {
+ var columnsCount = props.columnsCount;
+ var columnWidth = props.columnWidth;
+
+
+ this._columnMetadata = (0, _GridUtils.initCellMetadata)({
+ cellsCount: columnsCount,
+ size: columnWidth
+ });
+ }
+ }, {
+ key: '_computeRowMetadata',
+ value: function _computeRowMetadata(props) {
+ var rowHeight = props.rowHeight;
+ var rowsCount = props.rowsCount;
+
+
+ this._rowMetadata = (0, _GridUtils.initCellMetadata)({
+ cellsCount: rowsCount,
+ size: rowHeight
+ });
+ }
+
+ /**
+ * Sets an :isScrolling flag for a small window of time.
+ * This flag is used to disable pointer events on the scrollable portion of the Grid.
+ * This prevents jerky/stuttery mouse-wheel scrolling.
+ */
+
+ }, {
+ key: '_enablePointerEventsAfterDelay',
+ value: function _enablePointerEventsAfterDelay() {
+ var _this2 = this;
+
+ if (this._disablePointerEventsTimeoutId) {
+ clearTimeout(this._disablePointerEventsTimeoutId);
+ }
+
+ this._disablePointerEventsTimeoutId = setTimeout(function () {
+ _this2._disablePointerEventsTimeoutId = null;
+ _this2.setState({
+ isScrolling: false
+ });
+ }, IS_SCROLLING_TIMEOUT);
+ }
+ }, {
+ key: '_getTotalColumnsWidth',
+ value: function _getTotalColumnsWidth() {
+ if (this._columnMetadata.length === 0) {
+ return 0;
+ }
+
+ var datum = this._columnMetadata[this._columnMetadata.length - 1];
+ return datum.offset + datum.size;
+ }
+ }, {
+ key: '_getTotalRowsHeight',
+ value: function _getTotalRowsHeight() {
+ if (this._rowMetadata.length === 0) {
+ return 0;
+ }
+
+ var datum = this._rowMetadata[this._rowMetadata.length - 1];
+ return datum.offset + datum.size;
+ }
+ }, {
+ key: '_invokeOnGridRenderedHelper',
+ value: function _invokeOnGridRenderedHelper() {
+ var onSectionRendered = this.props.onSectionRendered;
+
+
+ this._onGridRenderedMemoizer({
+ callback: onSectionRendered,
+ indices: {
+ columnOverscanStartIndex: this._columnStartIndex,
+ columnOverscanStopIndex: this._columnStopIndex,
+ columnStartIndex: this._renderedColumnStartIndex,
+ columnStopIndex: this._renderedColumnStopIndex,
+ rowOverscanStartIndex: this._rowStartIndex,
+ rowOverscanStopIndex: this._rowStopIndex,
+ rowStartIndex: this._renderedRowStartIndex,
+ rowStopIndex: this._renderedRowStopIndex
+ }
+ });
+ }
+ }, {
+ key: '_invokeOnScrollMemoizer',
+ value: function _invokeOnScrollMemoizer(_ref) {
+ var scrollLeft = _ref.scrollLeft;
+ var scrollTop = _ref.scrollTop;
+ var totalColumnsWidth = _ref.totalColumnsWidth;
+ var totalRowsHeight = _ref.totalRowsHeight;
+ var _props4 = this.props;
+ var height = _props4.height;
+ var onScroll = _props4.onScroll;
+ var width = _props4.width;
+
+
+ this._onScrollMemoizer({
+ callback: function callback(_ref2) {
+ var scrollLeft = _ref2.scrollLeft;
+ var scrollTop = _ref2.scrollTop;
+
+ onScroll({
+ clientHeight: height,
+ clientWidth: width,
+ scrollHeight: totalRowsHeight,
+ scrollLeft: scrollLeft,
+ scrollTop: scrollTop,
+ scrollWidth: totalColumnsWidth
+ });
+ },
+ indices: {
+ scrollLeft: scrollLeft,
+ scrollTop: scrollTop
+ }
+ });
+ }
+
+ /**
+ * Updates the state during the next animation frame.
+ * Use this method to avoid multiple renders in a small span of time.
+ * This helps performance for bursty events (like onScroll).
+ */
+
+ }, {
+ key: '_setNextState',
+ value: function _setNextState(state) {
+ var _this3 = this;
+
+ if (this._setNextStateAnimationFrameId) {
+ _raf2.default.cancel(this._setNextStateAnimationFrameId);
+ }
+
+ this._setNextStateAnimationFrameId = (0, _raf2.default)(function () {
+ _this3._setNextStateAnimationFrameId = null;
+ _this3.setState(state);
+ });
+ }
+ }, {
+ key: '_setScrollPosition',
+ value: function _setScrollPosition(_ref3) {
+ var scrollLeft = _ref3.scrollLeft;
+ var scrollTop = _ref3.scrollTop;
+
+ var newState = {
+ scrollPositionChangeReason: SCROLL_POSITION_CHANGE_REASONS.REQUESTED
+ };
+
+ if (scrollLeft >= 0) {
+ newState.scrollLeft = scrollLeft;
+ }
+
+ if (scrollTop >= 0) {
+ newState.scrollTop = scrollTop;
+ }
+
+ if (scrollLeft >= 0 && scrollLeft !== this.state.scrollLeft || scrollTop >= 0 && scrollTop !== this.state.scrollTop) {
+ this.setState(newState);
+ }
+ }
+ }, {
+ key: '_updateScrollLeftForScrollToColumn',
+ value: function _updateScrollLeftForScrollToColumn(scrollToColumnOverride) {
+ var scrollToColumn = scrollToColumnOverride != null ? scrollToColumnOverride : this.props.scrollToColumn;
+
+ var width = this.props.width;
+ var scrollLeft = this.state.scrollLeft;
+
+
+ if (scrollToColumn >= 0) {
+ var calculatedScrollLeft = (0, _GridUtils.getUpdatedOffsetForIndex)({
+ cellMetadata: this._columnMetadata,
+ containerSize: width,
+ currentOffset: scrollLeft,
+ targetIndex: scrollToColumn
+ });
+
+ if (scrollLeft !== calculatedScrollLeft) {
+ this._setScrollPosition({
+ scrollLeft: calculatedScrollLeft
+ });
+ }
+ }
+ }
+ }, {
+ key: '_updateScrollTopForScrollToRow',
+ value: function _updateScrollTopForScrollToRow(scrollToRowOverride) {
+ var scrollToRow = scrollToRowOverride != null ? scrollToRowOverride : this.props.scrollToRow;
+
+ var height = this.props.height;
+ var scrollTop = this.state.scrollTop;
+
+
+ if (scrollToRow >= 0) {
+ var calculatedScrollTop = (0, _GridUtils.getUpdatedOffsetForIndex)({
+ cellMetadata: this._rowMetadata,
+ containerSize: height,
+ currentOffset: scrollTop,
+ targetIndex: scrollToRow
+ });
+
+ if (scrollTop !== calculatedScrollTop) {
+ this._setScrollPosition({
+ scrollTop: calculatedScrollTop
+ });
+ }
+ }
+ }
+ }, {
+ key: '_onScroll',
+ value: function _onScroll(event) {
+ // In certain edge-cases React dispatches an onScroll event with an invalid target.scrollLeft / target.scrollTop.
+ // This invalid event can be detected by comparing event.target to this component's scrollable DOM element.
+ // See issue #404 for more information.
+ if (event.target !== this.refs.scrollingContainer) {
+ return;
+ }
+
+ // Prevent pointer events from interrupting a smooth scroll
+ this._enablePointerEventsAfterDelay();
+
+ // When this component is shrunk drastically, React dispatches a series of back-to-back scroll events,
+ // Gradually converging on a scrollTop that is within the bounds of the new, smaller height.
+ // This causes a series of rapid renders that is slow for long lists.
+ // We can avoid that by doing some simple bounds checking to ensure that scrollTop never exceeds the total height.
+ var _props5 = this.props;
+ var height = _props5.height;
+ var width = _props5.width;
+
+ var scrollbarSize = this._scrollbarSize;
+ var totalRowsHeight = this._getTotalRowsHeight();
+ var totalColumnsWidth = this._getTotalColumnsWidth();
+ var scrollLeft = Math.min(totalColumnsWidth - width + scrollbarSize, event.target.scrollLeft);
+ var scrollTop = Math.min(totalRowsHeight - height + scrollbarSize, event.target.scrollTop);
+
+ // Certain devices (like Apple touchpad) rapid-fire duplicate events.
+ // Don't force a re-render if this is the case.
+ // The mouse may move faster then the animation frame does.
+ // Use requestAnimationFrame to avoid over-updating.
+ if (this.state.scrollLeft !== scrollLeft || this.state.scrollTop !== scrollTop) {
+ // Browsers with cancelable scroll events (eg. Firefox) interrupt scrolling animations if scrollTop/scrollLeft is set.
+ // Other browsers (eg. Safari) don't scroll as well without the help under certain conditions (DOM or style changes during scrolling).
+ // All things considered, this seems to be the best current work around that I'm aware of.
+ // For more information see https://github.com/bvaughn/react-virtualized/pull/124
+ var scrollPositionChangeReason = event.cancelable ? SCROLL_POSITION_CHANGE_REASONS.OBSERVED : SCROLL_POSITION_CHANGE_REASONS.REQUESTED;
+
+ if (!this.state.isScrolling) {
+ this.setState({
+ isScrolling: true
+ });
+ }
+
+ this._setNextState({
+ isScrolling: true,
+ scrollLeft: scrollLeft,
+ scrollPositionChangeReason: scrollPositionChangeReason,
+ scrollTop: scrollTop
+ });
+ }
+
+ this._invokeOnScrollMemoizer({ scrollLeft: scrollLeft, scrollTop: scrollTop, totalColumnsWidth: totalColumnsWidth, totalRowsHeight: totalRowsHeight });
+ }
+ }]);
+
+ return Grid;
+}(_react.Component);
+
+Grid.propTypes = {
+ /**
+ * Optional custom CSS class name to attach to root Grid element.
+ */
+ className: _react.PropTypes.string,
+
+ /**
+ * Number of columns in grid.
+ */
+ columnsCount: _react.PropTypes.number.isRequired,
+
+ /**
+ * Either a fixed column width (number) or a function that returns the width of a column given its index.
+ * Should implement the following interface: (index: number): number
+ */
+ columnWidth: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.func]).isRequired,
+
+ /**
+ * Height of Grid; this property determines the number of visible (vs virtualized) rows.
+ */
+ height: _react.PropTypes.number.isRequired,
+
+ /**
+ * Optional renderer to be used in place of rows when either :rowsCount or :columnsCount is 0.
+ */
+ noContentRenderer: _react.PropTypes.func.isRequired,
+
+ /**
+ * Callback invoked whenever the scroll offset changes within the inner scrollable region.
+ * This callback can be used to sync scrolling between lists, tables, or grids.
+ * ({ clientHeight, clientWidth, scrollHeight, scrollLeft, scrollTop, scrollWidth }): void
+ */
+ onScroll: _react.PropTypes.func.isRequired,
+
+ /**
+ * Callback invoked with information about the section of the Grid that was just rendered.
+ * ({ columnStartIndex, columnStopIndex, rowStartIndex, rowStopIndex }): void
+ */
+ onSectionRendered: _react.PropTypes.func.isRequired,
+
+ /**
+ * Number of columns to render before/after the visible section of the grid.
+ * These columns can help for smoother scrolling on touch devices or browsers that send scroll events infrequently.
+ */
+ overscanColumnsCount: _react.PropTypes.number.isRequired,
+
+ /**
+ * Number of rows to render above/below the visible section of the grid.
+ * These rows can help for smoother scrolling on touch devices or browsers that send scroll events infrequently.
+ */
+ overscanRowsCount: _react.PropTypes.number.isRequired,
+
+ /**
+ * Responsible for rendering a cell given an row and column index.
+ * Should implement the following interface: ({ columnIndex: number, rowIndex: number }): PropTypes.node
+ */
+ renderCell: _react.PropTypes.func.isRequired,
+
+ /**
+ * Either a fixed row height (number) or a function that returns the height of a row given its index.
+ * Should implement the following interface: (index: number): number
+ */
+ rowHeight: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.func]).isRequired,
+
+ /**
+ * Number of rows in grid.
+ */
+ rowsCount: _react.PropTypes.number.isRequired,
+
+ /** Horizontal offset. */
+ scrollLeft: _react.PropTypes.number,
+
+ /**
+ * Column index to ensure visible (by forcefully scrolling if necessary)
+ */
+ scrollToColumn: _react.PropTypes.number,
+
+ /** Vertical offset. */
+ scrollTop: _react.PropTypes.number,
+
+ /**
+ * Row index to ensure visible (by forcefully scrolling if necessary)
+ */
+ scrollToRow: _react.PropTypes.number,
+
+ /**
+ * Width of Grid; this property determines the number of visible (vs virtualized) columns.
+ */
+ width: _react.PropTypes.number.isRequired
+};
+Grid.defaultProps = {
+ noContentRenderer: function noContentRenderer() {
+ return null;
+ },
+ onScroll: function onScroll() {
+ return null;
+ },
+ onSectionRendered: function onSectionRendered() {
+ return null;
+ },
+ overscanColumnsCount: 0,
+ overscanRowsCount: 10
+};
+exports.default = Grid;
+},{"./GridUtils":35,"classnames":undefined,"dom-helpers/util/scrollbarSize":46,"raf":47,"react":undefined,"react-addons-shallow-compare":49}],35:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.computeCellMetadataAndUpdateScrollOffsetHelper = computeCellMetadataAndUpdateScrollOffsetHelper;
+exports.createCallbackMemoizer = createCallbackMemoizer;
+exports.findNearestCell = findNearestCell;
+exports.getOverscanIndices = getOverscanIndices;
+exports.getUpdatedOffsetForIndex = getUpdatedOffsetForIndex;
+exports.getVisibleCellIndices = getVisibleCellIndices;
+exports.initCellMetadata = initCellMetadata;
+exports.updateScrollIndexHelper = updateScrollIndexHelper;
+/**
+ * Helper method that determines when to recalculate row or column metadata.
+ *
+ * @param cellsCount Number of rows or columns in the current axis
+ * @param cellsSize Width or height of cells for the current axis
+ * @param computeMetadataCallback Method to invoke if cell metadata should be recalculated
+ * @param computeMetadataCallbackProps Parameters to pass to :computeMetadataCallback
+ * @param computeMetadataOnNextUpdate Flag specifying that metadata should be recalculated
+ * @param nextCellsCount Newly updated number of rows or columns in the current axis
+ * @param nextCellsSize Newly updated width or height of cells for the current axis
+ * @param nextScrollToIndex Newly updated scroll-to-index
+ * @param scrollToIndex Scroll-to-index
+ * @param updateScrollOffsetForScrollToIndex Callback to invoke if the scroll position should be recalculated
+ */
+function computeCellMetadataAndUpdateScrollOffsetHelper(_ref) {
+ var cellsCount = _ref.cellsCount;
+ var cellSize = _ref.cellSize;
+ var computeMetadataCallback = _ref.computeMetadataCallback;
+ var computeMetadataCallbackProps = _ref.computeMetadataCallbackProps;
+ var computeMetadataOnNextUpdate = _ref.computeMetadataOnNextUpdate;
+ var nextCellsCount = _ref.nextCellsCount;
+ var nextCellSize = _ref.nextCellSize;
+ var nextScrollToIndex = _ref.nextScrollToIndex;
+ var scrollToIndex = _ref.scrollToIndex;
+ var updateScrollOffsetForScrollToIndex = _ref.updateScrollOffsetForScrollToIndex;
+
+ // Don't compare cell sizes if they are functions because inline functions would cause infinite loops.
+ // In that event users should use the manual recompute methods to inform of changes.
+ if (computeMetadataOnNextUpdate || cellsCount !== nextCellsCount || (typeof cellSize === 'number' || typeof nextCellSize === 'number') && cellSize !== nextCellSize) {
+ computeMetadataCallback(computeMetadataCallbackProps);
+
+ // Updated cell metadata may have hidden the previous scrolled-to item.
+ // In this case we should also update the scrollTop to ensure it stays visible.
+ if (scrollToIndex >= 0 && scrollToIndex === nextScrollToIndex) {
+ updateScrollOffsetForScrollToIndex();
+ }
+ }
+}
+
+/**
+ * Helper utility that updates the specified callback whenever any of the specified indices have changed.
+ */
+function createCallbackMemoizer() {
+ var requireAllKeys = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];
+
+ var cachedIndices = {};
+
+ return function (_ref2) {
+ var callback = _ref2.callback;
+ var indices = _ref2.indices;
+
+ var keys = Object.keys(indices);
+ var allInitialized = !requireAllKeys || keys.every(function (key) {
+ return indices[key] >= 0;
+ });
+ var indexChanged = keys.some(function (key) {
+ return cachedIndices[key] !== indices[key];
+ });
+
+ cachedIndices = indices;
+
+ if (allInitialized && indexChanged) {
+ callback(indices);
+ }
+ };
+}
+
+/**
+ * Binary search function inspired by react-infinite.
+ */
+function findNearestCell(_ref3) {
+ var cellMetadata = _ref3.cellMetadata;
+ var mode = _ref3.mode;
+ var offset = _ref3.offset;
+
+ var high = cellMetadata.length - 1;
+ var low = 0;
+ var middle = undefined;
+ var currentOffset = undefined;
+
+ // TODO Add better guards here against NaN offset
+
+ while (low <= high) {
+ middle = low + Math.floor((high - low) / 2);
+ currentOffset = cellMetadata[middle].offset;
+
+ if (currentOffset === offset) {
+ return middle;
+ } else if (currentOffset < offset) {
+ low = middle + 1;
+ } else if (currentOffset > offset) {
+ high = middle - 1;
+ }
+ }
+
+ if (mode === findNearestCell.EQUAL_OR_LOWER && low > 0) {
+ return low - 1;
+ } else if (mode === findNearestCell.EQUAL_OR_HIGHER && high < cellMetadata.length - 1) {
+ return high + 1;
+ }
+}
+
+findNearestCell.EQUAL_OR_LOWER = 1;
+findNearestCell.EQUAL_OR_HIGHER = 2;
+
+function getOverscanIndices(_ref4) {
+ var cellsCount = _ref4.cellsCount;
+ var overscanCellsCount = _ref4.overscanCellsCount;
+ var startIndex = _ref4.startIndex;
+ var stopIndex = _ref4.stopIndex;
+
+ return {
+ overscanStartIndex: Math.max(0, startIndex - overscanCellsCount),
+ overscanStopIndex: Math.min(cellsCount - 1, stopIndex + overscanCellsCount)
+ };
+}
+
+/**
+ * Determines a new offset that ensures a certain cell is visible, given the current offset.
+ * If the cell is already visible then the current offset will be returned.
+ * If the current offset is too great or small, it will be adjusted just enough to ensure the specified index is visible.
+ *
+ * @param cellMetadata Metadata initially computed by initCellMetadata()
+ * @param containerSize Total size (width or height) of the container
+ * @param currentOffset Container's current (x or y) offset
+ * @param targetIndex Index of target cell
+ * @return Offset to use to ensure the specified cell is visible
+ */
+function getUpdatedOffsetForIndex(_ref5) {
+ var cellMetadata = _ref5.cellMetadata;
+ var containerSize = _ref5.containerSize;
+ var currentOffset = _ref5.currentOffset;
+ var targetIndex = _ref5.targetIndex;
+
+ if (cellMetadata.length === 0) {
+ return 0;
+ }
+
+ targetIndex = Math.max(0, Math.min(cellMetadata.length - 1, targetIndex));
+
+ var datum = cellMetadata[targetIndex];
+ var maxOffset = datum.offset;
+ var minOffset = maxOffset - containerSize + datum.size;
+ var newOffset = Math.max(minOffset, Math.min(maxOffset, currentOffset));
+
+ return newOffset;
+}
+
+/**
+ * Determines the range of cells to display for a given offset in order to fill the specified container.
+ *
+ * @param cellsCount Total number of cells.
+ * @param cellMetadata Metadata initially computed by initCellMetadata()
+ * @param containerSize Total size (width or height) of the container
+ * @param currentOffset Container's current (x or y) offset
+ * @return An object containing :start and :stop attributes, each specifying a cell index
+ */
+function getVisibleCellIndices(_ref6) {
+ var cellsCount = _ref6.cellsCount;
+ var cellMetadata = _ref6.cellMetadata;
+ var containerSize = _ref6.containerSize;
+ var currentOffset = _ref6.currentOffset;
+
+ if (cellsCount === 0) {
+ return {};
+ }
+
+ // TODO Add better guards here against NaN offset
+
+ var lastDatum = cellMetadata[cellMetadata.length - 1];
+ var totalCellSize = lastDatum.offset + lastDatum.size;
+
+ // Ensure offset is within reasonable bounds
+ currentOffset = Math.max(0, Math.min(totalCellSize - containerSize, currentOffset));
+
+ var maxOffset = Math.min(totalCellSize, currentOffset + containerSize);
+
+ var start = findNearestCell({
+ cellMetadata: cellMetadata,
+ mode: findNearestCell.EQUAL_OR_LOWER,
+ offset: currentOffset
+ });
+
+ var datum = cellMetadata[start];
+ currentOffset = datum.offset + datum.size;
+
+ var stop = start;
+
+ while (currentOffset < maxOffset && stop < cellsCount - 1) {
+ stop++;
+
+ currentOffset += cellMetadata[stop].size;
+ }
+
+ return {
+ start: start,
+ stop: stop
+ };
+}
+
+/**
+ * Initializes metadata for an axis and its cells.
+ * This data is used to determine which cells are visible given a container size and scroll position.
+ *
+ * @param cellsCount Total number of cells.
+ * @param size Either a fixed size or a function that returns the size for a given given an index.
+ * @return Object mapping cell index to cell metadata (size, offset)
+ */
+function initCellMetadata(_ref7) {
+ var cellsCount = _ref7.cellsCount;
+ var size = _ref7.size;
+
+ var sizeGetter = size instanceof Function ? size : function (index) {
+ return size;
+ };
+
+ var cellMetadata = [];
+ var offset = 0;
+
+ for (var i = 0; i < cellsCount; i++) {
+ var _size = sizeGetter(i);
+
+ if (_size == null || isNaN(_size)) {
+ throw Error('Invalid size returned for cell ' + i + ' of value ' + _size);
+ }
+
+ cellMetadata[i] = {
+ size: _size,
+ offset: offset
+ };
+
+ offset += _size;
+ }
+
+ return cellMetadata;
+}
+
+/**
+ * Helper function that determines when to update scroll offsets to ensure that a scroll-to-index remains visible.
+ *
+ * @param cellMetadata Metadata initially computed by initCellMetadata()
+ * @param cellsCount Number of rows or columns in the current axis
+ * @param cellsSize Width or height of cells for the current axis
+ * @param previousCellsCount Previous number of rows or columns
+ * @param previousCellsSize Previous width or height of cells
+ * @param previousScrollToIndex Previous scroll-to-index
+ * @param previousSize Previous width or height of the virtualized container
+ * @param scrollOffset Current scrollLeft or scrollTop
+ * @param scrollToIndex Scroll-to-index
+ * @param size Width or height of the virtualized container
+ * @param updateScrollIndexCallback Callback to invoke with an optional scroll-to-index override
+ */
+function updateScrollIndexHelper(_ref8) {
+ var cellMetadata = _ref8.cellMetadata;
+ var cellsCount = _ref8.cellsCount;
+ var cellSize = _ref8.cellSize;
+ var previousCellsCount = _ref8.previousCellsCount;
+ var previousCellSize = _ref8.previousCellSize;
+ var previousScrollToIndex = _ref8.previousScrollToIndex;
+ var previousSize = _ref8.previousSize;
+ var scrollOffset = _ref8.scrollOffset;
+ var scrollToIndex = _ref8.scrollToIndex;
+ var size = _ref8.size;
+ var updateScrollIndexCallback = _ref8.updateScrollIndexCallback;
+
+ var hasScrollToIndex = scrollToIndex >= 0 && scrollToIndex < cellsCount;
+ var sizeHasChanged = size !== previousSize || !previousCellSize || typeof cellSize === 'number' && cellSize !== previousCellSize;
+
+ // If we have a new scroll target OR if height/row-height has changed,
+ // We should ensure that the scroll target is visible.
+ if (hasScrollToIndex && (sizeHasChanged || scrollToIndex !== previousScrollToIndex)) {
+ updateScrollIndexCallback();
+
+ // If we don't have a selected item but list size or number of children have decreased,
+ // Make sure we aren't scrolled too far past the current content.
+ } else if (!hasScrollToIndex && (size < previousSize || cellsCount < previousCellsCount)) {
+ var calculatedScrollOffset = getUpdatedOffsetForIndex({
+ cellMetadata: cellMetadata,
+ containerSize: size,
+ currentOffset: scrollOffset,
+ targetIndex: cellsCount - 1
+ });
+
+ // Only adjust the scroll position if we've scrolled below the last set of rows.
+ if (calculatedScrollOffset < scrollOffset) {
+ updateScrollIndexCallback(cellsCount - 1);
+ }
+ }
+}
+},{}],36:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.Grid = exports.default = undefined;
+
+var _Grid2 = require('./Grid');
+
+var _Grid3 = _interopRequireDefault(_Grid2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = _Grid3.default;
+exports.Grid = _Grid3.default;
+},{"./Grid":34}],37:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+exports.isRangeVisible = isRangeVisible;
+exports.scanForUnloadedRanges = scanForUnloadedRanges;
+
+var _react = require('react');
+
+var _reactAddonsShallowCompare = require('react-addons-shallow-compare');
+
+var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+/**
+ * Higher-order component that manages lazy-loading for "infinite" data.
+ * This component decorates a virtual component and just-in-time prefetches rows as a user scrolls.
+ * It is intended as a convenience component; fork it if you'd like finer-grained control over data-loading.
+ */
+
+var InfiniteLoader = function (_Component) {
+ _inherits(InfiniteLoader, _Component);
+
+ function InfiniteLoader(props, context) {
+ _classCallCheck(this, InfiniteLoader);
+
+ var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(InfiniteLoader).call(this, props, context));
+
+ _this._onRowsRendered = _this._onRowsRendered.bind(_this);
+ _this._registerChild = _this._registerChild.bind(_this);
+ return _this;
+ }
+
+ _createClass(InfiniteLoader, [{
+ key: 'render',
+ value: function render() {
+ var children = this.props.children;
+
+
+ return children({
+ onRowsRendered: this._onRowsRendered,
+ registerChild: this._registerChild
+ });
+ }
+ }, {
+ key: 'shouldComponentUpdate',
+ value: function shouldComponentUpdate(nextProps, nextState) {
+ return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState);
+ }
+ }, {
+ key: '_onRowsRendered',
+ value: function _onRowsRendered(_ref) {
+ var _this2 = this;
+
+ var startIndex = _ref.startIndex;
+ var stopIndex = _ref.stopIndex;
+ var _props = this.props;
+ var isRowLoaded = _props.isRowLoaded;
+ var loadMoreRows = _props.loadMoreRows;
+ var rowsCount = _props.rowsCount;
+ var threshold = _props.threshold;
+
+
+ this._lastRenderedStartIndex = startIndex;
+ this._lastRenderedStopIndex = stopIndex;
+
+ var unloadedRanges = scanForUnloadedRanges({
+ isRowLoaded: isRowLoaded,
+ startIndex: Math.max(0, startIndex - threshold),
+ stopIndex: Math.min(rowsCount, stopIndex + threshold)
+ });
+
+ unloadedRanges.forEach(function (unloadedRange) {
+ var promise = loadMoreRows(unloadedRange);
+ if (promise) {
+ promise.then(function () {
+ // Refresh the visible rows if any of them have just been loaded.
+ // Otherwise they will remain in their unloaded visual state.
+ if (isRangeVisible({
+ lastRenderedStartIndex: _this2._lastRenderedStartIndex,
+ lastRenderedStopIndex: _this2._lastRenderedStopIndex,
+ startIndex: unloadedRange.startIndex,
+ stopIndex: unloadedRange.stopIndex
+ })) {
+ if (_this2._registeredChild) {
+ _this2._registeredChild.forceUpdate();
+ }
+ }
+ });
+ }
+ });
+ }
+ }, {
+ key: '_registerChild',
+ value: function _registerChild(registeredChild) {
+ this._registeredChild = registeredChild;
+ }
+ }]);
+
+ return InfiniteLoader;
+}(_react.Component);
+
+/**
+ * Determines if the specified start/stop range is visible based on the most recently rendered range.
+ */
+
+
+InfiniteLoader.propTypes = {
+ /**
+ * Function respondible for rendering a virtualized component.
+ * This function should implement the following signature:
+ * ({ onRowsRendered, registerChild }) => PropTypes.element
+ *
+ * The specified :onRowsRendered function should be passed through to the child's :onRowsRendered property.
+ * The :registerChild callback should be set as the virtualized component's :ref.
+ */
+ children: _react.PropTypes.func.isRequired,
+
+ /**
+ * Function responsible for tracking the loaded state of each row.
+ * It should implement the following signature: (index: number): boolean
+ */
+ isRowLoaded: _react.PropTypes.func.isRequired,
+
+ /**
+ * Callback to be invoked when more rows must be loaded.
+ * It should implement the following signature: ({ startIndex, stopIndex }): Promise
+ * The returned Promise should be resolved once row data has finished loading.
+ * It will be used to determine when to refresh the list with the newly-loaded data.
+ * This callback may be called multiple times in reaction to a single scroll event.
+ */
+ loadMoreRows: _react.PropTypes.func.isRequired,
+
+ /**
+ * Number of rows in list; can be arbitrary high number if actual number is unknown.
+ */
+ rowsCount: _react.PropTypes.number.isRequired,
+
+ /**
+ * Threshold at which to pre-fetch data.
+ * A threshold X means that data will start loading when a user scrolls within X rows.
+ * This value defaults to 15.
+ */
+ threshold: _react.PropTypes.number.isRequired
+};
+InfiniteLoader.defaultProps = {
+ rowsCount: 0,
+ threshold: 15
+};
+exports.default = InfiniteLoader;
+function isRangeVisible(_ref2) {
+ var lastRenderedStartIndex = _ref2.lastRenderedStartIndex;
+ var lastRenderedStopIndex = _ref2.lastRenderedStopIndex;
+ var startIndex = _ref2.startIndex;
+ var stopIndex = _ref2.stopIndex;
+
+ return !(startIndex > lastRenderedStopIndex || stopIndex < lastRenderedStartIndex);
+}
+
+/**
+ * Returns all of the ranges within a larger range that contain unloaded rows.
+ */
+function scanForUnloadedRanges(_ref3) {
+ var isRowLoaded = _ref3.isRowLoaded;
+ var startIndex = _ref3.startIndex;
+ var stopIndex = _ref3.stopIndex;
+
+ var unloadedRanges = [];
+ var rangeStartIndex = null;
+ var rangeStopIndex = null;
+
+ for (var i = startIndex; i <= stopIndex; i++) {
+ var loaded = isRowLoaded(i);
+
+ if (!loaded) {
+ rangeStopIndex = i;
+ if (rangeStartIndex === null) {
+ rangeStartIndex = i;
+ }
+ } else if (rangeStopIndex !== null) {
+ unloadedRanges.push({
+ startIndex: rangeStartIndex,
+ stopIndex: rangeStopIndex
+ });
+
+ rangeStartIndex = rangeStopIndex = null;
+ }
+ }
+
+ if (rangeStopIndex !== null) {
+ unloadedRanges.push({
+ startIndex: rangeStartIndex,
+ stopIndex: rangeStopIndex
+ });
+ }
+
+ return unloadedRanges;
+}
+},{"react":undefined,"react-addons-shallow-compare":49}],38:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.InfiniteLoader = exports.default = undefined;
+
+var _InfiniteLoader2 = require('./InfiniteLoader');
+
+var _InfiniteLoader3 = _interopRequireDefault(_InfiniteLoader2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = _InfiniteLoader3.default;
+exports.InfiniteLoader = _InfiniteLoader3.default;
+},{"./InfiniteLoader":37}],39:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _react = require('react');
+
+var _reactAddonsShallowCompare = require('react-addons-shallow-compare');
+
+var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+/**
+ * HOC that simplifies the process of synchronizing scrolling between two or more virtualized components.
+ */
+
+var ScrollSync = function (_Component) {
+ _inherits(ScrollSync, _Component);
+
+ function ScrollSync(props, context) {
+ _classCallCheck(this, ScrollSync);
+
+ var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(ScrollSync).call(this, props, context));
+
+ _this.state = {
+ clientHeight: 0,
+ clientWidth: 0,
+ scrollHeight: 0,
+ scrollLeft: 0,
+ scrollTop: 0,
+ scrollWidth: 0
+ };
+
+ _this._onScroll = _this._onScroll.bind(_this);
+ return _this;
+ }
+
+ _createClass(ScrollSync, [{
+ key: 'render',
+ value: function render() {
+ var children = this.props.children;
+ var _state = this.state;
+ var clientHeight = _state.clientHeight;
+ var clientWidth = _state.clientWidth;
+ var scrollHeight = _state.scrollHeight;
+ var scrollLeft = _state.scrollLeft;
+ var scrollTop = _state.scrollTop;
+ var scrollWidth = _state.scrollWidth;
+
+
+ return children({
+ clientHeight: clientHeight,
+ clientWidth: clientWidth,
+ onScroll: this._onScroll,
+ scrollHeight: scrollHeight,
+ scrollLeft: scrollLeft,
+ scrollTop: scrollTop,
+ scrollWidth: scrollWidth
+ });
+ }
+ }, {
+ key: 'shouldComponentUpdate',
+ value: function shouldComponentUpdate(nextProps, nextState) {
+ return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState);
+ }
+ }, {
+ key: '_onScroll',
+ value: function _onScroll(_ref) {
+ var clientHeight = _ref.clientHeight;
+ var clientWidth = _ref.clientWidth;
+ var scrollHeight = _ref.scrollHeight;
+ var scrollLeft = _ref.scrollLeft;
+ var scrollTop = _ref.scrollTop;
+ var scrollWidth = _ref.scrollWidth;
+
+ this.setState({ clientHeight: clientHeight, clientWidth: clientWidth, scrollHeight: scrollHeight, scrollLeft: scrollLeft, scrollTop: scrollTop, scrollWidth: scrollWidth });
+ }
+ }]);
+
+ return ScrollSync;
+}(_react.Component);
+
+ScrollSync.propTypes = {
+ /**
+ * Function respondible for rendering 2 or more virtualized components.
+ * This function should implement the following signature:
+ * ({ onScroll, scrollLeft, scrollTop }) => PropTypes.element
+ */
+ children: _react.PropTypes.func.isRequired
+};
+exports.default = ScrollSync;
+},{"react":undefined,"react-addons-shallow-compare":49}],40:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.ScrollSync = exports.default = undefined;
+
+var _ScrollSync2 = require('./ScrollSync');
+
+var _ScrollSync3 = _interopRequireDefault(_ScrollSync2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = _ScrollSync3.default;
+exports.ScrollSync = _ScrollSync3.default;
+},{"./ScrollSync":39}],41:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _Grid = require('../Grid');
+
+var _Grid2 = _interopRequireDefault(_Grid);
+
+var _react = require('react');
+
+var _react2 = _interopRequireDefault(_react);
+
+var _classnames = require('classnames');
+
+var _classnames2 = _interopRequireDefault(_classnames);
+
+var _reactAddonsShallowCompare = require('react-addons-shallow-compare');
+
+var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+/**
+ * It is inefficient to create and manage a large list of DOM elements within a scrolling container
+ * if only a few of those elements are visible. The primary purpose of this component is to improve
+ * performance by only rendering the DOM nodes that a user is able to see based on their current
+ * scroll position.
+ *
+ * This component renders a virtualized list of elements with either fixed or dynamic heights.
+ */
+
+var VirtualScroll = function (_Component) {
+ _inherits(VirtualScroll, _Component);
+
+ function VirtualScroll() {
+ _classCallCheck(this, VirtualScroll);
+
+ return _possibleConstructorReturn(this, Object.getPrototypeOf(VirtualScroll).apply(this, arguments));
+ }
+
+ _createClass(VirtualScroll, [{
+ key: 'recomputeRowHeights',
+
+
+ /**
+ * See Grid#recomputeGridSize
+ */
+ value: function recomputeRowHeights() {
+ this.refs.Grid.recomputeGridSize();
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props = this.props;
+ var className = _props.className;
+ var height = _props.height;
+ var noRowsRenderer = _props.noRowsRenderer;
+ var onRowsRendered = _props.onRowsRendered;
+ var _onScroll = _props.onScroll;
+ var rowHeight = _props.rowHeight;
+ var rowRenderer = _props.rowRenderer;
+ var overscanRowsCount = _props.overscanRowsCount;
+ var rowsCount = _props.rowsCount;
+ var scrollToIndex = _props.scrollToIndex;
+ var scrollTop = _props.scrollTop;
+ var width = _props.width;
+
+
+ var classNames = (0, _classnames2.default)('VirtualScroll', className);
+
+ return _react2.default.createElement(_Grid2.default, {
+ ref: 'Grid',
+ className: classNames,
+ columnWidth: width,
+ columnsCount: 1,
+ height: height,
+ noContentRenderer: noRowsRenderer,
+ onScroll: function onScroll(_ref) {
+ var clientHeight = _ref.clientHeight;
+ var scrollHeight = _ref.scrollHeight;
+ var scrollTop = _ref.scrollTop;
+ return _onScroll({ clientHeight: clientHeight, scrollHeight: scrollHeight, scrollTop: scrollTop });
+ },
+ onSectionRendered: function onSectionRendered(_ref2) {
+ var rowOverscanStartIndex = _ref2.rowOverscanStartIndex;
+ var rowOverscanStopIndex = _ref2.rowOverscanStopIndex;
+ var rowStartIndex = _ref2.rowStartIndex;
+ var rowStopIndex = _ref2.rowStopIndex;
+ return onRowsRendered({
+ overscanStartIndex: rowOverscanStartIndex,
+ overscanStopIndex: rowOverscanStopIndex,
+ startIndex: rowStartIndex,
+ stopIndex: rowStopIndex
+ });
+ },
+ overscanRowsCount: overscanRowsCount,
+ renderCell: function renderCell(_ref3) {
+ var columnIndex = _ref3.columnIndex;
+ var rowIndex = _ref3.rowIndex;
+ return rowRenderer(rowIndex);
+ },
+ rowHeight: rowHeight,
+ rowsCount: rowsCount,
+ scrollToRow: scrollToIndex,
+ scrollTop: scrollTop,
+ width: width
+ });
+ }
+ }, {
+ key: 'shouldComponentUpdate',
+ value: function shouldComponentUpdate(nextProps, nextState) {
+ return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState);
+ }
+ }]);
+
+ return VirtualScroll;
+}(_react.Component);
+
+VirtualScroll.propTypes = {
+ /** Optional CSS class name */
+ className: _react.PropTypes.string,
+
+ /** Height constraint for list (determines how many actual rows are rendered) */
+ height: _react.PropTypes.number.isRequired,
+
+ /** Optional renderer to be used in place of rows when rowsCount is 0 */
+ noRowsRenderer: _react.PropTypes.func.isRequired,
+
+ /**
+ * Callback invoked with information about the slice of rows that were just rendered.
+ * ({ startIndex, stopIndex }): void
+ */
+ onRowsRendered: _react.PropTypes.func.isRequired,
+
+ /**
+ * Number of rows to render above/below the visible bounds of the list.
+ * These rows can help for smoother scrolling on touch devices.
+ */
+ overscanRowsCount: _react.PropTypes.number.isRequired,
+
+ /**
+ * Callback invoked whenever the scroll offset changes within the inner scrollable region.
+ * This callback can be used to sync scrolling between lists, tables, or grids.
+ * ({ clientHeight, scrollHeight, scrollTop }): void
+ */
+ onScroll: _react.PropTypes.func.isRequired,
+
+ /**
+ * Either a fixed row height (number) or a function that returns the height of a row given its index.
+ * (index: number): number
+ */
+ rowHeight: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.func]).isRequired,
+
+ /** Responsbile for rendering a row given an index */
+ rowRenderer: _react.PropTypes.func.isRequired,
+
+ /** Number of rows in list. */
+ rowsCount: _react.PropTypes.number.isRequired,
+
+ /** Row index to ensure visible (by forcefully scrolling if necessary) */
+ scrollToIndex: _react.PropTypes.number,
+
+ /** Vertical offset. */
+ scrollTop: _react.PropTypes.number,
+
+ /** Width of list */
+ width: _react.PropTypes.number.isRequired
+};
+VirtualScroll.defaultProps = {
+ noRowsRenderer: function noRowsRenderer() {
+ return null;
+ },
+ onRowsRendered: function onRowsRendered() {
+ return null;
+ },
+ onScroll: function onScroll() {
+ return null;
+ },
+ overscanRowsCount: 10
+};
+exports.default = VirtualScroll;
+},{"../Grid":36,"classnames":undefined,"react":undefined,"react-addons-shallow-compare":49}],42:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.VirtualScroll = exports.default = undefined;
+
+var _VirtualScroll2 = require('./VirtualScroll');
+
+var _VirtualScroll3 = _interopRequireDefault(_VirtualScroll2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = _VirtualScroll3.default;
+exports.VirtualScroll = _VirtualScroll3.default;
+},{"./VirtualScroll":41}],43:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _ArrowKeyStepper = require('./ArrowKeyStepper');
+
+Object.defineProperty(exports, 'ArrowKeyStepper', {
+ enumerable: true,
+ get: function get() {
+ return _ArrowKeyStepper.ArrowKeyStepper;
+ }
+});
+
+var _AutoSizer = require('./AutoSizer');
+
+Object.defineProperty(exports, 'AutoSizer', {
+ enumerable: true,
+ get: function get() {
+ return _AutoSizer.AutoSizer;
+ }
+});
+
+var _ColumnSizer = require('./ColumnSizer');
+
+Object.defineProperty(exports, 'ColumnSizer', {
+ enumerable: true,
+ get: function get() {
+ return _ColumnSizer.ColumnSizer;
+ }
+});
+
+var _FlexTable = require('./FlexTable');
+
+Object.defineProperty(exports, 'FlexTable', {
+ enumerable: true,
+ get: function get() {
+ return _FlexTable.FlexTable;
+ }
+});
+Object.defineProperty(exports, 'FlexColumn', {
+ enumerable: true,
+ get: function get() {
+ return _FlexTable.FlexColumn;
+ }
+});
+Object.defineProperty(exports, 'SortDirection', {
+ enumerable: true,
+ get: function get() {
+ return _FlexTable.SortDirection;
+ }
+});
+Object.defineProperty(exports, 'SortIndicator', {
+ enumerable: true,
+ get: function get() {
+ return _FlexTable.SortIndicator;
+ }
+});
- if (typeof qs !== 'string' || qs.length === 0) {
- return obj;
+var _Grid = require('./Grid');
+
+Object.defineProperty(exports, 'Grid', {
+ enumerable: true,
+ get: function get() {
+ return _Grid.Grid;
}
+});
- var regexp = /\+/g;
- qs = qs.split(sep);
+var _InfiniteLoader = require('./InfiniteLoader');
- var maxKeys = 1000;
- if (options && typeof options.maxKeys === 'number') {
- maxKeys = options.maxKeys;
+Object.defineProperty(exports, 'InfiniteLoader', {
+ enumerable: true,
+ get: function get() {
+ return _InfiniteLoader.InfiniteLoader;
}
+});
- var len = qs.length;
- // maxKeys <= 0 means that we should not limit keys count
- if (maxKeys > 0 && len > maxKeys) {
- len = maxKeys;
+var _ScrollSync = require('./ScrollSync');
+
+Object.defineProperty(exports, 'ScrollSync', {
+ enumerable: true,
+ get: function get() {
+ return _ScrollSync.ScrollSync;
}
+});
- for (var i = 0; i < len; ++i) {
- var x = qs[i].replace(regexp, '%20'),
- idx = x.indexOf(eq),
- kstr, vstr, k, v;
+var _VirtualScroll = require('./VirtualScroll');
- if (idx >= 0) {
- kstr = x.substr(0, idx);
- vstr = x.substr(idx + 1);
- } else {
- kstr = x;
- vstr = '';
+Object.defineProperty(exports, 'VirtualScroll', {
+ enumerable: true,
+ get: function get() {
+ return _VirtualScroll.VirtualScroll;
+ }
+});
+},{"./ArrowKeyStepper":24,"./AutoSizer":26,"./ColumnSizer":28,"./FlexTable":33,"./Grid":36,"./InfiniteLoader":38,"./ScrollSync":40,"./VirtualScroll":42}],44:[function(require,module,exports){
+'use strict';
+
+/**
+* Detect Element Resize.
+* Forked in order to guard against unsafe 'window' and 'document' references.
+*
+* https://github.com/sdecima/javascript-detect-element-resize
+* Sebastian Decima
+*
+* version: 0.5.3
+**/
+
+// Check `document` and `window` in case of server-side rendering
+var _window;
+if (typeof window !== 'undefined') {
+ _window = window;
+} else if (typeof self !== 'undefined') {
+ _window = self;
+} else {
+ _window = undefined;
+}
+
+var attachEvent = typeof document !== 'undefined' && document.attachEvent;
+var stylesCreated = false;
+
+if (!attachEvent) {
+ var requestFrame = function () {
+ var raf = _window.requestAnimationFrame || _window.mozRequestAnimationFrame || _window.webkitRequestAnimationFrame || function (fn) {
+ return _window.setTimeout(fn, 20);
+ };
+ return function (fn) {
+ return raf(fn);
+ };
+ }();
+
+ var cancelFrame = function () {
+ var cancel = _window.cancelAnimationFrame || _window.mozCancelAnimationFrame || _window.webkitCancelAnimationFrame || _window.clearTimeout;
+ return function (id) {
+ return cancel(id);
+ };
+ }();
+
+ var resetTriggers = function resetTriggers(element) {
+ var triggers = element.__resizeTriggers__,
+ expand = triggers.firstElementChild,
+ contract = triggers.lastElementChild,
+ expandChild = expand.firstElementChild;
+ contract.scrollLeft = contract.scrollWidth;
+ contract.scrollTop = contract.scrollHeight;
+ expandChild.style.width = expand.offsetWidth + 1 + 'px';
+ expandChild.style.height = expand.offsetHeight + 1 + 'px';
+ expand.scrollLeft = expand.scrollWidth;
+ expand.scrollTop = expand.scrollHeight;
+ };
+
+ var checkTriggers = function checkTriggers(element) {
+ return element.offsetWidth != element.__resizeLast__.width || element.offsetHeight != element.__resizeLast__.height;
+ };
+
+ var scrollListener = function scrollListener(e) {
+ var element = this;
+ resetTriggers(this);
+ if (this.__resizeRAF__) cancelFrame(this.__resizeRAF__);
+ this.__resizeRAF__ = requestFrame(function () {
+ if (checkTriggers(element)) {
+ element.__resizeLast__.width = element.offsetWidth;
+ element.__resizeLast__.height = element.offsetHeight;
+ element.__resizeListeners__.forEach(function (fn) {
+ fn.call(element, e);
+ });
+ }
+ });
+ };
+
+ /* Detect CSS Animations support to detect element display/re-attach */
+ var animation = false,
+ animationstring = 'animation',
+ keyframeprefix = '',
+ animationstartevent = 'animationstart',
+ domPrefixes = 'Webkit Moz O ms'.split(' '),
+ startEvents = 'webkitAnimationStart animationstart oAnimationStart MSAnimationStart'.split(' '),
+ pfx = '';
+ {
+ var elm = document.createElement('fakeelement');
+ if (elm.style.animationName !== undefined) {
+ animation = true;
}
- k = decodeURIComponent(kstr);
- v = decodeURIComponent(vstr);
+ if (animation === false) {
+ for (var i = 0; i < domPrefixes.length; i++) {
+ if (elm.style[domPrefixes[i] + 'AnimationName'] !== undefined) {
+ pfx = domPrefixes[i];
+ animationstring = pfx + 'Animation';
+ keyframeprefix = '-' + pfx.toLowerCase() + '-';
+ animationstartevent = startEvents[i];
+ animation = true;
+ break;
+ }
+ }
+ }
+ }
- if (!hasOwnProperty(obj, k)) {
- obj[k] = v;
- } else if (isArray(obj[k])) {
- obj[k].push(v);
+ var animationName = 'resizeanim';
+ var animationKeyframes = '@' + keyframeprefix + 'keyframes ' + animationName + ' { from { opacity: 0; } to { opacity: 0; } } ';
+ var animationStyle = keyframeprefix + 'animation: 1ms ' + animationName + '; ';
+}
+
+var createStyles = function createStyles() {
+ if (!stylesCreated) {
+ //opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360
+ var css = (animationKeyframes ? animationKeyframes : '') + '.resize-triggers { ' + (animationStyle ? animationStyle : '') + 'visibility: hidden; opacity: 0; } ' + '.resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \" \"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',
+ head = document.head || document.getElementsByTagName('head')[0],
+ style = document.createElement('style');
+
+ style.type = 'text/css';
+ if (style.styleSheet) {
+ style.styleSheet.cssText = css;
} else {
- obj[k] = [obj[k], v];
+ style.appendChild(document.createTextNode(css));
}
- }
- return obj;
+ head.appendChild(style);
+ stylesCreated = true;
+ }
};
-var isArray = Array.isArray || function (xs) {
- return Object.prototype.toString.call(xs) === '[object Array]';
+var addResizeListener = function addResizeListener(element, fn) {
+ if (attachEvent) element.attachEvent('onresize', fn);else {
+ if (!element.__resizeTriggers__) {
+ if (getComputedStyle(element).position == 'static') element.style.position = 'relative';
+ createStyles();
+ element.__resizeLast__ = {};
+ element.__resizeListeners__ = [];
+ (element.__resizeTriggers__ = document.createElement('div')).className = 'resize-triggers';
+ element.__resizeTriggers__.innerHTML = '' + '';
+ element.appendChild(element.__resizeTriggers__);
+ resetTriggers(element);
+ element.addEventListener('scroll', scrollListener, true);
+
+ /* Listen for a css animation to detect element display/re-attach */
+ animationstartevent && element.__resizeTriggers__.addEventListener(animationstartevent, function (e) {
+ if (e.animationName == animationName) resetTriggers(element);
+ });
+ }
+ element.__resizeListeners__.push(fn);
+ }
};
-},{}],17:[function(require,module,exports){
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
+var removeResizeListener = function removeResizeListener(element, fn) {
+ if (attachEvent) element.detachEvent('onresize', fn);else {
+ element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
+ if (!element.__resizeListeners__.length) {
+ element.removeEventListener('scroll', scrollListener);
+ element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__);
+ }
+ }
+};
+module.exports = {
+ addResizeListener: addResizeListener,
+ removeResizeListener: removeResizeListener
+};
+},{}],45:[function(require,module,exports){
+'use strict';
+module.exports = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
+},{}],46:[function(require,module,exports){
'use strict';
-var stringifyPrimitive = function(v) {
- switch (typeof v) {
- case 'string':
- return v;
+var canUseDOM = require('./inDOM');
- case 'boolean':
- return v ? 'true' : 'false';
+var size;
- case 'number':
- return isFinite(v) ? v : '';
+module.exports = function (recalc) {
+ if (!size || recalc) {
+ if (canUseDOM) {
+ var scrollDiv = document.createElement('div');
- default:
- return '';
+ scrollDiv.style.position = 'absolute';
+ scrollDiv.style.top = '-9999px';
+ scrollDiv.style.width = '50px';
+ scrollDiv.style.height = '50px';
+ scrollDiv.style.overflow = 'scroll';
+
+ document.body.appendChild(scrollDiv);
+ size = scrollDiv.offsetWidth - scrollDiv.clientWidth;
+ document.body.removeChild(scrollDiv);
+ }
}
+
+ return size;
};
+},{"./inDOM":45}],47:[function(require,module,exports){
+(function (global){
+var now = require('performance-now')
+ , root = typeof window === 'undefined' ? global : window
+ , vendors = ['moz', 'webkit']
+ , suffix = 'AnimationFrame'
+ , raf = root['request' + suffix]
+ , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]
+
+for(var i = 0; !raf && i < vendors.length; i++) {
+ raf = root[vendors[i] + 'Request' + suffix]
+ caf = root[vendors[i] + 'Cancel' + suffix]
+ || root[vendors[i] + 'CancelRequest' + suffix]
+}
-module.exports = function(obj, sep, eq, name) {
- sep = sep || '&';
- eq = eq || '=';
- if (obj === null) {
- obj = undefined;
+// Some versions of FF have rAF but not cAF
+if(!raf || !caf) {
+ var last = 0
+ , id = 0
+ , queue = []
+ , frameDuration = 1000 / 60
+
+ raf = function(callback) {
+ if(queue.length === 0) {
+ var _now = now()
+ , next = Math.max(0, frameDuration - (_now - last))
+ last = next + _now
+ setTimeout(function() {
+ var cp = queue.slice(0)
+ // Clear queue here to prevent
+ // callbacks from appending listeners
+ // to the current frame's queue
+ queue.length = 0
+ for(var i = 0; i < cp.length; i++) {
+ if(!cp[i].cancelled) {
+ try{
+ cp[i].callback(last)
+ } catch(e) {
+ setTimeout(function() { throw e }, 0)
+ }
+ }
+ }
+ }, Math.round(next))
+ }
+ queue.push({
+ handle: ++id,
+ callback: callback,
+ cancelled: false
+ })
+ return id
}
- if (typeof obj === 'object') {
- return map(objectKeys(obj), function(k) {
- var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;
- if (isArray(obj[k])) {
- return map(obj[k], function(v) {
- return ks + encodeURIComponent(stringifyPrimitive(v));
- }).join(sep);
- } else {
- return ks + encodeURIComponent(stringifyPrimitive(obj[k]));
+ caf = function(handle) {
+ for(var i = 0; i < queue.length; i++) {
+ if(queue[i].handle === handle) {
+ queue[i].cancelled = true
}
- }).join(sep);
-
+ }
}
+}
- if (!name) return '';
- return encodeURIComponent(stringifyPrimitive(name)) + eq +
- encodeURIComponent(stringifyPrimitive(obj));
-};
+module.exports = function(fn) {
+ // Wrap in a new function to prevent
+ // `cancel` potentially being assigned
+ // to the native rAF function
+ return raf.call(root, fn)
+}
+module.exports.cancel = function() {
+ caf.apply(root, arguments)
+}
+module.exports.polyfill = function() {
+ root.requestAnimationFrame = raf
+ root.cancelAnimationFrame = caf
+}
-var isArray = Array.isArray || function (xs) {
- return Object.prototype.toString.call(xs) === '[object Array]';
-};
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{"performance-now":48}],48:[function(require,module,exports){
+(function (process){
+// Generated by CoffeeScript 1.7.1
+(function() {
+ var getNanoSeconds, hrtime, loadTime;
-function map (xs, f) {
- if (xs.map) return xs.map(f);
- var res = [];
- for (var i = 0; i < xs.length; i++) {
- res.push(f(xs[i], i));
+ if ((typeof performance !== "undefined" && performance !== null) && performance.now) {
+ module.exports = function() {
+ return performance.now();
+ };
+ } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) {
+ module.exports = function() {
+ return (getNanoSeconds() - loadTime) / 1e6;
+ };
+ hrtime = process.hrtime;
+ getNanoSeconds = function() {
+ var hr;
+ hr = hrtime();
+ return hr[0] * 1e9 + hr[1];
+ };
+ loadTime = getNanoSeconds();
+ } else if (Date.now) {
+ module.exports = function() {
+ return Date.now() - loadTime;
+ };
+ loadTime = Date.now();
+ } else {
+ module.exports = function() {
+ return new Date().getTime() - loadTime;
+ };
+ loadTime = new Date().getTime();
}
- return res;
-}
-var objectKeys = Object.keys || function (obj) {
- var res = [];
- for (var key in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);
- }
- return res;
-};
+}).call(this);
+
+}).call(this,require('_process'))
+},{"_process":13}],49:[function(require,module,exports){
+module.exports = require('react/lib/shallowCompare');
+},{"react/lib/shallowCompare":50}],50:[function(require,module,exports){
+/**
+ * Copyright 2013-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.
+ *
+* @providesModule shallowCompare
+*/
-},{}],18:[function(require,module,exports){
'use strict';
-exports.decode = exports.parse = require('./decode');
-exports.encode = exports.stringify = require('./encode');
+var shallowEqual = require('fbjs/lib/shallowEqual');
-},{"./decode":16,"./encode":17}],19:[function(require,module,exports){
-// Generated by CoffeeScript 1.10.0
-var React, isRetina, md5, querystring;
+/**
+ * Does a shallow comparison for props and state.
+ * See ReactComponentWithPureRenderMixin
+ */
+function shallowCompare(instance, nextProps, nextState) {
+ return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);
+}
-React = require('react');
+module.exports = shallowCompare;
+},{"fbjs/lib/shallowEqual":51}],51:[function(require,module,exports){
+/**
+ * Copyright 2013-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.
+ *
+ * @providesModule shallowEqual
+ * @typechecks
+ *
+ */
-md5 = require('md5');
+'use strict';
-querystring = require('querystring');
+var hasOwnProperty = Object.prototype.hasOwnProperty;
-isRetina = require('is-retina');
+/**
+ * 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 (objA === objB) {
+ return true;
+ }
-module.exports = React.createClass({
- displayName: 'Gravatar',
- propTypes: {
- email: React.PropTypes.string,
- md5: React.PropTypes.string,
- size: React.PropTypes.number,
- rating: React.PropTypes.string,
- https: React.PropTypes.bool,
- "default": React.PropTypes.string,
- className: React.PropTypes.string
- },
- getDefaultProps: function() {
- return {
- size: 50,
- rating: 'g',
- https: false,
- "default": "retro"
- };
- },
- render: function() {
- var base, hash, modernBrowser, query, retinaQuery, retinaSrc, src;
- base = this.props.https ? "https://secure.gravatar.com/avatar/" : 'http://www.gravatar.com/avatar/';
- query = querystring.stringify({
- s: this.props.size,
- r: this.props.rating,
- d: this.props["default"]
- });
- retinaQuery = querystring.stringify({
- s: this.props.size * 2,
- r: this.props.rating,
- d: this.props["default"]
- });
- if (this.props.md5) {
- hash = this.props.md5;
- } else if (this.props.email) {
- hash = md5(this.props.email);
- } else {
- console.warn('Gravatar image can not be fetched. Either the "email" or "md5" prop must be specified.');
- return React.createElement("script", null);
- }
- src = base + hash + "?" + query;
- retinaSrc = base + hash + "?" + retinaQuery;
- modernBrowser = true;
- if (typeof window !== "undefined" && window !== null) {
- modernBrowser = 'srcset' in document.createElement('img');
- }
- if (!modernBrowser && isRetina()) {
- return React.createElement("img", React.__spread({
- "style": this.props.style,
- "className": "react-gravatar " + this.props.className,
- "src": retinaSrc,
- "height": this.props.size,
- "width": this.props.size
- }, this.props));
- } else {
- return React.createElement("img", React.__spread({
- "style": this.props.style,
- "className": "react-gravatar " + this.props.className,
- "src": src,
- "srcSet": retinaSrc + " 2x",
- "height": this.props.size,
- "width": this.props.size
- }, this.props));
+ 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.
+ var bHasOwnProperty = hasOwnProperty.bind(objB);
+ for (var i = 0; i < keysA.length; i++) {
+ if (!bHasOwnProperty(keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) {
+ return false;
}
}
-});
-},{"is-retina":14,"md5":15,"querystring":18,"react":undefined}]},{},[1])
-//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCIvVXNlcnMvSmVkL0RldmVsb3BtZW50L3BhY2thZ2VzL3JlYWN0LXNlbGVjdC9leGFtcGxlcy9zcmMvYXBwLmpzIiwiL1VzZXJzL0plZC9EZXZlbG9w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C5jcmVhdGVFbGVtZW50KFwiaW1nXCIsIFJlYWN0Ll9fc3ByZWFkKHtcbiAgICAgICAgXCJzdHlsZVwiOiB0aGlzLnByb3BzLnN0eWxlLFxuICAgICAgICBcImNsYXNzTmFtZVwiOiBcInJlYWN0LWdyYXZhdGFyIFwiICsgdGhpcy5wcm9wcy5jbGFzc05hbWUsXG4gICAgICAgIFwic3JjXCI6IHNyYyxcbiAgICAgICAgXCJzcmNTZXRcIjogcmV0aW5hU3JjICsgXCIgMnhcIixcbiAgICAgICAgXCJoZWlnaHRcIjogdGhpcy5wcm9wcy5zaXplLFxuICAgICAgICBcIndpZHRoXCI6IHRoaXMucHJvcHMuc2l6ZVxuICAgICAgfSwgdGhpcy5wcm9wcykpO1xuICAgIH1cbiAgfVxufSk7XG4iXX0=
+ return true;
+}
+
+module.exports = shallowEqual;
+},{}]},{},[1]);
diff --git a/examples/dist/bundle.js b/examples/dist/bundle.js
index de9e23dff8..2c9c1783e6 100644
--- a/examples/dist/bundle.js
+++ b/examples/dist/bundle.js
@@ -454,6 +454,7 @@ var Select = _react2['default'].createClass({
allowCreate: _react2['default'].PropTypes.bool, // whether to allow creation of new entries
autoBlur: _react2['default'].PropTypes.bool,
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
className: _react2['default'].PropTypes.string, // className for the outer element
clearAllText: stringOrNode, // title for the "clear" control when multi: true
@@ -468,11 +469,13 @@ var Select = _react2['default'].createClass({
ignoreCase: _react2['default'].PropTypes.bool, // whether to perform case-insensitive filtering
inputProps: _react2['default'].PropTypes.object, // custom attributes for the Input
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
@@ -487,6 +490,8 @@ var Select = _react2['default'].createClass({
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
+ optionClassName: _react2['default'].PropTypes.string, // additional class(es) to apply to the elements
optionComponent: _react2['default'].PropTypes.func, // option component to render in dropdown
optionRenderer: _react2['default'].PropTypes.func, // optionRenderer: function (option) {}
options: _react2['default'].PropTypes.array, // array of options
@@ -509,6 +514,7 @@ var Select = _react2['default'].createClass({
getDefaultProps: function getDefaultProps() {
return {
addLabelText: 'Add "{label}"?',
+ autosize: true,
allowCreate: false,
backspaceRemoves: true,
clearable: true,
@@ -522,6 +528,7 @@ var Select = _react2['default'].createClass({
ignoreCase: true,
inputProps: {},
isLoading: false,
+ joinValues: false,
labelKey: 'label',
matchPos: 'any',
matchProp: 'any',
@@ -529,6 +536,7 @@ var Select = _react2['default'].createClass({
multi: false,
noResultsText: 'No results found',
onBlurResetsInput: true,
+ openAfterFocus: false,
optionComponent: _Option2['default'],
placeholder: 'Select...',
required: false,
@@ -557,6 +565,14 @@ var Select = _react2['default'].createClass({
}
},
+ componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
+ if (this.props.value !== nextProps.value && nextProps.required) {
+ this.setState({
+ required: this.handleRequired(nextProps.value, nextProps.multi)
+ });
+ }
+ },
+
componentWillUpdate: function componentWillUpdate(nextProps, nextState) {
if (nextState.isOpen !== this.state.isOpen) {
var handler = nextState.isOpen ? nextProps.onOpen : nextProps.onClose;
@@ -602,6 +618,12 @@ var Select = _react2['default'].createClass({
focus: function focus() {
if (!this.refs.input) return;
this.refs.input.focus();
+
+ if (this.props.openAfterFocus) {
+ this.setState({
+ isOpen: true
+ });
+ }
},
blurInput: function blurInput() {
@@ -1043,17 +1065,32 @@ var Select = _react2['default'].createClass({
ref: 'input',
style: { border: 0, width: 1, display: 'inline-block' } }));
}
- return _react2['default'].createElement(_reactInputAutosize2['default'], _extends({}, this.props.inputProps, {
- className: className,
- tabIndex: this.props.tabIndex,
- onBlur: this.handleInputBlur,
- onChange: this.handleInputChange,
- onFocus: this.handleInputFocus,
- minWidth: '5',
- ref: 'input',
- required: this.state.required,
- value: this.state.inputValue
- }));
+ if (this.props.autosize) {
+ return _react2['default'].createElement(_reactInputAutosize2['default'], _extends({}, this.props.inputProps, {
+ className: className,
+ tabIndex: this.props.tabIndex,
+ onBlur: this.handleInputBlur,
+ onChange: this.handleInputChange,
+ onFocus: this.handleInputFocus,
+ minWidth: '5',
+ ref: 'input',
+ required: this.state.required,
+ value: this.state.inputValue
+ }));
+ }
+ return _react2['default'].createElement(
+ 'div',
+ { className: className },
+ _react2['default'].createElement('input', _extends({}, this.props.inputProps, {
+ tabIndex: this.props.tabIndex,
+ onBlur: this.handleInputBlur,
+ onChange: this.handleInputChange,
+ onFocus: this.handleInputFocus,
+ ref: 'input',
+ required: this.state.required,
+ value: this.state.inputValue
+ }))
+ );
},
renderClear: function renderClear() {
@@ -1120,42 +1157,53 @@ var Select = _react2['default'].createClass({
var _this4 = this;
if (options && options.length) {
- var _ret = (function () {
- var Option = _this4.props.optionComponent;
- var renderLabel = _this4.props.optionRenderer || _this4.getOptionLabel;
-
- return {
- v: options.map(function (option, i) {
- var isSelected = valueArray && valueArray.indexOf(option) > -1;
- var isFocused = option === focusedOption;
- var optionRef = isFocused ? 'focused' : null;
- var optionClass = (0, _classnames2['default'])({
- 'Select-option': true,
- 'is-selected': isSelected,
- 'is-focused': isFocused,
- 'is-disabled': option.disabled
- });
-
- return _react2['default'].createElement(
- Option,
- {
- className: optionClass,
- isDisabled: option.disabled,
- isFocused: isFocused,
- key: 'option-' + i + '-' + option[_this4.props.valueKey],
- onSelect: _this4.selectValue,
- onFocus: _this4.focusOption,
- option: option,
- isSelected: isSelected,
- ref: optionRef
- },
- renderLabel(option)
- );
- })
- };
- })();
-
- if (typeof _ret === 'object') return _ret.v;
+ if (this.props.menuRenderer) {
+ return this.props.menuRenderer({
+ focusedOption: focusedOption,
+ focusOption: this.focusOption,
+ labelKey: this.props.labelKey,
+ options: options,
+ selectValue: this.selectValue,
+ valueArray: valueArray
+ });
+ } else {
+ var _ret = (function () {
+ var Option = _this4.props.optionComponent;
+ var renderLabel = _this4.props.optionRenderer || _this4.getOptionLabel;
+
+ return {
+ v: options.map(function (option, i) {
+ var isSelected = valueArray && valueArray.indexOf(option) > -1;
+ var isFocused = option === focusedOption;
+ var optionRef = isFocused ? 'focused' : null;
+ var optionClass = (0, _classnames2['default'])(_this4.props.optionClassName, {
+ 'Select-option': true,
+ 'is-selected': isSelected,
+ 'is-focused': isFocused,
+ 'is-disabled': option.disabled
+ });
+
+ return _react2['default'].createElement(
+ Option,
+ {
+ className: optionClass,
+ isDisabled: option.disabled,
+ isFocused: isFocused,
+ key: 'option-' + i + '-' + option[_this4.props.valueKey],
+ onSelect: _this4.selectValue,
+ onFocus: _this4.focusOption,
+ option: option,
+ isSelected: isSelected,
+ ref: optionRef
+ },
+ renderLabel(option)
+ );
+ })
+ };
+ })();
+
+ if (typeof _ret === 'object') return _ret.v;
+ }
} else if (this.props.noResultsText) {
return _react2['default'].createElement(
'div',
@@ -1171,6 +1219,17 @@ var Select = _react2['default'].createClass({
var _this5 = this;
if (!this.props.name) return;
+ if (this.props.joinValues) {
+ var value = valueArray.map(function (i) {
+ return stringifyValue(i[_this5.props.valueKey]);
+ }).join(this.props.delimiter);
+ return _react2['default'].createElement('input', {
+ type: 'hidden',
+ ref: 'value',
+ name: this.props.name,
+ value: value,
+ disabled: this.props.disabled });
+ }
return valueArray.map(function (item, index) {
return _react2['default'].createElement('input', { key: 'hidden.' + index,
type: 'hidden',
@@ -1247,5 +1306,4 @@ var Select = _react2['default'].createClass({
exports['default'] = Select;
module.exports = exports['default'];
-},{"./Async":1,"./Option":2,"./Value":3,"./utils/stripDiacritics":4,"classnames":undefined,"react":undefined,"react-dom":undefined,"react-input-autosize":undefined}]},{},[])
-//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCIvVXNlcnMvSmVkL0RldmVsb3BtZW50L3BhY2thZ2VzL3JlYWN0LXNlbGVjdC9zcmMvQXN5bmMuanMiLCIvVXNlcnMvSmVkL0RldmVsb3BtZW50L3BhY2thZ2VzL3JlYWN0LXNlbGVjdC9zcmMvT3B0aW9uLmpzIiwiL1VzZXJzL0plZC9EZXZlbG9wbWVudC9wYWNrYWdlcy9yZWFjdC1zZWxlY3Qvc3JjL1ZhbHVlLmpzIiwiL1VzZXJzL0plZC9EZXZlbG9wbWVudC9wYWNrYWdlcy9yZWFjdC1zZWxlY3Qvc3JjL3V0aWxzL3N0cmlwRGlhY3JpdGljcy5qcyIsIi9Vc2Vycy9KZWQvRGV2ZWxvcG1lbnQvcGFja2FnZXMvcmVhY3Qtc2VsZWN0L3NyYy9TZWxlY3QuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7cUJDQWtCLE9BQU87Ozs7c0JBRU4sVUFBVTs7OztvQ0FDRCx5QkFBeUI7Ozs7QUFFckQsSUFBSSxTQUFTLEdBQUcsQ0FBQyxDQUFDOztBQUVsQ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x9XG5cdFx0XHQ8L2Rpdj5cblx0XHQpO1xuXHR9XG5cbn0pO1xuXG5leHBvcnQgZGVmYXVsdCBTZWxlY3Q7XG4iXX0=
+},{"./Async":1,"./Option":2,"./Value":3,"./utils/stripDiacritics":4,"classnames":undefined,"react":undefined,"react-dom":undefined,"react-input-autosize":undefined}]},{},[]);
diff --git a/examples/dist/common.js b/examples/dist/common.js
index 790b85d945..d30f7bbe14 100644
--- a/examples/dist/common.js
+++ b/examples/dist/common.js
@@ -1,496 +1,447 @@
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 8 && documentMode <= 11);
-module.exports = ExecutionEnvironment;
-},{}],3:[function(require,module,exports){
/**
- * Copyright 2013-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.
- *
- * @providesModule camelize
- * @typechecks
+ * Opera <= 12 includes TextEvent in window, but does not fire
+ * text input events. Rely on keypress instead.
*/
+function isPresto() {
+ var opera = window.opera;
+ return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;
+}
-"use strict";
+var SPACEBAR_CODE = 32;
+var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
-var _hyphenPattern = /-(.)/g;
+var topLevelTypes = EventConstants.topLevelTypes;
+
+// Events and their corresponding property names.
+var eventTypes = {
+ beforeInput: {
+ phasedRegistrationNames: {
+ bubbled: keyOf({ onBeforeInput: null }),
+ captured: keyOf({ onBeforeInputCapture: null })
+ },
+ dependencies: [topLevelTypes.topCompositionEnd, topLevelTypes.topKeyPress, topLevelTypes.topTextInput, topLevelTypes.topPaste]
+ },
+ compositionEnd: {
+ phasedRegistrationNames: {
+ bubbled: keyOf({ onCompositionEnd: null }),
+ captured: keyOf({ onCompositionEndCapture: null })
+ },
+ dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionEnd, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown]
+ },
+ compositionStart: {
+ phasedRegistrationNames: {
+ bubbled: keyOf({ onCompositionStart: null }),
+ captured: keyOf({ onCompositionStartCapture: null })
+ },
+ dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionStart, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown]
+ },
+ compositionUpdate: {
+ phasedRegistrationNames: {
+ bubbled: keyOf({ onCompositionUpdate: null }),
+ captured: keyOf({ onCompositionUpdateCapture: null })
+ },
+ dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionUpdate, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown]
+ }
+};
+
+// Track whether we've ever handled a keypress on the space key.
+var hasSpaceKeypress = false;
/**
- * Camelcases a hyphenated string, for example:
- *
- * > camelize('background-color')
- * < "backgroundColor"
- *
- * @param {string} string
- * @return {string}
+ * Return whether a native keypress event is assumed to be a command.
+ * This is required because Firefox fires `keypress` events for key commands
+ * (cut, copy, select-all, etc.) even though no character is inserted.
*/
-function camelize(string) {
- return string.replace(_hyphenPattern, function (_, character) {
- return character.toUpperCase();
- });
+function isKeypressCommand(nativeEvent) {
+ return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
+ // ctrlKey && altKey is equivalent to AltGr, and is not a command.
+ !(nativeEvent.ctrlKey && nativeEvent.altKey);
}
-module.exports = camelize;
-},{}],4:[function(require,module,exports){
/**
- * Copyright 2013-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.
+ * Translate native top level events into event types.
*
- * @providesModule camelizeStyleName
- * @typechecks
+ * @param {string} topLevelType
+ * @return {object}
*/
-
-'use strict';
-
-var camelize = require('./camelize');
-
-var msPattern = /^-ms-/;
+function getCompositionEventType(topLevelType) {
+ switch (topLevelType) {
+ case topLevelTypes.topCompositionStart:
+ return eventTypes.compositionStart;
+ case topLevelTypes.topCompositionEnd:
+ return eventTypes.compositionEnd;
+ case topLevelTypes.topCompositionUpdate:
+ return eventTypes.compositionUpdate;
+ }
+}
/**
- * Camelcases a hyphenated CSS property name, for example:
- *
- * > camelizeStyleName('background-color')
- * < "backgroundColor"
- * > camelizeStyleName('-moz-transition')
- * < "MozTransition"
- * > camelizeStyleName('-ms-transition')
- * < "msTransition"
- *
- * As Andi Smith suggests
- * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
- * is converted to lowercase `ms`.
+ * Does our fallback best-guess model think this event signifies that
+ * composition has begun?
*
- * @param {string} string
- * @return {string}
+ * @param {string} topLevelType
+ * @param {object} nativeEvent
+ * @return {boolean}
*/
-function camelizeStyleName(string) {
- return camelize(string.replace(msPattern, 'ms-'));
+function isFallbackCompositionStart(topLevelType, nativeEvent) {
+ return topLevelType === topLevelTypes.topKeyDown && nativeEvent.keyCode === START_KEYCODE;
}
-module.exports = camelizeStyleName;
-},{"./camelize":3}],5:[function(require,module,exports){
-/**
- * Copyright 2013-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.
- *
- * @providesModule containsNode
- * @typechecks
- */
-
-'use strict';
-
-var isTextNode = require('./isTextNode');
-
-/*eslint-disable no-bitwise */
-
/**
- * Checks if a given DOM node contains or is another DOM node.
+ * Does our fallback mode think that this event is the end of composition?
*
- * @param {?DOMNode} outerNode Outer DOM node.
- * @param {?DOMNode} innerNode Inner DOM node.
- * @return {boolean} True if `outerNode` contains or is `innerNode`.
+ * @param {string} topLevelType
+ * @param {object} nativeEvent
+ * @return {boolean}
*/
-function containsNode(_x, _x2) {
- var _again = true;
-
- _function: while (_again) {
- var outerNode = _x,
- innerNode = _x2;
- _again = false;
-
- if (!outerNode || !innerNode) {
- return false;
- } else if (outerNode === innerNode) {
+function isFallbackCompositionEnd(topLevelType, nativeEvent) {
+ switch (topLevelType) {
+ case topLevelTypes.topKeyUp:
+ // Command keys insert or clear IME input.
+ return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
+ case topLevelTypes.topKeyDown:
+ // Expect IME keyCode on each keydown. If we get any other
+ // code we must have exited earlier.
+ return nativeEvent.keyCode !== START_KEYCODE;
+ case topLevelTypes.topKeyPress:
+ case topLevelTypes.topMouseDown:
+ case topLevelTypes.topBlur:
+ // Events are not possible without cancelling IME.
return true;
- } else if (isTextNode(outerNode)) {
- return false;
- } else if (isTextNode(innerNode)) {
- _x = outerNode;
- _x2 = innerNode.parentNode;
- _again = true;
- continue _function;
- } else if (outerNode.contains) {
- return outerNode.contains(innerNode);
- } else if (outerNode.compareDocumentPosition) {
- return !!(outerNode.compareDocumentPosition(innerNode) & 16);
- } else {
+ default:
return false;
- }
}
}
-module.exports = containsNode;
-},{"./isTextNode":18}],6:[function(require,module,exports){
/**
- * Copyright 2013-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.
+ * Google Input Tools provides composition data via a CustomEvent,
+ * with the `data` property populated in the `detail` object. If this
+ * is available on the event object, use it. If not, this is a plain
+ * composition event and we have nothing special to extract.
*
- * @providesModule createArrayFromMixed
- * @typechecks
+ * @param {object} nativeEvent
+ * @return {?string}
*/
+function getDataFromCustomEvent(nativeEvent) {
+ var detail = nativeEvent.detail;
+ if (typeof detail === 'object' && 'data' in detail) {
+ return detail.data;
+ }
+ return null;
+}
-'use strict';
-
-var toArray = require('./toArray');
+// Track the current IME composition fallback object, if any.
+var currentComposition = null;
/**
- * Perform a heuristic test to determine if an object is "array-like".
- *
- * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?"
- * Joshu replied: "Mu."
- *
- * This function determines if its argument has "array nature": it returns
- * true if the argument is an actual array, an `arguments' object, or an
- * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()).
- *
- * It will return false for other array-like objects like Filelist.
- *
- * @param {*} obj
- * @return {boolean}
+ * @param {string} topLevelType Record from `EventConstants`.
+ * @param {DOMEventTarget} topLevelTarget The listening component root node.
+ * @param {string} topLevelTargetID ID of `topLevelTarget`.
+ * @param {object} nativeEvent Native browser event.
+ * @return {?object} A SyntheticCompositionEvent.
*/
-function hasArrayNature(obj) {
- return(
- // not null/false
- !!obj && (
- // arrays are objects, NodeLists are functions in Safari
- typeof obj == 'object' || typeof obj == 'function') &&
- // quacks like an array
- 'length' in obj &&
- // not window
- !('setInterval' in obj) &&
- // no DOM node should be considered an array-like
- // a 'select' element has 'length' and 'item' properties on IE8
- typeof obj.nodeType != 'number' && (
- // a real array
- Array.isArray(obj) ||
- // arguments
- 'callee' in obj ||
- // HTMLCollection/NodeList
- 'item' in obj)
- );
-}
+function extractCompositionEvent(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) {
+ var eventType;
+ var fallbackData;
-/**
- * Ensure that the argument is an array by wrapping it in an array if it is not.
- * Creates a copy of the argument if it is already an array.
- *
- * This is mostly useful idiomatically:
- *
- * var createArrayFromMixed = require('createArrayFromMixed');
- *
- * function takesOneOrMoreThings(things) {
- * things = createArrayFromMixed(things);
- * ...
- * }
- *
- * This allows you to treat `things' as an array, but accept scalars in the API.
- *
- * If you need to convert an array-like object, like `arguments`, into an array
- * use toArray instead.
- *
- * @param {*} obj
- * @return {array}
- */
-function createArrayFromMixed(obj) {
- if (!hasArrayNature(obj)) {
- return [obj];
- } else if (Array.isArray(obj)) {
- return obj.slice();
- } else {
- return toArray(obj);
+ if (canUseCompositionEvent) {
+ eventType = getCompositionEventType(topLevelType);
+ } else if (!currentComposition) {
+ if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
+ eventType = eventTypes.compositionStart;
+ }
+ } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
+ eventType = eventTypes.compositionEnd;
}
-}
-module.exports = createArrayFromMixed;
-},{"./toArray":26}],7:[function(require,module,exports){
-(function (process){
-/**
- * Copyright 2013-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.
- *
- * @providesModule createNodesFromMarkup
- * @typechecks
- */
+ if (!eventType) {
+ return null;
+ }
-/*eslint-disable fb-www/unsafe-html*/
+ if (useFallbackCompositionData) {
+ // The current composition is stored statically and must not be
+ // overwritten while composition continues.
+ if (!currentComposition && eventType === eventTypes.compositionStart) {
+ currentComposition = FallbackCompositionState.getPooled(topLevelTarget);
+ } else if (eventType === eventTypes.compositionEnd) {
+ if (currentComposition) {
+ fallbackData = currentComposition.getData();
+ }
+ }
+ }
-'use strict';
+ var event = SyntheticCompositionEvent.getPooled(eventType, topLevelTargetID, nativeEvent, nativeEventTarget);
-var ExecutionEnvironment = require('./ExecutionEnvironment');
+ if (fallbackData) {
+ // Inject data generated from fallback path into the synthetic event.
+ // This matches the property of native CompositionEventInterface.
+ event.data = fallbackData;
+ } else {
+ var customData = getDataFromCustomEvent(nativeEvent);
+ if (customData !== null) {
+ event.data = customData;
+ }
+ }
-var createArrayFromMixed = require('./createArrayFromMixed');
-var getMarkupWrap = require('./getMarkupWrap');
-var invariant = require('./invariant');
+ EventPropagators.accumulateTwoPhaseDispatches(event);
+ return event;
+}
/**
- * Dummy container used to render all markup.
+ * @param {string} topLevelType Record from `EventConstants`.
+ * @param {object} nativeEvent Native browser event.
+ * @return {?string} The string corresponding to this `beforeInput` event.
*/
-var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
+function getNativeBeforeInputChars(topLevelType, nativeEvent) {
+ switch (topLevelType) {
+ case topLevelTypes.topCompositionEnd:
+ return getDataFromCustomEvent(nativeEvent);
+ case topLevelTypes.topKeyPress:
+ /**
+ * If native `textInput` events are available, our goal is to make
+ * use of them. However, there is a special case: the spacebar key.
+ * In Webkit, preventing default on a spacebar `textInput` event
+ * cancels character insertion, but it *also* causes the browser
+ * to fall back to its default spacebar behavior of scrolling the
+ * page.
+ *
+ * Tracking at:
+ * https://code.google.com/p/chromium/issues/detail?id=355103
+ *
+ * To avoid this issue, use the keypress event as if no `textInput`
+ * event is available.
+ */
+ var which = nativeEvent.which;
+ if (which !== SPACEBAR_CODE) {
+ return null;
+ }
-/**
- * Pattern used by `getNodeName`.
- */
-var nodeNamePattern = /^\s*<(\w+)/;
+ hasSpaceKeypress = true;
+ return SPACEBAR_CHAR;
-/**
- * Extracts the `nodeName` of the first element in a string of markup.
- *
- * @param {string} markup String of markup.
- * @return {?string} Node name of the supplied markup.
- */
-function getNodeName(markup) {
- var nodeNameMatch = markup.match(nodeNamePattern);
- return nodeNameMatch && nodeNameMatch[1].toLowerCase();
+ case topLevelTypes.topTextInput:
+ // Record the characters to be added to the DOM.
+ var chars = nativeEvent.data;
+
+ // If it's a spacebar character, assume that we have already handled
+ // it at the keypress level and bail immediately. Android Chrome
+ // doesn't give us keycodes, so we need to blacklist it.
+ if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
+ return null;
+ }
+
+ return chars;
+
+ default:
+ // For other native event types, do nothing.
+ return null;
+ }
}
/**
- * Creates an array containing the nodes rendered from the supplied markup. The
- * optionally supplied `handleScript` function will be invoked once for each
- *