@tap-payments/os-micro-frontend-shared 0.3.209 → 0.3.211

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.
Files changed (46) hide show
  1. package/build/_chunks/chunk-6Z6BI3UQ.js +15 -0
  2. package/build/_chunks/chunk-C3OVQN6T.js +2 -0
  3. package/build/components/AmountInput/index.js +1 -1
  4. package/build/components/AppServices/index.js +1 -1
  5. package/build/components/AppServicesBar/index.js +1 -1
  6. package/build/components/BrandLogo/index.js +1 -1
  7. package/build/components/ColumnViews/index.js +1 -1
  8. package/build/components/Customer/index.js +1 -1
  9. package/build/components/DateFilter/index.js +1 -1
  10. package/build/components/Discount/index.js +1 -1
  11. package/build/components/FileInputPreview/index.js +1 -1
  12. package/build/components/FilterDropdown/index.js +1 -1
  13. package/build/components/ListColumnFilter/index.js +1 -1
  14. package/build/components/ListHeader/index.js +1 -1
  15. package/build/components/MerchantCurrencyDropdown/index.js +1 -1
  16. package/build/components/MerchantLogo/index.js +1 -1
  17. package/build/components/MerchantsDropdown/index.js +1 -1
  18. package/build/components/MultiSelectDropdownButton/index.js +1 -1
  19. package/build/components/PartnersFilter/index.js +1 -1
  20. package/build/components/PaymentSourceFilter/index.js +1 -1
  21. package/build/components/PhoneFilter/index.js +1 -1
  22. package/build/components/RFH/Inputs/index.d.ts +0 -1
  23. package/build/components/RFH/index.js +1 -1
  24. package/build/components/ReferenceTypeFilter/index.js +1 -1
  25. package/build/components/StatusFilter/index.js +1 -1
  26. package/build/components/StatusIcons/index.js +1 -1
  27. package/build/components/TableCells/index.js +1 -1
  28. package/build/components/TableReports/index.js +1 -1
  29. package/build/components/VAT/index.js +1 -1
  30. package/build/components/VerificationIcon/index.js +1 -1
  31. package/build/components/ViewColumnRadioFilter/index.js +1 -1
  32. package/build/components/WindowSideBar/index.js +1 -1
  33. package/build/components/index.d.ts +0 -3
  34. package/build/components/index.js +1 -1
  35. package/build/index.js +1 -1
  36. package/package.json +1 -1
  37. package/build/_chunks/chunk-MGQK66C6.js +0 -2
  38. package/build/_chunks/chunk-X4NT47BO.js +0 -15
  39. package/build/components/RFH/Inputs/Switch/Switch.d.ts +0 -11
  40. package/build/components/RFH/Inputs/Switch/index.d.ts +0 -2
  41. package/build/components/ReceiptsViewer/ReceiptViewer.d.ts +0 -3
  42. package/build/components/ReceiptsViewer/ReceiptsViewer.d.ts +0 -12
  43. package/build/components/ReceiptsViewer/index.d.ts +0 -1
  44. package/build/components/ReceiptsViewer/index.js +0 -1
  45. package/build/components/ReceiptsViewer/style.d.ts +0 -4
  46. package/build/components/ReceiptsViewer/type.d.ts +0 -11
@@ -1,15 +0,0 @@
1
- import {a as a$3}from'./chunk-UQVXIIIV.js';import {a,e,c,b,d as d$1}from'./chunk-ZIL2SD2V.js';import {f,aa,j,P,O,h,ba,d}from'./chunk-U5S2TDEO.js';import {a as a$1}from'./chunk-3XNXNKGA.js';import {a as a$2,b as b$1}from'./chunk-MUR4ILTY.js';import {zc,Bc,Cc}from'./chunk-ZHEAWCTY.js';import {Pc,A}from'./chunk-M5HS3EYQ.js';import*as jt from'react';import jt__default,{useId,useState,useEffect,useMemo,useRef,useCallback}from'react';import {FormProvider,useFormContext,Controller,useForm}from'react-hook-form';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import oe from'@mui/material/Box';import Zt from'@mui/material/Button';import eo from'@mui/material/Input';import Ye from'@mui/material/ListSubheader';import Je from'@mui/material/MenuItem';import {keyframes,styled,alpha}from'@mui/material/styles';import ro from'@mui/material/Popper';import ao from'@mui/material/TextField';function Qt({onSubmit:e,methods:t,children:o}){let r=zc(useId(),"default-form");return jsx(FormProvider,{...t,children:jsx("form",{id:r,"data-testid":"DefaultForm",onSubmit:e,noValidate:true,children:o})})}var Xt=jt__default.memo(Qt);var oo=keyframes`
2
- 0% {
3
- transform: rotate(-90deg);
4
- }
5
- 100% {
6
- transform: rotate(270deg);
7
- }
8
- `,Qe=styled(oe)({width:12,height:12,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:"100%",height:"100%",display:"block"},animation:`${oo} 2s linear infinite`}),$=styled(Ye)(({theme:e})=>({backgroundColor:e.palette.common.white,paddingLeft:8,paddingRight:8,paddingBottom:6,lineHeight:1})),Xe=styled("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontWeight:500,fontSize:11,lineHeight:"100%",letterSpacing:0,color:"#8D8D94",leadingTrim:"none",transition:e.transitions.create(["color","opacity"],{duration:90,easing:"ease-in"})})),Ze=styled(oe)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",gap:e.spacing(1)})),et=styled(Ye)(({theme:e})=>({backgroundColor:e.palette.common.white,paddingLeft:8,paddingRight:8,paddingTop:e.spacing(.75),paddingBottom:e.spacing(.75),lineHeight:1.2,"&.MuiListSubheader-root":{lineHeight:1.2}})),tt=styled(Zt)(({theme:e})=>({minWidth:0,padding:"2px 4px",fontFamily:e.typography.fontFamily,fontWeight:500,fontStyle:"normal",fontSize:11,lineHeight:"120%",letterSpacing:0,textTransform:"none",verticalAlign:"middle",color:"#1F88D0",transition:e.transitions.create(["color","background-color","opacity"],{duration:90,easing:"ease-in"})})),no=styled(f)(()=>({padding:0,".MuiSvgIcon-root":{width:12,height:12}})),ot=styled("img")({width:14,height:14,flexShrink:0,display:"block"}),nt=styled(oe)({display:"flex",alignItems:"center",width:"100%",gap:8}),rt=styled(Je,{shouldForwardProp:e=>e!=="$selected"})(({theme:e,$selected:t})=>({fontSize:"12px",backgroundColor:t?"#F8F8F8 !important":e.palette.common.white,"&.Mui-disabled":{opacity:1}})),at=styled(no,{shouldForwardProp:e=>e!=="$mutedRect"})(({$mutedRect:e})=>e?{"& svg rect":{fill:"#BDC1CC"}}:{}),fe=styled(eo)(({theme:e})=>({width:"100%",height:36,padding:"8px 8px 8px 12px",borderRadius:4,backgroundColor:e.palette.common.white,border:"1px solid #F2F2F2",boxSizing:"border-box","&:hover":{borderColor:"#F2F2F2"},"&.Mui-focused":{borderColor:"#F2F2F2",backgroundColor:e.palette.common.white},"&:before, &:after":{display:"none"},"& input":{padding:0,fontSize:10},"& .MuiInputBase-input":{paddingRight:4}}));styled(Je)(({theme:e})=>({opacity:1,paddingTop:0,paddingBottom:0,marginBottom:8,minHeight:"auto",pointerEvents:"none",backgroundColor:e.palette.common.white,"&:hover":{backgroundColor:e.palette.common.white},"&.Mui-focusVisible":{backgroundColor:e.palette.common.white},"&.Mui-disabled":{backgroundColor:e.palette.common.white,opacity:1}}));var io=keyframes`
9
- 0% {
10
- transform: rotate(-90deg);
11
- }
12
- 100% {
13
- transform: rotate(270deg);
14
- }
15
- `,pt=styled(oe)({width:12,height:12,display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:"100%",height:"100%",display:"block"},animation:`${io} 2s linear infinite`}),ge=styled(oe)(({theme:e})=>({position:"relative",width:11,height:11,transform:"rotate(0deg)",color:e.palette.common.black,"& svg":{width:"100%",height:"100%",display:"block"}})),st=styled($)({paddingTop:"8px"}),Ie=styled("ul")({listStyle:"none",margin:0,padding:0}),ut=styled(Je)(({theme:e})=>({display:"flex",alignItems:"center",gap:"8px",padding:"8px",justifyContent:"space-between",fontSize:"10px",fontWeight:500,cursor:"default",pointerEvents:"none",backgroundColor:e.palette.common.white,"&.Mui-disabled":{opacity:1,color:"#8D8D94"}})),dt=styled(Je,{shouldForwardProp:e=>e!=="$selected"})(({theme:e,$selected:t})=>({fontSize:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),backgroundColor:t?e.palette.action.hover:e.palette.common.white})),be=styled("span")({flex:1,minWidth:0}),xe=styled("img")({width:10,height:7.5,flexShrink:0}),mt=styled("li",{shouldForwardProp:e=>!["$selected","$optionDisabled"].includes(String(e))})(({theme:e,$selected:t,$optionDisabled:o})=>({fontSize:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),minHeight:48,paddingLeft:e.spacing(2),paddingRight:e.spacing(2),backgroundColor:t?e.palette.action.hover:e.palette.common.white,"&.Mui-focused":{backgroundColor:e.palette.action.hover},...o&&{opacity:.38,pointerEvents:"none"}})),Pe=styled("span")({fontSize:"10px",fontWeight:500,color:"#8D8D94"}),St=styled(ao,{shouldForwardProp:e=>!["feedbackType","hasFeedback","hasLabel"].includes(e)})(({theme:e,error:t,feedbackType:o,hasFeedback:r,hasLabel:a})=>{let{borderColor:c}=o?aa(e,o):{borderColor:void 0},p=r?"4px 4px 0 0":"4px";return {width:"100%","& .MuiInputLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)",color:`${e.palette.grey[700]} !important`},"& .MuiInputLabel-root.MuiInputLabel-shrink":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiInputLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiFilledInput-root":{height:"40px",maxHeight:"40px",overflow:"hidden",borderRadius:p,backgroundColor:e.palette.grey[400],paddingTop:a?"11px":"0px",paddingBottom:a?"4px":"0px",paddingLeft:"8px",boxSizing:"border-box",display:"inline-flex",alignItems:a?"stretch":"center","&:before, &:after":{display:"none"},"&:hover":{backgroundColor:e.palette.grey[400]},"&.Mui-focused":{backgroundColor:e.palette.grey[400]},"&.Mui-disabled":{backgroundColor:e.palette.grey[400]}},"& .MuiFilledInput-input":{padding:"0 !important",minHeight:0,height:"auto",boxSizing:"border-box",display:"flex",alignItems:a?"flex-end":"center",alignSelf:a?"flex-end":"center",fontSize:"11px",lineHeight:"11px",color:e.palette.common.black,paddingBottom:a?"1px !important":"0 !important"},"& .MuiFilledInput-root.MuiInputBase-adornedEnd .MuiAutocomplete-input":{flex:"1 1 0%",minWidth:30,width:0,maxWidth:"100%"},"& .MuiAutocomplete-endAdornment":{display:"flex",alignItems:"center",gap:"8px",top:"50%",transform:"translateY(-50%)",right:9},"& .MuiAutocomplete-popupIndicator":{transform:"none",padding:"1px",marginRight:0,marginLeft:0},"& .MuiAutocomplete-popupIndicator.MuiAutocomplete-popupIndicatorOpen":{transform:"none"},"& .MuiAutocomplete-clearIndicator":{visibility:"visible",padding:"1px",marginRight:0,marginLeft:0},...o&&c&&{"& .MuiFilledInput-root":{border:`1px solid ${c}`}},...r&&{"& .MuiFilledInput-root":{borderBottom:"none",borderBottomLeftRadius:0,borderBottomRightRadius:0}},...t&&{"& .MuiFilledInput-root":{border:`1px solid ${e.palette.error.main}`}}}}),lt=e=>({display:"flex",alignItems:"center",gap:"8px",padding:"8px",justifyContent:"space-between",fontSize:"10px",fontWeight:500,cursor:"default",pointerEvents:"none",backgroundColor:e.palette.common.white,color:"#8D8D94"}),ht=styled(ro,{shouldForwardProp:e=>!["$menuHasLoadingText","$suppressAutocompleteNoOptions","$suppressEmptyMenuSurface"].includes(e)})(({theme:e,$menuHasLoadingText:t,$suppressAutocompleteNoOptions:o,$suppressEmptyMenuSurface:r})=>({"& .MuiPaper-root":r?{boxShadow:"none",border:"none",backgroundColor:"transparent",margin:0,marginTop:0,padding:0,maxHeight:0,minHeight:0,overflow:"hidden",borderRadius:0,pointerEvents:"none"}:{marginTop:4,borderRadius:4,boxShadow:e.shadows[8],border:"1px solid #F2F2F2",backgroundColor:e.palette.common.white},"& .MuiAutocomplete-listbox":{padding:0,...r?{maxHeight:0,minHeight:0,overflow:"hidden"}:{maxHeight:320}},"& .MuiAutocomplete-noOptions":o?{display:"none !important"}:lt(e),"& .MuiAutocomplete-loading":{...lt(e),...!t&&{display:"none"}}}));function ye({placeholder:e,value:t,onValueChange:o,isLoading:r}){let a=zc(useId(),"form-select-menu-search-input"),c=useCallback(p=>{p.stopPropagation();},[]);return jsx(fe,{id:a,"data-testid":"FormSelectMenuSearchInput",placeholder:e,value:t,onChange:p=>o(p.target.value),onKeyDown:c,onKeyUp:c,onMouseDown:c,onClick:c,disableUnderline:true,fullWidth:true,inputProps:{"aria-label":e},endAdornment:r?jsx(pt,{"aria-hidden":true,children:jsx(b$1,{})}):jsx(ge,{"aria-hidden":true,children:jsx(a$2,{})})})}var Fe=jsx(Pe,{children:"No results found"}),ft=jsx(Pe,{children:"Loading\u2026"});function Ce(e,t,o){return t?t(e):o?o(e):e?.label}function we(e,t,o){let r=t.toLowerCase().trim(),a=(o?o(e):e?.label)??"";return String(a).toLowerCase().includes(r)}function gt(e){return e}function bt(e){let t=jt__default.forwardRef(function(r,a){let{children:c,className:p,...S}=r,u=e.current;return u?jsxs(Fragment,{children:[jsx(st,{disableSticky:true,children:jsx(ye,{placeholder:u.menuSearchPlaceholder,value:u.searchValue,onValueChange:u.setSearchValue,isLoading:u.isLoading})}),jsx(Ie,{ref:a,className:p,...S,children:c})]}):jsx(Ie,{ref:a,className:p,...S,children:c})});return t.displayName="FormSelectMenuSearchListbox",t}function yt({menuSearchPlaceholder:e,searchValue:t,onSearchChange:o,isLoading:r,menuHasNoOptionsText:a,menuNoOptionsText:c,optionsWithoutEmptyValue:p,getOptionValue:S,getOptionLabel:u,renderOption:x,isOptionEqualToValue:h,menuHasSelectedCheckMark:R,valueOnly:y,getOptionId:I,field:d,onChange:F}){let C=Cc("form-select-item");return jsxs(Fragment,{children:[jsx($,{disableSticky:true,onMouseDown:n=>n.stopPropagation(),onClick:n=>n.stopPropagation(),children:jsx(ye,{placeholder:e,value:t,onValueChange:o,isLoading:r})}),a&&t.trim()&&p.length===0?jsx(ut,{disabled:true,value:"__form_select_no_results__",children:c??Fe}):p.map((n,s)=>{let g=h?h(n,d.value):n?.id===d.value?.id,M=Ce(n,x,u);return jsxs(dt,{disabled:!!n.disabled,$selected:g,value:(S?S(n):n?.id)??"",onClick:()=>{d.onChange(y?I(n):n),F?.(n);},children:[jsx(be,{children:M}),R&&g?jsx(xe,{src:Pc,alt:""}):null]},C(S?S(n):n?.id,s))})]})}var Me={menuHasLoadingText:false,suppressAutocompleteNoOptions:false,suppressEmptyMenuSurface:false};function fo(e,t){e!=null&&(typeof e=="function"?e(t):e.current=t);}function go(...e){return t=>{for(let o of e)fo(o,t);}}function bo(e){let t=o=>{let r=e.current;return jsx(ht,{...o,$menuHasLoadingText:r.menuHasLoadingText,$suppressAutocompleteNoOptions:r.suppressAutocompleteNoOptions,$suppressEmptyMenuSurface:r.suppressEmptyMenuSurface})};return t.displayName="FormSelectSearchableAutocompletePopper",t}function Mt(e){let t=zc(useId(),"form-select-searchable-field"),o=useRef(null),r=useRef(Me);o.current=e.menuSearchable?{searchValue:e.inMenuSearchContextValue.searchValue,setSearchValue:e.inMenuSearchContextValue.setSearchValue,menuSearchPlaceholder:e.inMenuSearchContextValue.menuSearchPlaceholder,isLoading:e.inMenuSearchContextValue.isLoading}:null,r.current=e.searchableAutocompletePopperFlags;let a$3=useMemo(()=>bt(o),[]),c$1=useMemo(()=>bo(r),[]),p=e.feedback,{isProvided:S,isVisible:u,type:x}=Bc(p),h=!!e.fieldState.error&&!u,R=e.helperText??e.fieldState.error?.message,y=e.internalValue!=null&&e.internalValue!==""&&typeof e.internalValue=="object"?e.internalValue:null,I=e.getOptionLabel??(n=>String(n?.label??"")),d=e.isOptionEqualToValue??((n,s)=>n&&s?n.id===s.id:n===s),F=e.ClearIconComponent??a,C=e.label!=null&&e.label!=="";return jsxs(c,{id:t,"data-testid":"FormSelectSearchableField",children:[jsx(a$1,{...e.autocompleteRest,disableClearable:!e.showClearIcon,clearIcon:jsx(F,{sx:{fontSize:8,width:8,height:8}}),ListboxComponent:e.menuSearchable?a$3:void 0,PopperComponent:c$1,options:e.optionsWithClearFilterOnly,value:y,onChange:(n,s,g)=>{if(s==null&&e.onClear&&g==="clear"){e.onClear();return}if(e.valueOnly){let M=s==null?null:e.getOptionId(s);e.field.onChange(M);}else e.field.onChange(s);e.onChange?.(s);},onInputChange:(n,s,g)=>{e.setSearchableInputValue(s),(g==="input"||g==="clear")&&e.scheduleSearchNotification(s);},slotProps:e.slotProps??{},filterOptions:e.menuSearchable?e.autocompleteFilterOptions:gt,loading:!!e.isLoading,disabled:!!e.disabled,getOptionLabel:I,getOptionDisabled:n=>!!n.disabled,isOptionEqualToValue:d,renderOption:e.renderAutocompleteOption,noOptionsText:e.menuNoOptionsText??Fe,loadingText:e.menuHasLoadingText?e.menuLoadingText??ft:null,popupIcon:jsx(ge,{children:jsx(a$2,{})}),renderInput:n=>{let{inputProps:s,...g}=n,{ref:M,..._}=s;return jsx(St,{...g,variant:"filled",label:e.label,placeholder:e.placeholder,required:e.required,error:h,helperText:null,feedbackType:x,hasFeedback:u,hasLabel:C,inputRef:go(M,e.field.ref,e.inputRef),InputProps:{...n.InputProps,disableUnderline:true},inputProps:{..._,name:e.field.name,onBlur:e.field.onBlur}})}}),S?jsx(ba,{...p}):jsx(b,{children:R})]})}function Pt(e$1){let{name:t,helperText:o,feedback:r,menuSearchable:a$1=false,showClearIcon:c=false,ClearIconComponent:p=a,onClear:S,menuSearchPlaceholder:u="Search",getOptionValue:x,getOptionLabel:h,renderOption:R,isOptionEqualToValue:y,options:I,MenuProps:d,valueOnly:F=false,menuHasSelectedCheckMark:C=false,searchable:n=false,onSearchInputChange:s,searchDebounceMs:g=300,minSearchLength:M,menuLoadingText:_,menuHasLoadingText:m=false,menuHasNoOptionsText:w=true,menuNoOptionsText:A,label:ne,placeholder:U,required:re,disabled:l,isLoading:v,inputRef:K,onChange:D,...ae}=e$1,{control:le}=useFormContext(),[b,G]=useState(""),[j,Y]=useState("");useEffect(()=>{n||Y("");},[n]);let ie=useMemo(()=>({searchValue:b,setSearchValue:G,menuSearchPlaceholder:u,isLoading:!!v}),[b,u,v]),J=useRef(void 0),ce=useRef(s);ce.current=s,useEffect(()=>()=>{J.current&&clearTimeout(J.current);},[]);let Vt=useCallback(i=>{if(!ce.current)return;let f=i.trim();J.current&&clearTimeout(J.current),J.current=setTimeout(()=>{if(f===""){ce.current?.("");return}M!=null&&f.length<M||ce.current?.(f);},g);},[g,M]),W=useMemo(()=>{let i=I??[];return !c||!x?i:i.filter(f=>{let k=x(f);return k!=null&&k!==""})},[c,x,I]),Ae=useMemo(()=>!a$1||!b.trim()?W:W.filter(i=>we(i,b,h)),[a$1,b,W,h]),Q=useMemo(()=>a$1?Ae:W,[a$1,Ae,W]),$t=useCallback(i=>!a$1||!b.trim()?i:i.filter(f=>we(f,b,h)),[a$1,b,h]),zt=useMemo(()=>{if(!n)return Me;let i=j.trim(),f=i.length===0||M!=null&&i.length>0&&i.length<M,k=a$1&&!!b.trim()&&Q.length===0,E=f&&!k||!w,se=Q.length>0;return {menuHasLoadingText:m,suppressAutocompleteNoOptions:E,suppressEmptyMenuSurface:!se&&!(!E&&!se)&&!!!(v&&m)}},[n,j,M,a$1,b,Q,w,v,m]),qt={...d,autoFocus:false,disableEnforceFocus:true},pe=i=>(x?x(i):i?.id)??"",_t=i=>!F||!i?i:I?.find(f=>pe(f)===i)??i,Ut=useCallback((i,f,k)=>{let E=Ce(f,R,h),se=!!f.disabled;return jsxs(mt,{...i,$selected:k.selected,$optionDisabled:se,children:[jsx(be,{children:E}),C&&k.selected?jsx(xe,{src:Pc,alt:""}):null]})},[h,R,C]),ve={...ae};for(let i of ["IconComponent","startComponent"])delete ve[i];let{slotProps:Kt={},...Gt}=ve;return jsx(Controller,{name:t,control:le,render:({field:i,fieldState:f})=>{let k=_t(i.value);return n?jsx(Mt,{menuSearchable:a$1,inMenuSearchContextValue:ie,searchableAutocompletePopperFlags:zt,optionsWithClearFilterOnly:W,autocompleteFilterOptions:$t,slotProps:Kt,autocompleteRest:Gt,inputRef:K,showClearIcon:c,ClearIconComponent:p,menuHasLoadingText:m,menuLoadingText:_,menuNoOptionsText:A,isLoading:v,disabled:l,label:ne,placeholder:U,required:re,valueOnly:F,getOptionId:pe,scheduleSearchNotification:Vt,setSearchableInputValue:Y,renderAutocompleteOption:Ut,onClear:S,onChange:D,feedback:r,helperText:o,field:i,fieldState:f,internalValue:k,getOptionLabel:h,isOptionEqualToValue:y}):jsx(e,{...ae,...i,label:ne,placeholder:U,required:re,disabled:l,isLoading:v,value:k,menuHasSelectedCheckMark:C,showClearIcon:c,ClearIconComponent:p,onClear:S,options:Q,getOptionValue:x,getOptionLabel:h,renderOption:R,isOptionEqualToValue:y,hasError:!!f.error,helperText:o??f.error?.message,feedback:r,onChange:E=>{i.onChange(F?pe(E):E),D?.(E);},MenuProps:qt,children:a$1?jsx(yt,{menuSearchPlaceholder:u,searchValue:b,onSearchChange:G,isLoading:v,menuHasNoOptionsText:w,menuNoOptionsText:A,optionsWithoutEmptyValue:Q,getOptionValue:x,getOptionLabel:h,renderOption:R,isOptionEqualToValue:y,menuHasSelectedCheckMark:C,valueOnly:F,getOptionId:pe,field:i,onChange:D}):void 0})}})}Pt.displayName="RFHSelect";var wt=jt__default.memo(Pt);var Oe=wt;function Tt({name:e,disabled:t,...o}){let{control:r}=useFormContext();return jsx(Controller,{name:e,control:r,render:({field:{name:a,onBlur:c,onChange:p,value:S,disabled:u}})=>jsx(h,{...o,onChange:p,onBlur:c,name:a,disabled:u||t,checked:S??false})})}Tt.displayName="RFHSwitch";var At=jt.memo(Tt);var Io=At;var vt=styled(j)(({theme:e})=>({fontSize:"10px",color:e.v2.palette.grey[500],fontWeight:600,lineHeight:"10px"}));styled(j)(({theme:e})=>({fontSize:"11px",color:e.v2.palette.base.black,fontWeight:600,lineHeight:"14.3px",width:200}));var Et=styled(oe)(()=>({display:"flex",flexDirection:"column",maxHeight:180,overflow:"auto",scrollbarWidth:"thin",scrollbarColor:"#E5E5E5 #E5E5E5"})),Ht=styled(P)(({theme:e})=>{let t=`1px solid ${alpha(e.palette.common.black,.1)}`;return {flexShrink:0,border:0,borderRadius:0,"&.Mui-expanded:not(:last-of-type)":{borderBottom:t},[`&:last-of-type .${O.summary}`]:{borderBottom:"none"},[`&.Mui-expanded:last-of-type .${O.summary}`]:{borderBottom:t},[`& .${O.summary}`]:{backgroundColor:e.palette.common.white,borderBottom:t,minHeight:28,height:"auto","& .MuiAccordionSummary-content":{margin:"auto"},"&.Mui-expanded":{backgroundColor:"#F8F8F8",minHeight:28,height:"auto"}},[`& .${O.content}`]:{borderTop:"none"}}});styled(eo)(({theme:e})=>({width:"inherit",height:32,padding:"11px 12px",fontSize:"10px",borderRadius:"5px",backgroundColor:"#F9F9F9",border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.info.dark}}));var Nt=styled(oe)(()=>({display:"flex",flexDirection:"column",gap:"8px"}));styled(oe)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap",paddingInlineEnd:"20px"}));styled(oe)(({theme:e,maxWidth:t})=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:`${e.palette.info.dark}1a`,fontSize:"10px",fontWeight:500,cursor:"pointer",...t&&{maxWidth:`${t}%`}}));var Bt=styled(j)(()=>({display:"flex",gap:"8px",alignItems:"center",justifyContent:"space-between",fontSize:"10px",fontWeight:500,color:"#000",cursor:"pointer",padding:"8px 20px"}));styled(oe)(({theme:e})=>({width:"100%",flexDirection:"column",border:`1px solid ${e.palette.grey[100]}`,borderRadius:"4px",backgroundColor:e.palette.grey[400]}));function To({name:e,options:t,...o}){let r=zc(useId(),"select-with-accordion"),[a,c]=useState(null),[p,S]=useState(0),u=!!a,x=d=>{c(u?null:d.currentTarget);},h=()=>{c(null);},{watch:R,setValue:y}=useFormContext(),I=R(e);return jsx(a$3,{id:r,"data-testid":"SelectWithAccordion",open:u,anchorEl:a,onOpen:x,onClose:h,trigger:jsx(Oe,{name:e,options:[],...o,open:false}),hideArrow:true,listWrapperSx:{padding:0,margin:0},children:jsx(Nt,{onClick:d=>d.stopPropagation(),onMouseDown:d=>d.stopPropagation(),children:jsx(Et,{"data-testid":"AccordionWrapper",children:t.map?.((d$1,F)=>jsx(Ht,{expanded:p===F,onChange:n=>S(n?F:null),label:jsx(vt,{variant:"caption",children:d$1.group}),content:(d$1?.options||[]).map((n,s)=>{let g=o?.isOptionEqualToValue?.(n,I);return jsxs(Bt,{onClick:()=>{y(e,n,{shouldDirty:true,shouldTouch:true,shouldValidate:true}),h();},children:[o.renderOption?.(n)||n.label,g&&jsx(d,{src:Pc,alt:"blue-check",sx:{width:14,height:10}})]},`${n.value}-${n.label}-${s}`)})},`${d$1.group}-group-${F}`))})})})}var Wt=To;var vo=Wt;function Te({name:e,helperText:t,getOptionValue:o,getOptionLabel:r,renderOption:a,isOptionEqualToValue:c,getOptionDisabled:p,menuSearchable:S=false,menuSearchPlaceholder:u="Search",showCheckbox:x=true,menuHasSelectionSummary:h=false,valueOnly:R=false,options:y,isLoading:I,...d}){let{control:F}=useFormContext(),[C,n]=useState(""),s=m=>(o?o(m):m?.id)??"",g=m=>!R||!m?.length?m??[]:m.map(w=>y?.find(A=>s(A)===w)).filter(Boolean),M=m=>m?.map(s)??[],_=useMemo(()=>{if(!S||!C.trim())return y??[];let m=C.toLowerCase().trim();return (y??[]).filter(w=>{let A=(r?r(w):w?.label)??"";return String(A).toLowerCase().includes(m)})},[y,S,C,r]);return jsx(Controller,{name:e,control:F,defaultValue:[],render:({field:m,fieldState:w})=>{let A$1=Array.isArray(m.value)?m.value.filter(l=>l!=null).length:0,ne=h&&A$1>0,U=g(m.value),re=Cc("multi-select-item");return jsxs(d$1,{...d,isLoading:I,...m,options:y??[],value:U,getOptionLabel:r,hasError:!!w.error,helperText:t??w.error?.message,onChange:l=>m.onChange(R?M(l):l),MenuProps:{...d.MenuProps,autoFocus:false,disableEnforceFocus:true},children:[S&&jsx($,{disableSticky:true,children:jsx(fe,{placeholder:u,value:C,onChange:l=>n(l.target.value),onKeyDown:l=>l.stopPropagation(),onKeyUp:l=>l.stopPropagation(),disableUnderline:true,fullWidth:true,inputProps:{"aria-label":u},endAdornment:I?jsx(Qe,{"aria-hidden":true,children:jsx(b$1,{})}):jsx(ot,{src:A,alt:"search"})})}),ne&&jsx(et,{disableSticky:true,children:jsxs(Ze,{children:[jsxs(Xe,{children:[A$1," selected"]}),jsx(tt,{type:"button",variant:"text",disableRipple:true,"aria-label":"Clear all selected options",onMouseDown:l=>{l.preventDefault(),l.stopPropagation();},onClick:l=>{l.preventDefault(),l.stopPropagation(),d.onClear?d.onClear():m.onChange([]);},children:"Clear"})]})}),_?.map((l,v)=>{let K=U?.some(b=>{if(b==null)return false;if(c)return c(l,b);if(o){let Y=o(l),ie=o(b);return Y===ie||String(Y)===String(ie)}let G=l?.id,j=b?.id;return G===j||String(G)===String(j)}),D=p?p(l):false,ae=r?r(l):l.label,le=a?a(l):ae;return jsx(rt,{value:(o?o(l):l?.id)??"",disabled:D,$selected:K,children:x?jsxs(nt,{children:[jsx(at,{checked:K,$mutedRect:K&&D}),le]}):le},re(o?o(l):l?.id,v))})]})}})}var Wo=useForm;export{Oe as a,Io as b,vo as c,Te as d,Xt as e,Wo as f};
@@ -1,11 +0,0 @@
1
- import * as React from 'react';
2
- import { SwitchProps } from '@mui/material/Switch';
3
- export interface SwitchBaseProps extends Omit<SwitchProps, 'name'> {
4
- name: string;
5
- }
6
- declare function Switch({ name, disabled: disableSwitch, ...props }: SwitchBaseProps): React.JSX.Element;
7
- declare namespace Switch {
8
- var displayName: string;
9
- }
10
- declare const _default: React.MemoExoticComponent<typeof Switch>;
11
- export default _default;
@@ -1,2 +0,0 @@
1
- import Switch from './Switch';
2
- export default Switch;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { ReceiptViewerProps } from './type';
3
- export default function ReceiptViewer({ isOpen, receipt, order, appWindow, onClose }: Readonly<ReceiptViewerProps>): import("react").JSX.Element;
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- import { Receipt } from '../../types/index.js';
3
- type ReceiptsViewerProps = {
4
- receipts: Receipt[];
5
- appWindow?: {
6
- isMinimized?: boolean;
7
- order?: number;
8
- };
9
- onCloseReceipt: (id: string) => void;
10
- };
11
- export default function ReceiptsViewer({ receipts, onCloseReceipt, appWindow }: Readonly<ReceiptsViewerProps>): import("react").JSX.Element | null;
12
- export {};
@@ -1 +0,0 @@
1
- export { default as ReceiptsViewer } from './ReceiptsViewer';
@@ -1 +0,0 @@
1
- export{Wc as ReceiptsViewer}from'../../_chunks/chunk-MGQK66C6.js';import'../../_chunks/chunk-3TO7YUM5.js';import'../../_chunks/chunk-VRGWLZGG.js';import'../../_chunks/chunk-2KZCGQ2J.js';import'../../_chunks/chunk-CB7QJIZT.js';import'../../_chunks/chunk-7PRJUDGP.js';import'../../_chunks/chunk-TCP65H54.js';import'../../_chunks/chunk-ZQ52HZBG.js';import'../../_chunks/chunk-MXC3TARS.js';import'../../_chunks/chunk-TZJUIC5Q.js';import'../../_chunks/chunk-4WHJ7C3Y.js';import'../../_chunks/chunk-XKJHIGUB.js';import'../../_chunks/chunk-O7MIU67I.js';import'../../_chunks/chunk-ZZJGMJCQ.js';import'../../_chunks/chunk-TATV6PD5.js';import'../../_chunks/chunk-VS4GPQTT.js';import'../../_chunks/chunk-5CQG3WDG.js';import'../../_chunks/chunk-X4NT47BO.js';import'../../_chunks/chunk-UQVXIIIV.js';import'../../_chunks/chunk-W6OPWYPX.js';import'../../_chunks/chunk-LMQIQCKU.js';import'../../_chunks/chunk-UL4GWIQX.js';import'../../_chunks/chunk-LEGFRHUY.js';import'../../_chunks/chunk-CCNYVQRG.js';import'../../_chunks/chunk-ERL2AD3X.js';import'../../_chunks/chunk-57COBHS2.js';import'../../_chunks/chunk-JDD6SWME.js';import'../../_chunks/chunk-MVPNFQCV.js';import'../../_chunks/chunk-SLOXJ5HL.js';import'../../_chunks/chunk-CBQF2JOF.js';import'../../_chunks/chunk-GKSTVWG7.js';import'../../_chunks/chunk-PDRNFDWB.js';import'../../_chunks/chunk-CJBK6DV4.js';import'../../_chunks/chunk-MAZVGT6F.js';import'../../_chunks/chunk-VKHUWB7W.js';import'../../_chunks/chunk-ZONDSLTR.js';import'../../_chunks/chunk-ZIL2SD2V.js';import'../../_chunks/chunk-HDCNWBW5.js';import'../../_chunks/chunk-5B5BHQMS.js';import'../../_chunks/chunk-VR7ZRZKQ.js';import'../../_chunks/chunk-RLUMXH63.js';import'../../_chunks/chunk-YOFP6Q2H.js';import'../../_chunks/chunk-DILHFFYM.js';import'../../_chunks/chunk-RRNCLEPN.js';import'../../_chunks/chunk-CC3OHCAU.js';import'../../_chunks/chunk-4B2QTPTE.js';import'../../_chunks/chunk-KGJKMOL6.js';import'../../_chunks/chunk-OQM5HYDJ.js';import'../../_chunks/chunk-TBK5B4PF.js';import'../../_chunks/chunk-2C5LPDZP.js';import'../../_chunks/chunk-2K7FRRCP.js';import'../../_chunks/chunk-VSI64YFN.js';import'../../_chunks/chunk-RJGHAJAS.js';import'../../_chunks/chunk-WNMD6CG3.js';import'../../_chunks/chunk-RQRTDUVJ.js';import'../../_chunks/chunk-OQXHFUUW.js';import'../../_chunks/chunk-PYBAY4RD.js';import'../../_chunks/chunk-XWCBQTXR.js';import'../../_chunks/chunk-MW3S7RYL.js';import'../../_chunks/chunk-5K5Q4DZF.js';import'../../_chunks/chunk-NLUIDNSG.js';import'../../_chunks/chunk-BFNXERA5.js';import'../../_chunks/chunk-I4MFMAUT.js';import'../../_chunks/chunk-TRCRPJLO.js';import'../../_chunks/chunk-3FL6JKDE.js';import'../../_chunks/chunk-LNXP6W5X.js';import'../../_chunks/chunk-CWNJS74Z.js';import'../../_chunks/chunk-EOPHF3KG.js';import'../../_chunks/chunk-LGIGA7B2.js';import'../../_chunks/chunk-TYUXEDNW.js';import'../../_chunks/chunk-67EIV5FM.js';import'../../_chunks/chunk-YXAJ6BSN.js';import'../../_chunks/chunk-6QA5UWFS.js';import'../../_chunks/chunk-QOP4FI7N.js';import'../../_chunks/chunk-V4IMVJZP.js';import'../../_chunks/chunk-U5S2TDEO.js';import'../../_chunks/chunk-FQ2VMVUY.js';import'../../_chunks/chunk-3XNXNKGA.js';import'../../_chunks/chunk-MUR4ILTY.js';import'../../_chunks/chunk-P3UNUMRE.js';import'../../_chunks/chunk-3ZQC3MDU.js';import'../../_chunks/chunk-K3VCY2Z7.js';import'../../_chunks/chunk-ZHEAWCTY.js';import'../../_chunks/chunk-M5HS3EYQ.js';import'../../_chunks/chunk-ZDBICST5.js';
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const Wrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
- ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
4
- }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -1,11 +0,0 @@
1
- import { Receipt } from '../../types/index.js';
2
- export interface ReceiptViewerProps {
3
- isOpen: boolean;
4
- receipt: Receipt;
5
- order: number;
6
- appWindow?: {
7
- isMinimized?: boolean;
8
- order?: number;
9
- };
10
- onClose: (id: string) => void;
11
- }