@tap-payments/os-micro-frontend-shared 0.3.303 → 0.3.304
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-PEOYN7GO.js → chunk-2CKUGHE2.js} +1 -1
- package/build/_chunks/{chunk-IM4LTXAH.js → chunk-2EZIQKEM.js} +1 -1
- package/build/_chunks/{chunk-P4S7PQWK.js → chunk-36VZZ5EB.js} +1 -1
- package/build/_chunks/{chunk-7S2LHLZC.js → chunk-3S5EXDTX.js} +1 -1
- package/build/_chunks/{chunk-4NHNAJKD.js → chunk-55225K5C.js} +1 -1
- package/build/_chunks/{chunk-6LO7PI3V.js → chunk-5YGD7JMH.js} +1 -1
- package/build/_chunks/{chunk-QLASTW76.js → chunk-5ZRFLG6Y.js} +1 -1
- package/build/_chunks/{chunk-HXJSH3G2.js → chunk-6UG2XBA6.js} +1 -1
- package/build/_chunks/{chunk-DOK4RXSY.js → chunk-774JTTY4.js} +1 -1
- package/build/_chunks/{chunk-WXWRA4VU.js → chunk-77AHJF7T.js} +1 -1
- package/build/_chunks/{chunk-F537SQRQ.js → chunk-7LPJQYOB.js} +1 -1
- package/build/_chunks/{chunk-VBGXGFX5.js → chunk-7WBXW5Q3.js} +1 -1
- package/build/_chunks/{chunk-WE7OB4CG.js → chunk-AA74HALP.js} +1 -1
- package/build/_chunks/{chunk-VRGBJY4Q.js → chunk-ASZPO74G.js} +2 -2
- package/build/_chunks/{chunk-RXCJF7BB.js → chunk-BMQXBC22.js} +1 -1
- package/build/_chunks/{chunk-L2GLBT5H.js → chunk-BVEGSDO5.js} +1 -1
- package/build/_chunks/{chunk-BM6CKUSS.js → chunk-CALJPNIH.js} +1 -1
- package/build/_chunks/{chunk-SXXIPX35.js → chunk-CHYRCXUW.js} +1 -1
- package/build/_chunks/{chunk-4IQ3J4LF.js → chunk-CQ5DDXNH.js} +1 -1
- package/build/_chunks/{chunk-VYVRCIYJ.js → chunk-CQKZVRBJ.js} +1 -1
- package/build/_chunks/{chunk-25PY6EQI.js → chunk-D54XVTCB.js} +1 -1
- package/build/_chunks/{chunk-NR5II44J.js → chunk-D7362WJB.js} +1 -1
- package/build/_chunks/{chunk-JY4U45C5.js → chunk-D7EP7AJW.js} +1 -1
- package/build/_chunks/{chunk-BFBJOTG2.js → chunk-EKTZ6Q4P.js} +1 -1
- package/build/_chunks/{chunk-DFN7XD7P.js → chunk-F7OBXENW.js} +1 -1
- package/build/_chunks/{chunk-CFZR2VK2.js → chunk-HFZZP3SE.js} +1 -1
- package/build/_chunks/{chunk-IHXFOGTQ.js → chunk-HHI47DWR.js} +1 -1
- package/build/_chunks/{chunk-6ZPNLCMN.js → chunk-HR4BT24K.js} +1 -1
- package/build/_chunks/{chunk-HIGHKQAD.js → chunk-I33G4TM7.js} +1 -1
- package/build/_chunks/{chunk-WYH4IUDI.js → chunk-IFG5ESIX.js} +1 -1
- package/build/_chunks/{chunk-26OK5BYP.js → chunk-IT5SCXJU.js} +1 -1
- package/build/_chunks/{chunk-TZZV6XFT.js → chunk-IUXW2N5T.js} +1 -1
- package/build/_chunks/{chunk-LJWTINBT.js → chunk-JYNXJIVE.js} +1 -1
- package/build/_chunks/{chunk-WM3AFXCW.js → chunk-K5NDIDS2.js} +1 -1
- package/build/_chunks/{chunk-XFEWBGH5.js → chunk-KBJFFXZH.js} +1 -1
- package/build/_chunks/{chunk-ZGVTCYRV.js → chunk-KD3LVJ3G.js} +1 -1
- package/build/_chunks/{chunk-6UMTGWFW.js → chunk-KDI46MD5.js} +1 -1
- package/build/_chunks/{chunk-N57Z6DIM.js → chunk-KRH6HCFC.js} +1 -1
- package/build/_chunks/{chunk-OHT5KJVT.js → chunk-LM7H7P3K.js} +1 -1
- package/build/_chunks/{chunk-GFEQDSYL.js → chunk-LOAX7R5C.js} +1 -1
- package/build/_chunks/{chunk-UF4J7JEY.js → chunk-M27LLU5M.js} +1 -1
- package/build/_chunks/{chunk-JSTCL624.js → chunk-M6J56JSE.js} +1 -1
- package/build/_chunks/{chunk-OBELDQWE.js → chunk-MSX235Y5.js} +1 -1
- package/build/_chunks/{chunk-SHUOO4XL.js → chunk-MTZ7W457.js} +1 -1
- package/build/_chunks/{chunk-VJSBADTP.js → chunk-N3W2IUZT.js} +1 -1
- package/build/_chunks/{chunk-THSE46VC.js → chunk-NH56G5JX.js} +1 -1
- package/build/_chunks/{chunk-K6633DSY.js → chunk-NQJLFBFK.js} +1 -1
- package/build/_chunks/{chunk-I3FJZTZ5.js → chunk-ORUY6OZP.js} +1 -1
- package/build/_chunks/{chunk-OJS6C6S6.js → chunk-P5AN3IJH.js} +1 -1
- package/build/_chunks/{chunk-GDIPXZTC.js → chunk-PVMELMUW.js} +1 -1
- package/build/_chunks/{chunk-AN56DE5R.js → chunk-QHGVMOCN.js} +1 -1
- package/build/_chunks/{chunk-76GQ37UR.js → chunk-QMS5RPGY.js} +1 -1
- package/build/_chunks/{chunk-LZKPVI6B.js → chunk-R3JWOWGR.js} +1 -1
- package/build/_chunks/{chunk-W77B5KVI.js → chunk-REM2S7IJ.js} +1 -1
- package/build/_chunks/{chunk-NOLYKMU3.js → chunk-RK62D52W.js} +1 -1
- package/build/_chunks/{chunk-53X3U5WT.js → chunk-RKLFUVFU.js} +1 -1
- package/build/_chunks/{chunk-5OC2QXZL.js → chunk-RYRN5KCF.js} +1 -1
- package/build/_chunks/{chunk-4EOSR5FI.js → chunk-SZ2NN5ZU.js} +1 -1
- package/build/_chunks/{chunk-RL2HFGDQ.js → chunk-T6YRJOHS.js} +1 -1
- package/build/_chunks/{chunk-S3EORDGB.js → chunk-UT4J5TOZ.js} +1 -1
- package/build/_chunks/{chunk-RD4DGYOQ.js → chunk-V3NXFJEQ.js} +1 -1
- package/build/_chunks/{chunk-PNLHCTCW.js → chunk-VC62IVBT.js} +1 -1
- package/build/_chunks/{chunk-57D57K75.js → chunk-VMB2PTMO.js} +1 -1
- package/build/_chunks/{chunk-MMXWSV6V.js → chunk-WCH7VAS5.js} +1 -1
- package/build/_chunks/{chunk-PPO3PSE7.js → chunk-XXIL5GPD.js} +1 -1
- package/build/_chunks/{chunk-LVK5VG43.js → chunk-YFMZVIBE.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/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/FilterButton/index.js +1 -1
- package/build/components/FilterChip/index.js +1 -1
- package/build/components/FilterPopover/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/ListHeader/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/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/StatusIcons/index.js +1 -1
- package/build/components/TableCells/index.js +1 -1
- package/build/components/TableViewToggleButton/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/index.d.ts +1 -0
- package/build/constants/index.js +1 -1
- package/build/constants/roles.d.ts +10 -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/utils/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b,E,d,j,n as n$1,F,p,B,R as R$1,r}from'./chunk-
|
|
1
|
+
import {b,E,d,j,n as n$1,F,p,B,R as R$1,r}from'./chunk-HR4BT24K.js';import {Hb,sb,eb}from'./chunk-WCH7VAS5.js';import {$e,af,Lj,_e}from'./chunk-ASZPO74G.js';import {memo,forwardRef,useState,useCallback,useMemo,useReducer,useEffect}from'react';import $ from'dayjs';import Je from'dayjs/plugin/relativeTime';import R from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var n="os-shared-ExportReportButton",t={root:`${n}-root`,trigger:`${n}-trigger`,triggerIcon:`${n}-triggerIcon`,triggerLabel:`${n}-triggerLabel`,triggerProgress:`${n}-triggerProgress`,requestRow:`${n}-requestRow`,requestRowIcon:`${n}-requestRowIcon`,requestRowLabel:`${n}-requestRowLabel`,fileList:`${n}-fileList`,fileRow:`${n}-fileRow`,fileRowIcon:`${n}-fileRowIcon`,fileRowInfo:`${n}-fileRowInfo`,fileRowName:`${n}-fileRowName`,fileRowTime:`${n}-fileRowTime`,fileRowAction:`${n}-fileRowAction`,menuFooter:`${n}-menuFooter`,loadingRow:`${n}-loadingRow`},f={trigger:$e,ready:af,failed:Lj,download:_e};$.extend(Je);var oe=e=>{let o=$(e);return o.isValid()?$().diff(o,"day")<1?o.fromNow():o.format(o.isSame($(),"year")?"DD MMM":"DD MMM, YYYY"):""},Ze=/\.(xlx|xlsx|csv|txt|doc|docx|pdf|jpg|png|gif|zip|rar)$/i,te=(e,o)=>{let p=o??`file_${new Date().toISOString().split("T")[0]}`,d=Ze.exec(e)?.[0]??".csv";return `${p}${d}`};var re={state:"idle"},ro=(e,o)=>{switch(o.type){case "LOADING":return {state:"loading"};case "SUCCESS":return {state:"success"};case "ERROR":return {state:"error"};case "RESET":return re;default:return e}},q=({onDownload:e,onError:o,fileNameFallback:p})=>{let[d,c]=useReducer(ro,re),{state:i}=d;useEffect(()=>{if(i!=="success"&&i!=="error")return;let l=setTimeout(()=>c({type:"RESET"}),3e3);return ()=>clearTimeout(l)},[i]);let m=useCallback(()=>{!e||i==="loading"||(c({type:"LOADING"}),e().then(l=>{c({type:"SUCCESS"}),eb({type:"url",url:l.url},te(l.fileName,l.downloadName??p));}).catch(l=>{c({type:"ERROR"}),o?.(l);}));},[e,o,p,i]);return {state:i,handleDownload:m}};var ie=e=>typeof e=="string"&&!e.startsWith("$")&&e!=="sx"&&e!=="theme"&&e!=="ownerState"&&e!=="as",le=styled(R)(()=>({position:"relative",display:"inline-block"})),se=styled(b,{shouldForwardProp:ie})(({theme:e,$status:o,$badge:p})=>{let{base:d,border:c,brand:i,error:m,grey:l,success:S}=e.v2.palette;return {position:"relative",height:32,minWidth:0,padding:`0 ${e.v2.spacing(8)}`,border:`1px solid ${c.default}`,borderRadius:e.v2.radius(4),backgroundColor:d.white,color:l[900],fontSize:"11px",fontWeight:500,overflow:"hidden",cursor:"pointer",...o!=="idle"&&{borderBottomColor:"transparent"},...o!=="idle"&&{borderBottomLeftRadius:0,borderBottomRightRadius:0},"&.Mui-disabled":{opacity:1,border:`1px solid ${c.default}`,backgroundColor:d.white,color:l[900]},...p&&{"&:after":{content:'""',width:7,height:7,borderRadius:"50%",position:"absolute",top:5,right:6,border:`1px solid ${d.white}`,backgroundColor:p==="failed"?m[500]:S[700]}},'&[aria-expanded="true"]':{borderColor:i[500],boxShadow:`0px 0px 4px 0px ${alpha(i[500],.5)}`}}}),P=styled(R,{shouldForwardProp:ie})(({theme:e,$status:o})=>({position:"absolute",bottom:0,right:0,left:0,overflow:"hidden",lineHeight:0,[`& .${E.root}`]:{height:2,minHeight:2,minWidth:0,padding:0,borderRadius:0,background:"transparent",display:"block"},[`& .${E.fill}`]:{height:2,minHeight:2,minWidth:0,maxWidth:"none",padding:0,borderRadius:0,display:"block",backgroundColor:o==="ready"?e.v2.palette.success[700]:o==="failed"?e.v2.palette.error[500]:e.v2.palette.brand[500]},[`& .${E.text}`]:{display:"none"}})),ae=styled(R)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(8),height:32,padding:`${e.v2.spacing(4)} ${e.v2.spacing(8)}`,borderBottom:`1px solid ${e.v2.palette.border.default}`,cursor:"pointer","&:hover":{boxShadow:e.v2.elevation[200]}})),pe=styled(d)(()=>({width:16,height:16,objectFit:"contain",flexShrink:0,display:"block"})),de=styled(j)(()=>({fontSize:"11px",fontWeight:400,lineHeight:1.1,textTransform:"uppercase"})),ce=styled(R)(({theme:e})=>({borderTop:`2px solid ${e.v2.palette.border.default}`})),ue=styled(R)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(8),padding:"5.5px 8px",minHeight:48,height:"auto",borderBottom:`1px solid ${e.v2.palette.border.default}`,cursor:"pointer","&:hover":{boxShadow:e.v2.elevation[200]}})),Re=styled(d)(()=>({width:16,height:16,objectFit:"contain",flexShrink:0,display:"block"})),me=styled(R)(()=>({display:"flex",flexDirection:"column",gap:"2px",minWidth:0,flex:1})),fe=styled(j)(({theme:e})=>({fontSize:"11px",fontWeight:500,lineHeight:1.2,color:e.v2.palette.grey[900],wordBreak:"break-all",paddingInlineEnd:e.v2.spacing(8)})),ge=styled(j)(({theme:e})=>({fontSize:"9px",fontWeight:600,lineHeight:1.2,color:e.v2.palette.grey[500]})),xe=styled(R)(()=>({display:"flex",alignItems:"center",flexShrink:0})),we=styled(R)(({theme:e})=>({backgroundColor:alpha(e.v2.palette.grey[100],.5),backdropFilter:e.v2.blur[2],color:e.v2.palette.grey[900],fontSize:"11px",fontWeight:500,height:31,textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",overflow:"hidden",borderBottomLeftRadius:e.v2.radius(4),borderBottomRightRadius:e.v2.radius(4)})),ye=styled(R)(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",gap:e.v2.spacing(8),padding:e.v2.spacing(8)}));function io({item:e,onDownloadReport:o,onDownloadError:p,renderIcon:d$1,formatDate:c}){let{state:i,handleDownload:m}=q({onDownload:o?()=>o(e.id):void 0,onError:p,fileNameFallback:e.id}),l=i==="loading"?jsx(n$1,{size:14}):i==="success"?jsx(d,{src:f.ready,alt:"downloaded"}):i==="error"?jsx(d,{src:f.failed,alt:"download failed"}):jsx(d,{src:f.download,alt:"download report",onClick:m});return jsxs(ue,{className:t.fileRow,children:[d$1?d$1(e):jsx(Re,{src:e.fileIconSrc??sb(e.fileName),alt:"report file",className:t.fileRowIcon}),jsxs(me,{className:t.fileRowInfo,children:[jsx(fe,{className:t.fileRowName,children:e.fileName}),jsx(ge,{className:t.fileRowTime,children:(c??oe)(e.createdAt)})]}),jsx(xe,{className:t.fileRowAction,children:l})]})}var he=memo(io);function so(){return jsxs(ye,{className:t.loadingRow,children:[jsx(r,{width:"16px",height:"16px",variant:"rectangular"}),jsx(r,{width:"100%",variant:"text"}),jsx(r,{width:"12px",height:"12px",variant:"circular"})]})}var A=memo(so);function co({row:e,onSelect:o}){let p=e.icon===void 0?jsx(pe,{src:sb(`file.${e.id}`),alt:`${e.id} file`,className:t.requestRowIcon}):e.icon;return jsxs(ae,{onClick:o,className:t.requestRow,children:[p,jsx(de,{className:t.requestRowLabel,children:e.label})]})}var be=memo(co);var go=[{id:"csv",label:"CSV"}],ve=forwardRef(({status:e="idle",progress:o=0,badge:p$1=null,reports:d$1,isLoadingReports:c=false,triggerIcon:i,loadingLabel:m,readyLabel:l,failedLabel:S,requestRows:Ne,renderMenuHeader:O,onDownloadReport:Fe,onDownloadError:Ie,renderReportIcon:Ce,formatReportDate:$e,footer:h,menuPlacement:Pe="bottom-end",menuProps:De,onMenuOpen:W,tooltipTitle:k,id:H,className:Te,sx:ke,...Le},qe)=>{let[z,U]=useState(null),E=!!z,Me=useCallback(s=>{e==="loading"||e==="ready"||(W?.(),U(s.currentTarget));},[e,W]),x=useCallback(()=>{U(null);},[]),Ae=useCallback(s=>{x(),s.onSelect?.();},[x]),Oe=useCallback(s=>{s.stopPropagation(),h?.onClick?.(),x();},[x,h]),{placement:We,sx:b,modifiers:y,...He}=De??{},ze=We??Pe,Ue=useMemo(()=>[{width:208,boxShadow:"0px 8px 30px 0px rgba(0, 0, 0, 0.16)"},...Array.isArray(b)?b:[b]],[b]),_e=useMemo(()=>{let s=[{name:"offset",options:{offset:[0,8]}}];if(!y)return s;let L=Array.isArray(y)?y:[y];return L.some(Qe=>Qe?.name==="offset")?L:[...s,...L]},[y]),Ge=Math.min(100,Math.max(0,o)),Ye=i===void 0?jsx(d,{src:f.trigger,alt:"reports"}):i,Ve=Ne??go,je=e==="loading"?jsxs(Fragment,{children:[jsx(n$1,{size:14}),m!=null?jsx("span",{className:t.triggerLabel,children:m}):null,jsx(P,{$status:e,className:t.triggerProgress,children:jsx(F,{value:Ge})})]}):e==="ready"?jsxs(Fragment,{children:[jsx(d,{src:f.ready,alt:"ready"}),l!=null?jsx("span",{className:t.triggerLabel,children:l}):null,jsx(P,{$status:e,className:t.triggerProgress,children:jsx(F,{value:100})})]}):e==="failed"?jsxs(Fragment,{children:[jsx(d,{src:f.failed,alt:"failed"}),S!=null?jsx("span",{className:t.triggerLabel,children:S}):null,jsx(P,{$status:e,className:t.triggerProgress,children:jsx(F,{value:100})})]}):Ye,_=jsx(se,{variant:"secondary",onClick:Me,"aria-haspopup":"menu","aria-expanded":E,$status:e,$badge:e==="idle"?p$1:void 0,className:t.trigger,children:je}),Xe=k!=null&&k!==false?jsx(p,{title:k,...E?{open:false}:{},children:_}):_,Ke=c||(d$1?.length??0)>0;return jsxs(le,{ref:qe,id:H,"data-testid":H??"ExportReportButton",className:Hb(t.root,Te),sx:ke,...Le,children:[Xe,E&&jsx(B,{onClose:x}),jsxs(R$1,{open:E,anchorEl:z,placement:ze,sx:Ue,modifiers:_e,...He,children:[O?O({closeMenu:x}):Ve.map(s=>jsx(be,{row:s,onSelect:()=>Ae(s)},s.id)),Ke?jsx(ce,{className:t.fileList,children:c?jsxs(Fragment,{children:[jsx(A,{}),jsx(A,{})]}):d$1?.map(s=>jsx(he,{item:s,onDownloadReport:Fe,onDownloadError:Ie,renderIcon:Ce,formatDate:$e},s.id))}):null,h!=null?jsx(we,{onClick:Oe,className:t.menuFooter,children:h.label}):null]})]})});ve.displayName="ExportReportButton";var xo=memo(ve);export{t as a,q as b,xo as c};
|
|
@@ -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-BMQXBC22.js';import {fc,gc}from'./chunk-ASZPO74G.js';import {memo,useState}from'react';import Z from'@mui/material/ClickAwayListener';import _ from'@mui/material/Popper';import {useTranslation}from'react-i18next';import {DateObject,Calendar}from'react-multi-date-picker';import l from'@mui/material/Box';import s from'@mui/material/Button';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var j=styled(s)(()=>({minWidth:"auto",padding:0,"& > img":{cursor:"pointer"}})),z=styled(l)(()=>({position:"relative"})),H=styled(l,{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"}})),W=styled(s,{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]}})),R=styled(l)(({theme:t})=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:8,padding:"16px",borderTop:`1px solid ${t.palette.divider}`})),A=styled(s)(({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}})),E=styled(s)(({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}})),Y=styled(l)(()=>({display:"flex",gap:"8px"}));var re=["Su","Mo","Tu","We","Th","Fr","Sa"];function oe({id:t="date-picker",isAr:e$1=false,value:o,setValue:D,enableTimePicker:d$1,placement:L,sx:I,...N}){let[y,w]=useState(null),[P,V]=useState(o?new DateObject(new Date(o.toLocaleString())):new DateObject(new Date)),[T,u]=useState(o?new DateObject(new Date(o.toLocaleString())):new DateObject(new Date)),$=o?.hour?a(o.hour):d(),q=o?.hour?b(o.hour):b(new Date().getHours()),[p,G]=useState({hour:$,minute:o?.minute??c(),period:q}),{t:C}=useTranslation(),f=!!y,J=r=>r==="right"?e$1?fc:gc:e$1?gc:fc,K=r=>{w(r.currentTarget);},x=()=>{w(null);},Q=()=>{let r=p.hour;d$1&&(r=e(p.hour,p.period||"AM"));let i=d$1?T.setHour(r).setMinute(p.minute):T;V(i),D&&D(i),x();},U=r=>{G(r);};return jsx(Z,{onClickAway:x,children:jsxs(z,{sx:{...I},id:t,"data-testid":"DatePicker",children:[jsx(W,{onClick:K,open:f,className:"date-picker-button",children:P.format("MMM D, YYYY")}),jsx(_,{open:f,anchorEl:y,placement:L,children:jsxs(H,{className:"date-picker-popover",open:f,children:[jsx(Calendar,{numberOfMonths:1,format:"MMM DD YYYY",monthYearSeparator:" ",renderButton:(r,i)=>jsx(j,{onClick:i,children:jsx("img",{src:J(r),alt:"arrow"})}),onMonthChange:r=>{u(r);},onYearChange:r=>{u(r);},onChange:r=>{u(r);},weekDays:e$1?void 0:re,minDate:new Date,value:P,...N}),jsxs(R,{sx:{...d$1&&{justifyContent:"space-between"}},children:[d$1&&jsx(j$1,{enableRealTimeChange:true,onChange:U,defaultTime:p}),jsxs(Y,{children:[jsx(A,{variant:"contained",onClick:x,children:C("cancel")}),jsx(E,{variant:"contained",onClick:Q,children:C("okay")})]})]})]})})]})})}var F=memo(oe);var ae=F;export{F as a,ae as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d as d$1}from'./chunk-
|
|
1
|
+
import {d as d$1}from'./chunk-HR4BT24K.js';import {Hb,Gb}from'./chunk-WCH7VAS5.js';import {t,s}from'./chunk-ASZPO74G.js';import {forwardRef,memo}from'react';import {styled}from'@mui/material/styles';import {jsx,Fragment}from'react/jsx-runtime';var d="os-shared-CurrencySymbol",m={root:`${d}-root`,masked:`${d}-masked`},u={SAR:s,AED:t};var k=styled(d$1)({width:"auto",height:10}),C=styled("span")(({$symbol:o,$fontSize:e,$color:r})=>({display:"inline-block",height:e,width:e,backgroundColor:r,maskImage:`url("${o}")`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:`url("${o}")`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}));var g=forwardRef(({currency:o,fontSize:e,color:r,alt:n,id:t,className:y,sx:i},x)=>{let a=o!=null?u[o]:void 0;return a?r?jsx(C,{id:t,"data-testid":t??"CurrencySymbol",role:"img","aria-label":n??o,$symbol:a,$fontSize:e,$color:r,className:Hb(m.masked,y),sx:i}):jsx(k,{ref:x,id:t,"data-testid":t??"CurrencySymbol",src:a,alt:n??o??"",className:Hb(m.root,y),sx:Gb(e!=null?{height:e}:{},i)}):jsx(Fragment,{children:o})});g.displayName="CurrencySymbol";var M=memo(g);export{m as a,M as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d}from'./chunk-
|
|
1
|
+
import {d}from'./chunk-HR4BT24K.js';import {Gb,Hb}from'./chunk-WCH7VAS5.js';import {Pj,j,m}from'./chunk-ASZPO74G.js';import {forwardRef,memo}from'react';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var x="os-shared-CountryFlag",a={root:`${x}-root`};var p=styled(d)({width:"auto",height:"auto"});var f=forwardRef(({countryCode:o,currencyCode:t,width:y=16,height:i,alt:u,id:s,className:F,sx:C},c)=>jsx(p,{ref:c,id:s,"data-testid":s??"CountryFlag",src:o&&j(o)||t&&m(t)||Pj,alt:u??o??t??"flag",loading:"lazy",onError:d=>{d.currentTarget.src=Pj;},className:Hb(a.root,F),sx:Gb({width:y,height:i},C)}));f.displayName="CountryFlag";var P=memo(f);export{a,P as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {n,j,k,l,h,f,b,g,i,m as m$1,c,e,d}from'./chunk-
|
|
1
|
+
import {n,j,k,l,h,f,b,g,i,m as m$1,c,e,d}from'./chunk-IFG5ESIX.js';import {X,V,W,Y,k as k$1,a,O,Q,b as b$1,_,P,R,S,T,U,F,m,$,I,G,H,Z,L,M,ba as ba$1,aa,c as c$1,J,K,N}from'./chunk-QMS5RPGY.js';import {ba}from'./chunk-HR4BT24K.js';import {Xb,Hb,Gb}from'./chunk-WCH7VAS5.js';import {forwardRef,useState,useCallback,useMemo,memo}from'react';import pe from'@mui/material/Box';import At from'@mui/material/InputLabel';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function Nt({endAdornmentProp:h,isLoading:o,showClear:S,showMenuArrow:i,menuOpen:b,ClearIconComponent:c=$,ChevronIconComponent:u=aa,onClear:p,onClearDefault:R}){if(!h&&!S&&!o&&!i)return null;let m=C=>{C.preventDefault(),C.stopPropagation(),p?p():R();};return jsxs(pe,{className:Hb("Select-endAdornmentRoot",o&&"Select-endAdornmentRoot--loading"),component:"span",children:[h,o?jsx(pe,{component:"span",className:"Select-menuTriggerIcon Select-menuTriggerIcon--loading","aria-hidden":true,children:jsx(ba$1,{})}):null,!o&&S?jsx(pe,{component:"button",className:"Select-clearIconButton","data-select-clear":"",type:"button",tabIndex:0,"aria-label":"Clear selection",onMouseDown:m,onClick:m,children:jsx(c,{})}):null,!o&&i?jsx(pe,{component:"span",className:`Select-menuTriggerIcon${b?" Select-menuTriggerIcon-open":""}`,"aria-hidden":true,children:jsx(u,{})}):null]})}var Et=forwardRef(function({isMultiple:o=false,options:S,value:i,onChange:b,label:c="",disabled:u,required:p,hasError:R=false,helperText:m,feedback:C,showClearIcon:K=false,ClearIconComponent:me,ChevronIconComponent:q,onClear:Q,isLoading:F,MenuProps:j$1,children:ye,id:z="Select",className:J,open:w,onOpen:X$1,onClose:k$1,name:Y$1,inputProps:P,endAdornment:Z,renderValue:D,valueAlignment:_},g){let[fe,ee]=useState(false),I=w??fe,x=!!(u||F),{isProvided:te,isVisible:T,type:le}=Xb(C),L=`${z}-label`,B=Array.isArray(i)?i:i!=null?[i]:[],V$1=useCallback((t,$)=>{$?X$1?.(t):k$1?.(t),w===void 0&&ee($);},[X$1,k$1,w]),ne=t=>{t.button===0&&(m$1(t)||t.target.closest('.MuiSelect-select[role="combobox"]')||x||(t.preventDefault(),t.stopPropagation(),V$1(t,!I)));},oe=t=>{m$1(t)||t.target.closest('.MuiSelect-select[role="combobox"]')||(t.preventDefault(),t.stopPropagation());},ae=t=>{let ce=t.target.value.map(A=>S.find(W=>j(W)===A||String(W.value)===String(A))).filter(A=>A!=null);b?.(ce);},re=jsx(Nt,{endAdornmentProp:Z,isLoading:!!F,showClear:K&&n(i)&&!x,showMenuArrow:!F,menuOpen:I,ClearIconComponent:me,ChevronIconComponent:q,onClear:Q,onClearDefault:()=>b?.(o?[]:null)}),H=o?B.map(j):j(B[0]??null);return jsxs(X,{$hasFeedback:T,onMouseDown:ne,onClick:oe,children:[jsxs(V,{variant:"filled",required:p,className:J,children:[jsx(At,{id:L,children:c}),jsx(W,{multiple:o,ref:g,value:H,error:R&&!T,feedbackType:le,hasFeedback:T,valueAlignment:_,disableUnderline:true,required:p,hasLabel:!!c.trim(),labelId:L,id:z,name:Y$1,open:I,onOpen:t=>V$1(t,true),onClose:t=>{k(t)||o&&l(t)||V$1(t,false);},onChange:o?ae:void 0,renderValue:D,inputProps:P,disabled:x,IconComponent:()=>null,autoWidth:false,endAdornment:re,MenuProps:j$1,children:ye})]}),te?jsx(ba,{...C}):m!=null&&m!==""?jsx(Y,{children:m}):null]})}),Pe=Et;function Rt({options:h,maxVisibleValues:o,valueAlignment:S=m}){let b$1=typeof o=="number"&&Number.isFinite(o)?Math.max(0,Math.floor(o)):h.length,c=h.slice(0,b$1),u=h.length-c.length,p=c.map(b).join(", ");return jsxs(L,{className:a.values,$valueAlignment:S,children:[jsx(M,{className:a.value,children:p}),u>0?jsxs(N,{className:a.valueOverflow,children:["+",u," more"]}):null]})}var Ct=Rt;var vt=forwardRef(function({options:o,isMultiple:S$1=false,hasCheckbox:i$1,maxVisibleValues:b$2,value:c$2,onChange:u,label:p,placeholder:R$1,disabled:m$1,required:C,error:K$1=false,helperText:me,feedback:q,hasClearIcon:Q$1=false,ClearIconComponent:F$1,ChevronIconComponent:j,SearchIconComponent:ye,onClear:z,isLoading:J$1,isSearchable:w=false,searchPlaceholder:X,hasSelectionSummary:k=false,hasSelectedCheckmark:Y=false,valueAlignment:P$1=m,menuDirection:Z$1=k$1,MenuProps:D,children:_$1,id:g$1="Select",className:fe,sx:ee,selectClassNames:I$1,inputRef:x,open:te,onOpen:T$1,onClose:le,name:L$1,inputProps:B,endAdornment:V,renderValue:ne,renderOption:oe},ae){let[re,H$1]=useState(""),[t,$$1]=useState(Z$1),[ce,A]=useState(void 0),W=p??"",Ae=R$1??"",Ne=me??void 0,Ee=X??b$1,Mt=ye??_,Re=i$1??S$1,y=useMemo(()=>h(o),[o]),ke=Hb(a.root,I$1?.root,fe),De=useMemo(()=>f(D,t,ce),[D,t,ce]),Te=e$1=>{let s=c(e$1);s?.width&&A(s.width),$$1(e({preferred:Z$1,anchorRect:s,menuMaxHeight:d(D,w,k),gapPx:c$1})),T$1?.(e$1);},N=w?re.toLowerCase().trim():"",Le=e=>!N||b(e).toLowerCase().includes(N),Be=e=>oe?jsx(J,{className:a.option,$customLayout:true,children:oe(e)}):jsx(J,{className:a.option,children:jsx(K,{title:b(e),children:b(e)})}),wt=useMemo(()=>N?y.filter(e=>b(e).toLowerCase().includes(N)):y,[y,N]),It=!!N&&wt.length===0,se=()=>{u?.(S$1?[]:null),z?.();},He=w?jsx(O,{className:a.search,disableGutters:true,"data-select-menu-search":"",onMouseDown:g,onClick:g,onKeyDown:g,children:jsx(Q,{placeholder:Ee,value:re,onChange:e=>H$1(e.target.value),onMouseDown:g,onClick:g,onKeyDown:e=>e.stopPropagation(),onKeyUp:e=>e.stopPropagation(),disableUnderline:true,fullWidth:true,inputProps:{"aria-label":Ee,onMouseDown:g,onClick:g},endAdornment:jsx(Mt,{})})}):null,$e=It?jsx(P,{disableGutters:true,onMouseDown:g,onClick:g,children:"No results found"}):null;if(S$1){let e=Array.isArray(c$2)?c$2:[],s=y.filter(l=>e.some(f=>f===l.value||String(f)===String(l.value))),U$1=s.length,Ft=k&&U$1>0?jsx(R,{className:a.summary,disableGutters:true,disableSticky:true,"data-select-menu-keep-open":"",onMouseDown:g,onClick:g,onKeyDown:g,children:jsxs(S,{children:[jsxs(T,{children:[U$1," selected"]}),jsx(U,{type:"button",variant:"text",disableRipple:true,"aria-label":"Clear all selected options",onMouseDown:l=>{l.preventDefault(),l.stopPropagation(),se();},onClick:l=>{l.preventDefault(),l.stopPropagation(),se();},children:"Clear"})]})}):null;return jsx(F,{id:g$1,"data-testid":g$1??"Select",className:ke,sx:Gb(ee??{}),children:jsxs(Pe,{ref:x??ae,isMultiple:true,id:g$1,className:Hb(a.field,I$1?.field),options:y,value:s,onChange:l=>{u?.(Array.isArray(l)?l.map(f=>f.value):[]);},label:W,disabled:m$1,required:C,hasError:K$1,helperText:Ne,feedback:q,showClearIcon:Q$1,ClearIconComponent:F$1??$,ChevronIconComponent:j,onClear:se,isLoading:J$1,MenuProps:De,open:te,onOpen:Te,onClose:l=>{H$1(""),le?.(l);},name:L$1,inputProps:B,endAdornment:V,valueAlignment:P$1,renderValue:()=>s.length>0?jsx(Ct,{options:s,maxVisibleValues:b$2,valueAlignment:P$1}):Ae,children:[_$1,He,Ft,$e,y.map(l=>{let f=e.some(Ue=>Ue===l.value||String(Ue)===String(l.value)),We=Be(l);return jsx(I,{value:String(l.value),disabled:l.disabled,$selected:f,$hidden:!Le(l),className:a.option,onMouseDown:g,onClick:g,children:Re?jsxs(G,{children:[jsx(H,{checked:f,$mutedRect:f&&l.disabled,tabIndex:-1,disableRipple:true}),We]}):jsxs(Fragment,{children:[We,Y&&f?jsx(Z,{}):null]})},l.id)})]})})}let Ot=Array.isArray(c$2)?c$2[0]??null:c$2??null,O$1=i(y,Ot);return jsx(F,{id:g$1,"data-testid":g$1??"Select",className:ke,sx:Gb(ee??{}),children:jsxs(Pe,{ref:x??ae,id:g$1,className:Hb(a.field,I$1?.field),options:y,value:O$1,onChange:e=>{u?.(e==null||Array.isArray(e)?null:e.value);},label:W,disabled:m$1,required:C,hasError:K$1,helperText:Ne,feedback:q,showClearIcon:Q$1,ClearIconComponent:F$1??$,ChevronIconComponent:j,onClear:se,isLoading:J$1,MenuProps:De,open:te,onOpen:Te,onClose:e=>{H$1(""),le?.(e);},name:L$1,inputProps:B,endAdornment:V,valueAlignment:P$1,renderValue:()=>{if(!O$1)return Ae;if(ne)return ne(O$1);let e=b(O$1);return jsx(L,{className:a.values,$valueAlignment:P$1,children:jsx(M,{className:a.value,title:e,children:e})})},children:[_$1,He,$e,y.map(e=>{let s=O$1!=null&&(O$1.value===e.value||String(O$1.value)===String(e.value)),U=Be(e);return jsx(I,{value:String(e.value),disabled:e.disabled,$selected:s,$hidden:!Le(e),onMouseDown:g,onClick:()=>u?.(e.value),className:a.option,children:Re?jsxs(G,{children:[jsx(H,{checked:s,tabIndex:-1,disableRipple:true}),U]}):jsxs(Fragment,{children:[U,Y&&s?jsx(Z,{}):null]})},e.id)})]})})});vt.displayName="Select";var Lt=memo(vt);export{Lt as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {p as p$1}from'./chunk-
|
|
1
|
+
import {p as p$1}from'./chunk-HR4BT24K.js';import {Vb}from'./chunk-WCH7VAS5.js';import {b}from'./chunk-RKLFUVFU.js';import {ob}from'./chunk-ASZPO74G.js';import {useId}from'react';import {useTranslation}from'react-i18next';import {styled}from'@mui/material';import {motion}from'framer-motion';import {jsx,jsxs}from'react/jsx-runtime';var p=t=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:t*39,transition:{duration:.3,type:"tween",ease:"easeOut"}}}),s=styled(motion.span)(({order:t})=>({zIndex:(t||0)+1}));var g=({children:t})=>jsx("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"2px"},children:t});function x({value:t,index:o}){let m=Vb(useId(),"rating-count"),{t:d}=useTranslation();return jsx(p$1,{title:d("totalPaymentCount",{amount:b(t)}),wrapperProps:{display:"inline-flex"},children:jsx(s,{id:m,order:o,variants:p(o),"data-testid":"RatingCount",children:jsxs(g,{children:[jsx("img",{src:ob,alt:"star",style:{width:"10px",height:"10px"}})," ",(t||0)>1&&jsx("span",{style:{fontSize:"9.782px"},children:t})]})})})}export{x as a};
|