@tap-payments/os-micro-frontend-shared 0.3.295 → 0.3.297
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-45E65P5R.js → chunk-2GYKNKWP.js} +1 -1
- package/build/_chunks/{chunk-DXDJ7ZQI.js → chunk-2HMREFM4.js} +1 -1
- package/build/_chunks/{chunk-45GQW7K7.js → chunk-2JVB4CBT.js} +1 -1
- package/build/_chunks/{chunk-IEPHBQH7.js → chunk-2OJIEX5A.js} +1 -1
- package/build/_chunks/{chunk-AJUXDLJF.js → chunk-3DVDHBR2.js} +1 -1
- package/build/_chunks/{chunk-MPIENGJC.js → chunk-4WGNULKV.js} +1 -1
- package/build/_chunks/{chunk-DJHXUNB6.js → chunk-53X3U5WT.js} +1 -1
- package/build/_chunks/{chunk-DIW7RMJY.js → chunk-5W3FKPP7.js} +1 -1
- package/build/_chunks/{chunk-2V7P76GA.js → chunk-6HNOCQKM.js} +1 -1
- package/build/_chunks/{chunk-7LWPKOGV.js → chunk-CFSPFRLR.js} +1 -1
- package/build/_chunks/{chunk-H6CKZAJN.js → chunk-CJ3XF5H7.js} +1 -1
- package/build/_chunks/{chunk-AN73YAF5.js → chunk-DCMZFHWU.js} +1 -1
- package/build/_chunks/{chunk-L4KBXHZI.js → chunk-DE3IY3MT.js} +1 -1
- package/build/_chunks/{chunk-VIIDA663.js → chunk-E5IKW34T.js} +1 -1
- package/build/_chunks/{chunk-UBMO65ZL.js → chunk-F5BIYZTP.js} +1 -1
- package/build/_chunks/{chunk-HWNPJALM.js → chunk-FREJYXH4.js} +1 -1
- package/build/_chunks/{chunk-3MRO5CJP.js → chunk-FZV63FZF.js} +1 -1
- package/build/_chunks/{chunk-NBVOXBIW.js → chunk-GZT6TVCH.js} +1 -1
- package/build/_chunks/{chunk-BDW6QQXH.js → chunk-H7V3RMFL.js} +1 -1
- package/build/_chunks/{chunk-52MTQXHO.js → chunk-I5DP4JJP.js} +1 -1
- package/build/_chunks/{chunk-OW3B34TK.js → chunk-IBZBQ24S.js} +1 -1
- package/build/_chunks/{chunk-PF6NDV3G.js → chunk-IFP6SF7C.js} +1 -1
- package/build/_chunks/{chunk-TMAA4QIY.js → chunk-IPAS7KUG.js} +1 -1
- package/build/_chunks/{chunk-2WOWP3QA.js → chunk-JECD3SUJ.js} +1 -1
- package/build/_chunks/{chunk-MBZVHLRC.js → chunk-JRXEVVE6.js} +1 -1
- package/build/_chunks/{chunk-E74Q7ILM.js → chunk-K53Y4LIP.js} +1 -1
- package/build/_chunks/{chunk-BTUNGKV3.js → chunk-KS662THD.js} +1 -1
- package/build/_chunks/{chunk-OEZIALDT.js → chunk-LDGSDPQG.js} +1 -1
- package/build/_chunks/{chunk-3LLAL7SZ.js → chunk-LLM6NHYM.js} +1 -1
- package/build/_chunks/{chunk-73SAT4RE.js → chunk-LON5JVKL.js} +1 -1
- package/build/_chunks/{chunk-XXMVSJIM.js → chunk-LQM3Z2DG.js} +1 -1
- package/build/_chunks/{chunk-7BA3JMDW.js → chunk-MPXLNM5H.js} +1 -1
- package/build/_chunks/{chunk-PVUGMA6R.js → chunk-MXFH4OXG.js} +1 -1
- package/build/_chunks/{chunk-JRQZANGX.js → chunk-MZ6XDK2C.js} +1 -1
- package/build/_chunks/{chunk-77K53QY2.js → chunk-NK2VZN5J.js} +1 -1
- package/build/_chunks/{chunk-CGGZ367Q.js → chunk-O2DVDEYE.js} +1 -1
- package/build/_chunks/{chunk-2MXRHXGS.js → chunk-O4DC2S3X.js} +1 -1
- package/build/_chunks/{chunk-NIWGDILH.js → chunk-ON73ZZC4.js} +1 -1
- package/build/_chunks/{chunk-7CT3QCVP.js → chunk-P4O6ZUHX.js} +1 -1
- package/build/_chunks/{chunk-MBZF7BHG.js → chunk-PIQOM3XU.js} +1 -1
- package/build/_chunks/{chunk-QKUEMUT3.js → chunk-R36BQKUP.js} +1 -1
- package/build/_chunks/{chunk-ZLXQBIAQ.js → chunk-RRCCQYTR.js} +1 -1
- package/build/_chunks/{chunk-2W2GZUKF.js → chunk-SFSBWZ7X.js} +1 -1
- package/build/_chunks/{chunk-DD3TYF3Y.js → chunk-TIRLOG6N.js} +1 -1
- package/build/_chunks/{chunk-ZQFDXQ4J.js → chunk-TQTPWNPP.js} +1 -1
- package/build/_chunks/{chunk-ANIJPMR3.js → chunk-TYSOX6NR.js} +1 -1
- package/build/_chunks/{chunk-YWZJZGDA.js → chunk-UIPXZKRC.js} +1 -1
- package/build/_chunks/{chunk-K67DFHSS.js → chunk-UPMCMJEB.js} +1 -1
- package/build/_chunks/{chunk-MKDL4TYN.js → chunk-VGYJZKKP.js} +1 -1
- package/build/_chunks/{chunk-3ANVVXOL.js → chunk-VI3D56OM.js} +1 -1
- package/build/_chunks/{chunk-OTG5BKW6.js → chunk-VJSBADTP.js} +1 -1
- package/build/_chunks/chunk-VRGBJY4Q.js +2 -0
- package/build/_chunks/{chunk-6X4K2W2E.js → chunk-WDPW2DRV.js} +1 -1
- package/build/_chunks/{chunk-L2PULJKK.js → chunk-WFI7MJL2.js} +1 -1
- package/build/_chunks/{chunk-BAXN7S2I.js → chunk-WO7POLIC.js} +1 -1
- package/build/_chunks/{chunk-UPUJEOOS.js → chunk-X5C35MQV.js} +1 -1
- package/build/_chunks/{chunk-UKV3UR3X.js → chunk-XGCSZNS4.js} +1 -1
- package/build/_chunks/{chunk-JZK2QZX3.js → chunk-XS7CI5J5.js} +1 -1
- package/build/_chunks/{chunk-7WMSYKS3.js → chunk-XSKYIV6B.js} +1 -1
- package/build/_chunks/{chunk-ZQ6WQPET.js → chunk-Y4RJCNYA.js} +1 -1
- package/build/_chunks/{chunk-CRSHY7OT.js → chunk-YA3JU4XB.js} +1 -1
- package/build/_chunks/{chunk-HI2JOLXL.js → chunk-YUT3GEP2.js} +1 -1
- package/build/_chunks/{chunk-F5H3U3NJ.js → chunk-YZFTHJHW.js} +1 -1
- package/build/_chunks/{chunk-LBKOWCCN.js → chunk-ZBMJOLJG.js} +1 -1
- package/build/_chunks/{chunk-N5K54WNL.js → chunk-ZFPXHFBW.js} +1 -1
- package/build/_chunks/{chunk-Q2GI76OF.js → chunk-ZWEVMVLG.js} +1 -1
- package/build/components/ActionsDropdownMenu/index.js +1 -1
- package/build/components/Alert/index.js +1 -1
- package/build/components/AreaChart/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/CardList/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/EmptyState/index.js +1 -1
- package/build/components/ErrorToast/index.js +1 -1
- package/build/components/ExpandableChip/index.js +1 -1
- package/build/components/ExportReportButton/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/index.js +1 -1
- package/build/components/FilterChip/index.js +1 -1
- package/build/components/FilterDropdown/index.js +1 -1
- package/build/components/Filters/index.js +1 -1
- package/build/components/FlipCard/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/ListLayout/index.js +1 -1
- package/build/components/Loader/index.js +1 -1
- package/build/components/Logo/index.js +1 -1
- package/build/components/MaskedText/index.js +1 -1
- package/build/components/MultiLevelMenu/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/SheetViewChip/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/TextInput/index.js +1 -1
- package/build/components/Timeline/index.js +1 -1
- package/build/components/Timepicker/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.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/constants/apps.d.ts +3 -0
- package/build/constants/index.js +1 -1
- package/build/datetime/components/DateRangeCalendar/RangeDatePicker.d.ts +4 -2
- package/build/datetime/components/DateRangeFilter/DateRangeFilter.d.ts +8 -0
- package/build/datetime/components/DateRangeFilter/index.d.ts +2 -0
- package/build/datetime/components/DateRangeFilter/style.d.ts +23 -0
- package/build/datetime/components/DateRangeFilter/types.d.ts +11 -0
- package/build/datetime/components/EmbeddedDateRangeCalendar/EmbeddedDateRangeCalendar.d.ts +8 -0
- package/build/datetime/components/EmbeddedDateRangeCalendar/index.d.ts +2 -0
- package/build/datetime/components/EmbeddedDateRangeCalendar/types.d.ts +29 -0
- package/build/datetime/components/index.d.ts +4 -0
- package/build/datetime/components/index.js +1 -1
- package/build/hooks/core/index.js +1 -1
- package/build/hooks/index.js +1 -1
- package/build/index.js +1 -1
- package/build/types/theme.d.ts +1 -0
- package/build/utils/date.d.ts +2 -3
- package/build/utils/index.js +1 -1
- package/package.json +1 -1
- package/build/_chunks/chunk-FI5H6V55.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b,a,R,Q,V,U as U$1,z,B}from'./chunk-
|
|
1
|
+
import {b,a,R,Q,V,U as U$1,z,B}from'./chunk-LLM6NHYM.js';import {Hb,Gb}from'./chunk-6HNOCQKM.js';import {c as c$1}from'./chunk-53X3U5WT.js';import {memo,forwardRef,useState,useEffect,useMemo,useCallback,Fragment as Fragment$1}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {styled,alpha}from'@mui/material/styles';var c="os-shared-FilterBar";var U={name:"offset",options:{offset:[0,4]}},o={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 Y=jsx("svg",{width:"27",height:"32",viewBox:"0 0 27 32",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children: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 _=styled("div")(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(8)})),ee=styled(b,{shouldForwardProp:e=>e!=="$isActive"&&e!=="$hasMenu"})(({theme:e,$isActive:l=false,$hasMenu:r=false})=>{let{base:d,grey:i,foreground:f}=e.v2.palette,s=e.palette.background.gradient.shadedBlue;return {fontSize:e.typography.subtitle1.fontSize,lineHeight:e.typography.subtitle1.lineHeight,fontWeight:e.v2.typography.fontWeightRegular,boxSizing:"border-box",borderRadius:e.v2.radius(50),borderWidth:e.v2.spacing(1),borderStyle:"solid",minWidth:"135.11px",height:e.v2.spacing(32),minHeight:e.v2.spacing(32),display:"flex",justifyContent:"center",alignItems:"center",gap:e.v2.spacing(8),textTransform:"none",transition:"none",WebkitTapHighlightColor:"transparent",padding:0,paddingInline:e.v2.spacing(16),[`& .${a.content}`]:{width:"100%",minWidth:0},...r&&{paddingInlineEnd:e.v2.spacing(27),overflow:"hidden",[`& .${o.labelWrapper}`]:{paddingInlineEnd:e.v2.spacing(8)}},...l?{background:s,color:d.white,"&:hover":{background:s,opacity:.8}}:{backgroundColor:d.white,borderColor:i[100],color:f.primary,"&:hover":{backgroundColor:d.white,opacity:.7}}}}),te=styled("span")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"100%"})),ne=styled("span",{shouldForwardProp:e=>e!=="$isActive"})(({theme:e,$isActive:l=false})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",gap:e.v2.spacing(4),fontWeight:l?e.v2.typography.fontWeightBolder:e.v2.typography.fontWeightRegular})),re=styled("span",{shouldForwardProp:e=>e!=="$isActive"})(({theme:e,$isActive:l=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:l?"brightness(0) invert(1)":"brightness(0) invert(0)"}})),ae=styled("span",{shouldForwardProp:e=>e!=="$isActive"})(({theme:e,$isActive:l=false})=>{let{base:r,grey:d,foreground:i}=e.v2.palette;return {position:"absolute",top:0,right:0,bottom:0,width:e.v2.spacing(27),boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center",...!l&&{boxShadow:`inset 1px 0 0 ${d[100]}`},color:l?r.white:i.secondary,transition:"background-color 0.15s ease","& svg":{display:"block",width:e.v2.spacing(27),height:e.v2.spacing(32),flexShrink:0,pointerEvents:"none"},"&:hover":{backgroundColor:alpha(r.black,.1)}}}),oe=styled(R)({[`& .${Q.panel} .menu-item+.menu-item`]:{borderTop:"none"}}),le=styled(V)(({theme:e})=>({minHeight:"36px",height:"36px",gap:e.v2.spacing(4),WebkitTapHighlightColor:"transparent",[`& .${U$1.indicator} img`]:{maxWidth:"100%",maxHeight:"100%",width:"auto",height:"auto",objectFit:"contain",display:"block"},[`& .${U$1.indicator} svg`]:{display:"block",maxWidth:"100%",maxHeight:"100%"},"&:hover":{boxShadow:"rgba(0, 0, 0, 0.15) 0px 0px 16px 0px"}}));function Ce(e,l){let{isActive:r=false,label:d,startIcon:i,badgeCount:f,onValueChange:s,id:w,className:L,sx:W,disabled:v,disableRipple:t=false}=e,a="items"in e?e.items:void 0,y="items"in e?e.defaultValue:void 0,h="items"in e?e.selectedValue:void 0,C="items"in e?void 0:e.value,[m,u]=useState(null),[$,x]=useState(void 0);useEffect(()=>{r||u(null);},[r]);let B$1=!!a?.length,T=r||h!==void 0,F=!!m,D=h??$,S=useMemo(()=>a?.find(n=>n.value===D),[D,a]),R=useMemo(()=>{if(!a?.length)return;let n=a.find(g=>g.value===y);return S?.value??n?.value??a[0].value},[y,a,S]),V=useMemo(()=>{if(i!=null)return typeof i=="function"?i(r):i;let n=S?.icon;return typeof n=="function"?n(r,true):n},[r,S,i]),de=useMemo(()=>V?jsx(re,{$isActive:r,className:o.icon,children:V}):null,[V,r]),ue=useMemo(()=>f?jsx(z,{color:r?"active":"inactive",className:o.badge,children:c$1(f)}):null,[f,r]),ce=useCallback(n=>{if(!a){s?.(C);return}if(!T){R!==void 0&&s?.(R),u(null);return}u(F?null:n.currentTarget);},[R,T,F,a,s,C]),A=useCallback(n=>{s?.(n),x(n),u(null);},[s]),pe=useCallback(()=>u(null),[]),fe=useCallback(n=>{n.key==="Escape"&&(n.stopPropagation(),u(null),m?.focus());},[m]),me=useCallback((n,g)=>{n.key!=="Enter"&&n.key!==" "||(n.preventDefault(),A(g));},[A]);return a&&!B$1?null:jsxs(Fragment,{children:[jsx(ee,{ref:l,id:w,"data-testid":w??"FilterBarButton",className:Hb(o.button,L),sx:W,variant:r?"primary":"secondary",$isActive:r,$hasMenu:B$1,disabled:v,disableRipple:t,"aria-pressed":r,"aria-haspopup":B$1?"menu":void 0,"aria-expanded":B$1?F:void 0,onClick:ce,children:jsxs(te,{className:o.labelWrapper,children:[jsxs(ne,{$isActive:r,className:o.label,children:[de,S?.label??d,ue]}),B$1&&jsx(ae,{$isActive:r,className:o.chevronSlot,children:Y})]})}),B$1&&jsxs(Fragment,{children:[jsx(B,{open:F,onClick:pe}),jsx(oe,{open:F,anchorEl:m,className:o.menu,placement:"bottom-start",modifiers:[U],panelProps:{role:"menu",onKeyDown:fe,sx:{minWidth:m?.clientWidth??133}},children:a?.map(n=>{let g=n.icon,ge=typeof g=="function"?g(r,false):g;return jsx(le,{role:"menuitem",tabIndex:0,className:o.menuItem,startAdornment:ge??null,onClick:()=>A(n.value),onKeyDown:be=>me(be,n.value),children:n.label??n.value},n.value)})})]})]})}var H=memo(forwardRef(Ce));function Me({value:e,items:l,onValueChange:r,keepInactive:d=false,renderItem:i,itemSx:f,id:s,sx:w,className:L},W){let v=useCallback(t=>r?.(t),[r]);return jsx(_,{ref:W,id:s,"data-testid":s??"FilterBar",className:Hb(o.root,L),sx:w,children:l?.map((t,a)=>{let y="items"in t?e!=null&&t.items.some(x=>x.value===e):t.value===e,h=y&&!d,C="items"in t&&y?e:void 0,m=Gb(f??{},t.itemSx),u=i?.({isActive:h,selectedValue:C,onActivate:()=>v("items"in t?t.items.find(x=>x.value===t.defaultValue)?.value??t.items[0]?.value:t.value),onDeactivate:()=>v(void 0),onSelect:v},t,a);if(u!=null)return jsx(Fragment$1,{children:u},`filter-bar-custom-${a}`);let $={isActive:h,label:t.label,startIcon:t.startIcon,badgeCount:t.badgeCount,disabled:t.disabled,disableRipple:t.disableRipple,sx:m,onValueChange:v};return "items"in t?jsx(H,{items:t.items,defaultValue:t.defaultValue,selectedValue:C,...$},`filter-bar-nested-${t.items[0]?.value??a}`):jsx(H,{value:t.value,...$},`filter-bar-single-${t.value}`)})})}var we=memo(forwardRef(Me));
|
|
2
2
|
export{o as a,we 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,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,R as R$1,V}from'./chunk-LLM6NHYM.js';import {n}from'./chunk-VJSBADTP.js';import {S,Hb,wb}from'./chunk-6HNOCQKM.js';import {Zc,Yc,jb,Fn}from'./chunk-VRGBJY4Q.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=S(),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")?Zc:Yc,alt:"dropdown",className:Hb(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);},[]),O=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:O,onContextMenu:k,className:Hb(s.tab,o&&"active",f),children:e}),jsx(R$1,{open:C,anchorEl:p,placement:"bottom-start",className:Hb(s.contextMenu),children:jsx(V,{startAdornment:null,onClick:W,className:Hb(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===Fn.reports.code||e===Fn.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 wb(u?.name??[],o??R)||""}function j(e,n){return wb(e.name,n??R)||""}function Te(e,n){return P(e).toLowerCase()===P(n).toLowerCase()}var Be=forwardRef(function({serviceCode:n$1="",services:o,onOpenService:l,onOpenServiceInNewWindow:u,language:d=R,openInNewWindowLabel:f=re,id:p,className:v,sx:C,"data-testid":L,"data-id":b},O){let[$,k]=useState(false),[W,r]=useState(0),[S,$e]=useState(false),[Ae,K]=useState(false),[Ee,{width:A}]=n(),X=useRef(null),E=useMemo(()=>Me(o,n$1,d),[o,n$1,d]);useEffect(()=>{S||r(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:O,id:p,"data-testid":L??p??"WindowServices",...(b??p)!=null?{"data-id":b??p}:null,$isDragging:$,onPointerDown:He,onPointerUp:ze,onPointerCancel:_e,className:Hb(s.root,s.bar,g$1,v),sx:C,children:jsxs(me,{ref:Ee,className:Hb(s.tabsBar),children:[!S&&jsx(we,{ref:X,className:Hb(s.tabs),children:o.map((i,H)=>jsx(Re,{name:j(i,d),code:i.code,isActive:Te(n$1,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:Hb(s.triggerLabel),children:i}),sx:{"& .MuiOutlinedInput-root.MuiList-root-MuiMenu-list":{paddingTop:"0px !important",paddingBottom:"0px !important"}},className:Hb(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:Hb(s.menuItem),children:jsx(xe,{children:z})},`option-${i.code}-${H}`)})})]})}):null});Be.displayName="WindowServices";var ao=memo(Be);var Oe=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:Hb(g.root,g$1,l),sx:u,children:jsx(ve,{className:Hb(g.rows,g.body),children:Array.from({length:pe}).map((v,C)=>jsxs(Ce,{className:Hb(g.row),children:[jsx(r,{variant:"rounded",width:32,height:32}),jsxs(Le,{children:[jsx(r,{width:80,height:12.29}),jsxs(ke,{children:[jsx(r,{width:50,height:12.29}),jsx(r,{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:Hb(g.root,g$1,l),sx:u,children:[jsxs(be,{className:Hb(g.bar),children:[jsx(r,{variant:"rounded",width:60,height:31}),jsx(r,{variant:"rounded",width:60,height:31}),jsx(r,{variant:"rounded",width:60,height:31})]}),jsx(he,{className:Hb(g.body)})]})});Oe.displayName="WindowSkeleton";var co=memo(Oe);export{s as a,g as b,ao as c,co as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {B}from'./chunk-
|
|
1
|
+
import {B}from'./chunk-LLM6NHYM.js';import {Vb,wb}from'./chunk-6HNOCQKM.js';import {Ei,Ak,ja,Xd,Vj,E,ol,C,xb}from'./chunk-VRGBJY4Q.js';import {useId,useMemo,useState,useCallback}from'react';import {useTranslation}from'react-i18next';import b from'@mui/material/Box';import V from'@mui/material/Popper';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var L=styled(b)(({theme:n})=>({background:n.palette.common.white,borderRadius:"4px",filter:"drop-shadow(0px 8px 30px rgba(0, 0, 0, 0.16))",minWidth:148,width:"max-content",marginTop:"8px"})),l=styled(b,{shouldForwardProp:n=>n!=="open"})(({theme:n,open:s})=>({display:"flex",alignItems:"center",justifyContent:"space-between",height:32,padding:"8px 8px 8px 12px",cursor:"pointer",fontSize:"11px",fontWeight:500,color:n.palette.text.primary,"&:hover":{boxShadow:n.shadows[3]},...s&&{boxShadow:n.shadows[3]}})),u=styled(b)(()=>({display:"flex",alignItems:"center",gap:"8px"})),d=styled("img")(()=>({width:16,height:16,objectFit:"contain"})),$=styled(b)(()=>({height:27,display:"flex",alignItems:"center",padding:"0 12px",fontFamily:"Tap Sans",fontWeight:500,fontSize:"11px",lineHeight:"100%",letterSpacing:"0%",color:"#8D8D94",pointerEvents:"none",userSelect:"none"}));var F={refund:ol,flag:E,viewReceipt:Vj,viewApi:Xd,capture:ja,void:Ak,clipboard:Ei};var X=({anchorEl:n,onClose:s,actions:h=[],linkedActions:M=[]})=>{let v=Vb(useId(),"actions-dropdown-menu"),{t:E}=useTranslation(),I=!!n,f=useMemo(()=>h.filter(e=>e.isShown!==false),[h]),g=useMemo(()=>M.filter(e=>e.isShown!==false),[M]);return I?jsxs(b,{id:v,"data-testid":"ActionsDropdownMenu",children:[jsx(B,{onClick:s}),jsx(V,{open:I,anchorEl:n,placement:"bottom-end",sx:{zIndex:1e3},children:jsxs(L,{children:[f.map((e,r)=>jsx(l,{onClick:p=>{p.stopPropagation(),e.onClick?.(p);},sx:r===f.length-1&&g.length>0?{borderBottom:"1px solid",borderColor:"divider"}:void 0,children:jsxs(u,{children:[jsx(d,{src:F[e.icon]??e.icon??C,alt:"action-icon"}),jsx("span",{children:e.label})]})},`direct-${r}`)),g.length>0&&jsx($,{children:E("linkedActions")}),g.map(({render:e,icon:r,label:p,onClick:T,onRightClick:i},c)=>{let m=e?.();return e&&!m?null:m?jsx(b,{children:m},`linked-${c}`):jsxs(l,{onClick:a=>{a.stopPropagation(),T?.(a),s();},onContextMenu:i?a=>{i(a);}:void 0,children:[jsxs(u,{children:[r&&jsx(d,{src:r,alt:"linked-action-icon"}),jsx("span",{children:p})]}),jsx("img",{src:xb,alt:""})]},`linked-${c}`)})]})})]}):null};var ne=({appCode:n,appIcon:s,appName:h,appInfo:M,menuItems:v})=>{let[E,I]=useState(null),f=!!E,g=useCallback(i=>{let c=i.currentTarget.firstElementChild;I(c);},[]),e=useCallback(()=>{I(null);},[]),r=useMemo(()=>v?.filter(({isShown:i=true})=>i),[v]);if(!r?.length)return null;let p=M?.iconUrl??s,T=wb(M?.name)??h;return jsxs(b,{onMouseEnter:g,onMouseLeave:e,children:[jsxs(l,{open:f,children:[jsxs(u,{children:[p&&jsx(d,{src:p,alt:"app"}),jsx("span",{children:T})]}),jsx("img",{src:xb,alt:""})]}),jsx(V,{open:f,anchorEl:E,placement:"left-start",sx:{zIndex:1301},children:jsx(L,{sx:{marginTop:0},children:r.map(({render:i,label:c,icon:m,onClick:a,onContextMenu:k},J)=>jsx(b,{children:i?.()??jsx(l,{onClick:C=>{C.stopPropagation(),a?.(C);},onContextMenu:k?C=>{k(C);}:void 0,children:jsxs(u,{children:[m&&jsx(d,{src:m,alt:"icon"}),jsx("span",{children:c})]})})},`app-${J}`))})})]})};export{X as a,ne as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {j}from'./chunk-
|
|
1
|
+
import {j}from'./chunk-LLM6NHYM.js';import {ca,Hb}from'./chunk-6HNOCQKM.js';import {forwardRef,memo}from'react';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var r="os-shared-CurrencyAmount",e={root:`${r}-root`,integer:`${r}-integer`,separator:`${r}-separator`,decimal:`${r}-decimal`};var l=styled(j)(({theme:t})=>{let{fontSize:n,fontWeight:o}=t.v2.typography.textVariants.body.small.bold;return {fontSize:n,fontWeight:o,fontFamily:"inherit",lineHeight:"inherit",letterSpacing:"inherit",color:"inherit",display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",overflow:"auto"}}),u=styled("span")(({theme:t})=>({fontWeight:t.v2.typography.fontWeightRegular}));var f=forwardRef(({amount:t,currency:n,id:o,className:C,sx:A,...d},g)=>{let{integerAmount:h,decimalAmount:s}=ca(t,n??"");return jsxs(l,{ref:g,component:"span",id:o,"data-testid":o??"CurrencyAmount",className:Hb(e.root,C),sx:A,...d,children:[jsx("span",{className:e.integer,children:h}),s?jsxs(Fragment,{children:[jsx("span",{className:e.separator,children:"."}),jsx(u,{className:e.decimal,children:s})]}):null]})});f.displayName="CurrencyAmount";var S=memo(f);export{e as a,S as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a,b,c,d,e,f,g,h,i,j,k,l,m,n}from'./chunk-
|
|
1
|
+
import {a,b,c,d,e,f,g,h,i,j,k,l,m,n}from'./chunk-VJSBADTP.js';import {$a,Qb,Rb}from'./chunk-6HNOCQKM.js';import {useEffect,useCallback,useState,useMemo}from'react';function B(){return a()}function _({value:t,delay:e}){let o=b(t??false,e);return t===void 0?void 0:o}function Y(t,e){let{setCount:o,getCount:r}=c();return useEffect(()=>{t&&o(t,e||0);},[e,t,o]),{getBadgeCount:useCallback(i=>i?r(i):void 0,[r])}}function X(t){return {isParameterSelected:(r,n)=>n?.map(i=>$a(t,r,i)),getColumnOrder:r=>{let n=t.findIndex(i=>i.name?.toLowerCase()===r?.toLowerCase());return n===-1?100:n}}}function te(t){let{isIntersecting:e}=d(t),[o,r]=useState(false);return useEffect(()=>{e!==null&&r(!e);},[e]),{showShadow:o}}function ne(){let{isDark:t,isLight:e$1}=e();return {isDark:t,isLight:e$1}}function me(){let{seconds:t,formatted:e,start:o,stop:r,reset:n}=f();return {timer:t,formattedTime:e,startTimer:i=>o(i),stopTimer:r,resetTimer:n}}var ue=t=>{let e=useMemo(()=>new Map(t.map(s=>[s.code.toLowerCase(),s])),[t]),o=useCallback(s=>e.get(s.toLowerCase()),[e]),r=useCallback(({appCode:s,serviceCode:a})=>o(s)?.app_services.find(({code:m})=>m.toLowerCase()===a.toLowerCase()),[o]),n=useCallback(({appCode:s,serviceCode:a})=>r({appCode:s,serviceCode:a})?.functions??[],[r]),i=useCallback(({appCode:s,serviceCode:a,functionCode:m})=>n({appCode:s,serviceCode:a}).find(({code:A})=>A?.toLowerCase()===m.toLowerCase()),[n]);return {getAppInfo:o,getServiceInfo:r,getServiceFunctions:n,getFunctionInfo:i}};function L(t){return g(t)}function ge(t,e){h(t,e);}var Se=(t,e)=>{let{selectedEntity:o,selectedMerchant:r,displayName:n}=useMemo(()=>{let i=e?.entities.find(m=>m.id===t?.entityId),s=i?.merchants?.find(m=>m.id===t?.merchantId),a=s?.display_name??s?.legacy_id??"Select";return {selectedEntity:i,selectedMerchant:s,displayName:a}},[e,t?.entityId,t?.merchantId]);return {selectedBrand:e,selectedEntity:o,selectedMerchant:r,displayName:n}};function ye(){let t=L("on-toast"),e=i(t);return useMemo(()=>{let o=((r,n)=>e.show(r,n));return o.success=e.success,o.error=e.error,o.loading=e.loading,o.custom=e.custom,o.dismiss=e.dismiss,o.remove=e.remove,o},[e])}var G=10;function Le({threshold:t=G,containerRef:e}={}){let{onScroll:o,measure:r,atTop:n,atBottom:i,canScrollY:s}=j({ref:e,threshold:t});return {handleScroll:useCallback(m=>{if(m){if("currentTarget"in m){o(m);return}r(m);}},[r,o]),scrolledToTop:n,scrolledToBottom:i,scrollable:s}}function ke(t={}){let{isOnline:e,isChecking:o,error:r}=k(t);return {isOnline:e,isChecking:o,error:r}}var Ke=(t={},e,o)=>{let r=Qb(t,o.requiredFilterKeys);return {columns:useMemo(()=>Rb(e,r,o),[e,r])}};function Ge(t,e){let o=useCallback(n=>{n.preventDefault(),t(),e(n);},[t,e]),r=useCallback(n=>{e(n);},[e]);return l({Enter:o,Escape:r})}function Be(){let{onScroll:t,showShadow:e}=m();return {onScrollHandler:t,showShadow:e}}function _e(){return n()}export{B as a,_ as b,Y as c,X as d,te as e,ne as f,me as g,ue as h,L as i,ge as j,Se as k,ye as l,Le as m,ke as n,Ke as o,Ge as p,Be as q,_e as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {p}from'./chunk-
|
|
1
|
+
import {p}from'./chunk-LLM6NHYM.js';import {Hb}from'./chunk-6HNOCQKM.js';import {Nj,Mj,Lj,Jj,Hj,Ij,Kj}from'./chunk-VRGBJY4Q.js';import {forwardRef,memo}from'react';import F from'lodash/startCase';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var x="os-shared-VerificationIcon",n={root:`${x}-root`,img:`${x}-img`},h=(o=>(o.Verified="verified",o.Reviewed="reviewed",o.Completed="completed",o.Incomplete="incomplete",o.Rejected="rejected",o.Closed="closed",o.Archived="archived",o))(h||{});var a={verified:Kj,reviewed:Ij,completed:Hj,incomplete:Jj,rejected:Lj,closed:Mj,archived:Nj},t={verified:"#2ACE0029",reviewed:"#11D0FA29",completed:"#11D0FA29",incomplete:"#D9D9D929",rejected:"#FF3D0029",closed:"#D9D9D929",archived:"#D9D9D929"};var G=2.3,$=styled("span",{shouldForwardProp:r=>!["$variant","$bgColor","$size"].includes(r)})(({$variant:r="default",$bgColor:c,$size:e=10.5})=>{let i=Math.round(e*G);return {display:"inline-flex",alignItems:"center",justifyContent:"center",...r==="circle"&&{width:`${i}px`,height:`${i}px`,borderRadius:"50%",backgroundColor:c||t.incomplete}}});var R=forwardRef(({className:r,sx:c,icon:e,label:i,variant:D="default",size:s=10.5,width:N,height:o,...w},S)=>{let b=a[e]||a.incomplete,B=t[e]||t.incomplete,p$1=i===null?"":i||F(e),M=N??s,P=o??s,l=jsx($,{ref:S,className:Hb(n.root,r),sx:c,"data-testid":"VerificationIcon",$variant:D,$bgColor:B,$size:s,...w,children:jsx("img",{className:n.img,loading:"lazy",src:b,alt:p$1||e,width:M,height:P})});return i===null?l:jsx(p,{title:p$1,wrapperProps:{display:"inline-flex"},children:l})});R.displayName="VerificationIcon";var E=memo(R);export{n as a,h as b,a as c,t as d,E as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {L as L$1}from'./chunk-
|
|
1
|
+
import {L as L$1}from'./chunk-LLM6NHYM.js';import {Hb}from'./chunk-6HNOCQKM.js';import {forwardRef,useRef,useState,useEffect,useCallback,memo}from'react';import y from'@mui/material/SvgIcon';import {jsxs,Fragment,jsx}from'react/jsx-runtime';import E from'@mui/material/IconButton';import G from'@mui/material/InputAdornment';import {styled}from'@mui/material/styles';var o="os-shared-SearchInput",t={root:`${o}-root`,searchAdornment:`${o}-searchAdornment`,searchButton:`${o}-searchButton`,clearButton:`${o}-clearButton`,searchIcon:`${o}-searchIcon`,clearIcon:`${o}-clearIcon`};var L=n=>jsx(y,{viewBox:"0 0 12 12",sx:{width:12,height:12},...n,children:jsx("path",{d:"M7.68817 8.21429L7.6463 8.17242L7.60036 8.20978C6.88378 8.79249 5.97154 9.14299 4.97917 9.14299C2.68489 9.14299 0.815625 7.27372 0.815625 4.97943C0.815625 2.68514 2.68489 0.815869 4.97917 0.815869C7.27345 0.815869 9.14271 2.68514 9.14271 4.97943C9.14271 5.9718 8.79221 6.88405 8.2095 7.60064L8.17215 7.64657L8.21401 7.68844L11.0754 10.5499L11.0754 10.5499L11.0764 10.5508C11.1121 10.5851 11.1406 10.6261 11.1602 10.6715C11.1798 10.7169 11.1902 10.7658 11.1907 10.8153C11.1912 10.8648 11.1818 10.9139 11.1631 10.9597C11.1444 11.0055 11.1168 11.0471 11.0818 11.0821C11.0468 11.1171 11.0052 11.1447 10.9594 11.1634C10.9136 11.1821 10.8645 11.1915 10.815 11.191C10.7655 11.1905 10.7167 11.1801 10.6712 11.1605C10.6258 11.1409 10.5848 11.1124 10.5505 11.0767L10.5496 11.0757L7.68817 8.21429ZM7.43625 7.35711L7.43682 7.35789L7.44469 7.34971C8.03496 6.73571 8.39896 5.90202 8.39896 4.97943C8.39896 3.08554 6.87305 1.55962 4.97917 1.55962C3.08528 1.55962 1.55937 3.08554 1.55937 4.97943C1.55937 6.87332 3.08528 8.39924 4.97917 8.39924C5.90175 8.39924 6.73544 8.03524 7.34944 7.44496L7.35011 7.44566L7.35683 7.43652C7.37913 7.40618 7.40591 7.37941 7.43625 7.35711Z",fill:"#20232B",stroke:"white",strokeWidth:.13125})}),g=n=>jsxs(y,{viewBox:"0 0 13 13",sx:{width:13,height:13},...n,children:[jsx("rect",{width:"13",height:"13",rx:"6.5",fill:"#F2F2F2"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.69808 4.16259C8.78018 4.16065 8.86095 4.18356 8.92981 4.22833C8.99866 4.27309 9.05239 4.33762 9.08393 4.41344C9.11548 4.48927 9.12338 4.57286 9.10659 4.65325C9.08981 4.73365 9.04911 4.80708 8.98986 4.86395L7.07755 6.77626L8.98839 8.68713L8.98986 8.68854C9.02896 8.72608 9.06018 8.77105 9.08169 8.82081C9.1032 8.87057 9.11456 8.92413 9.11511 8.97833C9.11566 9.03254 9.10539 9.08631 9.0849 9.1365C9.06441 9.18669 9.03411 9.23229 8.99578 9.27062C8.95745 9.30895 8.91185 9.33925 8.86166 9.35974C8.81147 9.38023 8.7577 9.3905 8.70349 9.38995C8.64928 9.3894 8.59573 9.37804 8.54597 9.35653C8.49621 9.33502 8.45125 9.30379 8.41371 9.26469L6.50141 7.35239L4.59054 9.26323L4.58913 9.2647C4.55159 9.30381 4.50662 9.33502 4.45685 9.35653C4.40709 9.37804 4.35354 9.3894 4.29933 9.38995C4.24513 9.3905 4.19135 9.38023 4.14116 9.35974C4.09098 9.33925 4.04538 9.30895 4.00705 9.27062C3.96872 9.23229 3.93842 9.18669 3.91793 9.1365C3.89744 9.08631 3.88717 9.03254 3.88772 8.97833C3.88827 8.92413 3.89963 8.87057 3.92114 8.82081C3.94264 8.77105 3.97388 8.7261 4.01298 8.68855L5.92528 6.77626L4.01443 4.86539L4.01339 4.86438C3.95522 4.80788 3.91524 4.73531 3.89855 4.65596C3.88186 4.5766 3.88923 4.49407 3.91971 4.41893C3.95019 4.34379 4.00239 4.27945 4.06964 4.23414C4.13689 4.18884 4.21615 4.16462 4.29722 4.1646C4.30093 4.1646 4.30464 4.16465 4.30835 4.16475C4.35906 4.16614 4.4091 4.17699 4.45589 4.19678C4.5061 4.21801 4.55154 4.24911 4.58952 4.28822L6.50141 6.20012L8.41228 4.28928L8.4137 4.2878C8.43812 4.26236 8.4655 4.24043 8.49507 4.22235C8.55578 4.18521 8.62571 4.1643 8.69808 4.16259Z",fill:"#8D8D94"})]});var v=styled(G)(({theme:n})=>({display:"flex",alignItems:"center",gap:n.v2.spacing(4),flexShrink:0,paddingTop:1})),M={padding:2,borderRadius:"50%",flexShrink:0},B=styled(E)(()=>({...M,"&.Mui-disabled":{opacity:.5}})),x=styled(E)(()=>({...M}));var N=forwardRef(({clearable:n=true,onClear:P,disabled:p=false,value:a,defaultValue:d,onChange:T,endAdornment:H,id:s="SearchInput",className:k,onKeyDown:m,inputProps:A,onClick:D,...R},c)=>{let h=useRef(null),[$,C]=useState(()=>String(a??d??"").length>0),K=n&&$&&!p;useEffect(()=>{a!==void 0&&C(String(a??"").length>0);},[a]);let F=useCallback(e=>{h.current=e,typeof c=="function"?c(e):c&&(c.current=e);},[c]),Z=e=>{C(e.target.value.length>0),T?.(e);},O=e=>{e.stopPropagation(),D?.(e);},V=useCallback(e=>{e.stopPropagation(),m?.(e);},[m]),W=e=>{e.stopPropagation();let l=h.current;l&&(Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set?.call(l,""),l.dispatchEvent(new Event("input",{bubbles:true})),l.focus()),C(false),P?.();},j=e=>{e.stopPropagation(),h.current?.focus();},I=e=>{e.preventDefault();},q=jsxs(Fragment,{children:[jsx(v,{position:"end",className:t.searchAdornment,children:K?jsx(x,{className:t.clearButton,id:s?`${s}-clear-button`:void 0,type:"button","aria-label":"Clear search",disabled:p,disableRipple:true,onMouseDown:I,onClick:W,children:jsx(g,{className:t.clearIcon})}):jsx(B,{className:t.searchButton,id:s?`${s}-search-button`:void 0,type:"button","aria-label":"Search",disabled:p,disableRipple:true,onMouseDown:I,onClick:j,children:jsx(L,{className:t.searchIcon})})}),H]});return jsx(L$1,{...R,ref:F,id:s,type:"text",disabled:p,value:a,defaultValue:d,onChange:Z,onKeyDown:V,onClick:O,inputProps:{autoComplete:"off",...A},endAdornment:q,className:Hb(t.root,k),"data-testid":"SearchInput"})});N.displayName="SearchInput";var w=memo(N);export{t as a,w as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a,d,b,c,j as j$1,e}from'./chunk-
|
|
1
|
+
import {a,d,b,c,j as j$1,e}from'./chunk-F5BIYZTP.js';import {Vb}from'./chunk-6HNOCQKM.js';import {fc,gc}from'./chunk-VRGBJY4Q.js';import {memo,useId,useState}from'react';import ee from'@mui/material/ClickAwayListener';import te from'@mui/material/Popper';import {useTranslation}from'react-i18next';import {DateObject,Calendar}from'react-multi-date-picker';import i from'@mui/material/Box';import l from'@mui/material/Button';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var O=styled(l)(()=>({minWidth:"auto",padding:0,"& > img":{cursor:"pointer"}})),z=styled(i)(()=>({position:"relative"})),H=styled(i,{shouldForwardProp:t=>t!=="open"})(({open:t,theme:e})=>({display:t?"flex":"none",flexDirection:"column",background:e.palette.common.white,boxShadow:e.shadows[9],borderRadius:e.spacing(1),top:37,color:e.palette.text.primary,fontSize:"11px",margin:"8px 0",".rmdp-calendar":{padding:"8px 16px 16px"},".rmdp-rtl *":{fontFamily:"Tajawal"},".rmdp-rtl .sd":{paddingTop:"4px"},".rmdp-wrapper":{position:"relative",borderRadius:"8px",boxShadow:"none"},".rmdp-day span":{fontSize:"11px",fontWeight:500},".rmdp-day, .rmdp-week-day":{width:40,height:40,marginBottom:"2px",padding:"4px",fontSize:"11px",color:e.palette.grey[900]},".rmdp-day-picker":{padding:0},".rmdp-day.rmdp-today span":{backgroundColor:"transparent !important",color:e.palette.info.dark},".rmdp-day.rmdp-today.end span, .rmdp-day.rmdp-today.end span":{color:e.palette.common.white},".rmdp-range, .rmdp-day:not(.rmdp-disabled):not(.rmdp-day-hidden) span:hover":{background:e.palette.info.light,boxShadow:"none",color:e.palette.grey[900]},".rmdp-range-hover.start, .rmdp-range.start, .rmdp-range-hover.end, .rmdp-range.end, .rmdp-rtl .rmdp-range-hover.start, .rmdp-rtl .rmdp-range.start, .rmdp-rtl .rmdp-range-hover.end, .rmdp-rtl .rmdp-range.end":{borderRadius:"50%",background:e.palette.background.gradient.darkShadedBlue,color:e.palette.common.white},".rmdp-range.start:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",right:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.start:after":{right:"unset",left:0},".rmdp-range.end:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",left:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.end:after":{left:"unset",right:0},".rmdp-week-day":{color:e.palette.grey[700],marginBottom:"4px",fontSize:"11px",padding:"4px"},".rmdp-header-values":{color:e.palette.grey[900],fontSize:"12px",fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px"},".rmdp-header-values span:nth-of-type(2)":{display:"none"},".rmdp-header":{padding:"4px 0",margin:0,fontSize:"12px"},".rmdp-top-class":{display:"block !important"},".rmdp-day.rmdp-selected span:not(.highlight)":{background:e.palette.info.dark},".rmdp-day.start.end":{overflow:"hidden"}})),j=styled(l,{shouldForwardProp:t=>t!=="open"})(({open:t,theme:e})=>({color:e.palette.text.primary,fontSize:"11px",fontWeight:500,padding:e.spacing(1),borderRadius:"4px",border:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,textTransform:"none",height:32,...t&&{border:"1px solid",borderColor:e.palette.info.dark,boxShadow:e.shadows[7]}})),A=styled(i)(({theme:t})=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:8,padding:"16px",borderTop:`1px solid ${t.palette.divider}`})),E=styled(l)(({theme:t})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",background:"transparent",color:t.palette.text.primary,border:"1px solid",borderColor:t.palette.divider,fontWeight:500,borderRadius:"4px","&:hover":{background:"transparent",color:t.palette.text.primary}})),Y=styled(l)(({theme:t})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",borderRadius:"4px",fontWeight:700,background:t.palette.info.dark,"&:hover":{background:t.palette.info.dark}})),F=styled(i)(()=>({display:"flex",gap:"8px"}));var ne=["Su","Mo","Tu","We","Th","Fr","Sa"];function ae({isAr:t=false,value:e$1,setValue:y,enableTimePicker:p,placement:L,sx:R,...N}){let V=Vb(useId(),"calender"),[w,k]=useState(null),[C,$]=useState(e$1?new DateObject(new Date(e$1.toLocaleString())):new DateObject(new Date)),[D,g]=useState(e$1?new DateObject(new Date(e$1.toLocaleString())):new DateObject(new Date)),q=e$1?.hour?a(e$1.hour):d(),G=e$1?.hour?b(e$1.hour):b(new Date().getHours()),[a$1,J]=useState({hour:q,minute:e$1?.minute??c(),period:G}),{t:B}=useTranslation(),u=!!w,K=r=>r==="right"?t?fc:gc:t?gc:fc,Q=r=>{k(r.currentTarget);},f=()=>{k(null);},U=()=>{let r=a$1.hour;p&&(r=e(a$1.hour,a$1.period||"AM"));let d=p?D.setHour(r).setMinute(a$1.minute):D;$(d),y&&y(d),f();},X=r=>{J(r);};return jsx(ee,{onClickAway:f,children:jsxs(z,{sx:{...R},id:V,"data-testid":"Calender",children:[jsx(j,{onClick:Q,open:u,className:"date-button",children:C.format("MMM D, YYYY")}),jsx(te,{open:u,anchorEl:w,placement:L,children:jsxs(H,{className:"calender-content",open:u,children:[jsx(Calendar,{numberOfMonths:1,format:"MMM DD YYYY",monthYearSeparator:" ",renderButton:(r,d)=>jsx(O,{onClick:d,children:jsx("img",{src:K(r),alt:"arrow"})}),onMonthChange:r=>{g(r);},onYearChange:r=>{g(r);},onChange:r=>{g(r);},weekDays:t?void 0:ne,minDate:new Date,value:C,...N}),jsxs(A,{sx:{...p&&{justifyContent:"space-between"}},children:[p&&jsx(j$1,{enableRealTimeChange:true,onChange:X,defaultTime:a$1}),jsxs(F,{children:[jsx(E,{variant:"contained",onClick:f,children:B("cancel")}),jsx(Y,{variant:"contained",onClick:U,children:B("okay")})]})]})]})})]})})}var I=memo(ae);var Te=I;export{Te as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {L,ba,aa}from'./chunk-
|
|
1
|
+
import {L,ba,aa}from'./chunk-LLM6NHYM.js';import {Vb,Xb,Gb,Hb,sa}from'./chunk-6HNOCQKM.js';import {i,j}from'./chunk-53X3U5WT.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"&&sa(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$1,inputProps:q,InputProps:G,InputLabelProps:Ce,className:J,sx:Q,id:m="TextInput",type:X,value:d,defaultValue:f,onKeyDown:b,hasThousandSeparator:n=false,...Y},u)=>{let Z=useTheme(),ee=Vb(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){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=i(T);s.current=j(h,Ie),e?.(h);};useLayoutEffect(()=>{!n||s.current==null||!x.current||(x.current.setSelectionRange(s.current,s.current),s.current=null);},[n,d]);let{isProvided:y,isVisible:oe,type:ne}=Xb(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=Gb(Gb(me,pe),Q),xe=n&&d!=null?i(String(d)):d,ye=n&&f!=null?i(String(f)):f;return jsxs(ge,{className:a.root,children:[jsx(F,{id:ee,"data-testid":"TextInput",children:jsx(L,{id:m,...Y,ref:te,type:n?"text":X,value:xe,defaultValue:ye,label:le,placeholder:se,disabled:V??ce,fullWidth:z,error:S,startAdornment:U??ae,endAdornment:_??de,readOnly:j$1??ue,inputProps:{...n?{inputMode:"decimal"}:{},...ie,...q},onKeyDown:n?o=>D(o,b):b,onChange:re,className:Hb(a.field,J),sx:fe})}),y?jsx(ba,{...l}):null,!y&&r?jsx($,{className:a.helperText,id:m?`${m}-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 {j,d,n}from'./chunk-
|
|
1
|
+
import {j,d,n}from'./chunk-LLM6NHYM.js';import {ob,Hb}from'./chunk-6HNOCQKM.js';import {Ej,Lj,Re}from'./chunk-VRGBJY4Q.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=ob(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:ob(x[0].size)})]}):null,[x]);return T&&x.length&&!S?jsxs(y,{id:d$1,"data-testid":d$1??"FileDropbox",className:Hb(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:Ej,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:Hb(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:Hb(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?Lj:Re,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 {Gb,Hb}from'./chunk-
|
|
1
|
+
import {Gb,Hb}from'./chunk-6HNOCQKM.js';import {forwardRef,useCallback,memo}from'react';import {jsxs,jsx}from'react/jsx-runtime';import {styled,alpha}from'@mui/material/styles';var u="os-shared-FilterChip",a={root:`${u}-root`,label:`${u}-label`,dismissButton:`${u}-dismissButton`,dismissIcon:`${u}-dismissIcon`},C=",",g="Dismiss filter";function L({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,p=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),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,...r?{borderWidth:0,paddingInline:`calc(${t.v2.spacing(16)} + ${p})`,background:i,color:o.white}:{borderWidth:p,borderColor:s[100],paddingInline:t.v2.spacing(16),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=C,visible:o=true,dismissible:s=true,onDismiss:n,dismissLabel:p=g,disabled:i=false,isActive:x=true,children:F,id:S,sx:R,className:w,slotProps:P,"data-testid":T},$)=>{let{label:h,dismissButton:l}=P??{},B=useCallback(f=>{f.stopPropagation(),!i&&(l?.onClick?.(f),n?.(f));},[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 N=s&&n!=null;return jsxs(k,{ref:$,id:S,"data-testid":T??S??"FilterChip",className:Hb(a.root,w),sx:Gb({},R),$disabled:i,$isActive:x,role:"status",children:[m?jsx(E,{...h,className:Hb(a.label,h?.className),sx:Gb({},h?.sx),children:m}):F,N&&jsx(_,{...l,type:"button","aria-label":l?.["aria-label"]??p,disabled:i,onClick:B,className:Hb(a.dismissButton,l?.className),sx:Gb({},l?.sx),$disabled:i,$isActive:x,children:jsx(L,{className:a.dismissIcon})})]})});A.displayName="FilterChip";var U=memo(A);export{a,C as b,g as c,U as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-L2PULJKK.js';import {a as a$1}from'./chunk-UKV3UR3X.js';import {aa,ba}from'./chunk-3LLAL7SZ.js';import {Xb,Hb}from'./chunk-2V7P76GA.js';import {forwardRef,useState,useMemo,useCallback,memo}from'react';import w from'@mui/material/Box';import {jsxs,jsx}from'react/jsx-runtime';import {styled,alpha}from'@mui/material/styles';import qe from'react-date-object';import _ from'react-date-object/calendars/arabic';import Ke from'react-date-object/calendars/gregorian';import q from'react-date-object/locales/arabic_en';import Xe from'react-date-object/locales/gregorian_en';var r={gregorian:"gregorian",hijri:"hijri"};var s="os-shared-DateInput",a={root:`${s}-root`,card:`${s}-card`,header:`${s}-header`,label:`${s}-label`,parts:`${s}-parts`,day:`${s}-day`,month:`${s}-month`,year:`${s}-year`,switcher:`${s}-switcher`,switcherLabel:`${s}-switcherLabel`,helperText:`${s}-helperText`},Ie=r.gregorian,ge="Day",De="Month",Me="Year",Se="Switch to Hijri Calendar",we="Switch to Gregorian Calendar",Ce=4,$e=8,Pe=.85,A=.55,Ve=4,S={day:52,year:72},Oe={day:44},je={day:1,month:3,year:1},ke=200,J=1900,ve=10,Fe=["January","February","March","April","May","June","July","August","September","October","November","December"],Le=["Muharram","Safar","Rabi' al-Awwal","Rabi' al-Thani","Jumada al-Awwal","Jumada al-Thani","Rajab","Sha'ban","Ramadan","Shawwal","Dhul-Qa'dah","Dhul-Hijjah"],He={day:null,month:null,year:null},vt=256,ye=30,be={height:ye,minHeight:ye,boxSizing:"border-box"},D={MenuListProps:{sx:{gap:0}},PaperProps:{sx:{maxHeight:vt,[`& .${a$1.option}`]:be,"& .MuiMenuItem-root":be}}},Ne={...D,PaperProps:{...D.PaperProps,sx:{...D.PaperProps.sx,minWidth:S.year}}};function We(e){return jsxs("svg",{width:12,height:12,viewBox:"0 0 9 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,...e,children:[jsx("path",{d:"M7.375 8.625H1.625C0.935 8.625 0.375 8.065 0.375 7.375V1.625C0.375 0.935 0.935 0.375 1.625 0.375H7.375C8.065 0.375 8.625 0.935 8.625 1.625V7.375C8.625 8.065 8.065 8.625 7.375 8.625Z",stroke:"currentColor",strokeWidth:"0.75"}),jsx("path",{d:"M0.375 2.375H8.625",stroke:"currentColor",strokeWidth:"0.75"}),jsx("circle",{cx:"2.375",cy:"4.375",r:"0.625",fill:"currentColor"}),jsx("circle",{cx:"4.5",cy:"4.375",r:"0.625",fill:"currentColor"}),jsx("circle",{cx:"6.625",cy:"4.375",r:"0.625",fill:"currentColor"}),jsx("circle",{cx:"2.375",cy:"6.625",r:"0.625",fill:"currentColor"}),jsx("circle",{cx:"4.5",cy:"6.625",r:"0.625",fill:"currentColor"})]})}var{day:Lt,month:Ht,year:Nt}=je,Re=[`& .${a.day}`,`& .${a.month}`,`& .${a.year}`].join(", "),U={boxSizing:"border-box",maxWidth:"100%",overflow:"hidden",minWidth:0},Te=styled(w)({display:"flex",flexDirection:"column",width:"100%",minWidth:0,containerType:"inline-size"}),Ye=styled(w,{shouldForwardProp:e=>!["$error","$feedbackType","$hasSwitcher","$hasFeedback"].includes(e)})(({theme:e,$error:t,$feedbackType:n,$hasSwitcher:o,$hasFeedback:l})=>{let m=(n?aa(e,n).borderColor:void 0)??(t?e.palette.error.main:e.v2.palette.grey[100]),y=`${Ce}px`,P=l?0:o?`${$e}px`:y;return {display:"flex",flexDirection:"column",width:"100%",overflow:"hidden",boxSizing:"border-box",backgroundColor:e.palette.common.white,border:`1px solid ${m}`,borderBottom:l?"none":`1px solid ${m}`,borderRadius:`${y} ${y} ${P} ${P}`,"& .MuiInputBase-root.Mui-disabled":{opacity:Pe}}}),Ge=styled(w)({display:"flex",flexDirection:"column",gap:8,padding:8,boxSizing:"border-box",width:"100%"}),Be=styled(w)({display:"flex",alignItems:"center",gap:4,minHeight:10}),ze=styled("span")(({theme:e})=>({fontSize:10,fontWeight:500,fontStyle:"normal",lineHeight:"100%",letterSpacing:0,color:e.palette.grey[700]})),Ee=styled(w)({"--date-input-day-min":`${S.day}px`,"--date-input-year-min":`${S.year}px`,display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"flex-start",gap:Ve,width:"100%",minWidth:0,boxSizing:"border-box",[`& .${a.day}`]:{...U,flex:`${Lt} 0 0`,minWidth:"var(--date-input-day-min)"},[`& .${a.month}`]:{...U,flex:`${Ht} 0 0`},[`& .${a.year}`]:{...U,flex:`${Nt} 0 0`,minWidth:"var(--date-input-year-min)"},[`${Re} .MuiFormControl-root, ${Re} .MuiInputBase-root`]:{width:"100%",maxWidth:"100%",boxSizing:"border-box"},[`& .${a.day} .MuiFormControl-root`]:{minWidth:"var(--date-input-day-min)"},[`& .${a.month} .MuiFormControl-root`]:{minWidth:0},[`& .${a.year} .MuiFormControl-root`]:{minWidth:"var(--date-input-year-min)"},[`& .${a.year} .${a$1.value}`]:{flex:"0 0 auto",minWidth:"4ch",fontVariantNumeric:"tabular-nums",textOverflow:"clip"},[`@container (max-width: ${ke}px)`]:{"--date-input-day-min":`${Oe.day}px`,[`& .${a.day}`]:{flex:"0 0 var(--date-input-day-min)"},[`& .${a.month}`]:{flex:"1 1 0"},[`& .${a.year}`]:{flex:"0 0 var(--date-input-year-min)"}}}),Ae=styled("button")(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",justifyContent:"center",width:"100%",minHeight:32,margin:0,padding:8,boxSizing:"border-box",border:"none",borderRadius:0,backgroundColor:alpha(e.palette.common.black,.05),color:e.palette.text.primary,cursor:"pointer",appearance:"none",fontFamily:"inherit",whiteSpace:"nowrap","&:hover:not(:disabled)":{backgroundColor:alpha(e.palette.common.black,.08)},"&:disabled":{cursor:"not-allowed",pointerEvents:"none"},"&:focus-visible:not(:disabled)":{outline:`2px solid ${e.palette.primary.main}`,outlineOffset:-2}})),Je=styled("span")({display:"inline-flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",gap:4,minWidth:0,whiteSpace:"nowrap"}),Ue=styled("span",{shouldForwardProp:e=>e!=="$disabled"})(({$disabled:e=false})=>({width:12,height:12,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",opacity:e?A:1,"& svg":{display:"block",width:12,height:12}})),Qe=styled("span",{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:t=false})=>({display:"block",fontSize:10,fontWeight:500,fontStyle:"normal",lineHeight:"16px",letterSpacing:0,whiteSpace:"nowrap",color:e.v2.palette.base.black,opacity:t?A:1})),Ze=styled("small",{shouldForwardProp:e=>e!=="$error"})(({theme:e,$error:t})=>({color:t?e.palette.error.main:alpha(e.palette.common.black,.6),fontSize:10,lineHeight:"10px",marginTop:4,display:"block"})),F={width:"100%",maxWidth:"100%"},_e={...F,minWidth:0};function i(e){if(e==null||e==="")return null;let t=Number(e);return Number.isFinite(t)?t:null}function et(e){return i(e.day)!=null&&i(e.month)!=null&&i(e.year)!=null}function tt(e){return {day:e.day,month:e.month.number,year:e.year}}function at(e,t){let n=i(e.day),o=i(e.month),l=i(e.year);if(n==null||o==null||l==null)return null;let u=t===r.hijri,m=new qe({year:l,month:o,day:1,calendar:u?_:Ke,locale:u?q:Xe}),y=m.month.length;return m.setDay(Math.min(Math.max(n,1),y)),m}function Z(e){let t=at(e,r.gregorian);return t?(t.convert(_,q),tt(t)):null}function Wt(e){let t=at(e,r.hijri);return t?(t.convert(Ke,Xe),tt(t)):null}function rt(e,t){return t!==r.hijri?e:Z(e)??{day:null,month:null,year:null}}function nt(e,t){return t!==r.hijri?e:Wt(e)}function Rt(e,t){return new Date(e,t,0).getDate()}function K(e,t,n){return t==null||t<1||t>12?30:n===r.hijri?e==null?30:new qe({year:e,month:t,day:1,calendar:_,locale:q}).month.length:Rt(e??2001,t)}function ot(e){let t=Math.max(1,Math.min(31,Math.floor(e)));return Array.from({length:t},(n,o)=>{let l=o+1;return {value:l,label:String(l)}})}function lt(e){return (e===r.hijri?Le:Fe).map((n,o)=>({value:o+1,label:n}))}function it(e,t){let n=Math.floor(Math.min(e,t)),o=Math.floor(Math.max(e,t)),l=[];for(let u=o;u>=n;u-=1)l.push({value:u,label:String(u)});return l}function pt(e,t){let n=Z({day:1,month:1,year:e}),o=Z({day:31,month:12,year:t});return {yearMin:i(n?.year)??e,yearMax:i(o?.year)??t}}function ut(){return new Date().getFullYear()+ve}function dt(e,t){let n=i(e.day);if(n==null)return e;let o=K(i(e.year),i(e.month),t);return n<=o?e:{...e,day:o}}function st(e){return e===r.hijri?r.gregorian:r.hijri}function ct(e){return e==null?null:Array.isArray(e)?e[0]??null:e}var mt=forwardRef(function({label:t,value:n,onChange:o,dayOptions:l,monthOptions:u,yearOptions:m,dayLabel:y=ge,monthLabel:P=De,yearLabel:xt=Me,hasCalendarSwitcher:ae=false,calendarMode:re,onCalendarModeChange:ne,switcherLabel:ft,yearMin:L=J,yearMax:yt,disabled:x=false,error:bt=false,helperText:oe,feedback:H,id:M="DateInput",className:It,sx:gt,dateInputClassNames:f},Dt){let N=n!==void 0,[Mt,St]=useState(He),W=N?n:Mt,R=re!==void 0,[wt,Ct]=useState(Ie),V=R?re:wt,[le,T]=useState(null),$t=!!(l||u||m),b=V===r.hijri&&!$t,{isProvided:ie,isVisible:pe,type:Pt}=Xb(H),ue=!!bt&&!ie,de=t?.trim()??"",se=ft??(V===r.hijri?we:Se),I=useMemo(()=>{if(!b)return W;let d=rt(W,r.hijri);return et(d)?d:le??d},[le,b,W]),Y=yt??ut(),O=useMemo(()=>b?pt(L,Y):{yearMin:L,yearMax:Y},[b,Y,L]),G=b?r.hijri:r.gregorian,ce=K(i(I.year),i(I.month),G),Vt=useMemo(()=>l??ot(ce),[ce,l]),Ot=useMemo(()=>u??lt(G),[G,u]),jt=useMemo(()=>m??it(O.yearMin,O.yearMax),[O.yearMax,O.yearMin,m]),B=useCallback(d=>{let j=l?d:dt(d,r.gregorian);N||St(j),o?.(j);},[l,N,o]),z=useCallback(d=>j=>{let E={...I,[d]:ct(j)};if(!b){B(E);return}let me=nt(E,r.hijri);if(me){T(null),B(me);return}T(E);},[B,I,b]),kt=useCallback(()=>{if(x)return;let d=st(V);T(null),R||Ct(d),ne?.(d);},[V,x,R,ne]);return jsxs(Te,{ref:Dt,id:M,"data-testid":"DateInput",className:Hb(a.root,f?.root,It),sx:gt,children:[jsxs(Ye,{className:Hb(a.card,f?.card),$error:ue,$feedbackType:pe?Pt:void 0,$hasSwitcher:ae,$hasFeedback:pe,children:[jsxs(Ge,{children:[de?jsx(Be,{className:Hb(a.header,f?.header),children:jsx(ze,{className:Hb(a.label,f?.label),children:de})}):null,jsxs(Ee,{className:Hb(a.parts,f?.parts),children:[jsx(w,{className:a.day,children:jsx(a$2,{id:`${M}-day`,label:y,options:Vt,value:I.day,onChange:z("day"),disabled:x,MenuProps:D,sx:F})}),jsx(w,{className:a.month,children:jsx(a$2,{id:`${M}-month`,label:P,options:Ot,value:I.month,onChange:z("month"),disabled:x,MenuProps:D,sx:_e})}),jsx(w,{className:a.year,children:jsx(a$2,{id:`${M}-year`,label:xt,options:jt,value:I.year,onChange:z("year"),disabled:x,MenuProps:Ne,sx:F})})]})]}),ae?jsx(Ae,{type:"button",id:`${M}-switcher`,className:Hb(a.switcher,f?.switcher),onClick:kt,disabled:x,"aria-label":se,children:jsxs(Je,{children:[jsx(Ue,{$disabled:x,children:jsx(We,{"aria-hidden":true})}),jsx(Qe,{className:Hb(a.switcherLabel,f?.switcherLabel),$disabled:x,children:se})]})}):null]}),H?jsx(ba,{...H}):null,!ie&&oe?jsx(Ze,{className:Hb(a.helperText,f?.helperText),$error:ue,children:oe}):null]})});mt.displayName="DateInput";var ht=memo(mt);
|
|
1
|
+
import {a as a$2}from'./chunk-WFI7MJL2.js';import {a as a$1}from'./chunk-XGCSZNS4.js';import {aa,ba}from'./chunk-LLM6NHYM.js';import {Xb,Hb}from'./chunk-6HNOCQKM.js';import {forwardRef,useState,useMemo,useCallback,memo}from'react';import w from'@mui/material/Box';import {jsxs,jsx}from'react/jsx-runtime';import {styled,alpha}from'@mui/material/styles';import qe from'react-date-object';import _ from'react-date-object/calendars/arabic';import Ke from'react-date-object/calendars/gregorian';import q from'react-date-object/locales/arabic_en';import Xe from'react-date-object/locales/gregorian_en';var r={gregorian:"gregorian",hijri:"hijri"};var s="os-shared-DateInput",a={root:`${s}-root`,card:`${s}-card`,header:`${s}-header`,label:`${s}-label`,parts:`${s}-parts`,day:`${s}-day`,month:`${s}-month`,year:`${s}-year`,switcher:`${s}-switcher`,switcherLabel:`${s}-switcherLabel`,helperText:`${s}-helperText`},Ie=r.gregorian,ge="Day",De="Month",Me="Year",Se="Switch to Hijri Calendar",we="Switch to Gregorian Calendar",Ce=4,$e=8,Pe=.85,A=.55,Ve=4,S={day:52,year:72},Oe={day:44},je={day:1,month:3,year:1},ke=200,J=1900,ve=10,Fe=["January","February","March","April","May","June","July","August","September","October","November","December"],Le=["Muharram","Safar","Rabi' al-Awwal","Rabi' al-Thani","Jumada al-Awwal","Jumada al-Thani","Rajab","Sha'ban","Ramadan","Shawwal","Dhul-Qa'dah","Dhul-Hijjah"],He={day:null,month:null,year:null},vt=256,ye=30,be={height:ye,minHeight:ye,boxSizing:"border-box"},D={MenuListProps:{sx:{gap:0}},PaperProps:{sx:{maxHeight:vt,[`& .${a$1.option}`]:be,"& .MuiMenuItem-root":be}}},Ne={...D,PaperProps:{...D.PaperProps,sx:{...D.PaperProps.sx,minWidth:S.year}}};function We(e){return jsxs("svg",{width:12,height:12,viewBox:"0 0 9 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,...e,children:[jsx("path",{d:"M7.375 8.625H1.625C0.935 8.625 0.375 8.065 0.375 7.375V1.625C0.375 0.935 0.935 0.375 1.625 0.375H7.375C8.065 0.375 8.625 0.935 8.625 1.625V7.375C8.625 8.065 8.065 8.625 7.375 8.625Z",stroke:"currentColor",strokeWidth:"0.75"}),jsx("path",{d:"M0.375 2.375H8.625",stroke:"currentColor",strokeWidth:"0.75"}),jsx("circle",{cx:"2.375",cy:"4.375",r:"0.625",fill:"currentColor"}),jsx("circle",{cx:"4.5",cy:"4.375",r:"0.625",fill:"currentColor"}),jsx("circle",{cx:"6.625",cy:"4.375",r:"0.625",fill:"currentColor"}),jsx("circle",{cx:"2.375",cy:"6.625",r:"0.625",fill:"currentColor"}),jsx("circle",{cx:"4.5",cy:"6.625",r:"0.625",fill:"currentColor"})]})}var{day:Lt,month:Ht,year:Nt}=je,Re=[`& .${a.day}`,`& .${a.month}`,`& .${a.year}`].join(", "),U={boxSizing:"border-box",maxWidth:"100%",overflow:"hidden",minWidth:0},Te=styled(w)({display:"flex",flexDirection:"column",width:"100%",minWidth:0,containerType:"inline-size"}),Ye=styled(w,{shouldForwardProp:e=>!["$error","$feedbackType","$hasSwitcher","$hasFeedback"].includes(e)})(({theme:e,$error:t,$feedbackType:n,$hasSwitcher:o,$hasFeedback:l})=>{let m=(n?aa(e,n).borderColor:void 0)??(t?e.palette.error.main:e.v2.palette.grey[100]),y=`${Ce}px`,P=l?0:o?`${$e}px`:y;return {display:"flex",flexDirection:"column",width:"100%",overflow:"hidden",boxSizing:"border-box",backgroundColor:e.palette.common.white,border:`1px solid ${m}`,borderBottom:l?"none":`1px solid ${m}`,borderRadius:`${y} ${y} ${P} ${P}`,"& .MuiInputBase-root.Mui-disabled":{opacity:Pe}}}),Ge=styled(w)({display:"flex",flexDirection:"column",gap:8,padding:8,boxSizing:"border-box",width:"100%"}),Be=styled(w)({display:"flex",alignItems:"center",gap:4,minHeight:10}),ze=styled("span")(({theme:e})=>({fontSize:10,fontWeight:500,fontStyle:"normal",lineHeight:"100%",letterSpacing:0,color:e.palette.grey[700]})),Ee=styled(w)({"--date-input-day-min":`${S.day}px`,"--date-input-year-min":`${S.year}px`,display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"flex-start",gap:Ve,width:"100%",minWidth:0,boxSizing:"border-box",[`& .${a.day}`]:{...U,flex:`${Lt} 0 0`,minWidth:"var(--date-input-day-min)"},[`& .${a.month}`]:{...U,flex:`${Ht} 0 0`},[`& .${a.year}`]:{...U,flex:`${Nt} 0 0`,minWidth:"var(--date-input-year-min)"},[`${Re} .MuiFormControl-root, ${Re} .MuiInputBase-root`]:{width:"100%",maxWidth:"100%",boxSizing:"border-box"},[`& .${a.day} .MuiFormControl-root`]:{minWidth:"var(--date-input-day-min)"},[`& .${a.month} .MuiFormControl-root`]:{minWidth:0},[`& .${a.year} .MuiFormControl-root`]:{minWidth:"var(--date-input-year-min)"},[`& .${a.year} .${a$1.value}`]:{flex:"0 0 auto",minWidth:"4ch",fontVariantNumeric:"tabular-nums",textOverflow:"clip"},[`@container (max-width: ${ke}px)`]:{"--date-input-day-min":`${Oe.day}px`,[`& .${a.day}`]:{flex:"0 0 var(--date-input-day-min)"},[`& .${a.month}`]:{flex:"1 1 0"},[`& .${a.year}`]:{flex:"0 0 var(--date-input-year-min)"}}}),Ae=styled("button")(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",justifyContent:"center",width:"100%",minHeight:32,margin:0,padding:8,boxSizing:"border-box",border:"none",borderRadius:0,backgroundColor:alpha(e.palette.common.black,.05),color:e.palette.text.primary,cursor:"pointer",appearance:"none",fontFamily:"inherit",whiteSpace:"nowrap","&:hover:not(:disabled)":{backgroundColor:alpha(e.palette.common.black,.08)},"&:disabled":{cursor:"not-allowed",pointerEvents:"none"},"&:focus-visible:not(:disabled)":{outline:`2px solid ${e.palette.primary.main}`,outlineOffset:-2}})),Je=styled("span")({display:"inline-flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",gap:4,minWidth:0,whiteSpace:"nowrap"}),Ue=styled("span",{shouldForwardProp:e=>e!=="$disabled"})(({$disabled:e=false})=>({width:12,height:12,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",opacity:e?A:1,"& svg":{display:"block",width:12,height:12}})),Qe=styled("span",{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:t=false})=>({display:"block",fontSize:10,fontWeight:500,fontStyle:"normal",lineHeight:"16px",letterSpacing:0,whiteSpace:"nowrap",color:e.v2.palette.base.black,opacity:t?A:1})),Ze=styled("small",{shouldForwardProp:e=>e!=="$error"})(({theme:e,$error:t})=>({color:t?e.palette.error.main:alpha(e.palette.common.black,.6),fontSize:10,lineHeight:"10px",marginTop:4,display:"block"})),F={width:"100%",maxWidth:"100%"},_e={...F,minWidth:0};function i(e){if(e==null||e==="")return null;let t=Number(e);return Number.isFinite(t)?t:null}function et(e){return i(e.day)!=null&&i(e.month)!=null&&i(e.year)!=null}function tt(e){return {day:e.day,month:e.month.number,year:e.year}}function at(e,t){let n=i(e.day),o=i(e.month),l=i(e.year);if(n==null||o==null||l==null)return null;let u=t===r.hijri,m=new qe({year:l,month:o,day:1,calendar:u?_:Ke,locale:u?q:Xe}),y=m.month.length;return m.setDay(Math.min(Math.max(n,1),y)),m}function Z(e){let t=at(e,r.gregorian);return t?(t.convert(_,q),tt(t)):null}function Wt(e){let t=at(e,r.hijri);return t?(t.convert(Ke,Xe),tt(t)):null}function rt(e,t){return t!==r.hijri?e:Z(e)??{day:null,month:null,year:null}}function nt(e,t){return t!==r.hijri?e:Wt(e)}function Rt(e,t){return new Date(e,t,0).getDate()}function K(e,t,n){return t==null||t<1||t>12?30:n===r.hijri?e==null?30:new qe({year:e,month:t,day:1,calendar:_,locale:q}).month.length:Rt(e??2001,t)}function ot(e){let t=Math.max(1,Math.min(31,Math.floor(e)));return Array.from({length:t},(n,o)=>{let l=o+1;return {value:l,label:String(l)}})}function lt(e){return (e===r.hijri?Le:Fe).map((n,o)=>({value:o+1,label:n}))}function it(e,t){let n=Math.floor(Math.min(e,t)),o=Math.floor(Math.max(e,t)),l=[];for(let u=o;u>=n;u-=1)l.push({value:u,label:String(u)});return l}function pt(e,t){let n=Z({day:1,month:1,year:e}),o=Z({day:31,month:12,year:t});return {yearMin:i(n?.year)??e,yearMax:i(o?.year)??t}}function ut(){return new Date().getFullYear()+ve}function dt(e,t){let n=i(e.day);if(n==null)return e;let o=K(i(e.year),i(e.month),t);return n<=o?e:{...e,day:o}}function st(e){return e===r.hijri?r.gregorian:r.hijri}function ct(e){return e==null?null:Array.isArray(e)?e[0]??null:e}var mt=forwardRef(function({label:t,value:n,onChange:o,dayOptions:l,monthOptions:u,yearOptions:m,dayLabel:y=ge,monthLabel:P=De,yearLabel:xt=Me,hasCalendarSwitcher:ae=false,calendarMode:re,onCalendarModeChange:ne,switcherLabel:ft,yearMin:L=J,yearMax:yt,disabled:x=false,error:bt=false,helperText:oe,feedback:H,id:M="DateInput",className:It,sx:gt,dateInputClassNames:f},Dt){let N=n!==void 0,[Mt,St]=useState(He),W=N?n:Mt,R=re!==void 0,[wt,Ct]=useState(Ie),V=R?re:wt,[le,T]=useState(null),$t=!!(l||u||m),b=V===r.hijri&&!$t,{isProvided:ie,isVisible:pe,type:Pt}=Xb(H),ue=!!bt&&!ie,de=t?.trim()??"",se=ft??(V===r.hijri?we:Se),I=useMemo(()=>{if(!b)return W;let d=rt(W,r.hijri);return et(d)?d:le??d},[le,b,W]),Y=yt??ut(),O=useMemo(()=>b?pt(L,Y):{yearMin:L,yearMax:Y},[b,Y,L]),G=b?r.hijri:r.gregorian,ce=K(i(I.year),i(I.month),G),Vt=useMemo(()=>l??ot(ce),[ce,l]),Ot=useMemo(()=>u??lt(G),[G,u]),jt=useMemo(()=>m??it(O.yearMin,O.yearMax),[O.yearMax,O.yearMin,m]),B=useCallback(d=>{let j=l?d:dt(d,r.gregorian);N||St(j),o?.(j);},[l,N,o]),z=useCallback(d=>j=>{let E={...I,[d]:ct(j)};if(!b){B(E);return}let me=nt(E,r.hijri);if(me){T(null),B(me);return}T(E);},[B,I,b]),kt=useCallback(()=>{if(x)return;let d=st(V);T(null),R||Ct(d),ne?.(d);},[V,x,R,ne]);return jsxs(Te,{ref:Dt,id:M,"data-testid":"DateInput",className:Hb(a.root,f?.root,It),sx:gt,children:[jsxs(Ye,{className:Hb(a.card,f?.card),$error:ue,$feedbackType:pe?Pt:void 0,$hasSwitcher:ae,$hasFeedback:pe,children:[jsxs(Ge,{children:[de?jsx(Be,{className:Hb(a.header,f?.header),children:jsx(ze,{className:Hb(a.label,f?.label),children:de})}):null,jsxs(Ee,{className:Hb(a.parts,f?.parts),children:[jsx(w,{className:a.day,children:jsx(a$2,{id:`${M}-day`,label:y,options:Vt,value:I.day,onChange:z("day"),disabled:x,MenuProps:D,sx:F})}),jsx(w,{className:a.month,children:jsx(a$2,{id:`${M}-month`,label:P,options:Ot,value:I.month,onChange:z("month"),disabled:x,MenuProps:D,sx:_e})}),jsx(w,{className:a.year,children:jsx(a$2,{id:`${M}-year`,label:xt,options:jt,value:I.year,onChange:z("year"),disabled:x,MenuProps:Ne,sx:F})})]})]}),ae?jsx(Ae,{type:"button",id:`${M}-switcher`,className:Hb(a.switcher,f?.switcher),onClick:kt,disabled:x,"aria-label":se,children:jsxs(Je,{children:[jsx(Ue,{$disabled:x,children:jsx(We,{"aria-hidden":true})}),jsx(Qe,{className:Hb(a.switcherLabel,f?.switcherLabel),$disabled:x,children:se})]})}):null]}),H?jsx(ba,{...H}):null,!ie&&oe?jsx(Ze,{className:Hb(a.helperText,f?.helperText),$error:ue,children:oe}):null]})});mt.displayName="DateInput";var ht=memo(mt);
|
|
2
2
|
export{r as a,a as b,ht as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {Vb,xa,Hb,Gb,ub}from'./chunk-
|
|
1
|
+
import {Vb,xa,Hb,Gb,ub}from'./chunk-6HNOCQKM.js';import {Wo,ta,ra}from'./chunk-VRGBJY4Q.js';import {forwardRef,useId,useRef,useState,useEffect,useCallback,memo}from'react';import {useTranslation}from'react-i18next';import {useForkRef}from'@mui/material/utils';import R from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var f="os-shared-SheetViewChip",r={root:`${f}-root`,chip:`${f}-chip`,text:`${f}-text`,copyButton:`${f}-copyButton`},J=2e3,K=.3;var Q=styled("div")({position:"relative",width:"fit-content",maxWidth:"100%",'[data-column-align="right"] &':{marginLeft:"auto"}}),x=styled(R,{shouldForwardProp:e=>!["chipTextColor","chipBgColor","chipBorderColor","disabled","isSelected","disableAnimation"].includes(e)})(({theme:e,isSelected:w,chipTextColor:s=e.palette.text.primary,chipBgColor:i="#EFF1F2",chipBorderColor:o="#EFF1F2",disabled:h=false,disableAnimation:y})=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",height:"18px",padding:"0px 8px",borderRadius:"30px",border:`1px solid ${o}`,backgroundColor:i,color:s,cursor:h?"not-allowed":"pointer",opacity:h?.5:1,whiteSpace:"nowrap",fontSize:"11px",minWidth:"67px",maxWidth:"none",width:"fit-content",overflow:"hidden",textOverflow:"unset",boxSizing:"border-box",...w&&{boxShadow:"white 7px 0px 8px 2px"},...y&&{transition:"none !important",animation:"none !important",transform:"none !important","& *":{transform:"none !important"}}})),L=styled(R)(()=>({gap:"4px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:1})),U=styled(R)(()=>({position:"absolute",top:0,height:"100%",width:"12px",display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center"})),Y=styled("img",{shouldForwardProp:e=>e!=="isVisible"})(({isVisible:e})=>({height:12,width:12,objectFit:"contain",opacity:e?1:0,transform:`translateX(${e?0:-5}px)`,pointerEvents:e?"auto":"none",transition:"opacity 100ms ease, transform 100ms ease"}));var oe=forwardRef(({id:e,className:w,children:s,copyText:i,copyTrigger:o="hover",animationDirection:h="right",animationDuration:y=200,disableAnimation:S=false,disabled:v=false,unknownText:ie,fullWidth:a=false,containerStyles:ne,sx:b,onClick:g,onMouseEnter:V,onMouseLeave:E,...N},k)=>{let F=Vb(useId(),"sheet-view-chip"),{t:se}=useTranslation(),$=useRef(null),re=useForkRef($,k),M=useRef(),[P,c]=useState(false),[W,A]=useState(false),p=o==="always"||P,I=p&&!!i,l=h==="left",H=Math.max(0,y),T=K*1e3,ae=p?0:T;useEffect(()=>{if(o!=="click"||!P)return;let t=me=>{$.current?.contains(me.target)||c(false);};return document.addEventListener("pointerdown",t),()=>document.removeEventListener("pointerdown",t)},[o,P]),useEffect(()=>()=>clearTimeout(M.current),[]);let pe=useCallback(t=>{o==="click"&&c(true),g?.(t);},[o,g]),le=useCallback(t=>{o==="hover"&&i&&c(true),V?.(t);},[o,i,V]),de=useCallback(t=>{o==="hover"&&c(false),E?.(t);},[o,E]),he=useCallback(t=>{t.stopPropagation(),i&&(A(true),xa(i),clearTimeout(M.current),M.current=setTimeout(()=>A(false),J));},[i]),B=Hb(r.chip,w);if(!s)return jsx(x,{...N,chipBgColor:Wo.bgColor,chipBorderColor:Wo.borderColor,chipTextColor:Wo.textColor,ref:k,id:e??F,"data-testid":"SheetViewChip",className:Hb(r.root,B),disabled:v,disableAnimation:S,onClick:g,onMouseEnter:V,onMouseLeave:E,sx:Gb(b??{},t=>({borderColor:t.palette.divider,width:a?"100%":"auto"})),children:se(ie??"unknown")});let ce=S?"none":`z-index 0ms linear ${p?0:T+H}ms`,z={zIndex:p?3:0,transition:ce};return jsxs(Q,{ref:re,id:e??F,"data-testid":"SheetViewChip",className:r.root,style:{...z,...ne,...a&&{width:"100%",minWidth:0,marginLeft:0}},children:[jsx(x,{...N,"aria-hidden":true,className:B,disabled:v,sx:Gb(b??{},{visibility:"hidden",pointerEvents:"none",width:a?"100%":"fit-content"}),children:jsx(L,{children:s})}),jsx("div",{style:{position:"absolute",top:0,...z,width:a?"100%":"max-content",left:l?"auto":0,right:l?0:"auto"},children:jsxs(x,{...N,className:B,isSelected:p,disabled:v,disableAnimation:S,onClick:pe,onMouseEnter:le,onMouseLeave:de,sx:Gb({width:a?"100%":"auto"},b),children:[jsx("div",{style:{display:"flex",gap:"4px",...a&&{maxWidth:"100%",width:"100%"},paddingRight:I&&!l?12:0,paddingLeft:I&&l?12:0,transition:`padding ${H}ms ease ${ae}ms`},children:jsx(L,{className:r.text,"data-is-arabic":typeof s=="string"&&ub(s),children:s})}),i&&jsx(U,{className:r.copyButton,sx:l?{left:"8px"}:{right:"8px"},children:jsx(Y,{isVisible:I,src:W?ta:ra,alt:W?"copied":"copy",onClick:he})})]})})]})});oe.displayName="SheetViewChip";var ye=memo(oe);export{r as a,ye as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {Hb}from'./chunk-
|
|
1
|
+
import {Hb}from'./chunk-6HNOCQKM.js';import {forwardRef,useCallback,memo}from'react';import {styled,Box,Typography,alpha}from'@mui/material';import {jsx,jsxs}from'react/jsx-runtime';var g="rgba(255, 0, 0, 1)",b={default:34,compact:24},x=2,r="os-shared-Timeline",o={root:`${r}-root`,item:`${r}-item`,indicator:`${r}-indicator`,dot:`${r}-dot`,connector:`${r}-connector`,content:`${r}-content`,title:`${r}-title`,subtitle:`${r}-subtitle`,endAdornment:`${r}-endAdornment`};var J={small:8,medium:12,large:16},I={default:12.648,compact:8},R={default:24,compact:16},w=styled(Box,{shouldForwardProp:e=>e!=="$orientation"})(({$orientation:e="vertical"})=>({display:"flex",flexDirection:e==="horizontal"?"row":"column",cursor:"default",width:"100%",textAlign:"start"})),P=styled(Box,{shouldForwardProp:e=>!["$orientation","$flip","$clickable"].includes(e)})(({$orientation:e="vertical",$flip:i=false,$clickable:t=false})=>({display:"flex",position:"relative",...e==="vertical"?{flexDirection:i?"row-reverse":"row",alignItems:"flex-start",width:"100%"}:{flexDirection:"column",flex:1,minWidth:0,paddingInlineEnd:12,"&:last-child":{flex:"0 1 auto",paddingInlineEnd:0}},cursor:t?"pointer":"default"})),L=styled(Box,{shouldForwardProp:e=>!["$orientation","$flip","$compact"].includes(e)})(({$orientation:e="vertical",$flip:i=false,$compact:t=false})=>({display:"flex",...e==="vertical"?{flexDirection:"column",position:"relative",alignItems:"center",alignSelf:"flex-start",flexShrink:0,gap:4,paddingBlock:4,...i?{marginInlineStart:t?I.compact:I.default}:{marginInlineEnd:t?I.compact:I.default}}:{flexDirection:"row",alignItems:"center",alignSelf:"stretch",gap:4,marginBottom:8}})),D=styled(Box,{shouldForwardProp:e=>e!=="colorVariant"&&e!=="dotSize"})(({theme:e,colorVariant:i="completed",dotSize:t="medium"})=>{let c=J[t],f=e.palette.info.dark,$=t==="small"?1.5:t==="large"?2.5:2,E=i==="error"?{backgroundColor:g}:i==="upcoming"?{backgroundColor:e.palette.grey[100]}:i==="current"?{backgroundColor:e.palette.common.white,border:`${$}px solid ${f}`,boxSizing:"border-box"}:{backgroundColor:f};return {width:c,height:c,borderRadius:"50%",flexShrink:0,...E}}),v=styled(Box,{shouldForwardProp:e=>!["isNextPending","connectorOrientation","$compact"].includes(e)})(({theme:e,isNextPending:i=false,connectorOrientation:t="vertical",$compact:c=false})=>({flexShrink:0,borderRadius:2,backgroundColor:i?e.palette.grey[100]:e.palette.info.dark,...t==="vertical"?{width:x,height:c?b.compact:b.default}:{height:x,flex:1,minWidth:4}})),A=styled(Box,{shouldForwardProp:e=>!["$flip","$compact","$isLast"].includes(e)})(({$flip:e=false,$compact:i=false,$isLast:t=false})=>({display:"flex",flexDirection:"column",gap:0,flex:1,...!t&&{paddingBottom:i?R.compact:R.default},...e&&{alignItems:"flex-end",textAlign:"end"}})),H=styled(Typography,{shouldForwardProp:e=>e!=="colorVariant"&&e!=="compactTitle"})(({theme:e,colorVariant:i="completed",compactTitle:t=false})=>({fontSize:t?11:12,fontWeight:700,lineHeight:t?"16px":"18.972px",...i==="error"&&{color:g},...i==="upcoming"&&{color:alpha(e.palette.text.primary,.3)}})),M=styled(Typography,{shouldForwardProp:e=>e!=="compactSubtitle"})(({theme:e,compactSubtitle:i=false})=>({fontSize:i?10:11,fontWeight:500,lineHeight:i?"14px":"14.229px",color:alpha(e.palette.text.primary,.5)})),W=styled(Box,{shouldForwardProp:e=>e!=="$clickable"})(({$clickable:e=false})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,alignSelf:"flex-start",marginInlineStart:"auto",lineHeight:0,...!e&&{cursor:"default",'& [data-testid="ChipCopyButton"]':{cursor:"pointer"}}}));function F(e,i){let t=e.id??`${e.title}-${e.subtitle??""}`;return `${i}-${t}`}function y(e,i,t){return e.status?e.status:t===void 0||i<t?"completed":i===t?"current":"upcoming"}var z=forwardRef(({items:e,activeIndex:i,orientation:t="vertical",variant:c="default",alignment:f="start",size:$="medium",hasConnector:E=true,onItemClick:T,className:B,sx:V},G)=>{let N=e,u=c==="compact",p=!!T,K=useCallback((n,l)=>s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),T?.(n,l));},[T]);return jsx(w,{ref:G,className:Hb(o.root,B),sx:V,"data-testid":"Timeline",role:"list",$orientation:t,children:N.map((n,l)=>{let s=l===N.length-1,C=y(n,l,i),j=s?"completed":y(N[l+1],l+1,i),h=f==="alternate"&&t==="vertical"&&l%2===1;return jsxs(P,{className:o.item,$orientation:t,$flip:h,$clickable:p,role:p?"button":"listitem","aria-current":C==="current"?"step":void 0,tabIndex:p?0:void 0,onClick:p?()=>T?.(n,l):void 0,onKeyDown:p?K(n,l):void 0,children:[jsxs(L,{className:o.indicator,$orientation:t,$flip:h,$compact:u,children:[n.icon??jsx(D,{className:o.dot,colorVariant:C,dotSize:$}),!s&&E&&jsx(v,{className:o.connector,isNextPending:j==="upcoming",connectorOrientation:t,$compact:u})]}),jsxs(A,{className:o.content,$flip:h,$compact:u,$isLast:s,children:[jsx(H,{className:o.title,colorVariant:C,compactTitle:u,children:n.title}),n.subtitle&&jsx(M,{className:o.subtitle,compactSubtitle:u,children:n.subtitle})]}),n.endAdornment&&jsx(W,{className:o.endAdornment,$clickable:p,onClick:q=>q.stopPropagation(),children:n.endAdornment})]},F(n,l))})})});z.displayName="Timeline";var Y=memo(z);export{g as a,b,x as c,o as d,Y as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {p}from'./chunk-
|
|
1
|
+
import {p}from'./chunk-LLM6NHYM.js';import {qa,Vb,ya as ya$1}from'./chunk-6HNOCQKM.js';import {Tk,ya,xa,wa,Qj}from'./chunk-VRGBJY4Q.js';import {memo,useId}from'react';import C from'@mui/material/Box';import O from'lodash/capitalize';import {useTranslation}from'react-i18next';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var D=styled(C,{shouldForwardProp:o=>o!=="tableMode"})(({theme:o,tableMode:t})=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4px 8px",borderRadius:"24px",border:`1px solid ${o.palette.divider}`,color:o.palette.text.primary,height:qa(t)?"18px":"24px"}));var e={DESKTOP:wa,PHONE:xa,TABLET:ya,TERMINAL:Tk};var i=o=>!!e[o];function S({type:o,isTextShown:t,tableMode:T,...E}){let p$1=Vb(useId(),"device-icon"),{t:v}=useTranslation(),m=i(o)?e[o]:null;return jsx(p,{title:m?`Device - ${ya$1((o??"").toLowerCase())}`:v("unKnown"),children:t?jsx(D,{id:p$1,"data-testid":"DeviceIcon",tableMode:T,children:o?O(o):"Unknown"}):jsx(C,{...E,id:p$1,"data-testid":"DeviceIcon",component:"img",src:o?m||Qj:Qj,alt:o})})}var b=memo(S);var X=b;export{e as a,i as b,X as c};
|