@tap-payments/os-micro-frontend-shared 0.3.306 → 0.3.308

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 (60) hide show
  1. package/build/_chunks/chunk-EAAJJGUI.js +1 -0
  2. package/build/_chunks/{chunk-GSPSUKZC.js → chunk-EEONDBAL.js} +1 -1
  3. package/build/_chunks/{chunk-OAPCRKFH.js → chunk-GD5PXPUD.js} +1 -1
  4. package/build/_chunks/chunk-JBE2LXDH.js +1 -0
  5. package/build/_chunks/chunk-JYVB2MAR.js +1 -0
  6. package/build/_chunks/chunk-LKYA6XFU.js +9 -0
  7. package/build/_chunks/chunk-PF4KBDPV.js +1 -0
  8. package/build/_chunks/{chunk-6UI52RXI.js → chunk-R2J57DPG.js} +1 -1
  9. package/build/_chunks/{chunk-H6IWML5L.js → chunk-TJMY7Q26.js} +1 -1
  10. package/build/_chunks/chunk-YG4CT6O4.js +1 -0
  11. package/build/_chunks/chunk-YMEGCVZ4.js +2 -0
  12. package/build/components/Autocomplete/index.js +1 -1
  13. package/build/components/ColumnViews/index.js +1 -1
  14. package/build/components/FilterPopover/index.js +1 -1
  15. package/build/components/GroupedSelect/index.js +1 -1
  16. package/build/components/ListHeader/index.js +1 -1
  17. package/build/components/MultiLevelSelect/index.js +1 -1
  18. package/build/components/Select/SelectField.d.ts +1 -1
  19. package/build/components/Select/constants.d.ts +24 -0
  20. package/build/components/Select/index.d.ts +1 -1
  21. package/build/components/Select/index.js +1 -1
  22. package/build/components/Select/style.d.ts +12 -0
  23. package/build/components/Select/type.d.ts +11 -2
  24. package/build/components/Select/utils.d.ts +11 -2
  25. package/build/components/Sidebar/index.js +1 -1
  26. package/build/components/StatusIcons/index.js +1 -1
  27. package/build/components/TableCells/index.js +1 -1
  28. package/build/components/WindowServices/index.js +1 -1
  29. package/build/components/WindowServices/style.d.ts +3 -1
  30. package/build/components/index.d.ts +1 -2
  31. package/build/components/index.js +1 -1
  32. package/build/components/modules/WindowShell/index.js +1 -1
  33. package/build/components/modules/index.js +1 -1
  34. package/build/datetime/components/index.d.ts +0 -2
  35. package/build/datetime/components/index.js +2 -2
  36. package/build/index.js +1 -1
  37. package/package.json +1 -1
  38. package/build/_chunks/chunk-2JFMUHGQ.js +0 -9
  39. package/build/_chunks/chunk-2LO4STE5.js +0 -1
  40. package/build/_chunks/chunk-B2NOP2A5.js +0 -1
  41. package/build/_chunks/chunk-EWENP3LB.js +0 -1
  42. package/build/_chunks/chunk-KBXWH3SO.js +0 -1
  43. package/build/_chunks/chunk-LFCRVEVB.js +0 -1
  44. package/build/_chunks/chunk-MLOWKQDW.js +0 -1
  45. package/build/_chunks/chunk-QKEB3XTE.js +0 -2
  46. package/build/components/CurrenciesMenu/CountryFlag.d.ts +0 -10
  47. package/build/components/CurrenciesMenu/CurrenciesMenu.d.ts +0 -4
  48. package/build/components/CurrenciesMenu/OptionContent.d.ts +0 -5
  49. package/build/components/CurrenciesMenu/OptionRow.d.ts +0 -5
  50. package/build/components/CurrenciesMenu/constants.d.ts +0 -15
  51. package/build/components/CurrenciesMenu/icons.d.ts +0 -3
  52. package/build/components/CurrenciesMenu/index.d.ts +0 -4
  53. package/build/components/CurrenciesMenu/index.js +0 -1
  54. package/build/components/CurrenciesMenu/style.d.ts +0 -32
  55. package/build/components/CurrenciesMenu/type.d.ts +0 -64
  56. package/build/components/CurrenciesMenu/utils.d.ts +0 -9
  57. package/build/datetime/components/DateRangeFilter/DateRangeFilter.d.ts +0 -9
  58. package/build/datetime/components/DateRangeFilter/index.d.ts +0 -2
  59. package/build/datetime/components/DateRangeFilter/style.d.ts +0 -32
  60. package/build/datetime/components/DateRangeFilter/types.d.ts +0 -11
@@ -1 +1 @@
1
- import {f,g,h as h$2,i as i$1,b}from'./chunk-2BU56HDE.js';import {d,c as c$1}from'./chunk-EWENP3LB.js';import {h as h$1,i,b as b$1,c as c$2,f as f$2,e,d as d$1,j as j$1}from'./chunk-5FR3LFXC.js';import {h,c,f as f$1}from'./chunk-ISC5KT5E.js';import {Db,Eb}from'./chunk-XBJ4RS2B.js';import'./chunk-EYLBXWXJ.js';import {memo,forwardRef,useState,useEffect,useRef}from'react';import {createPortal}from'react-dom';import oo from'@mui/material/Backdrop';import {styled,alpha}from'@mui/material/styles';import v from'@mui/material/Box';import {motion,animate}from'framer-motion';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var H="os-shared-WindowShell",x={root:`${H}-root`,sidebar:`${H}-sidebar`,body:`${H}-body`,panel:`${H}-panel`};var we=styled(v)(()=>({display:"flex",flexDirection:"row",flex:1,minHeight:0,height:"100%",backgroundColor:"transparent"})),xe=styled(v)(()=>({flexShrink:0,overflow:"hidden auto",backgroundColor:"transparent",transition:"none"})),be=styled(v)(({theme:e})=>({flexShrink:0,overflow:"hidden auto",borderLeft:`1px solid ${e.palette.divider}`,backgroundColor:"transparent",transition:"none"})),ye=styled(v)(()=>({display:"flex",flexDirection:"column",flex:1,minWidth:0,minHeight:0})),ze=styled(v,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative",width:e})),Ne=styled(motion.div)(()=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative"})),Ce=styled(motion.div,{shouldForwardProp:e=>e!=="$slotWidth"})(({$slotWidth:e})=>({width:e,minWidth:e,minHeight:"100%",height:"100%",overflow:"hidden"})),Ie=styled(v,{shouldForwardProp:e=>e!=="$visible"&&e!=="$duration"})(({$visible:e=true,$duration:o=h})=>({display:"flex",alignItems:"center",overflow:"hidden",whiteSpace:"nowrap",flexShrink:0,maxWidth:e?160:0,opacity:e?1:0,pointerEvents:e?"auto":"none",transition:o>0?`max-width ${.3*o}s ease-in-out, opacity ${.24*o}s ease-in-out`:"none"})),Te=styled(h$1,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e}:null})),Pe=styled(i,{shouldForwardProp:e=>e!=="$width"&&e!=="$justifyContent"})(({$width:e,$justifyContent:o="flex-start"})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e,justifyContent:o}:null}));var Ue=220;function ge(e,o,a){return Math.min(Math.max(e,o??0),a??1/0)}function Ae(e,o,a,n){if(Math.abs(e-o)<=1)return;let r=animate(0,1,{duration:a,onUpdate:t=>{n(s=>({...s,width:e+(o-e)*t}));}});return ()=>r.stop()}function G(e,o){if(e===false)return {duration:0,resize:o};let a=typeof e=="object"?e:void 0,n=a?.duration;return {duration:typeof n=="number"&&Number.isFinite(n)?Math.max(0,n):h,resize:a?.resize??o}}function j(e){return e?.children==null||e.expand?.isExpanded===false?false:e.expand?.isExpanded===true}function F(e,o=Ue){let a=Array.isArray(e)?e.flat():[e];for(let n=a.length-1;n>=0;n--){let r=a[n];if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&typeof r.width=="number")return r.width}return o}function Ee(e){let o=e["data-id"]??e.id;return o!=null?{"data-id":o}:{}}function Me({kind:e,slot:o,isOpen:a,fullWidth:n,wrapperWidth:r,animateWrapperWidth:t,animation:s}){let p=e==="sidebar"?xe:be,d=e==="sidebar"?x.sidebar:x.panel,m=o["data-testid"]?`${o["data-testid"]}Wrapper`:e==="sidebar"?"WindowShellSidebarWrapper":"WindowShellPanelWrapper",i=o["data-testid"]??o.id??(e==="sidebar"?"WindowShellSidebar":"WindowShellPanel"),l=Ee(o),u=jsx(p,{id:o.id,className:Eb(d,o.className),"data-testid":i,...l,sx:Db({width:n,minWidth:0},o.sx),children:jsx(Ce,{$slotWidth:n,initial:false,animate:{x:a?0:-n},transition:{duration:s.duration},children:o.children})});return t?jsx(Ne,{"data-testid":m,...l,initial:false,animate:{width:r},transition:{duration:s.duration},children:u}):jsx(ze,{"data-testid":m,...l,$width:r,children:u})}Me.displayName="WindowShellSlotColumn";var J=memo(Me);function De({baseWindowWidth:e,sidebar:o,panel:a,content:n,bodyContent:r,sidebarOpen:t,showPanel:s,sidebarFullWidth:p,panelFullWidth:d,sidebarAnimation:m,panelAnimation:i}){let{size:l}=b(),u=i.resize==="window",W=typeof e=="number"?Math.max(0,e-(u?d:0)-(m.resize==="window"&&!t?p:0)):l.width,b$1=u?s?Math.min(d,Math.max(0,l.width-W)):0:s?d:0,y=t?p:0;return jsxs(we,{className:Eb(x.root),children:[o?.children?jsx(J,{kind:"sidebar",slot:o,isOpen:t,fullWidth:p,wrapperWidth:y,animateWrapperWidth:true,animation:m}):null,jsx(ye,{id:n?.id?`${n.id}Body`:void 0,className:Eb(x.body,n?.className),"data-testid":n?.["data-testid"]?`${n["data-testid"]}Body`:n?.id?`${n.id}Body`:"WindowShellBody",...(n?.["data-id"]??n?.id)!=null?{"data-id":n?.["data-id"]?`${n["data-id"]}Body`:`${n?.id}Body`}:null,sx:n?.sx,children:r}),a?.children?jsx(J,{kind:"panel",slot:a,isOpen:s,fullWidth:d,wrapperWidth:b$1,animateWrapperWidth:!u,animation:i}):null]})}De.displayName="WindowShellSlotsLayout";var Re=memo(De);function $e({sidebarOpen:e,showPanel:o,sidebarResize:a,panelResize:n,sidebarDuration:r,panelDuration:t}){let{size:s,setSize:p,defaultSize:d,minSize:m,maxSize:i}=b(),l=useRef(s);l.current=s;let u=useRef(d.width),W=useRef(e),b$1=useRef(o),y=useRef(d.width);return useEffect(()=>{let C=b$1.current!==o,w=W.current!==e,E=y.current!==d.width;b$1.current=o,W.current=e,y.current=d.width;let S;if(w&&a==="window"?S=r:(C&&n==="window"||E&&!C&&!w)&&(S=t),S==null)return;let h=ge(d.width,m?.width,i?.width);return u.current=h,Ae(l.current.width,h,S,p)},[d.width,o,e,a,n,r,t,m?.width,i?.width,p]),null}$e.displayName="WindowShellAnimator";var Oe=memo($e);function ve({toolbar:e$1,sidebar:o,panel:a,animationDuration:n=h}){let{title:r,titleIcon:t,onClose:s,onMinimize:p,onMaximize:d,startAdornment:m,endAdornment:i,id:l,className:u,"data-testid":W,"data-id":b$2,sx:y}=e$1??{},{isMaximized:C}=b(),w=typeof s=="function"?s:void 0,E=typeof p=="function"?p:void 0,S=typeof d=="function"?d:void 0,h=o?.expand,c=a?.expand,z=j(a),L=h?.isExpanded??true,M=h!=null&&o?.children!=null,D=c!=null&&a?.children!=null&&z,k=M&&D,V=F(a?.sx),_=o!=null?F(o.sx):0,I=Math.max(_,V),T=k&&L?I:void 0,Z=D?I:void 0,X=D;return jsxs(b$1,{id:l??f$1,className:u,"data-testid":W??l??"WindowToolbar","data-id":b$2??l,sx:y,children:[jsxs(Te,{$width:T,children:[w?jsx(c$2,{onClick:w}):null,E?jsx(f$2,{onClick:E}):null,S?jsx(e,{isMaximized:C,onClick:S}):null,M&&h?jsx(d$1,{direction:h.isExpanded??true?"left":"right",active:h.isExpanded??true,onClick:h.onExpand,children:h.label}):null,m]}),jsx(j$1,{title:r,icon:t}),jsxs(Pe,{$width:Z,$justifyContent:i?"space-between":"flex-start",children:[D?jsx(Ie,{$visible:X,$duration:n,children:jsx(d$1,{sx:{flexShrink:0},direction:c?.isExpanded??true?"left":"right",active:z,onClick:c?.onExpand,children:c?.label})}):null,i]})]})}ve.displayName="WindowShellToolbar";var Fe=memo(ve);var Be=forwardRef(function({isOpen:o,className:a,sx:n,toolbar:r,services:t,sidebar:s,panel:p,footer:d$1,content:m,window:i,backdrop:l},u){let W=t?.list??[],b=(t?.isLoading??false)||W.length>0,y=d$1!=null&&(d$1.isVisible??true),C=s?.children,w=F(s?.sx),E=p?.children,S=p!=null?F(p.sx):0,h=m?.children,c$2=s?.expand?.isExpanded??C!=null,z=j(p),L=!!(C||E),[M,D]=useState(w),[k,V]=useState(S);useEffect(()=>{c$2&&D(w),z&&V(S);},[c$2,w,z,S]);let _=r?.onClose??r?.onMinimize??(()=>{}),I=G(s?.animation,"in-place"),T=G(p?.animation,"in-place"),Z=(()=>{let P=i?.defaultSize;if(typeof P?.width!="number")return P;let oe=(I.resize==="window"&&!c$2?M:0)+(T.resize==="window"&&!z?k:0);return oe>0?{...P,width:Math.max(0,P.width-oe)}:P})(),X={height:i?.minSize?.height??i?.defaultSize?.height??c,...i?.minSize?.width!=null?{width:i.minSize.width}:null},Le=l!=null&&(l.isVisible??true)&&o&&!i?.isMinimized,_e=(i?.order??0)+10-1,ee=jsx(oo,{open:true,onClick:_,id:l?.id,className:l?.className,"data-testid":l?.["data-testid"]??l?.id??"WindowShellBackdrop",...(l?.["data-id"]??l?.id)!=null?{"data-id":l?.["data-id"]??l?.id}:null,sx:Db({zIndex:_e,backgroundColor:P=>alpha(P.palette.common.black,.3)},l?.sx)});return jsxs(Fragment,{children:[Le&&(i?.disablePortal?ee:createPortal(ee,document.body)),jsxs(f,{ref:u,isOpen:o,onClose:_,defaultSize:Z,minSize:X,maxSize:i?.maxSize,defaultPosition:i?.defaultPosition,containerRef:i?.containerRef,order:i?.order,isMinimized:i?.isMinimized,isMaximized:i?.isMaximized,id:i?.id,className:Eb(x.root,i?.className,a),sx:n,onResize:i?.onResize,onDragStart:i?.onDragStart,onMouseDown:i?.onMouseDown,onClick:i?.onClick,disablePortal:i?.disablePortal,"data-testid":i?.["data-testid"]??i?.id,"data-id":i?.["data-id"]??i?.id,children:[jsx(Oe,{sidebarOpen:c$2,showPanel:z,sidebarWidth:M,panelWidth:k,sidebarResize:I.resize,panelResize:T.resize,sidebarDuration:I.duration,panelDuration:T.duration}),jsx(Fe,{toolbar:r,sidebar:s,panel:p,animationDuration:T.duration}),b?t?.isLoading?jsx(d,{appCode:t?.appCode,id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:Db({height:"auto",flexShrink:0},t?.sx)}):jsx(c$1,{services:W,serviceCode:t?.activeCode??"",onOpenService:t?.onOpen,onOpenServiceInNewWindow:t?.onOpenInNewWindow,language:t?.language??"en",openInNewWindowLabel:t?.openInNewWindowLabel??"Open in new window",id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:t?.sx}):null,jsx(g,{id:m?.id,className:m?.className,"data-testid":m?.["data-testid"]??m?.id,"data-id":m?.["data-id"]??m?.id,sx:L?void 0:m?.sx,children:L?jsx(Re,{baseWindowWidth:typeof i?.defaultSize?.width=="number"?i.defaultSize.width:void 0,sidebar:s,panel:p,content:m,bodyContent:h,sidebarOpen:c$2,showPanel:z,sidebarFullWidth:M,panelFullWidth:k,sidebarAnimation:I,panelAnimation:T}):h}),y?jsxs(h$2,{id:d$1?.id,className:d$1?.className,"data-testid":d$1?.["data-testid"]??d$1?.id,"data-id":d$1?.["data-id"]??d$1?.id,sx:d$1?.isVisible===true?Db(d$1?.sx??{},{"&:empty, &:has(> :only-child:empty)":{display:"flex"}}):d$1?.sx,children:[d$1?.children,d$1?.actions?jsx(i$1,{children:d$1.actions}):null]}):null]})]})});Be.displayName="WindowShell";var to=memo(Be);export{x as a,to as b};
1
+ import {f,g,h as h$2,i as i$1,b}from'./chunk-2BU56HDE.js';import {d,c as c$1}from'./chunk-PF4KBDPV.js';import {h as h$1,i,b as b$1,c as c$2,f as f$2,e,d as d$1,j as j$1}from'./chunk-5FR3LFXC.js';import {h,c,f as f$1}from'./chunk-ISC5KT5E.js';import {Db,Eb}from'./chunk-XBJ4RS2B.js';import'./chunk-EYLBXWXJ.js';import {memo,forwardRef,useState,useEffect,useRef}from'react';import {createPortal}from'react-dom';import oo from'@mui/material/Backdrop';import {styled,alpha}from'@mui/material/styles';import v from'@mui/material/Box';import {motion,animate}from'framer-motion';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var H="os-shared-WindowShell",x={root:`${H}-root`,sidebar:`${H}-sidebar`,body:`${H}-body`,panel:`${H}-panel`};var we=styled(v)(()=>({display:"flex",flexDirection:"row",flex:1,minHeight:0,height:"100%",backgroundColor:"transparent"})),xe=styled(v)(()=>({flexShrink:0,overflow:"hidden auto",backgroundColor:"transparent",transition:"none"})),be=styled(v)(({theme:e})=>({flexShrink:0,overflow:"hidden auto",borderLeft:`1px solid ${e.palette.divider}`,backgroundColor:"transparent",transition:"none"})),ye=styled(v)(()=>({display:"flex",flexDirection:"column",flex:1,minWidth:0,minHeight:0})),ze=styled(v,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative",width:e})),Ne=styled(motion.div)(()=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative"})),Ce=styled(motion.div,{shouldForwardProp:e=>e!=="$slotWidth"})(({$slotWidth:e})=>({width:e,minWidth:e,minHeight:"100%",height:"100%",overflow:"hidden"})),Ie=styled(v,{shouldForwardProp:e=>e!=="$visible"&&e!=="$duration"})(({$visible:e=true,$duration:o=h})=>({display:"flex",alignItems:"center",overflow:"hidden",whiteSpace:"nowrap",flexShrink:0,maxWidth:e?160:0,opacity:e?1:0,pointerEvents:e?"auto":"none",transition:o>0?`max-width ${.3*o}s ease-in-out, opacity ${.24*o}s ease-in-out`:"none"})),Te=styled(h$1,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e}:null})),Pe=styled(i,{shouldForwardProp:e=>e!=="$width"&&e!=="$justifyContent"})(({$width:e,$justifyContent:o="flex-start"})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e,justifyContent:o}:null}));var Ue=220;function ge(e,o,a){return Math.min(Math.max(e,o??0),a??1/0)}function Ae(e,o,a,n){if(Math.abs(e-o)<=1)return;let r=animate(0,1,{duration:a,onUpdate:t=>{n(s=>({...s,width:e+(o-e)*t}));}});return ()=>r.stop()}function G(e,o){if(e===false)return {duration:0,resize:o};let a=typeof e=="object"?e:void 0,n=a?.duration;return {duration:typeof n=="number"&&Number.isFinite(n)?Math.max(0,n):h,resize:a?.resize??o}}function j(e){return e?.children==null||e.expand?.isExpanded===false?false:e.expand?.isExpanded===true}function F(e,o=Ue){let a=Array.isArray(e)?e.flat():[e];for(let n=a.length-1;n>=0;n--){let r=a[n];if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&typeof r.width=="number")return r.width}return o}function Ee(e){let o=e["data-id"]??e.id;return o!=null?{"data-id":o}:{}}function Me({kind:e,slot:o,isOpen:a,fullWidth:n,wrapperWidth:r,animateWrapperWidth:t,animation:s}){let p=e==="sidebar"?xe:be,d=e==="sidebar"?x.sidebar:x.panel,m=o["data-testid"]?`${o["data-testid"]}Wrapper`:e==="sidebar"?"WindowShellSidebarWrapper":"WindowShellPanelWrapper",i=o["data-testid"]??o.id??(e==="sidebar"?"WindowShellSidebar":"WindowShellPanel"),l=Ee(o),u=jsx(p,{id:o.id,className:Eb(d,o.className),"data-testid":i,...l,sx:Db({width:n,minWidth:0},o.sx),children:jsx(Ce,{$slotWidth:n,initial:false,animate:{x:a?0:-n},transition:{duration:s.duration},children:o.children})});return t?jsx(Ne,{"data-testid":m,...l,initial:false,animate:{width:r},transition:{duration:s.duration},children:u}):jsx(ze,{"data-testid":m,...l,$width:r,children:u})}Me.displayName="WindowShellSlotColumn";var J=memo(Me);function De({baseWindowWidth:e,sidebar:o,panel:a,content:n,bodyContent:r,sidebarOpen:t,showPanel:s,sidebarFullWidth:p,panelFullWidth:d,sidebarAnimation:m,panelAnimation:i}){let{size:l}=b(),u=i.resize==="window",W=typeof e=="number"?Math.max(0,e-(u?d:0)-(m.resize==="window"&&!t?p:0)):l.width,b$1=u?s?Math.min(d,Math.max(0,l.width-W)):0:s?d:0,y=t?p:0;return jsxs(we,{className:Eb(x.root),children:[o?.children?jsx(J,{kind:"sidebar",slot:o,isOpen:t,fullWidth:p,wrapperWidth:y,animateWrapperWidth:true,animation:m}):null,jsx(ye,{id:n?.id?`${n.id}Body`:void 0,className:Eb(x.body,n?.className),"data-testid":n?.["data-testid"]?`${n["data-testid"]}Body`:n?.id?`${n.id}Body`:"WindowShellBody",...(n?.["data-id"]??n?.id)!=null?{"data-id":n?.["data-id"]?`${n["data-id"]}Body`:`${n?.id}Body`}:null,sx:n?.sx,children:r}),a?.children?jsx(J,{kind:"panel",slot:a,isOpen:s,fullWidth:d,wrapperWidth:b$1,animateWrapperWidth:!u,animation:i}):null]})}De.displayName="WindowShellSlotsLayout";var Re=memo(De);function $e({sidebarOpen:e,showPanel:o,sidebarResize:a,panelResize:n,sidebarDuration:r,panelDuration:t}){let{size:s,setSize:p,defaultSize:d,minSize:m,maxSize:i}=b(),l=useRef(s);l.current=s;let u=useRef(d.width),W=useRef(e),b$1=useRef(o),y=useRef(d.width);return useEffect(()=>{let C=b$1.current!==o,w=W.current!==e,E=y.current!==d.width;b$1.current=o,W.current=e,y.current=d.width;let S;if(w&&a==="window"?S=r:(C&&n==="window"||E&&!C&&!w)&&(S=t),S==null)return;let h=ge(d.width,m?.width,i?.width);return u.current=h,Ae(l.current.width,h,S,p)},[d.width,o,e,a,n,r,t,m?.width,i?.width,p]),null}$e.displayName="WindowShellAnimator";var Oe=memo($e);function ve({toolbar:e$1,sidebar:o,panel:a,animationDuration:n=h}){let{title:r,titleIcon:t,onClose:s,onMinimize:p,onMaximize:d,startAdornment:m,endAdornment:i,id:l,className:u,"data-testid":W,"data-id":b$2,sx:y}=e$1??{},{isMaximized:C}=b(),w=typeof s=="function"?s:void 0,E=typeof p=="function"?p:void 0,S=typeof d=="function"?d:void 0,h=o?.expand,c=a?.expand,z=j(a),L=h?.isExpanded??true,M=h!=null&&o?.children!=null,D=c!=null&&a?.children!=null&&z,k=M&&D,V=F(a?.sx),_=o!=null?F(o.sx):0,I=Math.max(_,V),T=k&&L?I:void 0,Z=D?I:void 0,X=D;return jsxs(b$1,{id:l??f$1,className:u,"data-testid":W??l??"WindowToolbar","data-id":b$2??l,sx:y,children:[jsxs(Te,{$width:T,children:[w?jsx(c$2,{onClick:w}):null,E?jsx(f$2,{onClick:E}):null,S?jsx(e,{isMaximized:C,onClick:S}):null,M&&h?jsx(d$1,{direction:h.isExpanded??true?"left":"right",active:h.isExpanded??true,onClick:h.onExpand,children:h.label}):null,m]}),jsx(j$1,{title:r,icon:t}),jsxs(Pe,{$width:Z,$justifyContent:i?"space-between":"flex-start",children:[D?jsx(Ie,{$visible:X,$duration:n,children:jsx(d$1,{sx:{flexShrink:0},direction:c?.isExpanded??true?"left":"right",active:z,onClick:c?.onExpand,children:c?.label})}):null,i]})]})}ve.displayName="WindowShellToolbar";var Fe=memo(ve);var Be=forwardRef(function({isOpen:o,className:a,sx:n,toolbar:r,services:t,sidebar:s,panel:p,footer:d$1,content:m,window:i,backdrop:l},u){let W=t?.list??[],b=(t?.isLoading??false)||W.length>0,y=d$1!=null&&(d$1.isVisible??true),C=s?.children,w=F(s?.sx),E=p?.children,S=p!=null?F(p.sx):0,h=m?.children,c$2=s?.expand?.isExpanded??C!=null,z=j(p),L=!!(C||E),[M,D]=useState(w),[k,V]=useState(S);useEffect(()=>{c$2&&D(w),z&&V(S);},[c$2,w,z,S]);let _=r?.onClose??r?.onMinimize??(()=>{}),I=G(s?.animation,"in-place"),T=G(p?.animation,"in-place"),Z=(()=>{let P=i?.defaultSize;if(typeof P?.width!="number")return P;let oe=(I.resize==="window"&&!c$2?M:0)+(T.resize==="window"&&!z?k:0);return oe>0?{...P,width:Math.max(0,P.width-oe)}:P})(),X={height:i?.minSize?.height??i?.defaultSize?.height??c,...i?.minSize?.width!=null?{width:i.minSize.width}:null},Le=l!=null&&(l.isVisible??true)&&o&&!i?.isMinimized,_e=(i?.order??0)+10-1,ee=jsx(oo,{open:true,onClick:_,id:l?.id,className:l?.className,"data-testid":l?.["data-testid"]??l?.id??"WindowShellBackdrop",...(l?.["data-id"]??l?.id)!=null?{"data-id":l?.["data-id"]??l?.id}:null,sx:Db({zIndex:_e,backgroundColor:P=>alpha(P.palette.common.black,.3)},l?.sx)});return jsxs(Fragment,{children:[Le&&(i?.disablePortal?ee:createPortal(ee,document.body)),jsxs(f,{ref:u,isOpen:o,onClose:_,defaultSize:Z,minSize:X,maxSize:i?.maxSize,defaultPosition:i?.defaultPosition,containerRef:i?.containerRef,order:i?.order,isMinimized:i?.isMinimized,isMaximized:i?.isMaximized,id:i?.id,className:Eb(x.root,i?.className,a),sx:n,onResize:i?.onResize,onDragStart:i?.onDragStart,onMouseDown:i?.onMouseDown,onClick:i?.onClick,disablePortal:i?.disablePortal,"data-testid":i?.["data-testid"]??i?.id,"data-id":i?.["data-id"]??i?.id,children:[jsx(Oe,{sidebarOpen:c$2,showPanel:z,sidebarWidth:M,panelWidth:k,sidebarResize:I.resize,panelResize:T.resize,sidebarDuration:I.duration,panelDuration:T.duration}),jsx(Fe,{toolbar:r,sidebar:s,panel:p,animationDuration:T.duration}),b?t?.isLoading?jsx(d,{appCode:t?.appCode,id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:Db({height:"auto",flexShrink:0},t?.sx)}):jsx(c$1,{services:W,serviceCode:t?.activeCode??"",onOpenService:t?.onOpen,onOpenServiceInNewWindow:t?.onOpenInNewWindow,language:t?.language??"en",openInNewWindowLabel:t?.openInNewWindowLabel??"Open in new window",id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:t?.sx}):null,jsx(g,{id:m?.id,className:m?.className,"data-testid":m?.["data-testid"]??m?.id,"data-id":m?.["data-id"]??m?.id,sx:L?void 0:m?.sx,children:L?jsx(Re,{baseWindowWidth:typeof i?.defaultSize?.width=="number"?i.defaultSize.width:void 0,sidebar:s,panel:p,content:m,bodyContent:h,sidebarOpen:c$2,showPanel:z,sidebarFullWidth:M,panelFullWidth:k,sidebarAnimation:I,panelAnimation:T}):h}),y?jsxs(h$2,{id:d$1?.id,className:d$1?.className,"data-testid":d$1?.["data-testid"]??d$1?.id,"data-id":d$1?.["data-id"]??d$1?.id,sx:d$1?.isVisible===true?Db(d$1?.sx??{},{"&:empty, &:has(> :only-child:empty)":{display:"flex"}}):d$1?.sx,children:[d$1?.children,d$1?.actions?jsx(i$1,{children:d$1.actions}):null]}):null]})]})});Be.displayName="WindowShell";var to=memo(Be);export{x as a,to as b};
@@ -0,0 +1 @@
1
+ import {h,g,f,j,c as c$1,d,i,E as E$1,a,e}from'./chunk-YG4CT6O4.js';import {Db,Eb}from'./chunk-XBJ4RS2B.js';function c(e){return e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(c).join(""):typeof e=="object"&&"props"in e?c(e.props.children):""}function E(e){return typeof e.label=="string"||typeof e.label=="number"?String(e.label):c(e.label).trim()||(e.value!=null?String(e.value):"")}function N(e){let t=e?.currentTarget??e?.target;return t instanceof Element?(t.closest(".MuiInputBase-root")??t).getBoundingClientRect():null}function w(e,t,n){let o=e?.PaperProps?.style?.maxHeight;if(typeof o=="number"&&Number.isFinite(o))return o;if(typeof o=="string"){let r=Number.parseFloat(o);if(Number.isFinite(r))return r}return t&&n?h:t?g:f}function R({preferred:e,anchorRect:t,menuMaxHeight:n,gapPx:o}){if(e===j.top||t==null)return e;let r=window.innerHeight-t.bottom-o,p=t.top-o;return r>=n?j.bottom:p>r?j.top:j.bottom}function F(e$1,t,n){let o=e$1?.PaperProps,r=t===j.top,f$1={marginTop:`${r?-c$1:c$1}px`,marginBottom:0},g=n!=null&&Number.isFinite(n)&&n>0,h=g?{width:n,minWidth:n,maxWidth:n}:{};return {...e$1,autoFocus:false,disableAutoFocus:true,disableAutoFocusItem:true,disableEnforceFocus:true,variant:"menu",marginThreshold:0,anchorOrigin:{vertical:r?"top":"bottom",horizontal:"left"},transformOrigin:{vertical:r?"bottom":"top",horizontal:"left"},MenuListProps:{...e$1?.MenuListProps,autoFocus:false,autoFocusItem:false,sx:Db({padding:0,display:"flex",flexDirection:"column",gap:`${e}px`,flex:1,minHeight:0,overflowX:"hidden",overflowY:"auto"},e$1?.MenuListProps?.sx??{})},PaperProps:{...o,className:Eb(a.menu,o?.className),style:{...o?.style,...f$1,...h,maxHeight:o?.style?.maxHeight??f},sx:Db({...f$1,...E$1,borderRadius:`${i}px`,boxSizing:"border-box",display:"flex",flexDirection:"column",padding:`${d}px`,overflow:"hidden",overflowX:"hidden",overflowY:"hidden",...g&&{width:`${n}px`,minWidth:`${n}px`,maxWidth:`${n}px`,boxSizing:"border-box"}},o?.sx??{})}}}function T(e){e.stopPropagation();}var I=e=>"options"in e,s=e=>({...e,id:String(e.value)});function H(e){let t=[];for(let n of e){if(I(n)){n.options.length&&t.push({key:`group-${t.length}`,label:n.label,isGroup:true,options:n.options.map(s)});continue}let o=t[t.length-1];o&&!o.isGroup?o.options.push(s(n)):t.push({key:`flat-${t.length}`,isGroup:false,options:[s(n)]});}return t}function B(e,t){return t==null?null:e.find(n=>n.value===t||String(n.value)===String(t))??null}function D(e){return e==null?"":String(e.value)}function A(e){let t=e?.target;return t instanceof Element&&t.closest("[data-select-menu-search], [data-select-menu-keep-open]")!=null}function G(e){if(e==null||typeof e!="object")return false;let t=e;if(t.key==="Escape"||t.type==="keydown")return false;let n=t.target;return n instanceof Element&&n.closest('[role="option"], .MuiMenuItem-root')!=null}function $(e){let t=e?.target;return t instanceof Element&&t.closest(".Select-clearIconButton, [data-select-clear]")!=null}function L(e){return e==null?false:Array.isArray(e)?e.length>0:typeof e=="object"?String(e.value??"")!=="":String(e)!==""}export{c as a,E as b,N as c,w as d,R as e,F as f,T as g,H as h,B as i,D as j,A as k,G as l,$ as m,L as n};
@@ -0,0 +1 @@
1
+ import {n,j,k,l,h,f,b,g,i,m as m$1,c,e,d}from'./chunk-JBE2LXDH.js';import {Y,W,X,a,Z,k as k$1,O,R,b as b$1,$,P,S,T,U,V,F,m,aa,L,M,ca,ba as ba$1,c as c$1,Q,N,I,G,H,_,J,K}from'./chunk-YG4CT6O4.js';import {ba}from'./chunk-F7I3KDV5.js';import {Ub,Eb,Db}from'./chunk-XBJ4RS2B.js';import {forwardRef,useState,useCallback,useMemo,memo}from'react';import me from'@mui/material/Box';import Rt from'@mui/material/InputLabel';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function Dt({endAdornmentProp:h,isLoading:a$1,showClear:S,showMenuArrow:u,menuOpen:b,ClearIconComponent:c=aa,ChevronIconComponent:d=ba$1,onClear:m,onClearDefault:R}){if(!h&&!S&&!a$1&&!u)return null;let y=g=>{g.preventDefault(),g.stopPropagation(),m?m():R();};return jsxs(me,{className:Eb("Select-endAdornmentRoot",a$1&&"Select-endAdornmentRoot--loading",a.endAdornment),component:"span",children:[h,a$1?jsx(me,{component:"span",className:Eb("Select-menuTriggerIcon Select-menuTriggerIcon--loading",a.loading),"aria-hidden":true,children:jsx(ca,{})}):null,!a$1&&S?jsx(me,{component:"button",className:"Select-clearIconButton","data-select-clear":"",type:"button",tabIndex:0,"aria-label":"Clear selection",onMouseDown:y,onClick:y,children:jsx(c,{})}):null,!a$1&&u?jsx(me,{component:"span",className:Eb("Select-menuTriggerIcon",b&&"Select-menuTriggerIcon-open",a.chevron),"aria-hidden":true,children:jsx(d,{})}):null]})}var Tt=forwardRef(function({isMultiple:a$1=false,options:S,value:u,onChange:b,label:c="",disabled:d,required:m,hasError:R=false,helperText:y,feedback:g,showClearIcon:K=false,ClearIconComponent:fe,ChevronIconComponent:q,onClear:Q,isLoading:P,MenuProps:j$1,children:he,id:z="Select",className:J,open:I,onOpen:X$1,onClose:D,name:Y$1,inputProps:F,endAdornment:Z$1,renderValue:T,valueAlignment:_},C){let[be,ee]=useState(false),O=I??be,x=!!(d||P),{isProvided:te,isVisible:L,type:le}=Ub(g),B=`${z}-label`,$=Array.isArray(u)?u:u!=null?[u]:[],A=useCallback((t,G)=>{G?X$1?.(t):D?.(t),I===void 0&&ee(G);},[X$1,D,I]),ne=t=>{t.button===0&&(m$1(t)||t.target.closest('.MuiSelect-select[role="combobox"]')||x||(t.preventDefault(),t.stopPropagation(),A(t,!O)));},oe=t=>{m$1(t)||t.target.closest('.MuiSelect-select[role="combobox"]')||(t.preventDefault(),t.stopPropagation());},ae=t=>{let se=t.target.value.map(k=>S.find(U=>j(U)===k||String(U.value)===String(k))).filter(k=>k!=null);b?.(se);},re=jsx(Dt,{endAdornmentProp:Z$1,isLoading:!!P,showClear:K&&n(u)&&!x,showMenuArrow:!P,menuOpen:O,ClearIconComponent:fe,ChevronIconComponent:q,onClear:Q,onClearDefault:()=>b?.(a$1?[]:null)}),H=a$1?$.map(j):j($[0]??null);return jsxs(Y,{$hasFeedback:L,onMouseDown:ne,onClick:oe,children:[jsxs(W,{variant:"filled",required:m,className:J,children:[jsx(Rt,{id:B,children:c}),jsx(X,{multiple:a$1,ref:C,value:H,error:R&&!L,feedbackType:le,hasFeedback:L,valueAlignment:_,disableUnderline:true,required:m,hasLabel:!!c.trim(),labelId:B,id:z,name:Y$1,open:O,onOpen:t=>A(t,true),onClose:t=>{k(t)||a$1&&l(t)||A(t,false);},onChange:a$1?ae:void 0,renderValue:T,className:a.input,SelectDisplayProps:{className:a.display},displayEmpty:!c.trim(),inputProps:F,disabled:x,IconComponent:()=>null,autoWidth:false,endAdornment:re,MenuProps:j$1,children:he})]}),te?jsx(ba,{...g}):y!=null&&y!==""?jsx(Z,{children:y}):null]})}),ke=Tt;function Lt({options:h,maxVisibleValues:a$1,valueAlignment:S=m}){let b$1=typeof a$1=="number"&&Number.isFinite(a$1)?Math.max(0,Math.floor(a$1)):h.length,c=h.slice(0,b$1),d=h.length-c.length,m=c.map(b).join(", ");return jsxs(L,{className:a.values,$valueAlignment:S,children:[jsx(M,{className:a.value,children:m}),d>0?jsxs(N,{className:a.valueOverflow,children:["+",d," more"]}):null]})}var It=Lt;var Vt=forwardRef(function({options:a$1,isMultiple:S$1=false,hasCheckbox:u,maxVisibleValues:b$2,value:c$2,onChange:d$1,label:m$1,placeholder:R$1,disabled:y,required:g$1,error:K$1=false,helperText:fe,feedback:q,hasClearIcon:Q$1=false,ClearIconComponent:P$1,ChevronIconComponent:j,SearchIconComponent:he,onClear:z,isLoading:J$1,isSearchable:I$1=false,searchPlaceholder:X,hasSelectionSummary:D=false,hasSelectedCheckmark:Y=false,valueAlignment:F$1=m,menuDirection:Z=k$1,MenuProps:T$1,children:_$1,id:C="Select",className:be,sx:ee,selectClassNames:O$1,inputRef:x,open:te,onOpen:L$1,onClose:le,name:B,inputProps:$$1,endAdornment:A,renderValue:ne,renderOption:oe},ae){let[re,H$1]=useState(""),[t,G$1]=useState(Z),[se,k]=useState(void 0),U$1=m$1??"",Re=R$1??"",De=fe??void 0,Te=X??b$1,Nt=he??$,Le=u??S$1,ge=useMemo(()=>h(a$1),[a$1]),V$1=useMemo(()=>ge.flatMap(e=>e.options),[ge]),Be=Eb(a.root,O$1?.root,be),$e=useMemo(()=>f(T$1,t,se),[T$1,t,se]),He=e$1=>{let s=c(e$1);s?.width&&k(s.width),G$1(e({preferred:Z,anchorRect:s,menuMaxHeight:d(T$1,I$1,D),gapPx:c$1})),L$1?.(e$1);},E=I$1?re.toLowerCase().trim():"",Ce=e=>!E||b(e).toLowerCase().includes(E),Ge=e=>oe?jsx(J,{className:a.option,$customLayout:true,children:oe(e)}):jsx(J,{className:a.option,children:jsx(K,{title:b(e),children:b(e)})}),Pt=useMemo(()=>E?V$1.filter(e=>b(e).toLowerCase().includes(E)):V$1,[V$1,E]),Ft=!!E&&Pt.length===0,Ue=e=>{let s=false;return ge.flatMap(i=>{let ve=i.options.some(Ce),ie=i.label!=null||s?jsx(Q,{className:a.groupLabel,disableGutters:true,disableSticky:true,$divider:s,$hidden:!ve,onMouseDown:g,onClick:g,children:i.label},`${i.key}-label`):null;return s||(s=ve),ie?[ie,...i.options.map(e)]:i.options.map(e)})},ce=()=>{d$1?.(S$1?[]:null),z?.();},We=I$1?jsx(O,{className:a.search,disableGutters:true,"data-select-menu-search":"",onMouseDown:g,onClick:g,onKeyDown:g,children:jsx(R,{placeholder:Te,value:re,onChange:e=>H$1(e.target.value),onMouseDown:g,onClick:g,onKeyDown:e=>e.stopPropagation(),onKeyUp:e=>e.stopPropagation(),disableUnderline:true,fullWidth:true,inputProps:{"aria-label":Te,onMouseDown:g,onClick:g},endAdornment:jsx(Nt,{})})}):null,Ke=Ft?jsx(P,{disableGutters:true,onMouseDown:g,onClick:g,children:"No results found"}):null;if(S$1){let e=Array.isArray(c$2)?c$2:[],s=V$1.filter(n=>e.some(f=>f===n.value||String(f)===String(n.value))),i=s.length,ie=D&&i>0?jsx(S,{className:a.summary,disableGutters:true,disableSticky:true,"data-select-menu-keep-open":"",onMouseDown:g,onClick:g,onKeyDown:g,children:jsxs(T,{children:[jsxs(U,{children:[i," selected"]}),jsx(V,{type:"button",variant:"text",disableRipple:true,"aria-label":"Clear all selected options",onMouseDown:n=>{n.preventDefault(),n.stopPropagation(),ce();},onClick:n=>{n.preventDefault(),n.stopPropagation(),ce();},children:"Clear"})]})}):null;return jsx(F,{id:C,"data-testid":C??"Select",className:Be,sx:Db(ee??{}),children:jsxs(ke,{ref:x??ae,isMultiple:true,id:C,className:Eb(a.field,O$1?.field),options:V$1,value:s,onChange:n=>{d$1?.(Array.isArray(n)?n.map(f=>f.value):[]);},label:U$1,disabled:y,required:g$1,hasError:K$1,helperText:De,feedback:q,showClearIcon:Q$1,ClearIconComponent:P$1??aa,ChevronIconComponent:j,onClear:ce,isLoading:J$1,MenuProps:$e,open:te,onOpen:He,onClose:n=>{H$1(""),le?.(n);},name:B,inputProps:$$1,endAdornment:A,valueAlignment:F$1,renderValue:()=>s.length>0?jsx(It,{options:s,maxVisibleValues:b$2,valueAlignment:F$1}):Re,children:[_$1,We,ie,Ke,Ue(n=>{let f=e.some(Qe=>Qe===n.value||String(Qe)===String(n.value)),qe=Ge(n);return jsx(I,{value:String(n.value),disabled:n.disabled,$selected:f,$hidden:!Ce(n),className:a.option,onMouseDown:g,onClick:g,children:Le?jsxs(G,{children:[jsx(H,{checked:f,$mutedRect:f&&n.disabled,tabIndex:-1,disableRipple:true}),qe]}):jsxs(Fragment,{children:[qe,Y&&f?jsx(_,{}):null]})},n.id)})]})})}let xt=Array.isArray(c$2)?c$2[0]??null:c$2??null,N=i(V$1,xt);return jsx(F,{id:C,"data-testid":C??"Select",className:Be,sx:Db(ee??{}),children:jsxs(ke,{ref:x??ae,id:C,className:Eb(a.field,O$1?.field),options:V$1,value:N,onChange:e=>{d$1?.(e==null||Array.isArray(e)?null:e.value);},label:U$1,disabled:y,required:g$1,hasError:K$1,helperText:De,feedback:q,showClearIcon:Q$1,ClearIconComponent:P$1??aa,ChevronIconComponent:j,onClear:ce,isLoading:J$1,MenuProps:$e,open:te,onOpen:He,onClose:e=>{H$1(""),le?.(e);},name:B,inputProps:$$1,endAdornment:A,valueAlignment:F$1,renderValue:()=>{if(!N)return Re;if(ne)return ne(N);let e=b(N);return jsx(L,{className:a.values,$valueAlignment:F$1,children:jsx(M,{className:a.value,title:e,children:e})})},children:[_$1,We,Ke,Ue(e=>{let s=N!=null&&(N.value===e.value||String(N.value)===String(e.value)),i=Ge(e);return jsx(I,{value:String(e.value),disabled:e.disabled,$selected:s,$hidden:!Ce(e),onMouseDown:g,onClick:()=>d$1?.(e.value),className:a.option,children:Le?jsxs(G,{children:[jsx(H,{checked:s,tabIndex:-1,disableRipple:true}),i]}):jsxs(Fragment,{children:[i,Y&&s?jsx(_,{}):null]})},e.id)})]})})});Vt.displayName="Select";var Gt=memo(Vt);export{Gt as a};
@@ -0,0 +1,9 @@
1
+ import {b,a}from'./chunk-JBE2LXDH.js';import {y,x,B as B$1,aa as aa$1}from'./chunk-YG4CT6O4.js';import {aa,ba}from'./chunk-F7I3KDV5.js';import {Ub,Eb,Db}from'./chunk-XBJ4RS2B.js';import {Sc,A}from'./chunk-EYLBXWXJ.js';import {memo,useCallback,useMemo}from'react';import No,{autocompleteClasses}from'@mui/material/Autocomplete';import W from'@mui/material/Box';import ko from'@mui/material/Popper';import wo from'@mui/material/TextField';import {keyframes,styled,alpha}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var m="os-shared-Autocomplete",u={root:`${m}-root`,input:`${m}-input`,popper:`${m}-popper`,option:`${m}-option`,clear:`${m}-clear`,popupIndicator:`${m}-popupIndicator`,feedback:`${m}-feedback`},k={bottom:"bottom",top:"top"},ye=k.bottom,V=false,Pe="No results found",Se="Loading\u2026",B="",Ce=8,z=4,w=24,Me=4,Ae=4,So=8,Co={disableRipple:true},Mo={elevation:0},Ao={name:"offset",options:{offset:[0,So]}};function Io(e){return {name:"flip",enabled:e!==k.top,options:{fallbackPlacements:["top-start"]}}}function Oo(e){return e===k.top?"top-start":"bottom-start"}function Ie(e){let{menuDirection:o,slotProps:n,popperClassName:r}=e;return {...n,clearIndicator:{...Co,...n?.clearIndicator},paper:{...Mo,...n?.paper},popper:{...n?.popper,placement:n?.popper?.placement??Oo(o),modifiers:[Ao,Io(o),...n?.popper?.modifiers??[]],className:r}}}var ke=e=>({[`& .${autocompleteClasses.clearIndicator}`]:{visibility:"visible",padding:0,width:12,height:12,margin:0,backgroundColor:"transparent",color:e.v2.palette.base.black,"&:hover":{backgroundColor:"transparent",color:e.v2.palette.base.black},"& svg":{width:8,height:8,fontSize:8,display:"block"}}}),To=keyframes`
2
+ 0% {
3
+ transform: rotate(-90deg);
4
+ }
5
+ 100% {
6
+ transform: rotate(270deg);
7
+ }
8
+ `,we=styled(W)({width:12,height:12,display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:"100%",height:"100%",display:"block"},animation:`${To} 2s linear infinite`}),ve=styled(wo,{shouldForwardProp:e=>!["feedbackType","hasFeedback","hasLabel"].includes(e)})(({theme:e,error:o,feedbackType:n,hasFeedback:r,hasLabel:l})=>{let{borderColor:x$1}=n?aa(e,n):{borderColor:void 0},T=r?"4px 4px 0 0":"4px",d=o?`1px solid ${e.palette.error.main}`:n&&x$1?`1px solid ${x$1}`:"1px solid transparent";return {width:"100%","& .MuiInputLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)",color:`${e.palette.grey[700]} !important`},"& .MuiInputLabel-root.MuiInputLabel-shrink":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiInputLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiFilledInput-root":{height:"40px",maxHeight:"40px",overflow:"hidden",borderRadius:T,borderBottomLeftRadius:r?0:"4px",borderBottomRightRadius:r?0:"4px",backgroundColor:e.palette.grey[400],border:d,borderBottom:r?"none":d,paddingTop:l?"11px":"0px",paddingBottom:l?"4px":"0px",paddingLeft:"8px",boxSizing:"border-box",display:"inline-flex",alignItems:l?"stretch":"center",transition:e.transitions.create(["border-color","box-shadow"],{duration:e.transitions.duration.shorter}),"&:before, &:after":{display:"none"},"&:hover":{backgroundColor:e.palette.grey[400]},"&.Mui-focused":{backgroundColor:e.palette.grey[400],border:r?`1px solid ${n?x$1:"transparent"}`:o?d:`1px solid ${e.v2.palette.brand[500]}`,borderBottom:r?"none":void 0,boxShadow:r||o?"none":`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`},"&.Mui-disabled":{backgroundColor:e.palette.grey[400],boxShadow:"none",borderColor:"transparent"}},"& .MuiFilledInput-input":{padding:"0 !important",minHeight:0,height:"auto",boxSizing:"border-box",display:"flex",alignItems:l?"flex-end":"center",alignSelf:l?"flex-end":"center",fontSize:"11px",lineHeight:"11px",color:e.palette.common.black,paddingBottom:l?"1px !important":"0 !important"},"& .MuiFilledInput-root.MuiInputBase-adornedEnd .MuiAutocomplete-input":{flex:"1 1 0%",minWidth:30,width:0,maxWidth:"100%"},"& .MuiAutocomplete-endAdornment":{display:"flex",alignItems:"center",gap:`${B$1}px`,top:"50%",transform:"translateY(-50%)",right:x},"& .MuiAutocomplete-popupIndicator":{transform:"none",width:y,minWidth:y,height:y,padding:0,marginRight:0,marginLeft:0,display:"inline-flex",alignItems:"center",justifyContent:"center"},"& .MuiAutocomplete-popupIndicator.MuiAutocomplete-popupIndicatorOpen":{transform:"none"},"& .MuiAutocomplete-clearIndicator":{visibility:"visible",padding:0,width:12,height:12,marginRight:0,marginLeft:0,backgroundColor:"transparent",color:e.v2.palette.base.black,"&:hover":{backgroundColor:"transparent",color:e.v2.palette.base.black},"& svg":{width:8,height:8,fontSize:8,display:"block"}}}}),Te=styled(W,{shouldForwardProp:e=>e!=="$hasFeedback"})(({theme:e,$hasFeedback:o})=>({display:"flex",alignItems:"stretch",flexDirection:"column",width:"100%",borderRadius:4,overflow:"visible",textAlign:"start",...o&&{"&:has(.MuiInputBase-root.Mui-focused)":{boxShadow:`0px 0px 0px 1px ${e.v2.palette.brand[500]}, 0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`}}})),Ro=e=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:4,padding:`${Me}px 8px`,minHeight:w,height:w,maxHeight:w,boxSizing:"border-box",width:"auto",margin:Ae,borderRadius:z,fontSize:"10px",fontWeight:500,lineHeight:"12px",cursor:"default",pointerEvents:"none",backgroundColor:e.palette.common.white,color:e.v2.palette.grey[500]}),G="#F8F8F8",Lo=e=>({fontSize:"12px",fontWeight:500,lineHeight:"14px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),minHeight:40,height:"auto",flexShrink:0,flexGrow:0,padding:8,boxSizing:"border-box",borderRadius:z,backgroundColor:e.palette.common.white,'&.Mui-focused, &[aria-selected="true"], &.Mui-focusVisible, &[aria-selected="true"].Mui-focused':{backgroundColor:G},'&[aria-disabled="true"]':{opacity:.38,pointerEvents:"none"}}),Fo={padding:8,maxHeight:320,minHeight:0,display:"flex",flexDirection:"column",gap:4,overflowY:"auto"},Re=styled(ko,{shouldForwardProp:e=>!["$menuHasLoadingText","$suppressAutocompleteNoOptions","$hideEmptyMenuSurface"].includes(e)})(({theme:e,$menuHasLoadingText:o,$suppressAutocompleteNoOptions:n,$hideEmptyMenuSurface:r})=>({"& .MuiPaper-root":{borderRadius:Ce,overflow:"hidden",boxShadow:e.shadows[8],border:`1px solid ${e.v2.palette.grey[100]}`,backgroundColor:e.palette.common.white,...r&&{display:"none"}},[`& .${autocompleteClasses.listbox}`]:Fo,[`& .${autocompleteClasses.option}`]:Lo(e),[`& .${autocompleteClasses.noOptions}, & .${autocompleteClasses.loading}`]:Ro(e),[`& .${autocompleteClasses.loading} .MuiCircularProgress-root`]:{width:12,height:12},...n?{[`& .${autocompleteClasses.noOptions}`]:{display:"none !important"}}:{},...o===false?{[`& .${autocompleteClasses.loading}`]:{display:"none"}}:{}}));styled("span")(({theme:e})=>({fontSize:"10px",fontWeight:500,color:e.v2.palette.grey[500]}));var Le=styled("li",{shouldForwardProp:e=>!["$selected","$optionDisabled"].includes(String(e))})(({theme:e,$selected:o,$optionDisabled:n})=>({fontSize:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),minHeight:40,padding:8,boxSizing:"border-box",borderRadius:4,backgroundColor:o?G:e.palette.common.white,"&.Mui-focused":{backgroundColor:G},...n&&{opacity:.38,pointerEvents:"none"}})),Fe=styled("span")({flex:1,minWidth:0}),$e=styled("img")({width:10,height:7.5,flexShrink:0}),De=styled(W)({position:"relative",width:14,height:14,transform:"rotate(0deg)",display:"flex",alignItems:"center",justifyContent:"center","& img, & svg":{width:14,height:14,display:"block"}});styled("ul")({listStyle:"none",margin:0,padding:0});var Ne=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block",width:"100%",textAlign:"start"}));var He=aa$1;function Ve(){return jsx(De,{children:jsx(W,{component:"img",src:A,alt:"",sx:{width:14,height:14,display:"block"}})})}function Be(){return jsx($e,{src:Sc,alt:""})}function ze(e){return jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[jsx("path",{d:"M6.66683 12.8333C3.26058 12.8333 0.500163 10.0729 0.500163 6.66667C0.500163 3.26042 3.26058 0.5 6.66683 0.5C10.0731 0.5 12.8335 3.26042 12.8335 6.66667C12.8335 10.0729 10.0731 12.8333 6.66683 12.8333Z",stroke:"url(#paint0_linear_1010_1334)",strokeMiterlimit:"10"}),jsx("defs",{children:jsxs("linearGradient",{id:"paint0_linear_1010_1334",x1:"12.8335",y1:"6.66667",x2:"0.500163",y2:"6.66667",gradientUnits:"userSpaceOnUse",children:[jsx("stop",{stopOpacity:"0.619608"}),jsx("stop",{offset:"1",stopOpacity:"0"})]})})]})}function j(e){return e===null||e===""}function S(e){if(e==null||typeof e!="object"||!("value"in e)||!("label"in e))return false;let o=e.value;return typeof o=="string"||typeof o=="number"}function v(e){if(e==null)return "";if(typeof e=="string"||typeof e=="number")return String(e);if(S(e))return b(e);if(typeof e=="object"&&"label"in e){let o=e.label;if(typeof o=="string"||typeof o=="number")return String(o);let n=a(o).trim();if(n)return n}return ""}function Ge(e,o){return S(e)&&S(o)?e.value===o.value||String(e.value)===String(o.value):e===o}function We(e){return !!e?.disabled}function je(e){if(S(e))return String(e.value);if(e!=null&&typeof e=="object"&&"id"in e){let o=e.id;if(o!=null)return String(o)}return v(e)}function qe(e){return S(e)?e.label:typeof e=="string"||typeof e=="number"?String(e):e!=null&&typeof e=="object"&&"label"in e?e.label:v(e)}function Ue(e){let{options:o,value:n,onChange:r,label:l,placeholder:x,renderInput:T,slotProps:d,textFieldProps:C,loading:Ye,isLoading:Ze,popupIcon:Je,error:Qe=false,helperText:R,feedback:q,required:K,disabled:Xe,id:_="Autocomplete",className:eo,autocompleteClassNames:M,PopperComponent:U,hasClearIcon:oo=true,hasSelectedCheckmark:Y=false,ClearIconComponent:to,onClear:no,disableClearable:po,clearIcon:ro,menuDirection:Z=ye,openOnFocus:L=V,getOptionLabel:F,renderOption:lo,isOptionEqualToValue:$,getOptionDisabled:D,getOptionKey:N,noOptionsText:J,loadingText:Q,sx:ao,...io}=e,E=!!(Ze||Ye),b=j(Q),so=j(J),X=b&&E,ee=E&&!b,A=so||X,oe=o.length===0&&(X||!ee&&A),uo=b?B:Q??Se,co=A?B:J??Pe,{isProvided:te,isVisible:I,type:ne}=Ub(q),pe=Qe&&!I,re=l!=null&&l!=="",mo=to??He,fo=useCallback(t=>F?F(t):v(t),[F]),xo=useCallback((t,p)=>$?$(t,p):Ge(t,p),[$]),H=useCallback(t=>D?D(t):We(t),[D]),go=useCallback(t=>N?N(t):je(t),[N]),bo=useCallback((t,p,s)=>{let{key:h,...y}=t;return jsxs(Le,{...y,className:Eb(u.option,y.className),$selected:s.selected,$optionDisabled:H(p),children:[jsx(Fe,{children:qe(p)}),Y&&s.selected?jsx(Be,{}):null]},h)},[H,Y]),ho=useMemo(()=>{let t=U;return t||function(s){return jsx(Re,{...s,$menuHasLoadingText:!b,$suppressAutocompleteNoOptions:A,$hideEmptyMenuSurface:oe})}},[U,b,A,oe]),le=Eb(u.popper,M?.popper,d?.popper?.className),yo=useMemo(()=>Ie({menuDirection:Z,slotProps:d,popperClassName:le}),[Z,d,le]),Po=useCallback(t=>{let p=typeof C=="function"?C(t):C,s=t.inputProps?.onMouseDown,h=p?.inputProps?.onMouseDown;return jsx(ve,{...t,...p,variant:"filled",fullWidth:true,label:l??void 0,placeholder:x??p?.placeholder??void 0,required:K,error:pe,helperText:null,feedbackType:ne,hasFeedback:I,hasLabel:re,className:Eb(u.input,M?.input,p?.className),InputProps:{...t.InputProps,...p?.InputProps,disableUnderline:true},inputProps:{...t.inputProps,...p?.inputProps,onMouseDown:y=>{h?.(y),L&&s?.(y);}}})},[C,l,x,K,pe,ne,I,re,M?.input,L]),ae=jsx(No,{...io,id:_,"data-testid":_??"Autocomplete",fullWidth:true,className:Eb(u.root,M?.root,eo),options:o,value:n,disabled:!!Xe,onChange:(t,p,s,h)=>{r?.(t,p,s,h),s==="clear"&&no?.();},loading:ee,forcePopupIcon:true,popupIcon:E?jsx(we,{"aria-hidden":true,children:jsx(ze,{})}):Je??jsx(Ve,{}),getOptionLabel:fo,isOptionEqualToValue:xo,getOptionDisabled:H,getOptionKey:go,renderOption:lo??bo,renderInput:T||Po,PopperComponent:ho,openOnFocus:L,noOptionsText:co,loadingText:uo,disableClearable:po??!oo,clearIcon:ro??jsx(mo,{className:u.clear}),sx:Db(ke,ao),slotProps:yo});return !te&&(R==null||R==="")?ae:jsxs(Te,{$hasFeedback:I,children:[ae,te?jsx(ba,{className:u.feedback,...q}):jsx(Ne,{children:R})]})}Ue.displayName="Autocomplete";var Eo=memo(Ue);
9
+ export{u as a,k as b,V as c,Eo as d};
@@ -0,0 +1 @@
1
+ import {k,j as j$1,g as g$1}from'./chunk-ISC5KT5E.js';import {j as j$2,r,R as R$1,V}from'./chunk-F7I3KDV5.js';import {n}from'./chunk-FDYQ25JQ.js';import {S,Eb,tb}from'./chunk-XBJ4RS2B.js';import {Zc,Yc,jb,Fn}from'./chunk-EYLBXWXJ.js';import {memo,forwardRef,useState,useRef,useMemo,useEffect,useCallback}from'react';import g from'@mui/material/Box';import je from'@mui/material/MenuItem';import Ke from'@mui/material/Select';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';import oo from'@mui/material/ClickAwayListener';var m="os-shared-WindowServices",s={root:`${m}-root`,bar:`${m}-bar`,tabsBar:`${m}-tabsBar`,tabs:`${m}-tabs`,tab:`${m}-tab`,trigger:`${m}-trigger`,triggerLabel:`${m}-triggerLabel`,triggerArrow:`${m}-triggerArrow`,menuItem:`${m}-menuItem`,contextMenu:`${m}-contextMenu`},P="os-shared-WindowSkeleton",f={root:`${P}-root`,bar:`${P}-bar`,body:`${P}-body`,rows:`${P}-rows`,row:`${P}-row`},re="Open in a new window",R="en",ie=51,ae=8,se=3,de=10,le=64,pe=4;var ce=styled(g,{shouldForwardProp:e=>e!=="$isDragging"})(({$isDragging:e=false})=>({cursor:e?"move":"default",position:"relative",zIndex:1,margin:0,backgroundColor:j$1,backdropFilter:k})),me=styled(g)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(8),overflow:"hidden",height:"4.1875rem",paddingBottom:"1.2rem",paddingInline:e.v2.spacing(32),paddingTop:e.v2.spacing(4),backgroundColor:"transparent",'[data-window-maximized="true"] &':{height:e.v2.spacing(44),paddingBottom:e.v2.spacing(10),paddingTop:0}})),ge=styled(g)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(8),userSelect:"none",width:"max-content",maxWidth:"100%"})),Xe=S(),we=styled(j$2,{shouldForwardProp:e=>e!=="$title"})(({theme:e,$title:n})=>{let{base:o}=e.v2.palette;return {position:"relative",fontWeight:e.typography.fontWeightMedium,padding:e.spacing(1),color:o.black,fontSize:"11px",lineHeight:"15px",borderRadius:e.shape.borderRadius,transition:e.transitions.create(["backgroundColor","boxShadow"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.complex}),whiteSpace:"nowrap",textTransform:"capitalize","&:hover, &.active":{backgroundColor:o.white,boxShadow:e.shadows[2],cursor:"pointer",position:"relative",color:"transparent","&:after":{...n&&{content:`"${n}"`},color:o.black,fontWeight:e.v2.typography.fontWeightBold,overflow:"hidden",position:"absolute",top:0,bottom:0,right:0,left:0,display:"flex",alignItems:"center",justifyContent:"center",letterSpacing:Xe==="safari"?"-1px":"",padding:8,borderRadius:e.shape.borderRadius}}}}),ue=styled(Ke)(({theme:e})=>({padding:"0.25rem 0.34rem 0.25rem 0.5rem",display:"flex",justifyContent:"center",alignItems:"center",gap:"0.19rem",width:"auto",flexShrink:0,borderRadius:"0.5rem",boxShadow:e.shadows[5],cursor:"pointer",outline:e.palette.background.default,border:"none",backgroundColor:e.palette.background.default,"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiMenuList-root":{padding:"0px !important",margin:0},"& .MuiSelect-outlined":{padding:"0px !important"}})),fe=styled("p")(({theme:e})=>({color:e.palette.text.primary,fontSize:"0.68rem",fontWeight:600,textAlign:"center",padding:"0 !important",margin:"0 !important",textTransform:"capitalize",".MuiOutlinedInput-input":{paddingRight:0},"MuiInputBase-input":{paddingRight:0},".MuiSelect-select":{paddingRight:0}})),Se=styled(je)(({theme:e})=>({display:"flex",height:"2.5rem",width:"10.43rem",alignItems:"center",gap:"0.5",alignSelf:"stretch",transition:"boxShadow 0.2s ease-in-out",backgroundColor:"inherit !important",margin:0,padding:0,paddingTop:"0px !important",paddingBottom:"0px !important","&:hover":{boxSizing:"border-box",boxShadow:`${e.shadows[3]}`}})),xe=styled("p")(({theme:e})=>({fontSize:"0.75rem",fontWeight:500,color:e.palette.text.primary,paddingLeft:"1rem !important",transition:"boxShadow 0.2s ease-in-out"})),ye=styled("img")(()=>({width:"0.75rem",height:"auto",padding:0,paddingBottom:.5,margin:0,verticalAlign:"middle",boxSizing:"border-box"})),G=styled(g,{shouldForwardProp:e=>e!=="$isDragging"})(({$isDragging:e=false})=>({cursor:e?"move":"default",display:"flex",flexDirection:"column",height:"100%",overflow:"hidden",borderRadius:"inherit",backgroundColor:"transparent"})),be=styled(g)(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"flex-start",gap:e.v2.spacing(8),height:"4.1875rem",flexShrink:0,paddingTop:e.v2.spacing(10),paddingInline:e.v2.spacing(32),paddingBottom:"1.2rem",backgroundColor:j$1,backdropFilter:k})),he=styled(g)(({theme:e})=>({flex:1,minHeight:0,backgroundColor:e.v2.palette.base.white})),ve=styled(g)(({theme:e})=>({height:"100%",overflow:"hidden",backgroundColor:e.v2.palette.base.white,padding:`${e.v2.spacing(8)} ${e.v2.spacing(32)}`})),Ce=styled(g)(({theme:e})=>({display:"flex",flexDirection:"row",gap:e.v2.spacing(8),alignItems:"center",paddingTop:e.v2.spacing(8),paddingBottom:e.v2.spacing(8),height:56,borderTop:`1px solid ${e.v2.palette.border.default}`})),De=styled(g)(()=>({display:"flex",flexDirection:"column",gap:"4px"})),Le=styled(g)(()=>({display:"flex",gap:"4px"}));function qe({className:e}){return jsx(ye,{src:(e??"").includes("MuiSelect-iconOpen")?Zc:Yc,alt:"dropdown",className:Eb(s.triggerArrow)})}var ke=memo(qe);function to({name:e,code:n,isActive:o,openInNewWindowLabel:l,onOpenService:u,onOpenServiceInNewWindow:d,className:S}){let[c,h]=useState(null),C=!!c,x=useRef(null),p=useCallback(()=>{h(null);},[]),$=useCallback(r=>{x.current={x:r.clientX,y:r.clientY};},[]),L=useCallback(r=>{let y=x.current;if(x.current=null,y&&Math.hypot(r.clientX-y.x,r.clientY-y.y)>5){r.preventDefault(),r.stopPropagation();return}r.preventDefault(),r.stopPropagation(),u(n);},[n,u]),k=useCallback(r=>{r.preventDefault(),r.stopPropagation(),h(r.currentTarget);},[]),I=useCallback(r=>{r.preventDefault(),r.stopPropagation(),d?.(n),p();},[n,p,d]);return jsx(oo,{onClickAway:p,children:jsxs(g,{component:"span",sx:{display:"contents"},children:[jsx(we,{$title:e,onClick:L,onPointerDown:$,onContextMenu:k,className:Eb(s.tab,o&&"active",S),children:e}),jsx(R$1,{open:C,anchorEl:c,placement:"bottom-start",className:Eb(s.contextMenu),children:jsx(V,{startAdornment:null,onClick:I,className:Eb(s.menuItem),children:jsxs(g,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:"4px"},children:[jsx("img",{src:jb,alt:"new-window-icon"}),l]})})})]})})}var Pe=memo(to);function Re(e){return e===Fn.reports.code||e===Fn.upload.code}function B(e){if(!e)return "";try{return decodeURIComponent(e)}catch{return e}}function Ne(e,n,o){let l=B(n).toLowerCase(),u=(e??[]).filter(d=>B(d.code).toLowerCase()===l)?.[0];return tb(u?.name??[],o??R)||""}function j(e,n){return tb(e.name,n??R)||""}function Me(e,n){return B(e).toLowerCase()===B(n).toLowerCase()}var $e=forwardRef(function({serviceCode:n$1="",services:o,onOpenService:l,onOpenServiceInNewWindow:u,language:d=R,openInNewWindowLabel:S=re,id:c,className:h,sx:C,"data-testid":x,"data-id":p},$){let[L,k]=useState(false),[I,r]=useState(0),[y,Ae]=useState(false),[Ee,K]=useState(false),[He,{width:A}]=n(),X=useRef(null),E=useMemo(()=>Ne(o,n$1,d),[o,n$1,d]);useEffect(()=>{y||r(X.current?.offsetWidth??0);},[y,o,d]),useEffect(()=>{if(A<=0||I<=0)return;let i=I+le+ie+ae+se+de;Ae(A<i);},[A,I]);let ze=useCallback(()=>{k(true);},[]),Fe=useCallback(()=>{k(false);},[]),Ue=useCallback(()=>{k(false);},[]),_e=useCallback(()=>{K(i=>!i);},[]),Ve=useCallback(i=>{l?.(i),K(false);},[l]),Ge=useCallback(i=>{l?.(i);},[l]);return o.length?jsx(ce,{ref:$,id:c,"data-testid":x??c??"WindowServices",...(p??c)!=null?{"data-id":p??c}:null,$isDragging:L,onPointerDown:ze,onPointerUp:Fe,onPointerCancel:Ue,className:Eb(s.root,s.bar,g$1,h),sx:C,children:jsxs(me,{ref:He,className:Eb(s.tabsBar),children:[!y&&jsx(ge,{ref:X,className:Eb(s.tabs),children:o.map((i,H)=>jsx(Pe,{name:j(i,d),code:i.code,isActive:Me(n$1,i.code),openInNewWindowLabel:S,onOpenService:Ge,onOpenServiceInNewWindow:u},`service-item-${i.code}-${H}`))}),y&&jsx(ue,{open:Ee,onClick:_e,displayEmpty:true,inputProps:{"aria-label":E||"Window services"},MenuProps:{anchorOrigin:{vertical:40,horizontal:83},PaperProps:{style:{borderRadius:"0.25rem",width:"10.43rem",padding:0}},MenuListProps:{disablePadding:true}},value:E,IconComponent:ke,renderValue:i=>jsx(fe,{className:Eb(s.triggerLabel),children:i}),sx:{"& .MuiOutlinedInput-root.MuiList-root-MuiMenu-list":{paddingTop:"0px !important",paddingBottom:"0px !important"}},className:Eb(s.trigger),children:o.map((i,H)=>{let z=j(i,d);return z.toLowerCase()===E?.toLowerCase()?null:jsx(Se,{value:z,onClick:Y=>{Y.preventDefault(),Y.stopPropagation(),Ve(i.code);},className:Eb(s.menuItem),children:jsx(xe,{children:z})},`option-${i.code}-${H}`)})})]})}):null});$e.displayName="WindowServices";var so=memo($e);var Oe=forwardRef(function({appCode:n,id:o,className:l,sx:u,"data-testid":d,"data-id":S},c){let[h,C]=useState(false),x=useCallback(()=>{C(true);},[]),p=useCallback(()=>{C(false);},[]);return Re(n)?jsx(G,{ref:c,id:o,"data-testid":d??o??"WindowSkeleton",...(S??o)!=null?{"data-id":S??o}:null,className:Eb(f.root,g$1,l),sx:u,$isDragging:h,onPointerDown:x,onPointerUp:p,onPointerCancel:p,children:jsx(ve,{className:Eb(f.rows,f.body),children:Array.from({length:pe}).map(($,L)=>jsxs(Ce,{className:Eb(f.row),children:[jsx(r,{variant:"rounded",width:32,height:32}),jsxs(De,{children:[jsx(r,{width:80,height:12.29}),jsxs(Le,{children:[jsx(r,{width:50,height:12.29}),jsx(r,{width:125,height:12.29})]})]})]},L))})}):jsxs(G,{ref:c,id:o,"data-testid":d??o??"WindowSkeleton",...(S??o)!=null?{"data-id":S??o}:null,className:Eb(f.root,g$1,l),sx:u,$isDragging:h,onPointerDown:x,onPointerUp:p,onPointerCancel:p,children:[jsxs(be,{className:Eb(f.bar),children:[jsx(r,{variant:"rounded",width:60,height:31}),jsx(r,{variant:"rounded",width:60,height:31}),jsx(r,{variant:"rounded",width:60,height:31})]}),jsx(he,{className:Eb(f.body)})]})});Oe.displayName="WindowSkeleton";var go=memo(Oe);export{s as a,f as b,so as c,go as d};
@@ -1,2 +1,2 @@
1
- import {z,o,C,w,n,t,r,q,p,s,u,v,M as M$1,A as A$1,ba,aa}from'./chunk-MLOWKQDW.js';import {d,R,L,V as V$1,Q as Q$1}from'./chunk-F7I3KDV5.js';import {Eb}from'./chunk-XBJ4RS2B.js';import {Gb,A as A$2,Sc}from'./chunk-EYLBXWXJ.js';import {forwardRef,useState,useEffect,useMemo,memo,useRef,useLayoutEffect,useId}from'react';import y from'@mui/material/Box';import Tt from'@mui/material/ClickAwayListener';import ht from'@mui/material/Typography';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var M="os-shared-MultiLevelSelect",a={root:`${M}-root`,open:`${M}-open`,label:`${M}-label`,fieldBody:`${M}-fieldBody`,placeholder:`${M}-placeholder`,arrow:`${M}-arrow`,menu:`${M}-menu`,search:`${M}-search`,selectedBadge:`${M}-selectedBadge`,fieldRow:`${M}-fieldRow`},ye=40,k="data-nested-submenu",$="data-nested-submenu-anchor",Ce={strategy:"fixed"},we=.7,Ne=100,Ie={width:10,height:7.5,flexShrink:0},Be={width:9,height:9,flexShrink:0};var gt={overflow:"hidden",flex:"0 0 auto",width:"max-content",maxWidth:"100%",minWidth:0},St=e=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:e,fontSize:"10px",fontWeight:500,cursor:"pointer"}),Oe=styled(y,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:t$1=false})=>{let{base:n$1}=e.v2.palette;return {width:"100%",boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"flex-end",gap:t,minHeight:n,padding:`0 ${C}px 0 ${w}px`,textAlign:"left",border:`${o}px solid ${t$1?"#FAFBFB":"transparent"}`,borderRadius:"4px",backgroundColor:t$1?"#FAFBFB":e.palette.grey[400],minWidth:"89px",position:"relative",cursor:t$1?"not-allowed":"pointer",...t$1&&{color:alpha(n$1.black,.6),[`& .${a.label}`]:{opacity:.7,cursor:"not-allowed"},[`& .${a.placeholder}`]:{color:alpha(n$1.black,.6)},"& .Select-menuTriggerIcon":{cursor:"default",color:"rgba(0, 0, 0, 0.38)","& svg path":{fill:"rgba(0, 0, 0, 0.38)",stroke:"rgba(0, 0, 0, 0.38)"}},[`& .${a.fieldRow}`]:{opacity:.7},[`& .${a.fieldRow} *`]:{cursor:"not-allowed"}},"& .Select-menuTriggerIcon":{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:"inherit",lineHeight:0,"& svg, & .MuiSvgIcon-root":{transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter})}},"& .Select-menuTriggerIcon-open svg, & .Select-menuTriggerIcon-open .MuiSvgIcon-root":{transform:"rotate(180deg)"},"& .Select-menuTriggerIcon--loading":{width:z,minWidth:z,height:z,cursor:"default"},[`&.${a.open}, &:focus-within`]:{border:`1px solid ${e.v2.palette.brand[500]}`,boxShadow:`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`}}}),Pe=styled(ht)(({theme:e})=>({alignSelf:"stretch",width:"100%",boxSizing:"border-box",height:s,margin:0,paddingTop:p,cursor:"pointer",fontSize:q,fontWeight:500,lineHeight:`${r}px`,color:e.palette.grey[700],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",pointerEvents:"none",flexShrink:0})),Re=styled(y)({display:"flex",alignItems:"flex-start",width:"100%",minWidth:0,minHeight:v+u,paddingBottom:u,boxSizing:"border-box",flex:"0 0 auto"}),Ee=styled(M$1)({margin:0,padding:0,width:"100%",alignSelf:"center"}),Fe=styled(y)({position:"absolute",right:A$1,top:"50%",transform:"translateY(-50%)",width:z,height:z,display:"inline-flex",alignItems:"center",justifyContent:"center",color:"inherit",lineHeight:0,pointerEvents:"none"}),Te=styled(y)(()=>({display:"flex",flexDirection:"column",padding:"8px"})),bt={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},vt={display:"flex",flexWrap:"wrap",alignItems:"center",alignContent:"flex-start",gap:"4px",width:"100%",minWidth:0},We=styled(y,{shouldForwardProp:e=>e!=="$field"})(({$field:e})=>({...vt,...e?{padding:0,minHeight:v,boxSizing:"border-box",alignItems:"flex-start",alignContent:"flex-start"}:{marginBottom:"8px","&:empty":{display:"none"}}})),J=styled(y,{shouldForwardProp:e=>e!=="$field"})(({theme:e,$field:t})=>({...St(`${e.palette.info.dark}1a`),...gt,...t&&{cursor:"inherit"}})),ke=styled("span")(()=>bt),$e=styled(y)(()=>({position:"relative",width:"100%",minWidth:0})),Ae=styled(y)(()=>({flex:1,maxWidth:"220px",minWidth:"89px",fontWeight:500})),He=styled(y)(()=>({display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",minWidth:"89px",fontWeight:500}));var O=e=>!e.options&&typeof e.value=="string";function Ve(e,t,n){if(e===void 0)return O(n);if(typeof e=="boolean")return e;if(typeof e=="function")return e(t,n);let o=e[t];return typeof o=="boolean"?o:O(n)}var A=e=>e.value??e.label,H=(e,t)=>t?.some(n=>n.value===e.value)??false,ze=(e,t,n)=>{if(H(e,t)){n(t?.filter(o=>o.value!==e.value)||[]);return}n([...t||[],e]);},Q=e=>O(e)?[e]:(e.options??[]).flatMap(Q),U=(e,t)=>{let n=e.filter(o=>H(o,t)).length;return {allSelected:e.length>0&&n===e.length,someSelected:n>0&&n<e.length}},je=(e,t,n)=>{let o=new Set(e.map(i=>i.value));if(U(e,t).allSelected){n((t??[]).filter(i=>!o.has(i.value)));return}let l=new Set((t??[]).map(i=>i.value)),r=e.filter(i=>!l.has(i.value));n([...t??[],...r]);},xt=(e,t)=>{let n=e[t];return typeof n=="string"?n:typeof n=="number"&&Number.isFinite(n)?String(n):""},Lt=(e,t,n)=>n.some(o=>xt(e,o).toLowerCase().includes(t)),Ge=(e,t,n)=>{let o=t.toLowerCase().trim();if(!o)return e.map(i=>({node:i,depth:0}));let l=[],r=(i,d)=>{for(let s of i){if(O(s)){Lt(s,o,n)&&l.push({node:s,depth:d});continue}r(s.options??[],d+1);}};return r(e,0),l},Mt=(e,t="right")=>{let n=e?.closest(`.${Q$1.panel}`);if(!e||!n)return 0;let o=e.getBoundingClientRect(),l=n.getBoundingClientRect(),r=t.startsWith("left")?o.left-l.left:l.right-o.right;return Math.max(0,r)},Ke=e=>[{name:"flip",enabled:true,options:{rootBoundary:"viewport",padding:8,fallbackPlacements:["left-start","right-end","left-end"]}},{name:"preventOverflow",enabled:true,options:{rootBoundary:"viewport",altAxis:true,padding:8}},{name:"offset",options:{offset:({placement:t})=>[0,Mt(e.current,t)]}}],Xe=(e,t)=>e.length===t.length&&e.every((n,o)=>n===t[o]);function qe(e,t,n){let o=[],l=0;for(let r of e){if(t<=0){o.push(void 0);continue}if(l===0&&r>=t){o.push(Math.floor(t));continue}let i=l===0?0:n;if(l+i+r<=t+.5){o.push(void 0),l+=i+r;continue}let d=Math.floor(t-l-i);if(d>=Ne&&d>=r*we){o.push(d),l=0;continue}o.push(void 0),l=r;}return o}var De=(e,t)=>t instanceof Node&&!!e?.contains(t),Ye=(e,t,n)=>{if(De(t,e)||De(n,e))return true;if(!(e instanceof Element)||!n)return false;let o=e.closest(`[${k}]`)?.getAttribute($),l=o?document.getElementById(o):null;return !!(l&&n.contains(l))};function wt({options:e,variant:t,hiddenCount:n=0,onRemove:o}){let l=useRef(null),r=useRef([]),[i,d$1]=useState([]),s=e.length+(n>0?1:0),C=e.map(c=>c.label).join("\0");useLayoutEffect(()=>{let c=l.current;if(!c||s===0)return;let f=()=>{let L=r.current.slice(0,s).filter(u=>u!=null);if(L.length!==s)return;let S=L.map(u=>u.style.maxWidth);L.forEach(u=>{u.style.maxWidth="none";});let h=L.map(u=>u.getBoundingClientRect().width);L.forEach((u,G)=>{u.style.maxWidth=S[G];});let b=getComputedStyle(c),R=c.clientWidth-parseFloat(b.paddingLeft)-parseFloat(b.paddingRight),j=parseFloat(b.columnGap||b.gap||"0")||0,E=qe(h,R,j);d$1(u=>Xe(u,E)?u:E);};f();let N=new ResizeObserver(f);return N.observe(c),()=>N.disconnect()},[s,C,t]);let m=t==="field",x=c=>f=>{f.stopPropagation(),f.preventDefault(),o?.(c);},w=c=>f=>{r.current[c]=f;};return jsxs(We,{ref:l,$field:m,className:m?a.fieldRow:void 0,children:[e.map((c,f)=>jsxs(J,{ref:w(f),$field:m,className:m?void 0:a.selectedBadge,style:i[f]!=null?{maxWidth:i[f]}:void 0,onClick:m?void 0:x(c),children:[m?null:jsx(d,{src:Sc,alt:"",sx:Ie}),jsx(ke,{children:c.label}),m?null:jsx(d,{src:Gb,alt:"",sx:Be})]},`${f}-${c.value}`)),n>0?jsx(J,{ref:w(e.length),$field:m,style:i[e.length]!=null?{maxWidth:i[e.length]}:void 0,children:jsxs("span",{children:["+",n]})}):null]})}var V=wt;function Nt({options:e,maxVisibleValues:t}){let o=typeof t=="number"&&Number.isFinite(t)?Math.max(0,Math.floor(t)):e.length,l=e.slice(0,o),r=e.length-l.length;return jsx($e,{children:jsx(V,{options:l,variant:"field",hiddenCount:r})})}var Qe=Nt;var _e=()=>jsx("svg",{width:"5",height:"8",viewBox:"0 0 5 8",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,style:{display:"block",flexShrink:0},children:jsx("path",{d:"M0.117188 0.504028C0.115307 0.426166 0.138248 0.350264 0.182617 0.286255C0.227088 0.222214 0.290458 0.173028 0.363281 0.144653C0.436073 0.116302 0.516047 0.109152 0.592773 0.124146C0.668745 0.138995 0.738375 0.176073 0.793945 0.229614L4.43164 3.63391C4.50662 3.70421 4.55078 3.80153 4.55078 3.90442C4.55064 4.00712 4.5065 4.10376 4.43164 4.17395L0.794922 7.57922L0.793945 7.57825C0.738766 7.63096 0.669812 7.66692 0.594727 7.68176C0.519097 7.69665 0.440194 7.69049 0.368164 7.66321C0.296002 7.63581 0.232474 7.58801 0.1875 7.52551C0.14262 7.463 0.11821 7.3886 0.118164 7.31165C0.118166 7.25986 0.12907 7.20846 0.150391 7.16125C0.171346 7.11493 0.201824 7.07367 0.239258 7.03918L3.58691 3.90442L0.239258 0.769653C0.164191 0.701295 0.119752 0.605686 0.117188 0.504028Z",fill:"#20232B",stroke:"#20232B",strokeWidth:"0.233333"})});function ot({label:e,itemCount:t,isSelected:n,isIndeterminate:o,onToggle:l,children:r,isSelectable:i=false}){let d=useId(),s=useRef(null),C=useRef(null),m=useRef(null),x=useRef(null),[w,c]=useState(false),f=useMemo(()=>Ke(s),[]),N=()=>{x.current!=null&&(window.clearTimeout(x.current),x.current=null);},L=()=>{t!==0&&(N(),c(true));},S=h=>{Ye(h.relatedTarget,s.current,C.current)||(N(),x.current=window.setTimeout(()=>{x.current=null,c(false);},ye));};return useEffect(()=>()=>{x.current!=null&&window.clearTimeout(x.current);},[]),useEffect(()=>{if(!w)return;let h=()=>m.current?.update();return document.addEventListener("scroll",h,true),window.addEventListener("resize",h),()=>{document.removeEventListener("scroll",h,true),window.removeEventListener("resize",h);}},[w]),jsxs(V$1,{id:d,ref:s,isSelected:n,isIndeterminate:o,startAdornment:i?void 0:null,onClick:h=>{if(h.stopPropagation(),h.preventDefault(),!i){L();return}l();},onMouseEnter:L,onMouseLeave:S,children:[jsxs(He,{children:[e,jsx(_e,{})]}),jsx(R,{ref:C,popperRef:m,[k]:"",[$]:d,sx:{maxHeight:"min(450px, calc(100dvh - 16px))",overflow:"auto"},open:w,anchorEl:s.current,placement:"right-start",modifiers:f,popperOptions:Ce,onMouseEnter:L,onMouseLeave:S,children:r})]})}function it({option:e,value:t,onChange:n,isSelectable:o=true}){let l=H(e,t);return jsx(V$1,{isSelected:l,onClick:i=>{i.stopPropagation(),i.preventDefault(),o&&ze(e,t,n);},startAdornment:o?void 0:null,children:jsx(Ae,{children:e.label})})}function te({node:e,depth:t,value:n,onChange:o,isSelectable:l}){let r=Ve(l,t,e);if(O(e))return jsx(it,{option:e,value:n,onChange:o,isSelectable:r});if(!e.options)return null;let i=e.options,d=Q(e),{allSelected:s,someSelected:C}=U(d,n);return jsx(ot,{label:e.label,itemCount:i.length,isSelected:s,isIndeterminate:C,isSelectable:r,onToggle:()=>je(d,n,o),children:i.map(m=>jsx(te,{node:m,depth:t+1,value:n,onChange:o,isSelectable:l},A(m)))})}var Wt=["label"],st=forwardRef(({options:e,onChange:t,value:n,maxVisibleValues:o,placeholder:l,label:r,isLoading:i,isSelectable:d$1,disabled:s,className:C,sx:m,isSearchable:x=true,searchPlaceholder:w,searchBy:c=Wt,onOpen:f,onClose:N},L$1)=>{let[S,h]=useState(null),[b,R$1]=useState(""),[j,E]=useState(void 0),u=!!S,G=r??l,ct=r?l??"Please Select":"Please Select";useEffect(()=>{if(!S)return;let p=()=>{let K=S.clientWidth;K>0&&E(ie=>ie===K?ie:K);};if(p(),typeof ResizeObserver>"u")return;let I=new ResizeObserver(p);return I.observe(S),()=>I.disconnect()},[S]);let at=S?.clientWidth||j,ut=p=>{if(u){h(null),N?.();return}h(p.currentTarget),f?.();},pt=()=>{h(null),N?.();},dt=()=>{b&&R$1("");},mt=useMemo(()=>Ge(e,b,c),[e,b,c]),le=n?.length??0,ft=i?jsx(ba,{}):jsx(d,{src:b?Gb:A$2,alt:b?"close":"search",onClick:dt,sx:{width:12,height:12,cursor:b?"pointer":"default"}});return jsx(Tt,{onClickAway:()=>{u&&pt();},children:jsxs(Oe,{ref:L$1,id:"FieldWrapper","data-testid":"MultiLevelSelect",$disabled:s,"aria-disabled":s||void 0,className:Eb(a.root,u&&a.open,C),sx:m,onClick:p=>!s&&ut(p),children:[jsx(Pe,{className:a.label,component:"label",children:G}),jsxs(Re,{className:a.fieldBody,children:[le===0?jsx(Ee,{className:a.placeholder,component:"p",children:ct}):null,le>0&&n?jsx(Qe,{options:n,maxVisibleValues:o}):null]}),jsx(Fe,{className:a.arrow,"aria-hidden":true,children:i?jsx(y,{component:"span",className:"Select-menuTriggerIcon Select-menuTriggerIcon--loading","aria-hidden":true,children:jsx(ba,{})}):jsx(y,{component:"span",className:`Select-menuTriggerIcon${u?" Select-menuTriggerIcon-open":""}`,children:jsx(aa,{})})}),jsx(R,{open:u,anchorEl:S,sx:{margin:"8px 0",maxHeight:330,overflow:"auto",width:at},panelProps:{className:a.menu},children:jsxs(Te,{children:[x?jsx(L,{className:a.search,fullWidth:true,size:"md",placeholder:w??l??"Select",endAdornment:ft,value:b,onClick:p=>{p.stopPropagation();},onMouseDown:p=>{p.stopPropagation();},onChange:p=>{R$1(p.target.value);},sx:{mb:"8px"}}):null,jsx(V,{options:n??[],variant:"menu",onRemove:p=>{t(n?.filter(I=>I.value!==p.value)||[]);}}),mt.map(({node:p,depth:I})=>jsx(te,{node:p,depth:I,value:n,onChange:t,isSelectable:d$1},A(p)))]})})]})})});st.displayName="MultiLevelSelect";var kt=memo(st);
1
+ import {z,o,C,w,n,t,r,q,p,s,u,v,M as M$1,A as A$1,ca,ba}from'./chunk-YG4CT6O4.js';import {d,R,L,V as V$1,Q as Q$1}from'./chunk-F7I3KDV5.js';import {Eb}from'./chunk-XBJ4RS2B.js';import {Gb,A as A$2,Sc}from'./chunk-EYLBXWXJ.js';import {forwardRef,useState,useEffect,useMemo,memo,useRef,useLayoutEffect,useId}from'react';import y from'@mui/material/Box';import Tt from'@mui/material/ClickAwayListener';import ht from'@mui/material/Typography';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var M="os-shared-MultiLevelSelect",a={root:`${M}-root`,open:`${M}-open`,label:`${M}-label`,fieldBody:`${M}-fieldBody`,placeholder:`${M}-placeholder`,arrow:`${M}-arrow`,menu:`${M}-menu`,search:`${M}-search`,selectedBadge:`${M}-selectedBadge`,fieldRow:`${M}-fieldRow`},ye=40,k="data-nested-submenu",$="data-nested-submenu-anchor",Ce={strategy:"fixed"},we=.7,Ne=100,Ie={width:10,height:7.5,flexShrink:0},Be={width:9,height:9,flexShrink:0};var gt={overflow:"hidden",flex:"0 0 auto",width:"max-content",maxWidth:"100%",minWidth:0},St=e=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:e,fontSize:"10px",fontWeight:500,cursor:"pointer"}),Oe=styled(y,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:t$1=false})=>{let{base:n$1}=e.v2.palette;return {width:"100%",boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"flex-end",gap:t,minHeight:n,padding:`0 ${C}px 0 ${w}px`,textAlign:"left",border:`${o}px solid ${t$1?"#FAFBFB":"transparent"}`,borderRadius:"4px",backgroundColor:t$1?"#FAFBFB":e.palette.grey[400],minWidth:"89px",position:"relative",cursor:t$1?"not-allowed":"pointer",...t$1&&{color:alpha(n$1.black,.6),[`& .${a.label}`]:{opacity:.7,cursor:"not-allowed"},[`& .${a.placeholder}`]:{color:alpha(n$1.black,.6)},"& .Select-menuTriggerIcon":{cursor:"default",color:"rgba(0, 0, 0, 0.38)","& svg path":{fill:"rgba(0, 0, 0, 0.38)",stroke:"rgba(0, 0, 0, 0.38)"}},[`& .${a.fieldRow}`]:{opacity:.7},[`& .${a.fieldRow} *`]:{cursor:"not-allowed"}},"& .Select-menuTriggerIcon":{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:"inherit",lineHeight:0,"& svg, & .MuiSvgIcon-root":{transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter})}},"& .Select-menuTriggerIcon-open svg, & .Select-menuTriggerIcon-open .MuiSvgIcon-root":{transform:"rotate(180deg)"},"& .Select-menuTriggerIcon--loading":{width:z,minWidth:z,height:z,cursor:"default"},[`&.${a.open}, &:focus-within`]:{border:`1px solid ${e.v2.palette.brand[500]}`,boxShadow:`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`}}}),Pe=styled(ht)(({theme:e})=>({alignSelf:"stretch",width:"100%",boxSizing:"border-box",height:s,margin:0,paddingTop:p,cursor:"pointer",fontSize:q,fontWeight:500,lineHeight:`${r}px`,color:e.palette.grey[700],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",pointerEvents:"none",flexShrink:0})),Re=styled(y)({display:"flex",alignItems:"flex-start",width:"100%",minWidth:0,minHeight:v+u,paddingBottom:u,boxSizing:"border-box",flex:"0 0 auto"}),Ee=styled(M$1)({margin:0,padding:0,width:"100%",alignSelf:"center"}),Fe=styled(y)({position:"absolute",right:A$1,top:"50%",transform:"translateY(-50%)",width:z,height:z,display:"inline-flex",alignItems:"center",justifyContent:"center",color:"inherit",lineHeight:0,pointerEvents:"none"}),Te=styled(y)(()=>({display:"flex",flexDirection:"column",padding:"8px"})),bt={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},vt={display:"flex",flexWrap:"wrap",alignItems:"center",alignContent:"flex-start",gap:"4px",width:"100%",minWidth:0},We=styled(y,{shouldForwardProp:e=>e!=="$field"})(({$field:e})=>({...vt,...e?{padding:0,minHeight:v,boxSizing:"border-box",alignItems:"flex-start",alignContent:"flex-start"}:{marginBottom:"8px","&:empty":{display:"none"}}})),J=styled(y,{shouldForwardProp:e=>e!=="$field"})(({theme:e,$field:t})=>({...St(`${e.palette.info.dark}1a`),...gt,...t&&{cursor:"inherit"}})),ke=styled("span")(()=>bt),$e=styled(y)(()=>({position:"relative",width:"100%",minWidth:0})),Ae=styled(y)(()=>({flex:1,maxWidth:"220px",minWidth:"89px",fontWeight:500})),He=styled(y)(()=>({display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",minWidth:"89px",fontWeight:500}));var O=e=>!e.options&&typeof e.value=="string";function Ve(e,t,n){if(e===void 0)return O(n);if(typeof e=="boolean")return e;if(typeof e=="function")return e(t,n);let o=e[t];return typeof o=="boolean"?o:O(n)}var A=e=>e.value??e.label,H=(e,t)=>t?.some(n=>n.value===e.value)??false,ze=(e,t,n)=>{if(H(e,t)){n(t?.filter(o=>o.value!==e.value)||[]);return}n([...t||[],e]);},Q=e=>O(e)?[e]:(e.options??[]).flatMap(Q),U=(e,t)=>{let n=e.filter(o=>H(o,t)).length;return {allSelected:e.length>0&&n===e.length,someSelected:n>0&&n<e.length}},je=(e,t,n)=>{let o=new Set(e.map(i=>i.value));if(U(e,t).allSelected){n((t??[]).filter(i=>!o.has(i.value)));return}let l=new Set((t??[]).map(i=>i.value)),r=e.filter(i=>!l.has(i.value));n([...t??[],...r]);},xt=(e,t)=>{let n=e[t];return typeof n=="string"?n:typeof n=="number"&&Number.isFinite(n)?String(n):""},Lt=(e,t,n)=>n.some(o=>xt(e,o).toLowerCase().includes(t)),Ge=(e,t,n)=>{let o=t.toLowerCase().trim();if(!o)return e.map(i=>({node:i,depth:0}));let l=[],r=(i,d)=>{for(let s of i){if(O(s)){Lt(s,o,n)&&l.push({node:s,depth:d});continue}r(s.options??[],d+1);}};return r(e,0),l},Mt=(e,t="right")=>{let n=e?.closest(`.${Q$1.panel}`);if(!e||!n)return 0;let o=e.getBoundingClientRect(),l=n.getBoundingClientRect(),r=t.startsWith("left")?o.left-l.left:l.right-o.right;return Math.max(0,r)},Ke=e=>[{name:"flip",enabled:true,options:{rootBoundary:"viewport",padding:8,fallbackPlacements:["left-start","right-end","left-end"]}},{name:"preventOverflow",enabled:true,options:{rootBoundary:"viewport",altAxis:true,padding:8}},{name:"offset",options:{offset:({placement:t})=>[0,Mt(e.current,t)]}}],Xe=(e,t)=>e.length===t.length&&e.every((n,o)=>n===t[o]);function qe(e,t,n){let o=[],l=0;for(let r of e){if(t<=0){o.push(void 0);continue}if(l===0&&r>=t){o.push(Math.floor(t));continue}let i=l===0?0:n;if(l+i+r<=t+.5){o.push(void 0),l+=i+r;continue}let d=Math.floor(t-l-i);if(d>=Ne&&d>=r*we){o.push(d),l=0;continue}o.push(void 0),l=r;}return o}var De=(e,t)=>t instanceof Node&&!!e?.contains(t),Ye=(e,t,n)=>{if(De(t,e)||De(n,e))return true;if(!(e instanceof Element)||!n)return false;let o=e.closest(`[${k}]`)?.getAttribute($),l=o?document.getElementById(o):null;return !!(l&&n.contains(l))};function wt({options:e,variant:t,hiddenCount:n=0,onRemove:o}){let l=useRef(null),r=useRef([]),[i,d$1]=useState([]),s=e.length+(n>0?1:0),C=e.map(c=>c.label).join("\0");useLayoutEffect(()=>{let c=l.current;if(!c||s===0)return;let f=()=>{let L=r.current.slice(0,s).filter(u=>u!=null);if(L.length!==s)return;let S=L.map(u=>u.style.maxWidth);L.forEach(u=>{u.style.maxWidth="none";});let h=L.map(u=>u.getBoundingClientRect().width);L.forEach((u,G)=>{u.style.maxWidth=S[G];});let b=getComputedStyle(c),R=c.clientWidth-parseFloat(b.paddingLeft)-parseFloat(b.paddingRight),j=parseFloat(b.columnGap||b.gap||"0")||0,E=qe(h,R,j);d$1(u=>Xe(u,E)?u:E);};f();let N=new ResizeObserver(f);return N.observe(c),()=>N.disconnect()},[s,C,t]);let m=t==="field",x=c=>f=>{f.stopPropagation(),f.preventDefault(),o?.(c);},w=c=>f=>{r.current[c]=f;};return jsxs(We,{ref:l,$field:m,className:m?a.fieldRow:void 0,children:[e.map((c,f)=>jsxs(J,{ref:w(f),$field:m,className:m?void 0:a.selectedBadge,style:i[f]!=null?{maxWidth:i[f]}:void 0,onClick:m?void 0:x(c),children:[m?null:jsx(d,{src:Sc,alt:"",sx:Ie}),jsx(ke,{children:c.label}),m?null:jsx(d,{src:Gb,alt:"",sx:Be})]},`${f}-${c.value}`)),n>0?jsx(J,{ref:w(e.length),$field:m,style:i[e.length]!=null?{maxWidth:i[e.length]}:void 0,children:jsxs("span",{children:["+",n]})}):null]})}var V=wt;function Nt({options:e,maxVisibleValues:t}){let o=typeof t=="number"&&Number.isFinite(t)?Math.max(0,Math.floor(t)):e.length,l=e.slice(0,o),r=e.length-l.length;return jsx($e,{children:jsx(V,{options:l,variant:"field",hiddenCount:r})})}var Qe=Nt;var _e=()=>jsx("svg",{width:"5",height:"8",viewBox:"0 0 5 8",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,style:{display:"block",flexShrink:0},children:jsx("path",{d:"M0.117188 0.504028C0.115307 0.426166 0.138248 0.350264 0.182617 0.286255C0.227088 0.222214 0.290458 0.173028 0.363281 0.144653C0.436073 0.116302 0.516047 0.109152 0.592773 0.124146C0.668745 0.138995 0.738375 0.176073 0.793945 0.229614L4.43164 3.63391C4.50662 3.70421 4.55078 3.80153 4.55078 3.90442C4.55064 4.00712 4.5065 4.10376 4.43164 4.17395L0.794922 7.57922L0.793945 7.57825C0.738766 7.63096 0.669812 7.66692 0.594727 7.68176C0.519097 7.69665 0.440194 7.69049 0.368164 7.66321C0.296002 7.63581 0.232474 7.58801 0.1875 7.52551C0.14262 7.463 0.11821 7.3886 0.118164 7.31165C0.118166 7.25986 0.12907 7.20846 0.150391 7.16125C0.171346 7.11493 0.201824 7.07367 0.239258 7.03918L3.58691 3.90442L0.239258 0.769653C0.164191 0.701295 0.119752 0.605686 0.117188 0.504028Z",fill:"#20232B",stroke:"#20232B",strokeWidth:"0.233333"})});function ot({label:e,itemCount:t,isSelected:n,isIndeterminate:o,onToggle:l,children:r,isSelectable:i=false}){let d=useId(),s=useRef(null),C=useRef(null),m=useRef(null),x=useRef(null),[w,c]=useState(false),f=useMemo(()=>Ke(s),[]),N=()=>{x.current!=null&&(window.clearTimeout(x.current),x.current=null);},L=()=>{t!==0&&(N(),c(true));},S=h=>{Ye(h.relatedTarget,s.current,C.current)||(N(),x.current=window.setTimeout(()=>{x.current=null,c(false);},ye));};return useEffect(()=>()=>{x.current!=null&&window.clearTimeout(x.current);},[]),useEffect(()=>{if(!w)return;let h=()=>m.current?.update();return document.addEventListener("scroll",h,true),window.addEventListener("resize",h),()=>{document.removeEventListener("scroll",h,true),window.removeEventListener("resize",h);}},[w]),jsxs(V$1,{id:d,ref:s,isSelected:n,isIndeterminate:o,startAdornment:i?void 0:null,onClick:h=>{if(h.stopPropagation(),h.preventDefault(),!i){L();return}l();},onMouseEnter:L,onMouseLeave:S,children:[jsxs(He,{children:[e,jsx(_e,{})]}),jsx(R,{ref:C,popperRef:m,[k]:"",[$]:d,sx:{maxHeight:"min(450px, calc(100dvh - 16px))",overflow:"auto"},open:w,anchorEl:s.current,placement:"right-start",modifiers:f,popperOptions:Ce,onMouseEnter:L,onMouseLeave:S,children:r})]})}function it({option:e,value:t,onChange:n,isSelectable:o=true}){let l=H(e,t);return jsx(V$1,{isSelected:l,onClick:i=>{i.stopPropagation(),i.preventDefault(),o&&ze(e,t,n);},startAdornment:o?void 0:null,children:jsx(Ae,{children:e.label})})}function te({node:e,depth:t,value:n,onChange:o,isSelectable:l}){let r=Ve(l,t,e);if(O(e))return jsx(it,{option:e,value:n,onChange:o,isSelectable:r});if(!e.options)return null;let i=e.options,d=Q(e),{allSelected:s,someSelected:C}=U(d,n);return jsx(ot,{label:e.label,itemCount:i.length,isSelected:s,isIndeterminate:C,isSelectable:r,onToggle:()=>je(d,n,o),children:i.map(m=>jsx(te,{node:m,depth:t+1,value:n,onChange:o,isSelectable:l},A(m)))})}var Wt=["label"],st=forwardRef(({options:e,onChange:t,value:n,maxVisibleValues:o,placeholder:l,label:r,isLoading:i,isSelectable:d$1,disabled:s,className:C,sx:m,isSearchable:x=true,searchPlaceholder:w,searchBy:c=Wt,onOpen:f,onClose:N},L$1)=>{let[S,h]=useState(null),[b,R$1]=useState(""),[j,E]=useState(void 0),u=!!S,G=r??l,ct=r?l??"Please Select":"Please Select";useEffect(()=>{if(!S)return;let p=()=>{let K=S.clientWidth;K>0&&E(ie=>ie===K?ie:K);};if(p(),typeof ResizeObserver>"u")return;let I=new ResizeObserver(p);return I.observe(S),()=>I.disconnect()},[S]);let at=S?.clientWidth||j,ut=p=>{if(u){h(null),N?.();return}h(p.currentTarget),f?.();},pt=()=>{h(null),N?.();},dt=()=>{b&&R$1("");},mt=useMemo(()=>Ge(e,b,c),[e,b,c]),le=n?.length??0,ft=i?jsx(ca,{}):jsx(d,{src:b?Gb:A$2,alt:b?"close":"search",onClick:dt,sx:{width:12,height:12,cursor:b?"pointer":"default"}});return jsx(Tt,{onClickAway:()=>{u&&pt();},children:jsxs(Oe,{ref:L$1,id:"FieldWrapper","data-testid":"MultiLevelSelect",$disabled:s,"aria-disabled":s||void 0,className:Eb(a.root,u&&a.open,C),sx:m,onClick:p=>!s&&ut(p),children:[jsx(Pe,{className:a.label,component:"label",children:G}),jsxs(Re,{className:a.fieldBody,children:[le===0?jsx(Ee,{className:a.placeholder,component:"p",children:ct}):null,le>0&&n?jsx(Qe,{options:n,maxVisibleValues:o}):null]}),jsx(Fe,{className:a.arrow,"aria-hidden":true,children:i?jsx(y,{component:"span",className:"Select-menuTriggerIcon Select-menuTriggerIcon--loading","aria-hidden":true,children:jsx(ca,{})}):jsx(y,{component:"span",className:`Select-menuTriggerIcon${u?" Select-menuTriggerIcon-open":""}`,children:jsx(ba,{})})}),jsx(R,{open:u,anchorEl:S,sx:{margin:"8px 0",maxHeight:330,overflow:"auto",width:at},panelProps:{className:a.menu},children:jsxs(Te,{children:[x?jsx(L,{className:a.search,fullWidth:true,size:"md",placeholder:w??l??"Select",endAdornment:ft,value:b,onClick:p=>{p.stopPropagation();},onMouseDown:p=>{p.stopPropagation();},onChange:p=>{R$1(p.target.value);},sx:{mb:"8px"}}):null,jsx(V,{options:n??[],variant:"menu",onRemove:p=>{t(n?.filter(I=>I.value!==p.value)||[]);}}),mt.map(({node:p,depth:I})=>jsx(te,{node:p,depth:I,value:n,onChange:t,isSelectable:d$1},A(p)))]})})]})})});st.displayName="MultiLevelSelect";var kt=memo(st);
2
2
  export{a,kt as b};
@@ -1 +1 @@
1
- import {o,v,u,t as t$1,n,C,w,r,q,p,s,m,l,z,A,ba}from'./chunk-MLOWKQDW.js';import {j,P,O,V,R,d}from'./chunk-F7I3KDV5.js';import {Eb,Db}from'./chunk-XBJ4RS2B.js';import {Sc}from'./chunk-EYLBXWXJ.js';import {forwardRef,useRef,useState,memo}from'react';import ze from'@mui/material/ClickAwayListener';import Ve from'@mui/material/SvgIcon';import {jsx,jsxs}from'react/jsx-runtime';import g from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';var i="os-shared-GroupedSelect",t={root:`${i}-root`,trigger:`${i}-trigger`,triggerBody:`${i}-triggerBody`,hasLabel:`${i}-hasLabel`,triggerIcon:`${i}-triggerIcon`,menu:`${i}-menu`,groups:`${i}-groups`,group:`${i}-group`,groupLabel:`${i}-groupLabel`,option:`${i}-option`,optionCheck:`${i}-optionCheck`};function _({open:e}){return jsx(Ve,{viewBox:"0 0 8 5",sx:{width:8,height:5,transform:e?"rotate(180deg)":"none",transition:"transform 0.2s ease, color 0.2s ease"},children:jsx("path",{d:"M7.30273 0.117188C7.3806 0.115307 7.4565 0.138248 7.52051 0.182617C7.58455 0.227088 7.63373 0.290458 7.66211 0.363281C7.69046 0.436073 7.69761 0.516047 7.68262 0.592773C7.66777 0.668745 7.63069 0.738375 7.57715 0.793945L4.17285 4.43164C4.10255 4.50662 4.00523 4.55078 3.90234 4.55078C3.79964 4.55064 3.703 4.5065 3.63281 4.43164L0.227539 0.794922L0.228516 0.793945C0.175799 0.738766 0.139848 0.669812 0.125 0.594727C0.11011 0.519097 0.116275 0.440194 0.143555 0.368164C0.170957 0.296002 0.218752 0.232474 0.28125 0.1875C0.343758 0.14262 0.418162 0.11821 0.495117 0.118164C0.546901 0.118166 0.598306 0.12907 0.645508 0.150391C0.691832 0.171346 0.733094 0.201824 0.767578 0.239258L3.90234 3.58691L7.03711 0.239258C7.10547 0.164191 7.20108 0.119752 7.30273 0.117188Z",fill:"currentColor",stroke:"currentColor",strokeWidth:.233333})})}var te=styled(g,{shouldForwardProp:e=>e!=="open"&&e!=="disabled"})(({theme:e,open:o$1,disabled:c})=>{let u={border:`${o}px solid ${e.v2.palette.brand[500]}`,boxShadow:`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`};return {display:"flex",alignItems:"center",cursor:c?"not-allowed":"pointer",position:"relative",maxWidth:"100%",outline:"none",[`& .${t.trigger}`]:{border:`${o}px solid transparent`,boxSizing:"border-box",transition:e.transitions.create(["border-color","box-shadow"],{duration:e.transitions.duration.shorter})},...!c&&{[`&:focus-within .${t.trigger}`]:u,...o$1&&{[`& .${t.trigger}`]:u},[`&:focus-within .${t.triggerIcon} .MuiSvgIcon-root`]:{color:e.v2.palette.brand[500]},...o$1&&{[`& .${t.triggerIcon} .MuiSvgIcon-root`]:{color:e.v2.palette.brand[500]}}}}}),oe=styled(g,{shouldForwardProp:e=>e!=="disabled"})(({theme:e,disabled:o})=>({flex:1,minWidth:0,height:32,maxHeight:32,borderRadius:"4px",overflow:"hidden",backgroundColor:e.palette.grey[400],cursor:o?"default":"pointer",position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",padding:`0 ${C}px 0 ${w}px`,textAlign:"start",[`&:where(.${t.hasLabel})`]:{height:n,maxHeight:n,gap:t$1,justifyContent:"flex-end",[`& .${t.triggerBody}`]:{flex:"0 0 auto",alignItems:"flex-start",minHeight:v+u,paddingBottom:u,boxSizing:"border-box","& > *":{height:"auto",minHeight:v}}}})),re=styled(j,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:o})=>({alignSelf:"stretch",width:"100%",boxSizing:"border-box",height:s,flexShrink:0,margin:0,paddingTop:p,fontSize:q,fontWeight:500,lineHeight:`${r}px`,textAlign:"start",color:o?e.palette.text.disabled:e.palette.grey[700],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"})),le=styled(g)(()=>({display:"flex",alignItems:"center",width:"100%",minWidth:0,flex:1})),ne=styled(g,{shouldForwardProp:e=>e!=="$placeholder"&&e!=="$disabled"&&e!=="$valueAlignment"})(({theme:e,$placeholder:o,$disabled:c,$valueAlignment:u=m})=>{let m=u===l.end;return {fontSize:"11px",lineHeight:"11px",color:c?e.palette.text.disabled:o?e.palette.text.secondary:e.v2.palette.base.black,height:22,flex:"1 1 0%",minWidth:0,display:"flex",alignItems:"center",justifyContent:m?"flex-end":"flex-start",textAlign:m?"end":"start",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",paddingInlineEnd:m?0:void 0}}),ie=styled(g,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:o})=>({position:"absolute",right:A,top:"50%",transform:"translateY(-50%)",width:z,height:z,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",lineHeight:0,color:o?e.palette.text.disabled:e.v2.palette.base.black,opacity:o?e.palette.action.disabledOpacity:1})),ae=styled(g)(()=>({display:"flex",flexDirection:"column",maxHeight:180,overflow:"auto",scrollbarWidth:"thin",scrollbarColor:"#E5E5E5 #E5E5E5"})),de=styled(P)(({theme:e})=>{let o=`1px solid ${alpha(e.palette.common.black,.1)}`;return {flexShrink:0,border:0,borderRadius:0,"&.Mui-expanded:not(:last-of-type)":{borderBottom:o},[`&:last-of-type .${O.summary}`]:{borderBottom:"none"},[`&.Mui-expanded:last-of-type .${O.summary}`]:{borderBottom:o},[`& .${O.summary}`]:{backgroundColor:e.palette.common.white,borderBottom:o,minHeight:28,height:"auto","& .MuiAccordionSummary-content":{margin:"auto"},"&.Mui-expanded":{backgroundColor:"#F8F8F8",minHeight:28,height:"auto"}},[`& .${O.content}`]:{borderTop:"none"}}}),se=styled(j)(({theme:e})=>({fontSize:q,color:e.v2.palette.grey[500],fontWeight:600,lineHeight:`${r}px`})),pe=styled(V)(()=>({fontSize:"10px",fontWeight:500,textTransform:"none",justifyContent:"space-between",padding:"8px 20px"}));function je(e,o){return e?.id===o?.id}var ge=forwardRef(({id:e,label:o,placeholder:c,renderValue:u,IconComponent:m$1,isLoading:me=false,valueAlignment:Se=m,options:xe,value:h,onChange:be,isOptionEqualToValue:fe=je,renderOption:he,renderGroupLabel:ye,open:Ge,onOpenChange:Ce,expandedGroupIndex:P,defaultExpandedGroupIndex:$e=0,onExpandedGroupChange:Le,disabled:p=false,sx:we,menuSx:Te,className:ve},Ee)=>{let k=useRef(null),[F,Ie]=useState(null),[Pe,ke]=useState($e),s=Ge??F!==null,S=F??k.current,Fe=P??Pe,N=useRef(void 0);s&&S&&S.clientWidth>0&&(N.current=S.clientWidth);let Ne=N.current,y=(r,n)=>{Ie(n),Ce?.(r);},Ae=r=>{if(p)return;let n=!s;y(n,n?r.currentTarget:null);},A=()=>{s&&y(false,null);},He=r=>{r.key==="Escape"&&A();},Me=(r,n)=>{let a=n?r:null;P===void 0&&ke(a),Le?.(a);},Be=r=>{r.disabled||(be?.(r),y(false,null));},H=u?.(h)??h?.label??null,M=m$1,B=!!o;return jsx(ze,{onClickAway:A,children:jsxs(te,{ref:Ee,id:e,"data-testid":"GroupedSelect",className:Eb(t.root,ve),sx:we,open:s,disabled:p,tabIndex:p?-1:0,role:"combobox","aria-expanded":s,"aria-haspopup":"listbox",onClick:Ae,onKeyDown:He,children:[jsxs(oe,{ref:k,className:Eb(t.trigger,B&&t.hasLabel),disabled:p,children:[B&&jsx(re,{$disabled:p,children:o}),jsx(le,{className:t.triggerBody,children:jsx(ne,{$placeholder:H==null,$disabled:p,$valueAlignment:Se,children:H??c??""})}),jsx(ie,{className:t.triggerIcon,$disabled:p,children:me?jsx(ba,{}):M?jsx(M,{className:Eb(s&&"MuiSelect-iconOpen")}):jsx(_,{open:s})})]}),jsx(R,{open:s,anchorEl:S,placement:"bottom-start",className:t.menu,sx:Db({width:Ne??S?.clientWidth,marginTop:"4px"},Te),children:jsx(ae,{className:t.groups,onClick:r=>r.stopPropagation(),onMouseDown:r=>r.stopPropagation(),children:(xe??[]).map((r,n)=>jsx(de,{className:t.group,expanded:Fe===n,onChange:a=>Me(n,a),slotProps:{root:{square:true}},label:ye?.(r.group,n)??jsx(se,{variant:"caption",className:t.groupLabel,children:r.group}),content:(r?.options||[]).map((a,We)=>{let Oe=fe(a,h);return jsxs(pe,{className:t.option,startAdornment:null,isDisabled:a.disabled,onClick:()=>Be(a),children:[he?.(a)??a.label,Oe&&jsx(d,{src:Sc,alt:"selected",sx:{width:14,height:10},className:t.optionCheck})]},`${n}-${We}`)})},`${n}`))})})]})})});ge.displayName="GroupedSelect";var Ke=memo(ge);export{t as a,Ke as b};
1
+ import {o,v,u,t as t$1,n,C,w,r,q,p,s,m,l,z,A,ca}from'./chunk-YG4CT6O4.js';import {j,P,O,V,R,d}from'./chunk-F7I3KDV5.js';import {Eb,Db}from'./chunk-XBJ4RS2B.js';import {Sc}from'./chunk-EYLBXWXJ.js';import {forwardRef,useRef,useState,memo}from'react';import ze from'@mui/material/ClickAwayListener';import Ve from'@mui/material/SvgIcon';import {jsx,jsxs}from'react/jsx-runtime';import g from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';var i="os-shared-GroupedSelect",t={root:`${i}-root`,trigger:`${i}-trigger`,triggerBody:`${i}-triggerBody`,hasLabel:`${i}-hasLabel`,triggerIcon:`${i}-triggerIcon`,menu:`${i}-menu`,groups:`${i}-groups`,group:`${i}-group`,groupLabel:`${i}-groupLabel`,option:`${i}-option`,optionCheck:`${i}-optionCheck`};function _({open:e}){return jsx(Ve,{viewBox:"0 0 8 5",sx:{width:8,height:5,transform:e?"rotate(180deg)":"none",transition:"transform 0.2s ease, color 0.2s ease"},children:jsx("path",{d:"M7.30273 0.117188C7.3806 0.115307 7.4565 0.138248 7.52051 0.182617C7.58455 0.227088 7.63373 0.290458 7.66211 0.363281C7.69046 0.436073 7.69761 0.516047 7.68262 0.592773C7.66777 0.668745 7.63069 0.738375 7.57715 0.793945L4.17285 4.43164C4.10255 4.50662 4.00523 4.55078 3.90234 4.55078C3.79964 4.55064 3.703 4.5065 3.63281 4.43164L0.227539 0.794922L0.228516 0.793945C0.175799 0.738766 0.139848 0.669812 0.125 0.594727C0.11011 0.519097 0.116275 0.440194 0.143555 0.368164C0.170957 0.296002 0.218752 0.232474 0.28125 0.1875C0.343758 0.14262 0.418162 0.11821 0.495117 0.118164C0.546901 0.118166 0.598306 0.12907 0.645508 0.150391C0.691832 0.171346 0.733094 0.201824 0.767578 0.239258L3.90234 3.58691L7.03711 0.239258C7.10547 0.164191 7.20108 0.119752 7.30273 0.117188Z",fill:"currentColor",stroke:"currentColor",strokeWidth:.233333})})}var te=styled(g,{shouldForwardProp:e=>e!=="open"&&e!=="disabled"})(({theme:e,open:o$1,disabled:c})=>{let u={border:`${o}px solid ${e.v2.palette.brand[500]}`,boxShadow:`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`};return {display:"flex",alignItems:"center",cursor:c?"not-allowed":"pointer",position:"relative",maxWidth:"100%",outline:"none",[`& .${t.trigger}`]:{border:`${o}px solid transparent`,boxSizing:"border-box",transition:e.transitions.create(["border-color","box-shadow"],{duration:e.transitions.duration.shorter})},...!c&&{[`&:focus-within .${t.trigger}`]:u,...o$1&&{[`& .${t.trigger}`]:u},[`&:focus-within .${t.triggerIcon} .MuiSvgIcon-root`]:{color:e.v2.palette.brand[500]},...o$1&&{[`& .${t.triggerIcon} .MuiSvgIcon-root`]:{color:e.v2.palette.brand[500]}}}}}),oe=styled(g,{shouldForwardProp:e=>e!=="disabled"})(({theme:e,disabled:o})=>({flex:1,minWidth:0,height:32,maxHeight:32,borderRadius:"4px",overflow:"hidden",backgroundColor:e.palette.grey[400],cursor:o?"default":"pointer",position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",padding:`0 ${C}px 0 ${w}px`,textAlign:"start",[`&:where(.${t.hasLabel})`]:{height:n,maxHeight:n,gap:t$1,justifyContent:"flex-end",[`& .${t.triggerBody}`]:{flex:"0 0 auto",alignItems:"flex-start",minHeight:v+u,paddingBottom:u,boxSizing:"border-box","& > *":{height:"auto",minHeight:v}}}})),re=styled(j,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:o})=>({alignSelf:"stretch",width:"100%",boxSizing:"border-box",height:s,flexShrink:0,margin:0,paddingTop:p,fontSize:q,fontWeight:500,lineHeight:`${r}px`,textAlign:"start",color:o?e.palette.text.disabled:e.palette.grey[700],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"})),le=styled(g)(()=>({display:"flex",alignItems:"center",width:"100%",minWidth:0,flex:1})),ne=styled(g,{shouldForwardProp:e=>e!=="$placeholder"&&e!=="$disabled"&&e!=="$valueAlignment"})(({theme:e,$placeholder:o,$disabled:c,$valueAlignment:u=m})=>{let m=u===l.end;return {fontSize:"11px",lineHeight:"11px",color:c?e.palette.text.disabled:o?e.palette.text.secondary:e.v2.palette.base.black,height:22,flex:"1 1 0%",minWidth:0,display:"flex",alignItems:"center",justifyContent:m?"flex-end":"flex-start",textAlign:m?"end":"start",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",paddingInlineEnd:m?0:void 0}}),ie=styled(g,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:o})=>({position:"absolute",right:A,top:"50%",transform:"translateY(-50%)",width:z,height:z,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",lineHeight:0,color:o?e.palette.text.disabled:e.v2.palette.base.black,opacity:o?e.palette.action.disabledOpacity:1})),ae=styled(g)(()=>({display:"flex",flexDirection:"column",maxHeight:180,overflow:"auto",scrollbarWidth:"thin",scrollbarColor:"#E5E5E5 #E5E5E5"})),de=styled(P)(({theme:e})=>{let o=`1px solid ${alpha(e.palette.common.black,.1)}`;return {flexShrink:0,border:0,borderRadius:0,"&.Mui-expanded:not(:last-of-type)":{borderBottom:o},[`&:last-of-type .${O.summary}`]:{borderBottom:"none"},[`&.Mui-expanded:last-of-type .${O.summary}`]:{borderBottom:o},[`& .${O.summary}`]:{backgroundColor:e.palette.common.white,borderBottom:o,minHeight:28,height:"auto","& .MuiAccordionSummary-content":{margin:"auto"},"&.Mui-expanded":{backgroundColor:"#F8F8F8",minHeight:28,height:"auto"}},[`& .${O.content}`]:{borderTop:"none"}}}),se=styled(j)(({theme:e})=>({fontSize:q,color:e.v2.palette.grey[500],fontWeight:600,lineHeight:`${r}px`})),pe=styled(V)(()=>({fontSize:"10px",fontWeight:500,textTransform:"none",justifyContent:"space-between",padding:"8px 20px"}));function je(e,o){return e?.id===o?.id}var ge=forwardRef(({id:e,label:o,placeholder:c,renderValue:u,IconComponent:m$1,isLoading:me=false,valueAlignment:Se=m,options:xe,value:h,onChange:be,isOptionEqualToValue:fe=je,renderOption:he,renderGroupLabel:ye,open:Ge,onOpenChange:Ce,expandedGroupIndex:P,defaultExpandedGroupIndex:$e=0,onExpandedGroupChange:Le,disabled:p=false,sx:we,menuSx:Te,className:ve},Ee)=>{let k=useRef(null),[F,Ie]=useState(null),[Pe,ke]=useState($e),s=Ge??F!==null,S=F??k.current,Fe=P??Pe,N=useRef(void 0);s&&S&&S.clientWidth>0&&(N.current=S.clientWidth);let Ne=N.current,y=(r,n)=>{Ie(n),Ce?.(r);},Ae=r=>{if(p)return;let n=!s;y(n,n?r.currentTarget:null);},A=()=>{s&&y(false,null);},He=r=>{r.key==="Escape"&&A();},Me=(r,n)=>{let a=n?r:null;P===void 0&&ke(a),Le?.(a);},Be=r=>{r.disabled||(be?.(r),y(false,null));},H=u?.(h)??h?.label??null,M=m$1,B=!!o;return jsx(ze,{onClickAway:A,children:jsxs(te,{ref:Ee,id:e,"data-testid":"GroupedSelect",className:Eb(t.root,ve),sx:we,open:s,disabled:p,tabIndex:p?-1:0,role:"combobox","aria-expanded":s,"aria-haspopup":"listbox",onClick:Ae,onKeyDown:He,children:[jsxs(oe,{ref:k,className:Eb(t.trigger,B&&t.hasLabel),disabled:p,children:[B&&jsx(re,{$disabled:p,children:o}),jsx(le,{className:t.triggerBody,children:jsx(ne,{$placeholder:H==null,$disabled:p,$valueAlignment:Se,children:H??c??""})}),jsx(ie,{className:t.triggerIcon,$disabled:p,children:me?jsx(ca,{}):M?jsx(M,{className:Eb(s&&"MuiSelect-iconOpen")}):jsx(_,{open:s})})]}),jsx(R,{open:s,anchorEl:S,placement:"bottom-start",className:t.menu,sx:Db({width:Ne??S?.clientWidth,marginTop:"4px"},Te),children:jsx(ae,{className:t.groups,onClick:r=>r.stopPropagation(),onMouseDown:r=>r.stopPropagation(),children:(xe??[]).map((r,n)=>jsx(de,{className:t.group,expanded:Fe===n,onChange:a=>Me(n,a),slotProps:{root:{square:true}},label:ye?.(r.group,n)??jsx(se,{variant:"caption",className:t.groupLabel,children:r.group}),content:(r?.options||[]).map((a,We)=>{let Oe=fe(a,h);return jsxs(pe,{className:t.option,startAdornment:null,isDisabled:a.disabled,onClick:()=>Be(a),children:[he?.(a)??a.label,Oe&&jsx(d,{src:Sc,alt:"selected",sx:{width:14,height:10},className:t.optionCheck})]},`${n}-${We}`)})},`${n}`))})})]})})});ge.displayName="GroupedSelect";var Ke=memo(ge);export{t as a,Ke as b};
@@ -0,0 +1 @@
1
+ import {f as f$1,aa}from'./chunk-F7I3KDV5.js';import {Sc,A as A$1}from'./chunk-EYLBXWXJ.js';import {forwardRef}from'react';import r from'@mui/material/Box';import ne from'@mui/material/CircularProgress';import ie from'@mui/material/SvgIcon';import J from'@mui/material/Button';import K from'@mui/material/FormControl';import Q from'@mui/material/Input';import m from'@mui/material/ListSubheader';import U from'@mui/material/MenuItem';import X from'@mui/material/Select';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var o="os-shared-Select",u={root:`${o}-root`,field:`${o}-field`,input:`${o}-input`,display:`${o}-display`,endAdornment:`${o}-endAdornment`,chevron:`${o}-chevron`,loading:`${o}-loading`,menu:`${o}-menu`,option:`${o}-option`,clear:`${o}-clear`,feedback:`${o}-feedback`,values:`${o}-values`,value:`${o}-value`,valueOverflow:`${o}-valueOverflow`,search:`${o}-search`,summary:`${o}-summary`,groupLabel:`${o}-groupLabel`},ae="Search",de=8,pe=8,a=28,d=36,n=17,se=4,z=256,W=272,A=293,ce=8,E={bottom:"bottom",top:"top"},xe=E.bottom,h={start:"start",end:"end"},ge=h.start,R=48,O=1,G=R-2*O,D=8,ue=10,j=13,N=D+j,Z=4,q=6,he=G-N-Z-q,b=8,f=4,y=f,c=8,x=16,v=8,g=4,me=g+x+v,Se=g+c+y;var Fe={maxHeight:z,[`&:has(.${u.search})`]:{maxHeight:`${W}px !important`},[`&:has(.${u.search}):has(.${u.summary})`]:{maxHeight:`${A}px !important`}},$e=styled(r)({width:"100%",display:"flex",flexDirection:"column"}),Le=styled(r)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),width:"100%",minWidth:0})),ze=styled(f$1,{shouldForwardProp:e=>e!=="$mutedRect"})(({$mutedRect:e})=>({padding:0,pointerEvents:"none",...e&&{opacity:.5}})),B="#F8F8F8",We=styled(U,{shouldForwardProp:e=>e!=="$selected"&&e!=="$hidden"})(({theme:e,$selected:i,$hidden:l})=>({fontSize:"12px",fontWeight:500,lineHeight:"16px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.spacing(1),minHeight:a,height:"auto",flexShrink:0,padding:"6px 8px",overflow:"hidden",[e.breakpoints.up("sm")]:{minHeight:a},boxSizing:"border-box",borderRadius:4,backgroundColor:i?B:e.palette.common.white,"&.Mui-selected, &.Mui-focusVisible, &:hover, &.Mui-selected:hover":{backgroundColor:B},"&.Mui-disabled":{opacity:.38},...l&&{display:"none !important"}})),Ae=styled(r,{shouldForwardProp:e=>e!=="$customLayout"})(({$customLayout:e})=>({flex:1,minWidth:0,display:"flex",alignItems:e?"flex-start":"center",alignSelf:e?"stretch":void 0,height:e?"auto":void 0,overflow:e?"visible":"hidden",lineHeight:"16px"})),Be=styled("span")({display:"block",minWidth:0,maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"12px",fontWeight:500,lineHeight:"16px"}),Te=styled(r,{shouldForwardProp:e=>e!=="$valueAlignment"})(({$valueAlignment:e})=>{let i=e===h.end;return {display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:i?"flex-end":"flex-start",width:"100%",minWidth:0,maxWidth:"100%",overflow:"hidden",boxSizing:"border-box",pointerEvents:"none",textAlign:i?"end":"start"}}),Ve=styled(r)(({theme:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:"0 1 auto",maxWidth:"100%",fontWeight:500,fontSize:11,lineHeight:"130%",letterSpacing:0,color:e.v2.palette.base.black,textAlign:"start"})),Ee=styled(r)({flex:"0 0 auto",whiteSpace:"nowrap",marginLeft:4,fontWeight:500,fontSize:11,lineHeight:"130%",letterSpacing:0,color:"var(--fg-brand, rgba(31, 136, 208, 1))"}),Y=styled(m)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",height:d,minHeight:d,maxHeight:d,padding:0,lineHeight:1,overflow:"hidden",flexShrink:0,position:"sticky",top:0,zIndex:1,"&.MuiListSubheader-root":{height:d,minHeight:d,padding:0,lineHeight:1}}));Y.muiSkipListHighlight=true;var _=styled(m)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",height:a,minHeight:a,padding:0,display:"flex",alignItems:"center",fontSize:12,fontWeight:500,lineHeight:"14px",color:e.v2.palette.grey[500],flexShrink:0,"&.MuiListSubheader-root":{height:a,minHeight:a,padding:0,lineHeight:"14px"}}));_.muiSkipListHighlight=true;var ee=styled(m,{shouldForwardProp:e=>e!=="$divider"&&e!=="$hidden"})(({theme:e,$divider:i,$hidden:l})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",flexShrink:0,padding:"8px 8px 4px",fontSize:10,fontWeight:500,lineHeight:"100%",color:e.v2.palette.grey[500],borderTop:i?`1px solid ${e.v2.palette.border.default}`:"none","&.MuiListSubheader-root":{position:"static",lineHeight:"100%"},"&:empty":{padding:0},...l&&{display:"none !important"}})),Re=Object.assign(ee,{muiSkipListHighlight:true}),Oe=styled(Q)(({theme:e})=>({width:"100%",height:d,padding:"8px 8px 8px 12px",borderRadius:4,backgroundColor:e.palette.common.white,border:`1px solid ${e.v2.palette.grey[100]}`,boxSizing:"border-box","&:hover":{borderColor:e.v2.palette.grey[100]},"&.Mui-focused":{borderColor:e.v2.palette.brand[500],boxShadow:`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`,backgroundColor:e.palette.common.white},"&:before, &:after":{display:"none"},"& input":{padding:0,fontSize:10},"& .MuiInputBase-input":{paddingRight:4}})),T=styled("img")({width:14,height:14,flexShrink:0,display:"block"}),Ge=styled(m)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",display:"flex",alignItems:"center",height:n,minHeight:n,maxHeight:n,padding:0,lineHeight:`${n}px`,overflow:"hidden",flexShrink:0,"&.MuiListSubheader-root":{height:n,minHeight:n,padding:0,lineHeight:`${n}px`}})),De=styled(r)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"border-box",width:"100%",height:n,minHeight:n,gap:e.spacing(1)})),je=styled("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontWeight:500,fontSize:11,lineHeight:`${n}px`,letterSpacing:0,color:e.v2.palette.grey[500]})),Ne=styled(J)(({theme:e})=>({minWidth:0,minHeight:0,height:n,padding:0,fontFamily:e.typography.fontFamily,fontWeight:500,fontStyle:"normal",fontSize:11,lineHeight:`${n}px`,letterSpacing:0,textTransform:"none",verticalAlign:"middle",color:e.v2.palette.brand[500],"&.MuiButton-root":{minWidth:0,minHeight:0,height:n,padding:0,lineHeight:`${n}px`}})),Ze=styled(K)(({theme:e})=>({minWidth:52,height:"40px !important",maxHeight:"40px !important",backgroundColor:"transparent",width:"100%",cursor:"pointer","& .MuiInputBase-root":{cursor:"pointer"},"& .MuiInputBase-root.Mui-disabled":{cursor:"default"},"& .MuiFormLabel-asterisk":{color:"red"},"& .MuiFormLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)",color:`${e.palette.grey[700]} !important`,height:"100%",pointerEvents:"none"},".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%"}})),qe=styled(X,{shouldForwardProp:e=>!["feedbackType","hasFeedback","valueAlignment","hasLabel"].includes(e)})(({theme:e,error:i,feedbackType:l,hasFeedback:s,valueAlignment:V,hasLabel:w})=>{let{borderColor:I}=aa(e,l),C=s?"4px 4px 0 0":"4px",S=V===h.end,P=S?g:f,H=w?`18px ${P}px 6px ${b}px !important`:`0 ${P}px 0 ${b}px !important`;return {width:"100%",height:"40px !important",maxHeight:"40px !important",borderRadius:C,overflow:"hidden",backgroundColor:e.palette.grey[400],border:"1px solid transparent",boxSizing:"border-box",transition:e.transitions.create(["border-color","box-shadow"],{duration:e.transitions.duration.shorter}),"&.Mui-focused":{border:s?`1px solid ${l?I:"transparent"}`:`1px solid ${e.v2.palette.brand[500]}`,borderBottom:s?"none":void 0,boxShadow:s?"none":`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`,backgroundColor:e.palette.grey[400]},"&.Mui-disabled":{backgroundColor:e.palette.grey[400],boxShadow:"none",borderColor:"transparent"},".MuiSelect-select":{padding:H,height:"40px !important",maxHeight:"40px !important",display:"flex !important",alignItems:w?"flex-end !important":"center !important",justifyContent:S?"flex-end !important":"flex-start !important",textAlign:S?"end !important":"start !important",boxSizing:"border-box",overflow:"hidden",backgroundColor:`${e.palette.grey[400]} !important`,borderRadius:C,fontSize:"11px",lineHeight:"11px",cursor:"pointer",position:"relative",zIndex:0,"&:focus":{backgroundColor:`${e.palette.grey[400]} !important`}},"&.Mui-disabled .MuiSelect-select":{cursor:"default"},".MuiSelect-filled":{padding:H},"&.MuiInputBase-adornedEnd":{display:"inline-flex",alignItems:"center",backgroundColor:e.palette.grey[400],gap:0},"&&.MuiInputBase-adornedEnd .MuiInputBase-input":{flex:"1 1 0%",minWidth:0,width:"auto",maxWidth:"100%"},"& .Select-endAdornmentRoot":{display:"flex",alignItems:"center",flexShrink:0,marginRight:y,gap:g,position:"relative",zIndex:2,pointerEvents:"auto","&.Select-endAdornmentRoot--loading":{marginRight:v}},"& .Select-clearIconButton":{display:"inline-flex",alignItems:"center",justifyContent:"center",width:12,height:12,padding:0,border:"none",appearance:"none",background:"transparent",color:e.v2.palette.base.black,cursor:"pointer",flexShrink:0,lineHeight:0,position:"relative",zIndex:2,pointerEvents:"auto","& svg":{display:"block",width:8,height:8,fontSize:8},"&:focus-visible":{outline:`2px solid ${e.palette.primary.main}`,outlineOffset:1}},"&.Mui-disabled .Select-clearIconButton":{opacity:"0 !important",pointerEvents:"none"},"& .Select-menuTriggerIcon":{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:c,minWidth:c,height:c,cursor:"pointer",color:e.v2.palette.base.black,lineHeight:0,"& svg, & .MuiSvgIcon-root":{transition:e.transitions.create(["transform","color"],{duration:e.transitions.duration.shorter})},"&.Select-menuTriggerIcon--loading":{width:x,minWidth:x,height:x,cursor:"default"}},"&.Mui-focused .Select-menuTriggerIcon, & .Select-menuTriggerIcon-open":{color:e.v2.palette.brand[500]},"& .Select-menuTriggerIcon-open svg, & .Select-menuTriggerIcon-open .MuiSvgIcon-root":{transform:"rotate(180deg)"},"&.Mui-disabled .MuiSelect-icon":{color:"rgba(0, 0, 0, 0.38)"},"&.Mui-disabled .Select-menuTriggerIcon":{cursor:"default",color:"rgba(0, 0, 0, 0.38)","& svg path":{fill:"rgba(0, 0, 0, 0.38)",stroke:"rgba(0, 0, 0, 0.38)"}},...l&&{border:`1px solid ${I}`},...s&&{borderBottom:"none"},...i&&{border:`1px solid ${e.palette.error.main}`,boxShadow:"none"}}}),Je=styled(r,{shouldForwardProp:e=>e!=="$hasFeedback"})(({theme:e,$hasFeedback:i})=>({display:"flex",alignItems:"stretch",height:"100%",flexDirection:"column",flex:1,width:"100%",cursor:"pointer",borderRadius:4,overflow:"visible",textAlign:"start",...i&&{"&:has(.MuiInputBase-root.Mui-focused)":{boxShadow:`0px 0px 0px 1px ${e.v2.palette.brand[500]}, 0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`}},"&:has(.MuiInputBase-root.Mui-disabled)":{cursor:"default"}})),Ke=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block",width:"100%",textAlign:"start"}));function ot(){return jsx(r,{component:"img",src:Sc,alt:"",sx:{width:10,height:7.5,flexShrink:0}})}function nt(){return jsx(T,{src:A$1,alt:""})}function it(){return jsxs("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none","aria-hidden":true,children:[jsx("path",{d:"M1.795 1.739L6.316 6.26",stroke:"currentColor",strokeWidth:"0.875",strokeLinecap:"round"}),jsx("path",{d:"M6.316 1.739L1.795 6.26",stroke:"currentColor",strokeWidth:"0.875",strokeLinecap:"round"})]})}var re=forwardRef((e,i)=>jsx(ie,{ref:i,viewBox:"0 0 8 5",fill:"none",fontSize:"small",sx:{width:8,height:5},...e,children:jsx("path",{d:"M7.30273 0.117188C7.3806 0.115307 7.4565 0.138248 7.52051 0.182617C7.58455 0.227088 7.63373 0.290458 7.66211 0.363281C7.69046 0.436073 7.69761 0.516047 7.68262 0.592773C7.66777 0.668745 7.63069 0.738375 7.57715 0.793945L4.17285 4.43164C4.10255 4.50662 4.00523 4.55078 3.90234 4.55078C3.79964 4.55064 3.703 4.5065 3.63281 4.43164L0.227539 0.794922L0.228516 0.793945C0.175799 0.738766 0.139848 0.669812 0.125 0.594727C0.11011 0.519097 0.116275 0.440194 0.143555 0.368164C0.170957 0.296002 0.218752 0.232474 0.28125 0.1875C0.343758 0.14262 0.418162 0.11821 0.495117 0.118164C0.546901 0.118166 0.598306 0.12907 0.645508 0.150391C0.691832 0.171346 0.733094 0.201824 0.767578 0.239258L3.90234 3.58691L7.03711 0.239258C7.10547 0.164191 7.20108 0.119752 7.30273 0.117188Z",fill:"currentColor",stroke:"currentColor",strokeWidth:.233333})}));re.displayName="SelectChevronIcon";function rt(){return jsx(ne,{size:14,sx:{color:"text.secondary"}})}export{nt as $,v as A,g as B,me as C,Se as D,Fe as E,$e as F,Le as G,ze as H,We as I,Ae as J,Be as K,Te as L,Ve as M,Ee as N,Y as O,_ as P,Re as Q,Oe as R,Ge as S,De as T,je as U,Ne as V,Ze as W,qe as X,Je as Y,Ke as Z,ot as _,u as a,it as aa,ae as b,re as ba,de as c,rt as ca,pe as d,se as e,z as f,W as g,A as h,ce as i,E as j,xe as k,h as l,ge as m,R as n,O as o,D as p,ue as q,j as r,N as s,Z as t,q as u,he as v,b as w,y as x,c as y,x as z};
@@ -0,0 +1,2 @@
1
+ import {P as P$1,O}from'./chunk-F7I3KDV5.js';import {Eb}from'./chunk-XBJ4RS2B.js';import {forwardRef,useMemo,useState,memo}from'react';import {styled,alpha,useTheme}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var a="os-shared-Sidebar",e={root:`${a}-root`,header:`${a}-header`,content:`${a}-content`,footer:`${a}-footer`,link:`${a}-link`,group:`${a}-group`,groupSummary:`${a}-groupSummary`,groupSummaryActive:`${a}-groupSummaryActive`,groupSummaryExpanded:`${a}-groupSummaryExpanded`,groupHeader:`${a}-groupHeader`,groupContent:`${a}-groupContent`,groupItem:`${a}-groupItem`,startAdornment:`${a}-startAdornment`,endAdornment:`${a}-endAdornment`};var G=r=>{let{palette:n}=useTheme();return jsx("svg",{width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:jsx("path",{d:"M9.97437 5.23633C10.0426 5.23465 10.1087 5.25507 10.1648 5.29395C10.2207 5.33278 10.264 5.3876 10.2888 5.45117C10.3136 5.51487 10.3195 5.5852 10.3064 5.65234C10.2934 5.71873 10.2614 5.77954 10.2146 5.82813L7.23608 9.01172C7.17462 9.07723 7.08968 9.11518 6.99976 9.11523C6.90985 9.11523 6.82492 9.07717 6.76343 9.01172L3.78394 5.8291L3.78491 5.82812C3.73877 5.77985 3.70612 5.71999 3.69312 5.6543C3.68007 5.58802 3.68575 5.51818 3.70972 5.45508C3.7337 5.39201 3.77618 5.33717 3.83081 5.29785C3.88553 5.25857 3.95095 5.23732 4.01831 5.2373C4.0635 5.23736 4.10797 5.24702 4.14917 5.26562C4.18997 5.28407 4.2263 5.31071 4.25659 5.34375L6.99878 8.27246L9.74194 5.34375C9.80179 5.27779 9.88521 5.23858 9.97437 5.23633Z",fill:n.text.textSecondary,stroke:n.text.textSecondary,strokeWidth:"0.204167"})})};var E="linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)",H=styled("div")(({theme:r})=>{let{base:n}=r.v2.palette;return {backgroundColor:alpha(n.white,.7),backdropFilter:r.v2.blur[16],width:"100%",position:"sticky",padding:`${r.v2.spacing(8)} ${r.v2.spacing(8)}`,height:"100%",overflow:"hidden",display:"flex",flexDirection:"column",gap:r.v2.spacing(8)}}),L=styled("div")({flexShrink:0}),R=styled("div")(({theme:r})=>({display:"flex",flexDirection:"column",gap:r.v2.spacing(4),flex:1,minHeight:0,overflow:"auto"})),P=styled("div")({flexShrink:0}),C={border:"none",width:"100%",textAlign:"left",font:"inherit",cursor:"pointer"},f=styled("span")({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0}),x=styled("span")({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginLeft:"auto"}),F=styled("button",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,flexShrink:0,...r.v2.typography.textVariants.body.small.regular,background:n?E:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:n?o.white:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4)}}),V=styled(P$1)(({theme:r})=>({flexShrink:0,"&&":{background:"transparent",boxShadow:"none"},border:"none !important",borderRadius:"4px !important",[`& .${O.summary}`]:{padding:0,paddingRight:8,minHeight:"24px",height:"24px","&.Mui-expanded":{minHeight:"24px",height:"24px"},borderRadius:"4px !important",background:"transparent",transition:"none"},[`& .${O.summary}.${e.groupSummaryActive}`]:{backgroundColor:r.v2.palette.base.white},[`& .${O.summary}.${e.groupSummaryExpanded}`]:{backgroundColor:r.v2.palette.base.white},[`& .${O.content}`]:{borderTop:"none",padding:0},[`& .${O.labelContent}`]:{flexGrow:1,minWidth:0}})),D=styled("span",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,...r.v2.typography.textVariants.body.small.regular,background:n?o.white:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4),width:"100%",cursor:"pointer"}}),j=styled("div")(({theme:r})=>({display:"flex",flexDirection:"column",gap:r.v2.spacing(4),paddingTop:r.v2.spacing(4)})),M=styled("button",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,flexShrink:0,...r.v2.typography.textVariants.body.small.regular,background:n?E:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:n?o.white:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4)}});var $=r=>!!r.sections?.length;function T(r,n){let o=n??r?.[0]?.sections?.[0]?.id??r?.[0]?.id,d=r?.find(c=>c.id===o),u=!d||!$(d),l=u?r?.find(c=>c.sections?.some(y=>y.id===o)):d,g=l?.id??d?.id??o,b=l?u?o:l.sections?.[0]?.id:void 0;return {activeId:o,activeGroupId:g,activeLeafId:b}}var B=forwardRef(({sections:r,activeSectionId:n,onSelect:o,defaultExpandedIds:d,header:u,footer:l,id:g,className:b,sx:c},y)=>{let{activeId:h,activeGroupId:A,activeLeafId:k}=useMemo(()=>T(r,n),[r,n]),[O,W]=useState(()=>Object.fromEntries((d??[]).map(t=>[t,true])));return jsxs(H,{ref:y,id:g,"data-testid":g??"Sidebar",className:Eb(e.root,b),sx:c,children:[u?jsx(L,{className:e.header,children:u}):null,jsx(R,{className:e.content,children:r?.map(t=>{if(!$(t))return jsxs(F,{type:"button",$isActive:h===t.id,"aria-current":h===t.id?"true":void 0,onClick:()=>o?.(t,void 0,[t]),className:e.link,children:[t.startAdornment?jsx(f,{className:e.startAdornment,children:t.startAdornment}):null,t.title,t.endAdornment?jsx(x,{className:e.endAdornment,children:t.endAdornment}):null]},t.id);let I=O[t.id]??t.id===A;return jsx(V,{className:e.group,expanded:I,onChange:i=>W(Z=>({...Z,[t.id]:i})),expandIcon:jsx(G,{}),slotProps:{root:{component:"section"},summary:{className:Eb(e.groupSummary,A===t.id&&e.groupSummaryActive,I&&e.groupSummaryExpanded)}},label:jsxs(D,{$isActive:A===t.id,className:e.groupHeader,children:[t.startAdornment?jsx(f,{className:e.startAdornment,children:t.startAdornment}):null,t.title,t.endAdornment?jsx(x,{className:e.endAdornment,children:t.endAdornment}):null]}),content:jsx(j,{className:e.groupContent,children:t.sections?.map(i=>jsxs(M,{type:"button",$isActive:k===i.id,"aria-current":k===i.id?"true":void 0,onClick:()=>o?.(i,t,[t,i]),className:e.groupItem,children:[i.startAdornment?jsx(f,{className:e.startAdornment,children:i.startAdornment}):null,i.title,i.endAdornment?jsx(x,{className:e.endAdornment,children:i.endAdornment}):null]},`${t.id}-${i.id}`))})},t.id)})}),l?jsx(P,{className:e.footer,children:l}):null]})});B.displayName="Sidebar";var X=memo(B);
2
+ export{e as a,X as b};
@@ -1 +1 @@
1
- export{d as Autocomplete,a as autocompleteClassNames,c as autocompleteDefaultOpenOnFocus,b as autocompleteMenuDirection}from'../../_chunks/chunk-2JFMUHGQ.js';import'../../_chunks/chunk-2LO4STE5.js';import'../../_chunks/chunk-MLOWKQDW.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
1
+ export{d as Autocomplete,a as autocompleteClassNames,c as autocompleteDefaultOpenOnFocus,b as autocompleteMenuDirection}from'../../_chunks/chunk-LKYA6XFU.js';import'../../_chunks/chunk-JBE2LXDH.js';import'../../_chunks/chunk-YG4CT6O4.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
@@ -1 +1 @@
1
- export{lc as ColumnViewsPicker,nc as CreateViewDialog,jc as CustomViews,kc as DefaultViews,mc as ViewsDropdown,Fb as areAllColumnsSelected,Lb as areAllCurrentColumnsSelected,Ob as areColumnsEqual,Gb as areSomeColumnsSelected,Mb as areSomeCurrentColumnsSelected,ec as buildFullTemplateLayouts,cc as buildRequiredColumnView,mb as convertColumnsToLayoutSection,Xb as convertTemplateToColumnsView,Yb as convertTemplatesToColumnsView,ub as countCustomTemplates,vb as countCustomViewMenuItems,ob as createCustomViewMenuItem,Ib as deepCloneColumns,Bb as getColumnCheckState,Ub as getColumnOrder,lb as getColumnsByMode,ac as getLayoutCodesForMode,nb as getLayoutDataFromTemplates,bc as getOtherModeSectionCode,Tb as getSubmenuFromTemplateLayout,yb as getSubmenuItems,Ab as getSubmenuItemsForDisplay,qb as getTemplateRole,Vb as handleTemplateUpdate,dc as hasLayoutSectionForMode,zb as hasSubmenu,Rb as initializeCreateColumns,Sb as initializeCreateColumnsWithCurrentState,Qb as initializeEditingColumns,$b as isCheckboxInteractionTarget,tb as isCustomTemplate,sb as isCustomView,ib as isDateColumn,jb as isIndexColumn,rb as isPresetView,Hb as isValidTemplateName,xb as mapTemplatesToMenuItems,Nb as normalizeColumnsSelected,Zb as replaceTemplateInList,Pb as resetColumnsToDefault,pb as setViewAsDefault,Wb as templateToViewMenuItem,Eb as toggleAllColumns,Kb as toggleAllCurrentColumns,Cb as toggleColumn,Jb as toggleSingleColumn,Db as toggleSubItem,kb as transformLayoutToColumns,wb as transformTemplatesToViewMenuItems,_b as updateCurrentTemplate,ic as useCustomTableViews,hc as useSubmenuHover,fc as useViewsManager,gc as useViewsMenu}from'../../_chunks/chunk-GSPSUKZC.js';import'../../_chunks/chunk-D7Q6GITS.js';import'../../_chunks/chunk-OAPCRKFH.js';import'../../_chunks/chunk-G3QDXDRW.js';import'../../_chunks/chunk-B2OUV4UE.js';import'../../_chunks/chunk-ZPYQLESN.js';import'../../_chunks/chunk-XK5TVDKR.js';import'../../_chunks/chunk-2BU56HDE.js';import'../../_chunks/chunk-EWENP3LB.js';import'../../_chunks/chunk-2I5L7ASP.js';import'../../_chunks/chunk-5FR3LFXC.js';import'../../_chunks/chunk-ISC5KT5E.js';import'../../_chunks/chunk-XVIGXV43.js';import'../../_chunks/chunk-7H5HCDY6.js';import'../../_chunks/chunk-B2NOP2A5.js';import'../../_chunks/chunk-673TILTX.js';import'../../_chunks/chunk-QKEB3XTE.js';import'../../_chunks/chunk-YFL4D5VW.js';import'../../_chunks/chunk-K5QISMYX.js';import'../../_chunks/chunk-637LQKFX.js';import'../../_chunks/chunk-ALG4KR24.js';import'../../_chunks/chunk-6UI52RXI.js';import'../../_chunks/chunk-3TZY3PB4.js';import'../../_chunks/chunk-4SDKOPUI.js';import'../../_chunks/chunk-UXDNAGHP.js';import'../../_chunks/chunk-YIVUI2NW.js';import'../../_chunks/chunk-PYVM4SKE.js';import'../../_chunks/chunk-U2JLXSW5.js';import'../../_chunks/chunk-MUBZJUHH.js';import'../../_chunks/chunk-LFCRVEVB.js';import'../../_chunks/chunk-U6HZMYNW.js';import'../../_chunks/chunk-H6IWML5L.js';import'../../_chunks/chunk-LTTRVHN5.js';import'../../_chunks/chunk-L2CUT2AZ.js';import'../../_chunks/chunk-S7AZOXFD.js';import'../../_chunks/chunk-XKEBWPJM.js';import'../../_chunks/chunk-TRXHMROX.js';import'../../_chunks/chunk-D4FXMX5O.js';import'../../_chunks/chunk-RW26DPMJ.js';import'../../_chunks/chunk-RGQ5AGHK.js';import'../../_chunks/chunk-DIN6W5Q6.js';import'../../_chunks/chunk-JBDIMDMZ.js';import'../../_chunks/chunk-247ZI55C.js';import'../../_chunks/chunk-EM7XGO3A.js';import'../../_chunks/chunk-KBXWH3SO.js';import'../../_chunks/chunk-ODDV623H.js';import'../../_chunks/chunk-OJO5GAN7.js';import'../../_chunks/chunk-EKOQHUCL.js';import'../../_chunks/chunk-SSK26DK7.js';import'../../_chunks/chunk-GQZXKKCE.js';import'../../_chunks/chunk-DHSYX6K2.js';import'../../_chunks/chunk-ETLDR6XW.js';import'../../_chunks/chunk-2JFMUHGQ.js';import'../../_chunks/chunk-2LO4STE5.js';import'../../_chunks/chunk-MLOWKQDW.js';import'../../_chunks/chunk-M3TZIB3C.js';import'../../_chunks/chunk-W2FF6EIY.js';import'../../_chunks/chunk-YZF24X6P.js';import'../../_chunks/chunk-AGNZUPPF.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-IXFXTDH7.js';import'../../_chunks/chunk-U3ZJP2GE.js';import'../../_chunks/chunk-FDYQ25JQ.js';export{Ua as CUSTOM_VIEW,Pa as DATE_COLUMN_CONFIG,Ta as DEFAULT_VIEW,Va as DEFAULT_VIEW_OPTIONS,Ka as DIALOG_HEIGHT,Ja as DIALOG_WIDTH,Oa as INDEX_COLUMN_CONFIG,La as MAX_CUSTOM_VIEWS,Ma as TEMPLATE_NAME_MAX_LENGTH,Na as TableViewColumnNames}from'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
1
+ export{lc as ColumnViewsPicker,nc as CreateViewDialog,jc as CustomViews,kc as DefaultViews,mc as ViewsDropdown,Fb as areAllColumnsSelected,Lb as areAllCurrentColumnsSelected,Ob as areColumnsEqual,Gb as areSomeColumnsSelected,Mb as areSomeCurrentColumnsSelected,ec as buildFullTemplateLayouts,cc as buildRequiredColumnView,mb as convertColumnsToLayoutSection,Xb as convertTemplateToColumnsView,Yb as convertTemplatesToColumnsView,ub as countCustomTemplates,vb as countCustomViewMenuItems,ob as createCustomViewMenuItem,Ib as deepCloneColumns,Bb as getColumnCheckState,Ub as getColumnOrder,lb as getColumnsByMode,ac as getLayoutCodesForMode,nb as getLayoutDataFromTemplates,bc as getOtherModeSectionCode,Tb as getSubmenuFromTemplateLayout,yb as getSubmenuItems,Ab as getSubmenuItemsForDisplay,qb as getTemplateRole,Vb as handleTemplateUpdate,dc as hasLayoutSectionForMode,zb as hasSubmenu,Rb as initializeCreateColumns,Sb as initializeCreateColumnsWithCurrentState,Qb as initializeEditingColumns,$b as isCheckboxInteractionTarget,tb as isCustomTemplate,sb as isCustomView,ib as isDateColumn,jb as isIndexColumn,rb as isPresetView,Hb as isValidTemplateName,xb as mapTemplatesToMenuItems,Nb as normalizeColumnsSelected,Zb as replaceTemplateInList,Pb as resetColumnsToDefault,pb as setViewAsDefault,Wb as templateToViewMenuItem,Eb as toggleAllColumns,Kb as toggleAllCurrentColumns,Cb as toggleColumn,Jb as toggleSingleColumn,Db as toggleSubItem,kb as transformLayoutToColumns,wb as transformTemplatesToViewMenuItems,_b as updateCurrentTemplate,ic as useCustomTableViews,hc as useSubmenuHover,fc as useViewsManager,gc as useViewsMenu}from'../../_chunks/chunk-EEONDBAL.js';import'../../_chunks/chunk-G3QDXDRW.js';import'../../_chunks/chunk-B2OUV4UE.js';import'../../_chunks/chunk-ZPYQLESN.js';import'../../_chunks/chunk-XK5TVDKR.js';import'../../_chunks/chunk-GD5PXPUD.js';import'../../_chunks/chunk-D7Q6GITS.js';import'../../_chunks/chunk-2BU56HDE.js';import'../../_chunks/chunk-PF4KBDPV.js';import'../../_chunks/chunk-2I5L7ASP.js';import'../../_chunks/chunk-5FR3LFXC.js';import'../../_chunks/chunk-ISC5KT5E.js';import'../../_chunks/chunk-7H5HCDY6.js';import'../../_chunks/chunk-JYVB2MAR.js';import'../../_chunks/chunk-673TILTX.js';import'../../_chunks/chunk-YMEGCVZ4.js';import'../../_chunks/chunk-YFL4D5VW.js';import'../../_chunks/chunk-637LQKFX.js';import'../../_chunks/chunk-ALG4KR24.js';import'../../_chunks/chunk-R2J57DPG.js';import'../../_chunks/chunk-3TZY3PB4.js';import'../../_chunks/chunk-4SDKOPUI.js';import'../../_chunks/chunk-UXDNAGHP.js';import'../../_chunks/chunk-YIVUI2NW.js';import'../../_chunks/chunk-PYVM4SKE.js';import'../../_chunks/chunk-XVIGXV43.js';import'../../_chunks/chunk-MUBZJUHH.js';import'../../_chunks/chunk-EAAJJGUI.js';import'../../_chunks/chunk-U6HZMYNW.js';import'../../_chunks/chunk-TJMY7Q26.js';import'../../_chunks/chunk-LTTRVHN5.js';import'../../_chunks/chunk-L2CUT2AZ.js';import'../../_chunks/chunk-K5QISMYX.js';import'../../_chunks/chunk-XKEBWPJM.js';import'../../_chunks/chunk-TRXHMROX.js';import'../../_chunks/chunk-D4FXMX5O.js';import'../../_chunks/chunk-RW26DPMJ.js';import'../../_chunks/chunk-RGQ5AGHK.js';import'../../_chunks/chunk-DIN6W5Q6.js';import'../../_chunks/chunk-JBDIMDMZ.js';import'../../_chunks/chunk-U2JLXSW5.js';import'../../_chunks/chunk-247ZI55C.js';import'../../_chunks/chunk-EM7XGO3A.js';import'../../_chunks/chunk-ODDV623H.js';import'../../_chunks/chunk-OJO5GAN7.js';import'../../_chunks/chunk-EKOQHUCL.js';import'../../_chunks/chunk-SSK26DK7.js';import'../../_chunks/chunk-S7AZOXFD.js';import'../../_chunks/chunk-GQZXKKCE.js';import'../../_chunks/chunk-DHSYX6K2.js';import'../../_chunks/chunk-ETLDR6XW.js';import'../../_chunks/chunk-LKYA6XFU.js';import'../../_chunks/chunk-JBE2LXDH.js';import'../../_chunks/chunk-YG4CT6O4.js';import'../../_chunks/chunk-M3TZIB3C.js';import'../../_chunks/chunk-W2FF6EIY.js';import'../../_chunks/chunk-YZF24X6P.js';import'../../_chunks/chunk-AGNZUPPF.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-IXFXTDH7.js';import'../../_chunks/chunk-U3ZJP2GE.js';import'../../_chunks/chunk-FDYQ25JQ.js';export{Ua as CUSTOM_VIEW,Pa as DATE_COLUMN_CONFIG,Ta as DEFAULT_VIEW,Va as DEFAULT_VIEW_OPTIONS,Ka as DIALOG_HEIGHT,Ja as DIALOG_WIDTH,Oa as INDEX_COLUMN_CONFIG,La as MAX_CUSTOM_VIEWS,Ma as TEMPLATE_NAME_MAX_LENGTH,Na as TableViewColumnNames}from'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
@@ -1 +1 @@
1
- export{c as FILTER_POPOVER_ANCHOR_GAP_PX,b as FILTER_POPOVER_MIN_WIDTH,d as FILTER_POPOVER_POPPER_Z_INDEX,f as FilterPopover,f as default,a as filterPopoverClassNames,e as useFilterPopover}from'../../_chunks/chunk-LFCRVEVB.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
1
+ export{c as FILTER_POPOVER_ANCHOR_GAP_PX,b as FILTER_POPOVER_MIN_WIDTH,d as FILTER_POPOVER_POPPER_Z_INDEX,f as FilterPopover,f as default,a as filterPopoverClassNames,e as useFilterPopover}from'../../_chunks/chunk-EAAJJGUI.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
@@ -1 +1 @@
1
- export{b as default,a as groupedSelectClassNames}from'../../_chunks/chunk-H6IWML5L.js';import'../../_chunks/chunk-MLOWKQDW.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
1
+ export{b as default,a as groupedSelectClassNames}from'../../_chunks/chunk-TJMY7Q26.js';import'../../_chunks/chunk-YG4CT6O4.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
@@ -1 +1 @@
1
- export{pc as ListHeader}from'../../_chunks/chunk-GSPSUKZC.js';import'../../_chunks/chunk-D7Q6GITS.js';import'../../_chunks/chunk-OAPCRKFH.js';import'../../_chunks/chunk-G3QDXDRW.js';import'../../_chunks/chunk-B2OUV4UE.js';import'../../_chunks/chunk-ZPYQLESN.js';import'../../_chunks/chunk-XK5TVDKR.js';import'../../_chunks/chunk-2BU56HDE.js';import'../../_chunks/chunk-EWENP3LB.js';import'../../_chunks/chunk-2I5L7ASP.js';import'../../_chunks/chunk-5FR3LFXC.js';import'../../_chunks/chunk-ISC5KT5E.js';import'../../_chunks/chunk-XVIGXV43.js';import'../../_chunks/chunk-7H5HCDY6.js';import'../../_chunks/chunk-B2NOP2A5.js';import'../../_chunks/chunk-673TILTX.js';import'../../_chunks/chunk-QKEB3XTE.js';import'../../_chunks/chunk-YFL4D5VW.js';import'../../_chunks/chunk-K5QISMYX.js';import'../../_chunks/chunk-637LQKFX.js';import'../../_chunks/chunk-ALG4KR24.js';import'../../_chunks/chunk-6UI52RXI.js';import'../../_chunks/chunk-3TZY3PB4.js';import'../../_chunks/chunk-4SDKOPUI.js';import'../../_chunks/chunk-UXDNAGHP.js';import'../../_chunks/chunk-YIVUI2NW.js';import'../../_chunks/chunk-PYVM4SKE.js';import'../../_chunks/chunk-U2JLXSW5.js';import'../../_chunks/chunk-MUBZJUHH.js';import'../../_chunks/chunk-LFCRVEVB.js';import'../../_chunks/chunk-U6HZMYNW.js';import'../../_chunks/chunk-H6IWML5L.js';import'../../_chunks/chunk-LTTRVHN5.js';import'../../_chunks/chunk-L2CUT2AZ.js';import'../../_chunks/chunk-S7AZOXFD.js';import'../../_chunks/chunk-XKEBWPJM.js';import'../../_chunks/chunk-TRXHMROX.js';import'../../_chunks/chunk-D4FXMX5O.js';import'../../_chunks/chunk-RW26DPMJ.js';import'../../_chunks/chunk-RGQ5AGHK.js';import'../../_chunks/chunk-DIN6W5Q6.js';import'../../_chunks/chunk-JBDIMDMZ.js';import'../../_chunks/chunk-247ZI55C.js';import'../../_chunks/chunk-EM7XGO3A.js';import'../../_chunks/chunk-KBXWH3SO.js';import'../../_chunks/chunk-ODDV623H.js';import'../../_chunks/chunk-OJO5GAN7.js';import'../../_chunks/chunk-EKOQHUCL.js';import'../../_chunks/chunk-SSK26DK7.js';import'../../_chunks/chunk-GQZXKKCE.js';import'../../_chunks/chunk-DHSYX6K2.js';import'../../_chunks/chunk-ETLDR6XW.js';import'../../_chunks/chunk-2JFMUHGQ.js';import'../../_chunks/chunk-2LO4STE5.js';import'../../_chunks/chunk-MLOWKQDW.js';import'../../_chunks/chunk-M3TZIB3C.js';import'../../_chunks/chunk-W2FF6EIY.js';import'../../_chunks/chunk-YZF24X6P.js';import'../../_chunks/chunk-AGNZUPPF.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-IXFXTDH7.js';import'../../_chunks/chunk-U3ZJP2GE.js';import'../../_chunks/chunk-FDYQ25JQ.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
1
+ export{pc as ListHeader}from'../../_chunks/chunk-EEONDBAL.js';import'../../_chunks/chunk-G3QDXDRW.js';import'../../_chunks/chunk-B2OUV4UE.js';import'../../_chunks/chunk-ZPYQLESN.js';import'../../_chunks/chunk-XK5TVDKR.js';import'../../_chunks/chunk-GD5PXPUD.js';import'../../_chunks/chunk-D7Q6GITS.js';import'../../_chunks/chunk-2BU56HDE.js';import'../../_chunks/chunk-PF4KBDPV.js';import'../../_chunks/chunk-2I5L7ASP.js';import'../../_chunks/chunk-5FR3LFXC.js';import'../../_chunks/chunk-ISC5KT5E.js';import'../../_chunks/chunk-7H5HCDY6.js';import'../../_chunks/chunk-JYVB2MAR.js';import'../../_chunks/chunk-673TILTX.js';import'../../_chunks/chunk-YMEGCVZ4.js';import'../../_chunks/chunk-YFL4D5VW.js';import'../../_chunks/chunk-637LQKFX.js';import'../../_chunks/chunk-ALG4KR24.js';import'../../_chunks/chunk-R2J57DPG.js';import'../../_chunks/chunk-3TZY3PB4.js';import'../../_chunks/chunk-4SDKOPUI.js';import'../../_chunks/chunk-UXDNAGHP.js';import'../../_chunks/chunk-YIVUI2NW.js';import'../../_chunks/chunk-PYVM4SKE.js';import'../../_chunks/chunk-XVIGXV43.js';import'../../_chunks/chunk-MUBZJUHH.js';import'../../_chunks/chunk-EAAJJGUI.js';import'../../_chunks/chunk-U6HZMYNW.js';import'../../_chunks/chunk-TJMY7Q26.js';import'../../_chunks/chunk-LTTRVHN5.js';import'../../_chunks/chunk-L2CUT2AZ.js';import'../../_chunks/chunk-K5QISMYX.js';import'../../_chunks/chunk-XKEBWPJM.js';import'../../_chunks/chunk-TRXHMROX.js';import'../../_chunks/chunk-D4FXMX5O.js';import'../../_chunks/chunk-RW26DPMJ.js';import'../../_chunks/chunk-RGQ5AGHK.js';import'../../_chunks/chunk-DIN6W5Q6.js';import'../../_chunks/chunk-JBDIMDMZ.js';import'../../_chunks/chunk-U2JLXSW5.js';import'../../_chunks/chunk-247ZI55C.js';import'../../_chunks/chunk-EM7XGO3A.js';import'../../_chunks/chunk-ODDV623H.js';import'../../_chunks/chunk-OJO5GAN7.js';import'../../_chunks/chunk-EKOQHUCL.js';import'../../_chunks/chunk-SSK26DK7.js';import'../../_chunks/chunk-S7AZOXFD.js';import'../../_chunks/chunk-GQZXKKCE.js';import'../../_chunks/chunk-DHSYX6K2.js';import'../../_chunks/chunk-ETLDR6XW.js';import'../../_chunks/chunk-LKYA6XFU.js';import'../../_chunks/chunk-JBE2LXDH.js';import'../../_chunks/chunk-YG4CT6O4.js';import'../../_chunks/chunk-M3TZIB3C.js';import'../../_chunks/chunk-W2FF6EIY.js';import'../../_chunks/chunk-YZF24X6P.js';import'../../_chunks/chunk-AGNZUPPF.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-IXFXTDH7.js';import'../../_chunks/chunk-U3ZJP2GE.js';import'../../_chunks/chunk-FDYQ25JQ.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
@@ -1 +1 @@
1
- export{b as default,a as multiLevelSelectClassNames}from'../../_chunks/chunk-6UI52RXI.js';import'../../_chunks/chunk-MLOWKQDW.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
1
+ export{b as default,a as multiLevelSelectClassNames}from'../../_chunks/chunk-R2J57DPG.js';import'../../_chunks/chunk-YG4CT6O4.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
@@ -1,7 +1,7 @@
1
1
  import { type ElementType, type ReactNode } from 'react';
2
2
  import type { SelectProps as MuiSelectProps } from '@mui/material/Select';
3
3
  import { type FieldFeedbackProps } from '../primitives';
4
- import type { SelectValueAlignment } from './constants';
4
+ import { type SelectValueAlignment } from './constants';
5
5
  import { type InternalOption } from './utils';
6
6
  export type SelectFieldProps = {
7
7
  isMultiple?: boolean;
@@ -1,16 +1,40 @@
1
1
  export declare const selectClassNamePrefix: "os-shared-Select";
2
+ /** BEM slot classes for restyling `Select` from a parent (`styled(Select)` / `sx`). Menu slots live in the portalled menu, so style them via `MenuProps`. */
2
3
  export declare const selectClassNames: {
4
+ /** Outer wrapper; the `className` / `sx` props land here. */
3
5
  readonly root: "os-shared-Select-root";
6
+ /** Form control around the field (floating label + field box). */
4
7
  readonly field: "os-shared-Select-field";
8
+ /** Field box (border, fill, height). Combine with MUI state classes `.Mui-focused` / `.Mui-disabled`. */
9
+ readonly input: "os-shared-Select-input";
10
+ /** Value area inside the field box (holds the selected value or placeholder). */
11
+ readonly display: "os-shared-Select-display";
12
+ /** End area of the field box: `endAdornment`, loading spinner, clear button and chevron. */
13
+ readonly endAdornment: "os-shared-Select-endAdornment";
14
+ /** Chevron slot in the field (colour via `color`; the icon uses `currentColor`). */
15
+ readonly chevron: "os-shared-Select-chevron";
16
+ /** Loading spinner slot in the field (rendered while `isLoading`). */
17
+ readonly loading: "os-shared-Select-loading";
18
+ /** Menu paper (the open dropdown panel). */
5
19
  readonly menu: "os-shared-Select-menu";
20
+ /** Option row (`li`) and its inner label — target `li.<option>` for the row only. */
6
21
  readonly option: "os-shared-Select-option";
22
+ /** Reserved for the clear control; not applied to an element yet (the button uses `Select-clearIconButton`). */
7
23
  readonly clear: "os-shared-Select-clear";
24
+ /** Reserved for the helper / feedback text; not applied to an element yet. */
8
25
  readonly feedback: "os-shared-Select-feedback";
26
+ /** Closed-field value row (single label, or comma-separated labels in `isMultiple`). */
9
27
  readonly values: "os-shared-Select-values";
28
+ /** Value text inside the closed field. */
10
29
  readonly value: "os-shared-Select-value";
30
+ /** `+N more` suffix in the closed field (`isMultiple` with `maxVisibleValues`). */
11
31
  readonly valueOverflow: "os-shared-Select-valueOverflow";
32
+ /** In-menu search row (`isSearchable`). */
12
33
  readonly search: "os-shared-Select-search";
34
+ /** `N selected · Clear` row in the menu (`isMultiple` with `hasSelectionSummary`). */
13
35
  readonly summary: "os-shared-Select-summary";
36
+ /** Group heading row in the menu (`{ label, options }` items). */
37
+ readonly groupLabel: "os-shared-Select-groupLabel";
14
38
  };
15
39
  export declare const selectDefaultSearchPlaceholder = "Search";
16
40
  /** Gap between the field and the menu paper (Tap DS; matches Autocomplete). */
@@ -1,5 +1,5 @@
1
1
  export { default as Select } from './Select';
2
- export type { SelectProps, SelectOption, SelectOptionValue, SelectSingleValue, SelectMultipleValue, SelectClassNames, SelectSlotClassNames, } from './type';
2
+ export type { SelectProps, SelectOption, SelectOptionGroup, SelectItem, SelectOptionValue, SelectSingleValue, SelectMultipleValue, SelectClassNames, SelectSlotClassNames, } from './type';
3
3
  export { selectClassNames, selectFieldEndAlignedPaddingInlineEndPx, selectMenuDirection, selectValueAlignment } from './constants';
4
4
  export type { SelectMenuDirection, SelectValueAlignment } from './constants';
5
5
  export { SelectChevronIcon } from './icons';
@@ -1 +1 @@
1
- export{a as Select}from'../../_chunks/chunk-B2NOP2A5.js';import'../../_chunks/chunk-2LO4STE5.js';export{aa as SelectChevronIcon,a as selectClassNames,D as selectFieldEndAlignedPaddingInlineEndPx,j as selectMenuDirection,l as selectValueAlignment}from'../../_chunks/chunk-MLOWKQDW.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
1
+ export{a as Select}from'../../_chunks/chunk-JYVB2MAR.js';import'../../_chunks/chunk-JBE2LXDH.js';export{ba as SelectChevronIcon,a as selectClassNames,D as selectFieldEndAlignedPaddingInlineEndPx,j as selectMenuDirection,l as selectValueAlignment}from'../../_chunks/chunk-YG4CT6O4.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
@@ -60,6 +60,18 @@ export declare const SelectMenuSearchListSubheaderStyled: import("@mui/material/
60
60
  export declare const SelectMenuEmptySubheaderStyled: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material/ListSubheader").ListSubheaderTypeMap<{}, "li">> & {
61
61
  muiSkipListHighlight?: boolean | undefined;
62
62
  };
63
+ /**
64
+ * Group heading row; `$divider` adds the rule that separates it from the block above.
65
+ * `muiSkipListHighlight` keeps MUI's `MenuList` from treating the heading as an option / the initial active row.
66
+ */
67
+ export declare const SelectMenuGroupLabelStyled: import("@emotion/styled").StyledComponent<import("@mui/material/ListSubheader").ListSubheaderOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
68
+ ref?: ((instance: HTMLLIElement | null) => void) | import("react").RefObject<HTMLLIElement> | null | undefined;
69
+ }, "color" | "inset" | "classes" | "className" | "style" | "children" | "sx" | "disableGutters" | "disableSticky"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
70
+ $divider?: boolean | undefined;
71
+ $hidden?: boolean | undefined;
72
+ }, {}, {}> & {
73
+ muiSkipListHighlight: boolean;
74
+ };
63
75
  /** In-menu search field. */
64
76
  export declare const SelectMenuSearchInputStyled: import("@emotion/styled").StyledComponent<import("@mui/material/Input").InputProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
65
77
  export declare const SelectMenuSearchEndIconStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
@@ -19,12 +19,21 @@ export interface SelectOption {
19
19
  /** When true, the option cannot be selected. */
20
20
  disabled?: boolean;
21
21
  }
22
+ /** Headed group of options. Omit `label` to separate the rows without a heading. */
23
+ export interface SelectOptionGroup {
24
+ /** Group heading (string or React node). */
25
+ label?: ReactNode;
26
+ /** Options under this heading, in display order. */
27
+ options: SelectOption[];
28
+ }
29
+ /** Entry in `options` — a flat option or a headed group; flat options and groups can be mixed. */
30
+ export type SelectItem = SelectOption | SelectOptionGroup;
22
31
  export type SelectSingleValue = SelectOptionValue | null;
23
32
  export type SelectMultipleValue = SelectOptionValue[];
24
33
  /** Tier-2 Select — single or multi (`isMultiple`) over `{ label, value }` options. No react-hook-form. */
25
34
  export interface SelectProps {
26
- /** Options list; selection state uses each option’s `value`. */
27
- options: SelectOption[];
35
+ /** Options and/or headed groups (`{ label, options }`), rendered in array order; selection state uses each option’s `value`. */
36
+ options: SelectItem[];
28
37
  /** Multi Select (Tap DS): comma-separated field values (+N more) + menu checkboxes by default. @default false */
29
38
  isMultiple?: boolean;
30
39
  /** Checkbox on each option row; defaults to `true` when `isMultiple`. */
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { SelectMenuDirection } from './constants';
3
- import type { SelectOption, SelectOptionValue, SelectProps } from './type';
3
+ import type { SelectItem, SelectOption, SelectOptionGroup, SelectOptionValue, SelectProps } from './type';
4
4
  export type InternalOption = SelectOption & {
5
5
  id: string;
6
6
  };
@@ -25,7 +25,16 @@ export declare function mergeSelectMenuProps(MenuProps: SelectProps['MenuProps']
25
25
  export declare function stopSelectMenuEvent(e: {
26
26
  stopPropagation: () => void;
27
27
  }): void;
28
- export declare function toInternalOptions(options: SelectOption[]): InternalOption[];
28
+ export declare const isSelectOptionGroup: (item: SelectItem) => item is SelectOptionGroup;
29
+ /** Run of menu rows: a headed group, or consecutive flat options (no `label`). */
30
+ export interface InternalOptionBlock {
31
+ key: string;
32
+ label?: ReactNode;
33
+ isGroup: boolean;
34
+ options: InternalOption[];
35
+ }
36
+ /** Consecutive flat options share one block; each non-empty group is its own block. */
37
+ export declare function toInternalOptionBlocks(items: SelectItem[]): InternalOptionBlock[];
29
38
  export declare function findOption(options: InternalOption[], value: SelectOptionValue | null | undefined): InternalOption | null;
30
39
  export declare function getOptionValue(option: InternalOption | null | undefined): string;
31
40
  /** True when a menu close came from in-menu search or the selection-summary Clear. */
@@ -1 +1 @@
1
- export{b as default,a as sidebarClassNames}from'../../_chunks/chunk-QKEB3XTE.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
1
+ export{b as default,a as sidebarClassNames}from'../../_chunks/chunk-YMEGCVZ4.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';