Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

2 lignes
16 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8691],{66247:function(){},77933:function(Re,de,c){"use strict";c.d(de,{Z:function(){return Ge}});var R=c(96156),M=c(85061),C=c(22122),G=c(6610),H=c(5991),J=c(10379),Q=c(54070),ue=c(94184),w=c.n(ue),i=c(67294),ve=c(53124),Ae=c(88258),Le=c(65223),he=c(42051),fe=c(85636),me=c(9708),Ze=c(57254),xe=c(98423),ge=c(9676),Te=c(13013),ye=c(28682),be=c(96159),Oe=c(90484),ke=c(36138),Pe=c(93355),De=c(73171),Ne=c(34952),$e=function(u){var f,d=u.renderedText,e=u.renderedEl,l=u.item,o=u.checked,n=u.disabled,a=u.prefixCls,t=u.onClick,r=u.onRemove,s=u.showRemove,h=w()((f={},(0,R.Z)(f,"".concat(a,"-content-item"),!0),(0,R.Z)(f,"".concat(a,"-content-item-disabled"),n||l.disabled),(0,R.Z)(f,"".concat(a,"-content-item-checked"),o),f)),v;return(typeof d=="string"||typeof d=="number")&&(v=String(d)),i.createElement(he.Z,{componentName:"Transfer",defaultLocale:fe.Z.Transfer},function(g){var y={className:h,title:v},S=i.createElement("span",{className:"".concat(a,"-content-item-text")},e);return s?i.createElement("li",(0,C.Z)({},y),S,i.createElement(Ne.Z,{disabled:n||l.disabled,className:"".concat(a,"-content-item-remove"),"aria-label":g.remove,onClick:function(){r==null||r(l)}},i.createElement(De.Z,null))):(y.onClick=n||l.disabled?void 0:function(){return t(l)},i.createElement("li",(0,C.Z)({},y),i.createElement(ge.Z,{className:"".concat(a,"-checkbox"),checked:o,disabled:n||l.disabled}),S))})},Fe=i.memo($e),Be=(0,Pe.b)("handleFilter","handleClear","checkedKeys");function ie(m){if(!m)return null;var u={pageSize:10,simple:!0,showSizeChanger:!1,showLessItems:!1};return(0,Oe.Z)(m)==="object"?(0,C.Z)((0,C.Z)({},u),m):u}var Me=function(m){(0,J.Z)(f,m);var u=(0,Q.Z)(f);function f(){var d;return(0,G.Z)(this,f),d=u.apply(this,arguments),d.state={current:1},d.onItemSelect=function(e){var l=d.props,o=l.onItemSelect,n=l.selectedKeys,a=n.indexOf(e.key)>=0;o(e.key,!a)},d.onItemRemove=function(e){var l=d.props.onItemRemove;l==null||l([e.key])},d.onPageChange=function(e){d.setState({current:e})},d.getItems=function(){var e=d.state.current,l=d.props,o=l.pagination,n=l.filteredRenderItems,a=ie(o),t=n;return a&&(t=n.slice((e-1)*a.pageSize,e*a.pageSize)),t},d}return(0,H.Z)(f,[{key:"render",value:function(){var e=this,l=this.state.current,o=this.props,n=o.prefixCls,a=o.onScroll,t=o.filteredRenderItems,r=o.selectedKeys,s=o.disabled,h=o.showRemove,v=o.pagination,g=ie(v),y=null;return g&&(y=i.createElement(ke.Z,{simple:g.simple,showSizeChanger:g.showSizeChanger,showLessItems:g.showLessItems,size:"small",disabled:s,className:"".concat(n,"-pagination"),total:t.length,pageSize:g.pageSize,current:l,onChange:this.onPageChange})),i.createElement(i.Fragment,null,i.createElement("ul",{className:w()("".concat(n,"-content"),(0,R.Z)({},"".concat(n,"-content-show-remove"),h)),onScroll:a},this.getItems().map(function(S){var A=S.renderedEl,p=S.renderedText,K=S.item,I=K.disabled,L=r.indexOf(K.key)>=0;return i.createElement(Fe,{disabled:s||I,key:K.key,item:K,renderedText:p,renderedEl:A,checked:L,prefixCls:n,onClick:e.onItemSelect,onRemove:e.onItemRemove,showRemove:h})})),y)}}],[{key:"getDerivedStateFromProps",value:function(e,l){var o=e.filteredRenderItems,n=e.pagination,a=l.current,t=ie(n);if(t){var r=Math.ceil(o.length/t.pageSize);if(a>r)return{current:r}}return null}}]),f}(i.Component),we=Me,ze=c(76570),Ue=c(4107);function pe(m){var u=m.placeholder,f=u===void 0?"":u,d=m.value,e=m.prefixCls,l=m.disabled,o=m.onChange,n=m.handleClear,a=i.useCallback(function(t){o==null||o(t),t.target.value===""&&(n==null||n())},[o]);return i.createElement(Ue.Z,{placeholder:f,className:e,value:d,onChange:a,disabled:l,allowClear:!0,prefix:i.createElement(ze.Z,null)})}var We=function(){return null};function Ve(m){return!!(m&&!(0,be.l$)(m)&&Object.prototype.toString.call(m)==="[object Object]")}function z(m){return m.filter(function(u){return!u.disabled}).map(function(u){return u.key})}var X=function(m){(0,J.Z)(f,m);var u=(0,Q.Z)(f);function f(d){var e;return(0,G.Z)(this,f),e=u.call(this,d),e.defaultListBodyRef=i.createRef(),e.handleFilter=function(l){var o=e.props.handleFilter,n=l.target.value;e.setState({filterValue:n}),o(l)},e.handleClear=function(){var l=e.props.handleClear;e.setState({filterValue:""}),l()},e.matchFilter=function(l,o){var n=e.state.filterValue,a=e.props.filterOption;return a?a(n,o):l.indexOf(n)>=0},e.renderListBody=function(l,o){var n=l?l(o):null,a=!!n;return a||(n=i.createElement(we,(0,C.Z)({ref:e.defaultListBodyRef},o))),{customize:a,bodyContent:n}},e.renderItem=function(l){var o=e.props.render,n=o===void 0?We:o,a=n(l),t=Ve(a);return{renderedText:t?a.value:a,renderedEl:t?a.label:a,item:l}},e.getSelectAllLabel=function(l,o){var n=e.props,a=n.itemsUnit,t=n.itemUnit,r=n.selectAllLabel;if(r)return typeof r=="function"?r({selectedCount:l,totalCount:o}):r;var s=o>1?a:t;return i.createElement(i.Fragment,null,(l>0?"".concat(l,"/"):"")+o," ",s)},e.state={filterValue:""},e}return(0,H.Z)(f,[{key:"componentWillUnmount",value:function(){clearTimeout(this.triggerScrollTimer)}},{key:"getCheckStatus",value:function(e){var l=this.props.checkedKeys;return l.length===0?"none":e.every(function(o){return l.indexOf(o.key)>=0||!!o.disabled})?"all":"part"}},{key:"getFilteredItems",value:function(e,l){var o=this,n=[],a=[];return e.forEach(function(t){var r=o.renderItem(t),s=r.renderedText;if(l&&!o.matchFilter(s,t))return null;n.push(t),a.push(r)}),{filteredItems:n,filteredRenderItems:a}}},{key:"getListBody",value:function(e,l,o,n,a,t,r,s,h,v){var g=this,y=h?i.createElement("div",{className:"".concat(e,"-body-search-wrapper")},i.createElement(pe,{prefixCls:"".concat(e,"-search"),onChange:this.handleFilter,handleClear:this.handleClear,placeholder:l,value:o,disabled:v})):null,S=this.renderListBody(s,(0,C.Z)((0,C.Z)({},(0,xe.Z)(this.props,Be)),{filteredItems:n,filteredRenderItems:t,selectedKeys:r})),A=S.bodyContent,p=S.customize,K=function(){var T=g.props.direction==="left"?0:1;return Array.isArray(a)?a[T]:a},I;return p?I=i.createElement("div",{className:"".concat(e,"-body-customize-wrapper")},A):I=n.length?A:i.createElement("div",{className:"".concat(e,"-body-not-found")},K()),i.createElement("div",{className:w()(h?"".concat(e,"-body ").concat(e,"-body-with-search"):"".concat(e,"-body"))},y,I)}},{key:"getCheckBox",value:function(e){var l=e.filteredItems,o=e.onItemSelectAll,n=e.disabled,a=e.prefixCls,t=this.getCheckStatus(l),r=t==="all",s=i.createElement(ge.Z,{disabled:n,checked:r,indeterminate:t==="part",className:"".concat(a,"-checkbox"),onChange:function(){o(l.filter(function(v){return!v.disabled}).map(function(v){var g=v.key;return g}),!r)}});return s}},{key:"render",value:function(){var e,l=this,o=this.state.filterValue,n=this.props,a=n.prefixCls,t=n.dataSource,r=n.titleText,s=n.checkedKeys,h=n.disabled,v=n.footer,g=n.showSearch,y=n.style,S=n.searchPlaceholder,A=n.notFoundContent,p=n.selectAll,K=n.selectCurrent,I=n.selectInvert,L=n.removeAll,T=n.removeCurrent,P=n.renderList,Z=n.onItemSelectAll,b=n.onItemRemove,Y=n.showSelectAll,q=Y===void 0?!0:Y,_=n.showRemove,D=n.pagination,ee=n.direction,N=v&&(v.length<2?v(this.props):v(this.props,{direction:ee})),te=w()(a,(e={},(0,R.Z)(e,"".concat(a,"-with-pagination"),!!D),(0,R.Z)(e,"".concat(a,"-with-footer"),!!N),e)),V=this.getFilteredItems(t,o),$=V.filteredItems,se=V.filteredRenderItems,x=this.getListBody(a,S,o,$,A,se,s,P,g,h),j=N?i.createElement("div",{className:"".concat(a,"-footer")},N):null,ne=!_&&!D&&this.getCheckBox({filteredItems:$,onItemSelectAll:Z,disabled:h,prefixCls:a}),U=null;if(_){var re=[D?{key:"removeCurrent",onClick:function(){var E,k=z((((E=l.defaultListBodyRef.current)===null||E===void 0?void 0:E.getItems())||[]).map(function(B){return B.item}));b==null||b(k)},label:T}:null,{key:"removeAll",onClick:function(){b==null||b(z($))},label:L}].filter(function(O){return O});U=i.createElement(ye.Z,{items:re})}else{var ce=[{key:"selectAll",onClick:function(){var E=z($);Z(E,E.length!==s.length)},label:p},D?{key:"selectCurrent",onClick:function(){var E,k=((E=l.defaultListBodyRef.current)===null||E===void 0?void 0:E.getItems())||[];Z(z(k.map(function(B){return B.item})),!0)},label:K}:null,{key:"selectInvert",onClick:function(){var E,k;D?k=z((((E=l.defaultListBodyRef.current)===null||E===void 0?void 0:E.getItems())||[]).map(function(F){return F.item})):k=z($);var B=new Set(s),ae=[],oe=[];k.forEach(function(F){B.has(F)?oe.push(F):ae.push(F)}),Z(ae,!0),Z(oe,!1)},label:I}];U=i.createElement(ye.Z,{items:ce})}var le=i.createElement(Te.Z,{className:"".concat(a,"-header-dropdown"),overlay:U,disabled:h},i.createElement(Ze.Z,null));return i.createElement("div",{className:te,style:y},i.createElement("div",{className:"".concat(a,"-header")},q?i.createElement(i.Fragment,null,ne,le):null,i.createElement("span",{className:"".concat(a,"-header-selected")},this.getSelectAllLabel(s.length,$.length)),i.createElement("span",{className:"".concat(a,"-header-title")},r)),x,j)}}]),f}(i.PureComponent);X.defaultProps={dataSource:[],titleText:"",showSearch:!1};var Se=c(67724),Ce=c(8812),Ee=c(71577),je=function(u){var f=u.disabled,d=u.moveToLeft,e=u.moveToRight,l=u.leftArrowText,o=l===void 0?"":l,n=u.rightArrowText,a=n===void 0?"":n,t=u.leftActive,r=u.rightActive,s=u.className,h=u.style,v=u.direction,g=u.oneWay;return i.createElement("div",{className:s,style:h},i.createElement(Ee.Z,{type:"primary",size:"small",disabled:f||!r,onClick:e,icon:v!=="rtl"?i.createElement(Ce.Z,null):i.createElement(Se.Z,null)},a),!g&&i.createElement(Ee.Z,{type:"primary",size:"small",disabled:f||!t,onClick:d,icon:v!=="rtl"?i.createElement(Se.Z,null):i.createElement(Ce.Z,null)},o))},Ie=je,W=function(m){(0,J.Z)(f,m);var u=(0,Q.Z)(f);function f(d){var e;(0,G.Z)(this,f),e=u.call(this,d),e.separatedDataSource=null,e.setStateKeys=function(t,r){t==="left"?e.setState(function(s){var h=s.sourceSelectedKeys;return{sourceSelectedKeys:typeof r=="function"?r(h||[]):r}}):e.setState(function(s){var h=s.targetSelectedKeys;return{targetSelectedKeys:typeof r=="function"?r(h||[]):r}})},e.getLocale=function(t,r){return(0,C.Z)((0,C.Z)((0,C.Z)({},t),{notFoundContent:r("Transfer")}),e.props.locale)},e.moveTo=function(t){var r=e.props,s=r.targetKeys,h=s===void 0?[]:s,v=r.dataSource,g=v===void 0?[]:v,y=r.onChange,S=e.state,A=S.sourceSelectedKeys,p=S.targetSelectedKeys,K=t==="right"?A:p,I=K.filter(function(P){return!g.some(function(Z){return!!(P===Z.key&&Z.disabled)})}),L=t==="right"?I.concat(h):h.filter(function(P){return I.indexOf(P)===-1}),T=t==="right"?"left":"right";e.setStateKeys(T,[]),e.handleSelectChange(T,[]),y==null||y(L,t,I)},e.moveToLeft=function(){return e.moveTo("left")},e.moveToRight=function(){return e.moveTo("right")},e.onItemSelectAll=function(t,r,s){e.setStateKeys(t,function(h){var v=[];return s?v=Array.from(new Set([].concat((0,M.Z)(h),(0,M.Z)(r)))):v=h.filter(function(g){return r.indexOf(g)===-1}),e.handleSelectChange(t,v),v})},e.onLeftItemSelectAll=function(t,r){return e.onItemSelectAll("left",t,r)},e.onRightItemSelectAll=function(t,r){return e.onItemSelectAll("right",t,r)},e.handleFilter=function(t,r){var s=e.props.onSearch,h=r.target.value;s==null||s(t,h)},e.handleLeftFilter=function(t){return e.handleFilter("left",t)},e.handleRightFilter=function(t){return e.handleFilter("right",t)},e.handleClear=function(t){var r=e.props.onSearch;r==null||r(t,"")},e.handleLeftClear=function(){return e.handleClear("left")},e.handleRightClear=function(){return e.handleClear("right")},e.onItemSelect=function(t,r,s){var h=e.state,v=h.sourceSelectedKeys,g=h.targetSelectedKeys,y=t==="left"?(0,M.Z)(v):(0,M.Z)(g),S=y.indexOf(r);S>-1&&y.splice(S,1),s&&y.push(r),e.handleSelectChange(t,y),e.props.selectedKeys||e.setStateKeys(t,y)},e.onLeftItemSelect=function(t,r){return e.onItemSelect("left",t,r)},e.onRightItemSelect=function(t,r){return e.onItemSelect("right",t,r)},e.onRightItemRemove=function(t){var r=e.props,s=r.targetKeys,h=s===void 0?[]:s,v=r.onChange;e.setStateKeys("right",[]),v==null||v(h.filter(function(g){return!t.includes(g)}),"left",(0,M.Z)(t))},e.handleScroll=function(t,r){var s=e.props.onScroll;s==null||s(t,r)},e.handleLeftScroll=function(t){return e.handleScroll("left",t)},e.handleRightScroll=function(t){return e.handleScroll("right",t)},e.handleListStyle=function(t,r){return typeof t=="function"?t({direction:r}):t},e.renderTransfer=function(t){return i.createElement(ve.C,null,function(r){var s=r.getPrefixCls,h=r.renderEmpty,v=r.direction;return i.createElement(Le.aM.Consumer,null,function(g){var y,S=g.hasFeedback,A=g.status,p=e.props,K=p.prefixCls,I=p.className,L=p.disabled,T=p.operations,P=T===void 0?[]:T,Z=p.showSearch,b=p.footer,Y=p.style,q=p.listStyle,_=p.operationStyle,D=p.filterOption,ee=p.render,N=p.children,te=p.showSelectAll,V=p.oneWay,$=p.pagination,se=p.status,x=s("transfer",K),j=e.getLocale(t,h||Ae.Z),ne=e.state,U=ne.sourceSelectedKeys,re=ne.targetSelectedKeys,ce=(0,me.F)(A,se),le=!N&&$,O=e.separateDataSource(),E=O.leftDataSource,k=O.rightDataSource,B=re.length>0,ae=U.length>0,oe=w()(x,(y={},(0,R.Z)(y,"".concat(x,"-disabled"),L),(0,R.Z)(y,"".concat(x,"-customize-list"),!!N),(0,R.Z)(y,"".concat(x,"-rtl"),v==="rtl"),y),(0,me.Z)(x,ce,S),I),F=e.getTitles(j),Ke=e.props.selectAllLabels||[];return i.createElement("div",{className:oe,style:Y},i.createElement(X,(0,C.Z)({prefixCls:"".concat(x,"-list"),titleText:F[0],dataSource:E,filterOption:D,style:e.handleListStyle(q,"left"),checkedKeys:U,handleFilter:e.handleLeftFilter,handleClear:e.handleLeftClear,onItemSelect:e.onLeftItemSelect,onItemSelectAll:e.onLeftItemSelectAll,render:ee,showSearch:Z,renderList:N,footer:b,onScroll:e.handleLeftScroll,disabled:L,direction:v==="rtl"?"right":"left",showSelectAll:te,selectAllLabel:Ke[0],pagination:le},j)),i.createElement(Ie,{className:"".concat(x,"-operation"),rightActive:ae,rightArrowText:P[0],moveToRight:e.moveToRight,leftActive:B,leftArrowText:P[1],moveToLeft:e.moveToLeft,style:_,disabled:L,direction:v,oneWay:V}),i.createElement(X,(0,C.Z)({prefixCls:"".concat(x,"-list"),titleText:F[1],dataSource:k,filterOption:D,style:e.handleListStyle(q,"right"),checkedKeys:re,handleFilter:e.handleRightFilter,handleClear:e.handleRightClear,onItemSelect:e.onRightItemSelect,onItemSelectAll:e.onRightItemSelectAll,onItemRemove:e.onRightItemRemove,render:ee,showSearch:Z,renderList:N,footer:b,onScroll:e.handleRightScroll,disabled:L,direction:v==="rtl"?"left":"right",showSelectAll:te,selectAllLabel:Ke[1],showRemove:V,pagination:le},j)))})})};var l=d.selectedKeys,o=l===void 0?[]:l,n=d.targetKeys,a=n===void 0?[]:n;return e.state={sourceSelectedKeys:o.filter(function(t){return a.indexOf(t)===-1}),targetSelectedKeys:o.filter(function(t){return a.indexOf(t)>-1})},e}return(0,H.Z)(f,[{key:"getTitles",value:function(e){var l;return(l=this.props.titles)!==null&&l!==void 0?l:e.titles}},{key:"handleSelectChange",value:function(e,l){var o=this.state,n=o.sourceSelectedKeys,a=o.targetSelectedKeys,t=this.props.onSelectChange;!t||(e==="left"?t(l,a):t(n,l))}},{key:"separateDataSource",value:function(){var e=this.props,l=e.dataSource,o=e.rowKey,n=e.targetKeys,a=n===void 0?[]:n,t=[],r=new Array(a.length);return l.forEach(function(s){o&&(s=(0,C.Z)((0,C.Z)({},s),{key:o(s)}));var h=a.indexOf(s.key);h!==-1?r[h]=s:t.push(s)}),{leftDataSource:t,rightDataSource:r}}},{key:"render",value:function(){return i.createElement(he.Z,{componentName:"Transfer",defaultLocale:fe.Z.Transfer},this.renderTransfer)}}],[{key:"getDerivedStateFromProps",value:function(e){var l=e.selectedKeys,o=e.targetKeys,n=e.pagination,a=e.children;if(l){var t=o||[];return{sourceSelectedKeys:l.filter(function(r){return!t.includes(r)}),targetSelectedKeys:l.filter(function(r){return t.includes(r)})}}return null}}]),f}(i.Component);W.List=X,W.Operation=Ie,W.Search=pe,W.defaultProps={dataSource:[],locale:{},showSearch:!1,listStyle:function(){}};var Ge=W},58996:function(Re,de,c){"use strict";var R=c(38663),M=c.n(R),C=c(66247),G=c.n(C),H=c(57663),J=c(63185),Q=c(59250),ue=c(13254),w=c(47673),i=c(30887),ve=c(14781)}}]);