@tap-payments/os-micro-frontend-shared 0.3.25 → 0.3.26
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-DGSUBJRX.js → chunk-2F5UHWUK.js} +1 -1
- package/build/_chunks/{chunk-SMHI6YGQ.js → chunk-2SAVSJOF.js} +2 -2
- package/build/_chunks/{chunk-6OY3HRTA.js → chunk-36PSBV34.js} +1 -1
- package/build/_chunks/chunk-3H2FKFEM.js +1 -0
- package/build/_chunks/{chunk-UCU2WRW5.js → chunk-3S4LF7G5.js} +1 -1
- package/build/_chunks/{chunk-F64QEEWC.js → chunk-4J7JR6L4.js} +1 -1
- package/build/_chunks/{chunk-VRJDVGOG.js → chunk-4ZMVLRYE.js} +1 -1
- package/build/_chunks/{chunk-QEJ26KDQ.js → chunk-53CXIVBW.js} +1 -1
- package/build/_chunks/{chunk-NFMLAEAG.js → chunk-57KAR2NJ.js} +1 -1
- package/build/_chunks/{chunk-J6WFNRGY.js → chunk-57OJVP24.js} +1 -1
- package/build/_chunks/{chunk-NX2K3EZ5.js → chunk-5E376TB7.js} +1 -1
- package/build/_chunks/{chunk-YQJUKB3Z.js → chunk-5GFL3K4W.js} +1 -1
- package/build/_chunks/{chunk-WGVOGCVO.js → chunk-5P5I4QIT.js} +1 -1
- package/build/_chunks/{chunk-GW2ETIVU.js → chunk-6OVHJZE7.js} +1 -1
- package/build/_chunks/{chunk-JN3YEN5K.js → chunk-6S7FTOOW.js} +1 -1
- package/build/_chunks/{chunk-LG2LVP3R.js → chunk-6YSSPM35.js} +1 -1
- package/build/_chunks/{chunk-I67HZC24.js → chunk-76XVB4PW.js} +1 -1
- package/build/_chunks/{chunk-ZLLFY5S3.js → chunk-7HNHGPPK.js} +1 -1
- package/build/_chunks/{chunk-D4JPZ2HO.js → chunk-A57CAC7Y.js} +1 -1
- package/build/_chunks/{chunk-HFOMRHRW.js → chunk-A6EHZVAH.js} +1 -1
- package/build/_chunks/{chunk-GFZPMTN2.js → chunk-ACJR7NZD.js} +1 -1
- package/build/_chunks/{chunk-FTUMSLJR.js → chunk-ADOTWCIC.js} +1 -1
- package/build/_chunks/{chunk-AA5YVEUR.js → chunk-AOHCQL6Y.js} +1 -1
- package/build/_chunks/{chunk-GI5ATZRX.js → chunk-B7UKE6SE.js} +1 -1
- package/build/_chunks/{chunk-63GHDFYX.js → chunk-BTXYSJYN.js} +1 -1
- package/build/_chunks/{chunk-PBHQN4YL.js → chunk-BZQ5W767.js} +1 -1
- package/build/_chunks/chunk-CAAZPM5F.js +1 -0
- package/build/_chunks/{chunk-GZ6VWLKZ.js → chunk-CFVDYNS6.js} +2 -2
- package/build/_chunks/{chunk-4IZ4L46T.js → chunk-CQDV6ZUO.js} +1 -1
- package/build/_chunks/{chunk-7BRQJ4WL.js → chunk-CYEKBQ6T.js} +1 -1
- package/build/_chunks/{chunk-YYYNEDJI.js → chunk-D5QHIC6H.js} +1 -1
- package/build/_chunks/{chunk-MY4MQQMX.js → chunk-DTWPSNLN.js} +1 -1
- package/build/_chunks/{chunk-OCTOOU5I.js → chunk-EL5ND3BO.js} +1 -1
- package/build/_chunks/{chunk-B3D3DZQF.js → chunk-ELZWDVNL.js} +1 -1
- package/build/_chunks/{chunk-RRRVTHRZ.js → chunk-EXYXUDM2.js} +1 -1
- package/build/_chunks/{chunk-7N5WS24J.js → chunk-EZXI6AWM.js} +1 -1
- package/build/_chunks/{chunk-HRQCIHNF.js → chunk-FAEP7AKK.js} +1 -1
- package/build/_chunks/{chunk-C4MKWSV7.js → chunk-FBSJM6TS.js} +1 -1
- package/build/_chunks/{chunk-MS4VPCFR.js → chunk-GAHD5K3C.js} +1 -1
- package/build/_chunks/{chunk-5HIBYZA5.js → chunk-GKHGFWGS.js} +1 -1
- package/build/_chunks/{chunk-P5YOBFTQ.js → chunk-GZW6P2JM.js} +1 -1
- package/build/_chunks/{chunk-VZTQQW25.js → chunk-HCWNPVT5.js} +1 -1
- package/build/_chunks/{chunk-V34ITIOD.js → chunk-HO53XW44.js} +1 -1
- package/build/_chunks/{chunk-6JOIUOBR.js → chunk-IE4OP26Q.js} +1 -1
- package/build/_chunks/{chunk-ESBWMN5K.js → chunk-IJZ2DNTJ.js} +1 -1
- package/build/_chunks/{chunk-7HMZQV6K.js → chunk-IKSZIBOG.js} +1 -1
- package/build/_chunks/{chunk-FE5PM4G4.js → chunk-ITVV5ET6.js} +1 -1
- package/build/_chunks/chunk-IVN25H55.js +1 -0
- package/build/_chunks/{chunk-BNHNUJJO.js → chunk-IZUBEMHY.js} +1 -1
- package/build/_chunks/{chunk-YYCUHEOP.js → chunk-J42N6DXP.js} +1 -1
- package/build/_chunks/{chunk-5IKL27G7.js → chunk-K3YIFU5D.js} +1 -1
- package/build/_chunks/{chunk-JIHXUO32.js → chunk-KIFH24WH.js} +2 -2
- package/build/_chunks/{chunk-4QGGP4I6.js → chunk-KLW5ETPS.js} +1 -1
- package/build/_chunks/{chunk-SHNPA6W6.js → chunk-KWOTUJAR.js} +1 -1
- package/build/_chunks/{chunk-5KM2VACS.js → chunk-MDJAYVJ2.js} +1 -1
- package/build/_chunks/{chunk-RH5JQXFU.js → chunk-MIPQ47DY.js} +1 -1
- package/build/_chunks/{chunk-ZCNTF2HZ.js → chunk-NAEGTUUJ.js} +1 -1
- package/build/_chunks/chunk-NLKH4VHH.js +1 -0
- package/build/_chunks/{chunk-GSAWGLPG.js → chunk-OKBR62OT.js} +1 -1
- package/build/_chunks/{chunk-4NFI3QCH.js → chunk-OVCGWCUR.js} +1 -1
- package/build/_chunks/{chunk-XAS5PN3C.js → chunk-OZGP5TFX.js} +1 -1
- package/build/_chunks/{chunk-QBWUE4GP.js → chunk-P2B2SJ5V.js} +1 -1
- package/build/_chunks/{chunk-A6JYGDIB.js → chunk-PBHG7PBH.js} +1 -1
- package/build/_chunks/{chunk-M2SBIHOO.js → chunk-PRF6A3QO.js} +1 -1
- package/build/_chunks/{chunk-ILOLNQXX.js → chunk-PYBWJIF7.js} +1 -1
- package/build/_chunks/{chunk-QTZBRBWY.js → chunk-QNAPE7OZ.js} +1 -1
- package/build/_chunks/{chunk-XHGO2IXN.js → chunk-QWKBL7HI.js} +1 -1
- package/build/_chunks/{chunk-BF42MFTO.js → chunk-RBR2CSI7.js} +1 -1
- package/build/_chunks/{chunk-SD46JYSJ.js → chunk-REIAIVH2.js} +1 -1
- package/build/_chunks/{chunk-PGL6A6FR.js → chunk-SBXIDSB4.js} +1 -1
- package/build/_chunks/{chunk-RXIRV54W.js → chunk-SJHTKY6A.js} +1 -1
- package/build/_chunks/chunk-SQSHZHNU.js +2 -0
- package/build/_chunks/{chunk-Q6NBZ6WX.js → chunk-SW5LLESH.js} +1 -1
- package/build/_chunks/{chunk-2YMEEL32.js → chunk-T2BNZF7B.js} +1 -1
- package/build/_chunks/{chunk-SMANLJGF.js → chunk-T6LARU2R.js} +1 -1
- package/build/_chunks/{chunk-ZUWWXKEU.js → chunk-T7PCBIIS.js} +1 -1
- package/build/_chunks/{chunk-5SJABNZA.js → chunk-TAKCEGAL.js} +1 -1
- package/build/_chunks/{chunk-DHVPGVHT.js → chunk-TCN5LUDZ.js} +1 -1
- package/build/_chunks/chunk-TCRSTQKE.js +1 -0
- package/build/_chunks/{chunk-AP555HUC.js → chunk-TTVZUQ33.js} +1 -1
- package/build/_chunks/{chunk-WLQPHWW7.js → chunk-TYXU3I32.js} +1 -1
- package/build/_chunks/chunk-UOATUOCC.js +1 -0
- package/build/_chunks/{chunk-NIF3H53C.js → chunk-UPRQPEXX.js} +1 -1
- package/build/_chunks/{chunk-SKHA3RDL.js → chunk-UQRG4LEP.js} +1 -1
- package/build/_chunks/{chunk-ESPVAXWR.js → chunk-UZBGADMN.js} +1 -1
- package/build/_chunks/{chunk-AY3GHOX4.js → chunk-V22AOA37.js} +1 -1
- package/build/_chunks/chunk-VHRTL7LZ.js +2 -0
- package/build/_chunks/{chunk-HGHJB5IJ.js → chunk-WFHF7CQR.js} +1 -1
- package/build/_chunks/{chunk-6TD7Q3DJ.js → chunk-WJGQOZIZ.js} +1 -1
- package/build/_chunks/{chunk-HEQG6SHL.js → chunk-WM7IZGJP.js} +1 -1
- package/build/_chunks/{chunk-QWMLEZNK.js → chunk-WVIBFXIO.js} +1 -1
- package/build/_chunks/{chunk-CDZNTDSW.js → chunk-WWYXYRCB.js} +1 -1
- package/build/_chunks/{chunk-LYJ5QIYI.js → chunk-WXFUEGNW.js} +1 -1
- package/build/_chunks/{chunk-RKXGHBC6.js → chunk-WXJFYBUD.js} +1 -1
- package/build/_chunks/{chunk-Y3ENU7FJ.js → chunk-X3X62AY2.js} +1 -1
- package/build/_chunks/{chunk-3ZCPC3J7.js → chunk-X7YUC7WB.js} +1 -1
- package/build/_chunks/{chunk-EIUFUHAI.js → chunk-XI75MANX.js} +1 -1
- package/build/_chunks/{chunk-4RLBPBJY.js → chunk-XIC3RPJG.js} +1 -1
- package/build/_chunks/{chunk-DQD7R3P2.js → chunk-XSXYUQNS.js} +1 -1
- package/build/_chunks/{chunk-KQF3BHOA.js → chunk-XVYGJ4M3.js} +1 -1
- package/build/_chunks/{chunk-FBMMWR5G.js → chunk-Y3KC3YZF.js} +1 -1
- package/build/_chunks/chunk-YYCKRXKM.js +1 -0
- package/build/_chunks/{chunk-OCRBS6CT.js → chunk-Z4GHQG4Y.js} +1 -1
- package/build/_chunks/chunk-Z7XRCWOW.js +1 -0
- package/build/_chunks/chunk-ZLF47R2G.js +1 -0
- package/build/components/Accordion/index.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/Amount/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/Checkbox/index.js +1 -1
- package/build/components/Chip/index.js +1 -1
- package/build/components/ChipStack/index.js +1 -1
- package/build/components/CircularProgressWithLabel/index.js +1 -1
- package/build/components/Collapse/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/CountBadge/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/FieldFeedback/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/FlagDetails/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/index.js +1 -1
- package/build/components/InputNumber/index.js +1 -1
- package/build/components/Inputs/index.js +1 -1
- package/build/components/JSONViewer/index.js +1 -1
- package/build/components/LanguageDropdown/index.js +1 -1
- package/build/components/LazyImage/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/MultiDatakeyDonut/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/ProgressBar/index.js +1 -1
- package/build/components/ProgressRing/index.js +1 -1
- package/build/components/RFH/index.js +1 -1
- package/build/components/RadioButton/index.js +1 -1
- package/build/components/RadioGroup/index.js +1 -1
- package/build/components/RangeCalender/index.js +1 -1
- package/build/components/ReceiptsViewer/index.js +1 -1
- package/build/components/ReferenceTypeFilter/index.js +1 -1
- package/build/components/ResizableHeightInput/index.js +1 -1
- package/build/components/RightLeftExpandingCenterChip/index.js +1 -1
- package/build/components/SalesChannelFilter/index.js +1 -1
- package/build/components/ScrollLoader/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/SimpleDialog/index.js +1 -1
- package/build/components/Skeleton/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/ToggleButtons/index.js +1 -1
- package/build/components/ToggleView/index.js +1 -1
- package/build/components/Toolbar/index.js +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/WindowBackdrop/index.js +1 -1
- package/build/components/WindowSideBar/index.js +1 -1
- package/build/components/_v2/index.js +1 -1
- package/build/components/index.js +1 -1
- package/build/hooks/index.js +1 -1
- package/build/index.js +1 -1
- package/build/utils/api.d.ts +0 -3
- package/build/utils/app.d.ts +0 -3
- package/build/utils/array.d.ts +0 -2
- package/build/utils/index.d.ts +0 -1
- package/build/utils/index.js +1 -1
- package/package.json +1 -1
- package/build/_chunks/chunk-5GOPAA4L.js +0 -2
- package/build/_chunks/chunk-BCKDD62O.js +0 -1
- package/build/_chunks/chunk-BGI4GZ5V.js +0 -1
- package/build/_chunks/chunk-DYUAPQW2.js +0 -1
- package/build/_chunks/chunk-EIQU6V2G.js +0 -2
- package/build/_chunks/chunk-IRKDFD4D.js +0 -1
- package/build/_chunks/chunk-IUSIEHPD.js +0 -1
- package/build/_chunks/chunk-YIHBFWYE.js +0 -1
- package/build/_chunks/chunk-YUTEV5NZ.js +0 -1
- package/build/_chunks/chunk-ZLUMEGSC.js +0 -1
- package/build/_chunks/chunk-ZOK47MLB.js +0 -1
- package/build/utils/axios.d.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-3S4LF7G5.js';import {sd}from'./chunk-VHRTL7LZ.js';import {ih}from'./chunk-UXNHJGII.js';import {memo,useId,useState,useRef,useEffect}from'react';import {useTheme}from'@mui/material';import {motion,AnimatePresence}from'framer-motion';import {useTranslation}from'react-i18next';import K from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var h=styled(motion.input)(({theme:t})=>({padding:"8px",paddingRight:"24px",borderRadius:"4px",height:32,color:t.palette.text.primary,fontSize:"11px",outline:0,zIndex:10,background:t.palette.common.white,display:"flex",minWidth:0,flexGrow:1,boxShadow:`0px 0px 4px 0px ${t.palette.info.dark}80`,border:`1px solid ${t.palette.info.dark}`,"::placeholder":{color:"#D5D5D5"}})),x=styled(motion.img)(()=>({position:"absolute",zIndex:11,cursor:"pointer"})),I=styled(b)(()=>({minWidth:"auto",borderRadius:"4px",paddingInline:"8px",position:"relative",zIndex:11})),g=styled(K)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",zIndex:3,height:32,gap:8}));function j({onSearchChange:t,placeholder:v,...b}){let w=sd(useId(),"search-button"),[e,p]=useState(false),[C,i]=useState(false),[r,l]=useState(""),c=useRef(null);useEffect(()=>{e&&c.current?.focus();},[e]);let{t:B}=useTranslation(),E=useTheme(),T=()=>{i(true),p(false),t?.(""),l("");},k=()=>{i(false),p(true),P();},P=()=>{r&&t?.(r);},R=a=>{a.key==="Enter"&&t?.(r);},z=a=>{l(a.currentTarget.value);},D={duration:.18,ease:"easeInOut"},W={duration:.05,ease:"easeIn"},A=e||C;return jsxs(g,{id:w,"data-testid":"SearchButton",children:[jsx(AnimatePresence,{initial:false,onExitComplete:()=>i(false),children:e&&jsxs(Fragment,{children:[jsx(h,{ref:c,initial:{width:30},animate:{width:200},exit:{width:30,border:`1px solid ${E.palette.divider}`,boxShadow:"none"},transition:D,style:{willChange:"width"},placeholder:v??(B("search")||""),onKeyDown:R,onChange:z}),jsx(x,{style:{right:48},initial:{opacity:1},exit:{opacity:0},transition:W,src:ih,alt:"close",onClick:T})]})}),jsx(I,{...b,variant:A?"active":"inActive",icon:"search",onClick:k})]})}var y=memo(j);var pt=y;export{pt as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {sd}from'./chunk-VHRTL7LZ.js';import {memo,useId}from'react';import {createPortal}from'react-dom';import e from'@mui/material/Backdrop';import {alpha}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';function n(r){let p=sd(useId(),"window-backdrop");return createPortal(jsx(e,{id:p,sx:{zIndex:1,backgroundColor:d=>alpha(d.palette.common.black,.3)},...r}),document.body)}var i=memo(n);export{i as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-EL5ND3BO.js';import {a as a$3}from'./chunk-57KAR2NJ.js';import {a}from'./chunk-GNY2VGGW.js';import {a as a$1}from'./chunk-AOHCQL6Y.js';import {sd}from'./chunk-VHRTL7LZ.js';import {Mc}from'./chunk-UXNHJGII.js';import {useId,useState,useCallback,useMemo,createElement}from'react';import c from'@mui/material/Box';import ne from'@mui/material/Typography';import O from'@mui/material/Input';import {styled}from'@mui/material/styles';import {CircularProgress}from'@mui/material';import ee from'@mui/material/SvgIcon';import {jsx,jsxs}from'react/jsx-runtime';var xe=styled(a)(({theme:e})=>({fontSize:"10px",color:e.palette.grey[700],fontWeight:600,lineHeight:"10px"})),fe=styled(a)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,fontWeight:600,lineHeight:"14.3px",width:200})),Se=styled(c)(()=>({display:"flex",flexDirection:"column",maxHeight:400,overflow:"auto",gap:"8px"})),D=styled(O)(({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}})),ge=styled(a$1)(()=>({padding:0,width:12,height:12,".MuiSvgIcon-root, img":{width:12,height:12}})),F=styled(c)(()=>({display:"flex",flexDirection:"column",gap:"8px",padding:"4px"})),Ce=styled(c)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap"})),Ie=styled(c)(({theme:e})=>({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"})),g=styled(a)(({theme:e,selected:n})=>({display:"flex",gap:"8px",alignItems:"center",fontSize:"10px",fontWeight:500,color:e.palette.common.black,cursor:"pointer",padding:8,justifyContent:"space-between",...n&&{backgroundColor:"#F8F8F8"}}));var te="M4.83332 0C2.16987 0 0 2.16988 0 4.83334C0 7.4968 2.16987 9.66668 4.83332 9.66668C5.98544 9.66668 7.04455 9.2597 7.87628 8.58335L11.1465 11.8535C11.1925 11.9015 11.2477 11.9398 11.3088 11.9662C11.3698 11.9926 11.4356 12.0066 11.5021 12.0072C11.5686 12.0079 11.6346 11.9953 11.6962 11.9702C11.7578 11.945 11.8137 11.9078 11.8607 11.8608C11.9078 11.8138 11.945 11.7578 11.9701 11.6962C11.9953 11.6346 12.0079 11.5686 12.0072 11.5021C12.0065 11.4356 11.9926 11.3699 11.9662 11.3088C11.9398 11.2478 11.9015 11.1926 11.8535 11.1465L8.58331 7.87632C9.25966 7.04458 9.66664 5.98546 9.66664 4.83334C9.66664 2.16988 7.49677 0 4.83332 0ZM4.83332 1C6.95633 1 8.66665 2.71032 8.66665 4.83334C8.66665 5.86755 8.25871 6.80192 7.59699 7.49025C7.5562 7.52023 7.5202 7.55623 7.49022 7.59702C6.80189 8.25875 5.86752 8.66668 4.83332 8.66668C2.71031 8.66668 0.999997 6.95636 0.999997 4.83334C0.999997 2.71032 2.71031 1 4.83332 1Z";function oe({size:e=12,sx:n,className:r,...d}){return jsx(ee,{viewBox:"0 0 12 12",inheritViewBox:true,className:`${r??""} MUISvgIcon__search-icon`,sx:{width:e,height:e,color:"text.primary",...n},...d,children:jsx("path",{d:te,fill:"currentColor"})})}var N=oe;function pe({options:e,onChangeOption:n,selectedOption:r,placeholder:d,label:A,isLoading:R,renderOption:C,iconUrl:h,disabled:u,onClearValue:m,slotProps:V={},hideSelectedCheckmark:$,listWrapperSx:Z={},name:U,...q}){let G=sd(useId(),"select-with-search"),{selectInput:I={},searchInput:J={},dropdownContainer:v={},item:b={}}=V,[w,y]=useState(null),[a,x]=useState(""),K=useCallback(()=>{m!==void 0?m():n(null);},[m,n]),f=!!w,Q=t=>{u||y(f?null:t.currentTarget);},S=()=>{y(null),x("");},X=R?jsx(CircularProgress,{size:16}):jsx(N,{onClick:()=>{a&&x("");},role:"button"}),W=useMemo(()=>a?e.filter(t=>{let p=t?.label?.toLowerCase(),j=t?.value?.toLowerCase();return p?.includes(a.toLowerCase())||j?.includes(a.toLowerCase())}):e,[e,a]),Y=useMemo(()=>jsx(c,{sx:{display:"flex",alignItems:"center",maxWidth:16},children:jsx(c,{component:"img",src:h,alt:"icon",sx:{maxWidth:12,height:12}})}),[h]);return jsx(a$2,{id:G,"data-testid":"SelectWithSearch",disabled:u,open:f,anchorEl:w,onOpen:Q,onClose:S,hasValue:!!r?.value,onClear:K,trigger:jsx(a$3,{className:"SelectWithSearch_input",name:U,placeholder:"Please Select",label:A,sx:{cursor:"pointer"},value:r?.label||"",InputLabelProps:{filled:!!r?.label},disabled:u,...I,InputProps:{readOnly:true,disableUnderline:true,...!!h&&{startAdornment:Y},...I.InputProps}}),listWrapperSx:{height:"100%",overflow:"hidden",...Z},slotProps:{popover:{slotProps:{paper:{sx:{overflow:"hidden"}}}}},...q,children:jsxs(F,{...v,className:`SelectWithSearch_container ${v?.className??""}`,children:[jsx(D,{className:"SelectWithSearch_input",placeholder:d||"Select",endAdornment:X,onClick:t=>{t.stopPropagation();},value:a,onChange:t=>{x(t.target.value);},disableUnderline:true,sx:{cursor:"default",width:"100%",backgroundColor:"white",border:"1px solid #F2F2F2",...e.length&&{marginBottom:"4px"},...a&&{cursor:"pointer"}},...J}),jsxs(c,{className:"SelectWithSearch_options",overflow:"auto",maxHeight:400,children:[W.length===0&&a&&jsx(g,{selected:false,...b,children:jsx(ne,{component:"span",fontSize:"10px",fontWeight:500,color:"#8D8D94",children:"No results found"})}),W.map(t=>C?C(t,{closeDropdown:S,open:f}):createElement(g,{...b,className:`SelectWithSearch_item ${r?.value===t.value?"SelectWithSearch_item-selected":""}`,key:t.value,selected:r?.value===t.value,onClick:p=>{p.stopPropagation(),p.preventDefault(),r?.value===t.value?n(null):n(t),S();}},jsx("span",{children:t.label}),!$&&r?.value===t?.value&&jsx(c,{component:"img",src:Mc,alt:"close",sx:{width:10,height:7.5}})))]})]})})}var H=pe;var Ve=H;export{xe as a,fe as b,Se as c,D as d,ge as e,F as f,Ce as g,Ie as h,g as i,Ve as j};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$6}from'./chunk-
|
|
1
|
+
import {a as a$6}from'./chunk-EL5ND3BO.js';import {a,b,f,d,c as c$1,h,i,e}from'./chunk-57KAR2NJ.js';import {a as a$3}from'./chunk-TCN5LUDZ.js';import {c,b as b$1,g}from'./chunk-2F5UHWUK.js';import {a as a$7}from'./chunk-OVCGWCUR.js';import {a as a$4}from'./chunk-CFVDYNS6.js';import {a as a$5,b as b$2}from'./chunk-MUR4ILTY.js';import {a as a$2}from'./chunk-GNY2VGGW.js';import {a as a$1}from'./chunk-AOHCQL6Y.js';import {b as b$3}from'./chunk-GZW6P2JM.js';import {sd}from'./chunk-VHRTL7LZ.js';import {Mc,z as z$1}from'./chunk-UXNHJGII.js';import*as se from'react';import se__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 oe from'@mui/material/Box';import xt from'@mui/material/Button';import yt from'@mui/material/Input';import ao from'@mui/material/ListSubheader';import lo from'@mui/material/MenuItem';import {keyframes,styled}from'@mui/material/styles';import Pt from'@mui/material/Popper';import Mt from'@mui/material/TextField';function ct({onSubmit:e,methods:t,children:o}){let r=sd(useId(),"default-form");return jsx(FormProvider,{...t,children:jsx("form",{id:r,"data-testid":"DefaultForm",onSubmit:e,noValidate:true,children:o})})}var pt=se__default.memo(ct);var Qe=se.forwardRef(({name:e,helperText:t,hideArrows:o,feedback:r,...n},i)=>{let{control:s}=useFormContext();return jsx(Controller,{name:e,control:s,defaultValue:n.defaultValue,render:({field:d,fieldState:u})=>jsx(a,{...n,...d,ref:i,hasError:!!u.error,helperText:t??u.error?.message,feedback:r,hideArrows:o,onChange:m=>{d.onChange(m),n.onChange?.(m);},onWheel:m=>{m.target instanceof HTMLElement&&m.target.blur();}})})});Qe.displayName="RFHFormInput";var Xe=se.memo(Qe);var dt=Xe;function eo({phoneName:e,countries:t,countryName:o,helperText:r,isCountriesLoading:n,disabled:i,feedback:s,...d}){let{control:u,watch:m,setValue:f}=useFormContext(),F=m(o),S=x=>{f(o,x);};return jsx(Controller,{name:e,control:u,render:({field:{onChange:x,value:l},fieldState:a})=>jsx(h,{...d,phoneValue:l,countries:t,hasError:!!a.error,helperText:r??a.error?.message,feedback:s,onPhoneChange:h=>{x(h);},disabled:i,countryValue:F,onCountryChange:S,isCountriesLoading:n})})}eo.displayName="RFHPhoneInput";var oo=eo;var ft=oo;var Ce=(e,t)=>e.toFixed(t);function no({amountName:e,currencies:t,currencyName:o,helperText:r,isCurrenciesLoading:n,...i$1}){let{control:s,watch:d,setValue:u}=useFormContext(),m=d(o),f=d(e),F=S=>{u(o,S),u(e,Ce(Number(f),S?.decimals||2));};return jsx(Controller,{name:e,control:s,render:({field:{onChange:S,value:x},fieldState:l})=>jsx(i,{...i$1,amountValue:x??"",currencies:t,hasError:!!l.error,helperText:r??l.error?.message,onAmountChange:a=>{S(a);},onAmountBlur:a=>{S(Ce(Number(a),m?.decimals||2));},currencyValue:m,onCurrencyChange:F,isCurrenciesLoading:n})})}no.displayName="RFHAmountInput";var ro=no;var bt=ro;var Ct=keyframes`
|
|
2
2
|
0% {
|
|
3
3
|
transform: rotate(-90deg);
|
|
4
4
|
}
|
|
@@ -12,4 +12,4 @@ import {a as a$6}from'./chunk-OCTOOU5I.js';import {a,b,f,d,c as c$1,h,i,e}from'.
|
|
|
12
12
|
100% {
|
|
13
13
|
transform: rotate(270deg);
|
|
14
14
|
}
|
|
15
|
-
`,yo=styled(oe)({width:12,height:12,display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:"100%",height:"100%",display:"block"},animation:`${Lt} 2s linear infinite`}),de=styled(oe)(({theme:e})=>({position:"relative",width:11,height:11,transform:"rotate(0deg)",color:e.palette.common.black,"& svg":{width:"100%",height:"100%",display:"block"}})),Fo=styled(z)({paddingTop:"8px"}),Pe=styled("ul")({listStyle:"none",margin:0,padding:0}),Co=styled(lo)(({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"}})),Io=styled(lo,{shouldForwardProp:e=>e!=="$selected"})(({theme:e,$selected:t})=>({fontSize:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),backgroundColor:t?e.palette.action.hover:e.palette.common.white})),me=styled("span")({flex:1,minWidth:0}),he=styled("img")({width:10,height:7.5,flexShrink:0}),Po=styled("li",{shouldForwardProp:e=>!["$selected","$optionDisabled"].includes(String(e))})(({theme:e,$selected:t,$optionDisabled:o})=>({fontSize:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),minHeight:48,paddingLeft:e.spacing(2),paddingRight:e.spacing(2),backgroundColor:t?e.palette.action.hover:e.palette.common.white,"&.Mui-focused":{backgroundColor:e.palette.action.hover},...o&&{opacity:.38,pointerEvents:"none"}})),Me=styled("span")({fontSize:"10px",fontWeight:500,color:"#8D8D94"}),Mo=styled(Mt,{shouldForwardProp:e=>!["feedbackType","hasFeedback","hasLabel"].includes(e)})(({theme:e,error:t,feedbackType:o,hasFeedback:r,hasLabel:n})=>{let{borderColor:i}=o?c(e,o):{borderColor:void 0},s=r?"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:s,backgroundColor:e.palette.grey[400],paddingTop:n?"11px":"0px",paddingBottom:n?"4px":"0px",paddingLeft:"8px",boxSizing:"border-box",display:"inline-flex",alignItems:n?"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:n?"flex-end":"center",alignSelf:n?"flex-end":"center",fontSize:"11px",lineHeight:"11px",color:e.palette.common.black,paddingBottom:n?"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},...o&&i&&{"& .MuiFilledInput-root":{border:`1px solid ${i}`}},...r&&{"& .MuiFilledInput-root":{borderBottom:"none",borderBottomLeftRadius:0,borderBottomRightRadius:0}},...t&&{"& .MuiFilledInput-root":{border:`1px solid ${e.palette.error.main}`}}}}),go=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"}),Ro=styled(Pt,{shouldForwardProp:e=>!["$menuHasLoadingText","$suppressAutocompleteNoOptions","$suppressEmptyMenuSurface"].includes(e)})(({theme:e,$menuHasLoadingText:t,$suppressAutocompleteNoOptions:o,$suppressEmptyMenuSurface:r})=>({"& .MuiPaper-root":r?{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,...r?{maxHeight:0,minHeight:0,overflow:"hidden"}:{maxHeight:320}},"& .MuiAutocomplete-noOptions":o?{display:"none !important"}:go(e),"& .MuiAutocomplete-loading":{...go(e),...!t&&{display:"none"}}}));function fe({placeholder:e,value:t,onValueChange:o,isLoading:r}){let n=Bd(useId(),"form-select-menu-search-input");return jsx(ue,{id:n,"data-testid":"FormSelectMenuSearchInput",placeholder:e,value:t,onChange:i=>o(i.target.value),onKeyDown:i=>i.stopPropagation(),onKeyUp:i=>i.stopPropagation(),disableUnderline:true,fullWidth:true,inputProps:{"aria-label":e},endAdornment:r?jsx(yo,{"aria-hidden":true,children:jsx(b$2,{})}):jsx(de,{"aria-hidden":true,children:jsx(a$5,{})})})}var Se=jsx(Me,{children:"No results found"}),Lo=jsx(Me,{children:"Loading\u2026"});function ge(e,t,o){return t?t(e):o?o(e):e?.label}function Re(e,t,o){let r=t.toLowerCase().trim(),n=(o?o(e):e?.label)??"";return String(n).toLowerCase().includes(r)}function wo(e){return e}function ko(e){let t=se__default.forwardRef(function(r,n){let{children:i,className:s,...d}=r,u=e.current;return u?jsxs(Fragment,{children:[jsx(Fo,{disableSticky:true,children:jsx(fe,{placeholder:u.menuSearchPlaceholder,value:u.searchValue,onValueChange:u.setSearchValue,isLoading:u.isLoading})}),jsx(Pe,{ref:n,className:s,...d,children:i})]}):jsx(Pe,{ref:n,className:s,...d,children:i})});return t.displayName="FormSelectMenuSearchListbox",t}function Oo({menuSearchPlaceholder:e,searchValue:t,onSearchChange:o,isLoading:r,menuHasNoOptionsText:n,menuNoOptionsText:i,optionsWithoutEmptyValue:s,getOptionValue:d,getOptionLabel:u,renderOption:m,isOptionEqualToValue:f,menuHasSelectedCheckMark:F,valueOnly:S,getOptionId:x,field:l}){return jsxs(Fragment,{children:[jsx(z,{disableSticky:true,children:jsx(fe,{placeholder:e,value:t,onValueChange:o,isLoading:r})}),n&&t.trim()&&s.length===0?jsx(Co,{disabled:true,value:"__form_select_no_results__",children:i??Se}):s.map((a,h)=>{let g=f?f(a,l.value):a?.id===l.value?.id,M=ge(a,m,u);return jsxs(Io,{disabled:!!a.disabled,$selected:g,value:(d?d(a):a?.id)??"",onClick:()=>{l.onChange(S?x(a):a);},children:[jsx(me,{children:M}),F&&g?jsx(he,{src:Mc,alt:""}):null]},`form-select-item-${(d?d(a):a?.id)??h}`)})]})}var be={menuHasLoadingText:false,suppressAutocompleteNoOptions:false,suppressEmptyMenuSurface:false};function Et(e,t){e!=null&&(typeof e=="function"?e(t):e.current=t);}function Ht(...e){return t=>{for(let o of e)Et(o,t);}}function Bt(e){let t=o=>{let r=e.current;return jsx(Ro,{...o,$menuHasLoadingText:r.menuHasLoadingText,$suppressAutocompleteNoOptions:r.suppressAutocompleteNoOptions,$suppressEmptyMenuSurface:r.suppressEmptyMenuSurface})};return t.displayName="FormSelectSearchableAutocompletePopper",t}function Eo(e){let t=Bd(useId(),"form-select-searchable-field"),o=useRef(null),r=useRef(be);o.current=e.menuSearchable?{searchValue:e.inMenuSearchContextValue.searchValue,setSearchValue:e.inMenuSearchContextValue.setSearchValue,menuSearchPlaceholder:e.inMenuSearchContextValue.menuSearchPlaceholder,isLoading:e.inMenuSearchContextValue.isLoading}:null,r.current=e.searchableAutocompletePopperFlags;let n=useMemo(()=>ko(o),[]),i=useMemo(()=>Bt(r),[]),s=b$1(e.feedback),d$1=!!e.fieldState.error&&!s,u=e.helperText??e.fieldState.error?.message,m=e.internalValue!=null&&e.internalValue!==""&&typeof e.internalValue=="object"?e.internalValue:null,f=e.getOptionLabel??(l=>String(l?.label??"")),F=e.isOptionEqualToValue??((l,a)=>l&&a?l.id===a.id:l===a),S=e.ClearIconComponent??b,x=e.label!=null&&e.label!=="";return jsxs(d,{id:t,"data-testid":"FormSelectSearchableField",children:[jsx(a$4,{...e.autocompleteRest,disableClearable:!e.showClearIcon,clearIcon:jsx(S,{sx:{fontSize:8,width:8,height:8}}),ListboxComponent:e.menuSearchable?n:void 0,PopperComponent:i,options:e.optionsWithClearFilterOnly,value:m,onChange:(l,a,h)=>{if(a==null&&e.onClear&&h==="clear"){e.onClear();return}if(e.valueOnly){let g=a==null?null:e.getOptionId(a);e.field.onChange(g);}else e.field.onChange(a);},onInputChange:(l,a,h)=>{e.setSearchableInputValue(a),(h==="input"||h==="clear")&&e.scheduleSearchNotification(a);},slotProps:e.slotProps??{},filterOptions:e.menuSearchable?e.autocompleteFilterOptions:wo,loading:!!e.isLoading,disabled:!!e.disabled,getOptionLabel:f,getOptionDisabled:l=>!!l.disabled,isOptionEqualToValue:F,renderOption:e.renderAutocompleteOption,noOptionsText:e.menuNoOptionsText??Se,loadingText:e.menuHasLoadingText?e.menuLoadingText??Lo:null,popupIcon:jsx(de,{children:jsx(a$5,{})}),renderInput:l=>{let{inputProps:a,...h}=l,{ref:g,...M}=a;return jsx(Mo,{...h,variant:"filled",label:e.label,placeholder:e.placeholder,required:e.required,error:d$1,helperText:null,feedbackType:s?.type,hasFeedback:!!s,hasLabel:x,inputRef:Ht(g,e.field.ref,e.inputRef),InputProps:{...l.InputProps,disableUnderline:true},inputProps:{...M,name:e.field.name,onBlur:e.field.onBlur}})}}),s?jsx(g,{...s}):jsx(c$1,{children:u})]})}function No(e){let{name:t,helperText:o,feedback:r,menuSearchable:n=false,showClearIcon:i=false,ClearIconComponent:s=b,onClear:d,menuSearchPlaceholder:u="Search",getOptionValue:m,getOptionLabel:f$1,renderOption:F,isOptionEqualToValue:S,options:x,MenuProps:l,valueOnly:a=false,menuHasSelectedCheckMark:h=false,searchable:g=false,onSearchInputChange:M,searchDebounceMs:V=300,minSearchLength:T,menuLoadingText:ye,menuHasLoadingText:b$1=false,menuHasNoOptionsText:R=true,menuNoOptionsText:A,label:te,placeholder:U,required:c,disabled:N,isLoading:L,inputRef:Fe,...K}=e,{control:W}=useFormContext(),[C,G]=useState(""),[Y,j]=useState("");useEffect(()=>{g||j("");},[g]);let Jo=useMemo(()=>({searchValue:C,setSearchValue:G,menuSearchPlaceholder:u,isLoading:!!L}),[C,u,L]),J=useRef(void 0),ne=useRef(M);ne.current=M,useEffect(()=>()=>{J.current&&clearTimeout(J.current);},[]);let Qo=useCallback(p=>{if(!ne.current)return;let y=p.trim();J.current&&clearTimeout(J.current),J.current=setTimeout(()=>{if(y===""){ne.current?.("");return}T!=null&&y.length<T||ne.current?.(y);},V);},[V,T]),D=useMemo(()=>{let p=x??[];return !i||!m?p:p.filter(y=>{let w=m(y);return w!=null&&w!==""})},[i,m,x]),Ae=useMemo(()=>!n||!C.trim()?D:D.filter(p=>Re(p,C,f$1)),[n,C,D,f$1]),Q=useMemo(()=>n?Ae:D,[n,Ae,D]),Xo=useCallback(p=>!n||!C.trim()?p:p.filter(y=>Re(y,C,f$1)),[n,C,f$1]),Zo=useMemo(()=>{if(!g)return be;let p=Y.trim(),y=p.length===0||T!=null&&p.length>0&&p.length<T,w=n&&!!C.trim()&&Q.length===0,H=y&&!w||!R,ae=Q.length>0;return {menuHasLoadingText:b$1,suppressAutocompleteNoOptions:H,suppressEmptyMenuSurface:!ae&&!(!H&&!ae)&&!!!(L&&b$1)}},[g,Y,T,n,C,Q,R,L,b$1]),et={...l,autoFocus:false,disableEnforceFocus:true},re=p=>(m?m(p):p?.id)??"",ot=p=>!a||!p?p:x?.find(y=>re(y)===p)??p,tt=useCallback((p,y,w)=>{let H=ge(y,F,f$1),ae=!!y.disabled;return jsxs(Po,{...p,$selected:w.selected,$optionDisabled:ae,children:[jsx(me,{children:H}),h&&w.selected?jsx(he,{src:Mc,alt:""}):null]})},[f$1,F,h]),Oe={...K};for(let p of ["IconComponent","startComponent"])delete Oe[p];let{slotProps:nt={},...rt}=Oe;return jsx(Controller,{name:t,control:W,render:({field:p,fieldState:y})=>{let w=ot(p.value);return g?jsx(Eo,{menuSearchable:n,inMenuSearchContextValue:Jo,searchableAutocompletePopperFlags:Zo,optionsWithClearFilterOnly:D,autocompleteFilterOptions:Xo,slotProps:nt,autocompleteRest:rt,inputRef:Fe,showClearIcon:i,ClearIconComponent:s,menuHasLoadingText:b$1,menuLoadingText:ye,menuNoOptionsText:A,isLoading:L,disabled:N,label:te,placeholder:U,required:c,valueOnly:a,getOptionId:re,scheduleSearchNotification:Qo,setSearchableInputValue:j,renderAutocompleteOption:tt,onClear:d,feedback:r,helperText:o,field:p,fieldState:y,internalValue:w,getOptionLabel:f$1,isOptionEqualToValue:S}):jsx(f,{...K,...p,label:te,placeholder:U,required:c,disabled:N,isLoading:L,value:w,menuHasSelectedCheckMark:h,showClearIcon:i,ClearIconComponent:s,onClear:d,options:Q,getOptionValue:m,getOptionLabel:f$1,renderOption:F,isOptionEqualToValue:S,hasError:!!y.error,helperText:o??y.error?.message,feedback:r,onChange:H=>p.onChange(a?re(H):H),MenuProps:et,children:n?jsx(Oo,{menuSearchPlaceholder:u,searchValue:C,onSearchChange:G,isLoading:L,menuHasNoOptionsText:R,menuNoOptionsText:A,optionsWithoutEmptyValue:Q,getOptionValue:m,getOptionLabel:f$1,renderOption:F,isOptionEqualToValue:S,menuHasSelectedCheckMark:h,valueOnly:a,getOptionId:re,field:p}):void 0})}})}No.displayName="RFHSelect";var Wo=se__default.memo(No);var we=Wo;function zo({name:e,disabled:t,...o}){let{control:r}=useFormContext();return jsx(Controller,{name:e,control:r,render:({field:{name:n,onBlur:i,onChange:s,value:d,disabled:u}})=>jsx(a$3,{...o,onChange:s,onBlur:i,name:n,disabled:u||t,checked:d??false})})}zo.displayName="RFHSWitch";var qo=se.memo(zo);var _t=qo;var _o=styled(a$2)(({theme:e})=>({fontSize:"10px",color:e.palette.grey[700],fontWeight:600,lineHeight:"10px"}));styled(a$2)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,fontWeight:600,lineHeight:"14.3px",width:200}));var Uo=styled(oe)(()=>({display:"flex",flexDirection:"column",maxHeight:180,overflow:"auto",scrollbarWidth:"thin",scrollbarColor:"#E5E5E5 #E5E5E5"}));styled(yt)(({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 Ko=styled(oe)(()=>({display:"flex",flexDirection:"column",gap:"8px"}));styled(oe)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap",paddingInlineEnd:"20px"}));styled(oe)(({theme:e,maxWidth:t})=>({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",...t&&{maxWidth:`${t}%`}}));var Go=styled(a$2)(({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(oe)(({theme:e})=>({width:"100%",flexDirection:"column",border:`1px solid ${e.palette.grey[100]}`,borderRadius:"4px",backgroundColor:e.palette.grey[400]}));function Yt({name:e,options:t,...o}){let r=Bd(useId(),"select-with-accordion"),[n,i]=useState(null),[s,d]=useState(0),u=!!n,m=l=>{i(u?null:l.currentTarget);},f=()=>{i(null);},{watch:F,setValue:S}=useFormContext(),x=F(e);return jsx(a$6,{id:r,"data-testid":"SelectWithAccordion",open:u,anchorEl:n,onOpen:m,onClose:f,trigger:jsx(we,{name:e,options:[],...o,open:false}),hideArrow:true,listWrapperSx:{padding:0,margin:0},children:jsx(Ko,{onClick:l=>l.stopPropagation(),onMouseDown:l=>l.stopPropagation(),children:jsx(Uo,{"data-testid":"AccordionWrapper",children:t.map?.((l,a)=>{let h=s===a;return jsx(b$3,{expanded:h,onChange:g=>d(g?a:null),label:jsx(_o,{variant:"caption",children:l.group}),content:(l?.options||[]).map((g,M)=>{let V=o?.isOptionEqualToValue?.(g,x);return jsxs(Go,{onClick:()=>{S(e,g,{shouldDirty:true,shouldTouch:true,shouldValidate:true}),f();},children:[o.renderOption?.(g)||g.label,V&&jsx(a$7,{src:Mc,alt:"blue-check",sx:{width:14,height:10}})]},`${g.value}-${g.label}-${M}`)}),slotProps:{root:{sx:{flexShrink:0,border:0,...h&&{borderBottom:"1px solid #0000001A",borderTop:"1px solid #0000001A"}}},label:{sx:{backgroundColor:h?"#F8F8F8":"#ffffff",borderBottom:"1px solid #0000001A",minHeight:28}},content:{sx:{borderTop:"none"}}}},`${l.group}-group-${a}`)})})})})}var jo=Yt;var Jt=jo;function ke({name:e$1,helperText:t,getOptionValue:o,getOptionLabel:r,renderOption:n,isOptionEqualToValue:i,getOptionDisabled:s,menuSearchable:d=false,menuSearchPlaceholder:u="Search",showCheckbox:m=true,menuHasSelectionSummary:f=false,valueOnly:F=false,options:S,isLoading:x,...l}){let{control:a}=useFormContext(),[h,g]=useState(""),M=b=>(o?o(b):b?.id)??"",V=b=>!F||!b?.length?b??[]:b.map(R=>S?.find(A=>M(A)===R)).filter(Boolean),T=b=>b?.map(M)??[],ye=useMemo(()=>{if(!d||!h.trim())return S??[];let b=h.toLowerCase().trim();return (S??[]).filter(R=>{let A=(r?r(R):R?.label)??"";return String(A).toLowerCase().includes(b)})},[S,d,h,r]);return jsx(Controller,{name:e$1,control:a,defaultValue:[],render:({field:b,fieldState:R})=>{let A=Array.isArray(b.value)?b.value.filter(c=>c!=null).length:0,te=f&&A>0,U=V(b.value);return jsxs(e,{...l,isLoading:x,...b,options:S??[],value:U,getOptionLabel:r,hasError:!!R.error,helperText:t??R.error?.message,onChange:c=>b.onChange(F?T(c):c),MenuProps:{...l.MenuProps,autoFocus:false,disableEnforceFocus:true},children:[d&&jsx(z,{disableSticky:true,children:jsx(ue,{placeholder:u,value:h,onChange:c=>g(c.target.value),onKeyDown:c=>c.stopPropagation(),onKeyUp:c=>c.stopPropagation(),disableUnderline:true,fullWidth:true,inputProps:{"aria-label":u},endAdornment:x?jsx(io,{"aria-hidden":true,children:jsx(b$2,{})}):jsx(mo,{src:z$1,alt:"search"})})}),te&&jsx(so,{disableSticky:true,children:jsxs(po,{children:[jsxs(co,{children:[A," selected"]}),jsx(uo,{type:"button",variant:"text",disableRipple:true,"aria-label":"Clear all selected options",onMouseDown:c=>{c.preventDefault(),c.stopPropagation();},onClick:c=>{c.preventDefault(),c.stopPropagation(),l.onClear?l.onClear():b.onChange([]);},children:"Clear"})]})}),ye?.map(c=>{let N=U?.some(W=>{if(W==null)return false;if(i)return i(c,W);if(o){let Y=o(c),j=o(W);return Y===j||String(Y)===String(j)}let C=c?.id,G=W?.id;return C===G||String(C)===String(G)}),L=s?s(c):false,Fe=r?r(c):c.label,K=n?n(c):Fe;return jsx(fo,{value:(o?o(c):c?.id)??"",disabled:L,$selected:N,children:m?jsxs(ho,{children:[jsx(So,{checked:N,$mutedRect:N&&L}),K]}):K},(o?o(c):c?.id)??"")})]})}})}var tn=useForm;export{pt as a,dt as b,ft as c,bt as d,we as e,_t as f,Jt as g,ke as h,tn as i};
|
|
15
|
+
`,yo=styled(oe)({width:12,height:12,display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:"100%",height:"100%",display:"block"},animation:`${Lt} 2s linear infinite`}),de=styled(oe)(({theme:e})=>({position:"relative",width:11,height:11,transform:"rotate(0deg)",color:e.palette.common.black,"& svg":{width:"100%",height:"100%",display:"block"}})),Fo=styled(z)({paddingTop:"8px"}),Pe=styled("ul")({listStyle:"none",margin:0,padding:0}),Co=styled(lo)(({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"}})),Io=styled(lo,{shouldForwardProp:e=>e!=="$selected"})(({theme:e,$selected:t})=>({fontSize:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),backgroundColor:t?e.palette.action.hover:e.palette.common.white})),me=styled("span")({flex:1,minWidth:0}),he=styled("img")({width:10,height:7.5,flexShrink:0}),Po=styled("li",{shouldForwardProp:e=>!["$selected","$optionDisabled"].includes(String(e))})(({theme:e,$selected:t,$optionDisabled:o})=>({fontSize:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),minHeight:48,paddingLeft:e.spacing(2),paddingRight:e.spacing(2),backgroundColor:t?e.palette.action.hover:e.palette.common.white,"&.Mui-focused":{backgroundColor:e.palette.action.hover},...o&&{opacity:.38,pointerEvents:"none"}})),Me=styled("span")({fontSize:"10px",fontWeight:500,color:"#8D8D94"}),Mo=styled(Mt,{shouldForwardProp:e=>!["feedbackType","hasFeedback","hasLabel"].includes(e)})(({theme:e,error:t,feedbackType:o,hasFeedback:r,hasLabel:n})=>{let{borderColor:i}=o?c(e,o):{borderColor:void 0},s=r?"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:s,backgroundColor:e.palette.grey[400],paddingTop:n?"11px":"0px",paddingBottom:n?"4px":"0px",paddingLeft:"8px",boxSizing:"border-box",display:"inline-flex",alignItems:n?"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:n?"flex-end":"center",alignSelf:n?"flex-end":"center",fontSize:"11px",lineHeight:"11px",color:e.palette.common.black,paddingBottom:n?"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},...o&&i&&{"& .MuiFilledInput-root":{border:`1px solid ${i}`}},...r&&{"& .MuiFilledInput-root":{borderBottom:"none",borderBottomLeftRadius:0,borderBottomRightRadius:0}},...t&&{"& .MuiFilledInput-root":{border:`1px solid ${e.palette.error.main}`}}}}),go=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"}),Ro=styled(Pt,{shouldForwardProp:e=>!["$menuHasLoadingText","$suppressAutocompleteNoOptions","$suppressEmptyMenuSurface"].includes(e)})(({theme:e,$menuHasLoadingText:t,$suppressAutocompleteNoOptions:o,$suppressEmptyMenuSurface:r})=>({"& .MuiPaper-root":r?{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,...r?{maxHeight:0,minHeight:0,overflow:"hidden"}:{maxHeight:320}},"& .MuiAutocomplete-noOptions":o?{display:"none !important"}:go(e),"& .MuiAutocomplete-loading":{...go(e),...!t&&{display:"none"}}}));function fe({placeholder:e,value:t,onValueChange:o,isLoading:r}){let n=sd(useId(),"form-select-menu-search-input");return jsx(ue,{id:n,"data-testid":"FormSelectMenuSearchInput",placeholder:e,value:t,onChange:i=>o(i.target.value),onKeyDown:i=>i.stopPropagation(),onKeyUp:i=>i.stopPropagation(),disableUnderline:true,fullWidth:true,inputProps:{"aria-label":e},endAdornment:r?jsx(yo,{"aria-hidden":true,children:jsx(b$2,{})}):jsx(de,{"aria-hidden":true,children:jsx(a$5,{})})})}var Se=jsx(Me,{children:"No results found"}),Lo=jsx(Me,{children:"Loading\u2026"});function ge(e,t,o){return t?t(e):o?o(e):e?.label}function Re(e,t,o){let r=t.toLowerCase().trim(),n=(o?o(e):e?.label)??"";return String(n).toLowerCase().includes(r)}function wo(e){return e}function ko(e){let t=se__default.forwardRef(function(r,n){let{children:i,className:s,...d}=r,u=e.current;return u?jsxs(Fragment,{children:[jsx(Fo,{disableSticky:true,children:jsx(fe,{placeholder:u.menuSearchPlaceholder,value:u.searchValue,onValueChange:u.setSearchValue,isLoading:u.isLoading})}),jsx(Pe,{ref:n,className:s,...d,children:i})]}):jsx(Pe,{ref:n,className:s,...d,children:i})});return t.displayName="FormSelectMenuSearchListbox",t}function Oo({menuSearchPlaceholder:e,searchValue:t,onSearchChange:o,isLoading:r,menuHasNoOptionsText:n,menuNoOptionsText:i,optionsWithoutEmptyValue:s,getOptionValue:d,getOptionLabel:u,renderOption:m,isOptionEqualToValue:f,menuHasSelectedCheckMark:F,valueOnly:S,getOptionId:x,field:l}){return jsxs(Fragment,{children:[jsx(z,{disableSticky:true,children:jsx(fe,{placeholder:e,value:t,onValueChange:o,isLoading:r})}),n&&t.trim()&&s.length===0?jsx(Co,{disabled:true,value:"__form_select_no_results__",children:i??Se}):s.map((a,h)=>{let g=f?f(a,l.value):a?.id===l.value?.id,M=ge(a,m,u);return jsxs(Io,{disabled:!!a.disabled,$selected:g,value:(d?d(a):a?.id)??"",onClick:()=>{l.onChange(S?x(a):a);},children:[jsx(me,{children:M}),F&&g?jsx(he,{src:Mc,alt:""}):null]},`form-select-item-${(d?d(a):a?.id)??h}`)})]})}var be={menuHasLoadingText:false,suppressAutocompleteNoOptions:false,suppressEmptyMenuSurface:false};function Et(e,t){e!=null&&(typeof e=="function"?e(t):e.current=t);}function Ht(...e){return t=>{for(let o of e)Et(o,t);}}function Bt(e){let t=o=>{let r=e.current;return jsx(Ro,{...o,$menuHasLoadingText:r.menuHasLoadingText,$suppressAutocompleteNoOptions:r.suppressAutocompleteNoOptions,$suppressEmptyMenuSurface:r.suppressEmptyMenuSurface})};return t.displayName="FormSelectSearchableAutocompletePopper",t}function Eo(e){let t=sd(useId(),"form-select-searchable-field"),o=useRef(null),r=useRef(be);o.current=e.menuSearchable?{searchValue:e.inMenuSearchContextValue.searchValue,setSearchValue:e.inMenuSearchContextValue.setSearchValue,menuSearchPlaceholder:e.inMenuSearchContextValue.menuSearchPlaceholder,isLoading:e.inMenuSearchContextValue.isLoading}:null,r.current=e.searchableAutocompletePopperFlags;let n=useMemo(()=>ko(o),[]),i=useMemo(()=>Bt(r),[]),s=b$1(e.feedback),d$1=!!e.fieldState.error&&!s,u=e.helperText??e.fieldState.error?.message,m=e.internalValue!=null&&e.internalValue!==""&&typeof e.internalValue=="object"?e.internalValue:null,f=e.getOptionLabel??(l=>String(l?.label??"")),F=e.isOptionEqualToValue??((l,a)=>l&&a?l.id===a.id:l===a),S=e.ClearIconComponent??b,x=e.label!=null&&e.label!=="";return jsxs(d,{id:t,"data-testid":"FormSelectSearchableField",children:[jsx(a$4,{...e.autocompleteRest,disableClearable:!e.showClearIcon,clearIcon:jsx(S,{sx:{fontSize:8,width:8,height:8}}),ListboxComponent:e.menuSearchable?n:void 0,PopperComponent:i,options:e.optionsWithClearFilterOnly,value:m,onChange:(l,a,h)=>{if(a==null&&e.onClear&&h==="clear"){e.onClear();return}if(e.valueOnly){let g=a==null?null:e.getOptionId(a);e.field.onChange(g);}else e.field.onChange(a);},onInputChange:(l,a,h)=>{e.setSearchableInputValue(a),(h==="input"||h==="clear")&&e.scheduleSearchNotification(a);},slotProps:e.slotProps??{},filterOptions:e.menuSearchable?e.autocompleteFilterOptions:wo,loading:!!e.isLoading,disabled:!!e.disabled,getOptionLabel:f,getOptionDisabled:l=>!!l.disabled,isOptionEqualToValue:F,renderOption:e.renderAutocompleteOption,noOptionsText:e.menuNoOptionsText??Se,loadingText:e.menuHasLoadingText?e.menuLoadingText??Lo:null,popupIcon:jsx(de,{children:jsx(a$5,{})}),renderInput:l=>{let{inputProps:a,...h}=l,{ref:g,...M}=a;return jsx(Mo,{...h,variant:"filled",label:e.label,placeholder:e.placeholder,required:e.required,error:d$1,helperText:null,feedbackType:s?.type,hasFeedback:!!s,hasLabel:x,inputRef:Ht(g,e.field.ref,e.inputRef),InputProps:{...l.InputProps,disableUnderline:true},inputProps:{...M,name:e.field.name,onBlur:e.field.onBlur}})}}),s?jsx(g,{...s}):jsx(c$1,{children:u})]})}function No(e){let{name:t,helperText:o,feedback:r,menuSearchable:n=false,showClearIcon:i=false,ClearIconComponent:s=b,onClear:d,menuSearchPlaceholder:u="Search",getOptionValue:m,getOptionLabel:f$1,renderOption:F,isOptionEqualToValue:S,options:x,MenuProps:l,valueOnly:a=false,menuHasSelectedCheckMark:h=false,searchable:g=false,onSearchInputChange:M,searchDebounceMs:V=300,minSearchLength:T,menuLoadingText:ye,menuHasLoadingText:b$1=false,menuHasNoOptionsText:R=true,menuNoOptionsText:A,label:te,placeholder:U,required:c,disabled:N,isLoading:L,inputRef:Fe,...K}=e,{control:W}=useFormContext(),[C,G]=useState(""),[Y,j]=useState("");useEffect(()=>{g||j("");},[g]);let Jo=useMemo(()=>({searchValue:C,setSearchValue:G,menuSearchPlaceholder:u,isLoading:!!L}),[C,u,L]),J=useRef(void 0),ne=useRef(M);ne.current=M,useEffect(()=>()=>{J.current&&clearTimeout(J.current);},[]);let Qo=useCallback(p=>{if(!ne.current)return;let y=p.trim();J.current&&clearTimeout(J.current),J.current=setTimeout(()=>{if(y===""){ne.current?.("");return}T!=null&&y.length<T||ne.current?.(y);},V);},[V,T]),D=useMemo(()=>{let p=x??[];return !i||!m?p:p.filter(y=>{let w=m(y);return w!=null&&w!==""})},[i,m,x]),Ae=useMemo(()=>!n||!C.trim()?D:D.filter(p=>Re(p,C,f$1)),[n,C,D,f$1]),Q=useMemo(()=>n?Ae:D,[n,Ae,D]),Xo=useCallback(p=>!n||!C.trim()?p:p.filter(y=>Re(y,C,f$1)),[n,C,f$1]),Zo=useMemo(()=>{if(!g)return be;let p=Y.trim(),y=p.length===0||T!=null&&p.length>0&&p.length<T,w=n&&!!C.trim()&&Q.length===0,H=y&&!w||!R,ae=Q.length>0;return {menuHasLoadingText:b$1,suppressAutocompleteNoOptions:H,suppressEmptyMenuSurface:!ae&&!(!H&&!ae)&&!!!(L&&b$1)}},[g,Y,T,n,C,Q,R,L,b$1]),et={...l,autoFocus:false,disableEnforceFocus:true},re=p=>(m?m(p):p?.id)??"",ot=p=>!a||!p?p:x?.find(y=>re(y)===p)??p,tt=useCallback((p,y,w)=>{let H=ge(y,F,f$1),ae=!!y.disabled;return jsxs(Po,{...p,$selected:w.selected,$optionDisabled:ae,children:[jsx(me,{children:H}),h&&w.selected?jsx(he,{src:Mc,alt:""}):null]})},[f$1,F,h]),Oe={...K};for(let p of ["IconComponent","startComponent"])delete Oe[p];let{slotProps:nt={},...rt}=Oe;return jsx(Controller,{name:t,control:W,render:({field:p,fieldState:y})=>{let w=ot(p.value);return g?jsx(Eo,{menuSearchable:n,inMenuSearchContextValue:Jo,searchableAutocompletePopperFlags:Zo,optionsWithClearFilterOnly:D,autocompleteFilterOptions:Xo,slotProps:nt,autocompleteRest:rt,inputRef:Fe,showClearIcon:i,ClearIconComponent:s,menuHasLoadingText:b$1,menuLoadingText:ye,menuNoOptionsText:A,isLoading:L,disabled:N,label:te,placeholder:U,required:c,valueOnly:a,getOptionId:re,scheduleSearchNotification:Qo,setSearchableInputValue:j,renderAutocompleteOption:tt,onClear:d,feedback:r,helperText:o,field:p,fieldState:y,internalValue:w,getOptionLabel:f$1,isOptionEqualToValue:S}):jsx(f,{...K,...p,label:te,placeholder:U,required:c,disabled:N,isLoading:L,value:w,menuHasSelectedCheckMark:h,showClearIcon:i,ClearIconComponent:s,onClear:d,options:Q,getOptionValue:m,getOptionLabel:f$1,renderOption:F,isOptionEqualToValue:S,hasError:!!y.error,helperText:o??y.error?.message,feedback:r,onChange:H=>p.onChange(a?re(H):H),MenuProps:et,children:n?jsx(Oo,{menuSearchPlaceholder:u,searchValue:C,onSearchChange:G,isLoading:L,menuHasNoOptionsText:R,menuNoOptionsText:A,optionsWithoutEmptyValue:Q,getOptionValue:m,getOptionLabel:f$1,renderOption:F,isOptionEqualToValue:S,menuHasSelectedCheckMark:h,valueOnly:a,getOptionId:re,field:p}):void 0})}})}No.displayName="RFHSelect";var Wo=se__default.memo(No);var we=Wo;function zo({name:e,disabled:t,...o}){let{control:r}=useFormContext();return jsx(Controller,{name:e,control:r,render:({field:{name:n,onBlur:i,onChange:s,value:d,disabled:u}})=>jsx(a$3,{...o,onChange:s,onBlur:i,name:n,disabled:u||t,checked:d??false})})}zo.displayName="RFHSWitch";var qo=se.memo(zo);var _t=qo;var _o=styled(a$2)(({theme:e})=>({fontSize:"10px",color:e.palette.grey[700],fontWeight:600,lineHeight:"10px"}));styled(a$2)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,fontWeight:600,lineHeight:"14.3px",width:200}));var Uo=styled(oe)(()=>({display:"flex",flexDirection:"column",maxHeight:180,overflow:"auto",scrollbarWidth:"thin",scrollbarColor:"#E5E5E5 #E5E5E5"}));styled(yt)(({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 Ko=styled(oe)(()=>({display:"flex",flexDirection:"column",gap:"8px"}));styled(oe)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap",paddingInlineEnd:"20px"}));styled(oe)(({theme:e,maxWidth:t})=>({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",...t&&{maxWidth:`${t}%`}}));var Go=styled(a$2)(({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(oe)(({theme:e})=>({width:"100%",flexDirection:"column",border:`1px solid ${e.palette.grey[100]}`,borderRadius:"4px",backgroundColor:e.palette.grey[400]}));function Yt({name:e,options:t,...o}){let r=sd(useId(),"select-with-accordion"),[n,i]=useState(null),[s,d]=useState(0),u=!!n,m=l=>{i(u?null:l.currentTarget);},f=()=>{i(null);},{watch:F,setValue:S}=useFormContext(),x=F(e);return jsx(a$6,{id:r,"data-testid":"SelectWithAccordion",open:u,anchorEl:n,onOpen:m,onClose:f,trigger:jsx(we,{name:e,options:[],...o,open:false}),hideArrow:true,listWrapperSx:{padding:0,margin:0},children:jsx(Ko,{onClick:l=>l.stopPropagation(),onMouseDown:l=>l.stopPropagation(),children:jsx(Uo,{"data-testid":"AccordionWrapper",children:t.map?.((l,a)=>{let h=s===a;return jsx(b$3,{expanded:h,onChange:g=>d(g?a:null),label:jsx(_o,{variant:"caption",children:l.group}),content:(l?.options||[]).map((g,M)=>{let V=o?.isOptionEqualToValue?.(g,x);return jsxs(Go,{onClick:()=>{S(e,g,{shouldDirty:true,shouldTouch:true,shouldValidate:true}),f();},children:[o.renderOption?.(g)||g.label,V&&jsx(a$7,{src:Mc,alt:"blue-check",sx:{width:14,height:10}})]},`${g.value}-${g.label}-${M}`)}),slotProps:{root:{sx:{flexShrink:0,border:0,...h&&{borderBottom:"1px solid #0000001A",borderTop:"1px solid #0000001A"}}},label:{sx:{backgroundColor:h?"#F8F8F8":"#ffffff",borderBottom:"1px solid #0000001A",minHeight:28}},content:{sx:{borderTop:"none"}}}},`${l.group}-group-${a}`)})})})})}var jo=Yt;var Jt=jo;function ke({name:e$1,helperText:t,getOptionValue:o,getOptionLabel:r,renderOption:n,isOptionEqualToValue:i,getOptionDisabled:s,menuSearchable:d=false,menuSearchPlaceholder:u="Search",showCheckbox:m=true,menuHasSelectionSummary:f=false,valueOnly:F=false,options:S,isLoading:x,...l}){let{control:a}=useFormContext(),[h,g]=useState(""),M=b=>(o?o(b):b?.id)??"",V=b=>!F||!b?.length?b??[]:b.map(R=>S?.find(A=>M(A)===R)).filter(Boolean),T=b=>b?.map(M)??[],ye=useMemo(()=>{if(!d||!h.trim())return S??[];let b=h.toLowerCase().trim();return (S??[]).filter(R=>{let A=(r?r(R):R?.label)??"";return String(A).toLowerCase().includes(b)})},[S,d,h,r]);return jsx(Controller,{name:e$1,control:a,defaultValue:[],render:({field:b,fieldState:R})=>{let A=Array.isArray(b.value)?b.value.filter(c=>c!=null).length:0,te=f&&A>0,U=V(b.value);return jsxs(e,{...l,isLoading:x,...b,options:S??[],value:U,getOptionLabel:r,hasError:!!R.error,helperText:t??R.error?.message,onChange:c=>b.onChange(F?T(c):c),MenuProps:{...l.MenuProps,autoFocus:false,disableEnforceFocus:true},children:[d&&jsx(z,{disableSticky:true,children:jsx(ue,{placeholder:u,value:h,onChange:c=>g(c.target.value),onKeyDown:c=>c.stopPropagation(),onKeyUp:c=>c.stopPropagation(),disableUnderline:true,fullWidth:true,inputProps:{"aria-label":u},endAdornment:x?jsx(io,{"aria-hidden":true,children:jsx(b$2,{})}):jsx(mo,{src:z$1,alt:"search"})})}),te&&jsx(so,{disableSticky:true,children:jsxs(po,{children:[jsxs(co,{children:[A," selected"]}),jsx(uo,{type:"button",variant:"text",disableRipple:true,"aria-label":"Clear all selected options",onMouseDown:c=>{c.preventDefault(),c.stopPropagation();},onClick:c=>{c.preventDefault(),c.stopPropagation(),l.onClear?l.onClear():b.onChange([]);},children:"Clear"})]})}),ye?.map(c=>{let N=U?.some(W=>{if(W==null)return false;if(i)return i(c,W);if(o){let Y=o(c),j=o(W);return Y===j||String(Y)===String(j)}let C=c?.id,G=W?.id;return C===G||String(C)===String(G)}),L=s?s(c):false,Fe=r?r(c):c.label,K=n?n(c):Fe;return jsx(fo,{value:(o?o(c):c?.id)??"",disabled:L,$selected:N,children:m?jsxs(ho,{children:[jsx(So,{checked:N,$mutedRect:N&&L}),K]}):K},(o?o(c):c?.id)??"")})]})}})}var tn=useForm;export{pt as a,dt as b,ft as c,bt as d,we as e,_t as f,Jt as g,ke as h,tn as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {sd,gb}from'./chunk-VHRTL7LZ.js';import {memo,useId}from'react';import d from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var r=styled("span")(()=>({fontWeight:400})),p=styled(d)(()=>({fontWeight:700,fontSize:"11px",display:"flex",alignItems:"center",cursor:"default",whiteSpace:"nowrap",overflow:"auto"}));function a({amount:i,currencyCode:s,...u}){let l=sd(useId(),"display-amount"),{integerAmount:c,decimalAmount:f}=gb(i,s);return jsxs(p,{...u,id:l,"data-testid":"DisplayAmount",children:[jsx("span",{children:c}),jsx("span",{children:"."}),jsx(r,{children:f})]})}a.displayName="DisplayAmount";var m=memo(a);var P=m;export{P as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {sd}from'./chunk-VHRTL7LZ.js';import {memo,useId}from'react';import {styled,CircularProgress}from'@mui/material';import {jsx}from'react/jsx-runtime';var o=styled(CircularProgress)(()=>({width:"24px !important",height:"24px !important",padding:"5px",".MuiCircularProgress-root":{width:"14px !important",height:"14px !important",display:"flex"},".MuiCircularProgress-circle":{strokeWidth:"1.017px",stroke:"rgba(0, 0, 0, 0.62)"}}));function t(i){let p=sd(useId(),"loader");return jsx(o,{id:p,"data-testid":"Loader",...i})}t.displayName="Loader";var e=memo(t);var P=e;export{P as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {Bd}from'./chunk-EIQU6V2G.js';import {useId,useState,useRef,useCallback,useMemo,useEffect,useLayoutEffect}from'react';import {motion,AnimatePresence,useMotionValue,animate}from'framer-motion';import zt from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var x=3,ft=styled(motion.div)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:0,minWidth:0,height:"auto",lineHeight:1,position:"relative",zIndex:1001,fontSize:"12px",color:t.palette.text.primary})),ht=styled(motion.div)(()=>({display:"inline-flex"})),ut=styled(motion.span)(({theme:t})=>({position:"static",display:"inline-flex",alignItems:"center",justifyContent:"center",width:0,overflow:"visible",margin:0,padding:0,fontSize:"10px",lineHeight:1,color:t.palette.text.secondary,userSelect:"none"})),gt=styled(motion.span)(({theme:t})=>({position:"static",display:"inline-flex",alignItems:"center",justifyContent:"center",width:0,overflow:"visible",margin:0,padding:0,fontSize:"10px",lineHeight:1,color:t.palette.text.secondary,userSelect:"none"})),tt=styled(motion.div)(({side:t})=>({position:"absolute",display:"flex",alignItems:"center",...t==="left"?{right:"100%",flexDirection:"row-reverse",transformOrigin:"right center"}:{},...t==="right"?{left:"100%",flexDirection:"row",transformOrigin:"left center"}:{},top:"50%",transform:"translateY(-50%)",gap:0,pointerEvents:"auto",overflow:"visible"})),et=styled("div")(({side:t})=>({position:"absolute",top:0,bottom:0,...t==="left"?{right:"100%"}:{left:"100%"},pointerEvents:"auto",background:"transparent"})),xt=styled(motion.div)(()=>({position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",height:24,overflow:"visible"})),j=t=>({border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,paddingInline:"8px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,fontSize:12,boxSizing:"border-box",whiteSpace:"nowrap",overflow:"visible"}),mt=styled(motion.div)(({theme:t})=>({...j(t),position:"relative",zIndex:2,minWidth:24,flex:"0 0 auto",display:"inline-flex",overflow:"hidden",willChange:"transform"})),Ct=styled(motion.span)(()=>({display:"inline-flex",alignItems:"center",transform:"translateZ(0)"})),nt=styled(motion.span)(({theme:t})=>({display:"inline-flex",whiteSpace:"nowrap",overflow:"hidden",boxSizing:"border-box",willChange:"width",border:`1px solid ${t.palette.divider}`,backgroundColor:t.palette.background.paper,height:"24px",alignItems:"center",paddingInline:"0px"})),it=styled(motion.span)(()=>({display:"inline-flex",whiteSpace:"nowrap",alignItems:"center",height:"100%"})),yt=styled(motion.div)(({theme:t})=>({...j(t),position:"absolute",left:0,zIndex:1,pointerEvents:"none",minWidth:24,paddingInline:0})),Et=styled(motion.div)(({theme:t})=>({...j(t),position:"absolute",right:0,zIndex:1,pointerEvents:"none",minWidth:24,paddingInline:0})),rt=styled(motion.div)(({theme:t})=>({...j(t),minWidth:24,flex:"0 0 auto",display:"inline-flex"})),vt=styled(zt)(()=>({position:"relative",overflow:"visible",zIndex:101,display:"flex",alignItems:"center",justifyContent:"center",minHeight:"20px"}));var L=24;function Rt({leftIcons:t,rightIcons:v,centerIcon:H,expandableCenterRight:h,expandableCenterLeft:u}){let[l,P]=useState(false),[r,q]=useState({left:0,right:0}),[c,G]=useState([]),[d,X]=useState([]),[f,J]=useState(0),[b,Y]=useState(0),m=useRef(null),k=useRef(null),z=useRef(null),M=useRef(null),A=useRef([]),O=useRef([]),T=useRef(null),$=useRef(null),I=useRef(null),w=useCallback((e,i)=>{if(e===i)return true;if(e.length!==i.length)return false;for(let a=0;a<e.length;a++)if(e[a]!==i[a])return false;return true},[]),D=useCallback((e,i)=>e.left===i.left&&e.right===i.right,[]),g=useMotionValue(0),n=useMotionValue(0),N=useMotionValue(0),C=useMemo(()=>{if(!c.length)return [];let e=[],i=x+c[0]/2;e.push(i);for(let a=1;a<c.length;a++)i+=c[a-1]/2+x+c[a]/2,e.push(i);return e},[c]),y=useMemo(()=>{if(!d.length)return [];let e=[],i=x+d[0]/2;e.push(i);for(let a=1;a<d.length;a++)i+=d[a-1]/2+x+d[a]/2,e.push(i);return e},[d]),Lt=l&&h?f:0,K=l&&u?b:0,at=h?f:0,Wt=useCallback(()=>{m.current&&clearTimeout(m.current),P(true);},[]),St=useCallback(()=>{m.current&&clearTimeout(m.current),m.current=setTimeout(()=>P(false),120);},[]),_=useCallback(()=>{let e=k.current,i=M.current,a=z.current,Q=r;if(e){let R=e.getBoundingClientRect(),Z=(i??a)?.getBoundingClientRect();if(Z){let Pt=Math.round(Z.left-R.left),kt=Math.round(Z.right-R.left);Q={left:Pt,right:kt};}}let st=A.current.map(R=>R?R.offsetWidth:L),lt=O.current.map(R=>R?R.offsetWidth:L),pt=T.current?.scrollWidth??0,ct=$.current?.scrollWidth??0;D(r,Q)||q(Q),w(c,st)||G(st),w(d,lt)||X(lt),f!==pt&&J(pt),b!==ct&&Y(ct);},[r,c,d,f,b,D,w]),B=useCallback(()=>{I.current&&cancelAnimationFrame(I.current),I.current=requestAnimationFrame(()=>{_();});},[_]);useEffect(()=>()=>{m.current&&clearTimeout(m.current);},[]),useLayoutEffect(()=>{_();},[H,t,v,h,u,_]),useEffect(()=>(B(),window.addEventListener("resize",B),()=>{window.removeEventListener("resize",B),I.current&&cancelAnimationFrame(I.current);}),[B]),useEffect(()=>{let i=animate(g,l&&h?f:0,{duration:.2,ease:"easeOut"});return ()=>i.stop()},[l,h,f,g]),useEffect(()=>{let i=animate(n,l&&u?b:0,{duration:.2,ease:"easeOut"});return ()=>i.stop()},[l,u,b,n]);let wt=useMemo(()=>{if(!C.length)return 0;let e=C.length-1,i=c[e]??L;return C[e]+i/2+K+x},[C,c,K]),Ht=useMemo(()=>{if(!y.length)return 0;let e=y.length-1,i=d[e]??L;return at+y[e]+i/2+x},[y,d,at]);return {isHovering:l,handleMouseEnter:Wt,handleMouseLeave:St,centerWrapRef:k,centerContentRef:z,centerChipRef:M,anchors:r,leftChipRefs:A,rightChipRefs:O,leftOffsets:C,rightOffsets:y,expandableRightInnerRef:T,expandableLeftInnerRef:$,expandableRightWidth:f,expandableLeftWidth:b,expandedRightMV:g,expandedLeftMV:n,shiftX:N,rightShift:Lt,leftShift:K,leftHoverWidth:wt,rightHoverWidth:Ht}}function Ot({leftIcons:t=[],rightIcons:v=[],centerIcon:H,expandableCenterRight:h,expandableCenterLeft:u,expandedZIndex:l=1e3,...P}){let{isHovering:r,handleMouseEnter:q,handleMouseLeave:c,centerWrapRef:G,centerContentRef:d,centerChipRef:X,anchors:f,leftChipRefs:J,rightChipRefs:b,leftOffsets:Y,rightOffsets:m,expandableRightInnerRef:k,expandableLeftInnerRef:z,expandedRightMV:M,expandedLeftMV:A,shiftX:O,rightShift:T,leftShift:$,leftHoverWidth:I,rightHoverWidth:w}=Rt({leftIcons:t,rightIcons:v,centerIcon:H,expandableCenterRight:h,expandableCenterLeft:u}),D=Bd(useId(),"right-left-expanding-center-chip");return jsx(vt,{...P,id:D,"data-testid":"RightLeftExpandingCenterChipBox",children:jsx(ht,{"data-testid":"CenterShiftWrapper",initial:false,style:{x:O},children:jsxs(ft,{"data-testid":"CenterIconWrapper",ref:G,onMouseLeave:c,children:[jsxs(xt,{"data-testid":"PeekContainer",children:[jsx(AnimatePresence,{initial:false,children:t.length>0&&jsx(yt,{"data-testid":"LeftPeekChip",initial:{opacity:0,scale:.95,x:-4},animate:r?{opacity:0,scale:.9,x:-6}:{opacity:1,scale:1,x:-5},exit:{opacity:0,scale:.95,x:-4},transition:{duration:.18,ease:"easeOut"}},"left-peek")}),jsx(mt,{"data-testid":"CenterChip",ref:X,onMouseEnter:q,style:{borderRadius:(()=>{let g=u&&r,n=h&&r;return g&&n?"0":g?"0 12px 12px 0":n?"12px 0 0 12px":"12px"})(),borderLeft:u&&r?"none":void 0,borderRight:h&&r?"none":void 0},children:jsx(Ct,{"data-testid":"CenterContent",ref:d,children:H})}),u&&jsx(nt,{"data-testid":"ExpandableLeftContainer",style:{width:A,position:"absolute",right:"100%",top:0,height:"24px",zIndex:1,opacity:r?1:0,pointerEvents:r?"auto":"none",borderRadius:"12px 0 0 12px",borderRight:"none"},initial:false,transition:{duration:.2,ease:"easeOut"},children:jsx(it,{"data-testid":"ExpandableLeftInner",ref:z,children:u})}),h&&jsx(nt,{"data-testid":"ExpandableRightContainer",style:{width:M,position:"absolute",left:"100%",top:0,height:"24px",zIndex:1,opacity:r?1:0,pointerEvents:r?"auto":"none",borderRadius:"0 12px 12px 0",borderLeft:"none"},initial:false,transition:{duration:.2,ease:"easeOut"},children:jsx(it,{"data-testid":"ExpandableRightInner",ref:k,children:h})}),jsx(AnimatePresence,{initial:false,children:v.length>0&&jsx(Et,{"data-testid":"RightPeekChip",initial:{opacity:0,scale:.95,x:4},animate:r?{opacity:0,scale:.9,x:6}:{opacity:1,scale:1,x:5},exit:{opacity:0,scale:.95,x:4},transition:{duration:.18,ease:"easeOut"}},"right-peek")})]}),r&&t.length>0&&jsx(et,{"data-testid":"LeftHoverBridge",side:"left",style:{width:I,right:`calc(100% - ${f.left}px)`,zIndex:l,pointerEvents:"auto"}}),r&&v.length>0&&jsx(et,{"data-testid":"RightHoverBridge",side:"right",style:{width:w,left:`${f.right}px`,zIndex:l,pointerEvents:"auto"}}),jsx(AnimatePresence,{initial:false,children:t.length>0&&jsx(tt,{"data-testid":"LeftExpandedSection",side:"left",style:{right:`calc(100% - ${f.left}px)`,top:"50%",position:"absolute",pointerEvents:r?"auto":"none",zIndex:l},initial:{opacity:0,x:0,y:"-50%"},animate:r?{opacity:1,x:0,y:"-50%"}:{opacity:0,x:0,y:"-50%"},exit:{opacity:0,x:0,y:"-50%"},transition:{duration:.25,ease:"easeOut"},children:t.map((g,n)=>{let C=(Y[n]??(L+x)*(n+1))+$;return jsx(ut,{"data-testid":`LeftExpandIcon-${n}`,initial:{opacity:0,x:0},animate:r?{opacity:1,x:-C}:{opacity:0,x:0},exit:{opacity:0,x:0},transition:{duration:.25+n*.04,ease:"easeOut"},style:{zIndex:l+(t.length-n)},children:jsx(rt,{"data-testid":`LeftExpandChip-${n}`,ref:y=>J.current[n]=y,children:g})},`left-${n}`)})},"left-expanded")}),jsx(AnimatePresence,{initial:false,children:v.length>0&&jsx(tt,{"data-testid":"RightExpandedSection",side:"right",style:{left:`${f.right}px`,top:"50%",position:"absolute",pointerEvents:r?"auto":"none",zIndex:l},initial:{opacity:0,x:0,y:"-50%"},animate:r?{opacity:1,x:0,y:"-50%"}:{opacity:0,x:0,y:"-50%"},exit:{opacity:0,x:0,y:"-50%"},transition:{duration:.25,ease:"easeOut"},children:v.map((g,n)=>{let N=m[n]??(L+x)*(n+1),C=T;return jsx(gt,{"data-testid":`RightExpandIcon-${n}`,initial:{opacity:0,x:0},animate:r?{opacity:1,x:C+N}:{opacity:0,x:0},exit:{opacity:0,x:0},transition:{duration:.25+n*.04,ease:"easeOut"},style:{zIndex:l+(v.length-n)},children:jsx(rt,{"data-testid":`RightExpandChip-${n}`,ref:y=>b.current[n]=y,children:g})},`right-${n}`)})},"right-expanded")})]})})})}var Tt=Ot;export{Tt as a};
|
|
1
|
+
import {sd}from'./chunk-VHRTL7LZ.js';import {useId,useState,useRef,useCallback,useMemo,useEffect,useLayoutEffect}from'react';import {motion,AnimatePresence,useMotionValue,animate}from'framer-motion';import zt from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var x=3,ft=styled(motion.div)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:0,minWidth:0,height:"auto",lineHeight:1,position:"relative",zIndex:1001,fontSize:"12px",color:t.palette.text.primary})),ht=styled(motion.div)(()=>({display:"inline-flex"})),ut=styled(motion.span)(({theme:t})=>({position:"static",display:"inline-flex",alignItems:"center",justifyContent:"center",width:0,overflow:"visible",margin:0,padding:0,fontSize:"10px",lineHeight:1,color:t.palette.text.secondary,userSelect:"none"})),gt=styled(motion.span)(({theme:t})=>({position:"static",display:"inline-flex",alignItems:"center",justifyContent:"center",width:0,overflow:"visible",margin:0,padding:0,fontSize:"10px",lineHeight:1,color:t.palette.text.secondary,userSelect:"none"})),tt=styled(motion.div)(({side:t})=>({position:"absolute",display:"flex",alignItems:"center",...t==="left"?{right:"100%",flexDirection:"row-reverse",transformOrigin:"right center"}:{},...t==="right"?{left:"100%",flexDirection:"row",transformOrigin:"left center"}:{},top:"50%",transform:"translateY(-50%)",gap:0,pointerEvents:"auto",overflow:"visible"})),et=styled("div")(({side:t})=>({position:"absolute",top:0,bottom:0,...t==="left"?{right:"100%"}:{left:"100%"},pointerEvents:"auto",background:"transparent"})),xt=styled(motion.div)(()=>({position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",height:24,overflow:"visible"})),j=t=>({border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,paddingInline:"8px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,fontSize:12,boxSizing:"border-box",whiteSpace:"nowrap",overflow:"visible"}),mt=styled(motion.div)(({theme:t})=>({...j(t),position:"relative",zIndex:2,minWidth:24,flex:"0 0 auto",display:"inline-flex",overflow:"hidden",willChange:"transform"})),Ct=styled(motion.span)(()=>({display:"inline-flex",alignItems:"center",transform:"translateZ(0)"})),nt=styled(motion.span)(({theme:t})=>({display:"inline-flex",whiteSpace:"nowrap",overflow:"hidden",boxSizing:"border-box",willChange:"width",border:`1px solid ${t.palette.divider}`,backgroundColor:t.palette.background.paper,height:"24px",alignItems:"center",paddingInline:"0px"})),it=styled(motion.span)(()=>({display:"inline-flex",whiteSpace:"nowrap",alignItems:"center",height:"100%"})),yt=styled(motion.div)(({theme:t})=>({...j(t),position:"absolute",left:0,zIndex:1,pointerEvents:"none",minWidth:24,paddingInline:0})),Et=styled(motion.div)(({theme:t})=>({...j(t),position:"absolute",right:0,zIndex:1,pointerEvents:"none",minWidth:24,paddingInline:0})),rt=styled(motion.div)(({theme:t})=>({...j(t),minWidth:24,flex:"0 0 auto",display:"inline-flex"})),vt=styled(zt)(()=>({position:"relative",overflow:"visible",zIndex:101,display:"flex",alignItems:"center",justifyContent:"center",minHeight:"20px"}));var L=24;function Rt({leftIcons:t,rightIcons:v,centerIcon:H,expandableCenterRight:h,expandableCenterLeft:u}){let[l,P]=useState(false),[r,q]=useState({left:0,right:0}),[c,G]=useState([]),[d,X]=useState([]),[f,J]=useState(0),[b,Y]=useState(0),m=useRef(null),k=useRef(null),z=useRef(null),M=useRef(null),A=useRef([]),O=useRef([]),T=useRef(null),$=useRef(null),I=useRef(null),w=useCallback((e,i)=>{if(e===i)return true;if(e.length!==i.length)return false;for(let a=0;a<e.length;a++)if(e[a]!==i[a])return false;return true},[]),D=useCallback((e,i)=>e.left===i.left&&e.right===i.right,[]),g=useMotionValue(0),n=useMotionValue(0),N=useMotionValue(0),C=useMemo(()=>{if(!c.length)return [];let e=[],i=x+c[0]/2;e.push(i);for(let a=1;a<c.length;a++)i+=c[a-1]/2+x+c[a]/2,e.push(i);return e},[c]),y=useMemo(()=>{if(!d.length)return [];let e=[],i=x+d[0]/2;e.push(i);for(let a=1;a<d.length;a++)i+=d[a-1]/2+x+d[a]/2,e.push(i);return e},[d]),Lt=l&&h?f:0,K=l&&u?b:0,at=h?f:0,Wt=useCallback(()=>{m.current&&clearTimeout(m.current),P(true);},[]),St=useCallback(()=>{m.current&&clearTimeout(m.current),m.current=setTimeout(()=>P(false),120);},[]),_=useCallback(()=>{let e=k.current,i=M.current,a=z.current,Q=r;if(e){let R=e.getBoundingClientRect(),Z=(i??a)?.getBoundingClientRect();if(Z){let Pt=Math.round(Z.left-R.left),kt=Math.round(Z.right-R.left);Q={left:Pt,right:kt};}}let st=A.current.map(R=>R?R.offsetWidth:L),lt=O.current.map(R=>R?R.offsetWidth:L),pt=T.current?.scrollWidth??0,ct=$.current?.scrollWidth??0;D(r,Q)||q(Q),w(c,st)||G(st),w(d,lt)||X(lt),f!==pt&&J(pt),b!==ct&&Y(ct);},[r,c,d,f,b,D,w]),B=useCallback(()=>{I.current&&cancelAnimationFrame(I.current),I.current=requestAnimationFrame(()=>{_();});},[_]);useEffect(()=>()=>{m.current&&clearTimeout(m.current);},[]),useLayoutEffect(()=>{_();},[H,t,v,h,u,_]),useEffect(()=>(B(),window.addEventListener("resize",B),()=>{window.removeEventListener("resize",B),I.current&&cancelAnimationFrame(I.current);}),[B]),useEffect(()=>{let i=animate(g,l&&h?f:0,{duration:.2,ease:"easeOut"});return ()=>i.stop()},[l,h,f,g]),useEffect(()=>{let i=animate(n,l&&u?b:0,{duration:.2,ease:"easeOut"});return ()=>i.stop()},[l,u,b,n]);let wt=useMemo(()=>{if(!C.length)return 0;let e=C.length-1,i=c[e]??L;return C[e]+i/2+K+x},[C,c,K]),Ht=useMemo(()=>{if(!y.length)return 0;let e=y.length-1,i=d[e]??L;return at+y[e]+i/2+x},[y,d,at]);return {isHovering:l,handleMouseEnter:Wt,handleMouseLeave:St,centerWrapRef:k,centerContentRef:z,centerChipRef:M,anchors:r,leftChipRefs:A,rightChipRefs:O,leftOffsets:C,rightOffsets:y,expandableRightInnerRef:T,expandableLeftInnerRef:$,expandableRightWidth:f,expandableLeftWidth:b,expandedRightMV:g,expandedLeftMV:n,shiftX:N,rightShift:Lt,leftShift:K,leftHoverWidth:wt,rightHoverWidth:Ht}}function Ot({leftIcons:t=[],rightIcons:v=[],centerIcon:H,expandableCenterRight:h,expandableCenterLeft:u,expandedZIndex:l=1e3,...P}){let{isHovering:r,handleMouseEnter:q,handleMouseLeave:c,centerWrapRef:G,centerContentRef:d,centerChipRef:X,anchors:f,leftChipRefs:J,rightChipRefs:b,leftOffsets:Y,rightOffsets:m,expandableRightInnerRef:k,expandableLeftInnerRef:z,expandedRightMV:M,expandedLeftMV:A,shiftX:O,rightShift:T,leftShift:$,leftHoverWidth:I,rightHoverWidth:w}=Rt({leftIcons:t,rightIcons:v,centerIcon:H,expandableCenterRight:h,expandableCenterLeft:u}),D=sd(useId(),"right-left-expanding-center-chip");return jsx(vt,{...P,id:D,"data-testid":"RightLeftExpandingCenterChipBox",children:jsx(ht,{"data-testid":"CenterShiftWrapper",initial:false,style:{x:O},children:jsxs(ft,{"data-testid":"CenterIconWrapper",ref:G,onMouseLeave:c,children:[jsxs(xt,{"data-testid":"PeekContainer",children:[jsx(AnimatePresence,{initial:false,children:t.length>0&&jsx(yt,{"data-testid":"LeftPeekChip",initial:{opacity:0,scale:.95,x:-4},animate:r?{opacity:0,scale:.9,x:-6}:{opacity:1,scale:1,x:-5},exit:{opacity:0,scale:.95,x:-4},transition:{duration:.18,ease:"easeOut"}},"left-peek")}),jsx(mt,{"data-testid":"CenterChip",ref:X,onMouseEnter:q,style:{borderRadius:(()=>{let g=u&&r,n=h&&r;return g&&n?"0":g?"0 12px 12px 0":n?"12px 0 0 12px":"12px"})(),borderLeft:u&&r?"none":void 0,borderRight:h&&r?"none":void 0},children:jsx(Ct,{"data-testid":"CenterContent",ref:d,children:H})}),u&&jsx(nt,{"data-testid":"ExpandableLeftContainer",style:{width:A,position:"absolute",right:"100%",top:0,height:"24px",zIndex:1,opacity:r?1:0,pointerEvents:r?"auto":"none",borderRadius:"12px 0 0 12px",borderRight:"none"},initial:false,transition:{duration:.2,ease:"easeOut"},children:jsx(it,{"data-testid":"ExpandableLeftInner",ref:z,children:u})}),h&&jsx(nt,{"data-testid":"ExpandableRightContainer",style:{width:M,position:"absolute",left:"100%",top:0,height:"24px",zIndex:1,opacity:r?1:0,pointerEvents:r?"auto":"none",borderRadius:"0 12px 12px 0",borderLeft:"none"},initial:false,transition:{duration:.2,ease:"easeOut"},children:jsx(it,{"data-testid":"ExpandableRightInner",ref:k,children:h})}),jsx(AnimatePresence,{initial:false,children:v.length>0&&jsx(Et,{"data-testid":"RightPeekChip",initial:{opacity:0,scale:.95,x:4},animate:r?{opacity:0,scale:.9,x:6}:{opacity:1,scale:1,x:5},exit:{opacity:0,scale:.95,x:4},transition:{duration:.18,ease:"easeOut"}},"right-peek")})]}),r&&t.length>0&&jsx(et,{"data-testid":"LeftHoverBridge",side:"left",style:{width:I,right:`calc(100% - ${f.left}px)`,zIndex:l,pointerEvents:"auto"}}),r&&v.length>0&&jsx(et,{"data-testid":"RightHoverBridge",side:"right",style:{width:w,left:`${f.right}px`,zIndex:l,pointerEvents:"auto"}}),jsx(AnimatePresence,{initial:false,children:t.length>0&&jsx(tt,{"data-testid":"LeftExpandedSection",side:"left",style:{right:`calc(100% - ${f.left}px)`,top:"50%",position:"absolute",pointerEvents:r?"auto":"none",zIndex:l},initial:{opacity:0,x:0,y:"-50%"},animate:r?{opacity:1,x:0,y:"-50%"}:{opacity:0,x:0,y:"-50%"},exit:{opacity:0,x:0,y:"-50%"},transition:{duration:.25,ease:"easeOut"},children:t.map((g,n)=>{let C=(Y[n]??(L+x)*(n+1))+$;return jsx(ut,{"data-testid":`LeftExpandIcon-${n}`,initial:{opacity:0,x:0},animate:r?{opacity:1,x:-C}:{opacity:0,x:0},exit:{opacity:0,x:0},transition:{duration:.25+n*.04,ease:"easeOut"},style:{zIndex:l+(t.length-n)},children:jsx(rt,{"data-testid":`LeftExpandChip-${n}`,ref:y=>J.current[n]=y,children:g})},`left-${n}`)})},"left-expanded")}),jsx(AnimatePresence,{initial:false,children:v.length>0&&jsx(tt,{"data-testid":"RightExpandedSection",side:"right",style:{left:`${f.right}px`,top:"50%",position:"absolute",pointerEvents:r?"auto":"none",zIndex:l},initial:{opacity:0,x:0,y:"-50%"},animate:r?{opacity:1,x:0,y:"-50%"}:{opacity:0,x:0,y:"-50%"},exit:{opacity:0,x:0,y:"-50%"},transition:{duration:.25,ease:"easeOut"},children:v.map((g,n)=>{let N=m[n]??(L+x)*(n+1),C=T;return jsx(gt,{"data-testid":`RightExpandIcon-${n}`,initial:{opacity:0,x:0},animate:r?{opacity:1,x:C+N}:{opacity:0,x:0},exit:{opacity:0,x:0},transition:{duration:.25+n*.04,ease:"easeOut"},style:{zIndex:l+(v.length-n)},children:jsx(rt,{"data-testid":`RightExpandChip-${n}`,ref:y=>b.current[n]=y,children:g})},`right-${n}`)})},"right-expanded")})]})})})}var Tt=Ot;export{Tt as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-57OJVP24.js';import {memo}from'react';import t from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var d=styled(t)(({theme:o})=>({display:"flex",gap:o.spacing(1),insetInlineStart:o.spacing(1.25),zIndex:1}));styled(t)(({theme:o})=>({width:12,height:12,borderRadius:"50%",cursor:"pointer",backgroundColor:`${o.palette.grey[200]}14`,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease-in-out",img:{opacity:"0",transition:"all 0.2s ease-in-out"},"&:active":{backgroundColor:`${o.palette.grey[200]} !important`}}));var l=styled(t)(({theme:o})=>({display:"flex",height:"2rem",justifyContent:"space-between",alignItems:"center",width:"100%",paddingLeft:o.spacing(1.25),paddingRight:o.spacing(1.25),"& > *":{flex:"1 1 0px;"}})),p=styled("div",{shouldForwardProp:o=>o!=="sandboxMode"&&o!=="maximized"&&o!=="isDragging"})(({maximized:o,isDragging:r})=>({...!o&&{borderTopRightRadius:12,borderTopLeftRadius:12},...r&&{cursor:"move"},margin:0})),I=styled(t,{shouldForwardProp:o=>o!=="maximized"&&o!=="isDragging"})(({isDragging:o})=>({...o&&{cursor:"move"},margin:0})),s=styled(t,{shouldForwardProp:o=>o!=="maximized"&&o!=="isHovered"})(({theme:o,maximized:r})=>({height:32,position:"relative",display:"flex",width:"100%",justifyContent:"center",transition:"all 0.5s ease-in-out",borderTopLeftRadius:"12px",borderTopRightRadius:"12px",...r&&{display:"block !important",position:"fixed",right:0,left:0,zIndex:999,background:"transparent",".toolbar-wrapper":{display:"flex",justifyContent:"space-between",gap:10,alignItems:"center",position:"absolute",right:0,left:0,height:"2rem",".action-box":{visibility:"hidden"}},"&:hover":{".toolbar-wrapper":{top:0},".action-box":{visibility:"visible"}}},":hover":{".header-icon":{backgroundColor:`${o.palette.grey[200]}40`},".header-icon img":{opacity:1}}})),f=styled(p)(()=>({position:"sticky",top:0,left:0,right:0,zIndex:1e3,background:"#eaeaea",backdropFilter:"blur(32px)"}));function v({onMouseEnter:o,onMouseLeave:r,isMaximized:g,isHovered:m,children:w,rightActions:x,leftActions:a$1,title:b,icon:y,...u}){return jsx(s,{onMouseEnter:o,onMouseLeave:r,maximized:g,id:"toolbar","data-testid":"Toolbar",isHovered:m,...u,children:jsxs(l,{className:"toolbar-wrapper",children:[a$1?jsx(d,{className:"action-box",children:a$1}):jsx("div",{}),jsx(a,{title:b,icon:y}),x||jsx("div",{})]})})}var c=memo(v);var D=c;export{p as a,I as b,f as c,D as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-KHM5KW53.js';import {
|
|
1
|
+
import {a}from'./chunk-KHM5KW53.js';import {zb,wb,sd,Ib}from'./chunk-VHRTL7LZ.js';import {Ej,va,ua,ta,Ci}from'./chunk-UXNHJGII.js';import {b as b$1}from'./chunk-YRT7GXGY.js';import {memo,useId}from'react';import M from'@mui/material/Box';import {useTranslation}from'react-i18next';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var b=b$1(zb(),1);var D=styled(M,{shouldForwardProp:o=>o!=="tableMode"})(({theme:o,tableMode:t})=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4px 8px",borderRadius:"24px",border:`1px solid ${o.palette.divider}`,color:o.palette.text.primary,height:wb(t)?"18px":"24px"}));var e={DESKTOP:ta,PHONE:ua,TABLET:va,TERMINAL:Ej};var i=o=>!!e[o];function P({type:o,isTextShown:t,tableMode:E,...v}){let p=sd(useId(),"device-icon"),{t:C}=useTranslation(),m=i(o)?e[o]:null;return jsx(a,{title:m?`Device - ${Ib((o??"").toLowerCase())}`:C("unKnown"),children:t?jsx(D,{id:p,"data-testid":"DeviceIcon",tableMode:E,children:o?(0, b.default)(o):"Unknown"}):jsx(M,{...v,id:p,"data-testid":"DeviceIcon",component:"img",src:o?m||Ci:Ci,alt:o})})}var T=memo(P);var Y=T;export{e as a,i as b,Y as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {f,b as b$3,g,a as a$3,e as e$1,d,c as c$1}from'./chunk-3LIQ643G.js';import {a as a$2}from'./chunk-OVCGWCUR.js';import {c}from'./chunk-NAEGTUUJ.js';import {o,j,k as k$1,l,p}from'./chunk-UQRG4LEP.js';import {b as b$2}from'./chunk-PYBWJIF7.js';import {b as b$1,e,d as d$1}from'./chunk-YYCKRXKM.js';import {a as a$1}from'./chunk-KHM5KW53.js';import {a as a$4}from'./chunk-GAHD5K3C.js';import {zb,Ab,wb,sd,fb,gb,Qc,p as p$1}from'./chunk-VHRTL7LZ.js';import {S,kh,mh,lh,jh,qh,Qf,Hf,Pf,Di,Ei,qb,Ui,Xi,Vi,mj,zm,rb,sa,ra,ej,h,Gf}from'./chunk-UXNHJGII.js';import {a,b}from'./chunk-YRT7GXGY.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 cr from'@mui/material/Box';var V=a((Sa,Ve)=>{var Xo=zb(),Qo=Ab(),Yo=Qo(function(t,e,o){return e=e.toLowerCase(),t+(o?Xo(e):e)});Ve.exports=Yo;});var ct={ORDER:{label:"order",icon:jh,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:lh,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:mh,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:kh,color:"#32ADE6"}},mt={SAVED_TOKEN:{label:"savedToken",icon:S,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 ut=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),ft=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px"}));function Wo({type:t,hasSavedCard:e,totalPaymentsCount:o,isTextShown:r}){let l=sd(useId(),"agreement-icon"),s=useTheme(),{t:i}=useTranslation(),n=useMemo(()=>[...e?[mt.SAVED_TOKEN]:[],...(o||0)>0?[mt.COUNT]:[],...t&&ct[t]?[ct[t]]:[]],[e,o,t]),d=c=>r?jsx(b$1,{"data-testid":"AgreementCell_countBadge",children:jsx(a$1,{title:i("totalPaymentCount",{amount:p$1(o)}),children:jsx(ft,{children:jsxs(ut,{"data-testid":"AgreementCell_totalPaymentsCount",sx:{color:mt.COUNT.color},children:["x",o]})})})},c):jsx(d$1,{totalPaymentsCount:o,index:c},c),p=n.map((c,g)=>c.label==="countBadge"?d(g):jsx(a$1,{title:i(c.label),children:jsx(b$1,{children:r?jsx(ft,{children:jsx(ut,{"data-testid":"AgreementCell_agreementType",sx:{color:c.color},children:i(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$1,{title:"No agreement",children:jsx(b$1,{children:r?jsx(ft,{children:jsx(ut,{"data-testid":"AgreementCell_agreementType",sx:{color:s.palette.text.secondary},children:"No agreement"})}):jsx(a$2,{sx:{maxWidth:"24px",maxHeight:"24px",height:"auto",width:"auto"},src:qh,alt:"agreement"})},"no-agreement")},"no-agreement");return jsx(Box,{id:l,"data-testid":"AgreementIcon",sx:{display:"flex",alignItems:"center",gap:"4px"},children:p?.length>0?p:f})}var Te=Wo;var Ro=Te;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:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${e*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var we=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),Pe=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 We=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px"}));var Bt={"3DS":{tooltip:"3DS",icon:Ei,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Di,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:Pf,borderColor:"rgba(31, 136, 208, 0.10)"}},ve={FAILED:{tooltip:"Failed",icon:Hf,borderColor:"rgba(255, 61, 0, 0.10)"},REJECTED:{tooltip:"Rejected",icon:Qf,borderColor:"rgba(255, 61, 0, 0.10)"}};function Bo({transactionStatus:t,eci:e,authType:o,isTextShown:r}){let l=sd(useId(),"auth-icons"),s=useMemo(()=>{let n=t?ve[t]:null,d=n?.tooltip,p=t==="AUTHENTICATED"?null:n?.icon;return [{tooltip:d,content:r?d:p,type:r?"text":"icon"},...o?[{tooltip:o,content:r?Bt[o]?.tooltip:Bt[o]?.icon,type:r?"text":"icon"}]:[],{tooltip:"",content:e?`ECI ${e}`:"",type:"text"}]},[t,r,o,e]),i=useMemo(()=>s.filter(n=>!!n.content).map((n,d)=>{let p=n.type==="text"?jsx(Pe,{"data-testid":"AuthenticationCell_BadgeTextWrapper",children:jsx(we,{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$1,{title:n.tooltip,children:p},`${n.tooltip}-${d}`)}),[s]);return jsx(We,{id:l,"data-testid":"AuthIcons",children:i})}var ke=Bo;var Lo=(t,e,o)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"},...t>0&&{opacity:0}},animate:{x:o?t*o:t*39,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:e,...t>0&&{opacity:1}}});var Do=ke;var ot={VOID:{icon:Vi},CAPTURED:{icon:Ui}};var xt=styled$1(motion.div)(({theme:t,isCapture:e})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:t.spacing(.5),paddingInline:t.spacing(.3),paddingBlock:t.spacing(.3),height:"100%",minWidth:"100%",backgroundColor:e?"#eaf3fb":"#eeeeee",borderRadius:"56px",width:"fit-content",fontSize:"10px",color:t.palette.text.primary,position:"relative",zIndex:10})),gt=styled$1("div")(({theme:t,percentage:e,isCapture:o})=>({border:`0.6px ${[0,100].includes(e)?"solid":"dashed"} ${o?t.palette.info.dark:"#656565"}`,borderRadius:"80px",padding:t.spacing(.316),paddingLeft:t.spacing(.516),fontSize:"7px",fontWeight:t.typography.fontWeightBold,color:o?t.palette.info.dark:"#656565",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5)})),It=styled$1("div")(({percentage:t,isCapture:e,theme:o})=>({background:`conic-gradient(${e?o.palette.info.dark:"#656565"} ${t}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${e?o.palette.info.dark:"#656565"}`})),Be=styled$1("img")({width:"14px",height:"14px"}),H=styled$1(o)({width:"16px",height:"16px"}),F=styled$1("img")({width:"16px",height:"16px"}),Le=styled$1(Box)({display:"flex",alignItems:"center",justifyContent:"center"});function ht(t){return t<5?5:t===100?95:t}function Fo({voidPercentage:t,capturePercentage:e$1,captureCount:o,autoType:r,captureAmount:l,voidAmount:s,currency:i,isTextShown:n,remainingAmount:d,isSheetViewShown:p,selectionProps:f={}}){let c=Number(e$1)+Number(t)===100||d<=0,g=sd(useId(),"capture-auto-icon"),T=useTheme$1(),{t:w}=useTranslation(),P=fb(d||0),D=useCallback(C=>`Auto ${C} - ${i} ${P.integerAmount}.${P.decimalAmount}`,[i,P.decimalAmount,P.integerAmount]),Q=useCallback(C=>{let Y=C==="Capture"?l:s,{integerAmount:E,decimalAmount:v}=gb(Y,i);return `Partial ${C} - ${i} ${E}.${v}`},[l,s,i]),x=e$1>0?jsx(a$1,{title:Q("Capture"),children:jsxs(xt,{isCapture:true,isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:T.shadows[4]}},children:[jsx(Be,{src:qb,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(gt,{isCapture:true,percentage:e$1,children:[e$1,"% ",jsx(It,{isCapture:true,percentage:ht(e$1)})]}),o>1&&jsxs(e,{compact:true,variant:"dark",children:[o,"x"]})]})]})}):r==="CAPTURED"&&!c?jsx(a$1,{title:D("Capture"),children:jsx(H,{children:jsx(F,{src:ot.CAPTURED?.icon,alt:"auto"})})}):jsx(a$1,{title:D("Capture"),children:jsx(H,{children:jsx(F,{src:ot.CAPTURED?.icon,alt:"auto"})})}),I=e$1===100?jsx(a$1,{title:w("captured"),children:jsx(Le,{children:jsx(F,{src:Xi,alt:"captured"})})}):x,W=useMemo(()=>p&&I?jsx(b$2,{chipIndex:4,copyText:w("captured"),selectionProps:f,children:w("captured")}):n&&I?jsx(k$1,{children:w("captured")}):I,[n,I,p,f]);return W&&jsx("div",{id:g,"data-testid":"CaptureAutoIcon",style:{zIndex:12},children:W})}var Ee=Fo;function Ko({voidPercentage:t,capturePercentage:e$1,voidCount:o,autoType:r,captureAmount:l$1,voidAmount:s,currency:i,isTextShown:n,isSheetViewShown:d,selectionProps:p={},remainingAmount:f}){let c=Number(e$1)+Number(t)===100||f<=0,g=sd(useId(),"void-auto-icon"),T=useTheme$1(),{t:w}=useTranslation(),P=fb(f||0),D=useCallback(C=>`Auto ${C} - ${i} ${P.integerAmount}.${P.decimalAmount}`,[i,P.decimalAmount,P.integerAmount]),Q=useCallback(C=>{let Y=C==="Capture"?l$1:s,{integerAmount:E,decimalAmount:v}=gb(Y,i);return `Partial ${C} - ${i} ${E}.${v}`},[l$1,s,i]),x=t>1?jsx(a$1,{title:Q("Void"),children:jsxs(xt,{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:[jsxs(gt,{percentage:t,children:[t,"% ",jsx(It,{percentage:ht(t)})]}),o>0&&jsx(motion.div,{style:{alignItems:"center",justifyContent:"center",gap:"4px",width:0,display:"none"},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(e,{compact:true,variant:"neutral",children:[o,"x"]})})]})}):r==="VOID"&&!c?jsx(a$1,{title:D("Void"),children:jsx(H,{children:jsx(F,{src:ot.VOID?.icon,alt:"auto"})})}):null,I=t===100?jsx(a$1,{title:w("void"),children:jsx(H,{children:jsx(F,{src:mj,alt:"void"})})}):x,W=useMemo(()=>d&&I?jsx(b$2,{chipIndex:5,copyText:w("void"),selectionProps:p,children:w("void")}):n&&I?jsx(l,{children:w("void")}):I,[n,I,d,p]);return W?jsx("div",{id:g,"data-testid":"VoidAutoIcon",style:{...!d&&{zIndex:11}},children:W}):null}var _e=Ko;var Jo=Ee;var Me=b(V(),1);var er=({authorizedStatus:t,isTextShown:e,iconStyles:o,tableMode:r,chipIndex:l=0,selectionProps:s={}})=>{let{t:i}=useTranslation(),n=useTheme$1(),d=i((0, Me.default)(t));return wb(r)?jsx(b$2,{copyText:d,chipIndex:l,selectionProps:s,children:d}):jsx(a$1,{title:d,children:e?jsx(j,{"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:o})})};var k=b(V(),1);var Ne=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)})),ze=styled$1(motion.span)(()=>({display:"block",width:"0",overflow:"hidden"})),Dt=styled$1("img")(()=>({width:"10px",height:"10px"})),Et=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"})),$t=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"}})),Ge=styled$1(motion.div)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start"})),Fe=styled$1(motion.span)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minHeight:"24px",cursor:"pointer",borderRadius:"16px"})),Ue={delay:.2,ease:"easeIn",fadeIn:{duration:.2}},Oe={animate:{width:"auto",paddingRight:"4px",paddingLeft:"4px"},fadeIn:{opacity:1,transition:{delay:.7}}},je={animate:{width:"auto"},fadeIn:{opacity:1,transition:{delay:1}}},He={animate:{width:"auto",paddingRight:"8px",paddingLeft:"4px"}},_t={fadeIn:{duration:.3},animate:{duration:.1}},qe={fadeIn:{opacity:1}},Ke=styled$1(j)(()=>({width:"88px",height:"100%"})),Vt=styled$1(Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.25),height:"100%"}));function ir({chargeStatus:t,gatewayTooltip:e,acquirerTooltip:o$1,chargeTooltip:r,errorCode:l,isTextShown:s,gatewayCode:i,acquirerCode:n,unCapturedStyles:d,iconStyles:p$1,iconWrapperStyles:f,gatewayIconWrapperStyles:c,gatewayContainerStyles:g$1,gateWayIconStyles:T,showBadge:w=true,isSheetViewShown:P=false,selectionProps:D={},chipIndex:Q=0}){let x=t?b$3[t]:null,I=t?g[t]:null,W=useTheme$1(),{t:C}=useTranslation(),Y=sd(useId(),"charge-status-icon"),E=r&&jsx(Fragment,{children:jsx("div",{children:r})}),v=o$1&&jsxs(Fragment,{children:[jsx("div",{children:"Acquirer"}),jsx("div",{children:o$1})]}),Z=e&&jsxs(Fragment,{children:[jsx("div",{children:"Gateway"}),jsx("div",{children:e})]}),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",...p$1}})});return P?jsxs(Vt,{children:[jsxs(b$2,{copyText:C((0, k.default)(t)),chipIndex:Q,selectionProps:D,children:[C((0, k.default)(t))," ",l]}),x&&jsxs(Fragment,{children:[i&&jsxs(b$2,{copyText:"Gateway",chipIndex:1,selectionProps:D,children:["Gateway ",i]}),n&&jsxs(b$2,{copyText:"Acquirer",chipIndex:2,selectionProps:D,children:["Acquirer ",n]})]})]}):s?jsxs(Vt,{children:[jsx(a$1,{title:E,children:jsxs(Ke,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":(0, k.default)(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((0, k.default)(t))," ",l]})}),x&&jsxs(Fragment,{children:[i&&jsx(a$1,{title:Z,children:jsxs(j,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":(0, k.default)(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark},children:["Gateway ",i]})}),n&&jsx(a$1,{title:v,children:jsxs(j,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":(0, k.default)(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark},children:["Acquirer ",n]})})]})]}):jsx(o,{id:Y,"data-testid":"ChargeStatusIcon_StatusIconWrapper",style:{...f},children:zm?.includes(t||"")&&(E||v||Z)?jsxs(Fe,{"data-testid":"ChargeStatusIcon_UnCapturedContainer",whileHover:["animate","fadeIn"],style:{left:"0",...w&&{paddingInline:"12px",border:"1px solid #F2F2F2",borderRadius:"12px",backgroundColor:"#fff"},...d},children:[jsx(Ge,{"data-testid":"ChargeStatusIcon_UnCapturedBadge",sx:{borderRadius:"56px"},initial:{background:"transparent"},variants:{animate:{background:x?.background}},children:jsx(a$1,{title:E??C((0, k.default)(t)),children:jsxs(Fragment,{children:[Ft,jsx(ze,{"data-testid":"ChargeStatusIcon_ErrorCodeWrapper",transition:{animate:{duration:.05}},variants:He,style:{...l&&{padding:"0 !important"}},children:jsx(Ne,{"data-testid":"ChargeStatusIcon_ErrorCodeLabel",sx:{background:x?.color},transition:Ue,variants:qe,initial:{opacity:0},children:l})})]})})}),jsx($t,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:_t,variants:Oe,style:g$1,isVisible:!!Z,children:Z&&jsx(a$1,{title:Z,children:jsx(Et,{"data-testid":"ChargeStatusIcon_GatewayIconWrapper",style:{background:x?.background,...c},children:jsx(Dt,{src:x?.gatewayIcon,alt:"gateway-icon","data-testid":"ChargeStatusIcon_GatewayIcon",style:T})})})}),jsx($t,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:_t,variants:je,style:g$1,isVisible:!!v,children:v&&jsx(a$1,{title:v,children:jsx(Et,{"data-testid":"ChargeStatusIcon_AcquirerIconWrapper",style:{background:x?.background,...c},children:jsx(Dt,{src:x?.acquirerIcon,alt:"acquirer-icon","data-testid":"ChargeStatusIcon_AcquirerIcon",style:T})})})})]}):jsx(a$1,{title:E??C((0, k.default)(t)),children:jsx(o,{children:Ft})})})}var lr=()=>{let{t}=useTranslation(),e=sd(useId(),"customer-initiated-icon");return jsx(a$1,{title:t("merchantInitiated"),children:jsx("img",{id:e,"data-testid":"merchantInitiatedIcon",src:rb,alt:"merchant",style:{width:"16px",height:"16px"}})})};var dr={G:"Global",R:"Regional",L:"Local"},rt=({geographyVariant:t,countryCode:e,isTextShown:o})=>{let r=t?dr[t]:void 0,l=r||e?`${r||""} ${r&&e?"-":""} ${e?`Country - ${e}`:""}`:void 0;return o||!e?null:jsx(a$1,{title:l,children:jsx(a$4,{countryCode:e})})};var ur=({geographyVariant:t,isTextShown:e,deviceCountry:o,deviceType:r,tableMode:l})=>{let s=sd(useId(),"device-icon-chip");return jsxs(cr,{id:s,"data-testid":"DeviceIconChip",sx:{display:"flex",gap:"8px",alignItems:"center",...wb(l)&&{height:"18px"}},children:[jsx(rt,{geographyVariant:t,isTextShown:e,countryCode:o}),jsx(c,{type:r,isTextShown:e,tableMode:l})]})};var gr=({isDisputeOpen:t,iconStyles:e})=>{let o=sd(useId(),"dispute-icon");return jsx(p,{id:o,"data-testid":"StatusCell_DisputeStatusIcon",sx:{width:"13.5px",height:"13.5px"},src:t?sa:ra,alt:"dispute-icon",style:e})};var Ze=styled$1(cr,{shouldForwardProp:t=>t!=="tableMode"})(({theme:t,tableMode:e})=>({display:"flex",gap:t.spacing(.5),...wb(e)&&{height:"18px"},alignItems:"center"})),to=styled$1("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function Nt({countryCode:t,isTextShown:e,cardNumber:o,bankName:r,tableMode:l}){let s=sd(useId(),"issuer-icon"),i=o?.slice(0,4),n=o?.slice(-4);return jsxs(Ze,{id:s,"data-testid":"IssuerIcon",tableMode:l,children:[t&&jsx(rt,{countryCode:t,isTextShown:e}),jsx(a$1,{title:`${r?`Issuer - ${r}`:""}`,children:jsx(to,{children:`${i||""} ${n||""}`})})]})}var br=Nt;var eo=b(V(),1);styled(motion.div)(({theme:t,background:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5),paddingInline:t.spacing(.75),paddingBlock:t.spacing(.5),backgroundColor:e,height:"24px",width:"fit-content",borderRadius:"24px",fontSize:"10px",color:t.palette.text.primary}));var Mi=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"})),Ni=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"})),zi=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px"}));var wr=({payoutStatus:t="PENDING",isTextShown:e,payoutTooltip:o,iconStyles:r,isSheetViewShown:l,chipIndex:s=0,selectionProps:i={}})=>{let{t:n}=useTranslation(),d=sd(useId(),"payout-icon"),p$1=n((0, eo.default)(t)),f=o||p$1;return l?jsx(b$2,{chipIndex:s,copyText:p$1,selectionProps:i,children:p$1}):jsx(a$1,{title:f,children:e?jsx(bt,{id:d,"data-testid":"StatusCell_PayoutStatusLabel",children:p$1}):jsx(p,{id:d,src:e$1[t],alt:"settled-icon","data-testid":"StatusCell_PayoutStatusIcon",style:r})})};var no=b(V(),1);var oo=styled$1(motion.img)(()=>({width:"14px",height:"14px"})),ro=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})),zt=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"}));var ep=styled$1(motion.span)(({isTextShown:t,theme:e})=>({border:`1px solid ${e.palette.divider}`,borderRadius:"12px",backgroundColor:e.palette.background.paper,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",minWidth:t?"auto":"36px",...t&&{border:"none"}})),op=styled$1(motion.div,{shouldForwardProp:t=>t!=="statusesCount"})(({statusesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"pointer",borderRadius:"16px"})),rp=styled$1(motion.div)(()=>({display:"flex",gap:"4px",justifyContent:"flex-start",alignItems:"center",position:"relative",width:"100%",overflow:"visible"}));var Rr=({isTextShown:t,refundStatus:e="PENDING",refundTooltip:o="",refundCount:r,iconStyles:l,isSheetViewShown:s,chipIndex:i=0,selectionProps:n={}})=>{let{t:d$1}=useTranslation(),p$1=useTheme$1(),f=sd(useId(),"refund-icon"),c=(r||0)>1,g=d$1((0, no.default)(e));if(s)return jsxs(b$2,{chipIndex:i,selectionProps:n,copyText:g,children:[g," ",c?`${r}x`:null]});let T=jsxs(ro,{"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$1,{title:jsx("div",{children:jsx("div",{children:o})}),children:jsx(bt,{id:f,"data-testid":"StatusCell_RefundStatusLabel",sx:{color:d[e].color,backgroundColor:d[e].backgroundColor,width:"90px"},children:jsxs(zt,{whileInView:c?["animate","fadeIn"]:void 0,variants:{animate:{boxShadow:p$1.shadows[4],gap:p$1.spacing(.5)}},children:[g," ",c?T:null]})})}):jsx(a$1,{title:jsx("div",{children:jsx("div",{children:o})}),children:c?jsxs(zt,{id:f,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:p$1.shadows[4],gap:p$1.spacing(.5)}},children:[jsx(oo,{src:ej,alt:"multi-refunded-icon","data-testid":"StatusCell_MultiRefundIcon"}),T]}):jsx(p,{id:f,src:c$1[e],alt:"refunded-icon","data-testid":"StatusCell_RefundStatusIcon",style:l})})},ao=Rr;var kr=ao;var Pt=b(V(),1);var Br={american_express:"AMEX",debit:"card",credit:"card"},L=t=>Br[t?.toLowerCase()||""]||t;var co=b(V(),1);styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));var io=styled("img")(()=>({maxWidth:"24px",maxHeight:"16px"}));styled(motion.span,{shouldForwardProp:t=>t!=="sourcesCount"})(({theme:t,sourcesCount:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${e*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var po=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),so=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 lo=styled("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function wt({source:t,isTextShown:e,title:o,width:r,height:l,imgSx:s}){let{t:i}=useTranslation(),n=h(t);return jsx(a$1,{title:o,children:e?jsx(so,{"data-testid":"SourceCell_BadgeTextWrapper",children:jsx(po,{"data-testid":"SourceCell_TextLabel","data-source":t,children:i((0, co.default)(t))})}):jsx(io,{src:n,alt:t,width:r,height:l,onError:d=>{d.currentTarget.src=h("card");},sx:s})})}function Mr({payment:t,card:e,isTextShown:o,firstIcon:r}){let l=sd(useId(),"source-icons"),{t:s}=useTranslation(),i=useCallback(()=>{let p=[],f=Qc(t),c=t?.method,g=t?.scheme;return L(c)?.toLowerCase()===L(g)?.toLowerCase()?p.push(L(c),L(f)):p.push(L(c),L(f),L(g)),p},[t]),n=useMemo(()=>jsx(wt,{source:r,isTextShown:o,title:s((0, Pt.default)(r))},r),[r,o,s]),d=useMemo(()=>i()?.filter(p=>!!p&&p!==r)?.map((p,f,c)=>{let g=t?.wallet===s("sv_wallet")?s("storedValueWallet"):s("passThruWallet"),T=f===c.length-1&&e?.last_four?`${s((0, Pt.default)(p))} - ${e?.last_four}`:s((0, Pt.default)(p));return jsx(wt,{source:p,isTextShown:o,title:f===0&&p==="Wallet"?g:T},`${p}-${f}`)}),[i,t,e,o,s,r]);return jsxs(Box,{id:l,"data-testid":"SourceIcons",display:"flex",alignItems:"center",gap:.5,children:[r&&n,d,e?.last_four&&jsxs(lo,{children:["\xB7\xB7\xB7 ",e?.last_four]})]})}var at={PROCESSED:Gf,FAILED:""};var xo=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),go=styled("img")(()=>({width:"16px",height:"16px"})),Io=styled("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}));var Wt=b(V(),1);function ho({status:t,isTextShown:e,isSheetViewShown:o,chipIndex:r=0,selectionProps:l={}}){let s=useTheme(),{t:i}=useTranslation(),n=sd(useId(),"destination-icon"),d=i((0, Wt.default)(t));return o&&at[t]?jsx(b$2,{copyText:d,chipIndex:r,selectionProps:l,children:d}):e&&at[t]?jsx(xo,{id:n,"data-testid":"ChargeStatusIcon_isTextShown","data-status":(0, Wt.default)(t),sx:{background:"#1F88D00D",color:t==="PROCESSED"?s.palette.info.dark:s.palette.common.black},children:d}):jsx(Io,{id:n,"data-testid":"DestinationIcon",className:"destination-status",children:t&&at[t]&&jsx(a$1,{title:i((0, Wt.default)(t)),children:jsx(go,{src:at[t],alt:"destination-icon"})})})}export{ep as a,op as b,rp as c,Ro as d,Lo as e,Do as f,_e as g,Jo as h,V as i,er as j,ir as k,lr as l,rt as m,ur as n,gr as o,br as p,Mi as q,Ni as r,zi as s,wr as t,kr as u,L as v,wt as w,Mr as x,ho as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$4}from'./chunk-
|
|
1
|
+
import {a as a$4}from'./chunk-OVCGWCUR.js';import {a as a$2}from'./chunk-ZLF47R2G.js';import {a as a$3}from'./chunk-T7PCBIIS.js';import {a}from'./chunk-GNY2VGGW.js';import {a as a$1}from'./chunk-AOHCQL6Y.js';import {sb,Bb,z as z$1,zb,Mc}from'./chunk-UXNHJGII.js';import re,{useState,useRef,useMemo}from'react';import {Box,CircularProgress,Typography}from'@mui/material';import le from'@mui/material/ClickAwayListener';import f from'@mui/material/Box';import j from'@mui/material/Input';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';styled(a)(({theme:e})=>({fontSize:"10px",color:e.palette.grey[700],fontWeight:600,lineHeight:"10px"}));styled(a)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,fontWeight:600,lineHeight:"14.3px",width:200}));styled(f)(()=>({display:"flex",flexDirection:"column",maxHeight:400,overflow:"auto",gap:"8px"}));var A=styled(j)(({theme:e})=>({width:"inherit",height:32,padding:"11px 12px",fontSize:"10px",borderRadius:"5px",backgroundColor:"#F9F9F9",border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.info.dark}}));styled(a$1)(()=>({padding:0,width:12,height:12,".MuiSvgIcon-root, img":{width:12,height:12}}));var L=styled(f)(()=>({display:"flex",flexDirection:"column",gap:"8px",padding:"4px"})),B=styled(f)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap",paddingInlineEnd:"20px"})),M=styled(f)(({theme:e,maxWidth:p})=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:`${e.palette.info.dark}1a`,fontSize:"10px",fontWeight:500,cursor:"pointer",...p&&{maxWidth:`${p}%`}}));styled(a)(({theme:e})=>({display:"flex",gap:"8px",alignItems:"center",fontSize:"10px",fontWeight:500,color:e.palette.common.black,cursor:"pointer",padding:8}));var H=styled(f)(({theme:e})=>({width:"100%",flexDirection:"column",border:`1px solid ${e.palette.grey[100]}`,borderRadius:"4px",backgroundColor:e.palette.grey[400],minWidth:"89px",position:"relative"})),z=styled(f)(()=>({position:"absolute",right:8,bottom:13.5,width:15,height:15}));var D=(e,p,l)=>e.map(n=>{let c=n?.options.map(i=>{let S=i?.options?.filter(r=>l.some(d=>r?.[d]?.toLowerCase().includes(p.toLowerCase())));return {...i,options:S}}).filter(i=>i?.options?.length>0);return {...n,options:c}}).filter(n=>n?.options?.length>0);function N({childOption:e,selectedOptions:p,onChangeOptions:l}){let[n,c]=useState(null),i=r=>{l([...p||[],r]);},S=r=>{l(p?.filter(d=>d.value!==r.value)||[]);};return jsxs(a$2,{onMouseEnter:r=>{e.options?.length>0&&c(r.currentTarget);},onMouseLeave:()=>{n&&c(null);},children:[jsxs(Box,{sx:{display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",maxWidth:"220px",minWidth:"89px"},children:[e.label,jsx("img",{src:sb,className:"arrow-icon",alt:"arrow"})]}),jsx(a$3,{sx:{maxHeight:"450px",overflow:"auto"},open:!!n,anchorEl:n,placement:"right-start",children:e.options?.map(r=>{let a=!!p?.find(m=>m.value===r.value);return jsx(a$2,{isSelected:a,onClick:m=>{m.stopPropagation(),m.preventDefault(),a?S(r):i(r);},children:jsx(Box,{sx:{flex:1,maxWidth:"220px",minWidth:"89px"},children:r.label})},r.value)})})]})}function G({parentOption:e,selectedOptions:p,onChangeOptions:l}){let[n,c]=useState(null);return jsxs(a$2,{onMouseEnter:i=>{e.options?.length>0&&c(i.currentTarget);},onMouseLeave:()=>{n&&c(null);},children:[jsxs(Box,{sx:{display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",maxWidth:"340px",minWidth:"89px"},children:[e.label,jsx("img",{src:sb,className:"arrow-icon",alt:"arrow"})]}),jsx(a$3,{sx:{maxHeight:"450px",overflow:"auto"},open:!!n,anchorEl:n,placement:"right-start",children:e.options?.map(i=>jsx(N,{childOption:i,selectedOptions:p,onChangeOptions:l},i.label))})]})}function ae({nestedOptions:e,onChangeOptions:p,selectedOptions:l,placeholder:n,isLoading:c,searchBy:i=["label"],disabled:S}){let[r,d]=useState(null),[a,m]=useState(""),q=useRef(null),y=!!r,J=t=>{d(y?null:t.currentTarget);},K=()=>{d(null);},Q=()=>{a&&m("");},Y=useMemo(()=>a?D(e,a,i):e,[e,a,i]),Z=c?jsx(CircularProgress,{size:16}):jsx(a$4,{src:a?Bb:z$1,alt:a?"close":"search",onClick:Q,sx:{width:12,height:12}}),x=Number(l?.length??0);return jsx(le,{onClickAway:()=>{y&&K();},children:jsxs(H,{id:"TriggerWrapper","data-testid":"MultiSelectWithSearch",onClick:t=>!S&&J(t),ref:q,children:[jsx(Typography,{color:"grey",sx:{cursor:"pointer",fontSize:"10px",padding:"4px"},component:"label",children:n}),x===0&&jsx(Typography,{sx:{fontWeight:500,fontSize:"11px",padding:"0px 4px 4px"},component:"p",children:"Please Select"}),jsx(z,{component:"img",src:zb,alt:"down arrow",sx:{...y&&{transform:"rotate(180deg)"}}}),!!x&&jsx(B,{id:"SelectedBadgesWrapper",children:x>0&&x<=2?l?.map(t=>jsxs(M,{maxWidth:90,children:[jsx(a$4,{src:Mc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{children:t.label})]},t.value)):x>2&&l?.slice(0,2)?.map((t,b)=>jsxs(re.Fragment,{children:[jsxs(M,{maxWidth:90,children:[jsx(a$4,{src:Mc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{children:t.label})]}),b===1&&jsx(M,{maxWidth:90,children:jsxs("span",{children:["+",x-2]})})]},t.value))}),jsx(a$3,{open:y,anchorEl:r,sx:{margin:"8px 0",maxHeight:330,overflow:"auto",maxWidth:"340px"},children:jsxs(L,{children:[jsx(A,{placeholder:n||"Select",endAdornment:Z,onClick:t=>{t.stopPropagation();},value:a,onChange:t=>{m(t.target.value);},disableUnderline:true,sx:{cursor:"default",width:"100%",backgroundColor:"white",border:"1px solid #F2F2F2",...e.length&&{marginBottom:"4px"},...a&&{cursor:"pointer"}}}),jsx(B,{children:l?.map(t=>jsxs(M,{sx:{maxWidth:"150px"},onClick:b=>{b.stopPropagation(),b.preventDefault(),p(l?.filter(_=>_.value!==t.value)||[]);},children:[jsx(a$4,{src:Mc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.label}),jsx(a$4,{src:Bb,alt:"close",sx:{width:9,height:9}})]},t.value))}),Y?.map(t=>jsx(G,{parentOption:t,selectedOptions:l,onChangeOptions:p},t.label))]})})]})})}var X=ae;var Qe=X;export{N as a,G as b,Qe as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {sd}from'./chunk-VHRTL7LZ.js';import {forwardRef,useId,memo}from'react';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var d=styled("img")(({theme:o})=>({width:o.spacing(2),height:o.spacing(2),verticalAlign:"middle"})),f=forwardRef((o,n)=>{let r=sd(useId(),"icon");return jsx(d,{id:r,"data-testid":"Icon",sx:o.sx,...o,ref:n})}),e=memo(f);var L=e;export{L as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {sd}from'./chunk-VHRTL7LZ.js';import {useId}from'react';import a from'@mui/material/Box';import {motion}from'framer-motion';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var e=styled(motion.div)(()=>({width:"100%",height:"100%",cursor:"pointer",".card-front > div, .card-back > div, .card-container":{width:"inherit",height:"inherit"},".card-container":{perspective:"1000px"},".card":{width:"100%",height:"100%",position:"relative",transformStyle:"preserve-3d"},".card-front, .card-back":{position:"absolute",backfaceVisibility:"hidden",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},".card-back":{transform:"rotateY(180deg)"}}));function t({frontCard:d,backCard:n,isFlipped:p,isHovered:c}){let m=sd(useId(),"flipping-card");return jsx(e,{id:m,"data-testid":"FlippingCard",children:jsx(motion.div,{className:"card-container",children:jsxs(motion.div,{className:"card",animate:{rotateY:p?180:c?20:0},transition:{duration:.3},children:[jsx(motion.div,{className:"card-front",children:jsx(a,{children:d})}),jsx(motion.div,{className:"card-back",children:jsx(a,{children:n})})]})})})}var N=t;export{N as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c,b,g}from'./chunk-DGSUBJRX.js';import {a}from'./chunk-DQD7R3P2.js';import {Bd}from'./chunk-EIQU6V2G.js';import {zb,z as z$1,Re}from'./chunk-UXNHJGII.js';import {memo,useId,useState,useEffect,useRef}from'react';import {styled,Box,TextField,Button,Typography,FormControl,InputLabel,Select,MenuItem}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import L from'@mui/material/Box';import ve from'@mui/material/ClickAwayListener';import Be from'@mui/material/Popper';import W from'@mui/material/Skeleton';import {styled as styled$1}from'@mui/material/styles';import {useFormContext,Controller}from'react-hook-form';var K=styled(Box)(()=>({display:"flex",flexDirection:"column",gap:"4px",width:"100%",height:40,"& *":{flex:1,margin:"0px !important"}})),y=styled(TextField,{shouldForwardProp:e=>!["hasError","feedbackType","hasFeedback","hideArrows"].includes(e)})(({theme:e,hasError:n,feedbackType:o,hasFeedback:a,hideArrows:t})=>{let{borderColor:i}=c(e,o),l=a?"4px 4px 0 0":"4px",m="#F2F2F2";return o&&(m=i),n&&!o&&(m=e.palette.error.main),{"& .MuiFormLabel-asterisk":{color:"red"},"& .MuiInputBase-root":{maxHeight:"40px !important",alignItems:"flex-end !important"},"& fieldset":{border:"1px solid red"},"&:hover fieldset":{border:"1px solid green"},"&.Mui-focused fieldset":{border:"1px solid blue"},border:`1px solid ${m}`,borderBottom:a?"none":void 0,borderRadius:l,"& .MuiInputBase-input":{margin:"0px !important",padding:"0px !important",color:"#20232B !important",fontSize:"11px !important",fontStyle:"normal !important",fontWeight:"500 !important",lineHeight:"130% !important"},"& .MuiFormLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(0, 8px) scale(1)"},".MuiFormLabel-root.MuiFormLabel-filled, .MuiFormLabel-root.MuiInputLabel-shrink":{transform:"translate(0, -1.5px) scale(0.75) "},".MuiFormLabel-root.Mui-focused":{transform:"translate(0, -1.5px) scale(0.75)",fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%"},...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}}}}),U=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}));var V=styled("div")(()=>({position:"relative",display:"flex",justifyContent:"flex-end",alignItems:"center"})),O=styled(y)(({theme:e})=>({fontSize:"11px",lineHeight:"11px",color:e.palette.common.black,borderRadius:"5px",boxShadow:"0px 0px 6px 0px rgba(0, 0, 0, 0.11);",padding:"4px 8px",height:"32px",border:"none",outline:"none",width:"100%","&:focus":{border:"1px solid #1F88D0"}})),G=styled(Button)(({theme:e})=>({display:"flex",height:"24px",padding:"8px",justifyContent:"center",alignItems:"center",gap:"8px",backgroundColor:e.palette.divider,color:e.palette.grey[700],fontSize:"9px",fontWeight:500,textTransform:"none",position:"absolute",right:4,opacity:"1 !important",top:4,borderRadius:"4px"}));function P(e){let n=Bd(useId(),"file-input"),o=useRef(null);return jsxs(Fragment,{children:[jsxs(V,{id:n,"data-testid":"InputContainer",children:[jsx(O,{value:o.current?.files?.[0]?.name||"",...e}),jsx(G,{onClick:()=>{o.current?.click();},children:"Browse"})]}),jsx("input",{type:"file",ref:o,style:{display:"none"}})]})}var Ce=P;var Q=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"})),X=styled$1(L)(({theme:e})=>({backgroundColor:e.palette.common.white,padding:"4px 8px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,width:100})),Y=styled$1("ul")(()=>({listStyle:"none",padding:0,margin:0,maxHeight:100,overflow:"auto"})),Z=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"})),j=styled$1(a)(()=>({height:24,padding:"4px",marginBottom:"4px"})),ee=styled$1(L)(()=>({color:"red !important"}));styled$1("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}));var te=styled$1(L)(({theme:e})=>({border:`1px solid ${e.palette.divider}`,display:"flex",position:"relative",paddingInline:"8px",alignItems:"center",borderRadius:"4px",height:"40px"})),oe=styled$1(a,{shouldForwardProp:e=>e!=="error"})(({error:e})=>({img:{cursor:"pointer"},...e&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,borderBottom:"none"}}));function Pe({defaultCountry:e,value:n,onChangeCountry:o,required:a,countries:t=[],isLoading:i=false}){let l=Bd(useId(),"countries-dropdown"),[m,g]=useState(null),[b,u]=useState([]),[S,D]=useState(),ue=()=>{if(t&&e){let r=t.find(c=>c.iso2===e);r&&o?.(r);}};useEffect(()=>{u(t||[]),ue();},[t]);let A=!!m,ce=r=>{r.stopPropagation(),g(r.currentTarget);},N=()=>{g(null),D(void 0);},xe=r=>{o?.(r),N(),u(t);},fe=r=>{let c=Number(r.target.value);if(D(c),!c){u(t);return}u(t.filter(ge=>ge.idd_prefix.toString().startsWith(c.toString())));};return i?jsx(W,{variant:"rectangular",width:56.5,height:20,sx:{borderRadius:"4px"}}):jsx(ve,{onClickAway:N,children:jsxs(L,{id:l,"data-testid":"CountriesCode",sx:{position:"relative"},children:[jsxs(Q,{type:"button",onClick:ce,sx:{backgroundColor:"transparent",border:"none",height:34},children:[n?.logo?jsx("img",{src:n.logo,alt:"c",className:"logo"}):jsx(W,{variant:"rectangular",className:"logo"}),jsx("span",{children:`+${n?.idd_prefix}`}),a&&jsx(ee,{component:"span",children:"*"}),jsx(L,{component:"img",src:zb,alt:"d",className:"arrow",sx:{...A&&{transform:"rotate(180deg)"}}})]}),jsx(Be,{open:A,anchorEl:m,children:jsxs(X,{component:"article","data-testid":"CountriesWrapper",children:[jsx(j,{endAdornment:jsx("img",{src:z$1,alt:"arrow"}),onChange:fe,value:S,hideArrows:true}),jsx(Y,{children:b.map(r=>jsxs(Z,{onClick:()=>{xe(r);},children:[r.logo?jsx("img",{src:r.logo,alt:"c",className:"logo"}):jsx(W,{variant:"rectangular",className:"logo"}),jsx("span",{children:`+${r.idd_prefix}`})]},`country-code-${r.countryId}`))})]})})]})})}var ne=memo(Pe);var Le=ne;function E(e){let n=Bd(useId(),"inputs-input"),{control:o}=useFormContext();return jsx(Controller,{name:e.name,control:o,render:({field:a,fieldState:{error:t}})=>{let i=e.feedback!==void 0&&e.feedback!==null,l=b(e.feedback),m=e.label??e.placeholder,g$1=e.label&&typeof e.placeholder=="string"?e.placeholder:void 0,b$1=t?.message??e.helperText,u=!i&&b$1?jsx(U,{children:b$1}):null,S=l?jsx(g,{...l}):null;return jsxs(Box,{sx:{display:"flex",alignItems:"stretch",height:"100%",flexDirection:"column",flex:1},children:[jsx(K,{id:n,"data-testid":"InputWrapper",children:jsx(y,{rows:1,hasError:(!!t?.message||!!e.error)&&!i,hasFeedback:!!l,feedbackType:l?.type,...a,variant:"standard",label:m,placeholder:g$1,size:"small",required:e.required,fullWidth:true,InputProps:{disabled:e.disabled,disableUnderline:true,...e.InputProps,sx:{fontSize:"11px",height:"40px",padding:"8px",borderRadius:l?"4px 4px 0 0":"4px",...e.InputProps?.sx},endAdornment:e?.InputProps?.endAdornment},InputLabelProps:{...e.InputLabelProps,sx:{color:"#8D8D94 !important",fontSize:"11px",padding:"8px",...e.InputLabelProps?.sx}},sx:e?.sx,disabled:e?.disabled,focused:e?.focused,type:e?.type,hideArrows:e?.hideArrows,onKeyDown:e?.onKeyDown})}),u,S]})}})}var H=E;var pe=styled("img")(()=>({width:"12px",height:"12px",marginRight:"4px"})),le=styled("div")(({theme:e})=>({display:"flex",alignItems:"center",color:`${e.palette.custom[500]}`,fontSize:"10px",padding:"8px 12px",background:"#FF000026",borderRadius:"0 0 4px 4px",borderTop:"none",height:"32px"}));function T({showSearchIcon:e=true,error:n,errorMessage:o,feedback:a,...t}){let i=Bd(useId(),"search-input"),l=!!(n&&o&&!a);return jsxs(Box,{id:i,"data-testid":"SearchInput",children:[jsx(H,{InputProps:{endAdornment:!t.disabled&&e&&jsx(Box,{component:"img",maxWidth:"16px",maxHeight:"16px",src:z$1,alt:"search"}),sx:{...l&&{border:"1px solid #FF000026",borderBottom:"none",borderRadius:"4px 4px 0 0"}},...t.InputProps},sx:{...l&&{border:"1px solid #FF000026",borderBottom:"none",borderRadius:"4px 4px 0 0"}},feedback:a,error:n,...t}),l&&jsxs(le,{children:[jsx(pe,{src:Re}),jsx(Typography,{color:"red",fontSize:"10px",children:o})]})]})}var Ae=T;function z(e){let n=Bd(useId(),"inputs-select"),{control:o}=useFormContext();return jsx(Controller,{name:e.name,control:o,render:({field:a,fieldState:{error:t}})=>jsxs(Box,{id:n,"data-testid":"InputsSelect",sx:{display:"flex",alignItems:"stretch",height:"100%",flexDirection:"column",flex:1},children:[jsxs(FormControl,{variant:"filled",sx:{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%"}},required:e.required,children:[jsx(InputLabel,{id:"demo-simple-select-filled-label",sx:{fontSize:"11px",color:"#8D8D94 !important"},children:e.label}),jsx(Select,{inputProps:{sx:{backgroundColor:"#F9F9F9 !important",borderRadius:"4px",fontSize:"11px"}},...a,value:a.value??"",error:!!t,disableUnderline:true,required:true,labelId:"demo-simple-select-filled-label",id:"demo-simple-select-filled",sx:{width:"100%",height:"40px !important",maxHeight:"40px !important",borderRadius:"4px",overflow:"hidden",".MuiSelect-select":{padding:"0px 8px !important",height:"40px !important",maxHeight:"40px !important",display:"flex",alignItems:"flex-end !important"},".MuiSelect-filled":{padding:"0px 8px !important"},...t&&{border:"1px solid #FF3D00"}},children:(e.options||[]).map(i=>jsx(MenuItem,{value:i.value??"",sx:{fontSize:"12px"},children:i.label},i.value??""))})]}),t?.message&&jsx(Box,{component:"small",sx:i=>({color:i.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}),children:t.message})]})})}var Oe=z;export{Ce as a,te as b,oe as c,Le as d,H as e,Ae as f,Oe as g};
|
|
1
|
+
import {c,b,g}from'./chunk-2F5UHWUK.js';import {a}from'./chunk-XSXYUQNS.js';import {sd}from'./chunk-VHRTL7LZ.js';import {zb,z as z$1,Re}from'./chunk-UXNHJGII.js';import {memo,useId,useState,useEffect,useRef}from'react';import {styled,Box,TextField,Button,Typography,FormControl,InputLabel,Select,MenuItem}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import L from'@mui/material/Box';import ve from'@mui/material/ClickAwayListener';import Be from'@mui/material/Popper';import W from'@mui/material/Skeleton';import {styled as styled$1}from'@mui/material/styles';import {useFormContext,Controller}from'react-hook-form';var K=styled(Box)(()=>({display:"flex",flexDirection:"column",gap:"4px",width:"100%",height:40,"& *":{flex:1,margin:"0px !important"}})),y=styled(TextField,{shouldForwardProp:e=>!["hasError","feedbackType","hasFeedback","hideArrows"].includes(e)})(({theme:e,hasError:n,feedbackType:o,hasFeedback:a,hideArrows:t})=>{let{borderColor:i}=c(e,o),l=a?"4px 4px 0 0":"4px",m="#F2F2F2";return o&&(m=i),n&&!o&&(m=e.palette.error.main),{"& .MuiFormLabel-asterisk":{color:"red"},"& .MuiInputBase-root":{maxHeight:"40px !important",alignItems:"flex-end !important"},"& fieldset":{border:"1px solid red"},"&:hover fieldset":{border:"1px solid green"},"&.Mui-focused fieldset":{border:"1px solid blue"},border:`1px solid ${m}`,borderBottom:a?"none":void 0,borderRadius:l,"& .MuiInputBase-input":{margin:"0px !important",padding:"0px !important",color:"#20232B !important",fontSize:"11px !important",fontStyle:"normal !important",fontWeight:"500 !important",lineHeight:"130% !important"},"& .MuiFormLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(0, 8px) scale(1)"},".MuiFormLabel-root.MuiFormLabel-filled, .MuiFormLabel-root.MuiInputLabel-shrink":{transform:"translate(0, -1.5px) scale(0.75) "},".MuiFormLabel-root.Mui-focused":{transform:"translate(0, -1.5px) scale(0.75)",fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%"},...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}}}}),U=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}));var V=styled("div")(()=>({position:"relative",display:"flex",justifyContent:"flex-end",alignItems:"center"})),O=styled(y)(({theme:e})=>({fontSize:"11px",lineHeight:"11px",color:e.palette.common.black,borderRadius:"5px",boxShadow:"0px 0px 6px 0px rgba(0, 0, 0, 0.11);",padding:"4px 8px",height:"32px",border:"none",outline:"none",width:"100%","&:focus":{border:"1px solid #1F88D0"}})),G=styled(Button)(({theme:e})=>({display:"flex",height:"24px",padding:"8px",justifyContent:"center",alignItems:"center",gap:"8px",backgroundColor:e.palette.divider,color:e.palette.grey[700],fontSize:"9px",fontWeight:500,textTransform:"none",position:"absolute",right:4,opacity:"1 !important",top:4,borderRadius:"4px"}));function P(e){let n=sd(useId(),"file-input"),o=useRef(null);return jsxs(Fragment,{children:[jsxs(V,{id:n,"data-testid":"InputContainer",children:[jsx(O,{value:o.current?.files?.[0]?.name||"",...e}),jsx(G,{onClick:()=>{o.current?.click();},children:"Browse"})]}),jsx("input",{type:"file",ref:o,style:{display:"none"}})]})}var Ce=P;var Q=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"})),X=styled$1(L)(({theme:e})=>({backgroundColor:e.palette.common.white,padding:"4px 8px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,width:100})),Y=styled$1("ul")(()=>({listStyle:"none",padding:0,margin:0,maxHeight:100,overflow:"auto"})),Z=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"})),j=styled$1(a)(()=>({height:24,padding:"4px",marginBottom:"4px"})),ee=styled$1(L)(()=>({color:"red !important"}));styled$1("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}));var te=styled$1(L)(({theme:e})=>({border:`1px solid ${e.palette.divider}`,display:"flex",position:"relative",paddingInline:"8px",alignItems:"center",borderRadius:"4px",height:"40px"})),oe=styled$1(a,{shouldForwardProp:e=>e!=="error"})(({error:e})=>({img:{cursor:"pointer"},...e&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,borderBottom:"none"}}));function Pe({defaultCountry:e,value:n,onChangeCountry:o,required:a,countries:t=[],isLoading:i=false}){let l=sd(useId(),"countries-dropdown"),[m,g]=useState(null),[b,u]=useState([]),[S,D]=useState(),ue=()=>{if(t&&e){let r=t.find(c=>c.iso2===e);r&&o?.(r);}};useEffect(()=>{u(t||[]),ue();},[t]);let A=!!m,ce=r=>{r.stopPropagation(),g(r.currentTarget);},N=()=>{g(null),D(void 0);},xe=r=>{o?.(r),N(),u(t);},fe=r=>{let c=Number(r.target.value);if(D(c),!c){u(t);return}u(t.filter(ge=>ge.idd_prefix.toString().startsWith(c.toString())));};return i?jsx(W,{variant:"rectangular",width:56.5,height:20,sx:{borderRadius:"4px"}}):jsx(ve,{onClickAway:N,children:jsxs(L,{id:l,"data-testid":"CountriesCode",sx:{position:"relative"},children:[jsxs(Q,{type:"button",onClick:ce,sx:{backgroundColor:"transparent",border:"none",height:34},children:[n?.logo?jsx("img",{src:n.logo,alt:"c",className:"logo"}):jsx(W,{variant:"rectangular",className:"logo"}),jsx("span",{children:`+${n?.idd_prefix}`}),a&&jsx(ee,{component:"span",children:"*"}),jsx(L,{component:"img",src:zb,alt:"d",className:"arrow",sx:{...A&&{transform:"rotate(180deg)"}}})]}),jsx(Be,{open:A,anchorEl:m,children:jsxs(X,{component:"article","data-testid":"CountriesWrapper",children:[jsx(j,{endAdornment:jsx("img",{src:z$1,alt:"arrow"}),onChange:fe,value:S,hideArrows:true}),jsx(Y,{children:b.map(r=>jsxs(Z,{onClick:()=>{xe(r);},children:[r.logo?jsx("img",{src:r.logo,alt:"c",className:"logo"}):jsx(W,{variant:"rectangular",className:"logo"}),jsx("span",{children:`+${r.idd_prefix}`})]},`country-code-${r.countryId}`))})]})})]})})}var ne=memo(Pe);var Le=ne;function E(e){let n=sd(useId(),"inputs-input"),{control:o}=useFormContext();return jsx(Controller,{name:e.name,control:o,render:({field:a,fieldState:{error:t}})=>{let i=e.feedback!==void 0&&e.feedback!==null,l=b(e.feedback),m=e.label??e.placeholder,g$1=e.label&&typeof e.placeholder=="string"?e.placeholder:void 0,b$1=t?.message??e.helperText,u=!i&&b$1?jsx(U,{children:b$1}):null,S=l?jsx(g,{...l}):null;return jsxs(Box,{sx:{display:"flex",alignItems:"stretch",height:"100%",flexDirection:"column",flex:1},children:[jsx(K,{id:n,"data-testid":"InputWrapper",children:jsx(y,{rows:1,hasError:(!!t?.message||!!e.error)&&!i,hasFeedback:!!l,feedbackType:l?.type,...a,variant:"standard",label:m,placeholder:g$1,size:"small",required:e.required,fullWidth:true,InputProps:{disabled:e.disabled,disableUnderline:true,...e.InputProps,sx:{fontSize:"11px",height:"40px",padding:"8px",borderRadius:l?"4px 4px 0 0":"4px",...e.InputProps?.sx},endAdornment:e?.InputProps?.endAdornment},InputLabelProps:{...e.InputLabelProps,sx:{color:"#8D8D94 !important",fontSize:"11px",padding:"8px",...e.InputLabelProps?.sx}},sx:e?.sx,disabled:e?.disabled,focused:e?.focused,type:e?.type,hideArrows:e?.hideArrows,onKeyDown:e?.onKeyDown})}),u,S]})}})}var H=E;var pe=styled("img")(()=>({width:"12px",height:"12px",marginRight:"4px"})),le=styled("div")(({theme:e})=>({display:"flex",alignItems:"center",color:`${e.palette.custom[500]}`,fontSize:"10px",padding:"8px 12px",background:"#FF000026",borderRadius:"0 0 4px 4px",borderTop:"none",height:"32px"}));function T({showSearchIcon:e=true,error:n,errorMessage:o,feedback:a,...t}){let i=sd(useId(),"search-input"),l=!!(n&&o&&!a);return jsxs(Box,{id:i,"data-testid":"SearchInput",children:[jsx(H,{InputProps:{endAdornment:!t.disabled&&e&&jsx(Box,{component:"img",maxWidth:"16px",maxHeight:"16px",src:z$1,alt:"search"}),sx:{...l&&{border:"1px solid #FF000026",borderBottom:"none",borderRadius:"4px 4px 0 0"}},...t.InputProps},sx:{...l&&{border:"1px solid #FF000026",borderBottom:"none",borderRadius:"4px 4px 0 0"}},feedback:a,error:n,...t}),l&&jsxs(le,{children:[jsx(pe,{src:Re}),jsx(Typography,{color:"red",fontSize:"10px",children:o})]})]})}var Ae=T;function z(e){let n=sd(useId(),"inputs-select"),{control:o}=useFormContext();return jsx(Controller,{name:e.name,control:o,render:({field:a,fieldState:{error:t}})=>jsxs(Box,{id:n,"data-testid":"InputsSelect",sx:{display:"flex",alignItems:"stretch",height:"100%",flexDirection:"column",flex:1},children:[jsxs(FormControl,{variant:"filled",sx:{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%"}},required:e.required,children:[jsx(InputLabel,{id:"demo-simple-select-filled-label",sx:{fontSize:"11px",color:"#8D8D94 !important"},children:e.label}),jsx(Select,{inputProps:{sx:{backgroundColor:"#F9F9F9 !important",borderRadius:"4px",fontSize:"11px"}},...a,value:a.value??"",error:!!t,disableUnderline:true,required:true,labelId:"demo-simple-select-filled-label",id:"demo-simple-select-filled",sx:{width:"100%",height:"40px !important",maxHeight:"40px !important",borderRadius:"4px",overflow:"hidden",".MuiSelect-select":{padding:"0px 8px !important",height:"40px !important",maxHeight:"40px !important",display:"flex",alignItems:"flex-end !important"},".MuiSelect-filled":{padding:"0px 8px !important"},...t&&{border:"1px solid #FF3D00"}},children:(e.options||[]).map(i=>jsx(MenuItem,{value:i.value??"",sx:{fontSize:"12px"},children:i.label},i.value??""))})]}),t?.message&&jsx(Box,{component:"small",sx:i=>({color:i.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}),children:t.message})]})})}var Oe=z;export{Ce as a,te as b,oe as c,Le as d,H as e,Ae as f,Oe as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {sd}from'./chunk-VHRTL7LZ.js';import {Jc}from'./chunk-UXNHJGII.js';import {memo,useId}from'react';import d from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var e=styled(d)(({theme:r})=>({fontSize:"10px",color:r.palette.error.light,padding:"8px",background:r.palette.background.gradient.error,borderRadius:"4px",display:"flex",gap:"4px",alignItems:"center",height:32}));function l({error:r,...i}){let n=sd(useId(),"error");return jsxs(e,{...i,id:n,"data-testid":"Error",children:[jsx("img",{src:Jc,alt:"w"}),r]})}var p=memo(l);var k=p;export{k as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {f}from'./chunk-
|
|
1
|
+
import {f}from'./chunk-5GFL3K4W.js';import {sd}from'./chunk-VHRTL7LZ.js';import {memo,useId,useState,useRef,useMemo}from'react';import {useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import C from'@mui/material/Box';import v from'@mui/material/Button';import {styled,alpha}from'@mui/material/styles';function m({isActive:o}){let[t,r]=useState(false),a=useTheme(),s=()=>{r(true);},p=()=>{r(false);},l=o?a.palette.common.white:a.palette.grey[700],c=t?a.palette.common.black:"transparent";return jsx("svg",{width:"27",height:"30",viewBox:"0 0 27 32",xmlns:"http://www.w3.org/2000/svg",children:jsxs("g",{id:"Group 140343",children:[jsx("path",{id:"Active",d:"M0 0H11C19.8366 0 27 7.16344 27 16C27 24.8366 19.8366 32 11 32H0V0Z",fill:c,fillOpacity:"0.1",onMouseEnter:s,onMouseLeave:p}),jsx("path",{id:"Union",fillRule:"evenodd",clipRule:"evenodd",d:"M15.6941 15.0078C15.6494 15.0193 15.6083 15.043 15.5758 15.0769L12.5026 18.1501L12.5025 18.1501L15.5756 15.0769C15.6082 15.043 15.6493 15.0193 15.6941 15.0078ZM12.5619 18.7465C12.5426 18.7512 12.5227 18.7536 12.5026 18.7536C12.4363 18.7536 12.3727 18.7273 12.3258 18.6804L9.07581 15.4304C9.04012 15.3957 9.01559 15.3512 9.00535 15.3025C8.99511 15.2538 8.99963 15.2032 9.01833 15.1571C9.03703 15.111 9.06907 15.0715 9.11033 15.0437C9.13446 15.0275 9.16112 15.0156 9.18904 15.0086C9.16105 15.0156 9.13433 15.0275 9.11013 15.0438C9.06887 15.0716 9.03684 15.111 9.01814 15.1571C8.99944 15.2032 8.99492 15.2539 9.00516 15.3026C9.0154 15.3513 9.03993 15.3958 9.07562 15.4305L12.3256 18.6805C12.3725 18.7273 12.4361 18.7537 12.5024 18.7537C12.5226 18.7537 12.5426 18.7512 12.5619 18.7465ZM16.1965 15.342C16.1781 15.4301 16.1338 15.5105 16.0693 15.5731L12.8205 18.8219C12.7361 18.9063 12.6217 18.9537 12.5024 18.9537C12.3831 18.9537 12.2686 18.9062 12.1842 18.8219L8.93507 15.5728C8.87148 15.5105 8.82775 15.4308 8.80944 15.3437C8.79101 15.2561 8.79914 15.165 8.8328 15.082C8.86646 14.999 8.92412 14.9279 8.99839 14.8779C9.07266 14.8279 9.16022 14.8011 9.24978 14.8011C9.30998 14.8011 9.36958 14.8132 9.42503 14.8366C9.47997 14.8599 9.52973 14.8938 9.57144 14.9364L12.5024 17.8673L15.433 14.9368C15.5151 14.852 15.6273 14.803 15.7454 14.8002C15.836 14.798 15.9252 14.8233 16.0013 14.8728C16.0773 14.9222 16.1367 14.9935 16.1715 15.0772C16.2063 15.1609 16.2151 15.2533 16.1965 15.342Z",fill:l})]})})}var y=o=>({...o.typography.subtitle1,borderRadius:"50px",borderWidth:"1px",borderStyle:"solid",minWidth:"135.11px",height:"32px",display:"flex",justifyContent:"center",alignItems:"center",gap:"8px",textTransform:"none",transition:"none",paddingInline:o.spacing(2)}),B=styled(v)(({theme:o})=>({...y(o),background:o.palette.background.gradient.shadedBlue,color:o.palette.common.white,"&:hover":{background:o.palette.background.gradient.shadedBlue,opacity:.8}})),b=styled(v)(({theme:o})=>({...y(o),backgroundColor:o.palette.common.white,borderColor:o.palette.grey[100],color:o.palette.text.primary,"&:hover":{backgroundColor:o.palette.common.white,opacity:.7}}));styled(C)(({theme:o,variant:t})=>({borderRadius:"50px",backgroundColor:t==="active"?alpha(o.palette.text.primary,.1):o.palette.grey[100],display:"flex",justifyContent:"center",alignItems:"center",paddingInline:o.spacing(.5),paddingBlock:o.spacing(.25),color:t==="active"?o.palette.common.white:o.palette.text.primary,fontSize:"8px",fontWeight:700,lineHeight:"10px"}));styled("img")(({theme:o,variant:t})=>({fill:t==="active"?o.palette.common.white:o.palette.text.primary,color:t==="active"?o.palette.common.white:o.palette.text.primary,maxWidth:"14px",maxHeight:"14px"}));styled("p")(({theme:o})=>({fontSize:"0.6875rem",color:o.palette.background.default,fontStyle:"normal",margin:"auto",textTransform:"capitalize"}));var I=styled(f)(({theme:o})=>({backgroundColor:"white",boxShadow:o.shadows[21],borderRadius:"0.25rem","& .MuiPaper-root":{borderRadius:"0.25rem",width:"12.5rem"}})),D=styled("span")(()=>({width:"27px",height:"100%",maxHeight:"100%",position:"absolute",top:"0",right:"0",bottom:"0",overflow:"hidden"})),L=styled(C)(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"100%"})),k=styled(C)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"0.5rem"}));var M={active:B,inActive:b};function R({variant:o="inActive",label:t,dropdownOptions:r,...a}){let s=sd(useId(),"dropdown-button"),[p,l]=useState(null),c=useRef(null),f=!!p,g=()=>{l(null);},H=M[o],d=r&&r.length>0,h=d?jsx(m,{isActive:o==="active"}):null,T=n=>{n.stopPropagation(),n.preventDefault(),d&&l(c.current);},P=useMemo(()=>(r||[]).map(n=>({...n,onClick:A=>{n?.onClick?.(A),g();}})),[r]);return jsxs(Fragment,{children:[jsx(H,{id:s,"data-testid":"StatusButton",...a,ref:c,onClick:n=>{a?.onClick?.(n),T(n);},sx:{...d&&{paddingInlineEnd:"27px"}},children:jsxs(L,{children:[jsx(k,{children:t}),h&&jsx(D,{children:h})]})}),f&&jsx(I,{open:f,onClose:g,anchorEl:p,menuItems:P})]})}R.displayName="DropdownButton";var E=memo(R);var go=E;
|
|
2
2
|
export{m as a,go as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-QNAPE7OZ.js';import {sd}from'./chunk-VHRTL7LZ.js';import {memo,useId,useMemo}from'react';import {jsx}from'react/jsx-runtime';var m=({chipIndex:i,rowIndex:r,colIndex:t,selectedId:s})=>{let[,e,o,p]=(s??"").split("-");return Number(e)===r&&Number(o)===t&&Number(p)===i};function x({children:i,copyText:r,chipIndex:t,selectionProps:{onClick:s,rowIndex:e,colIndex:o,selectedId:p},...l}){let h=sd(useId(),"status-chip-with-copy"),d=useMemo(()=>m({rowIndex:e,colIndex:o,selectedId:p,chipIndex:t}),[e,o,p,t]);return jsx(a,{...l,id:h,"data-testid":"StatusChipWithCopy",copyText:r,onClick:C=>{s?.(C,t);},isSelected:d,children:i})}var u=memo(x);var M=u;export{m as a,M as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {sd,Hb,Lc}from'./chunk-VHRTL7LZ.js';import {qa,oa,zn}from'./chunk-UXNHJGII.js';import {useId,useState,useCallback,useMemo}from'react';import {useTranslation}from'react-i18next';import {motion,AnimatePresence}from'framer-motion';import f from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var m=styled(f,{shouldForwardProp:o=>!["textColor","bgColor","borderColor","disabled","minWidth","padding","maxWidth","isSelected","disableAnimation"].includes(o)})(({theme:o,isSelected:a,textColor:n=o.palette.text.primary,bgColor:e="#EFF1F2",borderColor:c="#EFF1F2",disabled:s=false,padding:i,minWidth:r,maxWidth:d,disableAnimation:l})=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",height:"18px",padding:i||"0px 8px",borderRadius:"30px",border:`1px solid ${c}`,backgroundColor:e,color:n,cursor:s?"not-allowed":"pointer",opacity:s?.5:1,whiteSpace:"nowrap",fontSize:"11px",minWidth:r||"67px",maxWidth:d||"none",width:"fit-content",overflow:"hidden",textOverflow:d?"ellipsis":"unset",boxSizing:"border-box",...a&&{boxShadow:"white 7px 0px 8px 2px"},...l&&{transition:"none !important",animation:"none !important",transform:"none !important","& *":{transition:"none !important",animation:"none !important",transform:"none !important"}}})),y=styled(f)(()=>({gap:"4px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:1})),k=styled(f)(()=>({position:"absolute",top:0,height:"100%",width:"12px",display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center"}));var q=({children:o,unknownText:a,copyText:n,expandDirection:e="right",chipStyles:c,containerStyles:s,fullWidth:i=false,...r})=>{let d=sd(useId(),"status-chip"),[l,C]=useState(false),{t:g}=useTranslation(),p=r.isSelected,w=p&&n,S=useCallback(x=>{if(x.stopPropagation(),n){C(true),Hb(n);let B=setTimeout(()=>{C(false);},2e3);return ()=>{clearTimeout(B);}}},[n]),b=useMemo(()=>jsx(k,{sx:{...e==="right"&&{right:"8px"},...e==="left"&&{left:"8px"}},children:jsx(motion.img,{initial:{opacity:0,x:-5},animate:{opacity:1,x:0},exit:{opacity:0,x:-2},transition:{duration:.1},onClick:S,src:l?qa:oa,style:{height:12,width:12,objectFit:"contain"}})}),[l,S,e]),v=w&&e==="right",P=w&&e==="left";return o?jsxs(motion.div,{id:d,"data-testid":"StatusChip",style:{position:"relative",...s,...i&&{width:"100%",minWidth:0}},animate:{zIndex:p?3:0},children:[jsx(m,{...r,sx:{visibility:"hidden",pointerEvents:"none",width:i?"100%":"auto"},children:jsx(y,{children:o})}),jsx(motion.div,{style:{position:"absolute",top:0,zIndex:p?3:0,width:i?"100%":"auto",left:e==="right"?0:"unset",right:e==="left"?0:"unset"},transition:{delay:p?0:.3,duration:.2},children:jsx(m,{...r,isSelected:p,sx:{width:i?"100%":"auto"},...c,children:jsxs(motion.div,{layout:"size",style:{display:"flex",gap:"4px",...i&&{maxWidth:"100%",width:"100%"}},animate:{...v&&{paddingRight:12},...P&&{paddingLeft:12}},transition:{delay:p?0:.3,duration:.2},children:[jsx(AnimatePresence,{children:P&&b}),jsx(y,{"data-is-arabic":typeof o=="string"&&Lc(o),children:o}),jsx(AnimatePresence,{children:v&&b})]})})})]}):jsx(m,{...zn,...r,isSelected:false,sx:x=>({borderColor:x.palette.divider,width:i?"100%":"auto"}),children:g(a||"unknown")})},j=q;var et=j;export{et as a};
|