@tap-payments/os-micro-frontend-shared 0.3.219-test.2-test.4 → 0.3.219-test.25
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-IRYRPNQZ.js → chunk-2CJVCAXX.js} +1 -1
- package/build/_chunks/{chunk-TGWIC62V.js → chunk-2F2CDDIY.js} +1 -1
- package/build/_chunks/{chunk-MOFWTHBX.js → chunk-2M6NVUO2.js} +1 -1
- package/build/_chunks/{chunk-HCO33BCV.js → chunk-2W6DRA3Q.js} +1 -1
- package/build/_chunks/{chunk-XX5Q5MBU.js → chunk-4JUIJMPG.js} +1 -1
- package/build/_chunks/{chunk-B5EVH3FW.js → chunk-4KGKI636.js} +1 -1
- package/build/_chunks/{chunk-BN5OZACX.js → chunk-4S6WI63T.js} +1 -1
- package/build/_chunks/{chunk-EHHY7NAU.js → chunk-54A35TA5.js} +1 -1
- package/build/_chunks/{chunk-NHNYMEO4.js → chunk-54IPIBZU.js} +1 -1
- package/build/_chunks/{chunk-UBHPOQSK.js → chunk-57GPEKOQ.js} +1 -1
- package/build/_chunks/{chunk-7JTOHX7G.js → chunk-5AW5C7Y3.js} +1 -1
- package/build/_chunks/{chunk-VJPODV3I.js → chunk-5FZNDN55.js} +1 -1
- package/build/_chunks/{chunk-IARFCKXQ.js → chunk-5G6VELYF.js} +1 -1
- package/build/_chunks/{chunk-K223QU64.js → chunk-5IZHUI5O.js} +1 -1
- package/build/_chunks/{chunk-VWFJNIS6.js → chunk-5QMN72FQ.js} +1 -1
- package/build/_chunks/{chunk-2ZTDZMQV.js → chunk-6RBCAS5D.js} +1 -1
- package/build/_chunks/{chunk-7DF4OCNS.js → chunk-7777KKVK.js} +1 -1
- package/build/_chunks/chunk-7BYF3Z4D.js +1 -0
- package/build/_chunks/{chunk-2GIBPPKW.js → chunk-A3VOJ3G2.js} +1 -1
- package/build/_chunks/{chunk-RXZVFV7R.js → chunk-AXHX5JVO.js} +1 -1
- package/build/_chunks/{chunk-IQRA43OV.js → chunk-C6NWRLGZ.js} +1 -1
- package/build/_chunks/{chunk-NQ7BU6UU.js → chunk-DACWW6BH.js} +1 -1
- package/build/_chunks/{chunk-7Y422WAK.js → chunk-DAPXKY53.js} +1 -1
- package/build/_chunks/{chunk-3F5ATMQB.js → chunk-EJJIHLPX.js} +1 -1
- package/build/_chunks/{chunk-45YGTVZP.js → chunk-EVERBYTO.js} +1 -1
- package/build/_chunks/{chunk-DILJTXAK.js → chunk-FKKKLMWE.js} +1 -1
- package/build/_chunks/{chunk-FCQZSF6C.js → chunk-FYEOUWRV.js} +1 -1
- package/build/_chunks/{chunk-YRQ3E36X.js → chunk-GJQV65J5.js} +1 -1
- package/build/_chunks/{chunk-SRYFBQ3L.js → chunk-HKFQ5R7G.js} +1 -1
- package/build/_chunks/{chunk-BBR3H3KM.js → chunk-HLCUTB2C.js} +1 -1
- package/build/_chunks/{chunk-OFUQV2S7.js → chunk-IBXMT55Y.js} +1 -1
- package/build/_chunks/{chunk-CPXC2HIM.js → chunk-IISCFGS5.js} +1 -1
- package/build/_chunks/{chunk-DTQFVATX.js → chunk-JE74VGU3.js} +1 -1
- package/build/_chunks/{chunk-RDK2KF63.js → chunk-KF4KQSVJ.js} +1 -1
- package/build/_chunks/{chunk-DSKS3MZK.js → chunk-KK2O6IKJ.js} +1 -1
- package/build/_chunks/{chunk-DNVGTZES.js → chunk-KWNPF24A.js} +1 -1
- package/build/_chunks/{chunk-2ZC24DCN.js → chunk-L64U7PL5.js} +1 -1
- package/build/_chunks/{chunk-32QJM33C.js → chunk-LAS7B4J7.js} +1 -1
- package/build/_chunks/{chunk-ZL23AW36.js → chunk-LT7P7S46.js} +1 -1
- package/build/_chunks/{chunk-NUN7SFUM.js → chunk-LUXFXRJY.js} +1 -1
- package/build/_chunks/{chunk-EBY66HDS.js → chunk-M67YJKZO.js} +1 -1
- package/build/_chunks/{chunk-BIY6O5KE.js → chunk-MJXBFHYN.js} +1 -1
- package/build/_chunks/{chunk-OHP3DSFR.js → chunk-NVDV5DDI.js} +1 -1
- package/build/_chunks/{chunk-NE7LDEJD.js → chunk-O3FQUJLZ.js} +1 -1
- package/build/_chunks/chunk-OY44HMKS.js +1 -0
- package/build/_chunks/{chunk-DF7YGDHF.js → chunk-PRAJNMZZ.js} +1 -1
- package/build/_chunks/{chunk-4KBICMEZ.js → chunk-PVEQLSLG.js} +1 -1
- package/build/_chunks/{chunk-32FV6NCN.js → chunk-QJ2GL3UO.js} +1 -1
- package/build/_chunks/{chunk-KU2GYOVJ.js → chunk-QM55E5LM.js} +1 -1
- package/build/_chunks/{chunk-LSKSOVDA.js → chunk-RLPTTN4A.js} +1 -1
- package/build/_chunks/chunk-RLTFJOMW.js +2 -0
- package/build/_chunks/{chunk-74FYV7XE.js → chunk-RVCKXM5W.js} +1 -1
- package/build/_chunks/{chunk-STSV7NAV.js → chunk-RW5XIEV7.js} +1 -1
- package/build/_chunks/{chunk-RNECVM7G.js → chunk-RXFAHGFK.js} +1 -1
- package/build/_chunks/{chunk-S7DGEHY2.js → chunk-SDVASEF5.js} +1 -1
- package/build/_chunks/{chunk-WUVLXFRD.js → chunk-SH6HUOLY.js} +1 -1
- package/build/_chunks/{chunk-SIPE5HWZ.js → chunk-SRCVKMIR.js} +1 -1
- package/build/_chunks/{chunk-CSKIZJMP.js → chunk-TEAJLXYP.js} +1 -1
- package/build/_chunks/{chunk-SFJXGJ6O.js → chunk-THUYFQWT.js} +1 -1
- package/build/_chunks/{chunk-YIZ2SJ2R.js → chunk-TOX7XAZB.js} +1 -1
- package/build/_chunks/{chunk-JK3V4FT5.js → chunk-TQPCGPSE.js} +1 -1
- package/build/_chunks/{chunk-GHCK3XPZ.js → chunk-TTBOB4JP.js} +1 -1
- package/build/_chunks/chunk-VFRJFEIJ.js +1 -0
- package/build/_chunks/{chunk-AB3JAJHF.js → chunk-VSRRBENQ.js} +1 -1
- package/build/_chunks/{chunk-XIUJHYEE.js → chunk-WBIMGETF.js} +1 -1
- package/build/_chunks/{chunk-CYONSJOA.js → chunk-WZWGFPMD.js} +1 -1
- package/build/_chunks/{chunk-5VZHYPFP.js → chunk-X3U4OCIT.js} +1 -1
- package/build/_chunks/{chunk-DIOBCQQT.js → chunk-XCYJMEZF.js} +1 -1
- package/build/_chunks/{chunk-FVQ3OAN4.js → chunk-XIWYWUHC.js} +1 -1
- package/build/_chunks/{chunk-KNCLMG4I.js → chunk-XWAD6GON.js} +1 -1
- package/build/_chunks/{chunk-7LVTTKBG.js → chunk-YHEFOHGA.js} +1 -1
- package/build/_chunks/{chunk-GYFZ73GR.js → chunk-ZFIS5GCE.js} +1 -1
- package/build/components/ActionsDropdownMenu/index.js +1 -1
- package/build/components/ActiveFilterChip/index.js +1 -1
- package/build/components/AmountInput/index.js +1 -1
- package/build/components/AnimatedSpinnerIcon/index.js +1 -1
- package/build/components/AnimatedSpinnerIcon/style.d.ts +1 -1
- package/build/components/AppServices/index.js +1 -1
- package/build/components/AppServicesBar/index.js +1 -1
- package/build/components/AppWindowWrapper/index.js +1 -1
- package/build/components/AreaChart/index.js +1 -1
- package/build/components/Autocomplete/index.js +1 -1
- package/build/components/BrandLogo/index.js +1 -1
- package/build/components/Calender/index.js +1 -1
- package/build/components/ChipStack/index.js +1 -1
- package/build/components/ColorPicker/index.js +1 -1
- package/build/components/ColumnViews/index.js +1 -1
- package/build/components/ColumnViews/styles.d.ts +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/CurrencyAmount/index.js +1 -1
- package/build/components/CurrencySymbol/index.js +1 -1
- package/build/components/CustomBackdrop/index.js +1 -1
- package/build/components/Customer/index.js +1 -1
- package/build/components/DateFilter/DateFilter.d.ts +15 -6
- package/build/components/DateFilter/index.js +1 -1
- package/build/components/DeviceIcon/index.js +1 -1
- package/build/components/Discount/index.js +1 -1
- package/build/components/DisplayAmount/index.js +1 -1
- package/build/components/DropdownMenu/index.js +1 -1
- package/build/components/EmptyState/index.js +1 -1
- package/build/components/Error/index.js +1 -1
- package/build/components/ErrorToast/index.js +1 -1
- package/build/components/ExpandableSideBar/index.js +1 -1
- package/build/components/FileInputPreview/index.js +1 -1
- package/build/components/FilePreview/index.js +1 -1
- package/build/components/FileUpload/index.js +1 -1
- package/build/components/FileUploader/index.js +1 -1
- package/build/components/FilterDropdown/index.js +1 -1
- package/build/components/Filters/index.js +1 -1
- package/build/components/FlippingCard/index.js +1 -1
- package/build/components/FlippingCard/style.d.ts +1 -1
- package/build/components/HeatMap/index.js +1 -1
- package/build/components/IconWithBadge/index.js +1 -1
- package/build/components/ImageWrapper/ImageWrapper.d.ts +2 -2
- package/build/components/InputBase/index.js +1 -1
- package/build/components/Inputs/index.js +1 -1
- package/build/components/JSONViewer/components/JSONSearchBar/styles.d.ts +4 -4
- package/build/components/JSONViewer/index.js +1 -1
- package/build/components/JSONViewer/style.d.ts +2 -2
- package/build/components/LeftPeekRightExpandingChip/index.js +1 -1
- package/build/components/LeftPeekRightExpandingChip/style.d.ts +3 -3
- package/build/components/ListColumnFilter/index.js +1 -1
- package/build/components/ListHeader/index.js +1 -1
- package/build/components/ListHeader/types.d.ts +15 -4
- package/build/components/ListLayout/index.js +1 -1
- package/build/components/Loader/index.js +1 -1
- package/build/components/MFWidgetLoader/index.js +1 -1
- package/build/components/MaskedText/index.js +1 -1
- package/build/components/MerchantCurrencyDropdown/index.js +1 -1
- package/build/components/MerchantLogo/index.js +1 -1
- package/build/components/MerchantsDropdown/index.js +1 -1
- package/build/components/NestedDropdown/index.js +1 -1
- package/build/components/NestedMultiSelect/index.js +1 -1
- package/build/components/OpenFileInNewTab/index.js +1 -1
- package/build/components/PaymentSourceFilter/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/RFH/index.js +1 -1
- package/build/components/RHFInput/index.js +1 -1
- package/build/components/RHFPhoneInput/index.js +1 -1
- package/build/components/RHFSwitch/index.js +1 -1
- package/build/components/RadioGroup/index.js +1 -1
- package/build/components/RangeCalender/RangeCalender.d.ts +1 -1
- package/build/components/RangeCalender/components/Timezone/Timezone.d.ts +6 -6
- package/build/components/RangeCalender/components/Timezone/components/EntitiesTimezone.d.ts +5 -5
- package/build/components/RangeCalender/components/Timezone/components/UserTimezone.d.ts +5 -5
- package/build/components/RangeCalender/index.js +1 -1
- package/build/components/RangeCalender/type.d.ts +14 -7
- package/build/components/RangeCalender/utils.d.ts +8 -5
- package/build/components/RatingCount/index.js +1 -1
- package/build/components/ReferenceTypeFilter/index.js +1 -1
- package/build/components/RightLeftExpandingCenterChip/index.js +1 -1
- package/build/components/RightLeftExpandingCenterChip/style.d.ts +13 -13
- package/build/components/SearchButton/index.js +1 -1
- package/build/components/SearchButton/styles.d.ts +2 -2
- package/build/components/SearchInput/index.js +1 -1
- package/build/components/SelectDropdown/index.js +1 -1
- package/build/components/SheetViewChip/index.js +1 -1
- package/build/components/StatusBar/index.js +1 -1
- package/build/components/StatusButton/index.js +1 -1
- package/build/components/StatusFilter/index.js +1 -1
- package/build/components/StatusIcons/AuthIcons/style.d.ts +2 -2
- package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +1 -1
- package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +6 -6
- package/build/components/StatusIcons/SourceIcons/style.d.ts +1 -1
- package/build/components/StatusIcons/index.js +1 -1
- package/build/components/StatusLabel/index.js +1 -1
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/AgreementCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +2 -2
- package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/DateCell/DateViewer.d.ts +1 -1
- package/build/components/TableCells/CustomCells/DueDateCell/DueDateCell.d.ts +1 -1
- package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/DueDateCell/type.d.ts +3 -0
- package/build/components/TableCells/CustomCells/DueDateCell/utils.d.ts +4 -3
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/InvoiceStatusCell.d.ts +1 -1
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/type.d.ts +3 -0
- package/build/components/TableCells/CustomCells/PayoutDateCell/PayoutDateCell.d.ts +1 -1
- package/build/components/TableCells/CustomCells/PayoutReportCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +5 -5
- package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +2 -2
- package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +6 -6
- package/build/components/TableCells/CustomCells/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/type.d.ts +6 -2
- package/build/components/TableCells/index.js +1 -1
- package/build/components/TableReports/components/DownloadButton/style.d.ts +1 -1
- package/build/components/TableReports/index.js +1 -1
- package/build/components/TableReports/style.d.ts +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/ToggleView/index.js +1 -1
- package/build/components/Toolbar/index.js +1 -1
- package/build/components/TreeDropdown/index.js +1 -1
- package/build/components/VAT/index.js +1 -1
- package/build/components/VerificationIcon/index.js +1 -1
- package/build/components/ViewColumnRadioFilter/index.js +1 -1
- package/build/components/VirtualTables/components/style.d.ts +1 -1
- package/build/components/VirtualTables/index.js +1 -1
- package/build/components/Widget/index.js +1 -1
- package/build/components/WindowSideBar/index.js +1 -1
- package/build/components/index.js +1 -1
- package/build/components/primitives/index.js +1 -1
- package/build/constants/currency.d.ts +0 -1
- package/build/datetime/index.d.ts +3 -2
- package/build/datetime/index.js +1 -1
- package/build/datetime/instant.d.ts +14 -4
- package/build/datetime/zone.d.ts +2 -3
- package/build/hooks/index.js +1 -1
- package/build/index.js +1 -1
- package/build/utils/index.js +1 -1
- package/build/utils/payout.d.ts +4 -3
- package/package.json +2 -2
- package/build/_chunks/chunk-2WFSLZCA.js +0 -1
- package/build/_chunks/chunk-MOCDGJR4.js +0 -1
- package/build/_chunks/chunk-TVHMB3N3.js +0 -2
- package/build/_chunks/chunk-YJ3DWX64.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-32FV6NCN.js';import {a}from'./chunk-45YGTVZP.js';import {j,a as a$3}from'./chunk-32QJM33C.js';import {a as a$1}from'./chunk-XIUJHYEE.js';import {R,x,h as h$1}from'./chunk-DNVGTZES.js';import {g,d,h,c,e,f}from'./chunk-2WFSLZCA.js';import {zc,o}from'./chunk-MOCDGJR4.js';import {Uc,Vc,Uj,Vj,Wj,dc,ec,Xj,cc}from'./chunk-M5HS3EYQ.js';import {memo,forwardRef,useState,useMemo,useRef,useId,useEffect,useCallback}from'react';import v from'@mui/material/Box';import Tt from'@mui/material/Popper';import Wt from'dayjs';import {useTranslation}from'react-i18next';import {Calendar,DateObject}from'react-multi-date-picker';import Xo from'@mui/material/ClickAwayListener';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';import Ce from'@mui/material/Button';import X from'react-date-object';import at from'react-date-object/calendars/arabic';import pt from'react-date-object/calendars/gregorian';import dt from'react-date-object/locales/arabic_ar';import st from'react-date-object/locales/arabic_en';import lt from'react-date-object/locales/gregorian_ar';import mt from'react-date-object/locales/gregorian_en';var qe=styled(v)(({theme:e})=>({color:e.palette.grey[700],fontSize:"9px",fontWeight:500,marginBottom:"6px"})),Je=styled(v,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:o})=>({borderRadius:"4px",border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,height:32,padding:"8px",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",...o&&{border:`1px solid ${e.palette.info.dark}`,background:e.palette.common.white,boxShadow:e.shadows[7]}})),Xe=styled(v)(({theme:e})=>({borderRadius:"8px",background:e.palette.common.white,boxShadow:"0px 8px 36px 0px rgba(0, 0, 0, 0.15)",textAlign:"center",color:e.palette.grey[900],fontSize:"12px",fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px",padding:"16px",display:"flex",alignItems:"center",justifyContent:"center",gap:"12px",flexDirection:"column"})),Ve=styled(v)(({theme:e})=>({width:71,padding:"4px 0",cursor:"pointer","&:hover, &.active":{borderRadius:"100px",background:e.palette.info.light}}));var oo={day:"Day",month:"Month",quarter:"Quarter",year:"Year"};function et({sx:e,groupBy:o,isCalenderOpen:a,onUpdate:t}){let[n,p]=useState(null),l=!!n&&a,{t:m}=useTranslation(),c=()=>{p(null);},f=d=>{p(d.currentTarget);},s=d=>{t?.(d),c();};return jsx(Xo,{onClickAway:c,children:jsxs(v,{sx:e,children:[jsx(qe,{children:m("groupedBy")}),jsxs(Je,{onClick:f,open:l,children:[jsx("span",{children:oo[o]}),jsx(v,{component:"img",src:Vc,alt:"arrow",sx:{...l&&{transform:"rotate(180deg)"}}})]}),jsx(R,{open:l,anchorEl:n,children:jsx(Xe,{sx:{width:n?.clientWidth},children:Object.entries(oo).map(([d,i])=>jsx(Ve,{onClick:()=>{s(d);},className:o===d?"active":"",children:i},`${d}-groupedBy`))})})]})})}var ro=memo(et);var no=ro;var io=styled(v)(({theme:e})=>({border:"1px solid",borderColor:e.palette.divider,borderRadius:"50px",paddingInline:"6px 12px",color:e.palette.text.primary,fontSize:"11px",display:"flex",gap:"8px",alignItems:"center",justifyContent:"space-between",height:32,marginTop:"8px",img:{width:16,height:16},"& > div":{display:"flex",alignItems:"center",gap:"2px"}}));function fe({isHijri:e,onCalendarModeSwitch:o}){let{t:a}=useTranslation(),t=()=>{o?.(e?"gregorian":"hijri");};return jsx(v,{children:jsxs(io,{children:[jsxs(v,{children:[jsx("img",{src:cc,alt:"hijri"}),jsx("span",{children:a("hijri")})]}),jsx(h$1,{checked:e,onChange:t})]})})}var so=fe;var mo=styled(Ce)(({theme:e})=>({cursor:"pointer",borderRadius:"50px",border:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,color:e.palette.text.primary,fontSize:"11px",fontWeight:e.typography.fontWeightRegular,paddingInline:"12px",height:32,width:"max-content",textTransform:"unset","&:hover":{boxShadow:e.shadows[7],border:"1px solid",borderColor:e.palette.info.dark}})),co=styled(v)(()=>({display:"flex",flexDirection:"column",gap:"8px"}));var V=({isHijri:e,isAr:o=false})=>e?o?dt:st:o?lt:mt,ee=e=>e?at:pt,B=e=>e.setHour(0).setMinute(0).setSecond(0).setMillisecond(0),E=e=>e.setHour(23).setMinute(59).setSecond(59).setMillisecond(999),oe=e=>{if(!(e?.[0]instanceof Date)||!(e?.[1]instanceof Date)){let[o$1,a]=o();return [new X(o$1),new X(a)]}return [new X(e?.[0]),new X(e?.[1])]};function ge({onChange:e,isHijri:o,isAr:a=false}){let t={locale:V({isHijri:o,isAr:a}),calendar:ee(o)},n=useMemo(()=>[{id:"today",value:[new DateObject(t),new DateObject(t)]},{id:"lastWeek",value:[new DateObject(t).subtract(6,"day"),new DateObject(t)]},{id:"lastMonth",value:[new DateObject(t).subtract(30,"day"),new DateObject(t)]},{id:new DateObject(t).subtract(1,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(1,"month").toFirstOfMonth(),new DateObject(t).subtract(1,"month").toLastOfMonth()]},{id:new DateObject(t).subtract(2,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(2,"month").toFirstOfMonth(),new DateObject(t).subtract(2,"month").toLastOfMonth()]},{id:new DateObject(t).subtract(3,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(3,"month").toFirstOfMonth(),new DateObject(t).subtract(3,"month").toLastOfMonth()]}],[o,a]),{t:p}=useTranslation();return jsx(v,{"data-testid":"RangeCalender_QuickFilters",children:jsx(co,{children:n.map(l=>jsx(mo,{onClick:m=>{m.preventDefault(),e(l.value);},children:p(l.id)},l.id))})})}var fo=ge;var uo=styled(Ce)(()=>({minWidth:"auto",padding:0,"& > img":{cursor:"pointer"}}));var yt=["Su","Mo","Tu","We","Th","Fr","Sa"];function wt({isAr:e=false,isHijri:o,values:a,onChange:t,numberOfMonths:n=2,...p},l){let m=c=>c==="right"?e?dc:ec:e?ec:dc;return jsx(Calendar,{ref:l,numberOfMonths:n,value:a,onChange:t,calendar:ee(o),locale:V({isHijri:o,isAr:e}),range:true,format:"MMM DD",monthYearSeparator:" ",renderButton:(c,f)=>jsx(uo,{onClick:f,children:jsx("img",{src:m(c),alt:"arrow"})}),weekDays:e?void 0:yt,maxDate:new Date,...p})}var go=forwardRef(wt);var xo=go;var bo=styled(v)(()=>({'[class$="-IndicatorsContainer2"]':{display:"none"},"#react-select-2-listbox":{width:300}})),te=styled(v)(({theme:e})=>({borderRadius:e.spacing(.5),border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,boxShadow:e.shadows[10],minWidth:200,width:"max-content",overflow:"auto"})),ho=styled(v,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:o})=>({width:156,fontSize:"11px",color:e.palette.text.primary,border:"1px solid",borderColor:e.palette.divider,minHeight:32,borderRadius:"4px",padding:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",cursor:"pointer",display:"flex",alignItems:"center",gap:e.spacing(1),fontWeight:500,...o&&{borderRadius:"4px",boxShadow:e.shadows[7],border:"1px solid",borderColor:e.palette.info.dark,background:e.palette.common.white},span:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}})),A=styled(v)(({theme:e})=>({padding:e.spacing(1),color:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",gap:e.spacing(1),height:33,cursor:"pointer","&:hover":{boxShadow:"0px 0px 16px 0px #00000021"},"&+&":{borderTop:"1px solid",borderColor:e.palette.divider},"&.active span":{fontWeight:500},span:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}})),F=styled(v)(()=>({width:12,height:12})),W=styled(v)(({theme:e})=>({fontSize:"11px",color:e.palette.text.secondary,lineHeight:"15.03px","&.selected":{color:e.palette.info.dark}}));function he({selectedTimezone:e,onChange:o,timezoneCountriesCodes:a$1,defaultCountryTimezone:t}){let[n,p]=useState(null),l=i=>{n||p(i.currentTarget);},m=()=>{n&&p(null);},c=(i,y)=>{i.stopPropagation(),o(y);},f=useMemo(()=>a$1?.flatMap(i=>{let y=d(i);return y?[h(y)]:[]}),[a$1]),s=useMemo(()=>f?.some(i=>e?.timezone===i?.timezone),[f,e]),d$1=useMemo(()=>e&&s?e:t,[e,t,s]);return jsxs(A,{onMouseEnter:l,onMouseLeave:m,onClick:()=>{e&&o(d$1);},children:[s?jsx("img",{src:Xj,alt:"icon"}):jsx(F,{}),jsx("img",{src:Vj,alt:"entity-timezone"}),jsx(a,{countryCode:d$1?.countryCode}),jsx(W,{className:s?"selected":"",children:g((s&&e?e:t).timezone)}),jsx(Tt,{open:!!n,anchorEl:n,placement:"right-start",sx:{zIndex:3},disablePortal:true,children:jsx(te,{sx:{maxHeight:300},children:f?.map((i,y)=>{let Y=i?.timezone===e?.timezone;return jsxs(A,{onClick:ie=>{c(ie,i);},sx:{gap:"4px"},children:[Y?jsx("img",{src:Xj,alt:"icon"}):jsx(F,{}),jsx(a,{countryCode:i?.countryCode}),jsx(W,{className:Y?"selected":"",children:g(i.timezone)})]},`timezone-item-${y}`)})})})]})}function ye({onChange:e$1,selectedTimezone:o,browserTimezone:a$1}){let t=useMemo(()=>c(a$1??e()??""),[a$1]),n=useMemo(()=>t?h(t):void 0,[t]),p=()=>{n&&e$1(n);},l=n?.timezone===o?.timezone;return jsxs(A,{onClick:p,children:[l?jsx("img",{src:Xj,alt:"icon"}):jsx(F,{}),jsx("img",{src:Uj,alt:"user-timezone"}),jsx(a,{countryCode:n?.countryCode}),jsx(W,{className:l?"selected":"",children:n&&g(n.timezone)})]})}function Bt({onChange:e,selectedTimezone:o,browserTimezone:a$1,defaultCountryTimezone:t,timezoneCountriesCodes:n}){let[p,l]=useState(null),m=!!p,c=()=>{l(null);},f=i=>{e(i),c();},s=i=>{l(i.currentTarget);},d=useMemo(()=>a$1===o?.timezone?Uj:o?.timezone===t.timezone?Vj:Wj,[a$1,t.timezone,o?.timezone]);return jsx(Xo,{onClickAway:c,children:jsxs(bo,{"data-testid":"CustomTimezone",children:[jsxs(ho,{open:m,onClick:s,children:[jsx("img",{src:d,alt:"timezone-icon"}),jsx(a,{countryCode:o?.countryCode}),jsx("span",{children:o&&g(o.timezone)})]}),jsx(Tt,{open:m,anchorEl:p,placement:"top-start",sx:{zIndex:1400},children:jsxs(te,{"data-testid":"CustomTimezone_dropdown",children:[jsx(he,{onChange:f,selectedTimezone:o,defaultCountryTimezone:t,timezoneCountriesCodes:n}),jsx(ye,{onChange:f,selectedTimezone:o,browserTimezone:a$1})]})})]})})}var Co=memo(Bt);var To=Co;var ko=styled(v,{shouldForwardProp:e=>e!=="$isSingleMonth"})(({theme:e,$isSingleMonth:o})=>({display:"flex",marginTop:"8px",background:e.palette.common.white,boxShadow:e.shadows[9],borderRadius:e.spacing(1),color:e.palette.text.primary,fontSize:"11px",".rmdp-calendar":{padding:"8px 16px 16px"},".rmdp-rtl *":{fontFamily:"Tajawal"},".rmdp-rtl .sd":{paddingTop:"4px"},".rmdp-wrapper":{position:"relative",borderRadius:"8px",boxShadow:"none",...o&&{width:"100%"}},".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,...o&&{display:"block !important"}},".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"},".rmdp-day.rmdp-disabled":{color:"#ccc",cursor:"not-allowed"}})),zo=styled(Ce)(({theme:e})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",background:"transparent",color:e.palette.text.primary,border:"1px solid",borderColor:e.palette.divider,fontWeight:500,borderRadius:"4px","&:hover":{background:"transparent",color:e.palette.text.primary}})),So=styled(Ce)(({theme:e})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",borderRadius:"4px",fontWeight:700,background:e.palette.info.dark,"&:hover":{background:e.palette.info.dark}})),Do=styled(v)(()=>({display:"flex",gap:8,marginLeft:"auto",flexShrink:0})),vo=styled(Ce,{shouldForwardProp:e=>e!=="open"})(({open:e,theme:o})=>({color:o.palette.text.primary,fontSize:"11px",fontWeight:500,padding:o.spacing(1),borderRadius:"4px",border:"1px solid",borderColor:o.palette.divider,background:o.palette.common.white,textTransform:"none",height:32,...e&&{border:"1px solid",borderColor:o.palette.info.dark,boxShadow:o.shadows[7]}})),Mo=styled(v)(({theme:e})=>({background:e.palette.common.white,display:"flex",justifyContent:"space-between",alignItems:"center",gap:10,padding:"16px",borderTop:"1px solid",borderColor:e.palette.divider,borderBottomRightRadius:"8px"})),Bo=styled(v)(({theme:e})=>({padding:16,paddingInlineEnd:"23px",borderRight:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,width:"max-content",borderTopLeftRadius:"8px",borderBottomLeftRadius:"8px",display:"flex",flexDirection:"column",gap:10,justifyContent:"space-between"})),Eo=styled(v)(()=>({display:"flex",alignItems:"center",gap:"10px"})),Oo=styled(v)(()=>({position:"relative"})),Ro=styled(v)(()=>({display:"flex",flexDirection:"column",gap:"24px"}));var Io=styled(v,{shouldForwardProp:e=>e!=="isAllDay"})(({theme:e,isAllDay:o})=>({display:"flex",alignItems:"center",gap:e.spacing(1),position:"relative",paddingInline:"5px",".label":{width:"max-content"},...!o&&{paddingRight:e.spacing(1),"&:after":{content:'""',position:"absolute",width:"1px",background:e.palette.divider,right:0,height:17}}})),Po=styled(v)(()=>({width:235})),Lo=styled(v)(({theme:e})=>({display:"flex",gap:"4px",".rmdp-input":{width:"64px",borderRadius:"19px",border:"1px solid",borderColor:e.palette.divider,color:e.palette.text.primary,fontSize:"11px",fontWeight:500,background:"transparent",cursor:"pointer"},".rmdp-input:focus":{boxShadow:e.shadows[7],border:`1px solid ${e.palette.info.dark}`,borderRadius:"19px"},".rmdp-time-picker":{boxShadow:e.shadows[5],borderRadius:e.spacing(1),padding:e.spacing(2),minWidth:"auto !important",div:{marginTop:0,display:"block"},"> div":{width:32,height:64},".rmdp-arrow":{borderColor:`${e.palette.background.transparent[1]} !important`},".rmdp-arrow-container":{justifyContent:"center","&:hover":{backgroundColor:"transparent",boxShadow:"unset"}},input:{borderRadius:"4px",border:`1px solid ${e.palette.divider}`,padding:0,width:32,height:32,fontSize:"11px",color:e.palette.text.primary,fontWeight:500,"&:focus, &:focus-visible":{border:`1px solid ${e.palette.info.dark}`,outline:"unset"}},".dvdr":{margin:"7px 4px 0"},".rmdp-am, .rmdp-pm":{margin:0,width:32,height:32,flex:"auto",justifyContent:"center",fontSize:"11px",color:e.palette.text.primary,fontWeight:500,display:"flex",cursor:"default"},"> div:last-child":{marginInlineStart:"4px",display:"block !important"},".rmdp-down, .rmdp-up":{position:"relative",i:{display:"none"},"&:before":{content:'""',position:"absolute",top:"5px",width:"10px",height:"10px",backgroundImage:`url(${Uc})`}},".rmdp-down:before":{transform:"rotate(180deg)"}},".rmdp-container":{position:"relative","> div":{top:"unset !important",bottom:"28px",transform:"unset !important"}}})),Ao=styled(v)(({theme:e})=>({display:"flex",gap:"8px",alignItems:"center",borderRadius:"50px",border:"1px solid",borderColor:e.palette.divider,paddingInline:"5px",width:"fit-content",height:32}));function Rt({values:e,setValues:o}){let{t:a}=useTranslation(),t=new DateObject(e[0]),n=new DateObject(e[1]),[p,l]=useState(t.dayOfYear===n.dayOfYear&&t.hour===0&&t.minute===0&&n.hour===23&&n.minute===59),m=({period:s,hour:d})=>s==="PM"&&d!==12?d+12:s==="AM"&&d===12?0:d,c=({hour:s,minute:d,period:i})=>{o([t.setHour(m({hour:s,period:i})).setMinute(d).setSecond(0),n]);},f=({hour:s,minute:d,period:i})=>{o([t,n.setHour(m({hour:s,period:i})).setMinute(d).setSecond(59)]);};return jsx(Po,{children:jsxs(Ao,{children:[jsxs(Io,{isAllDay:p,children:[jsx("span",{className:"label",children:a("allDay")}),jsx(h$1,{checked:p,onChange:s=>{l(!p),s.target.checked?o([B(e[0]),E(e[1])]):o(e);}})]}),!p&&jsxs(Lo,{children:[jsx(j,{defaultTime:{hour:a$3(t.hour),minute:t.minute,period:t.hour>=12?"PM":"AM"},size:"small",onChange:c,enableRealTimeChange:true},`${e[0]?.toString()}-start`),jsx(j,{defaultTime:{hour:a$3(n.hour),minute:n.minute,period:n.hour>=12?"PM":"AM"},size:"small",onChange:f,enableRealTimeChange:true},`${e[1]?.toString()}-end`)]})]})})}var Wo=Rt;var Ho=Wo;function jt({defaultDate:e,onDateChange:o,mode:a="gregorian",onCalendarModeSwitch:t,numberOfMonths:n,noTimezone:p,noQuickFilter:l,maxDateRange:m,onCalendarGroupChange:c,groupBy:f$1,timezone:s,onChangeTimezone:d,browserTimezone:i,renderCalendarButton:y,mainSx:Y,popperProps:ie,rangeDatePickerProps:$o,defaultCountryTimezone:ze,timezoneCountriesCodes:Se}){let[C,De]=useState(oe(e)),[x$1,T]=useState(C),[$,ve]=useState(s??null),[Me,Go]=useState(f$1||"day"),[Be,Ee]=useState(null),w=!!Be,[Oe,Re]=useState(false),{t:ae}=useTranslation(),P=useRef(null),Qo=zc(useId(),"range-calender"),pe=a==="hijri",G=()=>{Ee(null);},Ie=r=>{Ee(r.currentTarget);};useEffect(()=>{if(!w){if(n===1)return;T(oe(e));}},[w]),useEffect(()=>{if(e){let r=oe(e);De(r),T(r),P.current&&P.current.set("date",r[0]);}},[e]),useEffect(()=>{ve(s??null);},[s,w]);let Pe=()=>{De(x$1),G();let r;x$1[0].dayOfYear===x$1[1].dayOfYear?r=[x$1[0],x$1[1]]:r=[B(x$1[0]),E(x$1[1])],o([r[0].toDate(),r[1].toDate()],$?f($):void 0),c?.(Me||"day"),d?.($);},Uo=useCallback(()=>{let r=C[0].format("MMM D"),Q=C[1]?C[1].format("MMM D"):C[0].format("MMM D");return r===Q&&!p?r:`${r} - ${Q}`},[C,p]),No=r=>{if(r.length<2||!m){T(r);return}let Q=B(r[0]).toDate(),_o=E(r[1]).toDate(),Le=Wt(_o).diff(Q,"day");if(Le<=m){T(r);return}Re(true),T([r[0],r[1].subtract(Le-m,"d")]),setTimeout(()=>{Re(false);},3e3);},Zo=r=>{T([B(r[0]),E(r[1])]),P.current&&P.current.set("date",r[0]);},Ko=r=>{r.key==="Enter"&&x$1[1]&&!Oe?(r.stopPropagation(),Pe()):r.key==="Escape"&&(r.stopPropagation(),G());};return jsxs(Oo,{id:Qo,"data-testid":"RangeCalender",sx:Y,children:[y?y(w,Ie):jsx(vo,{onClick:Ie,open:w,children:(C[0]||C[1])&&Uo()}),w&&jsx(a$1,{onClick:r=>{r.stopPropagation(),G();}}),jsx(Tt,{open:w,anchorEl:Be,placement:"bottom-end",...ie,children:jsxs(ko,{onKeyDown:Ko,$isSingleMonth:n===1,children:[!l&&jsxs(Bo,{children:[jsx(fo,{onChange:Zo,isHijri:pe}),jsxs(Ro,{children:[f$1&&jsx(no,{groupBy:Me,isCalenderOpen:w,onUpdate:r=>{Go(r);}}),jsx(so,{isHijri:pe,onCalendarModeSwitch:t})]})]}),jsxs(v,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[jsx(xo,{values:x$1,onChange:No,isHijri:pe,ref:P,numberOfMonths:n,...$o}),jsx(x,{in:Oe&&!!m,children:jsx(a$2,{error:ae("dateRangeError",{number:m}),sx:{marginInline:"16px",marginBottom:"16px"}})}),jsxs(Mo,{sx:{borderBottomLeftRadius:"8px"},children:[!p&&ze&&i&&Se&&jsx(Eo,{children:jsx(To,{onChange:ve,selectedTimezone:$,browserTimezone:i,defaultCountryTimezone:ze,timezoneCountriesCodes:Se},String(w))}),new DateObject(x$1[0]).dayOfYear===new DateObject(x$1[1]).dayOfYear&&jsx(Ho,{values:x$1,setValues:T}),jsxs(Do,{children:[jsx(zo,{variant:"contained",onClick:G,children:ae("cancel")}),jsx(So,{variant:"contained",onClick:Pe,disabled:!x$1[1],children:ae("okay")})]})]})]})]})})]})}var Yo=jt;var ki=Yo;export{ki as a};
|