@tap-payments/os-micro-frontend-shared 0.3.219-test.22 → 0.3.219-test.27

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 (191) hide show
  1. package/build/_chunks/{chunk-K6YFQLOS.js → chunk-2CJVCAXX.js} +1 -1
  2. package/build/_chunks/{chunk-KXEOI4UZ.js → chunk-2F2CDDIY.js} +1 -1
  3. package/build/_chunks/{chunk-TL3CYJAC.js → chunk-2M6NVUO2.js} +1 -1
  4. package/build/_chunks/{chunk-WM4P33A3.js → chunk-2W6DRA3Q.js} +1 -1
  5. package/build/_chunks/{chunk-JLBRPAFF.js → chunk-4JUIJMPG.js} +1 -1
  6. package/build/_chunks/{chunk-AP4W2P6I.js → chunk-4KGKI636.js} +1 -1
  7. package/build/_chunks/{chunk-KQMMNYC6.js → chunk-4S6WI63T.js} +1 -1
  8. package/build/_chunks/{chunk-GMLZWKDZ.js → chunk-54A35TA5.js} +1 -1
  9. package/build/_chunks/{chunk-KCANQYNP.js → chunk-54IPIBZU.js} +1 -1
  10. package/build/_chunks/{chunk-CO5KY4J3.js → chunk-57GPEKOQ.js} +1 -1
  11. package/build/_chunks/{chunk-NFYCBAPK.js → chunk-5AW5C7Y3.js} +1 -1
  12. package/build/_chunks/{chunk-HO5LJAUC.js → chunk-5FZNDN55.js} +1 -1
  13. package/build/_chunks/{chunk-NXEQA2NY.js → chunk-5G6VELYF.js} +1 -1
  14. package/build/_chunks/{chunk-ISBGISGN.js → chunk-5IZHUI5O.js} +1 -1
  15. package/build/_chunks/{chunk-2KJAJEX5.js → chunk-5QMN72FQ.js} +1 -1
  16. package/build/_chunks/{chunk-DOE5YK7Z.js → chunk-6RBCAS5D.js} +1 -1
  17. package/build/_chunks/chunk-6ZXNZQCB.js +2 -0
  18. package/build/_chunks/{chunk-AMIDNGQQ.js → chunk-7777KKVK.js} +1 -1
  19. package/build/_chunks/{chunk-2KL5IQPU.js → chunk-A3VOJ3G2.js} +1 -1
  20. package/build/_chunks/{chunk-YRSJX6IG.js → chunk-AXHX5JVO.js} +1 -1
  21. package/build/_chunks/{chunk-3TQTETIW.js → chunk-C6NWRLGZ.js} +1 -1
  22. package/build/_chunks/{chunk-77BLVPSN.js → chunk-DACWW6BH.js} +1 -1
  23. package/build/_chunks/{chunk-CCX7J3SH.js → chunk-DAPXKY53.js} +1 -1
  24. package/build/_chunks/{chunk-U7WCWUOF.js → chunk-EJJIHLPX.js} +1 -1
  25. package/build/_chunks/{chunk-MBEFFI74.js → chunk-EVERBYTO.js} +1 -1
  26. package/build/_chunks/{chunk-DWLCLBEU.js → chunk-FKKKLMWE.js} +1 -1
  27. package/build/_chunks/{chunk-7HINDK4C.js → chunk-FYEOUWRV.js} +1 -1
  28. package/build/_chunks/{chunk-ZEA6DWZL.js → chunk-GJQV65J5.js} +1 -1
  29. package/build/_chunks/{chunk-YAYIWB5E.js → chunk-HKFQ5R7G.js} +1 -1
  30. package/build/_chunks/{chunk-CH5QS4B5.js → chunk-HLCUTB2C.js} +1 -1
  31. package/build/_chunks/{chunk-P3Y5CNRT.js → chunk-IBXMT55Y.js} +1 -1
  32. package/build/_chunks/{chunk-H5GMJ5PD.js → chunk-IISCFGS5.js} +1 -1
  33. package/build/_chunks/{chunk-IUTE4C2F.js → chunk-JE74VGU3.js} +1 -1
  34. package/build/_chunks/{chunk-PZKBWKCJ.js → chunk-KF4KQSVJ.js} +1 -1
  35. package/build/_chunks/{chunk-JHWBRTPH.js → chunk-KK2O6IKJ.js} +1 -1
  36. package/build/_chunks/{chunk-GSRK5GJH.js → chunk-KWNPF24A.js} +1 -1
  37. package/build/_chunks/{chunk-GJQ6SFIN.js → chunk-L64U7PL5.js} +1 -1
  38. package/build/_chunks/{chunk-Q56KGKBE.js → chunk-LAS7B4J7.js} +1 -1
  39. package/build/_chunks/{chunk-PL4EQPZW.js → chunk-LT7P7S46.js} +1 -1
  40. package/build/_chunks/{chunk-XJXEZG6P.js → chunk-LUXFXRJY.js} +1 -1
  41. package/build/_chunks/{chunk-3ZHAO2EY.js → chunk-M67YJKZO.js} +1 -1
  42. package/build/_chunks/{chunk-CRZ4RM7J.js → chunk-MJXBFHYN.js} +1 -1
  43. package/build/_chunks/{chunk-TCTDIEZ5.js → chunk-NVDV5DDI.js} +1 -1
  44. package/build/_chunks/{chunk-Q6RVR42B.js → chunk-O3FQUJLZ.js} +1 -1
  45. package/build/_chunks/chunk-OY44HMKS.js +1 -0
  46. package/build/_chunks/chunk-OYFBMD3V.js +1 -0
  47. package/build/_chunks/{chunk-6XWLDOFJ.js → chunk-PRAJNMZZ.js} +1 -1
  48. package/build/_chunks/{chunk-EPBDDA5A.js → chunk-PVEQLSLG.js} +1 -1
  49. package/build/_chunks/{chunk-22TPUHWC.js → chunk-QJ2GL3UO.js} +1 -1
  50. package/build/_chunks/{chunk-VQTO2YAB.js → chunk-QM55E5LM.js} +1 -1
  51. package/build/_chunks/{chunk-DN4OVHCL.js → chunk-RLPTTN4A.js} +1 -1
  52. package/build/_chunks/{chunk-FBCVPPBP.js → chunk-RVCKXM5W.js} +1 -1
  53. package/build/_chunks/{chunk-7GJDTTGW.js → chunk-RW5XIEV7.js} +1 -1
  54. package/build/_chunks/{chunk-RIBPDIJ5.js → chunk-RXFAHGFK.js} +1 -1
  55. package/build/_chunks/{chunk-ZWCTSXKU.js → chunk-SDVASEF5.js} +1 -1
  56. package/build/_chunks/{chunk-UUOYYUZB.js → chunk-SH6HUOLY.js} +1 -1
  57. package/build/_chunks/{chunk-N4BENCI5.js → chunk-SRCVKMIR.js} +1 -1
  58. package/build/_chunks/{chunk-LXEZL3C4.js → chunk-TEAJLXYP.js} +1 -1
  59. package/build/_chunks/{chunk-HIU3QO5T.js → chunk-THUYFQWT.js} +1 -1
  60. package/build/_chunks/{chunk-WBF34RHS.js → chunk-TOX7XAZB.js} +1 -1
  61. package/build/_chunks/{chunk-5U72UJMI.js → chunk-TQPCGPSE.js} +1 -1
  62. package/build/_chunks/{chunk-SCVFZO5Q.js → chunk-TTBOB4JP.js} +1 -1
  63. package/build/_chunks/chunk-VFRJFEIJ.js +1 -0
  64. package/build/_chunks/{chunk-7LGB6YM3.js → chunk-VSRRBENQ.js} +1 -1
  65. package/build/_chunks/{chunk-KYRAVGUZ.js → chunk-WBIMGETF.js} +1 -1
  66. package/build/_chunks/{chunk-AR3KEUAZ.js → chunk-WZWGFPMD.js} +1 -1
  67. package/build/_chunks/{chunk-5S4RM2Z2.js → chunk-X3U4OCIT.js} +1 -1
  68. package/build/_chunks/{chunk-QT3YVHRK.js → chunk-XCYJMEZF.js} +1 -1
  69. package/build/_chunks/{chunk-QU4KH4UZ.js → chunk-XIWYWUHC.js} +1 -1
  70. package/build/_chunks/{chunk-NS2XRWO5.js → chunk-XWAD6GON.js} +1 -1
  71. package/build/_chunks/{chunk-U46PDMQK.js → chunk-YHEFOHGA.js} +1 -1
  72. package/build/_chunks/{chunk-GWZET3W4.js → chunk-ZFIS5GCE.js} +1 -1
  73. package/build/components/ActionsDropdownMenu/index.js +1 -1
  74. package/build/components/ActiveFilterChip/index.js +1 -1
  75. package/build/components/AmountInput/index.js +1 -1
  76. package/build/components/AnimatedSpinnerIcon/index.js +1 -1
  77. package/build/components/AppServices/index.js +1 -1
  78. package/build/components/AppServicesBar/index.js +1 -1
  79. package/build/components/AppWindowWrapper/index.js +1 -1
  80. package/build/components/AreaChart/index.js +1 -1
  81. package/build/components/Autocomplete/index.js +1 -1
  82. package/build/components/BrandLogo/index.js +1 -1
  83. package/build/components/Calender/index.js +1 -1
  84. package/build/components/ChipStack/index.js +1 -1
  85. package/build/components/ColorPicker/index.js +1 -1
  86. package/build/components/ColumnViews/index.js +1 -1
  87. package/build/components/ConfirmDialog/index.js +1 -1
  88. package/build/components/CountryFilter/index.js +1 -1
  89. package/build/components/CountryFlag/index.js +1 -1
  90. package/build/components/CurrencyAmount/index.js +1 -1
  91. package/build/components/CurrencySymbol/index.js +1 -1
  92. package/build/components/CustomBackdrop/index.js +1 -1
  93. package/build/components/Customer/index.js +1 -1
  94. package/build/components/DateFilter/index.js +1 -1
  95. package/build/components/DeviceIcon/index.js +1 -1
  96. package/build/components/Discount/index.js +1 -1
  97. package/build/components/DisplayAmount/index.js +1 -1
  98. package/build/components/DropdownMenu/index.js +1 -1
  99. package/build/components/EmptyState/index.js +1 -1
  100. package/build/components/Error/index.js +1 -1
  101. package/build/components/ErrorToast/index.js +1 -1
  102. package/build/components/ExpandableSideBar/index.js +1 -1
  103. package/build/components/FileInputPreview/index.js +1 -1
  104. package/build/components/FilePreview/index.js +1 -1
  105. package/build/components/FileUpload/index.js +1 -1
  106. package/build/components/FileUploader/index.js +1 -1
  107. package/build/components/FilterDropdown/index.js +1 -1
  108. package/build/components/Filters/index.js +1 -1
  109. package/build/components/FlippingCard/index.js +1 -1
  110. package/build/components/HeatMap/index.js +1 -1
  111. package/build/components/IconWithBadge/index.js +1 -1
  112. package/build/components/InputBase/index.js +1 -1
  113. package/build/components/Inputs/index.js +1 -1
  114. package/build/components/JSONViewer/index.js +1 -1
  115. package/build/components/LeftPeekRightExpandingChip/index.js +1 -1
  116. package/build/components/ListColumnFilter/index.js +1 -1
  117. package/build/components/ListHeader/index.js +1 -1
  118. package/build/components/ListHeader/types.d.ts +12 -3
  119. package/build/components/ListLayout/index.js +1 -1
  120. package/build/components/Loader/index.js +1 -1
  121. package/build/components/MFWidgetLoader/index.js +1 -1
  122. package/build/components/MaskedText/index.js +1 -1
  123. package/build/components/MerchantCurrencyDropdown/index.js +1 -1
  124. package/build/components/MerchantLogo/index.js +1 -1
  125. package/build/components/MerchantsDropdown/index.js +1 -1
  126. package/build/components/NestedDropdown/index.js +1 -1
  127. package/build/components/NestedMultiSelect/index.js +1 -1
  128. package/build/components/OpenFileInNewTab/index.js +1 -1
  129. package/build/components/PaymentSourceFilter/index.js +1 -1
  130. package/build/components/PhoneFilter/index.js +1 -1
  131. package/build/components/PhoneInput/index.js +1 -1
  132. package/build/components/ProgressRing/index.js +1 -1
  133. package/build/components/RFH/index.js +1 -1
  134. package/build/components/RHFInput/index.js +1 -1
  135. package/build/components/RHFPhoneInput/index.js +1 -1
  136. package/build/components/RHFSwitch/index.js +1 -1
  137. package/build/components/RadioGroup/index.js +1 -1
  138. package/build/components/RangeCalender/index.js +1 -1
  139. package/build/components/RangeCalender/utils.d.ts +1 -1
  140. package/build/components/RatingCount/index.js +1 -1
  141. package/build/components/ReferenceTypeFilter/index.js +1 -1
  142. package/build/components/RightLeftExpandingCenterChip/index.js +1 -1
  143. package/build/components/SearchButton/index.js +1 -1
  144. package/build/components/SearchInput/index.js +1 -1
  145. package/build/components/SelectDropdown/index.js +1 -1
  146. package/build/components/SheetViewChip/index.js +1 -1
  147. package/build/components/StatusBar/index.js +1 -1
  148. package/build/components/StatusButton/index.js +1 -1
  149. package/build/components/StatusFilter/index.js +1 -1
  150. package/build/components/StatusIcons/index.js +1 -1
  151. package/build/components/StatusLabel/index.js +1 -1
  152. package/build/components/TableCells/CustomCells/DateCell/DateCell.d.ts +4 -1
  153. package/build/components/TableCells/CustomCells/DateCell/DateViewer.d.ts +1 -1
  154. package/build/components/TableCells/CustomCells/DueDateCell/DueDateCell.d.ts +1 -1
  155. package/build/components/TableCells/CustomCells/DueDateCell/type.d.ts +6 -0
  156. package/build/components/TableCells/CustomCells/InvoiceStatusCell/InvoiceStatusCell.d.ts +1 -1
  157. package/build/components/TableCells/CustomCells/InvoiceStatusCell/type.d.ts +3 -0
  158. package/build/components/TableCells/CustomCells/PayoutDateCell/PayoutDateCell.d.ts +1 -1
  159. package/build/components/TableCells/CustomCells/RefundStatusCell/RefundStatusCell.d.ts +1 -1
  160. package/build/components/TableCells/CustomCells/RefundStatusCell/components/RefundStatus.d.ts +1 -1
  161. package/build/components/TableCells/CustomCells/RefundStatusCell/type.d.ts +6 -2
  162. package/build/components/TableCells/CustomCells/type.d.ts +3 -1
  163. package/build/components/TableCells/CustomCells/utils.d.ts +6 -0
  164. package/build/components/TableCells/index.js +1 -1
  165. package/build/components/TableReports/index.js +1 -1
  166. package/build/components/TextInput/index.js +1 -1
  167. package/build/components/Timeline/index.js +1 -1
  168. package/build/components/Timepicker/index.js +1 -1
  169. package/build/components/ToggleView/index.js +1 -1
  170. package/build/components/Toolbar/index.js +1 -1
  171. package/build/components/TreeDropdown/index.js +1 -1
  172. package/build/components/VAT/index.js +1 -1
  173. package/build/components/VerificationIcon/index.js +1 -1
  174. package/build/components/ViewColumnRadioFilter/index.js +1 -1
  175. package/build/components/VirtualTables/index.js +1 -1
  176. package/build/components/Widget/index.js +1 -1
  177. package/build/components/WindowSideBar/index.js +1 -1
  178. package/build/components/index.js +1 -1
  179. package/build/components/primitives/index.js +1 -1
  180. package/build/constants/currency.d.ts +0 -1
  181. package/build/datetime/index.d.ts +1 -1
  182. package/build/datetime/index.js +1 -1
  183. package/build/datetime/zone.d.ts +2 -0
  184. package/build/hooks/index.js +1 -1
  185. package/build/index.js +1 -1
  186. package/build/utils/index.js +1 -1
  187. package/package.json +2 -2
  188. package/build/_chunks/chunk-5H7DAS3H.js +0 -2
  189. package/build/_chunks/chunk-77CJKFPL.js +0 -1
  190. package/build/_chunks/chunk-EGJV4FA6.js +0 -1
  191. package/build/_chunks/chunk-RRN7KV7S.js +0 -1
@@ -1 +1 @@
1
- import {zc,bb,lc,kc,_b}from'./chunk-EGJV4FA6.js';import {Ro,ta,ra}from'./chunk-M5HS3EYQ.js';import {forwardRef,useId,useRef,useState,useEffect,useCallback,memo}from'react';import {useTranslation}from'react-i18next';import {useForkRef}from'@mui/material/utils';import R from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var f="os-shared-SheetViewChip",r={root:`${f}-root`,chip:`${f}-chip`,text:`${f}-text`,copyButton:`${f}-copyButton`},J=2e3,K=.3;var Q=styled("div")({position:"relative",width:"fit-content",maxWidth:"100%",'[data-column-align="right"] &':{marginLeft:"auto"}}),x=styled(R,{shouldForwardProp:e=>!["chipTextColor","chipBgColor","chipBorderColor","disabled","isSelected","disableAnimation"].includes(e)})(({theme:e,isSelected:w,chipTextColor:n=e.palette.text.primary,chipBgColor:i="#EFF1F2",chipBorderColor:o="#EFF1F2",disabled:h=false,disableAnimation:y})=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",height:"18px",padding:"0px 8px",borderRadius:"30px",border:`1px solid ${o}`,backgroundColor:i,color:n,cursor:h?"not-allowed":"pointer",opacity:h?.5:1,whiteSpace:"nowrap",fontSize:"11px",minWidth:"67px",maxWidth:"none",width:"fit-content",overflow:"hidden",textOverflow:"unset",boxSizing:"border-box",...w&&{boxShadow:"white 7px 0px 8px 2px"},...y&&{transition:"none !important",animation:"none !important",transform:"none !important","& *":{transform:"none !important"}}})),L=styled(R)(()=>({gap:"4px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:1})),U=styled(R)(()=>({position:"absolute",top:0,height:"100%",width:"12px",display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center"})),Y=styled("img",{shouldForwardProp:e=>e!=="isVisible"})(({isVisible:e})=>({height:12,width:12,objectFit:"contain",opacity:e?1:0,transform:`translateX(${e?0:-5}px)`,pointerEvents:e?"auto":"none",transition:"opacity 100ms ease, transform 100ms ease"}));var oe=forwardRef(({id:e,className:w,children:n,copyText:i,copyTrigger:o="hover",animationDirection:h="right",animationDuration:y=200,disableAnimation:S=false,disabled:v=false,unknownText:ie,fullWidth:a=false,containerStyles:se,sx:b,onClick:g,onMouseEnter:V,onMouseLeave:E,...N},F)=>{let $=zc(useId(),"sheet-view-chip"),{t:ne}=useTranslation(),k=useRef(null),re=useForkRef(k,F),M=useRef(),[P,c]=useState(false),[W,A]=useState(false),p=o==="always"||P,I=p&&!!i,l=h==="left",H=Math.max(0,y),T=K*1e3,ae=p?0:T;useEffect(()=>{if(o!=="press"||!P)return;let t=me=>{k.current?.contains(me.target)||c(false);};return document.addEventListener("pointerdown",t),()=>document.removeEventListener("pointerdown",t)},[o,P]),useEffect(()=>()=>clearTimeout(M.current),[]);let pe=useCallback(t=>{o==="press"&&c(true),g?.(t);},[o,g]),le=useCallback(t=>{o==="hover"&&i&&c(true),V?.(t);},[o,i,V]),de=useCallback(t=>{o==="hover"&&c(false),E?.(t);},[o,E]),he=useCallback(t=>{t.stopPropagation(),i&&(A(true),bb(i),clearTimeout(M.current),M.current=setTimeout(()=>A(false),J));},[i]),B=lc(r.chip,w);if(!n)return jsx(x,{...N,chipBgColor:Ro.bgColor,chipBorderColor:Ro.borderColor,chipTextColor:Ro.textColor,ref:F,id:e??$,"data-testid":"SheetViewChip",className:lc(r.root,B),disabled:v,disableAnimation:S,onClick:g,onMouseEnter:V,onMouseLeave:E,sx:kc(b??{},t=>({borderColor:t.palette.divider,width:a?"100%":"auto"})),children:ne(ie??"unknown")});let ce=S?"none":`z-index 0ms linear ${p?0:T+H}ms`,z={zIndex:p?3:0,transition:ce};return jsxs(Q,{ref:re,id:e??$,"data-testid":"SheetViewChip",className:r.root,style:{...z,...se,...a&&{width:"100%",minWidth:0,marginLeft:0}},children:[jsx(x,{...N,"aria-hidden":true,className:B,disabled:v,sx:kc(b??{},{visibility:"hidden",pointerEvents:"none",width:a?"100%":"fit-content"}),children:jsx(L,{children:n})}),jsx("div",{style:{position:"absolute",top:0,...z,width:a?"100%":"max-content",left:l?"auto":0,right:l?0:"auto"},children:jsxs(x,{...N,className:B,isSelected:p,disabled:v,disableAnimation:S,onClick:pe,onMouseEnter:le,onMouseLeave:de,sx:kc({width:a?"100%":"auto"},b),children:[jsx("div",{style:{display:"flex",gap:"4px",...a&&{maxWidth:"100%",width:"100%"},paddingRight:I&&!l?12:0,paddingLeft:I&&l?12:0,transition:`padding ${H}ms ease ${ae}ms`},children:jsx(L,{className:r.text,"data-is-arabic":typeof n=="string"&&_b(n),children:n})}),i&&jsx(U,{className:r.copyButton,sx:l?{left:"8px"}:{right:"8px"},children:jsx(Y,{isVisible:I,src:W?ta:ra,alt:W?"copied":"copy",onClick:he})})]})})]})});oe.displayName="SheetViewChip";var ye=memo(oe);export{r as a,ye as b};
1
+ import {zc,bb,lc,kc,_b}from'./chunk-VFRJFEIJ.js';import {Ro,ta,ra}from'./chunk-M5HS3EYQ.js';import {forwardRef,useId,useRef,useState,useEffect,useCallback,memo}from'react';import {useTranslation}from'react-i18next';import {useForkRef}from'@mui/material/utils';import R from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var f="os-shared-SheetViewChip",r={root:`${f}-root`,chip:`${f}-chip`,text:`${f}-text`,copyButton:`${f}-copyButton`},J=2e3,K=.3;var Q=styled("div")({position:"relative",width:"fit-content",maxWidth:"100%",'[data-column-align="right"] &':{marginLeft:"auto"}}),x=styled(R,{shouldForwardProp:e=>!["chipTextColor","chipBgColor","chipBorderColor","disabled","isSelected","disableAnimation"].includes(e)})(({theme:e,isSelected:w,chipTextColor:n=e.palette.text.primary,chipBgColor:i="#EFF1F2",chipBorderColor:o="#EFF1F2",disabled:h=false,disableAnimation:y})=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",height:"18px",padding:"0px 8px",borderRadius:"30px",border:`1px solid ${o}`,backgroundColor:i,color:n,cursor:h?"not-allowed":"pointer",opacity:h?.5:1,whiteSpace:"nowrap",fontSize:"11px",minWidth:"67px",maxWidth:"none",width:"fit-content",overflow:"hidden",textOverflow:"unset",boxSizing:"border-box",...w&&{boxShadow:"white 7px 0px 8px 2px"},...y&&{transition:"none !important",animation:"none !important",transform:"none !important","& *":{transform:"none !important"}}})),L=styled(R)(()=>({gap:"4px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:1})),U=styled(R)(()=>({position:"absolute",top:0,height:"100%",width:"12px",display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center"})),Y=styled("img",{shouldForwardProp:e=>e!=="isVisible"})(({isVisible:e})=>({height:12,width:12,objectFit:"contain",opacity:e?1:0,transform:`translateX(${e?0:-5}px)`,pointerEvents:e?"auto":"none",transition:"opacity 100ms ease, transform 100ms ease"}));var oe=forwardRef(({id:e,className:w,children:n,copyText:i,copyTrigger:o="hover",animationDirection:h="right",animationDuration:y=200,disableAnimation:S=false,disabled:v=false,unknownText:ie,fullWidth:a=false,containerStyles:se,sx:b,onClick:g,onMouseEnter:V,onMouseLeave:E,...N},F)=>{let $=zc(useId(),"sheet-view-chip"),{t:ne}=useTranslation(),k=useRef(null),re=useForkRef(k,F),M=useRef(),[P,c]=useState(false),[W,A]=useState(false),p=o==="always"||P,I=p&&!!i,l=h==="left",H=Math.max(0,y),T=K*1e3,ae=p?0:T;useEffect(()=>{if(o!=="press"||!P)return;let t=me=>{k.current?.contains(me.target)||c(false);};return document.addEventListener("pointerdown",t),()=>document.removeEventListener("pointerdown",t)},[o,P]),useEffect(()=>()=>clearTimeout(M.current),[]);let pe=useCallback(t=>{o==="press"&&c(true),g?.(t);},[o,g]),le=useCallback(t=>{o==="hover"&&i&&c(true),V?.(t);},[o,i,V]),de=useCallback(t=>{o==="hover"&&c(false),E?.(t);},[o,E]),he=useCallback(t=>{t.stopPropagation(),i&&(A(true),bb(i),clearTimeout(M.current),M.current=setTimeout(()=>A(false),J));},[i]),B=lc(r.chip,w);if(!n)return jsx(x,{...N,chipBgColor:Ro.bgColor,chipBorderColor:Ro.borderColor,chipTextColor:Ro.textColor,ref:F,id:e??$,"data-testid":"SheetViewChip",className:lc(r.root,B),disabled:v,disableAnimation:S,onClick:g,onMouseEnter:V,onMouseLeave:E,sx:kc(b??{},t=>({borderColor:t.palette.divider,width:a?"100%":"auto"})),children:ne(ie??"unknown")});let ce=S?"none":`z-index 0ms linear ${p?0:T+H}ms`,z={zIndex:p?3:0,transition:ce};return jsxs(Q,{ref:re,id:e??$,"data-testid":"SheetViewChip",className:r.root,style:{...z,...se,...a&&{width:"100%",minWidth:0,marginLeft:0}},children:[jsx(x,{...N,"aria-hidden":true,className:B,disabled:v,sx:kc(b??{},{visibility:"hidden",pointerEvents:"none",width:a?"100%":"fit-content"}),children:jsx(L,{children:n})}),jsx("div",{style:{position:"absolute",top:0,...z,width:a?"100%":"max-content",left:l?"auto":0,right:l?0:"auto"},children:jsxs(x,{...N,className:B,isSelected:p,disabled:v,disableAnimation:S,onClick:pe,onMouseEnter:le,onMouseLeave:de,sx:kc({width:a?"100%":"auto"},b),children:[jsx("div",{style:{display:"flex",gap:"4px",...a&&{maxWidth:"100%",width:"100%"},paddingRight:I&&!l?12:0,paddingLeft:I&&l?12:0,transition:`padding ${H}ms ease ${ae}ms`},children:jsx(L,{className:r.text,"data-is-arabic":typeof n=="string"&&_b(n),children:n})}),i&&jsx(U,{className:r.copyButton,sx:l?{left:"8px"}:{right:"8px"},children:jsx(Y,{isVisible:I,src:W?ta:ra,alt:W?"copied":"copy",onClick:he})})]})})]})});oe.displayName="SheetViewChip";var ye=memo(oe);export{r as a,ye as b};
@@ -1 +1 @@
1
- import {r,p as p$1}from'./chunk-GSRK5GJH.js';import {zc}from'./chunk-EGJV4FA6.js';import {useId,Fragment}from'react';import p from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var u=styled(p)(({rows:e,columns:t})=>({display:"grid",gridTemplateColumns:`auto repeat(${t}, 1fr)`,gridTemplateRows:`auto repeat(${e}, 1fr)`,gap:"6px"})),L=styled(p)(()=>({width:24,position:"sticky",top:0,left:0,zIndex:3})),g=styled(p)(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",fontSize:"10px",fontWeight:500,color:e.palette.grey[700],lineHeight:"100%",letterSpacing:"0",position:"sticky",top:0,zIndex:2,backgroundColor:"#fbfbfb"})),M=styled(p)(({theme:e,percentage:t=0})=>({width:"24px",height:"8px",borderRadius:"1px",backgroundColor:t===0?alpha(e.palette.grey[700],.1):alpha(e.palette.info.dark,t)})),O=styled(g)(()=>({fontSize:"9px",top:"auto",left:0,zIndex:1})),w=styled(p)(()=>({padding:"22px 12px",overflow:"auto",maxHeight:"480px"}));function x({xAxis:e,yAxis:t,series:n,isLoading:s,tooltip:l}){let c=zc(useId(),"heat-map"),d=e.labels,y=t.labels;return jsxs(w,{id:c,"data-testid":"HeatMap",children:[jsxs(u,{className:"x-labels",rows:1,columns:d.length,children:[jsx(L,{}),d.map((r,i)=>jsx(g,{children:e.render?e.render(r):r},`x-${i}-${r}`))]}),jsx(u,{className:"y-labels",rows:y.length,columns:d.length,children:y.map((r$1,i)=>jsxs(Fragment,{children:[jsx(O,{sx:{minWidth:"25px"},children:t.render?t.render(r$1):r$1},`y-${i}-${r$1}`),d.map((m,h)=>{if(s)return jsx(r,{variant:"rectangular",width:"24px",height:"8px"},`${m}-${h}`);let f=n?.[m]?.[r$1]??{};return jsx(p$1,{title:l?.render&&f?.value?l.render(f,m,r$1):null,children:jsx(M,{percentage:f?.colorOpacityDegree})},`${m}-${h}`)})]},`y-${i}-${r$1}`))})]})}var H=[.06,.1,.2,.3,.4,.5,.6,.7,.8,.9,1];function D(e,t,n){if(t===n)return 0;let s=n-t,l=(e-t)/s,c=Math.floor(l*10);return H[Math.max(0,Math.min(10,c))]}var j=x;export{D as a,j as b};
1
+ import {r,p as p$1}from'./chunk-KWNPF24A.js';import {zc}from'./chunk-VFRJFEIJ.js';import {useId,Fragment}from'react';import p from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var u=styled(p)(({rows:e,columns:t})=>({display:"grid",gridTemplateColumns:`auto repeat(${t}, 1fr)`,gridTemplateRows:`auto repeat(${e}, 1fr)`,gap:"6px"})),L=styled(p)(()=>({width:24,position:"sticky",top:0,left:0,zIndex:3})),g=styled(p)(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",fontSize:"10px",fontWeight:500,color:e.palette.grey[700],lineHeight:"100%",letterSpacing:"0",position:"sticky",top:0,zIndex:2,backgroundColor:"#fbfbfb"})),M=styled(p)(({theme:e,percentage:t=0})=>({width:"24px",height:"8px",borderRadius:"1px",backgroundColor:t===0?alpha(e.palette.grey[700],.1):alpha(e.palette.info.dark,t)})),O=styled(g)(()=>({fontSize:"9px",top:"auto",left:0,zIndex:1})),w=styled(p)(()=>({padding:"22px 12px",overflow:"auto",maxHeight:"480px"}));function x({xAxis:e,yAxis:t,series:n,isLoading:s,tooltip:l}){let c=zc(useId(),"heat-map"),d=e.labels,y=t.labels;return jsxs(w,{id:c,"data-testid":"HeatMap",children:[jsxs(u,{className:"x-labels",rows:1,columns:d.length,children:[jsx(L,{}),d.map((r,i)=>jsx(g,{children:e.render?e.render(r):r},`x-${i}-${r}`))]}),jsx(u,{className:"y-labels",rows:y.length,columns:d.length,children:y.map((r$1,i)=>jsxs(Fragment,{children:[jsx(O,{sx:{minWidth:"25px"},children:t.render?t.render(r$1):r$1},`y-${i}-${r$1}`),d.map((m,h)=>{if(s)return jsx(r,{variant:"rectangular",width:"24px",height:"8px"},`${m}-${h}`);let f=n?.[m]?.[r$1]??{};return jsx(p$1,{title:l?.render&&f?.value?l.render(f,m,r$1):null,children:jsx(M,{percentage:f?.colorOpacityDegree})},`${m}-${h}`)})]},`y-${i}-${r$1}`))})]})}var H=[.06,.1,.2,.3,.4,.5,.6,.7,.8,.9,1];function D(e,t,n){if(t===n)return 0;let s=n-t,l=(e-t)/s,c=Math.floor(l*10);return H[Math.max(0,Math.min(10,c))]}var j=x;export{D as a,j as b};
@@ -1 +1 @@
1
- import {zc}from'./chunk-EGJV4FA6.js';import {useId,useState,useRef,useMemo,useCallback,useEffect}from'react';import re from'@mui/material/Box';import {motion,AnimatePresence}from'framer-motion';import {styled}from'@mui/material/styles';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var v=3,h=24,B=styled("div")(()=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center"})),G=styled(motion.div)(()=>({position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center"})),O=styled("div")(()=>({position:"relative",display:"inline-block",width:0,height:24,pointerEvents:"none"})),j=styled(motion.div)(({theme:i})=>({border:`1px solid ${i.palette.divider}`,borderRadius:12,height:24,display:"flex",alignItems:"center",justifyContent:"center",background:i.palette.background.paper,fontSize:12,position:"absolute",top:0,left:0,boxSizing:"border-box",whiteSpace:"nowrap",lineHeight:1,transition:"width 180ms ease-out, padding 180ms ease-out"})),F=styled(motion.div)(({theme:i})=>({border:`1px solid ${i.palette.divider}`,borderRadius:12,height:24,minWidth:24,display:"inline-flex",alignItems:"center",justifyContent:"center",background:i.palette.background.paper,overflow:"hidden",position:"relative",boxSizing:"border-box",whiteSpace:"nowrap",fontSize:12,lineHeight:1})),U={position:"relative",overflow:"visible",zIndex:1,display:"flex",alignItems:"center",justifyContent:"center"};function q({icons:i}){let[s,I]=useState(false),[l,R]=useState([]),P=useRef(null),S=useRef(null),y=useRef([]),e=useRef(null),u=i??[],b=Math.max(0,(u.length??1)-1),T=u[b],o=u.slice(0,b),{peekItems:w,mainShiftX:m,guardLeft:A,guardWidth:H}=useMemo(()=>{let t=o.length,D=l.length===t&&l.every(n=>n>0),g=-6*t,p=D?l.reduce((n,a)=>n+a,0):t*h,x=Math.max(0,t-1)*v,d=Math.round(s?g+p+v*t:0),E=t-1,C=-6*(E+1),z=[];for(let n=0;n<t;n++){let a=t-1-n,Z=-6*(n+1),ee=D?l.slice(0,a).reduce((_,ne)=>_+ne,0)+v*a:(h+v)*a,te=Math.round(n===E?C:C+ee);z.push({key:`peek-${n}`,rIdx:n,origIdx:a,offX:Z,hoverX:te,zIndex:t-n,refCb:_=>{y.current[a]=_;},content:o[a]});}let V=C,Y=p+x;return {peekItems:z,mainShiftX:d,guardLeft:V,guardWidth:Y}},[o,l,s]),r=useCallback(()=>{e.current&&(clearTimeout(e.current),e.current=null);},[]),f=useCallback(()=>{let g=o.map((p,x)=>{let d=y.current[x];if(!d)return h;let E=d.scrollWidth||h,C=Math.max(h,E+12+2);return Math.ceil(C)});R(p=>p.length===g.length&&p.every((x,d)=>x===g[d])?p:g);},[o.length]),K=useCallback(()=>{r(),I(true);},[r]),Q=useCallback(()=>{r(),e.current=setTimeout(()=>I(false),120);},[r]);return useEffect(()=>()=>r(),[r]),useEffect(()=>{f();},[o.length]),useEffect(()=>{if(!s)return;let t=window.requestAnimationFrame(()=>{f();});return ()=>window.cancelAnimationFrame(t)},[s,f]),{isHovering:s,handleMouseEnter:K,handleRootMouseLeave:Q,rootRef:P,mainChipRef:S,peekItems:w,mainShiftX:m,mainIcon:T,guardLeft:A,guardWidth:H}}function J({icons:i=[],expandedZIndex:s=1e3,sx:I}){let l=zc(useId(),"left-peek-right-expanding-chip"),{handleMouseEnter:R,handleRootMouseLeave:P,rootRef:S,mainChipRef:y,isHovering:e,peekItems:u,mainShiftX:b,mainIcon:T}=q({icons:i});return jsx(re,{id:l,sx:{...U,...I},"data-testid":"LeftPeekRightExpandingChipBox",children:jsx(B,{ref:S,onMouseLeave:P,onMouseEnter:R,children:jsxs(G,{"data-testid":"Container",initial:false,children:[jsx(O,{"data-testid":"PeekStack",onMouseEnter:R,onMouseLeave:P,style:{pointerEvents:e?"auto":"none"},children:jsx(AnimatePresence,{initial:false,children:u.map(({key:o,rIdx:w,offX:m,hoverX:A,zIndex:H,refCb:r,content:f})=>jsx(j,{"data-testid":`LeftPeekChip-${w}`,ref:r,initial:{opacity:0,scale:.95,x:m,y:0},animate:{opacity:1,scale:1,x:e?A:m,y:0},exit:{opacity:0,scale:.95,x:m,y:0},transition:{duration:.18,ease:"easeOut"},style:{zIndex:H,width:e?"auto":24,minWidth:24,padding:e?"0 6px":0,whiteSpace:"nowrap",overflow:e?"visible":"hidden",pointerEvents:e?"auto":"none"},children:e&&jsx(Fragment,{children:f})},o))})}),jsx(F,{"data-testid":"MainChip",ref:y,style:{zIndex:s+10,padding:"0 6px"},initial:false,animate:{x:e?b:0},transition:{duration:.18,ease:"easeOut"},children:T})]})})})}export{J as a};
1
+ import {zc}from'./chunk-VFRJFEIJ.js';import {useId,useState,useRef,useMemo,useCallback,useEffect}from'react';import re from'@mui/material/Box';import {motion,AnimatePresence}from'framer-motion';import {styled}from'@mui/material/styles';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var v=3,h=24,B=styled("div")(()=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center"})),G=styled(motion.div)(()=>({position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center"})),O=styled("div")(()=>({position:"relative",display:"inline-block",width:0,height:24,pointerEvents:"none"})),j=styled(motion.div)(({theme:i})=>({border:`1px solid ${i.palette.divider}`,borderRadius:12,height:24,display:"flex",alignItems:"center",justifyContent:"center",background:i.palette.background.paper,fontSize:12,position:"absolute",top:0,left:0,boxSizing:"border-box",whiteSpace:"nowrap",lineHeight:1,transition:"width 180ms ease-out, padding 180ms ease-out"})),F=styled(motion.div)(({theme:i})=>({border:`1px solid ${i.palette.divider}`,borderRadius:12,height:24,minWidth:24,display:"inline-flex",alignItems:"center",justifyContent:"center",background:i.palette.background.paper,overflow:"hidden",position:"relative",boxSizing:"border-box",whiteSpace:"nowrap",fontSize:12,lineHeight:1})),U={position:"relative",overflow:"visible",zIndex:1,display:"flex",alignItems:"center",justifyContent:"center"};function q({icons:i}){let[s,I]=useState(false),[l,R]=useState([]),P=useRef(null),S=useRef(null),y=useRef([]),e=useRef(null),u=i??[],b=Math.max(0,(u.length??1)-1),T=u[b],o=u.slice(0,b),{peekItems:w,mainShiftX:m,guardLeft:A,guardWidth:H}=useMemo(()=>{let t=o.length,D=l.length===t&&l.every(n=>n>0),g=-6*t,p=D?l.reduce((n,a)=>n+a,0):t*h,x=Math.max(0,t-1)*v,d=Math.round(s?g+p+v*t:0),E=t-1,C=-6*(E+1),z=[];for(let n=0;n<t;n++){let a=t-1-n,Z=-6*(n+1),ee=D?l.slice(0,a).reduce((_,ne)=>_+ne,0)+v*a:(h+v)*a,te=Math.round(n===E?C:C+ee);z.push({key:`peek-${n}`,rIdx:n,origIdx:a,offX:Z,hoverX:te,zIndex:t-n,refCb:_=>{y.current[a]=_;},content:o[a]});}let V=C,Y=p+x;return {peekItems:z,mainShiftX:d,guardLeft:V,guardWidth:Y}},[o,l,s]),r=useCallback(()=>{e.current&&(clearTimeout(e.current),e.current=null);},[]),f=useCallback(()=>{let g=o.map((p,x)=>{let d=y.current[x];if(!d)return h;let E=d.scrollWidth||h,C=Math.max(h,E+12+2);return Math.ceil(C)});R(p=>p.length===g.length&&p.every((x,d)=>x===g[d])?p:g);},[o.length]),K=useCallback(()=>{r(),I(true);},[r]),Q=useCallback(()=>{r(),e.current=setTimeout(()=>I(false),120);},[r]);return useEffect(()=>()=>r(),[r]),useEffect(()=>{f();},[o.length]),useEffect(()=>{if(!s)return;let t=window.requestAnimationFrame(()=>{f();});return ()=>window.cancelAnimationFrame(t)},[s,f]),{isHovering:s,handleMouseEnter:K,handleRootMouseLeave:Q,rootRef:P,mainChipRef:S,peekItems:w,mainShiftX:m,mainIcon:T,guardLeft:A,guardWidth:H}}function J({icons:i=[],expandedZIndex:s=1e3,sx:I}){let l=zc(useId(),"left-peek-right-expanding-chip"),{handleMouseEnter:R,handleRootMouseLeave:P,rootRef:S,mainChipRef:y,isHovering:e,peekItems:u,mainShiftX:b,mainIcon:T}=q({icons:i});return jsx(re,{id:l,sx:{...U,...I},"data-testid":"LeftPeekRightExpandingChipBox",children:jsx(B,{ref:S,onMouseLeave:P,onMouseEnter:R,children:jsxs(G,{"data-testid":"Container",initial:false,children:[jsx(O,{"data-testid":"PeekStack",onMouseEnter:R,onMouseLeave:P,style:{pointerEvents:e?"auto":"none"},children:jsx(AnimatePresence,{initial:false,children:u.map(({key:o,rIdx:w,offX:m,hoverX:A,zIndex:H,refCb:r,content:f})=>jsx(j,{"data-testid":`LeftPeekChip-${w}`,ref:r,initial:{opacity:0,scale:.95,x:m,y:0},animate:{opacity:1,scale:1,x:e?A:m,y:0},exit:{opacity:0,scale:.95,x:m,y:0},transition:{duration:.18,ease:"easeOut"},style:{zIndex:H,width:e?"auto":24,minWidth:24,padding:e?"0 6px":0,whiteSpace:"nowrap",overflow:e?"visible":"hidden",pointerEvents:e?"auto":"none"},children:e&&jsx(Fragment,{children:f})},o))})}),jsx(F,{"data-testid":"MainChip",ref:y,style:{zIndex:s+10,padding:"0 6px"},initial:false,animate:{x:e?b:0},transition:{duration:.18,ease:"easeOut"},children:T})]})})})}export{J as a};
@@ -1,2 +1,2 @@
1
- import {lc}from'./chunk-EGJV4FA6.js';import {forwardRef,memo}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {styled}from'@mui/material/styles';var o="os-shared-MaskedText",t={root:`${o}-root`,start:`${o}-start`,mask:`${o}-mask`,end:`${o}-end`};var p=()=>jsxs("svg",{width:"16",height:"8",viewBox:"0 0 16 8",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,children:[jsx("circle",{cx:"3",cy:"4",r:"1.5",fill:"currentColor"}),jsx("circle",{cx:"8",cy:"4",r:"1.5",fill:"currentColor"}),jsx("circle",{cx:"13",cy:"4",r:"1.5",fill:"currentColor"})]});var k=styled("span")(({theme:e})=>({display:"inline-flex",alignItems:"center",gap:e.v2.spacing(2),minWidth:0,color:"inherit",font:"inherit",lineHeight:1,whiteSpace:"nowrap"})),m=styled("span")({minWidth:0}),c=styled("span")({display:"inline-flex",alignItems:"center",flexShrink:0,lineHeight:0,"& svg":{display:"block",width:16,height:8}});function M(e,d,n){let s=Math.max(0,d),a=Math.max(0,n);return !e||s+a>=e.length?{start:e,end:"",isMasked:false}:{start:e.slice(0,s),end:e.slice(e.length-a),isMasked:true}}var T=forwardRef(({className:e,sx:d,text:n,startLength:s=8,endLength:a=4,separator:y,id:h,...g},S)=>{let{start:C,end:N,isMasked:u}=M(n,s,a);return jsxs(k,{ref:S,id:h??"MaskedText",className:lc(t.root,e),sx:d,"data-testid":"MaskedText",...g,children:[jsx(m,{className:t.start,children:C}),u&&jsxs(Fragment,{children:[jsx(c,{className:t.mask,children:y??jsx(p,{})}),jsx(m,{className:t.end,children:N})]})]})});T.displayName="MaskedText";var P=memo(T);
1
+ import {lc}from'./chunk-VFRJFEIJ.js';import {forwardRef,memo}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {styled}from'@mui/material/styles';var o="os-shared-MaskedText",t={root:`${o}-root`,start:`${o}-start`,mask:`${o}-mask`,end:`${o}-end`};var p=()=>jsxs("svg",{width:"16",height:"8",viewBox:"0 0 16 8",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,children:[jsx("circle",{cx:"3",cy:"4",r:"1.5",fill:"currentColor"}),jsx("circle",{cx:"8",cy:"4",r:"1.5",fill:"currentColor"}),jsx("circle",{cx:"13",cy:"4",r:"1.5",fill:"currentColor"})]});var k=styled("span")(({theme:e})=>({display:"inline-flex",alignItems:"center",gap:e.v2.spacing(2),minWidth:0,color:"inherit",font:"inherit",lineHeight:1,whiteSpace:"nowrap"})),m=styled("span")({minWidth:0}),c=styled("span")({display:"inline-flex",alignItems:"center",flexShrink:0,lineHeight:0,"& svg":{display:"block",width:16,height:8}});function M(e,d,n){let s=Math.max(0,d),a=Math.max(0,n);return !e||s+a>=e.length?{start:e,end:"",isMasked:false}:{start:e.slice(0,s),end:e.slice(e.length-a),isMasked:true}}var T=forwardRef(({className:e,sx:d,text:n,startLength:s=8,endLength:a=4,separator:y,id:h,...g},S)=>{let{start:C,end:N,isMasked:u}=M(n,s,a);return jsxs(k,{ref:S,id:h??"MaskedText",className:lc(t.root,e),sx:d,"data-testid":"MaskedText",...g,children:[jsx(m,{className:t.start,children:C}),u&&jsxs(Fragment,{children:[jsx(c,{className:t.mask,children:y??jsx(p,{})}),jsx(m,{className:t.end,children:N})]})]})});T.displayName="MaskedText";var P=memo(T);
2
2
  export{t as a,P as b};
@@ -1 +1 @@
1
- import {j}from'./chunk-GSRK5GJH.js';import {g as g$1}from'./chunk-EGJV4FA6.js';import F from'react';import {useTranslation}from'react-i18next';import a from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var T="37px",f=styled(a,{shouldForwardProp:o=>o!=="showBackDrop"&&o!=="areTotalRowsNotFillingHeight"&&o!=="sandboxMode"&&o!=="maximized"})(({theme:o,showBackDrop:i,areTotalRowsNotFillingHeight:r,sandboxMode:p,maximized:n})=>({minHeight:T,...!n&&{borderBottomLeftRadius:o.spacing(1.5),borderBottomRightRadius:o.spacing(1.5)},display:"flex",alignItems:"center",border:"none",justifyContent:"space-between",padding:"6px 32px",background:p?o.palette.common.lightOrange:o.palette.grey[300],backdropFilter:"blur(32px)",boxShadow:i?o.shadows[24]:"none",borderTop:r?`1px outset ${o.palette.grey[800]}`:"none",width:"100%",marginTop:"auto",flexShrink:0,cursor:"move"})),u=styled("div")(({theme:o})=>({position:"absolute",top:0,left:0,right:0,height:"1.5px",backgroundColor:o.palette.grey[300],boxShadow:`inset 0 1px 0 0 ${o.palette.grey[300]}`})),d=styled(a)(({theme:o})=>({borderRadius:"37.5px",border:"0.75px solid rgba(242, 242, 242, 0.70)",backgroundColor:o.palette.common.white,opacity:1,paddingInline:o.spacing(1),display:"flex",alignItems:"center",height:24,gap:"7px",maxWidth:"max-content"})),x=styled(j)(()=>({fontSize:"9px",fontWeight:400,lineHeight:"10.8px"})),g=styled(j)(()=>({fontSize:"10.5px",fontWeight:700,lineHeight:"12.6px"}));styled(a)(()=>({display:"flex",gap:"3px",alignItems:"center"}));styled(a)(()=>({display:"flex",gap:"6px"}));styled("span")(()=>({fontWeight:400}));function R({totalCount:o,showBackDrop:i=false,showSeparator:r,sandboxMode:p,maximized:n,selectedCount:m,...y}){let{t:b}=useTranslation();return jsxs(f,{component:"footer","data-testid":"TableFooter",maximized:n??false,sandboxMode:p,showBackDrop:i,areTotalRowsNotFillingHeight:!!r,...y,children:[r&&jsx(u,{}),m?jsxs(d,{sx:{gap:"6px",cursor:"text"},children:[jsx(x,{children:b("selected")}),jsx(g,{children:g$1(m)})]}):null,o||o===0?jsxs(d,{sx:{gap:"6px",cursor:"text"},children:[jsx(x,{children:b("count")}),jsx(g,{children:g$1(o||0)})]}):null]})}var h=F.memo(R);var M=h;export{T as a,h as b,M as c};
1
+ import {j}from'./chunk-KWNPF24A.js';import {g as g$1}from'./chunk-VFRJFEIJ.js';import F from'react';import {useTranslation}from'react-i18next';import a from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var T="37px",f=styled(a,{shouldForwardProp:o=>o!=="showBackDrop"&&o!=="areTotalRowsNotFillingHeight"&&o!=="sandboxMode"&&o!=="maximized"})(({theme:o,showBackDrop:i,areTotalRowsNotFillingHeight:r,sandboxMode:p,maximized:n})=>({minHeight:T,...!n&&{borderBottomLeftRadius:o.spacing(1.5),borderBottomRightRadius:o.spacing(1.5)},display:"flex",alignItems:"center",border:"none",justifyContent:"space-between",padding:"6px 32px",background:p?o.palette.common.lightOrange:o.palette.grey[300],backdropFilter:"blur(32px)",boxShadow:i?o.shadows[24]:"none",borderTop:r?`1px outset ${o.palette.grey[800]}`:"none",width:"100%",marginTop:"auto",flexShrink:0,cursor:"move"})),u=styled("div")(({theme:o})=>({position:"absolute",top:0,left:0,right:0,height:"1.5px",backgroundColor:o.palette.grey[300],boxShadow:`inset 0 1px 0 0 ${o.palette.grey[300]}`})),d=styled(a)(({theme:o})=>({borderRadius:"37.5px",border:"0.75px solid rgba(242, 242, 242, 0.70)",backgroundColor:o.palette.common.white,opacity:1,paddingInline:o.spacing(1),display:"flex",alignItems:"center",height:24,gap:"7px",maxWidth:"max-content"})),x=styled(j)(()=>({fontSize:"9px",fontWeight:400,lineHeight:"10.8px"})),g=styled(j)(()=>({fontSize:"10.5px",fontWeight:700,lineHeight:"12.6px"}));styled(a)(()=>({display:"flex",gap:"3px",alignItems:"center"}));styled(a)(()=>({display:"flex",gap:"6px"}));styled("span")(()=>({fontWeight:400}));function R({totalCount:o,showBackDrop:i=false,showSeparator:r,sandboxMode:p,maximized:n,selectedCount:m,...y}){let{t:b}=useTranslation();return jsxs(f,{component:"footer","data-testid":"TableFooter",maximized:n??false,sandboxMode:p,showBackDrop:i,areTotalRowsNotFillingHeight:!!r,...y,children:[r&&jsx(u,{}),m?jsxs(d,{sx:{gap:"6px",cursor:"text"},children:[jsx(x,{children:b("selected")}),jsx(g,{children:g$1(m)})]}):null,o||o===0?jsxs(d,{sx:{gap:"6px",cursor:"text"},children:[jsx(x,{children:b("count")}),jsx(g,{children:g$1(o||0)})]}):null]})}var h=F.memo(R);var M=h;export{T as a,h as b,M as c};
@@ -1 +1 @@
1
- import {zc}from'./chunk-EGJV4FA6.js';import {oi,pi}from'./chunk-M5HS3EYQ.js';import {styled,Box}from'@mui/material';import I,{useId,useMemo}from'react';import {jsx,jsxs}from'react/jsx-runtime';var c=styled(Box)(({theme:e})=>({height:"32px",borderRadius:"4px",backgroundColor:e.palette.action.hover,padding:"2px",display:"flex",alignItems:"center",position:"relative",cursor:"pointer",zIndex:1})),u=styled(Box,{shouldForwardProp:e=>e!=="isActive"})(({isActive:e})=>({flex:1,display:"flex",justifyContent:"center",alignItems:"center",position:"relative",zIndex:2,opacity:e?1:.5})),x=styled(Box,{shouldForwardProp:e=>e!=="activeIndex"})(({theme:e,activeIndex:o})=>({position:"absolute",top:2,left:o*30+2,transition:"all 0.25s ease-in-out",width:"28px",height:"28px",backgroundColor:e.palette.common.white,borderRadius:"2px",boxShadow:"0px 0px 4px 0px rgba(0, 0, 0, 0.20)"}));var m=(t=>(t.LIST="LIST",t.CARDS="CARDS",t.MAP="MAP",t))(m||{});var y=e=>{let o=I.Children.count(e.children)-1;return jsx(c,{...e,sx:{width:o*30+2}})},w=y;var T=[{icon:jsx("img",{src:oi,alt:"card"}),value:"CARDS"},{icon:jsx("img",{src:pi,alt:"LIST"}),value:"LIST"}],S=e=>{let{currentView:o,onToggleClick:s,getOverrideViews:t}=e,v=zc(useId(),"toggle-view"),l=useMemo(()=>t?t(T):T,[t]),h=useMemo(()=>l.findIndex(r=>r.value===o),[l,o]);return s?jsxs(w,{id:v,"data-testid":"ToggleView",children:[l.map(r=>jsx(u,{onClick:()=>s(r.value),sx:{height:"11.6px",width:"11.6px"},isActive:o===r.value,children:r.icon},r.value)),jsx(x,{activeIndex:h})]}):null},f=S;var $=f;export{m as a,$ as b};
1
+ import {zc}from'./chunk-VFRJFEIJ.js';import {oi,pi}from'./chunk-M5HS3EYQ.js';import {styled,Box}from'@mui/material';import I,{useId,useMemo}from'react';import {jsx,jsxs}from'react/jsx-runtime';var c=styled(Box)(({theme:e})=>({height:"32px",borderRadius:"4px",backgroundColor:e.palette.action.hover,padding:"2px",display:"flex",alignItems:"center",position:"relative",cursor:"pointer",zIndex:1})),u=styled(Box,{shouldForwardProp:e=>e!=="isActive"})(({isActive:e})=>({flex:1,display:"flex",justifyContent:"center",alignItems:"center",position:"relative",zIndex:2,opacity:e?1:.5})),x=styled(Box,{shouldForwardProp:e=>e!=="activeIndex"})(({theme:e,activeIndex:o})=>({position:"absolute",top:2,left:o*30+2,transition:"all 0.25s ease-in-out",width:"28px",height:"28px",backgroundColor:e.palette.common.white,borderRadius:"2px",boxShadow:"0px 0px 4px 0px rgba(0, 0, 0, 0.20)"}));var m=(t=>(t.LIST="LIST",t.CARDS="CARDS",t.MAP="MAP",t))(m||{});var y=e=>{let o=I.Children.count(e.children)-1;return jsx(c,{...e,sx:{width:o*30+2}})},w=y;var T=[{icon:jsx("img",{src:oi,alt:"card"}),value:"CARDS"},{icon:jsx("img",{src:pi,alt:"LIST"}),value:"LIST"}],S=e=>{let{currentView:o,onToggleClick:s,getOverrideViews:t}=e,v=zc(useId(),"toggle-view"),l=useMemo(()=>t?t(T):T,[t]),h=useMemo(()=>l.findIndex(r=>r.value===o),[l,o]);return s?jsxs(w,{id:v,"data-testid":"ToggleView",children:[l.map(r=>jsx(u,{onClick:()=>s(r.value),sx:{height:"11.6px",width:"11.6px"},isActive:o===r.value,children:r.icon},r.value)),jsx(x,{activeIndex:h})]}):null},f=S;var $=f;export{m as a,$ as b};
@@ -1 +1 @@
1
- import {Cc}from'./chunk-EGJV4FA6.js';import {styled,Box,Typography,alpha}from'@mui/material';import {jsx,jsxs}from'react/jsx-runtime';var s=styled(Box)({display:"flex",flexDirection:"column"}),f=styled(Box)({display:"flex",position:"relative",paddingBottom:4,"&:last-child":{paddingBottom:0}}),g=styled(Box)({display:"flex",flexDirection:"column",alignItems:"center",marginInlineEnd:12,position:"relative"}),x=styled(Box,{shouldForwardProp:e=>e!=="colorVariant"})(({theme:e,colorVariant:i="default"})=>({width:12,height:12,borderRadius:"50%",backgroundColor:i==="error"?"#CC0000":i==="pending"?e.palette.grey[100]:e.palette.info.dark,flexShrink:0,marginTop:4})),u=styled(Box,{shouldForwardProp:e=>e!=="isNextPending"})(({theme:e,isNextPending:i})=>({width:3,height:34,backgroundColor:i?e.palette.grey[100]:e.palette.info.dark,marginBlock:4,borderRadius:2})),y=styled(Box)({display:"flex",flexDirection:"column",gap:2,flex:1}),I=styled(Typography,{shouldForwardProp:e=>e!=="colorVariant"})(({theme:e,colorVariant:i="default"})=>({fontSize:12,fontWeight:700,lineHeight:"19px",...i==="error"&&{color:"#CC0000"},...i==="pending"&&{color:alpha(e.palette.text.primary,.3)}})),h=styled(Typography)(({theme:e})=>({fontSize:11,fontWeight:500,color:alpha(e.palette.text.primary,.5)})),C=styled(Box)({display:"flex",alignItems:"center",justifyContent:"center",marginInlineStart:"auto",alignSelf:"center"});function V({steps:e,className:i}){let b=Cc("timeline-item");return jsx(s,{className:i,children:e.map((t,l)=>{let m=l===e.length-1,p=t.variant??"default",S=m?"default":e[l+1].variant??"default",P=t.id??`${t.title}-${t.subtitle??""}`;return jsxs(f,{children:[jsxs(g,{children:[jsx(x,{colorVariant:p}),!m&&jsx(u,{isNextPending:S==="pending"})]}),jsxs(y,{children:[jsx(I,{colorVariant:p,children:t.title}),t.subtitle&&jsx(h,{children:t.subtitle})]}),t.endAdornment&&jsx(C,{children:t.endAdornment})]},b(P,l))})})}var k=V;export{k as a};
1
+ import {Cc}from'./chunk-VFRJFEIJ.js';import {styled,Box,Typography,alpha}from'@mui/material';import {jsx,jsxs}from'react/jsx-runtime';var s=styled(Box)({display:"flex",flexDirection:"column"}),f=styled(Box)({display:"flex",position:"relative",paddingBottom:4,"&:last-child":{paddingBottom:0}}),g=styled(Box)({display:"flex",flexDirection:"column",alignItems:"center",marginInlineEnd:12,position:"relative"}),x=styled(Box,{shouldForwardProp:e=>e!=="colorVariant"})(({theme:e,colorVariant:i="default"})=>({width:12,height:12,borderRadius:"50%",backgroundColor:i==="error"?"#CC0000":i==="pending"?e.palette.grey[100]:e.palette.info.dark,flexShrink:0,marginTop:4})),u=styled(Box,{shouldForwardProp:e=>e!=="isNextPending"})(({theme:e,isNextPending:i})=>({width:3,height:34,backgroundColor:i?e.palette.grey[100]:e.palette.info.dark,marginBlock:4,borderRadius:2})),y=styled(Box)({display:"flex",flexDirection:"column",gap:2,flex:1}),I=styled(Typography,{shouldForwardProp:e=>e!=="colorVariant"})(({theme:e,colorVariant:i="default"})=>({fontSize:12,fontWeight:700,lineHeight:"19px",...i==="error"&&{color:"#CC0000"},...i==="pending"&&{color:alpha(e.palette.text.primary,.3)}})),h=styled(Typography)(({theme:e})=>({fontSize:11,fontWeight:500,color:alpha(e.palette.text.primary,.5)})),C=styled(Box)({display:"flex",alignItems:"center",justifyContent:"center",marginInlineStart:"auto",alignSelf:"center"});function V({steps:e,className:i}){let b=Cc("timeline-item");return jsx(s,{className:i,children:e.map((t,l)=>{let m=l===e.length-1,p=t.variant??"default",S=m?"default":e[l+1].variant??"default",P=t.id??`${t.title}-${t.subtitle??""}`;return jsxs(f,{children:[jsxs(g,{children:[jsx(x,{colorVariant:p}),!m&&jsx(u,{isNextPending:S==="pending"})]}),jsxs(y,{children:[jsx(I,{colorVariant:p,children:t.title}),t.subtitle&&jsx(h,{children:t.subtitle})]}),t.endAdornment&&jsx(C,{children:t.endAdornment})]},b(P,l))})})}var k=V;export{k as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-HDCNWBW5.js';import {d,R as R$1,L,V}from'./chunk-GSRK5GJH.js';import {Cc,lc}from'./chunk-EGJV4FA6.js';import {Eb,A as A$1,Pc,vb}from'./chunk-M5HS3EYQ.js';import {forwardRef,useState,useMemo,memo,useRef,useLayoutEffect}from'react';import Je from'@mui/material/ClickAwayListener';import {CircularProgress}from'@mui/material';import h from'@mui/material/Box';import ee from'@mui/material/Typography';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var y="os-shared-NestedMultiSelect",c={root:`${y}-root`,open:`${y}-open`,label:`${y}-label`,placeholder:`${y}-placeholder`,arrow:`${y}-arrow`,menu:`${y}-menu`,search:`${y}-search`,selectedBadge:`${y}-selectedBadge`,fieldRow:`${y}-fieldRow`};var te=e=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:e,fontSize:"10px",fontWeight:500,cursor:"pointer"}),le=styled(h,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:t=false})=>{let{base:l}=e.v2.palette;return {width:"100%",boxSizing:"border-box",minHeight:47,textAlign:"left",flexDirection:"column",border:`1px solid ${t?"#FAFBFB":"transparent"}`,borderRadius:"4px",backgroundColor:t?"#FAFBFB":e.palette.grey[400],minWidth:"89px",position:"relative",cursor:t?"not-allowed":"pointer",...t&&{color:alpha(l.black,.6),[`& .${c.label}`]:{opacity:.7,cursor:"not-allowed"},[`& .${c.placeholder}`]:{color:alpha(l.black,.6)},[`& .${c.arrow}`]:{opacity:.6},[`& .${c.fieldRow}`]:{opacity:.7},[`& .${c.fieldRow} *`]:{cursor:"not-allowed"}},[`&.${c.open} .${c.arrow}`]:{transform:"rotate(180deg)"}}}),oe=styled(ee)(({theme:e})=>({position:"absolute",top:9,left:8,margin:0,cursor:"pointer",fontSize:"10px",fontWeight:500,lineHeight:"100%",color:e.palette.grey[700],display:"block",pointerEvents:"none"})),ne=styled(ee)(()=>({margin:0,fontWeight:500,fontSize:"11px",lineHeight:"18px",padding:"22px 24px 8px 8px"})),ie=styled(h)(({theme:e})=>({position:"absolute",top:15,right:4,width:16,height:16,display:"inline-flex",alignItems:"center",justifyContent:"center",color:"inherit",lineHeight:0,transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter})})),re=styled(h)(()=>({display:"flex",flexDirection:"column",padding:"8px"})),se=styled(h)(()=>({display:"flex",columnGap:"8px",rowGap:"8px",flexWrap:"wrap",paddingInlineEnd:"20px"})),ae=styled(h)(({theme:e})=>({...te(`${e.palette.info.dark}1a`),maxWidth:"150px"})),ce=styled("span")(()=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"})),de=styled(h)(()=>({position:"relative",width:"100%",minWidth:0})),ue=styled(h)(()=>({display:"flex",flexWrap:"nowrap",alignItems:"center",gap:"4px",width:"100%",minWidth:0,overflow:"hidden",padding:"22px 24px 8px 8px"})),A=styled(h,{shouldForwardProp:e=>e!=="$truncate"})(({theme:e,$truncate:t})=>({...te(`${e.palette.info.dark}1a`),overflow:"hidden",cursor:"inherit",flex:t?"1 1 auto":"0 0 auto",width:"max-content",maxWidth:t?"100%":"none",minWidth:t?0:"auto"})),pe=styled("span")(()=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0})),Se=styled("span")(()=>({position:"fixed",left:0,top:0,visibility:"hidden",pointerEvents:"none",whiteSpace:"nowrap",width:"max-content",display:"inline-flex",padding:"4px 8px 4px 6px",fontSize:"10px",fontWeight:500})),me=styled(h)(()=>({flex:1,maxWidth:"220px",minWidth:"89px"})),fe=styled(h,{shouldForwardProp:e=>e!=="$maxWidth"})(({$maxWidth:e})=>({display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",maxWidth:e,minWidth:"89px"}));function Me(e,t,l){let i=4*Math.max(e.length-1,0);if(e.reduce((s,a)=>s+a,0)+i<=t)return {count:e.length,truncateLast:false};let r=0,n=0;for(let s=0;s<e.length;s+=1){let a=n>0?4:0,m=s===e.length-1?0:4+l;if(r+a+e[s]+m<=t){r+=a+e[s],n+=1;continue}let S=t-r-a-m;if(n===0||S>=48)return {count:n+1,truncateLast:true};break}return {count:Math.max(n,1),truncateLast:false}}function Ne(e,t,l,i){let o=e.length;if(o===0)return {count:0,truncateLast:false};let r=4*Math.max(o-1,0),s=e.reduce((a,x)=>a+x,0)+r+(i?4+l:0);return {count:o,truncateLast:s>t}}var E=e=>!e.options&&typeof e.value=="string",I=e=>e.value??e.label,R=(e,t)=>t?.some(l=>l.value===e.value)??false,he=(e,t,l)=>{if(R(e,t)){l(t?.filter(i=>i.value!==e.value)||[]);return}l([...t||[],e]);},$=e=>E(e)?[e]:(e.options??[]).flatMap($),D=(e,t)=>{let l=e.filter(i=>R(i,t)).length;return {allSelected:e.length>0&&l===e.length,someSelected:l>0&&l<e.length}},ye=(e,t,l)=>{let i=new Set(e.map(n=>n.value));if(D(e,t).allSelected){l((t??[]).filter(n=>!i.has(n.value)));return}let o=new Set((t??[]).map(n=>n.value)),r=e.filter(n=>!o.has(n.value));l([...t??[],...r]);},De=(e,t)=>{let l=e[t];return typeof l=="string"?l:""},He=(e,t,l)=>l.some(i=>De(e,i).toLowerCase().includes(t)),H=(e,t,l)=>{if(!t)return e;let i=t.toLowerCase();return e.reduce((o,r)=>{if(E(r))return He(r,i,l)&&o.push(r),o;let n=H(r.options??[],t,l);return n.length>0&&o.push({...r,options:n}),o},[])};function Ge({options:e,maxVisibleSelected:t}){let l=useRef(null),i=useRef(null),o=typeof t=="number"&&Number.isFinite(t),r=o?Math.max(0,Math.floor(t)):e.length,[n,s]=useState({count:Math.min(r,e.length),truncateLast:false});useLayoutEffect(()=>{let f=l.current,S=i.current;if(!f||!S)return;let g=()=>{let C=e.slice(0,r).map(N=>(S.textContent=N.label,S.offsetWidth));S.textContent=`+${e.length}`;let v=S.offsetWidth,b=getComputedStyle(f),M=f.clientWidth-parseFloat(b.paddingLeft)-parseFloat(b.paddingRight),w=o?Ne(C,M,v,e.length>C.length):Me(C,M,v);s(N=>N.count===w.count&&N.truncateLast===w.truncateLast?N:w);};g();let L=new ResizeObserver(g);return L.observe(f),()=>L.disconnect()},[r,o,e]);let a=e.slice(0,n.count),x=e.length-n.count,m=Cc("field-badge");return jsxs(de,{children:[jsx(Se,{ref:i,"aria-hidden":true}),jsxs(ue,{ref:l,className:c.fieldRow,children:[a.map((f,S)=>{let g=n.truncateLast&&S===a.length-1;return jsx(A,{$truncate:g,children:jsx(pe,{children:f.label})},m(f.value,S))}),x>0?jsx(A,{children:jsxs("span",{children:["+",x]})}):null]})]})}var ge=Ge;function Le({label:e,maxWidth:t,itemCount:l,isSelected:i,isIndeterminate:o,onToggle:r,children:n}){let[s,a]=useState(null);return jsxs(V,{isSelected:i,isIndeterminate:o,onClick:m=>{m.stopPropagation(),m.preventDefault(),r();},onMouseEnter:m=>{l>0&&a(m.currentTarget);},onMouseLeave:()=>{s&&a(null);},children:[jsxs(fe,{$maxWidth:t,children:[e,jsx("img",{src:vb,className:"arrow-icon",alt:"arrow"})]}),jsx(R$1,{sx:{maxHeight:"450px",overflow:"auto"},open:!!s,anchorEl:s,placement:"right-start",children:n})]})}function ve({option:e,value:t,onChange:l}){let i=o=>{o.stopPropagation(),o.preventDefault(),he(e,t,l);};return jsx(V,{isSelected:R(e,t),onClick:i,children:jsx(me,{children:e.label})})}var Ke=340,Ue=220;function G({node:e,depth:t,value:l,onChange:i}){if(E(e))return jsx(ve,{option:e,value:l,onChange:i});if(!e.options)return null;let o=e.options,r=$(e),{allSelected:n,someSelected:s}=D(r,l);return jsx(Le,{label:e.label,maxWidth:t===0?Ke:Ue,itemCount:o.length,isSelected:n,isIndeterminate:s,onToggle:()=>ye(r,l,i),children:o.map(a=>jsx(G,{node:a,depth:t+1,value:l,onChange:i},I(a)))})}var Ze=["label"],Be=forwardRef(({options:e,onChange:t,value:l,maxVisibleSelected:i,placeholder:o,label:r,isLoading:n,searchBy:s=Ze,disabled:a$1,className:x,sx:m,searchable:f=true,searchPlaceholder:S,onOpen:g,onClose:L$1},C)=>{let[v,b]=useState(null),[M,w]=useState(""),N=!!v,Fe=r??o,Oe=r?o??"Please Select":"Please Select",We=d=>{if(N){b(null),L$1?.();return}b(d.currentTarget),g?.();},Ee=()=>{b(null),L$1?.();},Ie=()=>{M&&w("");},Re=useMemo(()=>H(e,M,s),[e,M,s]),K=l?.length??0,Te=Cc("selected-badge"),ke=n?jsx(CircularProgress,{size:16}):jsx(d,{src:M?Eb:A$1,alt:M?"close":"search",onClick:Ie,sx:{width:12,height:12,cursor:M?"pointer":"default"}});return jsx(Je,{onClickAway:()=>{N&&Ee();},children:jsxs(le,{ref:C,id:"FieldWrapper","data-testid":"NestedMultiSelect",$disabled:a$1,"aria-disabled":a$1||void 0,className:lc(c.root,N&&c.open,x),sx:m,onClick:d=>!a$1&&We(d),children:[jsx(oe,{className:c.label,component:"label",children:Fe}),K===0&&jsx(ne,{className:c.placeholder,component:"p",children:Oe}),jsx(ie,{className:c.arrow,"aria-hidden":true,children:jsx(a,{})}),K>0&&l?jsx(ge,{options:l,maxVisibleSelected:i}):null,jsx(R$1,{open:N,anchorEl:v,sx:{margin:"8px 0",maxHeight:330,overflow:"auto",maxWidth:"340px"},panelProps:{className:c.menu},children:jsxs(re,{children:[f?jsx(L,{className:c.search,fullWidth:true,size:"md",placeholder:S??o??"Select",endAdornment:ke,value:M,onClick:d=>{d.stopPropagation();},onMouseDown:d=>{d.stopPropagation();},onChange:d=>{w(d.target.value);},sx:{mb:"4px"}}):null,jsx(se,{children:l?.map((d$1,Ae)=>jsxs(ae,{className:c.selectedBadge,onClick:U=>{U.stopPropagation(),U.preventDefault(),t(l?.filter($e=>$e.value!==d$1.value)||[]);},children:[jsx(d,{src:Pc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx(ce,{children:d$1.label}),jsx(d,{src:Eb,alt:"close",sx:{width:9,height:9}})]},Te(d$1.value,Ae)))}),Re.map(d=>jsx(G,{node:d,depth:0,value:l,onChange:t},I(d)))]})})]})})});Be.displayName="NestedMultiSelect";var je=memo(Be);export{c as a,je as b};
1
+ import {a}from'./chunk-HDCNWBW5.js';import {d,R as R$1,L,V}from'./chunk-KWNPF24A.js';import {Cc,lc}from'./chunk-VFRJFEIJ.js';import {Eb,A as A$1,Pc,vb}from'./chunk-M5HS3EYQ.js';import {forwardRef,useState,useMemo,memo,useRef,useLayoutEffect}from'react';import Je from'@mui/material/ClickAwayListener';import {CircularProgress}from'@mui/material';import h from'@mui/material/Box';import ee from'@mui/material/Typography';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var y="os-shared-NestedMultiSelect",c={root:`${y}-root`,open:`${y}-open`,label:`${y}-label`,placeholder:`${y}-placeholder`,arrow:`${y}-arrow`,menu:`${y}-menu`,search:`${y}-search`,selectedBadge:`${y}-selectedBadge`,fieldRow:`${y}-fieldRow`};var te=e=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:e,fontSize:"10px",fontWeight:500,cursor:"pointer"}),le=styled(h,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:t=false})=>{let{base:l}=e.v2.palette;return {width:"100%",boxSizing:"border-box",minHeight:47,textAlign:"left",flexDirection:"column",border:`1px solid ${t?"#FAFBFB":"transparent"}`,borderRadius:"4px",backgroundColor:t?"#FAFBFB":e.palette.grey[400],minWidth:"89px",position:"relative",cursor:t?"not-allowed":"pointer",...t&&{color:alpha(l.black,.6),[`& .${c.label}`]:{opacity:.7,cursor:"not-allowed"},[`& .${c.placeholder}`]:{color:alpha(l.black,.6)},[`& .${c.arrow}`]:{opacity:.6},[`& .${c.fieldRow}`]:{opacity:.7},[`& .${c.fieldRow} *`]:{cursor:"not-allowed"}},[`&.${c.open} .${c.arrow}`]:{transform:"rotate(180deg)"}}}),oe=styled(ee)(({theme:e})=>({position:"absolute",top:9,left:8,margin:0,cursor:"pointer",fontSize:"10px",fontWeight:500,lineHeight:"100%",color:e.palette.grey[700],display:"block",pointerEvents:"none"})),ne=styled(ee)(()=>({margin:0,fontWeight:500,fontSize:"11px",lineHeight:"18px",padding:"22px 24px 8px 8px"})),ie=styled(h)(({theme:e})=>({position:"absolute",top:15,right:4,width:16,height:16,display:"inline-flex",alignItems:"center",justifyContent:"center",color:"inherit",lineHeight:0,transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter})})),re=styled(h)(()=>({display:"flex",flexDirection:"column",padding:"8px"})),se=styled(h)(()=>({display:"flex",columnGap:"8px",rowGap:"8px",flexWrap:"wrap",paddingInlineEnd:"20px"})),ae=styled(h)(({theme:e})=>({...te(`${e.palette.info.dark}1a`),maxWidth:"150px"})),ce=styled("span")(()=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"})),de=styled(h)(()=>({position:"relative",width:"100%",minWidth:0})),ue=styled(h)(()=>({display:"flex",flexWrap:"nowrap",alignItems:"center",gap:"4px",width:"100%",minWidth:0,overflow:"hidden",padding:"22px 24px 8px 8px"})),A=styled(h,{shouldForwardProp:e=>e!=="$truncate"})(({theme:e,$truncate:t})=>({...te(`${e.palette.info.dark}1a`),overflow:"hidden",cursor:"inherit",flex:t?"1 1 auto":"0 0 auto",width:"max-content",maxWidth:t?"100%":"none",minWidth:t?0:"auto"})),pe=styled("span")(()=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0})),Se=styled("span")(()=>({position:"fixed",left:0,top:0,visibility:"hidden",pointerEvents:"none",whiteSpace:"nowrap",width:"max-content",display:"inline-flex",padding:"4px 8px 4px 6px",fontSize:"10px",fontWeight:500})),me=styled(h)(()=>({flex:1,maxWidth:"220px",minWidth:"89px"})),fe=styled(h,{shouldForwardProp:e=>e!=="$maxWidth"})(({$maxWidth:e})=>({display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",maxWidth:e,minWidth:"89px"}));function Me(e,t,l){let i=4*Math.max(e.length-1,0);if(e.reduce((s,a)=>s+a,0)+i<=t)return {count:e.length,truncateLast:false};let r=0,n=0;for(let s=0;s<e.length;s+=1){let a=n>0?4:0,m=s===e.length-1?0:4+l;if(r+a+e[s]+m<=t){r+=a+e[s],n+=1;continue}let S=t-r-a-m;if(n===0||S>=48)return {count:n+1,truncateLast:true};break}return {count:Math.max(n,1),truncateLast:false}}function Ne(e,t,l,i){let o=e.length;if(o===0)return {count:0,truncateLast:false};let r=4*Math.max(o-1,0),s=e.reduce((a,x)=>a+x,0)+r+(i?4+l:0);return {count:o,truncateLast:s>t}}var E=e=>!e.options&&typeof e.value=="string",I=e=>e.value??e.label,R=(e,t)=>t?.some(l=>l.value===e.value)??false,he=(e,t,l)=>{if(R(e,t)){l(t?.filter(i=>i.value!==e.value)||[]);return}l([...t||[],e]);},$=e=>E(e)?[e]:(e.options??[]).flatMap($),D=(e,t)=>{let l=e.filter(i=>R(i,t)).length;return {allSelected:e.length>0&&l===e.length,someSelected:l>0&&l<e.length}},ye=(e,t,l)=>{let i=new Set(e.map(n=>n.value));if(D(e,t).allSelected){l((t??[]).filter(n=>!i.has(n.value)));return}let o=new Set((t??[]).map(n=>n.value)),r=e.filter(n=>!o.has(n.value));l([...t??[],...r]);},De=(e,t)=>{let l=e[t];return typeof l=="string"?l:""},He=(e,t,l)=>l.some(i=>De(e,i).toLowerCase().includes(t)),H=(e,t,l)=>{if(!t)return e;let i=t.toLowerCase();return e.reduce((o,r)=>{if(E(r))return He(r,i,l)&&o.push(r),o;let n=H(r.options??[],t,l);return n.length>0&&o.push({...r,options:n}),o},[])};function Ge({options:e,maxVisibleSelected:t}){let l=useRef(null),i=useRef(null),o=typeof t=="number"&&Number.isFinite(t),r=o?Math.max(0,Math.floor(t)):e.length,[n,s]=useState({count:Math.min(r,e.length),truncateLast:false});useLayoutEffect(()=>{let f=l.current,S=i.current;if(!f||!S)return;let g=()=>{let C=e.slice(0,r).map(N=>(S.textContent=N.label,S.offsetWidth));S.textContent=`+${e.length}`;let v=S.offsetWidth,b=getComputedStyle(f),M=f.clientWidth-parseFloat(b.paddingLeft)-parseFloat(b.paddingRight),w=o?Ne(C,M,v,e.length>C.length):Me(C,M,v);s(N=>N.count===w.count&&N.truncateLast===w.truncateLast?N:w);};g();let L=new ResizeObserver(g);return L.observe(f),()=>L.disconnect()},[r,o,e]);let a=e.slice(0,n.count),x=e.length-n.count,m=Cc("field-badge");return jsxs(de,{children:[jsx(Se,{ref:i,"aria-hidden":true}),jsxs(ue,{ref:l,className:c.fieldRow,children:[a.map((f,S)=>{let g=n.truncateLast&&S===a.length-1;return jsx(A,{$truncate:g,children:jsx(pe,{children:f.label})},m(f.value,S))}),x>0?jsx(A,{children:jsxs("span",{children:["+",x]})}):null]})]})}var ge=Ge;function Le({label:e,maxWidth:t,itemCount:l,isSelected:i,isIndeterminate:o,onToggle:r,children:n}){let[s,a]=useState(null);return jsxs(V,{isSelected:i,isIndeterminate:o,onClick:m=>{m.stopPropagation(),m.preventDefault(),r();},onMouseEnter:m=>{l>0&&a(m.currentTarget);},onMouseLeave:()=>{s&&a(null);},children:[jsxs(fe,{$maxWidth:t,children:[e,jsx("img",{src:vb,className:"arrow-icon",alt:"arrow"})]}),jsx(R$1,{sx:{maxHeight:"450px",overflow:"auto"},open:!!s,anchorEl:s,placement:"right-start",children:n})]})}function ve({option:e,value:t,onChange:l}){let i=o=>{o.stopPropagation(),o.preventDefault(),he(e,t,l);};return jsx(V,{isSelected:R(e,t),onClick:i,children:jsx(me,{children:e.label})})}var Ke=340,Ue=220;function G({node:e,depth:t,value:l,onChange:i}){if(E(e))return jsx(ve,{option:e,value:l,onChange:i});if(!e.options)return null;let o=e.options,r=$(e),{allSelected:n,someSelected:s}=D(r,l);return jsx(Le,{label:e.label,maxWidth:t===0?Ke:Ue,itemCount:o.length,isSelected:n,isIndeterminate:s,onToggle:()=>ye(r,l,i),children:o.map(a=>jsx(G,{node:a,depth:t+1,value:l,onChange:i},I(a)))})}var Ze=["label"],Be=forwardRef(({options:e,onChange:t,value:l,maxVisibleSelected:i,placeholder:o,label:r,isLoading:n,searchBy:s=Ze,disabled:a$1,className:x,sx:m,searchable:f=true,searchPlaceholder:S,onOpen:g,onClose:L$1},C)=>{let[v,b]=useState(null),[M,w]=useState(""),N=!!v,Fe=r??o,Oe=r?o??"Please Select":"Please Select",We=d=>{if(N){b(null),L$1?.();return}b(d.currentTarget),g?.();},Ee=()=>{b(null),L$1?.();},Ie=()=>{M&&w("");},Re=useMemo(()=>H(e,M,s),[e,M,s]),K=l?.length??0,Te=Cc("selected-badge"),ke=n?jsx(CircularProgress,{size:16}):jsx(d,{src:M?Eb:A$1,alt:M?"close":"search",onClick:Ie,sx:{width:12,height:12,cursor:M?"pointer":"default"}});return jsx(Je,{onClickAway:()=>{N&&Ee();},children:jsxs(le,{ref:C,id:"FieldWrapper","data-testid":"NestedMultiSelect",$disabled:a$1,"aria-disabled":a$1||void 0,className:lc(c.root,N&&c.open,x),sx:m,onClick:d=>!a$1&&We(d),children:[jsx(oe,{className:c.label,component:"label",children:Fe}),K===0&&jsx(ne,{className:c.placeholder,component:"p",children:Oe}),jsx(ie,{className:c.arrow,"aria-hidden":true,children:jsx(a,{})}),K>0&&l?jsx(ge,{options:l,maxVisibleSelected:i}):null,jsx(R$1,{open:N,anchorEl:v,sx:{margin:"8px 0",maxHeight:330,overflow:"auto",maxWidth:"340px"},panelProps:{className:c.menu},children:jsxs(re,{children:[f?jsx(L,{className:c.search,fullWidth:true,size:"md",placeholder:S??o??"Select",endAdornment:ke,value:M,onClick:d=>{d.stopPropagation();},onMouseDown:d=>{d.stopPropagation();},onChange:d=>{w(d.target.value);},sx:{mb:"4px"}}):null,jsx(se,{children:l?.map((d$1,Ae)=>jsxs(ae,{className:c.selectedBadge,onClick:U=>{U.stopPropagation(),U.preventDefault(),t(l?.filter($e=>$e.value!==d$1.value)||[]);},children:[jsx(d,{src:Pc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx(ce,{children:d$1.label}),jsx(d,{src:Eb,alt:"close",sx:{width:9,height:9}})]},Te(d$1.value,Ae)))}),Re.map(d=>jsx(G,{node:d,depth:0,value:l,onChange:t},I(d)))]})})]})})});Be.displayName="NestedMultiSelect";var je=memo(Be);export{c as a,je as b};
@@ -1 +1 @@
1
- import {zc}from'./chunk-EGJV4FA6.js';import {useId,useMemo,useEffect}from'react';import {styled}from'@mui/material';import {jsx}from'react/jsx-runtime';var t=styled("span")(({theme:e})=>({fontWeight:500,color:e.palette.info.dark,cursor:"pointer",fontSize:"9px",textDecoration:"underline"}));var i=window.URL||window.webkitURL,b=({data:e,isLoading:r,isError:l})=>{let p=zc(useId(),"open-file-in-new-tab"),o=useMemo(()=>e?i.createObjectURL(e):"",[e]);useEffect(()=>()=>{o&&i.revokeObjectURL(o);},[o]);let a=()=>{o&&window.open(o,"_blank");};return r||l?null:jsx(t,{id:p,"data-testid":"OpenFileInNewTab",onClick:a,children:"View"})},c=b;export{c as a};
1
+ import {zc}from'./chunk-VFRJFEIJ.js';import {useId,useMemo,useEffect}from'react';import {styled}from'@mui/material';import {jsx}from'react/jsx-runtime';var t=styled("span")(({theme:e})=>({fontWeight:500,color:e.palette.info.dark,cursor:"pointer",fontSize:"9px",textDecoration:"underline"}));var i=window.URL||window.webkitURL,b=({data:e,isLoading:r,isError:l})=>{let p=zc(useId(),"open-file-in-new-tab"),o=useMemo(()=>e?i.createObjectURL(e):"",[e]);useEffect(()=>()=>{o&&i.revokeObjectURL(o);},[o]);let a=()=>{o&&window.open(o,"_blank");};return r||l?null:jsx(t,{id:p,"data-testid":"OpenFileInNewTab",onClick:a,children:"View"})},c=b;export{c as a};
@@ -1 +1 @@
1
- import {zc,Ia}from'./chunk-EGJV4FA6.js';import {memo,useId}from'react';import d from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var r=styled("span")(()=>({fontWeight:400})),p=styled(d)(()=>({fontWeight:700,fontSize:"11px",display:"flex",alignItems:"center",cursor:"default",whiteSpace:"nowrap",overflow:"auto"}));function a({amount:i,currencyCode:s,...u}){let l=zc(useId(),"display-amount"),{integerAmount:c,decimalAmount:f}=Ia(i,s);return jsxs(p,{...u,id:l,"data-testid":"DisplayAmount",children:[jsx("span",{children:c}),jsx("span",{children:"."}),jsx(r,{children:f})]})}a.displayName="DisplayAmount";var m=memo(a);var P=m;export{P as a};
1
+ import {zc,Ia}from'./chunk-VFRJFEIJ.js';import {memo,useId}from'react';import d from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var r=styled("span")(()=>({fontWeight:400})),p=styled(d)(()=>({fontWeight:700,fontSize:"11px",display:"flex",alignItems:"center",cursor:"default",whiteSpace:"nowrap",overflow:"auto"}));function a({amount:i,currencyCode:s,...u}){let l=zc(useId(),"display-amount"),{integerAmount:c,decimalAmount:f}=Ia(i,s);return jsxs(p,{...u,id:l,"data-testid":"DisplayAmount",children:[jsx("span",{children:c}),jsx("span",{children:"."}),jsx(r,{children:f})]})}a.displayName="DisplayAmount";var m=memo(a);var P=m;export{P as a};
@@ -1 +1 @@
1
- import {L as L$1}from'./chunk-GSRK5GJH.js';import {zc,Cc}from'./chunk-EGJV4FA6.js';import {Cb,A}from'./chunk-M5HS3EYQ.js';import {memo,useId,useState,useEffect}from'react';import h from'@mui/material/Box';import X from'@mui/material/ClickAwayListener';import Y from'@mui/material/InputAdornment';import Z from'@mui/material/Popper';import y from'@mui/material/Skeleton';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';import {Box,FormControl,InputLabel,Select,MenuItem}from'@mui/material';import {useFormContext,Controller}from'react-hook-form';var L=styled("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"})),R=styled(h)(({theme:e})=>({backgroundColor:e.palette.common.white,padding:"4px 8px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,width:100})),W=styled("ul")(()=>({listStyle:"none",padding:0,margin:0,maxHeight:100,overflow:"auto"})),B=styled("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"})),D=styled(L$1)(()=>({flexGrow:1,maxWidth:"100%",height:24,padding:"4px",marginBottom:"4px"})),E=styled(h)(()=>({color:"red !important"}));styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}));var N=styled(h)(({theme:e})=>({border:`1px solid ${e.palette.divider}`,display:"flex",position:"relative",paddingInline:"8px",alignItems:"center",borderRadius:"4px",height:"40px"})),H=styled(L$1,{shouldForwardProp:e=>e!=="error"})(({error:e})=>({flexGrow:1,maxWidth:"100%",img:{cursor:"pointer"},...e&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,borderBottom:"none"}}));function j({defaultCountry:e,value:a,onChangeCountry:s,required:d,countries:r=[],isLoading:f=false}){let i=zc(useId(),"countries-dropdown"),[m,S]=useState(null),[T,u]=useState([]),[$,w]=useState(),G=()=>{if(r&&e){let t=r.find(l=>l.iso2===e);t&&s?.(t);}};useEffect(()=>{u(r||[]),G();},[r]);let I=!!m,_=t=>{t.stopPropagation(),S(t.currentTarget);},F=()=>{S(null),w(void 0);},K=t=>{s?.(t),F(),u(r);},V=t=>{let l=Number(t.target.value);if(w(l),!l){u(r);return}u(r.filter(O=>O.idd_prefix.toString().startsWith(l.toString())));};return f?jsx(y,{variant:"rectangular",width:56.5,height:20,sx:{borderRadius:"4px"}}):jsx(X,{onClickAway:F,children:jsxs(h,{id:i,"data-testid":"CountriesCode",sx:{position:"relative"},children:[jsxs(L,{type:"button",onClick:_,sx:{backgroundColor:"transparent",border:"none",height:34},children:[a?.logo?jsx("img",{src:a.logo,alt:"c",className:"logo"}):jsx(y,{variant:"rectangular",className:"logo"}),jsx("span",{children:`+${a?.idd_prefix}`}),d&&jsx(E,{component:"span",children:"*"}),jsx(h,{component:"img",src:Cb,alt:"d",className:"arrow",sx:{...I&&{transform:"rotate(180deg)"}}})]}),jsx(Z,{open:I,anchorEl:m,children:jsxs(R,{component:"article","data-testid":"CountriesWrapper",children:[jsx(D,{type:"number",endAdornment:jsx(Y,{position:"end",children:jsx("img",{src:A,alt:"arrow"})}),onChange:V,value:$,hideArrows:true,disableFocusRing:true}),jsx(W,{children:T.map(t=>jsxs(B,{onClick:()=>{K(t);},children:[t.logo?jsx("img",{src:t.logo,alt:"c",className:"logo"}):jsx(y,{variant:"rectangular",className:"logo"}),jsx("span",{children:`+${t.idd_prefix}`})]},`country-code-${t.countryId}`))})]})})]})})}var z=memo(j);var ee=z;function C(e){let a=zc(useId(),"inputs-select"),{control:s}=useFormContext();return jsx(Controller,{name:e.name,control:s,render:({field:d,fieldState:{error:r}})=>{let f=Cc("select-item");return jsxs(Box,{id:a,"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"}},...d,value:d.value??"",error:!!r,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"},...r&&{border:"1px solid #FF3D00"}},children:(e.options||[]).map((i,m)=>jsx(MenuItem,{value:i.value??"",sx:{fontSize:"12px"},children:i.label},f(i.value,m)))})]}),r?.message&&jsx(Box,{component:"small",sx:i=>({color:i.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}),children:r.message})]})}})}var pe=C;export{N as a,H as b,ee as c,pe as d};
1
+ import {L as L$1}from'./chunk-KWNPF24A.js';import {zc,Cc}from'./chunk-VFRJFEIJ.js';import {Cb,A}from'./chunk-M5HS3EYQ.js';import {memo,useId,useState,useEffect}from'react';import h from'@mui/material/Box';import X from'@mui/material/ClickAwayListener';import Y from'@mui/material/InputAdornment';import Z from'@mui/material/Popper';import y from'@mui/material/Skeleton';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';import {Box,FormControl,InputLabel,Select,MenuItem}from'@mui/material';import {useFormContext,Controller}from'react-hook-form';var L=styled("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"})),R=styled(h)(({theme:e})=>({backgroundColor:e.palette.common.white,padding:"4px 8px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,width:100})),W=styled("ul")(()=>({listStyle:"none",padding:0,margin:0,maxHeight:100,overflow:"auto"})),B=styled("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"})),D=styled(L$1)(()=>({flexGrow:1,maxWidth:"100%",height:24,padding:"4px",marginBottom:"4px"})),E=styled(h)(()=>({color:"red !important"}));styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}));var N=styled(h)(({theme:e})=>({border:`1px solid ${e.palette.divider}`,display:"flex",position:"relative",paddingInline:"8px",alignItems:"center",borderRadius:"4px",height:"40px"})),H=styled(L$1,{shouldForwardProp:e=>e!=="error"})(({error:e})=>({flexGrow:1,maxWidth:"100%",img:{cursor:"pointer"},...e&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,borderBottom:"none"}}));function j({defaultCountry:e,value:a,onChangeCountry:s,required:d,countries:r=[],isLoading:f=false}){let i=zc(useId(),"countries-dropdown"),[m,S]=useState(null),[T,u]=useState([]),[$,w]=useState(),G=()=>{if(r&&e){let t=r.find(l=>l.iso2===e);t&&s?.(t);}};useEffect(()=>{u(r||[]),G();},[r]);let I=!!m,_=t=>{t.stopPropagation(),S(t.currentTarget);},F=()=>{S(null),w(void 0);},K=t=>{s?.(t),F(),u(r);},V=t=>{let l=Number(t.target.value);if(w(l),!l){u(r);return}u(r.filter(O=>O.idd_prefix.toString().startsWith(l.toString())));};return f?jsx(y,{variant:"rectangular",width:56.5,height:20,sx:{borderRadius:"4px"}}):jsx(X,{onClickAway:F,children:jsxs(h,{id:i,"data-testid":"CountriesCode",sx:{position:"relative"},children:[jsxs(L,{type:"button",onClick:_,sx:{backgroundColor:"transparent",border:"none",height:34},children:[a?.logo?jsx("img",{src:a.logo,alt:"c",className:"logo"}):jsx(y,{variant:"rectangular",className:"logo"}),jsx("span",{children:`+${a?.idd_prefix}`}),d&&jsx(E,{component:"span",children:"*"}),jsx(h,{component:"img",src:Cb,alt:"d",className:"arrow",sx:{...I&&{transform:"rotate(180deg)"}}})]}),jsx(Z,{open:I,anchorEl:m,children:jsxs(R,{component:"article","data-testid":"CountriesWrapper",children:[jsx(D,{type:"number",endAdornment:jsx(Y,{position:"end",children:jsx("img",{src:A,alt:"arrow"})}),onChange:V,value:$,hideArrows:true,disableFocusRing:true}),jsx(W,{children:T.map(t=>jsxs(B,{onClick:()=>{K(t);},children:[t.logo?jsx("img",{src:t.logo,alt:"c",className:"logo"}):jsx(y,{variant:"rectangular",className:"logo"}),jsx("span",{children:`+${t.idd_prefix}`})]},`country-code-${t.countryId}`))})]})})]})})}var z=memo(j);var ee=z;function C(e){let a=zc(useId(),"inputs-select"),{control:s}=useFormContext();return jsx(Controller,{name:e.name,control:s,render:({field:d,fieldState:{error:r}})=>{let f=Cc("select-item");return jsxs(Box,{id:a,"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"}},...d,value:d.value??"",error:!!r,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"},...r&&{border:"1px solid #FF3D00"}},children:(e.options||[]).map((i,m)=>jsx(MenuItem,{value:i.value??"",sx:{fontSize:"12px"},children:i.label},f(i.value,m)))})]}),r?.message&&jsx(Box,{component:"small",sx:i=>({color:i.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}),children:r.message})]})}})}var pe=C;export{N as a,H as b,ee as c,pe as d};
@@ -1 +1 @@
1
- import {b}from'./chunk-ZEA6DWZL.js';import {L,aa}from'./chunk-GSRK5GJH.js';import {a}from'./chunk-KYRAVGUZ.js';import {Bc}from'./chunk-EGJV4FA6.js';import {Cb,A}from'./chunk-M5HS3EYQ.js';import ne,{memo,useState,useEffect}from'react';import P from'@mui/material/Box';import te from'@mui/material/InputAdornment';import oe from'@mui/material/Skeleton';import {styled,Popper,Box,ClickAwayListener}from'@mui/material';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {styled as styled$1}from'@mui/material/styles';var N=styled("button")(({theme:e,disabled:o})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"12px",borderRadius:"3px"},".arrow":{width:14,alignSelf:""},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px",borderRadius:"2px"},cursor:o?"default":"pointer",opacity:o?.5:1,paddingTop:0,backgroundColor:"transparent",border:"none",paddingInlineStart:0,minWidth:70,marginTop:1})),_=styled(Popper)(({theme:e})=>({zIndex:9999,backgroundColor:e.palette.common.white,padding:"4px 8px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,width:100})),H=styled("ul")(()=>({listStyle:"none",padding:0,margin:0,maxHeight:100,overflow:"auto"})),q=styled("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"})),z=styled(L)(()=>({flexGrow:1,maxWidth:"100%",height:24,padding:"4px",marginBottom:"4px"})),D=styled(Box)(()=>({color:"red !important"}));function G({isLoading:e,countries:o,value:n,onCountryChange:l,required:b,disabled:f}){let[s,C]=useState(),[u,g]=useState(null),[y,i]=useState([]),[I,S]=useState(""),a$1=!!u&&!f,w=t=>{t.stopPropagation(),g(t.currentTarget);},m=()=>{g(null);},L=t=>{l?.(t),C(t),m(),i(o);},k=t=>{let p=t.target.value.toString()??"";if(S(p),!p){i(o);return}let Y=o.filter(F=>F.idd_prefix.toString().startsWith(p)||F.iso2.toLowerCase().startsWith(p.toLowerCase()));i(Y);};return useEffect(()=>{n&&C(n);},[n?.countryId]),useEffect(()=>{o.length&&i(o);},[o.length]),jsxs(P,{"data-testid":"CountriesList",sx:{position:"relative"},children:[jsx(N,{type:"button","aria-describedby":"CountriesList_CountriesWrapper",onClick:w,disabled:e||f,children:e?jsx(oe,{variant:"rectangular",width:56.5,height:15,sx:{borderRadius:"4px"}}):jsxs(Fragment,{children:[s&&jsxs(Fragment,{children:[jsx("img",{src:s.logo,alt:"c",className:"logo"}),jsx(P,{component:"span",flex:1,children:`+${s?.idd_prefix}`})]}),b&&jsx(D,{component:"span",children:"*"}),jsx(P,{component:"img",src:Cb,alt:"d",className:"arrow",sx:{...a$1&&{transform:"rotate(180deg)"}}})]})}),a$1&&jsx(a,{onClick:m,sx:{zIndex:9999}}),a$1&&jsx(ClickAwayListener,{onClickAway:m,children:jsxs(_,{id:"CountriesList_CountriesWrapper",open:a$1,anchorEl:u,"data-testid":"CountriesList_CountriesWrapper",placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[-8,6]}}],children:[jsx(z,{type:"number",endAdornment:jsx(te,{position:"end",children:jsx("img",{src:A,alt:"arrow"})}),onChange:k,hideArrows:true,disableFocusRing:true,"data-testid":"CountriesList_InputStyled",value:I}),jsx(H,{"data-testid":"CountriesList_CountriesListStyled",children:y.map(t=>{let p=s?.countryId===t.countryId;return jsxs(q,{onClick:()=>{L(t);},sx:{backgroundColor:p?"#F9F9F9":"transparent",color:p?"#000":"#8D8D94"},children:[jsx("img",{src:t.logo,alt:"c",className:"logo"}),jsx("span",{children:`+${t.idd_prefix}`})]},`country-code-${t.countryId}`)})})]})})]})}G.displayName="CountriesList";var V=memo(G);var v=V;styled$1(P,{shouldForwardProp:e=>!["feedbackType","hasFeedback"].includes(e)})(({theme:e,feedbackType:o,hasFeedback:n})=>{let{borderColor:l}=aa(e,o);return {border:`1px solid ${o?l:e.palette.divider}`,display:"flex",position:"relative",alignItems:"center",borderRadius:n?"4px 4px 0 0":"4px",borderBottom:n?"none":void 0}});var K=styled$1(b)({flexGrow:1,maxWidth:"100%",paddingInlineEnd:0,img:{cursor:"pointer"}});styled$1("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}));styled$1(P)(()=>({flex:1}));function U({phoneValue:e,error:o,hasError:n,countries:l,isCountriesLoading:b,countryValue:f,onCountryChange:s,onPhoneChange:C,helperText:u,required:g,disabled:y,feedback:i,id:I="PhoneInput",...S},a){let w=t=>{s?.(t);},m=i?.message??u,{isProvided:L}=Bc(i,{message:m});return jsx(K,{id:I,type:"number",value:e,"data-testid":"PhoneInput",ref:a,disableFocusRing:true,inputProps:{autoComplete:"off"},error:(o??n??false)&&!L,disabled:y,feedback:i,helperText:u,startAdornment:jsx(v,{isLoading:b,countries:l,value:f,onCountryChange:w,required:g,disabled:y}),...S,onChange:C,hideArrows:true})}U.displayName="PhoneInput";var X=ne.forwardRef(U);export{v as a,X as b};
1
+ import {b}from'./chunk-GJQV65J5.js';import {a}from'./chunk-WBIMGETF.js';import {L,aa}from'./chunk-KWNPF24A.js';import {Bc}from'./chunk-VFRJFEIJ.js';import {Cb,A}from'./chunk-M5HS3EYQ.js';import ne,{memo,useState,useEffect}from'react';import P from'@mui/material/Box';import te from'@mui/material/InputAdornment';import oe from'@mui/material/Skeleton';import {styled,Popper,Box,ClickAwayListener}from'@mui/material';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {styled as styled$1}from'@mui/material/styles';var N=styled("button")(({theme:e,disabled:o})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"12px",borderRadius:"3px"},".arrow":{width:14,alignSelf:""},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px",borderRadius:"2px"},cursor:o?"default":"pointer",opacity:o?.5:1,paddingTop:0,backgroundColor:"transparent",border:"none",paddingInlineStart:0,minWidth:70,marginTop:1})),_=styled(Popper)(({theme:e})=>({zIndex:9999,backgroundColor:e.palette.common.white,padding:"4px 8px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,width:100})),H=styled("ul")(()=>({listStyle:"none",padding:0,margin:0,maxHeight:100,overflow:"auto"})),q=styled("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"})),z=styled(L)(()=>({flexGrow:1,maxWidth:"100%",height:24,padding:"4px",marginBottom:"4px"})),D=styled(Box)(()=>({color:"red !important"}));function G({isLoading:e,countries:o,value:n,onCountryChange:l,required:b,disabled:f}){let[s,C]=useState(),[u,g]=useState(null),[y,i]=useState([]),[I,S]=useState(""),a$1=!!u&&!f,w=t=>{t.stopPropagation(),g(t.currentTarget);},m=()=>{g(null);},L=t=>{l?.(t),C(t),m(),i(o);},k=t=>{let p=t.target.value.toString()??"";if(S(p),!p){i(o);return}let Y=o.filter(F=>F.idd_prefix.toString().startsWith(p)||F.iso2.toLowerCase().startsWith(p.toLowerCase()));i(Y);};return useEffect(()=>{n&&C(n);},[n?.countryId]),useEffect(()=>{o.length&&i(o);},[o.length]),jsxs(P,{"data-testid":"CountriesList",sx:{position:"relative"},children:[jsx(N,{type:"button","aria-describedby":"CountriesList_CountriesWrapper",onClick:w,disabled:e||f,children:e?jsx(oe,{variant:"rectangular",width:56.5,height:15,sx:{borderRadius:"4px"}}):jsxs(Fragment,{children:[s&&jsxs(Fragment,{children:[jsx("img",{src:s.logo,alt:"c",className:"logo"}),jsx(P,{component:"span",flex:1,children:`+${s?.idd_prefix}`})]}),b&&jsx(D,{component:"span",children:"*"}),jsx(P,{component:"img",src:Cb,alt:"d",className:"arrow",sx:{...a$1&&{transform:"rotate(180deg)"}}})]})}),a$1&&jsx(a,{onClick:m,sx:{zIndex:9999}}),a$1&&jsx(ClickAwayListener,{onClickAway:m,children:jsxs(_,{id:"CountriesList_CountriesWrapper",open:a$1,anchorEl:u,"data-testid":"CountriesList_CountriesWrapper",placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[-8,6]}}],children:[jsx(z,{type:"number",endAdornment:jsx(te,{position:"end",children:jsx("img",{src:A,alt:"arrow"})}),onChange:k,hideArrows:true,disableFocusRing:true,"data-testid":"CountriesList_InputStyled",value:I}),jsx(H,{"data-testid":"CountriesList_CountriesListStyled",children:y.map(t=>{let p=s?.countryId===t.countryId;return jsxs(q,{onClick:()=>{L(t);},sx:{backgroundColor:p?"#F9F9F9":"transparent",color:p?"#000":"#8D8D94"},children:[jsx("img",{src:t.logo,alt:"c",className:"logo"}),jsx("span",{children:`+${t.idd_prefix}`})]},`country-code-${t.countryId}`)})})]})})]})}G.displayName="CountriesList";var V=memo(G);var v=V;styled$1(P,{shouldForwardProp:e=>!["feedbackType","hasFeedback"].includes(e)})(({theme:e,feedbackType:o,hasFeedback:n})=>{let{borderColor:l}=aa(e,o);return {border:`1px solid ${o?l:e.palette.divider}`,display:"flex",position:"relative",alignItems:"center",borderRadius:n?"4px 4px 0 0":"4px",borderBottom:n?"none":void 0}});var K=styled$1(b)({flexGrow:1,maxWidth:"100%",paddingInlineEnd:0,img:{cursor:"pointer"}});styled$1("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}));styled$1(P)(()=>({flex:1}));function U({phoneValue:e,error:o,hasError:n,countries:l,isCountriesLoading:b,countryValue:f,onCountryChange:s,onPhoneChange:C,helperText:u,required:g,disabled:y,feedback:i,id:I="PhoneInput",...S},a){let w=t=>{s?.(t);},m=i?.message??u,{isProvided:L}=Bc(i,{message:m});return jsx(K,{id:I,type:"number",value:e,"data-testid":"PhoneInput",ref:a,disableFocusRing:true,inputProps:{autoComplete:"off"},error:(o??n??false)&&!L,disabled:y,feedback:i,helperText:u,startAdornment:jsx(v,{isLoading:b,countries:l,value:f,onCountryChange:w,required:g,disabled:y}),...S,onChange:C,hideArrows:true})}U.displayName="PhoneInput";var X=ne.forwardRef(U);export{v as a,X as b};
@@ -1 +1 @@
1
- import {b}from'./chunk-H5GMJ5PD.js';import {z}from'./chunk-GSRK5GJH.js';import {zc}from'./chunk-EGJV4FA6.js';import {Ph}from'./chunk-M5HS3EYQ.js';import {memo,useId}from'react';import {styled,Box}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var a=styled(Box,{shouldForwardProp:t=>t!=="isLongLabel"})(({theme:t,isLongLabel:e})=>({display:"flex",justifyContent:"center",alignItems:"center",padding:"6px 16px",height:"32px",background:t.palette.background.gradient.shadedBlue,color:t.palette.common.white,borderRadius:"50px",fontSize:"11px",gap:t.spacing(1),minWidth:e?"12rem":"8.4rem",marginRight:"auto",position:"relative"}));function u({ids:t,visible:e,label:o,onDismiss:c,dismissible:m=true}){let d=zc(useId(),"active-filter-chip");return e?jsxs(a,{id:d,"data-testid":"ActiveFilterChip",isLongLabel:(o?.length??0)>11,children:[o?jsx(b,{children:o}):jsx("span",{children:t?.join(",")}),m&&jsx(z,{pointer:true,round:true,onClick:c,color:"active",sx:{position:"absolute",right:"8px"},children:jsx("img",{src:Ph,alt:"close",style:{width:"8px",height:"7px"}})})]}):null}var s=memo(u);var S=s;export{S as a};
1
+ import {b}from'./chunk-IISCFGS5.js';import {z}from'./chunk-KWNPF24A.js';import {zc}from'./chunk-VFRJFEIJ.js';import {Ph}from'./chunk-M5HS3EYQ.js';import {memo,useId}from'react';import {styled,Box}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var a=styled(Box,{shouldForwardProp:t=>t!=="isLongLabel"})(({theme:t,isLongLabel:e})=>({display:"flex",justifyContent:"center",alignItems:"center",padding:"6px 16px",height:"32px",background:t.palette.background.gradient.shadedBlue,color:t.palette.common.white,borderRadius:"50px",fontSize:"11px",gap:t.spacing(1),minWidth:e?"12rem":"8.4rem",marginRight:"auto",position:"relative"}));function u({ids:t,visible:e,label:o,onDismiss:c,dismissible:m=true}){let d=zc(useId(),"active-filter-chip");return e?jsxs(a,{id:d,"data-testid":"ActiveFilterChip",isLongLabel:(o?.length??0)>11,children:[o?jsx(b,{children:o}):jsx("span",{children:t?.join(",")}),m&&jsx(z,{pointer:true,round:true,onClick:c,color:"active",sx:{position:"absolute",right:"8px"},children:jsx("img",{src:Ph,alt:"close",style:{width:"8px",height:"7px"}})})]}):null}var s=memo(u);var S=s;export{S as a};
@@ -1 +1 @@
1
- import {p}from'./chunk-GSRK5GJH.js';import {Wa,zc,cb}from'./chunk-EGJV4FA6.js';import {Rk,ya,xa,wa,Oj}from'./chunk-M5HS3EYQ.js';import {memo,useId}from'react';import C from'@mui/material/Box';import O from'lodash/capitalize';import {useTranslation}from'react-i18next';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var D=styled(C,{shouldForwardProp:o=>o!=="tableMode"})(({theme:o,tableMode:t})=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4px 8px",borderRadius:"24px",border:`1px solid ${o.palette.divider}`,color:o.palette.text.primary,height:Wa(t)?"18px":"24px"}));var e={DESKTOP:wa,PHONE:xa,TABLET:ya,TERMINAL:Rk};var i=o=>!!e[o];function S({type:o,isTextShown:t,tableMode:T,...E}){let p$1=zc(useId(),"device-icon"),{t:v}=useTranslation(),m=i(o)?e[o]:null;return jsx(p,{title:m?`Device - ${cb((o??"").toLowerCase())}`:v("unKnown"),children:t?jsx(D,{id:p$1,"data-testid":"DeviceIcon",tableMode:T,children:o?O(o):"Unknown"}):jsx(C,{...E,id:p$1,"data-testid":"DeviceIcon",component:"img",src:o?m||Oj:Oj,alt:o})})}var b=memo(S);var X=b;export{e as a,i as b,X as c};
1
+ import {p}from'./chunk-KWNPF24A.js';import {Wa,zc,cb}from'./chunk-VFRJFEIJ.js';import {Rk,ya,xa,wa,Oj}from'./chunk-M5HS3EYQ.js';import {memo,useId}from'react';import C from'@mui/material/Box';import O from'lodash/capitalize';import {useTranslation}from'react-i18next';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var D=styled(C,{shouldForwardProp:o=>o!=="tableMode"})(({theme:o,tableMode:t})=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4px 8px",borderRadius:"24px",border:`1px solid ${o.palette.divider}`,color:o.palette.text.primary,height:Wa(t)?"18px":"24px"}));var e={DESKTOP:wa,PHONE:xa,TABLET:ya,TERMINAL:Rk};var i=o=>!!e[o];function S({type:o,isTextShown:t,tableMode:T,...E}){let p$1=zc(useId(),"device-icon"),{t:v}=useTranslation(),m=i(o)?e[o]:null;return jsx(p,{title:m?`Device - ${cb((o??"").toLowerCase())}`:v("unKnown"),children:t?jsx(D,{id:p$1,"data-testid":"DeviceIcon",tableMode:T,children:o?O(o):"Unknown"}):jsx(C,{...E,id:p$1,"data-testid":"DeviceIcon",component:"img",src:o?m||Oj:Oj,alt:o})})}var b=memo(S);var X=b;export{e as a,i as b,X as c};
@@ -1 +1 @@
1
- import {t,p}from'./chunk-GSRK5GJH.js';import {zc,ec,Aa}from'./chunk-EGJV4FA6.js';import St,{forwardRef,useId,memo,useMemo,Children,useState,useRef,useEffect,useCallback,useLayoutEffect,isValidElement}from'react';import {motion}from'framer-motion';import P from'@mui/material/Box';import {styled}from'@mui/material/styles';import {styled as styled$1}from'@mui/material';import Ye from'@mui/material/TableCell';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var f=24;var $=.22;var pe=styled(Ye,{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 ot=forwardRef(({children:e,...t},r)=>{let o=zc(useId(),"table-cell");return jsx(pe,{id:o,component:"div","data-testid":"TableCell",...t,ref:r,children:e})}),le=memo(ot);var Xt=styled$1("span",{shouldForwardProp:e=>e!=="variant"})(({theme:e,variant:t})=>({display:"flex",width:"17px",height:"12px",backgroundColor:t?ec(e.palette)[t]:"transparent",borderRadius:"2px",flexShrink:0,overflow:"hidden",visibility:"hidden","& > img":{width:"100%",height:"100%",objectFit:"cover"}})),Zt=styled$1("button")({background:"transparent",border:"none",padding:0,cursor:"pointer",outline:"none",display:"flex",alignItems:"center",justifyContent:"center",overflow:"visible"}),jt=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)})),Ut=styled$1("img")(()=>({width:"12px",height:"12px"})),Gt=styled$1("span",{shouldForwardProp:e=>e!=="isShown"})(({theme:e,isShown:t})=>({...t&&{border:`1px solid ${e.palette.divider}`},borderRadius:"12px",backgroundColor:t?e.palette.background.paper:"transparent",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,overflow:"hidden",visibility:"hidden"})),qt=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})),Jt=styled$1("div")(()=>({display:"flex",width:"24px",height:"24px",alignItems:"center",justifyContent:"center",borderRadius:"64px;",border:"1px solid #F2F2F2;"})),ce=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}`})),se=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}`})),Qt=styled$1(se)(({theme:e})=>({color:e.palette.info.dark,backgroundColor:e.palette.info.light,borderColor:e.palette.divider,minWidth:"88px",height:"24px"})),Yt=styled$1(se)(({theme:e})=>({color:e.palette.grey.A700,backgroundColor:`${e.palette.grey.A700}1A`,minWidth:"88px",height:"24px"})),er=styled$1(le)(()=>({fontSize:"11px",textAlign:"left",display:"flex",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",gap:"4px",textOverflow:"ellipsis",whiteSpace:"nowrap"})),tr=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),rr=styled$1("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0})),or=styled$1("img")(()=>({width:"36px",height:"24px"})),nr=styled$1("div")(({percentage:e,isCapture:t,theme:r})=>({background:`conic-gradient(${t?r.palette.info.dark:"#656565"} ${e}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${t?r.palette.info.dark:"#656565"}`}));var de=styled(P)(()=>({display:"flex",gap:"8px",overflow:"visible"})),lt=["trackWidth","minTrackWidth","slotSize","hoverZIndex"],me=styled("div",{shouldForwardProp:e=>!lt.includes(e)})(({trackWidth:e,minTrackWidth:t,slotSize:r,hoverZIndex:o})=>({position:"relative",overflow:"visible",width:e,minWidth:t,height:r,transition:`width ${.22}s ease-out`,...o!==void 0?{zIndex:o}:{}})),B=styled(P)(()=>({display:"flex",alignItems:"center",paddingRight:"8px","& .chip-stack-overlap-slot":{marginRight:"-8px",position:"relative",zIndex:1},"& .chip-stack-overlap-slot:hover":{zIndex:2}}));function ue(e){return {display:"flex",alignItems:"center",justifyContent:"center",width:`var(--chip-stack-slot-size, ${24}px)`,height:`var(--chip-stack-slot-size, ${24}px)`,borderRadius:"50%",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.common.white,flexShrink:0}}var he=styled(({title:e,className:t,...r})=>e!=null&&e!==""?jsx(p,{title:e,wrapperProps:{className:"chip-stack-overlap-slot"},children:jsx(P,{className:t,...r})}):jsx(P,{className:["chip-stack-overlap-slot",t].filter(Boolean).join(" "),...r}))(({theme:e})=>({...ue(e),overflow:"hidden",lineHeight:0,boxSizing:"border-box",padding:0,"& > *":{width:"100%",height:"100%",minWidth:0,minHeight:0},"& img":{display:"block",width:"100%",height:"100%",objectFit:"contain"}})),V=styled(({title:e,...t})=>jsx(p,{title:e??"",wrapperProps:{className:"chip-stack-overlap-slot"},children:jsx(P,{...t})}))(({theme:e})=>({...ue(e),fontSize:`max(${8}px, calc(var(--chip-stack-slot-size, ${24}px) * ${8.5} / ${24}))`,fontWeight:500,color:e.palette.text.disabled}));function fe({overflowItems:e,size:t}){let r=`${Math.max(8,8.5*t/24)}px`;return jsxs(P,{sx:{width:t,height:t,borderRadius:"50%",border:o=>`1px solid ${o.palette.divider}`,display:"flex",alignItems:"center",justifyContent:"center",fontSize:r,fontWeight:600,bgcolor:"action.hover",flexShrink:0},children:["+",e.length]})}var ct=["faceSize","avatarFill"],Se=styled(ce,{shouldForwardProp:e=>!ct.includes(e)})(({theme:e,faceSize:t,avatarFill:r})=>{let o=`${t}px`,i=`${Math.max(7,8.5*t/24)}px`;return {width:o,height:o,fontSize:i,fontWeight:500,lineHeight:"100%",letterSpacing:"0%",textAlign:"center",color:e.palette.common.white,background:r,backgroundSize:"cover","&.MuiAvatar-colorDefault":{background:r,color:e.palette.common.white},"& .MuiAvatar-img":{objectFit:"cover"}}});function xe(e){return e==="fanout-left"?"left":e==="fanout-center"?"center":"right"}function Ce(e,t,r){return e==="static"?t?"static-children":r?"static-items":null:t?"animated-children":r?"animated-items":null}function ge({size:e,stackStep:t,gap:r,minTrackWidth:o}){let i=e??24,n=t??Math.round(i/2),l=r??Math.max(1,Math.round(i*3/24)),a=o??Math.max(60,Math.round(i*60/24));return {size:i,stackStep:n,gap:l,minTrackWidth:a}}function ke(e,t){if(e<=0)return 0;switch(t){case "right":return 0;case "left":return e-1;default:return Math.floor((e-1)/2)}}function ye(e,t){return t!==void 0&&e>t}function M(e,t){return t===void 0||t<1||e.length<t?{visibleItems:e,hiddenItems:[]}:{visibleItems:e.slice(0,t-1),hiddenItems:e.slice(t-1)}}function ht(e,t){return isValidElement(e)&&e.key!=null&&e.key!==""?String(e.key):`chip-stack-child-${t}`}function Z({items:e,maxItems:t,getItemKey:r,renderItem:o,renderOverflow:i,slotSize:n}){let l={slotSize:n};if(e.length===0)return [];let{visibleItems:a,hiddenItems:p}=M(e,t),c=a.map((d,s)=>({key:r(d,s),render:()=>o(d,s,l)}));return p.length>0&&c.push({key:`chip-stack-overflow-${p.length}-${a.length}`,render:()=>i({items:e,overflowItems:p,size:n})}),c}function be({children:e,maxItems:t,slotSize:r,renderOverflow:o}){let i=Children.toArray(e);return Z({items:i,maxItems:t,getItemKey:ht,renderItem:n=>n,renderOverflow:o,slotSize:r})}function Ae(e,t){return e.length===t.length&&e.every((r,o)=>r===t[o])}function X(e,t,r){return e[t]??r}function ve(e,t,r,o,i,n){if(e===0)return [];let l=t*i,a=new Array(e);a[t]=l;for(let p=t-1;p>=0;p-=1)a[p]=a[p+1]-X(r,p,n)-o;for(let p=t+1;p<e;p+=1)a[p]=a[p-1]+X(r,p-1,n)+o;return a}function Te(e,t,r){return e<=0?0:(e-1)*t+r}function Re(e,t,r,o){return Array.from({length:e},(i,n)=>e<=1||!t?0:r[n]-n*o)}function Ie(e,t,r,o,i){if(e<=0)return 0;let n=t.map((p,c)=>p+X(r,c,i)),l=Math.min(...t),a=Math.max(...n);return Math.max(o,a-l)}function Pe(e,t,r){return Array.from({length:e},(o,i)=>{let n=t.current[i];return n?n.offsetWidth:r})}function j(e,t){return e.id??`${e.first}-${e.last}-${t}`}function we(e){return [e.first,e.last].map(t=>t?.[0]).filter(t=>t!=null&&t!=="").join("")}function _e(e){if(e.tooltip!==void 0)return e.tooltip===null?null:e.tooltip;let t=`${e.first||""} ${e.last||""}`.trim();return t!==""?t:null}function Ne({slotCount:e,anchorIndex:t,size:r,stackStep:o,gap:i,fanOutEnabled:n,compact:l}){let[a,p]=useState(false),[c,d]=useState(()=>Array.from({length:e},()=>r)),s=useRef(null),S=useRef([]),g=useRef(null),k=useCallback(()=>{let R=Pe(e,S,r);d(b=>Ae(b,R)?b:R);},[e,r]),u=useCallback(()=>{g.current&&cancelAnimationFrame(g.current),g.current=requestAnimationFrame(k);},[k]),y=useMemo(()=>ve(e,t,c,i,o,r),[e,t,c,i,o,r]),A=useMemo(()=>Re(e,n&&a,y,o),[e,n,a,y,o]),x=useMemo(()=>Te(e,o,r),[e,o,r]),O=useMemo(()=>Ie(e,y,c,x,r),[e,y,c,x,r]),C=useCallback(()=>{n&&(s.current&&clearTimeout(s.current),p(true));},[n]),h=useCallback(()=>{n&&(s.current&&clearTimeout(s.current),s.current=setTimeout(()=>p(false),120));},[n]);useEffect(()=>()=>{s.current&&clearTimeout(s.current);},[]),useEffect(()=>{n||p(false);},[n]),useLayoutEffect(()=>{d(Array.from({length:e},()=>r));},[e,r]),useLayoutEffect(()=>{k();},[e,r,k]),useEffect(()=>(u(),window.addEventListener("resize",u),()=>{window.removeEventListener("resize",u),g.current&&cancelAnimationFrame(g.current);}),[u]);let v=n&&a?O:l?r:x,T=n&&a,N=useMemo(()=>l?Array.from({length:e},(R,b)=>b===t||a?1:0):Array.from({length:e},()=>1),[l,e,t,a]);return {isHovering:a,handleMouseEnter:C,handleMouseLeave:h,slotRefs:S,translateX:A,slotOpacity:N,collapsedStackWidthPx:x,fannedRowWidthPx:O,trackWidth:v,hoverZIndexActive:T}}function D({items:e,children:t,maxItems:r,getItemKey:o,renderItem:i,renderOverflow:n,fanOutDirection:l,compact:a=false,"data-testid":p,sx:c,className:d,slotProps:s}){let S=Children.count(t)>0,{zIndex:g=1e3,size:k,stackStep:u,gap:y,minTrackWidth:A}=s?.layout??{},x=useMemo(()=>S?Children.toArray(t??null).length:e?.length??0,[S,t,e]),C=!(!a&&ye(x,r)),{size:h,stackStep:F,gap:v,minTrackWidth:T}=useMemo(()=>ge({size:k,stackStep:u,gap:y,minTrackWidth:A}),[k,u,y,A]),N=n??fe,R=useMemo(()=>S?be({children:t??null,maxItems:r,slotSize:h,renderOverflow:N}):!e?.length||!o||!i?[]:Z({items:e,maxItems:r,getItemKey:o,renderItem:i,slotSize:h,renderOverflow:N}),[S,t,e,r,o,i,N,h]),b=R.length,Ke=useMemo(()=>ke(b,l),[b,l]),{handleMouseEnter:He,handleMouseLeave:De,slotRefs:$e,translateX:Be,slotOpacity:te,collapsedStackWidthPx:Xe,trackWidth:Ze,hoverZIndexActive:je}=Ne({slotCount:b,anchorIndex:Ke,size:h,stackStep:F,gap:v,fanOutEnabled:C,compact:a});if(b===0)return null;let{sx:z,...Ue}=s?.shell??{},{style:Ge,...qe}=s?.track??{};return jsx(de,{className:d,...Ue,sx:[{justifyContent:"flex-start",...C||a?{width:"100%"}:{}},...Array.isArray(c)?c:c!=null?[c]:[],...Array.isArray(z)?z:z!=null?[z]:[]],children:jsx(me,{"data-testid":p,...qe,style:Ge,onMouseEnter:C?He:void 0,onMouseLeave:C?De:void 0,trackWidth:Ze,minTrackWidth:a?h:Math.max(T,Xe),slotSize:h,hoverZIndex:je?g:void 0,children:R.map((re,I)=>jsx(motion.div,{ref:Je=>{$e.current[I]=Je;},initial:false,animate:{x:Be[I]??0,opacity:te[I]??1},transition:{duration:.22,ease:"easeOut"},style:{position:"absolute",top:0,left:I*F,zIndex:I,width:h,height:h,pointerEvents:te[I]===0?"none":"auto"},children:re.render()},re.key))})})}function Ct({children:e,maxItems:t,renderOverflow:r,slotSize:o=24,sx:i,...n}){let l=useMemo(()=>St.Children.toArray(e),[e]),{visibleItems:a,hiddenItems:p}=useMemo(()=>M(l,t),[l,t]),c=p.length>0,d=useMemo(()=>[{"--chip-stack-slot-size":`${o}px`},...Array.isArray(i)?i:i!=null?[i]:[]],[o,i]);if(!c)return jsx(B,{"data-testid":"ChipStack",...n,sx:d,children:e});let s=r?.({items:l,overflowItems:p,size:o});return jsxs(B,{"data-testid":"ChipStack",...n,sx:d,children:[a,s??jsx(V,{title:`${p.length} more`,children:jsxs("span",{children:["+",p.length]})})]})}var Q=memo(Ct);function kt(e){return jsx(he,{"data-testid":"OverlapChip",...e})}var Y=memo(kt);var bt=["static","fanout-right","fanout-left","fanout-center"],ee="static";function vt(e){let{variant:t=ee,maxItems:r,renderOverflow:o,children:i,items:n,getItemKey:l,renderItem:a,compact:p=false,"data-testid":c,slotProps:d,sx:s,className:S}=e,g=Children.count(i??null)>0,k=!g&&(n?.length??0)>0&&l!=null&&a!=null,u=Ce(t,g,k);if(u===null)return null;if(u==="static-children"||u==="static-items"){let x=d?.layout?.size??24;if(u==="static-items"&&n&&l&&a){let{visibleItems:O,hiddenItems:C}=M(n,r),h=C.length>0?o?.({items:n,overflowItems:C,size:x})??jsx(V,{title:`${C.length} more`,children:jsxs("span",{children:["+",C.length]})}):null,F=jsxs(Fragment,{children:[O.map((v,T)=>jsx(Y,{children:a(v,T,{slotSize:x})},l(v,T))),h]});return jsx(Q,{"data-testid":c,slotSize:x,sx:s,className:S,children:F})}return jsx(Q,{"data-testid":c,maxItems:r,renderOverflow:o,slotSize:x,sx:s,className:S,children:i})}let y=xe(t),A={maxItems:r,renderOverflow:o,fanOutDirection:y,compact:p,"data-testid":c??"ChipStack",slotProps:d,sx:s,className:S};return u==="animated-children"?jsx(D,{...A,children:i}):jsx(D,{...A,items:n,getItemKey:l,renderItem:a})}var ze=vt;function wt({item:e,sourceIndex:t,slotSize:r}){let[o,i]=useState(false),n=useRef(null);useEffect(()=>{i(false);},[e.logo]);let l=!e.logo||o,a=j(e,t),p$1="transparent";l&&(n.current?.key!==a&&(n.current={key:a,fill:Aa()}),p$1=n.current.fill);let c=jsx(Se,{faceSize:r,avatarFill:p$1,src:l?void 0:e.logo,slotProps:l?void 0:{img:{onError:()=>i(true)}},children:we(e)}),d=_e(e);return d!=null&&d!==""?jsx(p,{title:d,children:c}):c}var _t=wt;var to=ze;export{le as a,Xt as b,Zt as c,jt as d,Ut as e,Gt as f,qt as g,Jt as h,ce as i,se as j,Qt as k,Yt as l,er as m,tr as n,rr as o,or as p,nr as q,f as r,$ as s,j as t,Y as u,bt as v,ee as w,ze as x,_t as y,to as z};
1
+ import {t,p}from'./chunk-KWNPF24A.js';import {zc,ec,Aa}from'./chunk-VFRJFEIJ.js';import St,{forwardRef,useId,memo,useMemo,Children,useState,useRef,useEffect,useCallback,useLayoutEffect,isValidElement}from'react';import {motion}from'framer-motion';import P from'@mui/material/Box';import {styled}from'@mui/material/styles';import {styled as styled$1}from'@mui/material';import Ye from'@mui/material/TableCell';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var f=24;var $=.22;var pe=styled(Ye,{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 ot=forwardRef(({children:e,...t},r)=>{let o=zc(useId(),"table-cell");return jsx(pe,{id:o,component:"div","data-testid":"TableCell",...t,ref:r,children:e})}),le=memo(ot);var Xt=styled$1("span",{shouldForwardProp:e=>e!=="variant"})(({theme:e,variant:t})=>({display:"flex",width:"17px",height:"12px",backgroundColor:t?ec(e.palette)[t]:"transparent",borderRadius:"2px",flexShrink:0,overflow:"hidden",visibility:"hidden","& > img":{width:"100%",height:"100%",objectFit:"cover"}})),Zt=styled$1("button")({background:"transparent",border:"none",padding:0,cursor:"pointer",outline:"none",display:"flex",alignItems:"center",justifyContent:"center",overflow:"visible"}),jt=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)})),Ut=styled$1("img")(()=>({width:"12px",height:"12px"})),Gt=styled$1("span",{shouldForwardProp:e=>e!=="isShown"})(({theme:e,isShown:t})=>({...t&&{border:`1px solid ${e.palette.divider}`},borderRadius:"12px",backgroundColor:t?e.palette.background.paper:"transparent",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,overflow:"hidden",visibility:"hidden"})),qt=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})),Jt=styled$1("div")(()=>({display:"flex",width:"24px",height:"24px",alignItems:"center",justifyContent:"center",borderRadius:"64px;",border:"1px solid #F2F2F2;"})),ce=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}`})),se=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}`})),Qt=styled$1(se)(({theme:e})=>({color:e.palette.info.dark,backgroundColor:e.palette.info.light,borderColor:e.palette.divider,minWidth:"88px",height:"24px"})),Yt=styled$1(se)(({theme:e})=>({color:e.palette.grey.A700,backgroundColor:`${e.palette.grey.A700}1A`,minWidth:"88px",height:"24px"})),er=styled$1(le)(()=>({fontSize:"11px",textAlign:"left",display:"flex",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",gap:"4px",textOverflow:"ellipsis",whiteSpace:"nowrap"})),tr=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),rr=styled$1("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0})),or=styled$1("img")(()=>({width:"36px",height:"24px"})),nr=styled$1("div")(({percentage:e,isCapture:t,theme:r})=>({background:`conic-gradient(${t?r.palette.info.dark:"#656565"} ${e}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${t?r.palette.info.dark:"#656565"}`}));var de=styled(P)(()=>({display:"flex",gap:"8px",overflow:"visible"})),lt=["trackWidth","minTrackWidth","slotSize","hoverZIndex"],me=styled("div",{shouldForwardProp:e=>!lt.includes(e)})(({trackWidth:e,minTrackWidth:t,slotSize:r,hoverZIndex:o})=>({position:"relative",overflow:"visible",width:e,minWidth:t,height:r,transition:`width ${.22}s ease-out`,...o!==void 0?{zIndex:o}:{}})),B=styled(P)(()=>({display:"flex",alignItems:"center",paddingRight:"8px","& .chip-stack-overlap-slot":{marginRight:"-8px",position:"relative",zIndex:1},"& .chip-stack-overlap-slot:hover":{zIndex:2}}));function ue(e){return {display:"flex",alignItems:"center",justifyContent:"center",width:`var(--chip-stack-slot-size, ${24}px)`,height:`var(--chip-stack-slot-size, ${24}px)`,borderRadius:"50%",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.common.white,flexShrink:0}}var he=styled(({title:e,className:t,...r})=>e!=null&&e!==""?jsx(p,{title:e,wrapperProps:{className:"chip-stack-overlap-slot"},children:jsx(P,{className:t,...r})}):jsx(P,{className:["chip-stack-overlap-slot",t].filter(Boolean).join(" "),...r}))(({theme:e})=>({...ue(e),overflow:"hidden",lineHeight:0,boxSizing:"border-box",padding:0,"& > *":{width:"100%",height:"100%",minWidth:0,minHeight:0},"& img":{display:"block",width:"100%",height:"100%",objectFit:"contain"}})),V=styled(({title:e,...t})=>jsx(p,{title:e??"",wrapperProps:{className:"chip-stack-overlap-slot"},children:jsx(P,{...t})}))(({theme:e})=>({...ue(e),fontSize:`max(${8}px, calc(var(--chip-stack-slot-size, ${24}px) * ${8.5} / ${24}))`,fontWeight:500,color:e.palette.text.disabled}));function fe({overflowItems:e,size:t}){let r=`${Math.max(8,8.5*t/24)}px`;return jsxs(P,{sx:{width:t,height:t,borderRadius:"50%",border:o=>`1px solid ${o.palette.divider}`,display:"flex",alignItems:"center",justifyContent:"center",fontSize:r,fontWeight:600,bgcolor:"action.hover",flexShrink:0},children:["+",e.length]})}var ct=["faceSize","avatarFill"],Se=styled(ce,{shouldForwardProp:e=>!ct.includes(e)})(({theme:e,faceSize:t,avatarFill:r})=>{let o=`${t}px`,i=`${Math.max(7,8.5*t/24)}px`;return {width:o,height:o,fontSize:i,fontWeight:500,lineHeight:"100%",letterSpacing:"0%",textAlign:"center",color:e.palette.common.white,background:r,backgroundSize:"cover","&.MuiAvatar-colorDefault":{background:r,color:e.palette.common.white},"& .MuiAvatar-img":{objectFit:"cover"}}});function xe(e){return e==="fanout-left"?"left":e==="fanout-center"?"center":"right"}function Ce(e,t,r){return e==="static"?t?"static-children":r?"static-items":null:t?"animated-children":r?"animated-items":null}function ge({size:e,stackStep:t,gap:r,minTrackWidth:o}){let i=e??24,n=t??Math.round(i/2),l=r??Math.max(1,Math.round(i*3/24)),a=o??Math.max(60,Math.round(i*60/24));return {size:i,stackStep:n,gap:l,minTrackWidth:a}}function ke(e,t){if(e<=0)return 0;switch(t){case "right":return 0;case "left":return e-1;default:return Math.floor((e-1)/2)}}function ye(e,t){return t!==void 0&&e>t}function M(e,t){return t===void 0||t<1||e.length<t?{visibleItems:e,hiddenItems:[]}:{visibleItems:e.slice(0,t-1),hiddenItems:e.slice(t-1)}}function ht(e,t){return isValidElement(e)&&e.key!=null&&e.key!==""?String(e.key):`chip-stack-child-${t}`}function Z({items:e,maxItems:t,getItemKey:r,renderItem:o,renderOverflow:i,slotSize:n}){let l={slotSize:n};if(e.length===0)return [];let{visibleItems:a,hiddenItems:p}=M(e,t),c=a.map((d,s)=>({key:r(d,s),render:()=>o(d,s,l)}));return p.length>0&&c.push({key:`chip-stack-overflow-${p.length}-${a.length}`,render:()=>i({items:e,overflowItems:p,size:n})}),c}function be({children:e,maxItems:t,slotSize:r,renderOverflow:o}){let i=Children.toArray(e);return Z({items:i,maxItems:t,getItemKey:ht,renderItem:n=>n,renderOverflow:o,slotSize:r})}function Ae(e,t){return e.length===t.length&&e.every((r,o)=>r===t[o])}function X(e,t,r){return e[t]??r}function ve(e,t,r,o,i,n){if(e===0)return [];let l=t*i,a=new Array(e);a[t]=l;for(let p=t-1;p>=0;p-=1)a[p]=a[p+1]-X(r,p,n)-o;for(let p=t+1;p<e;p+=1)a[p]=a[p-1]+X(r,p-1,n)+o;return a}function Te(e,t,r){return e<=0?0:(e-1)*t+r}function Re(e,t,r,o){return Array.from({length:e},(i,n)=>e<=1||!t?0:r[n]-n*o)}function Ie(e,t,r,o,i){if(e<=0)return 0;let n=t.map((p,c)=>p+X(r,c,i)),l=Math.min(...t),a=Math.max(...n);return Math.max(o,a-l)}function Pe(e,t,r){return Array.from({length:e},(o,i)=>{let n=t.current[i];return n?n.offsetWidth:r})}function j(e,t){return e.id??`${e.first}-${e.last}-${t}`}function we(e){return [e.first,e.last].map(t=>t?.[0]).filter(t=>t!=null&&t!=="").join("")}function _e(e){if(e.tooltip!==void 0)return e.tooltip===null?null:e.tooltip;let t=`${e.first||""} ${e.last||""}`.trim();return t!==""?t:null}function Ne({slotCount:e,anchorIndex:t,size:r,stackStep:o,gap:i,fanOutEnabled:n,compact:l}){let[a,p]=useState(false),[c,d]=useState(()=>Array.from({length:e},()=>r)),s=useRef(null),S=useRef([]),g=useRef(null),k=useCallback(()=>{let R=Pe(e,S,r);d(b=>Ae(b,R)?b:R);},[e,r]),u=useCallback(()=>{g.current&&cancelAnimationFrame(g.current),g.current=requestAnimationFrame(k);},[k]),y=useMemo(()=>ve(e,t,c,i,o,r),[e,t,c,i,o,r]),A=useMemo(()=>Re(e,n&&a,y,o),[e,n,a,y,o]),x=useMemo(()=>Te(e,o,r),[e,o,r]),O=useMemo(()=>Ie(e,y,c,x,r),[e,y,c,x,r]),C=useCallback(()=>{n&&(s.current&&clearTimeout(s.current),p(true));},[n]),h=useCallback(()=>{n&&(s.current&&clearTimeout(s.current),s.current=setTimeout(()=>p(false),120));},[n]);useEffect(()=>()=>{s.current&&clearTimeout(s.current);},[]),useEffect(()=>{n||p(false);},[n]),useLayoutEffect(()=>{d(Array.from({length:e},()=>r));},[e,r]),useLayoutEffect(()=>{k();},[e,r,k]),useEffect(()=>(u(),window.addEventListener("resize",u),()=>{window.removeEventListener("resize",u),g.current&&cancelAnimationFrame(g.current);}),[u]);let v=n&&a?O:l?r:x,T=n&&a,N=useMemo(()=>l?Array.from({length:e},(R,b)=>b===t||a?1:0):Array.from({length:e},()=>1),[l,e,t,a]);return {isHovering:a,handleMouseEnter:C,handleMouseLeave:h,slotRefs:S,translateX:A,slotOpacity:N,collapsedStackWidthPx:x,fannedRowWidthPx:O,trackWidth:v,hoverZIndexActive:T}}function D({items:e,children:t,maxItems:r,getItemKey:o,renderItem:i,renderOverflow:n,fanOutDirection:l,compact:a=false,"data-testid":p,sx:c,className:d,slotProps:s}){let S=Children.count(t)>0,{zIndex:g=1e3,size:k,stackStep:u,gap:y,minTrackWidth:A}=s?.layout??{},x=useMemo(()=>S?Children.toArray(t??null).length:e?.length??0,[S,t,e]),C=!(!a&&ye(x,r)),{size:h,stackStep:F,gap:v,minTrackWidth:T}=useMemo(()=>ge({size:k,stackStep:u,gap:y,minTrackWidth:A}),[k,u,y,A]),N=n??fe,R=useMemo(()=>S?be({children:t??null,maxItems:r,slotSize:h,renderOverflow:N}):!e?.length||!o||!i?[]:Z({items:e,maxItems:r,getItemKey:o,renderItem:i,slotSize:h,renderOverflow:N}),[S,t,e,r,o,i,N,h]),b=R.length,Ke=useMemo(()=>ke(b,l),[b,l]),{handleMouseEnter:He,handleMouseLeave:De,slotRefs:$e,translateX:Be,slotOpacity:te,collapsedStackWidthPx:Xe,trackWidth:Ze,hoverZIndexActive:je}=Ne({slotCount:b,anchorIndex:Ke,size:h,stackStep:F,gap:v,fanOutEnabled:C,compact:a});if(b===0)return null;let{sx:z,...Ue}=s?.shell??{},{style:Ge,...qe}=s?.track??{};return jsx(de,{className:d,...Ue,sx:[{justifyContent:"flex-start",...C||a?{width:"100%"}:{}},...Array.isArray(c)?c:c!=null?[c]:[],...Array.isArray(z)?z:z!=null?[z]:[]],children:jsx(me,{"data-testid":p,...qe,style:Ge,onMouseEnter:C?He:void 0,onMouseLeave:C?De:void 0,trackWidth:Ze,minTrackWidth:a?h:Math.max(T,Xe),slotSize:h,hoverZIndex:je?g:void 0,children:R.map((re,I)=>jsx(motion.div,{ref:Je=>{$e.current[I]=Je;},initial:false,animate:{x:Be[I]??0,opacity:te[I]??1},transition:{duration:.22,ease:"easeOut"},style:{position:"absolute",top:0,left:I*F,zIndex:I,width:h,height:h,pointerEvents:te[I]===0?"none":"auto"},children:re.render()},re.key))})})}function Ct({children:e,maxItems:t,renderOverflow:r,slotSize:o=24,sx:i,...n}){let l=useMemo(()=>St.Children.toArray(e),[e]),{visibleItems:a,hiddenItems:p}=useMemo(()=>M(l,t),[l,t]),c=p.length>0,d=useMemo(()=>[{"--chip-stack-slot-size":`${o}px`},...Array.isArray(i)?i:i!=null?[i]:[]],[o,i]);if(!c)return jsx(B,{"data-testid":"ChipStack",...n,sx:d,children:e});let s=r?.({items:l,overflowItems:p,size:o});return jsxs(B,{"data-testid":"ChipStack",...n,sx:d,children:[a,s??jsx(V,{title:`${p.length} more`,children:jsxs("span",{children:["+",p.length]})})]})}var Q=memo(Ct);function kt(e){return jsx(he,{"data-testid":"OverlapChip",...e})}var Y=memo(kt);var bt=["static","fanout-right","fanout-left","fanout-center"],ee="static";function vt(e){let{variant:t=ee,maxItems:r,renderOverflow:o,children:i,items:n,getItemKey:l,renderItem:a,compact:p=false,"data-testid":c,slotProps:d,sx:s,className:S}=e,g=Children.count(i??null)>0,k=!g&&(n?.length??0)>0&&l!=null&&a!=null,u=Ce(t,g,k);if(u===null)return null;if(u==="static-children"||u==="static-items"){let x=d?.layout?.size??24;if(u==="static-items"&&n&&l&&a){let{visibleItems:O,hiddenItems:C}=M(n,r),h=C.length>0?o?.({items:n,overflowItems:C,size:x})??jsx(V,{title:`${C.length} more`,children:jsxs("span",{children:["+",C.length]})}):null,F=jsxs(Fragment,{children:[O.map((v,T)=>jsx(Y,{children:a(v,T,{slotSize:x})},l(v,T))),h]});return jsx(Q,{"data-testid":c,slotSize:x,sx:s,className:S,children:F})}return jsx(Q,{"data-testid":c,maxItems:r,renderOverflow:o,slotSize:x,sx:s,className:S,children:i})}let y=xe(t),A={maxItems:r,renderOverflow:o,fanOutDirection:y,compact:p,"data-testid":c??"ChipStack",slotProps:d,sx:s,className:S};return u==="animated-children"?jsx(D,{...A,children:i}):jsx(D,{...A,items:n,getItemKey:l,renderItem:a})}var ze=vt;function wt({item:e,sourceIndex:t,slotSize:r}){let[o,i]=useState(false),n=useRef(null);useEffect(()=>{i(false);},[e.logo]);let l=!e.logo||o,a=j(e,t),p$1="transparent";l&&(n.current?.key!==a&&(n.current={key:a,fill:Aa()}),p$1=n.current.fill);let c=jsx(Se,{faceSize:r,avatarFill:p$1,src:l?void 0:e.logo,slotProps:l?void 0:{img:{onError:()=>i(true)}},children:we(e)}),d=_e(e);return d!=null&&d!==""?jsx(p,{title:d,children:c}):c}var _t=wt;var to=ze;export{le as a,Xt as b,Zt as c,jt as d,Ut as e,Gt as f,qt as g,Jt as h,ce as i,se as j,Qt as k,Yt as l,er as m,tr as n,rr as o,or as p,nr as q,f as r,$ as s,j as t,Y as u,bt as v,ee as w,ze as x,_t as y,to as z};
@@ -1 +1 @@
1
- import {V,R}from'./chunk-GSRK5GJH.js';import {zc}from'./chunk-EGJV4FA6.js';import {vb}from'./chunk-M5HS3EYQ.js';import {useId,useState,useRef,useMemo}from'react';import T from'@mui/material/Box';import {ClickAwayListener}from'@mui/material';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var h=styled("span")(()=>({fontSize:"11px"})),I=styled(V)(()=>({display:"flex",alignItems:"center",paddingInline:"16px",gap:"4px",borderBlock:"1px solid #F2F2F2",fontSize:"11px","&:hover":{backgroundColor:"#fff",boxShadow:"0px 0px 16px 0px #00000021"}})),M=styled(V)(({theme:e})=>({color:e.palette.info.dark,backgroundColor:"#F4F4F4",fontWeight:600,paddingInline:"16px",fontSize:"11px",gap:"4px"})),k=styled(V)(()=>({gap:"2px",paddingInline:"16px",fontSize:"11px","&:hover":{backgroundColor:"#fff",boxShadow:"0px 0px 16px 0px #00000021"}})),A=styled("img")({marginLeft:"auto",width:16,height:12}),b=styled("img")({borderRadius:"2px",width:16,height:12,flexShrink:0}),w={marginTop:"8px",marginBottom:"8px",maxHeight:"190px",overflow:"auto"},P={zIndex:99999};function s({onCountriesChange:e,sx:L,selectedCountries:r,countriesOptions:i}){let B=zc(useId(),"country-filter"),[a,g]=useState(null),f=useRef(null),y=!!a,E=()=>{if(!y){g(f.current);return}d();},d=()=>{g(null);},z=t=>r?.includes(t)??false,u=t=>{e(t);},H=t=>{let o=r?.includes(t)?r?.filter(m=>m!==t):[...r??[],t];u(o),e(o);},x=useMemo(()=>r?.length===i.length,[r,i]);return jsx(ClickAwayListener,{onClickAway:d,children:jsxs(T,{ref:f,sx:L,id:B,"data-testid":"CountryFilter",children:[jsx(T,{children:jsxs(I,{onMouseEnter:t=>{t.stopPropagation(),E();},startAdornment:null,children:[jsx(h,{children:"Country"}),jsx(A,{src:vb,alt:""})]})}),jsxs(R,{open:y,anchorEl:a,sx:w,placement:"right-start",popperSx:P,children:[jsx(M,{onClick:t=>{t.stopPropagation(),x?(u([]),e([])):(u(i.map(({value:o})=>o)),e(i.map(({value:o})=>o)));},isSelected:x,children:x?"Unselect All":"Select All"}),i.map(({value:t,label:o,icon:m})=>jsxs(k,{isSelected:z(t),onClick:()=>H(t),children:[jsx(b,{src:m,alt:""}),o]},t))]})]})})}var tt=s;export{s as a,tt as b};
1
+ import {V,R}from'./chunk-KWNPF24A.js';import {zc}from'./chunk-VFRJFEIJ.js';import {vb}from'./chunk-M5HS3EYQ.js';import {useId,useState,useRef,useMemo}from'react';import T from'@mui/material/Box';import {ClickAwayListener}from'@mui/material';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var h=styled("span")(()=>({fontSize:"11px"})),I=styled(V)(()=>({display:"flex",alignItems:"center",paddingInline:"16px",gap:"4px",borderBlock:"1px solid #F2F2F2",fontSize:"11px","&:hover":{backgroundColor:"#fff",boxShadow:"0px 0px 16px 0px #00000021"}})),M=styled(V)(({theme:e})=>({color:e.palette.info.dark,backgroundColor:"#F4F4F4",fontWeight:600,paddingInline:"16px",fontSize:"11px",gap:"4px"})),k=styled(V)(()=>({gap:"2px",paddingInline:"16px",fontSize:"11px","&:hover":{backgroundColor:"#fff",boxShadow:"0px 0px 16px 0px #00000021"}})),A=styled("img")({marginLeft:"auto",width:16,height:12}),b=styled("img")({borderRadius:"2px",width:16,height:12,flexShrink:0}),w={marginTop:"8px",marginBottom:"8px",maxHeight:"190px",overflow:"auto"},P={zIndex:99999};function s({onCountriesChange:e,sx:L,selectedCountries:r,countriesOptions:i}){let B=zc(useId(),"country-filter"),[a,g]=useState(null),f=useRef(null),y=!!a,E=()=>{if(!y){g(f.current);return}d();},d=()=>{g(null);},z=t=>r?.includes(t)??false,u=t=>{e(t);},H=t=>{let o=r?.includes(t)?r?.filter(m=>m!==t):[...r??[],t];u(o),e(o);},x=useMemo(()=>r?.length===i.length,[r,i]);return jsx(ClickAwayListener,{onClickAway:d,children:jsxs(T,{ref:f,sx:L,id:B,"data-testid":"CountryFilter",children:[jsx(T,{children:jsxs(I,{onMouseEnter:t=>{t.stopPropagation(),E();},startAdornment:null,children:[jsx(h,{children:"Country"}),jsx(A,{src:vb,alt:""})]})}),jsxs(R,{open:y,anchorEl:a,sx:w,placement:"right-start",popperSx:P,children:[jsx(M,{onClick:t=>{t.stopPropagation(),x?(u([]),e([])):(u(i.map(({value:o})=>o)),e(i.map(({value:o})=>o)));},isSelected:x,children:x?"Unselect All":"Select All"}),i.map(({value:t,label:o,icon:m})=>jsxs(k,{isSelected:z(t),onClick:()=>H(t),children:[jsx(b,{src:m,alt:""}),o]},t))]})]})})}var tt=s;export{s as a,tt as b};