@tap-payments/os-micro-frontend-shared 0.3.242 → 0.3.244
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-26JDD265.js +1 -0
- package/build/_chunks/{chunk-TDFNWFK7.js → chunk-2LEYPKDY.js} +1 -1
- package/build/_chunks/{chunk-7R6GKSYQ.js → chunk-2ZJH27XO.js} +1 -1
- package/build/_chunks/{chunk-AVTZV3J7.js → chunk-3DFGUAHQ.js} +1 -1
- package/build/_chunks/{chunk-GRKRA3TP.js → chunk-3MBZ55DP.js} +1 -1
- package/build/_chunks/{chunk-B5TZKBR5.js → chunk-3VJ65CKN.js} +1 -1
- package/build/_chunks/chunk-4FJ26UVI.js +2 -0
- package/build/_chunks/{chunk-7PLZT2KW.js → chunk-4N3FBJNL.js} +1 -1
- package/build/_chunks/{chunk-EGFHFXWK.js → chunk-4S23GCB4.js} +1 -1
- package/build/_chunks/{chunk-KVC3QSDQ.js → chunk-55OTIRJ3.js} +1 -1
- package/build/_chunks/{chunk-S4ZHXBPB.js → chunk-5HM27XEJ.js} +1 -1
- package/build/_chunks/{chunk-QWWU4QAA.js → chunk-6BJANCV7.js} +1 -1
- package/build/_chunks/{chunk-5H7MD7LO.js → chunk-6ELMQ3AM.js} +1 -1
- package/build/_chunks/chunk-7HYRJMV7.js +2 -0
- package/build/_chunks/{chunk-SYEHTDS6.js → chunk-7OM4OZ7R.js} +1 -1
- package/build/_chunks/{chunk-GUXJEFPL.js → chunk-AJJSWLJL.js} +1 -1
- package/build/_chunks/{chunk-LXD5Y42H.js → chunk-BHSKFHRE.js} +1 -1
- package/build/_chunks/chunk-BYJ7JVY3.js +1 -0
- package/build/_chunks/{chunk-LFBTKZ3V.js → chunk-C76GGOHP.js} +1 -1
- package/build/_chunks/{chunk-EJ2GRPAY.js → chunk-CC7EFANR.js} +1 -1
- package/build/_chunks/{chunk-QDW7GZN6.js → chunk-CWB7XNU7.js} +1 -1
- package/build/_chunks/{chunk-BQWD3KO4.js → chunk-CXHNLMKI.js} +1 -1
- package/build/_chunks/{chunk-NPCTL2R7.js → chunk-DFFLKF4P.js} +1 -1
- package/build/_chunks/{chunk-BUPWQI3W.js → chunk-DV25U65X.js} +2 -2
- package/build/_chunks/{chunk-JI5U3KGK.js → chunk-DZFU4QPT.js} +1 -1
- package/build/_chunks/{chunk-FWPVRT34.js → chunk-EJ6HUZR5.js} +1 -1
- package/build/_chunks/{chunk-6ASQZ2RI.js → chunk-FLQCQEHB.js} +1 -1
- package/build/_chunks/{chunk-LOFKIY7J.js → chunk-G2HCO4KW.js} +1 -1
- package/build/_chunks/{chunk-V4YG7AP4.js → chunk-GDTR32HP.js} +1 -1
- package/build/_chunks/{chunk-BA5OFEBT.js → chunk-GXUVKR7C.js} +1 -1
- package/build/_chunks/chunk-H6KCP5WM.js +1 -0
- package/build/_chunks/{chunk-YNOCNDOA.js → chunk-HKC2AO7Q.js} +1 -1
- package/build/_chunks/{chunk-5WL77ZBM.js → chunk-HROFC3Z7.js} +2 -2
- package/build/_chunks/{chunk-VV5IC3DP.js → chunk-IDE2FEIW.js} +1 -1
- package/build/_chunks/{chunk-G3QKYZM2.js → chunk-IRSOFOW4.js} +1 -1
- package/build/_chunks/{chunk-6USHHZAA.js → chunk-IZDDMEFF.js} +1 -1
- package/build/_chunks/{chunk-6E2SGPTJ.js → chunk-J76ZW2JS.js} +1 -1
- package/build/_chunks/{chunk-KTFIN54Q.js → chunk-JJX36QPC.js} +1 -1
- package/build/_chunks/{chunk-52SSIU72.js → chunk-JO5WFWAJ.js} +1 -1
- package/build/_chunks/{chunk-D23EYDCG.js → chunk-JR2SE6NE.js} +1 -1
- package/build/_chunks/{chunk-HWDODLOQ.js → chunk-JVG5UN4Z.js} +2 -2
- package/build/_chunks/{chunk-OMISGJLX.js → chunk-K5ICBD7X.js} +1 -1
- package/build/_chunks/{chunk-R6Y42OPH.js → chunk-KHWWD7J3.js} +1 -1
- package/build/_chunks/{chunk-3Z6ULCGA.js → chunk-KT5N4ENC.js} +1 -1
- package/build/_chunks/{chunk-QLF4C46U.js → chunk-KZGSM2JY.js} +1 -1
- package/build/_chunks/{chunk-QLXQSDL7.js → chunk-L65TSVYE.js} +1 -1
- package/build/_chunks/{chunk-6RTZSBSD.js → chunk-LYLC5A5R.js} +1 -1
- package/build/_chunks/{chunk-OBK62FOF.js → chunk-MKMNDEWM.js} +1 -1
- package/build/_chunks/{chunk-CWNHOUN5.js → chunk-MQN2MT2R.js} +1 -1
- package/build/_chunks/{chunk-WZQR2LCT.js → chunk-MSWKK36W.js} +1 -1
- package/build/_chunks/chunk-MX4PENFY.js +1 -0
- package/build/_chunks/{chunk-ZEQDF7FG.js → chunk-N4JQPHMV.js} +1 -1
- package/build/_chunks/{chunk-QHK62NO3.js → chunk-OIWYMPWX.js} +1 -1
- package/build/_chunks/{chunk-JG5OM35T.js → chunk-OSHM7QKM.js} +1 -1
- package/build/_chunks/{chunk-7FWE55BT.js → chunk-OUR46KNI.js} +1 -1
- package/build/_chunks/{chunk-BMSJV3FH.js → chunk-PHYUVPED.js} +1 -1
- package/build/_chunks/chunk-PW65L7RT.js +1 -0
- package/build/_chunks/{chunk-I7KBFAH7.js → chunk-Q4LS63CQ.js} +1 -1
- package/build/_chunks/{chunk-VNHVDZKL.js → chunk-RTBDYNH2.js} +1 -1
- package/build/_chunks/{chunk-MXQFATMM.js → chunk-SHM2FONS.js} +1 -1
- package/build/_chunks/{chunk-7THWDMHL.js → chunk-U5UZTT2I.js} +1 -1
- package/build/_chunks/{chunk-GLTYG62E.js → chunk-UA5TIEDO.js} +1 -1
- package/build/_chunks/{chunk-6JLKJPL3.js → chunk-UD4BRMOT.js} +1 -1
- package/build/_chunks/{chunk-X5HJKL6O.js → chunk-UKTF67RR.js} +1 -1
- package/build/_chunks/{chunk-GEJI7SEX.js → chunk-V6DYLCV6.js} +1 -1
- package/build/_chunks/{chunk-J7R6JFXM.js → chunk-VQBMOP6H.js} +1 -1
- package/build/_chunks/{chunk-I6RRJ7ME.js → chunk-W7J5RYUV.js} +1 -1
- package/build/_chunks/{chunk-SR3UFTU3.js → chunk-XA6PS7NH.js} +1 -1
- package/build/_chunks/{chunk-JCFOE4DQ.js → chunk-YPDHRUOH.js} +1 -1
- package/build/_chunks/{chunk-GP7PBSOF.js → chunk-YWA3HTWT.js} +1 -1
- package/build/_chunks/{chunk-CTGKNHG3.js → chunk-Z6KCOMOK.js} +1 -1
- package/build/_chunks/{chunk-KDRRRYZL.js → chunk-ZNG2PLND.js} +1 -1
- package/build/_chunks/{chunk-U2PXB4YH.js → chunk-ZOOP22CX.js} +1 -1
- package/build/components/ActionsDropdownMenu/index.js +1 -1
- package/build/components/ActiveFilterChip/index.js +1 -1
- package/build/components/Alert/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/AreaChart/index.js +1 -1
- package/build/components/Autocomplete/index.js +1 -1
- package/build/components/AvatarStack/index.js +1 -1
- package/build/components/Calender/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/CountryFilter/index.js +1 -1
- package/build/components/CountryFlag/index.js +1 -1
- package/build/components/CurrenciesMenu/index.js +1 -1
- package/build/components/CurrencyAmount/index.js +1 -1
- package/build/components/CurrencyAmountInput/index.js +1 -1
- package/build/components/CurrencySymbol/index.js +1 -1
- package/build/components/DateFilter/index.js +1 -1
- package/build/components/DeviceIcon/index.js +1 -1
- package/build/components/DropdownMenu/index.js +1 -1
- package/build/components/EmptyState/index.js +1 -1
- package/build/components/ErrorToast/index.js +1 -1
- package/build/components/FileDropbox/index.js +1 -1
- package/build/components/FilePreview/index.js +1 -1
- package/build/components/FileUploader/index.js +1 -1
- package/build/components/FilterDropdown/index.js +1 -1
- package/build/components/Filters/index.js +1 -1
- package/build/components/FlippingCard/index.js +1 -1
- package/build/components/FormSelect/index.js +1 -1
- package/build/components/GroupedSelect/index.js +1 -1
- package/build/components/HeatMap/index.js +1 -1
- package/build/components/IconWithBadge/index.js +1 -1
- package/build/components/InputBase/index.js +1 -1
- package/build/components/Inputs/index.js +1 -1
- package/build/components/JSONViewer/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/Logo/index.js +1 -1
- package/build/components/MFWidgetLoader/index.js +1 -1
- package/build/components/MaskedText/index.js +1 -1
- package/build/components/MultiSelect/index.js +1 -1
- package/build/components/NestedDropdown/index.js +1 -1
- package/build/components/NestedMultiSelect/index.js +1 -1
- package/build/components/PaymentSourceFilter/index.js +1 -1
- package/build/components/PhoneFilter/index.js +1 -1
- package/build/components/PhoneInput/index.js +1 -1
- package/build/components/ProgressRing/index.js +1 -1
- package/build/components/RadioGroup/index.js +1 -1
- package/build/components/RangeCalender/index.js +1 -1
- package/build/components/RatingCount/index.js +1 -1
- package/build/components/ReferenceTypeFilter/index.js +1 -1
- package/build/components/RightLeftExpandingCenterChip/index.js +1 -1
- package/build/components/SearchButton/index.js +1 -1
- package/build/components/SearchInput/index.js +1 -1
- package/build/components/SheetViewChip/index.js +1 -1
- package/build/components/Sidebar/index.js +1 -1
- package/build/components/StatusBar/index.js +1 -1
- package/build/components/StatusButton/index.js +1 -1
- package/build/components/StatusFilter/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/TextInput/index.js +1 -1
- package/build/components/Timepicker/index.js +1 -1
- package/build/components/ToggleView/index.js +1 -1
- package/build/components/Toolbar/index.js +1 -1
- package/build/components/ToolbarIcon/index.js +1 -1
- package/build/components/TreeDropdown/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/index.js +1 -1
- package/build/components/primitives/index.js +1 -1
- package/build/constants/assets.d.ts +1 -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 +1 -1
- package/build/_chunks/chunk-3T7G4PAY.js +0 -1
- package/build/_chunks/chunk-7DMSRKG7.js +0 -1
- package/build/_chunks/chunk-ECBP7JZ6.js +0 -1
- package/build/_chunks/chunk-GCJPCGH3.js +0 -2
- package/build/_chunks/chunk-L7L22FDR.js +0 -1
- package/build/_chunks/chunk-LKQ24TL4.js +0 -2
- package/build/_chunks/chunk-MFZ3F3JQ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import {v}from'./chunk-
|
|
1
|
+
import {v}from'./chunk-AJJSWLJL.js';import {Bc,Ba,Ca}from'./chunk-BYJ7JVY3.js';import {Fb,Wc}from'./chunk-4FJ26UVI.js';import mo,{useId,useState,useRef,useCallback,useEffect,useMemo}from'react';import B from'@mui/material/Box';import uo from'@mui/material/ClickAwayListener';import ro from'@mui/material/Stack';import Y from'@mui/material/Typography';import {styled,alpha}from'@mui/material/styles';import O from'@mui/material/Button';import lo from'@mui/material/TextField';import po from'@mui/material/MenuList';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useTranslation}from'react-i18next';import {RgbColorPicker,RgbaColorPicker}from'react-colorful';import fo from'@mui/material/Popper';import J from'@mui/material/MenuItem';import j from'@mui/material/InputAdornment';import v$1 from'color';import {Popper}from'@mui/material';var G=styled("button")({background:"transparent",border:"none",padding:0,margin:0,cursor:"pointer",width:10,height:10,display:"flex",justifyContent:"center",alignItems:"center","&:disabled, &.Mui-disabled":{opacity:.5,cursor:"not-allowed"}}),D=styled(B)(({theme:o})=>({boxShadow:"0px 8px 30px rgba(0, 0, 0, 0.16)",width:264,backgroundColor:"#ffffff",padding:"12px",borderRadius:o.spacing(1),"& .react-colorful":{width:"100%","&__saturation":{minHeight:152,borderRadius:"4px",marginBottom:o.spacing(2),border:0,"&-pointer":{width:13,height:13}},"&__hue":{borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}},"&__alpha":{marginTop:o.spacing(2),marginBottom:0,border:0,borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}}}})),V=styled(B)(()=>({display:"flex",gap:"8px",justifyContent:"flex-end"})),X=styled(o=>jsx(Y,{...o,component:"button"}))(({theme:o})=>({fontWeight:500,fontSize:"9px",color:o.palette.info.dark,textDecoration:"underline",cursor:"pointer",background:"transparent",border:"none",padding:0,margin:0,"&:disabled, &.Mui-disabled":{color:alpha(o.palette.info.dark,.5),textDecoration:"none"},"&:hover":{textDecoration:"none"}})),$=styled(O)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.info.dark}`,backgroundColor:o.palette.info.dark,fontWeight:700,fontSize:"11px",color:o.palette.common.white,"&:hover":{backgroundColor:o.palette.info.dark}})),U=styled(O)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.divider}`,backgroundColor:o.palette.common.white,fontWeight:500,fontSize:"11px",color:o.palette.text.primary,"&:hover":{background:"transparent"}})),Z=styled(B,{shouldForwardProp:o=>o!=="active"})(({theme:o,active:s})=>({display:"flex",justifyContent:"space-between",alignItems:"center",color:o.palette.text.primary,border:"1px solid #F2F2F2",fontSize:12,fontWeight:500,backgroundColor:"transparent",padding:"4px 8px",borderRadius:"4px",minWidth:70,cursor:"pointer",...s&&{border:"1px solid #1F88D0",boxShadow:"0px 0px 4px 0px #1F88D080"}})),q=styled(po)({backgroundColor:"#ffffff",borderRadius:"4px",boxShadow:"0px 8px 30px 0px #00000029",minWidth:70,"& .MuiMenuItem-root":{fontSize:12,fontWeight:500,padding:"4px 8px"}}),x=styled(lo)(({theme:o})=>({"& .MuiOutlinedInput-root":{fontSize:"12px",fontWeight:500,borderRadius:"4px","& input":{padding:"4px","&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},"&[type=number]":{MozAppearance:"textfield"}},"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"},"&:hover, &.Mui-focused":{"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"}}}}));var ho=({scheme:o,setScheme:s})=>{let[n,r]=mo.useState(null),m=!!n,a=useCallback(c=>{r(n?null:c.currentTarget);},[n]),i=useCallback(()=>{r(null);},[]),d=useCallback(c=>{i(),s(c);},[i,s]);return jsxs(Fragment,{children:[jsxs(Z,{component:"button",active:m,onClick:a,children:[o,jsx(B,{component:"img",sx:{transform:m?"rotateZ(180deg)":"rotateZ(0)",transition:"200ms transform ease-out"},src:Wc})]}),jsx(fo,{anchorEl:n,open:!!n,placement:"bottom",disablePortal:true,keepMounted:true,modifiers:[{name:"offset",options:{offset:[0,4]}}],children:jsx(uo,{onClickAway:c=>{n?.contains(c.target)||i();},children:jsxs(q,{children:[jsx(J,{onClick:()=>d("RGB"),children:"RGB"}),jsx(J,{onClick:()=>d("HEX"),children:"HEX"})]})})})]})},K=ho;var Ro=({value:o,onChange:s,disableAlpha:n=false})=>{let[r,m]=useState(o),{r:a,g:i,b:d,a:c}=r;useEffect(()=>{m(o);},[o]);let u=useCallback((l,f)=>(isNaN(l)&&(l=0),l<0&&(l=0),l>f&&(l=f),console.log("num",l),l),[]),t=useCallback((l,f)=>P=>{m({...r,[l]:u(+P.target.value,f)});},[r,u]),e=useCallback((l,f)=>{s({...r,[l]:u(r[l],f)});},[s,r,u]);return jsxs(ro,{direction:"row",spacing:1,...n&&{flex:1},children:[jsx(x,{type:"number",value:a,onBlur:()=>e("r",255),onChange:t("r",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),jsx(x,{type:"number",value:i,onBlur:()=>e("g",255),onChange:t("g",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),jsx(x,{type:"number",value:d,onBlur:()=>e("b",255),onChange:t("b",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),!n&&jsx(x,{type:"number",value:c,onBlur:()=>e("a",100),onChange:t("a",100),inputProps:{min:0,max:100,style:{textAlign:"center"}},variant:"outlined",sx:{"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(j,{position:"end",sx:{m:0},children:jsx(Y,{component:"span",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})},size:"small"})]})},Q=Ro;var vo=({value:o,onChange:s,disableAlpha:n=false})=>{let r=useMemo(()=>v$1.rgb(o.r,o.g,o.b,o.a).hex().replace("#",""),[o]),[m,a]=useState(r),i=Math.round(o.a*100);return useEffect(()=>{let t=v$1.rgb(o.r,o.g,o.b).hex().replace("#","");a(t);},[o.r,o.g,o.b]),jsxs(ro,{direction:"row",spacing:1,alignItems:"flex-start",children:[jsx(x,{value:m,onChange:t=>{let e=t.target.value.replace(/[^0-9a-fA-F]/g,"").toUpperCase();e.length>6&&(e=e.slice(0,6)),a(e);},onBlur:()=>{let t=m;if(t.length===3&&(t=t.split("").map(e=>e+e).join(""),a(t)),t.length===6)try{let e=v$1(`#${t}`).alpha(o.a);s({r:e.red(),g:e.green(),b:e.blue(),a:e.alpha()});}catch{a(r);}else a(r);},placeholder:"FFFFFF",sx:{flex:1.4,"& .MuiOutlinedInput-root":{pl:1}},InputProps:{startAdornment:jsx(j,{position:"start",sx:{m:0},children:jsx(Y,{component:"span",color:t=>alpha(t.palette.text.primary,.5),display:"inline-block",fontSize:12,fontWeight:500,children:"#"})})}}),!n&&jsx(x,{type:"number",value:i,onChange:t=>{let e=parseInt(t.target.value,10);isNaN(e)&&(e=0),e<0&&(e=0),e>100&&(e=100),s({...o,a:e/100});},inputProps:{min:0,max:100},sx:{flex:.8,"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(j,{position:"end",sx:{m:0},children:jsx(Y,{component:"span",color:"text.primary",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})}})]})},oo=vo;var Wo=({initialValue:o="#ffffff",onCancel:s,onConfirm:n,disableAlpha:r=false})=>{let[m,a]=useState("RGB"),[i,d]=useState(()=>{let{alpha:p,...y}=Ba(o).value;return {...y,a:p}}),{t:c}=useTranslation(),u=useCallback(()=>{let{alpha:p,...y}=Ba(o).value;d({...y,a:p}),s();},[o,s]),t=useCallback(()=>{let{a:p,...y}=i;n(Ca({...y,alpha:r?1:p}));},[i,n,r]),e=useCallback(p=>{d(r?{...p,a:1}:p);},[r]),l=useCallback(p=>{d({...p,a:p.a/100});},[]),f=useCallback(p=>{d({...p,a:p.a});},[]);return jsxs(D,{className:"color-picker__widget",children:[jsx(r?RgbColorPicker:RgbaColorPicker,{color:i,onChange:e}),jsxs(ro,{mt:2,spacing:1,direction:"row",children:[jsx(K,{scheme:m,setScheme:a}),m==="RGB"?jsx(Q,{value:{...i,a:Math.round(i.a*100)},onChange:l,disableAlpha:r}):jsx(oo,{value:{...i,a:i.a},onChange:f,disableAlpha:r})]}),jsx(v,{sx:{my:"12px"}}),jsxs(V,{className:"color-picker__widget-actions",children:[jsx(U,{className:"color-picker__widget-actions__cancel",onClick:u,children:c("cancel")}),jsx($,{className:"color-picker__widget-actions__confirm",onClick:t,children:c("okay")})]})]})},to=Wo;var no={hideReset:false,disableAlpha:false},Vo=({value:o="#ffffff",onChange:s,onReset:n,sx:r,options:m=no,disabled:a=false})=>{let i=Bc(useId(),"color-picker"),[d,c]=useState(null),{disableAlpha:u=false,hideReset:t=false}={...no,...m},e=useRef(null),l=useCallback(()=>{a||c(e.current);},[a]),f=useCallback(()=>{a||c(null);},[a]),P=useCallback(p=>{s(u?p.substring(0,7):p),c(null);},[s,u]);return jsx(uo,{onClickAway:()=>c(null),children:jsxs(ro,{ref:e,id:i,"data-testid":"ColorPicker",bgcolor:"grey.400",borderRadius:"4px",p:"4px",pr:"12px",direction:"row",justifyContent:"space-between",spacing:1,alignItems:"center",className:"color-picker",sx:r,children:[jsxs(ro,{direction:"row",spacing:1,alignItems:"center",className:"color-picker__controls-wrapper",children:[jsx(B,{borderRadius:"5px",width:32,height:32,sx:{backgroundColor:o},className:"color-picker__viewer"}),jsxs(B,{className:"color-picker__actions-wrapper",children:[jsx(Y,{className:"color-picker__label",fontWeight:500,fontSize:9,color:"text.primary",textTransform:"uppercase",children:o}),jsx(X,{className:"color-picker__edit-btn",type:"button",onClick:l,disabled:a,children:"Edit"})]})]}),t?jsx("div",{}):jsx(G,{className:"color-picker__close-btn",type:"button",disabled:a,onClick:n,children:jsx(B,{component:"img",src:Fb,width:10,height:10})}),jsx(Popper,{anchorEl:d,open:!!d,placement:"top",children:jsx(to,{initialValue:o,onCancel:f,onConfirm:P,disableAlpha:u})})]})})},ao=Vo;var ot=ao;export{ot as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {$,Fb,A,wc,xc}from'./chunk-
|
|
1
|
+
import {$,Fb,A,wc,xc}from'./chunk-BYJ7JVY3.js';import {useState,useEffect,useCallback,useLayoutEffect,useRef,useMemo}from'react';import {useLocation}from'react-router';import {useTheme}from'@mui/material/styles';function H(){let{innerWidth:e,innerHeight:n}=window;return {width:e,height:n}}function ge(){let[e,n]=useState(H);return useEffect(()=>{let t;function o(){cancelAnimationFrame(t),t=requestAnimationFrame(()=>{n(H());});}return window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o),cancelAnimationFrame(t);}},[]),e}var Te=()=>{let[e,n]=useState(false),[t,o]=useState(false),r=useCallback(()=>{n(true);},[]),s=useCallback(()=>{n(false);},[]),i=useCallback(()=>{o(true);},[]),a=useCallback(()=>{o(false);},[]);return {onMouseContentEnter:i,onMouseContentLeave:a,isHovered:e,isContentHovered:t,onMouseEnter:r,onMouseLeave:s}};function be({value:e,delay:n}){let[t,o]=useState(e);return useEffect(()=>{let r;return e?o(e):r=setTimeout(()=>{o(e);},n),()=>{clearTimeout(r);}},[e]),t}function Me(e,n){let[t,o]=useState({});return useEffect(()=>{e&&o(s=>({...s,[e]:n||0}));},[n,e]),{getBadgeCount:useCallback(s=>s?t[s]:"",[t])}}var ke=()=>{let{pathname:e}=useLocation();useLayoutEffect(()=>{$()||(window.location.href="/login");},[e]);};function He(e){return {isParameterSelected:(o,r)=>r?.map(s=>Fb(e,o,s)),getColumnOrder:o=>{let r=e.findIndex(s=>s.name?.toLowerCase()===o?.toLowerCase());return r===-1?100:r}}}var De=e=>{let[n,t]=useState(false);return useEffect(()=>{let o=e?.current;if(!o)return;let r=new IntersectionObserver(([s])=>{t(!s.isIntersecting);});return r.observe(o),()=>r.disconnect()},[e]),{showShadow:n}};var Pe=()=>{let e=useTheme(),n=e.palette.mode==="dark",t=e.palette.mode==="light";return {isDark:n,isLight:t}};function ze(){let[e,n]=useState(0),t=useRef(null),o=A(e),r=()=>{t.current&&(clearInterval(t.current),t.current=null);},s=()=>{r(),n(0);},i=a=>{a<=0||(t.current&&r(),n(a),t.current=setInterval(()=>{n(c=>{let u=c-1;return u<=0&&r(),u});},1e3));};return useEffect(()=>()=>{r();},[]),{timer:e,formattedTime:o,startTimer:i,stopTimer:r,resetTimer:s}}var Ne=e=>{let n=useMemo(()=>new Map(e.map(i=>[i.code.toLowerCase(),i])),[e]),t=useCallback(i=>n.get(i.toLowerCase()),[n]),o=useCallback(({appCode:i,serviceCode:a})=>t(i)?.app_services.find(({code:c})=>c.toLowerCase()===a.toLowerCase()),[t]),r=useCallback(({appCode:i,serviceCode:a})=>o({appCode:i,serviceCode:a})?.functions??[],[o]),s=useCallback(({appCode:i,serviceCode:a,functionCode:c})=>r({appCode:i,serviceCode:a}).find(({code:u})=>u?.toLowerCase()===c.toLowerCase()),[r]);return {getAppInfo:t,getServiceInfo:o,getServiceFunctions:r,getFunctionInfo:s}};function F(e){return useCallback((...n)=>{let t=new CustomEvent(e,{detail:n});window.dispatchEvent(t);},[e])}function Xe(e,n){let t=useRef(n);t.current=n,useEffect(()=>{let o=r=>{let s=r;t.current(...s.detail||[]);};return window.addEventListener(e,o),()=>{window.removeEventListener(e,o);}},[e]);}var et=(e,n)=>{let{selectedEntity:t,selectedMerchant:o,displayName:r}=useMemo(()=>{let s=n?.entities.find(c=>c.id===e?.entityId),i=s?.merchants?.find(c=>c.id===e?.merchantId),a=i?.display_name??i?.legacy_id??"Select";return {selectedEntity:s,selectedMerchant:i,displayName:a}},[n,e?.entityId,e?.merchantId]);return {selectedBrand:n,selectedEntity:t,selectedMerchant:o,displayName:r}};var se=()=>crypto.randomUUID();function rt(){let e=F("on-toast"),n=useCallback(t=>(o,r)=>{let s=r?.id??se();return e({action:"show",variant:t,message:o,options:{...r,id:s}}),s},[e]);return useMemo(()=>{let t=n("default");return t.success=n("success"),t.error=n("error"),t.loading=n("loading"),t.custom=n("custom"),t.dismiss=o=>{e({action:"dismiss",variant:"dismiss",toastId:o});},t.remove=o=>{e({action:"remove",variant:"remove",toastId:o});},t},[n,e])}var ae=10;function at({threshold:e=ae,containerRef:n}={}){let[t,o]=useState(true),[r,s]=useState(false),[i,a]=useState(false),c=useCallback(l=>{let{scrollTop:m,scrollHeight:p,clientHeight:f}=l;a(p>f+e),o(m<=e),s(p-(m+f)<=e);},[e]),u=useCallback(l=>{if(l){if("currentTarget"in l){c(l.currentTarget);return}c(l);}},[c]);return useEffect(()=>{if(!n?.current)return;let l=n.current;u(l);let m=new ResizeObserver(()=>{u(l);});return m.observe(l),()=>{m.disconnect();}},[n,u]),{handleScroll:u,scrolledToTop:t,scrolledToBottom:r,scrollable:i}}var lt=(e={})=>{let{checkUrl:n="/status",checkIntervalMs:t=3e4,debounceMs:o=800,timeoutMs:r=5e3}=e,s=typeof window<"u"&&typeof navigator<"u",[i,a]=useState(s?navigator.onLine:true),[c,u]=useState(false),[l,m]=useState(null),p=useRef(null),f=useRef(null),g=useCallback(d=>{p.current!==null&&window.clearTimeout(p.current),p.current=window.setTimeout(()=>{a(d),p.current=null;},o);},[o]);return useEffect(()=>{if(!s)return;let d=null,w=()=>{f.current!==null&&(window.clearInterval(f.current),f.current=null);},v=async()=>{u(true),m(null),d?.abort(),d=new AbortController;try{let M=window.setTimeout(()=>{d?.abort();},r),y=await fetch(n,{method:"GET",cache:"no-store",signal:d.signal});window.clearTimeout(M);let x=y.ok;g(x),x?w():m(`Health check failed with status ${y.status}`);}catch{g(false),m("Unable to reach network");}finally{u(false);}},S=()=>{w(),g(true);},C=()=>{g(false),w(),v(),f.current=window.setInterval(v,t);};return window.addEventListener("online",S),window.addEventListener("offline",C),navigator.onLine||(v(),f.current=window.setInterval(v,t)),()=>{window.removeEventListener("online",S),window.removeEventListener("offline",C),p.current!==null&&window.clearTimeout(p.current),w(),d?.abort();}},[s,n,t,o,r,g]),s?{isOnline:i,isChecking:c,error:l}:{isOnline:false,isChecking:false,error:"Online status is only available in a browser environment."}};var dt=(e={},n,t)=>{let o=wc(e,t.requiredFilterKeys);return {columns:useMemo(()=>xc(n,o,t),[n,o])}};function ht(e,n){return useCallback(t=>{t.key==="Enter"?(t.preventDefault(),e(),n(t)):t.key==="Escape"&&n(t);},[e,n])}function Ct(){let[e,n]=useState(true);return {onScrollHandler:useCallback(o=>{let{scrollTop:r,scrollHeight:s,clientHeight:i}=o.currentTarget,a=r===0||i<s-r-1;n(c=>c===a?c:a);},[]),showShadow:e}}export{ge as a,Te as b,be as c,Me as d,ke as e,He as f,De as g,Pe as h,ze as i,Ne as j,F as k,Xe as l,et as m,rt as n,at as o,lt as p,dt as q,ht as r,Ct as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {L as L$1}from'./chunk-
|
|
1
|
+
import {L as L$1}from'./chunk-AJJSWLJL.js';import {nc}from'./chunk-BYJ7JVY3.js';import {forwardRef,useRef,useState,useEffect,useCallback,memo}from'react';import y from'@mui/material/SvgIcon';import {jsxs,Fragment,jsx}from'react/jsx-runtime';import E from'@mui/material/IconButton';import G from'@mui/material/InputAdornment';import {styled}from'@mui/material/styles';var o="os-shared-SearchInput",t={root:`${o}-root`,searchAdornment:`${o}-searchAdornment`,searchButton:`${o}-searchButton`,clearButton:`${o}-clearButton`,searchIcon:`${o}-searchIcon`,clearIcon:`${o}-clearIcon`};var L=n=>jsx(y,{viewBox:"0 0 12 12",sx:{width:12,height:12},...n,children:jsx("path",{d:"M7.68817 8.21429L7.6463 8.17242L7.60036 8.20978C6.88378 8.79249 5.97154 9.14299 4.97917 9.14299C2.68489 9.14299 0.815625 7.27372 0.815625 4.97943C0.815625 2.68514 2.68489 0.815869 4.97917 0.815869C7.27345 0.815869 9.14271 2.68514 9.14271 4.97943C9.14271 5.9718 8.79221 6.88405 8.2095 7.60064L8.17215 7.64657L8.21401 7.68844L11.0754 10.5499L11.0754 10.5499L11.0764 10.5508C11.1121 10.5851 11.1406 10.6261 11.1602 10.6715C11.1798 10.7169 11.1902 10.7658 11.1907 10.8153C11.1912 10.8648 11.1818 10.9139 11.1631 10.9597C11.1444 11.0055 11.1168 11.0471 11.0818 11.0821C11.0468 11.1171 11.0052 11.1447 10.9594 11.1634C10.9136 11.1821 10.8645 11.1915 10.815 11.191C10.7655 11.1905 10.7167 11.1801 10.6712 11.1605C10.6258 11.1409 10.5848 11.1124 10.5505 11.0767L10.5496 11.0757L7.68817 8.21429ZM7.43625 7.35711L7.43682 7.35789L7.44469 7.34971C8.03496 6.73571 8.39896 5.90202 8.39896 4.97943C8.39896 3.08554 6.87305 1.55962 4.97917 1.55962C3.08528 1.55962 1.55937 3.08554 1.55937 4.97943C1.55937 6.87332 3.08528 8.39924 4.97917 8.39924C5.90175 8.39924 6.73544 8.03524 7.34944 7.44496L7.35011 7.44566L7.35683 7.43652C7.37913 7.40618 7.40591 7.37941 7.43625 7.35711Z",fill:"#20232B",stroke:"white",strokeWidth:.13125})}),g=n=>jsxs(y,{viewBox:"0 0 13 13",sx:{width:13,height:13},...n,children:[jsx("rect",{width:"13",height:"13",rx:"6.5",fill:"#F2F2F2"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.69808 4.16259C8.78018 4.16065 8.86095 4.18356 8.92981 4.22833C8.99866 4.27309 9.05239 4.33762 9.08393 4.41344C9.11548 4.48927 9.12338 4.57286 9.10659 4.65325C9.08981 4.73365 9.04911 4.80708 8.98986 4.86395L7.07755 6.77626L8.98839 8.68713L8.98986 8.68854C9.02896 8.72608 9.06018 8.77105 9.08169 8.82081C9.1032 8.87057 9.11456 8.92413 9.11511 8.97833C9.11566 9.03254 9.10539 9.08631 9.0849 9.1365C9.06441 9.18669 9.03411 9.23229 8.99578 9.27062C8.95745 9.30895 8.91185 9.33925 8.86166 9.35974C8.81147 9.38023 8.7577 9.3905 8.70349 9.38995C8.64928 9.3894 8.59573 9.37804 8.54597 9.35653C8.49621 9.33502 8.45125 9.30379 8.41371 9.26469L6.50141 7.35239L4.59054 9.26323L4.58913 9.2647C4.55159 9.30381 4.50662 9.33502 4.45685 9.35653C4.40709 9.37804 4.35354 9.3894 4.29933 9.38995C4.24513 9.3905 4.19135 9.38023 4.14116 9.35974C4.09098 9.33925 4.04538 9.30895 4.00705 9.27062C3.96872 9.23229 3.93842 9.18669 3.91793 9.1365C3.89744 9.08631 3.88717 9.03254 3.88772 8.97833C3.88827 8.92413 3.89963 8.87057 3.92114 8.82081C3.94264 8.77105 3.97388 8.7261 4.01298 8.68855L5.92528 6.77626L4.01443 4.86539L4.01339 4.86438C3.95522 4.80788 3.91524 4.73531 3.89855 4.65596C3.88186 4.5766 3.88923 4.49407 3.91971 4.41893C3.95019 4.34379 4.00239 4.27945 4.06964 4.23414C4.13689 4.18884 4.21615 4.16462 4.29722 4.1646C4.30093 4.1646 4.30464 4.16465 4.30835 4.16475C4.35906 4.16614 4.4091 4.17699 4.45589 4.19678C4.5061 4.21801 4.55154 4.24911 4.58952 4.28822L6.50141 6.20012L8.41228 4.28928L8.4137 4.2878C8.43812 4.26236 8.4655 4.24043 8.49507 4.22235C8.55578 4.18521 8.62571 4.1643 8.69808 4.16259Z",fill:"#8D8D94"})]});var v=styled(G)(({theme:n})=>({display:"flex",alignItems:"center",gap:n.v2.spacing(4),flexShrink:0,paddingTop:1})),M={padding:2,borderRadius:"50%",flexShrink:0},B=styled(E)(()=>({...M,"&.Mui-disabled":{opacity:.5}})),x=styled(E)(()=>({...M}));var N=forwardRef(({clearable:n=true,onClear:P,disabled:p=false,value:a,defaultValue:d,onChange:T,endAdornment:H,id:s="SearchInput",className:k,onKeyDown:m,inputProps:A,onClick:D,...R},c)=>{let h=useRef(null),[$,C]=useState(()=>String(a??d??"").length>0),K=n&&$&&!p;useEffect(()=>{a!==void 0&&C(String(a??"").length>0);},[a]);let F=useCallback(e=>{h.current=e,typeof c=="function"?c(e):c&&(c.current=e);},[c]),Z=e=>{C(e.target.value.length>0),T?.(e);},O=e=>{e.stopPropagation(),D?.(e);},V=useCallback(e=>{e.stopPropagation(),m?.(e);},[m]),W=e=>{e.stopPropagation();let l=h.current;l&&(Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set?.call(l,""),l.dispatchEvent(new Event("input",{bubbles:true})),l.focus()),C(false),P?.();},j=e=>{e.stopPropagation(),h.current?.focus();},I=e=>{e.preventDefault();},q=jsxs(Fragment,{children:[jsx(v,{position:"end",className:t.searchAdornment,children:K?jsx(x,{className:t.clearButton,id:s?`${s}-clear-button`:void 0,type:"button","aria-label":"Clear search",disabled:p,disableRipple:true,onMouseDown:I,onClick:W,children:jsx(g,{className:t.clearIcon})}):jsx(B,{className:t.searchButton,id:s?`${s}-search-button`:void 0,type:"button","aria-label":"Search",disabled:p,disableRipple:true,onMouseDown:I,onClick:j,children:jsx(L,{className:t.searchIcon})})}),H]});return jsx(L$1,{...R,ref:F,id:s,type:"text",disabled:p,value:a,defaultValue:d,onChange:Z,onKeyDown:V,onClick:O,inputProps:{autoComplete:"off",...A},endAdornment:q,className:nc(t.root,k),"data-testid":"SearchInput"})});N.displayName="SearchInput";var w=memo(N);export{t as a,w as b};
|