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 line
11 KiB
1 line
11 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[91857],{91857:function(e,n,o){var t=o(59301),i=o(38819),r=o(92310),a=o.n(r),l=o(31561),s=o(70425),d=o(18929),c=o(2738),u=o(79676),p=o(53487),m=o(92343),f=o(36355),v=o(20834),g=o(40875),b=o(88088),$=o(47211);const w=e=>{const{menu:n,arrow:o,prefixCls:r,children:p,trigger:w,disabled:h,dropdownRender:C,getPopupContainer:y,overlayClassName:x,rootClassName:S,open:P,onOpenChange:E,visible:O,onVisibleChange:R,mouseEnterDelay:k=.15,mouseLeaveDelay:N=.1,autoAdjustOverflow:A=!0,placement:Z="",overlay:z,transitionName:j}=e,{getPopupContainer:I,getPrefixCls:L,direction:D}=t.useContext(f.E_);const X=t.useMemo((()=>{const e=L();return void 0!==j?j:Z.includes("top")?`${e}-slide-down`:`${e}-slide-up`}),[L,Z,j]),T=t.useMemo((()=>{if(!Z)return"rtl"===D?"bottomRight":"bottomLeft";if(Z.includes("Center")){return Z.slice(0,Z.indexOf("Center"))}return Z}),[Z,D]);const M=L("dropdown",r),[V,B]=(0,$.Z)(M),[,H]=(0,b.Z)(),F=t.Children.only(p),W=(0,m.Tm)(F,{className:a()(`${M}-trigger`,{[`${M}-rtl`]:"rtl"===D},F.props.className),disabled:h}),_=h?[]:w;let Q;_&&_.includes("contextMenu")&&(Q=!0);const[Y,G]=(0,d.Z)(!1,{value:null!=P?P:O}),J=(0,s.useEvent)((e=>{null==E||E(e),null==R||R(e),G(e)})),U=a()(x,S,B,{[`${M}-rtl`]:"rtl"===D}),q=(0,u.Z)({arrowPointAtCenter:"object"==typeof o&&o.pointAtCenter,autoAdjustOverflow:A,offset:H.marginXXS,arrowWidth:o?H.sizePopupArrow:0,borderRadius:H.borderRadius}),K=t.useCallback((()=>{G(!1)}),[]);return V(t.createElement(l.Z,Object.assign({alignPoint:Q},(0,c.Z)(e,["rootClassName"]),{mouseEnterDelay:k,mouseLeaveDelay:N,visible:Y,builtinPlacements:q,arrow:!!o,overlayClassName:U,prefixCls:M,getPopupContainer:y||I,transitionName:X,trigger:_,overlay:()=>{let e;return e=(null==n?void 0:n.items)?t.createElement(v.Z,Object.assign({},n)):"function"==typeof z?z():z,C&&(e=C(e)),e=t.Children.only("string"==typeof e?t.createElement("span",null,e):e),t.createElement(g.J,{prefixCls:`${M}-menu`,expandIcon:t.createElement("span",{className:`${M}-menu-submenu-arrow`},t.createElement(i.Z,{className:`${M}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:K,validator:e=>{let{mode:n}=e}},e)},placement:T,onVisibleChange:J}),W))};const h=(0,p.Z)(w,"dropdown",(e=>e),(function(e){return Object.assign(Object.assign({},e),{align:{overflow:{adjustX:!1,adjustY:!1}}})}));w._InternalPanelDoNotUseOrYouWillBeFired=e=>t.createElement(h,Object.assign({},e),t.createElement("span",null)),n.Z=w},47211:function(e,n,o){o.d(n,{Z:function(){return p}});var t=o(17313),i=o(13826),r=o(92899),a=o(29878),l=o(19447),s=o(83116),d=o(37613);var c=e=>{const{componentCls:n,menuCls:o,colorError:t,colorTextLightSolid:i}=e,r=`${o}-item`;return{[`${n}, ${n}-menu-submenu`]:{[`${o} ${r}`]:{[`&${r}-danger:not(${r}-disabled)`]:{color:t,"&:hover":{color:i,backgroundColor:t}}}}}};const u=e=>{const{componentCls:n,menuCls:o,zIndexPopup:s,dropdownArrowDistance:d,sizePopupArrow:c,antCls:u,iconCls:p,motionDurationMid:m,dropdownPaddingVertical:f,fontSize:v,dropdownEdgeChildPadding:g,colorTextDisabled:b,fontSizeIcon:$,controlPaddingHorizontal:w,colorBgElevated:h}=e;return[{[n]:Object.assign(Object.assign({},(0,t.Wf)(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:s,display:"block","&::before":{position:"absolute",insetBlock:c/2-d,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${u}-btn`]:{[`& > ${p}-down, & > ${u}-btn-icon > ${p}-down`]:{fontSize:$}},[`${n}-wrap`]:{position:"relative",[`${u}-btn > ${p}-down`]:{fontSize:$},[`${p}-down::before`]:{transition:`transform ${m}`}},[`${n}-wrap-open`]:{[`${p}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${u}-slide-down-enter${u}-slide-down-enter-active${n}-placement-bottomLeft,\n &${u}-slide-down-appear${u}-slide-down-appear-active${n}-placement-bottomLeft,\n &${u}-slide-down-enter${u}-slide-down-enter-active${n}-placement-bottom,\n &${u}-slide-down-appear${u}-slide-down-appear-active${n}-placement-bottom,\n &${u}-slide-down-enter${u}-slide-down-enter-active${n}-placement-bottomRight,\n &${u}-slide-down-appear${u}-slide-down-appear-active${n}-placement-bottomRight`]:{animationName:i.fJ},[`&${u}-slide-up-enter${u}-slide-up-enter-active${n}-placement-topLeft,\n &${u}-slide-up-appear${u}-slide-up-appear-active${n}-placement-topLeft,\n &${u}-slide-up-enter${u}-slide-up-enter-active${n}-placement-top,\n &${u}-slide-up-appear${u}-slide-up-appear-active${n}-placement-top,\n &${u}-slide-up-enter${u}-slide-up-enter-active${n}-placement-topRight,\n &${u}-slide-up-appear${u}-slide-up-appear-active${n}-placement-topRight`]:{animationName:i.Qt},[`&${u}-slide-down-leave${u}-slide-down-leave-active${n}-placement-bottomLeft,\n &${u}-slide-down-leave${u}-slide-down-leave-active${n}-placement-bottom,\n &${u}-slide-down-leave${u}-slide-down-leave-active${n}-placement-bottomRight`]:{animationName:i.Uw},[`&${u}-slide-up-leave${u}-slide-up-leave-active${n}-placement-topLeft,\n &${u}-slide-up-leave${u}-slide-up-leave-active${n}-placement-top,\n &${u}-slide-up-leave${u}-slide-up-leave-active${n}-placement-topRight`]:{animationName:i.ly}})},(0,l.ZP)(e,{colorBg:h,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${n} ${o}`]:{position:"relative",margin:0},[`${o}-submenu-popup`]:{position:"absolute",zIndex:s,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${n}, ${n}-menu-submenu`]:{[o]:Object.assign(Object.assign({padding:g,listStyleType:"none",backgroundColor:h,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},(0,t.Qy)(e)),{[`${o}-item-group-title`]:{padding:`${f}px ${w}px`,color:e.colorTextDescription,transition:`all ${m}`},[`${o}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${o}-item-icon`]:{minWidth:v,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${o}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${m}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${o}-item, ${o}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${f}px ${w}px`,color:e.colorText,fontWeight:"normal",fontSize:v,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${m}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},(0,t.Qy)(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:b,cursor:"not-allowed","&:hover":{color:b,backgroundColor:h,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${e.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${n}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${n}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorTextDescription,fontSize:$,fontStyle:"normal"}}}),[`${o}-item-group-list`]:{margin:`0 ${e.marginXS}px`,padding:0,listStyle:"none"},[`${o}-submenu-title`]:{paddingInlineEnd:w+e.fontSizeSM},[`${o}-submenu-vertical`]:{position:"relative"},[`${o}-submenu${o}-submenu-disabled ${n}-menu-submenu-title`]:{[`&, ${n}-menu-submenu-arrow-icon`]:{color:b,backgroundColor:h,cursor:"not-allowed"}},[`${o}-submenu-selected ${n}-menu-submenu-title`]:{color:e.colorPrimary}})}},[(0,i.oN)(e,"slide-up"),(0,i.oN)(e,"slide-down"),(0,r.Fm)(e,"move-up"),(0,r.Fm)(e,"move-down"),(0,a._y)(e,"zoom-big")]]};var p=(0,s.Z)("Dropdown",((e,n)=>{let{rootPrefixCls:o}=n;const{marginXXS:t,sizePopupArrow:i,controlHeight:r,fontSize:a,lineHeight:s,paddingXXS:p,componentCls:m,borderRadiusLG:f}=e,v=(r-a*s)/2,{dropdownArrowOffset:g}=(0,l.fS)({contentRadius:f}),b=(0,d.TS)(e,{menuCls:`${m}-menu`,rootPrefixCls:o,dropdownArrowDistance:i/2+t,dropdownArrowOffset:g,dropdownPaddingVertical:v,dropdownEdgeChildPadding:p});return[u(b),c(b)]}),(e=>({zIndexPopup:e.zIndexPopupBase+50})))},31561:function(e,n,o){o.d(n,{Z:function(){return y}});var t=o(67711),i=o(52873),r=o(16886),a=o(33346),l=o(35593),s=o(92310),d=o.n(s),c=o(8654),u=o(59301),p=o(10228),m=o(16089),f=p.Z.ESC,v=p.Z.TAB;var g=(0,u.forwardRef)((function(e,n){var o=e.overlay,t=e.arrow,i=e.prefixCls,r=(0,u.useMemo)((function(){return"function"==typeof o?o():o}),[o]),a=(0,c.sQ)(n,null==r?void 0:r.ref);return u.createElement(u.Fragment,null,t&&u.createElement("div",{className:"".concat(i,"-arrow")}),u.cloneElement(r,{ref:(0,c.Yr)(r)?a:void 0}))})),b={adjustX:1,adjustY:1},$=[0,0],w={topLeft:{points:["bl","tl"],overflow:b,offset:[0,-4],targetOffset:$},top:{points:["bc","tc"],overflow:b,offset:[0,-4],targetOffset:$},topRight:{points:["br","tr"],overflow:b,offset:[0,-4],targetOffset:$},bottomLeft:{points:["tl","bl"],overflow:b,offset:[0,4],targetOffset:$},bottom:{points:["tc","bc"],overflow:b,offset:[0,4],targetOffset:$},bottomRight:{points:["tr","br"],overflow:b,offset:[0,4],targetOffset:$}},h=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function C(e,n){var o,s=e.arrow,p=void 0!==s&&s,b=e.prefixCls,$=void 0===b?"rc-dropdown":b,C=e.transitionName,y=e.animation,x=e.align,S=e.placement,P=void 0===S?"bottomLeft":S,E=e.placements,O=void 0===E?w:E,R=e.getPopupContainer,k=e.showAction,N=e.hideAction,A=e.overlayClassName,Z=e.overlayStyle,z=e.visible,j=e.trigger,I=void 0===j?["hover"]:j,L=e.autoFocus,D=e.overlay,X=e.children,T=e.onVisibleChange,M=(0,a.Z)(e,h),V=u.useState(),B=(0,r.Z)(V,2),H=B[0],F=B[1],W="visible"in e?z:H,_=u.useRef(null),Q=u.useRef(null),Y=u.useRef(null);u.useImperativeHandle(n,(function(){return _.current}));var G=function(e){F(e),null==T||T(e)};!function(e){var n=e.visible,o=e.triggerRef,t=e.onVisibleChange,i=e.autoFocus,r=e.overlayRef,a=u.useRef(!1),l=function(){var e,i;n&&(null===(e=o.current)||void 0===e||null===(i=e.focus)||void 0===i||i.call(e),null==t||t(!1))},s=function(){var e;return!(null===(e=r.current)||void 0===e||!e.focus||(r.current.focus(),a.current=!0,0))},d=function(e){switch(e.keyCode){case f:l();break;case v:var n=!1;a.current||(n=s()),n?e.preventDefault():l()}};u.useEffect((function(){return n?(window.addEventListener("keydown",d),i&&(0,m.Z)(s,3),function(){window.removeEventListener("keydown",d),a.current=!1}):function(){a.current=!1}}),[n])}({visible:W,triggerRef:Y,onVisibleChange:G,autoFocus:L,overlayRef:Q});var J,U,q,K=function(){return u.createElement(g,{ref:Q,overlay:D,prefixCls:$,arrow:p})},ee=u.cloneElement(X,{className:d()(null===(o=X.props)||void 0===o?void 0:o.className,W&&(J=e.openClassName,void 0!==J?J:"".concat($,"-open"))),ref:(0,c.Yr)(X)?(0,c.sQ)(Y,X.ref):void 0}),ne=N;return ne||-1===I.indexOf("contextMenu")||(ne=["click"]),u.createElement(l.Z,(0,t.Z)({builtinPlacements:O},M,{prefixCls:$,ref:_,popupClassName:d()(A,(0,i.Z)({},"".concat($,"-show-arrow"),p)),popupStyle:Z,action:I,showAction:k,hideAction:ne,popupPlacement:P,popupAlign:x,popupTransitionName:C,popupAnimation:y,popupVisible:W,stretch:(U=e.minOverlayWidthMatchTrigger,q=e.alignPoint,("minOverlayWidthMatchTrigger"in e?U:!q)?"minWidth":""),popup:"function"==typeof D?K:K(),onPopupVisibleChange:G,onPopupClick:function(n){var o=e.onOverlayClick;F(!1),o&&o(n)},getPopupContainer:R}),ee)}var y=u.forwardRef(C)}}]); |