You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
8.3 KiB
1 lines
8.3 KiB
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[470],{57470:function(se,V,r){r.d(V,{t:function(){return ze}});var X=r(91),Y=r(97685),i=r(1413),G=r(10915),ie=r(12044),re=r(21770),U=r(15746),J=r(28459),ue=r(71230),de=r(8232),ce=r(93967),k=r.n(ce),ve=r(9220),a=r(67294),fe=r(78733),me=r(87462),he=r(66023),pe=r(46976),Ce=function(e,d){return a.createElement(pe.Z,(0,me.Z)({},e,{ref:d,icon:he.Z}))},ae=a.forwardRef(Ce),xe=r(28700),ge=r(42075),u=r(85893),ye=function(e,d,n,c){return e?(0,u.jsxs)(u.Fragment,{children:[n.getMessage("tableForm.collapsed","\u5C55\u5F00"),c&&"(".concat(c,")"),(0,u.jsx)(ae,{style:{marginInlineStart:"0.5em",transition:"0.3s all",transform:"rotate(".concat(e?0:.5,"turn)")}})]}):(0,u.jsxs)(u.Fragment,{children:[n.getMessage("tableForm.expand","\u6536\u8D77"),(0,u.jsx)(ae,{style:{marginInlineStart:"0.5em",transition:"0.3s all",transform:"rotate(".concat(e?0:.5,"turn)")}})]})},Se=function(e){var d=e.setCollapsed,n=e.collapsed,c=n===void 0?!1:n,o=e.submitter,m=e.style,j=e.hiddenNum,y=(0,a.useContext)(J.ZP.ConfigContext),w=y.getPrefixCls,z=(0,G.YB)(),B=(0,a.useContext)(G.L_),F=B.hashId,S=(0,xe.v)(e.collapseRender)||ye;return(0,u.jsxs)(ge.Z,{style:m,size:16,children:[o,e.collapseRender!==!1&&(0,u.jsx)("a",{className:"".concat(w("pro-query-filter-collapse-button")," ").concat(F).trim(),onClick:function(){return d(!c)},children:S==null?void 0:S(c,e,z,j)})]})},Re=Se,N=r(4942),Ze=r(98082),be=function(e){return(0,N.Z)({},e.componentCls,(0,N.Z)((0,N.Z)((0,N.Z)((0,N.Z)({"&&":{padding:24}},"".concat(e.antCls,"-form-item"),{marginBlock:0}),"".concat(e.proComponentsCls,"-form-group-title"),{marginBlock:0}),"&-row",{rowGap:24,"&-split":(0,N.Z)((0,N.Z)({},"".concat(e.proComponentsCls,"-form-group"),{display:"flex",alignItems:"center",gap:e.marginXS}),"&:last-child",{marginBlockEnd:12}),"&-split-line":{"&:after":{position:"absolute",width:"100%",content:'""',height:1,insetBlockEnd:-12,borderBlockEnd:"1px dashed ".concat(e.colorSplit)}}}),"&-collapse-button",{display:"flex",alignItems:"center",color:e.colorPrimary}))};function Ne(t){return(0,Ze.Xj)("QueryFilter",function(e){var d=(0,i.Z)((0,i.Z)({},e),{},{componentCls:".".concat(t)});return[be(d)]})}var Pe=["collapsed","layout","defaultCollapsed","defaultColsNumber","span","searchGutter","searchText","resetText","optionRender","collapseRender","onReset","onCollapse","labelWidth","style","split","preserve","ignoreRules","showHiddenNum","submitterColSpanProps"],T,Ie={xs:513,sm:513,md:785,lg:992,xl:1057,xxl:1/0},oe={vertical:[[513,1,"vertical"],[785,2,"vertical"],[1057,3,"vertical"],[1/0,4,"vertical"]],default:[[513,1,"vertical"],[701,2,"vertical"],[1062,3,"horizontal"],[1352,3,"horizontal"],[1/0,4,"horizontal"]]},Me=function(e,d,n){if(n&&typeof n=="number")return{span:n,layout:e};var c=n?["xs","sm","md","lg","xl","xxl"].map(function(m){return[Ie[m],24/n[m],"horizontal"]}):oe[e||"default"],o=(c||oe.default).find(function(m){return d<m[0]+16});return o?{span:24/o[1],layout:o==null?void 0:o[2]}:{span:8,layout:"horizontal"}},Te=function(e,d){return e==null?void 0:e.flatMap(function(n){var c;if((n==null?void 0:n.type.displayName)==="ProForm-Group"&&!((c=n.props)!==null&&c!==void 0&&c.title))return n.props.children;if(d&&a.isValidElement(n)){var o;return a.cloneElement(n,(0,i.Z)((0,i.Z)({},n.props),{},{formItemProps:(0,i.Z)((0,i.Z)({},(o=n.props)===null||o===void 0?void 0:o.formItemProps),{},{rules:[]})}))}return n})},je=function(e){var d,n,c,o,m=(0,G.YB)(),j=(0,a.useContext)(G.L_),y=j.hashId,w=e.resetText||m.getMessage("tableForm.reset","\u91CD\u7F6E"),z=e.searchText||m.getMessage("tableForm.search","\u641C\u7D22"),B=(0,re.Z)(function(){return e.defaultCollapsed&&!!e.submitter},{value:e.collapsed,onChange:e.onCollapse}),F=(0,Y.Z)(B,2),S=F[0],W=F[1],R=e.optionRender,P=e.collapseRender,x=e.split,q=e.items,Z=e.spanSize,E=e.showLength,_=e.searchGutter,A=e.showHiddenNum,L=(0,a.useMemo)(function(){return!e.submitter||R===!1?null:a.cloneElement(e.submitter,(0,i.Z)({searchConfig:{resetText:w,submitText:z},render:R&&function(l,f){return R((0,i.Z)((0,i.Z)({},e),{},{resetText:w,searchText:z}),e,f)}},e.submitter.props))},[e,w,z,R]),I=0,$=0,H=!1,b=0,h=0,O=Te(q,e.ignoreRules).map(function(l,f){var p,v,s,C,Q=a.isValidElement(l)&&(p=l==null||(v=l.props)===null||v===void 0?void 0:v.colSize)!==null&&p!==void 0?p:1,M=Math.min(Z.span*(Q||1),24);if(I+=M,b+=Q,f===0){var le;H=M===24&&!(l!=null&&(le=l.props)!==null&&le!==void 0&&le.hidden)}var Fe=(l==null||(s=l.props)===null||s===void 0?void 0:s.hidden)||S&&(H||b>E-1)&&!!f&&I>=24;$+=1;var Ee=a.isValidElement(l)&&(l.key||"".concat((C=l.props)===null||C===void 0?void 0:C.name))||f;return a.isValidElement(l)&&Fe?e.preserve?{itemDom:a.cloneElement(l,{hidden:!0,key:Ee||f}),hidden:!0,colSpan:M}:{itemDom:null,colSpan:0,hidden:!0}:{itemDom:l,colSpan:M,hidden:!1}}),ee=O.map(function(l,f){var p,v,s=l.itemDom,C=l.colSpan,Q=s==null||(p=s.props)===null||p===void 0?void 0:p.hidden;if(Q)return s;var M=a.isValidElement(s)&&(s.key||"".concat((v=s.props)===null||v===void 0?void 0:v.name))||f;return 24-h%24<C&&(I+=24-h%24,h+=24-h%24),h+=C,x&&h%24===0&&f<$-1?(0,u.jsx)(U.Z,{span:C,className:"".concat(e.baseClassName,"-row-split-line ").concat(e.baseClassName,"-row-split ").concat(y).trim(),children:s},M):(0,u.jsx)(U.Z,{className:"".concat(e.baseClassName,"-row-split ").concat(y).trim(),span:C,children:s},M)}),te=A&&O.filter(function(l){return l.hidden}).length,K=(0,a.useMemo)(function(){return!(I<24||b<=E)},[b,E,I]),D=(0,a.useMemo)(function(){var l,f,p=h%24+((l=(f=e.submitterColSpanProps)===null||f===void 0?void 0:f.span)!==null&&l!==void 0?l:Z.span);if(p>24){var v,s;return 24-((v=(s=e.submitterColSpanProps)===null||s===void 0?void 0:s.span)!==null&&v!==void 0?v:Z.span)}return 24-p},[h,h%24+((d=(n=e.submitterColSpanProps)===null||n===void 0?void 0:n.span)!==null&&d!==void 0?d:Z.span),(c=e.submitterColSpanProps)===null||c===void 0?void 0:c.span]),ne=(0,a.useContext)(J.ZP.ConfigContext),g=ne.getPrefixCls("pro-query-filter");return(0,u.jsxs)(ue.Z,{gutter:_,justify:"start",className:k()("".concat(g,"-row"),y),children:[ee,L&&(0,u.jsx)(U.Z,(0,i.Z)((0,i.Z)({span:Z.span,offset:D,className:k()((o=e.submitterColSpanProps)===null||o===void 0?void 0:o.className)},e.submitterColSpanProps),{},{style:{textAlign:"end"},children:(0,u.jsx)(de.Z.Item,{label:" ",colon:!1,shouldUpdate:!1,className:"".concat(g,"-actions ").concat(y).trim(),children:(0,u.jsx)(Re,{hiddenNum:te,collapsed:S,collapseRender:K?P:!1,submitter:L,setCollapsed:W},"pro-form-query-filter-actions")})}),"submitter")]},"resize-observer-row")},we=(0,ie.j)()?(T=document)===null||T===void 0||(T=T.body)===null||T===void 0?void 0:T.clientWidth:1024;function ze(t){var e=t.collapsed,d=t.layout,n=t.defaultCollapsed,c=n===void 0?!0:n,o=t.defaultColsNumber,m=t.span,j=t.searchGutter,y=j===void 0?24:j,w=t.searchText,z=t.resetText,B=t.optionRender,F=t.collapseRender,S=t.onReset,W=t.onCollapse,R=t.labelWidth,P=R===void 0?"80":R,x=t.style,q=t.split,Z=t.preserve,E=Z===void 0?!0:Z,_=t.ignoreRules,A=t.showHiddenNum,L=A===void 0?!1:A,I=t.submitterColSpanProps,$=(0,X.Z)(t,Pe),H=(0,a.useContext)(J.ZP.ConfigContext),b=H.getPrefixCls("pro-query-filter"),h=Ne(b),O=h.wrapSSR,ee=h.hashId,te=(0,re.Z)(function(){return typeof(x==null?void 0:x.width)=="number"?x==null?void 0:x.width:we}),K=(0,Y.Z)(te,2),D=K[0],ne=K[1],g=(0,a.useMemo)(function(){return Me(d,D+16,m)},[d,D,m]),l=(0,a.useMemo)(function(){return o!==void 0?o-1:Math.max(1,24/g.span-1)},[o,g.span]),f=(0,a.useMemo)(function(){if(P&&g.layout!=="vertical"&&P!=="auto")return{labelCol:{flex:"0 0 ".concat(P,"px")},wrapperCol:{style:{maxWidth:"calc(100% - ".concat(P,"px)")}},style:{flexWrap:"nowrap"}}},[g.layout,P]);return O((0,u.jsx)(ve.Z,{onResize:function(v){D!==v.width&&v.width>17&&ne(v.width)},children:(0,u.jsx)(fe.I,(0,i.Z)((0,i.Z)({isKeyPressSubmit:!0,preserve:E},$),{},{className:k()(b,ee,$.className),onReset:S,style:x,layout:g.layout,fieldProps:{style:{width:"100%"}},formItemProps:f,groupProps:{titleStyle:{display:"inline-block",marginInlineEnd:16}},contentRender:function(v,s,C){return(0,u.jsx)(je,{spanSize:g,collapsed:e,form:C,submitterColSpanProps:I,collapseRender:F,defaultCollapsed:c,onCollapse:W,optionRender:B,submitter:s,items:v,split:q,baseClassName:b,resetText:t.resetText,searchText:t.searchText,searchGutter:y,preserve:E,ignoreRules:_,showLength:l,showHiddenNum:L})}}))},"resize-observer"))}},28700:function(se,V,r){r.d(V,{v:function(){return X}});var X=function(i){if(i&&i!==!0)return i}}}]);
|
|
|