@tap-payments/os-micro-frontend-shared 0.1.475 → 0.1.477-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/{chunk-GEGX54AG.js → chunk-24D2TNNY.js} +1 -1
- package/build/{chunk-QQNUNWEU.js → chunk-2SLMVVV3.js} +1 -1
- package/build/{chunk-E2CLXIAM.js → chunk-2TQNXS73.js} +1 -1
- package/build/{chunk-EOMM6XCF.js → chunk-3R74OKMG.js} +1 -1
- package/build/{chunk-PN65X6R7.js → chunk-3TYEEWUM.js} +1 -1
- package/build/{chunk-6L4MABJY.js → chunk-3VGQ42OI.js} +1 -1
- package/build/chunk-4GZXWAJI.js +2 -0
- package/build/{chunk-L55ILJ72.js → chunk-4PTJVJGN.js} +1 -1
- package/build/chunk-6OL3JUPA.js +1 -0
- package/build/{chunk-FIOHVAAY.js → chunk-6OSSML46.js} +1 -1
- package/build/{chunk-KL2AZ2HL.js → chunk-6OZURZ2J.js} +1 -1
- package/build/{chunk-PVEIIX2J.js → chunk-6RMDSMJP.js} +1 -1
- package/build/{chunk-V4SLRQPK.js → chunk-ABY47DSJ.js} +1 -1
- package/build/{chunk-WI37VPEY.js → chunk-AK4FIVFH.js} +1 -1
- package/build/{chunk-G7YNX2UW.js → chunk-AO457WXQ.js} +1 -1
- package/build/{chunk-AZQFHZX2.js → chunk-ARSSSITK.js} +1 -1
- package/build/chunk-BT2QZGRR.js +1 -0
- package/build/{chunk-IKTHVN4T.js → chunk-BWIJY2WE.js} +1 -1
- package/build/{chunk-XAWNPPH7.js → chunk-BX63HTMQ.js} +1 -1
- package/build/{chunk-CKKISQHJ.js → chunk-ETSKMGSS.js} +2 -2
- package/build/{chunk-DHDB2BWN.js → chunk-F5BRCMX3.js} +1 -1
- package/build/{chunk-GS2X4BJY.js → chunk-FKD6E26U.js} +1 -1
- package/build/{chunk-CAOMTYOH.js → chunk-GOUJ5ZUW.js} +1 -1
- package/build/chunk-GTY2ZBCY.js +1 -0
- package/build/{chunk-IK52PLCA.js → chunk-IKUOEIOO.js} +1 -1
- package/build/{chunk-BCCTNMMH.js → chunk-IYFH5KXZ.js} +1 -1
- package/build/chunk-J2Z4QVIO.js +1 -0
- package/build/{chunk-F3V7FDUX.js → chunk-JMV7T5XA.js} +1 -1
- package/build/{chunk-RHEH7EAE.js → chunk-JWQCFINS.js} +1 -1
- package/build/{chunk-VR2CIW5E.js → chunk-KDVCU5UC.js} +2 -2
- package/build/{chunk-TF4KUC77.js → chunk-LKK7HW6N.js} +1 -1
- package/build/{chunk-ICOEWMSH.js → chunk-LXWCV7XY.js} +1 -1
- package/build/{chunk-OAYY5RGV.js → chunk-MM6JBQHW.js} +1 -1
- package/build/chunk-MOREGFIY.js +1 -0
- package/build/chunk-NIIRPM2P.js +1 -0
- package/build/{chunk-KWX3JZJF.js → chunk-NOO5LTIU.js} +1 -1
- package/build/{chunk-TT7DYANM.js → chunk-NU4JZVKW.js} +1 -1
- package/build/{chunk-5TZ7ULEI.js → chunk-O23ZGMIO.js} +1 -1
- package/build/{chunk-ELLASN4E.js → chunk-OWWED4PY.js} +1 -1
- package/build/{chunk-JDGPSV7G.js → chunk-OZVTT6UG.js} +1 -1
- package/build/{chunk-BCRVZBC2.js → chunk-P6EO5ZKH.js} +1 -1
- package/build/{chunk-QNXJUX7P.js → chunk-PD64HN2X.js} +1 -1
- package/build/{chunk-KYBMM3GI.js → chunk-QGGTALT2.js} +1 -1
- package/build/chunk-QHUUB5UA.js +1 -0
- package/build/{chunk-TDRIWSNP.js → chunk-QKCWEX4G.js} +1 -1
- package/build/{chunk-XW7LUPFA.js → chunk-QSFU7MAF.js} +1 -1
- package/build/{chunk-LSHA44HR.js → chunk-QUUQ7L4F.js} +1 -1
- package/build/chunk-R3V7C2N6.js +1 -0
- package/build/{chunk-RLQYKZGG.js → chunk-R5BTIY3J.js} +1 -1
- package/build/chunk-ROXE5K4B.js +2 -0
- package/build/{chunk-W5YSBRNJ.js → chunk-S3DUYHQG.js} +1 -1
- package/build/{chunk-ZQ6VMOQ7.js → chunk-S3HYGR6A.js} +1 -1
- package/build/{chunk-UJX4TDKD.js → chunk-SA3T5LKX.js} +1 -1
- package/build/{chunk-S6RFPF3E.js → chunk-SH5B2C5G.js} +1 -1
- package/build/chunk-SRWAY2MJ.js +1 -0
- package/build/{chunk-V42VTMSG.js → chunk-SSOATT5T.js} +1 -1
- package/build/{chunk-ARP7EMGQ.js → chunk-TIQMT2NC.js} +1 -1
- package/build/{chunk-3RB7SOD6.js → chunk-TLKUQ74V.js} +1 -1
- package/build/{chunk-Z4FHHHC4.js → chunk-TYFM2CLZ.js} +1 -1
- package/build/{chunk-R3DYVCA4.js → chunk-U2EVJIKE.js} +1 -1
- package/build/{chunk-VJWLLAT4.js → chunk-UNZG4C4Y.js} +1 -1
- package/build/{chunk-COZF3FS7.js → chunk-VI4EBPCV.js} +1 -1
- package/build/{chunk-73XZ7PNL.js → chunk-VPGXTTNN.js} +1 -1
- package/build/{chunk-FKHCHDZT.js → chunk-WDGOOLU7.js} +1 -1
- package/build/{chunk-GKIGJ23N.js → chunk-WGMZ5XLV.js} +1 -1
- package/build/{chunk-APIJ4QLV.js → chunk-WRXSOWHO.js} +1 -1
- package/build/{chunk-OSJA6643.js → chunk-WUEFAFSM.js} +1 -1
- package/build/{chunk-REVY6BKK.js → chunk-WVAZXL5U.js} +1 -1
- package/build/{chunk-MRFF7D7J.js → chunk-WXO77AL5.js} +1 -1
- package/build/{chunk-RP2UIZAV.js → chunk-XCJHY5ZJ.js} +1 -1
- package/build/{chunk-M6WLN3OC.js → chunk-XIVQ3YLE.js} +1 -1
- package/build/chunk-YBRGXFZD.js +1 -0
- package/build/{chunk-M7EZXHXI.js → chunk-ZHHW347C.js} +1 -1
- package/build/components/AccordionAdapter/index.js +1 -1
- package/build/components/AccountDropdown/index.js +1 -1
- package/build/components/ActivityAreaChart/index.js +1 -1
- package/build/components/Amount/index.js +1 -1
- package/build/components/AmountConversionFilter/index.js +1 -1
- package/build/components/AmountInput/index.js +1 -1
- package/build/components/AmountStatusChip/index.js +1 -1
- package/build/components/AnimatedSpinnerIcon/index.js +1 -1
- package/build/components/AnimatedSpinnerIcon/style.d.ts +0 -1
- package/build/components/AppServices/index.js +1 -1
- package/build/components/AppServicesActionMenu/index.js +1 -1
- package/build/components/AppServicesBar/index.js +1 -1
- package/build/components/AppWindowWrapper/index.js +1 -1
- package/build/components/AuthenticationTypeChip/index.js +1 -1
- package/build/components/Autocomplete/index.js +1 -1
- package/build/components/BrandLogo/index.js +1 -1
- package/build/components/Button/index.js +1 -1
- package/build/components/Calender/index.js +1 -1
- package/build/components/CardEmptyState/index.js +1 -1
- package/build/components/Checkbox/index.js +1 -1
- package/build/components/Chip/style.d.ts +0 -1
- package/build/components/ColorPicker/index.js +1 -1
- package/build/components/CopyImage/index.js +1 -1
- package/build/components/CountBadge/index.js +1 -1
- package/build/components/CountBadge/style.d.ts +0 -1
- package/build/components/CountryFilter/index.js +1 -1
- package/build/components/CountryFlag/index.js +1 -1
- package/build/components/CurrencyFilter/index.js +1 -1
- package/build/components/CurrencySymbol/index.js +1 -1
- package/build/components/Customer/index.js +1 -1
- package/build/components/DateButton/index.js +1 -1
- package/build/components/DateFilter/index.js +1 -1
- package/build/components/DeviceIcon/index.js +1 -1
- package/build/components/Dialog/index.js +1 -1
- package/build/components/Dialog/style.d.ts +0 -1
- package/build/components/Discount/index.js +1 -1
- package/build/components/DisplayAmount/index.js +1 -1
- package/build/components/Dropdown2/index.js +1 -1
- package/build/components/DropdownButton/index.js +1 -1
- package/build/components/Error/index.js +1 -1
- package/build/components/ErrorToast/index.js +1 -1
- package/build/components/ExpandableSideBar/index.js +1 -1
- package/build/components/FileInputPreview/index.js +1 -1
- package/build/components/FilePreview/index.js +1 -1
- package/build/components/FileUpload/FileUpload.d.ts +7 -2
- package/build/components/FileUpload/index.js +1 -1
- package/build/components/FileUpload/style.d.ts +3 -1
- package/build/components/FileUploader/index.js +1 -1
- package/build/components/FilterDropdown/index.js +1 -1
- package/build/components/FilteredIds/index.js +1 -1
- package/build/components/Filters/index.js +1 -1
- package/build/components/FlagDetails/index.js +1 -1
- package/build/components/FlippingCard/style.d.ts +0 -1
- package/build/components/IconGallery/index.js +1 -1
- package/build/components/IconWithBadge/index.js +1 -1
- package/build/components/IconWithLabel/index.js +1 -1
- package/build/components/IconsDropdown/index.js +1 -1
- package/build/components/ImageWrapper/ImageWrapper.d.ts +0 -1
- package/build/components/InputBase/index.js +1 -1
- package/build/components/InputNumber/index.js +1 -1
- package/build/components/Inputs/index.js +1 -1
- package/build/components/JSONViewer/index.js +1 -1
- package/build/components/JSONViewer/style.d.ts +0 -1
- package/build/components/LabeledIconDropdown/index.js +1 -1
- package/build/components/LanguageDropdown/index.js +1 -1
- package/build/components/LeftPeekRightExpandingChip/style.d.ts +0 -1
- package/build/components/ListColumnFilter/index.js +1 -1
- package/build/components/MFWidgetLoader/index.js +1 -1
- package/build/components/MaskedText/index.js +1 -1
- package/build/components/MenuItem/index.js +1 -1
- package/build/components/MerchantCurrencyDropdown/index.js +1 -1
- package/build/components/MerchantLogo/index.js +1 -1
- package/build/components/MerchantsDropdown/index.js +1 -1
- package/build/components/MultiSelectDropdownButton/index.js +1 -1
- package/build/components/MultiSelectStatusButton/index.js +1 -1
- package/build/components/MultiSelectWithSearch/index.js +1 -1
- package/build/components/NestedDropdown/index.js +1 -1
- package/build/components/PartnersFilter/index.js +1 -1
- package/build/components/PaymentSourceFilter/index.js +1 -1
- package/build/components/PhoneFilter/index.js +1 -1
- package/build/components/ProgressRing/index.js +1 -1
- package/build/components/RFH/index.js +1 -1
- package/build/components/RangeCalender/index.js +1 -1
- package/build/components/ReceiptsViewer/index.js +1 -1
- package/build/components/ReferenceTypeFilter/index.js +1 -1
- package/build/components/RightLeftExpandingCenterChip/style.d.ts +0 -1
- package/build/components/SalesChannelFilter/index.js +1 -1
- package/build/components/Sandbox/index.js +1 -1
- package/build/components/SearchButton/index.js +1 -1
- package/build/components/SearchButton/styles.d.ts +0 -1
- package/build/components/SearchListInput/index.js +1 -1
- package/build/components/SelectDropdown/index.js +1 -1
- package/build/components/SelectWithSearch/index.js +1 -1
- package/build/components/StatusBar/index.js +1 -1
- package/build/components/StatusButton/index.js +1 -1
- package/build/components/StatusChip/index.js +1 -1
- package/build/components/StatusChipWithCopy/index.js +1 -1
- package/build/components/StatusFilter/index.js +1 -1
- package/build/components/StatusGroupChips/index.js +1 -1
- package/build/components/StatusIcons/AuthIcons/style.d.ts +0 -1
- package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +0 -1
- package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +0 -1
- package/build/components/StatusIcons/SourceIcons/style.d.ts +0 -1
- package/build/components/StatusIcons/index.js +1 -1
- package/build/components/StatusLabel/index.js +1 -1
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AgreementCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/IDButton/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/PayoutReportCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/style.d.ts +0 -1
- package/build/components/TableCells/index.js +1 -1
- package/build/components/TableHeader/index.js +1 -1
- package/build/components/TableReports/components/DownloadButton/style.d.ts +0 -1
- package/build/components/TableReports/index.js +1 -1
- package/build/components/TableReports/style.d.ts +0 -1
- package/build/components/TableView/index.js +1 -1
- package/build/components/Timepicker/index.js +1 -1
- package/build/components/Toaster/index.js +1 -1
- package/build/components/ToggleView/index.js +1 -1
- package/build/components/Toolbar/index.js +1 -1
- package/build/components/ToolbarIcon/index.js +1 -1
- package/build/components/TreeDropdown/index.js +1 -1
- package/build/components/VAT/index.js +1 -1
- package/build/components/VerificationIcon/index.js +1 -1
- package/build/components/ViewColumnRadioFilter/index.js +1 -1
- package/build/components/VirtualTables/components/style.d.ts +0 -1
- package/build/components/VirtualTables/index.js +1 -1
- package/build/components/Widget/index.js +1 -1
- package/build/components/Window/index.js +1 -1
- package/build/components/WindowSideBar/index.js +1 -1
- package/build/components/index.js +1 -1
- package/build/constants/assets.d.ts +5 -0
- package/build/constants/index.js +1 -1
- package/build/hooks/index.js +1 -1
- package/build/index.js +1 -1
- package/build/utils/index.js +1 -1
- package/package.json +33 -47
- package/build/chunk-4Q2P3FSI.js +0 -1
- package/build/chunk-4V53CG4R.js +0 -1
- package/build/chunk-5DNHU7PK.js +0 -1
- package/build/chunk-6MDDTWPF.js +0 -1
- package/build/chunk-7DADB2HO.js +0 -1
- package/build/chunk-B2RQJXU4.js +0 -1
- package/build/chunk-FG2Z2C5R.js +0 -1
- package/build/chunk-GH3KMMFT.js +0 -1
- package/build/chunk-NK266ZWT.js +0 -2
- package/build/chunk-TZWXCSB4.js +0 -1
- package/build/chunk-WRMULCMZ.js +0 -2
- package/build/chunk-XUSUPNMX.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Ud}from'./chunk-ROXE5K4B.js';import {useTranslation}from'react-i18next';import {styled,Box}from'@mui/material';import {jsx,jsxs}from'react/jsx-runtime';var s=styled(Box,{shouldForwardProp:e=>e!=="isHovered"&&e!=="isContentHovered"&&e!=="hideSandbox"})(({hideSandbox:e})=>({width:"6.4rem",display:"flex",justifyContent:"flex-end",alignItems:"center",transition:"opacity 0.2s ease-in-out",visibility:e?"hidden":"visible"})),l=styled(Box)(()=>({display:"flex",justifyContent:"flex-end",alignItems:"center"})),g=styled("img")(()=>({height:"0.75rem",width:"0.75rem",opacity:0,transition:"opacity 0.2s ease-in-out","&:hover":{opacity:1}})),p=styled(g,{shouldForwardProp:e=>e!=="isHovered"})(({isHovered:e})=>({opacity:e?1:0,transition:"opacity 0.2s ease-in-out",height:"auto",width:"auto",cursor:"pointer"})),c=styled("p",{shouldForwardProp:e=>e!=="isContentHovered"})(({theme:e,isContentHovered:o})=>({color:e.palette.common.orange,fontSize:"0.62rem",fontWeight:600,paddingRight:"0.25rem",opacity:o?1:0,display:o?"block":"none",transition:"opacity 0.2s ease-in-out",margin:0})),x=styled("div",{shouldForwardProp:e=>e!=="isHovered"&&e!=="active"})(({theme:e,isHovered:o,active:n})=>({width:12,height:12,borderRadius:50,display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:n?e.palette.common.orange:o?`${e.palette.grey[200]}40`:`${e.palette.grey[200]}14`,transition:"background-color 0.2s ease-in-out"}));function h({appInfo:e,onToggleSandbox:o,isHovered:n,isContentHovered:r,onMouseContentEnter:b,onMouseContentLeave:m}){let{t:S}=useTranslation(),u=e?.isMaximized&&!e?.sandboxMode&&!n;return jsx(s,{hideSandbox:u,children:jsxs(l,{onClick:o,children:[jsx(c,{isContentHovered:r||e?.sandboxMode,children:S("sandboxMode")}),jsx(x,{active:r||e?.sandboxMode,isHovered:n,onMouseEnter:b,onMouseLeave:m,children:jsx(p,{isHovered:n||e?.sandboxMode,src:Ud,alt:"Sandbox icon"})})]})})}var y=h;var B=y;export{B as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-CNIYZZCP.js';import {
|
|
1
|
+
import {a}from'./chunk-CNIYZZCP.js';import {$h,Sd}from'./chunk-ROXE5K4B.js';import M from'@mui/material/Box';import {Box}from'@mui/material';import {styled,alpha}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var c=styled(Box)(({theme:t})=>({width:"100%",borderRadius:"4px",padding:"4px 8px",display:"flex",alignItems:"center",justifyContent:"flex-start",background:t.palette.grey[400],gap:"8px",cursor:"pointer"})),m=styled(Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",color:t.palette.text.primary,cursor:"pointer",gap:"8px"})),l=styled("span")(({theme:t})=>({fontWeight:500,color:t.palette.text.primary,cursor:"pointer",fontSize:"9px"})),n=styled(Box)(({theme:t})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:"4px",color:t.palette.text.primary})),f=styled(Box)(({theme:t})=>({color:alpha(t.palette.text.primary,.3),fontSize:"8px",fontWeight:500})),u=styled(Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",padding:"8px",background:t.palette.common.white,borderRadius:"4px",border:`1px solid ${t.palette.divider}`})),y=styled(a)(({theme:t})=>({color:t.palette.error.main,fontSize:"8px",fontWeight:500}));var j=({getRootProps:t,getInputProps:C,open:U,onChangeFiles:h,processFiles:F,disabled:W,errorMessage:a,maxFileSize:I,preventDuplicates:b,label:P="Click to upload",hintText:S,sx:k})=>jsxs(c,{...t(),sx:k,onClick:U,children:[jsx("input",{"data-slot":"input",...C(),onChange:T=>{let i=F(Array.from(T.target.files||[]));(i.length>0||!b)&&h(i);},disabled:W}),jsxs(m,{"data-slot":"content",children:[jsx(u,{"data-slot":"icon-wrapper",children:jsx(M,{component:"img",src:a?$h:Sd,width:16,height:16})}),a?jsxs(n,{children:[jsx(y,{children:a}),jsx(l,{children:"Click to upload again"})]}):jsxs(n,{children:[jsx(l,{children:P}),jsx(f,{children:S||`PDF, JPG or PNG files up to ${I}`})]})]})]}),g=j;var N=g;export{N as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {ac}from'./chunk-ROXE5K4B.js';import {motion}from'framer-motion';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var o=styled(motion.img,{shouldForwardProp:i=>i!=="width"&&i!=="height"})(({width:i,height:t})=>({width:i||"16px",height:t||"16px"}));var a=({width:i,height:t,sx:e}={})=>jsx(o,{src:ac,alt:"Loading",className:"spinner-loader",width:i,height:t,sx:e,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2}}),r=a;var y=r;export{y as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-A5FGRP2T.js';import {a as a$1}from'./chunk-CNIYZZCP.js';import {
|
|
1
|
+
import {a as a$2}from'./chunk-A5FGRP2T.js';import {a as a$1}from'./chunk-CNIYZZCP.js';import {di}from'./chunk-ROXE5K4B.js';import {memo}from'react';import i from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var a=styled(i)(({theme:e})=>({border:`1px solid ${e.palette.divider}`,background:"#FBFBFB",borderRadius:"8px",fontSize:"11px",display:"flex",flexDirection:"column",height:"233px",transform:"scale(1)"})),s=styled(i)(({theme:e})=>({padding:"8px 12px",borderBottom:`1px solid ${e.palette.divider}`,display:"flex",justifyContent:"space-between",alignItems:"center",height:39,flexShrink:0,overflow:"visible"})),l=styled(i)(({theme:e})=>({color:e.palette.text.primary,fontSize:"11px",fontWeight:600,textTransform:"capitalize"})),x=styled(i)(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:"12px",paddingBottom:"12px",paddingInlineStart:"12px",paddingInlineEnd:"8px",borderBottom:`1px solid ${e.palette.divider}`,height:40})),c=styled(a$1)(({theme:e})=>({color:e.palette.text.primary,fontSize:"11px",fontWeight:500,lineHeight:"13.2px"})),f=styled(i)(()=>({display:"flex",alignItems:"center",gap:"8px"})),g=styled(i)(()=>({display:"flex",alignItems:"center",gap:"4px"})),y=styled(i)(()=>({borderRadius:"8px",overflow:"auto",flexGrow:1,height:"100%",listStyle:"none",margin:0,padding:0,".list-item:last-of-type":{borderBottom:"none"}}));styled(i)(()=>({margin:"12px "}));function L({children:e,...t}){return jsx(a,{component:"article","data-testid":"Widget",...t,children:e})}var I=memo(L);function R({children:e,action:t,...r}){return jsxs(s,{"data-testid":"Widget_WidgetHeader",component:"header",...r,children:[jsx(l,{children:e}),t&&t]})}var b=memo(R);function v({allowShadow:e=true,children:t,...r}){let{onScrollHandler:d,showShadow:h}=a$2();return jsxs(y,{component:"ul","data-testid":"Widget_List",onScroll:d,...r,children:[t,h&&e&&jsx(i,{component:"img",src:di,sx:{width:"100%",position:"fixed",bottom:0,pointerEvents:"none",right:0,left:0}})]})}var z=memo(v);function A({children:e,icon:t,actions:r,...d}){return jsxs(x,{component:"li","data-testid":"Widget_ListItem",className:`list-item ${d.className}`,...d,children:[jsxs(f,{component:"aside",children:[t&&t,jsx(c,{noWrap:true,className:"content",children:e})]}),r&&jsx(g,{component:"aside",children:r})]})}var E=memo(A);var ce=I;export{b as a,z as b,E as c,ce as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c as c$2}from'./chunk-COZF3FS7.js';import {c,e}from'./chunk-XAWNPPH7.js';import {a,c as c$1,d}from'./chunk-PVEIIX2J.js';import {b as b$1,a as a$1}from'./chunk-GKIGJ23N.js';import {Ra}from'./chunk-MRFF7D7J.js';import {na,Zc,Bd,Ad,ma,ka,la}from'./chunk-NK266ZWT.js';import tt,{memo,createContext,useState,useRef,useMemo,useEffect,useCallback,useContext}from'react';import {styled,Popover,Input,Typography,Box,Dialog}from'@mui/material';import B from'@uiw/react-json-view';import {motion,AnimatePresence}from'framer-motion';import {Resizable}from're-resizable';import xt from'react-draggable';import it from'@mui/material/Box';import {useTranslation}from'react-i18next';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var w=37,oe="32px",h=545;styled(Popover)(({theme:e})=>({backgroundColor:e.palette.background.default,boxShadow:e.shadows[21],"& .MuiPaper-root":{borderRadius:"12px"}}));var et=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% - ${et+w}px`,overflow:"auto"},Pe={...ie,background:"transparent","--w-rjv-line-color":"transparent"},ze=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})),re=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 ne=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"})),se=styled(Box,{shouldForwardProp:e=>!["isMaximized","isScrollingRequest","isRequestShown"].includes(e)})(({isScrollingRequest:e,isMaximized:i,isRequestShown:n,theme:a})=>({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:a.shadows[23]},...i&&{paddingTop:oe,transition:"padding 0.3s ease-in-out",...n&&{width:"50%"}}})),ae=styled(Box,{shouldForwardProp:e=>!["isMaximized","isRequestShown"].includes(e)})(({isMaximized:e,isRequestShown:i})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:"8px",height:w,position:"fixed",bottom:0,right:0,left:e?"50vw":0,...!i&&{left:0}})),le=styled(Box)(()=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",paddingBlock:"10px",paddingInlineStart:"8px",paddingInlineEnd:"0px"})),de=styled(Box)(()=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"4px",paddingBlock:"10px",paddingInlineStart:"0px",paddingInlineEnd:"12px"})),Ee=styled(motion.div,{shouldForwardProp:e=>!["isRequestShown","isMaximized"].includes(e)})(({isRequestShown:e,isMaximized:i})=>({width:"100%",height:"100%",overflowY:"auto",background:"#fff",zIndex:20,position:"relative",display:"flex",flexDirection:"column",borderBottomRightRadius:"12px",borderBottomLeftRadius:e?0:"12px",...i&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,height:"100vh"}}));styled(motion.div,{shouldForwardProp:e=>!["isMaximized","currentRequestWidth"].includes(e)})(({isMaximized:e,currentRequestWidth:i})=>({backgroundColor:"#E7E7E7B2",backdropFilter:"blur(12px)",height:e?"100vh":"100%",overflowY:"auto",position:"absolute",width:e?"100vw":i,zIndex:19,display:"flex",flexDirection:"column",borderBottomLeftRadius:"12px"}));styled(Box,{shouldForwardProp:e=>!["isMaximized","currentHeight"].includes(e)})(({isMaximized:e,currentHeight:i})=>({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",height:e?`calc(100vh - ${w}px)`:(i||h)-w+5,background:"transparent",position:"fixed",width:"100%"}));var Ve=styled(Box)(()=>({position:"fixed",width:"100%",background:"transparent",height:"100%"}));function nt({onClick:e,icon:i,label:n,disableAnimation:a,...p}){let[l,t]=tt.useState(false),{t:x}=useTranslation();return jsxs(ze,{...p,onClick:S=>{e?.(S),!a&&(t(true),setTimeout(()=>{t(false);},2e3));},children:[jsxs(it,{sx:{width:"16px",display:"flex",overflow:"hidden",justifyContent:"center",alignItems:"center"},children:[jsx(AnimatePresence,{mode:"wait",children:l&&jsx(motion.img,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,transition:{duration:.1}},transition:{duration:.4},src:na,alt:"icon"},"id-icon")}),jsx(AnimatePresence,{mode:"wait",children:!l&&jsx(motion.img,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,transition:{duration:.1}},transition:{duration:.4},src:i,alt:"icon"},"id-icon")})]}),n&&jsxs(Fragment,{children:[jsx(AnimatePresence,{children:l&&jsx(motion.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,position:"absolute"},transition:{duration:.4},children:x("copied")})}),jsx(AnimatePresence,{children:!l&&jsx(motion.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,position:"absolute",width:"53px"},transition:{duration:.4},children:n})})]})]})}var Oe=memo(nt);var b=Oe;function lt({title:e$1,onClose:i,onMaximize:n,maximized:a$1=false,id:p,onMouseHover:l,onMouseLeave:t,onRequestClick:x,isRequestExpanded:v=false,showRequestIcon:S=false,isHovered:I=false}){return jsx(c,{id:p,maximized:a$1||false,children:jsx(e,{isHovered:true,onMouseEnter:l,onMouseLeave:t,isMaximized:a$1,title:e$1,icon:Zc,leftActions:jsxs(Fragment,{children:[jsx(a,{onClick:i}),jsx(c$1,{isMaximized:a$1,onClick:n}),S&&jsx(d,{onClick:x,isExpanded:v,isHovered:I,children:"Request"})]})})})}var Me=memo(lt);var ce=Me;var q=400,E=.5;function H({index:e,json:i,requestJson:n={},isWindowMinimized:a,windowOrder:p,onClose:l}){let[t,x]=useState(false),[v,S]=useState(false),[I,L]=useState(false),[f,C]=useState(false),[V,J]=useState({width:0,height:0}),[R,k]=useState(true),[d,_e]=useState(false),[fe,Fe]=useState(true),[Le,me]=useState(false),[D,xe]=useState(q),$=useRef(),{onMouseEnter:$e,onMouseLeave:Ge,isHovered:Ye}=b$1(),{height:G,width:O}=a$1(),[we,Xe]=useState({x:O/2+q/4-e*20,y:G/2-h/2+e*30}),A=useRef(),Ze=useMemo(()=>Object.keys(i)?.length,[i]),he=Ra(),g=Number(A.current?.state?.width)||q,ge=r=>{setTimeout(()=>{navigator.clipboard.writeText(r||"").then(()=>{});},10);},ye=useMemo(()=>Object.keys(n)?.length,[n]);return useEffect(()=>{if($.current&&clearTimeout($.current),!d){$.current=setTimeout(()=>{xe(g);},E*1e3);return}xe(g);},[d,g]),jsx(xt,{disabled:t,handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]',defaultPosition:{x:O/2-q/4,y:G/2-h/2},position:{x:O-we.x,y:we.y},onStop:(r,s)=>{Xe({x:O-s.x,y:s.y});},bounds:{top:10},children:jsx(Dialog,{disableEnforceFocus:true,sx:{backgroundColor:"transparent",zIndex:(p||0)+3+(t?1:0),...a&&{display:"none"},transform:"translate(180px, 14px)",...!t&&{width:he?V?.width||D:"fit-content",height:he?V?.height||h:"fit-content"},...t&&{transform:"none !important"}},PaperProps:{style:{margin:0,maxHeight:"100%",maxWidth:"none",background:"transparent",width:v?"fit-content":D,height:v?"fit-content":h,...t&&{width:"100%",height:"100%"},position:"relative"}},onClose:()=>{x(false),k(true),setTimeout(()=>{k(false);},E*1e3);},open:true,hideBackdrop:true,fullScreen:t,"aria-labelledby":"draggable-dialog-title",children:jsx(Resizable,{enable:{left:false,right:true,bottomRight:true,bottom:true},maxHeight:G-40,maxWidth:O,minWidth:t?"100vw":D,minHeight:t?"100vh":"300px",ref:r=>{A.current=r;},onResizeStart:()=>{k(true);},onResizeStop:()=>{k(false);},onResize:(r,s,T)=>{S(true),J({width:T.offsetWidth,height:T.offsetHeight});},defaultSize:{width:D,height:h},style:{background:"transparent",...t&&{height:"100% !important",width:"100% !important",flex:1},...t&&{position:"relative"}},children:jsxs(Ve,{children:[jsx(motion.div,{style:{...t&&{height:oe,position:"fixed",zIndex:1e3}},animate:{width:d?g*2:g,...t&&{width:"100vw"},...!t&&{transform:`translateX(${d?-g:0}px)`}},transition:{duration:E,...R&&{duration:0}},children:jsx(ce,{title:d?"JSON Request & Response":"JSON Response",onClose:()=>l(),onMaximize:()=>{x(r=>!r),k(true),setTimeout(()=>{k(false);},E*1e3);},isHovered:Ye,onMouseHover:$e,onMouseLeave:Ge,maximized:t,id:"draggable-dialog-title",onRequestClick:()=>{_e(r=>!r),k(false),d||A.current?.updateSize({width:q,height:h});},isRequestExpanded:d,showRequestIcon:!!ye})}),jsxs(Box,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",height:t?`calc(100vh - ${w}px)`:(Number(A.current?.state?.height)||h)-w+5,background:"transparent",position:"fixed",width:"100%"},children:[jsx(AnimatePresence,{children:d&&jsxs(motion.div,{initial:{left:t?"50vw":0,...t&&{position:"relative",left:"-50vw"}},animate:{left:t?"50vw":-g,...t&&{position:"relative",left:"0"},...!d&&{left:0}},exit:{left:t?"50vw":0,...t&&{position:"relative",left:"0"}},transition:{duration:E,...R&&{duration:0}},style:{flex:1,backgroundColor:"#E7E7E7B2",backdropFilter:"blur(12px)",height:t?"100vh":"100%",overflowY:"auto",position:"absolute",width:t?"100vw":g,zIndex:19,display:"flex",flexDirection:"column",borderBottomLeftRadius:"12px"},onScroll:()=>{me(true),setTimeout(()=>{me(false);},2e3);},children:[jsxs(se,{isMaximized:t,isScrollingRequest:Le,sx:{background:"#E7E7E7B2"},isRequestShown:d,children:[jsx(de,{children:jsx(ne,{variant:"subtitle1",children:"API Request"})}),jsxs(le,{children:[jsx(b,{disableAnimation:true,onClick:()=>{Fe(r=>!r);},icon:fe?Bd:Ad}),jsx(b,{onClick:()=>{navigator.clipboard.writeText(JSON.stringify(i)).then(()=>{});},icon:ma}),jsx(b,{onClick:()=>{navigator.clipboard.writeText(i?.id||"").then(()=>{});},icon:ka})]})]}),jsxs(B,{value:n,style:Pe,displayDataTypes:false,collapsed:fe?1:void 0,onCopied:(r,s)=>{typeof s=="string"&&ge(s);},enableClipboard:false,children:[jsx(B.CountInfo,{render:(r,{keyName:s})=>{if(!s)return jsx("span",{})}}),jsx(B.Copied,{render:({"data-copied":r,style:s,onClick:T},{keyName:Y})=>Y?jsxs(re,{style:s,onClick:X=>{T?.(X);},children:[jsx(AnimatePresence,{children:r&&jsx(motion.img,{style:{height:"14px",width:"14px"},initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:na,alt:"icon"},"id-icon")}),jsx(AnimatePresence,{children:!r&&jsx(motion.img,{style:{height:"14px",width:"14px"},initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:la,alt:"icon"},"id-icon")})]}):jsx("span",{})})]}),jsx(AnimatePresence,{children:d&&jsx(ae,{sx:{flex:1,height:w,left:0},children:jsx(c$2,{sx:{paddingLeft:"12px",borderBottomRightRadius:"0",background:"#f8f9fb",flex:1},totalCount:ye})})})]})}),jsxs(Ee,{isMaximized:t,isRequestShown:d,style:{left:0,maxHeight:"100vw"},initial:{...t&&{width:"100vw",left:0}},animate:{...t&&{position:"absolute",left:d?"50vw":"0"}},transition:{duration:E,...R&&{duration:0}},onScroll:()=>{C(true),setTimeout(()=>{C(false);},2e3);},children:[jsxs(se,{isMaximized:t,isScrollingRequest:f,isRequestShown:d,children:[jsx(de,{children:jsx(ne,{variant:"subtitle1",children:"API Response"})}),jsxs(le,{children:[jsx(b,{disableAnimation:true,onClick:()=>{L(r=>!r);},icon:I?Bd:Ad}),jsx(b,{onClick:()=>{navigator.clipboard.writeText(JSON.stringify(i,null,2)).then(()=>{});},icon:ma}),jsx(b,{onClick:()=>{navigator.clipboard.writeText(i?.id||"").then(()=>{});},icon:ka})]})]}),jsxs(B,{value:i,style:ie,displayDataTypes:false,collapsed:I?1:void 0,onCopied:(r,s)=>{typeof s=="string"&&ge(s);},children:[jsx(B.CountInfo,{render:(r,{keyName:s})=>{if(!s)return jsx("span",{})}}),jsx(B.Copied,{render:({"data-copied":r,style:s,onClick:T},{keyName:Y})=>Y?jsxs(re,{style:s,onClick:X=>{T?.(X);},children:[jsx(AnimatePresence,{children:r&&jsx(motion.img,{style:{height:"14px",width:"14px"},initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:na,alt:"icon"},"id-icon")}),jsx(AnimatePresence,{children:!r&&jsx(motion.img,{style:{height:"14px",width:"14px"},initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:la,alt:"icon"},"id-icon")})]}):jsx("span",{})})]}),jsx(ae,{sx:{flex:1,height:w},children:jsx(c$2,{sx:{borderBottomLeftRadius:d?0:"12px",background:"#f8f9fb",flex:1},totalCount:Ze})})]})]})]})})})})}var F=createContext({jsonViewerList:[],handleJsonViewerDialogOpen:()=>{},handleWindowMinimize:()=>{},handleWindowOrder:()=>{}});var De=({list:e,onClose:i,isWindowMinimized:n,windowOrder:a})=>e?.length?jsx(Fragment,{children:e.map((p,l)=>jsx(H,{index:l,json:p.json,requestJson:p?.requestJson,onClose:()=>{i(l);},isWindowMinimized:n,windowOrder:a},p.json.id))}):null;var bt=({children:e})=>{let[i,n]=useState([]),[a,p]=useState(false),[l,t]=useState(1),x=useCallback(f=>{if(i.length===7){alert("Maximum allowed active Json Viewer is 7 per table.");return}if(i.some(R=>R.json.id===f.json.id))return;let C=structuredClone(f.json),V=C.request_body,J={json:C,requestJson:f.requestJson||V||void 0};delete J.json.request_body,n(R=>[...R,J]);},[i]),v=f=>{n(C=>C.filter((V,J)=>f!==J));},S=f=>{p(f);},I=f=>{t(f);},L=useMemo(()=>({jsonViewerList:i,handleJsonViewerDialogOpen:x,handleWindowMinimize:S,handleWindowOrder:I}),[i,x]);return jsxs(F.Provider,{value:L,children:[e,jsx(De,{list:i,onClose:v,isWindowMinimized:a,windowOrder:l})]})};var Rt=({isWindowMinimized:e,windowOrder:i})=>{let{handleJsonViewerDialogOpen:n,handleWindowMinimize:a,handleWindowOrder:p}=useContext(F),l=useCallback(()=>{a(e);},[a,e]),t=useCallback(()=>{p(i);},[p,i]);return useEffect(()=>{t();},[t]),useEffect(()=>{l();},[l]),{handleJsonViewerDialogOpen:n}};var Mo=H;export{b as a,ce as b,F as c,De as d,bt as e,Rt as f,Mo as g};
|
|
1
|
+
import {c as c$2}from'./chunk-VI4EBPCV.js';import {c,e}from'./chunk-BX63HTMQ.js';import {a,c as c$1,d}from'./chunk-6RMDSMJP.js';import {b as b$1,a as a$1}from'./chunk-WGMZ5XLV.js';import {Ra}from'./chunk-WXO77AL5.js';import {pa,ad,Ed,Dd,oa,ma,na}from'./chunk-ROXE5K4B.js';import tt,{memo,createContext,useState,useRef,useMemo,useEffect,useCallback,useContext}from'react';import {styled,Popover,Input,Typography,Box,Dialog}from'@mui/material';import B from'@uiw/react-json-view';import {motion,AnimatePresence}from'framer-motion';import {Resizable}from're-resizable';import xt from'react-draggable';import it from'@mui/material/Box';import {useTranslation}from'react-i18next';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var w=37,oe="32px",h=545;styled(Popover)(({theme:e})=>({backgroundColor:e.palette.background.default,boxShadow:e.shadows[21],"& .MuiPaper-root":{borderRadius:"12px"}}));var et=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% - ${et+w}px`,overflow:"auto"},Pe={...ie,background:"transparent","--w-rjv-line-color":"transparent"},ze=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})),re=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 ne=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"})),se=styled(Box,{shouldForwardProp:e=>!["isMaximized","isScrollingRequest","isRequestShown"].includes(e)})(({isScrollingRequest:e,isMaximized:i,isRequestShown:n,theme:a})=>({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:a.shadows[23]},...i&&{paddingTop:oe,transition:"padding 0.3s ease-in-out",...n&&{width:"50%"}}})),ae=styled(Box,{shouldForwardProp:e=>!["isMaximized","isRequestShown"].includes(e)})(({isMaximized:e,isRequestShown:i})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:"8px",height:w,position:"fixed",bottom:0,right:0,left:e?"50vw":0,...!i&&{left:0}})),le=styled(Box)(()=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",paddingBlock:"10px",paddingInlineStart:"8px",paddingInlineEnd:"0px"})),de=styled(Box)(()=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"4px",paddingBlock:"10px",paddingInlineStart:"0px",paddingInlineEnd:"12px"})),Ee=styled(motion.div,{shouldForwardProp:e=>!["isRequestShown","isMaximized"].includes(e)})(({isRequestShown:e,isMaximized:i})=>({width:"100%",height:"100%",overflowY:"auto",background:"#fff",zIndex:20,position:"relative",display:"flex",flexDirection:"column",borderBottomRightRadius:"12px",borderBottomLeftRadius:e?0:"12px",...i&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,height:"100vh"}}));styled(motion.div,{shouldForwardProp:e=>!["isMaximized","currentRequestWidth"].includes(e)})(({isMaximized:e,currentRequestWidth:i})=>({backgroundColor:"#E7E7E7B2",backdropFilter:"blur(12px)",height:e?"100vh":"100%",overflowY:"auto",position:"absolute",width:e?"100vw":i,zIndex:19,display:"flex",flexDirection:"column",borderBottomLeftRadius:"12px"}));styled(Box,{shouldForwardProp:e=>!["isMaximized","currentHeight"].includes(e)})(({isMaximized:e,currentHeight:i})=>({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",height:e?`calc(100vh - ${w}px)`:(i||h)-w+5,background:"transparent",position:"fixed",width:"100%"}));var Ve=styled(Box)(()=>({position:"fixed",width:"100%",background:"transparent",height:"100%"}));function nt({onClick:e,icon:i,label:n,disableAnimation:a,...p}){let[l,t]=tt.useState(false),{t:x}=useTranslation();return jsxs(ze,{...p,onClick:S=>{e?.(S),!a&&(t(true),setTimeout(()=>{t(false);},2e3));},children:[jsxs(it,{sx:{width:"16px",display:"flex",overflow:"hidden",justifyContent:"center",alignItems:"center"},children:[jsx(AnimatePresence,{mode:"wait",children:l&&jsx(motion.img,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,transition:{duration:.1}},transition:{duration:.4},src:pa,alt:"icon"},"id-icon")}),jsx(AnimatePresence,{mode:"wait",children:!l&&jsx(motion.img,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,transition:{duration:.1}},transition:{duration:.4},src:i,alt:"icon"},"id-icon")})]}),n&&jsxs(Fragment,{children:[jsx(AnimatePresence,{children:l&&jsx(motion.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,position:"absolute"},transition:{duration:.4},children:x("copied")})}),jsx(AnimatePresence,{children:!l&&jsx(motion.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,position:"absolute",width:"53px"},transition:{duration:.4},children:n})})]})]})}var Oe=memo(nt);var b=Oe;function lt({title:e$1,onClose:i,onMaximize:n,maximized:a$1=false,id:p,onMouseHover:l,onMouseLeave:t,onRequestClick:x,isRequestExpanded:v=false,showRequestIcon:S=false,isHovered:I=false}){return jsx(c,{id:p,maximized:a$1||false,children:jsx(e,{isHovered:true,onMouseEnter:l,onMouseLeave:t,isMaximized:a$1,title:e$1,icon:ad,leftActions:jsxs(Fragment,{children:[jsx(a,{onClick:i}),jsx(c$1,{isMaximized:a$1,onClick:n}),S&&jsx(d,{onClick:x,isExpanded:v,isHovered:I,children:"Request"})]})})})}var Me=memo(lt);var ce=Me;var q=400,E=.5;function H({index:e,json:i,requestJson:n={},isWindowMinimized:a,windowOrder:p,onClose:l}){let[t,x]=useState(false),[v,S]=useState(false),[I,L]=useState(false),[f,C]=useState(false),[V,J]=useState({width:0,height:0}),[R,k]=useState(true),[d,_e]=useState(false),[fe,Fe]=useState(true),[Le,me]=useState(false),[D,xe]=useState(q),$=useRef(),{onMouseEnter:$e,onMouseLeave:Ge,isHovered:Ye}=b$1(),{height:G,width:O}=a$1(),[we,Xe]=useState({x:O/2+q/4-e*20,y:G/2-h/2+e*30}),A=useRef(),Ze=useMemo(()=>Object.keys(i)?.length,[i]),he=Ra(),g=Number(A.current?.state?.width)||q,ge=r=>{setTimeout(()=>{navigator.clipboard.writeText(r||"").then(()=>{});},10);},ye=useMemo(()=>Object.keys(n)?.length,[n]);return useEffect(()=>{if($.current&&clearTimeout($.current),!d){$.current=setTimeout(()=>{xe(g);},E*1e3);return}xe(g);},[d,g]),jsx(xt,{disabled:t,handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]',defaultPosition:{x:O/2-q/4,y:G/2-h/2},position:{x:O-we.x,y:we.y},onStop:(r,s)=>{Xe({x:O-s.x,y:s.y});},bounds:{top:10},children:jsx(Dialog,{disableEnforceFocus:true,sx:{backgroundColor:"transparent",zIndex:(p||0)+3+(t?1:0),...a&&{display:"none"},transform:"translate(180px, 14px)",...!t&&{width:he?V?.width||D:"fit-content",height:he?V?.height||h:"fit-content"},...t&&{transform:"none !important"}},PaperProps:{style:{margin:0,maxHeight:"100%",maxWidth:"none",background:"transparent",width:v?"fit-content":D,height:v?"fit-content":h,...t&&{width:"100%",height:"100%"},position:"relative"}},onClose:()=>{x(false),k(true),setTimeout(()=>{k(false);},E*1e3);},open:true,hideBackdrop:true,fullScreen:t,"aria-labelledby":"draggable-dialog-title",children:jsx(Resizable,{enable:{left:false,right:true,bottomRight:true,bottom:true},maxHeight:G-40,maxWidth:O,minWidth:t?"100vw":D,minHeight:t?"100vh":"300px",ref:r=>{A.current=r;},onResizeStart:()=>{k(true);},onResizeStop:()=>{k(false);},onResize:(r,s,T)=>{S(true),J({width:T.offsetWidth,height:T.offsetHeight});},defaultSize:{width:D,height:h},style:{background:"transparent",...t&&{height:"100% !important",width:"100% !important",flex:1},...t&&{position:"relative"}},children:jsxs(Ve,{children:[jsx(motion.div,{style:{...t&&{height:oe,position:"fixed",zIndex:1e3}},animate:{width:d?g*2:g,...t&&{width:"100vw"},...!t&&{transform:`translateX(${d?-g:0}px)`}},transition:{duration:E,...R&&{duration:0}},children:jsx(ce,{title:d?"JSON Request & Response":"JSON Response",onClose:()=>l(),onMaximize:()=>{x(r=>!r),k(true),setTimeout(()=>{k(false);},E*1e3);},isHovered:Ye,onMouseHover:$e,onMouseLeave:Ge,maximized:t,id:"draggable-dialog-title",onRequestClick:()=>{_e(r=>!r),k(false),d||A.current?.updateSize({width:q,height:h});},isRequestExpanded:d,showRequestIcon:!!ye})}),jsxs(Box,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",height:t?`calc(100vh - ${w}px)`:(Number(A.current?.state?.height)||h)-w+5,background:"transparent",position:"fixed",width:"100%"},children:[jsx(AnimatePresence,{children:d&&jsxs(motion.div,{initial:{left:t?"50vw":0,...t&&{position:"relative",left:"-50vw"}},animate:{left:t?"50vw":-g,...t&&{position:"relative",left:"0"},...!d&&{left:0}},exit:{left:t?"50vw":0,...t&&{position:"relative",left:"0"}},transition:{duration:E,...R&&{duration:0}},style:{flex:1,backgroundColor:"#E7E7E7B2",backdropFilter:"blur(12px)",height:t?"100vh":"100%",overflowY:"auto",position:"absolute",width:t?"100vw":g,zIndex:19,display:"flex",flexDirection:"column",borderBottomLeftRadius:"12px"},onScroll:()=>{me(true),setTimeout(()=>{me(false);},2e3);},children:[jsxs(se,{isMaximized:t,isScrollingRequest:Le,sx:{background:"#E7E7E7B2"},isRequestShown:d,children:[jsx(de,{children:jsx(ne,{variant:"subtitle1",children:"API Request"})}),jsxs(le,{children:[jsx(b,{disableAnimation:true,onClick:()=>{Fe(r=>!r);},icon:fe?Ed:Dd}),jsx(b,{onClick:()=>{navigator.clipboard.writeText(JSON.stringify(i)).then(()=>{});},icon:oa}),jsx(b,{onClick:()=>{navigator.clipboard.writeText(i?.id||"").then(()=>{});},icon:ma})]})]}),jsxs(B,{value:n,style:Pe,displayDataTypes:false,collapsed:fe?1:void 0,onCopied:(r,s)=>{typeof s=="string"&&ge(s);},enableClipboard:false,children:[jsx(B.CountInfo,{render:(r,{keyName:s})=>{if(!s)return jsx("span",{})}}),jsx(B.Copied,{render:({"data-copied":r,style:s,onClick:T},{keyName:Y})=>Y?jsxs(re,{style:s,onClick:X=>{T?.(X);},children:[jsx(AnimatePresence,{children:r&&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(AnimatePresence,{children:!r&&jsx(motion.img,{style:{height:"14px",width:"14px"},initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:na,alt:"icon"},"id-icon")})]}):jsx("span",{})})]}),jsx(AnimatePresence,{children:d&&jsx(ae,{sx:{flex:1,height:w,left:0},children:jsx(c$2,{sx:{paddingLeft:"12px",borderBottomRightRadius:"0",background:"#f8f9fb",flex:1},totalCount:ye})})})]})}),jsxs(Ee,{isMaximized:t,isRequestShown:d,style:{left:0,maxHeight:"100vw"},initial:{...t&&{width:"100vw",left:0}},animate:{...t&&{position:"absolute",left:d?"50vw":"0"}},transition:{duration:E,...R&&{duration:0}},onScroll:()=>{C(true),setTimeout(()=>{C(false);},2e3);},children:[jsxs(se,{isMaximized:t,isScrollingRequest:f,isRequestShown:d,children:[jsx(de,{children:jsx(ne,{variant:"subtitle1",children:"API Response"})}),jsxs(le,{children:[jsx(b,{disableAnimation:true,onClick:()=>{L(r=>!r);},icon:I?Ed:Dd}),jsx(b,{onClick:()=>{navigator.clipboard.writeText(JSON.stringify(i,null,2)).then(()=>{});},icon:oa}),jsx(b,{onClick:()=>{navigator.clipboard.writeText(i?.id||"").then(()=>{});},icon:ma})]})]}),jsxs(B,{value:i,style:ie,displayDataTypes:false,collapsed:I?1:void 0,onCopied:(r,s)=>{typeof s=="string"&&ge(s);},children:[jsx(B.CountInfo,{render:(r,{keyName:s})=>{if(!s)return jsx("span",{})}}),jsx(B.Copied,{render:({"data-copied":r,style:s,onClick:T},{keyName:Y})=>Y?jsxs(re,{style:s,onClick:X=>{T?.(X);},children:[jsx(AnimatePresence,{children:r&&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(AnimatePresence,{children:!r&&jsx(motion.img,{style:{height:"14px",width:"14px"},initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:na,alt:"icon"},"id-icon")})]}):jsx("span",{})})]}),jsx(ae,{sx:{flex:1,height:w},children:jsx(c$2,{sx:{borderBottomLeftRadius:d?0:"12px",background:"#f8f9fb",flex:1},totalCount:Ze})})]})]})]})})})})}var F=createContext({jsonViewerList:[],handleJsonViewerDialogOpen:()=>{},handleWindowMinimize:()=>{},handleWindowOrder:()=>{}});var De=({list:e,onClose:i,isWindowMinimized:n,windowOrder:a})=>e?.length?jsx(Fragment,{children:e.map((p,l)=>jsx(H,{index:l,json:p.json,requestJson:p?.requestJson,onClose:()=>{i(l);},isWindowMinimized:n,windowOrder:a},p.json.id))}):null;var bt=({children:e})=>{let[i,n]=useState([]),[a,p]=useState(false),[l,t]=useState(1),x=useCallback(f=>{if(i.length===7){alert("Maximum allowed active Json Viewer is 7 per table.");return}if(i.some(R=>R.json.id===f.json.id))return;let C=structuredClone(f.json),V=C.request_body,J={json:C,requestJson:f.requestJson||V||void 0};delete J.json.request_body,n(R=>[...R,J]);},[i]),v=f=>{n(C=>C.filter((V,J)=>f!==J));},S=f=>{p(f);},I=f=>{t(f);},L=useMemo(()=>({jsonViewerList:i,handleJsonViewerDialogOpen:x,handleWindowMinimize:S,handleWindowOrder:I}),[i,x]);return jsxs(F.Provider,{value:L,children:[e,jsx(De,{list:i,onClose:v,isWindowMinimized:a,windowOrder:l})]})};var Rt=({isWindowMinimized:e,windowOrder:i})=>{let{handleJsonViewerDialogOpen:n,handleWindowMinimize:a,handleWindowOrder:p}=useContext(F),l=useCallback(()=>{a(e);},[a,e]),t=useCallback(()=>{p(i);},[p,i]);return useEffect(()=>{t();},[t]),useEffect(()=>{l();},[l]),{handleJsonViewerDialogOpen:n}};var Mo=H;export{b as a,ce as b,F as c,De as d,bt as e,Rt as f,Mo as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Ig,Jg}from'./chunk-ROXE5K4B.js';import {styled,Box}from'@mui/material';import v,{useMemo}from'react';import {jsx,jsxs}from'react/jsx-runtime';var c=styled(Box)(({theme:e})=>({height:"32px",borderRadius:"4px",backgroundColor:e.palette.action.hover,padding:"2px",display:"flex",alignItems:"center",position:"relative",cursor:"pointer"})),d=styled(Box,{shouldForwardProp:e=>e!=="isActive"})(({isActive:e})=>({flex:1,display:"flex",justifyContent:"center",alignItems:"center",position:"relative",zIndex:2,opacity:e?1:.5})),u=styled(Box,{shouldForwardProp:e=>e!=="activeIndex"})(({theme:e,activeIndex:o})=>({position:"absolute",top:2,left:o*30+2,transition:"all 0.25s ease-in-out",width:"28px",height:"28px",backgroundColor:e.palette.common.white,borderRadius:"2px",boxShadow:"0px 0px 4px 0px rgba(0, 0, 0, 0.20)"}));var x=(t=>(t.LIST="LIST",t.CARDS="CARDS",t.MAP="MAP",t))(x||{});var h=e=>{let o=v.Children.count(e.children)-1;return jsx(c,{...e,sx:{width:o*30+2}})},m=h;var V=[{icon:jsx("img",{src:Ig,alt:"card"}),value:"CARDS"},{icon:jsx("img",{src:Jg,alt:"LIST"}),value:"LIST"}],y=e=>{let{currentView:o,onToggleClick:a,getOverrideViews:t}=e,l=useMemo(()=>t?t(V):V,[t]),f=useMemo(()=>l.findIndex(r=>r.value===o),[l,o]);return a?jsxs(m,{children:[l.map(r=>jsx(d,{onClick:()=>a(r.value),sx:{height:"11.6px",width:"11.6px"},isActive:o===r.value,children:r.icon},r.value)),jsx(u,{activeIndex:f})]}):null},T=y;var M=T;export{x as a,M as b};
|