@tap-payments/os-micro-frontend-shared 0.3.41 → 0.3.42-test.1
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-FAAG5CEB.js → chunk-2SCXO6YP.js} +1 -1
- package/build/_chunks/{chunk-MDUFFIGC.js → chunk-2URQZDE3.js} +1 -1
- package/build/_chunks/chunk-3GFFTOEJ.js +1 -0
- package/build/_chunks/{chunk-UFE4H7ZK.js → chunk-3YSH5GAQ.js} +1 -1
- package/build/_chunks/chunk-44FJXCBU.js +1 -0
- package/build/_chunks/{chunk-HKAKP3QF.js → chunk-5H262W7C.js} +1 -1
- package/build/_chunks/{chunk-K5PC6OGJ.js → chunk-5LLYIRKE.js} +1 -1
- package/build/_chunks/{chunk-RYW2OL4X.js → chunk-5PSC3UL2.js} +1 -1
- package/build/_chunks/{chunk-B4LU3SQW.js → chunk-5XSTN2NB.js} +1 -1
- package/build/_chunks/{chunk-NCQAIHN6.js → chunk-6A2HYLVC.js} +1 -1
- package/build/_chunks/{chunk-IBVGFTG7.js → chunk-73QXXW7G.js} +1 -1
- package/build/_chunks/{chunk-BGKYGPNJ.js → chunk-76DB7NZP.js} +1 -1
- package/build/_chunks/{chunk-RPQBJXE3.js → chunk-76RLGCXB.js} +1 -1
- package/build/_chunks/{chunk-IQJE6FPB.js → chunk-7F65Y5XS.js} +1 -1
- package/build/_chunks/{chunk-7I5JB2Q6.js → chunk-7NDET3KO.js} +1 -1
- package/build/_chunks/{chunk-GMEOVJFI.js → chunk-7WVZ5LIV.js} +1 -1
- package/build/_chunks/{chunk-67QXCU2P.js → chunk-B7NAOQDJ.js} +1 -1
- package/build/_chunks/chunk-BBWF2AID.js +1 -0
- package/build/_chunks/{chunk-QBPHRQCC.js → chunk-BHWOSBEZ.js} +1 -1
- package/build/_chunks/{chunk-ETWPWW7A.js → chunk-BSMPUJ6F.js} +1 -1
- package/build/_chunks/{chunk-KE2R76XR.js → chunk-BWJI6M3G.js} +2 -2
- package/build/_chunks/{chunk-7TTGX7LK.js → chunk-CGKODERU.js} +1 -1
- package/build/_chunks/{chunk-KQ4Z3Q4H.js → chunk-CVP4OMUE.js} +1 -1
- package/build/_chunks/{chunk-PQT7FYQN.js → chunk-D7G7T4UL.js} +1 -1
- package/build/_chunks/chunk-DFWEGJSU.js +1 -0
- package/build/_chunks/{chunk-HJ4FEJQP.js → chunk-DIXEPXAV.js} +1 -1
- package/build/_chunks/{chunk-6ZIN2VHL.js → chunk-DKHM6WWP.js} +1 -1
- package/build/_chunks/{chunk-Z4TFJO2W.js → chunk-DL4H27SI.js} +1 -1
- package/build/_chunks/chunk-DQ3G65CN.js +1 -0
- package/build/_chunks/{chunk-A62KPF2H.js → chunk-DSZNSKLZ.js} +1 -1
- package/build/_chunks/{chunk-K7BKPJ5F.js → chunk-E33FS24F.js} +1 -1
- package/build/_chunks/{chunk-DFSWXXN5.js → chunk-EEDQBWZB.js} +2 -2
- package/build/_chunks/{chunk-SLPMPCQO.js → chunk-F34NI7M4.js} +1 -1
- package/build/_chunks/{chunk-XP3FDFYS.js → chunk-FEE3CKYF.js} +1 -1
- package/build/_chunks/{chunk-7NEGNRKN.js → chunk-FJYXUO2F.js} +1 -1
- package/build/_chunks/{chunk-BFFZN7IG.js → chunk-FLIOY2Z5.js} +1 -1
- package/build/_chunks/{chunk-PXCHUTXB.js → chunk-FN4CKJHK.js} +1 -1
- package/build/_chunks/{chunk-7YLO2ZYY.js → chunk-FTKWGSP3.js} +1 -1
- package/build/_chunks/{chunk-264C3QJK.js → chunk-FUHJXMTD.js} +1 -1
- package/build/_chunks/{chunk-KDJHWYHR.js → chunk-G2JGDZGU.js} +1 -1
- package/build/_chunks/{chunk-PSA3VYU2.js → chunk-GE2C6WJW.js} +1 -1
- package/build/_chunks/{chunk-PWA5AT5F.js → chunk-GUCDEF7Q.js} +1 -1
- package/build/_chunks/chunk-GXQZ4NVY.js +2 -0
- package/build/_chunks/{chunk-I5L3DYZN.js → chunk-HH7JTWSS.js} +1 -1
- package/build/_chunks/{chunk-HPG6LYER.js → chunk-HLDB5JGZ.js} +1 -1
- package/build/_chunks/{chunk-AQVAVB4K.js → chunk-IEYPGNXG.js} +1 -1
- package/build/_chunks/{chunk-WHLF4QZJ.js → chunk-IFNPZABF.js} +1 -1
- package/build/_chunks/{chunk-UFUWCT7R.js → chunk-IP65H7PF.js} +1 -1
- package/build/_chunks/chunk-IZDSU4FP.js +1 -0
- package/build/_chunks/{chunk-6OMHHIR5.js → chunk-J6N5ZQLM.js} +1 -1
- package/build/_chunks/{chunk-BQMJMAC2.js → chunk-JYGHVC2E.js} +1 -1
- package/build/_chunks/{chunk-WB2EZ4AQ.js → chunk-KPMSOHZD.js} +1 -1
- package/build/_chunks/{chunk-MTWKS4EM.js → chunk-LFZBBZRD.js} +1 -1
- package/build/_chunks/{chunk-75OUTDIX.js → chunk-MAPHVNOQ.js} +1 -1
- package/build/_chunks/{chunk-RAP5KYNR.js → chunk-MM6G3XC5.js} +1 -1
- package/build/_chunks/{chunk-Y4NH4BVH.js → chunk-MSMLUNXO.js} +1 -1
- package/build/_chunks/chunk-NL7MCKQJ.js +1 -0
- package/build/_chunks/{chunk-OU7SKBN2.js → chunk-NTF3RPVP.js} +1 -1
- package/build/_chunks/{chunk-UDLBWNVK.js → chunk-O3ZIFXAE.js} +1 -1
- package/build/_chunks/{chunk-R63GX4QD.js → chunk-OKKUPLM2.js} +1 -1
- package/build/_chunks/{chunk-HIYL36IO.js → chunk-ORAJTP7J.js} +1 -1
- package/build/_chunks/{chunk-24Z4SVNV.js → chunk-P2SFC3TY.js} +1 -1
- package/build/_chunks/{chunk-HU4ADGUJ.js → chunk-PA3X3VWF.js} +1 -1
- package/build/_chunks/{chunk-3ULHVMLZ.js → chunk-PBV6KCJE.js} +1 -1
- package/build/_chunks/{chunk-ZLPET4JG.js → chunk-PKO3SEX2.js} +1 -1
- package/build/_chunks/{chunk-462ZPKDZ.js → chunk-PKWCA47B.js} +1 -1
- package/build/_chunks/{chunk-4WENIJI2.js → chunk-PMFVGWB7.js} +1 -1
- package/build/_chunks/{chunk-BYKEWDTH.js → chunk-PR2M6EXX.js} +1 -1
- package/build/_chunks/{chunk-3JMCK5ZV.js → chunk-PZU4JQSS.js} +1 -1
- package/build/_chunks/chunk-Q6UIEV6B.js +1 -0
- package/build/_chunks/{chunk-KYQJVJYS.js → chunk-Q7MRDGZN.js} +1 -1
- package/build/_chunks/{chunk-IYIBZOJZ.js → chunk-QKPHXQSZ.js} +1 -1
- package/build/_chunks/{chunk-6FLQVJYC.js → chunk-QRT74F4E.js} +1 -1
- package/build/_chunks/{chunk-LQSV2U2M.js → chunk-R3XNPCGF.js} +1 -1
- package/build/_chunks/{chunk-7YENBSAM.js → chunk-R56E6PYZ.js} +1 -1
- package/build/_chunks/{chunk-42MVBKRY.js → chunk-RCRUQXCA.js} +1 -1
- package/build/_chunks/{chunk-GHBO2N5J.js → chunk-RNIPKLZQ.js} +1 -1
- package/build/_chunks/{chunk-4P55GHV7.js → chunk-RR6AHVX7.js} +1 -1
- package/build/_chunks/{chunk-JIFGSGLK.js → chunk-RYDFALOO.js} +1 -1
- package/build/_chunks/chunk-S5GSQVFD.js +1 -0
- package/build/_chunks/{chunk-CFD4YMQ5.js → chunk-SEFUSSGK.js} +1 -1
- package/build/_chunks/chunk-SJ67XYO5.js +1 -0
- package/build/_chunks/chunk-T2AKTVHY.js +1 -0
- package/build/_chunks/{chunk-NAA6S4QD.js → chunk-TASNI2UQ.js} +1 -1
- package/build/_chunks/{chunk-W2XIAVS7.js → chunk-TENNV2W7.js} +1 -1
- package/build/_chunks/{chunk-NXMTEH2G.js → chunk-TLVTUZUQ.js} +1 -1
- package/build/_chunks/{chunk-OHQFHWAA.js → chunk-TYORU5TX.js} +1 -1
- package/build/_chunks/{chunk-6WBZD2A5.js → chunk-UUGCPISE.js} +1 -1
- package/build/_chunks/{chunk-HUG3GFUD.js → chunk-V3TSE373.js} +1 -1
- package/build/_chunks/{chunk-UWLP24VO.js → chunk-VCS57LAI.js} +1 -1
- package/build/_chunks/{chunk-MGXAGXP2.js → chunk-VE7V5PGM.js} +2 -2
- package/build/_chunks/{chunk-SFU7NS23.js → chunk-VOLTCMKE.js} +1 -1
- package/build/_chunks/{chunk-PDCRN5SE.js → chunk-VUO624JP.js} +1 -1
- package/build/_chunks/{chunk-M54Z67GK.js → chunk-WF5IMUWM.js} +1 -1
- package/build/_chunks/{chunk-VNZEWYUT.js → chunk-WGBRGZXI.js} +1 -1
- package/build/_chunks/{chunk-7UNKAVEX.js → chunk-WI2T5KCG.js} +1 -1
- package/build/_chunks/{chunk-C72BBFMS.js → chunk-WJ4FXQ3O.js} +1 -1
- package/build/_chunks/{chunk-AV3RPL4E.js → chunk-WKZL4MU3.js} +1 -1
- package/build/_chunks/{chunk-WDOEOVVH.js → chunk-WNBVMNBW.js} +1 -1
- package/build/_chunks/{chunk-WDSEBLDP.js → chunk-X2EQYSIA.js} +1 -1
- package/build/_chunks/{chunk-VUCHCD25.js → chunk-X3NKA7ET.js} +1 -1
- package/build/_chunks/{chunk-NO7TS2WN.js → chunk-X5KPIJRH.js} +1 -1
- package/build/_chunks/{chunk-PZKKSGL6.js → chunk-XBPYOIIV.js} +1 -1
- package/build/_chunks/{chunk-LLB7TOQ5.js → chunk-XFU3XZKV.js} +1 -1
- package/build/_chunks/{chunk-7JHIW4H3.js → chunk-XOJJAS5C.js} +1 -1
- package/build/_chunks/{chunk-2W6TCXVT.js → chunk-XSSVFTR5.js} +1 -1
- package/build/_chunks/{chunk-JALMJ6OW.js → chunk-Y5EUGPZ2.js} +1 -1
- package/build/_chunks/{chunk-KD7BJLZ5.js → chunk-YN3MWYP2.js} +1 -1
- package/build/_chunks/chunk-ZBRMGQ64.js +2 -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/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/Toaster/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/ToolbarIcon/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/Window/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/constants/assets.d.ts +4 -0
- package/build/constants/index.js +1 -1
- package/build/hooks/index.js +1 -1
- package/build/index.js +1 -1
- package/build/utils/index.d.ts +1 -0
- package/build/utils/index.js +1 -1
- package/build/utils/localStorage.d.ts +1 -0
- package/build/utils/tempSingletonTest.d.ts +2 -0
- package/package.json +3 -3
- package/build/_chunks/chunk-6H433DZD.js +0 -1
- package/build/_chunks/chunk-FKIQI2VJ.js +0 -1
- package/build/_chunks/chunk-FUZDEBNI.js +0 -1
- package/build/_chunks/chunk-GX5MYILV.js +0 -1
- package/build/_chunks/chunk-HOA25PMX.js +0 -2
- package/build/_chunks/chunk-HS3IN75X.js +0 -1
- package/build/_chunks/chunk-MHSPRJMC.js +0 -1
- package/build/_chunks/chunk-NE6LUZYP.js +0 -1
- package/build/_chunks/chunk-OVVSFIGT.js +0 -1
- package/build/_chunks/chunk-QT7FB6KY.js +0 -2
- package/build/_chunks/chunk-RCWVS44M.js +0 -1
- package/build/_chunks/chunk-TX2OWCL6.js +0 -1
- package/build/_chunks/chunk-WQW3FS52.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Kc}from'./chunk-DFWEGJSU.js';import {Fm}from'./chunk-GXQZ4NVY.js';import {useId}from'react';import f from'@mui/material/Stack';import a from'@mui/material/Box';import d from'@mui/material/Skeleton';import {jsx,jsxs}from'react/jsx-runtime';function h(){let o=Kc(useId(),"default-mf-widget-loader");return jsxs(f,{id:o,"data-testid":"DefaultMFWidgetLoader",height:"100%",borderRadius:"0 0 12px 12px",overflow:"hidden",children:[jsxs(f,{direction:"row",spacing:1,height:"4.1875rem",sx:{pb:"1.2rem",paddingInline:"32px",pt:"10px",background:g=>g.palette.background.transparent[0]},children:[jsx(d,{sx:{bgcolor:"gray.300"},variant:"rounded",width:60,height:31}),jsx(d,{sx:{bgcolor:"gray.300"},variant:"rounded",width:60,height:31}),jsx(d,{sx:{bgcolor:"gray.300"},variant:"rounded",width:60,height:31})]}),jsx(a,{flex:1,bgcolor:"#fff"})]})}var W=4;function x(){let o=Kc(useId(),"reports-mf-widget-loader");return jsx(f,{id:o,"data-testid":"ReportsMFWidgetLoader",height:"100%",borderRadius:"0 0 12px 12px",overflow:"hidden",sx:{padding:"8px 32px"},children:Array.from({length:W}).map((g,u)=>jsx(a,{children:jsxs(f,{direction:"row",spacing:1,sx:{py:1,height:56,borderTop:"1px solid rgb(242, 242, 242)"},children:[jsx(d,{variant:"rounded",width:32,height:32}),jsxs(a,{sx:{display:"flex",flexDirection:"column",gap:"4px"},children:[jsx(d,{width:80,height:12.29}),jsxs(a,{sx:{display:"flex",gap:"4px"},children:[jsx(d,{width:50,height:12.29}),jsx(d,{width:125,height:12.29})]})]})]})},u))})}var F=({appCode:o})=>o===Fm.reports.code||o===Fm.upload.code?jsx(x,{}):jsx(h,{}),c=F;var G=c;export{G as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Kc,hc}from'./chunk-DFWEGJSU.js';import {Cb}from'./chunk-GXQZ4NVY.js';import {useId}from'react';import i from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,Fragment,jsxs}from'react/jsx-runtime';var m=styled(i)(({theme:e})=>({width:"100%",borderRadius:"4px",padding:"4px 8px",display:"flex",alignItems:"center",justifyContent:"flex-start",background:e.palette.grey[400],gap:"8px"})),x=styled(i)(()=>({width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8px"})),f=styled(i)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",color:e.palette.text.primary,cursor:"pointer",gap:"8px"})),u=styled("span")(({theme:e})=>({fontWeight:500,color:e.palette.text.primary,cursor:"pointer",fontSize:"8px"})),y=styled(i)(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:"4px",color:e.palette.text.primary})),I=styled(i)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",background:e.palette.common.white,borderRadius:"4px",border:`1px solid ${e.palette.divider}`})),g=styled(i)(()=>({display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"}));var T=({files:e,disabled:w,sx:C,onRemoveFile:W,getFilePreview:h,renderBrandLogo:v,renderOpenFileInNewTab:P})=>{let b=Kc(useId(),"file-preview");return jsx(Fragment,{children:e?.map((t,s)=>{let a=hc(t)?h(t.file):null,j=hc(t)&&t.file.type.includes("application/pdf"),n=hc(t)?t.file:t;return jsx(m,{id:`${b}-${s}`,"data-testid":"FilePreview",sx:C,children:jsxs(x,{"data-slot":"file-wrapper",children:[jsxs(f,{"data-slot":"file-Content",children:[jsx(I,{"data-slot":"file-icon-wrapper",children:hc(t)&&a?jsx(i,{component:"img",src:a,width:24,height:24,sx:{borderRadius:"50%",objectFit:j?"none":"cover"},onError:k=>{k.currentTarget.src=n.name;}}):v?.(n.id)}),jsxs(y,{"data-slot":"text-wrapper",children:[jsx(u,{"data-slot":"filename",children:n.name}),!hc(t)&&!a&&P?.(n.id)]})]}),!w&&jsx(g,{"data-slot":"close-icon-wrapper",onClick:()=>{W?.(t);},children:jsx(i,{component:"img",src:Cb,width:10,height:10})})]})},s)})})},A=T;export{m as a,x as b,f as c,u as d,y as e,I as f,g,A as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {Kc}from'./chunk-DFWEGJSU.js';import {Ki,j,m as m$1}from'./chunk-GXQZ4NVY.js';import {memo,useId}from'react';import d from'@mui/material/Box';import {jsx}from'react/jsx-runtime';function g({countryCode:o,currencyCode:t,...n}){let l=Kc(useId(),"country-flag");return jsx(d,{...n,id:l,"data-testid":"CountryFlag",component:"img",src:o&&j(o)||t&&m$1(t)||Ki,width:n.width||16,alt:o??t??"flag",loading:"lazy",onError:u=>{u.currentTarget.src=Ki;}})}g.displayName="CountryFlag";var m=memo(g);var h=m;export{h as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-3GFFTOEJ.js';import {rc,Kc,H,Sa}from'./chunk-DFWEGJSU.js';import {zn}from'./chunk-GXQZ4NVY.js';import {useId,useState,useMemo}from'react';import {ResponsiveContainer,AreaChart,Area,Tooltip}from'recharts';import {useTheme}from'@mui/material/styles';import {useTranslation}from'react-i18next';import L from'dayjs';import V from'@mui/material/Box';import {styled,Box,Typography}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var b=styled(Box)(()=>({width:"auto",display:"inline-block",whiteSpace:"nowrap",backgroundColor:"white",padding:"6px",border:"1.5px solid #E6E6E6",borderRadius:"7.5px",backdropFilter:"blur(23.280000686645508px)",boxShadow:"0px 0px 15.52px 0px #4B484729"})),w=styled(Typography)({width:"auto",marginBottom:"4px",fontWeight:500,color:"#4B4847ED",fontSize:"9px",whiteSpace:"nowrap",overflow:"visible"}),K=styled(Typography)({display:"flex",alignItems:"center",gap:"5px",fontWeight:600,color:"#4B4847",fontSize:11,whiteSpace:"nowrap",overflow:"visible",width:"auto"}),B=styled(Box)({display:"flex",alignItems:"center",height:"100%",gap:"2.6px",maxHeight:"19px"}),S=styled(Typography)({fontWeight:500,fontSize:11,lineHeight:"130%",color:"#4B4847",letterSpacing:"-0.14px"});var W=(t,i,r)=>t?.value===void 0||t?.value===null?"":t?.dataKey===zn.AMOUNT?`${Sa(t.value,r).fullAmount}`.trim():`${t.value.toLocaleString()} ${i}`.trim(),$=(t,i,r=0)=>{let a=L(t).add(r,"hour").format(),n=new Date,e=L(a).isSame(n,"year");return H(a,i?void 0:{sameDay:`[Today] ${e?"":"YYYY"}`,nextDay:`[Tomorrow] ${e?"":"YYYY"}`,lastDay:`[Yesterday] ${e?"":"YYYY"}`,sameElse:`MMM DD ${e?"":", YYYY"}`,lastWeek:`MMM DD ${e?"":", YYYY"}`,nextWeek:`MMM DD ${e?"":", YYYY"}`},void 0,void 0,r!==void 0)};var G=({active:t,payload:i,dateRange:r,selectedCurrency:a$1})=>{let{t:n}=useTranslation(),e=L(r?.[0]),l=L(r?.[1]),f=e?.isSame(l,"day");if(t&&i?.length){let o=i[0],m=rc(o?.dataKey,o?.value),y=o?.payload?.date&&$(o?.payload?.date,f,o?.payload?.hour);return jsxs(b,{className:"chart-tooltip",children:[jsx(w,{children:y??o?.payload?.date}),jsxs(K,{children:[o?.dataKey===zn.AMOUNT&&jsxs(B,{children:[jsx(a,{currencyCode:a$1,width:12}),jsx(S,{children:a$1})]}),jsx(V,{children:`${W(o,n(m),a$1)}`})]})]})}return null},x=G;var _=[{dataKey:30},{dataKey:32.9941},{dataKey:39.0471},{dataKey:56.3412},{dataKey:69.3118},{dataKey:87.4706},{dataKey:94.3882},{dataKey:110.406}],q=()=>jsx(ResponsiveContainer,{children:jsxs(AreaChart,{margin:{top:40},data:_,children:[jsx("defs",{children:jsxs("linearGradient",{id:"loadingGradient",x1:"0",y1:"0",x2:"0",y2:"1",gradientUnits:"objectBoundingBox",children:[jsx("stop",{offset:"0.54",stopColor:"rgba(67, 67, 67, 0.035)"}),jsx("stop",{offset:"1",stopColor:"rgba(255, 255, 255, 0)"})]})}),jsx(Area,{dataKey:"dataKey",type:"linear",fill:"url(#loadingGradient)",fillOpacity:1,stroke:"#C2C2C2",strokeWidth:1,strokeLinecap:"round",strokeDasharray:"4 4",activeDot:false})]})}),T=q;var rt=({data:t,dataKey:i,isLoading:r,dateRange:a,selectedCurrency:n})=>{let e=Kc(useId(),"activity-area-chart"),l=useTheme(),[f,o]=useState(false),[m,y]=useState({x:0,y:0}),I=t?.length===0,O=h=>{h.activeCoordinate&&h.isTooltipActive&&y(h.activeCoordinate);},R=useMemo(()=>jsx(x,{position:m,dateRange:a,selectedCurrency:n}),[m,a,n]);return r||I?jsx(T,{}):jsx(ResponsiveContainer,{id:e,"data-testid":"ActivityAreaChart",children:jsxs(AreaChart,{margin:{top:20},data:t,onMouseMove:O,children:[t.length>0&&jsx(Tooltip,{content:R,cursor:{fill:"#A5A8A3",stroke:"#A5A8A3",strokeWidth:1,strokeOpacity:1,stopOpacity:.3,strokeDasharray:"5 5",strokeLinecap:"round",strokeLinejoin:"round"}}),jsx(Area,{dataKey:i,type:"monotone",fill:"#76BB4012",stroke:l.palette.success.dark,activeDot:{r:5,fill:l.palette.success.dark,strokeWidth:2,stroke:"white",cursor:f?"pointer":"default",onMouseOver:()=>o(true),onMouseLeave:()=>o(false)}})]})})},P=rt;var Ft=P;export{x as a,T as b,Ft as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {Kc}from'./chunk-DFWEGJSU.js';import {$n,_n}from'./chunk-GXQZ4NVY.js';import {memo,useId}from'react';import {Checkbox}from'@mui/material';import {jsx}from'react/jsx-runtime';function p(o){let m=Kc(useId(),"checkbox");return jsx(Checkbox,{id:m,"data-testid":"Checkbox",disableRipple:true,sx:r=>({'[data-testid="IndeterminateCheckBoxIcon"]':{fill:r.palette.info.dark,width:"16px !important",height:"16px !important"}}),checkedIcon:o.disabled?$n:_n,...o})}p.displayName="CheckboxInput";var d=memo(p);var u=d;export{u as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Kc}from'./chunk-DFWEGJSU.js';import {memo,useId}from'react';import {Box}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import W from'@mui/material/Accordion';import $ from'@mui/material/AccordionDetails';import T from'@mui/material/AccordionSummary';import {styled}from'@mui/material/styles';function f({sx:o}){return jsx(Box,{component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",transform:"rotate(0deg)",...o},children:jsx("svg",{width:"9",height:"5",viewBox:"0 0 9 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{d:"M0.0501709 0.427246C0.0493864 0.478467 0.0592757 0.529176 0.0784912 0.57666C0.0976579 0.623937 0.125505 0.667471 0.161499 0.703613L3.82556 4.47803C3.86116 4.51465 3.90353 4.54403 3.95056 4.56396C3.99773 4.58391 4.04876 4.59422 4.09998 4.59424C4.15123 4.59424 4.20218 4.58392 4.24939 4.56396C4.29655 4.54401 4.33969 4.51476 4.37537 4.47803L8.03845 0.703613C8.07407 0.667816 8.10232 0.625348 8.12146 0.578613C8.14069 0.531638 8.15017 0.480932 8.14978 0.430176C8.14935 0.379519 8.13942 0.329298 8.11951 0.282715C8.09956 0.236042 8.06999 0.19405 8.03357 0.158691C7.99716 0.123349 7.95384 0.0952198 7.90662 0.0766602C7.8595 0.0582058 7.80878 0.0491929 7.75818 0.050293C7.70763 0.0514427 7.65792 0.0629948 7.61169 0.0834961C7.56537 0.104067 7.52346 0.13358 7.48865 0.17041L4.09998 3.65967L0.711304 0.17041C0.65912 0.115154 0.592066 0.0759001 0.517944 0.059082C0.443585 0.0422622 0.365385 0.0481013 0.294312 0.0756836C0.22324 0.103266 0.162075 0.15178 0.11853 0.214355C0.0750125 0.276905 0.05135 0.351058 0.0501709 0.427246Z",fill:"#20232B",stroke:"#20232B",strokeWidth:"0.1"})})})}f.displayName="AccordionExpandIcon";var i=memo(f);var A="#f2f2f2",G="#fbfbfb",u=styled(W)(({theme:o})=>({overflow:"hidden",border:`1px solid ${A}`,borderWidth:1,borderRadius:o.shape.borderRadius,margin:0,background:o.palette.background.paper,"&:before":{content:"unset"},"&.Mui-expanded":{margin:0}})),g=styled(T)(()=>({background:G,minHeight:"40px",height:"40px",padding:"10px","&.Mui-expanded":{minHeight:"40px",height:"40px"},"& .MuiAccordionSummary-content":{margin:0,display:"flex",flexDirection:"row",alignItems:"center",flexGrow:1,minWidth:0,gap:10},"& .MuiAccordionSummary-expandIconWrapper":{marginLeft:8}})),h=styled($)(()=>({padding:0,borderTop:`1px solid ${A}`}));function C({expanded:o,onChange:I,label:w,content:S,labelStartAdornment:a,labelEndAdornment:p,slotProps:r={},disabled:L=false,expandIcon:B}){let e=Kc(useId()),E=`accordion-${e}`,l=`accordion-content-${e}`,s=`accordion-label-${e}`,{showArrow:m,...P}=r?.label??{},R=m===true||m===void 0,k=jsxs(Fragment,{children:[a!=null&&jsx(Box,{component:"span",sx:{flexShrink:0},children:a}),jsx(Box,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:w}),p!=null&&jsx(Box,{component:"span",sx:{flexShrink:0,marginLeft:"auto"},children:p})]}),v=B??(R?jsx(i,{}):null);return jsxs(u,{id:E,"data-testid":"Accordion",disabled:L,expanded:o,onChange:()=>I(!o),...r.root,children:[jsx(g,{"aria-controls":l,"aria-expanded":o,expandIcon:v,id:s,...P,children:k}),jsx(h,{id:l,role:"region","aria-labelledby":s,...r.content,children:S})]})}C.displayName="Accordion";var b=memo(C);var io=b;
|
|
2
2
|
export{i as a,io as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-GNY2VGGW.js';import {r}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-GNY2VGGW.js';import {r}from'./chunk-DFWEGJSU.js';import F from'react';import {useTranslation}from'react-i18next';import a from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var y="37px",f=styled(a,{shouldForwardProp:o=>o!=="showBackDrop"&&o!=="areTotalRowsNotFillingHeight"&&o!=="sandboxMode"&&o!=="maximized"})(({theme:o,showBackDrop:i,areTotalRowsNotFillingHeight:r,sandboxMode:n,maximized:p})=>({minHeight:y,...!p&&{borderBottomLeftRadius:o.spacing(1.5),borderBottomRightRadius:o.spacing(1.5)},display:"flex",alignItems:"center",border:"none",justifyContent:"space-between",padding:"6px 32px",background:n?o.palette.common.lightOrange:o.palette.grey[300],backdropFilter:"blur(32px)",boxShadow:i?o.shadows[24]:"none",borderTop:r?`1px outset ${o.palette.grey[800]}`:"none",width:"100%",marginTop:"auto",flexShrink:0,cursor:"move"})),u=styled("div")(({theme:o})=>({position:"absolute",top:0,left:0,right:0,height:"1.5px",backgroundColor:o.palette.grey[300],boxShadow:`inset 0 1px 0 0 ${o.palette.grey[300]}`})),d=styled(a)(({theme:o})=>({borderRadius:"37.5px",border:"0.75px solid rgba(242, 242, 242, 0.70)",backgroundColor:o.palette.common.white,opacity:1,paddingInline:o.spacing(1),display:"flex",alignItems:"center",height:24,gap:"7px",maxWidth:"max-content"})),x=styled(a$1)(()=>({fontSize:"9px",fontWeight:400,lineHeight:"10.8px"})),g=styled(a$1)(()=>({fontSize:"10.5px",fontWeight:700,lineHeight:"12.6px"}));styled(a)(()=>({display:"flex",gap:"3px",alignItems:"center"}));styled(a)(()=>({display:"flex",gap:"6px"}));styled("span")(()=>({fontWeight:400}));function R({totalCount:o,showBackDrop:i=false,showSeparator:r$1,sandboxMode:n,maximized:p,selectedCount:m,...T}){let{t:b}=useTranslation();return jsxs(f,{component:"footer","data-testid":"TableFooter",maximized:p??false,sandboxMode:n,showBackDrop:i,areTotalRowsNotFillingHeight:!!r$1,...T,children:[r$1&&jsx(u,{}),m?jsxs(d,{sx:{gap:"6px",cursor:"text"},children:[jsx(x,{children:b("selected")}),jsx(g,{children:r(m)})]}):null,o||o===0?jsxs(d,{sx:{gap:"6px",cursor:"text"},children:[jsx(x,{children:b("count")}),jsx(g,{children:r(o||0)})]}):null]})}var h=F.memo(R);var M=h;export{y as a,h as b,M as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-XBPYOIIV.js';import {Kc,pb}from'./chunk-DFWEGJSU.js';import {useId}from'react';import {motion}from'framer-motion';import {Box,Typography}from'@mui/material';import {styled}from'@mui/material/styles';import I from'@mui/material/Box';import {jsxs,jsx}from'react/jsx-runtime';var u=styled(Box)(({size:t})=>({display:"flex",flexDirection:"column",alignItems:"center",width:t,height:t,position:"relative"})),y=styled(Box)({position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center"}),b=styled(Typography,{shouldForwardProp:t=>t!=="isEmpty"})(({isEmpty:t})=>({fontSize:"17px",fontWeight:700,color:t?"#CFD0D2":"#000"})),D=styled(Typography,{shouldForwardProp:t=>t!=="isEmpty"})(({isEmpty:t})=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:t?"#CFD0D2":"#8D8D94",fontSize:"11px",fontWeight:500,letterSpacing:"0%",textAlign:"right",verticalAlign:"middle"}));var C=()=>jsxs(I,{component:"span",sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"6px"},children:[jsx(a,{width:51,height:16}),jsx(a,{width:84,height:8})]});var v=({value:t,label:k,size:o=172,strokeWidth:p=22,isLoading:l=false})=>{let E=Kc(useId(),"progress-ring"),m=t==null||t==="",F=pb(t||"0"),s=Math.min(Math.max(F??0,0),100),c=(o-p)/2,n=2*Math.PI*c,r=o/2;return jsxs(u,{id:E,"data-testid":"ProgressRing",size:o,children:[jsxs("svg",{width:o,height:o,viewBox:`0 0 ${o} ${o}`,style:{position:"absolute",top:0,left:0},children:[jsx("defs",{children:jsxs("linearGradient",{id:"progressGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[jsx("stop",{offset:"0.67%",stopColor:"#3DA6E1"}),jsx("stop",{offset:"98.91%",stopColor:"#147DC5"})]})}),jsx("circle",{cx:r,cy:r,r:c,stroke:"#F3F3F3",strokeWidth:p,fill:"transparent"}),jsx(motion.circle,{cx:r,cy:r,r:c,stroke:"url(#progressGradient)",strokeWidth:p,fill:"transparent",strokeLinecap:"round",strokeDasharray:n,strokeDashoffset:n,transform:`rotate(-90 ${r} ${r})`,animate:{strokeDashoffset:l?n:n-n*s/100},transition:{duration:1,ease:"easeOut"}})]}),jsxs(y,{children:[jsx(b,{isEmpty:m,children:l?jsx(C,{}):m?"----":jsxs(motion.span,{initial:{opacity:0},animate:{opacity:1},transition:{ease:"easeOut",duration:.5},children:[Number.isInteger(s)?s:s.toFixed(1),"%"]})}),!l&&jsx(D,{isEmpty:m,children:k})]})]})},T=v;var U=T;export{U as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-VOLTCMKE.js';import {a as a$3}from'./chunk-MM6G3XC5.js';import {a}from'./chunk-GNY2VGGW.js';import {a as a$1}from'./chunk-44FJXCBU.js';import {Kc}from'./chunk-DFWEGJSU.js';import {Nc}from'./chunk-GXQZ4NVY.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=Kc(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:Nc,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 +1 @@
|
|
|
1
|
-
import {c as c$2}from'./chunk-K5PC6OGJ.js';import {c,d}from'./chunk-7I5JB2Q6.js';import {a,c as c$1,d as d$1}from'./chunk-NO7TS2WN.js';import {b,a as a$1}from'./chunk-2W6TCXVT.js';import {Jc,Ga}from'./chunk-WQW3FS52.js';import {ra,Wj,Xj,nh,Aj,A,ed,Id,Hd,qa,oa,pa}from'./chunk-HOA25PMX.js';import ho,{memo,createContext,useState,useRef,useId,useMemo,useEffect,useCallback,useContext}from'react';import {styled,Popover,Input,Typography,Box,Dialog}from'@mui/material';import R from'@uiw/react-json-view';import {motion,AnimatePresence}from'framer-motion';import {Resizable}from're-resizable';import jo from'react-draggable';import yo from'@mui/material/Box';import {useTranslation}from'react-i18next';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {styled as styled$1}from'@mui/material/styles';var I=37,Re="32px",J=545;styled(Popover)(({theme:e})=>({backgroundColor:e.palette.background.default,boxShadow:e.shadows[21],"& .MuiPaper-root":{borderRadius:"12px"}}));var go=44,Ie={"--w-rjv-color":"#9cdcfe","--w-rjv-key-string":"#357fb9","--w-rjv-background-color":"#ffffff","--w-rjv-line-color":"#ffffff","--w-rjv-arrow-color":"#116e6bed","--w-rjv-edit-color":"#9cdcfe","--w-rjv-info-color":"#9c9c9c7a","--w-rjv-update-color":"#FFE20B","--w-rjv-copied-color":"#9cdcfe","--w-rjv-copied-success-color":"#28a745","--w-rjv-curlybraces-color":"#000000","--w-rjv-colon-color":"#000000","--w-rjv-brackets-color":"#000000","--w-rjv-quotes-color":"#9cdcfe","--w-rjv-quotes-string-color":"#c27c46","--w-rjv-type-string-color":"#c27c46","--w-rjv-type-int-color":"#956ea5","--w-rjv-type-float-color":"#956ea5","--w-rjv-type-bigint-color":"#956ea5","--w-rjv-type-boolean-color":"#956ea5","--w-rjv-type-date-color":"#956ea5","--w-rjv-type-url-color":"#3b89cf","--w-rjv-type-null-color":"#956ea5","--w-rjv-type-nan-color":"#956ea5","--w-rjv-type-undefined-color":"#956ea5",padding:"1rem",height:`calc(100% - ${go+I}px`,overflow:"auto"},gt={...Ie,background:"transparent","--w-rjv-line-color":"transparent"},ht=styled("button")(({theme:e})=>({padding:"0rem",borderRadius:"0.25rem",backgroundColor:e.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",gap:"0.25rem",color:e.palette.text.primary,fontSize:"0.625rem",fontWeight:e.typography.fontWeightBold,outline:"none",cursor:"pointer",border:`1px solid ${e.palette.grey[100]}`,"&:hover":{boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark};`},position:"relative",overflow:"hidden",transition:"all 0.2s ease-in-out",width:"24px",height:"24px",flexShrink:0})),Je=styled("button")(({theme:e})=>({outline:"none",cursor:"pointer",border:"1px solid transparent","&:hover":{boxShadow:e.shadows[8]},borderRadius:"0.25rem",position:"relative",backgroundColor:e.palette.background.transparent,display:"inline-flex",alignItems:"center",justifyContent:"center"}));styled(Input)(({theme:e})=>({border:`1px solid ${e.palette.grey[100]}`,borderRadius:"0.25rem",padding:"0.375rem",fontSize:"0.625rem",outline:"none",width:"100%",maxWidth:"150px",height:"1.5rem",backgroundColor:e.palette.background.paper,"&:focus":{border:`1px solid ${e.palette.info.dark}`}}));var ke=styled(Typography)(()=>({border:"1px solid rgba(242, 242, 242, 0.70);",display:"inline-flex",height:"24px",padding:"0px 8px",justifyContent:"center",alignItems:"center",borderRadius:"37.5px",backgroundColor:"#fff"})),Be=styled(Box,{shouldForwardProp:e=>!["isMaximized","isScrollingRequest","isRequestShown"].includes(e)})(({isScrollingRequest:e,isMaximized:t,isRequestShown:i,theme:o})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:"4px",paddingBlock:"0px",paddingInlineStart:"12px",paddingInlineEnd:"12px",position:"sticky",left:0,right:0,top:0,background:"#fff",zIndex:5,...e&&{boxShadow:o.shadows[23]},...t&&{paddingTop:Re,transition:"padding 0.3s ease-in-out",...i&&{width:"50%"}}})),Te=styled(Box,{shouldForwardProp:e=>!["isMaximized","isRequestShown"].includes(e)})(({isMaximized:e,isRequestShown:t})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:"8px",height:I,position:"fixed",bottom:0,right:0,left:e?"50vw":0,...!t&&{left:0}})),Pe=styled(Box)(()=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",paddingBlock:"10px",paddingInlineStart:"8px",paddingInlineEnd:"0px"})),Ee=styled(Box)(()=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"4px",paddingBlock:"10px",paddingInlineStart:"0px",paddingInlineEnd:"12px"})),xt=styled(motion.div,{shouldForwardProp:e=>!["isRequestShown","isMaximized"].includes(e)})(({isRequestShown:e,isMaximized:t})=>({width:"100%",height:"100%",overflowY:"auto",overflowX:"hidden",background:"#fff",zIndex:20,position:"relative",display:"flex",flexDirection:"column",borderBottomRightRadius:"12px",borderBottomLeftRadius:e?0:"12px",...t&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,height:"100vh"}}));styled(motion.div,{shouldForwardProp:e=>!["isMaximized","currentRequestWidth"].includes(e)})(({isMaximized:e,currentRequestWidth:t})=>({backgroundColor:"#E7E7E7B2",backdropFilter:"blur(12px)",height:e?"100vh":"100%",overflowY:"auto",overflowX:"hidden",position:"absolute",width:e?"100vw":t,zIndex:19,display:"flex",flexDirection:"column",borderBottomLeftRadius:"12px"}));styled(Box,{shouldForwardProp:e=>!["isMaximized","currentHeight"].includes(e)})(({isMaximized:e,currentHeight:t})=>({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",height:e?`calc(100vh - ${I}px)`:(t||J)-I+5,background:"transparent",position:"fixed",width:"100%"}));var yt=styled(Box)(()=>({position:"fixed",width:"100%",background:"transparent",height:"100%"})),wt=styled("span")(()=>({color:"#032F62"})),bt=styled("span")(()=>({color:"#357fb9"}));function bo({onClick:e,icon:t,label:i,disableAnimation:o,...n}){let[s,l]=ho.useState(false),{t:d}=useTranslation();return jsxs(ht,{...n,onClick:u=>{e?.(u),!o&&(l(true),setTimeout(()=>{l(false);},2e3));},children:[jsxs(yo,{sx:{width:"16px",display:"flex",overflow:"hidden",justifyContent:"center",alignItems:"center"},children:[jsx(AnimatePresence,{mode:"wait",children:s&&jsx(motion.img,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,transition:{duration:.1}},transition:{duration:.4},src:ra,alt:"icon"},"id-icon")}),jsx(AnimatePresence,{mode:"wait",children:!s&&jsx(motion.img,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,transition:{duration:.1}},transition:{duration:.4},src:t,alt:"icon"},"id-icon")})]}),i&&jsxs(Fragment,{children:[jsx(AnimatePresence,{children:s&&jsx(motion.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,position:"absolute"},transition:{duration:.4},children:d("copied")})}),jsx(AnimatePresence,{children:!s&&jsx(motion.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,position:"absolute",width:"53px"},transition:{duration:.4},children:i})})]})]})}var St=memo(bo);var H=St;var vt=styled$1("div")(()=>({display:"flex",alignItems:"center",position:"relative",flexShrink:0,width:"24px",height:"24px"})),Ct=styled$1("button")(({theme:e,isActive:t})=>({width:"24px",height:"24px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",border:`1px solid ${t?e.palette.info.dark:e.palette.grey[100]}`,backgroundColor:e.palette.background.paper,cursor:"pointer",outline:"none",padding:0,position:"relative",zIndex:11,transition:"all 0.2s ease-in-out","&:hover":{boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark}`}})),Rt=styled$1(motion.div)(()=>({position:"absolute",right:0,top:0,height:"24px",display:"flex",alignItems:"center",zIndex:20,background:"transparent"})),It=styled$1(motion.input)(({theme:e})=>({width:"177px",height:"24px",borderRadius:"4px",color:e.palette.text.primary,fontSize:"10px",outline:0,background:e.palette.background.paper,boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark}`,paddingLeft:"8px",boxSizing:"border-box","::placeholder":{color:"#D5D5D5"}})),Oe={position:"absolute",top:"50%",transform:"translateY(-50%)",zIndex:2,userSelect:"none"},Jt={...Oe,background:"none",border:"none",padding:0,margin:0,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",outline:"none","&:disabled":{opacity:.3,cursor:"default"}},kt=styled$1("button")(()=>({...Jt,right:53})),Bt=styled$1("button")(()=>({...Jt,right:39})),Tt=styled$1(motion.img)(()=>({...Oe,right:24,width:10,height:10,cursor:"pointer"})),Pt=styled$1(motion.img)(()=>({...Oe,right:8,width:11,height:11,cursor:"default"})),Ve=styled$1("img")(()=>({width:10,height:10})),Et=styled$1("img")(()=>({width:12,height:12})),Ht=styled$1("span")(({theme:e})=>({position:"absolute",right:67,top:"50%",transform:"translateY(-50%)",fontSize:"9px",lineHeight:1,color:e.palette.text.secondary,whiteSpace:"nowrap",userSelect:"none",zIndex:2,pointerEvents:"none"}));function Jo({value:e,onChange:t,currentIndex:i,totalCount:o,onPrev:n,onNext:s,onOpen:l,placeholder:d="Search..."}){let[p,u]=useState(false),w=useRef(null),S=e.trim().length>0,k=o>0,a=S,N=()=>{l?.(),u(true),requestAnimationFrame(()=>w.current?.focus());},f=()=>{t(""),u(false);};return jsxs(vt,{children:[jsx(AnimatePresence,{children:p&&jsxs(Rt,{initial:{clipPath:"inset(0 0 0 100%)",opacity:0},animate:{clipPath:"inset(0 0 0 0%)",opacity:1},exit:{clipPath:"inset(0 0 0 100%)",opacity:0},transition:{duration:.22,ease:[.4,0,.2,1]},children:[jsx(It,{ref:w,initial:false,animate:{paddingRight:a?"98px":"24px"},transition:{duration:.15},placeholder:d,value:e,onChange:v=>t(v.target.value),onKeyDown:v=>{v.key==="Enter"&&(v.shiftKey?n():s()),v.key==="Escape"&&f();},onBlur:()=>{S||u(false);}}),a&&jsx(kt,{onClick:n,disabled:!k,title:"Previous match (Shift+Enter)",children:jsx(Ve,{src:Wj,alt:"prev"})}),a&&jsx(Bt,{onClick:s,disabled:!k,title:"Next match (Enter)",children:jsx(Ve,{src:Xj,alt:"next"})}),a&&jsx(Tt,{src:nh,alt:"clear",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:f}),jsx(Pt,{src:Aj,alt:"search",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),a&&jsx(Ht,{children:k?`${i+1}/${o}`:"0/0"})]},"input-area")}),jsx(AnimatePresence,{children:!p&&jsx(motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.15},children:jsx(Ct,{isActive:false,onClick:N,title:"Search",children:jsx(Et,{src:A,alt:"search"})})})})]})}var K=memo(Jo);function Mt(e,t){let i=[],o=t.length,n=0,s=e.indexOf(t,n);for(;s!==-1;){let l=s+o;i.push([s,l]),n=l,s=e.indexOf(t,n);}return i}var ko={padding:0,outline:"none"};function Wt({text:e,queryLength:t,ranges:i,idPrefix:o}){let n=[],s=0;return i.forEach(([l,d],p)=>{l>s&&n.push(e.slice(s,l)),n.push(jsx("mark",{style:ko,children:e.slice(l,l+t)},`${o}-${p}`)),s=d;}),s<e.length&&n.push(e.slice(s)),jsx(Fragment,{children:n})}function W({text:e,query:t}){let i=useId(),o=useMemo(()=>t.trim().toLowerCase(),[t]),n=useMemo(()=>{if(!o)return e;let s=e.toLowerCase(),l=Mt(s,o);return l.length===0?e:jsx(Wt,{text:e,queryLength:t.length,ranges:l,idPrefix:i})},[e,t.length,o,i]);return jsx(Fragment,{children:n})}function re(e,t){return e.toLowerCase().includes(t)}function ie(e){return e.trim().toLowerCase()}function se(e){let t=ie(e);return (i,{keyName:o})=>{if(!t||!o)return;let n=String(o);if(re(n,t))return jsx(bt,{children:jsx(W,{text:String(o),query:e})})}}function ae(e){let t=ie(e);return (i,{value:o})=>{if(!t)return;let n=String(o??"");if(re(n,t))return jsxs(wt,{children:['"',jsx(W,{text:String(o??""),query:e}),'"']})}}function Vo({title:e,onClose:t,onMaximize:i,maximized:o=false,id:n,onMouseHover:s,onMouseLeave:l,onRequestClick:d$2,isRequestExpanded:p=false,showRequestIcon:u=false,isHovered:w=false}){return jsx(c,{id:n,maximized:o||false,children:jsx(d,{isHovered:true,onMouseEnter:s,onMouseLeave:l,isMaximized:o,title:e,icon:ed,leftActions:jsxs(Fragment,{children:[jsx(a,{onClick:t}),jsx(c$1,{isMaximized:o,onClick:i}),u&&jsx(d$1,{onClick:d$2,isExpanded:p,isHovered:w,children:"Request"})]})})})}var jt=memo(Vo);var Me=jt;var Ft="#FFE20B";function le(e,t){let[i,o]=useState(0),[n,s]=useState(0);useEffect(()=>{if(!t.trim()){s(0),o(0);return}let p=setTimeout(()=>{let u=e.current?.querySelectorAll("mark")??[];s(u.length),o(0);},50);return ()=>clearTimeout(p)},[t,e]),useEffect(()=>{if(!e.current||!t.trim())return;let p=Array.from(e.current.querySelectorAll("mark"));p.forEach((u,w)=>{let S=w===i;u.style.backgroundColor=S?Ft:"transparent",u.style.outline=S?`1px solid ${Ft}`:"none",u.style.borderRadius="2px";}),p[i]?.scrollIntoView({behavior:"smooth",block:"nearest"});},[i,n,t,e]);let l=useCallback(()=>{n!==0&&o(p=>(p+1)%n);},[n]),d=useCallback(()=>{n!==0&&o(p=>(p-1+n)%n);},[n]);return {currentIndex:i,totalCount:n,goNext:l,goPrev:d}}function Kt(e,t){return e==null?String(e).includes(t):typeof e=="string"?e.toLowerCase().includes(t):typeof e=="number"||typeof e=="boolean"?String(e).includes(t):false}function $t(e,t){if(Array.isArray(e)){let i=e.map(o=>$t(o,t)).filter(o=>o!=null);return i.length>0?i:null}return typeof e=="object"&&e!==null?Gt(e,t):Kt(e,t)?e:null}function Gt(e,t){let i={};for(let[o,n]of Object.entries(e))if(o.toLowerCase().includes(t))i[o]=n;else if(typeof n=="object"&&n!==null){let s=$t(n,t);s!==null&&(i[o]=s);}else Kt(n,t)&&(i[o]=n);return Object.keys(i).length>0?i:null}function ze(e,t){return t.trim()?Gt(e,t.toLowerCase()):e}var G=400,L=.5;function Y({index:e,json:t,requestJson:i={},isWindowMinimized:o,windowOrder:n,onClose:s,onJsonRequestOpen:l,onJsonSearch:d,onJsonCopy:p,onJsonIdCopy:u,onJsonNodesMinimize:w,onJsonNodesMaximize:S}){let k=Jc(useId(),"json-viewer"),[a,N]=useState(false),[f,O]=useState(false),[V,M]=useState(false),[v,qe]=useState(false),[je,eo]=useState({width:0,height:0}),[ue,z]=useState(true),[g,to]=useState(false),[fe,oo]=useState(true),[no,De]=useState(false),[Q,Le]=useState(G),[B,ro]=useState(""),[T,io]=useState(""),_e=useRef(null),Fe=useRef(null),U=le(_e,B),Z=le(Fe,T),me=useRef(),{onMouseEnter:so,onMouseLeave:ao,isHovered:lo}=b(),{height:ge,width:_}=a$1(),[Ke,po]=useState({x:_/2+G/4-e*20,y:ge/2-J/2+e*30}),ee=useRef(),co=useMemo(()=>Object.keys(t)?.length,[t]),$e=Ga(),P=Number(ee.current?.state?.width)||G,Ge=c=>{setTimeout(()=>{navigator.clipboard.writeText(c||"").then(()=>{});},10);},Ye=useMemo(()=>Object.keys(i)?.length,[i]),Xe=useMemo(()=>ze(t,B),[t,B]),Qe=useMemo(()=>ze(i,T),[i,T]);return useEffect(()=>{if(me.current&&clearTimeout(me.current),!g){me.current=setTimeout(()=>{Le(P);},L*1e3);return}Le(P);},[g,P]),jsx(jo,{disabled:a,handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]',defaultPosition:{x:_/2-G/4,y:ge/2-J/2},position:{x:_-Ke.x,y:Ke.y},onStop:(c,m)=>{po({x:_-m.x,y:m.y});},bounds:{top:10},children:jsx(Dialog,{id:k,"data-testid":"JSONViewer",disableEnforceFocus:true,sx:{backgroundColor:"transparent",zIndex:(n||0)+3+(a?1:0),...o&&{display:"none"},transform:"translate(180px, 14px)",...!a&&{width:$e?je?.width||Q:"fit-content",height:$e?je?.height||J:"fit-content"},...a&&{transform:"none !important"}},PaperProps:{style:{margin:0,maxHeight:"100%",maxWidth:"none",background:"transparent",width:f?"fit-content":Q,height:f?"fit-content":J,...a&&{width:"100%",height:"100%"},position:"relative"}},onClose:()=>{N(false),z(true),setTimeout(()=>{z(false);},L*1e3);},open:true,hideBackdrop:true,fullScreen:a,"aria-labelledby":"draggable-dialog-title",children:jsx(Resizable,{enable:{left:false,right:true,bottomRight:true,bottom:true},maxHeight:ge-40,maxWidth:_,minWidth:a?"100vw":Q,minHeight:a?"100vh":"300px",ref:c=>{ee.current=c;},onResizeStart:()=>{z(true);},onResizeStop:()=>{z(false);},onResize:(c,m,A)=>{O(true),eo({width:A.offsetWidth,height:A.offsetHeight});},defaultSize:{width:Q,height:J},style:{background:"transparent",...a&&{height:"100% !important",width:"100% !important",flex:1},...a&&{position:"relative"}},children:jsxs(yt,{children:[jsx(motion.div,{style:{...a&&{height:Re,position:"fixed",zIndex:1e3}},animate:{width:g?P*2:P,...a&&{width:"100vw"},...!a&&{transform:`translateX(${g?-P:0}px)`}},transition:{duration:L,...ue&&{duration:0}},children:jsx(Me,{title:g?"JSON Request & Response":"JSON Response",onClose:()=>s(),onMaximize:()=>{N(c=>!c),z(true),setTimeout(()=>{z(false);},L*1e3);},isHovered:lo,onMouseHover:so,onMouseLeave:ao,maximized:a,id:"draggable-dialog-title",onRequestClick:()=>{to(c=>!c),z(false),g||(l?.(),ee.current?.updateSize({width:G,height:J}));},isRequestExpanded:g,showRequestIcon:!!Ye})}),jsxs(Box,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",height:a?`calc(100vh - ${I}px)`:(Number(ee.current?.state?.height)||J)-I+5,background:"transparent",position:"fixed",width:"100%"},children:[jsx(AnimatePresence,{children:g&&jsxs(motion.div,{initial:{left:a?"50vw":0,...a&&{position:"relative",left:"-50vw"}},animate:{left:a?"50vw":-P,...a&&{position:"relative",left:"0"},...!g&&{left:0}},exit:{left:a?"50vw":0,...a&&{position:"relative",left:"0"}},transition:{duration:L,...ue&&{duration:0}},ref:Fe,style:{flex:1,backgroundColor:"#E7E7E7B2",backdropFilter:"blur(12px)",height:a?"100vh":"100%",overflowY:"auto",position:"absolute",width:a?"100vw":P,zIndex:19,display:"flex",flexDirection:"column",borderBottomLeftRadius:"12px"},onScroll:()=>{De(true),setTimeout(()=>{De(false);},2e3);},children:[jsxs(Be,{isMaximized:a,isScrollingRequest:no,sx:{background:"#E7E7E7B2"},isRequestShown:g,children:[jsx(Ee,{children:jsx(ke,{variant:"subtitle1",children:"API Request"})}),jsxs(Pe,{children:[jsx(K,{value:T,onChange:io,onOpen:()=>d?.(),currentIndex:Z.currentIndex,totalCount:Z.totalCount,onPrev:Z.goPrev,onNext:Z.goNext}),jsx(H,{disableAnimation:true,onClick:()=>{fe?S?.():w?.(),oo(c=>!c);},icon:fe?Id:Hd}),jsx(H,{onClick:()=>{p?.(),navigator.clipboard.writeText(JSON.stringify(t)).then(()=>{});},icon:qa}),jsx(H,{onClick:()=>{u?.(),navigator.clipboard.writeText(t?.id||"").then(()=>{});},icon:oa})]})]}),T.trim()&&Qe===null?jsx(Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,height:"100%"},children:jsx(Typography,{variant:"body2",sx:{fontSize:"0.75rem",color:"text.secondary"},children:"No Data Found"})}):jsxs(R,{value:Qe??i,style:gt,displayDataTypes:false,collapsed:T.trim()?void 0:fe?1:void 0,onCopied:(c,m)=>{typeof m=="string"&&Ge(m);},enableClipboard:false,children:[jsx(R.String,{render:ae(T)}),jsx(R.KeyName,{render:se(T)}),jsx(R.CountInfo,{render:(c,{keyName:m})=>{if(!m)return jsx("span",{})}}),jsx(R.Copied,{render:({"data-copied":c,style:m,onClick:A},{keyName:he})=>he?jsxs(Je,{style:m,onClick:xe=>{A?.(xe);},children:[jsx(AnimatePresence,{children:c&&jsx(motion.img,{style:{height:"14px",width:"14px"},initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:ra,alt:"icon"},"id-icon")}),jsx(AnimatePresence,{children:!c&&jsx(motion.img,{style:{height:"14px",width:"14px"},initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:pa,alt:"icon"},"id-icon")})]}):jsx("span",{})})]}),jsx(AnimatePresence,{children:g&&jsx(Te,{sx:{flex:1,height:I,left:0},children:jsx(c$2,{sx:{paddingLeft:"12px",borderBottomRightRadius:"0",background:"#f8f9fb",flex:1},totalCount:Ye})})})]})}),jsxs(xt,{ref:_e,isMaximized:a,isRequestShown:g,style:{left:0,maxHeight:"100vw"},initial:{...a&&{width:"100vw",left:0}},animate:{...a&&{position:"absolute",left:g?"50vw":"0"}},transition:{duration:L,...ue&&{duration:0}},onScroll:()=>{qe(true),setTimeout(()=>{qe(false);},2e3);},children:[jsxs(Be,{isMaximized:a,isScrollingRequest:v,isRequestShown:g,children:[jsx(Ee,{children:jsx(ke,{variant:"subtitle1",children:"API Response"})}),jsxs(Pe,{children:[jsx(K,{value:B,onChange:ro,onOpen:()=>d?.(),currentIndex:U.currentIndex,totalCount:U.totalCount,onPrev:U.goPrev,onNext:U.goNext}),jsx(H,{disableAnimation:true,onClick:()=>{V?S?.():w?.(),M(c=>!c);},icon:V?Id:Hd}),jsx(H,{onClick:()=>{p?.(),navigator.clipboard.writeText(JSON.stringify(t,null,2)).then(()=>{});},icon:qa}),jsx(H,{onClick:()=>{u?.(),navigator.clipboard.writeText(t?.id||"").then(()=>{});},icon:oa})]})]}),B.trim()&&Xe===null?jsx(Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,height:"100%"},children:jsx(Typography,{variant:"body2",sx:{fontSize:"0.75rem",color:"text.secondary"},children:"No Data Found"})}):jsxs(R,{value:Xe??t,style:Ie,displayDataTypes:false,collapsed:B.trim()?void 0:V?1:void 0,onCopied:(c,m)=>{typeof m=="string"&&Ge(m);},children:[jsx(R.String,{render:ae(B)}),jsx(R.KeyName,{render:se(B)}),jsx(R.CountInfo,{render:(c,{keyName:m})=>{if(!m)return jsx("span",{})}}),jsx(R.Copied,{render:({"data-copied":c,style:m,onClick:A},{keyName:he})=>he?jsxs(Je,{style:m,onClick:xe=>{A?.(xe);},children:[jsx(AnimatePresence,{children:c&&jsx(motion.img,{style:{height:"14px",width:"14px"},initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:ra,alt:"icon"},"id-icon")}),jsx(AnimatePresence,{children:!c&&jsx(motion.img,{style:{height:"14px",width:"14px"},initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:pa,alt:"icon"},"id-icon")})]}):jsx("span",{})})]}),jsx(Te,{sx:{flex:1,height:I},children:jsx(c$2,{sx:{borderBottomLeftRadius:g?0:"12px",background:"#f8f9fb",flex:1},totalCount:co})})]})]})]})})})})}var ce=createContext({jsonViewerList:[],handleJsonViewerDialogOpen:()=>{},handleWindowMinimize:()=>{},handleWindowOrder:()=>{},registerJsonViewerEvents:()=>{}});var Qt=({list:e,events:t,onClose:i,isWindowMinimized:o,windowOrder:n})=>e?.length?jsx(Fragment,{children:e.map((s,l)=>jsx(Y,{index:l,...t,...s,onClose:()=>{i(l);},isWindowMinimized:o,windowOrder:n},s.json.id))}):null;var Fo=({children:e})=>{let[t,i]=useState([]),[o,n]=useState(false),[s,l]=useState(1),d=useRef({}),p=useCallback(f=>{if(t.length===7){alert("Maximum allowed active Json Viewer is 7 per table.");return}if(t.some(v=>v.json.id===f.json.id))return;let O=structuredClone(f.json),V=O.request_body,M={...f,json:O,requestJson:f.requestJson||V||void 0};delete M.json.request_body,i(v=>[...v,M]);},[t]),u=useCallback(f=>{i(O=>O.filter((V,M)=>f!==M));},[]),w=useCallback(f=>{n(f);},[]),S=useCallback(f=>{l(f);},[]),k=useCallback(f=>{d.current=f;},[]),a=useMemo(()=>({onJsonRequestOpen:()=>d.current.onJsonRequestOpen?.(),onJsonSearch:()=>d.current.onJsonSearch?.(),onJsonCopy:()=>d.current.onJsonCopy?.(),onJsonIdCopy:()=>d.current.onJsonIdCopy?.(),onJsonNodesMinimize:()=>d.current.onJsonNodesMinimize?.(),onJsonNodesMaximize:()=>d.current.onJsonNodesMaximize?.()}),[]),N=useMemo(()=>({jsonViewerList:t,handleJsonViewerDialogOpen:p,handleWindowMinimize:w,handleWindowOrder:S,registerJsonViewerEvents:k}),[t,p,w,S,k]);return jsxs(ce.Provider,{value:N,children:[e,jsx(Qt,{list:t,events:a,onClose:u,isWindowMinimized:o,windowOrder:s})]})};var Yo=({isWindowMinimized:e,windowOrder:t,...i})=>{let{handleJsonViewerDialogOpen:o,handleWindowMinimize:n,handleWindowOrder:s,registerJsonViewerEvents:l}=useContext(ce),d=useCallback(()=>{n(e);},[n,e]),p=useCallback(()=>{s(t);},[s,t]);return useEffect(()=>{p();},[p]),useEffect(()=>{d();},[d]),useEffect(()=>{l(i);},[l,i]),{handleJsonViewerDialogOpen:o}};var ti=Y;export{H as a,K as b,W as c,Me as d,le as e,ce as f,Qt as g,Fo as h,Yo as i,ti as j};
|
|
1
|
+
import {c as c$2}from'./chunk-5LLYIRKE.js';import {a,c as c$1,d as d$1}from'./chunk-X5KPIJRH.js';import {c,d}from'./chunk-7NDET3KO.js';import {b,a as a$1}from'./chunk-XSSVFTR5.js';import {Kc,Ha}from'./chunk-DFWEGJSU.js';import {ra,_j,$j,rh,Ej,A,ed,Id,Hd,qa,oa,pa}from'./chunk-GXQZ4NVY.js';import ho,{memo,createContext,useState,useRef,useId,useMemo,useEffect,useCallback,useContext}from'react';import {styled,Popover,Input,Typography,Box,Dialog}from'@mui/material';import R from'@uiw/react-json-view';import {motion,AnimatePresence}from'framer-motion';import {Resizable}from're-resizable';import jo from'react-draggable';import yo from'@mui/material/Box';import {useTranslation}from'react-i18next';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {styled as styled$1}from'@mui/material/styles';var I=37,Re="32px",J=545;styled(Popover)(({theme:e})=>({backgroundColor:e.palette.background.default,boxShadow:e.shadows[21],"& .MuiPaper-root":{borderRadius:"12px"}}));var go=44,Ie={"--w-rjv-color":"#9cdcfe","--w-rjv-key-string":"#357fb9","--w-rjv-background-color":"#ffffff","--w-rjv-line-color":"#ffffff","--w-rjv-arrow-color":"#116e6bed","--w-rjv-edit-color":"#9cdcfe","--w-rjv-info-color":"#9c9c9c7a","--w-rjv-update-color":"#FFE20B","--w-rjv-copied-color":"#9cdcfe","--w-rjv-copied-success-color":"#28a745","--w-rjv-curlybraces-color":"#000000","--w-rjv-colon-color":"#000000","--w-rjv-brackets-color":"#000000","--w-rjv-quotes-color":"#9cdcfe","--w-rjv-quotes-string-color":"#c27c46","--w-rjv-type-string-color":"#c27c46","--w-rjv-type-int-color":"#956ea5","--w-rjv-type-float-color":"#956ea5","--w-rjv-type-bigint-color":"#956ea5","--w-rjv-type-boolean-color":"#956ea5","--w-rjv-type-date-color":"#956ea5","--w-rjv-type-url-color":"#3b89cf","--w-rjv-type-null-color":"#956ea5","--w-rjv-type-nan-color":"#956ea5","--w-rjv-type-undefined-color":"#956ea5",padding:"1rem",height:`calc(100% - ${go+I}px`,overflow:"auto"},gt={...Ie,background:"transparent","--w-rjv-line-color":"transparent"},ht=styled("button")(({theme:e})=>({padding:"0rem",borderRadius:"0.25rem",backgroundColor:e.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",gap:"0.25rem",color:e.palette.text.primary,fontSize:"0.625rem",fontWeight:e.typography.fontWeightBold,outline:"none",cursor:"pointer",border:`1px solid ${e.palette.grey[100]}`,"&:hover":{boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark};`},position:"relative",overflow:"hidden",transition:"all 0.2s ease-in-out",width:"24px",height:"24px",flexShrink:0})),Je=styled("button")(({theme:e})=>({outline:"none",cursor:"pointer",border:"1px solid transparent","&:hover":{boxShadow:e.shadows[8]},borderRadius:"0.25rem",position:"relative",backgroundColor:e.palette.background.transparent,display:"inline-flex",alignItems:"center",justifyContent:"center"}));styled(Input)(({theme:e})=>({border:`1px solid ${e.palette.grey[100]}`,borderRadius:"0.25rem",padding:"0.375rem",fontSize:"0.625rem",outline:"none",width:"100%",maxWidth:"150px",height:"1.5rem",backgroundColor:e.palette.background.paper,"&:focus":{border:`1px solid ${e.palette.info.dark}`}}));var ke=styled(Typography)(()=>({border:"1px solid rgba(242, 242, 242, 0.70);",display:"inline-flex",height:"24px",padding:"0px 8px",justifyContent:"center",alignItems:"center",borderRadius:"37.5px",backgroundColor:"#fff"})),Be=styled(Box,{shouldForwardProp:e=>!["isMaximized","isScrollingRequest","isRequestShown"].includes(e)})(({isScrollingRequest:e,isMaximized:t,isRequestShown:i,theme:o})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:"4px",paddingBlock:"0px",paddingInlineStart:"12px",paddingInlineEnd:"12px",position:"sticky",left:0,right:0,top:0,background:"#fff",zIndex:5,...e&&{boxShadow:o.shadows[23]},...t&&{paddingTop:Re,transition:"padding 0.3s ease-in-out",...i&&{width:"50%"}}})),Te=styled(Box,{shouldForwardProp:e=>!["isMaximized","isRequestShown"].includes(e)})(({isMaximized:e,isRequestShown:t})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:"8px",height:I,position:"fixed",bottom:0,right:0,left:e?"50vw":0,...!t&&{left:0}})),Pe=styled(Box)(()=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",paddingBlock:"10px",paddingInlineStart:"8px",paddingInlineEnd:"0px"})),Ee=styled(Box)(()=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"4px",paddingBlock:"10px",paddingInlineStart:"0px",paddingInlineEnd:"12px"})),xt=styled(motion.div,{shouldForwardProp:e=>!["isRequestShown","isMaximized"].includes(e)})(({isRequestShown:e,isMaximized:t})=>({width:"100%",height:"100%",overflowY:"auto",overflowX:"hidden",background:"#fff",zIndex:20,position:"relative",display:"flex",flexDirection:"column",borderBottomRightRadius:"12px",borderBottomLeftRadius:e?0:"12px",...t&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,height:"100vh"}}));styled(motion.div,{shouldForwardProp:e=>!["isMaximized","currentRequestWidth"].includes(e)})(({isMaximized:e,currentRequestWidth:t})=>({backgroundColor:"#E7E7E7B2",backdropFilter:"blur(12px)",height:e?"100vh":"100%",overflowY:"auto",overflowX:"hidden",position:"absolute",width:e?"100vw":t,zIndex:19,display:"flex",flexDirection:"column",borderBottomLeftRadius:"12px"}));styled(Box,{shouldForwardProp:e=>!["isMaximized","currentHeight"].includes(e)})(({isMaximized:e,currentHeight:t})=>({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",height:e?`calc(100vh - ${I}px)`:(t||J)-I+5,background:"transparent",position:"fixed",width:"100%"}));var yt=styled(Box)(()=>({position:"fixed",width:"100%",background:"transparent",height:"100%"})),wt=styled("span")(()=>({color:"#032F62"})),bt=styled("span")(()=>({color:"#357fb9"}));function bo({onClick:e,icon:t,label:i,disableAnimation:o,...n}){let[s,l]=ho.useState(false),{t:d}=useTranslation();return jsxs(ht,{...n,onClick:u=>{e?.(u),!o&&(l(true),setTimeout(()=>{l(false);},2e3));},children:[jsxs(yo,{sx:{width:"16px",display:"flex",overflow:"hidden",justifyContent:"center",alignItems:"center"},children:[jsx(AnimatePresence,{mode:"wait",children:s&&jsx(motion.img,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,transition:{duration:.1}},transition:{duration:.4},src:ra,alt:"icon"},"id-icon")}),jsx(AnimatePresence,{mode:"wait",children:!s&&jsx(motion.img,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,transition:{duration:.1}},transition:{duration:.4},src:t,alt:"icon"},"id-icon")})]}),i&&jsxs(Fragment,{children:[jsx(AnimatePresence,{children:s&&jsx(motion.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,position:"absolute"},transition:{duration:.4},children:d("copied")})}),jsx(AnimatePresence,{children:!s&&jsx(motion.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,position:"absolute",width:"53px"},transition:{duration:.4},children:i})})]})]})}var St=memo(bo);var H=St;var vt=styled$1("div")(()=>({display:"flex",alignItems:"center",position:"relative",flexShrink:0,width:"24px",height:"24px"})),Ct=styled$1("button")(({theme:e,isActive:t})=>({width:"24px",height:"24px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",border:`1px solid ${t?e.palette.info.dark:e.palette.grey[100]}`,backgroundColor:e.palette.background.paper,cursor:"pointer",outline:"none",padding:0,position:"relative",zIndex:11,transition:"all 0.2s ease-in-out","&:hover":{boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark}`}})),Rt=styled$1(motion.div)(()=>({position:"absolute",right:0,top:0,height:"24px",display:"flex",alignItems:"center",zIndex:20,background:"transparent"})),It=styled$1(motion.input)(({theme:e})=>({width:"177px",height:"24px",borderRadius:"4px",color:e.palette.text.primary,fontSize:"10px",outline:0,background:e.palette.background.paper,boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark}`,paddingLeft:"8px",boxSizing:"border-box","::placeholder":{color:"#D5D5D5"}})),Oe={position:"absolute",top:"50%",transform:"translateY(-50%)",zIndex:2,userSelect:"none"},Jt={...Oe,background:"none",border:"none",padding:0,margin:0,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",outline:"none","&:disabled":{opacity:.3,cursor:"default"}},kt=styled$1("button")(()=>({...Jt,right:53})),Bt=styled$1("button")(()=>({...Jt,right:39})),Tt=styled$1(motion.img)(()=>({...Oe,right:24,width:10,height:10,cursor:"pointer"})),Pt=styled$1(motion.img)(()=>({...Oe,right:8,width:11,height:11,cursor:"default"})),Ve=styled$1("img")(()=>({width:10,height:10})),Et=styled$1("img")(()=>({width:12,height:12})),Ht=styled$1("span")(({theme:e})=>({position:"absolute",right:67,top:"50%",transform:"translateY(-50%)",fontSize:"9px",lineHeight:1,color:e.palette.text.secondary,whiteSpace:"nowrap",userSelect:"none",zIndex:2,pointerEvents:"none"}));function Jo({value:e,onChange:t,currentIndex:i,totalCount:o,onPrev:n,onNext:s,onOpen:l,placeholder:d="Search..."}){let[p,u]=useState(false),w=useRef(null),S=e.trim().length>0,k=o>0,a=S,N=()=>{l?.(),u(true),requestAnimationFrame(()=>w.current?.focus());},f=()=>{t(""),u(false);};return jsxs(vt,{children:[jsx(AnimatePresence,{children:p&&jsxs(Rt,{initial:{clipPath:"inset(0 0 0 100%)",opacity:0},animate:{clipPath:"inset(0 0 0 0%)",opacity:1},exit:{clipPath:"inset(0 0 0 100%)",opacity:0},transition:{duration:.22,ease:[.4,0,.2,1]},children:[jsx(It,{ref:w,initial:false,animate:{paddingRight:a?"98px":"24px"},transition:{duration:.15},placeholder:d,value:e,onChange:v=>t(v.target.value),onKeyDown:v=>{v.key==="Enter"&&(v.shiftKey?n():s()),v.key==="Escape"&&f();},onBlur:()=>{S||u(false);}}),a&&jsx(kt,{onClick:n,disabled:!k,title:"Previous match (Shift+Enter)",children:jsx(Ve,{src:_j,alt:"prev"})}),a&&jsx(Bt,{onClick:s,disabled:!k,title:"Next match (Enter)",children:jsx(Ve,{src:$j,alt:"next"})}),a&&jsx(Tt,{src:rh,alt:"clear",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:f}),jsx(Pt,{src:Ej,alt:"search",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),a&&jsx(Ht,{children:k?`${i+1}/${o}`:"0/0"})]},"input-area")}),jsx(AnimatePresence,{children:!p&&jsx(motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.15},children:jsx(Ct,{isActive:false,onClick:N,title:"Search",children:jsx(Et,{src:A,alt:"search"})})})})]})}var K=memo(Jo);function Mt(e,t){let i=[],o=t.length,n=0,s=e.indexOf(t,n);for(;s!==-1;){let l=s+o;i.push([s,l]),n=l,s=e.indexOf(t,n);}return i}var ko={padding:0,outline:"none"};function Wt({text:e,queryLength:t,ranges:i,idPrefix:o}){let n=[],s=0;return i.forEach(([l,d],p)=>{l>s&&n.push(e.slice(s,l)),n.push(jsx("mark",{style:ko,children:e.slice(l,l+t)},`${o}-${p}`)),s=d;}),s<e.length&&n.push(e.slice(s)),jsx(Fragment,{children:n})}function W({text:e,query:t}){let i=useId(),o=useMemo(()=>t.trim().toLowerCase(),[t]),n=useMemo(()=>{if(!o)return e;let s=e.toLowerCase(),l=Mt(s,o);return l.length===0?e:jsx(Wt,{text:e,queryLength:t.length,ranges:l,idPrefix:i})},[e,t.length,o,i]);return jsx(Fragment,{children:n})}function re(e,t){return e.toLowerCase().includes(t)}function ie(e){return e.trim().toLowerCase()}function se(e){let t=ie(e);return (i,{keyName:o})=>{if(!t||!o)return;let n=String(o);if(re(n,t))return jsx(bt,{children:jsx(W,{text:String(o),query:e})})}}function ae(e){let t=ie(e);return (i,{value:o})=>{if(!t)return;let n=String(o??"");if(re(n,t))return jsxs(wt,{children:['"',jsx(W,{text:String(o??""),query:e}),'"']})}}function Vo({title:e,onClose:t,onMaximize:i,maximized:o=false,id:n,onMouseHover:s,onMouseLeave:l,onRequestClick:d$2,isRequestExpanded:p=false,showRequestIcon:u=false,isHovered:w=false}){return jsx(c,{id:n,maximized:o||false,children:jsx(d,{isHovered:true,onMouseEnter:s,onMouseLeave:l,isMaximized:o,title:e,icon:ed,leftActions:jsxs(Fragment,{children:[jsx(a,{onClick:t}),jsx(c$1,{isMaximized:o,onClick:i}),u&&jsx(d$1,{onClick:d$2,isExpanded:p,isHovered:w,children:"Request"})]})})})}var jt=memo(Vo);var Me=jt;var Ft="#FFE20B";function le(e,t){let[i,o]=useState(0),[n,s]=useState(0);useEffect(()=>{if(!t.trim()){s(0),o(0);return}let p=setTimeout(()=>{let u=e.current?.querySelectorAll("mark")??[];s(u.length),o(0);},50);return ()=>clearTimeout(p)},[t,e]),useEffect(()=>{if(!e.current||!t.trim())return;let p=Array.from(e.current.querySelectorAll("mark"));p.forEach((u,w)=>{let S=w===i;u.style.backgroundColor=S?Ft:"transparent",u.style.outline=S?`1px solid ${Ft}`:"none",u.style.borderRadius="2px";}),p[i]?.scrollIntoView({behavior:"smooth",block:"nearest"});},[i,n,t,e]);let l=useCallback(()=>{n!==0&&o(p=>(p+1)%n);},[n]),d=useCallback(()=>{n!==0&&o(p=>(p-1+n)%n);},[n]);return {currentIndex:i,totalCount:n,goNext:l,goPrev:d}}function Kt(e,t){return e==null?String(e).includes(t):typeof e=="string"?e.toLowerCase().includes(t):typeof e=="number"||typeof e=="boolean"?String(e).includes(t):false}function $t(e,t){if(Array.isArray(e)){let i=e.map(o=>$t(o,t)).filter(o=>o!=null);return i.length>0?i:null}return typeof e=="object"&&e!==null?Gt(e,t):Kt(e,t)?e:null}function Gt(e,t){let i={};for(let[o,n]of Object.entries(e))if(o.toLowerCase().includes(t))i[o]=n;else if(typeof n=="object"&&n!==null){let s=$t(n,t);s!==null&&(i[o]=s);}else Kt(n,t)&&(i[o]=n);return Object.keys(i).length>0?i:null}function ze(e,t){return t.trim()?Gt(e,t.toLowerCase()):e}var G=400,L=.5;function Y({index:e,json:t,requestJson:i={},isWindowMinimized:o,windowOrder:n,onClose:s,onJsonRequestOpen:l,onJsonSearch:d,onJsonCopy:p,onJsonIdCopy:u,onJsonNodesMinimize:w,onJsonNodesMaximize:S}){let k=Kc(useId(),"json-viewer"),[a,N]=useState(false),[f,O]=useState(false),[V,M]=useState(false),[v,qe]=useState(false),[je,eo]=useState({width:0,height:0}),[ue,z]=useState(true),[g,to]=useState(false),[fe,oo]=useState(true),[no,De]=useState(false),[Q,Le]=useState(G),[B,ro]=useState(""),[T,io]=useState(""),_e=useRef(null),Fe=useRef(null),U=le(_e,B),Z=le(Fe,T),me=useRef(),{onMouseEnter:so,onMouseLeave:ao,isHovered:lo}=b(),{height:ge,width:_}=a$1(),[Ke,po]=useState({x:_/2+G/4-e*20,y:ge/2-J/2+e*30}),ee=useRef(),co=useMemo(()=>Object.keys(t)?.length,[t]),$e=Ha(),P=Number(ee.current?.state?.width)||G,Ge=c=>{setTimeout(()=>{navigator.clipboard.writeText(c||"").then(()=>{});},10);},Ye=useMemo(()=>Object.keys(i)?.length,[i]),Xe=useMemo(()=>ze(t,B),[t,B]),Qe=useMemo(()=>ze(i,T),[i,T]);return useEffect(()=>{if(me.current&&clearTimeout(me.current),!g){me.current=setTimeout(()=>{Le(P);},L*1e3);return}Le(P);},[g,P]),jsx(jo,{disabled:a,handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]',defaultPosition:{x:_/2-G/4,y:ge/2-J/2},position:{x:_-Ke.x,y:Ke.y},onStop:(c,m)=>{po({x:_-m.x,y:m.y});},bounds:{top:10},children:jsx(Dialog,{id:k,"data-testid":"JSONViewer",disableEnforceFocus:true,sx:{backgroundColor:"transparent",zIndex:(n||0)+3+(a?1:0),...o&&{display:"none"},transform:"translate(180px, 14px)",...!a&&{width:$e?je?.width||Q:"fit-content",height:$e?je?.height||J:"fit-content"},...a&&{transform:"none !important"}},PaperProps:{style:{margin:0,maxHeight:"100%",maxWidth:"none",background:"transparent",width:f?"fit-content":Q,height:f?"fit-content":J,...a&&{width:"100%",height:"100%"},position:"relative"}},onClose:()=>{N(false),z(true),setTimeout(()=>{z(false);},L*1e3);},open:true,hideBackdrop:true,fullScreen:a,"aria-labelledby":"draggable-dialog-title",children:jsx(Resizable,{enable:{left:false,right:true,bottomRight:true,bottom:true},maxHeight:ge-40,maxWidth:_,minWidth:a?"100vw":Q,minHeight:a?"100vh":"300px",ref:c=>{ee.current=c;},onResizeStart:()=>{z(true);},onResizeStop:()=>{z(false);},onResize:(c,m,A)=>{O(true),eo({width:A.offsetWidth,height:A.offsetHeight});},defaultSize:{width:Q,height:J},style:{background:"transparent",...a&&{height:"100% !important",width:"100% !important",flex:1},...a&&{position:"relative"}},children:jsxs(yt,{children:[jsx(motion.div,{style:{...a&&{height:Re,position:"fixed",zIndex:1e3}},animate:{width:g?P*2:P,...a&&{width:"100vw"},...!a&&{transform:`translateX(${g?-P:0}px)`}},transition:{duration:L,...ue&&{duration:0}},children:jsx(Me,{title:g?"JSON Request & Response":"JSON Response",onClose:()=>s(),onMaximize:()=>{N(c=>!c),z(true),setTimeout(()=>{z(false);},L*1e3);},isHovered:lo,onMouseHover:so,onMouseLeave:ao,maximized:a,id:"draggable-dialog-title",onRequestClick:()=>{to(c=>!c),z(false),g||(l?.(),ee.current?.updateSize({width:G,height:J}));},isRequestExpanded:g,showRequestIcon:!!Ye})}),jsxs(Box,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",height:a?`calc(100vh - ${I}px)`:(Number(ee.current?.state?.height)||J)-I+5,background:"transparent",position:"fixed",width:"100%"},children:[jsx(AnimatePresence,{children:g&&jsxs(motion.div,{initial:{left:a?"50vw":0,...a&&{position:"relative",left:"-50vw"}},animate:{left:a?"50vw":-P,...a&&{position:"relative",left:"0"},...!g&&{left:0}},exit:{left:a?"50vw":0,...a&&{position:"relative",left:"0"}},transition:{duration:L,...ue&&{duration:0}},ref:Fe,style:{flex:1,backgroundColor:"#E7E7E7B2",backdropFilter:"blur(12px)",height:a?"100vh":"100%",overflowY:"auto",position:"absolute",width:a?"100vw":P,zIndex:19,display:"flex",flexDirection:"column",borderBottomLeftRadius:"12px"},onScroll:()=>{De(true),setTimeout(()=>{De(false);},2e3);},children:[jsxs(Be,{isMaximized:a,isScrollingRequest:no,sx:{background:"#E7E7E7B2"},isRequestShown:g,children:[jsx(Ee,{children:jsx(ke,{variant:"subtitle1",children:"API Request"})}),jsxs(Pe,{children:[jsx(K,{value:T,onChange:io,onOpen:()=>d?.(),currentIndex:Z.currentIndex,totalCount:Z.totalCount,onPrev:Z.goPrev,onNext:Z.goNext}),jsx(H,{disableAnimation:true,onClick:()=>{fe?S?.():w?.(),oo(c=>!c);},icon:fe?Id:Hd}),jsx(H,{onClick:()=>{p?.(),navigator.clipboard.writeText(JSON.stringify(t)).then(()=>{});},icon:qa}),jsx(H,{onClick:()=>{u?.(),navigator.clipboard.writeText(t?.id||"").then(()=>{});},icon:oa})]})]}),T.trim()&&Qe===null?jsx(Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,height:"100%"},children:jsx(Typography,{variant:"body2",sx:{fontSize:"0.75rem",color:"text.secondary"},children:"No Data Found"})}):jsxs(R,{value:Qe??i,style:gt,displayDataTypes:false,collapsed:T.trim()?void 0:fe?1:void 0,onCopied:(c,m)=>{typeof m=="string"&&Ge(m);},enableClipboard:false,children:[jsx(R.String,{render:ae(T)}),jsx(R.KeyName,{render:se(T)}),jsx(R.CountInfo,{render:(c,{keyName:m})=>{if(!m)return jsx("span",{})}}),jsx(R.Copied,{render:({"data-copied":c,style:m,onClick:A},{keyName:he})=>he?jsxs(Je,{style:m,onClick:xe=>{A?.(xe);},children:[jsx(AnimatePresence,{children:c&&jsx(motion.img,{style:{height:"14px",width:"14px"},initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:ra,alt:"icon"},"id-icon")}),jsx(AnimatePresence,{children:!c&&jsx(motion.img,{style:{height:"14px",width:"14px"},initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:pa,alt:"icon"},"id-icon")})]}):jsx("span",{})})]}),jsx(AnimatePresence,{children:g&&jsx(Te,{sx:{flex:1,height:I,left:0},children:jsx(c$2,{sx:{paddingLeft:"12px",borderBottomRightRadius:"0",background:"#f8f9fb",flex:1},totalCount:Ye})})})]})}),jsxs(xt,{ref:_e,isMaximized:a,isRequestShown:g,style:{left:0,maxHeight:"100vw"},initial:{...a&&{width:"100vw",left:0}},animate:{...a&&{position:"absolute",left:g?"50vw":"0"}},transition:{duration:L,...ue&&{duration:0}},onScroll:()=>{qe(true),setTimeout(()=>{qe(false);},2e3);},children:[jsxs(Be,{isMaximized:a,isScrollingRequest:v,isRequestShown:g,children:[jsx(Ee,{children:jsx(ke,{variant:"subtitle1",children:"API Response"})}),jsxs(Pe,{children:[jsx(K,{value:B,onChange:ro,onOpen:()=>d?.(),currentIndex:U.currentIndex,totalCount:U.totalCount,onPrev:U.goPrev,onNext:U.goNext}),jsx(H,{disableAnimation:true,onClick:()=>{V?S?.():w?.(),M(c=>!c);},icon:V?Id:Hd}),jsx(H,{onClick:()=>{p?.(),navigator.clipboard.writeText(JSON.stringify(t,null,2)).then(()=>{});},icon:qa}),jsx(H,{onClick:()=>{u?.(),navigator.clipboard.writeText(t?.id||"").then(()=>{});},icon:oa})]})]}),B.trim()&&Xe===null?jsx(Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,height:"100%"},children:jsx(Typography,{variant:"body2",sx:{fontSize:"0.75rem",color:"text.secondary"},children:"No Data Found"})}):jsxs(R,{value:Xe??t,style:Ie,displayDataTypes:false,collapsed:B.trim()?void 0:V?1:void 0,onCopied:(c,m)=>{typeof m=="string"&&Ge(m);},children:[jsx(R.String,{render:ae(B)}),jsx(R.KeyName,{render:se(B)}),jsx(R.CountInfo,{render:(c,{keyName:m})=>{if(!m)return jsx("span",{})}}),jsx(R.Copied,{render:({"data-copied":c,style:m,onClick:A},{keyName:he})=>he?jsxs(Je,{style:m,onClick:xe=>{A?.(xe);},children:[jsx(AnimatePresence,{children:c&&jsx(motion.img,{style:{height:"14px",width:"14px"},initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:ra,alt:"icon"},"id-icon")}),jsx(AnimatePresence,{children:!c&&jsx(motion.img,{style:{height:"14px",width:"14px"},initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:pa,alt:"icon"},"id-icon")})]}):jsx("span",{})})]}),jsx(Te,{sx:{flex:1,height:I},children:jsx(c$2,{sx:{borderBottomLeftRadius:g?0:"12px",background:"#f8f9fb",flex:1},totalCount:co})})]})]})]})})})})}var ce=createContext({jsonViewerList:[],handleJsonViewerDialogOpen:()=>{},handleWindowMinimize:()=>{},handleWindowOrder:()=>{},registerJsonViewerEvents:()=>{}});var Qt=({list:e,events:t,onClose:i,isWindowMinimized:o,windowOrder:n})=>e?.length?jsx(Fragment,{children:e.map((s,l)=>jsx(Y,{index:l,...t,...s,onClose:()=>{i(l);},isWindowMinimized:o,windowOrder:n},s.json.id))}):null;var Fo=({children:e})=>{let[t,i]=useState([]),[o,n]=useState(false),[s,l]=useState(1),d=useRef({}),p=useCallback(f=>{if(t.length===7){alert("Maximum allowed active Json Viewer is 7 per table.");return}if(t.some(v=>v.json.id===f.json.id))return;let O=structuredClone(f.json),V=O.request_body,M={...f,json:O,requestJson:f.requestJson||V||void 0};delete M.json.request_body,i(v=>[...v,M]);},[t]),u=useCallback(f=>{i(O=>O.filter((V,M)=>f!==M));},[]),w=useCallback(f=>{n(f);},[]),S=useCallback(f=>{l(f);},[]),k=useCallback(f=>{d.current=f;},[]),a=useMemo(()=>({onJsonRequestOpen:()=>d.current.onJsonRequestOpen?.(),onJsonSearch:()=>d.current.onJsonSearch?.(),onJsonCopy:()=>d.current.onJsonCopy?.(),onJsonIdCopy:()=>d.current.onJsonIdCopy?.(),onJsonNodesMinimize:()=>d.current.onJsonNodesMinimize?.(),onJsonNodesMaximize:()=>d.current.onJsonNodesMaximize?.()}),[]),N=useMemo(()=>({jsonViewerList:t,handleJsonViewerDialogOpen:p,handleWindowMinimize:w,handleWindowOrder:S,registerJsonViewerEvents:k}),[t,p,w,S,k]);return jsxs(ce.Provider,{value:N,children:[e,jsx(Qt,{list:t,events:a,onClose:u,isWindowMinimized:o,windowOrder:s})]})};var Yo=({isWindowMinimized:e,windowOrder:t,...i})=>{let{handleJsonViewerDialogOpen:o,handleWindowMinimize:n,handleWindowOrder:s,registerJsonViewerEvents:l}=useContext(ce),d=useCallback(()=>{n(e);},[n,e]),p=useCallback(()=>{s(t);},[s,t]);return useEffect(()=>{p();},[p]),useEffect(()=>{d();},[d]),useEffect(()=>{l(i);},[l,i]),{handleJsonViewerDialogOpen:o}};var ti=Y;export{H as a,K as b,W as c,Me as d,le as e,ce as f,Qt as g,Fo as h,Yo as i,ti as j};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-GNY2VGGW.js';import {a as a$1}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-GNY2VGGW.js';import {a as a$1}from'./chunk-44FJXCBU.js';import {Kc}from'./chunk-DFWEGJSU.js';import {tb}from'./chunk-GXQZ4NVY.js';import {memo,useState,useRef,useEffect,useMemo,useId}from'react';import Z from'@mui/material/Popper';import {styled,Box}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var z=styled(a)(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.subtitle1.fontSize,color:e.palette.grey[700],paddingInlineStart:e.spacing(2),paddingTop:e.spacing(1),paddingBottom:e.spacing(1),paddingInlineEnd:e.spacing(1)})),L=styled(Box,{shouldForwardProp:e=>e!=="disabled"})(({theme:e,disabled:r})=>({fontWeight:e.typography.fontWeightMedium,padding:e.spacing(1),position:"relative",display:"flex",alignItems:"center",textTransform:"capitalize",cursor:r?"not-allowed":"pointer",flex:1,zIndex:99999,".MuiButtonBase-root":{width:"16px",marginInlineEnd:"4px"}})),k=styled(Box)(({theme:e})=>({borderRadius:e.spacing(.5),background:e.palette.background.default,width:"max-content",cursor:"pointer",zIndex:99999,boxShadow:e.shadows[11],display:"flex",flexDirection:"column",".nested-menu-item + .nested-menu-item":{borderTop:`1px solid ${e.palette.divider}`,zIndex:99999},".nested-menu-item:hover":{transition:e.transitions.create(["boxShadow","border"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.complex}),boxShadow:e.shadows[6],border:"none",position:"relative"}})),B=styled(Box)(({theme:e})=>({...e.typography.subtitle1,color:e.palette.text.primary,width:"100%"})),R=styled(a$1)(()=>({padding:0,paddingRight:"4px",".MuiSvgIcon-root":{width:12,height:12}})),H=styled(Box)(()=>({display:"flex",gap:"4px",alignItems:"center",flexGrow:1})),$=styled(Box)(()=>({display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center"})),A=styled(Box)(({theme:e})=>({borderRadius:"50%",background:e.palette.divider,width:13,height:14,fontSize:"8px",fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",lineHeight:"10px"})),G=styled(Box)(()=>({display:"flex",alignItems:"center",gap:"8px",flex:1,position:"relative",left:4})),F=styled(Box)(()=>({flex:"1 0 auto"})),O=styled(Box)(({theme:e})=>({position:"relative",backgroundColor:e.palette.common.white,zIndex:999999}));function j({label:e,icon:r,name:s,menuItems:t,setSelected:y,onSelect:P,selected:p,displayChildrenCount:C,disabled:i,placement:x="right",sx:g,menuSx:I}){let[u,S]=useState(null),l=useRef(null),[a,n]=useState(false),h=o=>{!i&&p!==void 0&&(y({name:o,selected:!p}),p||n(false));};return useEffect(()=>{n(!!(t?.some(o=>o.selected)&&!t?.every(o=>o.selected)));},[]),jsxs(L,{"data-testid":"NestedDropdown_MenuItem",ref:l,className:`nested-menu-item ${u?"active":""} ${i?"disabled":""}`,onMouseEnter:o=>{!u&&t?.length&&S(o.currentTarget);},onMouseLeave:()=>{u&&S(null);},onClick:o=>{i||(o.stopPropagation(),h(s));},sx:{...t?.length&&{cursor:i?"not-allowed":"pointer"},zIndex:99999,...g},disabled:i,children:[p!==void 0&&jsx(R,{size:"small",indeterminate:a,checked:p,disabled:i}),jsxs(H,{children:[r&&r,jsxs($,{children:[e&&jsx(B,{children:e}),!!t?.length&&jsxs(G,{children:[C&&jsx(A,{children:t.length}),jsx("img",{src:tb,className:"arrow-icon",alt:"arrow",style:{height:12}})]})]})]}),t?.length&&jsx(Z,{open:!!(u&&t?.length),anchorEl:u,placement:x==="left"?"left-start":"right-start",sx:{zIndex:99999,...I},children:jsx(V,{className:"child-dropdown",menuItems:t,placement:x,onChildrenChange:o=>{let w=o.every(d=>d.selected);p!==void 0&&!i&&(w&&y({name:s,selected:true}),o.every(d=>!d.selected)&&y({name:s,selected:false}),n(o?.some(d=>d.selected)&&!o.every(d=>!d.selected)&&!w));},onSelect:o=>{P(o,s);}})})]})}var M=memo(j);function te({title:e,menuItems:r,onChildrenChange:s,onSelect:t,className:y,updatedList:P,footer:p,header:C,placement:i="right",...x}){let[g,I]=useState({name:"",selected:false}),[u,S]=useState();return useEffect(()=>{S(r);},[r]),useEffect(()=>{if(g.name){let{name:l,selected:a}=g,n=[],h=d=>d?.map(m=>(n.push({name:m.name,selected:a}),{...m,selected:a,...m.menuItems?.length&&{menuItems:h(m.menuItems)}})),w=(d=>d.map(m=>m.name===l?(n.push({name:m.name,selected:a}),{...m,selected:a,...m.menuItems?.length&&{menuItems:h(m.menuItems)}}):m))(u);S(w),P&&P(w),s&&s(w),t&&t(n);}},[g]),jsxs(k,{component:"article",className:`tap-dropdown ${y||""}`,...x,children:[jsx(O,{children:e&&jsx(z,{component:"p",children:e})}),C,jsx(F,{children:u?.map((l,a)=>jsx(M,{setSelected:({name:n,selected:h})=>{I({name:n,selected:h});},onSelect:n=>{t&&t(n);},placement:i,...l},`${l.name}-${a}`))}),p&&p]})}var V=memo(te);var K=(e,{menuItemSx:r,menuSx:s})=>(e.forEach(t=>{t.sx={...r,...t.sx},t.menuSx={...s,...t.menuSx},t.menuItems?.length&&K(t.menuItems,{menuItemSx:r,menuSx:s});}),e);function le({title:e,menuItems:r,onSelect:s,updatedList:t,header:y,placement:P="right",menuItemSx:p={},menuSx:C={},...i}){let x=useMemo(()=>K(r,{menuItemSx:p,menuSx:C}),[r,p,C]),[g,I]=useState(x),u=Kc(useId(),"nested-dropdown");useEffect(()=>{I(x);},[x]);let S=l=>{let a=h=>h.map(o=>({...o,selected:l.find(w=>o.name===w.name)?.selected??o.selected,...o.menuItems?.length&&{menuItems:a(o.menuItems)}})),n=a(g);I(n),t&&t(n);};return jsx(V,{id:u,"data-testid":"NestedDropdown",placement:P,menuItems:g,title:e,header:y,onSelect:l=>{s&&s(l),S(l);},...i})}var Q=memo(le);var Ne=Q;export{M as a,V as b,Ne as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Kc}from'./chunk-DFWEGJSU.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=Kc(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}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-RCRUQXCA.js';import {Kc}from'./chunk-DFWEGJSU.js';import {rh,A}from'./chunk-GXQZ4NVY.js';import {useId}from'react';import g from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var s=styled(a)(({theme:o})=>({border:`1px solid ${o.palette.divider}`,".icon":{width:14}})),d=styled(g)(()=>({padding:"8px 16px","> div + div":{marginTop:"8px"}}));var v=({value:o,name:c,placeholder:l,onSearchChange:u,onSearchReset:f,...h})=>{let I=Kc(useId(),"search-list-input");return jsx(d,{id:I,"data-testid":"SearchListInput",...h,children:jsx(s,{className:"input",name:c,placeholder:l,onChange:t=>u(t.target.value),onKeyDown:t=>t.stopPropagation(),value:o,inputProps:{autoComplete:"off"},endAdornment:jsx(g,{component:"img","data-icon":o?"close":"search",src:o?rh:A,alt:"search",className:"icon",sx:{cursor:o?"pointer":"default"},onClick:f})})})},m=v;var R=m;export{R as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b as b$1,g,a as a$3}from'./chunk-
|
|
1
|
+
import {b as b$1,g,a as a$3}from'./chunk-NL7MCKQJ.js';import {a as a$2}from'./chunk-PR2M6EXX.js';import {a}from'./chunk-GNY2VGGW.js';import {a as a$1}from'./chunk-KHM5KW53.js';import {Kc}from'./chunk-DFWEGJSU.js';import {useId}from'react';import b from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var f=styled(b)(()=>({display:"flex",gap:"4px",alignItems:"center",justifyContent:"center",borderRadius:"56px",padding:"2px 4px",cursor:"default"})),c=styled(a)(({theme:t})=>({color:t.palette.common.white,fontWeight:600,fontSize:"8px",padding:"3px 2.57px",borderRadius:"4px",lineHeight:"100%"}));function r({tooltip:t,status:o,statusCode:x}){let S=Kc(useId(),"status-label"),p=b$1[o]??g[o]??null;return jsx(a$1,{title:t,children:jsxs(f,{id:S,"data-testid":"StatusLabel",sx:{backgroundColor:p?.background||"transparent"},children:[jsx(a$2,{src:a$3[o]}),jsx(c,{sx:g=>({backgroundColor:p?.color||g.palette.info.dark}),children:x})]})})}var q=r;export{q as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-PMFVGWB7.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 {
|
|
1
|
+
import {Kc}from'./chunk-DFWEGJSU.js';import {useId}from'react';import {styled,Box}from'@mui/material';import {jsx}from'react/jsx-runtime';var g=styled(Box)(({theme:o})=>({backgroundColor:o.palette.action.hover,display:"flex",alignItems:"center",gap:"0.5px",padding:"1.5px",borderRadius:"3px"})),p=styled(Box,{shouldForwardProp:o=>o!=="active"})(({active:o})=>({fontSize:8,fontWeight:500,width:21,height:21,borderRadius:"1.5px",backgroundColor:o?"white":"transparent",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",boxShadow:o?"0px 0px 3px 0px #00000033":"none",transition:"background-color 0.2s ease, box-shadow 0.2s ease"}));var T=({options:o,activeKey:a,onChange:i,containerProps:d,buttonProps:u})=>{let m=Kc(useId(),"toggle-buttons");return jsx(g,{id:m,"data-testid":"ToggleButtons",...d,children:o.map(t=>jsx(p,{active:a===t.key,onClick:()=>i(t.key),...u,children:t.content},t.key))})},l=T;var w=l;export{w as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d as d$1}from'./chunk-
|
|
1
|
+
import {d as d$1}from'./chunk-5XSTN2NB.js';import {a}from'./chunk-TASNI2UQ.js';import {Kc}from'./chunk-DFWEGJSU.js';import {Cb,A as A$1}from'./chunk-GXQZ4NVY.js';import {useId,useMemo,useState}from'react';import d from'@mui/material/Box';import R from'@mui/material/Skeleton';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var b=styled(d)(({theme:e})=>({display:"flex",flexDirection:"column",borderRadius:"8px",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.common.white,maxHeight:"232px",overflow:"auto"})),k=styled(d)(()=>({display:"flex",flexDirection:"column",gap:"8px"})),v=styled(d,{shouldForwardProp:e=>e!=="$active"})(({$active:e})=>({display:"flex",alignItems:"center",justifyContent:"center",width:"13px",height:"13px",borderRadius:"50%",...e&&{backgroundColor:"#F2F2F2"}})),y=styled("img",{shouldForwardProp:e=>e!=="$isClear"})(({$isClear:e})=>({...e&&{backgroundColor:"#F2F2F2",borderRadius:"4px",width:"8px",height:"8px"}})),W=styled(d$1,{shouldForwardProp:e=>e!=="$hasSearchValue"})(({$hasSearchValue:e})=>({cursor:e?"pointer":"default",width:"100%",fontSize:"11px",border:"1px solid #F2F2F2",backgroundColor:"#fff","&.Mui-disabled":{backgroundColor:"#F8F8F8"}})),w=styled(a)(({theme:e})=>({backgroundColor:"#F8F8F8",fontSize:"11px",fontWeight:600,padding:"4px 8px",color:e.palette.info.dark,gap:"4px"})),A=styled(a)(()=>({fontSize:"11px",padding:"4px 8px",gap:"4px",fontWeight:400})),L=styled(R)(()=>({width:"100%",height:24}));function M({onSalesChannelChange:e,onSearchChange:h,filteredOptions:a,isLoading:P,initialSalesChannels:m,initialSalesChannelsSearch:V}){let B=Kc(useId(),"sales-channel-filter"),o=useMemo(()=>m||[],[m]),[l,u]=useState(V||""),S=t=>o.some(i=>i.id===t),s=useMemo(()=>o?.length===a.length&&a?.length>0,[o,a]),g=useMemo(()=>o?.some(t=>t.id==="blank")&&o?.length===1,[o]),x=useMemo(()=>o?.length===0||g,[g,o?.length]);return jsxs(k,{id:B,"data-testid":"SalesChannelFilter",children:[jsx(W,{$hasSearchValue:!!l,placeholder:"Search",endAdornment:!x&&jsx(v,{$active:!!l,children:jsx(y,{src:l?Cb:A$1,alt:"search",$isClear:!!l,onClick:()=>{u(""),h("");}})}),disabled:x,onChange:t=>{u(t.target.value),h(t.target.value);},value:l,disableUnderline:true}),jsx(b,{children:P?Array.from({length:9}).map((t,i)=>jsx(L,{variant:"rectangular"},i)):jsxs(Fragment,{children:[jsx(w,{isSelected:s,isIndeterminate:!s&&(o?.length||0)>0,onClick:t=>{t.stopPropagation(),e(s?[]:a);},children:s?"Deselect All":"Select All"}),a.map(t=>jsx(A,{isSelected:S(t.id),onClick:i=>{i.stopPropagation();let O=S(t.id)?o?.filter(D=>D.id!==t.id):[...o??[],t];e(O);},children:t?.name?.en},t.id))]})})]})}export{M as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {Kc}from'./chunk-DFWEGJSU.js';import {useId}from'react';import r from'@mui/material/Collapse';import {jsx}from'react/jsx-runtime';function o({children:e,...l}){let t=Kc(useId(),"collapse");return jsx(r,{id:t,"data-testid":"Collapse",unmountOnExit:true,timeout:500,...l,children:e})}var I=o;export{I as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Kc}from'./chunk-DFWEGJSU.js';import {memo,useId,useState,useRef}from'react';import l from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var p=styled(l)(({theme:e})=>({position:"absolute",color:e.palette.grey[700],zIndex:0})),u=styled(l)(()=>({position:"relative",flexGrow:1,fontSize:"11px"}));function D({value:e,updateValue:m,placeholder:f,sx:g,maxLength:r}){let x=Kc(useId(),"resizable-height-input"),[h,i]=useState(false),n=useRef(null);return jsxs(u,{id:x,"data-testid":"ResizableHeightInput",sx:g,onClick:()=>{n.current&&n.current.focus(),i(true);},children:[!h&&!e&&jsx(p,{children:f}),jsx(l,{contentEditable:true,suppressContentEditableWarning:true,sx:{outline:"none",flexGrow:1},onBlur:t=>{let o=t.target;m(o.innerText),i(false);},ref:n,onKeyDown:t=>{let o=t.target;r&&o.innerText.length>=r&&t.preventDefault();},children:e})]})}var c=memo(D);var k=c;export{k as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {Jc}from'./chunk-WQW3FS52.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=Jc(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 {Kc}from'./chunk-DFWEGJSU.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=Kc(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};
|