@tap-payments/os-micro-frontend-shared 0.3.169 → 0.3.171
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-RJ2CHCRC.js → chunk-2IEIHK5L.js} +1 -1
- package/build/_chunks/{chunk-YNCRHG2V.js → chunk-2II3PIPV.js} +1 -1
- package/build/_chunks/{chunk-37MMGHJP.js → chunk-32XNGJJX.js} +1 -1
- package/build/_chunks/{chunk-55DNPRT6.js → chunk-4AM27BVT.js} +1 -1
- package/build/_chunks/{chunk-CATRH4QL.js → chunk-4BDCKXPD.js} +1 -1
- package/build/_chunks/{chunk-BUZKD5FY.js → chunk-4Q3P5OVC.js} +1 -1
- package/build/_chunks/{chunk-LDK72NPY.js → chunk-4Z3NCIRW.js} +1 -1
- package/build/_chunks/{chunk-U4BS6S22.js → chunk-57FCA4PR.js} +1 -1
- package/build/_chunks/{chunk-IEKEIKGI.js → chunk-5ONMPFXY.js} +1 -1
- package/build/_chunks/{chunk-KAZ3B4EF.js → chunk-5SLDZGLX.js} +1 -1
- package/build/_chunks/{chunk-4XJAK7Y3.js → chunk-5ZZCVF4B.js} +1 -1
- package/build/_chunks/{chunk-HVSVEO2H.js → chunk-6G45KTCP.js} +1 -1
- package/build/_chunks/{chunk-TJ3OW2D3.js → chunk-73MHTQIF.js} +1 -1
- package/build/_chunks/{chunk-EWNP6TOO.js → chunk-74AGBIWJ.js} +1 -1
- package/build/_chunks/{chunk-MOOH3WQ6.js → chunk-7D6GNZ4V.js} +1 -1
- package/build/_chunks/chunk-7YUGABD6.js +1 -0
- package/build/_chunks/{chunk-FJU2BCBZ.js → chunk-AALHIAWL.js} +1 -1
- package/build/_chunks/{chunk-J4335JLA.js → chunk-AJVH62M3.js} +1 -1
- package/build/_chunks/{chunk-WRVGVKKK.js → chunk-ALU4ED6U.js} +1 -1
- package/build/_chunks/{chunk-2M46764T.js → chunk-AMD6YF2E.js} +1 -1
- package/build/_chunks/{chunk-M5HH57QL.js → chunk-BBC44PBI.js} +1 -1
- package/build/_chunks/{chunk-TGRKEJOI.js → chunk-BFBXNTIB.js} +1 -1
- package/build/_chunks/{chunk-ER5YRXAN.js → chunk-BMUPHUDC.js} +1 -1
- package/build/_chunks/{chunk-2LRXPCXS.js → chunk-C6VKE434.js} +1 -1
- package/build/_chunks/{chunk-GI5WPWRG.js → chunk-CBUJ5RW2.js} +1 -1
- package/build/_chunks/chunk-CC2T7ZQ2.js +1 -0
- package/build/_chunks/{chunk-SZ2JIMZR.js → chunk-CSUO5V7Y.js} +1 -1
- package/build/_chunks/{chunk-FTQKOVBZ.js → chunk-DLYIC7LX.js} +1 -1
- package/build/_chunks/{chunk-QXSUU6NA.js → chunk-DZRT5LO3.js} +1 -1
- package/build/_chunks/{chunk-VFOCLQKK.js → chunk-EA6MZFQ5.js} +1 -1
- package/build/_chunks/{chunk-IU2CIO6M.js → chunk-ELYWQI63.js} +1 -1
- package/build/_chunks/chunk-ERYXQBTU.js +1 -0
- package/build/_chunks/{chunk-RXLAHJVL.js → chunk-EUEVNPSG.js} +1 -1
- package/build/_chunks/{chunk-CM775HHS.js → chunk-FG5WYGID.js} +1 -1
- package/build/_chunks/{chunk-2L6YN6BY.js → chunk-FYMLKBWA.js} +1 -1
- package/build/_chunks/{chunk-23MKWEAQ.js → chunk-FYWEAGW7.js} +1 -1
- package/build/_chunks/{chunk-YZJXQCM7.js → chunk-GZAQEIWS.js} +1 -1
- package/build/_chunks/{chunk-7VD4W2MV.js → chunk-HAOFRIMW.js} +1 -1
- package/build/_chunks/chunk-HCZUDLZR.js +1 -0
- package/build/_chunks/{chunk-MY32HZWD.js → chunk-HFYCWBSA.js} +1 -1
- package/build/_chunks/chunk-IHNM2KRX.js +15 -0
- package/build/_chunks/{chunk-NTLRKE5H.js → chunk-IP74OBDP.js} +1 -1
- package/build/_chunks/{chunk-QG7IDQOX.js → chunk-JSSZZ4ZU.js} +1 -1
- package/build/_chunks/chunk-JVX2RO7Q.js +1 -0
- package/build/_chunks/{chunk-WXOQQKYA.js → chunk-KJKTKQFF.js} +1 -1
- package/build/_chunks/{chunk-5SZU46PP.js → chunk-KSOVBMNE.js} +1 -1
- package/build/_chunks/{chunk-VGIO2RGM.js → chunk-KUOKFWXS.js} +1 -1
- package/build/_chunks/{chunk-5ETS6LOQ.js → chunk-LPU4DLAN.js} +1 -1
- package/build/_chunks/{chunk-RDCA43PM.js → chunk-LS5NCSOA.js} +1 -1
- package/build/_chunks/{chunk-ZUSZEL4Y.js → chunk-MW4KHDFL.js} +1 -1
- package/build/_chunks/{chunk-N2LPXJYV.js → chunk-MXXAZH6N.js} +1 -1
- package/build/_chunks/{chunk-VB4YIOWN.js → chunk-O6C2464W.js} +1 -1
- package/build/_chunks/{chunk-DWSY5MWS.js → chunk-ON3R4M3U.js} +1 -1
- package/build/_chunks/chunk-PEBLGGN7.js +1 -0
- package/build/_chunks/{chunk-23FZIGHL.js → chunk-PHLJSQ63.js} +1 -1
- package/build/_chunks/{chunk-HNUCLGTM.js → chunk-QGIUFATL.js} +1 -1
- package/build/_chunks/{chunk-56NDTN6N.js → chunk-R26A2GDD.js} +1 -1
- package/build/_chunks/chunk-REP2WDKF.js +1 -0
- package/build/_chunks/{chunk-GZ4VIHY2.js → chunk-RFSR64TF.js} +1 -1
- package/build/_chunks/{chunk-MARRXRP5.js → chunk-RIIDTK4T.js} +1 -1
- package/build/_chunks/chunk-RXT7RBES.js +2 -0
- package/build/_chunks/{chunk-Z72ELNOV.js → chunk-RZ3GOLOH.js} +1 -1
- package/build/_chunks/{chunk-37HMYKL2.js → chunk-RZIO5KW7.js} +1 -1
- package/build/_chunks/{chunk-2KLQQ4GT.js → chunk-SA72YYWW.js} +1 -1
- package/build/_chunks/chunk-SJCW4SLG.js +1 -0
- package/build/_chunks/{chunk-624CB4ZD.js → chunk-SKWOFSTP.js} +1 -1
- package/build/_chunks/{chunk-KVOFAN6O.js → chunk-SLTY4KD6.js} +1 -1
- package/build/_chunks/{chunk-CMM74PXZ.js → chunk-SUBIH236.js} +1 -1
- package/build/_chunks/{chunk-U3V6OJGV.js → chunk-T6LIO4ZZ.js} +1 -1
- package/build/_chunks/{chunk-6E3W2EBT.js → chunk-TE4NMDPX.js} +1 -1
- package/build/_chunks/{chunk-EDRNAIB5.js → chunk-TIB7OG4H.js} +1 -1
- package/build/_chunks/{chunk-VLEEU2FO.js → chunk-TY5FA4Z6.js} +2 -2
- package/build/_chunks/{chunk-ATOOWVEE.js → chunk-UJSTHVLW.js} +1 -1
- package/build/_chunks/{chunk-OXEFLXNE.js → chunk-UWK7C3OQ.js} +1 -1
- package/build/_chunks/{chunk-OJFT5TWY.js → chunk-UYDM5BBG.js} +1 -1
- package/build/_chunks/{chunk-EG4YTSUA.js → chunk-W5RQHQ2Z.js} +1 -1
- package/build/_chunks/{chunk-MXISJOX2.js → chunk-W6W4YZ7G.js} +1 -1
- package/build/_chunks/{chunk-FA67CAI7.js → chunk-WDPEG4N2.js} +1 -1
- package/build/_chunks/chunk-WGGSVBPM.js +2 -0
- package/build/_chunks/{chunk-2SBTZEUM.js → chunk-WJML27P6.js} +1 -1
- package/build/_chunks/{chunk-KOVN2TXQ.js → chunk-WMNFDDLA.js} +1 -1
- package/build/_chunks/{chunk-V2V4UQFR.js → chunk-WWEOT6XF.js} +1 -1
- package/build/_chunks/{chunk-U5Q77KAU.js → chunk-XMZ5XGUR.js} +1 -1
- package/build/_chunks/{chunk-RBELN5RP.js → chunk-XQYCJYZI.js} +1 -1
- package/build/_chunks/chunk-XU5U5UY5.js +1 -0
- package/build/_chunks/{chunk-NL5A5JRS.js → chunk-XXFZYM4P.js} +1 -1
- package/build/_chunks/{chunk-TSYM2TD4.js → chunk-Y7DN6PV3.js} +1 -1
- package/build/_chunks/{chunk-KHEICEBV.js → chunk-YCZIYVQU.js} +1 -1
- package/build/_chunks/{chunk-CC73AV3J.js → chunk-YHZCWI2Z.js} +1 -1
- package/build/_chunks/{chunk-J6HEXAGE.js → chunk-YL2COX6W.js} +1 -1
- package/build/_chunks/{chunk-E2LVWSWC.js → chunk-YNMDL3HQ.js} +1 -1
- package/build/_chunks/{chunk-HFHPK2BI.js → chunk-YTH72BBA.js} +1 -1
- package/build/_chunks/{chunk-PFJKJASK.js → chunk-ZOO54PIG.js} +1 -1
- package/build/components/AccountDropdown/index.js +1 -1
- package/build/components/ActionMenu/index.js +1 -1
- package/build/components/ActionsDropdownMenu/index.js +1 -1
- package/build/components/ActiveFilterChip/index.js +1 -1
- package/build/components/ActivityAreaChart/index.js +1 -1
- package/build/components/AmountConversionFilter/index.js +1 -1
- package/build/components/AmountInput/index.js +1 -1
- package/build/components/AmountSlider/index.js +1 -1
- package/build/components/AmountStatusChip/index.js +1 -1
- package/build/components/AnimatedSpinnerIcon/index.js +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/AuthenticationTypeChip/index.js +1 -1
- package/build/components/Autocomplete/index.js +1 -1
- package/build/components/BetaBanner/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/Chip/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/ConfirmDialog/index.js +1 -1
- package/build/components/CopyImage/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/CurrencyFilter/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/index.js +1 -1
- package/build/components/DeviceIcon/index.js +1 -1
- package/build/components/Dialog/index.js +1 -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/DropdownMenu/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/HeatMap/index.js +1 -1
- package/build/components/IOSSwitch/index.js +1 -1
- package/build/components/Icon/index.js +1 -1
- package/build/components/IconWithBadge/index.js +1 -1
- package/build/components/Input/index.js +1 -1
- package/build/components/InputBase/InputBase/InputBase.d.ts +1 -1
- package/build/components/InputBase/InputBase/style.d.ts +1 -1
- package/build/components/InputBase/PhoneInputBase/PhoneInputBase.d.ts +1 -1
- package/build/components/InputBase/PhoneInputBase/style.d.ts +1 -1
- package/build/components/InputBase/SelectBase/SelectBase.d.ts +1 -1
- package/build/components/InputBase/SelectBase/SelectBaseMultiple.d.ts +1 -1
- package/build/components/InputBase/SelectBase/style.d.ts +1 -1
- package/build/components/InputBase/index.js +1 -1
- package/build/components/InputNumber/index.js +1 -1
- package/build/components/Inputs/Input/style.d.ts +1 -1
- package/build/components/Inputs/Input/type.d.ts +1 -1
- package/build/components/Inputs/index.d.ts +1 -2
- package/build/components/Inputs/index.js +1 -1
- package/build/components/JSONViewer/index.js +1 -1
- package/build/components/LanguageDropdown/index.js +1 -1
- package/build/components/LeftPeekRightExpandingChip/index.js +1 -1
- package/build/components/ListColumnFilter/index.js +1 -1
- package/build/components/ListHeader/index.js +1 -1
- package/build/components/ListLayout/index.js +1 -1
- package/build/components/Loader/index.js +1 -1
- package/build/components/MFWidgetLoader/index.js +1 -1
- package/build/components/MaskedText/index.js +1 -1
- package/build/components/Menu/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/MultiSelectWithSearch/index.js +1 -1
- package/build/components/NestedDropdown/index.js +1 -1
- package/build/components/NoInternet/index.js +1 -1
- package/build/components/OpenFileInNewTab/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/Inputs/FormSelect/style.d.ts +1 -1
- package/build/components/RFH/index.js +1 -1
- package/build/components/RadioGroup/index.js +1 -1
- package/build/components/RangeCalender/index.js +1 -1
- package/build/components/RatingCount/index.js +1 -1
- package/build/components/ReceiptsViewer/index.js +1 -1
- package/build/components/ReferenceTypeFilter/index.js +1 -1
- package/build/components/ResizableHeightInput/index.js +1 -1
- package/build/components/RightLeftExpandingCenterChip/index.js +1 -1
- package/build/components/SalesChannelFilter/index.js +1 -1
- package/build/components/SearchButton/index.js +1 -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/Slider/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/index.js +1 -1
- package/build/components/StatusLabel/index.js +1 -1
- package/build/components/TableCells/index.js +1 -1
- package/build/components/TableReports/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/TooltipChip/TooltipChip.d.ts +1 -1
- package/build/components/TooltipChip/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/index.js +1 -1
- package/build/components/Widget/index.js +1 -1
- package/build/components/WindowAppIcon/index.js +1 -1
- package/build/components/WindowSideBar/index.js +1 -1
- package/build/components/index.d.ts +2 -2
- package/build/components/index.js +1 -1
- package/build/components/primitives/FieldFeedback/constants.d.ts +2 -2
- package/build/components/primitives/FieldFeedback/index.d.ts +2 -1
- package/build/components/primitives/FieldFeedback/style.d.ts +9 -0
- package/build/components/primitives/index.d.ts +1 -1
- package/build/components/primitives/index.js +1 -1
- package/build/hooks/index.js +1 -1
- package/build/index.js +1 -1
- package/build/utils/fieldFeedback.d.ts +26 -0
- package/build/utils/index.d.ts +1 -0
- package/build/utils/index.js +1 -1
- package/package.json +1 -1
- package/build/_chunks/chunk-CIF3RMYW.js +0 -15
- package/build/_chunks/chunk-CJ2HZARO.js +0 -1
- package/build/_chunks/chunk-D2RM2VO2.js +0 -1
- package/build/_chunks/chunk-FLITA5BR.js +0 -1
- package/build/_chunks/chunk-FPEXFSFO.js +0 -1
- package/build/_chunks/chunk-I3P7QPUA.js +0 -1
- package/build/_chunks/chunk-IWVUS45E.js +0 -1
- package/build/_chunks/chunk-KHM5KW53.js +0 -1
- package/build/_chunks/chunk-LASNRFJB.js +0 -1
- package/build/_chunks/chunk-QQBR2YOE.js +0 -1
- package/build/_chunks/chunk-RAIKBMLV.js +0 -1
- package/build/_chunks/chunk-XFG2PKVJ.js +0 -2
- package/build/_chunks/chunk-YTESL64R.js +0 -2
- package/build/_chunks/chunk-ZFTEDE2C.js +0 -1
- package/build/components/FieldFeedback/FieldFeedback.d.ts +0 -3
- package/build/components/FieldFeedback/index.d.ts +0 -5
- package/build/components/FieldFeedback/index.js +0 -1
- package/build/components/FieldFeedback/style.d.ts +0 -8
- package/build/components/FieldFeedback/type.d.ts +0 -11
- package/build/components/FieldFeedback/utils.d.ts +0 -11
- package/build/components/Tooltip/Tooltip.d.ts +0 -12
- package/build/components/Tooltip/index.d.ts +0 -2
- package/build/components/Tooltip/index.js +0 -1
- package/build/components/Tooltip/styles.d.ts +0 -2
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import {a as a$5}from'./chunk-HVSVEO2H.js';import {a,b,f as f$1,d,c as c$1,h,i,e}from'./chunk-RAIKBMLV.js';import {a as a$2}from'./chunk-ATOOWVEE.js';import {c,b as b$1,g}from'./chunk-FPEXFSFO.js';import {a as a$6}from'./chunk-N2LPXJYV.js';import {a as a$3}from'./chunk-RBELN5RP.js';import {a as a$4,b as b$2}from'./chunk-MUR4ILTY.js';import {a as a$1}from'./chunk-GNY2VGGW.js';import {f,P,O}from'./chunk-YTESL64R.js';import {yc}from'./chunk-MXISJOX2.js';import {Qc,B}from'./chunk-3YAJNHQC.js';import*as ue from'react';import ue__default,{useId,useState,useEffect,useMemo,useRef,useCallback}from'react';import {useFormContext,Controller,FormProvider,useForm}from'react-hook-form';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import te from'@mui/material/Box';import Ft from'@mui/material/Button';import Ct from'@mui/material/Input';import lo from'@mui/material/ListSubheader';import io from'@mui/material/MenuItem';import {keyframes,styled,alpha}from'@mui/material/styles';import Rt from'@mui/material/Popper';import Lt from'@mui/material/TextField';function st({onSubmit:e,methods:o,children:t}){let a=yc(useId(),"default-form");return jsx(FormProvider,{...o,children:jsx("form",{id:a,"data-testid":"DefaultForm",onSubmit:e,noValidate:true,children:t})})}var ut=ue__default.memo(st);var Xe=ue.forwardRef(({name:e,helperText:o,hideArrows:t,feedback:a$1,...r},i)=>{let{control:c}=useFormContext();return jsx(Controller,{name:e,control:c,defaultValue:r.defaultValue,render:({field:d,fieldState:u})=>jsx(a,{...r,...d,ref:i,hasError:!!u.error,helperText:o??u.error?.message,feedback:a$1,hideArrows:t,onChange:m=>{d.onChange(m),r.onChange?.(m);},onWheel:m=>{m.target instanceof HTMLElement&&m.target.blur();}})})});Xe.displayName="RFHFormInput";var Ze=ue.memo(Xe);var ht=Ze;function oo({phoneName:e,countries:o,countryName:t,helperText:a,isCountriesLoading:r,disabled:i,feedback:c,...d}){let{control:u,watch:m,setValue:h$1}=useFormContext(),F=m(t),f=x=>{h$1(t,x);};return jsx(Controller,{name:e,control:u,render:({field:{onChange:x,value:l},fieldState:n})=>jsx(h,{...d,phoneValue:l,countries:o,hasError:!!n.error,helperText:a??n.error?.message,feedback:c,onPhoneChange:b=>{x(b);},disabled:i,countryValue:F,onCountryChange:f,isCountriesLoading:r})})}oo.displayName="RFHPhoneInput";var to=oo;var gt=to;var Ie=(e,o)=>e.toFixed(o);function ro({amountName:e,currencies:o,currencyName:t,helperText:a,isCurrenciesLoading:r,...i$1}){let{control:c,watch:d,setValue:u}=useFormContext(),m=d(t),h=d(e),F=f=>{u(t,f),u(e,Ie(Number(h),f?.decimals||2));};return jsx(Controller,{name:e,control:c,render:({field:{onChange:f,value:x},fieldState:l})=>jsx(i,{...i$1,amountValue:x??"",currencies:o,hasError:!!l.error,helperText:a??l.error?.message,onAmountChange:n=>{f(n);},onAmountBlur:n=>{f(Ie(Number(n),m?.decimals||2));},currencyValue:m,onCurrencyChange:F,isCurrenciesLoading:r})})}ro.displayName="RFHAmountInput";var ao=ro;var yt=ao;var Mt=keyframes`
|
|
2
|
-
0% {
|
|
3
|
-
transform: rotate(-90deg);
|
|
4
|
-
}
|
|
5
|
-
100% {
|
|
6
|
-
transform: rotate(270deg);
|
|
7
|
-
}
|
|
8
|
-
`,co=styled(te)({width:12,height:12,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:"100%",height:"100%",display:"block"},animation:`${Mt} 2s linear infinite`}),z=styled(lo)(({theme:e})=>({backgroundColor:e.palette.common.white,paddingLeft:8,paddingRight:8,paddingBottom:6,lineHeight:1})),po=styled("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontWeight:500,fontSize:11,lineHeight:"100%",letterSpacing:0,color:"#8D8D94",leadingTrim:"none",transition:e.transitions.create(["color","opacity"],{duration:90,easing:"ease-in"})})),so=styled(te)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",gap:e.spacing(1)})),uo=styled(lo)(({theme:e})=>({backgroundColor:e.palette.common.white,paddingLeft:8,paddingRight:8,paddingTop:e.spacing(.75),paddingBottom:e.spacing(.75),lineHeight:1.2,"&.MuiListSubheader-root":{lineHeight:1.2}})),mo=styled(Ft)(({theme:e})=>({minWidth:0,padding:"2px 4px",fontFamily:e.typography.fontFamily,fontWeight:500,fontStyle:"normal",fontSize:11,lineHeight:"120%",letterSpacing:0,textTransform:"none",verticalAlign:"middle",color:"#1F88D0",transition:e.transitions.create(["color","background-color","opacity"],{duration:90,easing:"ease-in"})})),Pt=styled(f)(()=>({padding:0,".MuiSvgIcon-root":{width:12,height:12}})),ho=styled("img")({width:14,height:14,flexShrink:0,display:"block"}),fo=styled(te)({display:"flex",alignItems:"center",width:"100%",gap:8}),So=styled(io,{shouldForwardProp:e=>e!=="$selected"})(({theme:e,$selected:o})=>({fontSize:"12px",backgroundColor:o?"#F8F8F8 !important":e.palette.common.white,"&.Mui-disabled":{opacity:1}})),go=styled(Pt,{shouldForwardProp:e=>e!=="$mutedRect"})(({$mutedRect:e})=>e?{"& svg rect":{fill:"#BDC1CC"}}:{}),de=styled(Ct)(({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(io)(({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}}));var kt=keyframes`
|
|
9
|
-
0% {
|
|
10
|
-
transform: rotate(-90deg);
|
|
11
|
-
}
|
|
12
|
-
100% {
|
|
13
|
-
transform: rotate(270deg);
|
|
14
|
-
}
|
|
15
|
-
`,Fo=styled(te)({width:12,height:12,display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:"100%",height:"100%",display:"block"},animation:`${kt} 2s linear infinite`}),me=styled(te)(({theme:e})=>({position:"relative",width:11,height:11,transform:"rotate(0deg)",color:e.palette.common.black,"& svg":{width:"100%",height:"100%",display:"block"}})),Co=styled(z)({paddingTop:"8px"}),Pe=styled("ul")({listStyle:"none",margin:0,padding:0}),Io=styled(io)(({theme:e})=>({display:"flex",alignItems:"center",gap:"8px",padding:"8px",justifyContent:"space-between",fontSize:"10px",fontWeight:500,cursor:"default",pointerEvents:"none",backgroundColor:e.palette.common.white,"&.Mui-disabled":{opacity:1,color:"#8D8D94"}})),Mo=styled(io,{shouldForwardProp:e=>e!=="$selected"})(({theme:e,$selected:o})=>({fontSize:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),backgroundColor:o?e.palette.action.hover:e.palette.common.white})),he=styled("span")({flex:1,minWidth:0}),fe=styled("img")({width:10,height:7.5,flexShrink:0}),Po=styled("li",{shouldForwardProp:e=>!["$selected","$optionDisabled"].includes(String(e))})(({theme:e,$selected:o,$optionDisabled:t})=>({fontSize:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),minHeight:48,paddingLeft:e.spacing(2),paddingRight:e.spacing(2),backgroundColor:o?e.palette.action.hover:e.palette.common.white,"&.Mui-focused":{backgroundColor:e.palette.action.hover},...t&&{opacity:.38,pointerEvents:"none"}})),Re=styled("span")({fontSize:"10px",fontWeight:500,color:"#8D8D94"}),Ro=styled(Lt,{shouldForwardProp:e=>!["feedbackType","hasFeedback","hasLabel"].includes(e)})(({theme:e,error:o,feedbackType:t,hasFeedback:a,hasLabel:r})=>{let{borderColor:i}=t?c(e,t):{borderColor:void 0},c$1=a?"4px 4px 0 0":"4px";return {width:"100%","& .MuiInputLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)",color:`${e.palette.grey[700]} !important`},"& .MuiInputLabel-root.MuiInputLabel-shrink":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiInputLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiFilledInput-root":{height:"40px",maxHeight:"40px",overflow:"hidden",borderRadius:c$1,backgroundColor:e.palette.grey[400],paddingTop:r?"11px":"0px",paddingBottom:r?"4px":"0px",paddingLeft:"8px",boxSizing:"border-box",display:"inline-flex",alignItems:r?"stretch":"center","&:before, &:after":{display:"none"},"&:hover":{backgroundColor:e.palette.grey[400]},"&.Mui-focused":{backgroundColor:e.palette.grey[400]},"&.Mui-disabled":{backgroundColor:e.palette.grey[400]}},"& .MuiFilledInput-input":{padding:"0 !important",minHeight:0,height:"auto",boxSizing:"border-box",display:"flex",alignItems:r?"flex-end":"center",alignSelf:r?"flex-end":"center",fontSize:"11px",lineHeight:"11px",color:e.palette.common.black,paddingBottom:r?"1px !important":"0 !important"},"& .MuiFilledInput-root.MuiInputBase-adornedEnd .MuiAutocomplete-input":{flex:"1 1 0%",minWidth:30,width:0,maxWidth:"100%"},"& .MuiAutocomplete-endAdornment":{display:"flex",alignItems:"center",gap:"8px",top:"50%",transform:"translateY(-50%)",right:9},"& .MuiAutocomplete-popupIndicator":{transform:"none",padding:"1px",marginRight:0,marginLeft:0},"& .MuiAutocomplete-popupIndicator.MuiAutocomplete-popupIndicatorOpen":{transform:"none"},"& .MuiAutocomplete-clearIndicator":{visibility:"visible",padding:"1px",marginRight:0,marginLeft:0},...t&&i&&{"& .MuiFilledInput-root":{border:`1px solid ${i}`}},...a&&{"& .MuiFilledInput-root":{borderBottom:"none",borderBottomLeftRadius:0,borderBottomRightRadius:0}},...o&&{"& .MuiFilledInput-root":{border:`1px solid ${e.palette.error.main}`}}}}),bo=e=>({display:"flex",alignItems:"center",gap:"8px",padding:"8px",justifyContent:"space-between",fontSize:"10px",fontWeight:500,cursor:"default",pointerEvents:"none",backgroundColor:e.palette.common.white,color:"#8D8D94"}),Lo=styled(Rt,{shouldForwardProp:e=>!["$menuHasLoadingText","$suppressAutocompleteNoOptions","$suppressEmptyMenuSurface"].includes(e)})(({theme:e,$menuHasLoadingText:o,$suppressAutocompleteNoOptions:t,$suppressEmptyMenuSurface:a})=>({"& .MuiPaper-root":a?{boxShadow:"none",border:"none",backgroundColor:"transparent",margin:0,marginTop:0,padding:0,maxHeight:0,minHeight:0,overflow:"hidden",borderRadius:0,pointerEvents:"none"}:{marginTop:4,borderRadius:4,boxShadow:e.shadows[8],border:"1px solid #F2F2F2",backgroundColor:e.palette.common.white},"& .MuiAutocomplete-listbox":{padding:0,...a?{maxHeight:0,minHeight:0,overflow:"hidden"}:{maxHeight:320}},"& .MuiAutocomplete-noOptions":t?{display:"none !important"}:bo(e),"& .MuiAutocomplete-loading":{...bo(e),...!o&&{display:"none"}}}));function Se({placeholder:e,value:o,onValueChange:t,isLoading:a}){let r=yc(useId(),"form-select-menu-search-input"),i=useCallback(c=>{c.stopPropagation();},[]);return jsx(de,{id:r,"data-testid":"FormSelectMenuSearchInput",placeholder:e,value:o,onChange:c=>t(c.target.value),onKeyDown:i,onKeyUp:i,onMouseDown:i,onClick:i,disableUnderline:true,fullWidth:true,inputProps:{"aria-label":e},endAdornment:a?jsx(Fo,{"aria-hidden":true,children:jsx(b$2,{})}):jsx(me,{"aria-hidden":true,children:jsx(a$4,{})})})}var ge=jsx(Re,{children:"No results found"}),wo=jsx(Re,{children:"Loading\u2026"});function be(e,o,t){return o?o(e):t?t(e):e?.label}function Le(e,o,t){let a=o.toLowerCase().trim(),r=(t?t(e):e?.label)??"";return String(r).toLowerCase().includes(a)}function ko(e){return e}function Ao(e){let o=ue__default.forwardRef(function(a,r){let{children:i,className:c,...d}=a,u=e.current;return u?jsxs(Fragment,{children:[jsx(Co,{disableSticky:true,children:jsx(Se,{placeholder:u.menuSearchPlaceholder,value:u.searchValue,onValueChange:u.setSearchValue,isLoading:u.isLoading})}),jsx(Pe,{ref:r,className:c,...d,children:i})]}):jsx(Pe,{ref:r,className:c,...d,children:i})});return o.displayName="FormSelectMenuSearchListbox",o}function To({menuSearchPlaceholder:e,searchValue:o,onSearchChange:t,isLoading:a,menuHasNoOptionsText:r,menuNoOptionsText:i,optionsWithoutEmptyValue:c,getOptionValue:d,getOptionLabel:u,renderOption:m,isOptionEqualToValue:h,menuHasSelectedCheckMark:F,valueOnly:f,getOptionId:x,field:l}){return jsxs(Fragment,{children:[jsx(z,{disableSticky:true,onMouseDown:n=>n.stopPropagation(),onClick:n=>n.stopPropagation(),children:jsx(Se,{placeholder:e,value:o,onValueChange:t,isLoading:a})}),r&&o.trim()&&c.length===0?jsx(Io,{disabled:true,value:"__form_select_no_results__",children:i??ge}):c.map((n,b)=>{let S=h?h(n,l.value):n?.id===l.value?.id,P=be(n,m,u);return jsxs(Mo,{disabled:!!n.disabled,$selected:S,value:(d?d(n):n?.id)??"",onClick:()=>{l.onChange(f?x(n):n);},children:[jsx(he,{children:P}),F&&S?jsx(fe,{src:Qc,alt:""}):null]},`form-select-item-${(d?d(n):n?.id)??b}`)})]})}var xe={menuHasLoadingText:false,suppressAutocompleteNoOptions:false,suppressEmptyMenuSurface:false};function Vt(e,o){e!=null&&(typeof e=="function"?e(o):e.current=o);}function Nt(...e){return o=>{for(let t of e)Vt(t,o);}}function Dt(e){let o=t=>{let a=e.current;return jsx(Lo,{...t,$menuHasLoadingText:a.menuHasLoadingText,$suppressAutocompleteNoOptions:a.suppressAutocompleteNoOptions,$suppressEmptyMenuSurface:a.suppressEmptyMenuSurface})};return o.displayName="FormSelectSearchableAutocompletePopper",o}function Ho(e){let o=yc(useId(),"form-select-searchable-field"),t=useRef(null),a=useRef(xe);t.current=e.menuSearchable?{searchValue:e.inMenuSearchContextValue.searchValue,setSearchValue:e.inMenuSearchContextValue.setSearchValue,menuSearchPlaceholder:e.inMenuSearchContextValue.menuSearchPlaceholder,isLoading:e.inMenuSearchContextValue.isLoading}:null,a.current=e.searchableAutocompletePopperFlags;let r=useMemo(()=>Ao(t),[]),i=useMemo(()=>Dt(a),[]),c=b$1(e.feedback),d$1=!!e.fieldState.error&&!c,u=e.helperText??e.fieldState.error?.message,m=e.internalValue!=null&&e.internalValue!==""&&typeof e.internalValue=="object"?e.internalValue:null,h=e.getOptionLabel??(l=>String(l?.label??"")),F=e.isOptionEqualToValue??((l,n)=>l&&n?l.id===n.id:l===n),f=e.ClearIconComponent??b,x=e.label!=null&&e.label!=="";return jsxs(d,{id:o,"data-testid":"FormSelectSearchableField",children:[jsx(a$3,{...e.autocompleteRest,disableClearable:!e.showClearIcon,clearIcon:jsx(f,{sx:{fontSize:8,width:8,height:8}}),ListboxComponent:e.menuSearchable?r:void 0,PopperComponent:i,options:e.optionsWithClearFilterOnly,value:m,onChange:(l,n,b)=>{if(n==null&&e.onClear&&b==="clear"){e.onClear();return}if(e.valueOnly){let S=n==null?null:e.getOptionId(n);e.field.onChange(S);}else e.field.onChange(n);},onInputChange:(l,n,b)=>{e.setSearchableInputValue(n),(b==="input"||b==="clear")&&e.scheduleSearchNotification(n);},slotProps:e.slotProps??{},filterOptions:e.menuSearchable?e.autocompleteFilterOptions:ko,loading:!!e.isLoading,disabled:!!e.disabled,getOptionLabel:h,getOptionDisabled:l=>!!l.disabled,isOptionEqualToValue:F,renderOption:e.renderAutocompleteOption,noOptionsText:e.menuNoOptionsText??ge,loadingText:e.menuHasLoadingText?e.menuLoadingText??wo:null,popupIcon:jsx(me,{children:jsx(a$4,{})}),renderInput:l=>{let{inputProps:n,...b}=l,{ref:S,...P}=n;return jsx(Ro,{...b,variant:"filled",label:e.label,placeholder:e.placeholder,required:e.required,error:d$1,helperText:null,feedbackType:c?.type,hasFeedback:!!c,hasLabel:x,inputRef:Nt(S,e.field.ref,e.inputRef),InputProps:{...l.InputProps,disableUnderline:true},inputProps:{...P,name:e.field.name,onBlur:e.field.onBlur}})}}),c?jsx(g,{...c}):jsx(c$1,{children:u})]})}function Do(e){let{name:o,helperText:t,feedback:a,menuSearchable:r=false,showClearIcon:i=false,ClearIconComponent:c=b,onClear:d,menuSearchPlaceholder:u="Search",getOptionValue:m,getOptionLabel:h,renderOption:F,isOptionEqualToValue:f,options:x,MenuProps:l,valueOnly:n=false,menuHasSelectedCheckMark:b$1=false,searchable:S=false,onSearchInputChange:P,searchDebounceMs:V=300,minSearchLength:T,menuLoadingText:Fe,menuHasLoadingText:g=false,menuHasNoOptionsText:R=true,menuNoOptionsText:O,label:ne,placeholder:U,required:p,disabled:N,isLoading:L,inputRef:Ce,...K}=e,{control:D}=useFormContext(),[C,G]=useState(""),[Y,j]=useState("");useEffect(()=>{S||j("");},[S]);let Xo=useMemo(()=>({searchValue:C,setSearchValue:G,menuSearchPlaceholder:u,isLoading:!!L}),[C,u,L]),J=useRef(void 0),re=useRef(P);re.current=P,useEffect(()=>()=>{J.current&&clearTimeout(J.current);},[]);let Zo=useCallback(s=>{if(!re.current)return;let y=s.trim();J.current&&clearTimeout(J.current),J.current=setTimeout(()=>{if(y===""){re.current?.("");return}T!=null&&y.length<T||re.current?.(y);},V);},[V,T]),W=useMemo(()=>{let s=x??[];return !i||!m?s:s.filter(y=>{let w=m(y);return w!=null&&w!==""})},[i,m,x]),Oe=useMemo(()=>!r||!C.trim()?W:W.filter(s=>Le(s,C,h)),[r,C,W,h]),Q=useMemo(()=>r?Oe:W,[r,Oe,W]),et=useCallback(s=>!r||!C.trim()?s:s.filter(y=>Le(y,C,h)),[r,C,h]),ot=useMemo(()=>{if(!S)return xe;let s=Y.trim(),y=s.length===0||T!=null&&s.length>0&&s.length<T,w=r&&!!C.trim()&&Q.length===0,H=y&&!w||!R,le=Q.length>0;return {menuHasLoadingText:g,suppressAutocompleteNoOptions:H,suppressEmptyMenuSurface:!le&&!(!H&&!le)&&!!!(L&&g)}},[S,Y,T,r,C,Q,R,L,g]),tt={...l,autoFocus:false,disableEnforceFocus:true},ae=s=>(m?m(s):s?.id)??"",nt=s=>!n||!s?s:x?.find(y=>ae(y)===s)??s,rt=useCallback((s,y,w)=>{let H=be(y,F,h),le=!!y.disabled;return jsxs(Po,{...s,$selected:w.selected,$optionDisabled:le,children:[jsx(he,{children:H}),b$1&&w.selected?jsx(fe,{src:Qc,alt:""}):null]})},[h,F,b$1]),Te={...K};for(let s of ["IconComponent","startComponent"])delete Te[s];let{slotProps:at={},...lt}=Te;return jsx(Controller,{name:o,control:D,render:({field:s,fieldState:y})=>{let w=nt(s.value);return S?jsx(Ho,{menuSearchable:r,inMenuSearchContextValue:Xo,searchableAutocompletePopperFlags:ot,optionsWithClearFilterOnly:W,autocompleteFilterOptions:et,slotProps:at,autocompleteRest:lt,inputRef:Ce,showClearIcon:i,ClearIconComponent:c,menuHasLoadingText:g,menuLoadingText:Fe,menuNoOptionsText:O,isLoading:L,disabled:N,label:ne,placeholder:U,required:p,valueOnly:n,getOptionId:ae,scheduleSearchNotification:Zo,setSearchableInputValue:j,renderAutocompleteOption:rt,onClear:d,feedback:a,helperText:t,field:s,fieldState:y,internalValue:w,getOptionLabel:h,isOptionEqualToValue:f}):jsx(f$1,{...K,...s,label:ne,placeholder:U,required:p,disabled:N,isLoading:L,value:w,menuHasSelectedCheckMark:b$1,showClearIcon:i,ClearIconComponent:c,onClear:d,options:Q,getOptionValue:m,getOptionLabel:h,renderOption:F,isOptionEqualToValue:f,hasError:!!y.error,helperText:t??y.error?.message,feedback:a,onChange:H=>s.onChange(n?ae(H):H),MenuProps:tt,children:r?jsx(To,{menuSearchPlaceholder:u,searchValue:C,onSearchChange:G,isLoading:L,menuHasNoOptionsText:R,menuNoOptionsText:O,optionsWithoutEmptyValue:Q,getOptionValue:m,getOptionLabel:h,renderOption:F,isOptionEqualToValue:f,menuHasSelectedCheckMark:b$1,valueOnly:n,getOptionId:ae,field:s}):void 0})}})}Do.displayName="RFHSelect";var Wo=ue__default.memo(Do);var ke=Wo;function qo({name:e,disabled:o,...t}){let{control:a}=useFormContext();return jsx(Controller,{name:e,control:a,render:({field:{name:r,onBlur:i,onChange:c,value:d,disabled:u}})=>jsx(a$2,{...t,onChange:c,onBlur:i,name:r,disabled:u||o,checked:d??false})})}qo.displayName="RFHSWitch";var _o=ue.memo(qo);var Gt=_o;var Uo=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 Ko=styled(te)(()=>({display:"flex",flexDirection:"column",maxHeight:180,overflow:"auto",scrollbarWidth:"thin",scrollbarColor:"#E5E5E5 #E5E5E5"})),Go=styled(P)(({theme:e})=>{let o=`1px solid ${alpha(e.palette.common.black,.1)}`;return {flexShrink:0,border:0,borderRadius:0,"&.Mui-expanded:not(:last-of-type)":{borderBottom:o},[`&:last-of-type .${O.summary}`]:{borderBottom:"none"},[`&.Mui-expanded:last-of-type .${O.summary}`]:{borderBottom:o},[`& .${O.summary}`]:{backgroundColor:e.palette.common.white,borderBottom:o,minHeight:28,height:"auto","& .MuiAccordionSummary-content":{margin:"auto"},"&.Mui-expanded":{backgroundColor:"#F8F8F8",minHeight:28,height:"auto"}},[`& .${O.content}`]:{borderTop:"none"}}});styled(Ct)(({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 Yo=styled(te)(()=>({display:"flex",flexDirection:"column",gap:"8px"}));styled(te)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap",paddingInlineEnd:"20px"}));styled(te)(({theme:e,maxWidth:o})=>({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",...o&&{maxWidth:`${o}%`}}));var jo=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(te)(({theme:e})=>({width:"100%",flexDirection:"column",border:`1px solid ${e.palette.grey[100]}`,borderRadius:"4px",backgroundColor:e.palette.grey[400]}));function Xt({name:e,options:o,...t}){let a=yc(useId(),"select-with-accordion"),[r,i]=useState(null),[c,d]=useState(0),u=!!r,m=l=>{i(u?null:l.currentTarget);},h=()=>{i(null);},{watch:F,setValue:f}=useFormContext(),x=F(e);return jsx(a$5,{id:a,"data-testid":"SelectWithAccordion",open:u,anchorEl:r,onOpen:m,onClose:h,trigger:jsx(ke,{name:e,options:[],...t,open:false}),hideArrow:true,listWrapperSx:{padding:0,margin:0},children:jsx(Yo,{onClick:l=>l.stopPropagation(),onMouseDown:l=>l.stopPropagation(),children:jsx(Ko,{"data-testid":"AccordionWrapper",children:o.map?.((l,n)=>jsx(Go,{expanded:c===n,onChange:S=>d(S?n:null),label:jsx(Uo,{variant:"caption",children:l.group}),content:(l?.options||[]).map((S,P)=>{let V=t?.isOptionEqualToValue?.(S,x);return jsxs(jo,{onClick:()=>{f(e,S,{shouldDirty:true,shouldTouch:true,shouldValidate:true}),h();},children:[t.renderOption?.(S)||S.label,V&&jsx(a$6,{src:Qc,alt:"blue-check",sx:{width:14,height:10}})]},`${S.value}-${S.label}-${P}`)})},`${l.group}-group-${n}`))})})})}var Qo=Xt;var en=Qo;function Ae({name:e$1,helperText:o,getOptionValue:t,getOptionLabel:a,renderOption:r,isOptionEqualToValue:i,getOptionDisabled:c,menuSearchable:d=false,menuSearchPlaceholder:u="Search",showCheckbox:m=true,menuHasSelectionSummary:h=false,valueOnly:F=false,options:f,isLoading:x,...l}){let{control:n}=useFormContext(),[b,S]=useState(""),P=g=>(t?t(g):g?.id)??"",V=g=>!F||!g?.length?g??[]:g.map(R=>f?.find(O=>P(O)===R)).filter(Boolean),T=g=>g?.map(P)??[],Fe=useMemo(()=>{if(!d||!b.trim())return f??[];let g=b.toLowerCase().trim();return (f??[]).filter(R=>{let O=(a?a(R):R?.label)??"";return String(O).toLowerCase().includes(g)})},[f,d,b,a]);return jsx(Controller,{name:e$1,control:n,defaultValue:[],render:({field:g,fieldState:R})=>{let O=Array.isArray(g.value)?g.value.filter(p=>p!=null).length:0,ne=h&&O>0,U=V(g.value);return jsxs(e,{...l,isLoading:x,...g,options:f??[],value:U,getOptionLabel:a,hasError:!!R.error,helperText:o??R.error?.message,onChange:p=>g.onChange(F?T(p):p),MenuProps:{...l.MenuProps,autoFocus:false,disableEnforceFocus:true},children:[d&&jsx(z,{disableSticky:true,children:jsx(de,{placeholder:u,value:b,onChange:p=>S(p.target.value),onKeyDown:p=>p.stopPropagation(),onKeyUp:p=>p.stopPropagation(),disableUnderline:true,fullWidth:true,inputProps:{"aria-label":u},endAdornment:x?jsx(co,{"aria-hidden":true,children:jsx(b$2,{})}):jsx(ho,{src:B,alt:"search"})})}),ne&&jsx(uo,{disableSticky:true,children:jsxs(so,{children:[jsxs(po,{children:[O," selected"]}),jsx(mo,{type:"button",variant:"text",disableRipple:true,"aria-label":"Clear all selected options",onMouseDown:p=>{p.preventDefault(),p.stopPropagation();},onClick:p=>{p.preventDefault(),p.stopPropagation(),l.onClear?l.onClear():g.onChange([]);},children:"Clear"})]})}),Fe?.map(p=>{let N=U?.some(D=>{if(D==null)return false;if(i)return i(p,D);if(t){let Y=t(p),j=t(D);return Y===j||String(Y)===String(j)}let C=p?.id,G=D?.id;return C===G||String(C)===String(G)}),L=c?c(p):false,Ce=a?a(p):p.label,K=r?r(p):Ce;return jsx(So,{value:(t?t(p):p?.id)??"",disabled:L,$selected:N,children:m?jsxs(fo,{children:[jsx(go,{checked:N,$mutedRect:N&&L}),K]}):K},(t?t(p):p?.id)??"")})]})}})}var ln=useForm;export{ut as a,ht as b,gt as c,yt as d,ke as e,Gt as f,en as g,Ae as h,ln as i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {f,b as b$1,g,a as a$3,e,d,c as c$1}from'./chunk-GB5N3AEY.js';import {a as a$5}from'./chunk-QQBR2YOE.js';import {a as a$2}from'./chunk-N2LPXJYV.js';import {c}from'./chunk-IEKEIKGI.js';import {a as a$1}from'./chunk-ZONDSLTR.js';import {o,j as j$1,k,l,p}from'./chunk-U5Q77KAU.js';import {a}from'./chunk-KHM5KW53.js';import {b}from'./chunk-OJFT5TWY.js';import {z}from'./chunk-YTESL64R.js';import {a as a$4}from'./chunk-CMM74PXZ.js';import {Va,yc,Ha,Ia,bc,f as f$1}from'./chunk-MXISJOX2.js';import {s}from'./chunk-N372QRVU.js';import {U,zi,Bi,Ai,yi,Fi,dh,Wg,ch,Sj,Tj,ub,hk,kk,Bk,ik,vb,wa,va,tk,h,Vg}from'./chunk-3YAJNHQC.js';import {useId,useMemo,useCallback}from'react';import {useTranslation}from'react-i18next';import {styled,Box,useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {motion}from'framer-motion';import {styled as styled$1,useTheme as useTheme$1}from'@mui/material/styles';import _ from'lodash/camelCase';import Qe from'@mui/material/Box';var lt={ORDER:{label:"order",icon:yi,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:Ai,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:Bi,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:zi,color:"#32ADE6"}},dt={SAVED_TOKEN:{label:"savedToken",icon:U,color:"#76BB40"},COUNT:{label:"countBadge",icon:"countBadge",color:"#76BB40"}};styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5)}));styled("img")(()=>({width:"35px",height:"16px",display:"block"}));styled("span")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"14.67px",height:"10px"}));styled("img")(()=>({maxWidth:"100%",width:"100%"}));var ct=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),mt=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px"}));function Ie({type:t,hasSavedCard:o,totalPaymentsCount:e,isTextShown:r}){let l=yc(useId(),"agreement-icon"),p=useTheme(),{t:a$3}=useTranslation(),n=useMemo(()=>[...o?[dt.SAVED_TOKEN]:[],...(e||0)>0?[dt.COUNT]:[],...t&<[t]?[lt[t]]:[]],[o,e,t]),d=c=>r?jsx(a$1,{"data-testid":"AgreementCell_countBadge",children:jsx(a,{title:a$3("totalPaymentCount",{amount:f$1(e)}),children:jsx(mt,{children:jsxs(ct,{"data-testid":"AgreementCell_totalPaymentsCount",sx:{color:dt.COUNT.color},children:["x",e]})})})},c):jsx(a$5,{value:e,index:c},c),s=n.map((c,g)=>c.label==="countBadge"?d(g):jsx(a,{title:a$3(c.label),children:jsx(a$1,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:c.color},children:a$3(c.label)})}):jsx(a$2,{sx:{maxWidth:"16px",maxHeight:"16px",height:"auto",width:"auto"},src:c.icon,alt:"agreement"})},c.color)},c.color)),f=jsx(a,{title:"No agreement",children:jsx(a$1,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:p.palette.text.secondary},children:"No agreement"})}):jsx(a$2,{sx:{maxWidth:"24px",maxHeight:"24px",height:"auto",width:"auto"},src:Fi,alt:"agreement"})},"no-agreement")},"no-agreement");return jsx(Box,{id:l,"data-testid":"AgreementIcon",sx:{display:"flex",alignItems:"center",gap:"4px"},children:s?.length>0?s:f})}var To=Ie;var Ce=To;styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"}));styled(motion.span,{shouldForwardProp:t=>t!=="sourcesCount"})(({theme:t,sourcesCount:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${o*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var Ao=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),Po=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px",textAlign:"center",width:"100%"}));styled("span")(({theme:t})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));styled(motion.div)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));var Wo=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px"}));var kt={"3DS":{tooltip:"3DS",icon:Tj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Sj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:ch,borderColor:"rgba(31, 136, 208, 0.10)"}},vo={FAILED:{tooltip:"Failed",icon:Wg,borderColor:"rgba(255, 61, 0, 0.10)"},REJECTED:{tooltip:"Rejected",icon:dh,borderColor:"rgba(255, 61, 0, 0.10)"}};function be({transactionStatus:t,eci:o,authType:e,isTextShown:r}){let l=yc(useId(),"auth-icons"),p=useMemo(()=>{let n=t?vo[t]:null,d=n?.tooltip,s=t==="AUTHENTICATED"?null:n?.icon;return [{tooltip:d,content:r?d:s,type:r?"text":"icon"},...e?[{tooltip:e,content:r?kt[e]?.tooltip:kt[e]?.icon,type:r?"text":"icon"}]:[],{tooltip:"",content:o?`ECI ${o}`:"",type:"text"}]},[t,r,e,o]),a$1=useMemo(()=>p.filter(n=>!!n.content).map((n,d)=>{let s=n.type==="text"?jsx(Po,{"data-testid":"AuthenticationCell_BadgeTextWrapper",children:jsx(Ao,{sx:{border:"none"},"data-testid":"AuthenticationCell_TextLabel","data-source":n.content,children:n.content})}):jsx(a$2,{sx:{width:"16px",height:"16px"},src:n.content,alt:n.tooltip});return jsx(a,{title:n.tooltip,children:s},`${n.tooltip}-${d}`)}),[p]);return jsx(Wo,{id:l,"data-testid":"AuthIcons",children:a$1})}var ko=be;var Se=(t,o,e)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"},...t>0&&{opacity:0}},animate:{x:e?t*e:t*39,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:o,...t>0&&{opacity:1}}});var Te=ko;var tt={VOID:{icon:ik},CAPTURED:{icon:hk}};var ut=styled$1(motion.div)(({theme:t,isCapture:o})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:t.spacing(.5),paddingInline:t.spacing(.3),paddingBlock:t.spacing(.3),height:"100%",minWidth:"100%",backgroundColor:o?"#eaf3fb":"#eeeeee",borderRadius:"56px",width:"fit-content",fontSize:"10px",color:t.palette.text.primary,position:"relative",zIndex:10})),ft=styled$1("div")(({theme:t,percentage:o,isCapture:e})=>({border:`0.6px ${[0,100].includes(o)?"solid":"dashed"} ${e?t.palette.info.dark:"#656565"}`,borderRadius:"80px",padding:t.spacing(.316),paddingLeft:t.spacing(.516),fontSize:"7px",fontWeight:t.typography.fontWeightBold,color:e?t.palette.info.dark:"#656565",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5)})),xt=styled$1("div")(({percentage:t,isCapture:o,theme:e})=>({background:`conic-gradient(${o?e.palette.info.dark:"#656565"} ${t}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${o?e.palette.info.dark:"#656565"}`})),gt=styled$1("img")({width:"14px",height:"14px"}),j=styled$1(o)({width:"16px",height:"16px"}),N=styled$1("img")({width:"16px",height:"16px"}),Bo=styled$1(Box)({display:"flex",alignItems:"center",justifyContent:"center"});function It(t){return t<5?5:t===100?95:t}function Be({voidPercentage:t,capturePercentage:o,captureCount:e,autoType:r,captureAmount:l,voidAmount:p,currency:a$1,isTextShown:n,remainingAmount:d,isSheetViewShown:s,selectionProps:f={}}){let c=Number(o)+Number(t)===100||d<=0,g=yc(useId(),"capture-auto-icon"),T=useTheme$1(),{t:A}=useTranslation(),P=Ha(d||0),L=useCallback(C=>`Auto ${C} - ${a$1} ${P.integerAmount}.${P.decimalAmount}`,[a$1,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l:p,{integerAmount:D,decimalAmount:v}=Ia(X,a$1);return `Partial ${C} - ${a$1} ${D}.${v}`},[l,p,a$1]),x=o>0?jsx(a,{title:J("Capture"),children:jsxs(ut,{isCapture:true,isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:T.shadows[4]}},children:[jsx(gt,{src:ub,alt:"captured"}),jsxs(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px"},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:[jsxs(ft,{isCapture:true,percentage:o,children:[o,"% ",jsx(xt,{isCapture:true,percentage:It(o)})]}),e>1&&jsxs(z,{compact:true,color:"dark",children:[e,"x"]})]})]})}):r==="CAPTURED"&&!c?jsx(a,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}):jsx(a,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}),I=o===100?jsx(a,{title:A("captured"),children:jsx(Bo,{children:jsx(N,{src:kk,alt:"captured"})})}):x,W=useMemo(()=>s&&I?jsx(b,{chipIndex:4,copyText:A("captured"),selectionProps:f,children:A("captured")}):n&&I?jsx(k,{children:A("captured")}):I,[n,I,s,f]);return W&&jsx("div",{id:g,"data-testid":"CaptureAutoIcon",style:{zIndex:12},children:W})}var Do=Be;function Ve({voidPercentage:t,capturePercentage:o,voidCount:e,autoType:r,captureAmount:l$1,voidAmount:p,currency:a$1,isTextShown:n,isSheetViewShown:d,selectionProps:s={},remainingAmount:f}){let c=Number(o)+Number(t)===100||f<=0,g=yc(useId(),"void-auto-icon"),T=useTheme$1(),{t:A}=useTranslation(),P=Ha(f||0),L=useCallback(C=>`Auto ${C} - ${a$1} ${P.integerAmount}.${P.decimalAmount}`,[a$1,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l$1:p,{integerAmount:D,decimalAmount:v}=Ia(X,a$1);return `Partial ${C} - ${a$1} ${D}.${v}`},[l$1,p,a$1]),x=t>0||p?jsx(a,{title:J("Void"),children:jsxs(ut,{isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",sx:{zIndex:14,background:T.palette.common.white,border:`0.75px solid ${T.palette.grey[600]}1A`},variants:{animate:{boxShadow:T.shadows[4]}},children:[jsx(gt,{src:Bk,alt:"void"}),jsxs(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px"},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:[jsxs(ft,{percentage:t,children:[t,"% ",jsx(xt,{percentage:It(t)})]}),e>0&&jsxs(z,{compact:true,color:"neutral",children:[e,"x"]})]})]})}):r==="VOID"&&!c?jsx(a,{title:L("Void"),children:jsx(j,{children:jsx(N,{src:tt.VOID?.icon,alt:"auto"})})}):null,I=t===100?jsx(a,{title:A("void"),children:jsx(j,{children:jsx(N,{src:Bk,alt:"void"})})}):x,W=useMemo(()=>d&&I?jsx(b,{chipIndex:5,copyText:A("void"),selectionProps:s,children:A("void")}):n&&I?jsx(l,{children:A("void")}):I,[n,I,d,s]);return W?jsx("div",{id:g,"data-testid":"VoidAutoIcon",style:{...!d&&{zIndex:11}},children:W}):null}var $o=Ve;var Me=Do;var Fe=({authorizedStatus:t,isTextShown:o,iconStyles:e,tableMode:r,chipIndex:l=0,selectionProps:p={}})=>{let{t:a$1}=useTranslation(),n=useTheme$1(),d=a$1(_(t));return Va(r)?jsx(b,{copyText:d,chipIndex:l,selectionProps:p,children:d}):jsx(a,{title:d,children:o?jsx(j$1,{"data-testid":"StatusCell_AuthorizedStatusLabel",sx:{color:n.palette.info.dark},children:d}):jsx(a$2,{src:f[t],alt:"authorized-icon","data-testid":"StatusCell_AuthorizedStatusIcon",sx:e})})};var _o=styled$1(motion.span)(({theme:t})=>({color:t.palette.common.white,display:"block",fontWeight:t.typography.fontWeightBold,fontSize:"9.78px",borderRadius:"4px",paddingInline:t.spacing(.45)})),Vo=styled$1(motion.span)(()=>({display:"block",width:"0",overflow:"hidden"})),Bt=styled$1("img")(()=>({width:"10px",height:"10px"})),Lt=styled$1(motion.span)(({theme:t})=>({width:"18px",height:"18px",borderRadius:"50%",backgroundColor:t.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative"})),Dt=styled$1(motion.div,{shouldForwardProp:t=>t!=="isVisible"})(({isVisible:t})=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",width:"0",overflow:"hidden",opacity:0,...!t&&{padding:"0 !important"}})),Mo=styled$1(motion.div)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start"})),zo=styled$1(motion.span)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minHeight:"24px",cursor:"pointer",borderRadius:"16px"})),No={delay:.2,ease:"easeIn",fadeIn:{duration:.2}},Go={animate:{width:"auto",paddingRight:"4px",paddingLeft:"4px"},fadeIn:{opacity:1,transition:{delay:.7}}},Fo={animate:{width:"auto"},fadeIn:{opacity:1,transition:{delay:1}}},Uo={animate:{width:"auto",paddingRight:"8px",paddingLeft:"4px"}},Et={fadeIn:{duration:.3},animate:{duration:.1}},Oo={fadeIn:{opacity:1}},jo=styled$1(j$1)(()=>({width:"88px",height:"100%"})),$t=styled$1(Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.25),height:"100%"}));function qe({chargeStatus:t,gatewayTooltip:o$1,acquirerTooltip:e,chargeTooltip:r,errorCode:l,isTextShown:p$1,gatewayCode:a$1,acquirerCode:n,unCapturedStyles:d,iconStyles:s$1,iconWrapperStyles:f,gatewayIconWrapperStyles:c,gatewayContainerStyles:g$1,gateWayIconStyles:T,showBadge:A=true,isSheetViewShown:P=false,selectionProps:L={},chipIndex:J=0}){let x=t?b$1[t]:null,I=t?g[t]:null,W=useTheme$1(),{t:C}=useTranslation(),X=yc(useId(),"charge-status-icon"),D=r&&jsx(Fragment,{children:jsx("div",{children:r})}),v=e&&jsxs(Fragment,{children:[jsx("div",{children:"Acquirer"}),jsx("div",{children:e})]}),Y=o$1&&jsxs(Fragment,{children:[jsx("div",{children:"Gateway"}),jsx("div",{children:o$1})]}),Ft=t&&a$3[t]&&jsx("div",{"data-testid":"ChargeStatusIcon_ChargeIcon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",borderRadius:x?"50%":"",...f},children:jsx(p,{src:a$3[t],alt:"charge-icon","data-testid":"ChargeStatusIcon_StatusIcon",style:{borderRadius:x?"50%":"",width:"16px",height:"16px",...s$1}})});return P?jsxs($t,{children:[jsxs(b,{copyText:C(_(t)),chipIndex:J,selectionProps:L,children:[C(_(t))," ",l]}),x&&jsxs(Fragment,{children:[a$1&&jsxs(b,{copyText:"Gateway",chipIndex:1,selectionProps:L,children:["Gateway ",a$1]}),n&&jsxs(b,{copyText:"Acquirer",chipIndex:2,selectionProps:L,children:["Acquirer ",n]})]})]}):p$1?jsxs($t,{children:[jsx(a,{title:D,children:jsxs(jo,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark,borderColor:`${x?.color||I?.color||W.palette.info.dark}1A`},children:[C(_(t))," ",l]})}),x&&jsxs(Fragment,{children:[a$1&&jsx(a,{title:Y,children:jsxs(j$1,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark},children:["Gateway ",a$1]})}),n&&jsx(a,{title:v,children:jsxs(j$1,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark},children:["Acquirer ",n]})})]})]}):jsx(o,{id:X,"data-testid":"ChargeStatusIcon_StatusIconWrapper",style:{...f},children:s?.includes(t||"")&&(D||v||Y)?jsxs(zo,{"data-testid":"ChargeStatusIcon_UnCapturedContainer",whileHover:["animate","fadeIn"],style:{left:"0",...A&&{paddingInline:"12px",border:"1px solid #F2F2F2",borderRadius:"12px",backgroundColor:"#fff"},...d},children:[jsx(Mo,{"data-testid":"ChargeStatusIcon_UnCapturedBadge",sx:{borderRadius:"56px"},initial:{background:"transparent"},variants:{animate:{background:x?.background}},children:jsx(a,{title:D??C(_(t)),children:jsxs(Fragment,{children:[Ft,jsx(Vo,{"data-testid":"ChargeStatusIcon_ErrorCodeWrapper",transition:{animate:{duration:.05}},variants:Uo,style:{...l&&{padding:"0 !important"}},children:jsx(_o,{"data-testid":"ChargeStatusIcon_ErrorCodeLabel",sx:{background:x?.color},transition:No,variants:Oo,initial:{opacity:0},children:l})})]})})}),jsx(Dt,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Et,variants:Go,style:g$1,isVisible:!!Y,children:Y&&jsx(a,{title:Y,children:jsx(Lt,{"data-testid":"ChargeStatusIcon_GatewayIconWrapper",style:{background:x?.background,...c},children:jsx(Bt,{src:x?.gatewayIcon,alt:"gateway-icon","data-testid":"ChargeStatusIcon_GatewayIcon",style:T})})})}),jsx(Dt,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Et,variants:Fo,style:g$1,isVisible:!!v,children:v&&jsx(a,{title:v,children:jsx(Lt,{"data-testid":"ChargeStatusIcon_AcquirerIconWrapper",style:{background:x?.background,...c},children:jsx(Bt,{src:x?.acquirerIcon,alt:"acquirer-icon","data-testid":"ChargeStatusIcon_AcquirerIcon",style:T})})})})]}):jsx(a,{title:D??C(_(t)),children:jsx(o,{children:Ft})})})}var Xe=()=>{let{t}=useTranslation(),o=yc(useId(),"customer-initiated-icon");return jsx(a,{title:t("merchantInitiated"),children:jsx("img",{id:o,"data-testid":"merchantInitiatedIcon",src:vb,alt:"merchant",style:{width:"16px",height:"16px"}})})};var Ye={G:"Global",R:"Regional",L:"Local"},ot=({geographyVariant:t,countryCode:o,isTextShown:e})=>{let r=t?Ye[t]:void 0,l=r||o?`${r||""} ${r&&o?"-":""} ${o?`Country - ${o}`:""}`:void 0;return e||!o?null:jsx(a,{title:l,children:jsx(a$4,{countryCode:o})})};var tr=({geographyVariant:t,isTextShown:o,deviceCountry:e,deviceType:r,tableMode:l})=>{let p=yc(useId(),"device-icon-chip");return jsxs(Qe,{id:p,"data-testid":"DeviceIconChip",sx:{display:"flex",gap:"8px",alignItems:"center",...Va(l)&&{height:"18px"}},children:[jsx(ot,{geographyVariant:t,isTextShown:o,countryCode:e}),jsx(c,{type:r,isTextShown:o,tableMode:l})]})};var rr=({isDisputeOpen:t,iconStyles:o})=>{let e=yc(useId(),"dispute-icon");return jsx(p,{id:e,"data-testid":"StatusCell_DisputeStatusIcon",sx:{width:"13.5px",height:"13.5px"},src:t?wa:va,alt:"dispute-icon",style:o})};var Xo=styled$1(Qe,{shouldForwardProp:t=>t!=="tableMode"})(({theme:t,tableMode:o})=>({display:"flex",gap:t.spacing(.5),...Va(o)&&{height:"18px"},alignItems:"center"})),Yo=styled$1("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function Vt({countryCode:t,isTextShown:o,cardNumber:e,bankName:r,tableMode:l}){let p=yc(useId(),"issuer-icon"),a$1=e?.slice(0,4),n=e?.slice(-4);return jsxs(Xo,{id:p,"data-testid":"IssuerIcon",tableMode:l,children:[t&&jsx(ot,{countryCode:t,isTextShown:o}),jsx(a,{title:`${r?`Issuer - ${r}`:""}`,children:jsx(Yo,{children:`${a$1||""} ${n||""}`})})]})}var sr=Vt;styled(motion.div)(({theme:t,background:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5),paddingInline:t.spacing(.75),paddingBlock:t.spacing(.5),backgroundColor:o,height:"24px",width:"fit-content",borderRadius:"24px",fontSize:"10px",color:t.palette.text.primary}));var Ra=styled("img")(()=>({height:"13.125px",width:"12px"})),bt=styled("div")(()=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",width:"65px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4.5px 8px",borderRadius:"24px"})),ka=styled("div")(({theme:t})=>({color:t.palette.common.white,background:t.palette.error.main,fontSize:"0.6rem",fontWeight:600,borderRadius:"16px",padding:"2px 8px",display:"flex",alignItems:"center",justifyContent:"center"})),Ba=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px"}));var ur=({payoutStatus:t="PENDING",isTextShown:o,payoutTooltip:e$1,iconStyles:r,isSheetViewShown:l,chipIndex:p$1=0,selectionProps:a$1={}})=>{let{t:n}=useTranslation(),d=yc(useId(),"payout-icon"),s=n(_(t)),f=e$1||s;return l?jsx(b,{chipIndex:p$1,copyText:s,selectionProps:a$1,children:s}):jsx(a,{title:f,children:o?jsx(bt,{id:d,"data-testid":"StatusCell_PayoutStatusLabel",children:s}):jsx(p,{id:d,src:e[t],alt:"settled-icon","data-testid":"StatusCell_PayoutStatusIcon",style:r})})};var Qo=styled$1(motion.img)(()=>({width:"14px",height:"14px"})),Zo=styled$1(motion.span)(({theme:t})=>({color:t.palette.common.white,borderRadius:t.spacing(.5),height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600,backgroundColor:t.palette.secondary.main})),Mt=styled$1(motion.div)(({theme:t})=>({height:"16px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:`${t.palette.secondary.main}1A`,paddingInline:t.spacing(.5),borderRadius:"56px"})),qa=(t,o,e)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:e?t*e:t*49,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:o}}),Ka=styled$1(motion.span)(({isTextShown:t,theme:o})=>({border:`1px solid ${o.palette.divider}`,borderRadius:"12px",backgroundColor:o.palette.background.paper,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",minWidth:t?"auto":"36px",...t&&{border:"none"}})),Ja=styled$1(motion.div,{shouldForwardProp:t=>t!=="order"})(({order:t=0})=>({display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:0,left:0,zIndex:t+6,width:"fit-content",height:"24px",cursor:"pointer",borderRadius:"16px","&:hover":{zIndex:200}})),Xa=styled$1(motion.div,{shouldForwardProp:t=>t!=="statusesCount"})(({statusesCount:t=1})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",minWidth:`${t*6+36}px`,height:"24px",cursor:"pointer",borderRadius:"16px",overflow:"visible"})),Ya=styled$1("div")(()=>({display:"flex",gap:"4px",justifyContent:"flex-start",alignItems:"center",position:"relative",width:"100%",overflow:"visible"}));var hr=({isTextShown:t,refundStatus:o="PENDING",refundTooltip:e="",refundCount:r,iconStyles:l,isSheetViewShown:p$1,chipIndex:a$1=0,selectionProps:n={}})=>{let{t:d$1}=useTranslation(),s=useTheme$1(),f=yc(useId(),"refund-icon"),c=(r||0)>1,g=d$1(_(o));if(p$1)return jsxs(b,{chipIndex:a$1,selectionProps:n,copyText:g,children:[g," ",c?`${r}x`:null]});let T=jsxs(Zo,{"data-testid":"StatusCell_RefundsCountBadge",initial:{width:0,opacity:0,padding:"0px"},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex",padding:"1.285px 2.569px"},fadeIn:{transition:{delay:.5},opacity:1}},children:[r,"x"]});return t?jsx(a,{title:jsx("div",{children:jsx("div",{children:e})}),children:jsx(bt,{id:f,"data-testid":"StatusCell_RefundStatusLabel",sx:{color:d[o].color,backgroundColor:d[o].backgroundColor,width:"90px"},children:jsxs(Mt,{whileInView:c?["animate","fadeIn"]:void 0,variants:{animate:{boxShadow:s.shadows[4],gap:s.spacing(.5)}},children:[g," ",c?T:null]})})}):jsx(a,{title:jsx("div",{children:jsx("div",{children:e})}),children:c?jsxs(Mt,{id:f,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:s.shadows[4],gap:s.spacing(.5)}},children:[jsx(Qo,{src:tk,alt:"multi-refunded-icon","data-testid":"StatusCell_MultiRefundIcon"}),T]}):jsx(p,{id:f,src:c$1[o],alt:"refunded-icon","data-testid":"StatusCell_RefundStatusIcon",style:l})})},te=hr;var Cr=te;var yr={american_express:"AMEX",debit:"card",credit:"card",unionpay:"UnionPay",jaywan:"JAYWAN"},B=t=>yr[t?.toLowerCase()||""]||t;styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));var oe=styled("img")(()=>({maxWidth:"24px",maxHeight:"16px"}));styled(motion.span,{shouldForwardProp:t=>t!=="sourcesCount"})(({theme:t,sourcesCount:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${o*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var ee=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),re=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px",textAlign:"center",width:"100%"}));styled("span")(({theme:t})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));var ne=styled("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function At({source:t,isTextShown:o,title:e,width:r,height:l,imgSx:p}){let{t:a$1}=useTranslation(),n=h(t);return jsx(a,{title:e,children:o?jsx(re,{"data-testid":"SourceCell_BadgeTextWrapper",children:jsx(ee,{"data-testid":"SourceCell_TextLabel","data-source":t,children:a$1(_(t))})}):jsx(oe,{src:n,alt:t,width:r,height:l,onError:d=>{d.currentTarget.src=h("card");},sx:p})})}function vr({payment:t,card:o,isTextShown:e,firstIcon:r}){let l=yc(useId(),"source-icons"),{t:p}=useTranslation(),a=useCallback(()=>{let s=[],f=bc(t),c=t?.method,g=t?.scheme;return B(c)?.toLowerCase()===B(g)?.toLowerCase()?s.push(B(c),B(f)):s.push(B(c),B(f),B(g)),s},[t]),n=useMemo(()=>jsx(At,{source:r,isTextShown:e,title:p(_(r))},r),[r,e,p]),d=useMemo(()=>a()?.filter(s=>!!s&&s!==r)?.map((s,f,c)=>{let g=t?.wallet===p("sv_wallet")?p("storedValueWallet"):p("passThruWallet"),T=f===c.length-1&&o?.last_four?`${p(_(s))} - ${o?.last_four}`:p(_(s));return jsx(At,{source:s,isTextShown:e,title:f===0&&s==="Wallet"?g:T},`${s}-${f}`)}),[a,t,o,e,p,r]);return jsxs(Box,{id:l,"data-testid":"SourceIcons",display:"flex",alignItems:"center",gap:.5,children:[r&&n,d,o?.last_four&&jsxs(ne,{children:["\xB7\xB7\xB7 ",o?.last_four]})]})}var rt={PROCESSED:Vg,FAILED:""};var se=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),le=styled("img")(()=>({width:"16px",height:"16px"})),de=styled("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}));function ce({status:t,isTextShown:o,isSheetViewShown:e,chipIndex:r=0,selectionProps:l={}}){let p=useTheme(),{t:a$1}=useTranslation(),n=yc(useId(),"destination-icon"),d=a$1(_(t));return e&&rt[t]?jsx(b,{copyText:d,chipIndex:r,selectionProps:l,children:d}):o&&rt[t]?jsx(se,{id:n,"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:"#1F88D00D",color:t==="PROCESSED"?p.palette.info.dark:p.palette.common.black},children:d}):jsx(de,{id:n,"data-testid":"DestinationIcon",className:"destination-status",children:t&&rt[t]&&jsx(a,{title:a$1(_(t)),children:jsx(le,{src:rt[t],alt:"destination-icon"})})})}export{qa as a,Ka as b,Ja as c,Xa as d,Ya as e,Ce as f,Se as g,Te as h,$o as i,Me as j,Fe as k,qe as l,Xe as m,ot as n,tr as o,rr as p,sr as q,Ra as r,ka as s,Ba as t,ur as u,Cr as v,B as w,At as x,vr as y,ce as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-Z72ELNOV.js';var m=a;export{m as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-KHM5KW53.js';import {r}from'./chunk-YTESL64R.js';import {yc}from'./chunk-MXISJOX2.js';import {useId}from'react';import p from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var u=styled(p)(({rows:e,columns:t})=>({display:"grid",gridTemplateColumns:`auto repeat(${t}, 1fr)`,gridTemplateRows:`auto repeat(${e}, 1fr)`,gap:"6px"})),$=styled(p)(()=>({width:24,position:"sticky",top:0,left:0,zIndex:3})),g=styled(p)(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",fontSize:"10px",fontWeight:500,color:e.palette.grey[700],lineHeight:"100%",letterSpacing:"0",position:"sticky",top:0,zIndex:2,backgroundColor:"#fbfbfb"})),M=styled(p)(({theme:e,percentage:t=0})=>({width:"24px",height:"8px",borderRadius:"1px",backgroundColor:t===0?alpha(e.palette.grey[700],.1):alpha(e.palette.info.dark,t)})),O=styled(g)(()=>({fontSize:"9px",top:"auto",left:0,zIndex:1})),w=styled(p)(()=>({padding:"22px 12px",overflow:"auto",maxHeight:"480px"}));function b({xAxis:e,yAxis:t,series:n,isLoading:m,tooltip:l}){let s=yc(useId(),"heat-map"),d=e.labels,y=t.labels;return jsxs(w,{id:s,"data-testid":"HeatMap",children:[jsxs(u,{className:"x-labels",rows:1,columns:d.length,children:[jsx($,{}),d.map((r,c)=>jsx(g,{children:e.render?e.render(r):r},`x-${c}-${r}`))]}),jsx(u,{className:"y-labels",rows:y.length,columns:d.length,children:y.map((r$1,c)=>jsxs(Fragment,{children:[jsx(O,{sx:{minWidth:"25px"},children:t.render?t.render(r$1):r$1},`y-${c}-${r$1}`),d.map((i,h)=>{if(m)return jsx(r,{variant:"rectangular",width:"24px",height:"8px"},`${i}-${h}`);let f=n?.[i]?.[r$1]??{};return jsx(a,{title:l?.render&&f?.value?l.render(f,i,r$1):null,children:jsx(M,{percentage:f?.colorOpacityDegree})},`${i}-${h}`)})]}))})]})}var H=[.06,.1,.2,.3,.4,.5,.6,.7,.8,.9,1];function D(e,t,n){if(t===n)return 0;let m=n-t,l=(e-t)/m,s=Math.floor(l*10);return H[Math.max(0,Math.min(10,s))]}var q=b;export{D as a,q as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {yc}from'./chunk-MXISJOX2.js';import {Rf,Qf,Tf,Pf}from'./chunk-3YAJNHQC.js';import {useId}from'react';import {styled,alpha}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var C=new Map([["warning",Qf],["success",Tf],["info",Pf],["error",Rf]]),c=styled("img")(()=>({width:"12px",height:"12px",flexShrink:0,marginTop:"2px"})),i=e=>e?.message===void 0||e.message===null||e.message===""?null:{...e,message:e.message,type:e.type??"error"},a=(e,o)=>{switch(o??"error"){case "warning":return {borderColor:alpha(e.palette.custom[500],.15),backgroundColor:alpha(e.palette.custom[500],.15),textColor:e.palette.custom[500]};case "success":return {borderColor:alpha(e.palette.success.dark,.15),backgroundColor:alpha(e.palette.success.dark,.15),textColor:e.palette.success.dark};case "info":return {borderColor:alpha(e.palette.info.dark,.12),backgroundColor:alpha(e.palette.info.dark,.12),textColor:e.palette.info.dark};default:return {borderColor:"#F7D9D9",backgroundColor:"#F7D9D9",textColor:"#CC0000"}}},p=e=>C.get(e??"error")??Rf;var n=styled("div",{shouldForwardProp:e=>e!=="type"})(({theme:e,type:o})=>{let{backgroundColor:d}=a(e,o);return {display:"flex",alignItems:"flex-start",gap:"4px",minHeight:"32px",padding:"8px 12px",background:d,borderRadius:"0 0 4px 4px"}}),s=styled("div",{shouldForwardProp:e=>e!=="type"})(({theme:e,type:o})=>{let{textColor:d}=a(e,o);return {fontSize:"10px",lineHeight:"16px",display:"block",color:d,wordBreak:"break-word"}});function F({type:e,message:o,icon:d}){let x=yc(useId(),"field-feedback"),r=i({type:e,message:o,icon:d});return r?jsxs(n,{id:x,"data-testid":"FieldFeedback",type:r.type,children:[r.icon??jsx(c,{src:p(r.type),alt:""}),jsx(s,{type:r.type,children:r.message})]}):null}export{c as a,i as b,a as c,p as d,n as e,s as f,F as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {b as b$1,g,a as a$3}from'./chunk-GB5N3AEY.js';import {a as a$2}from'./chunk-N2LPXJYV.js';import {a as a$1}from'./chunk-KHM5KW53.js';import {a}from'./chunk-GNY2VGGW.js';import {yc}from'./chunk-MXISJOX2.js';import {useId}from'react';import b from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var f=styled(b)(()=>({display:"flex",gap:"4px",alignItems:"center",justifyContent:"center",borderRadius:"56px",padding:"2px 4px",cursor:"default"})),c=styled(a)(({theme:t})=>({color:t.palette.common.white,fontWeight:600,fontSize:"8px",padding:"3px 2.57px",borderRadius:"4px",lineHeight:"100%"}));function r({tooltip:t,status:o,statusCode:x}){let S=yc(useId(),"status-label"),p=b$1[o]??g[o]??null;return jsx(a$1,{title:t,children:jsxs(f,{id:S,"data-testid":"StatusLabel",sx:{backgroundColor:p?.background||"transparent"},children:[jsx(a$2,{src:a$3[o]}),jsx(c,{sx:g=>({backgroundColor:p?.color||g.palette.info.dark}),children:x})]})})}var q=r;export{q as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-2KLQQ4GT.js';import {a as a$1}from'./chunk-KHM5KW53.js';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var i=styled(a)(({theme:t})=>({color:t.palette.text.primary,"&.CustomVariant_text":{height:24},display:"inline-flex"}));var n=({title:t,slotProps:e={},children:l})=>{let{chip:h={},tooltip:a={}}=e,{sx:s,...c}=h;return jsx(a$1,{...a,title:t,children:jsx(i,{...c,sx:{height:24,display:"inline-flex",color:"text.primary",...s},children:l})})},C=n;export{C as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {useId}from'react';import T from'@mui/material/Box';import {styled}from'@mui/material/styles';import d,{tooltipClasses}from'@mui/material/Tooltip';import {jsx}from'react/jsx-runtime';var e=styled(({className:o,...t})=>jsx(d,{...t,classes:{popper:o}}))(({theme:o})=>({zIndex:999999,[`& .${tooltipClasses.arrow}`]:{"&:before":{border:"0.97px solid rgba(60, 55, 55, 0.13)"},color:o.palette.common.white},[`& .${tooltipClasses.tooltip}`]:{backgroundColor:o.palette.common.white,color:o.palette.text.secondary,boxShadow:o.shadows[1],fontSize:12,border:"0.97px solid rgba(60, 55, 55, 0.13)",marginBottom:"7px !important"}}));function P({className:o,title:t,placement:i="top",children:a,wrapperProps:s,...m}){let n=useId();return jsx(e,{classes:{popper:o},title:t,placement:i,arrow:true,...m,children:jsx(T,{display:"flex",alignItems:"center",...s,children:a},`tooltip-child-${n}`)})}var l=P;var E=l;export{E as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-KHM5KW53.js';import {a}from'./chunk-GNY2VGGW.js';import {f}from'./chunk-YTESL64R.js';import {yc}from'./chunk-MXISJOX2.js';import {wb}from'./chunk-3YAJNHQC.js';import {memo,useRef,useState,useEffect,useMemo,useId}from'react';import ie from'@mui/material/Popper';import {styled,Box}from'@mui/material';import {jsx,jsxs}from'react/jsx-runtime';var k=styled(a)(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.subtitle1.fontSize,color:e.palette.grey[700],paddingInlineStart:e.spacing(2),paddingTop:e.spacing(1),paddingBottom:e.spacing(1),paddingInlineEnd:e.spacing(1)})),R=styled(Box,{shouldForwardProp:e=>e!=="disabled"})(({theme:e,disabled:n})=>({fontWeight:e.typography.fontWeightMedium,padding:e.spacing(1),position:"relative",display:"flex",alignItems:"center",textTransform:"capitalize",cursor:n?"not-allowed":"pointer",flex:1,zIndex:99999,".MuiButtonBase-root":{width:"16px",marginInlineEnd:"4px"}})),z=styled(Box)(({theme:e})=>({borderRadius:e.spacing(.5),background:e.palette.background.default,width:"max-content",cursor:"pointer",zIndex:99999,boxShadow:e.shadows[11],display:"flex",flexDirection:"column",".nested-menu-item + .nested-menu-item":{borderTop:`1px solid ${e.palette.divider}`,zIndex:99999},".nested-menu-item:hover":{transition:e.transitions.create(["boxShadow","border"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.complex}),boxShadow:e.shadows[6],border:"none",position:"relative"}})),B=styled(Box)(({theme:e})=>({...e.typography.subtitle1,color:e.palette.text.primary})),H=styled(f)(()=>({padding:0,paddingRight:"4px",".MuiSvgIcon-root":{width:12,height:12}})),$=styled(Box)(()=>({display:"flex",gap:"4px",alignItems:"center",flexGrow:1,minWidth:0,overflow:"hidden"})),A=styled(Box)(()=>({display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",minWidth:0,overflow:"hidden"})),O=styled(Box)(({theme:e})=>({borderRadius:"50%",background:e.palette.divider,width:13,height:14,fontSize:"8px",fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",lineHeight:"10px"})),G=styled(Box)(()=>({display:"flex",alignItems:"center",gap:"8px",flexShrink:0,position:"relative",left:4})),F=styled(Box)(()=>({flex:"1 0 auto"})),_=styled(Box)(()=>({position:"relative",zIndex:999999}));function q(e){return e.scrollWidth-e.clientWidth>1}function oe({children:e}){let n=useRef(null),[r,t]=useState(false);return jsx(a$1,{arrow:true,placement:"top",title:e,open:r,onOpen:()=>{let f=n.current;f&&q(f)&&t(true);},onClose:()=>t(false),componentsProps:{tooltip:{sx:{maxWidth:280,whiteSpace:"normal",wordBreak:"break-word"}}},wrapperProps:{sx:{flex:1,minWidth:0,display:"block",overflow:"hidden"}},children:jsx(B,{ref:n,sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e})})}var K=memo(oe);function se({label:e,icon:n,name:r,menuItems:t,setSelected:f,onSelect:C,selected:i,displayChildrenCount:I,disabled:s,placement:h="right",sx:g,menuSx:P}){let[u,S]=useState(null),l=useRef(null),[a,p]=useState(false),w=o=>{!s&&i!==void 0&&(f({name:o,selected:!i}),i||p(false));};return useEffect(()=>{p(!!(t?.some(o=>o.selected)&&!t?.every(o=>o.selected)));},[]),jsxs(R,{"data-testid":"NestedDropdown_MenuItem",ref:l,className:`nested-menu-item ${u?"active":""} ${s?"disabled":""}`,onMouseEnter:o=>{!u&&t?.length&&S(o.currentTarget);},onMouseLeave:()=>{u&&S(null);},onClick:o=>{s||(o.stopPropagation(),w(r));},sx:{...t?.length&&{cursor:s?"not-allowed":"pointer"},zIndex:99999,...g},disabled:s,children:[i!==void 0&&jsx(H,{size:"small",indeterminate:a,checked:i,disabled:s}),jsxs($,{children:[n&&n,jsxs(A,{children:[e&&jsx(K,{children:e}),!!t?.length&&jsxs(G,{children:[I&&jsx(O,{children:t.length}),jsx("img",{src:wb,className:"arrow-icon",alt:"arrow",style:{height:12}})]})]})]}),t?.length&&jsx(ie,{open:!!(u&&t?.length),anchorEl:u,placement:h==="left"?"left-start":"right-start",sx:{zIndex:99999,...P},children:jsx(T,{className:"child-dropdown",menuItems:t,placement:h,sx:P,onChildrenChange:o=>{let y=o.every(d=>d.selected);i!==void 0&&!s&&(y&&f({name:r,selected:true}),o.every(d=>!d.selected)&&f({name:r,selected:false}),p(o?.some(d=>d.selected)&&!o.every(d=>!d.selected)&&!y));},onSelect:o=>{C(o,r);}})})]})}var M=memo(se);function ae({title:e,menuItems:n,onChildrenChange:r,onSelect:t,className:f,updatedList:C,footer:i,header:I,placement:s="right",...h}){let[g,P]=useState({name:"",selected:false}),[u,S]=useState();return useEffect(()=>{S(n);},[n]),useEffect(()=>{if(g.name){let{name:l,selected:a}=g,p=[],w=d=>d?.map(m=>(p.push({name:m.name,selected:a}),{...m,selected:a,...m.menuItems?.length&&{menuItems:w(m.menuItems)}})),y=(d=>d.map(m=>m.name===l?(p.push({name:m.name,selected:a}),{...m,selected:a,...m.menuItems?.length&&{menuItems:w(m.menuItems)}}):m))(u);S(y),C&&C(y),r&&r(y),t&&t(p);}},[g]),jsxs(z,{component:"article",className:`tap-dropdown ${f||""}`,...h,children:[jsx(_,{children:e&&jsx(k,{component:"p",children:e})}),I,jsx(F,{children:u?.map((l,a)=>jsx(M,{setSelected:({name:p,selected:w})=>{P({name:p,selected:w});},onSelect:p=>{t&&t(p);},placement:s,...l},`${l.name}-${a}`))}),i&&i]})}var T=memo(ae);var Y=(e,{menuItemSx:n,menuSx:r})=>(e.forEach(t=>{t.sx={...n,...t.sx},t.menuSx={...r,...t.menuSx},t.menuItems?.length&&Y(t.menuItems,{menuItemSx:n,menuSx:r});}),e);function he({title:e,menuItems:n,onSelect:r,updatedList:t,header:f,placement:C="right",menuItemSx:i={},menuSx:I={},...s}){let h=useMemo(()=>Y(n,{menuItemSx:i,menuSx:I}),[n,i,I]),[g,P]=useState(h),u=yc(useId(),"nested-dropdown");useEffect(()=>{P(h);},[h]);let S=l=>{let a=w=>w.map(o=>({...o,selected:l.find(y=>o.name===y.name)?.selected??o.selected,...o.menuItems?.length&&{menuItems:a(o.menuItems)}})),p=a(g);P(p),t&&t(p);};return jsx(T,{id:u,"data-testid":"NestedDropdown",placement:C,menuItems:g,title:e,header:f,onSelect:l=>{r&&r(l),S(l);},...s})}var Z=memo(he);var Ue=Z;export{M as a,T as b,Ue as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-ZONDSLTR.js';import {a}from'./chunk-KHM5KW53.js';import {yc,f as f$1}from'./chunk-MXISJOX2.js';import {nb}from'./chunk-3YAJNHQC.js';import {useId}from'react';import {useTranslation}from'react-i18next';import {jsx,jsxs}from'react/jsx-runtime';var m=t=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:t*39,transition:{duration:.3,type:"tween",ease:"easeOut"}}});var d=({children:t})=>jsx("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"2px"},children:t});function f({value:t,index:e}){let s=yc(useId(),"rating-count"),{t:u}=useTranslation();return jsx(a,{title:u("totalPaymentCount",{amount:f$1(t)}),wrapperProps:{display:"inline-flex"},children:jsx(a$1,{id:s,order:e,variants:m(e),"data-testid":"RatingCount",children:jsxs(d,{children:[jsx("img",{src:nb,alt:"star",style:{width:"10px",height:"10px"}})," ",(t||0)>1&&jsx("span",{style:{fontSize:"9.782px"},children:t})]})})})}export{f as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {c,b,g}from'./chunk-FPEXFSFO.js';import {a}from'./chunk-J6HEXAGE.js';import {a as a$1}from'./chunk-2SBTZEUM.js';import {yc}from'./chunk-MXISJOX2.js';import {Qc,Db,B}from'./chunk-3YAJNHQC.js';import Ot,{useId,forwardRef,memo,useState,useCallback,useMemo,useEffect}from'react';import we from'@mui/material/Box';import {styled}from'@mui/material/styles';import $t from'@mui/material/TextField';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import io from'@mui/material/InputLabel';import lo from'@mui/material/MenuItem';import Kt from'@mui/material/SvgIcon';import Yt from'@mui/material/IconButton';import Qt from'@mui/material/CircularProgress';import to from'@mui/material/FormControl';import qe from'@mui/material/Select';import So from'@mui/material/Skeleton';import {styled as styled$1,Popper,Box,ClickAwayListener}from'@mui/material';import Ao from'@mui/material/Input';var Re=styled(we)(()=>({display:"flex",flexDirection:"column",gap:"4px",width:"100%",minHeight:40,"& .MuiTextField-root":{flex:1,margin:"0 !important"}})),Ae=styled($t,{shouldForwardProp:e=>!["hasError","feedbackType","hasFeedback","hideArrows","hasLabel"].includes(e)})(({theme:e,hasError:t,feedbackType:r,hasFeedback:n,hideArrows:b,hasLabel:l,disabled:s})=>{let{borderColor:u}=c(e,r),a=n?"4px 4px 0 0":"4px",c$1=s?e.palette.grey[400]:e.palette.common.white,o=e.palette.divider;return r&&(o=u),t&&!r&&(o=e.palette.error.main),{border:`1px solid ${o}`,borderBottom:n?"none":void 0,borderRadius:a,...b&&{"& 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"},"& .MuiInputLabel-root":{fontSize:"10px",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)",color:`${e.palette.grey[700]} !important`,overflow:"visible"},"& .MuiInputLabel-root.MuiInputLabel-shrink, & .MuiInputLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiFilledInput-root":{maxHeight:"40px !important",height:"40px",overflow:"hidden",borderRadius:a,backgroundColor:c$1,paddingTop:l?"11px":"0px",paddingBottom:l?"4px":"0px",paddingLeft:"8px",boxSizing:"border-box",display:"inline-flex",alignItems:l?"stretch":"center","&:before, &:after":{display:"none"},"&:hover, &.Mui-focused, &.Mui-disabled":{backgroundColor:c$1}},"& .MuiFilledInput-input":{margin:0,padding:"0 !important",minHeight:0,height:"auto",boxSizing:"border-box",display:"flex",alignItems:l?"flex-end":"center",alignSelf:l?"flex-end":"center",fontSize:"11px",lineHeight:"11px",color:e.palette.text.primary,paddingBottom:l?"1px !important":"0 !important","&::placeholder":{color:e.palette.grey[500],opacity:1}}}}),Te=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}));var We=Ot.forwardRef(({name:e,onChange:t,hasError:r,helperText:n,hideArrows:b$1,feedback:l,InputProps:s,InputLabelProps:u,label:a,placeholder:c,...o},y)=>{let h=yc(useId(),"input-base"),S=g=>{t?.(g.target.value??"");},f=l!=null,m=b(l),p=typeof a=="string"&&a.trim().length>0?a:void 0,I=p??c,v=p&&typeof c=="string"?c:void 0;return jsxs(we,{children:[jsx(Re,{id:h,"data-testid":"InputBase",children:jsx(Ae,{rows:1,hasError:!!r&&!f,hasFeedback:!!m,feedbackType:m?.type,hasLabel:!!I,fullWidth:true,size:"small",variant:"filled",ref:y,name:e,type:o.type??"text",label:I,placeholder:v,onChange:S,InputLabelProps:u,InputProps:{disableUnderline:true,...s,sx:s?.sx},hideArrows:b$1,...o})}),m&&jsx(g,{...m}),!f&&n&&jsx(Te,{children:n})]})});We.displayName="InputBase";var He=We;var Vt=He;var ze=forwardRef((e,t)=>jsx(Kt,{ref:t,viewBox:"0 0 8 8",fontSize:"small",...e,children:jsx("path",{d:"M6.63965 0.102539C6.75727 0.0997602 6.87304 0.133137 6.97168 0.197266C7.07023 0.261345 7.14718 0.353407 7.19238 0.461914C7.23757 0.570522 7.24961 0.690513 7.22559 0.805664C7.20154 0.920834 7.1425 1.02595 7.05762 1.10742L7.05664 1.10938L4.56738 3.59766L4.49512 3.66992L7.05762 6.23242C7.11359 6.28617 7.15865 6.35066 7.18945 6.42188C7.22023 6.49308 7.23648 6.5699 7.2373 6.64746C7.23809 6.72499 7.22359 6.80223 7.19434 6.87402C7.16499 6.9459 7.1213 7.0115 7.06641 7.06641C7.01149 7.12132 6.94592 7.16498 6.87402 7.19434C6.8022 7.22362 6.72502 7.23809 6.64746 7.2373C6.56987 7.23649 6.4931 7.22024 6.42188 7.18945C6.35064 7.15865 6.28618 7.1136 6.23242 7.05762L6.23145 7.05664L3.74219 4.56836L3.66992 4.49512L3.59766 4.56836L1.1084 7.05664L1.10742 7.05762C1.05365 7.11362 0.989227 7.15864 0.917969 7.18945C0.846721 7.22025 0.769997 7.2365 0.692383 7.2373C0.614798 7.23809 0.537661 7.22364 0.46582 7.19434C0.393921 7.16498 0.328351 7.12132 0.273438 7.06641C0.218559 7.01151 0.174849 6.94589 0.145508 6.87402C0.116258 6.80223 0.101751 6.72498 0.102539 6.64746C0.103364 6.5699 0.119618 6.49308 0.150391 6.42188C0.181198 6.35065 0.226245 6.28617 0.282227 6.23242L2.84473 3.66992L2.77246 3.59766L0.283203 1.10938L0.282227 1.1084L0.224609 1.04297C0.172384 0.974382 0.136093 0.894624 0.118164 0.80957C0.0942576 0.695891 0.104774 0.577375 0.148438 0.469727C0.192107 0.362124 0.266971 0.269962 0.363281 0.205078C0.459591 0.140238 0.573348 0.105497 0.689453 0.105469C0.767281 0.105527 0.844313 0.121103 0.916016 0.151367C0.987801 0.181723 1.05308 0.226359 1.10742 0.282227L3.66992 2.84473L6.23242 0.282227C6.33914 0.171037 6.48558 0.106239 6.63965 0.102539Z",fill:"#20232B",stroke:"white",strokeWidth:.20511})}));ze.displayName="DefaultClearIcon";var D=ze;var $e=forwardRef((e,t)=>jsx(Kt,{ref:t,viewBox:"0 0 8 5",fill:"none",fontSize:"small",sx:{width:8,height:5},...e,children:jsx("path",{d:"M7.30273 0.117188C7.3806 0.115307 7.4565 0.138248 7.52051 0.182617C7.58455 0.227088 7.63373 0.290458 7.66211 0.363281C7.69046 0.436073 7.69761 0.516047 7.68262 0.592773C7.66777 0.668745 7.63069 0.738375 7.57715 0.793945L4.17285 4.43164C4.10255 4.50662 4.00523 4.55078 3.90234 4.55078C3.79964 4.55064 3.703 4.5065 3.63281 4.43164L0.227539 0.794922L0.228516 0.793945C0.175799 0.738766 0.139848 0.669812 0.125 0.594727C0.11011 0.519097 0.116275 0.440194 0.143555 0.368164C0.170957 0.296002 0.218752 0.232474 0.28125 0.1875C0.343758 0.14262 0.418162 0.11821 0.495117 0.118164C0.546901 0.118166 0.598306 0.12907 0.645508 0.150391C0.691832 0.171346 0.733094 0.201824 0.767578 0.239258L3.90234 3.58691L7.03711 0.239258C7.10547 0.164191 7.20108 0.119752 7.30273 0.117188Z",fill:"#20232B",stroke:"#20232B",strokeWidth:.233333})}));$e.displayName="DefaultSelectIcon";var Oe=$e;function Be({size:e=20,color:t="grey.A400",...r}){return jsx(Qt,{size:e,sx:{backgroundColor:"transparent",color:t},...r})}function K({endAdornmentProp:e,isLoading:t,showClear:r,showMenuArrow:n,menuOpen:b,IconComponent:l,ClearIconComponent:s=D,onClear:u,onClearDefault:a}){return !(e||r||t||n)?null:jsxs(we,{className:"SelectBase-endAdornmentRoot",component:"span",children:[e,t?jsx(Be,{}):null,!t&&r?jsx(Yt,{className:"SelectBase-clearIconButton",type:"button",tabIndex:0,size:"small","aria-label":"Clear selection",onMouseDown:o=>{o.preventDefault(),o.stopPropagation();},onClick:o=>{o.preventDefault(),o.stopPropagation(),u?u():a();},sx:o=>({p:"1px",flexShrink:0,cursor:"pointer",color:"inherit",backgroundColor:"transparent",...l?{mr:2}:{},"&:hover":{backgroundColor:o.palette.action.hover},"&:focus-visible":{outline:`2px solid ${o.palette.primary.main}`,outlineOffset:1}}),children:jsx(s,{sx:{fontSize:8,width:8,height:8}})}):null,!t&&n&&!l&&jsx(we,{component:"span",className:`SelectBase-menuTriggerIcon${b?" SelectBase-menuTriggerIcon-open":""}`,"aria-hidden":true,children:jsx(Oe,{})})]})}function ie(e,t){if(e==null)return false;if(Array.isArray(e))return e.length>0;if(typeof e=="object"){if(t){let n=t(e);return n!=null&&n!==""}let r=e.id;return r!=null&&r!==""}return String(e)!==""}var le=styled(to)(({theme:e})=>({minWidth:52,height:"40px !important",maxHeight:"40px !important",backgroundColor:"transparent",width:"100%",cursor:"pointer","& .MuiInputBase-root":{cursor:"pointer"},"& .MuiInputBase-root.Mui-disabled":{cursor:"default"},"& .MuiFormLabel-asterisk":{color:"red"},"& .MuiFormLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)",color:`${e.palette.grey[700]} !important`,height:"100%",pointerEvents:"none"},".MuiFormLabel-root.MuiFormLabel-filled":{transform:"translate(8px, 8px) scale(0.75) "},".MuiFormLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)",fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%"}}));styled(qe)(({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 pe=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"})),se=styled(qe,{shouldForwardProp:e=>!["feedbackType","hasFeedback"].includes(e)})(({theme:e,error:t,feedbackType:r,hasFeedback:n})=>{let{borderColor:b}=c(e,r),l=n?"4px 4px 0 0":"4px";return {width:"100%",height:"40px !important",maxHeight:"40px !important",borderRadius:l,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:l,fontSize:"11px",cursor:"pointer","&:focus":{backgroundColor:`${e.palette.grey[400]} !important`}},"&.Mui-disabled .MuiSelect-select":{cursor:"default"},".MuiSelect-filled":{padding:"0 8px !important"},"&.MuiInputBase-adornedEnd":{display:"inline-flex",alignItems:"center",backgroundColor:e.palette.grey[400],gap:0},"&&.MuiInputBase-adornedEnd .MuiInputBase-input":{flex:"1 1 0%",minWidth:0,width:"auto",maxWidth:"100%"},"& .SelectBase-endAdornmentRoot":{display:"flex",alignItems:"center",flexShrink:0,gap:"8px",position:"relative",zIndex:1},"& .SelectBase-menuTriggerIcon":{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:"inherit",lineHeight:0,"& svg, & .MuiSvgIcon-root":{transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter})}},"& .SelectBase-menuTriggerIcon-open svg, & .SelectBase-menuTriggerIcon-open .MuiSvgIcon-root":{transform:"rotate(180deg)"},"&.Mui-disabled .MuiSelect-icon":{color:"rgba(0, 0, 0, 0.38)"},"&.Mui-disabled .SelectBase-menuTriggerIcon":{cursor:"default",color:"rgba(0, 0, 0, 0.38)","& svg path":{fill:"rgba(0, 0, 0, 0.38)",stroke:"rgba(0, 0, 0, 0.38)"}},...r&&{border:`1px solid ${b}`},...n&&{borderBottom:"none"},...t&&{border:`1px solid ${e.palette.error.main}`}}}),de=styled(we)(()=>({display:"flex",alignItems:"stretch",height:"100%",flexDirection:"column",flex:1,cursor:"pointer","&:has(.MuiInputBase-root.Mui-disabled)":{cursor:"default"}}));function po(e,t){let{menuSearchable:r,menuSearchPlaceholder:n,...b$1}=e,{required:l,hasError:s,label:u,value:a,helperText:c,feedback:o,onChange:y,options:h,isOptionEqualToValue:S,renderOption:f,getOptionValue:m,isLoading:p,children:I,getOptionLabel:v,IconComponent:g$1,showClearIcon:x=false,ClearIconComponent:T=D,onClear:R,endAdornment:Y,inputProps:ye,open:_,onOpen:j,onClose:ee,menuHasSelectedCheckMark:xe=false,...q}=b$1,Ce=yc(useId(),"select-base"),[he,Ie]=useState(false),U=_??he,W=useCallback((i,V)=>{V?j?.(i):ee?.(i),_===void 0&&Ie(V);},[j,ee,_]),Se=i=>{y?.(i);},Fe=()=>a==null?"":f?f(a):v?v(a):a?.label??"",te="";a!=null&&(te=(m?m(a):a?.id)??"");let F=!!(q.disabled||p),d=x&&ie(a,m)&&!F,L=jsx(K,{endAdornmentProp:Y,isLoading:!!p,showClear:d,showMenuArrow:!p,menuOpen:U,IconComponent:g$1,ClearIconComponent:T,onClear:R,onClearDefault:()=>y?.(null)}),C=b(o);return jsxs(de,{onMouseDown:i=>{i.button===0&&(i.target.closest('.MuiSelect-select[role="combobox"]')||i.target.closest(".SelectBase-clearIconButton")||F||(i.preventDefault(),i.stopPropagation(),W(i,!U)));},onClick:i=>{i.target.closest('.MuiSelect-select[role="combobox"]')||i.target.closest(".SelectBase-clearIconButton")||(i.preventDefault(),i.stopPropagation());},children:[jsxs(le,{id:Ce,variant:"filled","data-testid":"SelectBase",required:l,children:[jsx(io,{id:`select-label-${u.trim()}`,"data-testid":"SelectBase_InputLabel",children:u}),jsx(se,{"data-testid":"SelectBase_Select",ref:t,value:te,error:s&&!C,feedbackType:C?.type,hasFeedback:!!C,disableUnderline:true,required:l,labelId:`select-label-${u.trim()}`,id:`select-label-${u.trim()}`,renderValue:Fe,...q,open:U,onOpen:i=>W(i,true),onClose:i=>W(i,false),inputProps:ye,disabled:F,IconComponent:g$1??(()=>null),endAdornment:L,children:I||h?.map(i=>{let V=S?S(i,a):i?.id===a?.id,zt=(m?m(i):i?.id)??i?.label??"select-base-item";return jsxs(lo,{disabled:!!i.disabled,value:(m?m(i):i?.id)??"",onClick:()=>{Se(i);},sx:{fontSize:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:1,backgroundColor:Le=>V?Le.palette.action.hover:Le.palette.common.white},children:[jsx(we,{component:"span",sx:{flex:1,minWidth:0},children:f?f(i):i.label}),xe&&V?jsx(we,{component:"img",src:Qc,alt:"",sx:{width:10,height:7.5,flexShrink:0}}):null]},`select-base-item-${zt}`)})})]}),C?jsx(g,{...C}):jsx(pe,{children:c})]})}var Ve=Ot.forwardRef(po);function yo({required:e,hasError:t,label:r,value:n,helperText:b$1,feedback:l,onChange:s,options:u,isOptionEqualToValue:a,renderOption:c,getOptionValue:o,isLoading:y,children:h,getOptionLabel:S,IconComponent:f,showClearIcon:m=false,ClearIconComponent:p=D,onClear:I,endAdornment:v,inputProps:g$1,open:x,onOpen:T,onClose:R,...Y},ye){let[_,j]=useState(false),ee=yc(useId(),"select-base-multiple"),xe=x??_,q=useCallback((d,k)=>{k?T?.(d):R?.(d),x===void 0&&j(k);},[T,R,x]),Ce=d=>{s?.(d);},he=()=>{let d=n?.filter(k=>k!=null)??[];return o?d.map(o):d.map(k=>k?.id)},Ie=useMemo(()=>u?.filter(d=>n?.some(k=>{if(k==null)return false;if(a)return a(d,k);if(o){let H=o(d),N=o(k);return H===N||String(H)===String(N)}let L=d?.id,C=k?.id;return L===C||String(L)===String(C)})),[u,n,a,o]),U=()=>Ie?.map(d=>S?S(d):d.label)?.join(", "),W=!!(Y.disabled||y),Se=m&&ie(n,o)&&!W,te=jsx(K,{endAdornmentProp:v,isLoading:!!y,showClear:Se,showMenuArrow:!y,menuOpen:xe,IconComponent:f,ClearIconComponent:p,onClear:I,onClearDefault:()=>s?.([])}),F=b(l);return jsxs(de,{children:[jsxs(le,{id:ee,variant:"filled","data-testid":"SelectBase",required:e,children:[jsx(io,{id:`select-label-${r.trim()}`,"data-testid":"SelectBase_InputLabel",children:r}),jsx(se,{multiple:true,"data-testid":"SelectBase_Select",ref:ye,value:he()??"",error:t&&!F,feedbackType:F?.type,hasFeedback:!!F,disableUnderline:true,required:e,labelId:`select-label-${r.trim()}`,id:`select-label-${r.trim()}`,renderValue:U,...Y,open:x,onOpen:d=>q(d,true),onClose:d=>q(d,false),inputProps:g$1,disabled:W,IconComponent:f??(()=>null),endAdornment:te,onChange:d=>{let L=d.target.value?.map(C=>u?.find(H=>{if(o){let i=o(H);return i===C||String(i)===String(C)}let N=H?.id;return N===C||String(N)===String(C)}));s?.(L?.filter(C=>C!=null)??[]);},children:h||u?.map((d,k)=>{let L=a?a(d,n):d?.id===n?.id;return jsx(lo,{value:(o?o(d):d?.id)??"",onClick:()=>{Ce(d);},sx:{fontSize:"12px",backgroundColor:C=>L?C.palette.action.hover:C.palette.common.white},children:c?c(d):d.label},`select-base-multiple-item-${k}`)})})]}),F?jsx(g,{...F}):jsx(pe,{children:b$1})]})}var Ke=Ot.forwardRef(yo);var xo=Ve;var Ze=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})),Je=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})),Qe=styled$1("ul")(()=>({listStyle:"none",padding:0,margin:0,maxHeight:100,overflow:"auto"})),Xe=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"})),Ye=styled$1(a)(()=>({height:24,padding:"4px",marginBottom:"4px"})),je=styled$1(Box)(()=>({color:"red !important"}));function rt({isLoading:e,countries:t,value:r,onCountryChange:n,required:b,disabled:l}){let[s,u]=useState(),[a,c]=useState(null),[o,y]=useState([]),[h,S]=useState(""),f=!!a&&!l,m=g=>{g.stopPropagation(),c(g.currentTarget);},p=()=>{c(null);},I=g=>{n?.(g),u(g),p(),y(t);},v=g=>{let x=g.target.value.toString()??"";if(S(x),!x){y(t);return}let T=t.filter(R=>R.idd_prefix.toString().startsWith(x)||R.iso2.toLowerCase().startsWith(x.toLowerCase()));y(T);};return useEffect(()=>{r&&u(r);},[r?.countryId]),useEffect(()=>{t.length&&y(t);},[t.length]),jsxs(we,{"data-testid":"CountriesList",sx:{position:"relative"},children:[jsx(Ze,{type:"button","aria-describedby":"CountriesList_CountriesWrapper",onClick:m,disabled:e||l,sx:{backgroundColor:"transparent",border:"none",height:34,paddingInlineStart:"8px"},children:e?jsx(So,{variant:"rectangular",width:56.5,height:20,sx:{borderRadius:"4px"}}):jsxs(Fragment,{children:[s&&jsxs(Fragment,{children:[jsx("img",{src:s.logo,alt:"c",className:"logo"}),jsx("span",{children:`+${s?.idd_prefix}`})]}),b&&jsx(je,{component:"span",children:"*"}),jsx(we,{component:"img",src:Db,alt:"d",className:"arrow",sx:{...f&&{transform:"rotate(180deg)"}}})]})}),f&&jsx(a$1,{onClick:p,sx:{zIndex:9999}}),f&&jsx(ClickAwayListener,{onClickAway:p,children:jsxs(Je,{id:"CountriesList_CountriesWrapper",open:f,anchorEl:a,"data-testid":"CountriesList_CountriesWrapper",placement:"bottom-start",children:[jsx(Ye,{endAdornment:jsx("img",{src:B,alt:"arrow"}),onChange:v,hideArrows:true,"data-testid":"CountriesList_InputStyled",value:h}),jsx(Qe,{"data-testid":"CountriesList_CountriesListStyled",children:o.map(g=>{let x=s?.countryId===g.countryId;return jsxs(Xe,{onClick:()=>{I(g);},sx:{backgroundColor:x?"#F9F9F9":"transparent",color:x?"#000":"#8D8D94"},children:[jsx("img",{src:g.logo,alt:"c",className:"logo"}),jsx("span",{children:`+${g.idd_prefix}`})]},`country-code-${g.countryId}`)})})]})})]})}rt.displayName="CountriesList";var nt=memo(rt);var ce=nt;var it=styled(we,{shouldForwardProp:e=>!["feedbackType","hasFeedback"].includes(e)})(({theme:e,feedbackType:t,hasFeedback:r})=>{let{borderColor:n}=c(e,t);return {border:`1px solid ${t?n:e.palette.divider}`,display:"flex",position:"relative",paddingInline:"8px",paddingInlineStart:"0px",alignItems:"center",borderRadius:r?"4px 4px 0 0":"4px",borderBottom:r?"none":void 0,height:"40px"}}),lt=styled(a)(({error:e})=>({border:"none",paddingInlineEnd:0,img:{cursor:"pointer"},...e&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,borderBottom:"none"}})),pt=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"})),st=styled(we)(()=>({flex:1}));function ut({phoneValue:e,hasError:t,countries:r,isCountriesLoading:n,countryValue:b$1,onCountryChange:l,onPhoneChange:s,helperText:u,required:a,disabled:c,feedback:o,...y},h){let S=x=>{s?.(x.target.value);},f=x=>{l?.(x);},m=o!=null,p={...o,message:o?.message??u},I=b(p),v=null;I?v=jsx(g,{...I}):m||(v=jsx(pt,{children:u}));let g$1=yc(useId(),"phone-input-base");return jsxs(st,{id:g$1,"data-testid":"PhoneInput",children:[jsxs(it,{"data-testid":"PhoneInput_MobileWrapper",feedbackType:I?.type,hasFeedback:!!I,children:[jsx(ce,{isLoading:n,countries:r,value:b$1,onCountryChange:f,required:a,disabled:c}),jsx(lt,{value:e,"data-testid":"PhoneInput_InputNumberStyled",ref:h,inputProps:{autoComplete:"off"},error:t&&!m,disabled:c,...y,onChange:S,hideArrows:true})]}),v]})}ut.displayName="PhoneInputBase";var ct=Ot.forwardRef(ut);var vo=ct;var mt=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"})),ft=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})),gt=styled$1("ul")(()=>({listStyle:"none",padding:0,margin:0,maxHeight:100,overflow:"auto"})),bt=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"})),yt=styled$1(Box)(()=>({color:"red !important"}));function It({isLoading:e,currencies:t,value:r,onCurrencyChange:n,required:b}){let l=yc(useId(),"currencies-list"),[s,u]=useState(),[a,c]=useState(null),[o,y]=useState([]),h=!!a,S=p=>{p.stopPropagation(),c(p.currentTarget);},f=()=>{c(null);},m=p=>{n?.(p),u(p),f(),y(t);};return useEffect(()=>{r&&u(r);},[r?.currencyId]),useEffect(()=>{t.length&&y(t);},[t.length]),jsxs(we,{id:l,"data-testid":"currenciesList",sx:{position:"relative"},children:[jsx(mt,{type:"button","aria-describedby":"currenciesList_currenciesWrapper",onClick:S,disabled:e,sx:{backgroundColor:"transparent",border:"none",height:34,paddingInlineStart:"8px"},children:e?jsx(So,{variant:"rectangular",width:56.5,height:20,sx:{borderRadius:"4px"}}):jsxs(Fragment,{children:[s&&jsxs(Fragment,{children:[jsx("img",{src:s.logo,alt:"c",className:"logo"}),jsx("span",{children:s?.code.english})]}),b&&jsx(yt,{component:"span",children:"*"}),jsx(we,{component:"img",src:Db,alt:"d",className:"arrow",sx:{...h&&{transform:"rotate(180deg)"}}})]})}),h&&jsx(a$1,{onClick:f}),h&&jsx(ft,{id:"currenciesList_currenciesWrapper",open:h,anchorEl:a,"data-testid":"currenciesList_currenciesWrapper",placement:"bottom-start",children:jsx(gt,{"data-testid":"currenciesList_currenciesListStyled",children:o.map(p=>{let I=s?.currencyId===p.currencyId;return jsxs(bt,{onClick:()=>{m(p);},sx:{backgroundColor:I?"#F9F9F9":"transparent",color:I?"#000":"#8D8D94"},children:[jsx("img",{src:p.logo,alt:"c",className:"logo"}),jsx("span",{children:p?.code.english})]},`currency-code-${p.currencyId}`)})})})]})}It.displayName="CurrenciesList";var St=memo(It);var kt=St;var Mt=styled(Ao,{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}}})),vt=styled(we)(()=>({flex:1}));function Ho({hasError:e,hideArrows:t,inputProps:r,...n},b){let l=yc(useId(),"amount-input-number");return jsx(vt,{id:l,"data-testid":"AmountInputNumber",onClick:s=>{s.stopPropagation();},children:jsx(Mt,{ref:b,placeholder:n.placeholder,hideArrows:true,hasError:e,disableUnderline:true,inputProps:{...r,type:"number"},onKeyDown:s=>{["e","E","+","-"].includes(s.key)&&s.preventDefault();},...n})})}var Ft=forwardRef(Ho);var Lt=Ft;var Pt=styled(we,{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}`}})),Et=styled(we)(()=>({width:"50px"})),Rt=styled(Lt)(({error:e})=>({border:"none",paddingInlineEnd:0,img:{cursor:"pointer"},...e&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,borderBottom:"none"}})),At=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"})),Tt=styled(we)(()=>({flex:1}));function Ht({amountValue:e,hasError:t,currencies:r,isCurrenciesLoading:n,currencyValue:b,onCurrencyChange:l,onAmountChange:s,onAmountBlur:u,helperText:a,required:c,...o},y){let h=p=>{s?.(p.target.value);},S=p=>{u?.(p.target.value);},f=p=>{l?.(p);},m=yc(useId(),"amount-input-base");return jsxs(Tt,{id:m,"data-testid":"AmountInput",children:[jsxs(Pt,{"data-testid":"AmountInput_MobileWrapper",hasError:t,children:[jsx(kt,{isLoading:n,currencies:r,value:b,onCurrencyChange:f,required:c}),jsx(Et,{children:jsx(Rt,{value:e,"data-testid":"AmountInput_InputNumberStyled",ref:y,inputProps:{autoComplete:"off"},error:t,...o,onChange:h,onBlur:S,hideArrows:true})})]}),jsx(At,{children:a})]})}Ht.displayName="AmountInputBase";var Nt=Ot.forwardRef(Ht);var Do=Nt;export{Vt as a,D as b,pe as c,de as d,Ke as e,xo as f,ce as g,vo as h,Do as i};
|