@tap-payments/os-micro-frontend-shared 0.3.217-test.1 → 0.3.217-test.2

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 (38) hide show
  1. package/build/_chunks/{chunk-237JY7YP.js → chunk-NS44NT7N.js} +1 -1
  2. package/build/_chunks/chunk-OB5BGQTZ.js +1 -0
  3. package/build/_chunks/{chunk-IIXPWPDC.js → chunk-VC2E5RK5.js} +1 -1
  4. package/build/components/AmountInput/index.js +1 -1
  5. package/build/components/AppServices/index.js +1 -1
  6. package/build/components/AppServicesBar/index.js +1 -1
  7. package/build/components/BrandLogo/index.js +1 -1
  8. package/build/components/ColumnViews/index.js +1 -1
  9. package/build/components/Customer/index.js +1 -1
  10. package/build/components/DateFilter/index.js +1 -1
  11. package/build/components/Discount/index.js +1 -1
  12. package/build/components/FileInputPreview/index.js +1 -1
  13. package/build/components/FilterDropdown/index.js +1 -1
  14. package/build/components/GroupedSelect/constants.d.ts +1 -0
  15. package/build/components/GroupedSelect/index.js +1 -1
  16. package/build/components/GroupedSelect/style.d.ts +0 -2
  17. package/build/components/ListColumnFilter/index.js +1 -1
  18. package/build/components/ListHeader/index.js +1 -1
  19. package/build/components/MerchantCurrencyDropdown/index.js +1 -1
  20. package/build/components/MerchantLogo/index.js +1 -1
  21. package/build/components/MerchantsDropdown/index.js +1 -1
  22. package/build/components/MultiSelectDropdownButton/index.js +1 -1
  23. package/build/components/PaymentSourceFilter/index.js +1 -1
  24. package/build/components/PhoneFilter/index.js +1 -1
  25. package/build/components/RHFGroupedSelect/index.js +1 -1
  26. package/build/components/ReferenceTypeFilter/index.js +1 -1
  27. package/build/components/StatusFilter/index.js +1 -1
  28. package/build/components/StatusIcons/index.js +1 -1
  29. package/build/components/TableCells/index.js +1 -1
  30. package/build/components/TableReports/index.js +1 -1
  31. package/build/components/VAT/index.js +1 -1
  32. package/build/components/VerificationIcon/index.js +1 -1
  33. package/build/components/ViewColumnRadioFilter/index.js +1 -1
  34. package/build/components/WindowSideBar/index.js +1 -1
  35. package/build/components/index.js +1 -1
  36. package/build/index.js +1 -1
  37. package/package.json +2 -2
  38. package/build/_chunks/chunk-MXSGGLPZ.js +0 -1
@@ -1 +1 @@
1
- import {b}from'./chunk-MXSGGLPZ.js';import {useFormContext}from'react-hook-form';import {jsx}from'react/jsx-runtime';function R({name:e,options:r,id:t,label:p,placeholder:d,renderValue:u,IconComponent:l,isLoading:n,disabled:a,isOptionEqualToValue:s,renderOption:c,expandedGroupIndex:i,defaultExpandedGroupIndex:m,onExpandedGroupChange:x,renderGroupLabel:f,menuSx:G,className:h,sx:S}){let{watch:y,setValue:F}=useFormContext(),g=y(e);return jsx(b,{id:t,label:p,placeholder:d,renderValue:u,IconComponent:l,isLoading:n,disabled:a,groups:r,value:g,onChange:C=>{F(e,C,{shouldDirty:true,shouldTouch:true,shouldValidate:true});},isOptionEqualToValue:s,renderOption:c,expandedGroupIndex:i,defaultExpandedGroupIndex:m,onExpandedGroupChange:x,renderGroupLabel:f,menuSx:G,className:h,sx:S})}var V=R;export{V as a};
1
+ import {b}from'./chunk-OB5BGQTZ.js';import {useFormContext}from'react-hook-form';import {jsx}from'react/jsx-runtime';function R({name:e,options:r,id:t,label:p,placeholder:d,renderValue:u,IconComponent:l,isLoading:n,disabled:a,isOptionEqualToValue:s,renderOption:c,expandedGroupIndex:i,defaultExpandedGroupIndex:m,onExpandedGroupChange:x,renderGroupLabel:f,menuSx:G,className:h,sx:S}){let{watch:y,setValue:F}=useFormContext(),g=y(e);return jsx(b,{id:t,label:p,placeholder:d,renderValue:u,IconComponent:l,isLoading:n,disabled:a,groups:r,value:g,onChange:C=>{F(e,C,{shouldDirty:true,shouldTouch:true,shouldValidate:true});},isOptionEqualToValue:s,renderOption:c,expandedGroupIndex:i,defaultExpandedGroupIndex:m,onExpandedGroupChange:x,renderGroupLabel:f,menuSx:G,className:h,sx:S})}var V=R;export{V as a};
@@ -0,0 +1 @@
1
+ import {j,P as P$1,O,V as V$1,R as R$1,d}from'./chunk-U5S2TDEO.js';import {lc,kc}from'./chunk-ZHEAWCTY.js';import {Pc}from'./chunk-M5HS3EYQ.js';import {forwardRef,useRef,useState,memo}from'react';import Te from'@mui/material/ClickAwayListener';import Le from'@mui/material/CircularProgress';import Ce from'@mui/material/SvgIcon';import {jsx,jsxs}from'react/jsx-runtime';import m from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';var i="os-shared-GroupedSelect",r={root:`${i}-root`,trigger:`${i}-trigger`,hasLabel:`${i}-hasLabel`,triggerIcon:`${i}-triggerIcon`,menu:`${i}-menu`,groups:`${i}-groups`,group:`${i}-group`,groupLabel:`${i}-groupLabel`,option:`${i}-option`,optionCheck:`${i}-optionCheck`};function P({open:e}){return jsx(Ce,{viewBox:"0 0 8 5",sx:{width:8,height:5,transform:e?"rotate(180deg)":"none",transition:"transform 0.2s ease"},children:jsx("path",{d:"M7.30273 0.117188C7.3806 0.115307 7.4565 0.138248 7.52051 0.182617C7.58455 0.227088 7.63373 0.290458 7.66211 0.363281C7.69046 0.436073 7.69761 0.516047 7.68262 0.592773C7.66777 0.668745 7.63069 0.738375 7.57715 0.793945L4.17285 4.43164C4.10255 4.50662 4.00523 4.55078 3.90234 4.55078C3.79964 4.55064 3.703 4.5065 3.63281 4.43164L0.227539 0.794922L0.228516 0.793945C0.175799 0.738766 0.139848 0.669812 0.125 0.594727C0.11011 0.519097 0.116275 0.440194 0.143555 0.368164C0.170957 0.296002 0.218752 0.232474 0.28125 0.1875C0.343758 0.14262 0.418162 0.11821 0.495117 0.118164C0.546901 0.118166 0.598306 0.12907 0.645508 0.150391C0.691832 0.171346 0.733094 0.201824 0.767578 0.239258L3.90234 3.58691L7.03711 0.239258C7.10547 0.164191 7.20108 0.119752 7.30273 0.117188Z",fill:"#20232B",stroke:"#20232B",strokeWidth:.233333})})}var W=styled(m,{shouldForwardProp:e=>e!=="open"&&e!=="disabled"})(({disabled:e})=>({display:"flex",alignItems:"center",cursor:e?"not-allowed":"pointer",position:"relative",maxWidth:"100%"})),A=styled(m,{shouldForwardProp:e=>e!=="disabled"})(({theme:e,disabled:t})=>({flex:1,minWidth:0,height:32,maxHeight:32,borderRadius:"4px",overflow:"hidden",backgroundColor:e.palette.grey[400],cursor:t?"default":"pointer",position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",padding:"0 28px 0 8px",[`&:where(.${r.hasLabel})`]:{height:40,maxHeight:40,justifyContent:"flex-end"}})),R=styled(j,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:t})=>({fontSize:"10px",fontWeight:500,lineHeight:"10px",color:t?e.palette.text.disabled:e.palette.grey[700],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",paddingTop:8})),B=styled(m,{shouldForwardProp:e=>e!=="$placeholder"&&e!=="$disabled"})(({theme:e,$placeholder:t,$disabled:S})=>({fontSize:"11px",lineHeight:"11px",color:S?e.palette.text.disabled:t?e.palette.text.secondary:"#000",height:22,display:"flex",alignItems:"center",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"})),D=styled(m,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:t})=>({position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",width:16,height:16,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",opacity:t?e.palette.action.disabledOpacity:1})),F=styled(m)(()=>({display:"flex",flexDirection:"column",maxHeight:180,overflow:"auto",scrollbarWidth:"thin",scrollbarColor:"#E5E5E5 #E5E5E5"})),z=styled(P$1)(({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"}}}),K=styled(j)(({theme:e})=>({fontSize:"10px",color:e.v2.palette.grey[500],fontWeight:600,lineHeight:"10px"})),V=styled(V$1)(()=>({fontSize:"10px",fontWeight:500,textTransform:"none",justifyContent:"space-between",padding:"8px 20px"}));function Ee(e,t){return e?.id===t?.id}var Y=forwardRef(({id:e,label:t,placeholder:S,renderValue:Z,IconComponent:J,isLoading:Q=false,groups:U,value:f,onChange:X,isOptionEqualToValue:_=Ee,renderOption:ee,renderGroupLabel:oe,open:te,onOpenChange:re,expandedGroupIndex:b,defaultExpandedGroupIndex:le=0,onExpandedGroupChange:ne,disabled:p=false,sx:ae,menuSx:ie,className:de},se)=>{let C=useRef(null),[G,pe]=useState(null),[ce,ue]=useState(le),s=te??G!==null,c=G??C.current,me=b??ce,w=useRef(void 0);s&&c&&c.clientWidth>0&&(w.current=c.clientWidth);let ge=w.current,h=(o,l)=>{pe(l),re?.(o);},Se=o=>{if(p)return;let l=!s;h(l,l?o.currentTarget:null);},$=()=>{s&&h(false,null);},fe=o=>{o.key==="Escape"&&$();},he=(o,l)=>{let a=l?o:null;b===void 0&&ue(a),ne?.(a);},ye=o=>{o.disabled||(X?.(o),h(false,null));},T=Z?.(f)??f?.label??null,L=J,E=!!t;return jsx(Te,{onClickAway:$,children:jsxs(W,{ref:se,id:e,"data-testid":"GroupedSelect",className:lc(r.root,de),sx:ae,open:s,disabled:p,onClick:Se,onKeyDown:fe,children:[jsxs(A,{ref:C,className:lc(r.trigger,E&&r.hasLabel),disabled:p,children:[E&&jsx(R,{$disabled:p,children:t}),jsx(B,{$placeholder:T==null,$disabled:p,children:T??S??""}),jsx(D,{className:r.triggerIcon,$disabled:p,children:Q?jsx(Le,{size:14,sx:{color:"text.secondary"}}):L?jsx(L,{className:lc(s&&"MuiSelect-iconOpen")}):jsx(P,{open:s})})]}),jsx(R$1,{open:s,anchorEl:c,placement:"bottom-start",className:r.menu,sx:kc({width:ge??c?.clientWidth,marginTop:"4px"},ie),children:jsx(F,{className:r.groups,onClick:o=>o.stopPropagation(),onMouseDown:o=>o.stopPropagation(),children:(U??[]).map((o,l)=>jsx(z,{className:r.group,expanded:me===l,onChange:a=>he(l,a),slotProps:{root:{square:true}},label:oe?.(o.group,l)??jsx(K,{variant:"caption",className:r.groupLabel,children:o.group}),content:(o?.options||[]).map((a,xe)=>{let be=_(a,f);return jsxs(V,{className:r.option,startAdornment:null,isDisabled:a.disabled,onClick:()=>ye(a),children:[ee?.(a)??a.label,be&&jsx(d,{src:Pc,alt:"selected",sx:{width:14,height:10},className:r.optionCheck})]},`${l}-${xe}`)})},`${l}`))})})]})})});Y.displayName="GroupedSelect";var ke=memo(Y);export{r as a,ke as b};