From 9925c6c5ffedc1e34b340c5827ffad8d10c1c856 Mon Sep 17 00:00:00 2001 From: theporchrat Date: Fri, 24 Oct 2014 17:54:29 -0400 Subject: [PATCH] 1.4.0 --- browser/react-widgets.js | 8 +-- docs/docs.js | 18 ++++++ lib/calendar/calendar.js | 104 +++++++++++++++------------------ lib/common/slide-transition.js | 3 +- lib/dropdowns/combobox.js | 51 +++++++++------- lib/dropdowns/dropdown-list.js | 64 ++++++++++---------- lib/mixins/WidgetMixin.js | 20 +++++-- lib/pickers/datepicker.js | 98 +++++++++++++++++-------------- lib/pickers/numberpicker.js | 20 ++++--- lib/popup/popup.js | 44 +++++++------- lib/select/select.js | 65 +++++++++++---------- lib/util/compat.js | 26 +++++++++ lib/util/constants.js | 32 +++++++++- lib/util/controlledInput.js | 102 ++++++++++++++++++++++++++++++++ package.json | 2 +- 15 files changed, 433 insertions(+), 224 deletions(-) create mode 100644 docs/docs.js create mode 100644 lib/util/compat.js create mode 100644 lib/util/controlledInput.js diff --git a/browser/react-widgets.js b/browser/react-widgets.js index e0666e809..4210ab175 100644 --- a/browser/react-widgets.js +++ b/browser/react-widgets.js @@ -1,5 +1,5 @@ /*! v"1.3.0" | (c) 2014 Jason Quense | https://github.com/theporchrat/react-widgets/blob/master/License.txt */ -this.ReactWidgets=function(e){function t(n){if(s[n])return s[n].exports;var i=s[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var s={};return t.m=e,t.c=s,t.p="",t(0)}([function(e,t,s){e.exports={DropDownlist:s(1),Combobox:s(2),Calendar:s(3),DateTimePicker:s(4),NumberPicker:s(5),Select:s(6),utils:{ReplaceTransitionGroup:s(7),SlideTransition:s(8)}}},function(e,t,s){var n=s(9),i=s(10),r=s(25),o=s(26),a=s(27),p=s(28).mergeIntoProps,l=(s(29).directions,s(11),s(34)),u=s(12),d=s(30),h=(s(13),a.provided(function(e){return!i.isEqual(e.value,this.props.value)})),c=a.provided(function(e){return!i.isEqual(e,this.props.value)}),f={value:n.PropTypes.any,onChange:n.PropTypes.func,data:n.PropTypes.array,valueField:n.PropTypes.string,textField:n.PropTypes.string,valueComponent:n.PropTypes.component,itemComponent:n.PropTypes.component,busy:n.PropTypes.bool,delay:n.PropTypes.number,duration:n.PropTypes.number,disabled:n.PropTypes.oneOfType([n.PropTypes.bool,n.PropTypes.oneOf(["disabled"])]),readOnly:n.PropTypes.oneOfType([n.PropTypes.bool,n.PropTypes.oneOf(["readOnly"])]),messages:n.PropTypes.shape({open:n.PropTypes.string})};e.exports=n.createClass({displayName:"DropdownList",mixins:[s(35),s(36),s(37),s(38),s(39),s(40)("focusedIndex"),s(40)("selectedIndex")],propTypes:f,getInitialState:function(){var e=this._dataIndexOf(this.props.data,this.props.value);return{open:!1,selectedIndex:e,focusedIndex:-1===e?0:e}},getDefaultProps:function(){return{delay:500,value:null,data:[],messages:{open:"open dropdown"}}},componentWillReceiveProps:h(function(e){var t=this._dataIndexOf(e.data,e.value);this.setSelectedIndex(t),this.setFocusedIndex(-1===t?0:t)}),render:function(){var e=i.keys(f),t=this._dataItem(this._data(),this.props.value),s=this._id("_option");return p(i.omit(this.props,e),n.DOM.div({ref:"element",onKeyDown:this._maybeHandle(this._keyDown),onClick:this._maybeHandle(this.toggle),onFocus:this._maybeHandle(i.partial(this._focus,!0),!0),onBlur:i.partial(this._focus,!1),"aria-expanded":this.state.open,"aria-haspopup":!0,"aria-activedescendent":this.state.open?s:void 0,"aria-disabled":this.props.disabled,"aria-readonly":this.props.readOnly,tabIndex:this.props.disabled?"-1":"0",className:r({"rw-dropdown-list":!0,"rw-widget":!0,"rw-state-disabled":this.props.disabled,"rw-state-readonly":this.props.readOnly,"rw-state-focus":this.state.focused,"rw-open":this.state.open,"rw-rtl":this.isRtl()})},n.DOM.span({className:"rw-dropdownlist-picker rw-select rw-btn"},n.DOM.i({className:"rw-i rw-i-caret-down"+(this.props.busy?" rw-loading":"")},n.DOM.span({className:"rw-sr"},this.props.messages.open))),n.DOM.div({className:"rw-input"},this.props.valueComponent?this.props.valueComponent({item:t}):this._dataText(t)),l({open:this.state.open,onRequestClose:this.close,duration:this.props.duration},n.DOM.div(null,u({ref:"list",optID:s,"aria-hidden":!this.state.open,style:{maxHeight:200,height:"auto"},data:this.props.data,initialVisibleItems:this.props.initialBufferSize,itemHeight:18,selectedIndex:this.state.selectedIndex,focusedIndex:this.state.focusedIndex,textField:this.props.textField,valueField:this.props.valueField,listItem:this.props.itemComponent,onSelect:this._maybeHandle(this._onSelect)})))))},setWidth:function(){var e=d.width(this.getDOMNode()),t=e!==this.state.width;t&&this.setState({width:e})},_focus:function(e){var t=this;clearTimeout(t.timer),t.timer=setTimeout(function(){e?t.getDOMNode().focus():t.close(),e!==t.state.focused&&t.setState({focused:e})},0)},_onSelect:function(e){this.close(),this.change(e)},_keyDown:function(e){function t(e){s.change(s._data()[e])}var s=this,n=e.key,i=e.altKey,r=this.state.open;"End"===n?(r?this.setFocusedIndex(this._data().length-1):t(this._data().length-1),e.preventDefault()):"Home"===n?(r?this.setFocusedIndex(0):t(0),e.preventDefault()):"Escape"===n&&r?this.close():"Enter"===n&&r?t(this.state.focusedIndex):"ArrowDown"===n?(i?this.open():r?this.setFocusedIndex(this.nextFocusedIndex()):t(this.nextSelectedIndex()),e.preventDefault()):"ArrowUp"===n?(i?this.close():r?this.setFocusedIndex(this.prevFocusedIndex()):t(this.prevSelectedIndex()),e.preventDefault()):this.search(String.fromCharCode(e.keyCode),this._locate)},change:c(function(e){var t=this.props.onChange;t&&(t(e),this.close())}),_locate:function(e){var t=this.state.open?"focusedIndex":"selectedIndex",s=this.findNextWordIndex(e,this.state[t]),n=o(t).bind(this);-1!==s&&n(s)},_data:function(){return this.props.data},open:function(){this.setState({open:!0})},close:function(){this.setState({open:!1})},toggle:function(){this.state.open?this.close():this.open()}})},function(e,t,s){function n(e,t){var s;if(e===t)return!0;for(s in e)if(e.hasOwnProperty(s)&&(!t.hasOwnProperty(s)||e[s]!==t[s]))return!1;for(s in t)if(t.hasOwnProperty(s)&&!e.hasOwnProperty(s))return!1;return!0}var i=s(9),r=s(25),o=s(10),a=(s(32),s(33)),p=s(28).mergeIntoProps,l=(s(29).directions,s(19)),u=s(34),d=s(12),h=s(30),c=s(13),f={value:i.PropTypes.any,onChange:i.PropTypes.func,itemComponent:i.PropTypes.func,data:i.PropTypes.array,valueField:i.PropTypes.string,textField:i.PropTypes.string,disabled:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(["disabled"])]),readOnly:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(["readOnly"])]),suggest:i.PropTypes.bool,busy:i.PropTypes.bool,duration:i.PropTypes.number,placeholder:i.PropTypes.string,messages:i.PropTypes.shape({open:i.PropTypes.string,emptyList:i.PropTypes.string,emptyFilter:i.PropTypes.string})};e.exports=i.createClass({displayName:"ComboBox",mixins:[s(35),s(37),s(41),s(38),s(39),s(40)("focusedIndex"),s(40)("selectedIndex")],propTypes:f,getInitialState:function(){var e=this.process(this.props.data,this.props.value),t=this._dataIndexOf(e,this.props.value);return{selectedIndex:t,focusedIndex:-1===t?0:t,processedData:e,open:!1}},getDefaultProps:function(){return{data:[],suggest:!1,filter:!1,delay:500,messages:{open:"open combobox",emptyList:"There are no items in this list",emptyFilter:"The filter returned no results"}}},shouldComponentUpdate:function(e,t){var s=this.refs.input&&this.refs.input.isSuggesting(),i=!n(t,this.state),r=!n(e,this.props);return s||i||r},componentWillReceiveProps:function(e){var t=this._dataIndexOf(e.data,e.value),s=-1==t?e.value:e.data[t],n=this.refs.input.isSuggesting(),i=this.process(e.data,e.value,(-1===t||n)&&this._dataText(s)),r=this._dataIndexOf(i,e.value),o=this.filterIndexOf(i,this._dataText(s));this._searchTerm="",this.setState({processedData:i,selectedIndex:r,focusedIndex:-1===r?-1!==o?o:0:r})},render:function(){var e=(this.props.valueComponent,this._dataItem(this._data(),this.props.value)),t=this._data(),s=this._id("_listbox"),n=this._id("_option"),a=this.props.suggest?this.props.filter?"both":"inline":this.props.filter?"list":"";return p(o.omit(this.props,o.keys(f)),i.DOM.div({ref:"element",onKeyDown:this._maybeHandle(this._keyDown),onFocus:this._maybeHandle(o.partial(this._focus,!0),!0),onBlur:this._focus.bind(null,!1),tabIndex:"-1",className:r({"rw-combobox":!0,"rw-widget":!0,"rw-state-focus":this.state.focused,"rw-open":this.state.open,"rw-state-disabled":this.props.disabled,"rw-state-readonly":this.props.readOnly,"rw-rtl":this.isRtl()})},c({tabIndex:"-1",className:"rw-select",onClick:this._maybeHandle(this.toggle),disabled:!(!this.props.disabled&&!this.props.readOnly)},i.DOM.i({className:"rw-i rw-i-caret-down"+(this.props.busy?" rw-loading":"")},i.DOM.span({className:"rw-sr"},this.props.messages.open))),l({ref:"input",type:"text",role:"combobox",suggest:this.props.suggest,"aria-owns":s,"aria-busy":!!this.props.busy,"aria-autocomplete":a,"aria-activedescendent":this.state.open?n:void 0,"aria-expanded":this.state.open,"aria-haspopup":!0,placeholder:this.props.placeholder,disabled:this.props.disabled,readOnly:this.props.readOnly,className:"rw-input",value:this._dataText(e),onChange:this._inputTyping,onKeyDown:this._inputKeyDown}),u({open:this.state.open,onRequestClose:this.close,duration:this.props.duration},i.DOM.div(null,d({ref:"list",id:s,optID:n,"aria-hidden":!this.state.open,"aria-live":a&&"polite",style:{maxHeight:200,height:"auto"},data:t,selectedIndex:this.state.selectedIndex,focusedIndex:this.state.focusedIndex,textField:this.props.textField,valueField:this.props.valueField,onSelect:this._maybeHandle(this._onSelect),listItem:this.props.itemComponent,messages:{emptyList:this.props.data.length?this.props.messages.emptyFilter:this.props.messages.emptyList}})))))},setWidth:function(){var e=h.width(this.getDOMNode()),t=e!==this.state.width;t&&this.setState({width:e})},_onSelect:function(e){this.close(),this.change(e),this._focus(!0)},_inputKeyDown:function(e){this._deleting="Backspace"===e.key||"Delete"===e.key,this._isTyping=!0},_inputTyping:function(e){var t,s,n=this,i=!!this.props.suggest,r=e.target.value;t=this._deleting||!i?r:this.suggest(this._data(),r),t=t||r,s=o.find(n.props.data,function(e){return n._dataText(e).toLowerCase()===t.toLowerCase()}),this.change(!this._deleting&&s?s:r,!0),this.open()},_focus:function(e){var t=this;clearTimeout(t.timer),!e&&t.refs.input.accept(),t.timer=setTimeout(function(){e?t.refs.input.focus():t.close(),e!==t.state.focused&&t.setState({focused:e})},0)},_keyDown:function(e){function t(e){return-1===e||0===s._data().length?s.change(s.refs.input.getDOMNode().value,!1):(s.refs.input.accept(!0),void s.change(s._data()[e],!1))}var s=this,n=e.key,i=e.altKey,r=(String.fromCharCode(e.keyCode),this.state.selectedIndex,this.state.focusedIndex),o=this.state.open;"End"===n?t(this._data().length-1):"Home"===n?t(0):"Escape"===n&&o?this.close():"Enter"===n&&o?(t(r),this.close()):"ArrowDown"===n?i?this.open():o?this.setFocusedIndex(this.nextFocusedIndex()):t(this.nextSelectedIndex()):"ArrowUp"===n&&(i?this.close():o?this.setFocusedIndex(this.prevFocusedIndex()):t(this.prevSelectedIndex()))},change:function(e,t){var s=this.props.onChange;this._typedChange=!!t,s&&s(e)},open:function(){this.state.open||this.setState({open:!0})},close:function(){this.state.open&&this.setState({open:!1})},toggle:function(){this._focus(!0),this.state.open?this.close():this.open()},suggest:function(e,t){function s(e){return i(this._dataText(e).toLowerCase(),n.toLowerCase())}var n=this._dataText(t),i=a.startsWith,r="string"==typeof t?o.find(e,s,this):t;return!r||this.state&&this.state.deleting?"":this._dataText(r)},_data:function(){return this.state.processedData},process:function(e,t,s){return this.props.filter&&s&&(e=this.filter(e,s)),e}})},function(e,t,s){var n=s(9),i=s(14),r=s(15),o=s(16),a=s(17),p=s(18),l=s(25),u=s(26),d=s(8),h=s(31),c=s(28).mergeIntoProps,f=s(10),y="right",m="left",v="up",g="down",T={year:1,decade:10,century:100},w={month:r,year:o,decade:a,century:p};NEXT_VIEW={month:"year",year:"decade",decade:"century"},VIEW_UNIT={month:"day",year:"month",decade:"year",century:"decade"};var x=["month","year","decade","century"];e.exports=n.createClass({displayName:"Calendar",mixins:[s(35),s(36),s(39)],propTypes:{onChange:n.PropTypes.func.isRequired,value:n.PropTypes.instanceOf(Date),min:n.PropTypes.instanceOf(Date),max:n.PropTypes.instanceOf(Date),initialView:n.PropTypes.oneOf(x),finalView:n.PropTypes.oneOf(x),disabled:n.PropTypes.oneOfType([n.PropTypes.bool,n.PropTypes.oneOf(["disabled"])]),readOnly:n.PropTypes.oneOfType([n.PropTypes.bool,n.PropTypes.oneOf(["readOnly"])]),messages:n.PropTypes.shape({moveBack:n.PropTypes.string,moveForward:n.PropTypes.string}),maintainFocus:n.PropTypes.bool},getInitialState:function(){return{selectedIndex:0,open:!1,view:this.props.initialView||"month",currentDate:this.inRangeValue(new Date(this.props.value))}},getDefaultProps:function(){return{value:new Date,min:new Date(1900,0,1),max:new Date(2099,11,31),initialView:"month",finalView:"century",maintainFocus:!0}},componentWillReceiveProps:function(e){var t=x.indexOf(e.initialView),s=x.indexOf(e.finalView),n=x.indexOf(this.state.view),i=this.state.view,r=this.inRangeValue(new Date(e.value));t>n?this.setState({view:i=e.initialView}):n>s&&this.setState({view:i=e.finalView}),h.eq(r,this.props.value,VIEW_UNIT[i])||this.setState({currentDate:r})},render:function(){function e(){this._focus(!0,"stop")}var t=w[this.state.view],s=this.props.disabled||this.props.readOnly,r=this.state.currentDate,o=this._id("_view_label"),a=this.state.view+"_"+h[this.state.view](r),p=this._id("_view");return c(f.omit(this.props,"value","min","max"),n.DOM.div({className:l({"rw-calendar":!0,"rw-widget":!0,"rw-state-disabled":this.props.disabled,"rw-state-readonly":this.props.readOnly,"rw-rtl":this.isRtl()})},i({label:this._label(),labelId:o,messages:this.props.messages,upDisabled:s||this.state.view===this.props.finalView,prevDisabled:s||!h.inRange(this.nextDate(m),this.props.min,this.props.max),nextDisabled:s||!h.inRange(this.nextDate(y),this.props.min,this.props.max),onViewChange:this._maybeHandle(f.partial(this.navigate,v,null)),onMoveLeft:this._maybeHandle(f.partial(this.navigate,m,null)),onMoveRight:this._maybeHandle(f.partial(this.navigate,y,null))}),d({ref:"animation",direction:this.state.slideDirection,onAnimate:e.bind(this)},t({ref:"currentView",key:a,id:p,"aria-labeledby":o,selectedDate:this.props.value,value:this.state.currentDate,onChange:this._maybeHandle(this.change),onKeyDown:this._maybeHandle(this._keyDown),onFocus:this._maybeHandle(f.partial(this._focus,!0),!0),onMoveLeft:this._maybeHandle(f.partial(this.navigate,m)),onMoveRight:this._maybeHandle(f.partial(this.navigate,y)),disabled:this.props.disabled,readOnly:this.props.readOnly,min:this.props.min,max:this.props.max}))))},navigate:function(e,t){var s=f.invert(NEXT_VIEW),n=this.state.view,i=e===m||e===v?"right":"left";t||(t=f.contains([m,y],e)?this.nextDate(e):this.state.currentDate),e===g&&(n=s[n]||n),e===v&&(n=NEXT_VIEW[n]||n),this.isValidView(n)&&h.inRange(t,this.props.min,this.props.max,n)&&(this._focus(!0,"nav"),this.setState({currentDate:t,slideDirection:i,view:n}))},_focus:function(e){u("focused");this.props.maintainFocus&&e&&this.refs.currentView.getDOMNode().focus()},change:function(e){return this.props.onChange&&this.state.view===this.props.initialView?this.props.onChange(e):void this.navigate(g,e)},nextDate:function(e){var t=e===m?"subtract":"add",s=this.state.view,n="month"===s?s:"year",i=T[s]||1;return h[t](this.state.currentDate,1*i,n)},_keyDown:function(e){var t=e.ctrlKey,s=e.key;t?("ArrowDown"===s&&(e.preventDefault(),this.navigate(g)),"ArrowUp"===s&&(e.preventDefault(),this.navigate(v)),"ArrowLeft"===s&&(e.preventDefault(),this.navigate(m)),"ArrowRight"===s&&(e.preventDefault(),this.navigate(y))):this.refs.currentView._keyDown&&this.refs.currentView._keyDown(e)},_label:function(){var e=this.state.view,t=this.state.currentDate;return"month"===e?h.format(t,h.formats.MONTH_YEAR):"year"===e?h.format(t,h.formats.YEAR):"decade"===e?h.format(h.firstOfDecade(t),h.formats.YEAR)+" - "+h.format(h.lastOfDecade(t),h.formats.YEAR):"century"===e?h.format(h.firstOfCentury(t),h.formats.YEAR)+" - "+h.format(h.lastOfCentury(t),h.formats.YEAR):void 0},inRangeValue:function(e){return null==e?e:h.max(h.min(e,this.props.max),this.props.min)},isValidView:function(e){var t=x.indexOf(this.props.initialView),s=x.indexOf(this.props.finalView),n=x.indexOf(e);return n>=t&&s>=n}})},function(e,t,s){function n(e,t){var s="";return e instanceof Date&&!isNaN(e.getTime())&&(s=p.format(e,t)),s}function i(e,t){var s;e=[].concat(e);for(var n=0;n=this.state.focusedIndex?0:this.state.focusedIndex})},_onSelect:function(e){void 0!==e&&(this.change(this.state.dataItems.concat(e)),this.close(),this._focus(!0))},_keyDown:function(e){var t=e.key,s=e.altKey,n=!!this.state.searchTerm,i=this.state.open,r=this.refs.tagList;"ArrowDown"===t?i?this.setFocusedIndex(this.nextFocusedIndex()):this.open():"ArrowUp"===t?s?this.close():i&&this.setFocusedIndex(this.prevFocusedIndex()):"End"===t?i?this.setFocusedIndex(this._data().length-1):r&&r.last():"Home"===t?i?this.setFocusedIndex(0):r&&r.first():i&&"Enter"===t?this._onSelect(this._data()[this.state.focusedIndex]):"Escape"===t?i?this.close():this.refs.tagList.clear():n||"ArrowLeft"!==t?n||"ArrowRight"!==t?n||"Delete"!==t?n||"Backspace"!==t||r&&r.removeNext():r&&r.removeCurrent():r&&r.next():r&&r.prev()},change:function(e){var t=this.props.onChange;t&&t(e)},open:function(){this.props.disabled!==!0&&this.props.readOnly!==!0&&this.setState({open:!0})},close:function(){this.setState({open:!1})},toggle:function(){this.state.open?this.close():this.open()},process:function(e,t,s){var n=r.reject(e,function(e){return r.any(t,r.partial(this._valueMatcher,e),this)},this);return s&&(n=this.filter(n,s)),n},_placeholder:function(){return(this.props.value||[]).length?"":this.props.placeholder||""}})},function(e,t,s){"use strict";var n=s(9),i=s(28).cloneWithProps,r=s(30),o=s(10);e.exports=n.createClass({displayName:"ReplaceTransitionGroup",propTypes:{component:n.PropTypes.func,childFactory:n.PropTypes.func,onAnimating:n.PropTypes.func,onAnimate:n.PropTypes.func},getDefaultProps:function(){return{component:n.DOM.span,childFactory:function(e){return e},onAnimating:o.noop,onAnimate:o.noop}},getInitialState:function(){return{children:n.Children.map(this.props.children,function(e){return e})}},componentWillReceiveProps:function(e){var t=n.Children.map(e.children,function(e){return e}),s=this.state.children;this.setState({children:o.extend({},s,t)}),o.any(t,function(e,t){var n=s&&o.has(s,t),i=!n&&!this.currentlyTransitioningKeys[t];return i&&(this.next=t),i},this),o.any(s,function(e,s){var n=t&&o.has(t,s),i=!n&&!this.currentlyTransitioningKeys[s];return i&&(this.current=s),i},this)},componentWillMount:function(){this.currentlyTransitioningKeys={},this.current=null,this.next=null},componentDidUpdate:function(){var e,t,s=this.current,n=this.next,i=this.refs[s||n],o=this.getDOMNode(),a=i&&i.getDOMNode();a&&(e=r.height(a)+"px",t=r.width(a)+"px",r.css(o,{overflow:"hidden",height:e,width:t})),this.props.onAnimating(),this.next=null,this.current=null,n&&this.performEnter(n),s&&this.performLeave(s)},performEnter:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillEnter?t.componentWillEnter(this._handleDoneEntering.bind(this,e)):this._handleDoneEntering(e)},_tryFinish:function(){var e=this.getDOMNode();this.isTransitioning()||(r.css(e,{overflow:"visible",height:"",width:""}),this.props.onAnimate())},_handleDoneEntering:function(e){var t=this.refs[e];t.componentDidEnter&&t.componentDidEnter(),delete this.currentlyTransitioningKeys[e];var s=n.Children.map(this.props.children,function(e){return e -});s&&o.has(s,e)||this.performLeave(e),this._tryFinish()},isTransitioning:function(){return 0!==Object.keys(this.currentlyTransitioningKeys).length},performLeave:function(e){var t=this.refs[e];this.currentlyTransitioningKeys[e]=!0,t.componentWillLeave?t.componentWillLeave(this._handleDoneLeaving.bind(this,e)):this._handleDoneLeaving(e)},_handleDoneLeaving:function(e){var t=this.refs[e];t.componentDidLeave&&t.componentDidLeave(),delete this.currentlyTransitioningKeys[e];var s=n.Children.map(this.props.children,function(e){return e});if(s&&s.hasOwnProperty(e))this.performEnter(e);else{var i=o.extend({},this.state.children);delete i[e],this.setState({children:i})}this._tryFinish()},render:function(){var e={};for(var t in this.state.children){var s=this.state.children[t];s&&(e[t]=i(this.props.childFactory(s),{ref:t}))}return this.transferPropsTo(this.props.component(null,e))}})},function(e,t,s){var n=s(9),i=s(7),r=s(30),o=(s(10),n.createClass({displayName:"SlideChildGroup",propTypes:{direction:n.PropTypes.oneOf(["left","right"])},getDefaultProps:function(){return{duration:250}},componentWillEnter:function(e){var t=this,s=this.getDOMNode(),n=r.width(s),i=this.props.direction;n="left"===i?n:-n,this.ORGINAL_POSITION=s.style.position,r.css(s,{position:"absolute",left:n+"px",top:0}),r.animate(s,{left:0},t.props.duration,function(){r.css(s,{position:t.ORGINAL_POSITION,overflow:"hidden"}),t.ORGINAL_POSITION=null,e&&e()})},componentWillLeave:function(e){var t=this,s=this.getDOMNode(),n=r.width(s),i=this.props.direction;n="left"===i?-n:n,this.ORGINAL_POSITION=s.style.position,r.css(s,{position:"absolute",top:0,left:0}),r.animate(s,{left:n+"px"},t.props.duration,function(){r.css(s,{position:t.ORGINAL_POSITION,overflow:"hidden"}),t.ORGINAL_POSITION=null,e&&e()})},render:function(){return n.Children.only(this.props.children)}}));e.exports=n.createClass({displayName:"exports",propTypes:{direction:n.PropTypes.oneOf(["left","right"])},getDefaultProps:function(){return{direction:"left"}},_wrapChild:function(e){return o({direction:this.props.direction},e)},render:function(){return this.transferPropsTo(i({ref:"container",childFactory:this._wrapChild,style:{position:"relative",overflow:"hidden"},component:n.DOM.div},this.props.children))},isTransitioning:function(){return this.isMounted()&&this.refs.container.isTransitioning()}})},function(e){!function(){e.exports=this["window.React"]}()},function(e){!function(){e.exports=this["window._"]}()},function(e,t,s){var n=s(9),i=s(28).mergeIntoProps,r=s(10);e.exports=n.createClass({displayName:"exports",mixins:[s(38)],render:function(){var e=this.props.value;return i(r.omit(this.props,"value"),n.DOM.div(null,this._dataText(e)))}})},function(e,t,s){{var n=s(9),i=(s(33),s(27),s(28)),r=i.mergeIntoProps,o=(i.cloneWithProps,s(25)),a=s(10);n.createClass({displayName:"DefaultListItem",mixins:[s(38),s(43)],render:function(){var e=this.props.item;return this.transferPropsTo(n.DOM.li(null,e?this._dataText(e):""))}})}e.exports=n.createClass({displayName:"List",mixins:[s(38)],propTypes:{data:n.PropTypes.array,onSelect:n.PropTypes.func,listItem:n.PropTypes.component,selectedIndex:n.PropTypes.number,focusedIndex:n.PropTypes.number,valueField:n.PropTypes.string,textField:n.PropTypes.string,optID:n.PropTypes.string,messages:n.PropTypes.shape({emptyList:n.PropTypes.string})},getDefaultProps:function(){return{delay:500,optID:"",onSelect:a.noop,data:[],messages:{emptyList:"There are no items in this list"}}},componentDidMount:function(){this._setScrollPosition()},componentDidUpdate:function(e){e.focusedIndex!==this.props.focusedIndex&&this._setScrollPosition()},render:function(){{var e,t=n.DOM.li(null,this.props.messages.emptyList);n.DOM.li(null,this.props.messages.emptyFilter)}return e=a.map(this.props.data,function(e,t){var s=this.props.focusedIndex===t;return n.DOM.li({key:"item_"+t,role:"option",id:s?this.props.optID:void 0,"aria-selected":t===this.props.selectedIndex,className:o({"rw-state-focus":s,"rw-state-selected":t===this.props.selectedIndex}),onClick:a.partial(this.props.onSelect,e,t)},this.props.listItem?this.props.listItem({item:e}):this._dataText(e))},this),r(a.omit(this.props,"data","selectedIndex"),n.DOM.ul({className:"rw-list",ref:"scrollable",role:"listbox",tabIndex:"-1",onKeyDown:this._keyDown,onKeyPress:this.search},this.props.data.length?e:t))},_setScrollPosition:function(){var e,t,s,n,i,r=this.getDOMNode(),o=r.children[this.props.focusedIndex];o&&(e=r.scrollTop,t=r.clientHeight,s=o.offsetTop,n=o.offsetHeight,i=s+n,r.scrollTop=e>s?s:i>e+t?i-t:e)}})},function(e,t,s){var n=s(9);e.exports=n.createClass({displayName:"exports",render:function(){return this.transferPropsTo(n.DOM.button({type:"button",className:"rw-btn"},this.props.children))}})},function(e,t,s){var n=s(9),i=(s(25),s(13));e.exports=n.createClass({displayName:"exports",propTypes:{label:n.PropTypes.string.isRequired,labelId:n.PropTypes.string,upDisabled:n.PropTypes.bool.isRequired,prevDisabled:n.PropTypes.bool.isRequired,nextDisabled:n.PropTypes.bool.isRequired,onViewChange:n.PropTypes.func.isRequired,onMoveLeft:n.PropTypes.func.isRequired,onMoveRight:n.PropTypes.func.isRequired,messages:n.PropTypes.shape({moveBack:n.PropTypes.string,moveForward:n.PropTypes.string})},mixins:[s(36),s(43)],getDefaultProps:function(){return{messages:{moveBack:"navigate back",moveForward:"navigate forward"}}},render:function(){var e=this.isRtl();return n.DOM.div({className:"rw-header"},i({className:"rw-btn-left",onClick:this.props.onMoveLeft,disabled:this.props.prevDisabled,"aria-disabled":this.props.prevDisabled,title:this.props.moveBack},n.DOM.i({className:"rw-i rw-i-caret-"+(e?"right":"left")},n.DOM.span({className:"rw-sr"},this.props.moveBack))),i({className:"rw-btn-view",id:this.props.labelId,onClick:this.props.onViewChange,disabled:this.props.upDisabled,"aria-disabled":this.props.upDisabled},this.props.label),i({className:"rw-btn-right",onClick:this.props.onMoveRight,disabled:this.props.nextDisabled,"aria-disabled":this.props.nextDisabled,title:this.props.moveForward},n.DOM.i({className:"rw-i rw-i-caret-"+(e?"left":"right")},n.DOM.span({className:"rw-sr"},this.props.moveForward))))}})},function(e,t,s){var n=s(9),i=s(25),r=s(31),o=s(44),a=s(29).directions,p=s(28).mergeIntoProps,l=s(10),u=s(13),d={LEFT:a.RIGHT,RIGHT:a.LEFT};e.exports=n.createClass({displayName:"MonthView",mixins:[s(35),s(43),s(45)("month","day")],propTypes:{culture:n.PropTypes.array,value:n.PropTypes.instanceOf(Date),selectedDate:n.PropTypes.instanceOf(Date),min:n.PropTypes.instanceOf(Date),max:n.PropTypes.instanceOf(Date),format:n.PropTypes.string,onChange:n.PropTypes.func.isRequired,onMoveLeft:n.PropTypes.func,onMoveRight:n.PropTypes.func},render:function(){var e=r.visibleDays(this.props.value),t=o(e,7);return p(l.omit(this.props,"max","min","value","onChange"),n.DOM.table({role:"grid",tabIndex:this.props.disabled?"-1":"0",className:"rw-calendar-grid","aria-activedescendant":this._id("_selected_item"),onKeyUp:this._keyUp},n.DOM.thead(null,n.DOM.tr(null,this._headers())),n.DOM.tbody(null,l.map(t,this._row))))},_row:function(e,t){return n.DOM.tr({key:"week_"+t},l.map(e,function(e,t){var s=r.eq(e,this.state.focusedDate,"day"),o=r.eq(e,this.props.selectedDate,"day"),a=this._id("_selected_item");return r.inRange(e,this.props.min,this.props.max)?n.DOM.td({key:"day_"+t},u({tabIndex:"-1",onClick:l.partial(this.props.onChange,e),"aria-selected":o,"aria-disabled":this.props.disabled,disabled:this.props.disabled,className:i({"rw-off-range":r.month(e)!==r.month(this.state.focusedDate),"rw-state-focus":s,"rw-state-selected":o}),id:s?a:void 0},r.format(e,"dd"))):n.DOM.td({key:"day_"+t,className:"rw-empty-cell"}," ")}.bind(this)))},_headers:function(e){var t=r.shortDaysOfWeek(e);return l.map(t,function(e,t){return n.DOM.th({key:"header_"+t},e)})},move:function(e,t){return this.isRtl()&&d[t]&&(t=d[t]),t===a.LEFT?e=r.subtract(e,1,"day"):t===a.RIGHT?e=r.add(e,1,"day"):t===a.UP?e=r.subtract(e,1,"week"):t===a.DOWN&&(e=r.add(e,1,"week")),e}})},function(e,t,s){var n=s(9),i=s(25),r=s(31),o=s(44),a=s(29).directions,p=s(28).mergeIntoProps,l=s(10),u={LEFT:a.RIGHT,RIGHT:a.LEFT};e.exports=n.createClass({displayName:"YearView",mixins:[s(35),s(43),s(45)("year","month")],propTypes:{value:n.PropTypes.instanceOf(Date),min:n.PropTypes.instanceOf(Date),max:n.PropTypes.instanceOf(Date),onChange:n.PropTypes.func.isRequired},render:function(){var e=r.monthsInYear(r.year(this.props.value)),t=o(e,4);return p(l.omit(this.props,"max","min","value","onChange"),n.DOM.table({tabIndex:this.props.disabled?"-1":"0",ref:"table",role:"grid",className:"rw-calendar-grid rw-nav-view","aria-activedescendant":this._id("_selected_item"),onKeyUp:this._keyUp},n.DOM.tbody(null,l.map(t,this._row))))},_row:function(e,t){return n.DOM.tr({key:t},l.map(e,function(e,t){var s=r.eq(e,this.state.focusedDate,"month"),o=r.eq(e,this.props.value,"month"),a=this._id("_selected_item");return r.inRange(e,this.props.min,this.props.max,"month")?n.DOM.td({key:t},d({onClick:l.partial(this.props.onChange,e),tabIndex:"-1",id:s?a:void 0,"aria-selected":o,"aria-disabled":this.props.disabled,disabled:this.props.disabled,className:i({"rw-state-focus":s,"rw-state-selected":o})},r.format(e,r.formats.MONTH_NAME_ABRV))):n.DOM.td({key:t,className:"rw-empty-cell"}," ")}.bind(this)))},focus:function(){this.refs.table.getDOMNode().focus()},move:function(e,t){return this.isRtl()&&u[t]&&(t=u[t]),t===a.LEFT?e=r.subtract(e,1,"month"):t===a.RIGHT?e=r.add(e,1,"month"):t===a.UP?e=r.subtract(e,4,"month"):t===a.DOWN&&(e=r.add(e,4,"month")),e}});var d=s(13)},function(e,t,s){function n(e,t){return a.gte(e,a.startOf(t,"decade"),"year")&&a.lte(e,a.endOf(t,"decade"),"year")}function i(e){var e=a.add(a.startOf(e,"decade"),-2,"year");return d.map(d.range(12),function(){return e=a.add(e,1,"year")})}var r=s(9),o=s(25),a=s(31),p=s(44),l=s(29).directions,u=s(28).mergeIntoProps,d=s(10),h={LEFT:l.RIGHT,RIGHT:l.LEFT};e.exports=r.createClass({displayName:"DecadeView",mixins:[s(35),s(36),s(43),s(45)("decade","year")],propTypes:{value:r.PropTypes.instanceOf(Date),min:r.PropTypes.instanceOf(Date),max:r.PropTypes.instanceOf(Date),onChange:r.PropTypes.func.isRequired},render:function(){var e=i(this.props.value),t=p(e,4);return u(d.omit(this.props,"max","min","value","onChange"),r.DOM.table({tabIndex:this.props.disabled?"-1":"0",role:"grid",className:"rw-calendar-grid rw-nav-view","aria-activedescendant":this._id("_selected_item"),onKeyUp:this._keyUp},r.DOM.tbody(null,d.map(t,this._row))))},_row:function(e,t){this._id("_selected_item");return r.DOM.tr({key:"row_"+t},d.map(e,function(e,t){var s=a.eq(e,this.state.focusedDate,"year"),i=a.eq(e,this.props.value,"year"),p=this.props.id&&this.props.id+"_selected_item";return a.inRange(e,this.props.min,this.props.max,"year")?r.DOM.td({key:t},c({onClick:d.partial(this.props.onChange,e),tabIndex:"-1",id:s?p:void 0,"aria-selected":i,"aria-disabled":this.props.disabled,disabled:this.props.disabled,className:o({"rw-off-range":!n(e,this.props.value),"rw-state-focus":s,"rw-state-selected":i})},a.format(e,a.formats.YEAR))):r.DOM.td({key:t,className:"rw-empty-cell"}," ")}.bind(this)))},move:function(e,t){return this.isRtl()&&h[t]&&(t=h[t]),t===l.LEFT?e=a.subtract(e,1,"year"):t===l.RIGHT?e=a.add(e,1,"year"):t===l.UP?e=a.subtract(e,4,"year"):t===l.DOWN&&(e=a.add(e,4,"year")),e}});var c=s(13)},function(e,t,s){function n(e){return u.format(u.startOf(e,"decade"),u.formats.YEAR)+" - "+u.format(u.endOf(e,"decade"),u.formats.YEAR)}function i(e,t,s){return u.max(u.min(e,s),t)}function r(e,t,s){return u.gte(e,u.startOf(t,"decade"),"year")&&u.lte(e,u.endOf(s,"decade"),"year")}function o(e,t){return u.gte(e,u.startOf(t,"century"),"year")&&u.lte(e,u.endOf(t,"century"),"year")}function a(e){var e=u.add(u.startOf(e,"century"),-20,"year");return f.map(f.range(12),function(){return e=u.add(e,10,"year")})}var p=s(9),l=s(25),u=s(31),d=s(44),h=s(29).directions,c=s(28).mergeIntoProps,f=s(10),y={LEFT:h.RIGHT,RIGHT:h.LEFT};e.exports=p.createClass({displayName:"CenturyView",mixins:[s(35),s(36),s(43),s(45)("century","decade")],propTypes:{value:p.PropTypes.instanceOf(Date),min:p.PropTypes.instanceOf(Date),max:p.PropTypes.instanceOf(Date),onChange:p.PropTypes.func.isRequired},render:function(){var e=a(this.props.value),t=d(e,4);return c(f.omit(this.props,"max","min","value","onChange"),p.DOM.table({tabIndex:this.props.disabled?"-1":"0",role:"grid",className:"rw-calendar-grid rw-nav-view","aria-activedescendant":this._id("_selected_item"),onKeyUp:this._keyUp},p.DOM.tbody(null,f.map(t,this._row))))},_row:function(e,t){return p.DOM.tr({key:"row_"+t},f.map(e,function(e,t){var s=u.eq(e,this.state.focusedDate,"decade"),a=u.eq(e,this.props.value,"decade"),d=this._id("_selected_item"),h=i(e,this.props.min,this.props.max);return r(e,this.props.min,this.props.max)?p.DOM.td({key:t},m({onClick:f.partial(this.props.onChange,h),tabIndex:"-1",id:s?d:void 0,"aria-selected":a,"aria-disabled":this.props.disabled,disabled:this.props.disabled,className:l({"rw-off-range":!o(e,this.props.value),"rw-state-focus":s,"rw-state-selected":a})},n(e))):p.DOM.td({key:t,className:"rw-empty-cell"}," ")}.bind(this)))},move:function(e,t){return this.isRtl()&&y[t]&&(t=y[t]),t===h.LEFT?e=u.subtract(e,1,"decade"):t===h.RIGHT?e=u.add(e,1,"decade"):t===h.UP?e=u.subtract(e,4,"decade"):t===h.DOWN&&(e=u.add(e,4,"decade")),e}});var m=s(13)},function(e,t,s){var n=s(9),i=(s(25),s(27),s(32));e.exports=n.createClass({displayName:"exports",propTypes:{value:n.PropTypes.string,onChange:n.PropTypes.func.isRequired},componentDidUpdate:function(){var e=this.getDOMNode(),t=this.props.value;if(this.isSuggesting()){var s=t.toLowerCase().indexOf(this._last.toLowerCase())+this._last.length,n=t.length-s;s>=0&&i(e,s,s+n)}},getDefaultProps:function(){return{value:""}},render:function(){return this.transferPropsTo(n.DOM.input({type:"text",className:"rw-input",onKeyDown:this.props.onKeyDown,onChange:this._change,value:null==this.props.value?"":this.props.value}))},isSuggesting:function(){var e=this.props.value,t=null!=this._last&&-1!==e.toLowerCase().indexOf(this._last.toLowerCase());return this.props.suggest&&t},accept:function(e){var t=this.getDOMNode().value||"",s=t.length;this._last=null,e&&i(this.getDOMNode(),s,s)},_change:function(e){var t=e.target.value;this._last=t,this.props.onChange(e,t)},focus:function(){this.getDOMNode().focus()}})},function(e,t,s){var n=s(9),i=(s(25),s(31)),r=s(12),o=s(28).mergeIntoProps,a=(s(29).directions,s(10));e.exports=n.createClass({displayName:"TimeList",mixins:[s(37),s(40)("selectedIndex"),s(40)("focusedIndex")],propTypes:{value:n.PropTypes.instanceOf(Date),min:n.PropTypes.instanceOf(Date),max:n.PropTypes.instanceOf(Date),step:n.PropTypes.number,itemComponent:n.PropTypes.func,onSelect:n.PropTypes.func,preserveDate:n.PropTypes.bool},getDefaultProps:function(){return{step:30,format:"t",onSelect:a.noop,preserveDate:!0}},getInitialState:function(){var e=this._selectedIndex(this._data(),this.props.value);return{focusedIndex:-1===e?0:e}},render:function(){var e=this._data(),t=this._selectedIndex(e,this.props.value);return o(a.omit(this.props,"value"),r({ref:"list",data:e,textField:"label",valueField:"date",selectedIndex:t,focusedIndex:this.state.focusedIndex,listItem:this.props.itemComponent,onSelect:this.props.onSelect}))},_selectedIndex:function(e,t){var s=6e4*this.props.step;return t?(t=new Date(Math.floor(t.getTime()/s)*s),a.findIndex(e,{label:i.format(t,this.props.format)})):0},_data:function(){for(var e=[],t=0,s=this._dateValues(),n=s.min,r=i.date(n);100>t&&i.date(n)===r&&i.lte(n,s.max);)t++,e.push({date:n,label:i.format(n,this.props.format)}),n=i.add(n,this.props.step||30,"minutes");return e},_dateValues:function(){var e,t,s=this.props.value||i.today(),n=this.props.preserveDate,r=this.props.min,o=this.props.max;return n?{min:i.eq(s,r,"day")?r:i.today(),max:i.eq(s,o,"day")?r:i.tomorrow()}:(e=i.startOf(i.merge(new Date,r),"minutes"),t=i.startOf(i.merge(new Date,o),"minutes"),i.lte(t,e)&&i.gt(o,r,"day")&&(t=i.tomorrow()),{min:e,max:t})},_keyDown:function(e){var t=this,s=e.key,n=String.fromCharCode(e.keyCode);"End"===s?this.setFocusedIndex(this._data().length-1):"Home"===s?this.setFocusedIndex(0):"Enter"===s?this.props.onSelect(this._data()[this.state.focusedIndex]):"ArrowDown"===s?(e.preventDefault(),this.setFocusedIndex(this.nextFocusedIndex())):"ArrowUp"===s?(e.preventDefault(),this.setFocusedIndex(this.prevFocusedIndex())):(e.preventDefault(),this.search(n,function(e){t.setFocusedIndex(this.findNextWordIndex(e,t.state.focusedIndex))}))}});s(13)},function(e,t,s){function n(e){return!isNaN(e.getTime())}function i(e,t){var s="";return e instanceof Date&&n(e)&&(s=p.format(e,t)),s}var r=s(9),o=s(25),a=s(27),p=s(31);e.exports=r.createClass({displayName:"DatePickerInput",propTypes:{format:r.PropTypes.string,parse:r.PropTypes.func.isRequired,value:r.PropTypes.instanceOf(Date),onChange:r.PropTypes.func.isRequired},getDefaultProps:function(){return{textValue:""}},componentWillReceiveProps:function(e){this.setState({textValue:i(e.value,e.editing&&e.editFormat?e.editFormat:e.format)})},getInitialState:function(){var e=i(this.props.value,this.props.editing&&this.props.editFormat?this.props.editFormat:this.props.format);return{textValue:e,lastValue:e}},render:function(){var e=this.state.textValue;return this.transferPropsTo(r.DOM.input({type:"text",className:o({"rw-input":!0}),value:e,"aria-disabled":this.props.disabled,"aria-readonly":this.props.readOnly,disabled:this.props.disabled,readOnly:this.props.readOnly,onChange:this._change,onBlur:a.chain(this.props.blur,this._blur)}))},_change:function(e){this.setState({textValue:e.target.value})},_blur:function(){var e=this.state.textValue;e!==this.state.lastValue&&(this.props.onChange(this.props.parse(e),e),this.setState({lastValue:e}))},focus:function(){this.getDOMNode().focus()}})},function(e,t,s){var n=s(9);e.exports=n.createClass({displayName:"SelectSearchInput",propTypes:{value:n.PropTypes.string,onChange:n.PropTypes.func.isRequired,disabled:n.PropTypes.bool,readOnly:n.PropTypes.bool},componentDidUpdate:function(){this.props.focused&&this.focus()},render:function(){var e=this.props.value,t=this.props.placeholder,s=Math.max((e||t).length,1);return this.transferPropsTo(n.DOM.input({type:"text",className:"rw-input","aria-disabled":this.props.disabled,"aria-readonly":this.props.readOnly,disabled:this.props.disabled,readOnly:this.props.readOnly,size:s}))},focus:function(){this.getDOMNode().focus()}})},function(e,t,s){var n=s(9),i=s(10),r=s(25),o=s(28).mergeIntoProps,a=s(13);e.exports=n.createClass({displayName:"SelectTagList",mixins:[s(38),s(36)],propTypes:{value:n.PropTypes.array,valueField:n.PropTypes.string,textField:n.PropTypes.string,valueComponent:n.PropTypes.component,disabled:n.PropTypes.oneOfType([n.PropTypes.bool,n.PropTypes.array,n.PropTypes.oneOf(["disabled"])]),readOnly:n.PropTypes.oneOfType([n.PropTypes.bool,n.PropTypes.array,n.PropTypes.oneOf(["readonly"])])},getInitialState:function(){return{focused:null}},render:function(){{var e=this.state.focused,t=this.props.value;i.isArray(this.props.disabled),i.isArray(this.props.readOnly)}return o(i.omit(this.props,"value","disabled","readOnly"),n.DOM.ul({className:"rw-tag-list"},i.map(t,function(t,s){var i=this.isDisabled(t),o=this.isReadOnly(t);return n.DOM.li({key:s,className:r({"rw-state-focus":!i&&e===s,"rw-state-disabled":i,"rw-state-readonly":o})},this.props.valueComponent?this.props.valueComponent({item:t}):this._dataText(t),a({tabIndex:"-1",onClick:!(i||o)&&this._delete.bind(null,t),"aria-disabled":i,disabled:i},"×",n.DOM.span({className:"rw-sr"},"Remove "+this._dataText(t))))},this)))},_delete:function(e){this.props.onDelete(e)},removeCurrent:function(){var e=this.props.value[this.state.focused];!e||this.isDisabled(e)||this.isReadOnly(e)||this.props.onDelete(e)},isDisabled:function(e,t){return t&&(e=this.props.value[e]),this.props.disabled===!0||-1!==this._dataIndexOf(this.props.disabled||[],e)},isReadOnly:function(e,t){return t&&(e=this.props.value[e]),this.props.readOnly===!0||-1!==this._dataIndexOf(this.props.readOnly||[],e)},removeNext:function(){var e=i.last(this.props.value);!e||this.isDisabled(e)||this.isReadOnly(e)||this.props.onDelete(e)},clear:function(){this.setState({focused:null})},first:function(){for(var e=0,t=this.props.value.length;t>e&&this.isDisabled(e,!0);)e++;e!==t&&this.setState({focused:e})},last:function(){for(var e=this.props.value.length-1;e>-1&&this.isDisabled(e,!0);)e--;e>=0&&this.setState({focused:e})},next:function(){for(var e=this.state.focused+1,t=this.props.value.length;t>e&&this.isDisabled(e,!0);)e++;return null!==this.state.focused?e>=t?this.clear():void this.setState({focused:e}):void 0},prev:function(){var e=this.state.focused;for(null===e&&(e=this.props.value.length),e--;e>-1&&this.isDisabled(e,!0);)e--;e>=0&&this.setState({focused:e})}})},function(e,t,s){var n=s(9),i=(s(25),s(27),s(26)),r=s(42);e.exports=n.createClass({displayName:"NumberPickerInput",propTypes:{value:n.PropTypes.number,format:n.PropTypes.string,min:n.PropTypes.number,onChange:n.PropTypes.func.isRequired,onKeyDown:n.PropTypes.func},getDefaultProps:function(){return{value:null,format:"d",editing:!1}},getInitialState:function(){var e=this.props.editing?this.props.value:r.format(this.props.value,this.props.format);return{stringValue:e}},componentWillReceiveProps:function(e){var t=e.editing?e.value:r.format(e.value,e.format);isNaN(e.value)&&(t=""),this.current(t)},render:function(){var e=this.state.stringValue;return this.transferPropsTo(n.DOM.input({type:"text",className:"rw-input",onKeyDown:this.props.onKeyDown,onChange:this._change,onBlur:this._finish,"aria-disabled":this.props.disabled,"aria-readonly":this.props.readOnly,disabled:this.props.disabled,readOnly:this.props.readOnly,value:e}))},_change:function(e){var t=e.target.value,s=+e.target.value,n=0!==t&&!t,i=_.isFinite(this.props.min);return!i&&n?this.props.onChange(null):this.isValid(s)&&s!==this.props.value?this.props.onChange(s):void this.current(e.target.value)},_finish:function(){var e=+this.state.stringValue;!isNaN(e)&&e=this.props.min},current:i("stringValue")})},function(e,t,s){"use strict";var n=s(10);e.exports=function(e){return n.isArray(e)||(e=n.transform(e,function(e,t,s){t&&e.push(s)},[])),e.join(" ")}},function(e){"use strict";e.exports=function(e){return function(t){var s={};return s[e]=t,this.setState(s),this}}},function(e,t,s){"use strict";function n(e,t){return function(){var s=e.apply(this,arguments),n=t.apply(this,arguments);if(null!=s||null!=n)return null==s?n:null==n?s:i.extend(s,n)}}var i=s(10),r=e.exports={chain:function(e,t){return function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)}},merge:function(e,t){if(typeof e!=typeof t)throw new TypeError;return i.isArray(e)?e.splice(e.length,0,t):i.isFunction(e)?e=n(e,t):i.extend(e,t),e},before:i.curry(function(e,t){return function(){return e.apply(this,arguments),t.apply(this,arguments)}}),after:i.curry(function(e,t){return function(){var s=t.apply(this,arguments);return e.apply(this,arguments),s}}),around:i.curry(function(e,t){return function(){var s=[t].concat(i.toArray(arguments));return e.apply(this,s)}}),provided:function(e){return r.around(function(t){var s=i.rest(arguments);return e.apply(this,s)?t.apply(this,s):void 0})}}},function(e,t,s){"use strict";function n(e,t){return a.transform(t,function(e,t,s){a.has(l,s)?l[s](e,t,s):a.has(e,s)||(e[s]=t)},e)}function i(e){return function(t,s,n){t[n]=a.has(t,n)?e(t[n],s):s}}function r(){return a.reduce(arguments,function(e,t){return e?t?e+=" "+t:e:t||""},"")}function o(e,t){return a.extend({},e,t)}var a=s(10),p=s(9),l={className:i(r),children:a.noop,key:a.noop,ref:a.noop,style:i(o)};e.exports={mergeIntoProps:function(e,t){var s=t.props?t.props:t;return n(s,e),t},cloneWithProps:function(e,t){var s=n(a.clone(t),e.props),i=a.map(p.version.split("."),parseFloat);return!a.has(s,"children")&&a.has(e.props,"children")&&(s.children=e.props.children),0===i[0]&&i[1]<11?e.constructor.ConvenienceConstructor(s):e.constructor(s)}}},function(e,t,s){function n(e){return i.mapValues(e,function(e,t){return t})}var i=s(10);e.exports={directions:n({LEFT:null,RIGHT:null,UP:null,DOWN:null})}},function(e,t,s){"use strict";function n(e){return e.replace(/-+(.)?/g,function(e,t){return t?t.toUpperCase():""})}function i(e){return e.replace(/[A-Z]/g,function(e,t){return(0!==t?"-":"")+e.toLowerCase()})}function r(e){return e.ownerDocument.defaultView.opener?e.ownerDocument.defaultView.getComputedStyle(e,null):window.getComputedStyle(e,null)}var o,a,p,l,u,d,h=s(10),c="",f=document.createElement("div"),y={},m={O:"otransitionend",Moz:"transitionend",Webkit:"webkitTransitionEnd"};h.any(m,function(e,t){return void 0!==f.style[t+"TransitionProperty"]?(c="-"+t.toLowerCase()+"-",d=e,!0):void 0}),d||void 0===f.style.transitionProperty||(d="transitionend"),u=!d,y[p=c+"transition-property"]=y[a=c+"transition-duration"]=y[l=c+"transition-delay"]=y[o=c+"transition-timing-function"]="";var v=e.exports={width:function(e){return v.offset(e).width},height:function(e){return v.offset(e).height},hasFocus:function(e){var t=e.ownerDocument;return null==t.activeElement?!1:t.activeElement===e},offset:function(e){var t=e.ownerDocument,s=t&&t.documentElement,n={top:0,left:0};if(s)return v.contains(s,e)?(void 0!==e.getBoundingClientRect&&(n=e.getBoundingClientRect()),{top:n.top+window.pageYOffset-s.clientTop,left:n.left+window.pageXOffset-s.clientLeft,width:n.width||e.offsetWidth,height:n.height||e.offsetHeight}):n},css:function(e,t,s){var o="",a=t;if("string"==typeof t){if(void 0===s)return e.style[n(t)]||r(e).getPropertyValue(t);(a={})[t]=s}h.each(a,function(t,s){t||0===t?o+=i(s)+":"+t+";":e.style.removeProperty(i(s))}),e.style.cssText+=";"+o},contains:function(){var e=document.documentElement;return e&&e.contains?function(e,t){return e.contains(t)}:e&&e.compareDocumentPosition?function(e,t){return e===t||!!(16&e.compareDocumentPosition(t))}:function(e,t){if(t)do if(t===e)return!0;while(t=t.parentNode);return!1}}(),on:function(e,t,s){e.addEventListener?e.addEventListener(t,s,!1):e.attachEvent?e.attachEvent("on"+t,s):e["on"+t]=s},off:function(e,t,s){e.addEventListener?e.removeEventListener(t,s,!1):e.attachEvent?e.detachEvent("on"+t,s):e["on"+t]=null},trigger:function(e,t){var s=document.createEvent("Events");s.initEvent(t,!0,!0),e.dispatchEvent(s)},animate:function(e,t,s,n,r){function c(t){t.target===t.currentTarget&&(f=!0,v.off(t.target,d,c),v.css(e,y),r&&r.call(this))}var f,m=[],g={target:e,currentTarget:e},T={};"function"==typeof n&&(r=n,n=null),u&&(s=0),void 0===s&&(s=200),h.each(t,function(e,s){T[s]=t[s],m.push(i(s))}),s>0&&(T[p]=m.join(", "),T[a]=s/1e3+"s",T[l]="0s",T[o]=n||"linear",v.on(e,d,c),setTimeout(function(){f||c(g)},s+25)),e.clientLeft,v.css(e,T),0>=s&&setTimeout(h.partial(c,g),0)}}},function(e,t,s){"use strict";var n=s(46),i=s(42),r=s(10),o=e.exports=r.extend({},n,{culture:function(){return i.culture()},startOfWeek:function(){var e=i.culture();return e&&e.calendar?e.calendar.firstDay||0:0},parse:function(e,t,s){return i.parseDate(e,t,s)},format:function(e,t,s){return i.format(e,t,s)},shortDaysOfWeek:function(){var e=o.culture();return e&&e.calendar?e.calendar.days.namesShort.slice():void 0},daysOfWeek:function(e,t){return 1===arguments.length&&(t=e,e=new Date),t=t||"do",r.map(r.range(7),function(s){return o.format(n.weekday(e,s),t)})},months:function(e,t){return 1===arguments.length&&(t=e,e=new Date),t=t||o.formats.DAY_NAME_ABRV,r.map(r.range(12),function(s){return o.format(n.month(e,s),t)})},monthsInYear:function(e){var t=new Date(e,0,1);return r.map(r.range(12),function(e){return n.month(t,e)})},firstOfDecade:function(e){var t=n.year(e)%10;return n.subtract(e,t,"year")},lastOfDecade:function(e){return n.add(o.firstOfDecade(e),9,"year")},firstOfCentury:function(e){var t=n.year(e)%100;return n.subtract(e,t,"year")},lastOfCentury:function(e){return n.add(o.firstOfCentury(e),99,"year")},firstVisibleDay:function(e){var t=n.startOf(e,"month");return n.startOf(t,"week")},lastVisibleDay:function(e){var t=n.endOf(e,"month");return n.endOf(t,"week")},visibleDays:function(e){for(var t=o.firstVisibleDay(e),s=o.lastVisibleDay(e),i=[];n.lte(t,s,"day");)i.push(t),t=n.add(t,1,"day");return i},merge:function(e,t){return null==t&&null==e?null:(null==t&&(t=new Date),null==e&&(e=new Date),e=o.startOf(e,"day"),e=o.hours(e,o.hours(t)),e=o.minutes(e,o.minutes(t)),e=o.seconds(e,o.seconds(t)),o.milliseconds(e,o.milliseconds(t)))},sameMonth:function(e,t){return n.eq(e,t,"month")},today:function(){return this.startOf(new Date,"day")},yesterday:function(){return this.add(this.startOf(new Date,"day"),-1,"day")},tomorrow:function(){return this.add(this.startOf(new Date,"day"),1,"day")},formats:{DAY_OF_MONTH:"dd",DAY_NAME_SHORT:null,MONTH_NAME_ABRV:"MMM",MONTH_YEAR:"MMMM yyyy",YEAR:"yyyy"}})},function(e){"use strict";e.exports=function(e,t,s){return void 0===t?{start:e.selectionStart,end:e.selectionEnd}:(e.focus(),void e.setSelectionRange(t,s))}},function(e,t,s){"use strict";var n=s(10),i={eq:function(e,t){return e===t},neq:function(e,t){return e!==t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t},lt:function(e,t){return t>e},lte:function(e,t){return t>=e},contains:function(e,t){return n.contains(e,t)},startsWith:function(e,t){return 0===e.lastIndexOf(t,0)},endsWith:function(e,t){var s=e.length-t.length,n=e.indexOf(t,s);return-1!==n&&n===s}};e.exports=i},function(e,t,s){function n(e){var t,s=i.Children.map(e,function(e){return e});for(t in s)return t}var i=s(9),r=(s(25),s(10)),o=s(28).mergeIntoProps,a=s(30);e.exports=i.createClass({displayName:"exports",propTypes:{duration:i.PropTypes.number,onRequestClose:i.PropTypes.func.isRequired,onClosing:i.PropTypes.func,onOpening:i.PropTypes.func,onClose:i.PropTypes.func,onOpen:i.PropTypes.func},getDefaultProps:function(){return{height:"auto",duration:200,open:!1,onClosing:r.noop,onOpening:r.noop,onClose:r.noop,onOpen:r.noop}},componentDidMount:function(){this.close(0)},componentWillReceiveProps:function(e){this.setState({contentChanged:n(e.children)!==n(this.props.children)})},componentDidUpdate:function(e){{var t=this,s=e.open&&!this.props.open,n=!e.open&&this.props.open;e.open===this.props.open}n?t.open():s&&t.close()},render:function(){var e=(r.extend({},this.props.style||{},{overflow:"hidden",position:"absolute",zIndex:1005}),o({className:"rw-popup rw-widget"},this.props.children));return e.props.ref=this.props.children.props.ref,o(this.props,i.DOM.div({className:"rw-popup-container"},p({ref:"content"},e)))},dimensions:function(){var e=this.getDOMNode();e.style.display="block",e.style.height=a.height(this.refs.content.getDOMNode())+"px"},open:function(){var e=this,t=this.getDOMNode(),s=this.refs.content.getDOMNode();this.ORGINAL_POSITION=a.css(s,"position"),this.dimensions(),this.props.onOpening(),s.style.position="absolute",a.animate(s,{top:0},e.props.duration,function(){s.style.position=e.ORGINAL_POSITION,t.style.overflow="visible",e.ORGINAL_POSITION=null,e.props.onOpen()})},close:function(e){{var t=this,s=this.refs.content.getDOMNode(),n=this.getDOMNode();n.style.height}this.ORGINAL_POSITION=a.css(s,"position"),this.dimensions(),this.props.onClosing(),n.style.overflow="hidden",s.style.position="absolute",a.animate(s,{top:"-100%"},void 0===e?this.props.duration:e,function(){s.style.position=t.ORGINAL_POSITION,n.style.display="none",t.ORGINAL_POSITION=null,t.props.onClose()})}});var p=i.createClass({displayName:"PopupContent",render:function(){return i.Children.only(this.props.children)}})},function(e,t,s){"use strict";var n=s(9),i=s(10);e.exports={propTypes:{disabled:n.PropTypes.oneOfType([n.PropTypes.bool,n.PropTypes.oneOf(["disabled"])]),readOnly:n.PropTypes.oneOfType([n.PropTypes.bool,n.PropTypes.oneOf(["readOnly"])])},_id:function(e){return this._id_||(this._id_=i.uniqueId("rw_")),(this.props.id||this._id_)+e -},_maybeHandle:function(e,t){var s=this.props.disabled===!0||"disabled"===this.props.disabled,n=this.props.readOnly===!0||"readonly"===this.props.readOnly;return s||!t&&n?void 0:e}}},function(e,t,s){function n(e,t){var s;if(e===t)return!0;for(s in e)if(e.hasOwnProperty(s)&&(!t.hasOwnProperty(s)||e[s]!==t[s]))return!1;for(s in t)if(t.hasOwnProperty(s)&&!e.hasOwnProperty(s))return!1;return!0}s(9);e.exports={shouldComponentUpdate:function(e,t){return!n(this.props,e)||!n(this.state,t)}}},function(e,t,s){var n=s(9),i=s(33),r=s(38),o=(s(27),s(26),s(10));e.exports={propTypes:{data:n.PropTypes.array,value:n.PropTypes.any,delay:n.PropTypes.number,filter:n.PropTypes.string},search:function(e,t){var s=this,n=((this._searchTerm||"")+e).toLowerCase();clearTimeout(this._timer),this._searchTerm=n,this._timer=setTimeout(function(){s._searchTerm="",t(n)},this.props.delay)},findNextWordIndex:function(e,t){var s=i.startsWith,n=this;return o.findIndex(n._data(),function(i,o){return o!=t&&s(r._dataText.call(n,i).toLowerCase(),e.toLowerCase())})}}},function(e,t,s){var n=s(9),i=s(10);e.exports={propTypes:{valueField:n.PropTypes.string,textField:n.PropTypes.string},_dataValue:function(e){var t=this.props.valueField;return t&&e&&i.has(e,t)?e[t]:e},_dataText:function(e){var t=this.props.textField;return(t&&e&&i.has(e,t)?e[t]:e)+""},_dataIndexOf:function(e,t){return i.findIndex(e,i.partial(this._valueMatcher,t),this)},_valueMatcher:function(e,t){return i.isEqual(this._dataValue(e),this._dataValue(t))},_dataItem:function(e,t){var s,n=e[0],r=this.props.valueField;return i.has(t,r)||typeof n==typeof val?t:(s=this._dataIndexOf(e,this._dataValue(t)),-1!==s?e[s]:t)}}},function(e,t,s){var n=s(9);e.exports={propTypes:{isRtl:n.PropTypes.bool},contextTypes:{isRtl:n.PropTypes.bool},childContextTypes:{isRtl:n.PropTypes.bool},getChildContext:function(){return{isRtl:this.props.isRtl||this.context&&this.context.isRtl}},isRtl:function(){return!!(this.props.isRtl||this.context&&this.context.isRtl)}}},function(e,t,s){function n(e){return function(){return e.apply(this,arguments),this}}var i=s(9),r=(s(33),s(38),s(26)),o=s(27),a=(s(29).directions,s(10));e.exports=function(e){var t=e.charAt(0).toUpperCase()+e.substr(1),s=(o.provided(function(e){return!a.isEqual(e.value,this.props.value)}),o.provided(function(e){return e>=0})),p=s(r(e)),l={propTypes:{data:i.PropTypes.array,value:i.PropTypes.any}};return l["set"+t]=n(p),l["prev"+t]=function(){var t=(this._data(),this.state&&this.state[e]||0);return t-=1,0>t&&(t=0),t},l["next"+t]=function(){var t=this._data(),s=this.state&&this.state[e]||0;return s+=1,s>=t.length&&(s=t.length-1),s},l}},function(e,t,s){{var n=s(9),i=s(33),r=s(38),o=s(26),a=s(27),p=(s(29).directions,s(10)),l=(a.provided(function(e){return!p.isEqual(e.value,this.props.value)}),a.provided(function(e){return e>=0})),u=p.without(p.keys(i),"filter");l(o("selectedIndex"))}e.exports={propTypes:{data:n.PropTypes.array,value:n.PropTypes.any,filter:n.PropTypes.oneOfType([n.PropTypes.func,n.PropTypes.oneOf(u.concat(!1))]),caseSensitive:n.PropTypes.bool,minLength:n.PropTypes.number},getDefaultProps:function(){return{caseSensitive:!1,minLength:1}},filterIndexOf:function(e,t){var s="function"==typeof this.props.filter?this.props.filter:i[this.props.filter||"eq"];return!t||!t.trim()||this.props.filter&&t.length<(this.props.minLength||1)?-1:(this.props.caseSensitive||(t=t.toLowerCase()),p.findIndex(e,function(e){var n=r._dataText.call(this,e);return this.props.caseSensitive||(n=n.toLowerCase()),s(n,t.toLowerCase())},this))},filter:function(e,t){var s="string"==typeof this.props.filter?i[this.props.filter]:this.props.filter;return!s||!t||!t.trim()||t.length<(this.props.minLength||1)?e:(this.props.caseSensitive||(t=t.toLowerCase()),p.filter(e,function(e){var n=r._dataText.call(this,e);return this.props.caseSensitive||(n=n.toLowerCase()),s(n,t.toLowerCase())},this))}}},function(e){!function(){e.exports=this["window.Globalize"]}()},function(e,t,s){var n=s(9);e.exports={contextTypes:{isRtl:n.PropTypes.bool},isRtl:function(){return!!this.context.isRtl}}},function(e){"use strict";e.exports=function(e,t){var s=0,n=e?e.length:0,i=[];for(t=Math.max(+t||1,1);n>s;)i.push(e.slice(s,s+=t));return i}},function(e,t,s){var n=s(9),i=s(31),r=s(29).directions;e.exports=function(e,t){return{propTypes:{value:n.PropTypes.instanceOf(Date),min:n.PropTypes.instanceOf(Date),max:n.PropTypes.instanceOf(Date)},getInitialState:function(){return{focusedDate:this.props.value}},componentWillReceiveProps:function(e){var s=this.state.focusedDate;//!dates.inRange(focused, nextProps.min, nextProps.max) -i.eq(e.value,s,t)||this.setState({focusedDate:e.value})},_keyDown:function(s){var n=s.key,o=(s.altKey,this.state.focusedDate),a=o;if("Enter"===n)return this.props.onChange(a);if("ArrowLeft"===n?a=this.move(a,r.LEFT):"ArrowRight"===n?a=this.move(a,r.RIGHT):"ArrowUp"===n?a=this.move(a,r.UP):"ArrowDown"===n&&(a=this.move(a,r.DOWN)),!i.eq(o,a,t)){if(s.preventDefault(),i.gt(a,this.props.value,e))return this.props.onMoveRight(a);if(i.lt(a,this.props.value,e))return this.props.onMoveLeft(a);this.setState({focusedDate:a})}}}}},function(e){function t(e,t){var s=f.month(e),n=s+t;return e=f.month(e,n),0>n&&(n=12+t),f.month(e)!==n%12&&(e=f.date(e,0)),e}function s(e){return e=e.charAt(0).toUpperCase()+e.substr(1),function(t,s){return void 0===s?t["get"+e]():(t=new Date(t),t["set"+e](s),t)}}function n(e){return function(t,s,n){return e(+f.startOf(t,n),+f.startOf(s,n))}}var i="milliseconds",r="seconds",o="minutes",a="hours",p="day",l="week",u="month",d="year",h="decade",c="century",f=e.exports={startOfWeek:function(){return 0},add:function(e,s,n){if(e=new Date(e),n===i)return f.milliseconds(e,f.milliseconds(e)+s);if(n===r)return f.seconds(e,f.seconds(e)+s);if(n===o)return f.minutes(e,f.minutes(e)+s);if(n===a)return f.hours(e,f.hours(e)+s);if(n===p)return f.date(e,f.date(e)+s);if(n===l)return f.date(e,f.date(e)+7*s);if(n===u)return t(e,s);if(n===d)return f.year(e,f.year(e)+s);if(n===h)return f.year(e,f.year(e)+10*s);if(n===c)return f.year(e,f.year(e)+100*s);throw new TypeError('Invalid units: "'+n+'"')},subtract:function(e,t,s){return f.add(e,-t,s)},startOf:function(e,t){switch(e=new Date(e),t){case"century":case"decade":case"year":e=f.month(e,0);case"month":e=f.date(e,1);case"week":case"day":e=f.hours(e,0);case"hours":e=f.minutes(e,0);case"minutes":e=f.seconds(e,0);case"seconds":e=f.milliseconds(e,0)}return t===h&&(e=f.subtract(e,f.year(e)%10,"year")),t===c&&(e=f.subtract(e,f.year(e)%100,"year")),t===l&&(e=f.weekday(e,0)),e},endOf:function(e,t){return e=new Date(e),e=f.startOf(e,t),e=f.add(e,1,t),e=f.subtract(e,1,i)},eq:n(function(e,t){return e===t}),gt:n(function(e,t){return e>t}),gte:n(function(e,t){return e>=t}),lt:n(function(e,t){return t>e}),lte:n(function(e,t){return t>=e}),min:function(){var e=Array.prototype.slice.call(arguments);return new Date(Math.min.apply(Math,e))},max:function(){var e=Array.prototype.slice.call(arguments);return new Date(Math.max.apply(Math,e))},inRange:function(e,t,s,n){return n=n||"day",f.gte(e,t,n)&&f.lte(e,s,n)},milliseconds:s("Milliseconds"),seconds:s("Seconds"),minutes:s("Minutes"),hours:s("Hours"),day:s("Day"),date:s("Date"),month:s("Month"),year:s("FullYear"),decade:function(e,t){return void 0==t?f.year(f.startOf(e,h)):f.add(e,t+10,d)},century:function(e,t){return void 0==t?f.year(f.startOf(e,c)):f.add(e,t+100,d)},weekday:function(e,t){var s=(f.day(e)+7-f.startOfWeek())%7;return void 0==t?s:f.add(e,t-s,p)}}}]); \ No newline at end of file +this.ReactWidgets=function(e){function t(n){if(s[n])return s[n].exports;var i=s[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var s={};return t.m=e,t.c=s,t.p="",t(0)}([function(e,t,s){e.exports={DropDownlist:s(1),Combobox:s(2),Calendar:s(3),DateTimePicker:s(4),NumberPicker:s(5),Select:s(6),utils:{ReplaceTransitionGroup:s(7),SlideTransition:s(8)}}},function(e,t,s){var n=s(9),i=s(10),r=s(24),o=s(31),a=s(27),p=s(28).mergeIntoProps,l=(s(29).directions,s(21),s(33)),u=s(12),d=s(30),h=(s(13),{value:n.PropTypes.any,onChange:n.PropTypes.func,open:n.PropTypes.bool,onToggle:n.PropTypes.func,data:n.PropTypes.array,valueField:n.PropTypes.string,textField:n.PropTypes.string,valueComponent:n.PropTypes.component,itemComponent:n.PropTypes.component,busy:n.PropTypes.bool,delay:n.PropTypes.number,duration:n.PropTypes.number,disabled:n.PropTypes.oneOfType([n.PropTypes.bool,n.PropTypes.oneOf(["disabled"])]),readOnly:n.PropTypes.oneOfType([n.PropTypes.bool,n.PropTypes.oneOf(["readOnly"])]),messages:n.PropTypes.shape({open:n.PropTypes.string})}),c=n.createClass({displayName:"DropdownList",mixins:[s(34),s(40),s(35),s(37),s(38),s(39)("focusedIndex"),s(39)("selectedIndex")],propTypes:h,getInitialState:function(){var e=this._dataIndexOf(this.props.data,this.props.value);return{selectedIndex:e,focusedIndex:-1===e?0:e}},getDefaultProps:function(){return{delay:500,value:"",open:!1,data:[],messages:{open:"open dropdown"}}},componentWillReceiveProps:function(e){if(!i.isEqual(e.value,this.props.value)){var t=this._dataIndexOf(e.data,e.value);this.setSelectedIndex(t),this.setFocusedIndex(-1===t?0:t)}},render:function(){var e=i.keys(h),t=this._dataItem(this._data(),this.props.value),s=this._id("_option");return p(i.omit(this.props,e),n.DOM.div({ref:"element",onKeyDown:this._maybeHandle(this._keyDown),onClick:this._maybeHandle(this.toggle),onFocus:this._maybeHandle(i.partial(this._focus,!0),!0),onBlur:i.partial(this._focus,!1),"aria-expanded":this.props.open,"aria-haspopup":!0,"aria-activedescendent":this.props.open?s:void 0,"aria-disabled":this.props.disabled,"aria-readonly":this.props.readOnly,tabIndex:this.props.disabled?"-1":"0",className:r({"rw-dropdown-list":!0,"rw-widget":!0,"rw-state-disabled":this.props.disabled,"rw-state-readonly":this.props.readOnly,"rw-state-focus":this.state.focused,"rw-open":this.props.open,"rw-rtl":this.isRtl()})},n.DOM.span({className:"rw-dropdownlist-picker rw-select rw-btn"},n.DOM.i({className:"rw-i rw-i-caret-down"+(this.props.busy?" rw-loading":"")},n.DOM.span({className:"rw-sr"},this.props.messages.open))),n.DOM.div({className:"rw-input"},this.props.valueComponent?this.props.valueComponent({item:t}):this._dataText(t)),l({open:this.props.open,onRequestClose:this.close,duration:this.props.duration},n.DOM.div(null,u({ref:"list",optID:s,"aria-hidden":!this.props.open,style:{maxHeight:200,height:"auto"},data:this.props.data,initialVisibleItems:this.props.initialBufferSize,itemHeight:18,selectedIndex:this.state.selectedIndex,focusedIndex:this.state.focusedIndex,textField:this.props.textField,valueField:this.props.valueField,listItem:this.props.itemComponent,onSelect:this._maybeHandle(this._onSelect)})))))},setWidth:function(){var e=d.width(this.getDOMNode()),t=e!==this.state.width;t&&this.setState({width:e})},_focus:function(e){var t=this;clearTimeout(t.timer),t.timer=setTimeout(function(){e?t.getDOMNode().focus():t.close(),e!==t.state.focused&&t.setState({focused:e})},0)},_onSelect:function(e){this.close(),this.change(e)},_keyDown:function(e){function t(e){s.change(s._data()[e])}var s=this,n=e.key,i=e.altKey,r=this.props.open;"End"===n?(r?this.setFocusedIndex(this._data().length-1):t(this._data().length-1),e.preventDefault()):"Home"===n?(r?this.setFocusedIndex(0):t(0),e.preventDefault()):"Escape"===n&&r?this.close():"Enter"===n&&r?t(this.state.focusedIndex):"ArrowDown"===n?(i?this.open():r?this.setFocusedIndex(this.nextFocusedIndex()):t(this.nextSelectedIndex()),e.preventDefault()):"ArrowUp"===n?(i?this.close():r?this.setFocusedIndex(this.prevFocusedIndex()):t(this.prevSelectedIndex()),e.preventDefault()):this.search(String.fromCharCode(e.keyCode),this._locate)},change:function(e){var t=this.props.onChange;t&&!i.isEqual(e,this.props.value)&&(t(e),this.close())},_locate:function(e){var t=this.props.open?"focusedIndex":"selectedIndex",s=this.findNextWordIndex(e,this.state[t]),n=o(t).bind(this);-1!==s&&n(s)},_data:function(){return this.props.data},open:function(){this.notify("onToggle",!0)},close:function(){this.notify("onToggle",!1)},toggle:function(){this.props.open?this.close():this.open()}});e.exports=a.createControlledClass("DropDownList",c,{open:"onToggle",value:"onChange"})},function(e,t,s){function n(e,t){var s;if(e===t)return!0;for(s in e)if(e.hasOwnProperty(s)&&(!t.hasOwnProperty(s)||e[s]!==t[s]))return!1;for(s in t)if(t.hasOwnProperty(s)&&!e.hasOwnProperty(s))return!1;return!0}var i=s(9),r=s(24),o=s(10),a=(s(25),s(26)),p=s(27),l=s(28).mergeIntoProps,u=(s(29).directions,s(11)),d=s(33),h=s(12),c=s(30),f=s(13),y={value:i.PropTypes.any,onChange:i.PropTypes.func,open:i.PropTypes.bool,onToggle:i.PropTypes.func,itemComponent:i.PropTypes.func,data:i.PropTypes.array,valueField:i.PropTypes.string,textField:i.PropTypes.string,disabled:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(["disabled"])]),readOnly:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(["readOnly"])]),suggest:i.PropTypes.bool,busy:i.PropTypes.bool,duration:i.PropTypes.number,placeholder:i.PropTypes.string,messages:i.PropTypes.shape({open:i.PropTypes.string,emptyList:i.PropTypes.string,emptyFilter:i.PropTypes.string})},m=i.createClass({displayName:"ComboBox",mixins:[s(34),s(35),s(36),s(37),s(38),s(39)("focusedIndex"),s(39)("selectedIndex")],propTypes:y,getInitialState:function(){var e=this.process(this.props.data,this.props.value),t=this._dataIndexOf(e,this.props.value);return{selectedIndex:t,focusedIndex:-1===t?0:t,processedData:e,open:!1}},getDefaultProps:function(){return{data:[],value:"",open:!1,suggest:!1,filter:!1,delay:500,messages:{open:"open combobox",emptyList:"There are no items in this list",emptyFilter:"The filter returned no results"}}},shouldComponentUpdate:function(e,t){var s=this.refs.input&&this.refs.input.isSuggesting(),i=!n(t,this.state),r=!n(e,this.props);return s||i||r},componentWillReceiveProps:function(e){var t=this._dataIndexOf(e.data,e.value),s=-1==t?e.value:e.data[t],n=this.refs.input.isSuggesting(),i=this.process(e.data,e.value,(-1===t||n)&&this._dataText(s)),r=this._dataIndexOf(i,e.value),o=this.filterIndexOf(i,this._dataText(s));this._searchTerm="",this.setState({processedData:i,selectedIndex:r,focusedIndex:-1===r?-1!==o?o:0:r})},render:function(){var e=(this.props.valueComponent,this._dataItem(this._data(),this.props.value)),t=this._data(),s=this._id("_listbox"),n=this._id("_option"),a=this.props.suggest?this.props.filter?"both":"inline":this.props.filter?"list":"";return l(o.omit(this.props,o.keys(y)),i.DOM.div({ref:"element",onKeyDown:this._maybeHandle(this._keyDown),onFocus:this._maybeHandle(o.partial(this._focus,!0),!0),onBlur:this._focus.bind(null,!1),tabIndex:"-1",className:r({"rw-combobox":!0,"rw-widget":!0,"rw-state-focus":this.state.focused,"rw-open":this.props.open,"rw-state-disabled":this.props.disabled,"rw-state-readonly":this.props.readOnly,"rw-rtl":this.isRtl()})},f({tabIndex:"-1",className:"rw-select",onClick:this._maybeHandle(this.toggle),disabled:!(!this.props.disabled&&!this.props.readOnly)},i.DOM.i({className:"rw-i rw-i-caret-down"+(this.props.busy?" rw-loading":"")},i.DOM.span({className:"rw-sr"},this.props.messages.open))),u({ref:"input",type:"text",role:"combobox",suggest:this.props.suggest,"aria-owns":s,"aria-busy":!!this.props.busy,"aria-autocomplete":a,"aria-activedescendent":this.props.open?n:void 0,"aria-expanded":this.props.open,"aria-haspopup":!0,placeholder:this.props.placeholder,disabled:this.props.disabled,readOnly:this.props.readOnly,className:"rw-input",value:this._dataText(e),onChange:this._inputTyping,onKeyDown:this._inputKeyDown}),d({open:this.props.open,onRequestClose:this.close,duration:this.props.duration},i.DOM.div(null,h({ref:"list",id:s,optID:n,"aria-hidden":!this.props.open,"aria-live":a&&"polite",style:{maxHeight:200,height:"auto"},data:t,selectedIndex:this.state.selectedIndex,focusedIndex:this.state.focusedIndex,textField:this.props.textField,valueField:this.props.valueField,onSelect:this._maybeHandle(this._onSelect),listItem:this.props.itemComponent,messages:{emptyList:this.props.data.length?this.props.messages.emptyFilter:this.props.messages.emptyList}})))))},setWidth:function(){var e=c.width(this.getDOMNode()),t=e!==this.state.width;t&&this.setState({width:e})},_onSelect:function(e){this.close(),this.change(e),this._focus(!0)},_inputKeyDown:function(e){this._deleting="Backspace"===e.key||"Delete"===e.key,this._isTyping=!0},_inputTyping:function(e){var t,s,n=this,i=!!this.props.suggest,r=e.target.value;t=this._deleting||!i?r:this.suggest(this._data(),r),t=t||r,s=o.find(n.props.data,function(e){return n._dataText(e).toLowerCase()===t.toLowerCase()}),this.change(!this._deleting&&s?s:r,!0),this.open()},_focus:function(e){var t=this;clearTimeout(t.timer),!e&&t.refs.input.accept(),t.timer=setTimeout(function(){e?t.refs.input.focus():t.close(),e!==t.state.focused&&t.setState({focused:e})},0)},_keyDown:function(e){function t(e){return-1===e||0===s._data().length?s.change(s.refs.input.getDOMNode().value,!1):(s.refs.input.accept(!0),void s.change(s._data()[e],!1))}var s=this,n=e.key,i=e.altKey,r=(String.fromCharCode(e.keyCode),this.state.selectedIndex,this.state.focusedIndex),o=this.props.open;"End"===n?t(this._data().length-1):"Home"===n?t(0):"Escape"===n&&o?this.close():"Enter"===n&&o?(t(r),this.close()):"ArrowDown"===n?i?this.open():o?this.setFocusedIndex(this.nextFocusedIndex()):t(this.nextSelectedIndex()):"ArrowUp"===n&&(i?this.close():o?this.setFocusedIndex(this.prevFocusedIndex()):t(this.prevSelectedIndex()))},change:function(e,t){this._typedChange=!!t,this.notify("onChange",e)},open:function(){this.props.open||this.notify("onToggle",!0)},close:function(){this.props.open&&this.notify("onToggle",!0)},toggle:function(){this._focus(!0),this.props.open?this.close():this.open()},suggest:function(e,t){function s(e){return i(this._dataText(e).toLowerCase(),n.toLowerCase())}var n=this._dataText(t),i=a.startsWith,r="string"==typeof t?o.find(e,s,this):t;return!r||this.state&&this.state.deleting?"":this._dataText(r)},_data:function(){return this.state.processedData},process:function(e,t,s){return this.props.filter&&s&&(e=this.filter(e,s)),e}});e.exports=p.createControlledClass("ComboBox",m,{open:"onToggle",value:"onChange"})},function(e,t,s){var n=s(9),i=s(14),r=s(15),o=s(16),a=s(17),p=s(18),l=s(24),u=s(31),d=s(27),h=s(8),c=s(32),f=s(28).mergeIntoProps,y=s(29),m=s(10),v=y.directions,g=y.calendarViews,T=m.values(g),w=m.invert(y.calendarViewHierarchy),D=y.calendarViewHierarchy,O=y.calendarViewUnits,b=m.object([[g.MONTH,r],[g.YEAR,o],[g.DECADE,a],[g.CENTURY,p]]),x=m.object([[g.YEAR,1],[g.DECADE,10],[g.CENTURY,100]]),P=n.createClass({displayName:"Calendar",mixins:[s(34),s(40),s(38)],propTypes:{onChange:n.PropTypes.func.isRequired,value:n.PropTypes.instanceOf(Date),min:n.PropTypes.instanceOf(Date),max:n.PropTypes.instanceOf(Date),initialView:n.PropTypes.oneOf(T),finalView:n.PropTypes.oneOf(T),disabled:n.PropTypes.oneOfType([n.PropTypes.bool,n.PropTypes.oneOf(["disabled"])]),readOnly:n.PropTypes.oneOfType([n.PropTypes.bool,n.PropTypes.oneOf(["readOnly"])]),messages:n.PropTypes.shape({moveBack:n.PropTypes.string,moveForward:n.PropTypes.string}),maintainFocus:n.PropTypes.bool},getInitialState:function(){return{selectedIndex:0,view:this.props.initialView||"month",currentDate:this.inRangeValue(new Date(this.props.value))}},getDefaultProps:function(){return{open:!1,value:new Date,min:new Date(1900,0,1),max:new Date(2099,11,31),initialView:"month",finalView:"century",maintainFocus:!0}},componentWillReceiveProps:function(e){var t=T.indexOf(e.initialView),s=T.indexOf(e.finalView),n=T.indexOf(this.state.view),i=this.state.view,r=this.inRangeValue(new Date(e.value));t>n?this.setState({view:i=e.initialView}):n>s&&this.setState({view:i=e.finalView}),c.eq(r,this.props.value,O[i])||this.setState({currentDate:r})},render:function(){function e(){this._focus(!0,"stop")}var t=b[this.state.view],s=this.props.disabled||this.props.readOnly,r=this.state.currentDate,o=this._id("_view_label"),a=this.state.view+"_"+c[this.state.view](r),p=this._id("_view");return f(m.omit(this.props,"value","min","max"),n.DOM.div({className:l({"rw-calendar":!0,"rw-widget":!0,"rw-state-disabled":this.props.disabled,"rw-state-readonly":this.props.readOnly,"rw-rtl":this.isRtl()})},i({label:this._label(),labelId:o,messages:this.props.messages,upDisabled:s||this.state.view===this.props.finalView,prevDisabled:s||!c.inRange(this.nextDate(v.LEFT),this.props.min,this.props.max),nextDisabled:s||!c.inRange(this.nextDate(v.RIGHT),this.props.min,this.props.max),onViewChange:this._maybeHandle(m.partial(this.navigate,v.UP,null)),onMoveLeft:this._maybeHandle(m.partial(this.navigate,v.LEFT,null)),onMoveRight:this._maybeHandle(m.partial(this.navigate,v.RIGHT,null))}),h({ref:"animation",direction:this.state.slideDirection,onAnimate:e.bind(this)},t({ref:"currentView",key:a,id:p,"aria-labeledby":o,selectedDate:this.props.value,value:this.state.currentDate,onChange:this._maybeHandle(this.change),onKeyDown:this._maybeHandle(this._keyDown),onFocus:this._maybeHandle(m.partial(this._focus,!0),!0),onMoveLeft:this._maybeHandle(m.partial(this.navigate,v.LEFT)),onMoveRight:this._maybeHandle(m.partial(this.navigate,v.RIGHT)),disabled:this.props.disabled,readOnly:this.props.readOnly,min:this.props.min,max:this.props.max}))))},navigate:function(e,t){var s=this.state.view,n=e===v.LEFT||e===v.UP?"right":"left";t||(t=m.contains([v.LEFT,v.RIGHT],e)?this.nextDate(e):this.state.currentDate),e===v.DOWN&&(s=w[s]||s),e===v.UP&&(s=D[s]||s),this.isValidView(s)&&c.inRange(t,this.props.min,this.props.max,s)&&(this._focus(!0,"nav"),this.setState({currentDate:t,slideDirection:n,view:s}))},_focus:function(e){u("focused");this.props.maintainFocus&&e&&this.refs.currentView.getDOMNode().focus()},change:function(e){return this.props.onChange&&this.state.view===this.props.initialView?this.notify("onChange",e):void this.navigate(v.DOWN,e)},nextDate:function(e){var t=e===v.LEFT?"subtract":"add",s=this.state.view,n=s===g.MONTH?s:g.YEAR,i=x[s]||1;return c[t](this.state.currentDate,1*i,n)},_keyDown:function(e){var t=e.ctrlKey,s=e.key;t?("ArrowDown"===s&&(e.preventDefault(),this.navigate(v.DOWN)),"ArrowUp"===s&&(e.preventDefault(),this.navigate(v.UP)),"ArrowLeft"===s&&(e.preventDefault(),this.navigate(v.LEFT)),"ArrowRight"===s&&(e.preventDefault(),this.navigate(v.RIGHT))):this.refs.currentView._keyDown&&this.refs.currentView._keyDown(e)},_label:function(){var e=this.state.view,t=this.state.currentDate;return"month"===e?c.format(t,c.formats.MONTH_YEAR):"year"===e?c.format(t,c.formats.YEAR):"decade"===e?c.format(c.firstOfDecade(t),c.formats.YEAR)+" - "+c.format(c.lastOfDecade(t),c.formats.YEAR):"century"===e?c.format(c.firstOfCentury(t),c.formats.YEAR)+" - "+c.format(c.lastOfCentury(t),c.formats.YEAR):void 0},inRangeValue:function(e){return null==e?e:c.max(c.min(e,this.props.max),this.props.min)},isValidView:function(e){var t=T.indexOf(this.props.initialView),s=T.indexOf(this.props.finalView),n=T.indexOf(e);return n>=t&&s>=n}});e.exports=d.createControlledClass("Calendar",P,{value:"onChange"})},function(e,t,s){function n(e,t){var s="";return e instanceof Date&&!isNaN(e.getTime())&&(s=p.format(e,t)),s}function i(e,t){var s;e=[].concat(e);for(var n=0;n=0&&i(e,s,s+n)}},getDefaultProps:function(){return{value:""}},render:function(){return this.transferPropsTo(n.DOM.input({type:"text",className:"rw-input",onKeyDown:this.props.onKeyDown,onChange:this._change,value:null==this.props.value?"":this.props.value}))},isSuggesting:function(){var e=this.props.value,t=null!=this._last&&-1!==e.toLowerCase().indexOf(this._last.toLowerCase());return this.props.suggest&&t},accept:function(e){var t=this.getDOMNode().value||"",s=t.length;this._last=null,e&&i(this.getDOMNode(),s,s)},_change:function(e){var t=e.target.value;this._last=t,this.props.onChange(e,t)},focus:function(){this.getDOMNode().focus()}})},function(e,t,s){{var n=s(9),i=(s(26),s(43),s(28)),r=i.mergeIntoProps,o=(i.cloneWithProps,s(24)),a=s(10);n.createClass({displayName:"DefaultListItem",mixins:[s(37),s(44)],render:function(){var e=this.props.item;return this.transferPropsTo(n.DOM.li(null,e?this._dataText(e):""))}})}e.exports=n.createClass({displayName:"List",mixins:[s(37)],propTypes:{data:n.PropTypes.array,onSelect:n.PropTypes.func,listItem:n.PropTypes.component,selectedIndex:n.PropTypes.number,focusedIndex:n.PropTypes.number,valueField:n.PropTypes.string,textField:n.PropTypes.string,optID:n.PropTypes.string,messages:n.PropTypes.shape({emptyList:n.PropTypes.string})},getDefaultProps:function(){return{delay:500,optID:"",onSelect:a.noop,data:[],messages:{emptyList:"There are no items in this list"}}},componentDidMount:function(){this._setScrollPosition()},componentDidUpdate:function(e){e.focusedIndex!==this.props.focusedIndex&&this._setScrollPosition()},render:function(){{var e,t=n.DOM.li(null,this.props.messages.emptyList);n.DOM.li(null,this.props.messages.emptyFilter)}return e=a.map(this.props.data,function(e,t){var s=this.props.focusedIndex===t;return n.DOM.li({key:"item_"+t,role:"option",id:s?this.props.optID:void 0,"aria-selected":t===this.props.selectedIndex,className:o({"rw-state-focus":s,"rw-state-selected":t===this.props.selectedIndex}),onClick:a.partial(this.props.onSelect,e,t)},this.props.listItem?this.props.listItem({item:e}):this._dataText(e))},this),r(a.omit(this.props,"data","selectedIndex"),n.DOM.ul({className:"rw-list",ref:"scrollable",role:"listbox",tabIndex:"-1",onKeyDown:this._keyDown,onKeyPress:this.search},this.props.data.length?e:t))},_setScrollPosition:function(){var e,t,s,n,i,r=this.getDOMNode(),o=r.children[this.props.focusedIndex];o&&(e=r.scrollTop,t=r.clientHeight,s=o.offsetTop,n=o.offsetHeight,i=s+n,r.scrollTop=e>s?s:i>e+t?i-t:e)}})},function(e,t,s){var n=s(9);e.exports=n.createClass({displayName:"exports",render:function(){return this.transferPropsTo(n.DOM.button({type:"button",className:"rw-btn"},this.props.children))}})},function(e,t,s){var n=s(9),i=(s(24),s(13));e.exports=n.createClass({displayName:"exports",propTypes:{label:n.PropTypes.string.isRequired,labelId:n.PropTypes.string,upDisabled:n.PropTypes.bool.isRequired,prevDisabled:n.PropTypes.bool.isRequired,nextDisabled:n.PropTypes.bool.isRequired,onViewChange:n.PropTypes.func.isRequired,onMoveLeft:n.PropTypes.func.isRequired,onMoveRight:n.PropTypes.func.isRequired,messages:n.PropTypes.shape({moveBack:n.PropTypes.string,moveForward:n.PropTypes.string})},mixins:[s(40),s(44)],getDefaultProps:function(){return{messages:{moveBack:"navigate back",moveForward:"navigate forward"}}},render:function(){var e=this.isRtl();return n.DOM.div({className:"rw-header"},i({className:"rw-btn-left",onClick:this.props.onMoveLeft,disabled:this.props.prevDisabled,"aria-disabled":this.props.prevDisabled,title:this.props.moveBack},n.DOM.i({className:"rw-i rw-i-caret-"+(e?"right":"left")},n.DOM.span({className:"rw-sr"},this.props.moveBack))),i({className:"rw-btn-view",id:this.props.labelId,onClick:this.props.onViewChange,disabled:this.props.upDisabled,"aria-disabled":this.props.upDisabled},this.props.label),i({className:"rw-btn-right",onClick:this.props.onMoveRight,disabled:this.props.nextDisabled,"aria-disabled":this.props.nextDisabled,title:this.props.moveForward},n.DOM.i({className:"rw-i rw-i-caret-"+(e?"left":"right")},n.DOM.span({className:"rw-sr"},this.props.moveForward))))}})},function(e,t,s){var n=s(9),i=s(24),r=s(32),o=s(45),a=s(29).directions,p=s(28).mergeIntoProps,l=s(10),u=s(13),d={LEFT:a.RIGHT,RIGHT:a.LEFT};e.exports=n.createClass({displayName:"MonthView",mixins:[s(34),s(44),s(46)("month","day")],propTypes:{culture:n.PropTypes.array,value:n.PropTypes.instanceOf(Date),selectedDate:n.PropTypes.instanceOf(Date),min:n.PropTypes.instanceOf(Date),max:n.PropTypes.instanceOf(Date),format:n.PropTypes.string,onChange:n.PropTypes.func.isRequired,onMoveLeft:n.PropTypes.func,onMoveRight:n.PropTypes.func},render:function(){var e=r.visibleDays(this.props.value),t=o(e,7);return p(l.omit(this.props,"max","min","value","onChange"),n.DOM.table({role:"grid",tabIndex:this.props.disabled?"-1":"0",className:"rw-calendar-grid","aria-activedescendant":this._id("_selected_item"),onKeyUp:this._keyUp},n.DOM.thead(null,n.DOM.tr(null,this._headers())),n.DOM.tbody(null,l.map(t,this._row))))},_row:function(e,t){return n.DOM.tr({key:"week_"+t},l.map(e,function(e,t){var s=r.eq(e,this.state.focusedDate,"day"),o=r.eq(e,this.props.selectedDate,"day"),a=this._id("_selected_item");return r.inRange(e,this.props.min,this.props.max)?n.DOM.td({key:"day_"+t},u({tabIndex:"-1",onClick:l.partial(this.props.onChange,e),"aria-selected":o,"aria-disabled":this.props.disabled,disabled:this.props.disabled,className:i({"rw-off-range":r.month(e)!==r.month(this.state.focusedDate),"rw-state-focus":s,"rw-state-selected":o}),id:s?a:void 0},r.format(e,"dd"))):n.DOM.td({key:"day_"+t,className:"rw-empty-cell"}," ")}.bind(this)))},_headers:function(e){var t=r.shortDaysOfWeek(e);return l.map(t,function(e,t){return n.DOM.th({key:"header_"+t},e)})},move:function(e,t){return this.isRtl()&&d[t]&&(t=d[t]),t===a.LEFT?e=r.subtract(e,1,"day"):t===a.RIGHT?e=r.add(e,1,"day"):t===a.UP?e=r.subtract(e,1,"week"):t===a.DOWN&&(e=r.add(e,1,"week")),e}})},function(e,t,s){var n=s(9),i=s(24),r=s(32),o=s(45),a=s(29).directions,p=s(28).mergeIntoProps,l=s(10),u={LEFT:a.RIGHT,RIGHT:a.LEFT};e.exports=n.createClass({displayName:"YearView",mixins:[s(34),s(44),s(46)("year","month")],propTypes:{value:n.PropTypes.instanceOf(Date),min:n.PropTypes.instanceOf(Date),max:n.PropTypes.instanceOf(Date),onChange:n.PropTypes.func.isRequired},render:function(){var e=r.monthsInYear(r.year(this.props.value)),t=o(e,4);return p(l.omit(this.props,"max","min","value","onChange"),n.DOM.table({tabIndex:this.props.disabled?"-1":"0",ref:"table",role:"grid",className:"rw-calendar-grid rw-nav-view","aria-activedescendant":this._id("_selected_item"),onKeyUp:this._keyUp},n.DOM.tbody(null,l.map(t,this._row))))},_row:function(e,t){return n.DOM.tr({key:t},l.map(e,function(e,t){var s=r.eq(e,this.state.focusedDate,"month"),o=r.eq(e,this.props.value,"month"),a=this._id("_selected_item");return r.inRange(e,this.props.min,this.props.max,"month")?n.DOM.td({key:t},d({onClick:l.partial(this.props.onChange,e),tabIndex:"-1",id:s?a:void 0,"aria-selected":o,"aria-disabled":this.props.disabled,disabled:this.props.disabled,className:i({"rw-state-focus":s,"rw-state-selected":o})},r.format(e,r.formats.MONTH_NAME_ABRV))):n.DOM.td({key:t,className:"rw-empty-cell"}," ")}.bind(this)))},focus:function(){this.refs.table.getDOMNode().focus()},move:function(e,t){return this.isRtl()&&u[t]&&(t=u[t]),t===a.LEFT?e=r.subtract(e,1,"month"):t===a.RIGHT?e=r.add(e,1,"month"):t===a.UP?e=r.subtract(e,4,"month"):t===a.DOWN&&(e=r.add(e,4,"month")),e}});var d=s(13)},function(e,t,s){function n(e,t){return a.gte(e,a.startOf(t,"decade"),"year")&&a.lte(e,a.endOf(t,"decade"),"year")}function i(e){var e=a.add(a.startOf(e,"decade"),-2,"year");return d.map(d.range(12),function(){return e=a.add(e,1,"year")})}var r=s(9),o=s(24),a=s(32),p=s(45),l=s(29).directions,u=s(28).mergeIntoProps,d=s(10),h={LEFT:l.RIGHT,RIGHT:l.LEFT};e.exports=r.createClass({displayName:"DecadeView",mixins:[s(34),s(40),s(44),s(46)("decade","year")],propTypes:{value:r.PropTypes.instanceOf(Date),min:r.PropTypes.instanceOf(Date),max:r.PropTypes.instanceOf(Date),onChange:r.PropTypes.func.isRequired},render:function(){var e=i(this.props.value),t=p(e,4);return u(d.omit(this.props,"max","min","value","onChange"),r.DOM.table({tabIndex:this.props.disabled?"-1":"0",role:"grid",className:"rw-calendar-grid rw-nav-view","aria-activedescendant":this._id("_selected_item"),onKeyUp:this._keyUp},r.DOM.tbody(null,d.map(t,this._row))))},_row:function(e,t){this._id("_selected_item");return r.DOM.tr({key:"row_"+t},d.map(e,function(e,t){var s=a.eq(e,this.state.focusedDate,"year"),i=a.eq(e,this.props.value,"year"),p=this.props.id&&this.props.id+"_selected_item";return a.inRange(e,this.props.min,this.props.max,"year")?r.DOM.td({key:t},c({onClick:d.partial(this.props.onChange,e),tabIndex:"-1",id:s?p:void 0,"aria-selected":i,"aria-disabled":this.props.disabled,disabled:this.props.disabled,className:o({"rw-off-range":!n(e,this.props.value),"rw-state-focus":s,"rw-state-selected":i})},a.format(e,a.formats.YEAR))):r.DOM.td({key:t,className:"rw-empty-cell"}," ")}.bind(this)))},move:function(e,t){return this.isRtl()&&h[t]&&(t=h[t]),t===l.LEFT?e=a.subtract(e,1,"year"):t===l.RIGHT?e=a.add(e,1,"year"):t===l.UP?e=a.subtract(e,4,"year"):t===l.DOWN&&(e=a.add(e,4,"year")),e}});var c=s(13)},function(e,t,s){function n(e){return u.format(u.startOf(e,"decade"),u.formats.YEAR)+" - "+u.format(u.endOf(e,"decade"),u.formats.YEAR)}function i(e,t,s){return u.max(u.min(e,s),t)}function r(e,t,s){return u.gte(e,u.startOf(t,"decade"),"year")&&u.lte(e,u.endOf(s,"decade"),"year")}function o(e,t){return u.gte(e,u.startOf(t,"century"),"year")&&u.lte(e,u.endOf(t,"century"),"year")}function a(e){var e=u.add(u.startOf(e,"century"),-20,"year");return f.map(f.range(12),function(){return e=u.add(e,10,"year")})}var p=s(9),l=s(24),u=s(32),d=s(45),h=s(29).directions,c=s(28).mergeIntoProps,f=s(10),y={LEFT:h.RIGHT,RIGHT:h.LEFT};e.exports=p.createClass({displayName:"CenturyView",mixins:[s(34),s(40),s(44),s(46)("century","decade")],propTypes:{value:p.PropTypes.instanceOf(Date),min:p.PropTypes.instanceOf(Date),max:p.PropTypes.instanceOf(Date),onChange:p.PropTypes.func.isRequired},render:function(){var e=a(this.props.value),t=d(e,4);return c(f.omit(this.props,"max","min","value","onChange"),p.DOM.table({tabIndex:this.props.disabled?"-1":"0",role:"grid",className:"rw-calendar-grid rw-nav-view","aria-activedescendant":this._id("_selected_item"),onKeyUp:this._keyUp},p.DOM.tbody(null,f.map(t,this._row))))},_row:function(e,t){return p.DOM.tr({key:"row_"+t},f.map(e,function(e,t){var s=u.eq(e,this.state.focusedDate,"decade"),a=u.eq(e,this.props.value,"decade"),d=this._id("_selected_item"),h=i(e,this.props.min,this.props.max);return r(e,this.props.min,this.props.max)?p.DOM.td({key:t},m({onClick:f.partial(this.props.onChange,h),tabIndex:"-1",id:s?d:void 0,"aria-selected":a,"aria-disabled":this.props.disabled,disabled:this.props.disabled,className:l({"rw-off-range":!o(e,this.props.value),"rw-state-focus":s,"rw-state-selected":a})},n(e))):p.DOM.td({key:t,className:"rw-empty-cell"}," ")}.bind(this)))},move:function(e,t){return this.isRtl()&&y[t]&&(t=y[t]),t===h.LEFT?e=u.subtract(e,1,"decade"):t===h.RIGHT?e=u.add(e,1,"decade"):t===h.UP?e=u.subtract(e,4,"decade"):t===h.DOWN&&(e=u.add(e,4,"decade")),e}});var m=s(13)},function(e,t,s){var n=s(9),i=(s(24),s(32)),r=s(12),o=s(28).mergeIntoProps,a=(s(29).directions,s(10));e.exports=n.createClass({displayName:"TimeList",mixins:[s(35),s(39)("selectedIndex"),s(39)("focusedIndex")],propTypes:{value:n.PropTypes.instanceOf(Date),min:n.PropTypes.instanceOf(Date),max:n.PropTypes.instanceOf(Date),step:n.PropTypes.number,itemComponent:n.PropTypes.func,onSelect:n.PropTypes.func,preserveDate:n.PropTypes.bool},getDefaultProps:function(){return{step:30,format:"t",onSelect:a.noop,preserveDate:!0}},getInitialState:function(){var e=this._selectedIndex(this._data(),this.props.value);return{focusedIndex:-1===e?0:e}},render:function(){var e=this._data(),t=this._selectedIndex(e,this.props.value);return o(a.omit(this.props,"value"),r({ref:"list",data:e,textField:"label",valueField:"date",selectedIndex:t,focusedIndex:this.state.focusedIndex,listItem:this.props.itemComponent,onSelect:this.props.onSelect}))},_selectedIndex:function(e,t){var s=6e4*this.props.step;return t?(t=new Date(Math.floor(t.getTime()/s)*s),a.findIndex(e,{label:i.format(t,this.props.format)})):0},_data:function(){for(var e=[],t=0,s=this._dateValues(),n=s.min,r=i.date(n);100>t&&i.date(n)===r&&i.lte(n,s.max);)t++,e.push({date:n,label:i.format(n,this.props.format)}),n=i.add(n,this.props.step||30,"minutes");return e},_dateValues:function(){var e,t,s=this.props.value||i.today(),n=this.props.preserveDate,r=this.props.min,o=this.props.max;return n?{min:i.eq(s,r,"day")?r:i.today(),max:i.eq(s,o,"day")?r:i.tomorrow()}:(e=i.startOf(i.merge(new Date,r),"minutes"),t=i.startOf(i.merge(new Date,o),"minutes"),i.lte(t,e)&&i.gt(o,r,"day")&&(t=i.tomorrow()),{min:e,max:t})},_keyDown:function(e){var t=this,s=e.key,n=String.fromCharCode(e.keyCode);"End"===s?this.setFocusedIndex(this._data().length-1):"Home"===s?this.setFocusedIndex(0):"Enter"===s?this.props.onSelect(this._data()[this.state.focusedIndex]):"ArrowDown"===s?(e.preventDefault(),this.setFocusedIndex(this.nextFocusedIndex())):"ArrowUp"===s?(e.preventDefault(),this.setFocusedIndex(this.prevFocusedIndex())):(e.preventDefault(),this.search(n,function(e){t.setFocusedIndex(this.findNextWordIndex(e,t.state.focusedIndex))}))}});s(13)},function(e,t,s){function n(e){return!isNaN(e.getTime())}function i(e,t){var s="";return e instanceof Date&&n(e)&&(s=p.format(e,t)),s}var r=s(9),o=s(24),a=s(43),p=s(32);e.exports=r.createClass({displayName:"DatePickerInput",propTypes:{format:r.PropTypes.string,parse:r.PropTypes.func.isRequired,value:r.PropTypes.instanceOf(Date),onChange:r.PropTypes.func.isRequired},getDefaultProps:function(){return{textValue:""}},componentWillReceiveProps:function(e){this.setState({textValue:i(e.value,e.editing&&e.editFormat?e.editFormat:e.format)})},getInitialState:function(){var e=i(this.props.value,this.props.editing&&this.props.editFormat?this.props.editFormat:this.props.format);return{textValue:e,lastValue:e}},render:function(){var e=this.state.textValue;return this.transferPropsTo(r.DOM.input({type:"text",className:o({"rw-input":!0}),value:e,"aria-disabled":this.props.disabled,"aria-readonly":this.props.readOnly,disabled:this.props.disabled,readOnly:this.props.readOnly,onChange:this._change,onBlur:a.chain(this.props.blur,this._blur)}))},_change:function(e){this.setState({textValue:e.target.value})},_blur:function(){var e=this.state.textValue;e!==this.state.lastValue&&(this.props.onChange(this.props.parse(e),e),this.setState({lastValue:e}))},focus:function(){this.getDOMNode().focus()}})},function(e,t,s){var n=s(9),i=s(28).mergeIntoProps,r=s(10);e.exports=n.createClass({displayName:"exports",mixins:[s(37)],render:function(){var e=this.props.value;return i(r.omit(this.props,"value"),n.DOM.div(null,this._dataText(e)))}})},function(e,t,s){var n=s(9);e.exports=n.createClass({displayName:"SelectSearchInput",propTypes:{value:n.PropTypes.string,onChange:n.PropTypes.func.isRequired,disabled:n.PropTypes.bool,readOnly:n.PropTypes.bool},componentDidUpdate:function(){this.props.focused&&this.focus()},render:function(){var e=this.props.value,t=this.props.placeholder,s=Math.max((e||t).length,1);return this.transferPropsTo(n.DOM.input({type:"text",className:"rw-input","aria-disabled":this.props.disabled,"aria-readonly":this.props.readOnly,disabled:this.props.disabled,readOnly:this.props.readOnly,size:s}))},focus:function(){this.getDOMNode().focus()}})},function(e,t,s){var n=s(9),i=s(10),r=s(24),o=s(28).mergeIntoProps,a=s(13);e.exports=n.createClass({displayName:"SelectTagList",mixins:[s(37),s(40)],propTypes:{value:n.PropTypes.array,valueField:n.PropTypes.string,textField:n.PropTypes.string,valueComponent:n.PropTypes.component,disabled:n.PropTypes.oneOfType([n.PropTypes.bool,n.PropTypes.array,n.PropTypes.oneOf(["disabled"])]),readOnly:n.PropTypes.oneOfType([n.PropTypes.bool,n.PropTypes.array,n.PropTypes.oneOf(["readonly"])])},getInitialState:function(){return{focused:null}},render:function(){{var e=this.state.focused,t=this.props.value;i.isArray(this.props.disabled),i.isArray(this.props.readOnly)}return o(i.omit(this.props,"value","disabled","readOnly"),n.DOM.ul({className:"rw-tag-list"},i.map(t,function(t,s){var i=this.isDisabled(t),o=this.isReadOnly(t);return n.DOM.li({key:s,className:r({"rw-state-focus":!i&&e===s,"rw-state-disabled":i,"rw-state-readonly":o})},this.props.valueComponent?this.props.valueComponent({item:t}):this._dataText(t),a({tabIndex:"-1",onClick:!(i||o)&&this._delete.bind(null,t),"aria-disabled":i,disabled:i},"×",n.DOM.span({className:"rw-sr"},"Remove "+this._dataText(t))))},this)))},_delete:function(e){this.props.onDelete(e)},removeCurrent:function(){var e=this.props.value[this.state.focused];!e||this.isDisabled(e)||this.isReadOnly(e)||this.props.onDelete(e)},isDisabled:function(e,t){return t&&(e=this.props.value[e]),this.props.disabled===!0||-1!==this._dataIndexOf(this.props.disabled||[],e)},isReadOnly:function(e,t){return t&&(e=this.props.value[e]),this.props.readOnly===!0||-1!==this._dataIndexOf(this.props.readOnly||[],e)},removeNext:function(){var e=i.last(this.props.value);!e||this.isDisabled(e)||this.isReadOnly(e)||this.props.onDelete(e)},clear:function(){this.setState({focused:null})},first:function(){for(var e=0,t=this.props.value.length;t>e&&this.isDisabled(e,!0);)e++;e!==t&&this.setState({focused:e})},last:function(){for(var e=this.props.value.length-1;e>-1&&this.isDisabled(e,!0);)e--;e>=0&&this.setState({focused:e})},next:function(){for(var e=this.state.focused+1,t=this.props.value.length;t>e&&this.isDisabled(e,!0);)e++;return null!==this.state.focused?e>=t?this.clear():void this.setState({focused:e}):void 0},prev:function(){var e=this.state.focused;for(null===e&&(e=this.props.value.length),e--;e>-1&&this.isDisabled(e,!0);)e--;e>=0&&this.setState({focused:e})}})},function(e,t,s){"use strict";var n=s(10);e.exports=function(e){return n.isArray(e)||(e=n.transform(e,function(e,t,s){t&&e.push(s)},[])),e.join(" ")}},function(e){"use strict";e.exports=function(e,t,s){return void 0===t?{start:e.selectionStart,end:e.selectionEnd}:(e.focus(),void e.setSelectionRange(t,s))}},function(e,t,s){"use strict";var n=s(10),i={eq:function(e,t){return e===t},neq:function(e,t){return e!==t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t},lt:function(e,t){return t>e},lte:function(e,t){return t>=e},contains:function(e,t){return n.contains(e,t)},startsWith:function(e,t){return 0===e.lastIndexOf(t,0)},endsWith:function(e,t){var s=e.length-t.length,n=e.indexOf(t,s);return-1!==n&&n===s}};e.exports=i},function(e,t,s){"use strict";function n(e,t){return a.propType(function(s,n,r,o){return void 0!==s[n]?s[e]?t&&t(s,n,r,o):new Error("ReactWidgets: you have provided a `"+n+"` prop to `"+r+"` without an `"+e+"` handler. This will render a read-only field. If the field should be mutable use `"+i(n)+"`. Otherwise, set `"+e+"`"):void 0})}function i(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}var r=s(10),o=s(9),a=s(47);e.exports={createControlledClass:function(e,t,s){function a(e,t,n){var i=s[t],o=i&&p(e.props,t),a={};return e._notifying||(e._notifying=[]),e.props[i]&&(e._notifying.push(!0),e.props[i].apply(e,r.rest(arguments,2)),e._notifying.pop()),a[t]=n,e.setState(a),!o}function p(e,t){return void 0!==e[t]}var l=r.invert(s),u=r.transform(s,function(e,s,r){var o=t.type.propTypes[r];e[r]=n(s,o),e[i(r)]=o},{});return o.createClass({displayName:e,propTypes:u,getInitialState:function(){var e=this.props,t=r.keys(s);return r.transform(t,function(t,s){t[s]=e[i(s)]},{})},shouldComponentUpdate:function(){return!this._notifying||!this._notifying.length},render:function(){var e,n,i=this;return e=r.mapValues(s,function(e,t){return p(i.props,t)?i.props[t]:i.state[t]}),n=r.mapValues(l,function(e){return r.partial(a,i,e)}),t(r.extend({},this.props,e,n),this.props.children)}})}}},function(e,t,s){"use strict";function n(e,t){return a.transform(t,function(e,t,s){a.has(l,s)?l[s](e,t,s):a.has(e,s)||(e[s]=t)},e)}function i(e){return function(t,s,n){t[n]=a.has(t,n)?e(t[n],s):s}}function r(){return a.reduce(arguments,function(e,t){return e?t?e+=" "+t:e:t||""},"")}function o(e,t){return a.extend({},e,t)}var a=s(10),p=s(9),l={className:i(r),children:a.noop,key:a.noop,ref:a.noop,style:i(o)};e.exports={mergeIntoProps:function(e,t){var s=t.props?t.props:t;return n(s,e),t},cloneWithProps:function(e,t){var s=n(a.clone(t),e.props),i=a.map(p.version.split("."),parseFloat);return!a.has(s,"children")&&a.has(e.props,"children")&&(s.children=e.props.children),0===i[0]&&i[1]<11?e.constructor.ConvenienceConstructor(s):e.constructor(s)}}},function(e,t,s){function n(e){return i.mapValues(e,function(e,t){return t})}var i=s(10),r={MONTH:"month",YEAR:"year",DECADE:"decade",CENTURY:"century"};e.exports={directions:n({LEFT:null,RIGHT:null,UP:null,DOWN:null}),datePopups:{TIME:"time",CALENDAR:"calendar"},calendarViews:r,calendarViewHierarchy:i.object([[r.MONTH,r.YEAR],[r.YEAR,r.DECADE],[r.DECADE,r.CENTURY]]),calendarViewUnits:i.object([[r.MONTH,r.DAY],[r.YEAR,r.MONTH],[r.DECADE,r.YEAR],[r.CENTURY,r.DECADE]])}},function(e,t,s){"use strict";function n(e){return e.replace(/-+(.)?/g,function(e,t){return t?t.toUpperCase():""})}function i(e){return e.replace(/[A-Z]/g,function(e,t){return(0!==t?"-":"")+e.toLowerCase()})}function r(e){return e.ownerDocument.defaultView.opener?e.ownerDocument.defaultView.getComputedStyle(e,null):window.getComputedStyle(e,null)}var o,a,p,l,u,d,h=s(10),c="",f=document.createElement("div"),y={},m={O:"otransitionend",Moz:"transitionend",Webkit:"webkitTransitionEnd"};h.any(m,function(e,t){return void 0!==f.style[t+"TransitionProperty"]?(c="-"+t.toLowerCase()+"-",d=e,!0):void 0}),d||void 0===f.style.transitionProperty||(d="transitionend"),u=!d,y[p=c+"transition-property"]=y[a=c+"transition-duration"]=y[l=c+"transition-delay"]=y[o=c+"transition-timing-function"]="";var v=e.exports={width:function(e){return v.offset(e).width},height:function(e){return v.offset(e).height},hasFocus:function(e){var t=e.ownerDocument;return null==t.activeElement?!1:t.activeElement===e},offset:function(e){var t=e.ownerDocument,s=t&&t.documentElement,n={top:0,left:0};if(s)return v.contains(s,e)?(void 0!==e.getBoundingClientRect&&(n=e.getBoundingClientRect()),{top:n.top+window.pageYOffset-s.clientTop,left:n.left+window.pageXOffset-s.clientLeft,width:n.width||e.offsetWidth,height:n.height||e.offsetHeight}):n},css:function(e,t,s){var o="",a=t;if("string"==typeof t){if(void 0===s)return e.style[n(t)]||r(e).getPropertyValue(t);(a={})[t]=s}h.each(a,function(t,s){t||0===t?o+=i(s)+":"+t+";":e.style.removeProperty(i(s))}),e.style.cssText+=";"+o},contains:function(){var e=document.documentElement;return e&&e.contains?function(e,t){return e.contains(t)}:e&&e.compareDocumentPosition?function(e,t){return e===t||!!(16&e.compareDocumentPosition(t))}:function(e,t){if(t)do if(t===e)return!0;while(t=t.parentNode);return!1}}(),on:function(e,t,s){e.addEventListener?e.addEventListener(t,s,!1):e.attachEvent?e.attachEvent("on"+t,s):e["on"+t]=s},off:function(e,t,s){e.addEventListener?e.removeEventListener(t,s,!1):e.attachEvent?e.detachEvent("on"+t,s):e["on"+t]=null},trigger:function(e,t){var s=document.createEvent("Events");s.initEvent(t,!0,!0),e.dispatchEvent(s)},animate:function(e,t,s,n,r){function c(t){t.target===t.currentTarget&&(f=!0,v.off(t.target,d,c),v.css(e,y),r&&r.call(this))}var f,m=[],g={target:e,currentTarget:e},T={};"function"==typeof n&&(r=n,n=null),u&&(s=0),void 0===s&&(s=200),h.each(t,function(e,s){T[s]=t[s],m.push(i(s))}),s>0&&(T[p]=m.join(", "),T[a]=s/1e3+"s",T[l]="0s",T[o]=n||"linear",v.on(e,d,c),setTimeout(function(){f||c(g)},s+25)),e.clientLeft,v.css(e,T),0>=s&&setTimeout(h.partial(c,g),0)}}},function(e){"use strict";e.exports=function(e){return function(t){var s={};return s[e]=t,this.setState(s),this}}},function(e,t,s){"use strict";var n=s(48),i=s(42),r=s(10),o=e.exports=r.extend({},n,{culture:function(){return i.culture()},startOfWeek:function(){var e=i.culture();return e&&e.calendar?e.calendar.firstDay||0:0},parse:function(e,t,s){return i.parseDate(e,t,s)},format:function(e,t,s){return i.format(e,t,s)},shortDaysOfWeek:function(){var e=o.culture();return e&&e.calendar?e.calendar.days.namesShort.slice():void 0},daysOfWeek:function(e,t){return 1===arguments.length&&(t=e,e=new Date),t=t||"do",r.map(r.range(7),function(s){return o.format(n.weekday(e,s),t)})},months:function(e,t){return 1===arguments.length&&(t=e,e=new Date),t=t||o.formats.DAY_NAME_ABRV,r.map(r.range(12),function(s){return o.format(n.month(e,s),t)})},monthsInYear:function(e){var t=new Date(e,0,1);return r.map(r.range(12),function(e){return n.month(t,e)})},firstOfDecade:function(e){var t=n.year(e)%10;return n.subtract(e,t,"year")},lastOfDecade:function(e){return n.add(o.firstOfDecade(e),9,"year")},firstOfCentury:function(e){var t=n.year(e)%100;return n.subtract(e,t,"year")},lastOfCentury:function(e){return n.add(o.firstOfCentury(e),99,"year")},firstVisibleDay:function(e){var t=n.startOf(e,"month");return n.startOf(t,"week")},lastVisibleDay:function(e){var t=n.endOf(e,"month");return n.endOf(t,"week")},visibleDays:function(e){for(var t=o.firstVisibleDay(e),s=o.lastVisibleDay(e),i=[];n.lte(t,s,"day");)i.push(t),t=n.add(t,1,"day");return i},merge:function(e,t){return null==t&&null==e?null:(null==t&&(t=new Date),null==e&&(e=new Date),e=o.startOf(e,"day"),e=o.hours(e,o.hours(t)),e=o.minutes(e,o.minutes(t)),e=o.seconds(e,o.seconds(t)),o.milliseconds(e,o.milliseconds(t)))},sameMonth:function(e,t){return n.eq(e,t,"month")},today:function(){return this.startOf(new Date,"day")},yesterday:function(){return this.add(this.startOf(new Date,"day"),-1,"day")},tomorrow:function(){return this.add(this.startOf(new Date,"day"),1,"day")},formats:{DAY_OF_MONTH:"dd",DAY_NAME_SHORT:null,MONTH_NAME_ABRV:"MMM",MONTH_YEAR:"MMMM yyyy",YEAR:"yyyy"}})},function(e,t,s){function n(e){var t=i.Children.map(e,function(e){return e});for(var s in t)return s}var i=s(9),r=(s(24),s(10)),o=s(28).mergeIntoProps,a=s(30),p=i.createClass({displayName:"PopupContent",render:function(){return i.Children.only(this.props.children)}});e.exports=i.createClass({displayName:"exports",propTypes:{duration:i.PropTypes.number,onRequestClose:i.PropTypes.func.isRequired,onClosing:i.PropTypes.func,onOpening:i.PropTypes.func,onClose:i.PropTypes.func,onOpen:i.PropTypes.func},getDefaultProps:function(){return{height:"auto",duration:200,open:!1,onClosing:r.noop,onOpening:r.noop,onClose:r.noop,onOpen:r.noop}},componentDidMount:function(){this.close(0)},componentWillReceiveProps:function(e){this.setState({contentChanged:n(e.children)!==n(this.props.children)})},componentDidUpdate:function(e){var t=e.open&&!this.props.open,s=!e.open&&this.props.open;s?this.open():t&&this.close()},render:function(){var e=o({className:"rw-popup rw-widget"},this.props.children);return e.props.ref=this.props.children.props.ref,o(this.props,i.DOM.div({className:"rw-popup-container"},p({ref:"content"},e)))},dimensions:function(){var e=this.getDOMNode();e.style.display="block",e.style.height=a.height(this.refs.content.getDOMNode())+"px"},open:function(){var e=this,t=this.getDOMNode(),s=this.refs.content.getDOMNode();this.ORGINAL_POSITION=a.css(s,"position"),this._isOpening=!0,this.dimensions(),this.props.onOpening(),s.style.position="absolute",a.animate(s,{top:0},e.props.duration,function(){e._isOpening&&(s.style.position=e.ORGINAL_POSITION,t.style.overflow="visible",e.ORGINAL_POSITION=null,e.props.onOpen())})},close:function(e){{var t=this,s=this.refs.content.getDOMNode(),n=this.getDOMNode();n.style.height}this.ORGINAL_POSITION=a.css(s,"position"),this._isOpening=!1,this.dimensions(),this.props.onClosing(),n.style.overflow="hidden",s.style.position="absolute",a.animate(s,{top:"-100%"},void 0===e?this.props.duration:e,function(){t._isOpening||(s.style.position=t.ORGINAL_POSITION,n.style.display="none",t.ORGINAL_POSITION=null,t.props.onClose())})}})},function(e,t,s){"use strict";var n=s(9),i=s(10);e.exports={propTypes:{disabled:n.PropTypes.oneOfType([n.PropTypes.bool,n.PropTypes.oneOf(["disabled"])]),readOnly:n.PropTypes.oneOfType([n.PropTypes.bool,n.PropTypes.oneOf(["readOnly"])])},isDisabled:function(){return this.props.disabled===!0||"disabled"===this.props.disabled},isReadOnly:function(){return this.props.readOnly===!0||"readonly"===this.props.readOnly},notify:function(e,t){this.props[e]&&this.props[e].apply(null,[].concat(t))},_id:function(e){return this._id_||(this._id_=i.uniqueId("rw_")),(this.props.id||this._id_)+e +},_maybeHandle:function(e,t){return this.isDisabled()||!t&&this.isReadOnly()?i.noop:e}}},function(e,t,s){var n=s(9),i=s(26),r=s(37),o=(s(43),s(31),s(10));e.exports={propTypes:{data:n.PropTypes.array,value:n.PropTypes.any,delay:n.PropTypes.number,filter:n.PropTypes.string},search:function(e,t){var s=this,n=((this._searchTerm||"")+e).toLowerCase();clearTimeout(this._timer),this._searchTerm=n,this._timer=setTimeout(function(){s._searchTerm="",t(n)},this.props.delay)},findNextWordIndex:function(e,t){var s=i.startsWith,n=this;return o.findIndex(n._data(),function(i,o){return o!=t&&s(r._dataText.call(n,i).toLowerCase(),e.toLowerCase())})}}},function(e,t,s){{var n=s(9),i=s(26),r=s(37),o=s(31),a=s(43),p=(s(29).directions,s(10)),l=(a.provided(function(e){return!p.isEqual(e.value,this.props.value)}),a.provided(function(e){return e>=0})),u=p.without(p.keys(i),"filter");l(o("selectedIndex"))}e.exports={propTypes:{data:n.PropTypes.array,value:n.PropTypes.any,filter:n.PropTypes.oneOfType([n.PropTypes.func,n.PropTypes.oneOf(u.concat(!1))]),caseSensitive:n.PropTypes.bool,minLength:n.PropTypes.number},getDefaultProps:function(){return{caseSensitive:!1,minLength:1}},filterIndexOf:function(e,t){var s="function"==typeof this.props.filter?this.props.filter:i[this.props.filter||"eq"];return!t||!t.trim()||this.props.filter&&t.length<(this.props.minLength||1)?-1:(this.props.caseSensitive||(t=t.toLowerCase()),p.findIndex(e,function(e){var n=r._dataText.call(this,e);return this.props.caseSensitive||(n=n.toLowerCase()),s(n,t.toLowerCase())},this))},filter:function(e,t){var s="string"==typeof this.props.filter?i[this.props.filter]:this.props.filter;return!s||!t||!t.trim()||t.length<(this.props.minLength||1)?e:(this.props.caseSensitive||(t=t.toLowerCase()),p.filter(e,function(e){var n=r._dataText.call(this,e);return this.props.caseSensitive||(n=n.toLowerCase()),s(n,t.toLowerCase())},this))}}},function(e,t,s){var n=s(9),i=s(10);e.exports={propTypes:{valueField:n.PropTypes.string,textField:n.PropTypes.string},_dataValue:function(e){var t=this.props.valueField;return t&&e&&i.has(e,t)?e[t]:e},_dataText:function(e){var t=this.props.textField;return(t&&e&&i.has(e,t)?e[t]:e)+""},_dataIndexOf:function(e,t){return i.findIndex(e,i.partial(this._valueMatcher,t),this)},_valueMatcher:function(e,t){return i.isEqual(this._dataValue(e),this._dataValue(t))},_dataItem:function(e,t){var s,n=e[0],r=this.props.valueField;return i.has(t,r)||typeof n==typeof val?t:(s=this._dataIndexOf(e,this._dataValue(t)),-1!==s?e[s]:t)}}},function(e,t,s){var n=s(9);e.exports={propTypes:{isRtl:n.PropTypes.bool},contextTypes:{isRtl:n.PropTypes.bool},childContextTypes:{isRtl:n.PropTypes.bool},getChildContext:function(){return{isRtl:this.props.isRtl||this.context&&this.context.isRtl}},isRtl:function(){return!!(this.props.isRtl||this.context&&this.context.isRtl)}}},function(e,t,s){function n(e){return function(){return e.apply(this,arguments),this}}var i=s(9),r=(s(26),s(37),s(31)),o=s(43),a=(s(29).directions,s(10));e.exports=function(e){var t=e.charAt(0).toUpperCase()+e.substr(1),s=(o.provided(function(e){return!a.isEqual(e.value,this.props.value)}),o.provided(function(e){return e>=0})),p=s(r(e)),l={propTypes:{data:i.PropTypes.array,value:i.PropTypes.any}};return l["set"+t]=n(p),l["prev"+t]=function(){var t=(this._data(),this.state&&this.state[e]||0);return t-=1,0>t&&(t=0),t},l["next"+t]=function(){var t=this._data(),s=this.state&&this.state[e]||0;return s+=1,s>=t.length&&(s=t.length-1),s},l}},function(e,t,s){function n(e,t){var s;if(e===t)return!0;for(s in e)if(e.hasOwnProperty(s)&&(!t.hasOwnProperty(s)||e[s]!==t[s]))return!1;for(s in t)if(t.hasOwnProperty(s)&&!e.hasOwnProperty(s))return!1;return!0}s(9);e.exports={shouldComponentUpdate:function(e,t){return!n(this.props,e)||!n(this.state,t)}}},function(e,t,s){var n=s(9),i=(s(24),s(43),s(31)),r=s(42);e.exports=n.createClass({displayName:"NumberPickerInput",propTypes:{value:n.PropTypes.number,format:n.PropTypes.string,min:n.PropTypes.number,onChange:n.PropTypes.func.isRequired,onKeyDown:n.PropTypes.func},getDefaultProps:function(){return{value:null,format:"d",editing:!1}},getInitialState:function(){var e=this.props.editing?this.props.value:r.format(this.props.value,this.props.format);return{stringValue:e}},componentWillReceiveProps:function(e){var t=e.editing?e.value:r.format(e.value,e.format);isNaN(e.value)&&(t=""),this.current(t)},render:function(){var e=this.state.stringValue;return this.transferPropsTo(n.DOM.input({type:"text",className:"rw-input",onKeyDown:this.props.onKeyDown,onChange:this._change,onBlur:this._finish,"aria-disabled":this.props.disabled,"aria-readonly":this.props.readOnly,disabled:this.props.disabled,readOnly:this.props.readOnly,value:e}))},_change:function(e){var t=e.target.value,s=+e.target.value,n=0!==t&&!t,i=_.isFinite(this.props.min);return!i&&n?this.props.onChange(null):this.isValid(s)&&s!==this.props.value?this.props.onChange(s):void this.current(e.target.value)},_finish:function(){var e=+this.state.stringValue;!isNaN(e)&&e=this.props.min},current:i("stringValue")})},function(e){!function(){e.exports=this["window.Globalize"]}()},function(e,t,s){"use strict";function n(e,t){return function(){var s=e.apply(this,arguments),n=t.apply(this,arguments);if(null!=s||null!=n)return null==s?n:null==n?s:i.extend(s,n)}}var i=s(10),r=e.exports={chain:function(e,t){return function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)}},merge:function(e,t){if(typeof e!=typeof t)throw new TypeError;return i.isArray(e)?e.splice(e.length,0,t):i.isFunction(e)?e=n(e,t):i.extend(e,t),e},before:i.curry(function(e,t){return function(){return e.apply(this,arguments),t.apply(this,arguments)}}),after:i.curry(function(e,t){return function(){var s=t.apply(this,arguments);return e.apply(this,arguments),s}}),around:i.curry(function(e,t){return function(){var s=[t].concat(i.toArray(arguments));return e.apply(this,s)}}),provided:function(e){return r.around(function(t){var s=i.rest(arguments);return e.apply(this,s)?t.apply(this,s):void 0})}}},function(e,t,s){var n=s(9);e.exports={contextTypes:{isRtl:n.PropTypes.bool},isRtl:function(){return!!this.context.isRtl}}},function(e){"use strict";e.exports=function(e,t){var s=0,n=e?e.length:0,i=[];for(t=Math.max(+t||1,1);n>s;)i.push(e.slice(s,s+=t));return i}},function(e,t,s){var n=s(9),i=s(32),r=s(29).directions;e.exports=function(e,t){return{propTypes:{value:n.PropTypes.instanceOf(Date),min:n.PropTypes.instanceOf(Date),max:n.PropTypes.instanceOf(Date)},getInitialState:function(){return{focusedDate:this.props.value}},componentWillReceiveProps:function(e){var s=this.state.focusedDate;//!dates.inRange(focused, nextProps.min, nextProps.max) +i.eq(e.value,s,t)||this.setState({focusedDate:e.value})},_keyDown:function(s){var n=s.key,o=(s.altKey,this.state.focusedDate),a=o;if("Enter"===n)return this.props.onChange(a);if("ArrowLeft"===n?a=this.move(a,r.LEFT):"ArrowRight"===n?a=this.move(a,r.RIGHT):"ArrowUp"===n?a=this.move(a,r.UP):"ArrowDown"===n&&(a=this.move(a,r.DOWN)),!i.eq(o,a,t)){if(s.preventDefault(),i.gt(a,this.props.value,e))return this.props.onMoveRight(a);if(i.lt(a,this.props.value,e))return this.props.onMoveLeft(a);this.setState({focusedDate:a})}}}}},function(e,t,s){"use strict";var n=s(9),i=s(10),r=e.exports={version:function(){return i.map(n.version.split("."),parseFloat)},propType:function(e){return function(t,s,n,i){var o=r.version(),a=e.call(this,t,s,n,i);return a&&a!==!0?0===o[0]&&o[1]<11?console.warn(a instanceof Error?a.message:a):a:void 0}}}},function(e){function t(e,t){var s=f.month(e),n=s+t;return e=f.month(e,n),0>n&&(n=12+t),f.month(e)!==n%12&&(e=f.date(e,0)),e}function s(e){return e=e.charAt(0).toUpperCase()+e.substr(1),function(t,s){return void 0===s?t["get"+e]():(t=new Date(t),t["set"+e](s),t)}}function n(e){return function(t,s,n){return e(+f.startOf(t,n),+f.startOf(s,n))}}var i="milliseconds",r="seconds",o="minutes",a="hours",p="day",l="week",u="month",d="year",h="decade",c="century",f=e.exports={startOfWeek:function(){return 0},add:function(e,s,n){if(e=new Date(e),n===i)return f.milliseconds(e,f.milliseconds(e)+s);if(n===r)return f.seconds(e,f.seconds(e)+s);if(n===o)return f.minutes(e,f.minutes(e)+s);if(n===a)return f.hours(e,f.hours(e)+s);if(n===p)return f.date(e,f.date(e)+s);if(n===l)return f.date(e,f.date(e)+7*s);if(n===u)return t(e,s);if(n===d)return f.year(e,f.year(e)+s);if(n===h)return f.year(e,f.year(e)+10*s);if(n===c)return f.year(e,f.year(e)+100*s);throw new TypeError('Invalid units: "'+n+'"')},subtract:function(e,t,s){return f.add(e,-t,s)},startOf:function(e,t){switch(e=new Date(e),t){case"century":case"decade":case"year":e=f.month(e,0);case"month":e=f.date(e,1);case"week":case"day":e=f.hours(e,0);case"hours":e=f.minutes(e,0);case"minutes":e=f.seconds(e,0);case"seconds":e=f.milliseconds(e,0)}return t===h&&(e=f.subtract(e,f.year(e)%10,"year")),t===c&&(e=f.subtract(e,f.year(e)%100,"year")),t===l&&(e=f.weekday(e,0)),e},endOf:function(e,t){return e=new Date(e),e=f.startOf(e,t),e=f.add(e,1,t),e=f.subtract(e,1,i)},eq:n(function(e,t){return e===t}),gt:n(function(e,t){return e>t}),gte:n(function(e,t){return e>=t}),lt:n(function(e,t){return t>e}),lte:n(function(e,t){return t>=e}),min:function(){var e=Array.prototype.slice.call(arguments);return new Date(Math.min.apply(Math,e))},max:function(){var e=Array.prototype.slice.call(arguments);return new Date(Math.max.apply(Math,e))},inRange:function(e,t,s,n){return n=n||"day",f.gte(e,t,n)&&f.lte(e,s,n)},milliseconds:s("Milliseconds"),seconds:s("Seconds"),minutes:s("Minutes"),hours:s("Hours"),day:s("Day"),date:s("Date"),month:s("Month"),year:s("FullYear"),decade:function(e,t){return void 0==t?f.year(f.startOf(e,h)):f.add(e,t+10,d)},century:function(e,t){return void 0==t?f.year(f.startOf(e,c)):f.add(e,t+100,d)},weekday:function(e,t){var s=(f.day(e)+7-f.startOfWeek())%7;return void 0==t?s:f.add(e,t-s,p)}}}]); \ No newline at end of file diff --git a/docs/docs.js b/docs/docs.js new file mode 100644 index 000000000..9a9e5d161 --- /dev/null +++ b/docs/docs.js @@ -0,0 +1,18 @@ +/*! v"1.3.0" | (c) 2014 Jason Quense | https://github.com/theporchrat/react-widgets/blob/master/License.txt */ +!function(e){function t(a){if(n[a])return n[a].exports;var s=n[a]={exports:{},id:a,loaded:!1};return e[a].call(s.exports,s,s.exports,t),s.loaded=!0,s.exports}var n={};return t.m=e,t.c=n,t.p="docs/",t(0)}([function(e,t,n){var a=n(1),s=n(11),i=n(3),r=n(12),o=(n(13),n(14)),l=(n(2),n(4)),p=n(5),u=n(6),d=n(7),c=n(8),h=n(9),m=n(10);n(15);var f=["#intro","#dropdown-list","#combobox","#number-picker","#select-list","#calendar","#date-picker"],y=a.createClass({displayName:"DocPage",getInitialState:function(){return{sideHref:"#intro"}},componentDidMount:function(){location.hash&&this.setState({sideHref:location.hash.split("/")[0]})},render:function(){var e=this.state.sideHref;return a.DOM.div({style:{marginTop:72}},i({page:this.props.page}),a.DOM.div({className:"container"},a.DOM.aside({className:"col-sm-3"},a.DOM.div({className:"nav-aside"},r({className:"side-nav",onSelect:this.handleNavItemSelect},o({key:0,href:"#intro",active:"#intro"===e},"Getting Started"),o({key:1,href:"#dropdown-list",active:"#dropdown-list"===e},"Dropdown List"),o({key:2,href:"#combobox",active:"#combobox"===e},"Combobox"),o({key:6,href:"#number-picker",active:"#number-picker"===e},"Number Picker"),o({key:3,href:"#select-list",active:"#select-list"===e},"Select"),o({key:4,href:"#calendar",active:"#calendar"===e},"Calendar"),o({key:5,href:"#date-picker",active:"#date-picker"===e},"Date "," & "," Time Picker")))),a.DOM.article({className:"col-sm-9 tab-content"},l({className:s({"tab-pane":!0,active:"#intro"===e})}),p({className:s({"tab-pane":!0,active:"#dropdown-list"===e})}),u({className:s({"tab-pane":!0,active:"#combobox"===e})}),m({className:s({"tab-pane":!0,active:"#number-picker"===e})}),d({className:s({"tab-pane":!0,active:"#select-list"===e})}),c({className:s({"tab-pane":!0,active:"#calendar"===e})}),h({className:s({"tab-pane":!0,active:"#date-picker"===e})}),a.DOM.div({className:"clearfix",style:{marginTop:20}},f.indexOf(e)>0&&a.DOM.button({type:"button",className:"btn btn-link pull-left",onClick:this.prev},"« prev"),f.indexOf(e)")," tag replacement that offers additional functionality. the Dropdown list"),l(null),i({code:"render: function(){\n var DropdownList = require('react-widgets').DropdownList\n , list = [\n { label: 'orange', id: 1 },\n { label: 'blue', id: 2 },\n { label: 'red', id: 3 },\n ]\n return (\n \n )\n},\n\n_change: function(value){\n this.setState({\n value: value\n })\n}\n"}),a.DOM.h2(null,"Props"),a.DOM.h3({className:"prop-header",id:p+"value"},"value ",a.DOM.small(null,"Any"),a.DOM.strong(null,"controllable (onChange, defaultValue)")),a.DOM.p(null,"The current value of the DropdownList. This can be an object (such as a member of the ",a.DOM.code(null,"data")," array) or a primitive value, hinted to by the ",a.DOM.code(null,"valueField"),". The widget value does not need to be in the ",a.DOM.code(null,"data")," array; widgets can have values that are not in their list."),a.DOM.h3({className:"prop-header",id:p+"onChange"},"onChange ",a.DOM.small(null,"Function(Any value)")),a.DOM.p(null,"Change event Handler that is called when the value is changed."),a.DOM.h3({className:"prop-header",id:p+"data"},"data ",a.DOM.small(null,"Array - mixed")),a.DOM.p(null,"provide an array of possible values for the DropdownList. If an array of ",a.DOM.code(null,"objects")," is provided you should use the ",a.DOM.code(null,"valueField")," and ",a.DOM.code(null,"textField")," props, to specify which object properties comprise the value field (such as an id) and the field used to label the item."),a.DOM.h3({className:"prop-header",id:p+"valueField"},"valueField ",a.DOM.small(null,"String")),a.DOM.p(null,"A property name of a uniquely identifying field in the ",a.DOM.code(null,"data")," array. If no valueField is provided, the widget will use strict equality checks to locate the data item, if it exists."),a.DOM.h3({className:"prop-header",id:p+"textField"},"textField ",a.DOM.small(null,"String")),a.DOM.p(null,"This prop determines which data item field to display in the combobox and selected item. This prop is unnecessary when an ",a.DOM.code(null,"itemComponent")," and ",a.DOM.code(null,"valueComponent")," are provided."),a.DOM.h3({className:"prop-header",id:p+"valueComponent"},"valueComponent ",a.DOM.small(null,"Component")),a.DOM.p(null,"This component is used to render the selected value of the combobox. The default component renders the text of the selected item (specified by ",a.DOM.code(null,"textfield"),")"),a.DOM.h3({className:"prop-header",id:p+"itemComponent"},"itemComponent ",a.DOM.small(null,"Component")),a.DOM.p(null,"This component is used to render each possible item in the dropdownlist. The default component renders the text of the selected item (specified by ",a.DOM.code(null,"textfield"),")"),a.DOM.h3({className:"prop-header",id:p+"open"},"open ",a.DOM.small(null,"Boolean",s(null,"false")),a.DOM.strong(null,"controllable (onToggle, defaultOpen)")),a.DOM.p(null,"Whether or not the ",u," is open. When unset (",a.DOM.code(null,"undefined"),") the ",u," will handle the opening and closing internally. The ",a.DOM.code(null,"defaultOpen")," prop can be used to ","set"," an initialization value for uncontrolled widgets."),a.DOM.h3({className:"prop-header",id:p+"onToggle"},"onToggle ",a.DOM.small(null,"Function(Boolean isOpen)")),a.DOM.p(null,"Called when the ",u," is about to open or close. ",a.DOM.code(null,"onToggle")," should be used when the ",a.DOM.code(null,"open")," prop is ","set"," otherwise the widget will never open or close."),a.DOM.h3({className:"prop-header",id:p+"busy"},"busy ",a.DOM.small(null,"Boolean")),a.DOM.p(null,"mark whether the widget is in a busy or loading state. If ",a.DOM.code(null,"true")," the widget will display a spinner gif, useful when loading data via an ajax call."),a.DOM.h3({className:"prop-header",id:p+"duration"},"duration ",a.DOM.small(null,"Number",s(null,"250"))),a.DOM.p(null,"The speed, in milliseconds, of the dropdown animation."),a.DOM.h3({className:"prop-header",id:p+"isRtl"},"isRtl ",a.DOM.small(null,"Boolean",s(null,"false"))),a.DOM.p(null,"mark whether the widget should render right-to-left. This property can also be implicitly passed to the widget through a ",a.DOM.code(null,"childContext")," prop (",a.DOM.code(null,"isRtl"),") this allows higher level application components to specify the direction."),a.DOM.h3({className:"prop-header",id:p+"messages"},"messages ",a.DOM.small(null,"Object")),a.DOM.p(null,"Object hash containing display text and/or text for screen readers. Use the ",a.DOM.code(null,"messages")," object to localize widget text and increase accessibility."),a.DOM.h3(null,"messages.open ",a.DOM.small(null,"String",s(null,'"Open Dropdown"'))),a.DOM.p(null,"Dropdown button text for screen readers"),a.DOM.h2({id:p+"keyboard"},"Keyboard Navigation"),a.DOM.ul({className:"list-unstyled keyboard-list"},a.DOM.li(null,a.DOM.kbd(null,"alt + down arrow")," open dropdown"),a.DOM.li(null,a.DOM.kbd(null,"alt + up arrow")," close dropdown"),a.DOM.li(null,a.DOM.kbd(null,"down arrow")," move focus to next item"),a.DOM.li(null,a.DOM.kbd(null,"up arrow")," move focus to previous item"),a.DOM.li(null,a.DOM.kbd(null,"home")," move focus to first item"),a.DOM.li(null,a.DOM.kbd(null,"end")," move focus to last item"),a.DOM.li(null,a.DOM.kbd(null,"enter")," select focused item"),a.DOM.li(null,a.DOM.kbd(null,"any key")," search list for item starting with key"))))}});e.exports=d},function(e,t,n){var a=n(1),s=n(21),i=n(22),r=n(17),o=n(18),l=n(28),p="combobox/",u="Combobox",d=a.createClass({displayName:"ComboBox",render:function(){return this.transferPropsTo(a.DOM.section(null,a.DOM.h1({className:"page-header"},"Combobox",a.DOM.span({className:"pull-right"},o({title:"props",bsStyle:"link",pullRight:!0},r({href:"#"+p+"value"},"value"),r({href:"#"+p+"onChange"},"onChange"),r({href:"#"+p+"data"},"data"),r({divider:!0}),r({href:"#"+p+"valueField"},"valueField"),r({href:"#"+p+"textField"},"textField"),r({href:"#"+p+"itemComponent"},"itemComponent"),r({href:"#"+p+"suggest"},"suggest"),r({href:"#"+p+"filter"},"filter"),r({href:"#"+p+"open"},"open"),r({href:"#"+p+"onToggle"},"onToggle"),r({href:"#"+p+"busy"},"busy"),r({href:"#"+p+"duration"},"duration"),r({href:"#"+p+"isRtl"},"isRtl"),r({href:"#"+p+"messages"},"messages"),r({divider:!0}),r({href:"#"+p+"keyboard"},"Keyboard Navigation")))),a.DOM.p(null,"Select an item from the list, or input a custom value. The combobox can also make suggestions as you type"),l(null),i({code:"render: function(){\n //... \n\n return (\n \n\n \n\n \n )\n}"}),a.DOM.h2(null,"Props"),a.DOM.h3({className:"prop-header",id:p+"value"},"value ",a.DOM.small(null,"Any"),a.DOM.strong(null,"controllable (onChange, defaultValue)")),a.DOM.p(null,"The current value of the Combobox. This can be an object (such as a member of the ",a.DOM.code(null,"data")," array) or a primitive value, hinted to by the ",a.DOM.code(null,"valueField"),". The widget value does not need to be in the ",a.DOM.code(null,"data"),", widgets can have values that are not in their list."),a.DOM.h3({className:"prop-header",id:p+"onChange"},"onChange ",a.DOM.small(null,"Function(Any value)")),a.DOM.p(null,"Called when the value is changed. If the value is on of the ",a.DOM.code(null,"data")," members that item will be returned. In the case of a value not being found in the ",a.DOM.code(null,"data")," array the string value of the combobox will be returned."),a.DOM.h3({className:"prop-header",id:p+"data"},"data ",a.DOM.small(null,"Array")),a.DOM.p(null,"An array of possible values for the combobox. If an array of ",a.DOM.code(null,"objects")," is provided you should use the ",a.DOM.code(null,"valueField")," and ",a.DOM.code(null,"textField")," props, to specify which object properties comprise the value field (such as an id) and the field used to label the item."),a.DOM.h3({className:"prop-header",id:p+"valueField"},"valueField ",a.DOM.small(null,"String")),a.DOM.p(null,"A property name of a uniquely identifying field in the ",a.DOM.code(null,"data")," array. If no valueField is provided, the widget will use strict equality checks to locate the data item, if it exists."),a.DOM.h3({className:"prop-header",id:p+"textField"},"textField ",a.DOM.small(null,"String")),a.DOM.p(null,"This prop determines which data item field to display in the dropdown list and the text value of combobox. This prop is unnecessary when an ",a.DOM.code(null,"itemComponent")," is provided."),a.DOM.h3({className:"prop-header",id:p+"itemComponent"},"itemComponent ",a.DOM.small(null,"Component")),a.DOM.p(null,"This component is used to render each possible item in the dropdownlist. The default component renders the text of the selected item (specified by ",a.DOM.code(null,"textfield"),")"),a.DOM.h3({className:"prop-header",id:p+"suggest"},"suggest ",a.DOM.small(null,"Boolean",s(null,"false"))),a.DOM.p(null,"When ",a.DOM.code(null,"true"),' the Combobox will suggest, or fill in, values as you type. The suggestions are always "startsWith", meaning it will search from the start of the ',a.DOM.code(null,"textField")," property"),a.DOM.h3({className:"prop-header",id:p+"filter"},"filter ",a.DOM.small(null,"[Boolean, String, Function(String item)]",s(null,"false"))),a.DOM.p(null,"Specify a filtering method used to reduce the items in the dropdown as you type. It can be used in conjuction with the ",a.DOM.code(null,"suggest")," prop or instead of it. There are a few prebuilt filtering methods that can be specified by passing the ",a.DOM.code(null,"String")," name. You can explicitly opt out of filtering by setting filter to ",a.DOM.code(null,"false")),a.DOM.p(null,"To handle custom filtering techniques provide a ",a.DOM.code(null,"function")," that returns ",a.DOM.code(null,"true")," or ",a.DOM.code(null,"false")," for each passed in item (just like the ",a.DOM.a({href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter"},"array.filter")," builtin)"),a.DOM.p(null,"Acceptable values for filter are: ",a.DOM.code(null,"false")," ",a.DOM.code(null,'"startsWith"')," ",a.DOM.code(null,'"endsWith"')," ",a.DOM.code(null,'"contains"')," ",a.DOM.code(null,"function(String item)")),a.DOM.h3({className:"prop-header",id:p+"open"},"open ",a.DOM.small(null,"Boolean",s(null,"false")),a.DOM.strong(null,"controllable (onToggle, defaultOpen)")),a.DOM.p(null,"Whether or not the ",u," is open. When unset (",a.DOM.code(null,"undefined"),") the ",u," will handle the opening and closing internally. The ",a.DOM.code(null,"defaultOpen")," prop can be used to ","set"," an initialization value for uncontrolled widgets."),a.DOM.h3({className:"prop-header",id:p+"onToggle"},"onToggle ",a.DOM.small(null,"Function(Boolean isOpen)")),a.DOM.p(null,"Called fires when the ",u," is about to open or close. ",a.DOM.code(null,"onToggle")," should be used when the ",a.DOM.code(null,"open")," prop is ","set"," otherwise the widget will never open or close."),a.DOM.h3({className:"prop-header",id:p+"busy"},"busy ",a.DOM.small(null,"Boolean",s(null,"false"))),a.DOM.p(null,"Mark whether the widget is in a busy or loading state. If ",a.DOM.code(null,"true")," the widget will display a spinner gif, useful when loading data via an ajax call."),a.DOM.h3({className:"prop-header",id:p+"duration"},"duration ",a.DOM.small(null,"Number",s(null,"250"))),a.DOM.p(null,"The speed, in milliseconds, of the dropdown animation."),a.DOM.h3({className:"prop-header",id:p+"isRtl"},"isRtl ",a.DOM.small(null,"Boolean",s(null,"false"))),a.DOM.p(null,"mark whether the widget should render right-to-left. This property can also be implicitly passed to the widget through a ",a.DOM.code(null,"childContext")," prop (",a.DOM.code(null,"isRtl"),") this allows higher level application components to specify the direction."),a.DOM.h3({className:"prop-header",id:p+"messages"},"messages ",a.DOM.small(null,"Object")),a.DOM.p(null,"Object hash containing display text and/or text for screen readers. Use the ",a.DOM.code(null,"messages")," object to localize widget text and increase accessibility."),a.DOM.h3(null,"messages.open ",a.DOM.small(null,"String",s(null,'"Open Combobox"'))),a.DOM.p(null,"Combobox button text for screen readers"),a.DOM.h3(null,"messages.emptyList ",a.DOM.small(null,"String",s(null,'"There are no items in this list"'))),a.DOM.p(null,"text to display when the ",a.DOM.code(null,"data")," prop array is empty"),a.DOM.h3(null,"messages.emptyFilter ",a.DOM.small(null,"String",s(null,'"The filter returned no results"'))),a.DOM.p(null,"text to display when the the current filter does not return any results"),a.DOM.h2({id:p+"keyboard"},"Keyboard Navigation"),a.DOM.ul({className:"list-unstyled keyboard-list"},a.DOM.li(null,a.DOM.kbd(null,"alt + down arrow")," open dropdown"),a.DOM.li(null,a.DOM.kbd(null,"alt + up arrow")," close dropdown"),a.DOM.li(null,a.DOM.kbd(null,"down arrow")," move focus to next item"),a.DOM.li(null,a.DOM.kbd(null,"up arrow")," move focus to previous item"),a.DOM.li(null,a.DOM.kbd(null,"home")," move focus to first item"),a.DOM.li(null,a.DOM.kbd(null,"end")," move focus to last item"),a.DOM.li(null,a.DOM.kbd(null,"enter")," select focused item"),a.DOM.li(null,a.DOM.kbd(null,"any key")," search list for item starting with key"))))}});e.exports=d},function(e,t,n){var a=n(1),s=n(21),i=n(22),r=n(18),o=n(17),l=n(26),p="select-list/",u="Select",d=a.createClass({displayName:"Select",render:function(){return this.transferPropsTo(a.DOM.section(null,a.DOM.h1({className:"page-header"},"Select",a.DOM.span({className:"pull-right"},r({title:"props",bsStyle:"link",pullRight:!0},o({href:"#"+p+"value"},"value"),o({href:"#"+p+"onChange"},"onChange"),o({href:"#"+p+"data"},"data"),o({divider:!0}),o({href:"#"+p+"valueField"},"valueField"),o({href:"#"+p+"textField"},"textField"),o({href:"#"+p+"tagComponent"},"tagComponent"),o({href:"#"+p+"itemComponent"},"itemComponent"),o({href:"#"+p+"placeholder"},"placeholder"),o({href:"#"+p+"open"},"open"),o({href:"#"+p+"onToggle"},"onToggle"),o({href:"#"+p+"busy"},"busy"),o({href:"#"+p+"duration"},"duration"),o({href:"#"+p+"isRtl"},"isRtl"),o({href:"#"+p+"messages"},"messages"),o({divider:!0}),o({href:"#"+p+"keyboard"},"Keyboard Navigation")))),a.DOM.p(null,"Multiple selection widget."),l(null),i({code:"render: function(){\n var Select = require('react-widgets').Select\n //... \n\n return (\n