@tap-payments/os-micro-frontend-shared 0.3.282 → 0.3.283
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-KVZJDQV2.js → chunk-2SZKMLBQ.js} +1 -1
- package/build/_chunks/{chunk-FIFXF3JZ.js → chunk-32GIDLTK.js} +1 -1
- package/build/_chunks/{chunk-QZJCQWTE.js → chunk-3HYMTOAJ.js} +1 -1
- package/build/_chunks/{chunk-ADEEIE7D.js → chunk-3M7YAX7A.js} +1 -1
- package/build/_chunks/{chunk-52PPSCXG.js → chunk-4UPB4XII.js} +1 -1
- package/build/_chunks/chunk-564OU743.js +2 -0
- package/build/_chunks/chunk-6GZFEPN6.js +2 -0
- package/build/_chunks/{chunk-SN2KTD4P.js → chunk-6PCVGKSW.js} +1 -1
- package/build/_chunks/{chunk-YQEBQZXF.js → chunk-7EIZDPRX.js} +1 -1
- package/build/_chunks/{chunk-JDNJX7KL.js → chunk-7LVGFAVY.js} +1 -1
- package/build/_chunks/{chunk-JM6GMHUT.js → chunk-AI4TRR5F.js} +1 -1
- package/build/_chunks/{chunk-IERB2R3J.js → chunk-ARPUXMV4.js} +1 -1
- package/build/_chunks/{chunk-KOBQX2C2.js → chunk-AYDZ5BY7.js} +1 -1
- package/build/_chunks/{chunk-BCIBP56P.js → chunk-B7SIZBZ4.js} +1 -1
- package/build/_chunks/{chunk-YDOKNGL2.js → chunk-BT4FYCLB.js} +1 -1
- package/build/_chunks/{chunk-22OKMCFR.js → chunk-CZZIV6U2.js} +1 -1
- package/build/_chunks/{chunk-YQYHL4AG.js → chunk-DO5LOF3O.js} +1 -1
- package/build/_chunks/{chunk-A6YF5T27.js → chunk-FYZLPKZJ.js} +1 -1
- package/build/_chunks/{chunk-42T6C72N.js → chunk-HFZFV3IA.js} +1 -1
- package/build/_chunks/{chunk-363HMCRF.js → chunk-IBVECU2A.js} +1 -1
- package/build/_chunks/{chunk-265MSIZH.js → chunk-IPYIRN2R.js} +1 -1
- package/build/_chunks/{chunk-UZVOPL5U.js → chunk-J5Y23R6K.js} +1 -1
- package/build/_chunks/{chunk-5SPLSDGC.js → chunk-JDSJDVQK.js} +1 -1
- package/build/_chunks/chunk-JKW2LY7R.js +1 -0
- package/build/_chunks/{chunk-ZFVCIKJ5.js → chunk-JRADYN3S.js} +1 -1
- package/build/_chunks/{chunk-K7ENJA7I.js → chunk-KZIIULI3.js} +1 -1
- package/build/_chunks/{chunk-B3QNGYUI.js → chunk-LDCRZFUN.js} +1 -1
- package/build/_chunks/{chunk-VEPRRBYW.js → chunk-LR6FBC7S.js} +1 -1
- package/build/_chunks/{chunk-EKOUE2IZ.js → chunk-MGKZHRIG.js} +1 -1
- package/build/_chunks/{chunk-QFKF5I2T.js → chunk-MLJHEMAE.js} +1 -1
- package/build/_chunks/{chunk-BVAZARPH.js → chunk-MZBS2I4P.js} +1 -1
- package/build/_chunks/{chunk-ROTVD5UM.js → chunk-N2WU3HEH.js} +1 -1
- package/build/_chunks/{chunk-FJNHU3S4.js → chunk-NQGK2Q5L.js} +1 -1
- package/build/_chunks/{chunk-ZO7IPGTD.js → chunk-OL4HUADY.js} +1 -1
- package/build/_chunks/{chunk-EVLGRGMN.js → chunk-ONSPUGYN.js} +1 -1
- package/build/_chunks/{chunk-2FFQR4XJ.js → chunk-OR22XGAD.js} +1 -1
- package/build/_chunks/{chunk-JL3QN5TK.js → chunk-PG6JHNLH.js} +1 -1
- package/build/_chunks/{chunk-JGVAEGDX.js → chunk-PPHYI47H.js} +1 -1
- package/build/_chunks/{chunk-IPIA27QM.js → chunk-R367WWTC.js} +1 -1
- package/build/_chunks/{chunk-UQ7XDCXB.js → chunk-RI3HCTED.js} +1 -1
- package/build/_chunks/{chunk-XMGXCCSD.js → chunk-S6DUWS2C.js} +1 -1
- package/build/_chunks/chunk-SLWEWDRS.js +1 -0
- package/build/_chunks/chunk-TPR56EBW.js +2 -0
- package/build/_chunks/{chunk-I7OG7E3Z.js → chunk-UENR5XJD.js} +1 -1
- package/build/_chunks/{chunk-RXDZGI4N.js → chunk-VBB5WMVK.js} +1 -1
- package/build/_chunks/{chunk-46V3JVHX.js → chunk-VIBNNV7I.js} +1 -1
- package/build/_chunks/{chunk-QUYS25CX.js → chunk-WRJLCKDU.js} +1 -1
- package/build/_chunks/{chunk-O44C6KUS.js → chunk-XSMIOEMD.js} +1 -1
- package/build/_chunks/{chunk-5NT7R5KF.js → chunk-XYGYT5QV.js} +1 -1
- package/build/_chunks/{chunk-7XEIN7KW.js → chunk-XYMZXP5A.js} +1 -1
- package/build/_chunks/{chunk-WEDCKMUU.js → chunk-YHRFQZCJ.js} +1 -1
- package/build/_chunks/{chunk-SKASDIJH.js → chunk-YI5J4DCB.js} +1 -1
- package/build/_chunks/{chunk-KPY3W62P.js → chunk-Z2ELLNWM.js} +1 -1
- package/build/components/ActionsDropdownMenu/index.js +1 -1
- package/build/components/Alert/index.js +1 -1
- package/build/components/Autocomplete/index.js +1 -1
- package/build/components/AvatarStack/index.js +1 -1
- package/build/components/Calender/index.js +1 -1
- package/build/components/Card/index.js +1 -1
- package/build/components/ColorPicker/index.js +1 -1
- package/build/components/ColumnViews/index.js +1 -1
- package/build/components/ConfirmDialog/index.js +1 -1
- package/build/components/CountryFilter/index.js +1 -1
- package/build/components/CountryFlag/index.js +1 -1
- package/build/components/CurrenciesMenu/index.js +1 -1
- package/build/components/CurrencyAmount/index.js +1 -1
- package/build/components/CurrencyAmountInput/index.js +1 -1
- package/build/components/CurrencySymbol/index.js +1 -1
- package/build/components/DateFilter/index.js +1 -1
- package/build/components/DateInput/index.js +1 -1
- package/build/components/DeviceIcon/index.js +1 -1
- package/build/components/ErrorToast/index.js +1 -1
- package/build/components/FileDropbox/index.js +1 -1
- package/build/components/FilePreview/index.js +1 -1
- package/build/components/FileUploader/index.js +1 -1
- package/build/components/FilterBar/FilterBar.d.ts +4 -0
- package/build/components/FilterBar/FilterBarButton.d.ts +4 -0
- package/build/components/FilterBar/constants.d.ts +12 -0
- package/build/components/FilterBar/icons.d.ts +2 -0
- package/build/components/FilterBar/index.d.ts +3 -0
- package/build/components/FilterBar/index.js +1 -0
- package/build/components/FilterBar/style.d.ts +25 -0
- package/build/components/FilterBar/type.d.ts +143 -0
- package/build/components/FilterChip/index.js +1 -1
- package/build/components/FilterChip/style.d.ts +2 -0
- package/build/components/FilterChip/type.d.ts +2 -0
- package/build/components/FilterDropdown/index.js +1 -1
- package/build/components/Filters/index.js +1 -1
- package/build/components/GroupedSelect/index.js +1 -1
- package/build/components/HeatMap/index.js +1 -1
- package/build/components/ListColumnFilter/index.js +1 -1
- package/build/components/ListHeader/index.js +1 -1
- package/build/components/ListHeader/types.d.ts +10 -2
- package/build/components/Loader/index.js +1 -1
- package/build/components/Logo/index.js +1 -1
- package/build/components/MultiLevelSelect/index.js +1 -1
- package/build/components/PhoneFilter/index.js +1 -1
- package/build/components/PhoneInput/index.js +1 -1
- package/build/components/ProgressRing/index.js +1 -1
- package/build/components/RadioGroup/index.js +1 -1
- package/build/components/RangeCalender/index.js +1 -1
- package/build/components/RatingCount/index.js +1 -1
- package/build/components/SearchButton/index.js +1 -1
- package/build/components/SearchInput/index.js +1 -1
- package/build/components/Select/index.js +1 -1
- package/build/components/Sidebar/index.js +1 -1
- package/build/components/StatusFilter/index.js +1 -1
- package/build/components/StatusIcons/index.js +1 -1
- package/build/components/TableCells/index.js +1 -1
- package/build/components/TableReports/index.js +1 -1
- package/build/components/TextInput/index.js +1 -1
- package/build/components/Timepicker/index.js +1 -1
- package/build/components/TreeDropdown/index.js +1 -1
- package/build/components/VerificationIcon/index.js +1 -1
- package/build/components/VirtualTables/index.js +1 -1
- package/build/components/Window/index.js +1 -1
- package/build/components/WindowServices/index.js +1 -1
- package/build/components/WindowToolbar/index.js +1 -1
- package/build/components/index.d.ts +1 -2
- package/build/components/index.js +1 -1
- package/build/components/modules/JSONViewWindow/index.js +1 -1
- package/build/components/modules/RangeCalender/index.js +1 -1
- package/build/components/modules/VirtualTables/index.js +1 -1
- package/build/components/modules/WindowShell/index.js +1 -1
- package/build/components/modules/index.js +1 -1
- package/build/components/primitives/index.js +1 -1
- package/build/datetime/components/index.js +1 -1
- package/build/hooks/index.js +1 -1
- package/build/hooks/useBadgesCount.d.ts +1 -1
- package/build/index.js +1 -1
- package/package.json +1 -1
- package/build/_chunks/chunk-CAVYK7HF.js +0 -2
- package/build/_chunks/chunk-HZCNE5Q2.js +0 -1
- package/build/_chunks/chunk-JDEIU7E5.js +0 -1
- package/build/_chunks/chunk-JGCMUAHD.js +0 -1
- package/build/_chunks/chunk-VYBEYQLV.js +0 -2
- package/build/_chunks/chunk-WAQJPDMU.js +0 -2
- package/build/components/StatusBar/StatusBar.d.ts +0 -14
- package/build/components/StatusBar/index.d.ts +0 -3
- package/build/components/StatusBar/index.js +0 -1
- package/build/components/StatusBar/type.d.ts +0 -18
- package/build/components/StatusButton/ChevronIcon.d.ts +0 -3
- package/build/components/StatusButton/StatusButton.d.ts +0 -4
- package/build/components/StatusButton/constant.d.ts +0 -29
- package/build/components/StatusButton/index.d.ts +0 -4
- package/build/components/StatusButton/index.js +0 -1
- package/build/components/StatusButton/style.d.ts +0 -52
- package/build/components/StatusButton/type.d.ts +0 -41
|
@@ -1 +1 @@
|
|
|
1
|
-
import {f as f$1,aa}from'./chunk-CAVYK7HF.js';import {Rc,A as A$1}from'./chunk-3M2GZVQW.js';import {forwardRef}from'react';import r from'@mui/material/Box';import oe from'@mui/material/CircularProgress';import ne from'@mui/material/SvgIcon';import J from'@mui/material/Button';import K from'@mui/material/FormControl';import Q from'@mui/material/Input';import v 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 n="os-shared-Select",u={root:`${n}-root`,field:`${n}-field`,menu:`${n}-menu`,option:`${n}-option`,clear:`${n}-clear`,feedback:`${n}-feedback`,values:`${n}-values`,value:`${n}-value`,valueOverflow:`${n}-valueOverflow`,search:`${n}-search`,summary:`${n}-summary`},le="Search",ae=8,de=8,l=28,a=36,o=17,se=4,z=256,W=272,B=293,pe=8,E={bottom:"bottom",top:"top"},ce=E.bottom,h={start:"start",end:"end"},xe=h.start,R=48,O=1,G=R-2*O,D=8,ge=10,j=13,N=D+j,Z=4,q=6,ue=G-N-Z-q,S=8,f=4,b=f,c=8,x=16,y=8,g=4,he=g+x+y,me=g+c+b;var Fe={maxHeight:z,[`&:has(.${u.search})`]:{maxHeight:`${W}px !important`},[`&:has(.${u.search}):has(.${u.summary})`]:{maxHeight:`${B}px !important`}},ke=styled(r)({width:"100%",display:"flex",flexDirection:"column"}),$e=styled(r)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),width:"100%",minWidth:0})),Le=styled(f$1,{shouldForwardProp:e=>e!=="$mutedRect"})(({$mutedRect:e})=>({padding:0,pointerEvents:"none",...e&&{opacity:.5}})),A="#F8F8F8",ze=styled(U,{shouldForwardProp:e=>e!=="$selected"&&e!=="$hidden"})(({theme:e,$selected:i,$hidden:s})=>({fontSize:"12px",fontWeight:500,lineHeight:"16px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.spacing(1),minHeight:l,height:"auto",flexShrink:0,padding:"6px 8px",overflow:"hidden",[e.breakpoints.up("sm")]:{minHeight:l},boxSizing:"border-box",borderRadius:4,backgroundColor:i?A:e.palette.common.white,"&.Mui-selected, &.Mui-focusVisible, &:hover, &.Mui-selected:hover":{backgroundColor:A},"&.Mui-disabled":{opacity:.38},...s&&{display:"none !important"}})),We=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"}),Ae=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"}}),Te=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"})),Ve=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(v)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",height:a,minHeight:a,maxHeight:a,padding:0,lineHeight:1,overflow:"hidden",flexShrink:0,position:"sticky",top:0,zIndex:1,"&.MuiListSubheader-root":{height:a,minHeight:a,padding:0,lineHeight:1}}));Y.muiSkipListHighlight=true;var _=styled(v)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",height:l,minHeight:l,padding:0,display:"flex",alignItems:"center",fontSize:12,fontWeight:500,lineHeight:"14px",color:e.v2.palette.grey[500],flexShrink:0,"&.MuiListSubheader-root":{height:l,minHeight:l,padding:0,lineHeight:"14px"}}));_.muiSkipListHighlight=true;var Ee=styled(Q)(({theme:e})=>({width:"100%",height:a,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"}),Re=styled(v)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",display:"flex",alignItems:"center",height:o,minHeight:o,maxHeight:o,padding:0,lineHeight:`${o}px`,overflow:"hidden",flexShrink:0,"&.MuiListSubheader-root":{height:o,minHeight:o,padding:0,lineHeight:`${o}px`}})),Oe=styled(r)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"border-box",width:"100%",height:o,minHeight:o,gap:e.spacing(1)})),Ge=styled("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontWeight:500,fontSize:11,lineHeight:`${o}px`,letterSpacing:0,color:e.v2.palette.grey[500]})),De=styled(J)(({theme:e})=>({minWidth:0,minHeight:0,height:o,padding:0,fontFamily:e.typography.fontFamily,fontWeight:500,fontStyle:"normal",fontSize:11,lineHeight:`${o}px`,letterSpacing:0,textTransform:"none",verticalAlign:"middle",color:e.v2.palette.brand[500],"&.MuiButton-root":{minWidth:0,minHeight:0,height:o,padding:0,lineHeight:`${o}px`}})),je=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%"}})),Ne=styled(X,{shouldForwardProp:e=>!["feedbackType","hasFeedback","valueAlignment","hasLabel"].includes(e)})(({theme:e,error:i,feedbackType:s,hasFeedback:p,valueAlignment:V,hasLabel:w})=>{let{borderColor:I}=aa(e,s),C=p?"4px 4px 0 0":"4px",m=V===h.end,P=m?g:f,H=w?`18px ${P}px 6px ${S}px !important`:`0 ${P}px 0 ${S}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:p?`1px solid ${s?I:"transparent"}`:`1px solid ${e.v2.palette.brand[500]}`,borderBottom:p?"none":void 0,boxShadow:p?"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:m?"flex-end !important":"flex-start !important",textAlign:m?"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:b,gap:g,position:"relative",zIndex:2,pointerEvents:"auto","&.Select-endAdornmentRoot--loading":{marginRight:y}},"& .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)"}},...s&&{border:`1px solid ${I}`},...p&&{borderBottom:"none"},...i&&{border:`1px solid ${e.palette.error.main}`,boxShadow:"none"}}}),Ze=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"}})),qe=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block",width:"100%",textAlign:"start"}));function et(){return jsx(r,{component:"img",src:Rc,alt:"",sx:{width:10,height:7.5,flexShrink:0}})}function tt(){return jsx(T,{src:A$1,alt:""})}function ot(){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 ie=forwardRef((e,i)=>jsx(ne,{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})}));ie.displayName="SelectChevronIcon";function nt(){return jsx(oe,{size:14,sx:{color:"text.secondary"}})}export{ot as $,y as A,g as B,he as C,me as D,Fe as E,ke as F,$e as G,Le as H,ze as I,We as J,Be as K,Ae as L,Te as M,Ve as N,Y as O,_ as P,Ee as Q,Re as R,Oe as S,Ge as T,De as U,je as V,Ne as W,Ze as X,qe as Y,et as Z,tt as _,u as a,ie as aa,le as b,nt as ba,ae as c,de as d,se as e,z as f,W as g,B as h,pe as i,E as j,ce as k,h as l,xe as m,R as n,O as o,D as p,ge as q,j as r,N as s,Z as t,q as u,ue as v,S as w,b as x,c as y,x as z};
|
|
1
|
+
import {f as f$1,aa}from'./chunk-6GZFEPN6.js';import {Rc,A as A$1}from'./chunk-3M2GZVQW.js';import {forwardRef}from'react';import r from'@mui/material/Box';import oe from'@mui/material/CircularProgress';import ne from'@mui/material/SvgIcon';import J from'@mui/material/Button';import K from'@mui/material/FormControl';import Q from'@mui/material/Input';import v 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 n="os-shared-Select",u={root:`${n}-root`,field:`${n}-field`,menu:`${n}-menu`,option:`${n}-option`,clear:`${n}-clear`,feedback:`${n}-feedback`,values:`${n}-values`,value:`${n}-value`,valueOverflow:`${n}-valueOverflow`,search:`${n}-search`,summary:`${n}-summary`},le="Search",ae=8,de=8,l=28,a=36,o=17,se=4,z=256,W=272,B=293,pe=8,E={bottom:"bottom",top:"top"},ce=E.bottom,h={start:"start",end:"end"},xe=h.start,R=48,O=1,G=R-2*O,D=8,ge=10,j=13,N=D+j,Z=4,q=6,ue=G-N-Z-q,S=8,f=4,b=f,c=8,x=16,y=8,g=4,he=g+x+y,me=g+c+b;var Fe={maxHeight:z,[`&:has(.${u.search})`]:{maxHeight:`${W}px !important`},[`&:has(.${u.search}):has(.${u.summary})`]:{maxHeight:`${B}px !important`}},ke=styled(r)({width:"100%",display:"flex",flexDirection:"column"}),$e=styled(r)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),width:"100%",minWidth:0})),Le=styled(f$1,{shouldForwardProp:e=>e!=="$mutedRect"})(({$mutedRect:e})=>({padding:0,pointerEvents:"none",...e&&{opacity:.5}})),A="#F8F8F8",ze=styled(U,{shouldForwardProp:e=>e!=="$selected"&&e!=="$hidden"})(({theme:e,$selected:i,$hidden:s})=>({fontSize:"12px",fontWeight:500,lineHeight:"16px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.spacing(1),minHeight:l,height:"auto",flexShrink:0,padding:"6px 8px",overflow:"hidden",[e.breakpoints.up("sm")]:{minHeight:l},boxSizing:"border-box",borderRadius:4,backgroundColor:i?A:e.palette.common.white,"&.Mui-selected, &.Mui-focusVisible, &:hover, &.Mui-selected:hover":{backgroundColor:A},"&.Mui-disabled":{opacity:.38},...s&&{display:"none !important"}})),We=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"}),Ae=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"}}),Te=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"})),Ve=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(v)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",height:a,minHeight:a,maxHeight:a,padding:0,lineHeight:1,overflow:"hidden",flexShrink:0,position:"sticky",top:0,zIndex:1,"&.MuiListSubheader-root":{height:a,minHeight:a,padding:0,lineHeight:1}}));Y.muiSkipListHighlight=true;var _=styled(v)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",height:l,minHeight:l,padding:0,display:"flex",alignItems:"center",fontSize:12,fontWeight:500,lineHeight:"14px",color:e.v2.palette.grey[500],flexShrink:0,"&.MuiListSubheader-root":{height:l,minHeight:l,padding:0,lineHeight:"14px"}}));_.muiSkipListHighlight=true;var Ee=styled(Q)(({theme:e})=>({width:"100%",height:a,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"}),Re=styled(v)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",display:"flex",alignItems:"center",height:o,minHeight:o,maxHeight:o,padding:0,lineHeight:`${o}px`,overflow:"hidden",flexShrink:0,"&.MuiListSubheader-root":{height:o,minHeight:o,padding:0,lineHeight:`${o}px`}})),Oe=styled(r)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"border-box",width:"100%",height:o,minHeight:o,gap:e.spacing(1)})),Ge=styled("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontWeight:500,fontSize:11,lineHeight:`${o}px`,letterSpacing:0,color:e.v2.palette.grey[500]})),De=styled(J)(({theme:e})=>({minWidth:0,minHeight:0,height:o,padding:0,fontFamily:e.typography.fontFamily,fontWeight:500,fontStyle:"normal",fontSize:11,lineHeight:`${o}px`,letterSpacing:0,textTransform:"none",verticalAlign:"middle",color:e.v2.palette.brand[500],"&.MuiButton-root":{minWidth:0,minHeight:0,height:o,padding:0,lineHeight:`${o}px`}})),je=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%"}})),Ne=styled(X,{shouldForwardProp:e=>!["feedbackType","hasFeedback","valueAlignment","hasLabel"].includes(e)})(({theme:e,error:i,feedbackType:s,hasFeedback:p,valueAlignment:V,hasLabel:w})=>{let{borderColor:I}=aa(e,s),C=p?"4px 4px 0 0":"4px",m=V===h.end,P=m?g:f,H=w?`18px ${P}px 6px ${S}px !important`:`0 ${P}px 0 ${S}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:p?`1px solid ${s?I:"transparent"}`:`1px solid ${e.v2.palette.brand[500]}`,borderBottom:p?"none":void 0,boxShadow:p?"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:m?"flex-end !important":"flex-start !important",textAlign:m?"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:b,gap:g,position:"relative",zIndex:2,pointerEvents:"auto","&.Select-endAdornmentRoot--loading":{marginRight:y}},"& .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)"}},...s&&{border:`1px solid ${I}`},...p&&{borderBottom:"none"},...i&&{border:`1px solid ${e.palette.error.main}`,boxShadow:"none"}}}),Ze=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"}})),qe=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block",width:"100%",textAlign:"start"}));function et(){return jsx(r,{component:"img",src:Rc,alt:"",sx:{width:10,height:7.5,flexShrink:0}})}function tt(){return jsx(T,{src:A$1,alt:""})}function ot(){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 ie=forwardRef((e,i)=>jsx(ne,{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})}));ie.displayName="SelectChevronIcon";function nt(){return jsx(oe,{size:14,sx:{color:"text.secondary"}})}export{ot as $,y as A,g as B,he as C,me as D,Fe as E,ke as F,$e as G,Le as H,ze as I,We as J,Be as K,Ae as L,Te as M,Ve as N,Y as O,_ as P,Ee as Q,Re as R,Oe as S,Ge as T,De as U,je as V,Ne as W,Ze as X,qe as Y,et as Z,tt as _,u as a,ie as aa,le as b,nt as ba,ae as c,de as d,se as e,z as f,W as g,B as h,pe as i,E as j,ce as k,h as l,xe as m,R as n,O as o,D as p,ge as q,j as r,N as s,Z as t,q as u,ue as v,S as w,b as x,c as y,x as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d,r}from'./chunk-
|
|
1
|
+
import {d,r}from'./chunk-6GZFEPN6.js';import {mc,nc}from'./chunk-Z2DUFVI5.js';import {Td,Ye}from'./chunk-3M2GZVQW.js';import {forwardRef,useState,useMemo,useCallback,memo}from'react';import {styled}from'@mui/material/styles';import {jsx,Fragment}from'react/jsx-runtime';var S="os-shared-Logo",n={root:`${S}-root`,skeleton:`${S}-skeleton`},C="logo";var R=styled(d)(({theme:s})=>({borderRadius:"50%",backgroundColor:s.palette.common.white}));var I=forwardRef(({className:s,sx:f,id:a,src:o,width:g=24,height:d=24,isError:E,isLoading:P,fallback:e,onError:u,alt:U=C},v)=>{let[w,H]=useState(),m=useMemo(()=>typeof o!="string"&&!!o?.type?.includes("application/pdf"),[o]),t=useMemo(()=>o?typeof o=="string"?o:(window.URL?URL:webkitURL).createObjectURL(o):"",[o]),r$1=E||!!t&&w===t,M=useMemo(()=>r$1||!o?typeof e=="string"&&e?e:Td:m?Ye:t,[o,e,r$1,m,t]),h=useCallback(j=>{H(t),u?.(j);},[t,u]);return P?jsx(r,{variant:"circular",className:n.skeleton,sx:mc({width:g,height:d,flexShrink:0},f),"data-testid":a??"Logo"}):(r$1||!o)&&e!==void 0&&typeof e!="string"?jsx(Fragment,{children:e}):jsx(R,{ref:v,id:a,"data-testid":a??"Logo",alt:U,src:M,onError:h,className:nc(n.root,s),sx:mc({width:g,height:d,objectFit:m&&o&&!r$1?"none":"contain"},f)})});I.displayName="Logo";var $=memo(I);export{n as a,$ as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d,j}from'./chunk-
|
|
1
|
+
import {d,j}from'./chunk-6GZFEPN6.js';import {Xb,nc}from'./chunk-Z2DUFVI5.js';import {Gb}from'./chunk-3M2GZVQW.js';import {forwardRef,memo}from'react';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var i="os-shared-FilePreview",t={root:`${i}-root`,wrapper:`${i}-wrapper`,content:`${i}-content`,iconWrapper:`${i}-iconWrapper`,textWrapper:`${i}-textWrapper`,filename:`${i}-filename`,closeButton:`${i}-closeButton`};var x=styled("div",{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:r})=>{let{grey:o,base:s}=e.v2.palette;return {width:"100%",borderRadius:e.v2.radius(4),padding:`${e.v2.spacing(4)} ${e.v2.spacing(8)}`,display:"flex",alignItems:"center",justifyContent:"flex-start",backgroundColor:o[50],gap:e.v2.spacing(8),color:s.black,...r&&{opacity:.6,cursor:"default"}}}),P=styled("div")(({theme:e})=>({width:"100%",minWidth:0,display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.v2.spacing(8)})),g=styled("div")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",flex:1,minWidth:0,overflow:"hidden",color:"inherit",cursor:"pointer",gap:e.v2.spacing(8)})),F=styled("div")(({theme:e})=>{let{grey:r,base:o}=e.v2.palette;return {display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:32,height:32,flexShrink:0,overflow:"hidden",backgroundColor:o.white,borderRadius:e.v2.radius(4),border:`1px solid ${r[100]}`}}),C=styled("div")(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",flex:1,minWidth:0,overflow:"hidden",gap:e.v2.spacing(4),color:"inherit"})),b=styled("button")(()=>({display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginLeft:"auto",cursor:"pointer",backgroundColor:"transparent",border:"none",padding:0}));var L=e=>e.type.includes("image")?URL.createObjectURL(e):"",h=forwardRef(function({file:r,disabled:o,onRemoveFile:s,getFilePreview:W=L,icon:N,action:m,id:v,className:$,sx:I},j$1){let f=Xb(r)?W(r.file):"",R=Xb(r)&&r.file.type.includes("application/pdf"),p=Xb(r)?r.file:r;return jsx(x,{ref:j$1,id:v,"data-testid":v??"FilePreview",className:nc(t.root,$),sx:I,$disabled:o,children:jsxs(P,{"data-slot":"file-wrapper",className:t.wrapper,children:[jsxs(g,{"data-slot":"file-Content",className:t.content,children:[jsx(F,{"data-slot":"file-icon-wrapper",className:t.iconWrapper,children:Xb(r)&&f?jsx(d,{src:f,alt:p.name,className:t.iconWrapper,sx:{width:32,height:32,borderRadius:"50%",objectFit:R?"none":"cover"},onError:k=>{k.currentTarget.src=p.name;}}):N}),jsxs(C,{"data-slot":"text-wrapper",className:t.textWrapper,children:[jsx(j,{textVariant:"caption.medium",noWrap:true,"data-slot":"filename",className:t.filename,children:p.name}),!Xb(r)&&m?m:null]})]}),!o&&jsx(b,{type:"button","aria-label":"Remove file","data-slot":"close-icon-wrapper",className:t.closeButton,onClick:()=>{s?.(r);},children:jsx(d,{src:Gb,alt:"Remove file",sx:{width:10,height:10}})})]})})});h.displayName="FilePreview";var S=memo(h);export{t as a,S as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {n,j,k,l,h,f,b,g,i,m as m$1,c,e,d}from'./chunk-
|
|
1
|
+
import {n,j,k,l,h,f,b,g,i,m as m$1,c,e,d}from'./chunk-4UPB4XII.js';import {X,V,W,Y,k as k$1,a,O,Q,b as b$1,_,P,R,S,T,U,F,m,$,I,G,H,Z,L,M,ba as ba$1,aa,c as c$1,J,K,N}from'./chunk-OL4HUADY.js';import {ba}from'./chunk-6GZFEPN6.js';import {Dc,nc,mc}from'./chunk-Z2DUFVI5.js';import {forwardRef,useState,useCallback,useMemo,memo}from'react';import pe from'@mui/material/Box';import At from'@mui/material/InputLabel';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function Nt({endAdornmentProp:h,isLoading:o,showClear:S,showMenuArrow:i,menuOpen:b,ClearIconComponent:c=$,ChevronIconComponent:u=aa,onClear:p,onClearDefault:R}){if(!h&&!S&&!o&&!i)return null;let m=C=>{C.preventDefault(),C.stopPropagation(),p?p():R();};return jsxs(pe,{className:nc("Select-endAdornmentRoot",o&&"Select-endAdornmentRoot--loading"),component:"span",children:[h,o?jsx(pe,{component:"span",className:"Select-menuTriggerIcon Select-menuTriggerIcon--loading","aria-hidden":true,children:jsx(ba$1,{})}):null,!o&&S?jsx(pe,{component:"button",className:"Select-clearIconButton","data-select-clear":"",type:"button",tabIndex:0,"aria-label":"Clear selection",onMouseDown:m,onClick:m,children:jsx(c,{})}):null,!o&&i?jsx(pe,{component:"span",className:`Select-menuTriggerIcon${b?" Select-menuTriggerIcon-open":""}`,"aria-hidden":true,children:jsx(u,{})}):null]})}var Et=forwardRef(function({isMultiple:o=false,options:S,value:i,onChange:b,label:c="",disabled:u,required:p,hasError:R=false,helperText:m,feedback:C,showClearIcon:K=false,ClearIconComponent:me,ChevronIconComponent:q,onClear:Q,isLoading:F,MenuProps:j$1,children:ye,id:z="Select",className:J,open:w,onOpen:X$1,onClose:k$1,name:Y$1,inputProps:P,endAdornment:Z,renderValue:D,valueAlignment:_},g){let[fe,ee]=useState(false),I=w??fe,x=!!(u||F),{isProvided:te,isVisible:T,type:le}=Dc(C),L=`${z}-label`,B=Array.isArray(i)?i:i!=null?[i]:[],V$1=useCallback((t,$)=>{$?X$1?.(t):k$1?.(t),w===void 0&&ee($);},[X$1,k$1,w]),ne=t=>{t.button===0&&(m$1(t)||t.target.closest('.MuiSelect-select[role="combobox"]')||x||(t.preventDefault(),t.stopPropagation(),V$1(t,!I)));},oe=t=>{m$1(t)||t.target.closest('.MuiSelect-select[role="combobox"]')||(t.preventDefault(),t.stopPropagation());},ae=t=>{let ce=t.target.value.map(A=>S.find(W=>j(W)===A||String(W.value)===String(A))).filter(A=>A!=null);b?.(ce);},re=jsx(Nt,{endAdornmentProp:Z,isLoading:!!F,showClear:K&&n(i)&&!x,showMenuArrow:!F,menuOpen:I,ClearIconComponent:me,ChevronIconComponent:q,onClear:Q,onClearDefault:()=>b?.(o?[]:null)}),H=o?B.map(j):j(B[0]??null);return jsxs(X,{$hasFeedback:T,onMouseDown:ne,onClick:oe,children:[jsxs(V,{variant:"filled",required:p,className:J,children:[jsx(At,{id:L,children:c}),jsx(W,{multiple:o,ref:g,value:H,error:R&&!T,feedbackType:le,hasFeedback:T,valueAlignment:_,disableUnderline:true,required:p,hasLabel:!!c.trim(),labelId:L,id:z,name:Y$1,open:I,onOpen:t=>V$1(t,true),onClose:t=>{k(t)||o&&l(t)||V$1(t,false);},onChange:o?ae:void 0,renderValue:D,inputProps:P,disabled:x,IconComponent:()=>null,autoWidth:false,endAdornment:re,MenuProps:j$1,children:ye})]}),te?jsx(ba,{...C}):m!=null&&m!==""?jsx(Y,{children:m}):null]})}),Pe=Et;function Rt({options:h,maxVisibleValues:o,valueAlignment:S=m}){let b$1=typeof o=="number"&&Number.isFinite(o)?Math.max(0,Math.floor(o)):h.length,c=h.slice(0,b$1),u=h.length-c.length,p=c.map(b).join(", ");return jsxs(L,{className:a.values,$valueAlignment:S,children:[jsx(M,{className:a.value,children:p}),u>0?jsxs(N,{className:a.valueOverflow,children:["+",u," more"]}):null]})}var Ct=Rt;var vt=forwardRef(function({options:o,isMultiple:S$1=false,hasCheckbox:i$1,maxVisibleValues:b$2,value:c$2,onChange:u,label:p,placeholder:R$1,disabled:m$1,required:C,error:K$1=false,helperText:me,feedback:q,hasClearIcon:Q$1=false,ClearIconComponent:F$1,ChevronIconComponent:j,SearchIconComponent:ye,onClear:z,isLoading:J$1,isSearchable:w=false,searchPlaceholder:X,hasSelectionSummary:k=false,hasSelectedCheckmark:Y=false,valueAlignment:P$1=m,menuDirection:Z$1=k$1,MenuProps:D,children:_$1,id:g$1="Select",className:fe,sx:ee,selectClassNames:I$1,inputRef:x,open:te,onOpen:T$1,onClose:le,name:L$1,inputProps:B,endAdornment:V,renderValue:ne,renderOption:oe},ae){let[re,H$1]=useState(""),[t,$$1]=useState(Z$1),[ce,A]=useState(void 0),W=p??"",Ae=R$1??"",Ne=me??void 0,Ee=X??b$1,Mt=ye??_,Re=i$1??S$1,y=useMemo(()=>h(o),[o]),ke=nc(a.root,I$1?.root,fe),De=useMemo(()=>f(D,t,ce),[D,t,ce]),Te=e$1=>{let s=c(e$1);s?.width&&A(s.width),$$1(e({preferred:Z$1,anchorRect:s,menuMaxHeight:d(D,w,k),gapPx:c$1})),T$1?.(e$1);},N=w?re.toLowerCase().trim():"",Le=e=>!N||b(e).toLowerCase().includes(N),Be=e=>oe?jsx(J,{className:a.option,$customLayout:true,children:oe(e)}):jsx(J,{className:a.option,children:jsx(K,{title:b(e),children:b(e)})}),wt=useMemo(()=>N?y.filter(e=>b(e).toLowerCase().includes(N)):y,[y,N]),It=!!N&&wt.length===0,se=()=>{u?.(S$1?[]:null),z?.();},He=w?jsx(O,{className:a.search,disableGutters:true,"data-select-menu-search":"",onMouseDown:g,onClick:g,onKeyDown:g,children:jsx(Q,{placeholder:Ee,value:re,onChange:e=>H$1(e.target.value),onMouseDown:g,onClick:g,onKeyDown:e=>e.stopPropagation(),onKeyUp:e=>e.stopPropagation(),disableUnderline:true,fullWidth:true,inputProps:{"aria-label":Ee,onMouseDown:g,onClick:g},endAdornment:jsx(Mt,{})})}):null,$e=It?jsx(P,{disableGutters:true,onMouseDown:g,onClick:g,children:"No results found"}):null;if(S$1){let e=Array.isArray(c$2)?c$2:[],s=y.filter(l=>e.some(f=>f===l.value||String(f)===String(l.value))),U$1=s.length,Ft=k&&U$1>0?jsx(R,{className:a.summary,disableGutters:true,disableSticky:true,"data-select-menu-keep-open":"",onMouseDown:g,onClick:g,onKeyDown:g,children:jsxs(S,{children:[jsxs(T,{children:[U$1," selected"]}),jsx(U,{type:"button",variant:"text",disableRipple:true,"aria-label":"Clear all selected options",onMouseDown:l=>{l.preventDefault(),l.stopPropagation(),se();},onClick:l=>{l.preventDefault(),l.stopPropagation(),se();},children:"Clear"})]})}):null;return jsx(F,{id:g$1,"data-testid":g$1??"Select",className:ke,sx:mc(ee??{}),children:jsxs(Pe,{ref:x??ae,isMultiple:true,id:g$1,className:nc(a.field,I$1?.field),options:y,value:s,onChange:l=>{u?.(Array.isArray(l)?l.map(f=>f.value):[]);},label:W,disabled:m$1,required:C,hasError:K$1,helperText:Ne,feedback:q,showClearIcon:Q$1,ClearIconComponent:F$1??$,ChevronIconComponent:j,onClear:se,isLoading:J$1,MenuProps:De,open:te,onOpen:Te,onClose:l=>{H$1(""),le?.(l);},name:L$1,inputProps:B,endAdornment:V,valueAlignment:P$1,renderValue:()=>s.length>0?jsx(Ct,{options:s,maxVisibleValues:b$2,valueAlignment:P$1}):Ae,children:[_$1,He,Ft,$e,y.map(l=>{let f=e.some(Ue=>Ue===l.value||String(Ue)===String(l.value)),We=Be(l);return jsx(I,{value:String(l.value),disabled:l.disabled,$selected:f,$hidden:!Le(l),className:a.option,onMouseDown:g,onClick:g,children:Re?jsxs(G,{children:[jsx(H,{checked:f,$mutedRect:f&&l.disabled,tabIndex:-1,disableRipple:true}),We]}):jsxs(Fragment,{children:[We,Y&&f?jsx(Z,{}):null]})},l.id)})]})})}let Ot=Array.isArray(c$2)?c$2[0]??null:c$2??null,O$1=i(y,Ot);return jsx(F,{id:g$1,"data-testid":g$1??"Select",className:ke,sx:mc(ee??{}),children:jsxs(Pe,{ref:x??ae,id:g$1,className:nc(a.field,I$1?.field),options:y,value:O$1,onChange:e=>{u?.(e==null||Array.isArray(e)?null:e.value);},label:W,disabled:m$1,required:C,hasError:K$1,helperText:Ne,feedback:q,showClearIcon:Q$1,ClearIconComponent:F$1??$,ChevronIconComponent:j,onClear:se,isLoading:J$1,MenuProps:De,open:te,onOpen:Te,onClose:e=>{H$1(""),le?.(e);},name:L$1,inputProps:B,endAdornment:V,valueAlignment:P$1,renderValue:()=>{if(!O$1)return Ae;if(ne)return ne(O$1);let e=b(O$1);return jsx(L,{className:a.values,$valueAlignment:P$1,children:jsx(M,{className:a.value,title:e,children:e})})},children:[_$1,He,$e,y.map(e=>{let s=O$1!=null&&(O$1.value===e.value||String(O$1.value)===String(e.value)),U=Be(e);return jsx(I,{value:String(e.value),disabled:e.disabled,$selected:s,$hidden:!Le(e),onMouseDown:g,onClick:()=>u?.(e.value),className:a.option,children:Re?jsxs(G,{children:[jsx(H,{checked:s,tabIndex:-1,disableRipple:true}),U]}):jsxs(Fragment,{children:[U,Y&&s?jsx(Z,{}):null]})},e.id)})]})})});vt.displayName="Select";var Lt=memo(vt);export{Lt as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {o,v,u,t as t$1,n,C,w,r,q,p,s,m,l,z,A,ba}from'./chunk-
|
|
1
|
+
import {o,v,u,t as t$1,n,C,w,r,q,p,s,m,l,z,A,ba}from'./chunk-OL4HUADY.js';import {j,P,O,V,R,d}from'./chunk-6GZFEPN6.js';import {nc,mc}from'./chunk-Z2DUFVI5.js';import {Rc}from'./chunk-3M2GZVQW.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:nc(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:nc(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(ba,{}):M?jsx(M,{className:nc(s&&"MuiSelect-iconOpen")}):jsx(_,{open:s})})]}),jsx(R,{open:s,anchorEl:S,placement:"bottom-start",className:t.menu,sx:mc({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:Rc,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};
|
|
@@ -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-ZO7IPGTD.js';import {d,R,L,V as V$1,Q as Q$1}from'./chunk-CAVYK7HF.js';import {nc}from'./chunk-Z2DUFVI5.js';import {Gb,A as A$2,Rc}from'./chunk-3M2GZVQW.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",maxWidth:"340px",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:Rc,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:nc(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,ba,aa}from'./chunk-OL4HUADY.js';import {d,R,L,V as V$1,Q as Q$1}from'./chunk-6GZFEPN6.js';import {nc}from'./chunk-Z2DUFVI5.js';import {Gb,A as A$2,Rc}from'./chunk-3M2GZVQW.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",maxWidth:"340px",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:Rc,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:nc(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);
|
|
2
2
|
export{a,kt as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {r}from'./chunk-
|
|
1
|
+
import {r}from'./chunk-6GZFEPN6.js';import {Bc,fb}from'./chunk-Z2DUFVI5.js';import {useId}from'react';import {motion}from'framer-motion';import {Box,Typography}from'@mui/material';import {styled}from'@mui/material/styles';import I from'@mui/material/Box';import {jsxs,jsx}from'react/jsx-runtime';var u=styled(Box)(({size:t})=>({display:"flex",flexDirection:"column",alignItems:"center",width:t,height:t,position:"relative"})),y=styled(Box)({position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center"}),b=styled(Typography,{shouldForwardProp:t=>t!=="isEmpty"})(({isEmpty:t})=>({fontSize:"17px",fontWeight:700,color:t?"#CFD0D2":"#000"})),D=styled(Typography,{shouldForwardProp:t=>t!=="isEmpty"})(({isEmpty:t})=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:t?"#CFD0D2":"#8D8D94",fontSize:"11px",fontWeight:500,letterSpacing:"0%",textAlign:"right",verticalAlign:"middle"}));var C=()=>jsxs(I,{component:"span",sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"6px"},children:[jsx(r,{width:51,height:16}),jsx(r,{width:84,height:8})]});var v=({value:t,label:k,size:o=172,strokeWidth:p=22,isLoading:l=false})=>{let E=Bc(useId(),"progress-ring"),m=t==null||t==="",F=fb(t||"0"),s=Math.min(Math.max(F??0,0),100),c=(o-p)/2,n=2*Math.PI*c,r=o/2;return jsxs(u,{id:E,"data-testid":"ProgressRing",size:o,children:[jsxs("svg",{width:o,height:o,viewBox:`0 0 ${o} ${o}`,style:{position:"absolute",top:0,left:0},children:[jsx("defs",{children:jsxs("linearGradient",{id:"progressGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[jsx("stop",{offset:"0.67%",stopColor:"#3DA6E1"}),jsx("stop",{offset:"98.91%",stopColor:"#147DC5"})]})}),jsx("circle",{cx:r,cy:r,r:c,stroke:"#F3F3F3",strokeWidth:p,fill:"transparent"}),jsx(motion.circle,{cx:r,cy:r,r:c,stroke:"url(#progressGradient)",strokeWidth:p,fill:"transparent",strokeLinecap:"round",strokeDasharray:n,strokeDashoffset:n,transform:`rotate(-90 ${r} ${r})`,animate:{strokeDashoffset:l?n:n-n*s/100},transition:{duration:1,ease:"easeOut"}})]}),jsxs(y,{children:[jsx(b,{isEmpty:m,children:l?jsx(C,{}):m?"----":jsxs(motion.span,{initial:{opacity:0},animate:{opacity:1},transition:{ease:"easeOut",duration:.5},children:[Number.isInteger(s)?s:s.toFixed(1),"%"]})}),!l&&jsx(D,{isEmpty:m,children:k})]})]})},T=v;var U=T;export{U as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {j}from'./chunk-
|
|
1
|
+
import {j}from'./chunk-6GZFEPN6.js';import {styled,Box,Button}from'@mui/material';var d=styled(j)(({theme:o})=>{let{grey:r}=o.v2.palette;return {fontWeight:o.v2.typography.fontWeightMedium,fontSize:"0.6875rem",color:r[500],paddingInlineStart:o.v2.spacing(16),paddingTop:o.v2.spacing(8),paddingBottom:o.v2.spacing(8),paddingInlineEnd:o.v2.spacing(8),borderBottom:`1px solid ${r[100]}`}}),l=styled(Box)(({theme:o})=>({padding:"8px 16px",display:"flex",gap:"8px",justifyContent:"center",position:"sticky",bottom:0,backgroundColor:"white",zIndex:99999,borderTop:`1px solid ${o.palette.divider}`})),c=styled(Button)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.info.dark}`,backgroundColor:o.palette.info.dark,fontWeight:700,fontSize:"11px",color:o.palette.common.white,"&:hover":{backgroundColor:o.palette.info.dark}})),s=styled(Button)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.divider}`,backgroundColor:o.palette.common.white,fontWeight:500,fontSize:"11px",color:o.palette.text.primary,"&:hover":{background:"transparent"}}));export{d as a,l as b,c,s as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {mc,nc}from'./chunk-Z2DUFVI5.js';import {forwardRef,useCallback,memo}from'react';import {jsxs,jsx}from'react/jsx-runtime';import {styled,alpha}from'@mui/material/styles';var c="os-shared-FilterChip",a={root:`${c}-root`,label:`${c}-label`,dismissButton:`${c}-dismissButton`,dismissIcon:`${c}-dismissIcon`},f=",",b="Dismiss filter";function I({className:t}){return jsxs("svg",{className:t,width:"8",height:"8",viewBox:"0 0 8 8",fill:"none","aria-hidden":"true",children:[jsx("path",{d:"M1.79488 1.73941L6.31572 6.26024",stroke:"currentColor",strokeWidth:"0.875",strokeMiterlimit:"10",strokeLinecap:"round"}),jsx("path",{d:"M6.31572 1.73941L1.79488 6.26024",stroke:"currentColor",strokeWidth:"0.875",strokeMiterlimit:"10",strokeLinecap:"round"})]})}var k=styled("div",{shouldForwardProp:t=>!["$disabled","$isActive"].includes(t)})(({theme:t,$disabled:e,$isActive:r=true})=>{let{base:o,grey:s,foreground:n}=t.v2.palette,u=t.v2.spacing(1),i=t.palette.background.gradient.shadedBlue;return {display:"inline-flex",position:"relative",alignItems:"center",justifyContent:"center",gap:t.v2.spacing(8),height:t.v2.spacing(32),paddingInline:t.v2.spacing(16),minWidth:"135.11px",maxWidth:"16rem",boxSizing:"border-box",borderStyle:"solid",borderRadius:t.v2.radius(48),...t.v2.typography.textVariants.body.small.regular,whiteSpace:"nowrap",overflow:"hidden",cursor:"default",opacity:e?.6:1,borderWidth:u,...r?{borderColor:"transparent",background:i,color:o.white}:{borderColor:s[100],backgroundColor:o.white,color:n.primary}}}),E=styled("span")(({theme:t})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:"1 1 auto",textAlign:"center",fontWeight:t.v2.typography.fontWeightRegular})),_=styled("button",{shouldForwardProp:t=>t!=="$disabled"&&t!=="$isActive"})(({theme:t,$disabled:e,$isActive:r=true})=>{let{base:o,foreground:s}=t.v2.palette;return {display:"inline-flex",position:"relative",alignItems:"center",justifyContent:"center",flexShrink:0,width:"16px",height:"16px",padding:0,border:"none",borderRadius:"50%",backgroundColor:alpha(o.black,.1),color:r?o.white:s.secondary,cursor:e?"not-allowed":"pointer",opacity:e?.6:1,transition:"opacity 150ms ease, background-color 150ms ease","&:hover":e?void 0:{backgroundColor:alpha(o.black,.2)},"&:focus-visible":{outline:`2px solid ${r?o.white:s.secondary}`,outlineOffset:"1px"},"& svg":{display:"block"}}});var A=forwardRef(({label:t,value:e,separator:r=f,visible:o=true,dismissible:s=true,onDismiss:n,dismissLabel:u=b,disabled:i=false,isActive:x=true,children:F,id:S,sx:R,className:w,slotProps:P,"data-testid":T},B)=>{let{label:h,dismissButton:l}=P??{},N=useCallback(C=>{C.stopPropagation(),!i&&(l?.onClick?.(C),n?.(C));},[i,l,n]);if(!o)return null;let m=t??(typeof e=="string"?e:e&&e.length>0?e.join(r):void 0);if(!m&&!F)return null;let D=s&&n!=null;return jsxs(k,{ref:B,id:S,"data-testid":T??S??"FilterChip",className:nc(a.root,w),sx:mc({},R),$disabled:i,$isActive:x,role:"status",children:[m?jsx(E,{...h,className:nc(a.label,h?.className),sx:mc({},h?.sx),children:m}):F,D&&jsx(_,{...l,type:"button","aria-label":l?.["aria-label"]??u,disabled:i,onClick:N,className:nc(a.dismissButton,l?.className),sx:mc({},l?.sx),$disabled:i,$isActive:x,children:jsx(I,{className:a.dismissIcon})})]})});A.displayName="FilterChip";var U=memo(A);export{a,f as b,b as c,U as d};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b,R,Q as Q$1,V,z,B}from'./chunk-6GZFEPN6.js';import {g,nc,mc}from'./chunk-Z2DUFVI5.js';import {memo,forwardRef,useState,useEffect,useMemo,useCallback,Fragment as Fragment$1}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {styled}from'@mui/material/styles';var c="os-shared-FilterBar",a={root:`${c}-root`,button:`${c}-button`,labelWrapper:`${c}-labelWrapper`,label:`${c}-label`,icon:`${c}-icon`,badge:`${c}-badge`,chevronSlot:`${c}-chevronSlot`,menu:`${c}-menu`,menuItem:`${c}-menuItem`};var Q=jsxs("svg",{width:"27",height:"30",viewBox:"0 0 27 32",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:[jsx("path",{d:"M0 0H11C19.8366 0 27 7.16344 27 16C27 24.8366 19.8366 32 11 32H0V0Z",fill:"currentColor",fillOpacity:"0"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.6941 15.0078C15.6494 15.0193 15.6083 15.043 15.5758 15.0769L12.5026 18.1501L12.5025 18.1501L15.5756 15.0769C15.6082 15.043 15.6493 15.0193 15.6941 15.0078ZM12.5619 18.7465C12.5426 18.7512 12.5227 18.7536 12.5026 18.7536C12.4363 18.7536 12.3727 18.7273 12.3258 18.6804L9.07581 15.4304C9.04012 15.3957 9.01559 15.3512 9.00535 15.3025C8.99511 15.2538 8.99963 15.2032 9.01833 15.1571C9.03703 15.111 9.06907 15.0715 9.11033 15.0437C9.13446 15.0275 9.16112 15.0156 9.18904 15.0086C9.16105 15.0156 9.13433 15.0275 9.11013 15.0438C9.06887 15.0716 9.03684 15.111 9.01814 15.1571C8.99944 15.2032 8.99492 15.2539 9.00516 15.3026C9.0154 15.3513 9.03993 15.3958 9.07562 15.4305L12.3256 18.6805C12.3725 18.7273 12.4361 18.7537 12.5024 18.7537C12.5226 18.7537 12.5426 18.7512 12.5619 18.7465ZM16.1965 15.342C16.1781 15.4301 16.1338 15.5105 16.0693 15.5731L12.8205 18.8219C12.7361 18.9063 12.6217 18.9537 12.5024 18.9537C12.3831 18.9537 12.2686 18.9062 12.1842 18.8219L8.93507 15.5728C8.87148 15.5105 8.82775 15.4308 8.80944 15.3437C8.79101 15.2561 8.79914 15.165 8.8328 15.082C8.86646 14.999 8.92412 14.9279 8.99839 14.8779C9.07266 14.8279 9.16022 14.8011 9.24978 14.8011C9.30998 14.8011 9.36958 14.8132 9.42503 14.8366C9.47997 14.8599 9.52973 14.8938 9.57144 14.9364L12.5024 17.8673L15.433 14.9368C15.5151 14.852 15.6273 14.803 15.7454 14.8002C15.836 14.798 15.9252 14.8233 16.0013 14.8728C16.0773 14.9222 16.1367 14.9935 16.1715 15.0772C16.2063 15.1609 16.2151 15.2533 16.1965 15.342Z",fill:"currentColor"})]});var U=styled("div")(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(8)})),X=styled(b,{shouldForwardProp:e=>e!=="$isActive"&&e!=="$hasMenu"})(({theme:e,$isActive:o=false,$hasMenu:l=false})=>{let{base:s,grey:u,foreground:f}=e.v2.palette,i=e.palette.background.gradient.shadedBlue;return {...e.v2.typography.textVariants.body.small.regular,borderRadius:e.v2.radius(50),borderWidth:e.v2.spacing(1),borderStyle:"solid",minWidth:"135.11px",height:e.v2.spacing(32),display:"flex",justifyContent:"center",alignItems:"center",gap:e.v2.spacing(8),textTransform:"none",transition:"none",WebkitTapHighlightColor:"transparent",paddingInline:e.v2.spacing(16),...l&&{paddingInlineEnd:e.v2.spacing(27)},...o?{background:i,color:s.white,"&:hover":{background:i,opacity:.8}}:{backgroundColor:s.white,borderColor:u[100],color:f.primary,"&:hover":{backgroundColor:s.white,opacity:.7}}}}),Y=styled("span")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"100%"})),_=styled("span",{shouldForwardProp:e=>e!=="$isActive"})(({theme:e,$isActive:o=false})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.v2.spacing(8),fontWeight:o?e.v2.typography.fontWeightBolder:e.v2.typography.fontWeightRegular})),ee=styled("span",{shouldForwardProp:e=>e!=="$isActive"})(({theme:e,$isActive:o=false})=>({display:"flex",alignItems:"center",width:e.v2.spacing(14),height:e.v2.spacing(14),"& img":{width:e.v2.spacing(14),height:e.v2.spacing(14),filter:o?"brightness(0) invert(1)":"brightness(0) invert(0)"}})),te=styled("span",{shouldForwardProp:e=>e!=="$isActive"})(({theme:e,$isActive:o=false})=>{let{base:l,grey:s}=e.v2.palette;return {position:"absolute",top:0,right:0,bottom:0,width:e.v2.spacing(27),maxHeight:"100%",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",color:o?l.white:s[700],"& svg":{display:"block"},"& path:first-of-type":{fill:l.black,fillOpacity:0,transition:"fill-opacity 0.15s ease"},"&:hover path:first-of-type":{fillOpacity:.1}}}),ne=styled(R)({[`& .${Q$1.panel} .menu-item+.menu-item`]:{borderTop:"none"}}),le=styled(V)({minHeight:"36px",height:"36px",WebkitTapHighlightColor:"transparent","&:hover":{boxShadow:"rgba(0, 0, 0, 0.15) 0px 0px 16px 0px"}});function Be(e,o){let{isActive:l=false,label:s,startIcon:u,badgeCount:f,onValueChange:i,id:w,className:E,sx:V,disabled:y,disableRipple:t=false}=e,r="items"in e?e.items:void 0,b="items"in e?e.defaultValue:void 0,h="items"in e?e.selectedValue:void 0,C="items"in e?void 0:e.value,[m,d]=useState(null),[$,F]=useState(void 0);useEffect(()=>{l||d(null);},[l]);let B$1=!!r?.length,H=l||h!==void 0,x=!!m,T=h??$,S=useMemo(()=>r?.find(n=>n.value===T),[T,r]),A=useMemo(()=>{if(!r?.length)return;let n=r.find(g=>g.value===b);return S?.value??n?.value??r[0].value},[b,r,S]),R=useMemo(()=>{if(u!=null)return typeof u=="function"?u(l):u;let n=S?.icon;return typeof n=="function"?n(l,true):n},[l,S,u]),oe=useMemo(()=>R?jsx(ee,{$isActive:l,className:a.icon,children:R}):null,[R,l]),ie=useMemo(()=>f?jsx(z,{color:l?"active":"inactive",className:a.badge,children:g(f)}):null,[f,l]),se=useCallback(n=>{if(!r){i?.(C);return}if(!H){A!==void 0&&i?.(A),d(null);return}d(x?null:n.currentTarget);},[A,H,x,r,i,C]),W=useCallback(n=>{i?.(n),F(n),d(null);},[i]),ue=useCallback(()=>d(null),[]),de=useCallback(n=>{n.key==="Escape"&&(n.stopPropagation(),d(null),m?.focus());},[m]),ce=useCallback((n,g)=>{n.key!=="Enter"&&n.key!==" "||(n.preventDefault(),W(g));},[W]);return r&&!B$1?null:jsxs(Fragment,{children:[jsx(X,{ref:o,id:w,"data-testid":w??"FilterBarButton",className:nc(a.button,E),sx:V,variant:l?"primary":"secondary",$isActive:l,$hasMenu:B$1,disabled:y,disableRipple:t,"aria-pressed":l,"aria-haspopup":B$1?"menu":void 0,"aria-expanded":B$1?x:void 0,onClick:se,children:jsxs(Y,{className:a.labelWrapper,children:[jsxs(_,{$isActive:l,className:a.label,children:[oe,S?.label??s,ie]}),B$1&&jsx(te,{$isActive:l,className:a.chevronSlot,children:Q})]})}),B$1&&jsxs(Fragment,{children:[jsx(B,{open:x,onClick:ue}),jsx(ne,{open:x,anchorEl:m,className:a.menu,panelProps:{role:"menu",onKeyDown:de,sx:{minWidth:m?.clientWidth??133}},children:r?.map(n=>{let g=n.icon,pe=typeof g=="function"?g(l,false):g;return jsx(le,{role:"menuitem",tabIndex:0,className:a.menuItem,startAdornment:pe??null,onClick:()=>W(n.value),onKeyDown:fe=>ce(fe,n.value),children:n.label??n.value},n.value)})})]})]})}var P=memo(forwardRef(Be));function xe({value:e,items:o,onValueChange:l,keepInactive:s=false,renderItem:u,itemSx:f,id:i,sx:w,className:E},V){let y=useCallback(t=>l?.(t),[l]);return jsx(U,{ref:V,id:i,"data-testid":i??"FilterBar",className:nc(a.root,E),sx:w,children:o?.map((t,r)=>{let b="items"in t?e!=null&&t.items.some(F=>F.value===e):t.value===e,h=b&&!s,C="items"in t&&b?e:void 0,m=mc(f??{},t.itemSx),d=u?.({isActive:h,selectedValue:C,onActivate:()=>y("items"in t?t.items.find(F=>F.value===t.defaultValue)?.value??t.items[0]?.value:t.value),onDeactivate:()=>y(void 0),onSelect:y},t,r);if(d!=null)return jsx(Fragment$1,{children:d},`filter-bar-custom-${r}`);let $={isActive:h,label:t.label,startIcon:t.startIcon,badgeCount:t.badgeCount,disabled:t.disabled,disableRipple:t.disableRipple,sx:m,onValueChange:y};return "items"in t?jsx(P,{items:t.items,defaultValue:t.defaultValue,selectedValue:C,...$},`filter-bar-nested-${t.items[0]?.value??r}`):jsx(P,{value:t.value,...$},`filter-bar-single-${t.value}`)})})}var Se=memo(forwardRef(xe));
|
|
2
|
+
export{a,Se as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d,j}from'./chunk-
|
|
1
|
+
import {d,j}from'./chunk-6GZFEPN6.js';import {Zb,Wb,nc}from'./chunk-Z2DUFVI5.js';import {Kj,Qe,Gb}from'./chunk-3M2GZVQW.js';import {forwardRef,useState,useCallback,useMemo,memo}from'react';import {useDropzone}from'react-dropzone';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var p="os-shared-FileUploader",a={root:`${p}-root`,content:`${p}-content`,iconWrapper:`${p}-iconWrapper`,textWrapper:`${p}-textWrapper`,upload:`${p}-upload`,maximum:`${p}-maximum`,errorMessage:`${p}-errorMessage`,closeButton:`${p}-closeButton`};var E=styled("div",{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:o})=>{let{grey:s}=e.v2.palette;return {width:"100%",borderRadius:e.v2.radius(4),padding:`${e.v2.spacing(4)} ${e.v2.spacing(8)}`,display:"flex",alignItems:"center",justifyContent:"flex-start",backgroundColor:s[50],gap:e.v2.spacing(8),cursor:o?"default":"pointer",position:"relative",'& [data-slot="input"]':{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:1,margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:1,whiteSpace:"nowrap"},...o&&{'& [data-slot="content"], & [data-slot="icon-wrapper"]':{cursor:"default",opacity:.6}}}}),V=styled("div")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",color:"inherit",cursor:"pointer",gap:e.v2.spacing(8)})),v=styled("div")(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:e.v2.spacing(4),color:"inherit"})),G=styled("div")(({theme:e})=>{let{grey:o,base:s}=e.v2.palette;return {display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:32,height:32,flexShrink:0,padding:e.v2.spacing(7),backgroundColor:s.white,borderRadius:e.v2.radius(4),border:`1px solid ${o[100]}`}}),H=styled("button")(()=>({display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:"transparent",border:"none",width:16,height:16,padding:0,marginLeft:"auto"}));function J(e,o){return e||(o?`PDF, JPG or PNG files up to ${o}`:"PDF, JPG or PNG files")}var pe="Click to upload",L=forwardRef(function({options:o,files:s,onChange:$,processFiles:U,disabled:f,error:I,invalidFileTypeText:P="Invalid file type",fileTooLargePrefix:W="File is larger than",maxFileSize:F,preventDuplicates:y,label:A=pe,hintText:K,onResetError:C,className:O,sx:Q,id:w},Y){let[S,g]=useState(null),T=useCallback(t=>{if(g(null),U)return U(t);if(!y)return t.map(r=>({file:r,id:r.name}));let l=[],n=[];for(let r of t)Zb(r,s??[])?l.push(r.name):n.push({file:r,id:r.name});if(l.length>0){let r=l.length===1?"file":"files";g(`Duplicate ${r} detected: ${l.join(", ")}`);}return n},[s,y,U]),Z=useCallback(t=>{if(t.length===0){g(null);return}let l=T(t);(l.length>0||!y)&&$?.(l);},[T,y,$]),{getRootProps:_,getInputProps:ee,open:te,isDragReject:j$1,fileRejections:d$1}=useDropzone({...o,disabled:f||o?.disabled,onDrop:(t,l,n)=>{o?.onDrop?.(t,l,n),Z(t);}}),x=useMemo(()=>{if(F)return F;if(o?.maxSize)return Wb(o.maxSize,0).toUpperCase()},[F,o?.maxSize]),c=useMemo(()=>{let t=!!d$1?.length&&d$1.some(n=>n.errors?.some(r=>r.code==="file-invalid-type"));return !!d$1?.length&&d$1.some(n=>n.errors?.some(r=>r.code==="file-too-large"))&&x?`${W} ${x}`:t||j$1?P:S||I},[j$1,d$1,x,S,I,P,W]),oe=J(K,x),re=useCallback(t=>{t.stopPropagation(),g(null),C?.(t);},[C]);return jsxs(E,{ref:Y,id:w,"data-testid":w??"FileUploader",..._(),className:nc(a.root,O),sx:Q,$disabled:f,onClick:f?void 0:te,children:[jsx("input",{"data-slot":"input",...ee(),disabled:f}),jsxs(V,{"data-slot":"content",className:a.content,children:[jsx(G,{"data-slot":"icon-wrapper",className:a.iconWrapper,children:jsx(d,{src:c?Kj:Qe,alt:c?"Upload error":"Upload file",sx:{width:16,height:16}})}),c?jsxs(v,{className:a.textWrapper,children:[jsx(j,{textVariant:"micro.medium",className:a.errorMessage,sx:t=>({color:t.v2.palette.error[500]}),children:c}),jsx(j,{textVariant:"caption.medium",className:a.upload,children:"Click to upload again"})]}):jsxs(v,{className:a.textWrapper,children:[jsx(j,{textVariant:"caption.medium",className:a.upload,children:A}),jsx(j,{textVariant:"micro.medium",className:a.maximum,sx:{opacity:.7},children:oe})]})]}),c&&C&&jsx(H,{type:"button","data-slot":"close-icon-wrapper",className:a.closeButton,onClick:re,"aria-label":"Dismiss upload error",children:jsx(d,{src:Gb,alt:"Dismiss",sx:{width:10,height:10}})})]})});L.displayName="FileUploader";var X=memo(L);export{a,X as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {k,j as j$1,g as g$1}from'./chunk-ISC5KT5E.js';import {j as j$2,r as r$1,R as R$1,V}from'./chunk-
|
|
1
|
+
import {k,j as j$1,g as g$1}from'./chunk-ISC5KT5E.js';import {j as j$2,r as r$1,R as R$1,V}from'./chunk-6GZFEPN6.js';import {r}from'./chunk-JKW2LY7R.js';import {ya,nc,cc}from'./chunk-Z2DUFVI5.js';import {Yc,Xc,jb,Bn}from'./chunk-3M2GZVQW.js';import {memo,forwardRef,useState,useRef,useMemo,useEffect,useCallback}from'react';import m from'@mui/material/Box';import Ge from'@mui/material/MenuItem';import je from'@mui/material/Select';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';import eo from'@mui/material/ClickAwayListener';var c="os-shared-WindowServices",s={root:`${c}-root`,bar:`${c}-bar`,tabsBar:`${c}-tabsBar`,tabs:`${c}-tabs`,tab:`${c}-tab`,trigger:`${c}-trigger`,triggerLabel:`${c}-triggerLabel`,triggerArrow:`${c}-triggerArrow`,menuItem:`${c}-menuItem`,contextMenu:`${c}-contextMenu`},D="os-shared-WindowSkeleton",g={root:`${D}-root`,bar:`${D}-bar`,body:`${D}-body`,rows:`${D}-rows`,row:`${D}-row`},re="Open in a new window",R="en",ie=51,ae=8,se=3,de=10,le=64,pe=4;var ce=styled(m,{shouldForwardProp:e=>e!=="$isDragging"})(({$isDragging:e=false})=>({cursor:e?"move":"default",position:"relative",zIndex:1,margin:0,backgroundColor:j$1,backdropFilter:k})),me=styled(m)(({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}})),we=styled(m)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(8),userSelect:"none",width:"max-content",maxWidth:"100%"})),Ke=ya(),ue=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:Ke==="safari"?"-1px":"",padding:8,borderRadius:e.shape.borderRadius}}}}),ge=styled(je)(({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(Ge)(({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(m)(()=>({display:"flex",flexDirection:"column",height:"100%",overflow:"hidden",borderRadius:"inherit",backgroundColor:"transparent"})),be=styled(m)(({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(m)(({theme:e})=>({flex:1,minHeight:0,backgroundColor:e.v2.palette.base.white})),ve=styled(m)(({theme:e})=>({height:"100%",overflow:"hidden",backgroundColor:e.v2.palette.base.white,padding:`${e.v2.spacing(8)} ${e.v2.spacing(32)}`})),Ce=styled(m)(({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}`})),Le=styled(m)(()=>({display:"flex",flexDirection:"column",gap:"4px"})),ke=styled(m)(()=>({display:"flex",gap:"4px"}));function Ye({className:e}){return jsx(ye,{src:(e??"").includes("MuiSelect-iconOpen")?Yc:Xc,alt:"dropdown",className:nc(s.triggerArrow)})}var We=memo(Ye);function oo({name:e,code:n,isActive:o,openInNewWindowLabel:l,onOpenService:u,onOpenServiceInNewWindow:d,className:f}){let[p,v]=useState(null),C=!!p,L=useRef(null),b=useCallback(()=>{v(null);},[]),B=useCallback(r=>{L.current={x:r.clientX,y:r.clientY};},[]),$=useCallback(r=>{let S=L.current;if(L.current=null,S&&Math.hypot(r.clientX-S.x,r.clientY-S.y)>5){r.preventDefault(),r.stopPropagation();return}r.preventDefault(),r.stopPropagation(),u(n);},[n,u]),k=useCallback(r=>{r.preventDefault(),r.stopPropagation(),v(r.currentTarget);},[]),W=useCallback(r=>{r.preventDefault(),r.stopPropagation(),d?.(n),b();},[n,b,d]);return jsx(eo,{onClickAway:b,children:jsxs(m,{component:"span",sx:{display:"contents"},children:[jsx(ue,{$title:e,onClick:$,onPointerDown:B,onContextMenu:k,className:nc(s.tab,o&&"active",f),children:e}),jsx(R$1,{open:C,anchorEl:p,placement:"bottom-start",className:nc(s.contextMenu),children:jsx(V,{startAdornment:null,onClick:W,className:nc(s.menuItem),children:jsxs(m,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:"4px"},children:[jsx("img",{src:jb,alt:"new-window-icon"}),l]})})})]})})}var Re=memo(oo);function Ne(e){return e===Bn.reports.code||e===Bn.upload.code}function P(e){if(!e)return "";try{return decodeURIComponent(e)}catch{return e}}function Me(e,n,o){let l=P(n).toLowerCase(),u=(e??[]).filter(d=>P(d.code).toLowerCase()===l)?.[0];return cc(u?.name??[],o??R)||""}function j(e,n){return cc(e.name,n??R)||""}function Te(e,n){return P(e).toLowerCase()===P(n).toLowerCase()}var Oe=forwardRef(function({serviceCode:n="",services:o,onOpenService:l,onOpenServiceInNewWindow:u,language:d=R,openInNewWindowLabel:f=re,id:p,className:v,sx:C,"data-testid":L,"data-id":b},B){let[$,k]=useState(false),[W,r$1]=useState(0),[S,$e]=useState(false),[Ae,K]=useState(false),[Ee,{width:A}]=r(),X=useRef(null),E=useMemo(()=>Me(o,n,d),[o,n,d]);useEffect(()=>{S||r$1(X.current?.offsetWidth??0);},[S,o,d]),useEffect(()=>{if(A<=0||W<=0)return;let i=W+le+ie+ae+se+de;$e(A<i);},[A,W]);let He=useCallback(()=>{k(true);},[]),ze=useCallback(()=>{k(false);},[]),_e=useCallback(()=>{k(false);},[]),Fe=useCallback(()=>{K(i=>!i);},[]),Ue=useCallback(i=>{l?.(i),K(false);},[l]),Ve=useCallback(i=>{l?.(i);},[l]);return o.length?jsx(ce,{ref:B,id:p,"data-testid":L??p??"WindowServices",...(b??p)!=null?{"data-id":b??p}:null,$isDragging:$,onPointerDown:He,onPointerUp:ze,onPointerCancel:_e,className:nc(s.root,s.bar,g$1,v),sx:C,children:jsxs(me,{ref:Ee,className:nc(s.tabsBar),children:[!S&&jsx(we,{ref:X,className:nc(s.tabs),children:o.map((i,H)=>jsx(Re,{name:j(i,d),code:i.code,isActive:Te(n,i.code),openInNewWindowLabel:f,onOpenService:Ve,onOpenServiceInNewWindow:u},`service-item-${i.code}-${H}`))}),S&&jsx(ge,{open:Ae,onClick:Fe,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:We,renderValue:i=>jsx(fe,{className:nc(s.triggerLabel),children:i}),sx:{"& .MuiOutlinedInput-root.MuiList-root-MuiMenu-list":{paddingTop:"0px !important",paddingBottom:"0px !important"}},className:nc(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(),Ue(i.code);},className:nc(s.menuItem),children:jsx(xe,{children:z})},`option-${i.code}-${H}`)})})]})}):null});Oe.displayName="WindowServices";var ao=memo(Oe);var Be=forwardRef(function({appCode:n,id:o,className:l,sx:u,"data-testid":d,"data-id":f},p){return Ne(n)?jsx(G,{ref:p,id:o,"data-testid":d??o??"WindowSkeleton",...(f??o)!=null?{"data-id":f??o}:null,className:nc(g.root,g$1,l),sx:u,children:jsx(ve,{className:nc(g.rows,g.body),children:Array.from({length:pe}).map((v,C)=>jsxs(Ce,{className:nc(g.row),children:[jsx(r$1,{variant:"rounded",width:32,height:32}),jsxs(Le,{children:[jsx(r$1,{width:80,height:12.29}),jsxs(ke,{children:[jsx(r$1,{width:50,height:12.29}),jsx(r$1,{width:125,height:12.29})]})]})]},C))})}):jsxs(G,{ref:p,id:o,"data-testid":d??o??"WindowSkeleton",...(f??o)!=null?{"data-id":f??o}:null,className:nc(g.root,g$1,l),sx:u,children:[jsxs(be,{className:nc(g.bar),children:[jsx(r$1,{variant:"rounded",width:60,height:31}),jsx(r$1,{variant:"rounded",width:60,height:31}),jsx(r$1,{variant:"rounded",width:60,height:31})]}),jsx(he,{className:nc(g.body)})]})});Be.displayName="WindowSkeleton";var co=memo(Be);export{s as a,g as b,ao as c,co as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {L,ba,aa}from'./chunk-
|
|
1
|
+
import {L,ba,aa}from'./chunk-6GZFEPN6.js';import {Bc,Dc,mc,m,nc,_a,n}from'./chunk-Z2DUFVI5.js';import {forwardRef,useId,useRef,useLayoutEffect,memo}from'react';import ge from'@mui/material/Box';import {styled,alpha,useTheme}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var p="os-shared-TextInput",a={root:`${p}-root`,field:`${p}-field`,label:`${p}-label`,input:`${p}-input`,helperText:`${p}-helperText`},A=new Set(["Backspace","Delete","Tab","Escape","Enter","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"]);var F=styled(ge)(()=>({display:"flex",flexDirection:"column",gap:"4px",width:"100%"}));function R(e,t){let{borderColor:r}=aa(e,t),l=e.v2.radius(4);return {borderColor:r,borderBottom:"none",borderRadius:`${l} ${l} 0 0`,"&:focus-within":{borderColor:r,boxShadow:"none"}}}var $=styled("small",{shouldForwardProp:e=>e!=="$error"})(({theme:e,$error:t})=>({color:t?e.palette.error.main:alpha(e.v2.palette.base.black,.6),fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}));function K(e,t){let r=typeof e=="string"&&_a(e)?e:void 0;return {resolvedLabel:r??t??void 0,resolvedPlaceholder:r&&typeof t=="string"?t:void 0}}function D(e,t){!(e.metaKey||e.ctrlKey||e.altKey)&&!A.has(e.key)&&(e.key==="."?String(e.currentTarget.value??"").replace(/,/g,"").includes(".")&&e.preventDefault():/^[0-9]$/.test(e.key)||e.preventDefault()),t?.(e);}var B=forwardRef(({onChange:e,error:t=false,helperText:r,feedback:l,label:g,placeholder:O,disabled:V,fullWidth:z=true,startAdornment:U,endAdornment:_,readOnly:j,inputProps:q,InputProps:G,InputLabelProps:Ce,className:J,sx:Q,id:m$1="TextInput",type:X,value:d,defaultValue:f,onKeyDown:b,hasThousandSeparator:n$1=false,...Y},u)=>{let Z=useTheme(),ee=Bc(useId(),"text-input"),x=useRef(null),s=useRef(null),te=o=>{x.current=o,typeof u=="function"?u(o):u&&(u.current=o);},re=o=>{if(!n$1){e?.(o.target.value??"");return}let T=o.target.value??"",Te=o.target.selectionStart??T.length,Ie=T.slice(0,Te).replace(/,/g,"").length,h=m(T);s.current=n(h,Ie),e?.(h);};useLayoutEffect(()=>{!n$1||s.current==null||!x.current||(x.current.setSelectionRange(s.current,s.current),s.current=null);},[n$1,d]);let{isProvided:y,isVisible:oe,type:ne}=Dc(l),{resolvedLabel:le,resolvedPlaceholder:se}=K(g,O),S=!!t&&!y,{sx:pe,startAdornment:ae,endAdornment:de,readOnly:ue,inputProps:ie,disabled:ce}=G??{},me=oe?R(Z,ne):{},fe=mc(mc(me,pe),Q),xe=n$1&&d!=null?m(String(d)):d,ye=n$1&&f!=null?m(String(f)):f;return jsxs(ge,{className:a.root,children:[jsx(F,{id:ee,"data-testid":"TextInput",children:jsx(L,{id:m$1,...Y,ref:te,type:n$1?"text":X,value:xe,defaultValue:ye,label:le,placeholder:se,disabled:V??ce,fullWidth:z,error:S,startAdornment:U??ae,endAdornment:_??de,readOnly:j??ue,inputProps:{...n$1?{inputMode:"decimal"}:{},...ie,...q},onKeyDown:n$1?o=>D(o,b):b,onChange:re,className:nc(a.field,J),sx:fe})}),y?jsx(ba,{...l}):null,!y&&r?jsx($,{className:a.helperText,id:m$1?`${m$1}-helper-text`:void 0,$error:S,children:r}):null]})});B.displayName="TextInput";var W=memo(B);export{a,W as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {k as k$1,j as j$1,g}from'./chunk-ISC5KT5E.js';import {j as j$2}from'./chunk-
|
|
1
|
+
import {k as k$1,j as j$1,g}from'./chunk-ISC5KT5E.js';import {j as j$2}from'./chunk-6GZFEPN6.js';import {nc}from'./chunk-Z2DUFVI5.js';import {Ta,Be,bb,Ra,Sa,Se}from'./chunk-3M2GZVQW.js';import {forwardRef,useState,useCallback,memo}from'react';import m from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var d="os-shared-WindowToolbar",e={root:`${d}-root`,start:`${d}-start`,end:`${d}-end`,title:`${d}-title`,titleIcon:`${d}-titleIcon`,icon:`${d}-icon`,expand:`${d}-expand`,expandIcon:`${d}-expandIcon`,expandText:`${d}-expandText`};var P=styled(m,{shouldForwardProp:o=>o!=="$isDragging"})(({theme:o,$isDragging:t=false})=>({margin:0,position:"sticky",top:0,left:0,right:0,cursor:t?"move":"default",flexShrink:0,height:32,display:"flex",width:"100%",justifyContent:"safe center",backgroundColor:j$1,backdropFilter:k$1,transition:"background-color 0.5s ease-in-out",borderTopLeftRadius:"12px",borderTopRightRadius:"12px",paddingLeft:o.spacing(1.25),paddingRight:o.spacing(1.25),'[data-window-maximized="true"] & .action-box':{visibility:"hidden"},'[data-window-maximized="true"] &:hover .action-box':{visibility:"visible"},":hover":{".header-icon":{backgroundColor:`${o.palette.grey[200]}40`},".header-icon img":{opacity:1},[`.${e.expandText}`]:{opacity:1},[`.${e.expandIcon}`]:{backgroundColor:`${o.palette.success.main} !important`}},"&:focus-within":{[`.${e.expandText}`]:{opacity:1}}})),D=styled(m)(({theme:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",flex:"1 1 0px",minWidth:0,gap:o.spacing(1),zIndex:1})),$=styled(m)(({theme:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-end",flex:"1 1 0px",minWidth:0,gap:o.spacing(1)})),v=styled("div")(()=>({display:"flex",justifyContent:"center",alignItems:"center",position:"relative",textAlign:"center",flex:"1 1 0px",minWidth:0,maxWidth:"100%",overflow:"hidden"})),z=styled("img")(()=>({width:14,height:14,verticalAlign:"center"})),A=styled(j$2)(({theme:o})=>({fontSize:"10px",color:"rgba(32, 35, 43, 0.5)",opacity:.7,textAlign:"left",fontWeight:o.v2.typography.fontWeightBold,lineHeight:"14px",userSelect:"none",paddingLeft:"0.175rem",textTransform:"capitalize",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"})),p=styled(m)(({theme:o})=>({width:12,height:12,borderRadius:"50%",cursor:"pointer",backgroundColor:`${o.palette.grey[200]}14`,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease-in-out",img:{opacity:"0",transition:"all 0.2s ease-in-out"},"&:active":{backgroundColor:`${o.palette.grey[200]} !important`}})),k=styled(p)(({theme:o})=>({"&&.header-icon:hover":{backgroundColor:o.palette.error.main}})),M=styled(p)(({theme:o})=>({"&&.header-icon:hover":{backgroundColor:o.palette.warning.main}})),E=styled(p)(({theme:o})=>({"&&.header-icon:hover":{backgroundColor:o.palette.info.dark}})),R=styled(p,{shouldForwardProp:o=>o!=="$active"})(({theme:o,$active:t})=>({...t&&{backgroundColor:`${o.palette.common.orange} !important`,"& img":{filter:"brightness(0) invert(1)",opacity:1}},"&&.header-icon:hover":{backgroundColor:o.palette.common.orange,"& img":{filter:"brightness(0) invert(1)"}}})),F=styled(m)(()=>({alignItems:"center",justifyContent:"center",display:"flex",height:12,gap:"5px",cursor:"pointer","&:hover":{"& .sandbox-text":{display:"block"}}})),L=styled(j$2,{shouldForwardProp:o=>o!=="$active"})(({theme:o,$active:t})=>({fontSize:"10px",fontWeight:600,color:o.palette.common.orange,whiteSpace:"nowrap",display:t?"block":"none"})),j=styled(p,{shouldForwardProp:o=>o!=="$direction"})(({theme:o,$direction:t="right"})=>({"&.header-icon:hover":{backgroundColor:o.palette.success.main},"& img":{transform:t==="left"?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out, opacity 0.2s ease-in-out"}})),B=styled(m,{shouldForwardProp:o=>o!=="$active"})(({theme:o,$active:t=false})=>({alignItems:"center",justifyContent:"center",display:"flex",height:12,gap:"5px",marginInlineStart:"10px",...t&&{"& .header-icon":{backgroundColor:`${o.palette.success.main} !important`},"& .header-icon img":{opacity:1},[`.${e.expandText}`]:{opacity:1}},"&:hover":{"& .request-text":{opacity:1},"& .header-icon":{backgroundColor:`${o.palette.success.main} !important`}},cursor:"pointer"})),O=styled(j$2)(()=>({fontFamily:"Tap Sans, sans-serif",fontWeight:600,fontSize:"10px",lineHeight:"100%",letterSpacing:"0%",textBoxTrim:"trim-start",textBoxEdge:"cap alphabetic",color:"rgba(42, 206, 0, 1)",opacity:0,transition:"opacity 0.2s ease-in-out"}));var _=forwardRef(function({children:t,id:r,className:a,sx:l,"data-testid":s,"data-id":x},X){let[Y,w]=useState(false),Z=useCallback(()=>{w(true);},[]),T=useCallback(()=>{w(false);},[]);return jsx(P,{ref:X,id:r,"data-testid":s??r??"WindowToolbar",...(x??r)!=null?{"data-id":x??r}:null,className:nc(e.root,g,a),sx:l,$isDragging:Y,onPointerDown:Z,onPointerUp:T,onPointerCancel:T,children:t})});_.displayName="WindowToolbar";var ro=memo(_);function ao({className:o,id:t,...r}){return jsx(k,{...r,id:t,"data-testid":t??"CloseIcon",className:nc(e.icon,"header-icon",o),children:jsx("img",{src:Ta,alt:"close"})})}var lo=memo(ao);function po({direction:o,active:t=false,children:r,className:a,id:l,...s}){return jsxs(B,{...s,id:l,"data-testid":l??"DirectionIcon",className:nc(e.expand,a),$active:t,children:[jsx(j,{className:nc(e.expandIcon,"header-icon"),$direction:o,children:jsx(m,{component:"img",src:Be,alt:"arrow"})}),jsx(O,{className:nc(e.expandText,"request-text"),children:r})]})}var co=memo(po);function xo({isMaximized:o=false,className:t,id:r,...a}){return jsx(E,{...a,id:r,"data-testid":r??"MaximizeIcon",className:nc(e.icon,"header-icon",t),children:jsx("img",{src:o?bb:Ra,alt:"maximize"})})}var wo=memo(xo);function yo({className:o,id:t,...r}){return jsx(M,{...r,id:t,"data-testid":t??"MinimizeIcon",className:nc(e.icon,"header-icon",o),children:jsx("img",{src:Sa,alt:"minimize"})})}var go=memo(yo);function uo({active:o=false,label:t="Sandbox mode",className:r,id:a,...l}){return jsxs(F,{...l,id:a,"data-testid":a??"SandboxIcon",className:r,children:[jsx(L,{$active:o,className:"sandbox-text",children:t}),jsx(R,{$active:o,className:nc(e.icon,"header-icon"),children:jsx("img",{src:Se,alt:"sandbox"})})]})}var So=memo(uo);var G=forwardRef(function({children:t,id:r,className:a,sx:l},s){return jsx(D,{ref:s,id:r,"data-testid":r??"WindowToolbarStartAdornment",className:nc(e.start,"action-box",a),sx:l,children:t})});G.displayName="WindowToolbarStartAdornment";var No=memo(G);var J=forwardRef(function({children:t,id:r,className:a,sx:l},s){return jsx($,{ref:s,id:r,"data-testid":r??"WindowToolbarEndAdornment",className:nc(e.end,a),sx:l,children:t})});J.displayName="WindowToolbarEndAdornment";var vo=memo(J);function V({title:o,icon:t,className:r}){return jsxs(v,{className:nc("action-box",r),children:[t?jsx(z,{src:t,alt:"icon",className:nc(e.titleIcon)}):null,o?jsx(A,{className:nc(e.title),children:o}):null]})}V.displayName="WindowToolbarTitle";var ko=memo(V);export{e as a,ro as b,lo as c,co as d,wo as e,go as f,So as g,No as h,vo as i,ko as j};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {j,d,n}from'./chunk-
|
|
1
|
+
import {j,d,n}from'./chunk-6GZFEPN6.js';import {Wb,nc}from'./chunk-Z2DUFVI5.js';import {Dj,Kj,Qe}from'./chunk-3M2GZVQW.js';import {forwardRef,useState,useCallback,useImperativeHandle,useEffect,useMemo,memo}from'react';import {useDropzone}from'react-dropzone';import {styled,alpha}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var i="os-shared-FileDropbox",e={root:`${i}-root`,header:`${i}-header`,title:`${i}-title`,format:`${i}-format`,zone:`${i}-zone`,content:`${i}-content`,textWrapper:`${i}-textWrapper`,maximum:`${i}-maximum`,upload:`${i}-upload`,uploadAgain:`${i}-uploadAgain`};var y=styled("div")(({theme:o})=>({textAlign:"center",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:o.v2.spacing(32)})),f=styled("div")(()=>({paddingInline:"40px"})),s=styled(j,{shouldForwardProp:o=>o!=="$isError"})(({theme:o,$isError:l})=>{let{base:n,error:b}=o.v2.palette;return {color:l?b[500]:n.black,fontSize:"18px",fontWeight:600,lineHeight:"20px",marginBottom:o.v2.spacing(8)}});styled(j)(({theme:o})=>{let{base:l}=o.v2.palette;return {color:alpha(l.black,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"}});var u=styled("div",{shouldForwardProp:o=>o!=="$width"})(({theme:o,$width:l})=>{let{grey:n}=o.v2.palette;return {width:l||431,minHeight:176,border:"1px dashed #DDDDDD",borderRadius:o.v2.radius(8),padding:"24px 0",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:n[50]}}),g=styled("div")(({theme:o})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:o.v2.spacing(24),color:"inherit",fontSize:"14px",lineHeight:"20px",cursor:"default"})),I=styled("div")(({theme:o})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:o.v2.spacing(8),color:"inherit"})),w=styled("div")(({theme:o})=>{let{base:l}=o.v2.palette;return {color:alpha(l.black,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"}}),O=styled("span")(()=>({fontWeight:600,textDecorationLine:"underline",cursor:"pointer"})),Q=styled("button")(({theme:o})=>{let{base:l,grey:n}=o.v2.palette;return {color:l.black,fontSize:"12px",fontWeight:500,lineHeight:"20px",padding:"4px 12px",borderRadius:o.v2.radius(4),border:`1px solid ${n[100]}`,backgroundColor:l.white,cursor:"pointer"}});var _=forwardRef(function({accept:l,footer:n$1,options:b,isLoading:S,progress:ee,error:P,errorHint:oe,subtitle:h,isSuccess:T,action:te,title:a,width:N,progressVariant:re,className:C,sx:$,id:d$1,invalidFileTypeText:R="Invalid file type",fileTooLargePrefix:j="File is larger than",uploadingText:le="Uploading...",waitText:ae="Please wait",uploadBulkFileText:ie="Upload bulk file",uploadAgainText:pe="Upload again",clickToUploadText:ne="Click to upload",orDragAndDropText:se="or drag and drop",maximumFileSizePrefix:de="Maximum file size",supportedFormatsPrefix:A="Supported formats"},xe){let[x,M]=useState([]),{getRootProps:ce,getInputProps:me,open:D,acceptedFiles:Z,isDragReject:E,fileRejections:m}=useDropzone(b),B=useCallback(()=>{M([]);},[]);useImperativeHandle(xe,()=>({open:D,clear:B}),[D,B]),useEffect(()=>{M(Z);},[Z]);let v=Wb(b?.maxSize||0,0).toUpperCase(),c=useMemo(()=>{let be=m.length>0&&m[0].errors.some(W=>W.code==="file-invalid-type"),De=m.length>0&&m[0].errors.some(W=>W.code==="file-too-large");return E||be?R:De?`${j} ${v}`:P},[E,P,m,v,R,j]),z=useMemo(()=>x.length?jsxs(I,{className:e.textWrapper,children:[jsx("span",{children:x[0].name}),jsx(w,{className:e.maximum,children:Wb(x[0].size)})]}):null,[x]);return T&&x.length&&!S?jsxs(y,{id:d$1,"data-testid":d$1??"FileDropbox",className:nc(e.root,C),sx:$,children:[jsxs(f,{className:e.header,children:[typeof a=="string"?jsx(s,{className:e.title,children:a}):a??jsx(s,{className:e.title,children:"File uploaded"}),h]}),jsx(u,{className:e.zone,$width:N,children:jsxs(g,{"data-slot":"content",className:e.content,children:[T&&jsx(d,{src:Dj,alt:"Upload complete",sx:{width:56,height:56}}),z]})}),n$1]}):S&&x.length?jsxs(y,{id:d$1,"data-testid":d$1??"FileDropbox",className:nc(e.root,C),sx:$,children:[jsxs(f,{className:e.header,children:[a&&typeof a!="string"?a:jsxs(Fragment,{children:[jsx(s,{className:e.title,children:typeof a=="string"?a:le}),jsx("span",{className:e.format,children:ae})]}),h]}),jsx(u,{className:e.zone,$width:N,children:jsxs(g,{"data-slot":"content",className:e.content,children:[S&&jsx(n,{size:56,value:ee,variant:re??"determinate"}),z]})}),n$1]}):jsxs(y,{id:d$1,"data-testid":d$1??"FileDropbox",className:nc(e.root,C),sx:$,children:[jsxs(f,{className:e.header,children:[c?jsx(s,{$isError:true,className:e.title,children:c}):typeof a=="string"?jsx(s,{className:e.title,children:a}):a??jsx(s,{className:e.title,children:ie}),h||!!c&&jsx("span",{className:e.format,children:`${A}: xls, xlsx`})]}),jsxs(u,{className:e.zone,$width:N,...ce(),children:[jsx("input",{...me()}),jsxs(g,{"data-slot":"content",className:e.content,children:[jsx(d,{src:c?Kj:Qe,alt:c?"Upload error":"Upload file",sx:{width:56,height:56}}),oe,z,te??jsx(Fragment,{children:c?jsx(Q,{type:"button",className:e.uploadAgain,onClick:D,children:pe}):jsxs(I,{className:e.textWrapper,children:[jsxs("span",{children:[jsx(O,{className:e.upload,onClick:D,children:ne})," ",se]}),jsxs(w,{className:e.maximum,children:[de," ",v]}),l&&jsxs("span",{className:e.format,children:[A," ",l]})]})})]})]}),n$1]})});_.displayName="FileDropbox";var L=memo(_);export{e as a,L as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d,c as c$1}from'./chunk-RXDZGI4N.js';import {f,g,h as h$2,i as i$1,b}from'./chunk-K7ENJA7I.js';import {h as h$1,i,b as b$1,c as c$2,f as f$2,e,d as d$1,j as j$1}from'./chunk-QUYS25CX.js';import {h,c,f as f$1}from'./chunk-ISC5KT5E.js';import {mc,nc}from'./chunk-Z2DUFVI5.js';import'./chunk-3M2GZVQW.js';import {memo,forwardRef,useState,useEffect,useRef}from'react';import {createPortal}from'react-dom';import oo from'@mui/material/Backdrop';import {styled,alpha}from'@mui/material/styles';import v from'@mui/material/Box';import {motion,animate}from'framer-motion';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var H="os-shared-WindowShell",x={root:`${H}-root`,sidebar:`${H}-sidebar`,body:`${H}-body`,panel:`${H}-panel`};var we=styled(v)(()=>({display:"flex",flexDirection:"row",flex:1,minHeight:0,height:"100%",backgroundColor:"transparent"})),xe=styled(v)(()=>({flexShrink:0,overflow:"hidden auto",backgroundColor:"transparent",transition:"none"})),be=styled(v)(({theme:e})=>({flexShrink:0,overflow:"hidden auto",borderLeft:`1px solid ${e.palette.divider}`,backgroundColor:"transparent",transition:"none"})),ye=styled(v)(()=>({display:"flex",flexDirection:"column",flex:1,minWidth:0,minHeight:0})),ze=styled(v,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative",width:e})),Ne=styled(motion.div)(()=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative"})),Ce=styled(motion.div,{shouldForwardProp:e=>e!=="$slotWidth"})(({$slotWidth:e})=>({width:e,minWidth:e,minHeight:"100%",height:"100%",overflow:"hidden"})),Ie=styled(v,{shouldForwardProp:e=>e!=="$visible"&&e!=="$duration"})(({$visible:e=true,$duration:o=h})=>({display:"flex",alignItems:"center",overflow:"hidden",whiteSpace:"nowrap",flexShrink:0,maxWidth:e?160:0,opacity:e?1:0,pointerEvents:e?"auto":"none",transition:o>0?`max-width ${.3*o}s ease-in-out, opacity ${.24*o}s ease-in-out`:"none"})),Te=styled(h$1,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e}:null})),Pe=styled(i,{shouldForwardProp:e=>e!=="$width"&&e!=="$justifyContent"})(({$width:e,$justifyContent:o="flex-start"})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e,justifyContent:o}:null}));var Ue=220;function ge(e,o,a){return Math.min(Math.max(e,o??0),a??1/0)}function Ae(e,o,a,n){if(Math.abs(e-o)<=1)return;let r=animate(0,1,{duration:a,onUpdate:t=>{n(s=>({...s,width:e+(o-e)*t}));}});return ()=>r.stop()}function G(e,o){if(e===false)return {duration:0,resize:o};let a=typeof e=="object"?e:void 0,n=a?.duration;return {duration:typeof n=="number"&&Number.isFinite(n)?Math.max(0,n):h,resize:a?.resize??o}}function j(e){return e?.children==null||e.expand?.isExpanded===false?false:e.expand?.isExpanded===true}function F(e,o=Ue){let a=Array.isArray(e)?e.flat():[e];for(let n=a.length-1;n>=0;n--){let r=a[n];if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&typeof r.width=="number")return r.width}return o}function Ee(e){let o=e["data-id"]??e.id;return o!=null?{"data-id":o}:{}}function Me({kind:e,slot:o,isOpen:a,fullWidth:n,wrapperWidth:r,animateWrapperWidth:t,animation:s}){let p=e==="sidebar"?xe:be,d=e==="sidebar"?x.sidebar:x.panel,m=o["data-testid"]?`${o["data-testid"]}Wrapper`:e==="sidebar"?"WindowShellSidebarWrapper":"WindowShellPanelWrapper",i=o["data-testid"]??o.id??(e==="sidebar"?"WindowShellSidebar":"WindowShellPanel"),l=Ee(o),u=jsx(p,{id:o.id,className:nc(d,o.className),"data-testid":i,...l,sx:mc({width:n,minWidth:0},o.sx),children:jsx(Ce,{$slotWidth:n,initial:false,animate:{x:a?0:-n},transition:{duration:s.duration},children:o.children})});return t?jsx(Ne,{"data-testid":m,...l,initial:false,animate:{width:r},transition:{duration:s.duration},children:u}):jsx(ze,{"data-testid":m,...l,$width:r,children:u})}Me.displayName="WindowShellSlotColumn";var J=memo(Me);function De({baseWindowWidth:e,sidebar:o,panel:a,content:n,bodyContent:r,sidebarOpen:t,showPanel:s,sidebarFullWidth:p,panelFullWidth:d,sidebarAnimation:m,panelAnimation:i}){let{size:l}=b(),u=i.resize==="window",W=typeof e=="number"?Math.max(0,e-(u?d:0)-(m.resize==="window"&&!t?p:0)):l.width,b$1=u?s?Math.min(d,Math.max(0,l.width-W)):0:s?d:0,y=t?p:0;return jsxs(we,{className:nc(x.root),children:[o?.children?jsx(J,{kind:"sidebar",slot:o,isOpen:t,fullWidth:p,wrapperWidth:y,animateWrapperWidth:true,animation:m}):null,jsx(ye,{id:n?.id?`${n.id}Body`:void 0,className:nc(x.body,n?.className),"data-testid":n?.["data-testid"]?`${n["data-testid"]}Body`:n?.id?`${n.id}Body`:"WindowShellBody",...(n?.["data-id"]??n?.id)!=null?{"data-id":n?.["data-id"]?`${n["data-id"]}Body`:`${n?.id}Body`}:null,sx:n?.sx,children:r}),a?.children?jsx(J,{kind:"panel",slot:a,isOpen:s,fullWidth:d,wrapperWidth:b$1,animateWrapperWidth:!u,animation:i}):null]})}De.displayName="WindowShellSlotsLayout";var Re=memo(De);function $e({sidebarOpen:e,showPanel:o,sidebarResize:a,panelResize:n,sidebarDuration:r,panelDuration:t}){let{size:s,setSize:p,defaultSize:d,minSize:m,maxSize:i}=b(),l=useRef(s);l.current=s;let u=useRef(d.width),W=useRef(e),b$1=useRef(o),y=useRef(d.width);return useEffect(()=>{let C=b$1.current!==o,w=W.current!==e,E=y.current!==d.width;b$1.current=o,W.current=e,y.current=d.width;let S;if(w&&a==="window"?S=r:(C&&n==="window"||E&&!C&&!w)&&(S=t),S==null)return;let h=ge(d.width,m?.width,i?.width);return u.current=h,Ae(l.current.width,h,S,p)},[d.width,o,e,a,n,r,t,m?.width,i?.width,p]),null}$e.displayName="WindowShellAnimator";var Oe=memo($e);function ve({toolbar:e$1,sidebar:o,panel:a,animationDuration:n=h}){let{title:r,titleIcon:t,onClose:s,onMinimize:p,onMaximize:d,startAdornment:m,endAdornment:i,id:l,className:u,"data-testid":W,"data-id":b$2,sx:y}=e$1??{},{isMaximized:C}=b(),w=typeof s=="function"?s:void 0,E=typeof p=="function"?p:void 0,S=typeof d=="function"?d:void 0,h=o?.expand,c=a?.expand,z=j(a),L=h?.isExpanded??true,M=h!=null&&o?.children!=null,D=c!=null&&a?.children!=null&&z,k=M&&D,V=F(a?.sx),_=o!=null?F(o.sx):0,I=Math.max(_,V),T=k&&L?I:void 0,Z=D?I:void 0,X=D;return jsxs(b$1,{id:l??f$1,className:u,"data-testid":W??l??"WindowToolbar","data-id":b$2??l,sx:y,children:[jsxs(Te,{$width:T,children:[w?jsx(c$2,{onClick:w}):null,E?jsx(f$2,{onClick:E}):null,S?jsx(e,{isMaximized:C,onClick:S}):null,M&&h?jsx(d$1,{direction:h.isExpanded??true?"left":"right",active:h.isExpanded??true,onClick:h.onExpand,children:h.label}):null,m]}),jsx(j$1,{title:r,icon:t}),jsxs(Pe,{$width:Z,$justifyContent:i?"space-between":"flex-start",children:[D?jsx(Ie,{$visible:X,$duration:n,children:jsx(d$1,{sx:{flexShrink:0},direction:c?.isExpanded??true?"left":"right",active:z,onClick:c?.onExpand,children:c?.label})}):null,i]})]})}ve.displayName="WindowShellToolbar";var Fe=memo(ve);var Be=forwardRef(function({isOpen:o,className:a,sx:n,toolbar:r,services:t,sidebar:s,panel:p,footer:d$1,content:m,window:i,backdrop:l},u){let W=t?.list??[],b=(t?.isLoading??false)||W.length>0,y=d$1!=null&&(d$1.isVisible??true),C=s?.children,w=F(s?.sx),E=p?.children,S=p!=null?F(p.sx):0,h=m?.children,c$2=s?.expand?.isExpanded??C!=null,z=j(p),L=!!(C||E),[M,D]=useState(w),[k,V]=useState(S);useEffect(()=>{c$2&&D(w),z&&V(S);},[c$2,w,z,S]);let _=r?.onClose??r?.onMinimize??(()=>{}),I=G(s?.animation,"in-place"),T=G(p?.animation,"in-place"),Z=(()=>{let P=i?.defaultSize;if(typeof P?.width!="number")return P;let oe=(I.resize==="window"&&!c$2?M:0)+(T.resize==="window"&&!z?k:0);return oe>0?{...P,width:Math.max(0,P.width-oe)}:P})(),X={height:i?.minSize?.height??i?.defaultSize?.height??c,...i?.minSize?.width!=null?{width:i.minSize.width}:null},Le=l!=null&&(l.isVisible??true)&&o&&!i?.isMinimized,_e=(i?.order??0)+10-1,ee=jsx(oo,{open:true,onClick:_,id:l?.id,className:l?.className,"data-testid":l?.["data-testid"]??l?.id??"WindowShellBackdrop",...(l?.["data-id"]??l?.id)!=null?{"data-id":l?.["data-id"]??l?.id}:null,sx:mc({zIndex:_e,backgroundColor:P=>alpha(P.palette.common.black,.3)},l?.sx)});return jsxs(Fragment,{children:[Le&&(i?.disablePortal?ee:createPortal(ee,document.body)),jsxs(f,{ref:u,isOpen:o,onClose:_,defaultSize:Z,minSize:X,maxSize:i?.maxSize,defaultPosition:i?.defaultPosition,containerRef:i?.containerRef,order:i?.order,isMinimized:i?.isMinimized,isMaximized:i?.isMaximized,id:i?.id,className:nc(x.root,i?.className,a),sx:n,onResize:i?.onResize,onDragStart:i?.onDragStart,onMouseDown:i?.onMouseDown,onClick:i?.onClick,disablePortal:i?.disablePortal,"data-testid":i?.["data-testid"]??i?.id,"data-id":i?.["data-id"]??i?.id,children:[jsx(Oe,{sidebarOpen:c$2,showPanel:z,sidebarWidth:M,panelWidth:k,sidebarResize:I.resize,panelResize:T.resize,sidebarDuration:I.duration,panelDuration:T.duration}),jsx(Fe,{toolbar:r,sidebar:s,panel:p,animationDuration:T.duration}),b?t?.isLoading?jsx(d,{appCode:t?.appCode,id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:mc({height:"auto",flexShrink:0},t?.sx)}):jsx(c$1,{services:W,serviceCode:t?.activeCode??"",onOpenService:t?.onOpen,onOpenServiceInNewWindow:t?.onOpenInNewWindow,language:t?.language??"en",openInNewWindowLabel:t?.openInNewWindowLabel??"Open in new window",id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:t?.sx}):null,jsx(g,{id:m?.id,className:m?.className,"data-testid":m?.["data-testid"]??m?.id,"data-id":m?.["data-id"]??m?.id,sx:L?void 0:m?.sx,children:L?jsx(Re,{baseWindowWidth:typeof i?.defaultSize?.width=="number"?i.defaultSize.width:void 0,sidebar:s,panel:p,content:m,bodyContent:h,sidebarOpen:c$2,showPanel:z,sidebarFullWidth:M,panelFullWidth:k,sidebarAnimation:I,panelAnimation:T}):h}),y?jsxs(h$2,{id:d$1?.id,className:d$1?.className,"data-testid":d$1?.["data-testid"]??d$1?.id,"data-id":d$1?.["data-id"]??d$1?.id,sx:d$1?.isVisible===true?mc(d$1?.sx??{},{"&:empty, &:has(> :only-child:empty)":{display:"flex"}}):d$1?.sx,children:[d$1?.children,d$1?.actions?jsx(i$1,{children:d$1.actions}):null]}):null]})]})});Be.displayName="WindowShell";var to=memo(Be);export{x as a,to as b};
|
|
1
|
+
import {h as h$1,i,b as b$1,c as c$2,f as f$2,e,d as d$1,j as j$1}from'./chunk-WRJLCKDU.js';import {f,g,h as h$2,i as i$1,b}from'./chunk-KZIIULI3.js';import {d,c as c$1}from'./chunk-VBB5WMVK.js';import {h,c,f as f$1}from'./chunk-ISC5KT5E.js';import {mc,nc}from'./chunk-Z2DUFVI5.js';import'./chunk-3M2GZVQW.js';import {memo,forwardRef,useState,useEffect,useRef}from'react';import {createPortal}from'react-dom';import oo from'@mui/material/Backdrop';import {styled,alpha}from'@mui/material/styles';import v from'@mui/material/Box';import {motion,animate}from'framer-motion';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var H="os-shared-WindowShell",x={root:`${H}-root`,sidebar:`${H}-sidebar`,body:`${H}-body`,panel:`${H}-panel`};var we=styled(v)(()=>({display:"flex",flexDirection:"row",flex:1,minHeight:0,height:"100%",backgroundColor:"transparent"})),xe=styled(v)(()=>({flexShrink:0,overflow:"hidden auto",backgroundColor:"transparent",transition:"none"})),be=styled(v)(({theme:e})=>({flexShrink:0,overflow:"hidden auto",borderLeft:`1px solid ${e.palette.divider}`,backgroundColor:"transparent",transition:"none"})),ye=styled(v)(()=>({display:"flex",flexDirection:"column",flex:1,minWidth:0,minHeight:0})),ze=styled(v,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative",width:e})),Ne=styled(motion.div)(()=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative"})),Ce=styled(motion.div,{shouldForwardProp:e=>e!=="$slotWidth"})(({$slotWidth:e})=>({width:e,minWidth:e,minHeight:"100%",height:"100%",overflow:"hidden"})),Ie=styled(v,{shouldForwardProp:e=>e!=="$visible"&&e!=="$duration"})(({$visible:e=true,$duration:o=h})=>({display:"flex",alignItems:"center",overflow:"hidden",whiteSpace:"nowrap",flexShrink:0,maxWidth:e?160:0,opacity:e?1:0,pointerEvents:e?"auto":"none",transition:o>0?`max-width ${.3*o}s ease-in-out, opacity ${.24*o}s ease-in-out`:"none"})),Te=styled(h$1,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e}:null})),Pe=styled(i,{shouldForwardProp:e=>e!=="$width"&&e!=="$justifyContent"})(({$width:e,$justifyContent:o="flex-start"})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e,justifyContent:o}:null}));var Ue=220;function ge(e,o,a){return Math.min(Math.max(e,o??0),a??1/0)}function Ae(e,o,a,n){if(Math.abs(e-o)<=1)return;let r=animate(0,1,{duration:a,onUpdate:t=>{n(s=>({...s,width:e+(o-e)*t}));}});return ()=>r.stop()}function G(e,o){if(e===false)return {duration:0,resize:o};let a=typeof e=="object"?e:void 0,n=a?.duration;return {duration:typeof n=="number"&&Number.isFinite(n)?Math.max(0,n):h,resize:a?.resize??o}}function j(e){return e?.children==null||e.expand?.isExpanded===false?false:e.expand?.isExpanded===true}function F(e,o=Ue){let a=Array.isArray(e)?e.flat():[e];for(let n=a.length-1;n>=0;n--){let r=a[n];if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&typeof r.width=="number")return r.width}return o}function Ee(e){let o=e["data-id"]??e.id;return o!=null?{"data-id":o}:{}}function Me({kind:e,slot:o,isOpen:a,fullWidth:n,wrapperWidth:r,animateWrapperWidth:t,animation:s}){let p=e==="sidebar"?xe:be,d=e==="sidebar"?x.sidebar:x.panel,m=o["data-testid"]?`${o["data-testid"]}Wrapper`:e==="sidebar"?"WindowShellSidebarWrapper":"WindowShellPanelWrapper",i=o["data-testid"]??o.id??(e==="sidebar"?"WindowShellSidebar":"WindowShellPanel"),l=Ee(o),u=jsx(p,{id:o.id,className:nc(d,o.className),"data-testid":i,...l,sx:mc({width:n,minWidth:0},o.sx),children:jsx(Ce,{$slotWidth:n,initial:false,animate:{x:a?0:-n},transition:{duration:s.duration},children:o.children})});return t?jsx(Ne,{"data-testid":m,...l,initial:false,animate:{width:r},transition:{duration:s.duration},children:u}):jsx(ze,{"data-testid":m,...l,$width:r,children:u})}Me.displayName="WindowShellSlotColumn";var J=memo(Me);function De({baseWindowWidth:e,sidebar:o,panel:a,content:n,bodyContent:r,sidebarOpen:t,showPanel:s,sidebarFullWidth:p,panelFullWidth:d,sidebarAnimation:m,panelAnimation:i}){let{size:l}=b(),u=i.resize==="window",W=typeof e=="number"?Math.max(0,e-(u?d:0)-(m.resize==="window"&&!t?p:0)):l.width,b$1=u?s?Math.min(d,Math.max(0,l.width-W)):0:s?d:0,y=t?p:0;return jsxs(we,{className:nc(x.root),children:[o?.children?jsx(J,{kind:"sidebar",slot:o,isOpen:t,fullWidth:p,wrapperWidth:y,animateWrapperWidth:true,animation:m}):null,jsx(ye,{id:n?.id?`${n.id}Body`:void 0,className:nc(x.body,n?.className),"data-testid":n?.["data-testid"]?`${n["data-testid"]}Body`:n?.id?`${n.id}Body`:"WindowShellBody",...(n?.["data-id"]??n?.id)!=null?{"data-id":n?.["data-id"]?`${n["data-id"]}Body`:`${n?.id}Body`}:null,sx:n?.sx,children:r}),a?.children?jsx(J,{kind:"panel",slot:a,isOpen:s,fullWidth:d,wrapperWidth:b$1,animateWrapperWidth:!u,animation:i}):null]})}De.displayName="WindowShellSlotsLayout";var Re=memo(De);function $e({sidebarOpen:e,showPanel:o,sidebarResize:a,panelResize:n,sidebarDuration:r,panelDuration:t}){let{size:s,setSize:p,defaultSize:d,minSize:m,maxSize:i}=b(),l=useRef(s);l.current=s;let u=useRef(d.width),W=useRef(e),b$1=useRef(o),y=useRef(d.width);return useEffect(()=>{let C=b$1.current!==o,w=W.current!==e,E=y.current!==d.width;b$1.current=o,W.current=e,y.current=d.width;let S;if(w&&a==="window"?S=r:(C&&n==="window"||E&&!C&&!w)&&(S=t),S==null)return;let h=ge(d.width,m?.width,i?.width);return u.current=h,Ae(l.current.width,h,S,p)},[d.width,o,e,a,n,r,t,m?.width,i?.width,p]),null}$e.displayName="WindowShellAnimator";var Oe=memo($e);function ve({toolbar:e$1,sidebar:o,panel:a,animationDuration:n=h}){let{title:r,titleIcon:t,onClose:s,onMinimize:p,onMaximize:d,startAdornment:m,endAdornment:i,id:l,className:u,"data-testid":W,"data-id":b$2,sx:y}=e$1??{},{isMaximized:C}=b(),w=typeof s=="function"?s:void 0,E=typeof p=="function"?p:void 0,S=typeof d=="function"?d:void 0,h=o?.expand,c=a?.expand,z=j(a),L=h?.isExpanded??true,M=h!=null&&o?.children!=null,D=c!=null&&a?.children!=null&&z,k=M&&D,V=F(a?.sx),_=o!=null?F(o.sx):0,I=Math.max(_,V),T=k&&L?I:void 0,Z=D?I:void 0,X=D;return jsxs(b$1,{id:l??f$1,className:u,"data-testid":W??l??"WindowToolbar","data-id":b$2??l,sx:y,children:[jsxs(Te,{$width:T,children:[w?jsx(c$2,{onClick:w}):null,E?jsx(f$2,{onClick:E}):null,S?jsx(e,{isMaximized:C,onClick:S}):null,M&&h?jsx(d$1,{direction:h.isExpanded??true?"left":"right",active:h.isExpanded??true,onClick:h.onExpand,children:h.label}):null,m]}),jsx(j$1,{title:r,icon:t}),jsxs(Pe,{$width:Z,$justifyContent:i?"space-between":"flex-start",children:[D?jsx(Ie,{$visible:X,$duration:n,children:jsx(d$1,{sx:{flexShrink:0},direction:c?.isExpanded??true?"left":"right",active:z,onClick:c?.onExpand,children:c?.label})}):null,i]})]})}ve.displayName="WindowShellToolbar";var Fe=memo(ve);var Be=forwardRef(function({isOpen:o,className:a,sx:n,toolbar:r,services:t,sidebar:s,panel:p,footer:d$1,content:m,window:i,backdrop:l},u){let W=t?.list??[],b=(t?.isLoading??false)||W.length>0,y=d$1!=null&&(d$1.isVisible??true),C=s?.children,w=F(s?.sx),E=p?.children,S=p!=null?F(p.sx):0,h=m?.children,c$2=s?.expand?.isExpanded??C!=null,z=j(p),L=!!(C||E),[M,D]=useState(w),[k,V]=useState(S);useEffect(()=>{c$2&&D(w),z&&V(S);},[c$2,w,z,S]);let _=r?.onClose??r?.onMinimize??(()=>{}),I=G(s?.animation,"in-place"),T=G(p?.animation,"in-place"),Z=(()=>{let P=i?.defaultSize;if(typeof P?.width!="number")return P;let oe=(I.resize==="window"&&!c$2?M:0)+(T.resize==="window"&&!z?k:0);return oe>0?{...P,width:Math.max(0,P.width-oe)}:P})(),X={height:i?.minSize?.height??i?.defaultSize?.height??c,...i?.minSize?.width!=null?{width:i.minSize.width}:null},Le=l!=null&&(l.isVisible??true)&&o&&!i?.isMinimized,_e=(i?.order??0)+10-1,ee=jsx(oo,{open:true,onClick:_,id:l?.id,className:l?.className,"data-testid":l?.["data-testid"]??l?.id??"WindowShellBackdrop",...(l?.["data-id"]??l?.id)!=null?{"data-id":l?.["data-id"]??l?.id}:null,sx:mc({zIndex:_e,backgroundColor:P=>alpha(P.palette.common.black,.3)},l?.sx)});return jsxs(Fragment,{children:[Le&&(i?.disablePortal?ee:createPortal(ee,document.body)),jsxs(f,{ref:u,isOpen:o,onClose:_,defaultSize:Z,minSize:X,maxSize:i?.maxSize,defaultPosition:i?.defaultPosition,containerRef:i?.containerRef,order:i?.order,isMinimized:i?.isMinimized,isMaximized:i?.isMaximized,id:i?.id,className:nc(x.root,i?.className,a),sx:n,onResize:i?.onResize,onDragStart:i?.onDragStart,onMouseDown:i?.onMouseDown,onClick:i?.onClick,disablePortal:i?.disablePortal,"data-testid":i?.["data-testid"]??i?.id,"data-id":i?.["data-id"]??i?.id,children:[jsx(Oe,{sidebarOpen:c$2,showPanel:z,sidebarWidth:M,panelWidth:k,sidebarResize:I.resize,panelResize:T.resize,sidebarDuration:I.duration,panelDuration:T.duration}),jsx(Fe,{toolbar:r,sidebar:s,panel:p,animationDuration:T.duration}),b?t?.isLoading?jsx(d,{appCode:t?.appCode,id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:mc({height:"auto",flexShrink:0},t?.sx)}):jsx(c$1,{services:W,serviceCode:t?.activeCode??"",onOpenService:t?.onOpen,onOpenServiceInNewWindow:t?.onOpenInNewWindow,language:t?.language??"en",openInNewWindowLabel:t?.openInNewWindowLabel??"Open in new window",id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:t?.sx}):null,jsx(g,{id:m?.id,className:m?.className,"data-testid":m?.["data-testid"]??m?.id,"data-id":m?.["data-id"]??m?.id,sx:L?void 0:m?.sx,children:L?jsx(Re,{baseWindowWidth:typeof i?.defaultSize?.width=="number"?i.defaultSize.width:void 0,sidebar:s,panel:p,content:m,bodyContent:h,sidebarOpen:c$2,showPanel:z,sidebarFullWidth:M,panelFullWidth:k,sidebarAnimation:I,panelAnimation:T}):h}),y?jsxs(h$2,{id:d$1?.id,className:d$1?.className,"data-testid":d$1?.["data-testid"]??d$1?.id,"data-id":d$1?.["data-id"]??d$1?.id,sx:d$1?.isVisible===true?mc(d$1?.sx??{},{"&:empty, &:has(> :only-child:empty)":{display:"flex"}}):d$1?.sx,children:[d$1?.children,d$1?.actions?jsx(i$1,{children:d$1.actions}):null]}):null]})]})});Be.displayName="WindowShell";var to=memo(Be);export{x as a,to as b};
|