@tap-payments/os-micro-frontend-shared 0.3.175 → 0.3.176-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.
Files changed (138) hide show
  1. package/build/_chunks/{chunk-EHCLJT3V.js → chunk-3TKFTDUU.js} +1 -1
  2. package/build/_chunks/{chunk-BPDT4IP3.js → chunk-4GAZ3SQE.js} +1 -1
  3. package/build/_chunks/{chunk-V5YZBTCG.js → chunk-4HKGRDJQ.js} +1 -1
  4. package/build/_chunks/{chunk-JGZH5LQ2.js → chunk-64P2IJTK.js} +1 -1
  5. package/build/_chunks/{chunk-WMNFDDLA.js → chunk-6F5QS6LW.js} +1 -1
  6. package/build/_chunks/{chunk-ALSPE2YR.js → chunk-6Z5EAN7R.js} +1 -1
  7. package/build/_chunks/{chunk-ICVBANEU.js → chunk-7IA2JOEA.js} +1 -1
  8. package/build/_chunks/{chunk-2JIS5JSD.js → chunk-7Q6MEXUY.js} +1 -1
  9. package/build/_chunks/chunk-7T76F7UP.js +1 -0
  10. package/build/_chunks/{chunk-IP74OBDP.js → chunk-ABGVWUYE.js} +1 -1
  11. package/build/_chunks/{chunk-ATK5BDTI.js → chunk-ATOLL6Z7.js} +1 -1
  12. package/build/_chunks/{chunk-QEDTX22M.js → chunk-C3LIADHQ.js} +1 -1
  13. package/build/_chunks/{chunk-VJNVHMBE.js → chunk-EGOELNBL.js} +1 -1
  14. package/build/_chunks/{chunk-BMKDGWIV.js → chunk-ESF4WBBN.js} +1 -1
  15. package/build/_chunks/{chunk-NKQ4Q4L6.js → chunk-HNYQHLED.js} +1 -1
  16. package/build/_chunks/{chunk-7RFCFW5E.js → chunk-HQ6V36KP.js} +1 -1
  17. package/build/_chunks/chunk-HQC2DKSG.js +1 -0
  18. package/build/_chunks/{chunk-6USAIVB3.js → chunk-IH5OWVNN.js} +1 -1
  19. package/build/_chunks/{chunk-M3AE6SMF.js → chunk-IW6GAFMI.js} +2 -2
  20. package/build/_chunks/{chunk-YVBEQFFR.js → chunk-JINGHAGM.js} +1 -1
  21. package/build/_chunks/{chunk-3OHTUAAB.js → chunk-JKH2UKMC.js} +1 -1
  22. package/build/_chunks/{chunk-LT2DT4GO.js → chunk-KA5OW6KM.js} +1 -1
  23. package/build/_chunks/{chunk-63JXNJY3.js → chunk-KC4A5BKD.js} +1 -1
  24. package/build/_chunks/{chunk-3YBBWNUH.js → chunk-LDK7QJZB.js} +1 -1
  25. package/build/_chunks/{chunk-WY6F7QSD.js → chunk-LQVULVAB.js} +1 -1
  26. package/build/_chunks/{chunk-FBV7SJNO.js → chunk-MRUYYZH7.js} +1 -1
  27. package/build/_chunks/{chunk-GRHWJSC5.js → chunk-NA3ZJGND.js} +1 -1
  28. package/build/_chunks/{chunk-JFOU2CKG.js → chunk-NXZOAMNR.js} +1 -1
  29. package/build/_chunks/{chunk-X4UYM3LF.js → chunk-O6WQFHOA.js} +1 -1
  30. package/build/_chunks/{chunk-KAKTL4G5.js → chunk-OMWYCWCN.js} +1 -1
  31. package/build/_chunks/{chunk-DWEEMLMZ.js → chunk-PTY3O5PM.js} +1 -1
  32. package/build/_chunks/{chunk-5MZ666ZY.js → chunk-QCB5IDK3.js} +1 -1
  33. package/build/_chunks/{chunk-5SNZA5EP.js → chunk-QEDWP7RH.js} +1 -1
  34. package/build/_chunks/{chunk-M6QUDQNO.js → chunk-S7BDJA6H.js} +1 -1
  35. package/build/_chunks/{chunk-DLYIC7LX.js → chunk-TNKGHZZM.js} +1 -1
  36. package/build/_chunks/{chunk-56DYY36W.js → chunk-TSKIEYMO.js} +1 -1
  37. package/build/_chunks/{chunk-J3HNTJXL.js → chunk-UCGGUCR5.js} +1 -1
  38. package/build/_chunks/{chunk-O7K4XH7J.js → chunk-V5ACKQNH.js} +1 -1
  39. package/build/_chunks/chunk-WPRI37BB.js +1 -0
  40. package/build/_chunks/{chunk-VCKP77WQ.js → chunk-WZ7VMCB6.js} +1 -1
  41. package/build/_chunks/{chunk-RFQCNH3J.js → chunk-Y3RKRLVZ.js} +1 -1
  42. package/build/_chunks/chunk-ZH35RF3I.js +2 -0
  43. package/build/_chunks/{chunk-UV2PWLWH.js → chunk-ZPYQXJ2S.js} +1 -1
  44. package/build/_chunks/{chunk-X5VSEXDU.js → chunk-ZZAZC5EN.js} +1 -1
  45. package/build/components/ActionMenu/index.js +1 -1
  46. package/build/components/ActiveFilterChip/index.js +1 -1
  47. package/build/components/AmountConversionFilter/index.js +1 -1
  48. package/build/components/AmountInput/index.js +1 -1
  49. package/build/components/AmountSlider/index.js +1 -1
  50. package/build/components/AppServices/index.js +1 -1
  51. package/build/components/AppServicesBar/index.js +1 -1
  52. package/build/components/AppWindowWrapper/index.js +1 -1
  53. package/build/components/BrandLogo/index.js +1 -1
  54. package/build/components/Button/index.js +1 -1
  55. package/build/components/ChipStack/index.js +1 -1
  56. package/build/components/ColorPicker/index.js +1 -1
  57. package/build/components/ColumnViews/index.js +1 -1
  58. package/build/components/ConfirmDialog/index.js +1 -1
  59. package/build/components/CountryFilter/index.js +1 -1
  60. package/build/components/CurrencyFilter/index.js +1 -1
  61. package/build/components/Customer/index.js +1 -1
  62. package/build/components/DateFilter/index.js +1 -1
  63. package/build/components/DeviceIcon/index.js +1 -1
  64. package/build/components/Dialog/index.js +1 -1
  65. package/build/components/Discount/index.js +1 -1
  66. package/build/components/Dropdown2/index.js +1 -1
  67. package/build/components/DropdownButton/index.js +1 -1
  68. package/build/components/DropdownMenu/index.js +1 -1
  69. package/build/components/ExpandableSideBar/index.js +1 -1
  70. package/build/components/FileInputPreview/index.js +1 -1
  71. package/build/components/FileUpload/index.js +1 -1
  72. package/build/components/FilterDropdown/index.js +1 -1
  73. package/build/components/Filters/index.js +1 -1
  74. package/build/components/HeatMap/index.js +1 -1
  75. package/build/components/IconWithBadge/index.js +1 -1
  76. package/build/components/InputBase/index.js +1 -1
  77. package/build/components/Inputs/index.js +1 -1
  78. package/build/components/JSONViewer/index.js +1 -1
  79. package/build/components/LanguageDropdown/index.js +1 -1
  80. package/build/components/ListColumnFilter/index.js +1 -1
  81. package/build/components/ListHeader/index.js +1 -1
  82. package/build/components/MenuItem/index.js +1 -1
  83. package/build/components/MerchantCurrencyDropdown/index.js +1 -1
  84. package/build/components/MerchantLogo/index.js +1 -1
  85. package/build/components/MerchantsDropdown/index.js +1 -1
  86. package/build/components/MultiSelectDropdownButton/index.js +1 -1
  87. package/build/components/MultiSelectWithSearch/index.js +1 -1
  88. package/build/components/NestedDropdown/index.js +1 -1
  89. package/build/components/PartnersFilter/index.js +1 -1
  90. package/build/components/PaymentSourceFilter/index.js +1 -1
  91. package/build/components/PhoneFilter/index.js +1 -1
  92. package/build/components/ProgressRing/index.js +1 -1
  93. package/build/components/RFH/index.js +1 -1
  94. package/build/components/RadioGroup/index.js +1 -1
  95. package/build/components/RangeCalender/index.js +1 -1
  96. package/build/components/RatingCount/index.js +1 -1
  97. package/build/components/ReceiptsViewer/index.js +1 -1
  98. package/build/components/ReferenceTypeFilter/index.js +1 -1
  99. package/build/components/SalesChannelFilter/index.js +1 -1
  100. package/build/components/SearchButton/index.js +1 -1
  101. package/build/components/SelectWithSearch/index.js +1 -1
  102. package/build/components/StatusBar/index.js +1 -1
  103. package/build/components/StatusButton/index.js +1 -1
  104. package/build/components/StatusFilter/index.js +1 -1
  105. package/build/components/StatusIcons/index.js +1 -1
  106. package/build/components/StatusLabel/index.js +1 -1
  107. package/build/components/TableCells/index.js +1 -1
  108. package/build/components/TableReports/index.js +1 -1
  109. package/build/components/TooltipChip/index.js +1 -1
  110. package/build/components/TreeDropdown/index.js +1 -1
  111. package/build/components/VAT/index.js +1 -1
  112. package/build/components/VerificationIcon/index.js +1 -1
  113. package/build/components/ViewColumnRadioFilter/index.js +1 -1
  114. package/build/components/VirtualTables/index.js +1 -1
  115. package/build/components/WindowSideBar/index.js +1 -1
  116. package/build/components/index.d.ts +0 -1
  117. package/build/components/index.js +1 -1
  118. package/build/components/primitives/Typography/constants.d.ts +2 -0
  119. package/build/components/primitives/Typography/index.d.ts +1 -1
  120. package/build/components/primitives/Typography/style.d.ts +5 -1
  121. package/build/components/primitives/Typography/type.d.ts +12 -12
  122. package/build/components/primitives/index.d.ts +1 -1
  123. package/build/components/primitives/index.js +1 -1
  124. package/build/index.js +1 -1
  125. package/build/theme/_v2/index.d.ts +1 -0
  126. package/build/theme/_v2/type.d.ts +37 -0
  127. package/build/theme/_v2/typography.d.ts +3 -0
  128. package/build/theme/index.js +1 -1
  129. package/package.json +2 -2
  130. package/build/_chunks/chunk-7NWGCOJA.js +0 -2
  131. package/build/_chunks/chunk-KZ6MYQ5Z.js +0 -1
  132. package/build/_chunks/chunk-UJSTHVLW.js +0 -1
  133. package/build/_chunks/chunk-VYVPDCR6.js +0 -1
  134. package/build/_chunks/chunk-W4TAUKHQ.js +0 -1
  135. package/build/components/IOSSwitch/IOSSwitch.d.ts +0 -8
  136. package/build/components/IOSSwitch/index.d.ts +0 -2
  137. package/build/components/IOSSwitch/index.js +0 -1
  138. package/build/components/IOSSwitch/styles.d.ts +0 -1
@@ -1 +1 @@
1
- import {f,v}from'./chunk-7NWGCOJA.js';import {yc}from'./chunk-W6W4YZ7G.js';import {useId}from'react';import {styled,MenuItem,Menu,ListItemIcon,ListItemText,Select,useTheme,Box}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var g=styled(MenuItem,{shouldForwardProp:t=>t!=="alwaysShowRightAction"})(({theme:t,alwaysShowRightAction:n})=>({backgroundColor:n?t.palette.common.lightOrange:"","&:hover":{backgroundColor:n?t.palette.common.lightOrange:"",boxShadow:t.shadows[10],":hover":{"& .sandbox-Icon":{left:"-16px !important",transition:"all 0.3s ease-in-out"},"& .close-Icon":{display:"block !important"}}}})),h=styled(Menu,{shouldForwardProp:t=>t!=="minWidth"})(({theme:t,minWidth:n})=>({".MuiMenu-paper":{borderRadius:4,minWidth:n},".MuiMenuItem-root":{display:"flex",gap:"4px",minHeight:"36px",alignItems:"center",paddingInline:8,transition:t.transitions.create(["visibility"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.complex}),".menu-right-action":{visibility:"hidden"},"&:hover":{".menu-right-action":{visibility:"visible"}}},"&.tap-dropdown":{zIndex:2e3,".MuiList-root":{padding:0}}})),x=styled(ListItemIcon)(()=>({minWidth:"16px !important"})),S=styled(ListItemText)(()=>({".MuiTypography-root":{fontSize:"0.6875rem"}})),D=styled(Select)(({theme:t})=>({padding:"0.25rem 0.34rem 0.25rem 0.5rem",display:"flex",justifyContent:"center",alignItems:"center",gap:"0.19rem",width:"auto",flexShrink:0,borderRadius:"0.5rem",boxShadow:t.shadows[5],cursor:"pointer",outline:t.palette.background.default,border:"none",backgroundColor:t.palette.background.default,"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiMenuList-root":{padding:"0px !important",margin:0},"& .MuiSelect-outlined":{padding:"0px !important"}})),z=styled(MenuItem)(({theme:t})=>({display:"flex",height:"2.5rem",width:"10.43rem",alignItems:"center",gap:"0.5",alignSelf:"stretch",transition:"boxShadow 0.2s ease-in-out",backgroundColor:"inherit !important",margin:0,padding:0,paddingTop:"0px !important",paddingBottom:"0px !important","&:hover":{boxSizing:"border-box",boxShadow:`${t.shadows[3]}`}})),A=styled("p")(({theme:t})=>({color:t.palette.text.primary,fontSize:"0.68rem",fontWeight:600,textAlign:"center",padding:"0 !important",margin:"0 !important",textTransform:"capitalize",".MuiOutlinedInput-input":{paddingRight:0},"MuiInputBase-input":{paddingRight:0},".MuiSelect-select":{paddingRight:0}})),W=styled("p")(({theme:t})=>({fontSize:"0.75rem",fontWeight:500,color:t.palette.text.primary,paddingLeft:"1rem !important",transition:"boxShadow 0.2s ease-in-out"})),B=styled("img")(()=>({width:"0.75rem",height:"auto",padding:0,paddingBottom:.5,margin:0,verticalAlign:"middle",boxSizing:"border-box"})),y=styled(f)(()=>({padding:0,paddingRight:"4px",width:"14px !important",".MuiSvgIcon-root":{width:"12px !important",height:"12px !important"}}));function N({open:t,menuItems:n,anchorEl:a,onClose:d,footer:f,selected:w,multiple:M,allowShadows:p=true,...C}){let k=yc(useId(),"dropdown-menu"),l=useTheme();return jsxs(h,{id:k,"data-testid":"DropdownMenu",open:t,anchorEl:a,onClose:d,onContextMenu:o=>{o.preventDefault(),d();},...C,className:"tap-dropdown",minWidth:a?.clientWidth||"auto",children:[n.map((o,r)=>o.name==="divider"?jsx(v,{sx:{margin:"0 !important"}},`${o.label}-${r}`):jsx("div",{children:o.label&&jsxs(g,{alwaysShowRightAction:o.alwaysShowRightAction,onClick:v=>{o.onClick&&o.onClick(v);},onContextMenu:o.onRightClick,selected:o.selected,sx:{"&:hover":{backgroundColor:"transparent",boxShadow:p?l.shadows[10]:"none","& .sandbox-Icon":{display:"none"},"& .close-Icon":{display:"block !important"}},...r===w&&{backgroundColor:"transparent",boxShadow:p?l.shadows[10]:"none"},...o.sx},children:[M&&jsx(y,{size:"small",checked:o.selected}),o.icon&&jsx(x,{children:o.icon}),jsx(S,{children:o.label}),jsx(Box,{className:o.alwaysShowRightAction?"":"menu-right-action",children:o.rightAction&&o.rightAction})]})},`${o.label}-${r}`)),f]})}var I=N;var Y=I;export{D as a,z as b,A as c,W as d,B as e,Y as f};
1
+ import {f,v}from'./chunk-ZH35RF3I.js';import {yc}from'./chunk-W6W4YZ7G.js';import {useId}from'react';import {styled,MenuItem,Menu,ListItemIcon,ListItemText,Select,useTheme,Box}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var g=styled(MenuItem,{shouldForwardProp:t=>t!=="alwaysShowRightAction"})(({theme:t,alwaysShowRightAction:n})=>({backgroundColor:n?t.palette.common.lightOrange:"","&:hover":{backgroundColor:n?t.palette.common.lightOrange:"",boxShadow:t.shadows[10],":hover":{"& .sandbox-Icon":{left:"-16px !important",transition:"all 0.3s ease-in-out"},"& .close-Icon":{display:"block !important"}}}})),h=styled(Menu,{shouldForwardProp:t=>t!=="minWidth"})(({theme:t,minWidth:n})=>({".MuiMenu-paper":{borderRadius:4,minWidth:n},".MuiMenuItem-root":{display:"flex",gap:"4px",minHeight:"36px",alignItems:"center",paddingInline:8,transition:t.transitions.create(["visibility"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.complex}),".menu-right-action":{visibility:"hidden"},"&:hover":{".menu-right-action":{visibility:"visible"}}},"&.tap-dropdown":{zIndex:2e3,".MuiList-root":{padding:0}}})),x=styled(ListItemIcon)(()=>({minWidth:"16px !important"})),S=styled(ListItemText)(()=>({".MuiTypography-root":{fontSize:"0.6875rem"}})),D=styled(Select)(({theme:t})=>({padding:"0.25rem 0.34rem 0.25rem 0.5rem",display:"flex",justifyContent:"center",alignItems:"center",gap:"0.19rem",width:"auto",flexShrink:0,borderRadius:"0.5rem",boxShadow:t.shadows[5],cursor:"pointer",outline:t.palette.background.default,border:"none",backgroundColor:t.palette.background.default,"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiMenuList-root":{padding:"0px !important",margin:0},"& .MuiSelect-outlined":{padding:"0px !important"}})),z=styled(MenuItem)(({theme:t})=>({display:"flex",height:"2.5rem",width:"10.43rem",alignItems:"center",gap:"0.5",alignSelf:"stretch",transition:"boxShadow 0.2s ease-in-out",backgroundColor:"inherit !important",margin:0,padding:0,paddingTop:"0px !important",paddingBottom:"0px !important","&:hover":{boxSizing:"border-box",boxShadow:`${t.shadows[3]}`}})),A=styled("p")(({theme:t})=>({color:t.palette.text.primary,fontSize:"0.68rem",fontWeight:600,textAlign:"center",padding:"0 !important",margin:"0 !important",textTransform:"capitalize",".MuiOutlinedInput-input":{paddingRight:0},"MuiInputBase-input":{paddingRight:0},".MuiSelect-select":{paddingRight:0}})),W=styled("p")(({theme:t})=>({fontSize:"0.75rem",fontWeight:500,color:t.palette.text.primary,paddingLeft:"1rem !important",transition:"boxShadow 0.2s ease-in-out"})),B=styled("img")(()=>({width:"0.75rem",height:"auto",padding:0,paddingBottom:.5,margin:0,verticalAlign:"middle",boxSizing:"border-box"})),y=styled(f)(()=>({padding:0,paddingRight:"4px",width:"14px !important",".MuiSvgIcon-root":{width:"12px !important",height:"12px !important"}}));function N({open:t,menuItems:n,anchorEl:a,onClose:d,footer:f,selected:w,multiple:M,allowShadows:p=true,...C}){let k=yc(useId(),"dropdown-menu"),l=useTheme();return jsxs(h,{id:k,"data-testid":"DropdownMenu",open:t,anchorEl:a,onClose:d,onContextMenu:o=>{o.preventDefault(),d();},...C,className:"tap-dropdown",minWidth:a?.clientWidth||"auto",children:[n.map((o,r)=>o.name==="divider"?jsx(v,{sx:{margin:"0 !important"}},`${o.label}-${r}`):jsx("div",{children:o.label&&jsxs(g,{alwaysShowRightAction:o.alwaysShowRightAction,onClick:v=>{o.onClick&&o.onClick(v);},onContextMenu:o.onRightClick,selected:o.selected,sx:{"&:hover":{backgroundColor:"transparent",boxShadow:p?l.shadows[10]:"none","& .sandbox-Icon":{display:"none"},"& .close-Icon":{display:"block !important"}},...r===w&&{backgroundColor:"transparent",boxShadow:p?l.shadows[10]:"none"},...o.sx},children:[M&&jsx(y,{size:"small",checked:o.selected}),o.icon&&jsx(x,{children:o.icon}),jsx(S,{children:o.label}),jsx(Box,{className:o.alwaysShowRightAction?"":"menu-right-action",children:o.rightAction&&o.rightAction})]})},`${o.label}-${r}`)),f]})}var I=N;var Y=I;export{D as a,z as b,A as c,W as d,B as e,Y as f};
@@ -1 +1 @@
1
- import {c}from'./chunk-2JIS5JSD.js';import {s}from'./chunk-32XNGJJX.js';import {memo,useState,useRef,useEffect}from'react';import {useTranslation}from'react-i18next';import F from'@mui/material/Box';import K from'@mui/material/Button';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var Q=styled(F)(({theme:n})=>({background:n.palette.grey[700],width:27,height:14,display:"inline-flex",alignItems:"center",marginInlineStart:"4px",borderRadius:"10px",padding:"2px 6px",img:{cursor:"pointer"}})),E=styled(F)(()=>({padding:"8px 16px",display:"flex",gap:"8px",justifyContent:"center"})),b=styled(K)(({theme:n})=>({textTransform:"capitalize",minWidth:"auto",width:"100%",borderRadius:"4px",border:`1px solid ${n.palette.info.dark}`,backgroundColor:n.palette.info.dark,fontWeight:700,fontSize:"11px",color:n.palette.common.white,"&:hover":{backgroundColor:n.palette.info.dark}})),O=styled(K)(({theme:n})=>({textTransform:"capitalize",minWidth:"auto",width:"100%",borderRadius:"4px",border:`1px solid ${n.palette.divider}`,backgroundColor:n.palette.common.white,fontWeight:500,fontSize:"11px",color:n.palette.text.primary,"&:hover":{background:"transparent"}}));var v="188px";function $({onCloseDropdown:n,filter:o,styles:g,header:R,searchable:c$1}){let[T,W]=useState([]),{t:f}=useTranslation(),p=useRef([]),B=o?.options?.map(e=>e.value).join(",")??"";useEffect(()=>{let e=i=>{let r=o?.data?.[o.apiKey]??[];if(Array.isArray(r)&&r.length)return new Set(r).has(i)},s=i=>i.map(({placeholder:r,value:t,isSelected:a,icon:l,options:d})=>{let x;if(c$1){let m=p.current.find(y=>y.apiKey===t);x=m!==void 0?m.isSelected??false:(a||e(t)||d?.every(({value:y})=>e(y)))??false;}else x=(a||e(t)||d?.every(({value:m})=>e(m)))??false;return {...r&&{label:r},name:t,selected:x,...l&&{icon:l},...d?.length&&{menuItems:s(d)}}});o.options&&W(s(o.options));},[o?.data,B,c$1]);let h=()=>{p.current=[];},P=e=>{h(),n(e);},I=()=>{if(c$1){let e=new Set(o?.data?.[o.apiKey]??[]);p.current.forEach(({apiKey:s,options:i,isSelected:r})=>{i?i.forEach(({apiKey:t,isSelected:a})=>{a?e.add(t):e.delete(t);}):r?e.add(s):e.delete(s);}),o?.onConfirm?.({[o.apiKey]:[...e]});}else {let e=p.current.reduce((s,{options:i,apiKey:r,isSelected:t})=>{if(i){let a=i.filter(({isSelected:l})=>l);a.length&&s.push(...a.map(({apiKey:l})=>l));}else t&&s.push(r);return s},[]);p.current.length&&o?.onConfirm?.({[o.apiKey]:[...new Set(e)]});}h();},V=s(I,n),A=e=>{I(),n(e);},N=e=>{let s=r=>r.map(({name:t,selected:a,menuItems:l,label:d})=>({...d&&{placeholder:d},apiKey:t,isSelected:a,...l?.length&&{options:s(l)}})),i=s(e);if(c$1){let r=new Set(i.map(t=>t.apiKey));p.current=[...p.current.filter(t=>!r.has(t.apiKey)),...i];}else p.current=i;},w=g?.maxWidth??v,k={maxWidth:w,width:`min(${w}, max-content)`};return jsx(c,{"data-testid":"ColumnFilter_List",title:f("filterBy")||"Filter by",menuItems:T,style:g,menuSx:k,sx:[e=>({...k,marginTop:"10px",textAlign:"left",boxShadow:e.shadows[3],overflow:"hidden",".nested-menu-item":{height:41,zIndex:9999}}),...(Array.isArray(o.sx)?o.sx:[o.sx]).filter(Boolean)],updatedList:N,header:R,onKeyDown:V,footer:jsxs(E,{sx:{position:"sticky",bottom:0,zIndex:99999},children:[jsx(O,{onClick:P,children:f("cancel")},"nested-dropdown-cancel"),jsx(b,{onClick:A,children:f("okay")},"nested-dropdown-ok")]})})}var M=memo($);var ce=M;export{v as a,Q as b,E as c,b as d,O as e,ce as f};
1
+ import {c}from'./chunk-7Q6MEXUY.js';import {s}from'./chunk-32XNGJJX.js';import {memo,useState,useRef,useEffect}from'react';import {useTranslation}from'react-i18next';import F from'@mui/material/Box';import K from'@mui/material/Button';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var Q=styled(F)(({theme:n})=>({background:n.palette.grey[700],width:27,height:14,display:"inline-flex",alignItems:"center",marginInlineStart:"4px",borderRadius:"10px",padding:"2px 6px",img:{cursor:"pointer"}})),E=styled(F)(()=>({padding:"8px 16px",display:"flex",gap:"8px",justifyContent:"center"})),b=styled(K)(({theme:n})=>({textTransform:"capitalize",minWidth:"auto",width:"100%",borderRadius:"4px",border:`1px solid ${n.palette.info.dark}`,backgroundColor:n.palette.info.dark,fontWeight:700,fontSize:"11px",color:n.palette.common.white,"&:hover":{backgroundColor:n.palette.info.dark}})),O=styled(K)(({theme:n})=>({textTransform:"capitalize",minWidth:"auto",width:"100%",borderRadius:"4px",border:`1px solid ${n.palette.divider}`,backgroundColor:n.palette.common.white,fontWeight:500,fontSize:"11px",color:n.palette.text.primary,"&:hover":{background:"transparent"}}));var v="188px";function $({onCloseDropdown:n,filter:o,styles:g,header:R,searchable:c$1}){let[T,W]=useState([]),{t:f}=useTranslation(),p=useRef([]),B=o?.options?.map(e=>e.value).join(",")??"";useEffect(()=>{let e=i=>{let r=o?.data?.[o.apiKey]??[];if(Array.isArray(r)&&r.length)return new Set(r).has(i)},s=i=>i.map(({placeholder:r,value:t,isSelected:a,icon:l,options:d})=>{let x;if(c$1){let m=p.current.find(y=>y.apiKey===t);x=m!==void 0?m.isSelected??false:(a||e(t)||d?.every(({value:y})=>e(y)))??false;}else x=(a||e(t)||d?.every(({value:m})=>e(m)))??false;return {...r&&{label:r},name:t,selected:x,...l&&{icon:l},...d?.length&&{menuItems:s(d)}}});o.options&&W(s(o.options));},[o?.data,B,c$1]);let h=()=>{p.current=[];},P=e=>{h(),n(e);},I=()=>{if(c$1){let e=new Set(o?.data?.[o.apiKey]??[]);p.current.forEach(({apiKey:s,options:i,isSelected:r})=>{i?i.forEach(({apiKey:t,isSelected:a})=>{a?e.add(t):e.delete(t);}):r?e.add(s):e.delete(s);}),o?.onConfirm?.({[o.apiKey]:[...e]});}else {let e=p.current.reduce((s,{options:i,apiKey:r,isSelected:t})=>{if(i){let a=i.filter(({isSelected:l})=>l);a.length&&s.push(...a.map(({apiKey:l})=>l));}else t&&s.push(r);return s},[]);p.current.length&&o?.onConfirm?.({[o.apiKey]:[...new Set(e)]});}h();},V=s(I,n),A=e=>{I(),n(e);},N=e=>{let s=r=>r.map(({name:t,selected:a,menuItems:l,label:d})=>({...d&&{placeholder:d},apiKey:t,isSelected:a,...l?.length&&{options:s(l)}})),i=s(e);if(c$1){let r=new Set(i.map(t=>t.apiKey));p.current=[...p.current.filter(t=>!r.has(t.apiKey)),...i];}else p.current=i;},w=g?.maxWidth??v,k={maxWidth:w,width:`min(${w}, max-content)`};return jsx(c,{"data-testid":"ColumnFilter_List",title:f("filterBy")||"Filter by",menuItems:T,style:g,menuSx:k,sx:[e=>({...k,marginTop:"10px",textAlign:"left",boxShadow:e.shadows[3],overflow:"hidden",".nested-menu-item":{height:41,zIndex:9999}}),...(Array.isArray(o.sx)?o.sx:[o.sx]).filter(Boolean)],updatedList:N,header:R,onKeyDown:V,footer:jsxs(E,{sx:{position:"sticky",bottom:0,zIndex:99999},children:[jsx(O,{onClick:P,children:f("cancel")},"nested-dropdown-cancel"),jsx(b,{onClick:A,children:f("okay")},"nested-dropdown-ok")]})})}var M=memo($);var ce=M;export{v as a,Q as b,E as c,b as d,O as e,ce as f};
@@ -1 +1 @@
1
- import {a}from'./chunk-YL2COX6W.js';import {ba,ca}from'./chunk-7NWGCOJA.js';import {yc,Ac}from'./chunk-W6W4YZ7G.js';import {Db,B,Rf}from'./chunk-3YAJNHQC.js';import {memo,useId,useState,useEffect,useRef}from'react';import {styled,Box,TextField,Button,Typography,FormControl,InputLabel,Select,MenuItem}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import W from'@mui/material/Box';import Me from'@mui/material/ClickAwayListener';import ve from'@mui/material/Popper';import T from'@mui/material/Skeleton';import {styled as styled$1}from'@mui/material/styles';import {useFormContext,Controller}from'react-hook-form';var _=styled(Box)(()=>({display:"flex",flexDirection:"column",gap:"4px",width:"100%",height:40,"& *":{flex:1,margin:"0px !important"}})),I=styled(TextField,{shouldForwardProp:e=>!["hasError","feedbackType","hasFeedback","hideArrows"].includes(e)})(({theme:e,hasError:n,feedbackType:o,hasFeedback:l,hideArrows:t})=>{let{borderColor:i}=ba(e,o),a=l?"4px 4px 0 0":"4px",s="#F2F2F2";return o&&(s=i),n&&!o&&(s=e.palette.error.main),{"& .MuiFormLabel-asterisk":{color:"red"},"& .MuiInputBase-root":{maxHeight:"40px !important",alignItems:"flex-end !important"},"& fieldset":{border:"1px solid red"},"&:hover fieldset":{border:"1px solid green"},"&.Mui-focused fieldset":{border:"1px solid blue"},border:`1px solid ${s}`,borderBottom:l?"none":void 0,borderRadius:a,"& .MuiInputBase-input":{margin:"0px !important",padding:"0px !important",color:"#20232B !important",fontSize:"11px !important",fontStyle:"normal !important",fontWeight:"500 !important",lineHeight:"130% !important"},"& .MuiFormLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(0, 8px) scale(1)"},".MuiFormLabel-root.MuiFormLabel-filled, .MuiFormLabel-root.MuiInputLabel-shrink":{transform:"translate(0, -1.5px) scale(0.75) "},".MuiFormLabel-root.Mui-focused":{transform:"translate(0, -1.5px) scale(0.75)",fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%"},...t&&{"& input[type=number]":{MozAppearance:"textfield"},"& input[type=number]::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:0},"& input[type=number]::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0}}}}),K=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}));var U=styled("div")(()=>({position:"relative",display:"flex",justifyContent:"flex-end",alignItems:"center"})),O=styled(I)(({theme:e})=>({fontSize:"11px",lineHeight:"11px",color:e.palette.common.black,borderRadius:"5px",boxShadow:"0px 0px 6px 0px rgba(0, 0, 0, 0.11);",padding:"4px 8px",height:"32px",border:"none",outline:"none",width:"100%","&:focus":{border:"1px solid #1F88D0"}})),G=styled(Button)(({theme:e})=>({display:"flex",height:"24px",padding:"8px",justifyContent:"center",alignItems:"center",gap:"8px",backgroundColor:e.palette.divider,color:e.palette.grey[700],fontSize:"9px",fontWeight:500,textTransform:"none",position:"absolute",right:4,opacity:"1 !important",top:4,borderRadius:"4px"}));function L(e){let n=yc(useId(),"file-input"),o=useRef(null);return jsxs(Fragment,{children:[jsxs(U,{id:n,"data-testid":"InputContainer",children:[jsx(O,{value:o.current?.files?.[0]?.name||"",...e}),jsx(G,{onClick:()=>{o.current?.click();},children:"Browse"})]}),jsx("input",{type:"file",ref:o,style:{display:"none"}})]})}var Fe=L;var Q=styled$1("button")(({theme:e})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"10.889px",borderRadius:"3px"},".arrow":{width:14},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px"},height:24,cursor:"pointer"})),X=styled$1(W)(({theme:e})=>({backgroundColor:e.palette.common.white,padding:"4px 8px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,width:100})),Y=styled$1("ul")(()=>({listStyle:"none",padding:0,margin:0,maxHeight:100,overflow:"auto"})),Z=styled$1("li")(({theme:e})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"10.889px",borderRadius:"3px"},".arrow":{width:14},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px"},height:24,cursor:"pointer"})),j=styled$1(a)(()=>({height:24,padding:"4px",marginBottom:"4px"})),ee=styled$1(W)(()=>({color:"red !important"}));styled$1("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}));var te=styled$1(W)(({theme:e})=>({border:`1px solid ${e.palette.divider}`,display:"flex",position:"relative",paddingInline:"8px",alignItems:"center",borderRadius:"4px",height:"40px"})),oe=styled$1(a,{shouldForwardProp:e=>e!=="error"})(({error:e})=>({img:{cursor:"pointer"},...e&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,borderBottom:"none"}}));function Pe({defaultCountry:e,value:n,onChangeCountry:o,required:l,countries:t=[],isLoading:i=false}){let a=yc(useId(),"countries-dropdown"),[s,g]=useState(null),[F,u]=useState([]),[b,h]=useState(),ue=()=>{if(t&&e){let r=t.find(x=>x.iso2===e);r&&o?.(r);}};useEffect(()=>{u(t||[]),ue();},[t]);let A=!!s,xe=r=>{r.stopPropagation(),g(r.currentTarget);},N=()=>{g(null),h(void 0);},ce=r=>{o?.(r),N(),u(t);},fe=r=>{let x=Number(r.target.value);if(h(x),!x){u(t);return}u(t.filter(ge=>ge.idd_prefix.toString().startsWith(x.toString())));};return i?jsx(T,{variant:"rectangular",width:56.5,height:20,sx:{borderRadius:"4px"}}):jsx(Me,{onClickAway:N,children:jsxs(W,{id:a,"data-testid":"CountriesCode",sx:{position:"relative"},children:[jsxs(Q,{type:"button",onClick:xe,sx:{backgroundColor:"transparent",border:"none",height:34},children:[n?.logo?jsx("img",{src:n.logo,alt:"c",className:"logo"}):jsx(T,{variant:"rectangular",className:"logo"}),jsx("span",{children:`+${n?.idd_prefix}`}),l&&jsx(ee,{component:"span",children:"*"}),jsx(W,{component:"img",src:Db,alt:"d",className:"arrow",sx:{...A&&{transform:"rotate(180deg)"}}})]}),jsx(ve,{open:A,anchorEl:s,children:jsxs(X,{component:"article","data-testid":"CountriesWrapper",children:[jsx(j,{endAdornment:jsx("img",{src:B,alt:"arrow"}),onChange:fe,value:b,hideArrows:true}),jsx(Y,{children:F.map(r=>jsxs(Z,{onClick:()=>{ce(r);},children:[r.logo?jsx("img",{src:r.logo,alt:"c",className:"logo"}):jsx(T,{variant:"rectangular",className:"logo"}),jsx("span",{children:`+${r.idd_prefix}`})]},`country-code-${r.countryId}`))})]})})]})})}var ne=memo(Pe);var Le=ne;function E(e){let n=yc(useId(),"inputs-input"),{control:o}=useFormContext();return jsx(Controller,{name:e.name,control:o,render:({field:l,fieldState:{error:t}})=>{let i=e.feedback,{isProvided:a,isVisible:s,type:g}=Ac(i),F=e.label??e.placeholder,u=e.label&&typeof e.placeholder=="string"?e.placeholder:void 0,b=t?.message??e.helperText,h=!a&&b?jsx(K,{children:b}):null;return jsxs(Box,{sx:{display:"flex",alignItems:"stretch",height:"100%",flexDirection:"column",flex:1},children:[jsx(_,{id:n,"data-testid":"InputWrapper",children:jsx(I,{rows:1,hasError:(!!t?.message||!!e.error)&&!a,hasFeedback:s,feedbackType:g,...l,variant:"standard",label:F,placeholder:u,size:"small",required:e.required,fullWidth:true,InputProps:{disabled:e.disabled,disableUnderline:true,...e.InputProps,sx:{fontSize:"11px",height:"40px",padding:"8px",borderRadius:s?"4px 4px 0 0":"4px",...e.InputProps?.sx},endAdornment:e?.InputProps?.endAdornment},InputLabelProps:{...e.InputLabelProps,sx:{color:"#8D8D94 !important",fontSize:"11px",padding:"8px",...e.InputLabelProps?.sx}},sx:e?.sx,disabled:e?.disabled,focused:e?.focused,type:e?.type,hideArrows:e?.hideArrows,onKeyDown:e?.onKeyDown})}),h,a?jsx(ca,{...i}):null]})}})}var H=E;var pe=styled("img")(()=>({width:"12px",height:"12px",marginRight:"4px"})),le=styled("div")(({theme:e})=>({display:"flex",alignItems:"center",color:`${e.palette.custom[500]}`,fontSize:"10px",padding:"8px 12px",background:"#FF000026",borderRadius:"0 0 4px 4px",borderTop:"none",height:"32px"}));function z({showSearchIcon:e=true,error:n,errorMessage:o,feedback:l,...t}){let i=yc(useId(),"search-input"),a=!!(n&&o&&!l);return jsxs(Box,{id:i,"data-testid":"SearchInput",children:[jsx(H,{InputProps:{endAdornment:!t.disabled&&e&&jsx(Box,{component:"img",maxWidth:"16px",maxHeight:"16px",src:B,alt:"search"}),sx:{...a&&{border:"1px solid #FF000026",borderBottom:"none",borderRadius:"4px 4px 0 0"}},...t.InputProps},sx:{...a&&{border:"1px solid #FF000026",borderBottom:"none",borderRadius:"4px 4px 0 0"}},feedback:l,error:n,...t}),a&&jsxs(le,{children:[jsx(pe,{src:Rf}),jsx(Typography,{color:"red",fontSize:"10px",children:o})]})]})}var Ae=z;function D(e){let n=yc(useId(),"inputs-select"),{control:o}=useFormContext();return jsx(Controller,{name:e.name,control:o,render:({field:l,fieldState:{error:t}})=>jsxs(Box,{id:n,"data-testid":"InputsSelect",sx:{display:"flex",alignItems:"stretch",height:"100%",flexDirection:"column",flex:1},children:[jsxs(FormControl,{variant:"filled",sx:{minWidth:52,height:"40px !important",maxHeight:"40px !important",width:"100%","& .MuiFormLabel-asterisk":{color:"red"},"& .MuiFormLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)"},".MuiFormLabel-root.MuiFormLabel-filled":{transform:"translate(8px, 8px) scale(0.75) "},".MuiFormLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)",fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%"}},required:e.required,children:[jsx(InputLabel,{id:"demo-simple-select-filled-label",sx:{fontSize:"11px",color:"#8D8D94 !important"},children:e.label}),jsx(Select,{inputProps:{sx:{backgroundColor:"#F9F9F9 !important",borderRadius:"4px",fontSize:"11px"}},...l,value:l.value??"",error:!!t,disableUnderline:true,required:true,labelId:"demo-simple-select-filled-label",id:"demo-simple-select-filled",sx:{width:"100%",height:"40px !important",maxHeight:"40px !important",borderRadius:"4px",overflow:"hidden",".MuiSelect-select":{padding:"0px 8px !important",height:"40px !important",maxHeight:"40px !important",display:"flex",alignItems:"flex-end !important"},".MuiSelect-filled":{padding:"0px 8px !important"},...t&&{border:"1px solid #FF3D00"}},children:(e.options||[]).map(i=>jsx(MenuItem,{value:i.value??"",sx:{fontSize:"12px"},children:i.label},i.value??""))})]}),t?.message&&jsx(Box,{component:"small",sx:i=>({color:i.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}),children:t.message})]})})}var Oe=D;export{Fe as a,te as b,oe as c,Le as d,H as e,Ae as f,Oe as g};
1
+ import {a}from'./chunk-YL2COX6W.js';import {ba,ca}from'./chunk-ZH35RF3I.js';import {yc,Ac}from'./chunk-W6W4YZ7G.js';import {Db,B,Rf}from'./chunk-3YAJNHQC.js';import {memo,useId,useState,useEffect,useRef}from'react';import {styled,Box,TextField,Button,Typography,FormControl,InputLabel,Select,MenuItem}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import W from'@mui/material/Box';import Me from'@mui/material/ClickAwayListener';import ve from'@mui/material/Popper';import T from'@mui/material/Skeleton';import {styled as styled$1}from'@mui/material/styles';import {useFormContext,Controller}from'react-hook-form';var _=styled(Box)(()=>({display:"flex",flexDirection:"column",gap:"4px",width:"100%",height:40,"& *":{flex:1,margin:"0px !important"}})),I=styled(TextField,{shouldForwardProp:e=>!["hasError","feedbackType","hasFeedback","hideArrows"].includes(e)})(({theme:e,hasError:n,feedbackType:o,hasFeedback:l,hideArrows:t})=>{let{borderColor:i}=ba(e,o),a=l?"4px 4px 0 0":"4px",s="#F2F2F2";return o&&(s=i),n&&!o&&(s=e.palette.error.main),{"& .MuiFormLabel-asterisk":{color:"red"},"& .MuiInputBase-root":{maxHeight:"40px !important",alignItems:"flex-end !important"},"& fieldset":{border:"1px solid red"},"&:hover fieldset":{border:"1px solid green"},"&.Mui-focused fieldset":{border:"1px solid blue"},border:`1px solid ${s}`,borderBottom:l?"none":void 0,borderRadius:a,"& .MuiInputBase-input":{margin:"0px !important",padding:"0px !important",color:"#20232B !important",fontSize:"11px !important",fontStyle:"normal !important",fontWeight:"500 !important",lineHeight:"130% !important"},"& .MuiFormLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(0, 8px) scale(1)"},".MuiFormLabel-root.MuiFormLabel-filled, .MuiFormLabel-root.MuiInputLabel-shrink":{transform:"translate(0, -1.5px) scale(0.75) "},".MuiFormLabel-root.Mui-focused":{transform:"translate(0, -1.5px) scale(0.75)",fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%"},...t&&{"& input[type=number]":{MozAppearance:"textfield"},"& input[type=number]::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:0},"& input[type=number]::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0}}}}),K=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}));var U=styled("div")(()=>({position:"relative",display:"flex",justifyContent:"flex-end",alignItems:"center"})),O=styled(I)(({theme:e})=>({fontSize:"11px",lineHeight:"11px",color:e.palette.common.black,borderRadius:"5px",boxShadow:"0px 0px 6px 0px rgba(0, 0, 0, 0.11);",padding:"4px 8px",height:"32px",border:"none",outline:"none",width:"100%","&:focus":{border:"1px solid #1F88D0"}})),G=styled(Button)(({theme:e})=>({display:"flex",height:"24px",padding:"8px",justifyContent:"center",alignItems:"center",gap:"8px",backgroundColor:e.palette.divider,color:e.palette.grey[700],fontSize:"9px",fontWeight:500,textTransform:"none",position:"absolute",right:4,opacity:"1 !important",top:4,borderRadius:"4px"}));function L(e){let n=yc(useId(),"file-input"),o=useRef(null);return jsxs(Fragment,{children:[jsxs(U,{id:n,"data-testid":"InputContainer",children:[jsx(O,{value:o.current?.files?.[0]?.name||"",...e}),jsx(G,{onClick:()=>{o.current?.click();},children:"Browse"})]}),jsx("input",{type:"file",ref:o,style:{display:"none"}})]})}var Fe=L;var Q=styled$1("button")(({theme:e})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"10.889px",borderRadius:"3px"},".arrow":{width:14},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px"},height:24,cursor:"pointer"})),X=styled$1(W)(({theme:e})=>({backgroundColor:e.palette.common.white,padding:"4px 8px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,width:100})),Y=styled$1("ul")(()=>({listStyle:"none",padding:0,margin:0,maxHeight:100,overflow:"auto"})),Z=styled$1("li")(({theme:e})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"10.889px",borderRadius:"3px"},".arrow":{width:14},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px"},height:24,cursor:"pointer"})),j=styled$1(a)(()=>({height:24,padding:"4px",marginBottom:"4px"})),ee=styled$1(W)(()=>({color:"red !important"}));styled$1("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}));var te=styled$1(W)(({theme:e})=>({border:`1px solid ${e.palette.divider}`,display:"flex",position:"relative",paddingInline:"8px",alignItems:"center",borderRadius:"4px",height:"40px"})),oe=styled$1(a,{shouldForwardProp:e=>e!=="error"})(({error:e})=>({img:{cursor:"pointer"},...e&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,borderBottom:"none"}}));function Pe({defaultCountry:e,value:n,onChangeCountry:o,required:l,countries:t=[],isLoading:i=false}){let a=yc(useId(),"countries-dropdown"),[s,g]=useState(null),[F,u]=useState([]),[b,h]=useState(),ue=()=>{if(t&&e){let r=t.find(x=>x.iso2===e);r&&o?.(r);}};useEffect(()=>{u(t||[]),ue();},[t]);let A=!!s,xe=r=>{r.stopPropagation(),g(r.currentTarget);},N=()=>{g(null),h(void 0);},ce=r=>{o?.(r),N(),u(t);},fe=r=>{let x=Number(r.target.value);if(h(x),!x){u(t);return}u(t.filter(ge=>ge.idd_prefix.toString().startsWith(x.toString())));};return i?jsx(T,{variant:"rectangular",width:56.5,height:20,sx:{borderRadius:"4px"}}):jsx(Me,{onClickAway:N,children:jsxs(W,{id:a,"data-testid":"CountriesCode",sx:{position:"relative"},children:[jsxs(Q,{type:"button",onClick:xe,sx:{backgroundColor:"transparent",border:"none",height:34},children:[n?.logo?jsx("img",{src:n.logo,alt:"c",className:"logo"}):jsx(T,{variant:"rectangular",className:"logo"}),jsx("span",{children:`+${n?.idd_prefix}`}),l&&jsx(ee,{component:"span",children:"*"}),jsx(W,{component:"img",src:Db,alt:"d",className:"arrow",sx:{...A&&{transform:"rotate(180deg)"}}})]}),jsx(ve,{open:A,anchorEl:s,children:jsxs(X,{component:"article","data-testid":"CountriesWrapper",children:[jsx(j,{endAdornment:jsx("img",{src:B,alt:"arrow"}),onChange:fe,value:b,hideArrows:true}),jsx(Y,{children:F.map(r=>jsxs(Z,{onClick:()=>{ce(r);},children:[r.logo?jsx("img",{src:r.logo,alt:"c",className:"logo"}):jsx(T,{variant:"rectangular",className:"logo"}),jsx("span",{children:`+${r.idd_prefix}`})]},`country-code-${r.countryId}`))})]})})]})})}var ne=memo(Pe);var Le=ne;function E(e){let n=yc(useId(),"inputs-input"),{control:o}=useFormContext();return jsx(Controller,{name:e.name,control:o,render:({field:l,fieldState:{error:t}})=>{let i=e.feedback,{isProvided:a,isVisible:s,type:g}=Ac(i),F=e.label??e.placeholder,u=e.label&&typeof e.placeholder=="string"?e.placeholder:void 0,b=t?.message??e.helperText,h=!a&&b?jsx(K,{children:b}):null;return jsxs(Box,{sx:{display:"flex",alignItems:"stretch",height:"100%",flexDirection:"column",flex:1},children:[jsx(_,{id:n,"data-testid":"InputWrapper",children:jsx(I,{rows:1,hasError:(!!t?.message||!!e.error)&&!a,hasFeedback:s,feedbackType:g,...l,variant:"standard",label:F,placeholder:u,size:"small",required:e.required,fullWidth:true,InputProps:{disabled:e.disabled,disableUnderline:true,...e.InputProps,sx:{fontSize:"11px",height:"40px",padding:"8px",borderRadius:s?"4px 4px 0 0":"4px",...e.InputProps?.sx},endAdornment:e?.InputProps?.endAdornment},InputLabelProps:{...e.InputLabelProps,sx:{color:"#8D8D94 !important",fontSize:"11px",padding:"8px",...e.InputLabelProps?.sx}},sx:e?.sx,disabled:e?.disabled,focused:e?.focused,type:e?.type,hideArrows:e?.hideArrows,onKeyDown:e?.onKeyDown})}),h,a?jsx(ca,{...i}):null]})}})}var H=E;var pe=styled("img")(()=>({width:"12px",height:"12px",marginRight:"4px"})),le=styled("div")(({theme:e})=>({display:"flex",alignItems:"center",color:`${e.palette.custom[500]}`,fontSize:"10px",padding:"8px 12px",background:"#FF000026",borderRadius:"0 0 4px 4px",borderTop:"none",height:"32px"}));function z({showSearchIcon:e=true,error:n,errorMessage:o,feedback:l,...t}){let i=yc(useId(),"search-input"),a=!!(n&&o&&!l);return jsxs(Box,{id:i,"data-testid":"SearchInput",children:[jsx(H,{InputProps:{endAdornment:!t.disabled&&e&&jsx(Box,{component:"img",maxWidth:"16px",maxHeight:"16px",src:B,alt:"search"}),sx:{...a&&{border:"1px solid #FF000026",borderBottom:"none",borderRadius:"4px 4px 0 0"}},...t.InputProps},sx:{...a&&{border:"1px solid #FF000026",borderBottom:"none",borderRadius:"4px 4px 0 0"}},feedback:l,error:n,...t}),a&&jsxs(le,{children:[jsx(pe,{src:Rf}),jsx(Typography,{color:"red",fontSize:"10px",children:o})]})]})}var Ae=z;function D(e){let n=yc(useId(),"inputs-select"),{control:o}=useFormContext();return jsx(Controller,{name:e.name,control:o,render:({field:l,fieldState:{error:t}})=>jsxs(Box,{id:n,"data-testid":"InputsSelect",sx:{display:"flex",alignItems:"stretch",height:"100%",flexDirection:"column",flex:1},children:[jsxs(FormControl,{variant:"filled",sx:{minWidth:52,height:"40px !important",maxHeight:"40px !important",width:"100%","& .MuiFormLabel-asterisk":{color:"red"},"& .MuiFormLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)"},".MuiFormLabel-root.MuiFormLabel-filled":{transform:"translate(8px, 8px) scale(0.75) "},".MuiFormLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)",fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%"}},required:e.required,children:[jsx(InputLabel,{id:"demo-simple-select-filled-label",sx:{fontSize:"11px",color:"#8D8D94 !important"},children:e.label}),jsx(Select,{inputProps:{sx:{backgroundColor:"#F9F9F9 !important",borderRadius:"4px",fontSize:"11px"}},...l,value:l.value??"",error:!!t,disableUnderline:true,required:true,labelId:"demo-simple-select-filled-label",id:"demo-simple-select-filled",sx:{width:"100%",height:"40px !important",maxHeight:"40px !important",borderRadius:"4px",overflow:"hidden",".MuiSelect-select":{padding:"0px 8px !important",height:"40px !important",maxHeight:"40px !important",display:"flex",alignItems:"flex-end !important"},".MuiSelect-filled":{padding:"0px 8px !important"},...t&&{border:"1px solid #FF3D00"}},children:(e.options||[]).map(i=>jsx(MenuItem,{value:i.value??"",sx:{fontSize:"12px"},children:i.label},i.value??""))})]}),t?.message&&jsx(Box,{component:"small",sx:i=>({color:i.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}),children:t.message})]})})}var Oe=D;export{Fe as a,te as b,oe as c,Le as d,H as e,Ae as f,Oe as g};
@@ -1 +1 @@
1
- import'./chunk-WMNFDDLA.js';import {P,O as O$1}from'./chunk-7NWGCOJA.js';import {yc}from'./chunk-W6W4YZ7G.js';import {memo,useId,useState,useEffect}from'react';import p from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsx,Fragment}from'react/jsx-runtime';var f="32px";var g=styled(p,{shouldForwardProp:e=>e!=="isMaximized"})(({theme:e,isMaximized:i})=>({background:alpha(e.palette.common.white,.7),backdropFilter:"blur(8px)",width:183,position:"sticky",padding:"16px 8px",paddingTop:i?f:"16px",height:"100%",overflow:"auto"})),b=styled(p)(()=>({display:"flex",flexDirection:"column",gap:"8px"})),S=styled(p,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:i})=>({background:i?"linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)":"transparent",borderRadius:"4px",padding:"4px 8px",color:i?e.palette.common.white:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px",cursor:"pointer",fontWeight:600})),h=styled(p,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:i})=>({background:i?"#FFFFFF":"transparent",borderRadius:"4px",padding:"4px 8px",color:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px",cursor:"pointer",fontWeight:600})),B=styled(P)(({theme:e})=>({background:"transparent",border:"none !important",borderRadius:"4px !important",[`& .${O$1.summary}`]:{padding:0,paddingRight:e.spacing(1),minHeight:"40px",height:"40px","&.Mui-expanded":{minHeight:"40px",height:"40px"},marginBottom:4,borderRadius:"4px !important"},[`& .${O$1.content}`]:{borderTop:"none",padding:0}}));function w({sections:e,isMaximized:i,onClick:m,activeSection:A,activeSubSection:k}){let I=yc(useId(),"expandable-side-bar"),r=A||e?.[0]?.id,F=k||e?.[0]?.subSections?.[0]?.id,[C,c]=useState({});return useEffect(()=>{e?.length&&c(t=>{let o=false,d={...t};for(let x of e)x.id in d||(d[x.id]=r===x.id,o=true);return o?d:t});},[e,r]),useEffect(()=>{r&&c(t=>({...t,[r]:true}));},[r]),jsx(g,{isMaximized:i,id:I,"data-testid":"ExpandableSideBar",children:jsx(b,{children:e?.map(t=>jsx(B,{expanded:C[t.id]??false,onChange:o=>c(d=>({...d,[t.id]:o})),slotProps:{root:{component:"section"}},label:jsx(h,{onClick:()=>{m?.(t.id,t.subSections?.[0]?.id);},isActive:r===t.id,children:t.title}),content:jsx(Fragment,{children:t.subSections?.map(o=>jsx(S,{onClick:()=>{m?.(t.id,o.id);},isActive:F===o.id,children:o.title},`${t.id}-${o.id}`))})},`${t.id}`))})})}var E=memo(w);var O=E;export{O as a};
1
+ import'./chunk-6F5QS6LW.js';import {P,O as O$1}from'./chunk-ZH35RF3I.js';import {yc}from'./chunk-W6W4YZ7G.js';import {memo,useId,useState,useEffect}from'react';import p from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsx,Fragment}from'react/jsx-runtime';var f="32px";var g=styled(p,{shouldForwardProp:e=>e!=="isMaximized"})(({theme:e,isMaximized:i})=>({background:alpha(e.palette.common.white,.7),backdropFilter:"blur(8px)",width:183,position:"sticky",padding:"16px 8px",paddingTop:i?f:"16px",height:"100%",overflow:"auto"})),b=styled(p)(()=>({display:"flex",flexDirection:"column",gap:"8px"})),S=styled(p,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:i})=>({background:i?"linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)":"transparent",borderRadius:"4px",padding:"4px 8px",color:i?e.palette.common.white:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px",cursor:"pointer",fontWeight:600})),h=styled(p,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:i})=>({background:i?"#FFFFFF":"transparent",borderRadius:"4px",padding:"4px 8px",color:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px",cursor:"pointer",fontWeight:600})),B=styled(P)(({theme:e})=>({background:"transparent",border:"none !important",borderRadius:"4px !important",[`& .${O$1.summary}`]:{padding:0,paddingRight:e.spacing(1),minHeight:"40px",height:"40px","&.Mui-expanded":{minHeight:"40px",height:"40px"},marginBottom:4,borderRadius:"4px !important"},[`& .${O$1.content}`]:{borderTop:"none",padding:0}}));function w({sections:e,isMaximized:i,onClick:m,activeSection:A,activeSubSection:k}){let I=yc(useId(),"expandable-side-bar"),r=A||e?.[0]?.id,F=k||e?.[0]?.subSections?.[0]?.id,[C,c]=useState({});return useEffect(()=>{e?.length&&c(t=>{let o=false,d={...t};for(let x of e)x.id in d||(d[x.id]=r===x.id,o=true);return o?d:t});},[e,r]),useEffect(()=>{r&&c(t=>({...t,[r]:true}));},[r]),jsx(g,{isMaximized:i,id:I,"data-testid":"ExpandableSideBar",children:jsx(b,{children:e?.map(t=>jsx(B,{expanded:C[t.id]??false,onChange:o=>c(d=>({...d,[t.id]:o})),slotProps:{root:{component:"section"}},label:jsx(h,{onClick:()=>{m?.(t.id,t.subSections?.[0]?.id);},isActive:r===t.id,children:t.title}),content:jsx(Fragment,{children:t.subSections?.map(o=>jsx(S,{onClick:()=>{m?.(t.id,o.id);},isActive:F===o.id,children:o.title},`${t.id}-${o.id}`))})},`${t.id}`))})})}var E=memo(w);var O=E;export{O as a};
@@ -1 +1 @@
1
- import {c,d}from'./chunk-5SLDZGLX.js';import {a,c as c$1,d as d$1}from'./chunk-YE6EIJWK.js';import {b,a as a$1}from'./chunk-32XNGJJX.js';import {yc,xa}from'./chunk-W6W4YZ7G.js';import {Hf}from'./chunk-3YAJNHQC.js';import {createContext,memo,useRef,useId,useContext,useMemo,useState,useLayoutEffect,useCallback}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {createPortal}from'react-dom';import {styled,Box,Button,alpha,Dialog}from'@mui/material';import nt from'@mui/material/Box';import {Resizable}from're-resizable';import st from'react-draggable';import {motion}from'framer-motion';var Y=createContext({viewerDefaultWidth:555,viewerDefaultHeight:545,position:{x:0,y:0},setPosition:()=>{},dimensions:{width:0,height:0},windowZIndex:1e4,isOpen:true,setIsMaximized:()=>{},setIsSidebarExpanded:()=>{},setIsToolbarAnimationDisabled:()=>{},setIsResized:()=>{},setNewDimensions:()=>{},isMaximized:false,isToolbarAnimationDisabled:true,isSidebarExpanded:false,isResized:false,onClose:()=>{},fullWindowWidth:0,fullWindowHeight:0,resizableRef:{current:null},updateRefSize:()=>{},updateSize:()=>{},containerRef:{current:null}});var Oe=555,Ve=545;function Q({children:e,isOpen:t,onClose:i,defaultWindowHeight:r,defaultWindowWidth:n,initialPosition:l,minWidth:u,maxWidth:a,minHeight:s,maxHeight:d,containerRef:m,windowZIndex:f=1}){let{height:c,width:E}=a$1(),[o,k]=useState(false),L=o?null:m?.current,y=L?.clientWidth||E,h=L?.clientHeight||c,I=n||Oe,g=r||Ve,[v,_]=useState({x:l?.x??y/2+I/2,y:l?.y??h/2-g/2}),[W,z]=useState(false),[T,D]=useState(false),[C,w]=useState(true),H=useRef(),[F,P]=useState({width:n??0,height:r??0}),G=useCallback(b=>{H?.current?.updateSize(b);},[]),O=useCallback(b=>{H.current?.updateSize(b),P(p=>({width:b.width??p.width,height:b.height??p.height}));},[]),J=useMemo(()=>({position:v,setPosition:_,resizableRef:H,windowZIndex:f,isOpen:t,setIsMaximized:k,setIsSidebarExpanded:w,setIsToolbarAnimationDisabled:D,setIsResized:z,isMaximized:o,isToolbarAnimationDisabled:T,isSidebarExpanded:C,isResized:W,dimensions:F,setNewDimensions:P,viewerDefaultWidth:I,viewerDefaultHeight:g,onClose:i,fullWindowWidth:y,fullWindowHeight:h,updateRefSize:G,updateSize:O,minWidth:u,maxWidth:a,minHeight:s,maxHeight:d,containerRef:m}),[v,_,H,t,k,w,D,z,o,T,C,W,F,P,y,h,I,g,G,O,i,u,a,s,d,m,f]);return jsx(Y.Provider,{value:J,children:e})}var xe=(e,t)=>t.toLowerCase().includes(e);function he(e,t,i){let r=xe("top",t),n=xe("left",t);return !r&&!n?null:{x:n?e.x+i.width:e.x,y:r?e.y-i.height:e.y}}var S=.5,we=183,be=287,ge=840,We=545,ee=35;function Xe({title:e,onClose:t,onMaximize:i,maximized:r=false,id:n,onRequestClick:l,isSidebarExpanded:u=false,isHovered:a$1=false,onMouseHover:s,onMouseLeave:d$2,showSectionsButton:m,rightActions:f,icon:c$2}){return jsx(c,{id:n,"data-testid":"UserTitleBar",maximized:r||false,children:jsx(d,{onMouseEnter:s,onMouseLeave:d$2,isMaximized:r,isHovered:a$1,title:e,icon:c$2||Hf,leftActions:jsxs(Fragment,{children:[jsx(a,{onClick:t}),jsx(c$1,{isMaximized:r,onClick:i}),m&&jsx(d$1,{onClick:l,isExpanded:!u,isHovered:a$1,children:"Sidebar"})]}),rightActions:f})})}var ye=memo(Xe);var te=ye;function Ze({isMaximized:e,setIsToolbarAnimationDisabled:t,setIsMaximized:i,onClose:r,isSidebarExpanded:n,setIsSidebarExpanded:l,isToolbarAnimationDisabled:u,title:a,showSectionsButton:s,rightActions:d,icon:m}){let{isHovered:f,onMouseEnter:c,onMouseLeave:E}=b();return jsx(motion.div,{style:{...e&&{height:0,zIndex:1e3,position:"relative"}},animate:{...e&&{width:"100vw"},...!e&&{transform:"translateX(0px)",width:"100%"}},transition:{duration:.5,...u&&{duration:0}},children:jsx(te,{title:a||"Users",showSectionsButton:s,onClose:r,onMaximize:()=>{i?.(o=>!o),t?.(true),setTimeout(()=>{t?.(false);},.5*1e3);},maximized:e,id:"draggable-dialog-title",onRequestClick:()=>{t?.(false),l(!n);},isSidebarExpanded:n,isHovered:f,onMouseHover:c,onMouseLeave:E,rightActions:d,icon:m})})}var Ae=memo(Ze);var Re=Ae;function dt({children:e,titleBar:t,titleBarText:i,mainAppOrder:r,mainAppIsMinimized:n,showSectionsButton:l=true,rightActions:u,titleBarIcon:a,overflow:s="hidden"}){let d=useRef(null),m=yc(useId(),"app-window"),{dimensions:f,position:c,resizableRef:E,isMaximized:o,isOpen:k,onClose:L,viewerDefaultWidth:y,viewerDefaultHeight:h,windowZIndex:I,setPosition:g,setNewDimensions:v,isToolbarAnimationDisabled:_,fullWindowWidth:W,fullWindowHeight:z,setIsMaximized:T,setIsResized:D,isResized:C,setIsToolbarAnimationDisabled:w,setIsSidebarExpanded:H,isSidebarExpanded:F,minWidth:P,maxWidth:G,minHeight:O,maxHeight:J,containerRef:b}=useContext(Y),p=useMemo(()=>document.createElement("div"),[]),[Pe,Be]=useState(null);useLayoutEffect(()=>{Be(b?.current??document.body);},[b]);let x=o?document.body:Pe;useLayoutEffect(()=>{if(!x)return;let A=x===document.body;return p.style.position=A?"":"absolute",p.style.inset=A?"":"0",p.style.pointerEvents="none",p.style.overflow="visible",x.appendChild(p),()=>{p.parentNode===x&&x.removeChild(p);}},[x,p]);let ne=useRef({x:0,y:0}),ae=xa(),Me=useCallback((A,N,se,Le)=>{D(true),v({width:se.offsetWidth,height:se.offsetHeight});let de=he(ne.current,N,Le);de&&g(de);},[v,D,g]),V=f.width||y;if(!x)return null;let ke=jsx(st,{nodeRef:d,disabled:o,handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]',defaultClassName:"draggable-lead-dialog",defaultPosition:{x:W/2-V/2,y:z/2-h/2},position:{x:W-c.x,y:c.y},onStop:(A,N)=>{g({x:W-N.x,y:N.y});},...x===document.body&&{bounds:{top:10}},children:jsx(Dialog,{ref:d,sx:{backgroundColor:"transparent",pointerEvents:"none",zIndex:Number(r||0)+I+(o?1:0),...n&&{display:"none"},...x===document.body?!o&&{transform:"translate(180px, 14px)"}:!o&&{position:"absolute"},...!o&&{width:ae?V:"fit-content",height:ae?h:"fit-content"},...o&&{transform:"none !important"},boxShadow:"0px 0px 20px 0px rgba(0, 0, 0, 0.15)",overflow:"visible","& .MuiDialog-container":{overflow:"visible"}},PaperProps:{style:{margin:0,maxHeight:"100%",maxWidth:"none",background:"transparent",pointerEvents:"auto",overflow:s,width:C?"fit-content":V,height:C?"fit-content":"100%",...o&&{width:"100%",height:"100%"},position:"relative"}},onClose:()=>{T(false),w(true),setTimeout(()=>{w(false);},.5*1e3);},open:k,hideBackdrop:true,disableEnforceFocus:true,disableScrollLock:true,container:p,fullScreen:o,"aria-labelledby":"draggable-dialog-title",disablePortal:true,children:jsx(Resizable,{"data-testid":"Resizable",enable:{topLeft:true,topRight:true,bottomLeft:true,bottomRight:true,left:true,right:true,bottom:true,top:true},handleStyles:{bottom:{zIndex:2},bottomLeft:{zIndex:2},bottomRight:{zIndex:2}},size:{width:f.width,height:f.height},maxHeight:J??z-40,maxWidth:G??W,minWidth:o?"100vw":P??y,minHeight:o?"100vh":O??h,ref:A=>{E.current=A;},onResizeStart:()=>{ne.current=c,w(true);},onResizeStop:()=>{w(false);},onResize:Me,defaultSize:{width:V,height:h},style:{background:"transparent",height:f.height,overflow:s,...o&&{height:"100% !important",width:"100% !important",flex:1},...o&&{position:"relative"}},children:jsxs(nt,{sx:{height:"100%"},id:m,"data-testid":"AppWindow",children:[t??jsx(Re,{setIsToolbarAnimationDisabled:w,onClose:L,setIsMaximized:T,isToolbarAnimationDisabled:_,setIsSidebarExpanded:H,isSidebarExpanded:F,title:i,isMaximized:o,showSectionsButton:l,rightActions:u,icon:a}),e]})})})});return createPortal(ke,p)}var Ie=memo(dt);var ut=styled(Box,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:t})=>({background:t?"linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)":"transparent",borderRadius:"4px",padding:"4px 8px",color:t?e.palette.common.white:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px",cursor:"pointer"})),mt=styled(Button)(({theme:e,disabled:t})=>({background:t?alpha(e.palette.info.dark,.4):e.palette.info.dark,color:e.palette.common.white,padding:"0px 8px",fontSize:"9px",fontWeight:600,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",textTransform:"none","&:hover":{background:e.palette.info.dark,opacity:.8},"&.Mui-disabled":{color:e.palette.common.white}})),ft=styled(Box)(({theme:e})=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"8px",backgroundColor:e.palette.background.paper,padding:"6px",transform:"translateY(calc(-50% - 6px))",boxShadow:"0px 4px 40px 0px rgba(0, 0, 0, 0.19)",borderRadius:"4px",height:"36px",transition:e.transitions.create(["width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.complex})})),ct=styled(Box)(()=>({position:"fixed",height:35,bottom:0,left:0,right:0,padding:"6px 16px",zIndex:1,backgroundColor:"#eaeaea",backdropFilter:"blur(12px)",display:"flex",justifyContent:"flex-end",borderBottomLeftRadius:"12px",borderBottomRightRadius:"12px"})),xt=styled(Button)(()=>({padding:"4px 8px",boxShadow:"0px 0px 4px 0px rgba(0, 0, 0, 0.08)",display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"4px",color:"rgba(32, 35, 43, 0.80)",fontWeight:600,fontSize:"9px",textTransform:"none"}));var ie=Ie;function ht({children:e,windowProps:t,...i}){return i.isOpen?jsx(Q,{...i,children:jsx(ie,{...t,children:e})}):null}var Te=ht;function bt({title:e,maximized:t=false,id:i,isHovered:r=false,onMouseHover:n,onMouseLeave:l,leftActions:u,titleIconSrc:a,sx:s,...d$1}){return jsx(c,{className:"header-wrapper",id:i,maximized:t||false,sx:s,...d$1,children:jsx(d,{onMouseEnter:n,onMouseLeave:l,isMaximized:t,isHovered:r,title:e||"",icon:a,leftActions:u})})}var re=memo(bt);function yt({isMaximized:e,id:t,isToolbarAnimationDisabled:i,title:r,leftActions:n,onClose:l,onMaximize:u,sx:a$1}){let{isHovered:s,onMouseEnter:d,onMouseLeave:m}=b();return jsx(motion.div,{style:{...e&&{height:0,zIndex:1e3,position:"relative"}},animate:{...e&&{width:"100vw"},...!e&&{transform:"translateX(0px)",width:"100%"}},transition:{duration:.5,...i&&{duration:0}},children:jsx(re,{title:r,maximized:e,id:t||"draggable-dialog-title",isHovered:s,onMouseHover:d,onMouseLeave:m,leftActions:n||jsxs(Fragment,{children:[jsx(a,{onClick:l}),jsx(c$1,{isMaximized:e,onClick:()=>u?.(!e)})]}),sx:a$1})})}var Ce=memo(yt);var Rt=Ce;var Vo=Te;export{Y as a,Q as b,S as c,we as d,be as e,ge as f,We as g,ee as h,te as i,ut as j,mt as k,ft as l,ct as m,xt as n,ie as o,re as p,Rt as q,Vo as r};
1
+ import {a,c as c$1,d as d$1}from'./chunk-YE6EIJWK.js';import {c,d}from'./chunk-5SLDZGLX.js';import {b,a as a$1}from'./chunk-32XNGJJX.js';import {yc,xa}from'./chunk-W6W4YZ7G.js';import {Hf}from'./chunk-3YAJNHQC.js';import {createContext,memo,useRef,useId,useContext,useMemo,useState,useLayoutEffect,useCallback}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {createPortal}from'react-dom';import {styled,Box,Button,alpha,Dialog}from'@mui/material';import nt from'@mui/material/Box';import {Resizable}from're-resizable';import st from'react-draggable';import {motion}from'framer-motion';var Y=createContext({viewerDefaultWidth:555,viewerDefaultHeight:545,position:{x:0,y:0},setPosition:()=>{},dimensions:{width:0,height:0},windowZIndex:1e4,isOpen:true,setIsMaximized:()=>{},setIsSidebarExpanded:()=>{},setIsToolbarAnimationDisabled:()=>{},setIsResized:()=>{},setNewDimensions:()=>{},isMaximized:false,isToolbarAnimationDisabled:true,isSidebarExpanded:false,isResized:false,onClose:()=>{},fullWindowWidth:0,fullWindowHeight:0,resizableRef:{current:null},updateRefSize:()=>{},updateSize:()=>{},containerRef:{current:null}});var Oe=555,Ve=545;function Q({children:e,isOpen:t,onClose:i,defaultWindowHeight:r,defaultWindowWidth:n,initialPosition:l,minWidth:u,maxWidth:a,minHeight:s,maxHeight:d,containerRef:m,windowZIndex:f=1}){let{height:c,width:E}=a$1(),[o,k]=useState(false),L=o?null:m?.current,y=L?.clientWidth||E,h=L?.clientHeight||c,I=n||Oe,g=r||Ve,[v,_]=useState({x:l?.x??y/2+I/2,y:l?.y??h/2-g/2}),[W,z]=useState(false),[T,D]=useState(false),[C,w]=useState(true),H=useRef(),[F,P]=useState({width:n??0,height:r??0}),G=useCallback(b=>{H?.current?.updateSize(b);},[]),O=useCallback(b=>{H.current?.updateSize(b),P(p=>({width:b.width??p.width,height:b.height??p.height}));},[]),J=useMemo(()=>({position:v,setPosition:_,resizableRef:H,windowZIndex:f,isOpen:t,setIsMaximized:k,setIsSidebarExpanded:w,setIsToolbarAnimationDisabled:D,setIsResized:z,isMaximized:o,isToolbarAnimationDisabled:T,isSidebarExpanded:C,isResized:W,dimensions:F,setNewDimensions:P,viewerDefaultWidth:I,viewerDefaultHeight:g,onClose:i,fullWindowWidth:y,fullWindowHeight:h,updateRefSize:G,updateSize:O,minWidth:u,maxWidth:a,minHeight:s,maxHeight:d,containerRef:m}),[v,_,H,t,k,w,D,z,o,T,C,W,F,P,y,h,I,g,G,O,i,u,a,s,d,m,f]);return jsx(Y.Provider,{value:J,children:e})}var xe=(e,t)=>t.toLowerCase().includes(e);function he(e,t,i){let r=xe("top",t),n=xe("left",t);return !r&&!n?null:{x:n?e.x+i.width:e.x,y:r?e.y-i.height:e.y}}var S=.5,we=183,be=287,ge=840,We=545,ee=35;function Xe({title:e,onClose:t,onMaximize:i,maximized:r=false,id:n,onRequestClick:l,isSidebarExpanded:u=false,isHovered:a$1=false,onMouseHover:s,onMouseLeave:d$2,showSectionsButton:m,rightActions:f,icon:c$2}){return jsx(c,{id:n,"data-testid":"UserTitleBar",maximized:r||false,children:jsx(d,{onMouseEnter:s,onMouseLeave:d$2,isMaximized:r,isHovered:a$1,title:e,icon:c$2||Hf,leftActions:jsxs(Fragment,{children:[jsx(a,{onClick:t}),jsx(c$1,{isMaximized:r,onClick:i}),m&&jsx(d$1,{onClick:l,isExpanded:!u,isHovered:a$1,children:"Sidebar"})]}),rightActions:f})})}var ye=memo(Xe);var te=ye;function Ze({isMaximized:e,setIsToolbarAnimationDisabled:t,setIsMaximized:i,onClose:r,isSidebarExpanded:n,setIsSidebarExpanded:l,isToolbarAnimationDisabled:u,title:a,showSectionsButton:s,rightActions:d,icon:m}){let{isHovered:f,onMouseEnter:c,onMouseLeave:E}=b();return jsx(motion.div,{style:{...e&&{height:0,zIndex:1e3,position:"relative"}},animate:{...e&&{width:"100vw"},...!e&&{transform:"translateX(0px)",width:"100%"}},transition:{duration:.5,...u&&{duration:0}},children:jsx(te,{title:a||"Users",showSectionsButton:s,onClose:r,onMaximize:()=>{i?.(o=>!o),t?.(true),setTimeout(()=>{t?.(false);},.5*1e3);},maximized:e,id:"draggable-dialog-title",onRequestClick:()=>{t?.(false),l(!n);},isSidebarExpanded:n,isHovered:f,onMouseHover:c,onMouseLeave:E,rightActions:d,icon:m})})}var Ae=memo(Ze);var Re=Ae;function dt({children:e,titleBar:t,titleBarText:i,mainAppOrder:r,mainAppIsMinimized:n,showSectionsButton:l=true,rightActions:u,titleBarIcon:a,overflow:s="hidden"}){let d=useRef(null),m=yc(useId(),"app-window"),{dimensions:f,position:c,resizableRef:E,isMaximized:o,isOpen:k,onClose:L,viewerDefaultWidth:y,viewerDefaultHeight:h,windowZIndex:I,setPosition:g,setNewDimensions:v,isToolbarAnimationDisabled:_,fullWindowWidth:W,fullWindowHeight:z,setIsMaximized:T,setIsResized:D,isResized:C,setIsToolbarAnimationDisabled:w,setIsSidebarExpanded:H,isSidebarExpanded:F,minWidth:P,maxWidth:G,minHeight:O,maxHeight:J,containerRef:b}=useContext(Y),p=useMemo(()=>document.createElement("div"),[]),[Pe,Be]=useState(null);useLayoutEffect(()=>{Be(b?.current??document.body);},[b]);let x=o?document.body:Pe;useLayoutEffect(()=>{if(!x)return;let A=x===document.body;return p.style.position=A?"":"absolute",p.style.inset=A?"":"0",p.style.pointerEvents="none",p.style.overflow="visible",x.appendChild(p),()=>{p.parentNode===x&&x.removeChild(p);}},[x,p]);let ne=useRef({x:0,y:0}),ae=xa(),Me=useCallback((A,N,se,Le)=>{D(true),v({width:se.offsetWidth,height:se.offsetHeight});let de=he(ne.current,N,Le);de&&g(de);},[v,D,g]),V=f.width||y;if(!x)return null;let ke=jsx(st,{nodeRef:d,disabled:o,handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]',defaultClassName:"draggable-lead-dialog",defaultPosition:{x:W/2-V/2,y:z/2-h/2},position:{x:W-c.x,y:c.y},onStop:(A,N)=>{g({x:W-N.x,y:N.y});},...x===document.body&&{bounds:{top:10}},children:jsx(Dialog,{ref:d,sx:{backgroundColor:"transparent",pointerEvents:"none",zIndex:Number(r||0)+I+(o?1:0),...n&&{display:"none"},...x===document.body?!o&&{transform:"translate(180px, 14px)"}:!o&&{position:"absolute"},...!o&&{width:ae?V:"fit-content",height:ae?h:"fit-content"},...o&&{transform:"none !important"},boxShadow:"0px 0px 20px 0px rgba(0, 0, 0, 0.15)",overflow:"visible","& .MuiDialog-container":{overflow:"visible"}},PaperProps:{style:{margin:0,maxHeight:"100%",maxWidth:"none",background:"transparent",pointerEvents:"auto",overflow:s,width:C?"fit-content":V,height:C?"fit-content":"100%",...o&&{width:"100%",height:"100%"},position:"relative"}},onClose:()=>{T(false),w(true),setTimeout(()=>{w(false);},.5*1e3);},open:k,hideBackdrop:true,disableEnforceFocus:true,disableScrollLock:true,container:p,fullScreen:o,"aria-labelledby":"draggable-dialog-title",disablePortal:true,children:jsx(Resizable,{"data-testid":"Resizable",enable:{topLeft:true,topRight:true,bottomLeft:true,bottomRight:true,left:true,right:true,bottom:true,top:true},handleStyles:{bottom:{zIndex:2},bottomLeft:{zIndex:2},bottomRight:{zIndex:2}},size:{width:f.width,height:f.height},maxHeight:J??z-40,maxWidth:G??W,minWidth:o?"100vw":P??y,minHeight:o?"100vh":O??h,ref:A=>{E.current=A;},onResizeStart:()=>{ne.current=c,w(true);},onResizeStop:()=>{w(false);},onResize:Me,defaultSize:{width:V,height:h},style:{background:"transparent",height:f.height,overflow:s,...o&&{height:"100% !important",width:"100% !important",flex:1},...o&&{position:"relative"}},children:jsxs(nt,{sx:{height:"100%"},id:m,"data-testid":"AppWindow",children:[t??jsx(Re,{setIsToolbarAnimationDisabled:w,onClose:L,setIsMaximized:T,isToolbarAnimationDisabled:_,setIsSidebarExpanded:H,isSidebarExpanded:F,title:i,isMaximized:o,showSectionsButton:l,rightActions:u,icon:a}),e]})})})});return createPortal(ke,p)}var Ie=memo(dt);var ut=styled(Box,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:t})=>({background:t?"linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)":"transparent",borderRadius:"4px",padding:"4px 8px",color:t?e.palette.common.white:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px",cursor:"pointer"})),mt=styled(Button)(({theme:e,disabled:t})=>({background:t?alpha(e.palette.info.dark,.4):e.palette.info.dark,color:e.palette.common.white,padding:"0px 8px",fontSize:"9px",fontWeight:600,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",textTransform:"none","&:hover":{background:e.palette.info.dark,opacity:.8},"&.Mui-disabled":{color:e.palette.common.white}})),ft=styled(Box)(({theme:e})=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"8px",backgroundColor:e.palette.background.paper,padding:"6px",transform:"translateY(calc(-50% - 6px))",boxShadow:"0px 4px 40px 0px rgba(0, 0, 0, 0.19)",borderRadius:"4px",height:"36px",transition:e.transitions.create(["width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.complex})})),ct=styled(Box)(()=>({position:"fixed",height:35,bottom:0,left:0,right:0,padding:"6px 16px",zIndex:1,backgroundColor:"#eaeaea",backdropFilter:"blur(12px)",display:"flex",justifyContent:"flex-end",borderBottomLeftRadius:"12px",borderBottomRightRadius:"12px"})),xt=styled(Button)(()=>({padding:"4px 8px",boxShadow:"0px 0px 4px 0px rgba(0, 0, 0, 0.08)",display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"4px",color:"rgba(32, 35, 43, 0.80)",fontWeight:600,fontSize:"9px",textTransform:"none"}));var ie=Ie;function ht({children:e,windowProps:t,...i}){return i.isOpen?jsx(Q,{...i,children:jsx(ie,{...t,children:e})}):null}var Te=ht;function bt({title:e,maximized:t=false,id:i,isHovered:r=false,onMouseHover:n,onMouseLeave:l,leftActions:u,titleIconSrc:a,sx:s,...d$1}){return jsx(c,{className:"header-wrapper",id:i,maximized:t||false,sx:s,...d$1,children:jsx(d,{onMouseEnter:n,onMouseLeave:l,isMaximized:t,isHovered:r,title:e||"",icon:a,leftActions:u})})}var re=memo(bt);function yt({isMaximized:e,id:t,isToolbarAnimationDisabled:i,title:r,leftActions:n,onClose:l,onMaximize:u,sx:a$1}){let{isHovered:s,onMouseEnter:d,onMouseLeave:m}=b();return jsx(motion.div,{style:{...e&&{height:0,zIndex:1e3,position:"relative"}},animate:{...e&&{width:"100vw"},...!e&&{transform:"translateX(0px)",width:"100%"}},transition:{duration:.5,...i&&{duration:0}},children:jsx(re,{title:r,maximized:e,id:t||"draggable-dialog-title",isHovered:s,onMouseHover:d,onMouseLeave:m,leftActions:n||jsxs(Fragment,{children:[jsx(a,{onClick:l}),jsx(c$1,{isMaximized:e,onClick:()=>u?.(!e)})]}),sx:a$1})})}var Ce=memo(yt);var Rt=Ce;var Vo=Te;export{Y as a,Q as b,S as c,we as d,be as e,ge as f,We as g,ee as h,te as i,ut as j,mt as k,ft as l,ct as m,xt as n,ie as o,re as p,Rt as q,Vo as r};
@@ -1 +1 @@
1
- import {f as f$1}from'./chunk-7NWGCOJA.js';import {yc}from'./chunk-W6W4YZ7G.js';import {memo,useId}from'react';import f from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var d=styled(f,{shouldForwardProp:e=>e!=="disabled"})(({theme:e,disabled:o})=>({padding:e.spacing(1),position:"relative",display:"flex",alignItems:"center",gap:"8px",textTransform:"capitalize",cursor:o?"not-allowed":"pointer",flex:1,fontSize:"0.6875rem",color:"#20232B"})),a=styled(f$1)({padding:0,width:"14px !important",".MuiSvgIcon-root":{width:"14px !important",height:"14px !important"}});function g({isSelected:e,isDisabled:o,isIndeterminate:p,hideCheckbox:l,onClick:s,children:c,className:t,...x}){let u=yc(useId(),"menu-item"),n=o?"disabled menu-item":"menu-item",b=t?`${n} ${t}`:n;return jsxs(d,{id:u,"data-testid":"MenuItem",className:b,onClick:s,disabled:o,...x,children:[!l&&jsx(a,{size:"small",checked:e,indeterminate:p,disabled:o}),c]})}var v=memo(g);export{v as a};
1
+ import {f as f$1}from'./chunk-ZH35RF3I.js';import {yc}from'./chunk-W6W4YZ7G.js';import {memo,useId}from'react';import f from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var d=styled(f,{shouldForwardProp:e=>e!=="disabled"})(({theme:e,disabled:o})=>({padding:e.spacing(1),position:"relative",display:"flex",alignItems:"center",gap:"8px",textTransform:"capitalize",cursor:o?"not-allowed":"pointer",flex:1,fontSize:"0.6875rem",color:"#20232B"})),a=styled(f$1)({padding:0,width:"14px !important",".MuiSvgIcon-root":{width:"14px !important",height:"14px !important"}});function g({isSelected:e,isDisabled:o,isIndeterminate:p,hideCheckbox:l,onClick:s,children:c,className:t,...x}){let u=yc(useId(),"menu-item"),n=o?"disabled menu-item":"menu-item",b=t?`${n} ${t}`:n;return jsxs(d,{id:u,"data-testid":"MenuItem",className:b,onClick:s,disabled:o,...x,children:[!l&&jsx(a,{size:"small",checked:e,indeterminate:p,disabled:o}),c]})}var v=memo(g);export{v as a};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-6G45KTCP.js';import {a as a$2}from'./chunk-5SNZA5EP.js';import {f}from'./chunk-7NWGCOJA.js';import {a}from'./chunk-GNY2VGGW.js';import {yc}from'./chunk-W6W4YZ7G.js';import {Qc}from'./chunk-3YAJNHQC.js';import {useId,useState,useCallback,useMemo,createElement}from'react';import c from'@mui/material/Box';import ne from'@mui/material/Typography';import O from'@mui/material/Input';import {styled}from'@mui/material/styles';import {CircularProgress}from'@mui/material';import ee from'@mui/material/SvgIcon';import {jsx,jsxs}from'react/jsx-runtime';var xe=styled(a)(({theme:e})=>({fontSize:"10px",color:e.palette.grey[700],fontWeight:600,lineHeight:"10px"})),fe=styled(a)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,fontWeight:600,lineHeight:"14.3px",width:200})),Se=styled(c)(()=>({display:"flex",flexDirection:"column",maxHeight:400,overflow:"auto",gap:"8px"})),D=styled(O)(({theme:e})=>({width:"inherit",height:32,padding:"11px 12px",fontSize:"10px",borderRadius:"5px",backgroundColor:"#F9F9F9",border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.info.dark}})),ge=styled(f)({padding:0,width:12,height:12,".MuiSvgIcon-root, img":{width:12,height:12}}),F=styled(c)(()=>({display:"flex",flexDirection:"column",gap:"8px",padding:"4px"})),Ce=styled(c)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap"})),Ie=styled(c)(({theme:e})=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:`${e.palette.info.dark}1a`,fontSize:"10px",fontWeight:500,cursor:"pointer"})),g=styled(a)(({theme:e,selected:n})=>({display:"flex",gap:"8px",alignItems:"center",fontSize:"10px",fontWeight:500,color:e.palette.common.black,cursor:"pointer",padding:8,justifyContent:"space-between",...n&&{backgroundColor:"#F8F8F8"}}));var te="M4.83332 0C2.16987 0 0 2.16988 0 4.83334C0 7.4968 2.16987 9.66668 4.83332 9.66668C5.98544 9.66668 7.04455 9.2597 7.87628 8.58335L11.1465 11.8535C11.1925 11.9015 11.2477 11.9398 11.3088 11.9662C11.3698 11.9926 11.4356 12.0066 11.5021 12.0072C11.5686 12.0079 11.6346 11.9953 11.6962 11.9702C11.7578 11.945 11.8137 11.9078 11.8607 11.8608C11.9078 11.8138 11.945 11.7578 11.9701 11.6962C11.9953 11.6346 12.0079 11.5686 12.0072 11.5021C12.0065 11.4356 11.9926 11.3699 11.9662 11.3088C11.9398 11.2478 11.9015 11.1926 11.8535 11.1465L8.58331 7.87632C9.25966 7.04458 9.66664 5.98546 9.66664 4.83334C9.66664 2.16988 7.49677 0 4.83332 0ZM4.83332 1C6.95633 1 8.66665 2.71032 8.66665 4.83334C8.66665 5.86755 8.25871 6.80192 7.59699 7.49025C7.5562 7.52023 7.5202 7.55623 7.49022 7.59702C6.80189 8.25875 5.86752 8.66668 4.83332 8.66668C2.71031 8.66668 0.999997 6.95636 0.999997 4.83334C0.999997 2.71032 2.71031 1 4.83332 1Z";function oe({size:e=12,sx:n,className:r,...d}){return jsx(ee,{viewBox:"0 0 12 12",inheritViewBox:true,className:`${r??""} MUISvgIcon__search-icon`,sx:{width:e,height:e,color:"text.primary",...n},...d,children:jsx("path",{d:te,fill:"currentColor"})})}var N=oe;function pe({options:e,onChangeOption:n,selectedOption:r,placeholder:d,label:A,isLoading:R,renderOption:C,iconUrl:h,disabled:u,onClearValue:m,slotProps:V={},hideSelectedCheckmark:$,listWrapperSx:Z={},name:U,...q}){let G=yc(useId(),"select-with-search"),{selectInput:I={},searchInput:J={},dropdownContainer:v={},item:b={}}=V,[w,y]=useState(null),[a,x]=useState(""),K=useCallback(()=>{m!==void 0?m():n(null);},[m,n]),f=!!w,Q=t=>{u||y(f?null:t.currentTarget);},S=()=>{y(null),x("");},X=R?jsx(CircularProgress,{size:16}):jsx(N,{onClick:()=>{a&&x("");},role:"button"}),W=useMemo(()=>a?e.filter(t=>{let p=t?.label?.toLowerCase(),j=t?.value?.toLowerCase();return p?.includes(a.toLowerCase())||j?.includes(a.toLowerCase())}):e,[e,a]),Y=useMemo(()=>jsx(c,{sx:{display:"flex",alignItems:"center",maxWidth:16},children:jsx(c,{component:"img",src:h,alt:"icon",sx:{maxWidth:12,height:12}})}),[h]);return jsx(a$1,{id:G,"data-testid":"SelectWithSearch",disabled:u,open:f,anchorEl:w,onOpen:Q,onClose:S,hasValue:!!r?.value,onClear:K,trigger:jsx(a$2,{className:"SelectWithSearch_input",name:U,placeholder:"Please Select",label:A,sx:{cursor:"pointer"},value:r?.label||"",InputLabelProps:{filled:!!r?.label},disabled:u,...I,InputProps:{readOnly:true,disableUnderline:true,...!!h&&{startAdornment:Y},...I.InputProps}}),listWrapperSx:{height:"100%",overflow:"hidden",...Z},slotProps:{popover:{slotProps:{paper:{sx:{overflow:"hidden"}}}}},...q,children:jsxs(F,{...v,className:`SelectWithSearch_container ${v?.className??""}`,children:[jsx(D,{className:"SelectWithSearch_input",placeholder:d||"Select",endAdornment:X,onClick:t=>{t.stopPropagation();},value:a,onChange:t=>{x(t.target.value);},disableUnderline:true,sx:{cursor:"default",width:"100%",backgroundColor:"white",border:"1px solid #F2F2F2",...e.length&&{marginBottom:"4px"},...a&&{cursor:"pointer"}},...J}),jsxs(c,{className:"SelectWithSearch_options",overflow:"auto",maxHeight:400,children:[W.length===0&&a&&jsx(g,{selected:false,...b,children:jsx(ne,{component:"span",fontSize:"10px",fontWeight:500,color:"#8D8D94",children:"No results found"})}),W.map(t=>C?C(t,{closeDropdown:S,open:f}):createElement(g,{...b,className:`SelectWithSearch_item ${r?.value===t.value?"SelectWithSearch_item-selected":""}`,key:t.value,selected:r?.value===t.value,onClick:p=>{p.stopPropagation(),p.preventDefault(),r?.value===t.value?n(null):n(t),S();}},jsx("span",{children:t.label}),!$&&r?.value===t?.value&&jsx(c,{component:"img",src:Qc,alt:"close",sx:{width:10,height:7.5}})))]})]})})}var H=pe;var Ve=H;export{xe as a,fe as b,Se as c,D as d,ge as e,F as f,Ce as g,Ie as h,g as i,Ve as j};
1
+ import {a as a$1}from'./chunk-6G45KTCP.js';import {a as a$2}from'./chunk-QEDWP7RH.js';import {f}from'./chunk-ZH35RF3I.js';import {a}from'./chunk-GNY2VGGW.js';import {yc}from'./chunk-W6W4YZ7G.js';import {Qc}from'./chunk-3YAJNHQC.js';import {useId,useState,useCallback,useMemo,createElement}from'react';import c from'@mui/material/Box';import ne from'@mui/material/Typography';import O from'@mui/material/Input';import {styled}from'@mui/material/styles';import {CircularProgress}from'@mui/material';import ee from'@mui/material/SvgIcon';import {jsx,jsxs}from'react/jsx-runtime';var xe=styled(a)(({theme:e})=>({fontSize:"10px",color:e.palette.grey[700],fontWeight:600,lineHeight:"10px"})),fe=styled(a)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,fontWeight:600,lineHeight:"14.3px",width:200})),Se=styled(c)(()=>({display:"flex",flexDirection:"column",maxHeight:400,overflow:"auto",gap:"8px"})),D=styled(O)(({theme:e})=>({width:"inherit",height:32,padding:"11px 12px",fontSize:"10px",borderRadius:"5px",backgroundColor:"#F9F9F9",border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.info.dark}})),ge=styled(f)({padding:0,width:12,height:12,".MuiSvgIcon-root, img":{width:12,height:12}}),F=styled(c)(()=>({display:"flex",flexDirection:"column",gap:"8px",padding:"4px"})),Ce=styled(c)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap"})),Ie=styled(c)(({theme:e})=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:`${e.palette.info.dark}1a`,fontSize:"10px",fontWeight:500,cursor:"pointer"})),g=styled(a)(({theme:e,selected:n})=>({display:"flex",gap:"8px",alignItems:"center",fontSize:"10px",fontWeight:500,color:e.palette.common.black,cursor:"pointer",padding:8,justifyContent:"space-between",...n&&{backgroundColor:"#F8F8F8"}}));var te="M4.83332 0C2.16987 0 0 2.16988 0 4.83334C0 7.4968 2.16987 9.66668 4.83332 9.66668C5.98544 9.66668 7.04455 9.2597 7.87628 8.58335L11.1465 11.8535C11.1925 11.9015 11.2477 11.9398 11.3088 11.9662C11.3698 11.9926 11.4356 12.0066 11.5021 12.0072C11.5686 12.0079 11.6346 11.9953 11.6962 11.9702C11.7578 11.945 11.8137 11.9078 11.8607 11.8608C11.9078 11.8138 11.945 11.7578 11.9701 11.6962C11.9953 11.6346 12.0079 11.5686 12.0072 11.5021C12.0065 11.4356 11.9926 11.3699 11.9662 11.3088C11.9398 11.2478 11.9015 11.1926 11.8535 11.1465L8.58331 7.87632C9.25966 7.04458 9.66664 5.98546 9.66664 4.83334C9.66664 2.16988 7.49677 0 4.83332 0ZM4.83332 1C6.95633 1 8.66665 2.71032 8.66665 4.83334C8.66665 5.86755 8.25871 6.80192 7.59699 7.49025C7.5562 7.52023 7.5202 7.55623 7.49022 7.59702C6.80189 8.25875 5.86752 8.66668 4.83332 8.66668C2.71031 8.66668 0.999997 6.95636 0.999997 4.83334C0.999997 2.71032 2.71031 1 4.83332 1Z";function oe({size:e=12,sx:n,className:r,...d}){return jsx(ee,{viewBox:"0 0 12 12",inheritViewBox:true,className:`${r??""} MUISvgIcon__search-icon`,sx:{width:e,height:e,color:"text.primary",...n},...d,children:jsx("path",{d:te,fill:"currentColor"})})}var N=oe;function pe({options:e,onChangeOption:n,selectedOption:r,placeholder:d,label:A,isLoading:R,renderOption:C,iconUrl:h,disabled:u,onClearValue:m,slotProps:V={},hideSelectedCheckmark:$,listWrapperSx:Z={},name:U,...q}){let G=yc(useId(),"select-with-search"),{selectInput:I={},searchInput:J={},dropdownContainer:v={},item:b={}}=V,[w,y]=useState(null),[a,x]=useState(""),K=useCallback(()=>{m!==void 0?m():n(null);},[m,n]),f=!!w,Q=t=>{u||y(f?null:t.currentTarget);},S=()=>{y(null),x("");},X=R?jsx(CircularProgress,{size:16}):jsx(N,{onClick:()=>{a&&x("");},role:"button"}),W=useMemo(()=>a?e.filter(t=>{let p=t?.label?.toLowerCase(),j=t?.value?.toLowerCase();return p?.includes(a.toLowerCase())||j?.includes(a.toLowerCase())}):e,[e,a]),Y=useMemo(()=>jsx(c,{sx:{display:"flex",alignItems:"center",maxWidth:16},children:jsx(c,{component:"img",src:h,alt:"icon",sx:{maxWidth:12,height:12}})}),[h]);return jsx(a$1,{id:G,"data-testid":"SelectWithSearch",disabled:u,open:f,anchorEl:w,onOpen:Q,onClose:S,hasValue:!!r?.value,onClear:K,trigger:jsx(a$2,{className:"SelectWithSearch_input",name:U,placeholder:"Please Select",label:A,sx:{cursor:"pointer"},value:r?.label||"",InputLabelProps:{filled:!!r?.label},disabled:u,...I,InputProps:{readOnly:true,disableUnderline:true,...!!h&&{startAdornment:Y},...I.InputProps}}),listWrapperSx:{height:"100%",overflow:"hidden",...Z},slotProps:{popover:{slotProps:{paper:{sx:{overflow:"hidden"}}}}},...q,children:jsxs(F,{...v,className:`SelectWithSearch_container ${v?.className??""}`,children:[jsx(D,{className:"SelectWithSearch_input",placeholder:d||"Select",endAdornment:X,onClick:t=>{t.stopPropagation();},value:a,onChange:t=>{x(t.target.value);},disableUnderline:true,sx:{cursor:"default",width:"100%",backgroundColor:"white",border:"1px solid #F2F2F2",...e.length&&{marginBottom:"4px"},...a&&{cursor:"pointer"}},...J}),jsxs(c,{className:"SelectWithSearch_options",overflow:"auto",maxHeight:400,children:[W.length===0&&a&&jsx(g,{selected:false,...b,children:jsx(ne,{component:"span",fontSize:"10px",fontWeight:500,color:"#8D8D94",children:"No results found"})}),W.map(t=>C?C(t,{closeDropdown:S,open:f}):createElement(g,{...b,className:`SelectWithSearch_item ${r?.value===t.value?"SelectWithSearch_item-selected":""}`,key:t.value,selected:r?.value===t.value,onClick:p=>{p.stopPropagation(),p.preventDefault(),r?.value===t.value?n(null):n(t),S();}},jsx("span",{children:t.label}),!$&&r?.value===t?.value&&jsx(c,{component:"img",src:Qc,alt:"close",sx:{width:10,height:7.5}})))]})]})})}var H=pe;var Ve=H;export{xe as a,fe as b,Se as c,D as d,ge as e,F as f,Ce as g,Ie as h,g as i,Ve as j};
@@ -1 +1 @@
1
- import {f,p}from'./chunk-7NWGCOJA.js';import {a}from'./chunk-GNY2VGGW.js';import {yc}from'./chunk-W6W4YZ7G.js';import {wb}from'./chunk-3YAJNHQC.js';import {memo,useRef,useState,useEffect,useMemo,useId}from'react';import ie from'@mui/material/Popper';import {styled,Box}from'@mui/material';import {jsx,jsxs}from'react/jsx-runtime';var k=styled(a)(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.subtitle1.fontSize,color:e.palette.grey[700],paddingInlineStart:e.spacing(2),paddingTop:e.spacing(1),paddingBottom:e.spacing(1),paddingInlineEnd:e.spacing(1)})),R=styled(Box,{shouldForwardProp:e=>e!=="disabled"})(({theme:e,disabled:n})=>({fontWeight:e.typography.fontWeightMedium,padding:e.spacing(1),position:"relative",display:"flex",alignItems:"center",textTransform:"capitalize",cursor:n?"not-allowed":"pointer",flex:1,zIndex:99999,".MuiButtonBase-root":{width:"16px",marginInlineEnd:"4px"}})),z=styled(Box)(({theme:e})=>({borderRadius:e.spacing(.5),background:e.palette.background.default,width:"max-content",cursor:"pointer",zIndex:99999,boxShadow:e.shadows[11],display:"flex",flexDirection:"column",".nested-menu-item + .nested-menu-item":{borderTop:`1px solid ${e.palette.divider}`,zIndex:99999},".nested-menu-item:hover":{transition:e.transitions.create(["boxShadow","border"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.complex}),boxShadow:e.shadows[6],border:"none",position:"relative"}})),B=styled(Box)(({theme:e})=>({...e.typography.subtitle1,color:e.palette.text.primary})),H=styled(f)(()=>({padding:0,paddingRight:"4px",".MuiSvgIcon-root":{width:12,height:12}})),$=styled(Box)(()=>({display:"flex",gap:"4px",alignItems:"center",flexGrow:1,minWidth:0,overflow:"hidden"})),A=styled(Box)(()=>({display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",minWidth:0,overflow:"hidden"})),O=styled(Box)(({theme:e})=>({borderRadius:"50%",background:e.palette.divider,width:13,height:14,fontSize:"8px",fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",lineHeight:"10px"})),G=styled(Box)(()=>({display:"flex",alignItems:"center",gap:"8px",flexShrink:0,position:"relative",left:4})),F=styled(Box)(()=>({flex:"1 0 auto"})),_=styled(Box)(()=>({position:"relative",zIndex:999999}));function q(e){return e.scrollWidth-e.clientWidth>1}function oe({children:e}){let n=useRef(null),[r,t]=useState(false);return jsx(p,{arrow:true,placement:"top",title:e,open:r,onOpen:()=>{let f=n.current;f&&q(f)&&t(true);},onClose:()=>t(false),componentsProps:{tooltip:{sx:{maxWidth:280,whiteSpace:"normal",wordBreak:"break-word"}}},wrapperProps:{sx:{flex:1,minWidth:0,display:"block",overflow:"hidden"}},children:jsx(B,{ref:n,sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e})})}var K=memo(oe);function se({label:e,icon:n,name:r,menuItems:t,setSelected:f,onSelect:C,selected:i,displayChildrenCount:I,disabled:s,placement:h="right",sx:g,menuSx:P}){let[u,S]=useState(null),l=useRef(null),[a,p]=useState(false),w=o=>{!s&&i!==void 0&&(f({name:o,selected:!i}),i||p(false));};return useEffect(()=>{p(!!(t?.some(o=>o.selected)&&!t?.every(o=>o.selected)));},[]),jsxs(R,{"data-testid":"NestedDropdown_MenuItem",ref:l,className:`nested-menu-item ${u?"active":""} ${s?"disabled":""}`,onMouseEnter:o=>{!u&&t?.length&&S(o.currentTarget);},onMouseLeave:()=>{u&&S(null);},onClick:o=>{s||(o.stopPropagation(),w(r));},sx:{...t?.length&&{cursor:s?"not-allowed":"pointer"},zIndex:99999,...g},disabled:s,children:[i!==void 0&&jsx(H,{size:"small",indeterminate:a,checked:i,disabled:s}),jsxs($,{children:[n&&n,jsxs(A,{children:[e&&jsx(K,{children:e}),!!t?.length&&jsxs(G,{children:[I&&jsx(O,{children:t.length}),jsx("img",{src:wb,className:"arrow-icon",alt:"arrow",style:{height:12}})]})]})]}),t?.length&&jsx(ie,{open:!!(u&&t?.length),anchorEl:u,placement:h==="left"?"left-start":"right-start",sx:{zIndex:99999,...P},children:jsx(T,{className:"child-dropdown",menuItems:t,placement:h,sx:P,onChildrenChange:o=>{let y=o.every(d=>d.selected);i!==void 0&&!s&&(y&&f({name:r,selected:true}),o.every(d=>!d.selected)&&f({name:r,selected:false}),p(o?.some(d=>d.selected)&&!o.every(d=>!d.selected)&&!y));},onSelect:o=>{C(o,r);}})})]})}var M=memo(se);function ae({title:e,menuItems:n,onChildrenChange:r,onSelect:t,className:f,updatedList:C,footer:i,header:I,placement:s="right",...h}){let[g,P]=useState({name:"",selected:false}),[u,S]=useState();return useEffect(()=>{S(n);},[n]),useEffect(()=>{if(g.name){let{name:l,selected:a}=g,p=[],w=d=>d?.map(m=>(p.push({name:m.name,selected:a}),{...m,selected:a,...m.menuItems?.length&&{menuItems:w(m.menuItems)}})),y=(d=>d.map(m=>m.name===l?(p.push({name:m.name,selected:a}),{...m,selected:a,...m.menuItems?.length&&{menuItems:w(m.menuItems)}}):m))(u);S(y),C&&C(y),r&&r(y),t&&t(p);}},[g]),jsxs(z,{component:"article",className:`tap-dropdown ${f||""}`,...h,children:[jsx(_,{children:e&&jsx(k,{component:"p",children:e})}),I,jsx(F,{children:u?.map((l,a)=>jsx(M,{setSelected:({name:p,selected:w})=>{P({name:p,selected:w});},onSelect:p=>{t&&t(p);},placement:s,...l},`${l.name}-${a}`))}),i&&i]})}var T=memo(ae);var Y=(e,{menuItemSx:n,menuSx:r})=>(e.forEach(t=>{t.sx={...n,...t.sx},t.menuSx={...r,...t.menuSx},t.menuItems?.length&&Y(t.menuItems,{menuItemSx:n,menuSx:r});}),e);function he({title:e,menuItems:n,onSelect:r,updatedList:t,header:f,placement:C="right",menuItemSx:i={},menuSx:I={},...s}){let h=useMemo(()=>Y(n,{menuItemSx:i,menuSx:I}),[n,i,I]),[g,P]=useState(h),u=yc(useId(),"nested-dropdown");useEffect(()=>{P(h);},[h]);let S=l=>{let a=w=>w.map(o=>({...o,selected:l.find(y=>o.name===y.name)?.selected??o.selected,...o.menuItems?.length&&{menuItems:a(o.menuItems)}})),p=a(g);P(p),t&&t(p);};return jsx(T,{id:u,"data-testid":"NestedDropdown",placement:C,menuItems:g,title:e,header:f,onSelect:l=>{r&&r(l),S(l);},...s})}var Z=memo(he);var Ue=Z;export{M as a,T as b,Ue as c};
1
+ import {f,p}from'./chunk-ZH35RF3I.js';import {a}from'./chunk-GNY2VGGW.js';import {yc}from'./chunk-W6W4YZ7G.js';import {wb}from'./chunk-3YAJNHQC.js';import {memo,useRef,useState,useEffect,useMemo,useId}from'react';import ie from'@mui/material/Popper';import {styled,Box}from'@mui/material';import {jsx,jsxs}from'react/jsx-runtime';var k=styled(a)(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.subtitle1.fontSize,color:e.palette.grey[700],paddingInlineStart:e.spacing(2),paddingTop:e.spacing(1),paddingBottom:e.spacing(1),paddingInlineEnd:e.spacing(1)})),R=styled(Box,{shouldForwardProp:e=>e!=="disabled"})(({theme:e,disabled:n})=>({fontWeight:e.typography.fontWeightMedium,padding:e.spacing(1),position:"relative",display:"flex",alignItems:"center",textTransform:"capitalize",cursor:n?"not-allowed":"pointer",flex:1,zIndex:99999,".MuiButtonBase-root":{width:"16px",marginInlineEnd:"4px"}})),z=styled(Box)(({theme:e})=>({borderRadius:e.spacing(.5),background:e.palette.background.default,width:"max-content",cursor:"pointer",zIndex:99999,boxShadow:e.shadows[11],display:"flex",flexDirection:"column",".nested-menu-item + .nested-menu-item":{borderTop:`1px solid ${e.palette.divider}`,zIndex:99999},".nested-menu-item:hover":{transition:e.transitions.create(["boxShadow","border"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.complex}),boxShadow:e.shadows[6],border:"none",position:"relative"}})),B=styled(Box)(({theme:e})=>({...e.typography.subtitle1,color:e.palette.text.primary})),H=styled(f)(()=>({padding:0,paddingRight:"4px",".MuiSvgIcon-root":{width:12,height:12}})),$=styled(Box)(()=>({display:"flex",gap:"4px",alignItems:"center",flexGrow:1,minWidth:0,overflow:"hidden"})),A=styled(Box)(()=>({display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",minWidth:0,overflow:"hidden"})),O=styled(Box)(({theme:e})=>({borderRadius:"50%",background:e.palette.divider,width:13,height:14,fontSize:"8px",fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",lineHeight:"10px"})),G=styled(Box)(()=>({display:"flex",alignItems:"center",gap:"8px",flexShrink:0,position:"relative",left:4})),F=styled(Box)(()=>({flex:"1 0 auto"})),_=styled(Box)(()=>({position:"relative",zIndex:999999}));function q(e){return e.scrollWidth-e.clientWidth>1}function oe({children:e}){let n=useRef(null),[r,t]=useState(false);return jsx(p,{arrow:true,placement:"top",title:e,open:r,onOpen:()=>{let f=n.current;f&&q(f)&&t(true);},onClose:()=>t(false),componentsProps:{tooltip:{sx:{maxWidth:280,whiteSpace:"normal",wordBreak:"break-word"}}},wrapperProps:{sx:{flex:1,minWidth:0,display:"block",overflow:"hidden"}},children:jsx(B,{ref:n,sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e})})}var K=memo(oe);function se({label:e,icon:n,name:r,menuItems:t,setSelected:f,onSelect:C,selected:i,displayChildrenCount:I,disabled:s,placement:h="right",sx:g,menuSx:P}){let[u,S]=useState(null),l=useRef(null),[a,p]=useState(false),w=o=>{!s&&i!==void 0&&(f({name:o,selected:!i}),i||p(false));};return useEffect(()=>{p(!!(t?.some(o=>o.selected)&&!t?.every(o=>o.selected)));},[]),jsxs(R,{"data-testid":"NestedDropdown_MenuItem",ref:l,className:`nested-menu-item ${u?"active":""} ${s?"disabled":""}`,onMouseEnter:o=>{!u&&t?.length&&S(o.currentTarget);},onMouseLeave:()=>{u&&S(null);},onClick:o=>{s||(o.stopPropagation(),w(r));},sx:{...t?.length&&{cursor:s?"not-allowed":"pointer"},zIndex:99999,...g},disabled:s,children:[i!==void 0&&jsx(H,{size:"small",indeterminate:a,checked:i,disabled:s}),jsxs($,{children:[n&&n,jsxs(A,{children:[e&&jsx(K,{children:e}),!!t?.length&&jsxs(G,{children:[I&&jsx(O,{children:t.length}),jsx("img",{src:wb,className:"arrow-icon",alt:"arrow",style:{height:12}})]})]})]}),t?.length&&jsx(ie,{open:!!(u&&t?.length),anchorEl:u,placement:h==="left"?"left-start":"right-start",sx:{zIndex:99999,...P},children:jsx(T,{className:"child-dropdown",menuItems:t,placement:h,sx:P,onChildrenChange:o=>{let y=o.every(d=>d.selected);i!==void 0&&!s&&(y&&f({name:r,selected:true}),o.every(d=>!d.selected)&&f({name:r,selected:false}),p(o?.some(d=>d.selected)&&!o.every(d=>!d.selected)&&!y));},onSelect:o=>{C(o,r);}})})]})}var M=memo(se);function ae({title:e,menuItems:n,onChildrenChange:r,onSelect:t,className:f,updatedList:C,footer:i,header:I,placement:s="right",...h}){let[g,P]=useState({name:"",selected:false}),[u,S]=useState();return useEffect(()=>{S(n);},[n]),useEffect(()=>{if(g.name){let{name:l,selected:a}=g,p=[],w=d=>d?.map(m=>(p.push({name:m.name,selected:a}),{...m,selected:a,...m.menuItems?.length&&{menuItems:w(m.menuItems)}})),y=(d=>d.map(m=>m.name===l?(p.push({name:m.name,selected:a}),{...m,selected:a,...m.menuItems?.length&&{menuItems:w(m.menuItems)}}):m))(u);S(y),C&&C(y),r&&r(y),t&&t(p);}},[g]),jsxs(z,{component:"article",className:`tap-dropdown ${f||""}`,...h,children:[jsx(_,{children:e&&jsx(k,{component:"p",children:e})}),I,jsx(F,{children:u?.map((l,a)=>jsx(M,{setSelected:({name:p,selected:w})=>{P({name:p,selected:w});},onSelect:p=>{t&&t(p);},placement:s,...l},`${l.name}-${a}`))}),i&&i]})}var T=memo(ae);var Y=(e,{menuItemSx:n,menuSx:r})=>(e.forEach(t=>{t.sx={...n,...t.sx},t.menuSx={...r,...t.menuSx},t.menuItems?.length&&Y(t.menuItems,{menuItemSx:n,menuSx:r});}),e);function he({title:e,menuItems:n,onSelect:r,updatedList:t,header:f,placement:C="right",menuItemSx:i={},menuSx:I={},...s}){let h=useMemo(()=>Y(n,{menuItemSx:i,menuSx:I}),[n,i,I]),[g,P]=useState(h),u=yc(useId(),"nested-dropdown");useEffect(()=>{P(h);},[h]);let S=l=>{let a=w=>w.map(o=>({...o,selected:l.find(y=>o.name===y.name)?.selected??o.selected,...o.menuItems?.length&&{menuItems:a(o.menuItems)}})),p=a(g);P(p),t&&t(p);};return jsx(T,{id:u,"data-testid":"NestedDropdown",placement:C,menuItems:g,title:e,header:f,onSelect:l=>{r&&r(l),S(l);},...s})}var Z=memo(he);var Ue=Z;export{M as a,T as b,Ue as c};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-6Z5EAN7R.js';var m=a;export{m as a};
@@ -1 +1 @@
1
- import {d}from'./chunk-5SLDZGLX.js';import {a}from'./chunk-YE6EIJWK.js';import {yc}from'./chunk-W6W4YZ7G.js';import {memo,useState,useId}from'react';import l from'@mui/material/Box';import {styled}from'@mui/material/styles';import {motion}from'framer-motion';import {jsx}from'react/jsx-runtime';var c=styled(motion.div)(({theme:o})=>({borderRadius:"8px",position:"fixed",display:"flex",flexDirection:"column",maxHeight:"calc(100vh - 46px)",width:416,margin:"auto",background:o.palette.grey[400],boxShadow:o.shadows[3]})),C=styled(l)(({theme:o})=>({background:o.palette.common.white,flex:1,paddingTop:"31px",paddingBottom:"31px",display:"flex",justifyContent:"flex-start",alignItems:"center",flexDirection:"column",position:"relative",overflow:"auto"})),b=styled(l)(({theme:o})=>({minHeight:95,background:o.palette.grey[400],paddingInline:"24px",paddingTop:"23px",paddingBottom:"23px",gap:"15px",position:"relative",zIndex:2})),h=styled(l)(({theme:o})=>({display:"flex",flexDirection:"column",padding:"18px 24px",boxShadow:o.shadows[15],position:"relative",gap:8,minHeight:68,backgroundColor:o.palette.common.white,borderBottomLeftRadius:"12px",borderBottomRightRadius:"12px"}));function p({children:o,index:e,dialogRef:a,height:t,onClick:r,order:s,dragControls:d,style:m}){let n=yc(useId(),"dialog");return jsx(c,{id:n,"data-testid":"Dialog",drag:true,dragListener:false,dragMomentum:false,dragControls:d,initial:{top:"50%",left:`calc(50% + ${e*10}px - ${416/2}px)`},transition:{duration:.1},animate:{...t&&{top:`calc(50% + ${e*10}px - ${t/2}px)`},zIndex:2+s},onClick:r,ref:a,style:m,children:o})}function L({title:o,onCloseDialog:e,...a$1}){let[t,r]=useState(false);return jsx(d,{onMouseEnter:()=>{r(true);},onMouseLeave:()=>{r(false);},isHovered:t,title:o,leftActions:jsx(a,{onClick:n=>{n.stopPropagation(),e();}}),...a$1})}var M=memo(L);var K=p;export{C as a,b,h as c,M as d,K as e};
1
+ import {a}from'./chunk-YE6EIJWK.js';import {d}from'./chunk-5SLDZGLX.js';import {yc}from'./chunk-W6W4YZ7G.js';import {memo,useState,useId}from'react';import l from'@mui/material/Box';import {styled}from'@mui/material/styles';import {motion}from'framer-motion';import {jsx}from'react/jsx-runtime';var c=styled(motion.div)(({theme:o})=>({borderRadius:"8px",position:"fixed",display:"flex",flexDirection:"column",maxHeight:"calc(100vh - 46px)",width:416,margin:"auto",background:o.palette.grey[400],boxShadow:o.shadows[3]})),C=styled(l)(({theme:o})=>({background:o.palette.common.white,flex:1,paddingTop:"31px",paddingBottom:"31px",display:"flex",justifyContent:"flex-start",alignItems:"center",flexDirection:"column",position:"relative",overflow:"auto"})),b=styled(l)(({theme:o})=>({minHeight:95,background:o.palette.grey[400],paddingInline:"24px",paddingTop:"23px",paddingBottom:"23px",gap:"15px",position:"relative",zIndex:2})),h=styled(l)(({theme:o})=>({display:"flex",flexDirection:"column",padding:"18px 24px",boxShadow:o.shadows[15],position:"relative",gap:8,minHeight:68,backgroundColor:o.palette.common.white,borderBottomLeftRadius:"12px",borderBottomRightRadius:"12px"}));function p({children:o,index:e,dialogRef:a,height:t,onClick:r,order:s,dragControls:d,style:m}){let n=yc(useId(),"dialog");return jsx(c,{id:n,"data-testid":"Dialog",drag:true,dragListener:false,dragMomentum:false,dragControls:d,initial:{top:"50%",left:`calc(50% + ${e*10}px - ${416/2}px)`},transition:{duration:.1},animate:{...t&&{top:`calc(50% + ${e*10}px - ${t/2}px)`},zIndex:2+s},onClick:r,ref:a,style:m,children:o})}function L({title:o,onCloseDialog:e,...a$1}){let[t,r]=useState(false);return jsx(d,{onMouseEnter:()=>{r(true);},onMouseLeave:()=>{r(false);},isHovered:t,title:o,leftActions:jsx(a,{onClick:n=>{n.stopPropagation(),e();}}),...a$1})}var M=memo(L);var K=p;export{C as a,b,h as c,M as d,K as e};
@@ -1 +1 @@
1
- import {t}from'./chunk-7NWGCOJA.js';import {yc,dc}from'./chunk-W6W4YZ7G.js';import {forwardRef,useId,memo}from'react';import {styled}from'@mui/material/styles';import c from'@mui/material/TableCell';import {jsx}from'react/jsx-runtime';import {styled as styled$1}from'@mui/material';import {motion}from'framer-motion';var a=styled(c,{shouldForwardProp:e=>e!=="rowId"})(({theme:e})=>({fontSize:e.typography.body2.fontSize,fontWeight:e.typography.fontWeightRegular,color:e.palette.text.primary,padding:e.spacing(0),verticalAlign:"center",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"block",width:"100%",border:"none",textAlign:e?.direction==="ltr"?"left":"right"}));var b=forwardRef(({children:e,...o},r)=>{let s=yc(useId(),"table-cell");return jsx(a,{id:s,component:"div","data-testid":"TableCell",...o,ref:r,children:e})}),l=memo(b);var A=styled$1("span",{shouldForwardProp:e=>e!=="variant"})(({theme:e,variant:o})=>({display:"flex",width:"17px",height:"12px",backgroundColor:o?dc(e.palette)[o]:"transparent",borderRadius:"2px",flexShrink:0,overflow:"hidden",visibility:"hidden","& > img":{width:"100%",height:"100%",objectFit:"cover"}})),F=styled$1("button")({background:"transparent",border:"none",padding:0,cursor:"pointer",outline:"none",display:"flex",alignItems:"center",justifyContent:"center",overflow:"visible"}),$=styled$1(motion.div)(({theme:e})=>({borderRadius:"12px",backgroundColor:e.palette.background.paper,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",gap:e.spacing(.5)})),z=styled$1("img")(()=>({width:"12px",height:"12px"})),G=styled$1("span",{shouldForwardProp:e=>e!=="isShown"})(({theme:e,isShown:o})=>({...o&&{border:`1px solid ${e.palette.divider}`},borderRadius:"12px",backgroundColor:o?e.palette.background.paper:"transparent",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,overflow:"hidden",visibility:"hidden"})),L=styled$1("span")(({theme:e})=>({color:e.palette.common.white,borderRadius:e.spacing(.5),padding:"1.285px 2.569px",height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600})),O=styled$1("div")(()=>({display:"flex",width:"24px",height:"24px",alignItems:"center",justifyContent:"center",borderRadius:"64px;",border:"1px solid #F2F2F2;"})),V=styled$1(t)(({theme:e})=>({width:24,height:24,fontSize:"8.5px",fontWeight:500,color:e.palette.background.default,border:`1px solid ${e.palette.divider}`})),d=styled$1("div")(({theme:e})=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4px 8px",borderRadius:"24px",border:`1px solid ${e.palette.divider}`})),E=styled$1(d)(({theme:e})=>({color:e.palette.info.dark,backgroundColor:e.palette.info.light,borderColor:e.palette.divider,minWidth:"88px",height:"24px"})),H=styled$1(d)(({theme:e})=>({color:e.palette.grey.A700,backgroundColor:`${e.palette.grey.A700}1A`,minWidth:"88px",height:"24px"})),M=styled$1(l)(()=>({fontSize:"11px",textAlign:"left",display:"flex",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",gap:"4px",textOverflow:"ellipsis",whiteSpace:"nowrap"})),Z=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),q=styled$1("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0})),D=styled$1("img")(()=>({width:"36px",height:"24px"})),J=styled$1("div")(({percentage:e,isCapture:o,theme:r})=>({background:`conic-gradient(${o?r.palette.info.dark:"#656565"} ${e}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${o?r.palette.info.dark:"#656565"}`}));export{l as a,A as b,F as c,$ as d,z as e,G as f,L as g,O as h,V as i,d as j,E as k,H as l,M as m,Z as n,q as o,D as p,J as q};
1
+ import {t}from'./chunk-ZH35RF3I.js';import {yc,dc}from'./chunk-W6W4YZ7G.js';import {forwardRef,useId,memo}from'react';import {styled}from'@mui/material/styles';import c from'@mui/material/TableCell';import {jsx}from'react/jsx-runtime';import {styled as styled$1}from'@mui/material';import {motion}from'framer-motion';var a=styled(c,{shouldForwardProp:e=>e!=="rowId"})(({theme:e})=>({fontSize:e.typography.body2.fontSize,fontWeight:e.typography.fontWeightRegular,color:e.palette.text.primary,padding:e.spacing(0),verticalAlign:"center",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"block",width:"100%",border:"none",textAlign:e?.direction==="ltr"?"left":"right"}));var b=forwardRef(({children:e,...o},r)=>{let s=yc(useId(),"table-cell");return jsx(a,{id:s,component:"div","data-testid":"TableCell",...o,ref:r,children:e})}),l=memo(b);var A=styled$1("span",{shouldForwardProp:e=>e!=="variant"})(({theme:e,variant:o})=>({display:"flex",width:"17px",height:"12px",backgroundColor:o?dc(e.palette)[o]:"transparent",borderRadius:"2px",flexShrink:0,overflow:"hidden",visibility:"hidden","& > img":{width:"100%",height:"100%",objectFit:"cover"}})),F=styled$1("button")({background:"transparent",border:"none",padding:0,cursor:"pointer",outline:"none",display:"flex",alignItems:"center",justifyContent:"center",overflow:"visible"}),$=styled$1(motion.div)(({theme:e})=>({borderRadius:"12px",backgroundColor:e.palette.background.paper,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",gap:e.spacing(.5)})),z=styled$1("img")(()=>({width:"12px",height:"12px"})),G=styled$1("span",{shouldForwardProp:e=>e!=="isShown"})(({theme:e,isShown:o})=>({...o&&{border:`1px solid ${e.palette.divider}`},borderRadius:"12px",backgroundColor:o?e.palette.background.paper:"transparent",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,overflow:"hidden",visibility:"hidden"})),L=styled$1("span")(({theme:e})=>({color:e.palette.common.white,borderRadius:e.spacing(.5),padding:"1.285px 2.569px",height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600})),O=styled$1("div")(()=>({display:"flex",width:"24px",height:"24px",alignItems:"center",justifyContent:"center",borderRadius:"64px;",border:"1px solid #F2F2F2;"})),V=styled$1(t)(({theme:e})=>({width:24,height:24,fontSize:"8.5px",fontWeight:500,color:e.palette.background.default,border:`1px solid ${e.palette.divider}`})),d=styled$1("div")(({theme:e})=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4px 8px",borderRadius:"24px",border:`1px solid ${e.palette.divider}`})),E=styled$1(d)(({theme:e})=>({color:e.palette.info.dark,backgroundColor:e.palette.info.light,borderColor:e.palette.divider,minWidth:"88px",height:"24px"})),H=styled$1(d)(({theme:e})=>({color:e.palette.grey.A700,backgroundColor:`${e.palette.grey.A700}1A`,minWidth:"88px",height:"24px"})),M=styled$1(l)(()=>({fontSize:"11px",textAlign:"left",display:"flex",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",gap:"4px",textOverflow:"ellipsis",whiteSpace:"nowrap"})),Z=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),q=styled$1("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0})),D=styled$1("img")(()=>({width:"36px",height:"24px"})),J=styled$1("div")(({percentage:e,isCapture:o,theme:r})=>({background:`conic-gradient(${o?r.palette.info.dark:"#656565"} ${e}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${o?r.palette.info.dark:"#656565"}`}));export{l as a,A as b,F as c,$ as d,z as e,G as f,L as g,O as h,V as i,d as j,E as k,H as l,M as m,Z as n,q as o,D as p,J as q};
@@ -1 +1 @@
1
- import {b}from'./chunk-3OHTUAAB.js';import {memo,useCallback,Fragment as Fragment$1,createElement}from'react';import {useTranslation}from'react-i18next';import {jsx,Fragment}from'react/jsx-runtime';function B({isActiveFilterVisible:f,availableStatuses:v,status:e,onStatusChange:i,buttonSx:l}){let{t:I}=useTranslation(),S=f??false,b$1=useCallback(s=>s===e&&!S?"active":"inActive",[e,S]),u=useCallback(s=>{i?.(s);},[i]);return jsx(Fragment,{children:v?.map(({render:s,...a},d)=>{if(s)return jsx(Fragment$1,{children:s({status:e,onChange:u},{...a,index:d})},`custom-status-slot-${d}`);if(!Array.isArray(a.status))return createElement(b,{...a,key:`status-button-array-${a.status}`,variant:b$1(a.status),onClick:()=>{Array.isArray(a.status)||u(a.status);},buttonSx:l});if(!a.status)return null;let o=a.status.filter(Boolean).map(t=>typeof t=="string"?{value:t}:t)||[],c=!!e&&o.some(t=>t?.value===e);return jsx("div",{children:jsx(b,{...a,selectedStatus:c?e:void 0,variant:c?"active":"inActive",onButtonBodyClick:t=>u(t),dropdownOptions:o.map(t=>({label:t?.label||I(t?.value||""),status:t?.value,icon:t.icon,onClick:()=>u(t.value)})),buttonSx:l})},o[0]?.value)})})}var p=memo(B);var M=p;export{M as a};
1
+ import {b}from'./chunk-JKH2UKMC.js';import {memo,useCallback,Fragment as Fragment$1,createElement}from'react';import {useTranslation}from'react-i18next';import {jsx,Fragment}from'react/jsx-runtime';function B({isActiveFilterVisible:f,availableStatuses:v,status:e,onStatusChange:i,buttonSx:l}){let{t:I}=useTranslation(),S=f??false,b$1=useCallback(s=>s===e&&!S?"active":"inActive",[e,S]),u=useCallback(s=>{i?.(s);},[i]);return jsx(Fragment,{children:v?.map(({render:s,...a},d)=>{if(s)return jsx(Fragment$1,{children:s({status:e,onChange:u},{...a,index:d})},`custom-status-slot-${d}`);if(!Array.isArray(a.status))return createElement(b,{...a,key:`status-button-array-${a.status}`,variant:b$1(a.status),onClick:()=>{Array.isArray(a.status)||u(a.status);},buttonSx:l});if(!a.status)return null;let o=a.status.filter(Boolean).map(t=>typeof t=="string"?{value:t}:t)||[],c=!!e&&o.some(t=>t?.value===e);return jsx("div",{children:jsx(b,{...a,selectedStatus:c?e:void 0,variant:c?"active":"inActive",onButtonBodyClick:t=>u(t),dropdownOptions:o.map(t=>({label:t?.label||I(t?.value||""),status:t?.value,icon:t.icon,onClick:()=>u(t.value)})),buttonSx:l})},o[0]?.value)})})}var p=memo(B);var M=p;export{M as a};
@@ -1 +1 @@
1
- import {T,S,b as b$1}from'./chunk-7NWGCOJA.js';import {forwardRef,memo,createContext,useState,useRef,useCallback,useMemo,useContext}from'react';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var u=styled(T)(({theme:o})=>({[`& .${S.title}`]:{fontSize:"13px",fontWeight:700,lineHeight:o.typography.h6.lineHeight,borderBottom:`1px solid ${o.palette.divider}`,margin:0,padding:"16px 16px 16px 12px",color:o.palette.text.primary}})),x=styled("div")(({theme:o})=>({display:"flex",flexDirection:"column",gap:o.spacing(2),minWidth:"256px",padding:o.spacing(2)})),d=styled(b$1)(({theme:o})=>({paddingInline:o.spacing(3),paddingBlock:o.spacing(1),borderRadius:o.spacing(.5),minWidth:64,fontSize:"11px",fontWeight:o.typography.fontWeightMedium,color:o.palette.text.primary,textTransform:"none",border:`1px solid ${o.palette.divider}`,boxShadow:"none","&:hover":{boxShadow:"none",backgroundColor:o.palette.action.hover}})),y=styled("p")(({theme:o})=>({margin:0,fontSize:o.typography.fontSize,fontWeight:o.typography.fontWeightMedium,lineHeight:o.typography.body1.lineHeight})),D=styled("div")(({theme:o})=>({display:"flex",gap:o.spacing(1),justifyContent:"flex-end"}));var v=forwardRef(({message:o,title:t,confirmText:a,cancelText:i,onConfirm:r,onCancel:s,className:m,sx:e,...n},T)=>jsx(u,{ref:T,"data-testid":"ConfirmDialog",heading:t,className:m,sx:e,...n,children:jsxs(x,{children:[jsx(y,{children:o}),jsxs(D,{children:[jsx(d,{variant:"ghost",onClick:s,children:i||"No"}),jsx(d,{variant:"ghost",onClick:r,children:a||"Yes"})]})]})}));v.displayName="ConfirmDialog";var b=memo(v);var p=createContext(null);function W(){let o=useContext(p);if(!o)throw new Error("useConfirm must be used within <ConfirmDialogProvider>");return o}var R={open:false,message:null,title:void 0,confirmText:void 0,cancelText:void 0,sx:void 0,dismissible:true};function z({children:o}){let[t,a]=useState(R),i=useRef(null),r=useCallback(e=>{let n=i.current;n&&(i.current=null,a(R),n(e));},[]),s=useCallback(e=>new Promise(n=>{i.current?.(false),i.current=n,a({open:true,dismissible:e.dismissible??true,message:e.message,title:e.title,confirmText:e.confirmText,cancelText:e.cancelText,sx:e.sx});}),[]),m=useMemo(()=>({confirm:s}),[s]);return jsxs(p.Provider,{value:m,children:[o,jsx(b,{open:t.open,message:t.message,title:t.title,confirmText:t.confirmText,cancelText:t.cancelText,onConfirm:()=>r(true),onCancel:()=>r(false),onClose:t.dismissible?()=>r(false):void 0,sx:t.sx})]})}var O=memo(z);export{W as a,O as b};
1
+ import {T,S,b as b$1}from'./chunk-ZH35RF3I.js';import {forwardRef,memo,createContext,useState,useRef,useCallback,useMemo,useContext}from'react';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var u=styled(T)(({theme:o})=>({[`& .${S.title}`]:{fontSize:"13px",fontWeight:700,lineHeight:o.typography.h6.lineHeight,borderBottom:`1px solid ${o.palette.divider}`,margin:0,padding:"16px 16px 16px 12px",color:o.palette.text.primary}})),x=styled("div")(({theme:o})=>({display:"flex",flexDirection:"column",gap:o.spacing(2),minWidth:"256px",padding:o.spacing(2)})),d=styled(b$1)(({theme:o})=>({paddingInline:o.spacing(3),paddingBlock:o.spacing(1),borderRadius:o.spacing(.5),minWidth:64,fontSize:"11px",fontWeight:o.typography.fontWeightMedium,color:o.palette.text.primary,textTransform:"none",border:`1px solid ${o.palette.divider}`,boxShadow:"none","&:hover":{boxShadow:"none",backgroundColor:o.palette.action.hover}})),y=styled("p")(({theme:o})=>({margin:0,fontSize:o.typography.fontSize,fontWeight:o.typography.fontWeightMedium,lineHeight:o.typography.body1.lineHeight})),D=styled("div")(({theme:o})=>({display:"flex",gap:o.spacing(1),justifyContent:"flex-end"}));var v=forwardRef(({message:o,title:t,confirmText:a,cancelText:i,onConfirm:r,onCancel:s,className:m,sx:e,...n},T)=>jsx(u,{ref:T,"data-testid":"ConfirmDialog",heading:t,className:m,sx:e,...n,children:jsxs(x,{children:[jsx(y,{children:o}),jsxs(D,{children:[jsx(d,{variant:"ghost",onClick:s,children:i||"No"}),jsx(d,{variant:"ghost",onClick:r,children:a||"Yes"})]})]})}));v.displayName="ConfirmDialog";var b=memo(v);var p=createContext(null);function W(){let o=useContext(p);if(!o)throw new Error("useConfirm must be used within <ConfirmDialogProvider>");return o}var R={open:false,message:null,title:void 0,confirmText:void 0,cancelText:void 0,sx:void 0,dismissible:true};function z({children:o}){let[t,a]=useState(R),i=useRef(null),r=useCallback(e=>{let n=i.current;n&&(i.current=null,a(R),n(e));},[]),s=useCallback(e=>new Promise(n=>{i.current?.(false),i.current=n,a({open:true,dismissible:e.dismissible??true,message:e.message,title:e.title,confirmText:e.confirmText,cancelText:e.cancelText,sx:e.sx});}),[]),m=useMemo(()=>({confirm:s}),[s]);return jsxs(p.Provider,{value:m,children:[o,jsx(b,{open:t.open,message:t.message,title:t.title,confirmText:t.confirmText,cancelText:t.cancelText,onConfirm:()=>r(true),onCancel:()=>r(false),onClose:t.dismissible?()=>r(false):void 0,sx:t.sx})]})}var O=memo(z);export{W as a,O as b};
@@ -1 +1 @@
1
- import {a as a$2}from'./chunk-MXXAZH6N.js';import {a as a$1}from'./chunk-3YBBWNUH.js';import {n}from'./chunk-7NWGCOJA.js';import {a}from'./chunk-GNY2VGGW.js';import {Vb,yc}from'./chunk-W6W4YZ7G.js';import {Ej,Fj,Lj,Pe}from'./chunk-3YAJNHQC.js';import {forwardRef,useState,useImperativeHandle,useEffect,useMemo,memo,useId}from'react';import {Button}from'@mui/material';import p from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {useTranslation}from'react-i18next';import {useDropzone}from'react-dropzone';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var G=styled(p)(()=>({textAlign:"center",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"32px"})),u=styled(p)(()=>({paddingInline:"40px"})),d=styled(a,{shouldForwardProp:e=>e!=="isError"})(({theme:e,isError:i})=>({color:i?"#FF2000":e.palette.text.primary,fontSize:"18px",fontWeight:600,lineHeight:"20px",marginBottom:"8px"})),J=styled(p)(({theme:e})=>({color:e.palette.text.primary,fontSize:"12px",fontWeight:500,lineHeight:"20px",padding:"4px 12px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,cursor:"pointer"})),g=styled(a)(({theme:e})=>({color:alpha(e.palette.text.primary,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"})),F=styled(p,{shouldForwardProp:e=>e!=="width"})(({theme:e,width:i})=>({width:i||431,minHeight:176,border:`1px dashed ${e.palette.secondary.light}`,borderRadius:"8px",padding:"24px 0",display:"flex",alignItems:"center",justifyContent:"center"})),h=styled(p)(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"24px",color:e.palette.text.primary,fontSize:"14px",lineHeight:"20px",cursor:"default"})),K=styled("span")(()=>({fontWeight:600,textDecorationLine:"underline",cursor:"pointer"})),b=styled(p)(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"8px",color:e.palette.text.primary})),z=styled(p)(({theme:e})=>({color:alpha(e.palette.text.primary,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"})),O=styled(Button)(({theme:e,disabled:i})=>({borderRadius:"4px",minWidth:"105px",background:i?alpha(e.palette.info.dark,.4):e.palette.info.dark,color:e.palette.common.white,padding:"4px 8px",fontSize:"9px",fontWeight:600,height:"32px",display:"flex",alignItems:"center",justifyContent:"center",textTransform:"none","&:hover":{background:e.palette.info.dark,opacity:.8},"&.Mui-disabled":{color:e.palette.common.white}})),Q=styled(p)(()=>({display:"flex",gap:"8px",justifyContent:"center",alignItems:"center",padding:"6px",boxShadow:"0px 4px 40px 0px rgba(0, 0, 0, 0.19)",borderRadius:"4px"}));var Y=forwardRef(({accept:e,footer:i,options:x,isCreateLoading:U,progress:te,error:R,errorHint:oe,subtitleComponent:S,isSuccess:P,onConfirm:re,isSendDisabled:ie,errorActionComponent:le,title:l,width:B,successFooter:pe,progressVariant:ne},ae)=>{let{t:n$1}=useTranslation(),[a,H]=useState([]),{getRootProps:de,getInputProps:se,open:f,acceptedFiles:j,isDragReject:M,fileRejections:s}=useDropzone(x);useImperativeHandle(ae,()=>({open:f}),[f]),useEffect(()=>{H(j);},[j]);let C=Vb(x?.maxSize||0,0).toUpperCase(),m=useMemo(()=>{let me=s.length&&s[0].errors.some(k=>k.code==="file-invalid-type"),ce=s.length&&s[0].errors.some(k=>k.code==="file-too-large");return M||me?n$1("invalidFileType"):ce?`File is larger than ${C}`:R},[M,R,s,C,n$1]),W=useMemo(()=>a.length?jsxs(b,{sx:{fontWeight:600},children:[jsx(p,{children:a[0].name}),jsx(z,{children:Vb(a[0].size)})]}):null,[a]);return P&&a.length&&!U?jsxs(Fragment,{children:[jsxs(u,{children:[typeof l=="string"?jsx(d,{children:l}):l??jsx(d,{children:"File uploaded"}),S]}),jsx(F,{width:B,children:jsxs(h,{children:[P&&jsx(p,{component:"img",src:Ej,width:56,height:56}),W]})}),pe??jsxs(Q,{children:[jsx(a$1,{onClick:()=>{H([]);},children:jsx(a$2,{src:Fj,alt:"delete",sx:{width:14,height:14}})}),jsx(O,{disabled:ie,onClick:()=>{re?.(a);},children:"Bulk Send"})]})]}):U&&a.length?jsxs(Fragment,{children:[jsxs(u,{children:[l&&typeof l!="string"?l:jsxs(Fragment,{children:[jsx(d,{children:l??n$1("uploading")}),jsx(g,{children:n$1("wait")})]}),S]}),jsx(F,{width:B,children:jsxs(h,{children:[U&&jsx(n,{size:56,value:te,variant:ne??"determinate"}),W]})}),i]}):jsxs(Fragment,{children:[jsxs(u,{children:[m?jsx(d,{isError:true,children:m}):typeof l=="string"?jsx(d,{children:l}):l??jsx(d,{children:n$1("uploadBulkFile")}),S||!!m&&jsx(g,{children:"Supported formats: xls, xlxs"})]}),jsxs(F,{width:B,...de(),children:[jsx("input",{...se()}),jsxs(h,{"data-slot":"content",children:[jsx(p,{component:"img",src:m?Lj:Pe,width:56,height:56}),oe,W,m?jsx(Fragment,{children:le||jsx(J,{onClick:f,children:n$1("uploadAgain")})}):jsxs(b,{children:[jsxs(p,{children:[jsx(K,{onClick:f,children:"Click to upload"})," or drag and drop"]}),jsxs(z,{children:["Maximum file size ",C]}),e&&jsx(g,{children:n$1("supportedFormats",{accept:e})})]})]})]}),i]})});Y.displayName="FileUploadBase";var Z=memo(Y);var L=forwardRef((e,i)=>{let x=yc(useId(),"file-upload");return jsx(G,{id:x,"data-testid":"FileUpload","data-slot":"file-upload-wrapper",children:jsx(Z,{...e,ref:i})})});L.displayName="FileUpload";var ee=memo(L);var Xe=ee;export{Xe as a};
1
+ import {a as a$2}from'./chunk-MXXAZH6N.js';import {a as a$1}from'./chunk-LDK7QJZB.js';import {n}from'./chunk-ZH35RF3I.js';import {a}from'./chunk-GNY2VGGW.js';import {Vb,yc}from'./chunk-W6W4YZ7G.js';import {Ej,Fj,Lj,Pe}from'./chunk-3YAJNHQC.js';import {forwardRef,useState,useImperativeHandle,useEffect,useMemo,memo,useId}from'react';import {Button}from'@mui/material';import p from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {useTranslation}from'react-i18next';import {useDropzone}from'react-dropzone';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var G=styled(p)(()=>({textAlign:"center",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"32px"})),u=styled(p)(()=>({paddingInline:"40px"})),d=styled(a,{shouldForwardProp:e=>e!=="isError"})(({theme:e,isError:i})=>({color:i?"#FF2000":e.palette.text.primary,fontSize:"18px",fontWeight:600,lineHeight:"20px",marginBottom:"8px"})),J=styled(p)(({theme:e})=>({color:e.palette.text.primary,fontSize:"12px",fontWeight:500,lineHeight:"20px",padding:"4px 12px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,cursor:"pointer"})),g=styled(a)(({theme:e})=>({color:alpha(e.palette.text.primary,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"})),F=styled(p,{shouldForwardProp:e=>e!=="width"})(({theme:e,width:i})=>({width:i||431,minHeight:176,border:`1px dashed ${e.palette.secondary.light}`,borderRadius:"8px",padding:"24px 0",display:"flex",alignItems:"center",justifyContent:"center"})),h=styled(p)(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"24px",color:e.palette.text.primary,fontSize:"14px",lineHeight:"20px",cursor:"default"})),K=styled("span")(()=>({fontWeight:600,textDecorationLine:"underline",cursor:"pointer"})),b=styled(p)(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"8px",color:e.palette.text.primary})),z=styled(p)(({theme:e})=>({color:alpha(e.palette.text.primary,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"})),O=styled(Button)(({theme:e,disabled:i})=>({borderRadius:"4px",minWidth:"105px",background:i?alpha(e.palette.info.dark,.4):e.palette.info.dark,color:e.palette.common.white,padding:"4px 8px",fontSize:"9px",fontWeight:600,height:"32px",display:"flex",alignItems:"center",justifyContent:"center",textTransform:"none","&:hover":{background:e.palette.info.dark,opacity:.8},"&.Mui-disabled":{color:e.palette.common.white}})),Q=styled(p)(()=>({display:"flex",gap:"8px",justifyContent:"center",alignItems:"center",padding:"6px",boxShadow:"0px 4px 40px 0px rgba(0, 0, 0, 0.19)",borderRadius:"4px"}));var Y=forwardRef(({accept:e,footer:i,options:x,isCreateLoading:U,progress:te,error:R,errorHint:oe,subtitleComponent:S,isSuccess:P,onConfirm:re,isSendDisabled:ie,errorActionComponent:le,title:l,width:B,successFooter:pe,progressVariant:ne},ae)=>{let{t:n$1}=useTranslation(),[a,H]=useState([]),{getRootProps:de,getInputProps:se,open:f,acceptedFiles:j,isDragReject:M,fileRejections:s}=useDropzone(x);useImperativeHandle(ae,()=>({open:f}),[f]),useEffect(()=>{H(j);},[j]);let C=Vb(x?.maxSize||0,0).toUpperCase(),m=useMemo(()=>{let me=s.length&&s[0].errors.some(k=>k.code==="file-invalid-type"),ce=s.length&&s[0].errors.some(k=>k.code==="file-too-large");return M||me?n$1("invalidFileType"):ce?`File is larger than ${C}`:R},[M,R,s,C,n$1]),W=useMemo(()=>a.length?jsxs(b,{sx:{fontWeight:600},children:[jsx(p,{children:a[0].name}),jsx(z,{children:Vb(a[0].size)})]}):null,[a]);return P&&a.length&&!U?jsxs(Fragment,{children:[jsxs(u,{children:[typeof l=="string"?jsx(d,{children:l}):l??jsx(d,{children:"File uploaded"}),S]}),jsx(F,{width:B,children:jsxs(h,{children:[P&&jsx(p,{component:"img",src:Ej,width:56,height:56}),W]})}),pe??jsxs(Q,{children:[jsx(a$1,{onClick:()=>{H([]);},children:jsx(a$2,{src:Fj,alt:"delete",sx:{width:14,height:14}})}),jsx(O,{disabled:ie,onClick:()=>{re?.(a);},children:"Bulk Send"})]})]}):U&&a.length?jsxs(Fragment,{children:[jsxs(u,{children:[l&&typeof l!="string"?l:jsxs(Fragment,{children:[jsx(d,{children:l??n$1("uploading")}),jsx(g,{children:n$1("wait")})]}),S]}),jsx(F,{width:B,children:jsxs(h,{children:[U&&jsx(n,{size:56,value:te,variant:ne??"determinate"}),W]})}),i]}):jsxs(Fragment,{children:[jsxs(u,{children:[m?jsx(d,{isError:true,children:m}):typeof l=="string"?jsx(d,{children:l}):l??jsx(d,{children:n$1("uploadBulkFile")}),S||!!m&&jsx(g,{children:"Supported formats: xls, xlxs"})]}),jsxs(F,{width:B,...de(),children:[jsx("input",{...se()}),jsxs(h,{"data-slot":"content",children:[jsx(p,{component:"img",src:m?Lj:Pe,width:56,height:56}),oe,W,m?jsx(Fragment,{children:le||jsx(J,{onClick:f,children:n$1("uploadAgain")})}):jsxs(b,{children:[jsxs(p,{children:[jsx(K,{onClick:f,children:"Click to upload"})," or drag and drop"]}),jsxs(z,{children:["Maximum file size ",C]}),e&&jsx(g,{children:n$1("supportedFormats",{accept:e})})]})]})]}),i]})});Y.displayName="FileUploadBase";var Z=memo(Y);var L=forwardRef((e,i)=>{let x=yc(useId(),"file-upload");return jsx(G,{id:x,"data-testid":"FileUpload","data-slot":"file-upload-wrapper",children:jsx(Z,{...e,ref:i})})});L.displayName="FileUpload";var ee=memo(L);var Xe=ee;export{Xe as a};
@@ -1 +1 @@
1
- import {b as b$1,g,a as a$2}from'./chunk-GB5N3AEY.js';import {a as a$1}from'./chunk-MXXAZH6N.js';import {p}from'./chunk-7NWGCOJA.js';import {a}from'./chunk-GNY2VGGW.js';import {yc}from'./chunk-W6W4YZ7G.js';import {useId}from'react';import b from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var f=styled(b)(()=>({display:"flex",gap:"4px",alignItems:"center",justifyContent:"center",borderRadius:"56px",padding:"2px 4px",cursor:"default"})),c=styled(a)(({theme:t})=>({color:t.palette.common.white,fontWeight:600,fontSize:"8px",padding:"3px 2.57px",borderRadius:"4px",lineHeight:"100%"}));function r({tooltip:t,status:o,statusCode:x}){let S=yc(useId(),"status-label"),p$1=b$1[o]??g[o]??null;return jsx(p,{title:t,children:jsxs(f,{id:S,"data-testid":"StatusLabel",sx:{backgroundColor:p$1?.background||"transparent"},children:[jsx(a$1,{src:a$2[o]}),jsx(c,{sx:g=>({backgroundColor:p$1?.color||g.palette.info.dark}),children:x})]})})}var q=r;export{q as a};
1
+ import {b as b$1,g,a as a$2}from'./chunk-GB5N3AEY.js';import {a as a$1}from'./chunk-MXXAZH6N.js';import {p}from'./chunk-ZH35RF3I.js';import {a}from'./chunk-GNY2VGGW.js';import {yc}from'./chunk-W6W4YZ7G.js';import {useId}from'react';import b from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var f=styled(b)(()=>({display:"flex",gap:"4px",alignItems:"center",justifyContent:"center",borderRadius:"56px",padding:"2px 4px",cursor:"default"})),c=styled(a)(({theme:t})=>({color:t.palette.common.white,fontWeight:600,fontSize:"8px",padding:"3px 2.57px",borderRadius:"4px",lineHeight:"100%"}));function r({tooltip:t,status:o,statusCode:x}){let S=yc(useId(),"status-label"),p$1=b$1[o]??g[o]??null;return jsx(p,{title:t,children:jsxs(f,{id:S,"data-testid":"StatusLabel",sx:{backgroundColor:p$1?.background||"transparent"},children:[jsx(a$1,{src:a$2[o]}),jsx(c,{sx:g=>({backgroundColor:p$1?.color||g.palette.info.dark}),children:x})]})})}var q=r;export{q as a};
@@ -1 +1 @@
1
- import {d as d$1}from'./chunk-ICVBANEU.js';import {a}from'./chunk-ALSPE2YR.js';import {yc}from'./chunk-W6W4YZ7G.js';import {Fb,B}from'./chunk-3YAJNHQC.js';import {useId,useMemo,useState}from'react';import d from'@mui/material/Box';import R from'@mui/material/Skeleton';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var b=styled(d)(({theme:e})=>({display:"flex",flexDirection:"column",borderRadius:"8px",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.common.white,maxHeight:"232px",overflow:"auto"})),k=styled(d)(()=>({display:"flex",flexDirection:"column",gap:"8px"})),v=styled(d,{shouldForwardProp:e=>e!=="$active"})(({$active:e})=>({display:"flex",alignItems:"center",justifyContent:"center",width:"13px",height:"13px",borderRadius:"50%",...e&&{backgroundColor:"#F2F2F2"}})),y=styled("img",{shouldForwardProp:e=>e!=="$isClear"})(({$isClear:e})=>({...e&&{backgroundColor:"#F2F2F2",borderRadius:"4px",width:"8px",height:"8px"}})),W=styled(d$1,{shouldForwardProp:e=>e!=="$hasSearchValue"})(({$hasSearchValue:e})=>({cursor:e?"pointer":"default",width:"100%",fontSize:"11px",border:"1px solid #F2F2F2",backgroundColor:"#fff","&.Mui-disabled":{backgroundColor:"#F8F8F8"}})),w=styled(a)(({theme:e})=>({backgroundColor:"#F8F8F8",fontSize:"11px",fontWeight:600,padding:"4px 8px",color:e.palette.info.dark,gap:"4px"})),A=styled(a)(()=>({fontSize:"11px",padding:"4px 8px",gap:"4px",fontWeight:400})),L=styled(R)(()=>({width:"100%",height:24}));function M({onSalesChannelChange:e,onSearchChange:h,filteredOptions:a,isLoading:P,initialSalesChannels:m,initialSalesChannelsSearch:V}){let B$1=yc(useId(),"sales-channel-filter"),o=useMemo(()=>m||[],[m]),[l,u]=useState(V||""),S=t=>o.some(i=>i.id===t),s=useMemo(()=>o?.length===a.length&&a?.length>0,[o,a]),g=useMemo(()=>o?.some(t=>t.id==="blank")&&o?.length===1,[o]),x=useMemo(()=>o?.length===0||g,[g,o?.length]);return jsxs(k,{id:B$1,"data-testid":"SalesChannelFilter",children:[jsx(W,{$hasSearchValue:!!l,placeholder:"Search",endAdornment:!x&&jsx(v,{$active:!!l,children:jsx(y,{src:l?Fb:B,alt:"search",$isClear:!!l,onClick:()=>{u(""),h("");}})}),disabled:x,onChange:t=>{u(t.target.value),h(t.target.value);},value:l,disableUnderline:true}),jsx(b,{children:P?Array.from({length:9}).map((t,i)=>jsx(L,{variant:"rectangular"},i)):jsxs(Fragment,{children:[jsx(w,{isSelected:s,isIndeterminate:!s&&(o?.length||0)>0,onClick:t=>{t.stopPropagation(),e(s?[]:a);},children:s?"Deselect All":"Select All"}),a.map(t=>jsx(A,{isSelected:S(t.id),onClick:i=>{i.stopPropagation();let O=S(t.id)?o?.filter(D=>D.id!==t.id):[...o??[],t];e(O);},children:t?.name?.en},t.id))]})})]})}export{M as a};
1
+ import {d as d$1}from'./chunk-7IA2JOEA.js';import {a}from'./chunk-6Z5EAN7R.js';import {yc}from'./chunk-W6W4YZ7G.js';import {Fb,B}from'./chunk-3YAJNHQC.js';import {useId,useMemo,useState}from'react';import d from'@mui/material/Box';import R from'@mui/material/Skeleton';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var b=styled(d)(({theme:e})=>({display:"flex",flexDirection:"column",borderRadius:"8px",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.common.white,maxHeight:"232px",overflow:"auto"})),k=styled(d)(()=>({display:"flex",flexDirection:"column",gap:"8px"})),v=styled(d,{shouldForwardProp:e=>e!=="$active"})(({$active:e})=>({display:"flex",alignItems:"center",justifyContent:"center",width:"13px",height:"13px",borderRadius:"50%",...e&&{backgroundColor:"#F2F2F2"}})),y=styled("img",{shouldForwardProp:e=>e!=="$isClear"})(({$isClear:e})=>({...e&&{backgroundColor:"#F2F2F2",borderRadius:"4px",width:"8px",height:"8px"}})),W=styled(d$1,{shouldForwardProp:e=>e!=="$hasSearchValue"})(({$hasSearchValue:e})=>({cursor:e?"pointer":"default",width:"100%",fontSize:"11px",border:"1px solid #F2F2F2",backgroundColor:"#fff","&.Mui-disabled":{backgroundColor:"#F8F8F8"}})),w=styled(a)(({theme:e})=>({backgroundColor:"#F8F8F8",fontSize:"11px",fontWeight:600,padding:"4px 8px",color:e.palette.info.dark,gap:"4px"})),A=styled(a)(()=>({fontSize:"11px",padding:"4px 8px",gap:"4px",fontWeight:400})),L=styled(R)(()=>({width:"100%",height:24}));function M({onSalesChannelChange:e,onSearchChange:h,filteredOptions:a,isLoading:P,initialSalesChannels:m,initialSalesChannelsSearch:V}){let B$1=yc(useId(),"sales-channel-filter"),o=useMemo(()=>m||[],[m]),[l,u]=useState(V||""),S=t=>o.some(i=>i.id===t),s=useMemo(()=>o?.length===a.length&&a?.length>0,[o,a]),g=useMemo(()=>o?.some(t=>t.id==="blank")&&o?.length===1,[o]),x=useMemo(()=>o?.length===0||g,[g,o?.length]);return jsxs(k,{id:B$1,"data-testid":"SalesChannelFilter",children:[jsx(W,{$hasSearchValue:!!l,placeholder:"Search",endAdornment:!x&&jsx(v,{$active:!!l,children:jsx(y,{src:l?Fb:B,alt:"search",$isClear:!!l,onClick:()=>{u(""),h("");}})}),disabled:x,onChange:t=>{u(t.target.value),h(t.target.value);},value:l,disableUnderline:true}),jsx(b,{children:P?Array.from({length:9}).map((t,i)=>jsx(L,{variant:"rectangular"},i)):jsxs(Fragment,{children:[jsx(w,{isSelected:s,isIndeterminate:!s&&(o?.length||0)>0,onClick:t=>{t.stopPropagation(),e(s?[]:a);},children:s?"Deselect All":"Select All"}),a.map(t=>jsx(A,{isSelected:S(t.id),onClick:i=>{i.stopPropagation();let O=S(t.id)?o?.filter(D=>D.id!==t.id):[...o??[],t];e(O);},children:t?.name?.en},t.id))]})})]})}export{M as a};
@@ -0,0 +1 @@
1
+ import {alpha,createTheme}from'@mui/material/styles';var B={2:"blur(2px)",4:"blur(4px)",6:"blur(6px)",8:"blur(8px)",12:"blur(12px)",20:"blur(20px)",32:"blur(32px)",36:"blur(36px)"};var $={100:"0px 0px 4px 0px rgba(0, 0, 0, 0.2)",200:"0px 0px 16px 0px rgba(0, 0, 0, 0.13)",300:"0px 8px 20px 0px rgba(0, 0, 0, 0.16)",400:"0px 0px 32px 0px rgba(0, 0, 0, 0.24)",500:"0px 8px 40px 0px rgba(0, 0, 0, 0.24)",600:"0px 2px 56px 0px rgba(32, 35, 43, 0.14)"},S=()=>$;var i=(e,p,f)=>`linear-gradient(${e}deg, ${p} 0%, ${f} 100%)`,E={brand:i(90,"#147DC5","#3DA6E1"),dark:i(180,"#42464F","#272B34"),aqua:i(180,"#B4D9EB","#CAE4C5"),mint:i(180,"#CAE4C5","#FFFCBB"),warm:i(180,"#FFFCBB","#FFDBB1"),peach:i(180,"#FFDBB1","#FFC9C9"),rose:i(180,"#FFC9C9","#CEB9E8"),lavender:i(180,"#CEB9E8","#B4D9EB")};var r={50:"#F9F9F9",100:"#F2F2F2",200:"#E4E6E9",400:"#ABAAB2",500:"#8D8D94",700:"#5C5D61",900:"#20232B"},n={50:"#E9F3FA",500:"#1F88D0"},l={500:"#2ACE00",700:"#39953E"},m={500:"#FF0000",700:"#CC393C"},c={500:"#FFD200",600:"#C9A605"},y={white:"#FFFFFF",black:"#20232B"},a=(e,p)=>alpha(e,p),I={base:y,grey:r,brand:n,success:l,error:m,warning:c,foreground:{primary:r[900],secondary:r[500],tertiary:a(r[900],.5),disabled:a(r[900],.25),inverted:y.white,brand:n[500]},background:{primary:y.white,secondary:r[100],tertiary:r[50]},gradient:E,border:{default:r[100],subtle:a(r[100],.7),strong:r[400]},interactive:{primary:{default:n[500],disabled:a(n[500],.4),subtle:a(n[500],.1)}},status:{success:{default:l[500],subtle:a(l[500],.1),emphasis:l[700]},danger:{default:m[500],subtle:a(m[500],.14),emphasis:m[700]},warning:{default:c[500],emphasis:c[600]}}},C=()=>I;var t={body:"Inter, sans-serif",display:"Inter, sans-serif"},T={regular:400,medium:500,semibold:600,bold:700},o=({family:e,size:p,lineHeight:f})=>R=>({fontFamily:e,fontSize:`${p}px`,lineHeight:`${f}px`,fontWeight:T[R],letterSpacing:0}),F=o({family:t.display,size:24,lineHeight:32}),L=o({family:t.display,size:18,lineHeight:26}),D=o({family:t.body,size:15,lineHeight:22}),x=o({family:t.body,size:14,lineHeight:20}),d=o({family:t.body,size:12,lineHeight:18}),s=o({family:t.body,size:11,lineHeight:16}),g=o({family:t.body,size:10,lineHeight:14}),b=o({family:t.body,size:9,lineHeight:12}),h=o({family:t.body,size:8,lineHeight:10}),k={fontFamily:t,fontWeight:T,heading:{h1:{medium:F("medium"),semibold:F("semibold"),bold:F("bold")},h2:{medium:L("medium")}},body:{large:{semibold:D("semibold"),bold:D("bold")},default:{regular:x("regular"),medium:x("medium"),semibold:x("semibold"),bold:x("bold")},medium:{regular:d("regular"),medium:d("medium"),semibold:d("semibold"),bold:d("bold")},small:{regular:s("regular"),medium:s("medium"),semibold:s("semibold"),bold:s("bold")},xsmall:{regular:g("regular"),medium:g("medium"),semibold:g("semibold"),bold:g("bold")}},caption:{regular:b("regular"),medium:b("medium"),semibold:b("semibold"),bold:b("bold")},micro:{medium:h("medium"),semibold:h("semibold"),bold:h("bold")}};var z=e=>typeof e=="number"?`${e}px`:e,A=z,v=z;var u=()=>({palette:C(),typography:k,elevation:S(),blur:B,spacing:A,radius:v});var P={MuiSvgIcon:{styleOverrides:{root:{width:"0.8em",height:"0.8em"}}},MuiButtonBase:{defaultProps:{disableRipple:true}},MuiPopper:{styleOverrides:{root:{zIndex:1400}}}};var w={mode:"light",common:{black:"#000",white:"#fff",blue:"#147DC5",green:"#2ACE00",purple:"#6D4BCB",red:"#ff0000",orange:"#DD702C",lightOrange:"#FFF7F2",lightPurple:"#4E1FD0"},text:{primary:"#20232B",textSecondary:"#9F9F9F"},grey:{50:"#FEFEFE",100:"#F2F2F2",200:"#002945",300:"rgba(246, 248, 250, 0.8)",400:"#f9f9f9",500:"#8C9196",600:"#5C5C5C",700:"#8D8D94",800:"#E4E6E9",900:"#1D1B20",A50:"#fbfbfb",A100:"#8d8d94",A200:"#000014",A400:"#C1C1C1",A700:"#818181",A800:"#1F222A"},primary:{light:"#FCFCFC",main:"#1D1E21",dark:"#1D1E21"},background:{default:"#fff",highlight:"rgba(117, 122, 135, 0.1)",gradient:{blueGreen:"linear-gradient(180deg, #b4d9eb 0%, #cae4c5 100%)",greenYellow:"linear-gradient(180deg, #cae4c5 0%, #fffcbb 100%)",yellowOrange:"linear-gradient(180deg, #fffcbb 0%, #ffdbb1 100%)",orangeRed:"linear-gradient(180deg, #ffdbb1 0%, #ffc9c9 100%)",redPurple:"linear-gradient(180deg, #ffc9c9 0%, #ceb9e8 100%)",purpleBlue:"linear-gradient(180deg, #CEB9E8 0%, #B4D9EB 100%)",shadedBlue:"linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)",darkShadedBlue:"linear-gradient(256deg, #147DC5 0%, #3DA6E1 100%)",darkToLight:"linear-gradient(254deg, #101010 0.51%, #343740 49.67%, #101010 100%)",error:"linear-gradient(0deg, rgba(255, 0, 0, 0.14) 0%, rgba(255, 0, 0, 0.14) 100%), #FFF"},transparent:["rgba(249, 249, 249, 0.80)","rgba(32, 35, 43, 0.60)","rgba(242, 242, 242, 0.50)"]},warning:{main:"#F4BE4F",light:"#E9DB94",dark:"#E37B00"},error:{light:"#FF0000",main:"#FF3D00",dark:"#EA611C"},success:{light:"#BFEBB4",main:"#2ACE00",dark:"#76BB40"},divider:"#F2F2F2",info:{light:"#F4F9FD",main:"#29b6f6",dark:"#1F88D0"},action:{hover:"#f5f5f5"},secondary:{main:"#6D4BCB",light:"#DDDDDD"},custom:{50:"#e7f4fc",100:"#FFF0DE",200:"#E4F0F8",300:"#FFECE5",400:"#efefef",500:"#FF7A00",600:"#FFF5F2",700:"#128C7E",800:"#0085FF",900:"#3BC84F"}},H={mode:"dark",text:{primary:"#fff"},background:{default:"#000"}};var W=["none","0px 0px 1.4847px #FFFFFF","0px 0px 28px rgba(0, 0, 0, 0.04)","0px 0px 16px 0px rgba(0, 0, 0, 0.13)}","7px 0px 8px 0px #F2F2F2","0px 0px 28px 0px rgba(0, 0, 0, 0.04)","0px 0px 8px 0px rgba(0, 0, 0, 0.13)","0px 0px 4px 0px rgba(31, 136, 208, 0.50)","0px 0px 12px 0px rgba(0, 0, 0, 0.15)","0px 8px 30px 0px rgba(0, 0, 0, 0.16)","0px 0px 16px 0px rgba(0, 0, 0, 0.15)","0px 0px 16px 0px rgba(0, 0, 0, 0.13)","-4px 0px 16px 0px rgba(0, 0, 0, 0.10)","0px 0px 32px 0px rgba(0, 0, 0, 0.11)","0px 4px 8px 0px rgba(0, 0, 0, 0.14)","0px 0px 36px 0px rgba(0, 0, 0, 0.05)","0px 0px 44px 0px rgba(0, 0, 0, 0.25)","0px 0px 6px 0px rgba(0, 0, 0, 0.11)","0px 8px 10px -5px rgba(0,0,0,0.2),0px 16px 24px 2px rgba(0,0,0,0.14),0px 6px 30px 5px rgba(0,0,0,0.12)","0px 8px 30px 0px rgba(0, 0, 0, 0.15)","0px 9px 11px -5px rgba(0,0,0,0.2),0px 18px 28px 2px rgba(0,0,0,0.14),0px 7px 34px 6px rgba(0,0,0,0.12)","0px 9px 11px -5px rgba(0,0,0,0.2),0px 18px 28px 2px rgba(0,0,0,0.14),0px 7px 34px 6px rgba(0,0,0,0.12)","0px 1px 1px 0px rgba(0, 0, 0, 0.10), 0px 2px 2px 0px rgba(0, 0, 0, 0.09), 0px 5px 3px 0px rgba(0, 0, 0, 0.05), 0px 9px 4px 0px rgba(0, 0, 0, 0.01), 0px 14px 4px 0px rgba(0, 0, 0, 0.00)","0px 1px 16px 0px rgba(0, 0, 0, 0.07)","0px -1px 16px 0px rgba(0, 0, 0, 0.07)"];var M=e=>e==="ltr"?["Tap Sans","sans-serif"].join(", "):["Noto Sans Arabic","sans-serif"].join(", "),O=(e="ltr")=>({htmlFontSize:16,fontFamily:M(e),fontSize:14,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:500,fontWeightBold:600,fontWeightBolder:700,allVariants:{fontFamily:M(e),fontSize:"0.875rem",lineHeight:"normal",fontStyle:"normal",fontWeight:"normal",fontStretch:"normal",letterSpacing:"normal"},h1:{fontSize:"3.5rem"},h2:{fontSize:"3rem"},h3:{fontSize:"2.5rem"},h4:{fontSize:"2rem"},h5:{fontSize:"1.5rem"},h6:{fontSize:"1.25rem"},subtitle1:{fontSize:"0.6875rem",lineHeight:"15px",fontWeight:400},subtitle2:{fontSize:"0.875rem"},body1:{fontSize:"1rem"},body2:{fontSize:"0.875rem"},button:{fontSize:"0.875rem"},caption:{fontSize:"0.75rem"},overline:{fontSize:"0.75rem"}});var c0=(e,p)=>createTheme({palette:e==="dark"?H:w,direction:p,typography:O(p),components:P,shape:{borderRadius:8},shadows:W,v2:u()});export{P as a,w as b,H as c,W as d,O as e,c0 as f};
@@ -1,2 +1,2 @@
1
- import {f}from'./chunk-EHCLJT3V.js';import {yc}from'./chunk-W6W4YZ7G.js';import {memo,useId,useState,useRef,useMemo}from'react';import {useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import C from'@mui/material/Box';import v from'@mui/material/Button';import {styled,alpha}from'@mui/material/styles';function m({isActive:o}){let[t,r]=useState(false),a=useTheme(),s=()=>{r(true);},p=()=>{r(false);},l=o?a.palette.common.white:a.palette.grey[700],c=t?a.palette.common.black:"transparent";return jsx("svg",{width:"27",height:"30",viewBox:"0 0 27 32",xmlns:"http://www.w3.org/2000/svg",children:jsxs("g",{id:"Group 140343",children:[jsx("path",{id:"Active",d:"M0 0H11C19.8366 0 27 7.16344 27 16C27 24.8366 19.8366 32 11 32H0V0Z",fill:c,fillOpacity:"0.1",onMouseEnter:s,onMouseLeave:p}),jsx("path",{id:"Union",fillRule:"evenodd",clipRule:"evenodd",d:"M15.6941 15.0078C15.6494 15.0193 15.6083 15.043 15.5758 15.0769L12.5026 18.1501L12.5025 18.1501L15.5756 15.0769C15.6082 15.043 15.6493 15.0193 15.6941 15.0078ZM12.5619 18.7465C12.5426 18.7512 12.5227 18.7536 12.5026 18.7536C12.4363 18.7536 12.3727 18.7273 12.3258 18.6804L9.07581 15.4304C9.04012 15.3957 9.01559 15.3512 9.00535 15.3025C8.99511 15.2538 8.99963 15.2032 9.01833 15.1571C9.03703 15.111 9.06907 15.0715 9.11033 15.0437C9.13446 15.0275 9.16112 15.0156 9.18904 15.0086C9.16105 15.0156 9.13433 15.0275 9.11013 15.0438C9.06887 15.0716 9.03684 15.111 9.01814 15.1571C8.99944 15.2032 8.99492 15.2539 9.00516 15.3026C9.0154 15.3513 9.03993 15.3958 9.07562 15.4305L12.3256 18.6805C12.3725 18.7273 12.4361 18.7537 12.5024 18.7537C12.5226 18.7537 12.5426 18.7512 12.5619 18.7465ZM16.1965 15.342C16.1781 15.4301 16.1338 15.5105 16.0693 15.5731L12.8205 18.8219C12.7361 18.9063 12.6217 18.9537 12.5024 18.9537C12.3831 18.9537 12.2686 18.9062 12.1842 18.8219L8.93507 15.5728C8.87148 15.5105 8.82775 15.4308 8.80944 15.3437C8.79101 15.2561 8.79914 15.165 8.8328 15.082C8.86646 14.999 8.92412 14.9279 8.99839 14.8779C9.07266 14.8279 9.16022 14.8011 9.24978 14.8011C9.30998 14.8011 9.36958 14.8132 9.42503 14.8366C9.47997 14.8599 9.52973 14.8938 9.57144 14.9364L12.5024 17.8673L15.433 14.9368C15.5151 14.852 15.6273 14.803 15.7454 14.8002C15.836 14.798 15.9252 14.8233 16.0013 14.8728C16.0773 14.9222 16.1367 14.9935 16.1715 15.0772C16.2063 15.1609 16.2151 15.2533 16.1965 15.342Z",fill:l})]})})}var y=o=>({...o.typography.subtitle1,borderRadius:"50px",borderWidth:"1px",borderStyle:"solid",minWidth:"135.11px",height:"32px",display:"flex",justifyContent:"center",alignItems:"center",gap:"8px",textTransform:"none",transition:"none",paddingInline:o.spacing(2)}),B=styled(v)(({theme:o})=>({...y(o),background:o.palette.background.gradient.shadedBlue,color:o.palette.common.white,"&:hover":{background:o.palette.background.gradient.shadedBlue,opacity:.8}})),b=styled(v)(({theme:o})=>({...y(o),backgroundColor:o.palette.common.white,borderColor:o.palette.grey[100],color:o.palette.text.primary,"&:hover":{backgroundColor:o.palette.common.white,opacity:.7}}));styled(C)(({theme:o,variant:t})=>({borderRadius:"50px",backgroundColor:t==="active"?alpha(o.palette.text.primary,.1):o.palette.grey[100],display:"flex",justifyContent:"center",alignItems:"center",paddingInline:o.spacing(.5),paddingBlock:o.spacing(.25),color:t==="active"?o.palette.common.white:o.palette.text.primary,fontSize:"8px",fontWeight:700,lineHeight:"10px"}));styled("img")(({theme:o,variant:t})=>({fill:t==="active"?o.palette.common.white:o.palette.text.primary,color:t==="active"?o.palette.common.white:o.palette.text.primary,maxWidth:"14px",maxHeight:"14px"}));styled("p")(({theme:o})=>({fontSize:"0.6875rem",color:o.palette.background.default,fontStyle:"normal",margin:"auto",textTransform:"capitalize"}));var I=styled(f)(({theme:o})=>({backgroundColor:"white",boxShadow:o.shadows[21],borderRadius:"0.25rem","& .MuiPaper-root":{borderRadius:"0.25rem",width:"12.5rem"}})),D=styled("span")(()=>({width:"27px",height:"100%",maxHeight:"100%",position:"absolute",top:"0",right:"0",bottom:"0",overflow:"hidden"})),L=styled(C)(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"100%"})),k=styled(C)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"0.5rem"}));var M={active:B,inActive:b};function R({variant:o="inActive",label:t,dropdownOptions:r,...a}){let s=yc(useId(),"dropdown-button"),[p,l]=useState(null),c=useRef(null),f=!!p,g=()=>{l(null);},H=M[o],d=r&&r.length>0,h=d?jsx(m,{isActive:o==="active"}):null,T=n=>{n.stopPropagation(),n.preventDefault(),d&&l(c.current);},P=useMemo(()=>(r||[]).map(n=>({...n,onClick:A=>{n?.onClick?.(A),g();}})),[r]);return jsxs(Fragment,{children:[jsx(H,{id:s,"data-testid":"StatusButton",...a,ref:c,onClick:n=>{a?.onClick?.(n),T(n);},sx:{...d&&{paddingInlineEnd:"27px"}},children:jsxs(L,{children:[jsx(k,{children:t}),h&&jsx(D,{children:h})]})}),f&&jsx(I,{open:f,onClose:g,anchorEl:p,menuItems:P})]})}R.displayName="DropdownButton";var E=memo(R);var go=E;
1
+ import {f}from'./chunk-3TKFTDUU.js';import {yc}from'./chunk-W6W4YZ7G.js';import {memo,useId,useState,useRef,useMemo}from'react';import {useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import C from'@mui/material/Box';import v from'@mui/material/Button';import {styled,alpha}from'@mui/material/styles';function m({isActive:o}){let[t,r]=useState(false),a=useTheme(),s=()=>{r(true);},p=()=>{r(false);},l=o?a.palette.common.white:a.palette.grey[700],c=t?a.palette.common.black:"transparent";return jsx("svg",{width:"27",height:"30",viewBox:"0 0 27 32",xmlns:"http://www.w3.org/2000/svg",children:jsxs("g",{id:"Group 140343",children:[jsx("path",{id:"Active",d:"M0 0H11C19.8366 0 27 7.16344 27 16C27 24.8366 19.8366 32 11 32H0V0Z",fill:c,fillOpacity:"0.1",onMouseEnter:s,onMouseLeave:p}),jsx("path",{id:"Union",fillRule:"evenodd",clipRule:"evenodd",d:"M15.6941 15.0078C15.6494 15.0193 15.6083 15.043 15.5758 15.0769L12.5026 18.1501L12.5025 18.1501L15.5756 15.0769C15.6082 15.043 15.6493 15.0193 15.6941 15.0078ZM12.5619 18.7465C12.5426 18.7512 12.5227 18.7536 12.5026 18.7536C12.4363 18.7536 12.3727 18.7273 12.3258 18.6804L9.07581 15.4304C9.04012 15.3957 9.01559 15.3512 9.00535 15.3025C8.99511 15.2538 8.99963 15.2032 9.01833 15.1571C9.03703 15.111 9.06907 15.0715 9.11033 15.0437C9.13446 15.0275 9.16112 15.0156 9.18904 15.0086C9.16105 15.0156 9.13433 15.0275 9.11013 15.0438C9.06887 15.0716 9.03684 15.111 9.01814 15.1571C8.99944 15.2032 8.99492 15.2539 9.00516 15.3026C9.0154 15.3513 9.03993 15.3958 9.07562 15.4305L12.3256 18.6805C12.3725 18.7273 12.4361 18.7537 12.5024 18.7537C12.5226 18.7537 12.5426 18.7512 12.5619 18.7465ZM16.1965 15.342C16.1781 15.4301 16.1338 15.5105 16.0693 15.5731L12.8205 18.8219C12.7361 18.9063 12.6217 18.9537 12.5024 18.9537C12.3831 18.9537 12.2686 18.9062 12.1842 18.8219L8.93507 15.5728C8.87148 15.5105 8.82775 15.4308 8.80944 15.3437C8.79101 15.2561 8.79914 15.165 8.8328 15.082C8.86646 14.999 8.92412 14.9279 8.99839 14.8779C9.07266 14.8279 9.16022 14.8011 9.24978 14.8011C9.30998 14.8011 9.36958 14.8132 9.42503 14.8366C9.47997 14.8599 9.52973 14.8938 9.57144 14.9364L12.5024 17.8673L15.433 14.9368C15.5151 14.852 15.6273 14.803 15.7454 14.8002C15.836 14.798 15.9252 14.8233 16.0013 14.8728C16.0773 14.9222 16.1367 14.9935 16.1715 15.0772C16.2063 15.1609 16.2151 15.2533 16.1965 15.342Z",fill:l})]})})}var y=o=>({...o.typography.subtitle1,borderRadius:"50px",borderWidth:"1px",borderStyle:"solid",minWidth:"135.11px",height:"32px",display:"flex",justifyContent:"center",alignItems:"center",gap:"8px",textTransform:"none",transition:"none",paddingInline:o.spacing(2)}),B=styled(v)(({theme:o})=>({...y(o),background:o.palette.background.gradient.shadedBlue,color:o.palette.common.white,"&:hover":{background:o.palette.background.gradient.shadedBlue,opacity:.8}})),b=styled(v)(({theme:o})=>({...y(o),backgroundColor:o.palette.common.white,borderColor:o.palette.grey[100],color:o.palette.text.primary,"&:hover":{backgroundColor:o.palette.common.white,opacity:.7}}));styled(C)(({theme:o,variant:t})=>({borderRadius:"50px",backgroundColor:t==="active"?alpha(o.palette.text.primary,.1):o.palette.grey[100],display:"flex",justifyContent:"center",alignItems:"center",paddingInline:o.spacing(.5),paddingBlock:o.spacing(.25),color:t==="active"?o.palette.common.white:o.palette.text.primary,fontSize:"8px",fontWeight:700,lineHeight:"10px"}));styled("img")(({theme:o,variant:t})=>({fill:t==="active"?o.palette.common.white:o.palette.text.primary,color:t==="active"?o.palette.common.white:o.palette.text.primary,maxWidth:"14px",maxHeight:"14px"}));styled("p")(({theme:o})=>({fontSize:"0.6875rem",color:o.palette.background.default,fontStyle:"normal",margin:"auto",textTransform:"capitalize"}));var I=styled(f)(({theme:o})=>({backgroundColor:"white",boxShadow:o.shadows[21],borderRadius:"0.25rem","& .MuiPaper-root":{borderRadius:"0.25rem",width:"12.5rem"}})),D=styled("span")(()=>({width:"27px",height:"100%",maxHeight:"100%",position:"absolute",top:"0",right:"0",bottom:"0",overflow:"hidden"})),L=styled(C)(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"100%"})),k=styled(C)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"0.5rem"}));var M={active:B,inActive:b};function R({variant:o="inActive",label:t,dropdownOptions:r,...a}){let s=yc(useId(),"dropdown-button"),[p,l]=useState(null),c=useRef(null),f=!!p,g=()=>{l(null);},H=M[o],d=r&&r.length>0,h=d?jsx(m,{isActive:o==="active"}):null,T=n=>{n.stopPropagation(),n.preventDefault(),d&&l(c.current);},P=useMemo(()=>(r||[]).map(n=>({...n,onClick:A=>{n?.onClick?.(A),g();}})),[r]);return jsxs(Fragment,{children:[jsx(H,{id:s,"data-testid":"StatusButton",...a,ref:c,onClick:n=>{a?.onClick?.(n),T(n);},sx:{...d&&{paddingInlineEnd:"27px"}},children:jsxs(L,{children:[jsx(k,{children:t}),h&&jsx(D,{children:h})]})}),f&&jsx(I,{open:f,onClose:g,anchorEl:p,menuItems:P})]})}R.displayName="DropdownButton";var E=memo(R);var go=E;
2
2
  export{m as a,go as b};