3.chunk.js
26.7 KB
webpackJsonpantd([3,15],{774:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,r,l=n(6),s=o(l),a=n(2),u=o(a),p=n(3),c=o(p),d=n(4),f=o(d),h=n(0),v=o(h),m=(r=i=function(e){function t(){return(0,u.default)(this,t),(0,c.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,f.default)(t,e),t}(v.default.Component),i.propTypes={value:v.default.PropTypes.string},r);t.default=m},786:function(e,t,n){"use strict";e.exports=n(850)},814:function(e,t,n){"use strict";function o(e){var t=e.props;if("value"in t)return t.value;if(e.key)return e.key;throw new Error("no key or value for "+e)}function i(e,t){return"value"===t?o(e):e.props[t]}function r(e){return e.combobox}function l(e){return e.multiple||e.tags}function s(e){return l(e)||r(e)}function a(e){return!s(e)}function u(e){var t=e;return void 0===e?t=[]:Array.isArray(e)||(t=[e]),t}function p(e){e.preventDefault()}function c(e,t){for(var n=-1,o=0;o<e.length;o++)if(e[o].key===t){n=o;break}return n}function d(e,t){if(null===t||void 0===t)return[];var n=[];return m.default.Children.forEach(e,function(e){if(e.type===h.ItemGroup)n=n.concat(d(e.props.children,t));else{var i=o(e),r=e.key;-1!==c(t,i)&&r&&n.push(r)}}),n}function f(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.type===h.ItemGroup){var o=f(n.props.children);if(o)return o}else if(!n.props.disabled)return n}return null}Object.defineProperty(t,"__esModule",{value:!0}),t.UNSELECTABLE_ATTRIBUTE=t.UNSELECTABLE_STYLE=void 0,t.getValuePropValue=o,t.getPropValue=i,t.isCombobox=r,t.isMultipleOrTags=l,t.isMultipleOrTagsOrCombobox=s,t.isSingleMode=a,t.toArray=u,t.preventDefaultEvent=p,t.findIndexInValueByKey=c,t.getSelectKeys=d,t.findFirstMenuItem=f;var h=n(815),v=n(0),m=function(e){return e&&e.__esModule?e:{default:e}}(v);t.UNSELECTABLE_STYLE={},t.UNSELECTABLE_ATTRIBUTE={unselectable:"unselectable"}},850:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.OptGroup=t.Option=void 0;var i=n(851),r=o(i),l=n(774),s=o(l),a=n(242),u=o(a);r.default.Option=s.default,r.default.OptGroup=u.default,t.Option=s.default,t.OptGroup=u.default,t.default=r.default},851:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(){}function r(){return"Microsoft Internet Explorer"==navigator.appName&&parseInt(navigator.appVersion.split(";")[1].replace(/[ ]/g,"").replace("MSIE",""))<=9}function l(e,t){return String((0,L.getPropValue)(t,this.props.optionFilterProp)).indexOf(e)>-1}function s(e,t){this[e]=t}Object.defineProperty(t,"__esModule",{value:!0});var a=n(9),u=o(a),p=n(1),c=o(p),d=n(0),f=o(d),h=n(10),v=o(h),m=n(52),y=o(m),g=n(7),b=o(g),T=n(242),C=o(T),E=n(17),S=o(E),P=n(244),w=o(P),O=n(818),M=o(O),_=n(97),N=o(_),I=n(144),D=n(30),V=o(D),L=n(814),k=n(865),A=o(k),F=n(873),x=o(F),B=void 0;d.PropTypes&&(B=d.PropTypes.oneOfType([d.PropTypes.string,d.PropTypes.shape({key:d.PropTypes.string,label:d.PropTypes.node})]));var U=f.default.createClass({displayName:"Select",propTypes:{defaultActiveFirstOption:d.PropTypes.bool,multiple:d.PropTypes.bool,filterOption:d.PropTypes.any,showSearch:d.PropTypes.bool,disabled:d.PropTypes.bool,allowClear:d.PropTypes.bool,showArrow:d.PropTypes.bool,tags:d.PropTypes.bool,prefixCls:d.PropTypes.string,className:d.PropTypes.string,transitionName:d.PropTypes.string,optionLabelProp:d.PropTypes.string,optionFilterProp:d.PropTypes.string,animation:d.PropTypes.string,choiceTransitionName:d.PropTypes.string,onChange:d.PropTypes.func,onBlur:d.PropTypes.func,onSelect:d.PropTypes.func,onSearch:d.PropTypes.func,placeholder:d.PropTypes.any,onDeselect:d.PropTypes.func,labelInValue:d.PropTypes.bool,value:d.PropTypes.oneOfType([B,d.PropTypes.arrayOf(B)]),defaultValue:d.PropTypes.oneOfType([B,d.PropTypes.arrayOf(B)]),dropdownStyle:d.PropTypes.object,maxTagTextLength:d.PropTypes.number},mixins:[x.default],getDefaultProps:function(){return{prefixCls:"rc-select",filterOption:l,defaultOpen:!1,labelInValue:!1,defaultActiveFirstOption:!0,showSearch:!0,allowClear:!1,placeholder:"",defaultValue:[],onChange:i,onBlur:i,onSelect:i,onSearch:i,onDeselect:i,showArrow:!0,dropdownMatchSelectWidth:!0,dropdownStyle:{},dropdownMenuStyle:{},optionFilterProp:"value",optionLabelProp:"value",notFoundContent:"Not Found"}},getInitialState:function(){var e=this.props,t=[];t="value"in e?(0,L.toArray)(e.value):(0,L.toArray)(e.defaultValue),t=this.addLabelToValue(e,t);var n="";e.combobox&&(n=t.length?String(t[0].key):""),this.saveInputRef=s.bind(this,"inputInstance"),this.saveInputMirrorRef=s.bind(this,"inputMirrorInstance");var o=e.open;return void 0===o&&(o=e.defaultOpen),e.open&&window.onWeaDialogOpen&&window.onWeaDialogOpen(),{value:t,inputValue:n,open:o}},componentWillReceiveProps:function(e){if("open"in e&&this.state.open!==e.visible&&(e.open?window.onWeaDialogOpen&&window.onWeaDialogOpen():window.onWeaDialogClose&&window.onWeaDialogClose()),"value"in e){var t=(0,L.toArray)(e.value);t=this.addLabelToValue(e,t),this.setState({value:t}),e.combobox&&this.setState({inputValue:t.length?String(t[0].key):""}),this.props.value!==e.value&&this.setState({open:!1})}},componentDidUpdate:function(){var e=this.state,t=this.props;if(e.open&&(0,L.isMultipleOrTags)(t)){var n=this.getInputDOMNode(),o=this.getInputMirrorDOMNode();n.value?(n.style.width="",n.style.width=o.clientWidth+"px"):n.style.width=""}if(!r()&&t.hasScroll){var i=jQuery((0,h.findDOMNode)(this.refs.scrollbar)),l=t.maxHeight||110,s=i.find(".ant-select-selection__rendered"),a=s&&s.height()||0;(e.value.length>5||a>l)&&setTimeout(function(){if(s){a=s.height();var e=a<l?a:l;s.find("li").length<2&&(e=28),i.css("height",e)}},0)}},componentWillUnmount:function(){this.clearBlurTime(),this.dropdownContainer&&(v.default.unmountComponentAtNode(this.dropdownContainer),V.default.getTop().document.body.removeChild(this.dropdownContainer),this.dropdownContainer=null)},onInputChange:function(e){var t=e.target.value,n=this.props;this.setInputValue(t),this.setState({open:!0}),(0,L.isCombobox)(n)&&this.fireChange([{key:t}])},onDropdownVisibleChange:function(e){this.setOpenState(e)},onInputBlur:function(){this.props.onInputBlur&&this.props.onInputBlur()},onKeyDown:function(e){if(!this.props.disabled){var t=e.keyCode;this.state.open&&!this.getInputDOMNode()?this.onInputKeyDown(e):t!==y.default.ENTER&&t!==y.default.DOWN||(this.setOpenState(!0),e.preventDefault())}},onInputKeyDown:function(e){var t=this.props;if(!t.disabled){var n=this.state,o=e.keyCode;if(!(0,L.isMultipleOrTags)(t)||e.target.value||o!==y.default.BACKSPACE){if(o===y.default.DOWN){if(!n.open)return this.openIfHasChildren(),e.preventDefault(),void e.stopPropagation()}else if(o===y.default.ESC)return void(n.open&&(this.setOpenState(!1),e.preventDefault(),e.stopPropagation()));if(n.open){var i=this.refs.trigger.getInnerMenu();i&&i.onKeyDown(e)&&(e.preventDefault(),e.stopPropagation())}}else{e.preventDefault();var r=n.value.concat();if(r.length){var l=r.pop();t.onDeselect(t.labelInValue?l:l.key),this.fireChange(r)}}}},onMenuSelect:function(e){var t=e.item,n=this.state.value,o=this.props,i=(0,L.getValuePropValue)(t),r=this.getLabelFromOption(t),l=i;if(o.labelInValue&&(l={key:l,label:r}),o.onSelect(l,t),(0,L.isMultipleOrTags)(o)){if(-1!==(0,L.findIndexInValueByKey)(n,i))return;n=n.concat([{key:i,label:r}])}else{if(n.length&&n[0].key===i)return void this.setOpenState(!1,!0);n=[{key:i,label:r}],this.setOpenState(!1,!0)}this.fireChange(n);var s=void 0;s=(0,L.isCombobox)(o)?(0,L.getPropValue)(t,o.optionLabelProp):"",this.setInputValue(s,!1),this.props.selectedClose&&this.setState({open:!1})},onMenuDeselect:function(e){var t=e.item;"click"===e.domEvent.type&&this.removeSelected((0,L.getValuePropValue)(t)),this.setInputValue("",!1)},onArrowClick:function(e){e.stopPropagation(),this.props.disabled||this.setOpenState(!this.state.open,!0)},onPlaceholderClick:function(){this.getInputDOMNode()&&this.getInputDOMNode().focus()},needFocus:!1,onOuterFocus:function(){var e=this;if(this.props.onBeforeFocusCheck){this.needFocus||(this.getInputDOMNode().blur(),this.needFocus=!0);var t=function(){e.needFocus&&(e.getInputDOMNode().focus(),e.needFocus=!1),e.onOuterFocusInner()};this.props.onBeforeFocusCheck(t,function(){e.getInputDOMNode().blur()})}else this.onOuterFocusInner()},onOuterFocusInner:function(){this.clearBlurTime(),this._focused=!0,this.updateFocusClassName(),this.props.onFocus&&this.props.onFocus()},onPopupFocus:function(){this.maybeFocus(!0,!0)},onOuterBlur:function(){var e=this;this.blurTimer=setTimeout(function(){e._focused=!1,e.updateFocusClassName();var t=e.props,n=e.state.value,o=e.state.inputValue;if((0,L.isSingleMode)(t)&&t.showSearch&&o&&t.defaultActiveFirstOption){var i=e._options||[];if(i.length){var r=(0,L.findFirstMenuItem)(i);r&&(n=[{key:r.key,label:e.getLabelFromOption(r)}],e.fireChange(n))}}else(0,L.isMultipleOrTags)(t)&&o&&(e.state.inputValue=e.getInputDOMNode().value="");t.onBlur(e.getVLForOnChange(n)),e.setOpenState(!1)},10)},onClearSelection:function(e){var t=this.props,n=this.state;if(!t.disabled){var o=n.inputValue,i=n.value;e.stopPropagation(),(o||i.length)&&(i.length&&this.fireChange([]),this.setOpenState(!1,!0),o&&this.setInputValue(""))}},onChoiceAnimationLeave:function(){this.refs.trigger&&this.refs.trigger.refs.trigger&&this.refs.trigger.refs.trigger.forcePopupAlign()},getLabelBySingleValue:function(e,t){var n=this;if(void 0===t)return null;var o=null;return f.default.Children.forEach(e,function(e){if(e.type===C.default){var i=n.getLabelBySingleValue(e.props.children,t);null!==i&&(o=i)}else(0,L.getValuePropValue)(e)===t&&(o=n.getLabelFromOption(e))}),o},getLabelFromOption:function(e){return(0,L.getPropValue)(e,this.props.optionLabelProp)},getLabelFromProps:function(e,t){return this.getLabelByValue(e.children,t)},getVLForOnChange:function(e){var t=e;return void 0!==t?(this.props.labelInValue||(t=t.map(function(e){return e.key})),(0,L.isMultipleOrTags)(this.props)?t:t[0]):t},getLabelByValue:function(e,t){var n=this.getLabelBySingleValue(e,t);return null===n?t:n},getDropdownContainer:function(){return this.dropdownContainer||(this.dropdownContainer=document.createElement("div"),V.default.getTop().document.body.appendChild(this.dropdownContainer),(0,I.loadCss)()),this.dropdownContainer},getPlaceholderElement:function(){var e=this.props,t=this.state,n=!1;t.inputValue&&(n=!0),t.value.length&&(n=!0),1!==t.value.length||t.value[0].key||(n=!1);var o=e.placeholder;return o?f.default.createElement("div",(0,c.default)({onMouseDown:L.preventDefaultEvent,style:(0,c.default)({display:n?"none":"block"},L.UNSELECTABLE_STYLE)},L.UNSELECTABLE_ATTRIBUTE,{onClick:this.onPlaceholderClick,className:e.prefixCls+"-selection__placeholder"}),o):null},onPasteClick:function(){var e=this.getInputDOMNode();if(e.pasteValue){var t=e.pasteValue,n=this.props;this.setInputValue(t),this.setState({open:!0}),(0,L.isCombobox)(n)&&this.fireChange([{key:t}])}e.pasteValue=""},getInputElement:function(){var e=this.props,t=this.state.inputValue,n=f.default.createElement("input",{ref:this.saveInputRef,onChange:this.onInputChange,onClick:this.onPasteClick,onKeyDown:this.onInputKeyDown,value:t,disabled:e.disabled||e.disabledInput,className:e.prefixCls+"-search__field",onBlur:this.onInputBlur});return e.disableInput&&(t="",n=f.default.createElement("input",{ref:this.saveInputRef,onKeyDown:this.onInputKeyDown,value:t,disabled:e.disabled,className:e.prefixCls+"-search__field",onBlur:this.onInputBlur})),f.default.createElement("div",{className:e.prefixCls+"-search__field__wrap"},n,f.default.createElement("span",{ref:this.saveInputMirrorRef,className:e.prefixCls+"-search__field__mirror"},t))},getInputDOMNode:function(){return this.inputInstance},getInputMirrorDOMNode:function(){return this.inputMirrorInstance},getPopupDOMNode:function(){return this.refs.trigger.getPopupDOMNode()},getPopupMenuComponent:function(){return this.refs.trigger.getInnerMenu()},setOpenState:function(e,t){var n=this,o=this.props;if(this.state.open===e)return void this.maybeFocus(e,t);var i={open:e};!e&&(0,L.isSingleMode)(o)&&o.showSearch&&this.setInputValue(""),e||this.maybeFocus(e,t),this.setState(i,function(){e&&n.maybeFocus(e,t)})},setInputValue:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.setState({inputValue:e}),t&&(this.props.onSearch(e),this.setState({open:!0}))},clearBlurTime:function(){this.blurTimer&&(clearTimeout(this.blurTimer),this.blurTimer=null)},updateFocusClassName:function(){var e=this.refs,t=this.props;this._focused?(0,w.default)(e.root).add(t.prefixCls+"-focused"):(0,w.default)(e.root).remove(t.prefixCls+"-focused")},maybeFocus:function(e,t){if(t||e){var n=this.getInputDOMNode(),o=document,i=o.activeElement;if(n&&(e||(0,L.isMultipleOrTagsOrCombobox)(this.props)))i!==n&&n.focus();else{var r=this.refs.selection;i!==r&&r.focus()}}},addLabelToValue:function(e,t){var n=this,o=t;return e.labelInValue?o.forEach(function(t){t.label=t.label||n.getLabelFromProps(e,t.key)}):o=o.map(function(t){return{key:t,label:n.getLabelFromProps(e,t)}}),o},removeSelected:function(e){var t=this.props;if(!t.disabled){var n=void 0,o=this.state.value.filter(function(t){return t.key===e&&(n=t.label),t.key!==e});if((0,L.isMultipleOrTags)(t)){var i=e;t.labelInValue&&(i={key:e,label:n}),t.onDeselect(i)}this.fireChange(o)}},openIfHasChildren:function(){var e=this.props;(f.default.Children.count(e.children)||(0,L.isSingleMode)(e))&&this.setOpenState(!0)},fireChange:function(e){var t=this.props;"value"in t||this.setState({value:e}),t.onChange(this.getVLForOnChange(e))},itemClickHandler:function(e,t){this.props.selectedClickCB&&this.props.selectedClickCB(e,t),e.preventDefault(),e.stopPropagation()},renderTopControlNode:function(){var e=this,t=this.state,n=t.value,o=t.open,i=t.inputValue,r=this.props,l=r.choiceTransitionName,s=r.prefixCls,a=r.maxTagTextLength,u=r.showSearch,p=s+"-selection__rendered",d=null;if((0,L.isSingleMode)(r)){var h=null;if(n.length){var v=!1,m=1;u&&o?(v=!i)&&(m=.4):v=!0,h=f.default.createElement("div",{key:"value",className:s+"-selection-selected-value",style:{display:v?"block":"none",opacity:m},title:n[0].label},n[0].label)}d=u?[h,f.default.createElement("li",{className:s+"-search "+s+"-search--inline",key:"input",style:{display:o?"block":"none"}},this.getInputElement())]:[h]}else{var y=[];(0,L.isMultipleOrTags)(r)&&(y=n.map(function(t){for(var n=t.label,o="",i=0;i<r.children.length;i++){var l=r.children[i];l.props.value===t.key&&(o=l.props.title)}a&&"string"===typeof n&&n.length>a&&(n=n.slice(0,a)+"...");var u=(0,L.toArray)(r.children).some(function(e){return(0,L.getValuePropValue)(e)===t.key&&e.props&&e.props.disabled}),p="";r.validate&&r.validate(t.key)&&(p=s+"-selection__choice__error");var d=u?s+"-selection__choice "+s+"-selection__choice__disabled":s+"-selection__choice "+p,h=u?null:f.default.createElement("span",{className:s+"-selection__choice__remove",onClick:e.removeSelected.bind(e,t.key)});return f.default.createElement("li",(0,c.default)({style:L.UNSELECTABLE_STYLE},L.UNSELECTABLE_ATTRIBUTE,{onMouseDown:L.preventDefaultEvent,className:d,key:t.key,title:o}),(0,N.default)(n)?f.default.createElement("div",{className:s+"-selection__choice__content"},f.default.createElement("a",{dangerouslySetInnerHTML:{__html:n},onClick:function(n){return e.itemClickHandler(n,t)}}),h):f.default.createElement("div",{className:s+"-selection__choice__content"},f.default.createElement("a",{onClick:function(n){return e.itemClickHandler(n,t)}},n),h))})),y.push(f.default.createElement("li",{className:s+"-search "+s+"-search--inline",key:"__input"},this.getInputElement())),d=(0,L.isMultipleOrTags)(r)&&l?f.default.createElement(S.default,{onLeave:this.onChoiceAnimationLeave,component:"ul",transitionName:l},y):f.default.createElement("ul",null,y)}return f.default.createElement("span",{style:{display:"block"},className:p,id:this.props.fieldName?this.props.fieldName+"span":"",name:this.props.fieldName?this.props.fieldName+"span":""},this.getPlaceholderElement(),d)},render:function(){var e,t=this.props,n=(0,L.isMultipleOrTags)(t),o=this.state,i=t.className,l=t.disabled,s=t.allowClear,a=t.prefixCls,p=this.renderTopControlNode(),d={},h=this.state.open,v=[];h&&(v=this.renderFilterOptions()),this._options=v,!h||!(0,L.isMultipleOrTagsOrCombobox)(t)&&t.showSearch||v.length||(h=!1),(0,L.isMultipleOrTagsOrCombobox)(t)||(d={onKeyDown:this.onKeyDown,tabIndex:0});var m=(e={},(0,u.default)(e,i,!!i),(0,u.default)(e,a,1),(0,u.default)(e,a+"-open",h),(0,u.default)(e,a+"-focused",h||!!this._focused),(0,u.default)(e,a+"-combobox",(0,L.isCombobox)(t)),(0,u.default)(e,a+"-disabled",l),(0,u.default)(e,a+"-enabled",!l),(0,u.default)(e,a+"-allow-clear",!!t.allowClear),e),y=(0,c.default)({},L.UNSELECTABLE_STYLE,{display:"none"});(o.inputValue||o.value.length)&&(y.display="block");var g=f.default.createElement("span",(0,c.default)({key:"clear",onMouseDown:L.preventDefaultEvent,style:y},L.UNSELECTABLE_ATTRIBUTE,{className:a+"-selection__clear",onClick:this.onClearSelection})),T=r(),C={},E=!1;return!T&&t.hasScroll&&(C.maxHeight=t.maxHeight||110,E=!0),f.default.createElement(A.default,{activeKey:t.activeKey,hideSelected:t.hideSelected,onPopupFocus:this.onPopupFocus,dropdownAlign:t.dropdownAlign,dropdownClassName:t.dropdownClassName,dropdownMatchSelectWidth:t.dropdownMatchSelectWidth,defaultActiveFirstOption:t.defaultActiveFirstOption,dropdownMenuStyle:t.dropdownMenuStyle,transitionName:t.transitionName,animation:t.animation,prefixCls:t.prefixCls,dropdownStyle:t.dropdownStyle,combobox:t.combobox,showSearch:t.showSearch,options:v,multiple:n,disabled:l,visible:h,inputValue:o.inputValue,value:o.value,onDropdownVisibleChange:this.onDropdownVisibleChange,getPopupContainer:t.getPopupContainer,onMenuSelect:this.onMenuSelect,onMenuDeselect:this.onMenuDeselect,ref:"trigger"},f.default.createElement("div",{style:t.style,ref:"root",onBlur:this.onOuterBlur,onFocus:this.onOuterFocus,className:(0,b.default)(m)},E?f.default.createElement("div",(0,c.default)({style:C,ref:"selection",key:"selection",className:a+"-selection\n "+a+"-selection--"+(n?"multiple":"single"),role:"combobox","aria-autocomplete":"list","aria-haspopup":"true","aria-expanded":h},d),f.default.createElement(M.default,{ref:"scrollbar"},p,s&&!n?g:null,n||!t.showArrow?null:f.default.createElement("span",(0,c.default)({key:"arrow",className:a+"-arrow "+(h?"icon-coms-up2":"icon-coms-down2"),style:L.UNSELECTABLE_STYLE},L.UNSELECTABLE_ATTRIBUTE,{onMouseDown:L.preventDefaultEvent,onClick:this.onArrowClick}),f.default.createElement("b",null)))):f.default.createElement("div",(0,c.default)({style:C,ref:"selection",key:"selection",className:a+"-selection\n "+a+"-selection--"+(n?"multiple":"single"),role:"combobox","aria-autocomplete":"list","aria-haspopup":"true","aria-expanded":h},d),p,s&&!n?g:null,n||!t.showArrow?null:f.default.createElement("span",(0,c.default)({key:"arrow",className:a+"-arrow "+(h?"icon-coms-up2":"icon-coms-down2"),style:L.UNSELECTABLE_STYLE},L.UNSELECTABLE_ATTRIBUTE,{onMouseDown:L.preventDefaultEvent,onClick:this.onArrowClick}),f.default.createElement("b",null)))))}});t.default=U},865:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),r=o(i),l=n(11),s=o(l),a=n(1),u=o(a),p=n(136),c=o(p),d=n(0),f=o(d),h=n(7),v=o(h),m=n(866),y=o(m),g=n(10),b=o(g),T=n(814),C={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:0,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}},E=f.default.createClass({displayName:"SelectTrigger",propTypes:{onPopupFocus:d.PropTypes.func,dropdownMatchSelectWidth:d.PropTypes.bool,dropdownAlign:d.PropTypes.object,visible:d.PropTypes.bool,disabled:d.PropTypes.bool,showSearch:d.PropTypes.bool,dropdownClassName:d.PropTypes.string,multiple:d.PropTypes.bool,inputValue:d.PropTypes.string,filterOption:d.PropTypes.any,options:d.PropTypes.any,prefixCls:d.PropTypes.string,popupClassName:d.PropTypes.string,children:d.PropTypes.any},componentDidUpdate:function(){var e=this.props,t=e.visible,n=e.dropdownMatchSelectWidth;if(t){var o=this.getPopupDOMNode();if(o){var i=n?"width":"minWidth";o.style[i]=b.default.findDOMNode(this).offsetWidth+"px"}}},getInnerMenu:function(){return this.popupMenu&&this.popupMenu.refs.menu},getPopupDOMNode:function(){return this.refs.trigger.getPopupDomNode()},getDropdownElement:function(e){var t=this.props;return f.default.createElement(y.default,(0,u.default)({ref:this.saveMenu},e,{activeKey:t.activeKey,hideSelected:t.hideSelected,prefixCls:this.getDropdownPrefixCls(),onMenuSelect:t.onMenuSelect,onMenuDeselect:t.onMenuDeselect,value:t.value,defaultActiveFirstOption:t.defaultActiveFirstOption,dropdownMenuStyle:t.dropdownMenuStyle}))},getDropdownTransitionName:function(){var e=this.props,t=e.transitionName;return!t&&e.animation&&(t=this.getDropdownPrefixCls()+"-"+e.animation),t},getDropdownPrefixCls:function(){return this.props.prefixCls+"-dropdown"},saveMenu:function(e){this.popupMenu=e},render:function(){var e,t=this.props,n=t.onPopupFocus,o=(0,s.default)(t,["onPopupFocus"]),i=o.multiple,l=o.visible,a=o.inputValue,p=o.dropdownAlign,d=o.disabled,h=o.showSearch,m=o.dropdownClassName,y=this.getDropdownPrefixCls(),g=(e={},(0,r.default)(e,m,!!m),(0,r.default)(e,y+"--"+(i?"multiple":"single"),1),(0,r.default)(e,"wea-hide-selected",o.hideSelected),e),b=this.getDropdownElement({menuItems:o.options,onPopupFocus:n,multiple:i,inputValue:a,visible:l}),E=void 0;return E=d?[]:(0,T.isSingleMode)(o)&&!h?["click"]:["blur"],f.default.createElement(c.default,(0,u.default)({},o,{showAction:d?[]:["click"],hideAction:E,ref:"trigger",popupPlacement:"bottomLeft",builtinPlacements:C,prefixCls:y,popupTransitionName:this.getDropdownTransitionName(),onPopupVisibleChange:o.onDropdownVisibleChange,popup:b,popupAlign:p,popupVisible:l,getPopupContainer:o.getPopupContainer,popupClassName:(0,v.default)(g),popupStyle:o.dropdownStyle}),o.children)}});t.default=E},866:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),r=o(i),l=n(0),s=o(l),a=n(10),u=n(814),p=n(245),c=o(p),d=n(140),f=o(d),h=n(867),v=o(h),m=s.default.createClass({displayName:"DropdownMenu",propTypes:{defaultActiveFirstOption:l.PropTypes.bool,value:l.PropTypes.any,dropdownMenuStyle:l.PropTypes.object,multiple:l.PropTypes.bool,onPopupFocus:l.PropTypes.func,onMenuDeSelect:l.PropTypes.func,onMenuSelect:l.PropTypes.func,prefixCls:l.PropTypes.string,menuItems:l.PropTypes.any,inputValue:l.PropTypes.string,visible:l.PropTypes.bool},componentWillMount:function(){this.lastInputValue=this.props.inputValue},componentDidMount:function(){this.scrollActiveItemToView(),this.lastVisible=this.props.visible},componentDidUpdate:function(e){var t=this.props;!e.visible&&t.visible&&this.scrollActiveItemToView(),this.lastVisible=t.visible,this.lastInputValue=t.inputValue},scrollActiveItemToView:function(){var e=(0,a.findDOMNode)(this.firstActiveItem);e&&(0,f.default)(e,(0,a.findDOMNode)(this.refs.menu),{onlyScrollIfNeeded:!0})},renderMenu:function(){var e=this,t=this.props,n=t.menuItems,o=t.defaultActiveFirstOption,i=t.value,a=t.prefixCls,d=t.multiple,f=t.onMenuSelect,h=t.inputValue;if(n&&n.length){var m={};d?(m.onDeselect=t.onMenuDeselect,m.onSelect=f):m.onClick=f;var y=(0,u.getSelectKeys)(n,i),g={},b=n;if(y.length){t.visible&&!this.lastVisible&&(g.activeKey=y[0]);var T=!1,C=function(t){return T||-1===y.indexOf(t.key)?t:(T=!0,(0,l.cloneElement)(t,{ref:function(t){e.firstActiveItem=t}}))};b=n.map(function(e){if(e.type===p.ItemGroup){var t=e.props.children.map(C);return(0,l.cloneElement)(e,{},t)}return C(e)})}h!==this.lastInputValue&&(g.activeKey=""),"activeKey"in this.props&&(g.activeKey=this.props.activeKey),t.visible||(g.activeKey=void 0);var E="";return(0,v.default)(y).length===b.length&&(E="no-border"),s.default.createElement(c.default,(0,r.default)({className:""+E,ref:"menu",style:this.props.dropdownMenuStyle,defaultActiveFirst:o},g,{multiple:d,focusable:!1},m,{selectedKeys:y,prefixCls:a+"-menu",visible:t.visible}),b)}return null},render:function(){return s.default.createElement("div",{style:{overflow:"auto"},onFocus:this.props.onPopupFocus,onMouseDown:u.preventDefaultEvent},this.renderMenu())}});t.default=m},867:function(e,t,n){function o(e){return e&&e.length?i(e):[]}var i=n(868);e.exports=o},868:function(e,t,n){function o(e,t,n){var o=-1,c=r,d=e.length,f=!0,h=[],v=h;if(n)f=!1,c=l;else if(d>=p){var m=t?null:a(e);if(m)return u(m);f=!1,c=s,v=new i}else v=t?[]:h;e:for(;++o<d;){var y=e[o],g=t?t(y):y;if(y=n||0!==y?y:0,f&&g===g){for(var b=v.length;b--;)if(v[b]===g)continue e;t&&v.push(g),h.push(y)}else c(v,g,n)||(v!==h&&v.push(g),h.push(y))}return h}var i=n(255),r=n(869),l=n(870),s=n(256),a=n(871),u=n(246),p=200;e.exports=o},869:function(e,t,n){function o(e,t){return!!(null==e?0:e.length)&&i(e,t,0)>-1}var i=n(95);e.exports=o},870:function(e,t){function n(e,t,n){for(var o=-1,i=null==e?0:e.length;++o<i;)if(n(t,e[o]))return!0;return!1}e.exports=n},871:function(e,t,n){var o=n(257),i=n(872),r=n(246),l=o&&1/r(new o([,-0]))[1]==1/0?function(e){return new o(e)}:i;e.exports=l},872:function(e,t){function n(){}e.exports=n},873:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),r=o(i),l=n(0),s=o(l),a=n(814),u=n(245),p=n(18),c=o(p),d=n(242),f=o(d),h=n(774),v=o(h);t.default={filterOption:function(e,t){if(!e)return!0;var n=this.props.filterOption;return!n||!t.props.disabled&&n.call(this,e,t)},renderFilterOptions:function(e){return this.renderFilterOptionsFromChildren(this.props.children,!0,e)},renderFilterOptionsFromChildren:function(e,t,n){var o=this,i=[],l=this.props,p=void 0===n?this.state.inputValue:n,d=[],h=l.tags;if(s.default.Children.forEach(e,function(e){if(e.type!==f.default){(0,c.default)(e.type===v.default,"the children of `Select` should be `Select.Option` or `Select.OptGroup`, instead of `"+(e.type.name||e.type.displayName||e.type)+"`.");var t=(0,a.getValuePropValue)(e);o.filterOption(p,e)&&i.push(s.default.createElement(u.Item,(0,r.default)({style:a.UNSELECTABLE_STYLE,attribute:a.UNSELECTABLE_ATTRIBUTE,value:t,key:t},e.props))),h&&!e.props.disabled&&d.push(t)}else{var n=o.renderFilterOptionsFromChildren(e.props.children,!1);if(n.length){var l=e.props.label,m=e.key;m||"string"!==typeof l?!l&&m&&(l=m):m=l,i.push(s.default.createElement(u.ItemGroup,{key:m,title:l},n))}}}),h){var m=this.state.value||[];if(m=m.filter(function(e){return-1===d.indexOf(e.key)&&(!p||String(e.key).indexOf(String(p))>-1)}),i=i.concat(m.map(function(e){var t=e.key;return s.default.createElement(u.Item,{style:a.UNSELECTABLE_STYLE,attribute:a.UNSELECTABLE_ATTRIBUTE,value:t,key:t},t)})),p){i.every(function(e){return(0,a.getValuePropValue)(e)!==p})&&i.unshift(s.default.createElement(u.Item,{style:a.UNSELECTABLE_STYLE,attribute:a.UNSELECTABLE_ATTRIBUTE,value:p,key:p},p))}}return!i.length&&t&&l.notFoundContent&&(i=[s.default.createElement(u.Item,{style:a.UNSELECTABLE_STYLE,attribute:a.UNSELECTABLE_ATTRIBUTE,disabled:!0,value:"NOT_FOUND",key:"NOT_FOUND"},l.notFoundContent)]),i}}}});
//# sourceMappingURL=3.chunk.js.map?v=bafed2af