1 |
- "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2487],{2487:function(Xe,ie,r){r.d(ie,{Z:function(){return ze}});var K=r(74902),n=r(67294),ne=r(93967),L=r.n(ne),ae=r(38780),U=r(74443),Z=r(53124),le=r(88258),re=r(98675),oe=r(92820),se=r(25378),ce=r(84611),de=r(57381);const A=n.createContext({}),Fe=A.Consumer;var me=r(96159),ge=r(21584),Y=function(t,e){var i={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&e.indexOf(a)<0&&(i[a]=t[a]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,a=Object.getOwnPropertySymbols(t);l<a.length;l++)e.indexOf(a[l])<0&&Object.prototype.propertyIsEnumerable.call(t,a[l])&&(i[a[l]]=t[a[l]]);return i};const fe=t=>{var{prefixCls:e,className:i,avatar:a,title:l,description:c}=t,$=Y(t,["prefixCls","className","avatar","title","description"]);const{getPrefixCls:S}=(0,n.useContext)(Z.E_),g=S("list",e),z=L()(`${g}-item-meta`,i),b=n.createElement("div",{className:`${g}-item-meta-content`},l&&n.createElement("h4",{className:`${g}-item-meta-title`},l),c&&n.createElement("div",{className:`${g}-item-meta-description`},c));return n.createElement("div",Object.assign({},$,{className:z}),a&&n.createElement("div",{className:`${g}-item-meta-avatar`},a),(l||c)&&b)},Q=n.forwardRef((t,e)=>{const{prefixCls:i,children:a,actions:l,extra:c,styles:$,className:S,classNames:g,colStyle:z}=t,b=Y(t,["prefixCls","children","actions","extra","styles","className","classNames","colStyle"]),{grid:P,itemLayout:d}=(0,n.useContext)(A),{getPrefixCls:O,list:u}=(0,n.useContext)(Z.E_),C=v=>{var m,E;return L()((E=(m=u==null?void 0:u.item)===null||m===void 0?void 0:m.classNames)===null||E===void 0?void 0:E[v],g==null?void 0:g[v])},I=v=>{var m,E;return Object.assign(Object.assign({},(E=(m=u==null?void 0:u.item)===null||m===void 0?void 0:m.styles)===null||E===void 0?void 0:E[v]),$==null?void 0:$[v])},W=()=>{let v=!1;return n.Children.forEach(a,m=>{typeof m=="string"&&(v=!0)}),v&&n.Children.count(a)>1},N=()=>d==="vertical"?!!c:!W(),h=O("list",i),B=l&&l.length>0&&n.createElement("ul",{className:L()(`${h}-item-action`,C("actions")),key:"actions",style:I("actions")},l.map((v,m)=>n.createElement("li",{key:`${h}-item-action-${m}`},v,m!==l.length-1&&n.createElement("em",{className:`${h}-item-action-split`})))),T=P?"div":"li",j=n.createElement(T,Object.assign({},b,P?{}:{ref:e},{className:L()(`${h}-item`,{[`${h}-item-no-flex`]:!N()},S)}),d==="vertical"&&c?[n.createElement("div",{className:`${h}-item-main`,key:"content"},a,B),n.createElement("div",{className:L()(`${h}-item-extra`,C("extra")),key:"extra",style:I("extra")},c)]:[a,B,(0,me.Tm)(c,{key:"extra"})]);return P?n.createElement(ge.Z,{ref:e,flex:1,style:z},j):j});Q.Meta=fe;var pe=Q,s=r(11568),$e=r(14747),ue=r(83559),ve=r(83262);const he=t=>{const{listBorderedCls:e,componentCls:i,paddingLG:a,margin:l,itemPaddingSM:c,itemPaddingLG:$,marginLG:S,borderRadiusLG:g}=t;return{[e]:{border:`${(0,s.bf)(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderRadius:g,[`${i}-header,${i}-footer,${i}-item`]:{paddingInline:a},[`${i}-pagination`]:{margin:`${(0,s.bf)(l)} ${(0,s.bf)(S)}`}},[`${e}${i}-sm`]:{[`${i}-item,${i}-header,${i}-footer`]:{padding:c}},[`${e}${i}-lg`]:{[`${i}-item,${i}-header,${i}-footer`]:{padding:$}}}},Se=t=>{const{componentCls:e,screenSM:i,screenMD:a,marginLG:l,marginSM:c,margin:$}=t;return{[`@media screen and (max-width:${a}px)`]:{[e]:{[`${e}-item`]:{[`${e}-item-action`]:{marginInlineStart:l}}},[`${e}-vertical`]:{[`${e}-item`]:{[`${e}-item-extra`]:{marginInlineStart:l}}}},[`@media screen and (max-width: ${i}px)`]:{[e]:{[`${e}-item`]:{flexWrap:"wrap",[`${e}-action`]:{marginInlineStart:c}}},[`${e}-vertical`]:{[`${e}-item`]:{flexWrap:"wrap-reverse",[`${e}-item-main`]:{minWidth:t.contentWidth},[`${e}-item-extra`]:{margin:`auto auto ${(0,s.bf)($)}`}}}}}},ye=t=>{const{componentCls:e,antCls:i,controlHeight:a,minHeight:l,paddingSM:c,marginLG:$,padding:S,itemPadding:g,colorPrimary:z,itemPaddingSM:b,itemPaddingLG:P,paddingXS:d,margin:O,colorText:u,colorTextDescription:C,motionDurationSlow:I,lineWidth:W,headerBg:N,footerBg:h,emptyTextPadding:B,metaMarginBottom:T,avatarMarginRight:j,titleMarginBottom:v,descriptionFontSize:m}=t;return{[e]:Object.assign(Object.assign({},(0,$e.Wf)(t)),{position:"relative","*":{outline:"none"},[`${e}-header`]:{background:N},[`${e}-footer`]:{background:h},[`${e}-header, ${e}-footer`]:{paddingBlock:c},[`${e}-pagination`]:{marginBlockStart:$,[`${i}-pagination-options`]:{textAlign:"start"}},[`${e}-spin`]:{minHeight:l,textAlign:"center"},[`${e}-items`]:{margin:0,padding:0,listStyle:"none"},[`${e}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:g,color:u,[`${e}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${e}-item-meta-avatar`]:{marginInlineEnd:j},[`${e}-item-meta-content`]:{flex:"1 0",width:0,color:u},[`${e}-item-meta-title`]:{margin:`0 0 ${(0,s.bf)(t.marginXXS)} 0`,color:u,fontSize:t.fontSize,lineHeight:t.lineHeight,"> a":{color:u,transition:`all ${I}`,"&:hover":{color:z}}},[`${e}-item-meta-description`]:{color:C,fontSize:m,lineHeight:t.lineHeight}},[`${e}-item-action`]:{flex:"0 0 auto",marginInlineStart:t.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${(0,s.bf)(d)}`,color:C,fontSize:t.fontSize,lineHeight:t.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${e}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:W,height:t.calc(t.fontHeight).sub(t.calc(t.marginXXS).mul(2)).equal(),transform:"translateY(-50%)",backgroundColor:t.colorSplit}}},[`${e}-empty`]:{padding:`${(0,s.bf)(S)} 0`,color:C,fontSize:t.fontSizeSM,textAlign:"center"},[`${e}-empty-text`]:{padding:B,color:t.colorTextDisabled,fontSize:t.fontSize,textAlign:"center"},[`${e}-item-no-flex`]:{display:"block"}}),[`${e}-grid ${i}-col > ${e}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:O,paddingBlock:0,borderBlockEnd:"none"},[`${e}-vertical ${e}-item`]:{alignItems:"initial",[`${e}-item-main`]:{display:"block",flex:1},[`${e}-item-extra`]:{marginInlineStart:$},[`${e}-item-meta`]:{marginBlockEnd:T,[`${e}-item-meta-title`]:{marginBlockStart:0,marginBlockEnd:v,color:u,fontSize:t.fontSizeLG,lineHeight:t.lineHeightLG}},[`${e}-item-action`]:{marginBlockStart:S,marginInlineStart:"auto","> li":{padding:`0 ${(0,s.bf)(S)}`,"&:first-child":{paddingInlineStart:0}}}},[`${e}-split ${e}-item`]:{borderBlockEnd:`${(0,s.bf)(t.lineWidth)} ${t.lineType} ${t.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${e}-split ${e}-header`]:{borderBlockEnd:`${(0,s.bf)(t.lineWidth)} ${t.lineType} ${t.colorSplit}`},[`${e}-split${e}-empty ${e}-footer`]:{borderTop:`${(0,s.bf)(t.lineWidth)} ${t.lineType} ${t.colorSplit}`},[`${e}-loading ${e}-spin-nested-loading`]:{minHeight:a},[`${e}-split${e}-something-after-last-item ${i}-spin-container > ${e}-items > ${e}-item:last-child`]:{borderBlockEnd:`${(0,s.bf)(t.lineWidth)} ${t.lineType} ${t.colorSplit}`},[`${e}-lg ${e}-item`]:{padding:P},[`${e}-sm ${e}-item`]:{padding:b},[`${e}:not(${e}-vertical)`]:{[`${e}-item-no-flex`]:{[`${e}-item-action`]:{float:"right"}}}}},xe=t=>({contentWidth:220,itemPadding:`${(0,s.bf)(t.paddingContentVertical)} 0`,itemPaddingSM:`${(0,s.bf)(t.paddingContentVerticalSM)} ${(0,s.bf)(t.paddingContentHorizontal)}`,itemPaddingLG:`${(0,s.bf)(t.paddingContentVerticalLG)} ${(0,s.bf)(t.paddingContentHorizontalLG)}`,headerBg:"transparent",footerBg:"transparent",emptyTextPadding:t.padding,metaMarginBottom:t.padding,avatarMarginRight:t.padding,titleMarginBottom:t.paddingSM,descriptionFontSize:t.fontSize});var be=(0,ue.I$)("List",t=>{const e=(0,ve.IX)(t,{listBorderedCls:`${t.componentCls}-bordered`,minHeight:t.controlHeightLG});return[ye(e),he(e),Se(e)]},xe),Ce=function(t,e){var i={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&e.indexOf(a)<0&&(i[a]=t[a]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,a=Object.getOwnPropertySymbols(t);l<a.length;l++)e.indexOf(a[l])<0&&Object.prototype.propertyIsEnumerable.call(t,a[l])&&(i[a[l]]=t[a[l]]);return i};function Ee(t,e){var{pagination:i=!1,prefixCls:a,bordered:l=!1,split:c=!0,className:$,rootClassName:S,style:g,children:z,itemLayout:b,loadMore:P,grid:d,dataSource:O=[],size:u,header:C,footer:I,loading:W=!1,rowKey:N,renderItem:h,locale:B}=t,T=Ce(t,["pagination","prefixCls","bordered","split","className","rootClassName","style","children","itemLayout","loadMore","grid","dataSource","size","header","footer","loading","rowKey","renderItem","locale"]);const j=i&&typeof i=="object"?i:{},[v,m]=n.useState(j.defaultCurrent||1),[E,Pe]=n.useState(j.defaultPageSize||10),{getPrefixCls:Oe,renderEmpty:X,direction:Ie,list:H}=n.useContext(Z.E_),Ne={current:1,total:0},k=o=>(p,x)=>{var J;m(p),Pe(x),i&&((J=i==null?void 0:i[o])===null||J===void 0||J.call(i,p,x))},Be=k("onChange"),Le=k("onShowSizeChange"),je=(o,p)=>{if(!h)return null;let x;return typeof N=="function"?x=N(o):N?x=o[N]:x=o.key,x||(x=`list-item-${p}`),n.createElement(n.Fragment,{key:x},h(o,p))},Me=()=>!!(P||i||I),f=Oe("list",a),[He,We,Te]=be(f);let M=W;typeof M=="boolean"&&(M={spinning:M});const F=!!(M!=null&&M.spinning),Ge=(0,re.Z)(u);let G="";switch(Ge){case"large":G="lg";break;case"small":G="sm";break;default:break}const we=L()(f,{[`${f}-vertical`]:b==="vertical",[`${f}-${G}`]:G,[`${f}-split`]:c,[`${f}-bordered`]:l,[`${f}-loading`]:F,[`${f}-grid`]:!!d,[`${f}-something-after-last-item`]:Me(),[`${f}-rtl`]:Ie==="rtl"},H==null?void 0:H.className,$,S,We,Te),y=(0,ae.Z)(Ne,{total:O.length,current:v,pageSize:E},i||{}),_=Math.ceil(y.total/y.pageSize);y.current>_&&(y.current=_);const ee=i&&n.createElement("div",{className:L()(`${f}-pagination`)},n.createElement(ce.Z,Object.assign({align:"end"},y,{onChange:Be,onShowSizeChange:Le})));let V=(0,K.Z)(O);i&&O.length>(y.current-1)*y.pageSize&&(V=(0,K.Z)(O).splice((y.current-1)*y.pageSize,y.pageSize));const Re=Object.keys(d||{}).some(o=>["xs","sm","md","lg","xl","xxl"].includes(o)),te=(0,se.Z)(Re),w=n.useMemo(()=>{for(let o=0;o<U.c4.length;o+=1){const p=U.c4[o];if(te[p])return p}},[te]),Ze=n.useMemo(()=>{if(!d)return;const o=w&&d[w]?d[w]:d.column;if(o)return{width:`${100/o}%`,maxWidth:`${100/o}%`}},[JSON.stringify(d),w]);let D=F&&n.createElement("div",{style:{minHeight:53}});if(V.length>0){const o=V.map((p,x)=>je(p,x));D=d?n.createElement(oe.Z,{gutter:d.gutter},n.Children.map(o,p=>n.createElement("div",{key:p==null?void 0:p.key,style:Ze},p))):n.createElement("ul",{className:`${f}-items`},o)}else!z&&!F&&(D=n.createElement("div",{className:`${f}-empty-text`},(B==null?void 0:B.emptyText)||(X==null?void 0:X("List"))||n.createElement(le.Z,{componentName:"List"})));const R=y.position||"bottom",Ae=n.useMemo(()=>({grid:d,itemLayout:b}),[JSON.stringify(d),b]);return He(n.createElement(A.Provider,{value:Ae},n.createElement("div",Object.assign({ref:e,style:Object.assign(Object.assign({},H==null?void 0:H.style),g),className:we},T),(R==="top"||R==="both")&&ee,C&&n.createElement("div",{className:`${f}-header`},C),n.createElement(de.Z,Object.assign({},M),D,z),I&&n.createElement("div",{className:`${f}-footer`},I),P||(R==="bottom"||R==="both")&&ee)))}const q=n.forwardRef(Ee);q.Item=pe;var ze=q}}]);
|