@tap-payments/os-micro-frontend-shared 0.3.306 → 0.3.308-test.1795365667
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/_chunks/chunk-6DGM7DYT.js +1 -0
- package/build/_chunks/chunk-EAAJJGUI.js +1 -0
- package/build/_chunks/{chunk-OAPCRKFH.js → chunk-GD5PXPUD.js} +1 -1
- package/build/_chunks/chunk-JBE2LXDH.js +1 -0
- package/build/_chunks/chunk-JQWPOXPM.js +2 -0
- package/build/_chunks/chunk-JYVB2MAR.js +1 -0
- package/build/_chunks/chunk-LKYA6XFU.js +9 -0
- package/build/_chunks/chunk-PF4KBDPV.js +1 -0
- package/build/_chunks/{chunk-6UI52RXI.js → chunk-R2J57DPG.js} +1 -1
- package/build/_chunks/{chunk-H6IWML5L.js → chunk-TJMY7Q26.js} +1 -1
- package/build/_chunks/chunk-YG4CT6O4.js +1 -0
- package/build/_chunks/chunk-YMEGCVZ4.js +2 -0
- package/build/components/ActionMenu/ActionMenu.d.ts +4 -0
- package/build/components/ActionMenu/ActionMenuFlyoutRow.d.ts +4 -0
- package/build/components/ActionMenu/ActionMenuGroupList.d.ts +4 -0
- package/build/components/ActionMenu/ActionMenuLeafRow.d.ts +4 -0
- package/build/components/ActionMenu/ActionMenuRow.d.ts +7 -0
- package/build/components/ActionMenu/ActionMenuRowLeading.d.ts +4 -0
- package/build/components/ActionMenu/ActionMenuRowTrailing.d.ts +4 -0
- package/build/components/ActionMenu/constants.d.ts +42 -0
- package/build/components/ActionMenu/index.d.ts +3 -0
- package/build/components/ActionMenu/index.js +1 -0
- package/build/components/ActionMenu/style.d.ts +46 -0
- package/build/components/ActionMenu/type.d.ts +103 -0
- package/build/components/ActionMenu/utils.d.ts +6 -0
- package/build/components/Autocomplete/index.js +1 -1
- package/build/components/ColumnViews/index.js +1 -1
- package/build/components/FilterPopover/index.js +1 -1
- package/build/components/GroupedSelect/index.js +1 -1
- package/build/components/ListHeader/index.js +1 -1
- package/build/components/MultiLevelSelect/index.js +1 -1
- package/build/components/Select/SelectField.d.ts +1 -1
- package/build/components/Select/constants.d.ts +24 -0
- package/build/components/Select/index.d.ts +1 -1
- package/build/components/Select/index.js +1 -1
- package/build/components/Select/style.d.ts +12 -0
- package/build/components/Select/type.d.ts +11 -2
- package/build/components/Select/utils.d.ts +11 -2
- package/build/components/Sidebar/index.js +1 -1
- package/build/components/StatusIcons/index.js +1 -1
- package/build/components/TableCells/CustomCells/ActionCell/components/{ActionMenu.d.ts → ActionCellMenu.d.ts} +4 -4
- package/build/components/TableCells/CustomCells/ActionCell/hooks/useActionCell.d.ts +1 -13
- package/build/components/TableCells/CustomCells/type.d.ts +16 -13
- package/build/components/TableCells/index.js +1 -1
- package/build/components/WindowServices/index.js +1 -1
- package/build/components/WindowServices/style.d.ts +3 -1
- package/build/components/index.d.ts +2 -3
- package/build/components/index.js +1 -1
- package/build/components/modules/WindowShell/index.js +1 -1
- package/build/components/modules/index.js +1 -1
- package/build/datetime/components/index.d.ts +0 -2
- package/build/datetime/components/index.js +2 -2
- package/build/index.js +1 -1
- package/package.json +1 -1
- package/build/_chunks/chunk-2JFMUHGQ.js +0 -9
- package/build/_chunks/chunk-2LO4STE5.js +0 -1
- package/build/_chunks/chunk-B2NOP2A5.js +0 -1
- package/build/_chunks/chunk-EWENP3LB.js +0 -1
- package/build/_chunks/chunk-GQZXKKCE.js +0 -1
- package/build/_chunks/chunk-GSPSUKZC.js +0 -2
- package/build/_chunks/chunk-KBXWH3SO.js +0 -1
- package/build/_chunks/chunk-LFCRVEVB.js +0 -1
- package/build/_chunks/chunk-MLOWKQDW.js +0 -1
- package/build/_chunks/chunk-QKEB3XTE.js +0 -2
- package/build/components/ActionsDropdownMenu/ActionsDropdownMenu.d.ts +0 -3
- package/build/components/ActionsDropdownMenu/AppMenuItem.d.ts +0 -15
- package/build/components/ActionsDropdownMenu/constants.d.ts +0 -1
- package/build/components/ActionsDropdownMenu/index.d.ts +0 -3
- package/build/components/ActionsDropdownMenu/index.js +0 -1
- package/build/components/ActionsDropdownMenu/style.d.ts +0 -16
- package/build/components/ActionsDropdownMenu/types.d.ts +0 -42
- package/build/components/CurrenciesMenu/CountryFlag.d.ts +0 -10
- package/build/components/CurrenciesMenu/CurrenciesMenu.d.ts +0 -4
- package/build/components/CurrenciesMenu/OptionContent.d.ts +0 -5
- package/build/components/CurrenciesMenu/OptionRow.d.ts +0 -5
- package/build/components/CurrenciesMenu/constants.d.ts +0 -15
- package/build/components/CurrenciesMenu/icons.d.ts +0 -3
- package/build/components/CurrenciesMenu/index.d.ts +0 -4
- package/build/components/CurrenciesMenu/index.js +0 -1
- package/build/components/CurrenciesMenu/style.d.ts +0 -32
- package/build/components/CurrenciesMenu/type.d.ts +0 -64
- package/build/components/CurrenciesMenu/utils.d.ts +0 -9
- package/build/datetime/components/DateRangeFilter/DateRangeFilter.d.ts +0 -9
- package/build/datetime/components/DateRangeFilter/index.d.ts +0 -2
- package/build/datetime/components/DateRangeFilter/style.d.ts +0 -32
- package/build/datetime/components/DateRangeFilter/types.d.ts +0 -11
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import {b,a}from'./chunk-JBE2LXDH.js';import {y,x,B as B$1,aa as aa$1}from'./chunk-YG4CT6O4.js';import {aa,ba}from'./chunk-F7I3KDV5.js';import {Ub,Eb,Db}from'./chunk-XBJ4RS2B.js';import {Sc,A}from'./chunk-EYLBXWXJ.js';import {memo,useCallback,useMemo}from'react';import No,{autocompleteClasses}from'@mui/material/Autocomplete';import W from'@mui/material/Box';import ko from'@mui/material/Popper';import wo from'@mui/material/TextField';import {keyframes,styled,alpha}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var m="os-shared-Autocomplete",u={root:`${m}-root`,input:`${m}-input`,popper:`${m}-popper`,option:`${m}-option`,clear:`${m}-clear`,popupIndicator:`${m}-popupIndicator`,feedback:`${m}-feedback`},k={bottom:"bottom",top:"top"},ye=k.bottom,V=false,Pe="No results found",Se="Loading\u2026",B="",Ce=8,z=4,w=24,Me=4,Ae=4,So=8,Co={disableRipple:true},Mo={elevation:0},Ao={name:"offset",options:{offset:[0,So]}};function Io(e){return {name:"flip",enabled:e!==k.top,options:{fallbackPlacements:["top-start"]}}}function Oo(e){return e===k.top?"top-start":"bottom-start"}function Ie(e){let{menuDirection:o,slotProps:n,popperClassName:r}=e;return {...n,clearIndicator:{...Co,...n?.clearIndicator},paper:{...Mo,...n?.paper},popper:{...n?.popper,placement:n?.popper?.placement??Oo(o),modifiers:[Ao,Io(o),...n?.popper?.modifiers??[]],className:r}}}var ke=e=>({[`& .${autocompleteClasses.clearIndicator}`]:{visibility:"visible",padding:0,width:12,height:12,margin:0,backgroundColor:"transparent",color:e.v2.palette.base.black,"&:hover":{backgroundColor:"transparent",color:e.v2.palette.base.black},"& svg":{width:8,height:8,fontSize:8,display:"block"}}}),To=keyframes`
|
|
2
|
+
0% {
|
|
3
|
+
transform: rotate(-90deg);
|
|
4
|
+
}
|
|
5
|
+
100% {
|
|
6
|
+
transform: rotate(270deg);
|
|
7
|
+
}
|
|
8
|
+
`,we=styled(W)({width:12,height:12,display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:"100%",height:"100%",display:"block"},animation:`${To} 2s linear infinite`}),ve=styled(wo,{shouldForwardProp:e=>!["feedbackType","hasFeedback","hasLabel"].includes(e)})(({theme:e,error:o,feedbackType:n,hasFeedback:r,hasLabel:l})=>{let{borderColor:x$1}=n?aa(e,n):{borderColor:void 0},T=r?"4px 4px 0 0":"4px",d=o?`1px solid ${e.palette.error.main}`:n&&x$1?`1px solid ${x$1}`:"1px solid transparent";return {width:"100%","& .MuiInputLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)",color:`${e.palette.grey[700]} !important`},"& .MuiInputLabel-root.MuiInputLabel-shrink":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiInputLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiFilledInput-root":{height:"40px",maxHeight:"40px",overflow:"hidden",borderRadius:T,borderBottomLeftRadius:r?0:"4px",borderBottomRightRadius:r?0:"4px",backgroundColor:e.palette.grey[400],border:d,borderBottom:r?"none":d,paddingTop:l?"11px":"0px",paddingBottom:l?"4px":"0px",paddingLeft:"8px",boxSizing:"border-box",display:"inline-flex",alignItems:l?"stretch":"center",transition:e.transitions.create(["border-color","box-shadow"],{duration:e.transitions.duration.shorter}),"&:before, &:after":{display:"none"},"&:hover":{backgroundColor:e.palette.grey[400]},"&.Mui-focused":{backgroundColor:e.palette.grey[400],border:r?`1px solid ${n?x$1:"transparent"}`:o?d:`1px solid ${e.v2.palette.brand[500]}`,borderBottom:r?"none":void 0,boxShadow:r||o?"none":`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`},"&.Mui-disabled":{backgroundColor:e.palette.grey[400],boxShadow:"none",borderColor:"transparent"}},"& .MuiFilledInput-input":{padding:"0 !important",minHeight:0,height:"auto",boxSizing:"border-box",display:"flex",alignItems:l?"flex-end":"center",alignSelf:l?"flex-end":"center",fontSize:"11px",lineHeight:"11px",color:e.palette.common.black,paddingBottom:l?"1px !important":"0 !important"},"& .MuiFilledInput-root.MuiInputBase-adornedEnd .MuiAutocomplete-input":{flex:"1 1 0%",minWidth:30,width:0,maxWidth:"100%"},"& .MuiAutocomplete-endAdornment":{display:"flex",alignItems:"center",gap:`${B$1}px`,top:"50%",transform:"translateY(-50%)",right:x},"& .MuiAutocomplete-popupIndicator":{transform:"none",width:y,minWidth:y,height:y,padding:0,marginRight:0,marginLeft:0,display:"inline-flex",alignItems:"center",justifyContent:"center"},"& .MuiAutocomplete-popupIndicator.MuiAutocomplete-popupIndicatorOpen":{transform:"none"},"& .MuiAutocomplete-clearIndicator":{visibility:"visible",padding:0,width:12,height:12,marginRight:0,marginLeft:0,backgroundColor:"transparent",color:e.v2.palette.base.black,"&:hover":{backgroundColor:"transparent",color:e.v2.palette.base.black},"& svg":{width:8,height:8,fontSize:8,display:"block"}}}}),Te=styled(W,{shouldForwardProp:e=>e!=="$hasFeedback"})(({theme:e,$hasFeedback:o})=>({display:"flex",alignItems:"stretch",flexDirection:"column",width:"100%",borderRadius:4,overflow:"visible",textAlign:"start",...o&&{"&:has(.MuiInputBase-root.Mui-focused)":{boxShadow:`0px 0px 0px 1px ${e.v2.palette.brand[500]}, 0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`}}})),Ro=e=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:4,padding:`${Me}px 8px`,minHeight:w,height:w,maxHeight:w,boxSizing:"border-box",width:"auto",margin:Ae,borderRadius:z,fontSize:"10px",fontWeight:500,lineHeight:"12px",cursor:"default",pointerEvents:"none",backgroundColor:e.palette.common.white,color:e.v2.palette.grey[500]}),G="#F8F8F8",Lo=e=>({fontSize:"12px",fontWeight:500,lineHeight:"14px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),minHeight:40,height:"auto",flexShrink:0,flexGrow:0,padding:8,boxSizing:"border-box",borderRadius:z,backgroundColor:e.palette.common.white,'&.Mui-focused, &[aria-selected="true"], &.Mui-focusVisible, &[aria-selected="true"].Mui-focused':{backgroundColor:G},'&[aria-disabled="true"]':{opacity:.38,pointerEvents:"none"}}),Fo={padding:8,maxHeight:320,minHeight:0,display:"flex",flexDirection:"column",gap:4,overflowY:"auto"},Re=styled(ko,{shouldForwardProp:e=>!["$menuHasLoadingText","$suppressAutocompleteNoOptions","$hideEmptyMenuSurface"].includes(e)})(({theme:e,$menuHasLoadingText:o,$suppressAutocompleteNoOptions:n,$hideEmptyMenuSurface:r})=>({"& .MuiPaper-root":{borderRadius:Ce,overflow:"hidden",boxShadow:e.shadows[8],border:`1px solid ${e.v2.palette.grey[100]}`,backgroundColor:e.palette.common.white,...r&&{display:"none"}},[`& .${autocompleteClasses.listbox}`]:Fo,[`& .${autocompleteClasses.option}`]:Lo(e),[`& .${autocompleteClasses.noOptions}, & .${autocompleteClasses.loading}`]:Ro(e),[`& .${autocompleteClasses.loading} .MuiCircularProgress-root`]:{width:12,height:12},...n?{[`& .${autocompleteClasses.noOptions}`]:{display:"none !important"}}:{},...o===false?{[`& .${autocompleteClasses.loading}`]:{display:"none"}}:{}}));styled("span")(({theme:e})=>({fontSize:"10px",fontWeight:500,color:e.v2.palette.grey[500]}));var Le=styled("li",{shouldForwardProp:e=>!["$selected","$optionDisabled"].includes(String(e))})(({theme:e,$selected:o,$optionDisabled:n})=>({fontSize:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),minHeight:40,padding:8,boxSizing:"border-box",borderRadius:4,backgroundColor:o?G:e.palette.common.white,"&.Mui-focused":{backgroundColor:G},...n&&{opacity:.38,pointerEvents:"none"}})),Fe=styled("span")({flex:1,minWidth:0}),$e=styled("img")({width:10,height:7.5,flexShrink:0}),De=styled(W)({position:"relative",width:14,height:14,transform:"rotate(0deg)",display:"flex",alignItems:"center",justifyContent:"center","& img, & svg":{width:14,height:14,display:"block"}});styled("ul")({listStyle:"none",margin:0,padding:0});var Ne=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block",width:"100%",textAlign:"start"}));var He=aa$1;function Ve(){return jsx(De,{children:jsx(W,{component:"img",src:A,alt:"",sx:{width:14,height:14,display:"block"}})})}function Be(){return jsx($e,{src:Sc,alt:""})}function ze(e){return jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[jsx("path",{d:"M6.66683 12.8333C3.26058 12.8333 0.500163 10.0729 0.500163 6.66667C0.500163 3.26042 3.26058 0.5 6.66683 0.5C10.0731 0.5 12.8335 3.26042 12.8335 6.66667C12.8335 10.0729 10.0731 12.8333 6.66683 12.8333Z",stroke:"url(#paint0_linear_1010_1334)",strokeMiterlimit:"10"}),jsx("defs",{children:jsxs("linearGradient",{id:"paint0_linear_1010_1334",x1:"12.8335",y1:"6.66667",x2:"0.500163",y2:"6.66667",gradientUnits:"userSpaceOnUse",children:[jsx("stop",{stopOpacity:"0.619608"}),jsx("stop",{offset:"1",stopOpacity:"0"})]})})]})}function j(e){return e===null||e===""}function S(e){if(e==null||typeof e!="object"||!("value"in e)||!("label"in e))return false;let o=e.value;return typeof o=="string"||typeof o=="number"}function v(e){if(e==null)return "";if(typeof e=="string"||typeof e=="number")return String(e);if(S(e))return b(e);if(typeof e=="object"&&"label"in e){let o=e.label;if(typeof o=="string"||typeof o=="number")return String(o);let n=a(o).trim();if(n)return n}return ""}function Ge(e,o){return S(e)&&S(o)?e.value===o.value||String(e.value)===String(o.value):e===o}function We(e){return !!e?.disabled}function je(e){if(S(e))return String(e.value);if(e!=null&&typeof e=="object"&&"id"in e){let o=e.id;if(o!=null)return String(o)}return v(e)}function qe(e){return S(e)?e.label:typeof e=="string"||typeof e=="number"?String(e):e!=null&&typeof e=="object"&&"label"in e?e.label:v(e)}function Ue(e){let{options:o,value:n,onChange:r,label:l,placeholder:x,renderInput:T,slotProps:d,textFieldProps:C,loading:Ye,isLoading:Ze,popupIcon:Je,error:Qe=false,helperText:R,feedback:q,required:K,disabled:Xe,id:_="Autocomplete",className:eo,autocompleteClassNames:M,PopperComponent:U,hasClearIcon:oo=true,hasSelectedCheckmark:Y=false,ClearIconComponent:to,onClear:no,disableClearable:po,clearIcon:ro,menuDirection:Z=ye,openOnFocus:L=V,getOptionLabel:F,renderOption:lo,isOptionEqualToValue:$,getOptionDisabled:D,getOptionKey:N,noOptionsText:J,loadingText:Q,sx:ao,...io}=e,E=!!(Ze||Ye),b=j(Q),so=j(J),X=b&&E,ee=E&&!b,A=so||X,oe=o.length===0&&(X||!ee&&A),uo=b?B:Q??Se,co=A?B:J??Pe,{isProvided:te,isVisible:I,type:ne}=Ub(q),pe=Qe&&!I,re=l!=null&&l!=="",mo=to??He,fo=useCallback(t=>F?F(t):v(t),[F]),xo=useCallback((t,p)=>$?$(t,p):Ge(t,p),[$]),H=useCallback(t=>D?D(t):We(t),[D]),go=useCallback(t=>N?N(t):je(t),[N]),bo=useCallback((t,p,s)=>{let{key:h,...y}=t;return jsxs(Le,{...y,className:Eb(u.option,y.className),$selected:s.selected,$optionDisabled:H(p),children:[jsx(Fe,{children:qe(p)}),Y&&s.selected?jsx(Be,{}):null]},h)},[H,Y]),ho=useMemo(()=>{let t=U;return t||function(s){return jsx(Re,{...s,$menuHasLoadingText:!b,$suppressAutocompleteNoOptions:A,$hideEmptyMenuSurface:oe})}},[U,b,A,oe]),le=Eb(u.popper,M?.popper,d?.popper?.className),yo=useMemo(()=>Ie({menuDirection:Z,slotProps:d,popperClassName:le}),[Z,d,le]),Po=useCallback(t=>{let p=typeof C=="function"?C(t):C,s=t.inputProps?.onMouseDown,h=p?.inputProps?.onMouseDown;return jsx(ve,{...t,...p,variant:"filled",fullWidth:true,label:l??void 0,placeholder:x??p?.placeholder??void 0,required:K,error:pe,helperText:null,feedbackType:ne,hasFeedback:I,hasLabel:re,className:Eb(u.input,M?.input,p?.className),InputProps:{...t.InputProps,...p?.InputProps,disableUnderline:true},inputProps:{...t.inputProps,...p?.inputProps,onMouseDown:y=>{h?.(y),L&&s?.(y);}}})},[C,l,x,K,pe,ne,I,re,M?.input,L]),ae=jsx(No,{...io,id:_,"data-testid":_??"Autocomplete",fullWidth:true,className:Eb(u.root,M?.root,eo),options:o,value:n,disabled:!!Xe,onChange:(t,p,s,h)=>{r?.(t,p,s,h),s==="clear"&&no?.();},loading:ee,forcePopupIcon:true,popupIcon:E?jsx(we,{"aria-hidden":true,children:jsx(ze,{})}):Je??jsx(Ve,{}),getOptionLabel:fo,isOptionEqualToValue:xo,getOptionDisabled:H,getOptionKey:go,renderOption:lo??bo,renderInput:T||Po,PopperComponent:ho,openOnFocus:L,noOptionsText:co,loadingText:uo,disableClearable:po??!oo,clearIcon:ro??jsx(mo,{className:u.clear}),sx:Db(ke,ao),slotProps:yo});return !te&&(R==null||R==="")?ae:jsxs(Te,{$hasFeedback:I,children:[ae,te?jsx(ba,{className:u.feedback,...q}):jsx(Ne,{children:R})]})}Ue.displayName="Autocomplete";var Eo=memo(Ue);
|
|
9
|
+
export{u as a,k as b,V as c,Eo as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {k,j as j$1,g as g$1}from'./chunk-ISC5KT5E.js';import {j as j$2,r,R as R$1,V}from'./chunk-F7I3KDV5.js';import {n}from'./chunk-FDYQ25JQ.js';import {S,Eb,tb}from'./chunk-XBJ4RS2B.js';import {Zc,Yc,jb,Fn}from'./chunk-EYLBXWXJ.js';import {memo,forwardRef,useState,useRef,useMemo,useEffect,useCallback}from'react';import g from'@mui/material/Box';import je from'@mui/material/MenuItem';import Ke from'@mui/material/Select';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';import oo from'@mui/material/ClickAwayListener';var m="os-shared-WindowServices",s={root:`${m}-root`,bar:`${m}-bar`,tabsBar:`${m}-tabsBar`,tabs:`${m}-tabs`,tab:`${m}-tab`,trigger:`${m}-trigger`,triggerLabel:`${m}-triggerLabel`,triggerArrow:`${m}-triggerArrow`,menuItem:`${m}-menuItem`,contextMenu:`${m}-contextMenu`},P="os-shared-WindowSkeleton",f={root:`${P}-root`,bar:`${P}-bar`,body:`${P}-body`,rows:`${P}-rows`,row:`${P}-row`},re="Open in a new window",R="en",ie=51,ae=8,se=3,de=10,le=64,pe=4;var ce=styled(g,{shouldForwardProp:e=>e!=="$isDragging"})(({$isDragging:e=false})=>({cursor:e?"move":"default",position:"relative",zIndex:1,margin:0,backgroundColor:j$1,backdropFilter:k})),me=styled(g)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(8),overflow:"hidden",height:"4.1875rem",paddingBottom:"1.2rem",paddingInline:e.v2.spacing(32),paddingTop:e.v2.spacing(4),backgroundColor:"transparent",'[data-window-maximized="true"] &':{height:e.v2.spacing(44),paddingBottom:e.v2.spacing(10),paddingTop:0}})),ge=styled(g)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(8),userSelect:"none",width:"max-content",maxWidth:"100%"})),Xe=S(),we=styled(j$2,{shouldForwardProp:e=>e!=="$title"})(({theme:e,$title:n})=>{let{base:o}=e.v2.palette;return {position:"relative",fontWeight:e.typography.fontWeightMedium,padding:e.spacing(1),color:o.black,fontSize:"11px",lineHeight:"15px",borderRadius:e.shape.borderRadius,transition:e.transitions.create(["backgroundColor","boxShadow"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.complex}),whiteSpace:"nowrap",textTransform:"capitalize","&:hover, &.active":{backgroundColor:o.white,boxShadow:e.shadows[2],cursor:"pointer",position:"relative",color:"transparent","&:after":{...n&&{content:`"${n}"`},color:o.black,fontWeight:e.v2.typography.fontWeightBold,overflow:"hidden",position:"absolute",top:0,bottom:0,right:0,left:0,display:"flex",alignItems:"center",justifyContent:"center",letterSpacing:Xe==="safari"?"-1px":"",padding:8,borderRadius:e.shape.borderRadius}}}}),ue=styled(Ke)(({theme:e})=>({padding:"0.25rem 0.34rem 0.25rem 0.5rem",display:"flex",justifyContent:"center",alignItems:"center",gap:"0.19rem",width:"auto",flexShrink:0,borderRadius:"0.5rem",boxShadow:e.shadows[5],cursor:"pointer",outline:e.palette.background.default,border:"none",backgroundColor:e.palette.background.default,"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiMenuList-root":{padding:"0px !important",margin:0},"& .MuiSelect-outlined":{padding:"0px !important"}})),fe=styled("p")(({theme:e})=>({color:e.palette.text.primary,fontSize:"0.68rem",fontWeight:600,textAlign:"center",padding:"0 !important",margin:"0 !important",textTransform:"capitalize",".MuiOutlinedInput-input":{paddingRight:0},"MuiInputBase-input":{paddingRight:0},".MuiSelect-select":{paddingRight:0}})),Se=styled(je)(({theme:e})=>({display:"flex",height:"2.5rem",width:"10.43rem",alignItems:"center",gap:"0.5",alignSelf:"stretch",transition:"boxShadow 0.2s ease-in-out",backgroundColor:"inherit !important",margin:0,padding:0,paddingTop:"0px !important",paddingBottom:"0px !important","&:hover":{boxSizing:"border-box",boxShadow:`${e.shadows[3]}`}})),xe=styled("p")(({theme:e})=>({fontSize:"0.75rem",fontWeight:500,color:e.palette.text.primary,paddingLeft:"1rem !important",transition:"boxShadow 0.2s ease-in-out"})),ye=styled("img")(()=>({width:"0.75rem",height:"auto",padding:0,paddingBottom:.5,margin:0,verticalAlign:"middle",boxSizing:"border-box"})),G=styled(g,{shouldForwardProp:e=>e!=="$isDragging"})(({$isDragging:e=false})=>({cursor:e?"move":"default",display:"flex",flexDirection:"column",height:"100%",overflow:"hidden",borderRadius:"inherit",backgroundColor:"transparent"})),be=styled(g)(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"flex-start",gap:e.v2.spacing(8),height:"4.1875rem",flexShrink:0,paddingTop:e.v2.spacing(10),paddingInline:e.v2.spacing(32),paddingBottom:"1.2rem",backgroundColor:j$1,backdropFilter:k})),he=styled(g)(({theme:e})=>({flex:1,minHeight:0,backgroundColor:e.v2.palette.base.white})),ve=styled(g)(({theme:e})=>({height:"100%",overflow:"hidden",backgroundColor:e.v2.palette.base.white,padding:`${e.v2.spacing(8)} ${e.v2.spacing(32)}`})),Ce=styled(g)(({theme:e})=>({display:"flex",flexDirection:"row",gap:e.v2.spacing(8),alignItems:"center",paddingTop:e.v2.spacing(8),paddingBottom:e.v2.spacing(8),height:56,borderTop:`1px solid ${e.v2.palette.border.default}`})),De=styled(g)(()=>({display:"flex",flexDirection:"column",gap:"4px"})),Le=styled(g)(()=>({display:"flex",gap:"4px"}));function qe({className:e}){return jsx(ye,{src:(e??"").includes("MuiSelect-iconOpen")?Zc:Yc,alt:"dropdown",className:Eb(s.triggerArrow)})}var ke=memo(qe);function to({name:e,code:n,isActive:o,openInNewWindowLabel:l,onOpenService:u,onOpenServiceInNewWindow:d,className:S}){let[c,h]=useState(null),C=!!c,x=useRef(null),p=useCallback(()=>{h(null);},[]),$=useCallback(r=>{x.current={x:r.clientX,y:r.clientY};},[]),L=useCallback(r=>{let y=x.current;if(x.current=null,y&&Math.hypot(r.clientX-y.x,r.clientY-y.y)>5){r.preventDefault(),r.stopPropagation();return}r.preventDefault(),r.stopPropagation(),u(n);},[n,u]),k=useCallback(r=>{r.preventDefault(),r.stopPropagation(),h(r.currentTarget);},[]),I=useCallback(r=>{r.preventDefault(),r.stopPropagation(),d?.(n),p();},[n,p,d]);return jsx(oo,{onClickAway:p,children:jsxs(g,{component:"span",sx:{display:"contents"},children:[jsx(we,{$title:e,onClick:L,onPointerDown:$,onContextMenu:k,className:Eb(s.tab,o&&"active",S),children:e}),jsx(R$1,{open:C,anchorEl:c,placement:"bottom-start",className:Eb(s.contextMenu),children:jsx(V,{startAdornment:null,onClick:I,className:Eb(s.menuItem),children:jsxs(g,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:"4px"},children:[jsx("img",{src:jb,alt:"new-window-icon"}),l]})})})]})})}var Pe=memo(to);function Re(e){return e===Fn.reports.code||e===Fn.upload.code}function B(e){if(!e)return "";try{return decodeURIComponent(e)}catch{return e}}function Ne(e,n,o){let l=B(n).toLowerCase(),u=(e??[]).filter(d=>B(d.code).toLowerCase()===l)?.[0];return tb(u?.name??[],o??R)||""}function j(e,n){return tb(e.name,n??R)||""}function Me(e,n){return B(e).toLowerCase()===B(n).toLowerCase()}var $e=forwardRef(function({serviceCode:n$1="",services:o,onOpenService:l,onOpenServiceInNewWindow:u,language:d=R,openInNewWindowLabel:S=re,id:c,className:h,sx:C,"data-testid":x,"data-id":p},$){let[L,k]=useState(false),[I,r]=useState(0),[y,Ae]=useState(false),[Ee,K]=useState(false),[He,{width:A}]=n(),X=useRef(null),E=useMemo(()=>Ne(o,n$1,d),[o,n$1,d]);useEffect(()=>{y||r(X.current?.offsetWidth??0);},[y,o,d]),useEffect(()=>{if(A<=0||I<=0)return;let i=I+le+ie+ae+se+de;Ae(A<i);},[A,I]);let ze=useCallback(()=>{k(true);},[]),Fe=useCallback(()=>{k(false);},[]),Ue=useCallback(()=>{k(false);},[]),_e=useCallback(()=>{K(i=>!i);},[]),Ve=useCallback(i=>{l?.(i),K(false);},[l]),Ge=useCallback(i=>{l?.(i);},[l]);return o.length?jsx(ce,{ref:$,id:c,"data-testid":x??c??"WindowServices",...(p??c)!=null?{"data-id":p??c}:null,$isDragging:L,onPointerDown:ze,onPointerUp:Fe,onPointerCancel:Ue,className:Eb(s.root,s.bar,g$1,h),sx:C,children:jsxs(me,{ref:He,className:Eb(s.tabsBar),children:[!y&&jsx(ge,{ref:X,className:Eb(s.tabs),children:o.map((i,H)=>jsx(Pe,{name:j(i,d),code:i.code,isActive:Me(n$1,i.code),openInNewWindowLabel:S,onOpenService:Ge,onOpenServiceInNewWindow:u},`service-item-${i.code}-${H}`))}),y&&jsx(ue,{open:Ee,onClick:_e,displayEmpty:true,inputProps:{"aria-label":E||"Window services"},MenuProps:{anchorOrigin:{vertical:40,horizontal:83},PaperProps:{style:{borderRadius:"0.25rem",width:"10.43rem",padding:0}},MenuListProps:{disablePadding:true}},value:E,IconComponent:ke,renderValue:i=>jsx(fe,{className:Eb(s.triggerLabel),children:i}),sx:{"& .MuiOutlinedInput-root.MuiList-root-MuiMenu-list":{paddingTop:"0px !important",paddingBottom:"0px !important"}},className:Eb(s.trigger),children:o.map((i,H)=>{let z=j(i,d);return z.toLowerCase()===E?.toLowerCase()?null:jsx(Se,{value:z,onClick:Y=>{Y.preventDefault(),Y.stopPropagation(),Ve(i.code);},className:Eb(s.menuItem),children:jsx(xe,{children:z})},`option-${i.code}-${H}`)})})]})}):null});$e.displayName="WindowServices";var so=memo($e);var Oe=forwardRef(function({appCode:n,id:o,className:l,sx:u,"data-testid":d,"data-id":S},c){let[h,C]=useState(false),x=useCallback(()=>{C(true);},[]),p=useCallback(()=>{C(false);},[]);return Re(n)?jsx(G,{ref:c,id:o,"data-testid":d??o??"WindowSkeleton",...(S??o)!=null?{"data-id":S??o}:null,className:Eb(f.root,g$1,l),sx:u,$isDragging:h,onPointerDown:x,onPointerUp:p,onPointerCancel:p,children:jsx(ve,{className:Eb(f.rows,f.body),children:Array.from({length:pe}).map(($,L)=>jsxs(Ce,{className:Eb(f.row),children:[jsx(r,{variant:"rounded",width:32,height:32}),jsxs(De,{children:[jsx(r,{width:80,height:12.29}),jsxs(Le,{children:[jsx(r,{width:50,height:12.29}),jsx(r,{width:125,height:12.29})]})]})]},L))})}):jsxs(G,{ref:c,id:o,"data-testid":d??o??"WindowSkeleton",...(S??o)!=null?{"data-id":S??o}:null,className:Eb(f.root,g$1,l),sx:u,$isDragging:h,onPointerDown:x,onPointerUp:p,onPointerCancel:p,children:[jsxs(be,{className:Eb(f.bar),children:[jsx(r,{variant:"rounded",width:60,height:31}),jsx(r,{variant:"rounded",width:60,height:31}),jsx(r,{variant:"rounded",width:60,height:31})]}),jsx(he,{className:Eb(f.body)})]})});Oe.displayName="WindowSkeleton";var go=memo(Oe);export{s as a,f as b,so as c,go as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {z,o,C,w,n,t,r,q,p,s,u,v,M as M$1,A as A$1,ba,aa}from'./chunk-MLOWKQDW.js';import {d,R,L,V as V$1,Q as Q$1}from'./chunk-F7I3KDV5.js';import {Eb}from'./chunk-XBJ4RS2B.js';import {Gb,A as A$2,Sc}from'./chunk-EYLBXWXJ.js';import {forwardRef,useState,useEffect,useMemo,memo,useRef,useLayoutEffect,useId}from'react';import y from'@mui/material/Box';import Tt from'@mui/material/ClickAwayListener';import ht from'@mui/material/Typography';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var M="os-shared-MultiLevelSelect",a={root:`${M}-root`,open:`${M}-open`,label:`${M}-label`,fieldBody:`${M}-fieldBody`,placeholder:`${M}-placeholder`,arrow:`${M}-arrow`,menu:`${M}-menu`,search:`${M}-search`,selectedBadge:`${M}-selectedBadge`,fieldRow:`${M}-fieldRow`},ye=40,k="data-nested-submenu",$="data-nested-submenu-anchor",Ce={strategy:"fixed"},we=.7,Ne=100,Ie={width:10,height:7.5,flexShrink:0},Be={width:9,height:9,flexShrink:0};var gt={overflow:"hidden",flex:"0 0 auto",width:"max-content",maxWidth:"100%",minWidth:0},St=e=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:e,fontSize:"10px",fontWeight:500,cursor:"pointer"}),Oe=styled(y,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:t$1=false})=>{let{base:n$1}=e.v2.palette;return {width:"100%",boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"flex-end",gap:t,minHeight:n,padding:`0 ${C}px 0 ${w}px`,textAlign:"left",border:`${o}px solid ${t$1?"#FAFBFB":"transparent"}`,borderRadius:"4px",backgroundColor:t$1?"#FAFBFB":e.palette.grey[400],minWidth:"89px",position:"relative",cursor:t$1?"not-allowed":"pointer",...t$1&&{color:alpha(n$1.black,.6),[`& .${a.label}`]:{opacity:.7,cursor:"not-allowed"},[`& .${a.placeholder}`]:{color:alpha(n$1.black,.6)},"& .Select-menuTriggerIcon":{cursor:"default",color:"rgba(0, 0, 0, 0.38)","& svg path":{fill:"rgba(0, 0, 0, 0.38)",stroke:"rgba(0, 0, 0, 0.38)"}},[`& .${a.fieldRow}`]:{opacity:.7},[`& .${a.fieldRow} *`]:{cursor:"not-allowed"}},"& .Select-menuTriggerIcon":{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:"inherit",lineHeight:0,"& svg, & .MuiSvgIcon-root":{transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter})}},"& .Select-menuTriggerIcon-open svg, & .Select-menuTriggerIcon-open .MuiSvgIcon-root":{transform:"rotate(180deg)"},"& .Select-menuTriggerIcon--loading":{width:z,minWidth:z,height:z,cursor:"default"},[`&.${a.open}, &:focus-within`]:{border:`1px solid ${e.v2.palette.brand[500]}`,boxShadow:`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`}}}),Pe=styled(ht)(({theme:e})=>({alignSelf:"stretch",width:"100%",boxSizing:"border-box",height:s,margin:0,paddingTop:p,cursor:"pointer",fontSize:q,fontWeight:500,lineHeight:`${r}px`,color:e.palette.grey[700],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",pointerEvents:"none",flexShrink:0})),Re=styled(y)({display:"flex",alignItems:"flex-start",width:"100%",minWidth:0,minHeight:v+u,paddingBottom:u,boxSizing:"border-box",flex:"0 0 auto"}),Ee=styled(M$1)({margin:0,padding:0,width:"100%",alignSelf:"center"}),Fe=styled(y)({position:"absolute",right:A$1,top:"50%",transform:"translateY(-50%)",width:z,height:z,display:"inline-flex",alignItems:"center",justifyContent:"center",color:"inherit",lineHeight:0,pointerEvents:"none"}),Te=styled(y)(()=>({display:"flex",flexDirection:"column",padding:"8px"})),bt={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},vt={display:"flex",flexWrap:"wrap",alignItems:"center",alignContent:"flex-start",gap:"4px",width:"100%",minWidth:0},We=styled(y,{shouldForwardProp:e=>e!=="$field"})(({$field:e})=>({...vt,...e?{padding:0,minHeight:v,boxSizing:"border-box",alignItems:"flex-start",alignContent:"flex-start"}:{marginBottom:"8px","&:empty":{display:"none"}}})),J=styled(y,{shouldForwardProp:e=>e!=="$field"})(({theme:e,$field:t})=>({...St(`${e.palette.info.dark}1a`),...gt,...t&&{cursor:"inherit"}})),ke=styled("span")(()=>bt),$e=styled(y)(()=>({position:"relative",width:"100%",minWidth:0})),Ae=styled(y)(()=>({flex:1,maxWidth:"220px",minWidth:"89px",fontWeight:500})),He=styled(y)(()=>({display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",minWidth:"89px",fontWeight:500}));var O=e=>!e.options&&typeof e.value=="string";function Ve(e,t,n){if(e===void 0)return O(n);if(typeof e=="boolean")return e;if(typeof e=="function")return e(t,n);let o=e[t];return typeof o=="boolean"?o:O(n)}var A=e=>e.value??e.label,H=(e,t)=>t?.some(n=>n.value===e.value)??false,ze=(e,t,n)=>{if(H(e,t)){n(t?.filter(o=>o.value!==e.value)||[]);return}n([...t||[],e]);},Q=e=>O(e)?[e]:(e.options??[]).flatMap(Q),U=(e,t)=>{let n=e.filter(o=>H(o,t)).length;return {allSelected:e.length>0&&n===e.length,someSelected:n>0&&n<e.length}},je=(e,t,n)=>{let o=new Set(e.map(i=>i.value));if(U(e,t).allSelected){n((t??[]).filter(i=>!o.has(i.value)));return}let l=new Set((t??[]).map(i=>i.value)),r=e.filter(i=>!l.has(i.value));n([...t??[],...r]);},xt=(e,t)=>{let n=e[t];return typeof n=="string"?n:typeof n=="number"&&Number.isFinite(n)?String(n):""},Lt=(e,t,n)=>n.some(o=>xt(e,o).toLowerCase().includes(t)),Ge=(e,t,n)=>{let o=t.toLowerCase().trim();if(!o)return e.map(i=>({node:i,depth:0}));let l=[],r=(i,d)=>{for(let s of i){if(O(s)){Lt(s,o,n)&&l.push({node:s,depth:d});continue}r(s.options??[],d+1);}};return r(e,0),l},Mt=(e,t="right")=>{let n=e?.closest(`.${Q$1.panel}`);if(!e||!n)return 0;let o=e.getBoundingClientRect(),l=n.getBoundingClientRect(),r=t.startsWith("left")?o.left-l.left:l.right-o.right;return Math.max(0,r)},Ke=e=>[{name:"flip",enabled:true,options:{rootBoundary:"viewport",padding:8,fallbackPlacements:["left-start","right-end","left-end"]}},{name:"preventOverflow",enabled:true,options:{rootBoundary:"viewport",altAxis:true,padding:8}},{name:"offset",options:{offset:({placement:t})=>[0,Mt(e.current,t)]}}],Xe=(e,t)=>e.length===t.length&&e.every((n,o)=>n===t[o]);function qe(e,t,n){let o=[],l=0;for(let r of e){if(t<=0){o.push(void 0);continue}if(l===0&&r>=t){o.push(Math.floor(t));continue}let i=l===0?0:n;if(l+i+r<=t+.5){o.push(void 0),l+=i+r;continue}let d=Math.floor(t-l-i);if(d>=Ne&&d>=r*we){o.push(d),l=0;continue}o.push(void 0),l=r;}return o}var De=(e,t)=>t instanceof Node&&!!e?.contains(t),Ye=(e,t,n)=>{if(De(t,e)||De(n,e))return true;if(!(e instanceof Element)||!n)return false;let o=e.closest(`[${k}]`)?.getAttribute($),l=o?document.getElementById(o):null;return !!(l&&n.contains(l))};function wt({options:e,variant:t,hiddenCount:n=0,onRemove:o}){let l=useRef(null),r=useRef([]),[i,d$1]=useState([]),s=e.length+(n>0?1:0),C=e.map(c=>c.label).join("\0");useLayoutEffect(()=>{let c=l.current;if(!c||s===0)return;let f=()=>{let L=r.current.slice(0,s).filter(u=>u!=null);if(L.length!==s)return;let S=L.map(u=>u.style.maxWidth);L.forEach(u=>{u.style.maxWidth="none";});let h=L.map(u=>u.getBoundingClientRect().width);L.forEach((u,G)=>{u.style.maxWidth=S[G];});let b=getComputedStyle(c),R=c.clientWidth-parseFloat(b.paddingLeft)-parseFloat(b.paddingRight),j=parseFloat(b.columnGap||b.gap||"0")||0,E=qe(h,R,j);d$1(u=>Xe(u,E)?u:E);};f();let N=new ResizeObserver(f);return N.observe(c),()=>N.disconnect()},[s,C,t]);let m=t==="field",x=c=>f=>{f.stopPropagation(),f.preventDefault(),o?.(c);},w=c=>f=>{r.current[c]=f;};return jsxs(We,{ref:l,$field:m,className:m?a.fieldRow:void 0,children:[e.map((c,f)=>jsxs(J,{ref:w(f),$field:m,className:m?void 0:a.selectedBadge,style:i[f]!=null?{maxWidth:i[f]}:void 0,onClick:m?void 0:x(c),children:[m?null:jsx(d,{src:Sc,alt:"",sx:Ie}),jsx(ke,{children:c.label}),m?null:jsx(d,{src:Gb,alt:"",sx:Be})]},`${f}-${c.value}`)),n>0?jsx(J,{ref:w(e.length),$field:m,style:i[e.length]!=null?{maxWidth:i[e.length]}:void 0,children:jsxs("span",{children:["+",n]})}):null]})}var V=wt;function Nt({options:e,maxVisibleValues:t}){let o=typeof t=="number"&&Number.isFinite(t)?Math.max(0,Math.floor(t)):e.length,l=e.slice(0,o),r=e.length-l.length;return jsx($e,{children:jsx(V,{options:l,variant:"field",hiddenCount:r})})}var Qe=Nt;var _e=()=>jsx("svg",{width:"5",height:"8",viewBox:"0 0 5 8",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,style:{display:"block",flexShrink:0},children:jsx("path",{d:"M0.117188 0.504028C0.115307 0.426166 0.138248 0.350264 0.182617 0.286255C0.227088 0.222214 0.290458 0.173028 0.363281 0.144653C0.436073 0.116302 0.516047 0.109152 0.592773 0.124146C0.668745 0.138995 0.738375 0.176073 0.793945 0.229614L4.43164 3.63391C4.50662 3.70421 4.55078 3.80153 4.55078 3.90442C4.55064 4.00712 4.5065 4.10376 4.43164 4.17395L0.794922 7.57922L0.793945 7.57825C0.738766 7.63096 0.669812 7.66692 0.594727 7.68176C0.519097 7.69665 0.440194 7.69049 0.368164 7.66321C0.296002 7.63581 0.232474 7.58801 0.1875 7.52551C0.14262 7.463 0.11821 7.3886 0.118164 7.31165C0.118166 7.25986 0.12907 7.20846 0.150391 7.16125C0.171346 7.11493 0.201824 7.07367 0.239258 7.03918L3.58691 3.90442L0.239258 0.769653C0.164191 0.701295 0.119752 0.605686 0.117188 0.504028Z",fill:"#20232B",stroke:"#20232B",strokeWidth:"0.233333"})});function ot({label:e,itemCount:t,isSelected:n,isIndeterminate:o,onToggle:l,children:r,isSelectable:i=false}){let d=useId(),s=useRef(null),C=useRef(null),m=useRef(null),x=useRef(null),[w,c]=useState(false),f=useMemo(()=>Ke(s),[]),N=()=>{x.current!=null&&(window.clearTimeout(x.current),x.current=null);},L=()=>{t!==0&&(N(),c(true));},S=h=>{Ye(h.relatedTarget,s.current,C.current)||(N(),x.current=window.setTimeout(()=>{x.current=null,c(false);},ye));};return useEffect(()=>()=>{x.current!=null&&window.clearTimeout(x.current);},[]),useEffect(()=>{if(!w)return;let h=()=>m.current?.update();return document.addEventListener("scroll",h,true),window.addEventListener("resize",h),()=>{document.removeEventListener("scroll",h,true),window.removeEventListener("resize",h);}},[w]),jsxs(V$1,{id:d,ref:s,isSelected:n,isIndeterminate:o,startAdornment:i?void 0:null,onClick:h=>{if(h.stopPropagation(),h.preventDefault(),!i){L();return}l();},onMouseEnter:L,onMouseLeave:S,children:[jsxs(He,{children:[e,jsx(_e,{})]}),jsx(R,{ref:C,popperRef:m,[k]:"",[$]:d,sx:{maxHeight:"min(450px, calc(100dvh - 16px))",overflow:"auto"},open:w,anchorEl:s.current,placement:"right-start",modifiers:f,popperOptions:Ce,onMouseEnter:L,onMouseLeave:S,children:r})]})}function it({option:e,value:t,onChange:n,isSelectable:o=true}){let l=H(e,t);return jsx(V$1,{isSelected:l,onClick:i=>{i.stopPropagation(),i.preventDefault(),o&&ze(e,t,n);},startAdornment:o?void 0:null,children:jsx(Ae,{children:e.label})})}function te({node:e,depth:t,value:n,onChange:o,isSelectable:l}){let r=Ve(l,t,e);if(O(e))return jsx(it,{option:e,value:n,onChange:o,isSelectable:r});if(!e.options)return null;let i=e.options,d=Q(e),{allSelected:s,someSelected:C}=U(d,n);return jsx(ot,{label:e.label,itemCount:i.length,isSelected:s,isIndeterminate:C,isSelectable:r,onToggle:()=>je(d,n,o),children:i.map(m=>jsx(te,{node:m,depth:t+1,value:n,onChange:o,isSelectable:l},A(m)))})}var Wt=["label"],st=forwardRef(({options:e,onChange:t,value:n,maxVisibleValues:o,placeholder:l,label:r,isLoading:i,isSelectable:d$1,disabled:s,className:C,sx:m,isSearchable:x=true,searchPlaceholder:w,searchBy:c=Wt,onOpen:f,onClose:N},L$1)=>{let[S,h]=useState(null),[b,R$1]=useState(""),[j,E]=useState(void 0),u=!!S,G=r??l,ct=r?l??"Please Select":"Please Select";useEffect(()=>{if(!S)return;let p=()=>{let K=S.clientWidth;K>0&&E(ie=>ie===K?ie:K);};if(p(),typeof ResizeObserver>"u")return;let I=new ResizeObserver(p);return I.observe(S),()=>I.disconnect()},[S]);let at=S?.clientWidth||j,ut=p=>{if(u){h(null),N?.();return}h(p.currentTarget),f?.();},pt=()=>{h(null),N?.();},dt=()=>{b&&R$1("");},mt=useMemo(()=>Ge(e,b,c),[e,b,c]),le=n?.length??0,ft=i?jsx(ba,{}):jsx(d,{src:b?Gb:A$2,alt:b?"close":"search",onClick:dt,sx:{width:12,height:12,cursor:b?"pointer":"default"}});return jsx(Tt,{onClickAway:()=>{u&&pt();},children:jsxs(Oe,{ref:L$1,id:"FieldWrapper","data-testid":"MultiLevelSelect",$disabled:s,"aria-disabled":s||void 0,className:Eb(a.root,u&&a.open,C),sx:m,onClick:p=>!s&&ut(p),children:[jsx(Pe,{className:a.label,component:"label",children:G}),jsxs(Re,{className:a.fieldBody,children:[le===0?jsx(Ee,{className:a.placeholder,component:"p",children:ct}):null,le>0&&n?jsx(Qe,{options:n,maxVisibleValues:o}):null]}),jsx(Fe,{className:a.arrow,"aria-hidden":true,children:i?jsx(y,{component:"span",className:"Select-menuTriggerIcon Select-menuTriggerIcon--loading","aria-hidden":true,children:jsx(ba,{})}):jsx(y,{component:"span",className:`Select-menuTriggerIcon${u?" Select-menuTriggerIcon-open":""}`,children:jsx(aa,{})})}),jsx(R,{open:u,anchorEl:S,sx:{margin:"8px 0",maxHeight:330,overflow:"auto",width:at},panelProps:{className:a.menu},children:jsxs(Te,{children:[x?jsx(L,{className:a.search,fullWidth:true,size:"md",placeholder:w??l??"Select",endAdornment:ft,value:b,onClick:p=>{p.stopPropagation();},onMouseDown:p=>{p.stopPropagation();},onChange:p=>{R$1(p.target.value);},sx:{mb:"8px"}}):null,jsx(V,{options:n??[],variant:"menu",onRemove:p=>{t(n?.filter(I=>I.value!==p.value)||[]);}}),mt.map(({node:p,depth:I})=>jsx(te,{node:p,depth:I,value:n,onChange:t,isSelectable:d$1},A(p)))]})})]})})});st.displayName="MultiLevelSelect";var kt=memo(st);
|
|
1
|
+
import {z,o,C,w,n,t,r,q,p,s,u,v,M as M$1,A as A$1,ca,ba}from'./chunk-YG4CT6O4.js';import {d,R,L,V as V$1,Q as Q$1}from'./chunk-F7I3KDV5.js';import {Eb}from'./chunk-XBJ4RS2B.js';import {Gb,A as A$2,Sc}from'./chunk-EYLBXWXJ.js';import {forwardRef,useState,useEffect,useMemo,memo,useRef,useLayoutEffect,useId}from'react';import y from'@mui/material/Box';import Tt from'@mui/material/ClickAwayListener';import ht from'@mui/material/Typography';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var M="os-shared-MultiLevelSelect",a={root:`${M}-root`,open:`${M}-open`,label:`${M}-label`,fieldBody:`${M}-fieldBody`,placeholder:`${M}-placeholder`,arrow:`${M}-arrow`,menu:`${M}-menu`,search:`${M}-search`,selectedBadge:`${M}-selectedBadge`,fieldRow:`${M}-fieldRow`},ye=40,k="data-nested-submenu",$="data-nested-submenu-anchor",Ce={strategy:"fixed"},we=.7,Ne=100,Ie={width:10,height:7.5,flexShrink:0},Be={width:9,height:9,flexShrink:0};var gt={overflow:"hidden",flex:"0 0 auto",width:"max-content",maxWidth:"100%",minWidth:0},St=e=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:e,fontSize:"10px",fontWeight:500,cursor:"pointer"}),Oe=styled(y,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:t$1=false})=>{let{base:n$1}=e.v2.palette;return {width:"100%",boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"flex-end",gap:t,minHeight:n,padding:`0 ${C}px 0 ${w}px`,textAlign:"left",border:`${o}px solid ${t$1?"#FAFBFB":"transparent"}`,borderRadius:"4px",backgroundColor:t$1?"#FAFBFB":e.palette.grey[400],minWidth:"89px",position:"relative",cursor:t$1?"not-allowed":"pointer",...t$1&&{color:alpha(n$1.black,.6),[`& .${a.label}`]:{opacity:.7,cursor:"not-allowed"},[`& .${a.placeholder}`]:{color:alpha(n$1.black,.6)},"& .Select-menuTriggerIcon":{cursor:"default",color:"rgba(0, 0, 0, 0.38)","& svg path":{fill:"rgba(0, 0, 0, 0.38)",stroke:"rgba(0, 0, 0, 0.38)"}},[`& .${a.fieldRow}`]:{opacity:.7},[`& .${a.fieldRow} *`]:{cursor:"not-allowed"}},"& .Select-menuTriggerIcon":{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:"inherit",lineHeight:0,"& svg, & .MuiSvgIcon-root":{transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter})}},"& .Select-menuTriggerIcon-open svg, & .Select-menuTriggerIcon-open .MuiSvgIcon-root":{transform:"rotate(180deg)"},"& .Select-menuTriggerIcon--loading":{width:z,minWidth:z,height:z,cursor:"default"},[`&.${a.open}, &:focus-within`]:{border:`1px solid ${e.v2.palette.brand[500]}`,boxShadow:`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`}}}),Pe=styled(ht)(({theme:e})=>({alignSelf:"stretch",width:"100%",boxSizing:"border-box",height:s,margin:0,paddingTop:p,cursor:"pointer",fontSize:q,fontWeight:500,lineHeight:`${r}px`,color:e.palette.grey[700],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",pointerEvents:"none",flexShrink:0})),Re=styled(y)({display:"flex",alignItems:"flex-start",width:"100%",minWidth:0,minHeight:v+u,paddingBottom:u,boxSizing:"border-box",flex:"0 0 auto"}),Ee=styled(M$1)({margin:0,padding:0,width:"100%",alignSelf:"center"}),Fe=styled(y)({position:"absolute",right:A$1,top:"50%",transform:"translateY(-50%)",width:z,height:z,display:"inline-flex",alignItems:"center",justifyContent:"center",color:"inherit",lineHeight:0,pointerEvents:"none"}),Te=styled(y)(()=>({display:"flex",flexDirection:"column",padding:"8px"})),bt={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},vt={display:"flex",flexWrap:"wrap",alignItems:"center",alignContent:"flex-start",gap:"4px",width:"100%",minWidth:0},We=styled(y,{shouldForwardProp:e=>e!=="$field"})(({$field:e})=>({...vt,...e?{padding:0,minHeight:v,boxSizing:"border-box",alignItems:"flex-start",alignContent:"flex-start"}:{marginBottom:"8px","&:empty":{display:"none"}}})),J=styled(y,{shouldForwardProp:e=>e!=="$field"})(({theme:e,$field:t})=>({...St(`${e.palette.info.dark}1a`),...gt,...t&&{cursor:"inherit"}})),ke=styled("span")(()=>bt),$e=styled(y)(()=>({position:"relative",width:"100%",minWidth:0})),Ae=styled(y)(()=>({flex:1,maxWidth:"220px",minWidth:"89px",fontWeight:500})),He=styled(y)(()=>({display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",minWidth:"89px",fontWeight:500}));var O=e=>!e.options&&typeof e.value=="string";function Ve(e,t,n){if(e===void 0)return O(n);if(typeof e=="boolean")return e;if(typeof e=="function")return e(t,n);let o=e[t];return typeof o=="boolean"?o:O(n)}var A=e=>e.value??e.label,H=(e,t)=>t?.some(n=>n.value===e.value)??false,ze=(e,t,n)=>{if(H(e,t)){n(t?.filter(o=>o.value!==e.value)||[]);return}n([...t||[],e]);},Q=e=>O(e)?[e]:(e.options??[]).flatMap(Q),U=(e,t)=>{let n=e.filter(o=>H(o,t)).length;return {allSelected:e.length>0&&n===e.length,someSelected:n>0&&n<e.length}},je=(e,t,n)=>{let o=new Set(e.map(i=>i.value));if(U(e,t).allSelected){n((t??[]).filter(i=>!o.has(i.value)));return}let l=new Set((t??[]).map(i=>i.value)),r=e.filter(i=>!l.has(i.value));n([...t??[],...r]);},xt=(e,t)=>{let n=e[t];return typeof n=="string"?n:typeof n=="number"&&Number.isFinite(n)?String(n):""},Lt=(e,t,n)=>n.some(o=>xt(e,o).toLowerCase().includes(t)),Ge=(e,t,n)=>{let o=t.toLowerCase().trim();if(!o)return e.map(i=>({node:i,depth:0}));let l=[],r=(i,d)=>{for(let s of i){if(O(s)){Lt(s,o,n)&&l.push({node:s,depth:d});continue}r(s.options??[],d+1);}};return r(e,0),l},Mt=(e,t="right")=>{let n=e?.closest(`.${Q$1.panel}`);if(!e||!n)return 0;let o=e.getBoundingClientRect(),l=n.getBoundingClientRect(),r=t.startsWith("left")?o.left-l.left:l.right-o.right;return Math.max(0,r)},Ke=e=>[{name:"flip",enabled:true,options:{rootBoundary:"viewport",padding:8,fallbackPlacements:["left-start","right-end","left-end"]}},{name:"preventOverflow",enabled:true,options:{rootBoundary:"viewport",altAxis:true,padding:8}},{name:"offset",options:{offset:({placement:t})=>[0,Mt(e.current,t)]}}],Xe=(e,t)=>e.length===t.length&&e.every((n,o)=>n===t[o]);function qe(e,t,n){let o=[],l=0;for(let r of e){if(t<=0){o.push(void 0);continue}if(l===0&&r>=t){o.push(Math.floor(t));continue}let i=l===0?0:n;if(l+i+r<=t+.5){o.push(void 0),l+=i+r;continue}let d=Math.floor(t-l-i);if(d>=Ne&&d>=r*we){o.push(d),l=0;continue}o.push(void 0),l=r;}return o}var De=(e,t)=>t instanceof Node&&!!e?.contains(t),Ye=(e,t,n)=>{if(De(t,e)||De(n,e))return true;if(!(e instanceof Element)||!n)return false;let o=e.closest(`[${k}]`)?.getAttribute($),l=o?document.getElementById(o):null;return !!(l&&n.contains(l))};function wt({options:e,variant:t,hiddenCount:n=0,onRemove:o}){let l=useRef(null),r=useRef([]),[i,d$1]=useState([]),s=e.length+(n>0?1:0),C=e.map(c=>c.label).join("\0");useLayoutEffect(()=>{let c=l.current;if(!c||s===0)return;let f=()=>{let L=r.current.slice(0,s).filter(u=>u!=null);if(L.length!==s)return;let S=L.map(u=>u.style.maxWidth);L.forEach(u=>{u.style.maxWidth="none";});let h=L.map(u=>u.getBoundingClientRect().width);L.forEach((u,G)=>{u.style.maxWidth=S[G];});let b=getComputedStyle(c),R=c.clientWidth-parseFloat(b.paddingLeft)-parseFloat(b.paddingRight),j=parseFloat(b.columnGap||b.gap||"0")||0,E=qe(h,R,j);d$1(u=>Xe(u,E)?u:E);};f();let N=new ResizeObserver(f);return N.observe(c),()=>N.disconnect()},[s,C,t]);let m=t==="field",x=c=>f=>{f.stopPropagation(),f.preventDefault(),o?.(c);},w=c=>f=>{r.current[c]=f;};return jsxs(We,{ref:l,$field:m,className:m?a.fieldRow:void 0,children:[e.map((c,f)=>jsxs(J,{ref:w(f),$field:m,className:m?void 0:a.selectedBadge,style:i[f]!=null?{maxWidth:i[f]}:void 0,onClick:m?void 0:x(c),children:[m?null:jsx(d,{src:Sc,alt:"",sx:Ie}),jsx(ke,{children:c.label}),m?null:jsx(d,{src:Gb,alt:"",sx:Be})]},`${f}-${c.value}`)),n>0?jsx(J,{ref:w(e.length),$field:m,style:i[e.length]!=null?{maxWidth:i[e.length]}:void 0,children:jsxs("span",{children:["+",n]})}):null]})}var V=wt;function Nt({options:e,maxVisibleValues:t}){let o=typeof t=="number"&&Number.isFinite(t)?Math.max(0,Math.floor(t)):e.length,l=e.slice(0,o),r=e.length-l.length;return jsx($e,{children:jsx(V,{options:l,variant:"field",hiddenCount:r})})}var Qe=Nt;var _e=()=>jsx("svg",{width:"5",height:"8",viewBox:"0 0 5 8",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,style:{display:"block",flexShrink:0},children:jsx("path",{d:"M0.117188 0.504028C0.115307 0.426166 0.138248 0.350264 0.182617 0.286255C0.227088 0.222214 0.290458 0.173028 0.363281 0.144653C0.436073 0.116302 0.516047 0.109152 0.592773 0.124146C0.668745 0.138995 0.738375 0.176073 0.793945 0.229614L4.43164 3.63391C4.50662 3.70421 4.55078 3.80153 4.55078 3.90442C4.55064 4.00712 4.5065 4.10376 4.43164 4.17395L0.794922 7.57922L0.793945 7.57825C0.738766 7.63096 0.669812 7.66692 0.594727 7.68176C0.519097 7.69665 0.440194 7.69049 0.368164 7.66321C0.296002 7.63581 0.232474 7.58801 0.1875 7.52551C0.14262 7.463 0.11821 7.3886 0.118164 7.31165C0.118166 7.25986 0.12907 7.20846 0.150391 7.16125C0.171346 7.11493 0.201824 7.07367 0.239258 7.03918L3.58691 3.90442L0.239258 0.769653C0.164191 0.701295 0.119752 0.605686 0.117188 0.504028Z",fill:"#20232B",stroke:"#20232B",strokeWidth:"0.233333"})});function ot({label:e,itemCount:t,isSelected:n,isIndeterminate:o,onToggle:l,children:r,isSelectable:i=false}){let d=useId(),s=useRef(null),C=useRef(null),m=useRef(null),x=useRef(null),[w,c]=useState(false),f=useMemo(()=>Ke(s),[]),N=()=>{x.current!=null&&(window.clearTimeout(x.current),x.current=null);},L=()=>{t!==0&&(N(),c(true));},S=h=>{Ye(h.relatedTarget,s.current,C.current)||(N(),x.current=window.setTimeout(()=>{x.current=null,c(false);},ye));};return useEffect(()=>()=>{x.current!=null&&window.clearTimeout(x.current);},[]),useEffect(()=>{if(!w)return;let h=()=>m.current?.update();return document.addEventListener("scroll",h,true),window.addEventListener("resize",h),()=>{document.removeEventListener("scroll",h,true),window.removeEventListener("resize",h);}},[w]),jsxs(V$1,{id:d,ref:s,isSelected:n,isIndeterminate:o,startAdornment:i?void 0:null,onClick:h=>{if(h.stopPropagation(),h.preventDefault(),!i){L();return}l();},onMouseEnter:L,onMouseLeave:S,children:[jsxs(He,{children:[e,jsx(_e,{})]}),jsx(R,{ref:C,popperRef:m,[k]:"",[$]:d,sx:{maxHeight:"min(450px, calc(100dvh - 16px))",overflow:"auto"},open:w,anchorEl:s.current,placement:"right-start",modifiers:f,popperOptions:Ce,onMouseEnter:L,onMouseLeave:S,children:r})]})}function it({option:e,value:t,onChange:n,isSelectable:o=true}){let l=H(e,t);return jsx(V$1,{isSelected:l,onClick:i=>{i.stopPropagation(),i.preventDefault(),o&&ze(e,t,n);},startAdornment:o?void 0:null,children:jsx(Ae,{children:e.label})})}function te({node:e,depth:t,value:n,onChange:o,isSelectable:l}){let r=Ve(l,t,e);if(O(e))return jsx(it,{option:e,value:n,onChange:o,isSelectable:r});if(!e.options)return null;let i=e.options,d=Q(e),{allSelected:s,someSelected:C}=U(d,n);return jsx(ot,{label:e.label,itemCount:i.length,isSelected:s,isIndeterminate:C,isSelectable:r,onToggle:()=>je(d,n,o),children:i.map(m=>jsx(te,{node:m,depth:t+1,value:n,onChange:o,isSelectable:l},A(m)))})}var Wt=["label"],st=forwardRef(({options:e,onChange:t,value:n,maxVisibleValues:o,placeholder:l,label:r,isLoading:i,isSelectable:d$1,disabled:s,className:C,sx:m,isSearchable:x=true,searchPlaceholder:w,searchBy:c=Wt,onOpen:f,onClose:N},L$1)=>{let[S,h]=useState(null),[b,R$1]=useState(""),[j,E]=useState(void 0),u=!!S,G=r??l,ct=r?l??"Please Select":"Please Select";useEffect(()=>{if(!S)return;let p=()=>{let K=S.clientWidth;K>0&&E(ie=>ie===K?ie:K);};if(p(),typeof ResizeObserver>"u")return;let I=new ResizeObserver(p);return I.observe(S),()=>I.disconnect()},[S]);let at=S?.clientWidth||j,ut=p=>{if(u){h(null),N?.();return}h(p.currentTarget),f?.();},pt=()=>{h(null),N?.();},dt=()=>{b&&R$1("");},mt=useMemo(()=>Ge(e,b,c),[e,b,c]),le=n?.length??0,ft=i?jsx(ca,{}):jsx(d,{src:b?Gb:A$2,alt:b?"close":"search",onClick:dt,sx:{width:12,height:12,cursor:b?"pointer":"default"}});return jsx(Tt,{onClickAway:()=>{u&&pt();},children:jsxs(Oe,{ref:L$1,id:"FieldWrapper","data-testid":"MultiLevelSelect",$disabled:s,"aria-disabled":s||void 0,className:Eb(a.root,u&&a.open,C),sx:m,onClick:p=>!s&&ut(p),children:[jsx(Pe,{className:a.label,component:"label",children:G}),jsxs(Re,{className:a.fieldBody,children:[le===0?jsx(Ee,{className:a.placeholder,component:"p",children:ct}):null,le>0&&n?jsx(Qe,{options:n,maxVisibleValues:o}):null]}),jsx(Fe,{className:a.arrow,"aria-hidden":true,children:i?jsx(y,{component:"span",className:"Select-menuTriggerIcon Select-menuTriggerIcon--loading","aria-hidden":true,children:jsx(ca,{})}):jsx(y,{component:"span",className:`Select-menuTriggerIcon${u?" Select-menuTriggerIcon-open":""}`,children:jsx(ba,{})})}),jsx(R,{open:u,anchorEl:S,sx:{margin:"8px 0",maxHeight:330,overflow:"auto",width:at},panelProps:{className:a.menu},children:jsxs(Te,{children:[x?jsx(L,{className:a.search,fullWidth:true,size:"md",placeholder:w??l??"Select",endAdornment:ft,value:b,onClick:p=>{p.stopPropagation();},onMouseDown:p=>{p.stopPropagation();},onChange:p=>{R$1(p.target.value);},sx:{mb:"8px"}}):null,jsx(V,{options:n??[],variant:"menu",onRemove:p=>{t(n?.filter(I=>I.value!==p.value)||[]);}}),mt.map(({node:p,depth:I})=>jsx(te,{node:p,depth:I,value:n,onChange:t,isSelectable:d$1},A(p)))]})})]})})});st.displayName="MultiLevelSelect";var kt=memo(st);
|
|
2
2
|
export{a,kt as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {o,v,u,t as t$1,n,C,w,r,q,p,s,m,l,z,A,
|
|
1
|
+
import {o,v,u,t as t$1,n,C,w,r,q,p,s,m,l,z,A,ca}from'./chunk-YG4CT6O4.js';import {j,P,O,V,R,d}from'./chunk-F7I3KDV5.js';import {Eb,Db}from'./chunk-XBJ4RS2B.js';import {Sc}from'./chunk-EYLBXWXJ.js';import {forwardRef,useRef,useState,memo}from'react';import ze from'@mui/material/ClickAwayListener';import Ve from'@mui/material/SvgIcon';import {jsx,jsxs}from'react/jsx-runtime';import g from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';var i="os-shared-GroupedSelect",t={root:`${i}-root`,trigger:`${i}-trigger`,triggerBody:`${i}-triggerBody`,hasLabel:`${i}-hasLabel`,triggerIcon:`${i}-triggerIcon`,menu:`${i}-menu`,groups:`${i}-groups`,group:`${i}-group`,groupLabel:`${i}-groupLabel`,option:`${i}-option`,optionCheck:`${i}-optionCheck`};function _({open:e}){return jsx(Ve,{viewBox:"0 0 8 5",sx:{width:8,height:5,transform:e?"rotate(180deg)":"none",transition:"transform 0.2s ease, color 0.2s ease"},children:jsx("path",{d:"M7.30273 0.117188C7.3806 0.115307 7.4565 0.138248 7.52051 0.182617C7.58455 0.227088 7.63373 0.290458 7.66211 0.363281C7.69046 0.436073 7.69761 0.516047 7.68262 0.592773C7.66777 0.668745 7.63069 0.738375 7.57715 0.793945L4.17285 4.43164C4.10255 4.50662 4.00523 4.55078 3.90234 4.55078C3.79964 4.55064 3.703 4.5065 3.63281 4.43164L0.227539 0.794922L0.228516 0.793945C0.175799 0.738766 0.139848 0.669812 0.125 0.594727C0.11011 0.519097 0.116275 0.440194 0.143555 0.368164C0.170957 0.296002 0.218752 0.232474 0.28125 0.1875C0.343758 0.14262 0.418162 0.11821 0.495117 0.118164C0.546901 0.118166 0.598306 0.12907 0.645508 0.150391C0.691832 0.171346 0.733094 0.201824 0.767578 0.239258L3.90234 3.58691L7.03711 0.239258C7.10547 0.164191 7.20108 0.119752 7.30273 0.117188Z",fill:"currentColor",stroke:"currentColor",strokeWidth:.233333})})}var te=styled(g,{shouldForwardProp:e=>e!=="open"&&e!=="disabled"})(({theme:e,open:o$1,disabled:c})=>{let u={border:`${o}px solid ${e.v2.palette.brand[500]}`,boxShadow:`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`};return {display:"flex",alignItems:"center",cursor:c?"not-allowed":"pointer",position:"relative",maxWidth:"100%",outline:"none",[`& .${t.trigger}`]:{border:`${o}px solid transparent`,boxSizing:"border-box",transition:e.transitions.create(["border-color","box-shadow"],{duration:e.transitions.duration.shorter})},...!c&&{[`&:focus-within .${t.trigger}`]:u,...o$1&&{[`& .${t.trigger}`]:u},[`&:focus-within .${t.triggerIcon} .MuiSvgIcon-root`]:{color:e.v2.palette.brand[500]},...o$1&&{[`& .${t.triggerIcon} .MuiSvgIcon-root`]:{color:e.v2.palette.brand[500]}}}}}),oe=styled(g,{shouldForwardProp:e=>e!=="disabled"})(({theme:e,disabled:o})=>({flex:1,minWidth:0,height:32,maxHeight:32,borderRadius:"4px",overflow:"hidden",backgroundColor:e.palette.grey[400],cursor:o?"default":"pointer",position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",padding:`0 ${C}px 0 ${w}px`,textAlign:"start",[`&:where(.${t.hasLabel})`]:{height:n,maxHeight:n,gap:t$1,justifyContent:"flex-end",[`& .${t.triggerBody}`]:{flex:"0 0 auto",alignItems:"flex-start",minHeight:v+u,paddingBottom:u,boxSizing:"border-box","& > *":{height:"auto",minHeight:v}}}})),re=styled(j,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:o})=>({alignSelf:"stretch",width:"100%",boxSizing:"border-box",height:s,flexShrink:0,margin:0,paddingTop:p,fontSize:q,fontWeight:500,lineHeight:`${r}px`,textAlign:"start",color:o?e.palette.text.disabled:e.palette.grey[700],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"})),le=styled(g)(()=>({display:"flex",alignItems:"center",width:"100%",minWidth:0,flex:1})),ne=styled(g,{shouldForwardProp:e=>e!=="$placeholder"&&e!=="$disabled"&&e!=="$valueAlignment"})(({theme:e,$placeholder:o,$disabled:c,$valueAlignment:u=m})=>{let m=u===l.end;return {fontSize:"11px",lineHeight:"11px",color:c?e.palette.text.disabled:o?e.palette.text.secondary:e.v2.palette.base.black,height:22,flex:"1 1 0%",minWidth:0,display:"flex",alignItems:"center",justifyContent:m?"flex-end":"flex-start",textAlign:m?"end":"start",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",paddingInlineEnd:m?0:void 0}}),ie=styled(g,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:o})=>({position:"absolute",right:A,top:"50%",transform:"translateY(-50%)",width:z,height:z,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",lineHeight:0,color:o?e.palette.text.disabled:e.v2.palette.base.black,opacity:o?e.palette.action.disabledOpacity:1})),ae=styled(g)(()=>({display:"flex",flexDirection:"column",maxHeight:180,overflow:"auto",scrollbarWidth:"thin",scrollbarColor:"#E5E5E5 #E5E5E5"})),de=styled(P)(({theme:e})=>{let o=`1px solid ${alpha(e.palette.common.black,.1)}`;return {flexShrink:0,border:0,borderRadius:0,"&.Mui-expanded:not(:last-of-type)":{borderBottom:o},[`&:last-of-type .${O.summary}`]:{borderBottom:"none"},[`&.Mui-expanded:last-of-type .${O.summary}`]:{borderBottom:o},[`& .${O.summary}`]:{backgroundColor:e.palette.common.white,borderBottom:o,minHeight:28,height:"auto","& .MuiAccordionSummary-content":{margin:"auto"},"&.Mui-expanded":{backgroundColor:"#F8F8F8",minHeight:28,height:"auto"}},[`& .${O.content}`]:{borderTop:"none"}}}),se=styled(j)(({theme:e})=>({fontSize:q,color:e.v2.palette.grey[500],fontWeight:600,lineHeight:`${r}px`})),pe=styled(V)(()=>({fontSize:"10px",fontWeight:500,textTransform:"none",justifyContent:"space-between",padding:"8px 20px"}));function je(e,o){return e?.id===o?.id}var ge=forwardRef(({id:e,label:o,placeholder:c,renderValue:u,IconComponent:m$1,isLoading:me=false,valueAlignment:Se=m,options:xe,value:h,onChange:be,isOptionEqualToValue:fe=je,renderOption:he,renderGroupLabel:ye,open:Ge,onOpenChange:Ce,expandedGroupIndex:P,defaultExpandedGroupIndex:$e=0,onExpandedGroupChange:Le,disabled:p=false,sx:we,menuSx:Te,className:ve},Ee)=>{let k=useRef(null),[F,Ie]=useState(null),[Pe,ke]=useState($e),s=Ge??F!==null,S=F??k.current,Fe=P??Pe,N=useRef(void 0);s&&S&&S.clientWidth>0&&(N.current=S.clientWidth);let Ne=N.current,y=(r,n)=>{Ie(n),Ce?.(r);},Ae=r=>{if(p)return;let n=!s;y(n,n?r.currentTarget:null);},A=()=>{s&&y(false,null);},He=r=>{r.key==="Escape"&&A();},Me=(r,n)=>{let a=n?r:null;P===void 0&&ke(a),Le?.(a);},Be=r=>{r.disabled||(be?.(r),y(false,null));},H=u?.(h)??h?.label??null,M=m$1,B=!!o;return jsx(ze,{onClickAway:A,children:jsxs(te,{ref:Ee,id:e,"data-testid":"GroupedSelect",className:Eb(t.root,ve),sx:we,open:s,disabled:p,tabIndex:p?-1:0,role:"combobox","aria-expanded":s,"aria-haspopup":"listbox",onClick:Ae,onKeyDown:He,children:[jsxs(oe,{ref:k,className:Eb(t.trigger,B&&t.hasLabel),disabled:p,children:[B&&jsx(re,{$disabled:p,children:o}),jsx(le,{className:t.triggerBody,children:jsx(ne,{$placeholder:H==null,$disabled:p,$valueAlignment:Se,children:H??c??""})}),jsx(ie,{className:t.triggerIcon,$disabled:p,children:me?jsx(ca,{}):M?jsx(M,{className:Eb(s&&"MuiSelect-iconOpen")}):jsx(_,{open:s})})]}),jsx(R,{open:s,anchorEl:S,placement:"bottom-start",className:t.menu,sx:Db({width:Ne??S?.clientWidth,marginTop:"4px"},Te),children:jsx(ae,{className:t.groups,onClick:r=>r.stopPropagation(),onMouseDown:r=>r.stopPropagation(),children:(xe??[]).map((r,n)=>jsx(de,{className:t.group,expanded:Fe===n,onChange:a=>Me(n,a),slotProps:{root:{square:true}},label:ye?.(r.group,n)??jsx(se,{variant:"caption",className:t.groupLabel,children:r.group}),content:(r?.options||[]).map((a,We)=>{let Oe=fe(a,h);return jsxs(pe,{className:t.option,startAdornment:null,isDisabled:a.disabled,onClick:()=>Be(a),children:[he?.(a)??a.label,Oe&&jsx(d,{src:Sc,alt:"selected",sx:{width:14,height:10},className:t.optionCheck})]},`${n}-${We}`)})},`${n}`))})})]})})});ge.displayName="GroupedSelect";var Ke=memo(ge);export{t as a,Ke as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {f as f$1,aa}from'./chunk-F7I3KDV5.js';import {Sc,A as A$1}from'./chunk-EYLBXWXJ.js';import {forwardRef}from'react';import r from'@mui/material/Box';import ne from'@mui/material/CircularProgress';import ie from'@mui/material/SvgIcon';import J from'@mui/material/Button';import K from'@mui/material/FormControl';import Q from'@mui/material/Input';import m from'@mui/material/ListSubheader';import U from'@mui/material/MenuItem';import X from'@mui/material/Select';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var o="os-shared-Select",u={root:`${o}-root`,field:`${o}-field`,input:`${o}-input`,display:`${o}-display`,endAdornment:`${o}-endAdornment`,chevron:`${o}-chevron`,loading:`${o}-loading`,menu:`${o}-menu`,option:`${o}-option`,clear:`${o}-clear`,feedback:`${o}-feedback`,values:`${o}-values`,value:`${o}-value`,valueOverflow:`${o}-valueOverflow`,search:`${o}-search`,summary:`${o}-summary`,groupLabel:`${o}-groupLabel`},ae="Search",de=8,pe=8,a=28,d=36,n=17,se=4,z=256,W=272,A=293,ce=8,E={bottom:"bottom",top:"top"},xe=E.bottom,h={start:"start",end:"end"},ge=h.start,R=48,O=1,G=R-2*O,D=8,ue=10,j=13,N=D+j,Z=4,q=6,he=G-N-Z-q,b=8,f=4,y=f,c=8,x=16,v=8,g=4,me=g+x+v,Se=g+c+y;var Fe={maxHeight:z,[`&:has(.${u.search})`]:{maxHeight:`${W}px !important`},[`&:has(.${u.search}):has(.${u.summary})`]:{maxHeight:`${A}px !important`}},$e=styled(r)({width:"100%",display:"flex",flexDirection:"column"}),Le=styled(r)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),width:"100%",minWidth:0})),ze=styled(f$1,{shouldForwardProp:e=>e!=="$mutedRect"})(({$mutedRect:e})=>({padding:0,pointerEvents:"none",...e&&{opacity:.5}})),B="#F8F8F8",We=styled(U,{shouldForwardProp:e=>e!=="$selected"&&e!=="$hidden"})(({theme:e,$selected:i,$hidden:l})=>({fontSize:"12px",fontWeight:500,lineHeight:"16px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.spacing(1),minHeight:a,height:"auto",flexShrink:0,padding:"6px 8px",overflow:"hidden",[e.breakpoints.up("sm")]:{minHeight:a},boxSizing:"border-box",borderRadius:4,backgroundColor:i?B:e.palette.common.white,"&.Mui-selected, &.Mui-focusVisible, &:hover, &.Mui-selected:hover":{backgroundColor:B},"&.Mui-disabled":{opacity:.38},...l&&{display:"none !important"}})),Ae=styled(r,{shouldForwardProp:e=>e!=="$customLayout"})(({$customLayout:e})=>({flex:1,minWidth:0,display:"flex",alignItems:e?"flex-start":"center",alignSelf:e?"stretch":void 0,height:e?"auto":void 0,overflow:e?"visible":"hidden",lineHeight:"16px"})),Be=styled("span")({display:"block",minWidth:0,maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"12px",fontWeight:500,lineHeight:"16px"}),Te=styled(r,{shouldForwardProp:e=>e!=="$valueAlignment"})(({$valueAlignment:e})=>{let i=e===h.end;return {display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:i?"flex-end":"flex-start",width:"100%",minWidth:0,maxWidth:"100%",overflow:"hidden",boxSizing:"border-box",pointerEvents:"none",textAlign:i?"end":"start"}}),Ve=styled(r)(({theme:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:"0 1 auto",maxWidth:"100%",fontWeight:500,fontSize:11,lineHeight:"130%",letterSpacing:0,color:e.v2.palette.base.black,textAlign:"start"})),Ee=styled(r)({flex:"0 0 auto",whiteSpace:"nowrap",marginLeft:4,fontWeight:500,fontSize:11,lineHeight:"130%",letterSpacing:0,color:"var(--fg-brand, rgba(31, 136, 208, 1))"}),Y=styled(m)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",height:d,minHeight:d,maxHeight:d,padding:0,lineHeight:1,overflow:"hidden",flexShrink:0,position:"sticky",top:0,zIndex:1,"&.MuiListSubheader-root":{height:d,minHeight:d,padding:0,lineHeight:1}}));Y.muiSkipListHighlight=true;var _=styled(m)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",height:a,minHeight:a,padding:0,display:"flex",alignItems:"center",fontSize:12,fontWeight:500,lineHeight:"14px",color:e.v2.palette.grey[500],flexShrink:0,"&.MuiListSubheader-root":{height:a,minHeight:a,padding:0,lineHeight:"14px"}}));_.muiSkipListHighlight=true;var ee=styled(m,{shouldForwardProp:e=>e!=="$divider"&&e!=="$hidden"})(({theme:e,$divider:i,$hidden:l})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",flexShrink:0,padding:"8px 8px 4px",fontSize:10,fontWeight:500,lineHeight:"100%",color:e.v2.palette.grey[500],borderTop:i?`1px solid ${e.v2.palette.border.default}`:"none","&.MuiListSubheader-root":{position:"static",lineHeight:"100%"},"&:empty":{padding:0},...l&&{display:"none !important"}})),Re=Object.assign(ee,{muiSkipListHighlight:true}),Oe=styled(Q)(({theme:e})=>({width:"100%",height:d,padding:"8px 8px 8px 12px",borderRadius:4,backgroundColor:e.palette.common.white,border:`1px solid ${e.v2.palette.grey[100]}`,boxSizing:"border-box","&:hover":{borderColor:e.v2.palette.grey[100]},"&.Mui-focused":{borderColor:e.v2.palette.brand[500],boxShadow:`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`,backgroundColor:e.palette.common.white},"&:before, &:after":{display:"none"},"& input":{padding:0,fontSize:10},"& .MuiInputBase-input":{paddingRight:4}})),T=styled("img")({width:14,height:14,flexShrink:0,display:"block"}),Ge=styled(m)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",display:"flex",alignItems:"center",height:n,minHeight:n,maxHeight:n,padding:0,lineHeight:`${n}px`,overflow:"hidden",flexShrink:0,"&.MuiListSubheader-root":{height:n,minHeight:n,padding:0,lineHeight:`${n}px`}})),De=styled(r)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"border-box",width:"100%",height:n,minHeight:n,gap:e.spacing(1)})),je=styled("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontWeight:500,fontSize:11,lineHeight:`${n}px`,letterSpacing:0,color:e.v2.palette.grey[500]})),Ne=styled(J)(({theme:e})=>({minWidth:0,minHeight:0,height:n,padding:0,fontFamily:e.typography.fontFamily,fontWeight:500,fontStyle:"normal",fontSize:11,lineHeight:`${n}px`,letterSpacing:0,textTransform:"none",verticalAlign:"middle",color:e.v2.palette.brand[500],"&.MuiButton-root":{minWidth:0,minHeight:0,height:n,padding:0,lineHeight:`${n}px`}})),Ze=styled(K)(({theme:e})=>({minWidth:52,height:"40px !important",maxHeight:"40px !important",backgroundColor:"transparent",width:"100%",cursor:"pointer","& .MuiInputBase-root":{cursor:"pointer"},"& .MuiInputBase-root.Mui-disabled":{cursor:"default"},"& .MuiFormLabel-asterisk":{color:"red"},"& .MuiFormLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)",color:`${e.palette.grey[700]} !important`,height:"100%",pointerEvents:"none"},".MuiFormLabel-root.MuiFormLabel-filled":{transform:"translate(8px, 8px) scale(0.75) "},".MuiFormLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)",fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%"}})),qe=styled(X,{shouldForwardProp:e=>!["feedbackType","hasFeedback","valueAlignment","hasLabel"].includes(e)})(({theme:e,error:i,feedbackType:l,hasFeedback:s,valueAlignment:V,hasLabel:w})=>{let{borderColor:I}=aa(e,l),C=s?"4px 4px 0 0":"4px",S=V===h.end,P=S?g:f,H=w?`18px ${P}px 6px ${b}px !important`:`0 ${P}px 0 ${b}px !important`;return {width:"100%",height:"40px !important",maxHeight:"40px !important",borderRadius:C,overflow:"hidden",backgroundColor:e.palette.grey[400],border:"1px solid transparent",boxSizing:"border-box",transition:e.transitions.create(["border-color","box-shadow"],{duration:e.transitions.duration.shorter}),"&.Mui-focused":{border:s?`1px solid ${l?I:"transparent"}`:`1px solid ${e.v2.palette.brand[500]}`,borderBottom:s?"none":void 0,boxShadow:s?"none":`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`,backgroundColor:e.palette.grey[400]},"&.Mui-disabled":{backgroundColor:e.palette.grey[400],boxShadow:"none",borderColor:"transparent"},".MuiSelect-select":{padding:H,height:"40px !important",maxHeight:"40px !important",display:"flex !important",alignItems:w?"flex-end !important":"center !important",justifyContent:S?"flex-end !important":"flex-start !important",textAlign:S?"end !important":"start !important",boxSizing:"border-box",overflow:"hidden",backgroundColor:`${e.palette.grey[400]} !important`,borderRadius:C,fontSize:"11px",lineHeight:"11px",cursor:"pointer",position:"relative",zIndex:0,"&:focus":{backgroundColor:`${e.palette.grey[400]} !important`}},"&.Mui-disabled .MuiSelect-select":{cursor:"default"},".MuiSelect-filled":{padding:H},"&.MuiInputBase-adornedEnd":{display:"inline-flex",alignItems:"center",backgroundColor:e.palette.grey[400],gap:0},"&&.MuiInputBase-adornedEnd .MuiInputBase-input":{flex:"1 1 0%",minWidth:0,width:"auto",maxWidth:"100%"},"& .Select-endAdornmentRoot":{display:"flex",alignItems:"center",flexShrink:0,marginRight:y,gap:g,position:"relative",zIndex:2,pointerEvents:"auto","&.Select-endAdornmentRoot--loading":{marginRight:v}},"& .Select-clearIconButton":{display:"inline-flex",alignItems:"center",justifyContent:"center",width:12,height:12,padding:0,border:"none",appearance:"none",background:"transparent",color:e.v2.palette.base.black,cursor:"pointer",flexShrink:0,lineHeight:0,position:"relative",zIndex:2,pointerEvents:"auto","& svg":{display:"block",width:8,height:8,fontSize:8},"&:focus-visible":{outline:`2px solid ${e.palette.primary.main}`,outlineOffset:1}},"&.Mui-disabled .Select-clearIconButton":{opacity:"0 !important",pointerEvents:"none"},"& .Select-menuTriggerIcon":{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:c,minWidth:c,height:c,cursor:"pointer",color:e.v2.palette.base.black,lineHeight:0,"& svg, & .MuiSvgIcon-root":{transition:e.transitions.create(["transform","color"],{duration:e.transitions.duration.shorter})},"&.Select-menuTriggerIcon--loading":{width:x,minWidth:x,height:x,cursor:"default"}},"&.Mui-focused .Select-menuTriggerIcon, & .Select-menuTriggerIcon-open":{color:e.v2.palette.brand[500]},"& .Select-menuTriggerIcon-open svg, & .Select-menuTriggerIcon-open .MuiSvgIcon-root":{transform:"rotate(180deg)"},"&.Mui-disabled .MuiSelect-icon":{color:"rgba(0, 0, 0, 0.38)"},"&.Mui-disabled .Select-menuTriggerIcon":{cursor:"default",color:"rgba(0, 0, 0, 0.38)","& svg path":{fill:"rgba(0, 0, 0, 0.38)",stroke:"rgba(0, 0, 0, 0.38)"}},...l&&{border:`1px solid ${I}`},...s&&{borderBottom:"none"},...i&&{border:`1px solid ${e.palette.error.main}`,boxShadow:"none"}}}),Je=styled(r,{shouldForwardProp:e=>e!=="$hasFeedback"})(({theme:e,$hasFeedback:i})=>({display:"flex",alignItems:"stretch",height:"100%",flexDirection:"column",flex:1,width:"100%",cursor:"pointer",borderRadius:4,overflow:"visible",textAlign:"start",...i&&{"&:has(.MuiInputBase-root.Mui-focused)":{boxShadow:`0px 0px 0px 1px ${e.v2.palette.brand[500]}, 0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`}},"&:has(.MuiInputBase-root.Mui-disabled)":{cursor:"default"}})),Ke=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block",width:"100%",textAlign:"start"}));function ot(){return jsx(r,{component:"img",src:Sc,alt:"",sx:{width:10,height:7.5,flexShrink:0}})}function nt(){return jsx(T,{src:A$1,alt:""})}function it(){return jsxs("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none","aria-hidden":true,children:[jsx("path",{d:"M1.795 1.739L6.316 6.26",stroke:"currentColor",strokeWidth:"0.875",strokeLinecap:"round"}),jsx("path",{d:"M6.316 1.739L1.795 6.26",stroke:"currentColor",strokeWidth:"0.875",strokeLinecap:"round"})]})}var re=forwardRef((e,i)=>jsx(ie,{ref:i,viewBox:"0 0 8 5",fill:"none",fontSize:"small",sx:{width:8,height:5},...e,children:jsx("path",{d:"M7.30273 0.117188C7.3806 0.115307 7.4565 0.138248 7.52051 0.182617C7.58455 0.227088 7.63373 0.290458 7.66211 0.363281C7.69046 0.436073 7.69761 0.516047 7.68262 0.592773C7.66777 0.668745 7.63069 0.738375 7.57715 0.793945L4.17285 4.43164C4.10255 4.50662 4.00523 4.55078 3.90234 4.55078C3.79964 4.55064 3.703 4.5065 3.63281 4.43164L0.227539 0.794922L0.228516 0.793945C0.175799 0.738766 0.139848 0.669812 0.125 0.594727C0.11011 0.519097 0.116275 0.440194 0.143555 0.368164C0.170957 0.296002 0.218752 0.232474 0.28125 0.1875C0.343758 0.14262 0.418162 0.11821 0.495117 0.118164C0.546901 0.118166 0.598306 0.12907 0.645508 0.150391C0.691832 0.171346 0.733094 0.201824 0.767578 0.239258L3.90234 3.58691L7.03711 0.239258C7.10547 0.164191 7.20108 0.119752 7.30273 0.117188Z",fill:"currentColor",stroke:"currentColor",strokeWidth:.233333})}));re.displayName="SelectChevronIcon";function rt(){return jsx(ne,{size:14,sx:{color:"text.secondary"}})}export{nt as $,v as A,g as B,me as C,Se as D,Fe as E,$e as F,Le as G,ze as H,We as I,Ae as J,Be as K,Te as L,Ve as M,Ee as N,Y as O,_ as P,Re as Q,Oe as R,Ge as S,De as T,je as U,Ne as V,Ze as W,qe as X,Je as Y,Ke as Z,ot as _,u as a,it as aa,ae as b,re as ba,de as c,rt as ca,pe as d,se as e,z as f,W as g,A as h,ce as i,E as j,xe as k,h as l,ge as m,R as n,O as o,D as p,ue as q,j as r,N as s,Z as t,q as u,he as v,b as w,y as x,c as y,x as z};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {P as P$1,O}from'./chunk-F7I3KDV5.js';import {Eb}from'./chunk-XBJ4RS2B.js';import {forwardRef,useMemo,useState,memo}from'react';import {styled,alpha,useTheme}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var a="os-shared-Sidebar",e={root:`${a}-root`,header:`${a}-header`,content:`${a}-content`,footer:`${a}-footer`,link:`${a}-link`,group:`${a}-group`,groupSummary:`${a}-groupSummary`,groupSummaryActive:`${a}-groupSummaryActive`,groupSummaryExpanded:`${a}-groupSummaryExpanded`,groupHeader:`${a}-groupHeader`,groupContent:`${a}-groupContent`,groupItem:`${a}-groupItem`,startAdornment:`${a}-startAdornment`,endAdornment:`${a}-endAdornment`};var G=r=>{let{palette:n}=useTheme();return jsx("svg",{width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:jsx("path",{d:"M9.97437 5.23633C10.0426 5.23465 10.1087 5.25507 10.1648 5.29395C10.2207 5.33278 10.264 5.3876 10.2888 5.45117C10.3136 5.51487 10.3195 5.5852 10.3064 5.65234C10.2934 5.71873 10.2614 5.77954 10.2146 5.82813L7.23608 9.01172C7.17462 9.07723 7.08968 9.11518 6.99976 9.11523C6.90985 9.11523 6.82492 9.07717 6.76343 9.01172L3.78394 5.8291L3.78491 5.82812C3.73877 5.77985 3.70612 5.71999 3.69312 5.6543C3.68007 5.58802 3.68575 5.51818 3.70972 5.45508C3.7337 5.39201 3.77618 5.33717 3.83081 5.29785C3.88553 5.25857 3.95095 5.23732 4.01831 5.2373C4.0635 5.23736 4.10797 5.24702 4.14917 5.26562C4.18997 5.28407 4.2263 5.31071 4.25659 5.34375L6.99878 8.27246L9.74194 5.34375C9.80179 5.27779 9.88521 5.23858 9.97437 5.23633Z",fill:n.text.textSecondary,stroke:n.text.textSecondary,strokeWidth:"0.204167"})})};var E="linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)",H=styled("div")(({theme:r})=>{let{base:n}=r.v2.palette;return {backgroundColor:alpha(n.white,.7),backdropFilter:r.v2.blur[16],width:"100%",position:"sticky",padding:`${r.v2.spacing(8)} ${r.v2.spacing(8)}`,height:"100%",overflow:"hidden",display:"flex",flexDirection:"column",gap:r.v2.spacing(8)}}),L=styled("div")({flexShrink:0}),R=styled("div")(({theme:r})=>({display:"flex",flexDirection:"column",gap:r.v2.spacing(4),flex:1,minHeight:0,overflow:"auto"})),P=styled("div")({flexShrink:0}),C={border:"none",width:"100%",textAlign:"left",font:"inherit",cursor:"pointer"},f=styled("span")({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0}),x=styled("span")({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginLeft:"auto"}),F=styled("button",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,flexShrink:0,...r.v2.typography.textVariants.body.small.regular,background:n?E:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:n?o.white:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4)}}),V=styled(P$1)(({theme:r})=>({flexShrink:0,"&&":{background:"transparent",boxShadow:"none"},border:"none !important",borderRadius:"4px !important",[`& .${O.summary}`]:{padding:0,paddingRight:8,minHeight:"24px",height:"24px","&.Mui-expanded":{minHeight:"24px",height:"24px"},borderRadius:"4px !important",background:"transparent",transition:"none"},[`& .${O.summary}.${e.groupSummaryActive}`]:{backgroundColor:r.v2.palette.base.white},[`& .${O.summary}.${e.groupSummaryExpanded}`]:{backgroundColor:r.v2.palette.base.white},[`& .${O.content}`]:{borderTop:"none",padding:0},[`& .${O.labelContent}`]:{flexGrow:1,minWidth:0}})),D=styled("span",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,...r.v2.typography.textVariants.body.small.regular,background:n?o.white:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4),width:"100%",cursor:"pointer"}}),j=styled("div")(({theme:r})=>({display:"flex",flexDirection:"column",gap:r.v2.spacing(4),paddingTop:r.v2.spacing(4)})),M=styled("button",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,flexShrink:0,...r.v2.typography.textVariants.body.small.regular,background:n?E:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:n?o.white:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4)}});var $=r=>!!r.sections?.length;function T(r,n){let o=n??r?.[0]?.sections?.[0]?.id??r?.[0]?.id,d=r?.find(c=>c.id===o),u=!d||!$(d),l=u?r?.find(c=>c.sections?.some(y=>y.id===o)):d,g=l?.id??d?.id??o,b=l?u?o:l.sections?.[0]?.id:void 0;return {activeId:o,activeGroupId:g,activeLeafId:b}}var B=forwardRef(({sections:r,activeSectionId:n,onSelect:o,defaultExpandedIds:d,header:u,footer:l,id:g,className:b,sx:c},y)=>{let{activeId:h,activeGroupId:A,activeLeafId:k}=useMemo(()=>T(r,n),[r,n]),[O,W]=useState(()=>Object.fromEntries((d??[]).map(t=>[t,true])));return jsxs(H,{ref:y,id:g,"data-testid":g??"Sidebar",className:Eb(e.root,b),sx:c,children:[u?jsx(L,{className:e.header,children:u}):null,jsx(R,{className:e.content,children:r?.map(t=>{if(!$(t))return jsxs(F,{type:"button",$isActive:h===t.id,"aria-current":h===t.id?"true":void 0,onClick:()=>o?.(t,void 0,[t]),className:e.link,children:[t.startAdornment?jsx(f,{className:e.startAdornment,children:t.startAdornment}):null,t.title,t.endAdornment?jsx(x,{className:e.endAdornment,children:t.endAdornment}):null]},t.id);let I=O[t.id]??t.id===A;return jsx(V,{className:e.group,expanded:I,onChange:i=>W(Z=>({...Z,[t.id]:i})),expandIcon:jsx(G,{}),slotProps:{root:{component:"section"},summary:{className:Eb(e.groupSummary,A===t.id&&e.groupSummaryActive,I&&e.groupSummaryExpanded)}},label:jsxs(D,{$isActive:A===t.id,className:e.groupHeader,children:[t.startAdornment?jsx(f,{className:e.startAdornment,children:t.startAdornment}):null,t.title,t.endAdornment?jsx(x,{className:e.endAdornment,children:t.endAdornment}):null]}),content:jsx(j,{className:e.groupContent,children:t.sections?.map(i=>jsxs(M,{type:"button",$isActive:k===i.id,"aria-current":k===i.id?"true":void 0,onClick:()=>o?.(i,t,[t,i]),className:e.groupItem,children:[i.startAdornment?jsx(f,{className:e.startAdornment,children:i.startAdornment}):null,i.title,i.endAdornment?jsx(x,{className:e.endAdornment,children:i.endAdornment}):null]},`${t.id}-${i.id}`))})},t.id)})}),l?jsx(P,{className:e.footer,children:l}):null]})});B.displayName="Sidebar";var X=memo(B);
|
|
2
|
+
export{e as a,X as b};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ActionMenuProps } from './type';
|
|
3
|
+
declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<ActionMenuProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ActionMenuFlyoutRowProps } from './type';
|
|
3
|
+
/** Row with a hover flyout; nested rows go back through `ActionMenuRow`, so flyouts can nest. */
|
|
4
|
+
export declare function ActionMenuFlyoutRow({ item }: ActionMenuFlyoutRowProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ActionMenuGroupListProps } from './type';
|
|
3
|
+
/** Renders visible groups (divider between groups, optional heading, rows) for the root panel and flyout panels. */
|
|
4
|
+
export declare function ActionMenuGroupList({ groups }: ActionMenuGroupListProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ActionMenuLeafRowProps } from './type';
|
|
3
|
+
/** Clickable row. The menu stays open after a click — call `onClose` from `onClick` to close it. */
|
|
4
|
+
export declare function ActionMenuLeafRow({ item }: ActionMenuLeafRowProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ActionMenuRowProps } from './type';
|
|
3
|
+
/**
|
|
4
|
+
* Picks the row kind at any depth: a row with `items` is a flyout parent (omitted when no nested
|
|
5
|
+
* item is visible); every other row is a leaf.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ActionMenuRow({ item }: ActionMenuRowProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ActionMenuRowLeadingProps } from './type';
|
|
3
|
+
/** Leading slot: renders `startAdornment`; nothing when it is omitted, `null`, or `false`. */
|
|
4
|
+
export declare function ActionMenuRowLeading({ startAdornment, disabled }: ActionMenuRowLeadingProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ActionMenuRowTrailingProps } from './type';
|
|
3
|
+
/** Trailing group, in order: `endAdornment` (e.g. a badge), `trailingHint` dot, then the flyout arrow. */
|
|
4
|
+
export declare function ActionMenuRowTrailing({ trailingHint, endAdornment, hasArrow, disabled }: ActionMenuRowTrailingProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare const actionMenuClassNamePrefix: "os-shared-ActionMenu";
|
|
2
|
+
export declare const actionMenuClassNames: {
|
|
3
|
+
readonly root: "os-shared-ActionMenu-root";
|
|
4
|
+
readonly popper: "os-shared-ActionMenu-popper";
|
|
5
|
+
readonly panel: "os-shared-ActionMenu-panel";
|
|
6
|
+
readonly groupLabel: "os-shared-ActionMenu-groupLabel";
|
|
7
|
+
readonly groupDivider: "os-shared-ActionMenu-groupDivider";
|
|
8
|
+
readonly item: "os-shared-ActionMenu-item";
|
|
9
|
+
readonly itemContent: "os-shared-ActionMenu-itemContent";
|
|
10
|
+
readonly itemLabel: "os-shared-ActionMenu-itemLabel";
|
|
11
|
+
readonly itemIcon: "os-shared-ActionMenu-itemIcon";
|
|
12
|
+
readonly startAdornment: "os-shared-ActionMenu-startAdornment";
|
|
13
|
+
readonly rowEnd: "os-shared-ActionMenu-rowEnd";
|
|
14
|
+
readonly endAdornment: "os-shared-ActionMenu-endAdornment";
|
|
15
|
+
readonly arrow: "os-shared-ActionMenu-arrow";
|
|
16
|
+
readonly trailingDot: "os-shared-ActionMenu-trailingDot";
|
|
17
|
+
readonly flyoutHost: "os-shared-ActionMenu-flyoutHost";
|
|
18
|
+
readonly flyoutPopper: "os-shared-ActionMenu-flyoutPopper";
|
|
19
|
+
};
|
|
20
|
+
/** Default scroll cap for the root menu and flyout lists (px). */
|
|
21
|
+
export declare const DEFAULT_ACTION_MENU_MAX_HEIGHT = 360;
|
|
22
|
+
/** Default panel max width (px) — labels ellipsize when they overflow it. */
|
|
23
|
+
export declare const ACTION_MENU_MAX_WIDTH = 280;
|
|
24
|
+
/** Panel minimum width (px). */
|
|
25
|
+
export declare const ACTION_MENU_MIN_WIDTH = 148;
|
|
26
|
+
/** Row height (px). */
|
|
27
|
+
export declare const ACTION_MENU_ROW_HEIGHT = 32;
|
|
28
|
+
/** Group label height (px). */
|
|
29
|
+
export declare const ACTION_MENU_GROUP_LABEL_HEIGHT = 27;
|
|
30
|
+
/** Gap between the anchor and the root panel (px). */
|
|
31
|
+
export declare const ACTION_MENU_ANCHOR_GAP = 8;
|
|
32
|
+
/** Row / trailing icon sizes (px). */
|
|
33
|
+
export declare const ACTION_MENU_ICON_SIZE = 16;
|
|
34
|
+
export declare const ACTION_MENU_ARROW_SIZE = 12;
|
|
35
|
+
export declare const ACTION_MENU_TRAILING_DOT_SIZE = 5;
|
|
36
|
+
/** Default trailing dot fill — no v2 token matches this grey; frozen. */
|
|
37
|
+
export declare const ACTION_MENU_TRAILING_DOT_DEFAULT_COLOR = "#D9D9D9";
|
|
38
|
+
/** Panel shadow — `drop-shadow` (not an elevation token) so it follows the rounded panel; frozen. */
|
|
39
|
+
export declare const ACTION_MENU_PANEL_SHADOW = "drop-shadow(0px 8px 30px rgba(0, 0, 0, 0.16))";
|
|
40
|
+
/** Root popper sits above the invisible `Backdrop` (999); flyouts above MUI modals (1300). */
|
|
41
|
+
export declare const ACTION_MENU_POPPER_Z_INDEX = 1000;
|
|
42
|
+
export declare const ACTION_MENU_FLYOUT_POPPER_Z_INDEX = 1301;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { default, default as ActionMenu } from './ActionMenu';
|
|
2
|
+
export { ACTION_MENU_MAX_WIDTH, DEFAULT_ACTION_MENU_MAX_HEIGHT, actionMenuClassNames } from './constants';
|
|
3
|
+
export type { ActionMenuGroup, ActionMenuItem, ActionMenuProps, ActionMenuTrailingHint } from './type';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{c as ACTION_MENU_MAX_WIDTH,d as ActionMenu,b as DEFAULT_ACTION_MENU_MAX_HEIGHT,a as actionMenuClassNames,d as default}from'../../_chunks/chunk-6DGM7DYT.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const ActionMenuRootStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
4
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
5
|
+
export declare const ActionMenuPopperStyled: import("@emotion/styled").StyledComponent<import("@mui/material/Popper").PopperProps & import("react").RefAttributes<HTMLDivElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
6
|
+
export declare const ActionMenuFlyoutPopperStyled: import("@emotion/styled").StyledComponent<import("@mui/material/Popper").PopperProps & import("react").RefAttributes<HTMLDivElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
7
|
+
/** Scrollable panel (root menu and flyouts). */
|
|
8
|
+
export declare const ActionMenuListStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
9
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
10
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
11
|
+
$isFlyout?: boolean | undefined;
|
|
12
|
+
}, {}, {}>;
|
|
13
|
+
export declare const ActionMenuRowStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
14
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
15
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
16
|
+
$open?: boolean | undefined;
|
|
17
|
+
$disabled?: boolean | undefined;
|
|
18
|
+
}, {}, {}>;
|
|
19
|
+
export declare const ActionMenuRowContentStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
20
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
21
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
22
|
+
export declare const ActionMenuLabelStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
23
|
+
export declare const ActionMenuGroupLabelStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
24
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
25
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
26
|
+
export declare const ActionMenuGroupDividerStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
27
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
28
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
29
|
+
export declare const ActionMenuRowEndStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
30
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
31
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
32
|
+
export declare const ActionMenuTrailingDotHostStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
33
|
+
export declare const ActionMenuTrailingDotStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
34
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
35
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
36
|
+
$color: string;
|
|
37
|
+
}, {}, {}>;
|
|
38
|
+
/** Leading slot: caps nested media at the icon size so a large node cannot stretch the 32px row. */
|
|
39
|
+
export declare const ActionMenuStartAdornmentStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
40
|
+
$disabled?: boolean | undefined;
|
|
41
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
42
|
+
/** Trailing slot: default arrow or caller content. */
|
|
43
|
+
export declare const ActionMenuEndAdornmentStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
44
|
+
$disabled?: boolean | undefined;
|
|
45
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
46
|
+
export declare const ActionMenuArrowStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type { PopperProps } from '@mui/material/Popper';
|
|
4
|
+
import type { SxProps, Theme } from '@mui/material/styles';
|
|
5
|
+
/** Status or navigation hint shown as a dot (and optional arrow) at the end of a row. */
|
|
6
|
+
export interface ActionMenuTrailingHint {
|
|
7
|
+
/** Already-translated tooltip shown when the user hovers the dot. */
|
|
8
|
+
tooltip: string;
|
|
9
|
+
/**
|
|
10
|
+
* Dot fill. Defaults to `#D9D9D9` (grey) — use for open-in-new-window hints and inactive/no-activity states.
|
|
11
|
+
* Callers pass a brand color when the dot encodes status (e.g. portfolio activity classification).
|
|
12
|
+
*/
|
|
13
|
+
color?: string;
|
|
14
|
+
}
|
|
15
|
+
/** One row in the menu — an action, or a flyout parent when `items` is set. */
|
|
16
|
+
export interface ActionMenuItem {
|
|
17
|
+
/** Already-translated row label; ellipsizes when the panel is narrower than the text. */
|
|
18
|
+
label: string;
|
|
19
|
+
/** Content before the label (icon, SVG, avatar…); capped at 16px, dimmed when disabled, nothing rendered when omitted. */
|
|
20
|
+
startAdornment?: ReactNode;
|
|
21
|
+
/** When `false`, the row is omitted. Defaults to visible. */
|
|
22
|
+
isVisible?: boolean;
|
|
23
|
+
/** When `true`, the row is greyed out and does not fire `onClick` or open flyouts. */
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
/** Click handler for action rows. The menu stays open — call the menu's `onClose` here to close it. */
|
|
26
|
+
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
27
|
+
/** Right-click handler for action rows. The browser context menu is suppressed when set. */
|
|
28
|
+
onRightClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
29
|
+
/** Optional status dot (with tooltip), between `endAdornment` and the flyout arrow. */
|
|
30
|
+
trailingHint?: ActionMenuTrailingHint;
|
|
31
|
+
/**
|
|
32
|
+
* Trailing content (e.g. a count badge), shown before the `trailingHint` dot and the flyout arrow — all three can
|
|
33
|
+
* appear together. Display only — clicks inside it still trigger the row.
|
|
34
|
+
*/
|
|
35
|
+
endAdornment?: ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* Turns the row into a hover flyout listing these rows and groups (same shape as the menu's `items`).
|
|
38
|
+
* A flyout with no visible row is omitted.
|
|
39
|
+
*/
|
|
40
|
+
items?: Array<ActionMenuItem | ActionMenuGroup>;
|
|
41
|
+
}
|
|
42
|
+
/** Headed group of rows, set off by a divider. The `group` key (its heading) is what marks an entry as a group. */
|
|
43
|
+
export interface ActionMenuGroup {
|
|
44
|
+
/** Already-translated group heading. */
|
|
45
|
+
group: string;
|
|
46
|
+
/** Rows under this heading, in display order (hidden rows are skipped). */
|
|
47
|
+
items: ActionMenuItem[];
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Row-actions menu. `className`, `sx` and `ref` land on the root scrollable panel — e.g.
|
|
51
|
+
* `sx={{ maxWidth: 180, maxHeight: 640 }}` resizes it (flyouts keep the default size). Pass `id` explicitly — no id is generated.
|
|
52
|
+
* The optional DOM `id` also becomes the `data-testid` when passed.
|
|
53
|
+
*/
|
|
54
|
+
export interface ActionMenuProps {
|
|
55
|
+
/** Optional DOM id; also used as `data-testid` when provided. */
|
|
56
|
+
id?: string;
|
|
57
|
+
/** Merged onto the scrollable panel (`actionMenuClassNames.panel`). */
|
|
58
|
+
className?: string;
|
|
59
|
+
/** MUI sx overrides applied to the scrollable action panel. */
|
|
60
|
+
sx?: SxProps<Theme>;
|
|
61
|
+
/** MUI sx overrides applied to the root MUI Popper (placement layer). */
|
|
62
|
+
popperSx?: SxProps<Theme>;
|
|
63
|
+
/** Element the menu anchors to; when `null`, nothing is rendered. */
|
|
64
|
+
anchorEl: HTMLElement | null;
|
|
65
|
+
/** Called on backdrop click. Rows do not close the menu — call it from a row's `onClick` when needed. */
|
|
66
|
+
onClose: () => void;
|
|
67
|
+
/**
|
|
68
|
+
* Rows and groups (`{ group, items }`), mixed in array order. A divider sits between a group and its neighbours.
|
|
69
|
+
* Hidden rows and empty groups are skipped.
|
|
70
|
+
*/
|
|
71
|
+
items: Array<ActionMenuItem | ActionMenuGroup>;
|
|
72
|
+
/** Popper placement relative to `anchorEl`. Defaults to `bottom-end`. */
|
|
73
|
+
placement?: PopperProps['placement'];
|
|
74
|
+
}
|
|
75
|
+
/** Row dispatcher props (internal): flyout parent, leaf, or nothing when a flyout has no visible items. */
|
|
76
|
+
export interface ActionMenuRowProps {
|
|
77
|
+
item: ActionMenuItem;
|
|
78
|
+
}
|
|
79
|
+
/** Group list props (internal): visible rows split into groups; a run of plain rows has no `group` heading. */
|
|
80
|
+
export interface ActionMenuGroupListProps {
|
|
81
|
+
groups: Array<Partial<Pick<ActionMenuGroup, 'group'>> & Pick<ActionMenuGroup, 'items'>>;
|
|
82
|
+
}
|
|
83
|
+
/** Leaf row props (internal). */
|
|
84
|
+
export interface ActionMenuLeafRowProps {
|
|
85
|
+
item: ActionMenuItem;
|
|
86
|
+
}
|
|
87
|
+
/** Flyout parent row props (internal). */
|
|
88
|
+
export interface ActionMenuFlyoutRowProps {
|
|
89
|
+
item: ActionMenuItem;
|
|
90
|
+
}
|
|
91
|
+
/** Leading slot props (internal). */
|
|
92
|
+
export interface ActionMenuRowLeadingProps {
|
|
93
|
+
startAdornment?: ReactNode;
|
|
94
|
+
disabled?: boolean;
|
|
95
|
+
}
|
|
96
|
+
/** Trailing slot props (internal): `endAdornment`, `trailingHint` dot, then the flyout arrow. */
|
|
97
|
+
export interface ActionMenuRowTrailingProps {
|
|
98
|
+
trailingHint?: ActionMenuTrailingHint;
|
|
99
|
+
endAdornment?: ReactNode;
|
|
100
|
+
/** Flyout rows show the arrow last (hidden when disabled). */
|
|
101
|
+
hasArrow?: boolean;
|
|
102
|
+
disabled?: boolean;
|
|
103
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ActionMenuGroup, ActionMenuGroupListProps, ActionMenuItem } from './type';
|
|
2
|
+
type VisibleGroup = ActionMenuGroupListProps['groups'][number];
|
|
3
|
+
export declare const isActionMenuGroup: (entry: ActionMenuItem | ActionMenuGroup) => entry is ActionMenuGroup;
|
|
4
|
+
/** Consecutive plain rows share one unheaded group; each `group` is its own. Hidden rows and empty groups are dropped. */
|
|
5
|
+
export declare function toVisibleGroups(entries: Array<ActionMenuItem | ActionMenuGroup>): VisibleGroup[];
|
|
6
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{d as Autocomplete,a as autocompleteClassNames,c as autocompleteDefaultOpenOnFocus,b as autocompleteMenuDirection}from'../../_chunks/chunk-
|
|
1
|
+
export{d as Autocomplete,a as autocompleteClassNames,c as autocompleteDefaultOpenOnFocus,b as autocompleteMenuDirection}from'../../_chunks/chunk-LKYA6XFU.js';import'../../_chunks/chunk-JBE2LXDH.js';import'../../_chunks/chunk-YG4CT6O4.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{lc as ColumnViewsPicker,nc as CreateViewDialog,jc as CustomViews,kc as DefaultViews,mc as ViewsDropdown,Fb as areAllColumnsSelected,Lb as areAllCurrentColumnsSelected,Ob as areColumnsEqual,Gb as areSomeColumnsSelected,Mb as areSomeCurrentColumnsSelected,ec as buildFullTemplateLayouts,cc as buildRequiredColumnView,mb as convertColumnsToLayoutSection,Xb as convertTemplateToColumnsView,Yb as convertTemplatesToColumnsView,ub as countCustomTemplates,vb as countCustomViewMenuItems,ob as createCustomViewMenuItem,Ib as deepCloneColumns,Bb as getColumnCheckState,Ub as getColumnOrder,lb as getColumnsByMode,ac as getLayoutCodesForMode,nb as getLayoutDataFromTemplates,bc as getOtherModeSectionCode,Tb as getSubmenuFromTemplateLayout,yb as getSubmenuItems,Ab as getSubmenuItemsForDisplay,qb as getTemplateRole,Vb as handleTemplateUpdate,dc as hasLayoutSectionForMode,zb as hasSubmenu,Rb as initializeCreateColumns,Sb as initializeCreateColumnsWithCurrentState,Qb as initializeEditingColumns,$b as isCheckboxInteractionTarget,tb as isCustomTemplate,sb as isCustomView,ib as isDateColumn,jb as isIndexColumn,rb as isPresetView,Hb as isValidTemplateName,xb as mapTemplatesToMenuItems,Nb as normalizeColumnsSelected,Zb as replaceTemplateInList,Pb as resetColumnsToDefault,pb as setViewAsDefault,Wb as templateToViewMenuItem,Eb as toggleAllColumns,Kb as toggleAllCurrentColumns,Cb as toggleColumn,Jb as toggleSingleColumn,Db as toggleSubItem,kb as transformLayoutToColumns,wb as transformTemplatesToViewMenuItems,_b as updateCurrentTemplate,ic as useCustomTableViews,hc as useSubmenuHover,fc as useViewsManager,gc as useViewsMenu}from'../../_chunks/chunk-
|
|
1
|
+
export{lc as ColumnViewsPicker,nc as CreateViewDialog,jc as CustomViews,kc as DefaultViews,mc as ViewsDropdown,Fb as areAllColumnsSelected,Lb as areAllCurrentColumnsSelected,Ob as areColumnsEqual,Gb as areSomeColumnsSelected,Mb as areSomeCurrentColumnsSelected,ec as buildFullTemplateLayouts,cc as buildRequiredColumnView,mb as convertColumnsToLayoutSection,Xb as convertTemplateToColumnsView,Yb as convertTemplatesToColumnsView,ub as countCustomTemplates,vb as countCustomViewMenuItems,ob as createCustomViewMenuItem,Ib as deepCloneColumns,Bb as getColumnCheckState,Ub as getColumnOrder,lb as getColumnsByMode,ac as getLayoutCodesForMode,nb as getLayoutDataFromTemplates,bc as getOtherModeSectionCode,Tb as getSubmenuFromTemplateLayout,yb as getSubmenuItems,Ab as getSubmenuItemsForDisplay,qb as getTemplateRole,Vb as handleTemplateUpdate,dc as hasLayoutSectionForMode,zb as hasSubmenu,Rb as initializeCreateColumns,Sb as initializeCreateColumnsWithCurrentState,Qb as initializeEditingColumns,$b as isCheckboxInteractionTarget,tb as isCustomTemplate,sb as isCustomView,ib as isDateColumn,jb as isIndexColumn,rb as isPresetView,Hb as isValidTemplateName,xb as mapTemplatesToMenuItems,Nb as normalizeColumnsSelected,Zb as replaceTemplateInList,Pb as resetColumnsToDefault,pb as setViewAsDefault,Wb as templateToViewMenuItem,Eb as toggleAllColumns,Kb as toggleAllCurrentColumns,Cb as toggleColumn,Jb as toggleSingleColumn,Db as toggleSubItem,kb as transformLayoutToColumns,wb as transformTemplatesToViewMenuItems,_b as updateCurrentTemplate,ic as useCustomTableViews,hc as useSubmenuHover,fc as useViewsManager,gc as useViewsMenu}from'../../_chunks/chunk-JQWPOXPM.js';import'../../_chunks/chunk-B2OUV4UE.js';import'../../_chunks/chunk-G3QDXDRW.js';import'../../_chunks/chunk-ZPYQLESN.js';import'../../_chunks/chunk-XK5TVDKR.js';import'../../_chunks/chunk-D7Q6GITS.js';import'../../_chunks/chunk-GD5PXPUD.js';import'../../_chunks/chunk-2BU56HDE.js';import'../../_chunks/chunk-PF4KBDPV.js';import'../../_chunks/chunk-2I5L7ASP.js';import'../../_chunks/chunk-5FR3LFXC.js';import'../../_chunks/chunk-ISC5KT5E.js';import'../../_chunks/chunk-JYVB2MAR.js';import'../../_chunks/chunk-673TILTX.js';import'../../_chunks/chunk-YMEGCVZ4.js';import'../../_chunks/chunk-XKEBWPJM.js';import'../../_chunks/chunk-YFL4D5VW.js';import'../../_chunks/chunk-ALG4KR24.js';import'../../_chunks/chunk-R2J57DPG.js';import'../../_chunks/chunk-3TZY3PB4.js';import'../../_chunks/chunk-4SDKOPUI.js';import'../../_chunks/chunk-YIVUI2NW.js';import'../../_chunks/chunk-UXDNAGHP.js';import'../../_chunks/chunk-PYVM4SKE.js';import'../../_chunks/chunk-XVIGXV43.js';import'../../_chunks/chunk-7H5HCDY6.js';import'../../_chunks/chunk-EAAJJGUI.js';import'../../_chunks/chunk-U6HZMYNW.js';import'../../_chunks/chunk-TJMY7Q26.js';import'../../_chunks/chunk-LTTRVHN5.js';import'../../_chunks/chunk-L2CUT2AZ.js';import'../../_chunks/chunk-K5QISMYX.js';import'../../_chunks/chunk-637LQKFX.js';import'../../_chunks/chunk-TRXHMROX.js';import'../../_chunks/chunk-D4FXMX5O.js';import'../../_chunks/chunk-RW26DPMJ.js';import'../../_chunks/chunk-RGQ5AGHK.js';import'../../_chunks/chunk-DIN6W5Q6.js';import'../../_chunks/chunk-JBDIMDMZ.js';import'../../_chunks/chunk-U2JLXSW5.js';import'../../_chunks/chunk-MUBZJUHH.js';import'../../_chunks/chunk-247ZI55C.js';import'../../_chunks/chunk-EM7XGO3A.js';import'../../_chunks/chunk-ODDV623H.js';import'../../_chunks/chunk-EKOQHUCL.js';import'../../_chunks/chunk-SSK26DK7.js';import'../../_chunks/chunk-OJO5GAN7.js';import'../../_chunks/chunk-S7AZOXFD.js';import'../../_chunks/chunk-6DGM7DYT.js';import'../../_chunks/chunk-DHSYX6K2.js';import'../../_chunks/chunk-ETLDR6XW.js';import'../../_chunks/chunk-LKYA6XFU.js';import'../../_chunks/chunk-JBE2LXDH.js';import'../../_chunks/chunk-YG4CT6O4.js';import'../../_chunks/chunk-M3TZIB3C.js';import'../../_chunks/chunk-YZF24X6P.js';import'../../_chunks/chunk-W2FF6EIY.js';import'../../_chunks/chunk-AGNZUPPF.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-IXFXTDH7.js';import'../../_chunks/chunk-U3ZJP2GE.js';import'../../_chunks/chunk-FDYQ25JQ.js';export{Ua as CUSTOM_VIEW,Pa as DATE_COLUMN_CONFIG,Ta as DEFAULT_VIEW,Va as DEFAULT_VIEW_OPTIONS,Ka as DIALOG_HEIGHT,Ja as DIALOG_WIDTH,Oa as INDEX_COLUMN_CONFIG,La as MAX_CUSTOM_VIEWS,Ma as TEMPLATE_NAME_MAX_LENGTH,Na as TableViewColumnNames}from'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as FILTER_POPOVER_ANCHOR_GAP_PX,b as FILTER_POPOVER_MIN_WIDTH,d as FILTER_POPOVER_POPPER_Z_INDEX,f as FilterPopover,f as default,a as filterPopoverClassNames,e as useFilterPopover}from'../../_chunks/chunk-
|
|
1
|
+
export{c as FILTER_POPOVER_ANCHOR_GAP_PX,b as FILTER_POPOVER_MIN_WIDTH,d as FILTER_POPOVER_POPPER_Z_INDEX,f as FilterPopover,f as default,a as filterPopoverClassNames,e as useFilterPopover}from'../../_chunks/chunk-EAAJJGUI.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as default,a as groupedSelectClassNames}from'../../_chunks/chunk-
|
|
1
|
+
export{b as default,a as groupedSelectClassNames}from'../../_chunks/chunk-TJMY7Q26.js';import'../../_chunks/chunk-YG4CT6O4.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
|