@tap-payments/os-micro-frontend-shared 0.1.476 → 0.1.477-test.2
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/{chunk-5XEW4QTS.js → chunk-24D2TNNY.js} +1 -1
- package/build/{chunk-5AP2LF3H.js → chunk-2SLMVVV3.js} +1 -1
- package/build/{chunk-RP4MJ5Q6.js → chunk-2TQNXS73.js} +1 -1
- package/build/{chunk-2YHDR6KJ.js → chunk-3R74OKMG.js} +1 -1
- package/build/{chunk-MT5QLVFK.js → chunk-3TYEEWUM.js} +1 -1
- package/build/{chunk-LLA5JSVK.js → chunk-3VGQ42OI.js} +1 -1
- package/build/{chunk-ZVR3N6WG.js → chunk-4PTJVJGN.js} +1 -1
- package/build/chunk-6OL3JUPA.js +1 -0
- package/build/{chunk-TR3SEJSN.js → chunk-6OSSML46.js} +1 -1
- package/build/{chunk-QGPGFPW5.js → chunk-6OZURZ2J.js} +1 -1
- package/build/{chunk-SPNQ2E2Q.js → chunk-6RMDSMJP.js} +1 -1
- package/build/{chunk-E6MD7WFS.js → chunk-ABY47DSJ.js} +1 -1
- package/build/{chunk-NBGGOUIZ.js → chunk-AK4FIVFH.js} +1 -1
- package/build/{chunk-L4B4IVAJ.js → chunk-AO457WXQ.js} +1 -1
- package/build/{chunk-NFNAX7ZR.js → chunk-ARSSSITK.js} +1 -1
- package/build/chunk-BT2QZGRR.js +1 -0
- package/build/{chunk-O5XTGPQS.js → chunk-BWIJY2WE.js} +1 -1
- package/build/{chunk-WCKORXDZ.js → chunk-BX63HTMQ.js} +1 -1
- package/build/{chunk-6R62IHYU.js → chunk-ETSKMGSS.js} +2 -2
- package/build/{chunk-JXBLMQQW.js → chunk-F5BRCMX3.js} +1 -1
- package/build/{chunk-63X52EKP.js → chunk-FKD6E26U.js} +1 -1
- package/build/{chunk-GMX5M76T.js → chunk-GOUJ5ZUW.js} +1 -1
- package/build/chunk-GTY2ZBCY.js +1 -0
- package/build/{chunk-SN4NF2DB.js → chunk-IKUOEIOO.js} +1 -1
- package/build/{chunk-XBOCHTAW.js → chunk-IYFH5KXZ.js} +1 -1
- package/build/chunk-J2Z4QVIO.js +1 -0
- package/build/{chunk-RRGMY7JG.js → chunk-JMV7T5XA.js} +1 -1
- package/build/{chunk-WOTZJWJO.js → chunk-JWQCFINS.js} +1 -1
- package/build/{chunk-QODYGBWL.js → chunk-KDVCU5UC.js} +2 -2
- package/build/{chunk-WC257EIO.js → chunk-LKK7HW6N.js} +1 -1
- package/build/{chunk-3LSEPLBS.js → chunk-LXWCV7XY.js} +1 -1
- package/build/{chunk-26O5AFVA.js → chunk-MM6JBQHW.js} +1 -1
- package/build/chunk-MOREGFIY.js +1 -0
- package/build/chunk-NIIRPM2P.js +1 -0
- package/build/{chunk-EVXUJZHR.js → chunk-NOO5LTIU.js} +1 -1
- package/build/{chunk-DOS7HEOK.js → chunk-NU4JZVKW.js} +1 -1
- package/build/{chunk-6MGFWHFE.js → chunk-O23ZGMIO.js} +1 -1
- package/build/{chunk-564ORABT.js → chunk-OWWED4PY.js} +1 -1
- package/build/{chunk-HER5WIWD.js → chunk-OZVTT6UG.js} +1 -1
- package/build/{chunk-D77WOGTR.js → chunk-P6EO5ZKH.js} +1 -1
- package/build/{chunk-OAW3HGVO.js → chunk-PD64HN2X.js} +1 -1
- package/build/{chunk-GCAVKPOC.js → chunk-QGGTALT2.js} +1 -1
- package/build/{chunk-A5L5THUJ.js → chunk-QHUUB5UA.js} +1 -1
- package/build/{chunk-5J4ZTV3V.js → chunk-QKCWEX4G.js} +1 -1
- package/build/{chunk-QHCXUNDI.js → chunk-QSFU7MAF.js} +1 -1
- package/build/{chunk-QGGRITXQ.js → chunk-QUUQ7L4F.js} +1 -1
- package/build/chunk-R3V7C2N6.js +1 -0
- package/build/{chunk-DHXBB2IU.js → chunk-R5BTIY3J.js} +1 -1
- package/build/chunk-ROXE5K4B.js +2 -0
- package/build/{chunk-QHZBPLTG.js → chunk-S3DUYHQG.js} +1 -1
- package/build/{chunk-TVF6SSDQ.js → chunk-S3HYGR6A.js} +1 -1
- package/build/{chunk-SPP7UMVK.js → chunk-SA3T5LKX.js} +1 -1
- package/build/{chunk-AK6AGGIC.js → chunk-SH5B2C5G.js} +1 -1
- package/build/chunk-SRWAY2MJ.js +1 -0
- package/build/{chunk-X4FY4LSJ.js → chunk-SSOATT5T.js} +1 -1
- package/build/{chunk-GLZ7GEBP.js → chunk-TIQMT2NC.js} +1 -1
- package/build/{chunk-6HF3RRHM.js → chunk-TLKUQ74V.js} +1 -1
- package/build/{chunk-4HPJPKH2.js → chunk-TYFM2CLZ.js} +1 -1
- package/build/{chunk-ZXIJT5DT.js → chunk-U2EVJIKE.js} +1 -1
- package/build/{chunk-44TDOYFI.js → chunk-UNZG4C4Y.js} +1 -1
- package/build/{chunk-DMSMH6Q6.js → chunk-VI4EBPCV.js} +1 -1
- package/build/{chunk-LFEL2NAC.js → chunk-VPGXTTNN.js} +1 -1
- package/build/{chunk-ABBNDFGJ.js → chunk-WDGOOLU7.js} +1 -1
- package/build/{chunk-CPDH5SRY.js → chunk-WGMZ5XLV.js} +1 -1
- package/build/{chunk-SICK5RMI.js → chunk-WRXSOWHO.js} +1 -1
- package/build/{chunk-UPWJMPK6.js → chunk-WUEFAFSM.js} +1 -1
- package/build/{chunk-63E3R5PA.js → chunk-WVAZXL5U.js} +1 -1
- package/build/{chunk-ECDED65U.js → chunk-WXO77AL5.js} +1 -1
- package/build/{chunk-RJUHOAU4.js → chunk-XCJHY5ZJ.js} +1 -1
- package/build/{chunk-27CJKJ7T.js → chunk-XIVQ3YLE.js} +1 -1
- package/build/chunk-YBRGXFZD.js +1 -0
- package/build/chunk-YQXNUPQV.js +2 -0
- package/build/{chunk-HN3LUUAR.js → chunk-ZHHW347C.js} +1 -1
- package/build/components/AccordionAdapter/index.js +1 -1
- package/build/components/AccountDropdown/index.js +1 -1
- package/build/components/ActivityAreaChart/index.js +1 -1
- package/build/components/Amount/index.js +1 -1
- package/build/components/AmountConversionFilter/index.js +1 -1
- package/build/components/AmountInput/index.js +1 -1
- package/build/components/AmountStatusChip/index.js +1 -1
- package/build/components/AnimatedSpinnerIcon/index.js +1 -1
- package/build/components/AnimatedSpinnerIcon/style.d.ts +0 -1
- package/build/components/AppServices/index.js +1 -1
- package/build/components/AppServicesActionMenu/index.js +1 -1
- package/build/components/AppServicesBar/index.js +1 -1
- package/build/components/AppWindowWrapper/index.js +1 -1
- package/build/components/AuthenticationTypeChip/index.js +1 -1
- package/build/components/Autocomplete/index.js +1 -1
- package/build/components/BrandLogo/index.js +1 -1
- package/build/components/Button/index.js +1 -1
- package/build/components/Calender/index.js +1 -1
- package/build/components/CardEmptyState/index.js +1 -1
- package/build/components/Checkbox/index.js +1 -1
- package/build/components/Chip/style.d.ts +0 -1
- package/build/components/ColorPicker/index.js +1 -1
- package/build/components/CopyImage/index.js +1 -1
- package/build/components/CountBadge/index.js +1 -1
- package/build/components/CountBadge/style.d.ts +0 -1
- package/build/components/CountryFilter/index.js +1 -1
- package/build/components/CountryFlag/index.js +1 -1
- package/build/components/CurrencyFilter/index.js +1 -1
- package/build/components/CurrencySymbol/index.js +1 -1
- package/build/components/Customer/index.js +1 -1
- package/build/components/DateButton/index.js +1 -1
- package/build/components/DateFilter/index.js +1 -1
- package/build/components/DeviceIcon/index.js +1 -1
- package/build/components/Dialog/index.js +1 -1
- package/build/components/Dialog/style.d.ts +0 -1
- package/build/components/Discount/index.js +1 -1
- package/build/components/DisplayAmount/index.js +1 -1
- package/build/components/Dropdown2/index.js +1 -1
- package/build/components/DropdownButton/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/FileUpload.d.ts +7 -2
- package/build/components/FileUpload/index.js +1 -1
- package/build/components/FileUpload/style.d.ts +3 -1
- package/build/components/FileUploader/index.js +1 -1
- package/build/components/FilterDropdown/index.js +1 -1
- package/build/components/FilteredIds/index.js +1 -1
- package/build/components/Filters/index.js +1 -1
- package/build/components/FlagDetails/index.js +1 -1
- package/build/components/FlippingCard/style.d.ts +0 -1
- package/build/components/IconGallery/index.js +1 -1
- package/build/components/IconWithBadge/index.js +1 -1
- package/build/components/IconWithLabel/index.js +1 -1
- package/build/components/IconsDropdown/index.js +1 -1
- package/build/components/ImageWrapper/ImageWrapper.d.ts +0 -1
- package/build/components/InputBase/index.js +1 -1
- package/build/components/InputNumber/index.js +1 -1
- package/build/components/Inputs/index.js +1 -1
- package/build/components/JSONViewer/index.js +1 -1
- package/build/components/JSONViewer/style.d.ts +0 -1
- package/build/components/LabeledIconDropdown/index.js +1 -1
- package/build/components/LanguageDropdown/index.js +1 -1
- package/build/components/LeftPeekRightExpandingChip/style.d.ts +0 -1
- package/build/components/ListColumnFilter/index.js +1 -1
- package/build/components/MFWidgetLoader/index.js +1 -1
- package/build/components/MaskedText/index.js +1 -1
- package/build/components/MenuItem/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/MultiSelectDropdownButton/index.js +1 -1
- package/build/components/MultiSelectStatusButton/index.js +1 -1
- package/build/components/MultiSelectWithSearch/index.js +1 -1
- package/build/components/NestedDropdown/index.js +1 -1
- package/build/components/PartnersFilter/index.js +1 -1
- package/build/components/PaymentSourceFilter/index.js +1 -1
- package/build/components/PhoneFilter/index.js +1 -1
- package/build/components/ProgressRing/index.js +1 -1
- package/build/components/RFH/index.js +1 -1
- package/build/components/RangeCalender/index.js +1 -1
- package/build/components/ReceiptsViewer/index.js +1 -1
- package/build/components/ReferenceTypeFilter/index.js +1 -1
- package/build/components/RightLeftExpandingCenterChip/style.d.ts +0 -1
- package/build/components/SalesChannelFilter/index.js +1 -1
- package/build/components/Sandbox/index.js +1 -1
- package/build/components/SearchButton/index.js +1 -1
- package/build/components/SearchButton/styles.d.ts +0 -1
- package/build/components/SearchListInput/index.js +1 -1
- package/build/components/SelectDropdown/index.js +1 -1
- package/build/components/SelectWithSearch/index.js +1 -1
- package/build/components/StatusBar/index.js +1 -1
- package/build/components/StatusButton/index.js +1 -1
- package/build/components/StatusChip/index.js +1 -1
- package/build/components/StatusChipWithCopy/index.js +1 -1
- package/build/components/StatusFilter/index.js +1 -1
- package/build/components/StatusGroupChips/index.js +1 -1
- package/build/components/StatusIcons/AuthIcons/style.d.ts +0 -1
- package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +0 -1
- package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +0 -1
- package/build/components/StatusIcons/SourceIcons/style.d.ts +0 -1
- package/build/components/StatusIcons/index.js +1 -1
- package/build/components/StatusLabel/index.js +1 -1
- package/build/components/TableCells/CustomCells/ActionCell/constant.d.ts +1 -0
- package/build/components/TableCells/CustomCells/ActionCell/hooks/useActionCell.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +1 -2
- package/build/components/TableCells/CustomCells/AgreementCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/IDButton/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/PayoutReportCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/style.d.ts +0 -1
- package/build/components/TableCells/index.js +1 -1
- package/build/components/TableHeader/index.js +1 -1
- package/build/components/TableReports/components/DownloadButton/style.d.ts +0 -1
- package/build/components/TableReports/index.js +1 -1
- package/build/components/TableReports/style.d.ts +0 -1
- package/build/components/TableView/index.js +1 -1
- package/build/components/Timepicker/index.js +1 -1
- package/build/components/Toaster/index.js +1 -1
- package/build/components/ToggleView/index.js +1 -1
- package/build/components/Toolbar/index.js +1 -1
- package/build/components/ToolbarIcon/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 +0 -1
- package/build/components/VirtualTables/index.js +1 -1
- package/build/components/Widget/index.js +1 -1
- package/build/components/Window/index.js +1 -1
- package/build/components/WindowSideBar/index.js +1 -1
- package/build/components/index.js +1 -1
- package/build/constants/assets.d.ts +4 -0
- package/build/constants/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 +33 -47
- package/build/chunk-6X6APLPU.js +0 -1
- package/build/chunk-BFOMPZXL.js +0 -1
- package/build/chunk-BW2NZYIQ.js +0 -1
- package/build/chunk-D5RQWU62.js +0 -1
- package/build/chunk-IBQ5J3J3.js +0 -1
- package/build/chunk-QQVGTQT3.js +0 -1
- package/build/chunk-S4ZK6QGJ.js +0 -1
- package/build/chunk-TCLN5DZD.js +0 -2
- package/build/chunk-XCLBERSS.js +0 -1
- package/build/chunk-XVD3YIJN.js +0 -2
- package/build/chunk-ZCYVHGHI.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$4}from'./chunk-WRXSOWHO.js';import {a,c,e,f,b}from'./chunk-R3V7C2N6.js';import {a as a$3}from'./chunk-237EA4BW.js';import {a as a$2}from'./chunk-TLKUQ74V.js';import {a as a$5}from'./chunk-TIQMT2NC.js';import {a as a$6}from'./chunk-NKNRVF6Q.js';import {a as a$1}from'./chunk-CNIYZZCP.js';import {Kc,y}from'./chunk-ROXE5K4B.js';import*as w from'react';import w__default,{useState,useMemo}from'react';import {useFormContext,Controller,FormProvider,useForm}from'react-hook-form';import {jsx,jsxs}from'react/jsx-runtime';import P from'@mui/material/Box';import Le from'@mui/material/Input';import {styled}from'@mui/material/styles';import {ListSubheader,Box,MenuItem}from'@mui/material';import Ke from'@mui/material/MenuItem';function Pe({onSubmit:e,methods:n,children:o}){return jsx(FormProvider,{...n,children:jsx("form",{onSubmit:e,noValidate:true,children:o})})}var Fe=w__default.memo(Pe);var J=w.forwardRef(({name:e,helperText:n,hideArrows:o,...t},l)=>{let{control:i}=useFormContext();return jsx(Controller,{name:e,control:i,defaultValue:t.defaultValue,render:({field:c,fieldState:a$1})=>jsx(a,{...t,...c,ref:l,hasError:!!a$1.error,helperText:n??a$1.error?.message,hideArrows:o,onChange:p=>{c.onChange(p),t.onChange?.(p);},onWheel:p=>{p.target instanceof HTMLElement&&p.target.blur();}})})});J.displayName="RFHFormInput";var Q=w.memo(J);var Ae=Q;function Y({phoneName:e$1,countries:n,countryName:o,helperText:t,isCountriesLoading:l,disabled:i,...c}){let{control:a,watch:p,setValue:x}=useFormContext(),h=p(o),b=u=>{x(o,u);};return jsx(Controller,{name:e$1,control:a,render:({field:{onChange:u,value:s},fieldState:f})=>jsx(e,{...c,phoneValue:s,countries:n,hasError:!!f.error,helperText:t??f.error?.message,onPhoneChange:d=>{u(d);},disabled:i,countryValue:h,onCountryChange:b,isCountriesLoading:l})})}Y.displayName="RFHPhoneInput";var Z=Y;var Ee=Z;var B=(e,n)=>e.toFixed(n);function j({amountName:e,currencies:n,currencyName:o,helperText:t,isCurrenciesLoading:l,...i}){let{control:c,watch:a,setValue:p}=useFormContext(),x=a(o),h=a(e),b=u=>{p(o,u),p(e,B(Number(h),u?.decimals||2));};return jsx(Controller,{name:e,control:c,render:({field:{onChange:u,value:s},fieldState:f$1})=>jsx(f,{...i,amountValue:s??"",currencies:n,hasError:!!f$1.error,helperText:t??f$1.error?.message,onAmountChange:d=>{u(d);},onAmountBlur:d=>{u(B(Number(d),x?.decimals||2));},currencyValue:x,onCurrencyChange:b,isCurrenciesLoading:l})})}j.displayName="RFHAmountInput";var ee=j;var We=ee;function te({name:e,helperText:n,...o}){let{control:t}=useFormContext();return jsx(Controller,{name:e,control:t,render:({field:l,fieldState:i})=>jsx(c,{...o,...l,hasError:!!i.error,helperText:n??i.error?.message})})}te.displayName="RFHSelect";var ne=w.memo(te);var k=ne;function le({name:e,disabled:n,...o}){let{control:t}=useFormContext();return jsx(Controller,{name:e,control:t,render:({field:{name:l,onBlur:i,onChange:c,value:a,disabled:p}})=>jsx(a$3,{...o,onChange:c,onBlur:i,name:l,disabled:p||n,checked:a??false})})}le.displayName="RFHSWitch";var ie=w.memo(le);var Te=ie;var me=styled(a$1)(({theme:e})=>({fontSize:"10px",color:e.palette.grey[700],fontWeight:600,lineHeight:"10px"}));styled(a$1)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,fontWeight:600,lineHeight:"14.3px",width:200}));var se=styled(P)(()=>({display:"flex",flexDirection:"column",maxHeight:180,overflow:"auto",scrollbarWidth:"thin",scrollbarColor:"#E5E5E5 #E5E5E5"}));styled(Le)(({theme:e})=>({width:"inherit",height:32,padding:"11px 12px",fontSize:"10px",borderRadius:"5px",backgroundColor:"#F9F9F9",border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.info.dark}}));var ce=styled(P)(()=>({display:"flex",flexDirection:"column",gap:"8px"}));styled(P)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap",paddingInlineEnd:"20px"}));styled(P)(({theme:e,maxWidth:n})=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:`${e.palette.info.dark}1a`,fontSize:"10px",fontWeight:500,cursor:"pointer",...n&&{maxWidth:`${n}%`}}));var ue=styled(a$1)(({theme:e})=>({display:"flex",gap:"8px",alignItems:"center",justifyContent:"space-between",fontSize:"10px",fontWeight:500,color:e.palette.common.black,cursor:"pointer",padding:"8px 20px"}));styled(P)(({theme:e})=>({width:"100%",flexDirection:"column",border:`1px solid ${e.palette.grey[100]}`,borderRadius:"4px",backgroundColor:e.palette.grey[400]}));function $e({name:e,options:n,...o}){let[t,l]=useState(null),[i,c]=useState(0),a=!!t,p=s=>{l(a?null:s.currentTarget);},x=()=>{l(null);},{watch:h,setValue:b}=useFormContext(),u=h(e);return jsx(a$4,{open:a,anchorEl:t,onOpen:p,onClose:x,trigger:jsx(k,{name:e,options:[],...o,open:false}),hideArrow:true,listWrapperSx:{padding:0,margin:0},children:jsx(ce,{children:jsx(se,{"data-testid":"AccordionWrapper",children:n.map?.((s,f)=>{let d=i===f;return jsx(a$5,{Header:jsx(me,{variant:"caption",children:s.group}),defaultExpanded:true,sx:{flexShrink:0,border:0,...d&&{borderBottom:"1px solid #0000001A",borderTop:"1px solid #0000001A"}},summarySx:{backgroundColor:d?"#F8F8F8":"#ffffff",borderBottom:"1px solid #0000001A",minHeight:28},expanded:d,onChange:(m,g)=>{m.stopPropagation(),m.preventDefault(),c(g?f:null);},children:(s?.options||[]).map((m,g)=>{let r=o?.isOptionEqualToValue?.(m,u);return jsxs(ue,{onClick:()=>{b(e,m,{shouldDirty:true,shouldTouch:true,shouldValidate:true}),x();},children:[o.renderOption?.(m)||m.label,r&&jsx(a$6,{src:Kc,alt:"blue-check",sx:{width:14,height:10}})]},`${m.value}-${m.label}-${g}`)})},`${s.group}-group-${f}`)})})})})}var fe=$e;var Ue=fe;var xe=styled(a$2)(()=>({padding:0,".MuiSvgIcon-root":{width:12,height:12}})),he=styled(Le)(({theme:e})=>({width:"100%",height:36,padding:"8px 8px 8px 12px",borderRadius:4,backgroundColor:e.palette.common.white,border:"1px solid #F2F2F2",boxSizing:"border-box","&:hover":{borderColor:"#F2F2F2"},"&.Mui-focused":{borderColor:"#F2F2F2",backgroundColor:e.palette.common.white},"&:before, &:after":{display:"none"},"& input":{padding:0,fontSize:10},"& .MuiInputBase-input":{paddingRight:4}}));styled(Ke)(({theme:e})=>({opacity:1,paddingTop:0,paddingBottom:0,marginBottom:8,minHeight:"auto",pointerEvents:"none",backgroundColor:e.palette.common.white,"&:hover":{backgroundColor:e.palette.common.white},"&.Mui-focusVisible":{backgroundColor:e.palette.common.white},"&.Mui-disabled":{backgroundColor:e.palette.common.white,opacity:1}}));function M({name:e,helperText:n,getOptionValue:o,getOptionLabel:t,renderOption:l,isOptionEqualToValue:i,getOptionDisabled:c,showSearchInput:a=false,searchPlaceholder:p="Search",showCheckbox:x=true,options:h,...b$1}){let{control:u}=useFormContext(),[s,f]=useState(""),d=useMemo(()=>{if(!a||!s.trim())return h??[];let m=s.toLowerCase().trim();return (h??[]).filter(g=>{let r=(t?t(g):g?.label)??"";return String(r).toLowerCase().includes(m)})},[h,a,s,t]);return jsx(Controller,{name:e,control:u,defaultValue:[],render:({field:m,fieldState:g})=>jsxs(b,{...b$1,...m,options:d,getOptionLabel:t,hasError:!!g.error,helperText:n??g.error?.message,onChange:r=>m.onChange(r),MenuProps:{...b$1.MenuProps,autoFocus:false,disableEnforceFocus:true},children:[a&&jsx(ListSubheader,{disableSticky:true,sx:{backgroundColor:"#fff",pt:1,pb:1},children:jsx(he,{placeholder:p,value:s,onChange:r=>f(r.target.value),onKeyDown:r=>r.stopPropagation(),onKeyUp:r=>r.stopPropagation(),disableUnderline:true,fullWidth:true,inputProps:{"aria-label":p},endAdornment:jsx(Box,{component:"img",src:y,alt:"search",sx:{width:14,height:14,flexShrink:0}})})}),d?.map(r=>{let A=m.value?.some(F=>i?i(F,r):F?.id===r?.id),R=c?c(r):false,be=t?t(r):r.label,W=l?l(r):be;return jsx(MenuItem,{value:(o?o(r):r?.id)??"",disabled:R,sx:{fontSize:"12px",backgroundColor:F=>A?"#F8F8F8 !important":F.palette.common.white,"&.Mui-disabled":{opacity:1}},children:x?jsxs(Box,{sx:{display:"flex",alignItems:"center",width:"100%",gap:"8px"},children:[jsx(xe,{checked:A,sx:{...A&&R&&{"& svg rect":{fill:"#BDC1CC"}}}}),W]}):W},(o?o(r):r?.id)??"")})]})})}var Ze=M;var je=useForm;export{Fe as a,Ae as b,Ee as c,We as d,k as e,Te as f,Ue as g,Ze as h,je as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-3QA32K6H.js';import {a as a$2}from'./chunk-NKNRVF6Q.js';import {a}from'./chunk-CNIYZZCP.js';import {Si,Qi,Oi,Li,Bi,Di,Ti,Ai,zi,Ri,fg,nb,Ei,lb,Fi,Hi,Ii,Ni,Mi,Gi}from'./chunk-ROXE5K4B.js';import h from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var k={ABANDONED:fg,IN_PROGRESS:Ti,VOID:Ri,CANCELLED:zi,CAPTURED:Ai,INITIATED:Ti,FAILED:Di,DECLINED:Bi,RESTRICTED:Li,TIMEDOUT:Oi,UNKNOWN:Qi,AUTHORIZED:Si},R={UNKNOWN:{gatewayIcon:Ei,acquirerIcon:nb,color:"#FF7A00",background:"#FF7A001A"},TIMEDOUT:{gatewayIcon:Ei,acquirerIcon:nb,color:"#FF7A00",background:"#FFF3E5"},FAILED:{gatewayIcon:Ei,acquirerIcon:nb,color:"#FF7A00",background:"#FFF3E5"},DECLINED:{gatewayIcon:Fi,acquirerIcon:lb,color:"#FF3D00",background:"#FFEAE5"},RESTRICTED:{gatewayIcon:Fi,acquirerIcon:lb,color:"#FF3D00",background:"#FFEAE5"},ABANDONED:{gatewayIcon:Ei,acquirerIcon:nb,color:"#FFD600",background:"#FFFBE5"},CANCELLED:{gatewayIcon:Ei,acquirerIcon:nb,color:"#FFD600",background:"#FFFBE5"},INITIATED:{color:"#8D8D94",background:"transparent",gatewayIcon:Ei,acquirerIcon:nb}},z={PENDING:Ii,REFUNDED:Hi},H={PENDING:{color:"#FF7A00",backgroundColor:"#FF7A000D"},REFUNDED:{color:"#4E1FD0",backgroundColor:"#4E1FD00D"}},K={PAID_OUT:Gi,SETTLED:Mi,PENDING:Ni},M={AUTHORIZED:Si},O={CAPTURED:{color:"#1F88D0",background:"#1F88D00D"}};var L=styled(h)(()=>({display:"flex",gap:"4px",alignItems:"center",justifyContent:"center",borderRadius:"56px",padding:"2px 4px",cursor:"default"})),q=styled(a)(({theme:r})=>({color:r.palette.common.white,fontWeight:600,fontSize:"8px",padding:"3px 2.57px",borderRadius:"4px",lineHeight:"100%"}));function I({tooltip:r,status:e,statusCode:U}){let d=R[e]??O[e]??null;return jsx(a$1,{title:r,children:jsxs(L,{sx:{backgroundColor:d?.background||"transparent"},children:[jsx(a$2,{src:k[e]}),jsx(q,{sx:P=>({backgroundColor:d?.color||P.palette.info.dark}),children:U})]})})}var ro=I;export{k as a,R as b,z as c,H as d,K as e,M as f,O as g,ro as h};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-ARSSSITK.js';import {memo,useCallback,Fragment as Fragment$1,createElement}from'react';import {useTranslation}from'react-i18next';import {jsx,Fragment}from'react/jsx-runtime';function A({isFilteredIdsShown:i,availableStatuses:f,status:e,onStatusChange:l,buttonSx:S}){let{t:v}=useTranslation(),I=useCallback(s=>s===e&&!i?"active":"inActive",[e,i]),u=useCallback(s=>{l?.(s);},[l]);return jsx(Fragment,{children:f?.map(({render:s,...a$1},d)=>{if(s)return jsx(Fragment$1,{children:s({status:e,onChange:u},{...a$1,index:d})},`custom-status-slot-${d}`);if(!Array.isArray(a$1.status))return createElement(a,{...a$1,key:`status-button-array-${a$1.status}`,variant:I(a$1.status),onClick:()=>{Array.isArray(a$1.status)||u(a$1.status);},buttonSx:S});if(!a$1.status)return null;let o=a$1.status.filter(Boolean).map(t=>typeof t=="string"?{value:t}:t)||[],m=!!e&&o.some(t=>t?.value===e);return jsx("div",{children:jsx(a,{...a$1,selectedStatus:m?e:void 0,variant:m?"active":"inActive",onButtonBodyClick:t=>u(t),dropdownOptions:o.map(t=>({label:t?.label||v(t?.value||""),status:t?.value,icon:t.icon,onClick:()=>u(t.value)})),buttonSx:S})},o[0]?.value)})})}var c=memo(A);var $=c;export{$ as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {Ua,Va}from'./chunk-
|
|
1
|
+
import {Ua,Va}from'./chunk-WXO77AL5.js';import {zb,Qc}from'./chunk-ROXE5K4B.js';import so,{useState,useRef,useCallback,useEffect,useMemo}from'react';import B from'@mui/material/Box';import co from'@mui/material/ClickAwayListener';import eo from'@mui/material/Stack';import K from'@mui/material/Typography';import {styled,alpha}from'@mui/material/styles';import N from'@mui/material/Button';import ao from'@mui/material/TextField';import io from'@mui/material/MenuList';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useTranslation}from'react-i18next';import {RgbColorPicker,RgbaColorPicker}from'react-colorful';import To from'@mui/material/Divider';import mo from'@mui/material/Popper';import Z from'@mui/material/MenuItem';import Q from'@mui/material/InputAdornment';import v from'color';import {Popper}from'@mui/material';var L=styled("button")({background:"transparent",border:"none",padding:0,margin:0,cursor:"pointer",width:10,height:10,display:"flex",justifyContent:"center",alignItems:"center","&:disabled, &.Mui-disabled":{opacity:.5,cursor:"not-allowed"}}),O=styled(B)(({theme:o})=>({boxShadow:"0px 8px 30px rgba(0, 0, 0, 0.16)",width:264,backgroundColor:"#ffffff",padding:"12px",borderRadius:o.spacing(1),"& .react-colorful":{width:"100%","&__saturation":{minHeight:152,borderRadius:"4px",marginBottom:o.spacing(2),border:0,"&-pointer":{width:13,height:13}},"&__hue":{borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}},"&__alpha":{marginTop:o.spacing(2),marginBottom:0,border:0,borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}}}})),G=styled(B)(()=>({display:"flex",gap:"8px",justifyContent:"flex-end"})),D=styled(o=>jsx(K,{...o,component:"button"}))(({theme:o})=>({fontWeight:500,fontSize:"9px",color:o.palette.info.dark,textDecoration:"underline",cursor:"pointer",background:"transparent",border:"none",padding:0,margin:0,"&:disabled, &.Mui-disabled":{color:alpha(o.palette.info.dark,.5),textDecoration:"none"},"&:hover":{textDecoration:"none"}})),V=styled(N)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.info.dark}`,backgroundColor:o.palette.info.dark,fontWeight:700,fontSize:"11px",color:o.palette.common.white,"&:hover":{backgroundColor:o.palette.info.dark}})),X=styled(N)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.divider}`,backgroundColor:o.palette.common.white,fontWeight:500,fontSize:"11px",color:o.palette.text.primary,"&:hover":{background:"transparent"}})),$=styled(B,{shouldForwardProp:o=>o!=="active"})(({theme:o,active:p})=>({display:"flex",justifyContent:"space-between",alignItems:"center",color:o.palette.text.primary,border:"1px solid #F2F2F2",fontSize:12,fontWeight:500,backgroundColor:"transparent",padding:"4px 8px",borderRadius:"4px",minWidth:70,cursor:"pointer",...p&&{border:"1px solid #1F88D0",boxShadow:"0px 0px 4px 0px #1F88D080"}})),U=styled(io)({backgroundColor:"#ffffff",borderRadius:"4px",boxShadow:"0px 8px 30px 0px #00000029",minWidth:70,"& .MuiMenuItem-root":{fontSize:12,fontWeight:500,padding:"4px 8px"}}),x=styled(ao)(({theme:o})=>({"& .MuiOutlinedInput-root":{fontSize:"12px",fontWeight:500,borderRadius:"4px","& input":{padding:"4px","&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},"&[type=number]":{MozAppearance:"textfield"}},"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"},"&:hover, &.Mui-focused":{"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"}}}}));var fo=({scheme:o,setScheme:p})=>{let[n,r]=so.useState(null),m=!!n,a=useCallback(c=>{r(n?null:c.currentTarget);},[n]),i=useCallback(()=>{r(null);},[]),s=useCallback(c=>{i(),p(c);},[i,p]);return jsxs(Fragment,{children:[jsxs($,{component:"button",active:m,onClick:a,children:[o,jsx(B,{component:"img",sx:{transform:m?"rotateZ(180deg)":"rotateZ(0)",transition:"200ms transform ease-out"},src:Qc})]}),jsx(mo,{anchorEl:n,open:!!n,placement:"bottom",disablePortal:true,keepMounted:true,modifiers:[{name:"offset",options:{offset:[0,4]}}],children:jsx(co,{onClickAway:c=>{n?.contains(c.target)||i();},children:jsxs(U,{children:[jsx(Z,{onClick:()=>s("RGB"),children:"RGB"}),jsx(Z,{onClick:()=>s("HEX"),children:"HEX"})]})})})]})},q=fo;var ko=({value:o,onChange:p,disableAlpha:n=false})=>{let[r,m]=useState(o),{r:a,g:i,b:s,a:c}=r;useEffect(()=>{m(o);},[o]);let f=useCallback((l,u)=>(isNaN(l)&&(l=0),l<0&&(l=0),l>u&&(l=u),console.log("num",l),l),[]),t=useCallback((l,u)=>k=>{m({...r,[l]:f(+k.target.value,u)});},[r,f]),e=useCallback((l,u)=>{p({...r,[l]:f(r[l],u)});},[p,r,f]);return jsxs(eo,{direction:"row",spacing:1,...n&&{flex:1},children:[jsx(x,{type:"number",value:a,onBlur:()=>e("r",255),onChange:t("r",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),jsx(x,{type:"number",value:i,onBlur:()=>e("g",255),onChange:t("g",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),jsx(x,{type:"number",value:s,onBlur:()=>e("b",255),onChange:t("b",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),!n&&jsx(x,{type:"number",value:c,onBlur:()=>e("a",100),onChange:t("a",100),inputProps:{min:0,max:100,style:{textAlign:"center"}},variant:"outlined",sx:{"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(Q,{position:"end",sx:{m:0},children:jsx(K,{component:"span",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})},size:"small"})]})},J=ko;var Ao=({value:o,onChange:p,disableAlpha:n=false})=>{let r=useMemo(()=>v.rgb(o.r,o.g,o.b,o.a).hex().replace("#",""),[o]),[m,a]=useState(r),i=Math.round(o.a*100);return useEffect(()=>{let t=v.rgb(o.r,o.g,o.b).hex().replace("#","");a(t);},[o.r,o.g,o.b]),jsxs(eo,{direction:"row",spacing:1,alignItems:"flex-start",children:[jsx(x,{value:m,onChange:t=>{let e=t.target.value.replace(/[^0-9a-fA-F]/g,"").toUpperCase();e.length>6&&(e=e.slice(0,6)),a(e);},onBlur:()=>{let t=m;if(t.length===3&&(t=t.split("").map(e=>e+e).join(""),a(t)),t.length===6)try{let e=v(`#${t}`).alpha(o.a);p({r:e.red(),g:e.green(),b:e.blue(),a:e.alpha()});}catch{a(r);}else a(r);},placeholder:"FFFFFF",sx:{flex:1.4,"& .MuiOutlinedInput-root":{pl:1}},InputProps:{startAdornment:jsx(Q,{position:"start",sx:{m:0},children:jsx(K,{component:"span",color:t=>alpha(t.palette.text.primary,.5),display:"inline-block",fontSize:12,fontWeight:500,children:"#"})})}}),!n&&jsx(x,{type:"number",value:i,onChange:t=>{let e=parseInt(t.target.value,10);isNaN(e)&&(e=0),e<0&&(e=0),e>100&&(e=100),p({...o,a:e/100});},inputProps:{min:0,max:100},sx:{flex:.8,"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(Q,{position:"end",sx:{m:0},children:jsx(K,{component:"span",color:"text.primary",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})}})]})},Y=Ao;var Ho=({initialValue:o="#ffffff",onCancel:p,onConfirm:n,disableAlpha:r=false})=>{let[m,a]=useState("RGB"),[i,s]=useState(()=>{let{alpha:d,...S}=Ua(o).value;return {...S,a:d}}),{t:c}=useTranslation(),f=useCallback(()=>{let{alpha:d,...S}=Ua(o).value;s({...S,a:d}),p();},[o,p]),t=useCallback(()=>{let{a:d,...S}=i;n(Va({...S,alpha:r?1:d}));},[i,n,r]),e=useCallback(d=>{s(r?{...d,a:1}:d);},[r]),l=useCallback(d=>{s({...d,a:d.a/100});},[]),u=useCallback(d=>{s({...d,a:d.a});},[]);return jsxs(O,{className:"color-picker__widget",children:[jsx(r?RgbColorPicker:RgbaColorPicker,{color:i,onChange:e}),jsxs(eo,{mt:2,spacing:1,direction:"row",children:[jsx(q,{scheme:m,setScheme:a}),m==="RGB"?jsx(J,{value:{...i,a:Math.round(i.a*100)},onChange:l,disableAlpha:r}):jsx(Y,{value:{...i,a:i.a},onChange:u,disableAlpha:r})]}),jsx(To,{sx:{my:"12px"}}),jsxs(G,{className:"color-picker__widget-actions",children:[jsx(X,{className:"color-picker__widget-actions__cancel",onClick:f,children:c("cancel")}),jsx(V,{className:"color-picker__widget-actions__confirm",onClick:t,children:c("okay")})]})]})},oo=Ho;var to={hideReset:false,disableAlpha:false},Go=({value:o="#ffffff",onChange:p,onReset:n,sx:r,options:m=to,disabled:a=false})=>{let[i,s]=useState(null),{disableAlpha:c=false,hideReset:f=false}={...to,...m},t=useRef(null),e=useCallback(()=>{a||s(t.current);},[a]),l=useCallback(()=>{a||s(null);},[a]),u=useCallback(k=>{p(c?k.substring(0,7):k),s(null);},[p,c]);return jsx(co,{onClickAway:()=>s(null),children:jsxs(eo,{ref:t,bgcolor:"grey.400",borderRadius:"4px",p:"4px",pr:"12px",direction:"row",justifyContent:"space-between",spacing:1,alignItems:"center",className:"color-picker",sx:r,children:[jsxs(eo,{direction:"row",spacing:1,alignItems:"center",className:"color-picker__controls-wrapper",children:[jsx(B,{borderRadius:"5px",width:32,height:32,sx:{backgroundColor:o},className:"color-picker__viewer"}),jsxs(B,{className:"color-picker__actions-wrapper",children:[jsx(K,{className:"color-picker__label",fontWeight:500,fontSize:9,color:"text.primary",textTransform:"uppercase",children:o}),jsx(D,{className:"color-picker__edit-btn",type:"button",onClick:e,disabled:a,children:"Edit"})]})]}),f?jsx("div",{}):jsx(L,{className:"color-picker__close-btn",type:"button",disabled:a,onClick:n,children:jsx(B,{component:"img",src:zb,width:10,height:10})}),jsx(Popper,{anchorEl:i,open:!!i,placement:"top",children:jsx(oo,{initialValue:o,onCancel:l,onConfirm:u,disableAlpha:c})})]})})},ro=Go;var Qe=ro;export{Qe as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-YBRGXFZD.js';import {Dc,J,cb}from'./chunk-WXO77AL5.js';import {Fl}from'./chunk-ROXE5K4B.js';import {useState,useMemo}from'react';import {ResponsiveContainer,AreaChart,Area,Tooltip}from'recharts';import {useTheme}from'@mui/material/styles';import {useTranslation}from'react-i18next';import S from'dayjs';import U from'@mui/material/Box';import {styled,Box,Typography}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var M=styled(Box)(()=>({width:"auto",display:"inline-block",whiteSpace:"nowrap",backgroundColor:"white",padding:"6px",border:"1.5px solid #E6E6E6",borderRadius:"7.5px",backdropFilter:"blur(23.280000686645508px)",boxShadow:"0px 0px 15.52px 0px #4B484729"})),b=styled(Typography)({width:"auto",marginBottom:"4px",fontWeight:500,color:"#4B4847ED",fontSize:"9px",whiteSpace:"nowrap",overflow:"visible"}),w=styled(Typography)({display:"flex",alignItems:"center",gap:"5px",fontWeight:600,color:"#4B4847",fontSize:11,whiteSpace:"nowrap",overflow:"visible",width:"auto"}),K=styled(Box)({display:"flex",alignItems:"center",height:"100%",gap:"2.6px",maxHeight:"19px"}),B=styled(Typography)({fontWeight:500,fontSize:11,lineHeight:"130%",color:"#4B4847",letterSpacing:"-0.14px"});var L=(t,i,r)=>t?.value===void 0||t?.value===null?"":t?.dataKey===Fl.AMOUNT?`${cb(t.value,r).fullAmount}`.trim():`${t.value.toLocaleString()} ${i}`.trim(),W=(t,i,r=0)=>{let a=S(t).add(r,"hour").format(),n=new Date,o=S(a).isSame(n,"year");return J(a,i?void 0:{sameDay:`[Today] ${o?"":"YYYY"}`,nextDay:`[Tomorrow] ${o?"":"YYYY"}`,lastDay:`[Yesterday] ${o?"":"YYYY"}`,sameElse:`MMM DD ${o?"":", YYYY"}`,lastWeek:`MMM DD ${o?"":", YYYY"}`,nextWeek:`MMM DD ${o?"":", YYYY"}`},void 0,void 0,r!==void 0)};var V=({active:t,payload:i,dateRange:r,selectedCurrency:a$1})=>{let{t:n}=useTranslation(),o=S(r?.[0]),u=S(r?.[1]),d=o?.isSame(u,"day");if(t&&i?.length){let e=i[0],f=Dc(e?.dataKey,e?.value),y=e?.payload?.date&&W(e?.payload?.date,d,e?.payload?.hour);return jsxs(M,{className:"chart-tooltip",children:[jsx(b,{children:y??e?.payload?.date}),jsxs(w,{children:[e?.dataKey===Fl.AMOUNT&&jsxs(K,{children:[jsx(a,{currencyCode:a$1,width:12}),jsx(B,{children:a$1})]}),jsx(U,{children:`${L(e,n(f),a$1)}`})]})]})}return null},x=V;var N=[{dataKey:30},{dataKey:32.9941},{dataKey:39.0471},{dataKey:56.3412},{dataKey:69.3118},{dataKey:87.4706},{dataKey:94.3882},{dataKey:110.406}],j=()=>jsx(ResponsiveContainer,{children:jsxs(AreaChart,{margin:{top:40},data:N,children:[jsx("defs",{children:jsxs("linearGradient",{id:"loadingGradient",x1:"0",y1:"0",x2:"0",y2:"1",gradientUnits:"objectBoundingBox",children:[jsx("stop",{offset:"0.54",stopColor:"rgba(67, 67, 67, 0.035)"}),jsx("stop",{offset:"1",stopColor:"rgba(255, 255, 255, 0)"})]})}),jsx(Area,{dataKey:"dataKey",type:"linear",fill:"url(#loadingGradient)",fillOpacity:1,stroke:"#C2C2C2",strokeWidth:1,strokeLinecap:"round",strokeDasharray:"4 4",activeDot:false})]})}),T=j;var tt=({data:t,dataKey:i,isLoading:r,dateRange:a,selectedCurrency:n})=>{let o=useTheme(),[u,d]=useState(false),[e,f]=useState({x:0,y:0}),y=t?.length===0,P=h=>{h.activeCoordinate&&h.isTooltipActive&&f(h.activeCoordinate);},O=useMemo(()=>jsx(x,{position:e,dateRange:a,selectedCurrency:n}),[e,a,n]);return r||y?jsx(T,{}):jsx(ResponsiveContainer,{children:jsxs(AreaChart,{margin:{top:20},data:t,onMouseMove:P,children:[t.length>0&&jsx(Tooltip,{content:O,cursor:{fill:"#A5A8A3",stroke:"#A5A8A3",strokeWidth:1,strokeOpacity:1,stopOpacity:.3,strokeDasharray:"5 5",strokeLinecap:"round",strokeLinejoin:"round"}}),jsx(Area,{dataKey:i,type:"monotone",fill:"#76BB4012",stroke:o.palette.success.dark,activeDot:{r:5,fill:o.palette.success.dark,strokeWidth:2,stroke:"white",cursor:u?"pointer":"default",onMouseOver:()=>d(true),onMouseLeave:()=>d(false)}})]})})},E=tt;var St=E;export{x as a,T as b,St as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-TLKUQ74V.js';import {memo}from'react';import f from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var r=styled(f,{shouldForwardProp:e=>e!=="disabled"})(({theme:e,disabled:o})=>({padding:e.spacing(1),position:"relative",display:"flex",alignItems:"center",gap:"8px",textTransform:"capitalize",cursor:o?"not-allowed":"pointer",flex:1,fontSize:"13px",color:"#20232B"})),m=styled(a)(({theme:e})=>({padding:0,width:"14px !important",svg:{width:"14px !important",height:"14px !important"},"&.Mui-disabled":{'[data-testid="IndeterminateCheckBoxIcon"]':{fill:alpha(e.palette.common.black,.26)}}}));function I({isSelected:e,isDisabled:o,isIndeterminate:l,hideCheckbox:p,onClick:s,children:c,className:t,...x}){let i=o?"disabled menu-item":"menu-item",b=t?`${i} ${t}`:i;return jsxs(r,{className:b,onClick:s,disabled:o,...x,children:[!p&&jsx(m,{size:"small",checked:e,indeterminate:l,disabled:o}),c]})}var d=memo(I);var N=d;export{N as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {e as e$2}from'./chunk-
|
|
1
|
+
import {e as e$2}from'./chunk-QKCWEX4G.js';import {a,f,e as e$1}from'./chunk-6OSSML46.js';import {e}from'./chunk-WDGOOLU7.js';import {a as a$1}from'./chunk-S7OMWEM6.js';import {fb,p}from'./chunk-WXO77AL5.js';import {xb}from'./chunk-ROXE5K4B.js';import {memo,useRef,useMemo,useCallback,useState}from'react';import {styled,Box,Popper}from'@mui/material';import {jsx,jsxs}from'react/jsx-runtime';var L=styled(Box,{shouldForwardProp:t=>t!=="isDisabled"})(({isDisabled:t})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:"4px",...t&&{"& img":{opacity:.3}}}));var W=memo(t=>{let{variant:r="inActive",badgeCount:o,label:i,...a$1}=t,l=useRef(null),p$1=useMemo(()=>!o||Number.isNaN(fb(o))?null:jsx(e,{variant:"inActive",children:p(Number(o))}),[o]),s=useCallback(e=>{e.stopPropagation(),t?.onClick?.(e);},[t]),u=a[r];return jsx(u,{"data-testid":"MultiSelectStatusButton",...a$1,ref:l,onClick:s,children:jsx(f,{children:jsxs(e$1,{variant:r,children:[i,p$1]})})})}),E=W;function Y({buttonLabel:t,onClear:r,onConfirm:o,dropdownItems:i,apiKey:a,data:l,styles:p,buttonDisabled:s}){let[u,e]=useState(null),y=N=>{e(N.currentTarget);},c=()=>{e(null);},d=!!u,f=l?.[a],D=Array.isArray(f)?f.length:0;return jsxs("div",{children:[jsx(E,{onClick:y,label:jsxs(L,{isDisabled:s,children:[t,jsx("img",{src:xb,alt:"arrow-down"})]}),disabled:s,badgeCount:D}),d&&jsx(a$1,{onClick:c}),jsx(Popper,{open:d,anchorEl:u,placement:"bottom-start",sx:{zIndex:9999},children:jsx(e$2,{onCloseDropdown:c,filter:{apiKey:a,data:l,onClear:r,onConfirm:o,options:i,type:"list"},styles:{...p,height:"300px",overflowY:"scroll",maxWidth:"200px"}})})]})}var P=memo(Y);var ct=P;export{ct as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {le}from'./chunk-ROXE5K4B.js';import {styled,Box,Typography}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var a=styled(Box,{shouldForwardProp:o=>o!=="toastPosition"})(({theme:o,toastPosition:t})=>({width:160,position:"absolute",bottom:12,zIndex:1e3,display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:o.palette.background.paper,height:31,gap:o.spacing(1),borderRadius:o.shape.borderRadius,borderWidth:1,padding:o.spacing(1),border:`1px solid ${o.palette.divider}`,boxShadow:"0px 0px 16px 0px #00000014",animation:"slideIn 0.5s ease-out",...t==="bottom-center"&&{left:"50%",transform:"translateX(-50%)"},...t==="bottom-right"&&{right:12,transform:"none"},...t==="bottom-left"&&{left:12,transform:"none"},"@keyframes slideIn":{"0%":{opacity:0,transform:t==="bottom-center"?"translate(-50%, 100%)":t==="bottom-right"?"translateX(100%)":"translateX(-100%)"},"100%":{opacity:1,transform:t==="bottom-center"?"translate(-50%, 0)":"translateX(0)"}}})),n=styled("img")({cursor:"pointer"}),s=styled(Typography)(({theme:o})=>({fontSize:11,fontWeight:500,color:o.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}));function x({message:o="Something went wrong",onRetry:t,position:l="bottom-center",iconSrc:d}){return jsxs(a,{toastPosition:l,children:[jsx(s,{children:o}),jsx(n,{onClick:m=>t?.(m),src:d||le,alt:"toast-icon"})]})}var i=x;var I=i;export{I as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b as b$1}from'./chunk-
|
|
1
|
+
import {b as b$1}from'./chunk-FKD6E26U.js';import {memo}from'react';import {styled}from'@mui/material/styles';import {Box}from'@mui/material';import {jsx,jsxs}from'react/jsx-runtime';var n=styled(b$1)(()=>({backgroundColor:"#EFF1F2",border:"none",display:"flex",alignItems:"center",justifyContent:"center"})),p=styled("span")(()=>({display:"flex",alignItems:"center"}));function l({amount:m,currency:t,...s}){return jsx(n,{disableAnimation:true,expandDirection:"left",...s,children:jsxs(Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:"4px"},children:[t&&jsx(p,{children:t}),m]})})}var i=memo(l);var b=i;export{b as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Hc}from'./chunk-ROXE5K4B.js';import {memo}from'react';import i from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var t=styled(i)(({theme:r})=>({fontSize:"10px",color:r.palette.error.light,padding:"8px",background:r.palette.background.gradient.error,borderRadius:"4px",display:"flex",gap:"4px",alignItems:"center",height:32}));function d({error:r,...p}){return jsxs(t,{...p,children:[jsx("img",{src:Hc,alt:"w"}),r]})}var e=memo(d);var S=e;export{S as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c,e}from'./chunk-
|
|
1
|
+
import {c,e}from'./chunk-BX63HTMQ.js';import {a,c as c$1,d}from'./chunk-6RMDSMJP.js';import {b as b$1,a as a$1}from'./chunk-WGMZ5XLV.js';import {Ra}from'./chunk-WXO77AL5.js';import {Ee}from'./chunk-ROXE5K4B.js';import {createContext,memo,useRef,useContext,useState,useMemo}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {createPortal}from'react-dom';import {styled,Box,Button,alpha,Dialog}from'@mui/material';import Be from'@mui/material/Box';import {Resizable}from're-resizable';import _e from'react-draggable';import {motion}from'framer-motion';var _=createContext({viewerDefaultWidth:555,viewerDefaultHeight:545,position:{x:0,y:0},setPosition:()=>{},dimensions:{width:0,height:0},windowZIndex:1e4,isOpen:true,setIsMaximized:()=>{},setIsSidebarExpanded:()=>{},setIsToolbarAnimationDisabled:()=>{},setIsResized:()=>{},setNewDimensions:()=>{},isMaximized:false,isToolbarAnimationDisabled:true,isSidebarExpanded:false,isResized:false,onClose:()=>{},fullWindowWidth:0,fullWindowHeight:0,resizableRef:{current:null},updateRefSize:()=>{}});var be=555,We=545;function V({children:e,isOpen:o,onClose:r,defaultWindowHeight:d,defaultWindowWidth:s,initialPosition:l}){let{height:p,width:n}=a$1(),a=s||be,i=d||We,[m,f]=useState({x:l?.x??n/2+a/2,y:l?.y??p/2-i/2}),[t,h]=useState(false),[w,W]=useState(false),[u,y]=useState(false),[R,T]=useState(true),H=useRef(),[x,A]=useState({width:0,height:0}),I=({width:v,height:c})=>{H?.current?.updateSize({width:v,height:c});},F=useMemo(()=>({position:m,setPosition:f,resizableRef:H,windowZIndex:1,isOpen:o,setIsMaximized:h,setIsSidebarExpanded:T,setIsToolbarAnimationDisabled:y,setIsResized:W,isMaximized:t,isToolbarAnimationDisabled:u,isSidebarExpanded:R,isResized:w,dimensions:x,setNewDimensions:A,viewerDefaultWidth:a,viewerDefaultHeight:i,onClose:r,fullWindowWidth:n,fullWindowHeight:p,updateRefSize:I}),[m,f,H,o,h,T,y,W,t,u,R,w,x,A,n,p,a,i,I,r]);return jsx(_.Provider,{value:F,children:e})}var b=.5,ee=183,oe=287,te=840,ie=545,N=35;function Ie({title:e$1,onClose:o,onMaximize:r,maximized:d$1=false,id:s,onRequestClick:l,isSidebarExpanded:p=false,isHovered:n=false,onMouseHover:a$1,onMouseLeave:i,showSectionsButton:m,rightActions:f,icon:t}){return jsx(c,{id:s,"data-testid":"UserTitleBar",maximized:d$1||false,children:jsx(e,{onMouseEnter:a$1,onMouseLeave:i,isMaximized:d$1,isHovered:n,title:e$1,icon:t||Ee,leftActions:jsxs(Fragment,{children:[jsx(a,{onClick:o}),jsx(c$1,{isMaximized:d$1,onClick:r}),m&&jsx(d,{onClick:l,isExpanded:!p,isHovered:n,children:"Sidebar"})]}),rightActions:f})})}var re=memo(Ie);var U=re;function Te({isMaximized:e,setIsToolbarAnimationDisabled:o,setIsMaximized:r,onClose:d,isSidebarExpanded:s,setIsSidebarExpanded:l,isToolbarAnimationDisabled:p,title:n,showSectionsButton:a,rightActions:i,icon:m}){let{isHovered:f,onMouseEnter:t,onMouseLeave:h}=b$1();return jsx(motion.div,{style:{...e&&{height:0,zIndex:1e3,position:"relative"}},animate:{...e&&{width:"100vw"},...!e&&{transform:"translateX(0px)",width:"100%"}},transition:{duration:.5,...p&&{duration:0}},children:jsx(U,{title:n||"Users",showSectionsButton:a,onClose:d,onMaximize:()=>{r?.(w=>!w),o?.(true),setTimeout(()=>{o?.(false);},.5*1e3);},maximized:e,id:"draggable-dialog-title",onRequestClick:()=>{o?.(false),l(!s);},isSidebarExpanded:s,isHovered:f,onMouseHover:t,onMouseLeave:h,rightActions:i,icon:m})})}var ae=memo(Te);var de=ae;function ke({children:e,titleBar:o,titleBarText:r,mainAppOrder:d,mainAppIsMinimized:s,showSectionsButton:l=true,rightActions:p,titleBarIcon:n}){let a=useRef(null),{dimensions:i,position:m,resizableRef:f,isMaximized:t,isOpen:h,onClose:w,viewerDefaultWidth:W,viewerDefaultHeight:u,windowZIndex:y,setPosition:R,setNewDimensions:T,isToolbarAnimationDisabled:H,fullWindowWidth:x,fullWindowHeight:A,setIsMaximized:I,setIsResized:F,isResized:v,setIsToolbarAnimationDisabled:c,setIsSidebarExpanded:xe,isSidebarExpanded:ce}=useContext(_),Y=Ra(),D=i.width||W;return createPortal(jsx(_e,{nodeRef:a,disabled:t,handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]',defaultClassName:"draggable-lead-dialog",defaultPosition:{x:x/2-D/2,y:A/2-u/2},position:{x:x-m.x,y:m.y},onStop:(G,O)=>{R({x:x-O.x,y:O.y});},bounds:{top:10},children:jsx(Dialog,{ref:a,sx:{backgroundColor:"transparent",zIndex:Number(d||0)+y,...s&&{display:"none"},transform:"translate(180px, 14px)",...!t&&{width:Y?D:"fit-content",height:Y?u:"fit-content"},...t&&{transform:"none !important"},boxShadow:"0px 0px 20px 0px rgba(0, 0, 0, 0.15)"},PaperProps:{style:{margin:0,maxHeight:"100%",maxWidth:"none",background:"transparent",width:v?"fit-content":D,height:v?"fit-content":"100%",...t&&{width:"100%",height:"100%"},position:"relative"}},onClose:()=>{I(false),c(true),setTimeout(()=>{c(false);},.5*1e3);},open:h,hideBackdrop:true,fullScreen:t,"aria-labelledby":"draggable-dialog-title",disablePortal:true,children:jsx(Resizable,{"data-testid":"Resizable",enable:{left:true,right:true,bottomRight:true,bottom:true,top:true},size:{width:i.width,height:i.height},maxHeight:A-40,maxWidth:x,minWidth:t?"100vw":W,minHeight:t?"100vh":u,ref:G=>{f.current=G;},onResizeStart:()=>{c(true);},onResizeStop:()=>{c(false);},onResize:(G,O,$)=>{F(true),T({width:$.offsetWidth,height:$.offsetHeight});},defaultSize:{width:D,height:u},style:{background:"transparent",height:i.height,overflow:"hidden",...t&&{height:"100% !important",width:"100% !important",flex:1},...t&&{position:"relative"}},children:jsxs(Be,{sx:{height:"100%"},"data-testid":"AppWindow",children:[o??jsx(de,{setIsToolbarAnimationDisabled:c,onClose:w,setIsMaximized:I,isToolbarAnimationDisabled:H,setIsSidebarExpanded:xe,isSidebarExpanded:ce,title:r,isMaximized:t,showSectionsButton:l,rightActions:p,icon:n}),e]})})})}),document.body)}var pe=memo(ke);var Ge=styled(Box,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:o})=>({background:o?"linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)":"transparent",borderRadius:"4px",padding:"4px 8px",color:o?e.palette.common.white:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px",cursor:"pointer"})),Oe=styled(Button)(({theme:e,disabled:o})=>({background:o?alpha(e.palette.info.dark,.4):e.palette.info.dark,color:e.palette.common.white,padding:"0px 8px",fontSize:"9px",fontWeight:600,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",textTransform:"none","&:hover":{background:e.palette.info.dark,opacity:.8},"&.Mui-disabled":{color:e.palette.common.white}})),Ve=styled(Box)(({theme:e})=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"8px",backgroundColor:e.palette.background.paper,padding:"6px",transform:"translateY(calc(-50% - 6px))",boxShadow:"0px 4px 40px 0px rgba(0, 0, 0, 0.19)",borderRadius:"4px",height:"36px",transition:e.transitions.create(["width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.complex})})),Ne=styled(Box)(()=>({position:"fixed",height:35,bottom:0,left:0,right:0,padding:"6px 16px",zIndex:1,backgroundColor:"#eaeaea",backdropFilter:"blur(12px)",display:"flex",justifyContent:"flex-end",borderBottomLeftRadius:"12px",borderBottomRightRadius:"12px"})),Ue=styled(Button)(()=>({padding:"4px 8px",boxShadow:"0px 0px 4px 0px rgba(0, 0, 0, 0.08)",display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"4px",color:"rgba(32, 35, 43, 0.80)",fontWeight:600,fontSize:"9px",textTransform:"none"}));var X=pe;function Ze({children:e,windowProps:o,...r}){return r.isOpen?jsx(V,{...r,children:jsx(X,{...o,children:e})}):null}var me=Ze;function qe({title:e$1,maximized:o=false,id:r,isHovered:d=false,onMouseHover:s,onMouseLeave:l,leftActions:p,titleIconSrc:n,sx:a,...i}){return jsx(c,{className:"header-wrapper",id:r,maximized:o||false,sx:a,...i,children:jsx(e,{onMouseEnter:s,onMouseLeave:l,isMaximized:o,isHovered:d,title:e$1||"",icon:n,leftActions:p})})}var q=memo(qe);function Je({isMaximized:e,id:o,isToolbarAnimationDisabled:r,title:d,leftActions:s,onClose:l,onMaximize:p,sx:n}){let{isHovered:a$1,onMouseEnter:i,onMouseLeave:m}=b$1();return jsx(motion.div,{style:{...e&&{height:0,zIndex:1e3,position:"relative"}},animate:{...e&&{width:"100vw"},...!e&&{transform:"translateX(0px)",width:"100%"}},transition:{duration:.5,...r&&{duration:0}},children:jsx(q,{title:d,maximized:e,id:o||"draggable-dialog-title",isHovered:a$1,onMouseHover:i,onMouseLeave:m,leftActions:s||jsxs(Fragment,{children:[jsx(a,{onClick:l}),jsx(c$1,{isMaximized:e,onClick:()=>p?.(!e)})]}),sx:n})})}var ue=memo(Je);var je=ue;var xt=me;export{_ as a,V as b,b as c,ee as d,oe as e,te as f,ie as g,N as h,U as i,Ge as j,Oe as k,Ve as l,Ne as m,Ue as n,X as o,q as p,je as q,xt as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c}from'./chunk-
|
|
1
|
+
import {c}from'./chunk-UNZG4C4Y.js';import {memo,useState,useEffect}from'react';import {useTranslation}from'react-i18next';import g from'@mui/material/Box';import k from'@mui/material/Button';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var A=styled(g)(({theme:e})=>({background:e.palette.grey[700],width:27,height:14,display:"inline-flex",alignItems:"center",marginInlineStart:"4px",borderRadius:"10px",padding:"2px 6px",img:{cursor:"pointer"}})),I=styled(g)(()=>({padding:"8px 16px",display:"flex",gap:"8px",justifyContent:"center"})),h=styled(k)(({theme:e})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${e.palette.info.dark}`,backgroundColor:e.palette.info.dark,fontWeight:700,fontSize:"11px",color:e.palette.common.white,"&:hover":{backgroundColor:e.palette.info.dark}})),w=styled(k)(({theme:e})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.common.white,fontWeight:500,fontSize:"11px",color:e.palette.text.primary,"&:hover":{background:"transparent"}}));function T({onCloseDropdown:e,filter:r,styles:f}){let[C,L]=useState([]),[S,O]=useState([]),{t:u}=useTranslation(),x=t=>{let o=r?.data?.[r.apiKey]??[];if(Array.isArray(o)&&o.length)return new Set(o).has(t)};useEffect(()=>{let t=o=>o.map(({placeholder:s,value:n,isSelected:a,icon:l,options:i})=>({...s&&{label:s},name:n,selected:(a||x(n)||i?.every(({value:p})=>x(p)))??false,...l&&{icon:l},...i?.length&&{menuItems:t(i)}}));r.options&&O(t(r.options));},[r?.data]);let V=t=>{e(t);},v=t=>{let o=C.reduce((n,{options:a,apiKey:l,isSelected:i})=>{if(a){let p=a.filter(({isSelected:m})=>m);p.length&&n.push(...p.map(({apiKey:m})=>m));}else i&&n.push(l);return n},[]),s=new Set(o);Object.keys(C).length&&r?.onConfirm?.({[r.apiKey]:[...s]}),e(t);},B=t=>{let o=s=>s.map(({name:n,selected:a,menuItems:l,label:i})=>({...i&&{placeholder:i},apiKey:n,isSelected:a,...l?.length&&{options:o(l)}}));L(o(t));};return jsx(c,{"data-testid":"ColumnFilter_List",title:u("filterBy")||"Filter by",menuItems:S,style:f,sx:t=>({marginTop:"10px",textAlign:"left",boxShadow:t.shadows[3],".nested-menu-item":{height:41,zIndex:9999},...f}),updatedList:B,footer:jsxs(I,{sx:{position:"sticky",bottom:0,backgroundColor:"white",zIndex:99999},children:[jsx(w,{onClick:V,children:u("cancel")},"nested-dropdown-cancel"),jsx(h,{onClick:v,children:u("okay")},"nested-dropdown-ok")]})})}var b=memo(T);var Q=b;export{A as a,I as b,h as c,w as d,Q as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-ARSSSITK.js';import {memo}from'react';import {styled}from'@mui/material';import {jsx}from'react/jsx-runtime';var p=styled(a$1)(({theme:t})=>({...t.typography.subtitle1,fontWeight:t.typography.fontWeightMedium,borderRadius:"4px",paddingInline:"8px",paddingBlock:"8.5px",minWidth:"auto"}));function a(t){return jsx(p,{...t,variant:"inActive"})}var i=memo(a);var y=i;export{y as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {kg}from'./chunk-ROXE5K4B.js';import {useTranslation}from'react-i18next';import {styled,Box}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var a=styled(Box)(()=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"#F6F8FACC",gap:"0.5rem",height:"100%"})),m=styled("img")(()=>({width:"2rem",height:"2rem"})),n=styled("h1")(({theme:t})=>({fontWeight:600,fontSize:"1rem",color:t.palette.text?.primary,padding:0,margin:0})),s=styled("p")(({theme:t})=>({fontWeight:400,fontSize:"0.75rem",color:t.palette.text?.primary,padding:0,margin:0,opacity:.5}));function o({heading:t,message:y,...d}){let{t:p}=useTranslation();return jsxs(a,{...d,children:[jsx(m,{src:kg,alt:"empty container"}),jsx(n,{children:p(t)}),jsx(s,{children:p(y)})]})}var I=o;export{I as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-F5BRCMX3.js';import {a as a$1}from'./chunk-S7OMWEM6.js';import {xb,y}from'./chunk-ROXE5K4B.js';import je,{memo,forwardRef,useMemo,useState,useEffect}from'react';import Q from'@mui/material/Box';import {styled}from'@mui/material/styles';import Ve from'@mui/material/TextField';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {styled as styled$1,Popper,Box,CircularProgress,ClickAwayListener}from'@mui/material';import pt from'@mui/material/InputLabel';import lt from'@mui/material/MenuItem';import nt from'@mui/material/FormControl';import re from'@mui/material/Select';import bt from'@mui/material/Skeleton';import Rt from'@mui/material/Input';var Z=styled(Q)(()=>({display:"flex",flexDirection:"column",gap:"4px",width:"100%",height:40,"& *":{flex:1,margin:"0 !important"}})),V=styled(Ve,{shouldForwardProp:e=>e!=="hideArrows"})(({theme:e,error:t,hideArrows:n,disabled:o})=>({border:`1px solid ${e.palette.divider}`,...o&&{backgroundColor:e.palette.grey[400]},borderRadius:"4px",...!!t&&{border:`1px solid ${e.palette.error.main}`},...n&&{"& input[type=number]":{MozAppearance:"textfield"},"& input[type=number]::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:0},"& input[type=number]::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0}},"& .MuiFormLabel-asterisk":{color:"red"},"& .MuiInputBase-root":{maxHeight:"40px !important",alignItems:"flex-end !important",fontSize:"11px",height:"40px",padding:"8px",borderRadius:"4px"},"& .MuiInputBase-input":{margin:0,padding:0,color:e.palette.text.primary},"& .MuiFormLabel-root":{fontSize:"10px",fontWeight:500,lineHeight:"100%",transform:"translate(0, 8px) scale(1)",color:e.palette.grey[700],padding:"8px","&.MuiFormLabel-filled, &.Mui-focused":{transform:"translate(0, -1.5px) scale(0.75) "},"&.Mui-focused":{fontSize:"10px",fontWeight:500,lineHeight:"100%"}}})),j=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}));var ee=je.forwardRef(({name:e,onChange:t,hasError:n,helperText:o,hideArrows:f,...i},p)=>{let l=d=>{t?.(d.target.value??"");};return jsxs(Q,{children:[jsx(Z,{"data-testid":"InputBase",children:jsx(V,{rows:1,error:n,fullWidth:true,size:"small",variant:"standard",ref:p,name:e,type:i.type??"text",label:i.placeholder||i.label,onChange:l,InputProps:{disableUnderline:true},hideArrows:f,...i})}),jsx(j,{children:o})]})});ee.displayName="InputBase";var te=ee;var rt=te;var H=styled(nt)(({theme:e})=>({minWidth:52,height:"40px !important",maxHeight:"40px !important",backgroundColor:"transparent",width:"100%","& .MuiFormLabel-asterisk":{color:"red"},"& .MuiFormLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)",color:`${e.palette.grey[700]} !important`},".MuiFormLabel-root.MuiFormLabel-filled":{transform:"translate(8px, 8px) scale(0.75) "},".MuiFormLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)",fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%"}}));styled(re)(({theme:e})=>({fontSize:"11px",lineHeight:"11px",color:e.palette.common.black,borderRadius:"4px",boxShadow:e.shadows[17],border:"none",outline:"none","&:focus":{border:"1px solid #1F88D0"},"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:"rgba(0, 0, 0, 0.23)"},"&.Mui-focused fieldset":{border:"2px solid red"}},minWidth:52,height:"40px !important",maxHeight:"40px !important",width:"100%","& .MuiFormLabel-asterisk":{color:"red"},"& .MuiFormLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)"},".MuiFormLabel-root.MuiFormLabel-filled":{transform:"translate(8px, 8px) scale(0.75) "},".MuiFormLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)",fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%"}}));var N=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"})),z=styled(re)(({theme:e,error:t})=>({width:"100%",height:"40px !important",maxHeight:"40px !important",borderRadius:"4px",overflow:"hidden",backgroundColor:e.palette.grey[400],"&.Mui-disabled":{backgroundColor:e.palette.grey[400]},".MuiSelect-select":{padding:"0 8px !important",height:"40px !important",maxHeight:"40px !important",display:"flex",alignItems:"flex-end !important",backgroundColor:`${e.palette.grey[400]} !important`,borderRadius:"4px",fontSize:"11px"},".MuiSelect-filled":{padding:"0 8px !important"},"&.MuiInputBase-adornedStart > div:nth-of-type(1)":{backgroundColor:"red"},...t&&{border:`1px solid ${e.palette.error.main}`}})),$=styled(Q)(()=>({display:"flex",alignItems:"stretch",height:"100%",flexDirection:"column",flex:1}));function st({required:e,hasError:t,label:n,value:o,helperText:f,onChange:i,options:p,isOptionEqualToValue:l,renderOption:d,getOptionValue:s,isLoading:g,children:u,getOptionLabel:y,...h},C){let a=m=>{i?.(m);},S=()=>d?d(o):y?y(o):o.label;return jsxs($,{children:[jsxs(H,{variant:"filled","data-testid":"SelectBase",required:e,children:[jsx(pt,{sx:{height:"100%"},id:`select-label-${n.trim()}`,"data-testid":"SelectBase_InputLabel",children:n}),jsx(z,{"data-testid":"SelectBase_Select",ref:C,value:(s?s(o):o?.id)??"",error:t,disableUnderline:true,required:e,labelId:`select-label-${n.trim()}`,id:`select-label-${n.trim()}`,renderValue:S,...h,disabled:h.disabled||g,endAdornment:g?jsx(CircularProgress,{size:20,sx:{backgroundColor:"transparent",color:m=>m.palette.grey.A400}}):null,children:u||p?.map((m,B)=>{let r=l?l(m,o):m?.id===o?.id;return jsx(lt,{disabled:!!m.disabled,value:(s?s(m):m?.id)??"",onClick:()=>{a(m);},sx:{fontSize:"12px",backgroundColor:c=>r?c.palette.action.hover:c.palette.common.white},children:d?d(m):m.label},`country-item-${B}`)})})]}),jsx(N,{children:f})]})}var ne=je.forwardRef(st);function gt({required:e,hasError:t,label:n,value:o,helperText:f,onChange:i,options:p,isOptionEqualToValue:l,renderOption:d,getOptionValue:s,isLoading:g,children:u,getOptionLabel:y,...h},C){let a=r=>{i?.(r);},S=()=>s?o?.map(s):o?.map(r=>r?.id),m=useMemo(()=>p?.filter(r=>o?.some(c=>l?l(r,c):r.id===c?.id)),[p,o,l]),B=()=>m?.map(r=>y?y(r):r.label)?.join(", ");return jsxs($,{children:[jsxs(H,{variant:"filled","data-testid":"SelectBase",required:e,children:[jsx(pt,{id:`select-label-${n.trim()}`,"data-testid":"SelectBase_InputLabel",children:n}),jsx(z,{multiple:true,"data-testid":"SelectBase_Select",ref:C,value:S()??"",error:t,disableUnderline:true,required:e,labelId:`select-label-${n.trim()}`,id:`select-label-${n.trim()}`,renderValue:B,...h,disabled:h.disabled||g,endAdornment:g?jsx(CircularProgress,{size:20,sx:{backgroundColor:"transparent",color:r=>r.palette.grey.A400}}):null,onChange:r=>{let L=r.target.value?.map(I=>p?.find(X=>s?s(X)===I:X.id===I));i?.([...L]);},children:u||p?.map((r,c)=>{let L=l?l(r,o):r?.id===o?.id;return jsx(lt,{value:(s?s(r):r?.id)??"",onClick:()=>{a(r);},sx:{fontSize:"12px",backgroundColor:I=>L?I.palette.action.hover:I.palette.common.white},children:d?d(r):r.label},`country-item-${c}`)})})]}),jsx(N,{children:f})]})}var ie=je.forwardRef(gt);var xt=ne;var pe=styled$1("button")(({theme:e,disabled:t})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"10.889px",borderRadius:"3px"},".arrow":{width:14},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px"},height:24,cursor:t?"default":"pointer",opacity:t?.5:1})),le=styled$1(Popper)(({theme:e})=>({zIndex:9999,backgroundColor:e.palette.common.white,padding:"4px 8px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,width:100})),se=styled$1("ul")(()=>({listStyle:"none",padding:0,margin:0,maxHeight:100,overflow:"auto"})),de=styled$1("li")(({theme:e})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"10.889px",borderRadius:"3px"},".arrow":{width:14},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px"},height:24,cursor:"pointer"})),ue=styled$1(a)(()=>({height:24,padding:"4px",marginBottom:"4px"})),me=styled$1(Box)(()=>({color:"red !important"}));function xe({isLoading:e,countries:t,value:n,onCountryChange:o,required:f,disabled:i}){let[p,l]=useState(),[d,s]=useState(null),[g,u]=useState([]),[y$1,h]=useState(""),C=!!d&&!i,a=r=>{r.stopPropagation(),s(r.currentTarget);},S=()=>{s(null);},m=r=>{o?.(r),l(r),S(),u(t);},B=r=>{let c=r.target.value.toString()??"";if(h(c),!c){u(t);return}let L=t.filter(I=>I.idd_prefix.toString().startsWith(c)||I.iso2.toLowerCase().startsWith(c.toLowerCase()));u(L);};return useEffect(()=>{n&&l(n);},[n?.countryId]),useEffect(()=>{t.length&&u(t);},[t.length]),jsxs(Q,{"data-testid":"CountriesList",sx:{position:"relative"},children:[jsx(pe,{type:"button","aria-describedby":"CountriesList_CountriesWrapper",onClick:a,disabled:e||i,sx:{backgroundColor:"transparent",border:"none",height:34,paddingInlineStart:"8px"},children:e?jsx(bt,{variant:"rectangular",width:56.5,height:20,sx:{borderRadius:"4px"}}):jsxs(Fragment,{children:[p&&jsxs(Fragment,{children:[jsx("img",{src:p.logo,alt:"c",className:"logo"}),jsx("span",{children:`+${p?.idd_prefix}`})]}),f&&jsx(me,{component:"span",children:"*"}),jsx(Q,{component:"img",src:xb,alt:"d",className:"arrow",sx:{...C&&{transform:"rotate(180deg)"}}})]})}),C&&jsx(a$1,{onClick:S,sx:{zIndex:9999}}),C&&jsx(ClickAwayListener,{onClickAway:S,children:jsxs(le,{id:"CountriesList_CountriesWrapper",open:C,anchorEl:d,"data-testid":"CountriesList_CountriesWrapper",placement:"bottom-start",children:[jsx(ue,{endAdornment:jsx("img",{src:y,alt:"arrow"}),onChange:B,hideArrows:true,"data-testid":"CountriesList_InputStyled",value:y$1}),jsx(se,{"data-testid":"CountriesList_CountriesListStyled",children:g.map(r=>{let c=p?.countryId===r.countryId;return jsxs(de,{onClick:()=>{m(r);},sx:{backgroundColor:c?"#F9F9F9":"transparent",color:c?"#000":"#8D8D94"},children:[jsx("img",{src:r.logo,alt:"c",className:"logo"}),jsx("span",{children:`+${r.idd_prefix}`})]},`country-code-${r.countryId}`)})})]})})]})}xe.displayName="CountriesList";var ye=memo(xe);var _=ye;var Ce=styled(Q,{shouldForwardProp:e=>e!=="hasError"})(({theme:e,hasError:t})=>({border:`1px solid ${e.palette.divider}`,display:"flex",position:"relative",paddingInline:"8px",paddingInlineStart:"0px",alignItems:"center",borderRadius:"4px",height:"40px",...t&&{border:`1px solid ${e.palette.error.main}`}})),be=styled(a)(({error:e})=>({border:"none",paddingInlineEnd:0,img:{cursor:"pointer"},...e&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,borderBottom:"none"}})),Se=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"})),Ie=styled(Q)(()=>({flex:1}));function Be({phoneValue:e,hasError:t,countries:n,isCountriesLoading:o,countryValue:f,onCountryChange:i,onPhoneChange:p,helperText:l,countryError:d,required:s,disabled:g,...u},y){return jsxs(Ie,{"data-testid":"PhoneInput",children:[jsxs(Ce,{"data-testid":"PhoneInput_MobileWrapper",hasError:t,children:[jsx(_,{isLoading:o,countries:n,value:f,onCountryChange:a=>{i?.(a);},required:s,disabled:g}),jsx(be,{value:e,"data-testid":"PhoneInput_InputNumberStyled",ref:y,inputProps:{autoComplete:"off"},error:t,disabled:g,...u,onChange:a=>{p?.(a.target.value);},hideArrows:true})]}),jsx(Se,{children:l})]})}Be.displayName="PhoneInputBase";var Le=je.forwardRef(Be);var Mt=Le;var we=styled$1("button")(({theme:e})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"10.889px",borderRadius:"3px"},".arrow":{width:14},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px"},height:24,cursor:"pointer"})),ve=styled$1(Popper)(({theme:e})=>({zIndex:99,backgroundColor:e.palette.common.white,padding:"4px 8px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,width:100})),Pe=styled$1("ul")(()=>({listStyle:"none",padding:0,margin:0,maxHeight:100,overflow:"auto"})),Re=styled$1("li")(({theme:e})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"10.889px",borderRadius:"3px"},".arrow":{width:14},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px"},height:24,cursor:"pointer"})),Ee=styled$1(Box)(()=>({color:"red !important"}));function Fe({isLoading:e,currencies:t,value:n,onCurrencyChange:o,required:f}){let[i,p]=useState(),[l,d]=useState(null),[s,g]=useState([]),u=!!l,y=a=>{a.stopPropagation(),d(a.currentTarget);},h=()=>{d(null);},C=a=>{o?.(a),p(a),h(),g(t);};return useEffect(()=>{n&&p(n);},[n?.currencyId]),useEffect(()=>{t.length&&g(t);},[t.length]),jsxs(Q,{"data-testid":"currenciesList",sx:{position:"relative"},children:[jsx(we,{type:"button","aria-describedby":"currenciesList_currenciesWrapper",onClick:y,disabled:e,sx:{backgroundColor:"transparent",border:"none",height:34,paddingInlineStart:"8px"},children:e?jsx(bt,{variant:"rectangular",width:56.5,height:20,sx:{borderRadius:"4px"}}):jsxs(Fragment,{children:[i&&jsxs(Fragment,{children:[jsx("img",{src:i.logo,alt:"c",className:"logo"}),jsx("span",{children:i?.code.english})]}),f&&jsx(Ee,{component:"span",children:"*"}),jsx(Q,{component:"img",src:xb,alt:"d",className:"arrow",sx:{...u&&{transform:"rotate(180deg)"}}})]})}),u&&jsx(a$1,{onClick:h}),u&&jsx(ve,{id:"currenciesList_currenciesWrapper",open:u,anchorEl:l,"data-testid":"currenciesList_currenciesWrapper",placement:"bottom-start",children:jsx(Pe,{"data-testid":"currenciesList_currenciesListStyled",children:s.map(a=>{let S=i?.currencyId===a.currencyId;return jsxs(Re,{onClick:()=>{C(a);},sx:{backgroundColor:S?"#F9F9F9":"transparent",color:S?"#000":"#8D8D94"},children:[jsx("img",{src:a.logo,alt:"c",className:"logo"}),jsx("span",{children:a?.code.english})]},`currency-code-${a.currencyId}`)})})})]})}Fe.displayName="CurrenciesList";var He=memo(Fe);var Ne=He;var $e=styled(Rt,{shouldForwardProp:e=>!["hasError","hideArrows"].includes(e)})(({theme:e,hideArrows:t})=>({padding:"8px",border:`1px solid ${e.palette.divider}`,borderRadius:"4px",height:32,color:e.palette.text.primary,fontSize:"11px",outline:0,maxWidth:"100%",display:"flex",flexGrow:1,"::placeholder":{color:e.palette.grey[700],fontWeight:400},...t&&{"& input[type=number]":{MozAppearance:"textfield"},"& input[type=number]::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:0},"& input[type=number]::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0}}})),Te=styled(Q)(()=>({flex:1}));function Wt({hasError:e,hideArrows:t,inputProps:n,...o},f){return jsx(Te,{onClick:i=>{i.stopPropagation();},children:jsx($e,{ref:f,placeholder:o.placeholder,hideArrows:true,hasError:e,disableUnderline:true,inputProps:{...n,type:"number"},onKeyDown:i=>{["e","E","+","-"].includes(i.key)&&i.preventDefault();},...o})})}var De=forwardRef(Wt);var qe=De;var Oe=styled(Q,{shouldForwardProp:e=>e!=="hasError"})(({theme:e,hasError:t})=>({border:`1px solid ${e.palette.divider}`,display:"flex",justifyContent:"space-between",position:"relative",paddingInline:"8px",paddingInlineStart:"0px",alignItems:"center",borderRadius:"4px",height:"40px",...t&&{border:`1px solid ${e.palette.error.main}`}})),Ue=styled(Q)(()=>({width:"50px"})),Ge=styled(qe)(({error:e})=>({border:"none",paddingInlineEnd:0,img:{cursor:"pointer"},...e&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,borderBottom:"none"}})),Ke=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"})),Je=styled(Q)(()=>({flex:1}));function Xe({amountValue:e,hasError:t,currencies:n,isCurrenciesLoading:o,currencyValue:f,onCurrencyChange:i,onAmountChange:p,onAmountBlur:l,helperText:d,required:s,...g},u){return jsxs(Je,{"data-testid":"AmountInput",children:[jsxs(Oe,{"data-testid":"AmountInput_MobileWrapper",hasError:t,children:[jsx(Ne,{isLoading:o,currencies:n,value:f,onCurrencyChange:a=>{i?.(a);},required:s}),jsx(Ue,{children:jsx(Ge,{value:e,"data-testid":"AmountInput_InputNumberStyled",ref:u,inputProps:{autoComplete:"off"},error:t,...g,onChange:a=>{p?.(a.target.value);},onBlur:a=>{l?.(a.target.value);},hideArrows:true})})]}),jsx(Ke,{children:d})]})}Xe.displayName="AmountInputBase";var Ye=je.forwardRef(Xe);var At=Ye;export{rt as a,ie as b,xt as c,_ as d,Mt as e,At as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-OWWED4PY.js';import {a as a$3}from'./chunk-4W6J54AY.js';import {a as a$1}from'./chunk-TLKUQ74V.js';import {a as a$4}from'./chunk-NKNRVF6Q.js';import {a}from'./chunk-CNIYZZCP.js';import {qb,zb,y,xb,Kc}from'./chunk-ROXE5K4B.js';import re,{useState,useRef,useMemo}from'react';import {Box,CircularProgress,Typography}from'@mui/material';import le from'@mui/material/ClickAwayListener';import f from'@mui/material/Box';import j from'@mui/material/Input';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';styled(a)(({theme:e})=>({fontSize:"10px",color:e.palette.grey[700],fontWeight:600,lineHeight:"10px"}));styled(a)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,fontWeight:600,lineHeight:"14.3px",width:200}));styled(f)(()=>({display:"flex",flexDirection:"column",maxHeight:400,overflow:"auto",gap:"8px"}));var A=styled(j)(({theme:e})=>({width:"inherit",height:32,padding:"11px 12px",fontSize:"10px",borderRadius:"5px",backgroundColor:"#F9F9F9",border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.info.dark}}));styled(a$1)(()=>({padding:0,width:12,height:12,".MuiSvgIcon-root, img":{width:12,height:12}}));var L=styled(f)(()=>({display:"flex",flexDirection:"column",gap:"8px",padding:"4px"})),B=styled(f)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap",paddingInlineEnd:"20px"})),M=styled(f)(({theme:e,maxWidth:p})=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:`${e.palette.info.dark}1a`,fontSize:"10px",fontWeight:500,cursor:"pointer",...p&&{maxWidth:`${p}%`}}));styled(a)(({theme:e})=>({display:"flex",gap:"8px",alignItems:"center",fontSize:"10px",fontWeight:500,color:e.palette.common.black,cursor:"pointer",padding:8}));var H=styled(f)(({theme:e})=>({width:"100%",flexDirection:"column",border:`1px solid ${e.palette.grey[100]}`,borderRadius:"4px",backgroundColor:e.palette.grey[400],minWidth:"89px",position:"relative"})),z=styled(f)(()=>({position:"absolute",right:8,bottom:13.5,width:15,height:15}));var D=(e,p,l)=>e.map(n=>{let c=n?.options.map(i=>{let S=i?.options?.filter(r=>l.some(m=>r?.[m]?.toLowerCase().includes(p.toLowerCase())));return {...i,options:S}}).filter(i=>i?.options?.length>0);return {...n,options:c}}).filter(n=>n?.options?.length>0);function N({childOption:e,selectedOptions:p,onChangeOptions:l}){let[n,c]=useState(null),i=r=>{l([...p||[],r]);},S=r=>{l(p?.filter(m=>m.value!==r.value)||[]);};return jsxs(a$2,{onMouseEnter:r=>{e.options?.length>0&&c(r.currentTarget);},onMouseLeave:()=>{n&&c(null);},children:[jsxs(Box,{sx:{display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",maxWidth:"220px",minWidth:"89px"},children:[e.label,jsx("img",{src:qb,className:"arrow-icon",alt:"arrow"})]}),jsx(a$3,{sx:{maxHeight:"450px",overflow:"auto"},open:!!n,anchorEl:n,placement:"right-start",children:e.options?.map(r=>{let a=!!p?.find(d=>d.value===r.value);return jsx(a$2,{isSelected:a,onClick:d=>{d.stopPropagation(),d.preventDefault(),a?S(r):i(r);},children:jsx(Box,{sx:{flex:1,maxWidth:"220px",minWidth:"89px"},children:r.label})},r.value)})})]})}function G({parentOption:e,selectedOptions:p,onChangeOptions:l}){let[n,c]=useState(null);return jsxs(a$2,{onMouseEnter:i=>{e.options?.length>0&&c(i.currentTarget);},onMouseLeave:()=>{n&&c(null);},children:[jsxs(Box,{sx:{display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",maxWidth:"340px",minWidth:"89px"},children:[e.label,jsx("img",{src:qb,className:"arrow-icon",alt:"arrow"})]}),jsx(a$3,{sx:{maxHeight:"450px",overflow:"auto"},open:!!n,anchorEl:n,placement:"right-start",children:e.options?.map(i=>jsx(N,{childOption:i,selectedOptions:p,onChangeOptions:l},i.label))})]})}function ae({nestedOptions:e,onChangeOptions:p,selectedOptions:l,placeholder:n,isLoading:c,searchBy:i=["label"],disabled:S}){let[r,m]=useState(null),[a,d]=useState(""),q=useRef(null),y$1=!!r,J=t=>{m(y$1?null:t.currentTarget);},K=()=>{m(null);},Q=()=>{a&&d("");},Y=useMemo(()=>a?D(e,a,i):e,[e,a,i]),Z=c?jsx(CircularProgress,{size:16}):jsx(a$4,{src:a?zb:y,alt:a?"close":"search",onClick:Q,sx:{width:12,height:12}}),x=Number(l?.length??0);return jsx(le,{onClickAway:()=>{y$1&&K();},children:jsxs(H,{id:"TriggerWrapper",onClick:t=>!S&&J(t),ref:q,children:[jsx(Typography,{color:"grey",sx:{cursor:"pointer",fontSize:"10px",padding:"4px"},component:"label",children:n}),x===0&&jsx(Typography,{sx:{fontWeight:500,fontSize:"11px",padding:"0px 4px 4px"},component:"p",children:"Please Select"}),jsx(z,{component:"img",src:xb,alt:"down arrow",sx:{...y$1&&{transform:"rotate(180deg)"}}}),!!x&&jsx(B,{id:"SelectedBadgesWrapper",children:x>0&&x<=2?l?.map(t=>jsxs(M,{maxWidth:90,children:[jsx(a$4,{src:Kc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{children:t.label})]},t.value)):x>2&&l?.slice(0,2)?.map((t,b)=>jsxs(re.Fragment,{children:[jsxs(M,{maxWidth:90,children:[jsx(a$4,{src:Kc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{children:t.label})]}),b===1&&jsx(M,{maxWidth:90,children:jsxs("span",{children:["+",x-2]})})]},t.value))}),jsx(a$3,{open:y$1,anchorEl:r,sx:{margin:"8px 0",maxHeight:330,overflow:"auto",maxWidth:"340px"},children:jsxs(L,{children:[jsx(A,{placeholder:n||"Select",endAdornment:Z,onClick:t=>{t.stopPropagation();},value:a,onChange:t=>{d(t.target.value);},disableUnderline:true,sx:{cursor:"default",width:"100%",backgroundColor:"white",border:"1px solid #F2F2F2",...e.length&&{marginBottom:"4px"},...a&&{cursor:"pointer"}}}),jsx(B,{children:l?.map(t=>jsxs(M,{sx:{maxWidth:"150px"},onClick:b=>{b.stopPropagation(),b.preventDefault(),p(l?.filter(_=>_.value!==t.value)||[]);},children:[jsx(a$4,{src:Kc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.label}),jsx(a$4,{src:zb,alt:"close",sx:{width:9,height:9}})]},t.value))}),Y?.map(t=>jsx(G,{parentOption:t,selectedOptions:l,onChangeOptions:p},t.label))]})})]})})}var X=ae;var Qe=X;export{N as a,G as b,Qe as c};
|