From 451bad1c247ee7351cf60841f9c5865d274be858 Mon Sep 17 00:00:00 2001 From: theporchrat Date: Thu, 9 Oct 2014 16:59:58 -0400 Subject: [PATCH] final little tweaks for 1.3.0 --- browser/react-widgets.js | 8 ++++---- docs/components/docs.jsx | 6 +++--- docs/components/examples/combobox.jsx | 12 +++++++----- docs/components/examples/select.jsx | 9 +-------- docs/docs.css | 6 ++++++ docs/docs.js | 17 +++++++++++++++++ lib/dropdowns/combobox.js | 9 +++------ lib/mixins/DataFilterMixin.js | 10 +++++----- lib/mixins/DataHelpersMixin.js | 4 ++-- src/dropdowns/combobox.jsx | 9 +++------ src/mixins/DataFilterMixin.js | 10 +++++----- 11 files changed, 56 insertions(+), 44 deletions(-) create mode 100644 docs/docs.js diff --git a/browser/react-widgets.js b/browser/react-widgets.js index 7d34b2d57..a54502413 100644 --- a/browser/react-widgets.js +++ b/browser/react-widgets.js @@ -1,5 +1,5 @@ -/*! v"1.2.0" | (c) 2014 Jason Quense | https://github.com/theporchrat/react-widgets/blob/master/License.txt */ -this.ReactWidgets=function(e){function t(i){if(s[i])return s[i].exports;var n=s[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,t),n.loaded=!0,n.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 i=s(9),n=s(10),r=s(25),o=s(26),a=s(27),p=s(28).mergeIntoProps,u=(s(29).directions,s(11),s(34)),d=s(12),l=s(30),h=(s(13),a.provided(function(e){return!n.isEqual(e.value,this.props.value)})),c=a.provided(function(e){return!n.isEqual(e,this.props.value)}),f={value:i.PropTypes.any,onChange:i.PropTypes.func,data:i.PropTypes.array,valueField:i.PropTypes.string,textField:i.PropTypes.string,valueComponent:i.PropTypes.component,itemComponent:i.PropTypes.component,busy:i.PropTypes.bool,delay:i.PropTypes.number,duration:i.PropTypes.number,disabled:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(["disabled"])]),readOnly:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(["readOnly"])]),messages:i.PropTypes.shape({open:i.PropTypes.string})};e.exports=i.createClass({displayName:"DropdownList",mixins:[s(35),s(36),s(37),s(38),s(39)("focusedIndex"),s(39)("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=n.keys(f),t=this._dataItem(this._data(),this.props.value),s=this._id("_option");return p(n.omit(this.props,e),i.DOM.div({ref:"element",onKeyDown:this._maybeHandle(this._keyDown),onClick:this._maybeHandle(this.toggle),onFocus:this._maybeHandle(n.partial(this._focus,!0),!0),onBlur:n.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()})},i.DOM.span({className:"rw-dropdownlist-picker rw-select rw-btn"},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))),i.DOM.div({className:"rw-input"},this.props.valueComponent?this.props.valueComponent({item:t}):this._dataText(t)),u({open:this.state.open,onRequestClose:this.close,duration:this.props.duration},i.DOM.div(null,d({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=l.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,i=e.key,n=e.altKey,r=this.state.open;"End"===i?(r?this.setFocusedIndex(this._data().length-1):t(this._data().length-1),e.preventDefault()):"Home"===i?(r?this.setFocusedIndex(0):t(0),e.preventDefault()):"Escape"===i&&r?this.close():"Enter"===i&&r?t(this.state.focusedIndex):"ArrowDown"===i?(n?this.open():r?this.setFocusedIndex(this.nextFocusedIndex()):t(this.nextSelectedIndex()),e.preventDefault()):"ArrowUp"===i?(n?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]),i=o(t).bind(this);-1!==s&&i(s)},_data:function(){return this.props.data},_maybeHandle:function(e,t){return this.props.disabled||!t&&this.props.readOnly?void 0:e},open:function(){this.setState({open:!0})},close:function(){this.setState({open:!1})},toggle:function(){this.state.open?this.close():this.open()},_id:function(e){return(y||(y=this.props.id||n.uniqueId("rw_")))+e}});var y=""},function(e,t,s){function i(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 n=s(9),r=s(25),o=s(10),a=(s(32),s(33)),p=s(28).mergeIntoProps,u=(s(29).directions,s(24)),d=s(34),l=s(12),h=s(30),c=s(13),f={value:n.PropTypes.any,onChange:n.PropTypes.func,itemComponent:n.PropTypes.func,data:n.PropTypes.array,valueField:n.PropTypes.string,textField:n.PropTypes.string,disabled:n.PropTypes.oneOfType([n.PropTypes.bool,n.PropTypes.oneOf(["disabled"])]),readOnly:n.PropTypes.oneOfType([n.PropTypes.bool,n.PropTypes.oneOf(["readOnly"])]),suggest:n.PropTypes.bool,busy:n.PropTypes.bool,duration:n.PropTypes.number,placeholder:n.PropTypes.string,messages:n.PropTypes.shape({open:n.PropTypes.string,emptyList:n.PropTypes.string,emptyFilter:n.PropTypes.string})};e.exports=n.createClass({displayName:"ComboBox",mixins:[s(37),s(36),s(40),s(38),s(39)("focusedIndex"),s(39)("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(),n=!i(t,this.state),r=!i(e,this.props);return s||n||r},componentWillReceiveProps:function(e){var t=this._dataIndexOf(e.data,e.value),s=-1==t?e.value:e.data[t],i=this.refs.input.isSuggesting(),n=this.process(e.data,e.value,(-1===t||i)&&this._dataText(s)),r=this._dataIndexOf(n,e.value),o=this.filterIndexOf(n,this._dataText(s));this._searchTerm="",this.setState({processedData:n,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"),i=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)),n.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)},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))),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.state.open?i: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}),d({open:this.state.open,onRequestClose:this.close,duration:this.props.duration},n.DOM.div(null,l({ref:"list",id:s,optID:i,"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,i=this,n=!!this.props.suggest,r=e.target.value;t=this._deleting||!n?r:this.suggest(this._data(),r),t=t||r,s=o.find(i.props.data,function(e){return i._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.value,!1):(s.refs.input.accept(!0),void s.change(s._data()[e],!1))}var s=this,i=e.key,n=e.altKey,r=(String.fromCharCode(e.keyCode),this.state.selectedIndex,this.state.focusedIndex),o=this.state.open;"End"===i?t(this._data().length-1):"Home"===i?t(0):"Escape"===i&&o?this.close():"Enter"===i&&o?(t(r),this.close()):"ArrowDown"===i?n?this.open():o?this.setFocusedIndex(this.nextFocusedIndex()):t(this.nextSelectedIndex()):"ArrowUp"===i&&(n?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 n(this._dataText(e).toLowerCase(),i.toLowerCase())}var i=this._dataText(t),n=a.startsWith,r="string"==typeof t?o.find(e,s,this):t;return!r||this.state&&this.state.deleting?"":this._dataText(r)},_maybeHandle:function(e,t){return this.props.disabled||!t&&this.props.readOnly?void 0:e},_data:function(){return this.state.processedData},_id:function(e){return this._id_||(this._id_=o.uniqueId("rw_")),(this.props.id||this._id_)+e},process:function(e,t,s){return this.props.filter&&s&&(e=this.filter(e,s)),e}})},function(e,t,s){var i=s(9),n=s(14),r=s(15),o=s(16),a=s(17),p=s(18),u=s(25),d=s(26),l=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},_={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 w=["month","year","decade","century"];e.exports=i.createClass({displayName:"Calendar",mixins:[s(35),s(38)],propTypes:{onChange:i.PropTypes.func.isRequired,value:i.PropTypes.instanceOf(Date),min:i.PropTypes.instanceOf(Date),max:i.PropTypes.instanceOf(Date),initialView:i.PropTypes.oneOf(w),finalView:i.PropTypes.oneOf(w),disabled:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(["disabled"])]),readOnly:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(["readOnly"])]),messages:i.PropTypes.shape({moveBack:i.PropTypes.string,moveForward:i.PropTypes.string}),maintainFocus:i.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=w.indexOf(e.initialView),s=w.indexOf(e.finalView),i=w.indexOf(this.state.view),n=this.state.view,r=this.inRangeValue(new Date(e.value));t>i?this.setState({view:n=e.initialView}):i>s&&this.setState({view:n=e.finalView}),h.eq(r,this.props.value,VIEW_UNIT[n])||this.setState({currentDate:r})},render:function(){function e(){this._focus(!0,"stop")}var t=_[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"),i.DOM.div({className:u({"rw-calendar":!0,"rw-widget":!0,"rw-state-disabled":this.props.disabled,"rw-state-readonly":this.props.readOnly,"rw-rtl":this.isRtl()})},n({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))}),l({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),i=this.state.view,n=e===m||e===v?"right":"left";t||(t=f.contains([m,y],e)?this.nextDate(e):this.state.currentDate),e===g&&(i=s[i]||i),e===v&&(i=NEXT_VIEW[i]||i),this.isValidView(i)&&h.inRange(t,this.props.min,this.props.max,i)&&(this._focus(!0,"nav"),this.setState({currentDate:t,slideDirection:n,view:i}))},_focus:function(e){d("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,i="month"===s?s:"year",n=T[s]||1;return h[t](this.state.currentDate,1*n,i)},_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},_maybeHandle:function(e,t){return this.props.disabled||!t&&this.props.readOnly?f.noop:e},_id:function(e){return this._id_||(this._id_=f.uniqueId("rw_")),(this.props.id||this._id_)+e},inRangeValue:function(e){return null==e?e:h.max(h.min(e,this.props.max),this.props.min)},isValidView:function(e){var t=w.indexOf(this.props.initialView),s=w.indexOf(this.props.finalView),i=w.indexOf(e);return i>=t&&s>=i}})},function(e,t,s){function i(e,t){var s="";return e instanceof Date&&!isNaN(e.getTime())&&(s=p.format(e,t)),s}function n(e,t){var s;e=[].concat(e);for(var i=0;i=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,i=!!this.state.searchTerm,n=this.state.open;"ArrowDown"===t?n?this.setFocusedIndex(this.nextFocusedIndex()):this.open():"ArrowUp"===t?s?this.close():n&&this.setFocusedIndex(this.prevFocusedIndex()):"End"===t?n?this.setFocusedIndex(this._data().length-1):this.refs.tagList.last():"Home"===t?n?this.setFocusedIndex(0):this.refs.tagList.first():n&&"Enter"===t?this._onSelect(this._data()[this.state.focusedIndex]):"Escape"===t?n?this.close():this.refs.tagList.clear():i||"ArrowLeft"!==t?i||"ArrowRight"!==t?i||"Delete"!==t?i||"Backspace"!==t||this.refs.tagList.removeNext():this.refs.tagList.removeCurrent():this.refs.tagList.next():this.refs.tagList.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 i=r.reject(e,function(e){return r.any(t,r.partial(this._valueMatcher,e),this)},this);return s&&(i=this.filter(i,s)),i},_placeholder:function(){return(this.props.value||[]).length?"":this.props.placeholder||""},_maybeHandle:function(e,t){return this.props.disabled===!0||!t&&this.props.readOnly===!0?void 0:e},_id:function(e){return this._id_||(this._id_=r.uniqueId("rw_")),(this.props.id||this._id_)+e}})},function(e,t,s){"use strict";var i=s(9),n=s(28).cloneWithProps,r=s(30),o=s(10);e.exports=i.createClass({displayName:"ReplaceTransitionGroup",propTypes:{component:i.PropTypes.func,childFactory:i.PropTypes.func,onAnimating:i.PropTypes.func,onAnimate:i.PropTypes.func},getDefaultProps:function(){return{component:i.DOM.span,childFactory:function(e){return e},onAnimating:o.noop,onAnimate:o.noop}},getInitialState:function(){return{children:i.Children.map(this.props.children,function(e){return e})}},componentWillReceiveProps:function(e){var t=i.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 i=s&&o.has(s,t),n=!i&&!this.currentlyTransitioningKeys[t]; -return n&&(this.next=t),n},this),o.any(s,function(e,s){var i=t&&o.has(t,s),n=!i&&!this.currentlyTransitioningKeys[s];return n&&(this.current=s),n},this)},componentWillMount:function(){this.currentlyTransitioningKeys={},this.current=null,this.next=null},componentDidUpdate:function(){var e,t,s=this.current,i=this.next,n=this.refs[s||i],o=this.getDOMNode(),a=n&&n.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,i&&this.performEnter(i),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=i.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=i.Children.map(this.props.children,function(e){return e});if(s&&s.hasOwnProperty(e))this.performEnter(e);else{var n=o.extend({},this.state.children);delete n[e],this.setState({children:n})}this._tryFinish()},render:function(){var e={};for(var t in this.state.children){var s=this.state.children[t];s&&(e[t]=n(this.props.childFactory(s),{ref:t}))}return this.transferPropsTo(this.props.component(null,e))}})},function(e,t,s){var i=s(9),n=s(7),r=s(30),o=(s(10),i.createClass({displayName:"SlideChildGroup",propTypes:{direction:i.PropTypes.oneOf(["left","right"])},getDefaultProps:function(){return{duration:250}},componentWillEnter:function(e){var t=this,s=this.getDOMNode(),i=r.width(s),n=this.props.direction;i="left"===n?i:-i,this.ORGINAL_POSITION=s.style.position,r.css(s,{position:"absolute",left:i+"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(),i=r.width(s),n=this.props.direction;i="left"===n?-i:i,this.ORGINAL_POSITION=s.style.position,r.css(s,{position:"absolute",top:0,left:0}),r.animate(s,{left:i+"px"},t.props.duration,function(){r.css(s,{position:t.ORGINAL_POSITION,overflow:"hidden"}),t.ORGINAL_POSITION=null,e&&e()})},render:function(){return i.Children.only(this.props.children)}}));e.exports=i.createClass({displayName:"exports",propTypes:{direction:i.PropTypes.oneOf(["left","right"])},getDefaultProps:function(){return{direction:"left"}},_wrapChild:function(e){return o({direction:this.props.direction},e)},render:function(){return this.transferPropsTo(n({ref:"container",childFactory:this._wrapChild,style:{position:"relative",overflow:"hidden"},component:i.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 i=s(9),n=s(28).mergeIntoProps,r=s(10);e.exports=i.createClass({displayName:"exports",mixins:[s(37)],render:function(){var e=this.props.value;return n(r.omit(this.props,"value"),i.DOM.div(null,this._dataText(e)))}})},function(e,t,s){{var i=s(9),n=(s(33),s(27),s(28)),r=n.mergeIntoProps,o=(n.cloneWithProps,s(25)),a=s(10);i.createClass({displayName:"DefaultListItem",mixins:[s(37),s(42)],render:function(){var e=this.props.item;return this.transferPropsTo(i.DOM.li(null,e?this._dataText(e):""))}})}e.exports=i.createClass({displayName:"List",mixins:[s(37)],propTypes:{data:i.PropTypes.array,onSelect:i.PropTypes.func,listItem:i.PropTypes.component,selectedIndex:i.PropTypes.number,focusedIndex:i.PropTypes.number,valueField:i.PropTypes.string,textField:i.PropTypes.string,optID:i.PropTypes.string,messages:i.PropTypes.shape({emptyList:i.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=i.DOM.li(null,this.props.messages.emptyList);i.DOM.li(null,this.props.messages.emptyFilter)}return e=a.map(this.props.data,function(e,t){var s=this.props.focusedIndex===t;return i.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"),i.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,i,n,r=this.getDOMNode(),o=r.children[this.props.focusedIndex];o&&(e=r.scrollTop,t=r.clientHeight,s=o.offsetTop,i=o.offsetHeight,n=s+i,r.scrollTop=e>s?s:n>e+t?n-t:e)}})},function(e,t,s){var i=s(9);e.exports=i.createClass({displayName:"exports",render:function(){return this.transferPropsTo(i.DOM.button({type:"button",className:"rw-btn"},this.props.children))}})},function(e,t,s){var i=s(9),n=(s(25),s(13));e.exports=i.createClass({displayName:"exports",propTypes:{label:i.PropTypes.string.isRequired,labelId:i.PropTypes.string,upDisabled:i.PropTypes.bool.isRequired,prevDisabled:i.PropTypes.bool.isRequired,nextDisabled:i.PropTypes.bool.isRequired,onViewChange:i.PropTypes.func.isRequired,onMoveLeft:i.PropTypes.func.isRequired,onMoveRight:i.PropTypes.func.isRequired,messages:i.PropTypes.shape({moveBack:i.PropTypes.string,moveForward:i.PropTypes.string})},mixins:[s(35),s(42)],getDefaultProps:function(){return{messages:{moveBack:"navigate back",moveForward:"navigate forward"}}},render:function(){var e=this.isRtl();return i.DOM.div({className:"rw-header"},n({className:"rw-btn-left",onClick:this.props.onMoveLeft,disabled:this.props.prevDisabled,"aria-disabled":this.props.prevDisabled,title:this.props.moveBack},i.DOM.i({className:"rw-i rw-i-caret-"+(e?"right":"left")},i.DOM.span({className:"rw-sr"},this.props.moveBack))),n({className:"rw-btn-view",id:this.props.labelId,onClick:this.props.onViewChange,disabled:this.props.upDisabled,"aria-disabled":this.props.upDisabled},this.props.label),n({className:"rw-btn-right",onClick:this.props.onMoveRight,disabled:this.props.nextDisabled,"aria-disabled":this.props.nextDisabled,title:this.props.moveForward},i.DOM.i({className:"rw-i rw-i-caret-"+(e?"left":"right")},i.DOM.span({className:"rw-sr"},this.props.moveForward))))}})},function(e,t,s){var i=s(9),n=s(25),r=s(31),o=s(43),a=s(29).directions,p=s(28).mergeIntoProps,u=s(10),d=s(13),l={LEFT:a.RIGHT,RIGHT:a.LEFT};e.exports=i.createClass({displayName:"MonthView",mixins:[s(42),s(44)("month","day")],propTypes:{culture:i.PropTypes.array,value:i.PropTypes.instanceOf(Date),selectedDate:i.PropTypes.instanceOf(Date),min:i.PropTypes.instanceOf(Date),max:i.PropTypes.instanceOf(Date),format:i.PropTypes.string,onChange:i.PropTypes.func.isRequired,onMoveLeft:i.PropTypes.func,onMoveRight:i.PropTypes.func},render:function(){var e=r.visibleDays(this.props.value),t=o(e,7);return p(u.omit(this.props,"max","min","value","onChange"),i.DOM.table({role:"grid",tabIndex:this.props.disabled?"-1":"0",className:"rw-calendar-grid","aria-activedescendant":this._id("_selected_item"),onKeyUp:this._keyUp},i.DOM.thead(null,i.DOM.tr(null,this._headers())),i.DOM.tbody(null,u.map(t,this._row))))},_row:function(e,t){return i.DOM.tr({key:"week_"+t},u.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)?i.DOM.td({key:"day_"+t},d({tabIndex:"-1",onClick:u.partial(this.props.onChange,e),"aria-selected":o,"aria-disabled":this.props.disabled,disabled:this.props.disabled,className:n({"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"))):i.DOM.td({key:"day_"+t,className:"rw-empty-cell"}," ")}.bind(this)))},_headers:function(e){var t=r.shortDaysOfWeek(e);return u.map(t,function(e,t){return i.DOM.th({key:"header_"+t},e)})},move:function(e,t){return this.isRtl()&&l[t]&&(t=l[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},_id:function(e){return this._id_||(this._id_=u.uniqueId("rw_")),(this.props.id||this._id_)+e}})},function(e,t,s){var i=s(9),n=s(25),r=s(31),o=s(43),a=s(29).directions,p=s(28).mergeIntoProps,u=s(10),d={LEFT:a.RIGHT,RIGHT:a.LEFT};e.exports=i.createClass({displayName:"YearView",mixins:[s(42),s(44)("year","month")],propTypes:{value:i.PropTypes.instanceOf(Date),min:i.PropTypes.instanceOf(Date),max:i.PropTypes.instanceOf(Date),onChange:i.PropTypes.func.isRequired},render:function(){var e=r.monthsInYear(r.year(this.props.value)),t=o(e,4);return p(u.omit(this.props,"max","min","value","onChange"),i.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},i.DOM.tbody(null,u.map(t,this._row))))},_id:function(e){return this._id_||(this._id_=u.uniqueId("rw_")),(this.props.id||this._id_)+e},_row:function(e,t){return i.DOM.tr({key:t},u.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")?i.DOM.td({key:t},l({onClick:u.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:n({"rw-state-focus":s,"rw-state-selected":o})},r.format(e,r.formats.MONTH_NAME_ABRV))):i.DOM.td({key:t,className:"rw-empty-cell"}," ")}.bind(this)))},focus:function(){this.refs.table.getDOMNode().focus()},move:function(e,t){return this.isRtl()&&d[t]&&(t=d[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 l=s(13)},function(e,t,s){function i(e,t){return a.gte(e,a.startOf(t,"decade"),"year")&&a.lte(e,a.endOf(t,"decade"),"year")}function n(e){var e=a.add(a.startOf(e,"decade"),-2,"year");return l.map(l.range(12),function(){return e=a.add(e,1,"year")})}var r=s(9),o=s(25),a=s(31),p=s(43),u=s(29).directions,d=s(28).mergeIntoProps,l=s(10),h={LEFT:u.RIGHT,RIGHT:u.LEFT};e.exports=r.createClass({displayName:"DecadeView",mixins:[s(35),s(42),s(44)("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=n(this.props.value),t=p(e,4);return d(l.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,l.map(t,this._row))))},_id:function(e){return this._id_||(this._id_=l.uniqueId("rw_")),(this.props.id||this._id_)+e},_row:function(e,t){this._id("_selected_item");return r.DOM.tr({key:"row_"+t},l.map(e,function(e,t){var s=a.eq(e,this.state.focusedDate,"year"),n=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:l.partial(this.props.onChange,e),tabIndex:"-1",id:s?p:void 0,"aria-selected":n,"aria-disabled":this.props.disabled,disabled:this.props.disabled,className:o({"rw-off-range":!i(e,this.props.value),"rw-state-focus":s,"rw-state-selected":n})},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===u.LEFT?e=a.subtract(e,1,"year"):t===u.RIGHT?e=a.add(e,1,"year"):t===u.UP?e=a.subtract(e,4,"year"):t===u.DOWN&&(e=a.add(e,4,"year")),e}});var c=s(13)},function(e,t,s){function i(e){return d.format(d.startOf(e,"decade"),d.formats.YEAR)+" - "+d.format(d.endOf(e,"decade"),d.formats.YEAR)}function n(e,t,s){return d.max(d.min(e,s),t)}function r(e,t,s){return d.gte(e,d.startOf(t,"decade"),"year")&&d.lte(e,d.endOf(s,"decade"),"year")}function o(e,t){return d.gte(e,d.startOf(t,"century"),"year")&&d.lte(e,d.endOf(t,"century"),"year")}function a(e){var e=d.add(d.startOf(e,"century"),-20,"year");return f.map(f.range(12),function(){return e=d.add(e,10,"year")})}var p=s(9),u=s(25),d=s(31),l=s(43),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(42),s(44)("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=l(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))))},_id:function(e){return this._id_||(this._id_=f.uniqueId("rw_")),(this.props.id||this._id_)+e},_row:function(e,t){return p.DOM.tr({key:"row_"+t},f.map(e,function(e,t){var s=d.eq(e,this.state.focusedDate,"decade"),a=d.eq(e,this.props.value,"decade"),l=this._id("_selected_item"),h=n(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?l:void 0,"aria-selected":a,"aria-disabled":this.props.disabled,disabled:this.props.disabled,className:u({"rw-off-range":!o(e,this.props.value),"rw-state-focus":s,"rw-state-selected":a})},i(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=d.subtract(e,1,"decade"):t===h.RIGHT?e=d.add(e,1,"decade"):t===h.UP?e=d.subtract(e,4,"decade"):t===h.DOWN&&(e=d.add(e,4,"decade")),e}});var m=s(13)},function(e,t,s){var i=s(9),n=(s(25),s(31)),r=s(12),o=s(28).mergeIntoProps,a=(s(29).directions,s(10));e.exports=i.createClass({displayName:"TimeList",mixins:[s(36),s(39)("selectedIndex"),s(39)("focusedIndex")],propTypes:{value:i.PropTypes.instanceOf(Date),min:i.PropTypes.instanceOf(Date),max:i.PropTypes.instanceOf(Date),step:i.PropTypes.number,itemComponent:i.PropTypes.func,onSelect:i.PropTypes.func,preserveDate:i.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:n.format(t,this.props.format)})):0},_data:function(){for(var e=[],t=0,s=this._dateValues(),i=s.min,r=n.date(i);100>t&&n.date(i)===r&&n.lte(i,s.max);)t++,e.push({date:i,label:n.format(i,this.props.format)}),i=n.add(i,this.props.step||30,"minutes");return e},_dateValues:function(){var e,t,s=this.props.value||n.today(),i=this.props.preserveDate,r=this.props.min,o=this.props.max;return i?{min:n.eq(s,r,"day")?r:n.today(),max:n.eq(s,o,"day")?r:n.tomorrow()}:(e=n.startOf(n.merge(new Date,r),"minutes"),t=n.startOf(n.merge(new Date,o),"minutes"),n.lte(t,e)&&n.gt(o,r,"day")&&(t=n.tomorrow()),{min:e,max:t})},_keyDown:function(e){var t=this,s=e.key,i=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(i,function(e){t.setFocusedIndex(this.findNextWordIndex(e,t.state.focusedIndex))}))}});s(13)},function(e,t,s){function i(e){return!isNaN(e.getTime())}function n(e,t){var s="";return e instanceof Date&&i(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:n(e.value,e.editing&&e.editFormat?e.editFormat:e.format)})},getInitialState:function(){var e=n(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 i=s(9),n=(s(25),s(27),s(26)),r=s(41);e.exports=i.createClass({displayName:"NumberPickerInput",propTypes:{value:i.PropTypes.number,format:i.PropTypes.string,min:i.PropTypes.number,onChange:i.PropTypes.func.isRequired,onKeyDown:i.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(i.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,i=0!==t&&!t,n=_.isFinite(this.props.min);return!n&&i?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:n("stringValue")})},function(e,t,s){var i=s(9);e.exports=i.createClass({displayName:"SelectSearchInput",propTypes:{value:i.PropTypes.string,onChange:i.PropTypes.func.isRequired,disabled:i.PropTypes.bool,readOnly:i.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(i.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 i=s(9),n=s(10),r=s(25),o=s(28).mergeIntoProps,a=s(13);e.exports=i.createClass({displayName:"SelectTagList",mixins:[s(37),s(35)],propTypes:{value:i.PropTypes.array,valueField:i.PropTypes.string,textField:i.PropTypes.string,valueComponent:i.PropTypes.component,disabled:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.array,i.PropTypes.oneOf(["disabled"])]),readOnly:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.array,i.PropTypes.oneOf(["readonly"])])},getInitialState:function(){return{focused:null}},render:function(){{var e=this.state.focused,t=this.props.value;n.isArray(this.props.disabled),n.isArray(this.props.readOnly)}return o(n.omit(this.props,"value","disabled","readOnly"),i.DOM.ul({className:"rw-tag-list"},n.map(t,function(t,s){var n=this.isDisabled(t),o=this.isReadOnly(t);return i.DOM.li({key:s,className:r({"rw-state-focus":!n&&e===s,"rw-state-disabled":n,"rw-state-readonly":o})},this.props.valueComponent?this.props.valueComponent({item:t}):this._dataText(t),a({tabIndex:"-1",onClick:!(n||o)&&this._delete.bind(null,t),"aria-disabled":n,disabled:n},"×",i.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=n.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 i=s(9),n=(s(25),s(27),s(32));e.exports=i.createClass({displayName:"exports",propTypes:{value:i.PropTypes.string,onChange:i.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,i=t.length-s;s>=0&&n(e,s,s+i)}},getDefaultProps:function(){return{value:""}},render:function(){return this.transferPropsTo(i.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&&n(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){"use strict";var i=s(10);e.exports=function(e){return i.isArray(e)||(e=i.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 i(e,t){return function(){var s=e.apply(this,arguments),i=t.apply(this,arguments);if(null!=s||null!=i)return null==s?i:null==i?s:n.extend(s,i)}}var n=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 n.isArray(e)?e.splice(e.length,0,t):n.isFunction(e)?e=i(e,t):n.extend(e,t),e},before:n.curry(function(e,t){return function(){return e.apply(this,arguments),t.apply(this,arguments)}}),after:n.curry(function(e,t){return function(){var s=t.apply(this,arguments);return e.apply(this,arguments),s}}),around:n.curry(function(e,t){return function(){var s=[t].concat(n.toArray(arguments));return e.apply(this,s)}}),provided:function(e){return r.around(function(t){var s=n.rest(arguments);return e.apply(this,s)?t.apply(this,s):void 0})}}},function(e,t,s){"use strict";function i(e,t){return a.transform(t,function(e,t,s){a.has(u,s)?u[s](e,t,s):a.has(e,s)||(e[s]=t)},e)}function n(e){return function(t,s,i){t[i]=a.has(t,i)?e(t[i],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),u={className:n(r),children:a.noop,key:a.noop,ref:a.noop,style:n(o)};e.exports={mergeIntoProps:function(e,t){var s=t.props?t.props:t;return i(s,e),t},cloneWithProps:function(e,t){var s=i(a.clone(t),e.props),n=a.map(p.version.split("."),parseFloat);return!a.has(s,"children")&&a.has(e.props,"children")&&(s.children=e.props.children),0===n[0]&&n[1]<11?e.constructor.ConvenienceConstructor(s):e.constructor(s)}}},function(e,t,s){function i(e){return n.mapValues(e,function(e,t){return t})}var n=s(10);e.exports={directions:i({LEFT:null,RIGHT:null,UP:null,DOWN:null})}},function(e,t,s){"use strict";function i(e){return e.replace(/-+(.)?/g,function(e,t){return t?t.toUpperCase():""})}function n(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,u,d,l,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()+"-",l=e,!0):void 0}),l||void 0===f.style.transitionProperty||(l="transitionend"),d=!l,y[p=c+"transition-property"]=y[a=c+"transition-duration"]=y[u=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,i={top:0,left:0};if(s)return v.contains(s,e)?(void 0!==e.getBoundingClientRect&&(i=e.getBoundingClientRect()),{top:i.top+window.pageYOffset-s.clientTop,left:i.left+window.pageXOffset-s.clientLeft,width:i.width||e.offsetWidth,height:i.height||e.offsetHeight}):i},css:function(e,t,s){var o="",a=t;if("string"==typeof t){if(void 0===s)return e.style[i(t)]||r(e).getPropertyValue(t);(a={})[t]=s}h.each(a,function(t,s){t||0===t?o+=n(s)+":"+t+";":e.style.removeProperty(n(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,i,r){function c(t){t.target===t.currentTarget&&(f=!0,v.off(t.target,l,c),v.css(e,y),r&&r.call(this))}var f,m=[],g={target:e,currentTarget:e},T={};"function"==typeof i&&(r=i,i=null),d&&(s=0),void 0===s&&(s=200),h.each(t,function(e,s){T[s]=t[s],m.push(n(s))}),s>0&&(T[p]=m.join(", "),T[a]=s/1e3+"s",T[u]="0s",T[o]=i||"linear",v.on(e,l,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 i=s(45),n=s(41),r=s(10),o=e.exports=r.extend({},i,{culture:function(){return n.culture()},startOfWeek:function(){var e=n.culture();return e&&e.calendar?e.calendar.firstDay||0:0},parse:function(e,t,s){return n.parseDate(e,t,s)},format:function(e,t,s){return n.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(i.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(i.month(e,s),t)})},monthsInYear:function(e){var t=new Date(e,0,1);return r.map(r.range(12),function(e){return i.month(t,e)})},firstOfDecade:function(e){var t=i.year(e)%10;return i.subtract(e,t,"year")},lastOfDecade:function(e){return i.add(o.firstOfDecade(e),9,"year")},firstOfCentury:function(e){var t=i.year(e)%100;return i.subtract(e,t,"year")},lastOfCentury:function(e){return i.add(o.firstOfCentury(e),99,"year")},firstVisibleDay:function(e){var t=i.startOf(e,"month");return i.startOf(t,"week")},lastVisibleDay:function(e){var t=i.endOf(e,"month");return i.endOf(t,"week")},visibleDays:function(e){for(var t=o.firstVisibleDay(e),s=o.lastVisibleDay(e),n=[];i.lte(t,s,"day");)n.push(t),t=i.add(t,1,"day");return n},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 i.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 i=s(10),n={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 i.contains(e,t)},startsWith:function(e,t){return 0===e.lastIndexOf(t,0)},endsWith:function(e,t){var s=e.length-t.length,i=e.indexOf(t,s);return-1!==i&&i===s}};e.exports=n},function(e,t,s){function i(e){var t,s=n.Children.map(e,function(e){return e});for(t in s)return t}var n=s(9),r=(s(25),s(10)),o=s(28).mergeIntoProps,a=s(30);e.exports=n.createClass({displayName:"exports",propTypes:{duration:n.PropTypes.number,onRequestClose:n.PropTypes.func.isRequired,onClosing:n.PropTypes.func,onOpening:n.PropTypes.func,onClose:n.PropTypes.func,onOpen:n.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:i(e.children)!==i(this.props.children)})},componentDidUpdate:function(e){{var t=this,s=e.open&&!this.props.open,i=!e.open&&this.props.open;e.open===this.props.open}i?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,n.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(),i=this.getDOMNode();i.style.height}this.ORGINAL_POSITION=a.css(s,"position"),this.dimensions(),this.props.onClosing(),i.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,i.style.display="none",t.ORGINAL_POSITION=null,t.props.onClose()})}});var p=n.createClass({displayName:"PopupContent",render:function(){return n.Children.only(this.props.children)}})},function(e,t,s){function i(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!i(this.props,e)||!i(this.state,t)}}},function(e,t,s){var i=s(9),n=s(33),r=s(37),o=(s(27),s(26),s(10));e.exports={propTypes:{data:i.PropTypes.array,value:i.PropTypes.any,delay:i.PropTypes.number,filter:i.PropTypes.string},search:function(e,t){var s=this,i=((this._searchTerm||"")+e).toLowerCase();clearTimeout(this._timer),this._searchTerm=i,this._timer=setTimeout(function(){s._searchTerm="",t(i)},this.props.delay)},findNextWordIndex:function(e,t){var s=n.startsWith,i=this;return o.findIndex(i._data(),function(n,o){return o!=t&&s(r._dataText.call(i,n).toLowerCase(),e.toLowerCase())})}}},function(e,t,s){var i=s(9),n=s(10);e.exports={propTypes:{valueField:i.PropTypes.string,textField:i.PropTypes.string},_dataValue:function(e){var t=this.props.valueField;return t&&e&&n.has(e,t)?e[t]:e},_dataText:function(e){var t=this.props.textField;return(t&&e&&n.has(e,t)?e[t]:e)+""},_dataIndexOf:function(e,t){return n.findIndex(e,n.partial(this._valueMatcher,t),this)},_valueMatcher:function(e,t){return n.isEqual(this._dataValue(e),this._dataValue(t))},_dataItem:function(e,t){var s,i=e[0],r=this.props.valueField;return n.has(t,r)||typeof i==typeof val?t:(s=this._dataIndexOf(e,this._dataValue(t)),-1!==s?e[s]:t)}}},function(e,t,s){var i=s(9);e.exports={propTypes:{isRtl:i.PropTypes.bool},contextTypes:{isRtl:i.PropTypes.bool},childContextTypes:{isRtl:i.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 i(e){return function(){return e.apply(this,arguments),this}}var n=s(9),r=(s(33),s(37),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)),u={propTypes:{data:n.PropTypes.array,value:n.PropTypes.any}};return u["set"+t]=i(p),u["prev"+t]=function(){var t=(this._data(),this.state&&this.state[e]||0);return t-=1,0>t&&(t=0),t},u["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},u}},function(e,t,s){{var i=s(9),n=s(33),r=s(37),o=s(26),a=s(27),p=(s(29).directions,s(10)),u=(a.provided(function(e){return!p.isEqual(e.value,this.props.value)}),a.provided(function(e){return e>=0})),d=p.without(p.keys(n),"filter");u(o("selectedIndex"))}e.exports={propTypes:{data:i.PropTypes.array,value:i.PropTypes.any,filter:i.PropTypes.oneOfType([i.PropTypes.func,i.PropTypes.oneOf(d.concat(!1))]),caseSensitive:i.PropTypes.bool,minLength:i.PropTypes.number},getDefaultProps:function(){return{caseSensitive:!1,minLength:1}},filterIndexOf:function(e,t){var s="string"==typeof this.props.filter?n[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.findIndex(e,function(e){var i=r._dataText.call(this,e);return this.props.caseSensitive||(i=i.toLowerCase()),s(i,t.toLowerCase())},this))},filter:function(e,t){var s="string"==typeof this.props.filter?n[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 i=r._dataText.call(this,e);return this.props.caseSensitive||(i=i.toLowerCase()),s(i,t.toLowerCase())},this))}}},function(e){!function(){e.exports=this["window.Globalize"]}()},function(e,t,s){var i=s(9);e.exports={contextTypes:{isRtl:i.PropTypes.bool},isRtl:function(){return!!this.context.isRtl}}},function(e){"use strict";e.exports=function(e,t){var s=0,i=e?e.length:0,n=[];for(t=Math.max(+t||1,1);i>s;)n.push(e.slice(s,s+=t));return n}},function(e,t,s){var i=s(9),n=s(31),r=s(29).directions;e.exports=function(e,t){return{propTypes:{value:i.PropTypes.instanceOf(Date),min:i.PropTypes.instanceOf(Date),max:i.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) +/*! v"1.3.0" | (c) 2014 Jason Quense | https://github.com/theporchrat/react-widgets/blob/master/License.txt */ +this.ReactWidgets=function(e){function t(i){if(s[i])return s[i].exports;var n=s[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,t),n.loaded=!0,n.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 i=s(9),n=s(10),r=s(25),o=s(26),a=s(27),p=s(28).mergeIntoProps,u=(s(29).directions,s(11),s(34)),d=s(12),l=s(30),h=(s(13),a.provided(function(e){return!n.isEqual(e.value,this.props.value)})),c=a.provided(function(e){return!n.isEqual(e,this.props.value)}),f={value:i.PropTypes.any,onChange:i.PropTypes.func,data:i.PropTypes.array,valueField:i.PropTypes.string,textField:i.PropTypes.string,valueComponent:i.PropTypes.component,itemComponent:i.PropTypes.component,busy:i.PropTypes.bool,delay:i.PropTypes.number,duration:i.PropTypes.number,disabled:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(["disabled"])]),readOnly:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(["readOnly"])]),messages:i.PropTypes.shape({open:i.PropTypes.string})};e.exports=i.createClass({displayName:"DropdownList",mixins:[s(35),s(36),s(37),s(39),s(38)("focusedIndex"),s(38)("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=n.keys(f),t=this._dataItem(this._data(),this.props.value),s=this._id("_option");return p(n.omit(this.props,e),i.DOM.div({ref:"element",onKeyDown:this._maybeHandle(this._keyDown),onClick:this._maybeHandle(this.toggle),onFocus:this._maybeHandle(n.partial(this._focus,!0),!0),onBlur:n.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()})},i.DOM.span({className:"rw-dropdownlist-picker rw-select rw-btn"},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))),i.DOM.div({className:"rw-input"},this.props.valueComponent?this.props.valueComponent({item:t}):this._dataText(t)),u({open:this.state.open,onRequestClose:this.close,duration:this.props.duration},i.DOM.div(null,d({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=l.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,i=e.key,n=e.altKey,r=this.state.open;"End"===i?(r?this.setFocusedIndex(this._data().length-1):t(this._data().length-1),e.preventDefault()):"Home"===i?(r?this.setFocusedIndex(0):t(0),e.preventDefault()):"Escape"===i&&r?this.close():"Enter"===i&&r?t(this.state.focusedIndex):"ArrowDown"===i?(n?this.open():r?this.setFocusedIndex(this.nextFocusedIndex()):t(this.nextSelectedIndex()),e.preventDefault()):"ArrowUp"===i?(n?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]),i=o(t).bind(this);-1!==s&&i(s)},_data:function(){return this.props.data},_maybeHandle:function(e,t){return this.props.disabled||!t&&this.props.readOnly?void 0:e},open:function(){this.setState({open:!0})},close:function(){this.setState({open:!1})},toggle:function(){this.state.open?this.close():this.open()},_id:function(e){return(y||(y=this.props.id||n.uniqueId("rw_")))+e}});var y=""},function(e,t,s){function i(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 n=s(9),r=s(25),o=s(10),a=(s(32),s(33)),p=s(28).mergeIntoProps,u=(s(29).directions,s(22)),d=s(34),l=s(12),h=s(30),c=s(13),f={value:n.PropTypes.any,onChange:n.PropTypes.func,itemComponent:n.PropTypes.func,data:n.PropTypes.array,valueField:n.PropTypes.string,textField:n.PropTypes.string,disabled:n.PropTypes.oneOfType([n.PropTypes.bool,n.PropTypes.oneOf(["disabled"])]),readOnly:n.PropTypes.oneOfType([n.PropTypes.bool,n.PropTypes.oneOf(["readOnly"])]),suggest:n.PropTypes.bool,busy:n.PropTypes.bool,duration:n.PropTypes.number,placeholder:n.PropTypes.string,messages:n.PropTypes.shape({open:n.PropTypes.string,emptyList:n.PropTypes.string,emptyFilter:n.PropTypes.string})};e.exports=n.createClass({displayName:"ComboBox",mixins:[s(37),s(36),s(40),s(39),s(38)("focusedIndex"),s(38)("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(),n=!i(t,this.state),r=!i(e,this.props);return s||n||r},componentWillReceiveProps:function(e){var t=this._dataIndexOf(e.data,e.value),s=-1==t?e.value:e.data[t],i=this.refs.input.isSuggesting(),n=this.process(e.data,e.value,(-1===t||i)&&this._dataText(s)),r=this._dataIndexOf(n,e.value),o=this.filterIndexOf(n,this._dataText(s));this._searchTerm="",this.setState({processedData:n,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"),i=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)),n.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)},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))),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.state.open?i: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}),d({open:this.state.open,onRequestClose:this.close,duration:this.props.duration},n.DOM.div(null,l({ref:"list",id:s,optID:i,"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,i=this,n=!!this.props.suggest,r=e.target.value;t=this._deleting||!n?r:this.suggest(this._data(),r),t=t||r,s=o.find(i.props.data,function(e){return i._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,i=e.key,n=e.altKey,r=(String.fromCharCode(e.keyCode),this.state.selectedIndex,this.state.focusedIndex),o=this.state.open;"End"===i?t(this._data().length-1):"Home"===i?t(0):"Escape"===i&&o?this.close():"Enter"===i&&o?(t(r),this.close()):"ArrowDown"===i?n?this.open():o?this.setFocusedIndex(this.nextFocusedIndex()):t(this.nextSelectedIndex()):"ArrowUp"===i&&(n?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 n(this._dataText(e).toLowerCase(),i.toLowerCase())}var i=this._dataText(t),n=a.startsWith,r="string"==typeof t?o.find(e,s,this):t;return!r||this.state&&this.state.deleting?"":this._dataText(r)},_maybeHandle:function(e,t){return this.props.disabled||!t&&this.props.readOnly?void 0:e},_data:function(){return this.state.processedData},_id:function(e){return this._id_||(this._id_=o.uniqueId("rw_")),(this.props.id||this._id_)+e},process:function(e,t,s){return this.props.filter&&s&&(e=this.filter(e,s)),e}})},function(e,t,s){var i=s(9),n=s(14),r=s(15),o=s(16),a=s(17),p=s(18),u=s(25),d=s(26),l=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},_={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 w=["month","year","decade","century"];e.exports=i.createClass({displayName:"Calendar",mixins:[s(35),s(39)],propTypes:{onChange:i.PropTypes.func.isRequired,value:i.PropTypes.instanceOf(Date),min:i.PropTypes.instanceOf(Date),max:i.PropTypes.instanceOf(Date),initialView:i.PropTypes.oneOf(w),finalView:i.PropTypes.oneOf(w),disabled:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(["disabled"])]),readOnly:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(["readOnly"])]),messages:i.PropTypes.shape({moveBack:i.PropTypes.string,moveForward:i.PropTypes.string}),maintainFocus:i.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=w.indexOf(e.initialView),s=w.indexOf(e.finalView),i=w.indexOf(this.state.view),n=this.state.view,r=this.inRangeValue(new Date(e.value));t>i?this.setState({view:n=e.initialView}):i>s&&this.setState({view:n=e.finalView}),h.eq(r,this.props.value,VIEW_UNIT[n])||this.setState({currentDate:r})},render:function(){function e(){this._focus(!0,"stop")}var t=_[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"),i.DOM.div({className:u({"rw-calendar":!0,"rw-widget":!0,"rw-state-disabled":this.props.disabled,"rw-state-readonly":this.props.readOnly,"rw-rtl":this.isRtl()})},n({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))}),l({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),i=this.state.view,n=e===m||e===v?"right":"left";t||(t=f.contains([m,y],e)?this.nextDate(e):this.state.currentDate),e===g&&(i=s[i]||i),e===v&&(i=NEXT_VIEW[i]||i),this.isValidView(i)&&h.inRange(t,this.props.min,this.props.max,i)&&(this._focus(!0,"nav"),this.setState({currentDate:t,slideDirection:n,view:i}))},_focus:function(e){d("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,i="month"===s?s:"year",n=T[s]||1;return h[t](this.state.currentDate,1*n,i)},_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},_maybeHandle:function(e,t){return this.props.disabled||!t&&this.props.readOnly?f.noop:e},_id:function(e){return this._id_||(this._id_=f.uniqueId("rw_")),(this.props.id||this._id_)+e},inRangeValue:function(e){return null==e?e:h.max(h.min(e,this.props.max),this.props.min)},isValidView:function(e){var t=w.indexOf(this.props.initialView),s=w.indexOf(this.props.finalView),i=w.indexOf(e);return i>=t&&s>=i}})},function(e,t,s){function i(e,t){var s="";return e instanceof Date&&!isNaN(e.getTime())&&(s=p.format(e,t)),s}function n(e,t){var s;e=[].concat(e);for(var i=0;i=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,i=!!this.state.searchTerm,n=this.state.open;"ArrowDown"===t?n?this.setFocusedIndex(this.nextFocusedIndex()):this.open():"ArrowUp"===t?s?this.close():n&&this.setFocusedIndex(this.prevFocusedIndex()):"End"===t?n?this.setFocusedIndex(this._data().length-1):this.refs.tagList.last():"Home"===t?n?this.setFocusedIndex(0):this.refs.tagList.first():n&&"Enter"===t?this._onSelect(this._data()[this.state.focusedIndex]):"Escape"===t?n?this.close():this.refs.tagList.clear():i||"ArrowLeft"!==t?i||"ArrowRight"!==t?i||"Delete"!==t?i||"Backspace"!==t||this.refs.tagList.removeNext():this.refs.tagList.removeCurrent():this.refs.tagList.next():this.refs.tagList.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 i=r.reject(e,function(e){return r.any(t,r.partial(this._valueMatcher,e),this)},this);return s&&(i=this.filter(i,s)),i},_placeholder:function(){return(this.props.value||[]).length?"":this.props.placeholder||""},_maybeHandle:function(e,t){return this.props.disabled===!0||!t&&this.props.readOnly===!0?void 0:e},_id:function(e){return this._id_||(this._id_=r.uniqueId("rw_")),(this.props.id||this._id_)+e}})},function(e,t,s){"use strict";var i=s(9),n=s(28).cloneWithProps,r=s(30),o=s(10);e.exports=i.createClass({displayName:"ReplaceTransitionGroup",propTypes:{component:i.PropTypes.func,childFactory:i.PropTypes.func,onAnimating:i.PropTypes.func,onAnimate:i.PropTypes.func},getDefaultProps:function(){return{component:i.DOM.span,childFactory:function(e){return e},onAnimating:o.noop,onAnimate:o.noop}},getInitialState:function(){return{children:i.Children.map(this.props.children,function(e){return e})}},componentWillReceiveProps:function(e){var t=i.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 i=s&&o.has(s,t),n=!i&&!this.currentlyTransitioningKeys[t]; +return n&&(this.next=t),n},this),o.any(s,function(e,s){var i=t&&o.has(t,s),n=!i&&!this.currentlyTransitioningKeys[s];return n&&(this.current=s),n},this)},componentWillMount:function(){this.currentlyTransitioningKeys={},this.current=null,this.next=null},componentDidUpdate:function(){var e,t,s=this.current,i=this.next,n=this.refs[s||i],o=this.getDOMNode(),a=n&&n.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,i&&this.performEnter(i),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=i.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=i.Children.map(this.props.children,function(e){return e});if(s&&s.hasOwnProperty(e))this.performEnter(e);else{var n=o.extend({},this.state.children);delete n[e],this.setState({children:n})}this._tryFinish()},render:function(){var e={};for(var t in this.state.children){var s=this.state.children[t];s&&(e[t]=n(this.props.childFactory(s),{ref:t}))}return this.transferPropsTo(this.props.component(null,e))}})},function(e,t,s){var i=s(9),n=s(7),r=s(30),o=(s(10),i.createClass({displayName:"SlideChildGroup",propTypes:{direction:i.PropTypes.oneOf(["left","right"])},getDefaultProps:function(){return{duration:250}},componentWillEnter:function(e){var t=this,s=this.getDOMNode(),i=r.width(s),n=this.props.direction;i="left"===n?i:-i,this.ORGINAL_POSITION=s.style.position,r.css(s,{position:"absolute",left:i+"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(),i=r.width(s),n=this.props.direction;i="left"===n?-i:i,this.ORGINAL_POSITION=s.style.position,r.css(s,{position:"absolute",top:0,left:0}),r.animate(s,{left:i+"px"},t.props.duration,function(){r.css(s,{position:t.ORGINAL_POSITION,overflow:"hidden"}),t.ORGINAL_POSITION=null,e&&e()})},render:function(){return i.Children.only(this.props.children)}}));e.exports=i.createClass({displayName:"exports",propTypes:{direction:i.PropTypes.oneOf(["left","right"])},getDefaultProps:function(){return{direction:"left"}},_wrapChild:function(e){return o({direction:this.props.direction},e)},render:function(){return this.transferPropsTo(n({ref:"container",childFactory:this._wrapChild,style:{position:"relative",overflow:"hidden"},component:i.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 i=s(9),n=s(28).mergeIntoProps,r=s(10);e.exports=i.createClass({displayName:"exports",mixins:[s(37)],render:function(){var e=this.props.value;return n(r.omit(this.props,"value"),i.DOM.div(null,this._dataText(e)))}})},function(e,t,s){{var i=s(9),n=(s(33),s(27),s(28)),r=n.mergeIntoProps,o=(n.cloneWithProps,s(25)),a=s(10);i.createClass({displayName:"DefaultListItem",mixins:[s(37),s(42)],render:function(){var e=this.props.item;return this.transferPropsTo(i.DOM.li(null,e?this._dataText(e):""))}})}e.exports=i.createClass({displayName:"List",mixins:[s(37)],propTypes:{data:i.PropTypes.array,onSelect:i.PropTypes.func,listItem:i.PropTypes.component,selectedIndex:i.PropTypes.number,focusedIndex:i.PropTypes.number,valueField:i.PropTypes.string,textField:i.PropTypes.string,optID:i.PropTypes.string,messages:i.PropTypes.shape({emptyList:i.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=i.DOM.li(null,this.props.messages.emptyList);i.DOM.li(null,this.props.messages.emptyFilter)}return e=a.map(this.props.data,function(e,t){var s=this.props.focusedIndex===t;return i.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"),i.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,i,n,r=this.getDOMNode(),o=r.children[this.props.focusedIndex];o&&(e=r.scrollTop,t=r.clientHeight,s=o.offsetTop,i=o.offsetHeight,n=s+i,r.scrollTop=e>s?s:n>e+t?n-t:e)}})},function(e,t,s){var i=s(9);e.exports=i.createClass({displayName:"exports",render:function(){return this.transferPropsTo(i.DOM.button({type:"button",className:"rw-btn"},this.props.children))}})},function(e,t,s){var i=s(9),n=(s(25),s(13));e.exports=i.createClass({displayName:"exports",propTypes:{label:i.PropTypes.string.isRequired,labelId:i.PropTypes.string,upDisabled:i.PropTypes.bool.isRequired,prevDisabled:i.PropTypes.bool.isRequired,nextDisabled:i.PropTypes.bool.isRequired,onViewChange:i.PropTypes.func.isRequired,onMoveLeft:i.PropTypes.func.isRequired,onMoveRight:i.PropTypes.func.isRequired,messages:i.PropTypes.shape({moveBack:i.PropTypes.string,moveForward:i.PropTypes.string})},mixins:[s(35),s(42)],getDefaultProps:function(){return{messages:{moveBack:"navigate back",moveForward:"navigate forward"}}},render:function(){var e=this.isRtl();return i.DOM.div({className:"rw-header"},n({className:"rw-btn-left",onClick:this.props.onMoveLeft,disabled:this.props.prevDisabled,"aria-disabled":this.props.prevDisabled,title:this.props.moveBack},i.DOM.i({className:"rw-i rw-i-caret-"+(e?"right":"left")},i.DOM.span({className:"rw-sr"},this.props.moveBack))),n({className:"rw-btn-view",id:this.props.labelId,onClick:this.props.onViewChange,disabled:this.props.upDisabled,"aria-disabled":this.props.upDisabled},this.props.label),n({className:"rw-btn-right",onClick:this.props.onMoveRight,disabled:this.props.nextDisabled,"aria-disabled":this.props.nextDisabled,title:this.props.moveForward},i.DOM.i({className:"rw-i rw-i-caret-"+(e?"left":"right")},i.DOM.span({className:"rw-sr"},this.props.moveForward))))}})},function(e,t,s){var i=s(9),n=s(25),r=s(31),o=s(43),a=s(29).directions,p=s(28).mergeIntoProps,u=s(10),d=s(13),l={LEFT:a.RIGHT,RIGHT:a.LEFT};e.exports=i.createClass({displayName:"MonthView",mixins:[s(42),s(44)("month","day")],propTypes:{culture:i.PropTypes.array,value:i.PropTypes.instanceOf(Date),selectedDate:i.PropTypes.instanceOf(Date),min:i.PropTypes.instanceOf(Date),max:i.PropTypes.instanceOf(Date),format:i.PropTypes.string,onChange:i.PropTypes.func.isRequired,onMoveLeft:i.PropTypes.func,onMoveRight:i.PropTypes.func},render:function(){var e=r.visibleDays(this.props.value),t=o(e,7);return p(u.omit(this.props,"max","min","value","onChange"),i.DOM.table({role:"grid",tabIndex:this.props.disabled?"-1":"0",className:"rw-calendar-grid","aria-activedescendant":this._id("_selected_item"),onKeyUp:this._keyUp},i.DOM.thead(null,i.DOM.tr(null,this._headers())),i.DOM.tbody(null,u.map(t,this._row))))},_row:function(e,t){return i.DOM.tr({key:"week_"+t},u.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)?i.DOM.td({key:"day_"+t},d({tabIndex:"-1",onClick:u.partial(this.props.onChange,e),"aria-selected":o,"aria-disabled":this.props.disabled,disabled:this.props.disabled,className:n({"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"))):i.DOM.td({key:"day_"+t,className:"rw-empty-cell"}," ")}.bind(this)))},_headers:function(e){var t=r.shortDaysOfWeek(e);return u.map(t,function(e,t){return i.DOM.th({key:"header_"+t},e)})},move:function(e,t){return this.isRtl()&&l[t]&&(t=l[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},_id:function(e){return this._id_||(this._id_=u.uniqueId("rw_")),(this.props.id||this._id_)+e}})},function(e,t,s){var i=s(9),n=s(25),r=s(31),o=s(43),a=s(29).directions,p=s(28).mergeIntoProps,u=s(10),d={LEFT:a.RIGHT,RIGHT:a.LEFT};e.exports=i.createClass({displayName:"YearView",mixins:[s(42),s(44)("year","month")],propTypes:{value:i.PropTypes.instanceOf(Date),min:i.PropTypes.instanceOf(Date),max:i.PropTypes.instanceOf(Date),onChange:i.PropTypes.func.isRequired},render:function(){var e=r.monthsInYear(r.year(this.props.value)),t=o(e,4);return p(u.omit(this.props,"max","min","value","onChange"),i.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},i.DOM.tbody(null,u.map(t,this._row))))},_id:function(e){return this._id_||(this._id_=u.uniqueId("rw_")),(this.props.id||this._id_)+e},_row:function(e,t){return i.DOM.tr({key:t},u.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")?i.DOM.td({key:t},l({onClick:u.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:n({"rw-state-focus":s,"rw-state-selected":o})},r.format(e,r.formats.MONTH_NAME_ABRV))):i.DOM.td({key:t,className:"rw-empty-cell"}," ")}.bind(this)))},focus:function(){this.refs.table.getDOMNode().focus()},move:function(e,t){return this.isRtl()&&d[t]&&(t=d[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 l=s(13)},function(e,t,s){function i(e,t){return a.gte(e,a.startOf(t,"decade"),"year")&&a.lte(e,a.endOf(t,"decade"),"year")}function n(e){var e=a.add(a.startOf(e,"decade"),-2,"year");return l.map(l.range(12),function(){return e=a.add(e,1,"year")})}var r=s(9),o=s(25),a=s(31),p=s(43),u=s(29).directions,d=s(28).mergeIntoProps,l=s(10),h={LEFT:u.RIGHT,RIGHT:u.LEFT};e.exports=r.createClass({displayName:"DecadeView",mixins:[s(35),s(42),s(44)("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=n(this.props.value),t=p(e,4);return d(l.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,l.map(t,this._row))))},_id:function(e){return this._id_||(this._id_=l.uniqueId("rw_")),(this.props.id||this._id_)+e},_row:function(e,t){this._id("_selected_item");return r.DOM.tr({key:"row_"+t},l.map(e,function(e,t){var s=a.eq(e,this.state.focusedDate,"year"),n=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:l.partial(this.props.onChange,e),tabIndex:"-1",id:s?p:void 0,"aria-selected":n,"aria-disabled":this.props.disabled,disabled:this.props.disabled,className:o({"rw-off-range":!i(e,this.props.value),"rw-state-focus":s,"rw-state-selected":n})},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===u.LEFT?e=a.subtract(e,1,"year"):t===u.RIGHT?e=a.add(e,1,"year"):t===u.UP?e=a.subtract(e,4,"year"):t===u.DOWN&&(e=a.add(e,4,"year")),e}});var c=s(13)},function(e,t,s){function i(e){return d.format(d.startOf(e,"decade"),d.formats.YEAR)+" - "+d.format(d.endOf(e,"decade"),d.formats.YEAR)}function n(e,t,s){return d.max(d.min(e,s),t)}function r(e,t,s){return d.gte(e,d.startOf(t,"decade"),"year")&&d.lte(e,d.endOf(s,"decade"),"year")}function o(e,t){return d.gte(e,d.startOf(t,"century"),"year")&&d.lte(e,d.endOf(t,"century"),"year")}function a(e){var e=d.add(d.startOf(e,"century"),-20,"year");return f.map(f.range(12),function(){return e=d.add(e,10,"year")})}var p=s(9),u=s(25),d=s(31),l=s(43),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(42),s(44)("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=l(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))))},_id:function(e){return this._id_||(this._id_=f.uniqueId("rw_")),(this.props.id||this._id_)+e},_row:function(e,t){return p.DOM.tr({key:"row_"+t},f.map(e,function(e,t){var s=d.eq(e,this.state.focusedDate,"decade"),a=d.eq(e,this.props.value,"decade"),l=this._id("_selected_item"),h=n(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?l:void 0,"aria-selected":a,"aria-disabled":this.props.disabled,disabled:this.props.disabled,className:u({"rw-off-range":!o(e,this.props.value),"rw-state-focus":s,"rw-state-selected":a})},i(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=d.subtract(e,1,"decade"):t===h.RIGHT?e=d.add(e,1,"decade"):t===h.UP?e=d.subtract(e,4,"decade"):t===h.DOWN&&(e=d.add(e,4,"decade")),e}});var m=s(13)},function(e,t,s){var i=s(9),n=(s(25),s(27),s(26)),r=s(41);e.exports=i.createClass({displayName:"NumberPickerInput",propTypes:{value:i.PropTypes.number,format:i.PropTypes.string,min:i.PropTypes.number,onChange:i.PropTypes.func.isRequired,onKeyDown:i.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(i.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,i=0!==t&&!t,n=_.isFinite(this.props.min);return!n&&i?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:n("stringValue")})},function(e,t,s){var i=s(9),n=(s(25),s(31)),r=s(12),o=s(28).mergeIntoProps,a=(s(29).directions,s(10));e.exports=i.createClass({displayName:"TimeList",mixins:[s(36),s(38)("selectedIndex"),s(38)("focusedIndex")],propTypes:{value:i.PropTypes.instanceOf(Date),min:i.PropTypes.instanceOf(Date),max:i.PropTypes.instanceOf(Date),step:i.PropTypes.number,itemComponent:i.PropTypes.func,onSelect:i.PropTypes.func,preserveDate:i.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:n.format(t,this.props.format)})):0},_data:function(){for(var e=[],t=0,s=this._dateValues(),i=s.min,r=n.date(i);100>t&&n.date(i)===r&&n.lte(i,s.max);)t++,e.push({date:i,label:n.format(i,this.props.format)}),i=n.add(i,this.props.step||30,"minutes");return e},_dateValues:function(){var e,t,s=this.props.value||n.today(),i=this.props.preserveDate,r=this.props.min,o=this.props.max;return i?{min:n.eq(s,r,"day")?r:n.today(),max:n.eq(s,o,"day")?r:n.tomorrow()}:(e=n.startOf(n.merge(new Date,r),"minutes"),t=n.startOf(n.merge(new Date,o),"minutes"),n.lte(t,e)&&n.gt(o,r,"day")&&(t=n.tomorrow()),{min:e,max:t})},_keyDown:function(e){var t=this,s=e.key,i=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(i,function(e){t.setFocusedIndex(this.findNextWordIndex(e,t.state.focusedIndex))}))}});s(13)},function(e,t,s){function i(e){return!isNaN(e.getTime())}function n(e,t){var s="";return e instanceof Date&&i(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:n(e.value,e.editing&&e.editFormat?e.editFormat:e.format)})},getInitialState:function(){var e=n(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 i=s(9),n=(s(25),s(27),s(32));e.exports=i.createClass({displayName:"exports",propTypes:{value:i.PropTypes.string,onChange:i.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,i=t.length-s;s>=0&&n(e,s,s+i)}},getDefaultProps:function(){return{value:""}},render:function(){return this.transferPropsTo(i.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&&n(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 i=s(9);e.exports=i.createClass({displayName:"SelectSearchInput",propTypes:{value:i.PropTypes.string,onChange:i.PropTypes.func.isRequired,disabled:i.PropTypes.bool,readOnly:i.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(i.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 i=s(9),n=s(10),r=s(25),o=s(28).mergeIntoProps,a=s(13);e.exports=i.createClass({displayName:"SelectTagList",mixins:[s(37),s(35)],propTypes:{value:i.PropTypes.array,valueField:i.PropTypes.string,textField:i.PropTypes.string,valueComponent:i.PropTypes.component,disabled:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.array,i.PropTypes.oneOf(["disabled"])]),readOnly:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.array,i.PropTypes.oneOf(["readonly"])])},getInitialState:function(){return{focused:null}},render:function(){{var e=this.state.focused,t=this.props.value;n.isArray(this.props.disabled),n.isArray(this.props.readOnly)}return o(n.omit(this.props,"value","disabled","readOnly"),i.DOM.ul({className:"rw-tag-list"},n.map(t,function(t,s){var n=this.isDisabled(t),o=this.isReadOnly(t);return i.DOM.li({key:s,className:r({"rw-state-focus":!n&&e===s,"rw-state-disabled":n,"rw-state-readonly":o})},this.props.valueComponent?this.props.valueComponent({item:t}):this._dataText(t),a({tabIndex:"-1",onClick:!(n||o)&&this._delete.bind(null,t),"aria-disabled":n,disabled:n},"×",i.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=n.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 i=s(10);e.exports=function(e){return i.isArray(e)||(e=i.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 i(e,t){return function(){var s=e.apply(this,arguments),i=t.apply(this,arguments);if(null!=s||null!=i)return null==s?i:null==i?s:n.extend(s,i)}}var n=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 n.isArray(e)?e.splice(e.length,0,t):n.isFunction(e)?e=i(e,t):n.extend(e,t),e},before:n.curry(function(e,t){return function(){return e.apply(this,arguments),t.apply(this,arguments)}}),after:n.curry(function(e,t){return function(){var s=t.apply(this,arguments);return e.apply(this,arguments),s}}),around:n.curry(function(e,t){return function(){var s=[t].concat(n.toArray(arguments));return e.apply(this,s)}}),provided:function(e){return r.around(function(t){var s=n.rest(arguments);return e.apply(this,s)?t.apply(this,s):void 0})}}},function(e,t,s){"use strict";function i(e,t){return a.transform(t,function(e,t,s){a.has(u,s)?u[s](e,t,s):a.has(e,s)||(e[s]=t)},e)}function n(e){return function(t,s,i){t[i]=a.has(t,i)?e(t[i],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),u={className:n(r),children:a.noop,key:a.noop,ref:a.noop,style:n(o)};e.exports={mergeIntoProps:function(e,t){var s=t.props?t.props:t;return i(s,e),t},cloneWithProps:function(e,t){var s=i(a.clone(t),e.props),n=a.map(p.version.split("."),parseFloat);return!a.has(s,"children")&&a.has(e.props,"children")&&(s.children=e.props.children),0===n[0]&&n[1]<11?e.constructor.ConvenienceConstructor(s):e.constructor(s)}}},function(e,t,s){function i(e){return n.mapValues(e,function(e,t){return t})}var n=s(10);e.exports={directions:i({LEFT:null,RIGHT:null,UP:null,DOWN:null})}},function(e,t,s){"use strict";function i(e){return e.replace(/-+(.)?/g,function(e,t){return t?t.toUpperCase():""})}function n(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,u,d,l,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()+"-",l=e,!0):void 0}),l||void 0===f.style.transitionProperty||(l="transitionend"),d=!l,y[p=c+"transition-property"]=y[a=c+"transition-duration"]=y[u=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,i={top:0,left:0};if(s)return v.contains(s,e)?(void 0!==e.getBoundingClientRect&&(i=e.getBoundingClientRect()),{top:i.top+window.pageYOffset-s.clientTop,left:i.left+window.pageXOffset-s.clientLeft,width:i.width||e.offsetWidth,height:i.height||e.offsetHeight}):i},css:function(e,t,s){var o="",a=t;if("string"==typeof t){if(void 0===s)return e.style[i(t)]||r(e).getPropertyValue(t);(a={})[t]=s}h.each(a,function(t,s){t||0===t?o+=n(s)+":"+t+";":e.style.removeProperty(n(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,i,r){function c(t){t.target===t.currentTarget&&(f=!0,v.off(t.target,l,c),v.css(e,y),r&&r.call(this))}var f,m=[],g={target:e,currentTarget:e},T={};"function"==typeof i&&(r=i,i=null),d&&(s=0),void 0===s&&(s=200),h.each(t,function(e,s){T[s]=t[s],m.push(n(s))}),s>0&&(T[p]=m.join(", "),T[a]=s/1e3+"s",T[u]="0s",T[o]=i||"linear",v.on(e,l,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 i=s(45),n=s(41),r=s(10),o=e.exports=r.extend({},i,{culture:function(){return n.culture()},startOfWeek:function(){var e=n.culture();return e&&e.calendar?e.calendar.firstDay||0:0},parse:function(e,t,s){return n.parseDate(e,t,s)},format:function(e,t,s){return n.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(i.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(i.month(e,s),t)})},monthsInYear:function(e){var t=new Date(e,0,1);return r.map(r.range(12),function(e){return i.month(t,e)})},firstOfDecade:function(e){var t=i.year(e)%10;return i.subtract(e,t,"year")},lastOfDecade:function(e){return i.add(o.firstOfDecade(e),9,"year")},firstOfCentury:function(e){var t=i.year(e)%100;return i.subtract(e,t,"year")},lastOfCentury:function(e){return i.add(o.firstOfCentury(e),99,"year")},firstVisibleDay:function(e){var t=i.startOf(e,"month");return i.startOf(t,"week")},lastVisibleDay:function(e){var t=i.endOf(e,"month");return i.endOf(t,"week")},visibleDays:function(e){for(var t=o.firstVisibleDay(e),s=o.lastVisibleDay(e),n=[];i.lte(t,s,"day");)n.push(t),t=i.add(t,1,"day");return n},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 i.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 i=s(10),n={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 i.contains(e,t)},startsWith:function(e,t){return 0===e.lastIndexOf(t,0)},endsWith:function(e,t){var s=e.length-t.length,i=e.indexOf(t,s);return-1!==i&&i===s}};e.exports=n},function(e,t,s){function i(e){var t,s=n.Children.map(e,function(e){return e});for(t in s)return t}var n=s(9),r=(s(25),s(10)),o=s(28).mergeIntoProps,a=s(30);e.exports=n.createClass({displayName:"exports",propTypes:{duration:n.PropTypes.number,onRequestClose:n.PropTypes.func.isRequired,onClosing:n.PropTypes.func,onOpening:n.PropTypes.func,onClose:n.PropTypes.func,onOpen:n.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:i(e.children)!==i(this.props.children)})},componentDidUpdate:function(e){{var t=this,s=e.open&&!this.props.open,i=!e.open&&this.props.open;e.open===this.props.open}i?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,n.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(),i=this.getDOMNode();i.style.height}this.ORGINAL_POSITION=a.css(s,"position"),this.dimensions(),this.props.onClosing(),i.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,i.style.display="none",t.ORGINAL_POSITION=null,t.props.onClose()})}});var p=n.createClass({displayName:"PopupContent",render:function(){return n.Children.only(this.props.children)}})},function(e,t,s){function i(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!i(this.props,e)||!i(this.state,t)}}},function(e,t,s){var i=s(9),n=s(33),r=s(37),o=(s(27),s(26),s(10));e.exports={propTypes:{data:i.PropTypes.array,value:i.PropTypes.any,delay:i.PropTypes.number,filter:i.PropTypes.string},search:function(e,t){var s=this,i=((this._searchTerm||"")+e).toLowerCase();clearTimeout(this._timer),this._searchTerm=i,this._timer=setTimeout(function(){s._searchTerm="",t(i)},this.props.delay)},findNextWordIndex:function(e,t){var s=n.startsWith,i=this;return o.findIndex(i._data(),function(n,o){return o!=t&&s(r._dataText.call(i,n).toLowerCase(),e.toLowerCase())})}}},function(e,t,s){var i=s(9),n=s(10);e.exports={propTypes:{valueField:i.PropTypes.string,textField:i.PropTypes.string},_dataValue:function(e){var t=this.props.valueField;return t&&e&&n.has(e,t)?e[t]:e},_dataText:function(e){var t=this.props.textField;return(t&&e&&n.has(e,t)?e[t]:e)+""},_dataIndexOf:function(e,t){return n.findIndex(e,n.partial(this._valueMatcher,t),this)},_valueMatcher:function(e,t){return n.isEqual(this._dataValue(e),this._dataValue(t))},_dataItem:function(e,t){var s,i=e[0],r=this.props.valueField;return n.has(t,r)||typeof i==typeof val?t:(s=this._dataIndexOf(e,this._dataValue(t)),-1!==s?e[s]:t)}}},function(e,t,s){function i(e){return function(){return e.apply(this,arguments),this}}var n=s(9),r=(s(33),s(37),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)),u={propTypes:{data:n.PropTypes.array,value:n.PropTypes.any}};return u["set"+t]=i(p),u["prev"+t]=function(){var t=(this._data(),this.state&&this.state[e]||0);return t-=1,0>t&&(t=0),t},u["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},u}},function(e,t,s){var i=s(9);e.exports={propTypes:{isRtl:i.PropTypes.bool},contextTypes:{isRtl:i.PropTypes.bool},childContextTypes:{isRtl:i.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){{var i=s(9),n=s(33),r=s(37),o=s(26),a=s(27),p=(s(29).directions,s(10)),u=(a.provided(function(e){return!p.isEqual(e.value,this.props.value)}),a.provided(function(e){return e>=0})),d=p.without(p.keys(n),"filter");u(o("selectedIndex"))}e.exports={propTypes:{data:i.PropTypes.array,value:i.PropTypes.any,filter:i.PropTypes.oneOfType([i.PropTypes.func,i.PropTypes.oneOf(d.concat(!1))]),caseSensitive:i.PropTypes.bool,minLength:i.PropTypes.number},getDefaultProps:function(){return{caseSensitive:!1,minLength:1}},filterIndexOf:function(e,t){var s="function"==typeof this.props.filter?this.props.filter:n[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 i=r._dataText.call(this,e);return this.props.caseSensitive||(i=i.toLowerCase()),s(i,t.toLowerCase())},this))},filter:function(e,t){var s="string"==typeof this.props.filter?n[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 i=r._dataText.call(this,e);return this.props.caseSensitive||(i=i.toLowerCase()),s(i,t.toLowerCase())},this))}}},function(e){!function(){e.exports=this["window.Globalize"]}()},function(e,t,s){var i=s(9);e.exports={contextTypes:{isRtl:i.PropTypes.bool},isRtl:function(){return!!this.context.isRtl}}},function(e){"use strict";e.exports=function(e,t){var s=0,i=e?e.length:0,n=[];for(t=Math.max(+t||1,1);i>s;)n.push(e.slice(s,s+=t));return n}},function(e,t,s){var i=s(9),n=s(31),r=s(29).directions;e.exports=function(e,t){return{propTypes:{value:i.PropTypes.instanceOf(Date),min:i.PropTypes.instanceOf(Date),max:i.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) n.eq(e.value,s,t)||this.setState({focusedDate:e.value})},_keyDown:function(s){var i=s.key,o=(s.altKey,this.state.focusedDate),a=o;if("Enter"===i)return this.props.onChange(a);if("ArrowLeft"===i?a=this.move(a,r.LEFT):"ArrowRight"===i?a=this.move(a,r.RIGHT):"ArrowUp"===i?a=this.move(a,r.UP):"ArrowDown"===i&&(a=this.move(a,r.DOWN)),!n.eq(o,a,t)){if(s.preventDefault(),n.gt(a,this.props.value,e))return this.props.onMoveRight(a);if(n.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),i=s+t;return e=f.month(e,i),0>i&&(i=12+t),f.month(e)!==i%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 i(e){return function(t,s,i){return e(+f.startOf(t,i),+f.startOf(s,i))}}var n="milliseconds",r="seconds",o="minutes",a="hours",p="day",u="week",d="month",l="year",h="decade",c="century",f=e.exports={startOfWeek:function(){return 0},add:function(e,s,i){if(e=new Date(e),i===n)return f.milliseconds(e,f.milliseconds(e)+s);if(i===r)return f.seconds(e,f.seconds(e)+s);if(i===o)return f.minutes(e,f.minutes(e)+s);if(i===a)return f.hours(e,f.hours(e)+s);if(i===p)return f.date(e,f.date(e)+s);if(i===u)return f.date(e,f.date(e)+7*s);if(i===d)return t(e,s);if(i===l)return f.year(e,f.year(e)+s);if(i===h)return f.year(e,f.year(e)+10*s);if(i===c)return f.year(e,f.year(e)+100*s);throw new TypeError('Invalid units: "'+i+'"')},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===u&&(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,n)},eq:i(function(e,t){return e===t}),gt:i(function(e,t){return e>t}),gte:i(function(e,t){return e>=t}),lt:i(function(e,t){return t>e}),lte:i(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,i){return i=i||"day",f.gte(e,t,i)&&f.lte(e,s,i)},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,l)},century:function(e,t){return void 0==t?f.year(f.startOf(e,c)):f.add(e,t+100,l)},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/components/docs.jsx b/docs/components/docs.jsx index 18e2ce541..95f107fd2 100644 --- a/docs/components/docs.jsx +++ b/docs/components/docs.jsx @@ -43,7 +43,7 @@ var Docs = React.createClass({
diff --git a/docs/components/examples/combobox.jsx b/docs/components/examples/combobox.jsx index 2b1db4fae..a55797274 100644 --- a/docs/components/examples/combobox.jsx +++ b/docs/components/examples/combobox.jsx @@ -97,11 +97,13 @@ module.exports = React.createClass({
- - + +
diff --git a/docs/components/examples/select.jsx b/docs/components/examples/select.jsx index ef2a6f6f8..094c480fc 100644 --- a/docs/components/examples/select.jsx +++ b/docs/components/examples/select.jsx @@ -25,14 +25,7 @@ module.exports = React.createClass({ render: function(){ var allVals = this.state.value - , disabled = this.state.disabled === true || _.isArray(this.state.disabled) - // _.map(list, function(){ - // return this.state.value - // }) - // - console.log(disabled, this.state.disabled) - - //allVals.unshift({ id: false, label: 'none'}); + , disabled = this.state.disabled === true || _.isArray(this.state.disabled); return (
diff --git a/docs/docs.css b/docs/docs.css index 0850cb4a8..68669ac05 100644 --- a/docs/docs.css +++ b/docs/docs.css @@ -78,11 +78,17 @@ h3 > .default { max-width: 300px; } +.nav-aside { + position: fixed; + top: 72px; +} + @media (max-width: 767px) { .nav-aside { position: static; } } + pre > code.hljs { background: none; } diff --git a/docs/docs.js b/docs/docs.js new file mode 100644 index 000000000..00ad2eebd --- /dev/null +++ b/docs/docs.js @@ -0,0 +1,17 @@ +/*! 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),d=n(6),u=n(7),h=n(8),c=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})}),d({className:s({"tab-pane":!0,active:"#combobox"===e})}),m({className:s({"tab-pane":!0,active:"#number-picker"===e})}),u({className:s({"tab-pane":!0,active:"#select-list"===e})}),h({className:s({"tab-pane":!0,active:"#calendar"===e})}),c({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"),o(null),s({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:l+"value"},"value ",a.DOM.small(null,"mixed")),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:l+"onChange"},"onChange ",a.DOM.small(null,"function ( selectedValue )")),a.DOM.p(null,"Change event Handler that is called when the value is changed."),a.DOM.h3({className:"prop-header",id:l+"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:l+"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:l+"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:l+"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:l+"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:l+"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:l+"duration"},"duration ",a.DOM.small(null,"Number")," ",a.DOM.span({className:"default"},"250")),a.DOM.p(null,"The speed, in milliseconds, of the dropdown animation."),a.DOM.h3({className:"prop-header",id:l+"isRtl"},"isRtl ",a.DOM.small(null,"Boolean")),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:l+"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")," ",a.DOM.span({className:"default"},'"Open Dropdown"')),a.DOM.p(null,"Dropdown button text for screen readers"),a.DOM.h2({id:l+"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=p},function(e,t,n){var a=n(1),s=n(21),i=n(18),r=n(19),o=n(23),l="combobox/",p=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"},r({title:"props",bsStyle:"link",pullRight:!0},i({href:"#"+l+"value"},"value"),i({href:"#"+l+"onChange"},"onChange"),i({href:"#"+l+"data"},"data"),i({divider:!0}),i({href:"#"+l+"valueField"},"valueField"),i({href:"#"+l+"textField"},"textField"),i({href:"#"+l+"itemComponent"},"itemComponent"),i({href:"#"+l+"suggest"},"suggest"),i({href:"#"+l+"filter"},"filter"),i({href:"#"+l+"busy"},"busy"),i({href:"#"+l+"duration"},"duration"),i({href:"#"+l+"isRtl"},"isRtl"),i({href:"#"+l+"messages"},"messages"),i({divider:!0}),i({href:"#"+l+"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"),o(null),s({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:l+"value"},"value ",a.DOM.small(null,"mixed")),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:l+"onChange"},"onChange ",a.DOM.small(null,"function ( value )")),a.DOM.p(null,"change event Handler that is 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:l+"data"},"data ",a.DOM.small(null,"Array - mixed")),a.DOM.p(null,"provide 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:l+"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:l+"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:l+"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:l+"suggest"},"suggest ",a.DOM.small(null,"Boolean")),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:l+"filter"},"filter ",a.DOM.small(null,'Mixed - false, "startsWith", "endsWith", "contains", function(item)'),a.DOM.span({className:"default"},"false")),a.DOM.p(null,"When ",a.DOM.code(null,"true"),' the Combobox will filter the list of values as you type, values as you type. You can use a built in filter ("startsWith", "endsWith", "contains"), or specify a ',"function"," that returns will be passed each item, and should return ",a.DOM.code(null,"true")," for matches."),a.DOM.h3({className:"prop-header",id:l+"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:l+"duration"},"duration ",a.DOM.small(null,"Number")," ",a.DOM.span({className:"default"},"250")),a.DOM.p(null,"The speed, in milliseconds, of the dropdown animation."),a.DOM.h3({className:"prop-header",id:l+"isRtl"},"isRtl ",a.DOM.small(null,"Boolean")),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:l+"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")," ",a.DOM.span({className:"default"},'"Open Combobox"')),a.DOM.p(null,"Combobox button text for screen readers"),a.DOM.h3(null,"messages.emptyList ",a.DOM.small(null,"String"),a.DOM.span({className:"default"},'"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"),a.DOM.span({className:"default"},'"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:l+"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=p},function(e,t,n){var a=n(1),s=n(21),i=n(19),r=n(18),o=n(24),l="select-list/",p=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"},i({title:"props",bsStyle:"link",pullRight:!0},r({href:"#"+l+"value"},"value"),r({href:"#"+l+"onChange"},"onChange"),r({href:"#"+l+"data"},"data"),r({divider:!0}),r({href:"#"+l+"valueField"},"valueField"),r({href:"#"+l+"textField"},"textField"),r({href:"#"+l+"tagComponent"},"tagComponent"),r({href:"#"+l+"itemComponent"},"itemComponent"),r({href:"#"+l+"placeholder"},"placeholder"),r({href:"#"+l+"busy"},"busy"),r({href:"#"+l+"duration"},"duration"),r({href:"#"+l+"isRtl"},"isRtl"),r({href:"#"+l+"messages"},"messages"),r({divider:!0}),r({href:"#"+l+"keyboard"},"Keyboard Navigation")))),a.DOM.p(null,"Multiple selection widget."),o(null),s({code:"render: function(){\n //... \n\n return (\n