@australiangreens/ag-internal-components 0.2.3 → 0.3.0
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.
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/AuthGuard/AuthGuard.d.ts.map +1 -1
- package/dist/components/SessionExpiryDialog/index.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -3
- package/dist/components/index.d.ts.map +1 -1
- package/dist/esm/index.js +796 -989
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/testing/wrappers.d.ts.map +1 -1
- package/package.json +9 -22
- package/dist/components/NavBar/NavBar.comp.test.d.ts +0 -2
- package/dist/components/NavBar/NavBar.comp.test.d.ts.map +0 -1
- package/dist/components/NavBar/NavBar.d.ts +0 -22
- package/dist/components/NavBar/NavBar.d.ts.map +0 -1
- package/dist/components/NavBar/NavBarContext.d.ts +0 -17
- package/dist/components/NavBar/NavBarContext.d.ts.map +0 -1
- package/dist/components/NavBar/NavBarDarkStyledList.d.ts +0 -3
- package/dist/components/NavBar/NavBarDarkStyledList.d.ts.map +0 -1
- package/dist/components/NavBar/NavBarLightStyledList.d.ts +0 -3
- package/dist/components/NavBar/NavBarLightStyledList.d.ts.map +0 -1
- package/dist/components/NavBar/NavBarLink.d.ts +0 -16
- package/dist/components/NavBar/NavBarLink.d.ts.map +0 -1
- package/dist/components/NavBar/NavBarLink.unit.test.d.ts +0 -2
- package/dist/components/NavBar/NavBarLink.unit.test.d.ts.map +0 -1
- package/dist/components/NavBar/Styling.d.ts +0 -16
- package/dist/components/NavBar/Styling.d.ts.map +0 -1
- package/dist/components/NavBar/index.d.ts +0 -9
- package/dist/components/NavBar/index.d.ts.map +0 -1
- package/dist/components/NavBar/index.stories.d.ts +0 -7
- package/dist/components/NavBar/index.stories.d.ts.map +0 -1
- package/dist/components/NavBar/testWrappers.d.ts +0 -6
- package/dist/components/NavBar/testWrappers.d.ts.map +0 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var Ve=Object.defineProperty,ze=Object.defineProperties;var Ge=Object.getOwnPropertyDescriptors;var U=Object.getOwnPropertySymbols;var ie=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable;var X=(e,t,n)=>t in e?Ve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,u=(e,t)=>{for(var n in t||(t={}))ie.call(t,n)&&X(e,n,t[n]);if(U)for(var n of U(t))se.call(t,n)&&X(e,n,t[n]);return e},B=(e,t)=>ze(e,Ge(t));var ae=(e,t)=>{var n={};for(var r in e)ie.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&U)for(var r of U(e))t.indexOf(r)<0&&se.call(e,r)&&(n[r]=e[r]);return n};var le=(e,t,n)=>X(e,typeof t!="symbol"?t+"":t,n);var I=(e,t,n)=>new Promise((r,s)=>{var a=c=>{try{l(n.next(c))}catch(p){s(p)}},d=c=>{try{l(n.throw(c))}catch(p){s(p)}},l=c=>c.done?r(c.value):Promise.resolve(c.value).then(a,d);l((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),f=require("react"),i=require("@mui/material"),Xe=require("@mui/material/CssBaseline"),T=require("@mui/material/styles"),Q=require("souvlaki"),Ye=require("react-router"),Ke=require("@mui/material/List"),Y=require("@mui/icons-material"),k=require("jotai"),Qe=require("@mui/material/Box"),Je=require("jotai/utils"),Ze=require("react-avatar"),J=require("@auth0/auth0-react"),Se=require("@tanstack/react-query"),et=require("autosuggest-highlight/match"),tt=require("autosuggest-highlight/parse"),ot=require("buffer"),nt=require("@mui/material/Skeleton"),L=e=>e&&e.__esModule?e:{default:e},we=L(Xe),je=L(Ke),ce=L(Qe),de=L(Ze),rt=L(et),it=L(tt),st=L(nt);function at({text:e}){const[t,n]=f.useState(0);return o.jsxs(o.Fragment,{children:[o.jsx(i.Typography,{variant:"h6",color:"inherit",component:"div",sx:{fontSize:"22px"},children:"Hello world"}),o.jsx(i.Typography,{variant:"caption",display:"block",children:o.jsx("span",{children:"Just ensuring MUI is working as planned as a peer dependency. v0.0.11"})}),o.jsx(i.Button,{variant:"outlined",onClick:()=>n(r=>r+1),"aria-label":"Increment",children:"Hello I am a button"}),o.jsxs("p",{children:["This is some text: ",o.jsx("span",{children:e})]}),o.jsxs(i.Paper,{children:["This number will incremember when button pressed: ",t]})]})}const Z=330,ee=73,N="Navbar",$={root:`${N}-root`,menuButton:`${N}-menuButton`,hide:`${N}-hide`,content:`${N}-content`,userInfoHolder:`${N}-userInfoHolder`,settings:`${N}-settings`,pieChartIcon:`${N}-pieChartIcon`},lt=T.styled(i.Box,{name:"NavBar"})(({theme:e})=>({[`&.${$.root}`]:{display:"flex"},[`& .${$.menuButton}`]:{marginRight:36},[`& .${$.hide}`]:{display:"none"},[`& .${$.content}`]:{flexGrow:1,padding:e.spacing(3)},[`& .${$.userInfoHolder}`]:{height:"148px",marginTop:"64px",marginBottom:"16px"}})),be=()=>({position:"absolute",height:"100%",overflowX:"hidden",overflowY:"hidden",color:"white",backgroundColor:"black"}),ct=()=>u({width:Z},be()),dt=()=>u({width:ee},be()),ut=T.styled(i.Drawer,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>u(u({width:t?Z:ee,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box",zIndex:e.zIndex.drawer+100},t&&{"& .MuiDrawer-paper":ct()}),!t&&{"& .MuiDrawer-paper":dt()}));class z extends Error{}le(z,"errorName","ContextError");const ke=f.createContext(null),pt={},ht={},De=({overrideState:e=pt,overrideActions:t=ht,children:n})=>{const[{open:r},s]=f.useState({open:!0}),a=f.useCallback(c=>{s({open:c})},[]),d=f.useCallback(()=>{s(c=>B(u({},c),{open:!c.open}))},[]),l=u(u({open:r,setOpen:a,toggleOpen:d},e),t);return o.jsx(ke.Provider,{value:l,children:n})},Be=()=>{const e=f.useContext(ke);if(e===null)throw new z("Error: Tried to useNavBar outside of a <NavBarProvider>");return e},Ee=(e={})=>u({open:!0},e),gt=Q.createHelper((e=Ee(),t={})=>({children:n})=>o.jsx(De,{overrideState:e,overrideActions:t,children:n})),xt=Q.createHelper(()=>({children:e})=>o.jsx(Ye.BrowserRouter,{children:e})),ue=7,mt=T.styled(je.default)(({theme:e})=>({backgroundColor:"black",color:"white","& .MuiListItem-root":{padding:"unset"},"& .MuiListItemButton-root":{" .MuiListItemIcon-root":{color:"white",padding:`${ue}px`},"&.Mui-focusVisible":{backgroundColor:e.palette.grey[700]},"&.Mui-selected":{borderLeftStyle:"solid",borderLeftWidth:"7px",borderLeftColor:e.palette.primary.main,paddingLeft:`calc(${e.spacing(2)} - ${ue}px)`},"&:hover":{backgroundColor:e.palette.primary.dark},"&.Mui-selected.Mui-focusVisible":{backgroundColor:e.palette.grey[700]},"&.Mui-selected:hover":{backgroundColor:e.palette.primary.dark}}})),pe=7,ft=T.styled(je.default)(({theme:e})=>({backgroundColor:"#e8e8e8",color:"inherit","& .MuiListItem-root":{padding:"unset"},"& .MuiListItemButton-root":{" .MuiListItemIcon-root":{color:"inherit",padding:`${pe}px`},"&.Mui-focusVisible":{backgroundColor:e.palette.grey[700]},"&.Mui-selected":{borderLeftStyle:"solid",borderLeftWidth:"7px",borderLeftColor:e.palette.primary.main,paddingLeft:`calc(${e.spacing(2)} - ${pe}px)`},"&:hover":{backgroundColor:e.palette.primary.dark},"&.Mui-selected.Mui-focusVisible":{backgroundColor:e.palette.grey[700]},"&.Mui-selected:hover":{backgroundColor:e.palette.primary.dark}}}));function At({"data-testid":e,children:t}){const{open:n}=Be();return o.jsxs(lt,{className:$.root,"data-testid":e,children:[o.jsx(we.default,{}),o.jsx(ut,{variant:"permanent",anchor:"left",transitionDuration:null,open:n,children:t})]})}const _e=()=>{const e=i.useTheme();return i.useMediaQuery(e.breakpoints.down("sm"))},vt=64,Ct=72,yt=256,H=k.atom(!0),Fe=k.atom(yt),Ie=k.atom(Ct),K=k.atom(""),Te=k.atom(void 0),Ne=k.atom(vt),$e=k.atom(void 0);function St({links:e}){return o.jsx("div",{children:"LinksMenu not implemented yet"})}const W="Navbar",q={root:`${W}-root`,menuButton:`${W}-menuButton`,hide:`${W}-hide`,content:`${W}-content`},wt=T.styled(i.Box,{name:"NavBar"})(({theme:e})=>({[`&.${q.root}`]:{display:"flex"},[`& .${q.menuButton}`]:{marginRight:36},[`& .${q.hide}`]:{display:"none"},[`& .${q.content}`]:{flexGrow:1,padding:e.spacing(3)}})),R=(e,t,n)=>e.transitions.create(t,{easing:e.transitions.easing.sharp,duration:n==="leaving"?e.transitions.duration.leavingScreen:e.transitions.duration.enteringScreen}),jt=e=>{const t=i.useTheme();return o.jsx(i.Collapse,u({easing:t.transitions.easing.sharp,timeout:{enter:t.transitions.duration.enteringScreen,exit:t.transitions.duration.leavingScreen}},e))},Le=e=>{var t,n;return{overflowX:"hidden",color:"inherit",backgroundColor:(n=(t=e==null?void 0:e.navBar)==null?void 0:t.backgroundColor)!=null?n:"white"}},he=(e,t)=>u({width:t,transition:R(e,"width","entering")},Le(e)),ge=(e,t)=>u({width:t,transition:R(e,"width","leaving")},Le(e)),bt=T.styled(i.Drawer,{shouldForwardProp:e=>!["widthOpen","widthClosed","isSmallScreen"].includes(e)})(({theme:e,open:t,widthOpen:n,widthClosed:r,isSmallScreen:s})=>u(u({flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box",display:"flex",flexDirection:"column"},t&&B(u({},he(e,n)),{backgroundColor:"","& .MuiDrawer-paper":he(e,n)})),!t&&B(u({},ge(e,s?n:r)),{backgroundColor:"","& .MuiDrawer-paper":ge(e,s?n:r)})));function Me(e){return e.replace(/(^|-)([a-z])/g,(t,n,r)=>n==="-"?" "+r.toUpperCase():r.toUpperCase())}function kt(e,t,n,r){var d;if(!e)return"None";const a=Object.entries(e).filter(([l,c])=>l.startsWith("https://greens.org.au/roles/")&&c.includes(t)).map(([l])=>{var c;return Me((c=l.split("/").at(-1))!=null?c:"")});return(d=r.find(l=>n[l].some(c=>a.includes(c))))!=null?d:"None"}const Dt=e=>{const{getIdTokenClaims:t,user:n}=J.useAuth0();return Se.useQuery({queryKey:["availableDomains",n==null?void 0:n.sub],queryFn:()=>I(null,null,function*(){const r=yield t();return r?Object.entries(r).reduce((s,[a,d])=>{var p;const l=Me((p=a.split("/").at(-1))!=null?p:""),c=a.startsWith("https://greens.org.au/roles/")&&e.includes(l)?d:[];return[...new Set([...s,...c])]},[]):[]})})},Bt=e=>Object.values(e).reduce((t,n)=>[...new Set([...t,...n])],[]),V={log:console.warn.bind(console),error:console.error.bind(console),warn:console.warn.bind(console),info:console.info.bind(console),debug:console.debug.bind(console)};function Et(e,t){console[e]=(...n)=>{for(const r of t)if(typeof r=="function"){if(r(...n))return}else if(r instanceof RegExp&&n.length>0){for(const s of n)if(typeof s=="string"&&r.test(s))return}V[e](n)}}function _t(e){if(e)console[e]=V[e];else for(const t of Object.keys(V))console[t]=V[t]}function Pe(e){let t=0;for(let n=0,r=e.length;n<r;n++){const s=e.charCodeAt(n);t=(t<<5)-t+s,t|=0}return t}const xe=["#A62A21","#7e3794","#0B51C1","#3A6024","#A81563","#B3003C"],me=e=>e.split(/\s/).map(t=>t.substring(0,1).toUpperCase()).filter(t=>!!t).slice(0,2).join("").toUpperCase();function Ft({user:e,domainCode:t,open:n,useNewAvatar:r=!1}){const s=i.useTheme();return o.jsxs(i.Box,{sx:{paddingTop:3,display:"flex",alignItems:"center",flexDirection:"column",gap:"0.5rem"},children:[!r&&o.jsx(i.Box,{sx:{width:n?"5rem":"2rem",transition:n?R(s,["width","height"],"entering"):R(s,["width","height"],"leaving"),aspectRatio:1},children:e!=null&&e.name?o.jsx(o.Fragment,{children:o.jsx(i.Avatar,{src:e==null?void 0:e.picture,sx:{width:"100%",height:"100%",bgcolor:xe[Math.abs(Pe(e==null?void 0:e.name))%xe.length]},children:me(e==null?void 0:e.name)})}):o.jsx(i.Avatar,{sx:{width:"100%",height:"100%"}})}),r&&o.jsx(i.Box,{sx:{width:n?"5rem":"2rem",transition:n?R(s,["width","height"],"entering"):R(s,["width","height"],"leaving"),aspectRatio:1},children:e!=null&&e.name?o.jsx(o.Fragment,{children:o.jsxs(de.default,{src:e==null?void 0:e.picture,name:e==null?void 0:e.name,round:!0,size:n?"80":"32",children:[" ",me(e==null?void 0:e.name)," ","ab"]})}):o.jsx(de.default,{})}),o.jsx(jt,{sx:{width:"100%"},in:n,children:o.jsx(i.Fade,{in:n,children:o.jsxs(i.Box,{width:"100%",display:"flex",flexDirection:"column",alignItems:"center",children:[e!=null&&e.name?o.jsx(i.Typography,{children:e==null?void 0:e.name}):o.jsx(i.Skeleton,{animation:!1,width:"50%"}),t?o.jsx(i.Typography,{children:t.toUpperCase()}):o.jsx(i.Skeleton,{animation:!1,width:"25%"})]})})})]})}function It({open:e,widthClosed:t,widthOpen:n,"data-testid":r,top:s,middle:a,bottom:d,user:l,domainCode:c,useNewAvatar:p=!1}){const x=_e(),w=k.useSetAtom(H);return o.jsx(wt,{className:q.root,"data-testid":r,children:o.jsxs(bt,{open:e,widthOpen:n,widthClosed:t,anchor:"left",variant:x?"temporary":"permanent",PaperProps:{component:"nav"},onClose:()=>{w(!1)},isSmallScreen:x,children:[!x&&o.jsx(i.Toolbar,{}),s&&o.jsxs(i.Box,{flexGrow:"0",children:[s,o.jsx(i.Divider,{variant:"middle",sx:{marginY:"0.5rem"}})]}),o.jsx(i.Box,{flexGrow:"1",children:Array.isArray(a)?o.jsx(St,{links:a}):a}),o.jsxs(i.Box,{flexGrow:"0",children:[o.jsx(i.Divider,{variant:"middle",sx:{marginY:"0.5rem"}}),o.jsx(Ft,{user:l,domainCode:c,open:e,useNewAvatar:p}),d&&o.jsx(o.Fragment,{children:d})]})]})})}function Tt({children:e,topBarHeight:t,maxWidth:n=!1,noPadding:r}){return o.jsx(i.Box,{sx:{overflow:"auto",height:`calc(100vh - ${t}px)`,flexGrow:1},children:r?o.jsx(i.Box,{component:"main",id:"main-content",height:"inherit",children:e}):o.jsx(i.Container,{component:"main",id:"main-content",maxWidth:n,sx:{paddingTop:3,paddingBottom:3,flexGrow:1},children:e})})}const Nt="TopBar",$t={titleText:`${Nt}-titleText`};function Lt({titleText:e="",height:t,"data-testid":n,middle:r}){const s=k.useSetAtom(H),a=()=>s(c=>!c),d=i.useTheme(),l=_e();return o.jsx("header",{"data-testid":n,children:o.jsxs(i.Paper,{square:!0,elevation:0,sx:{width:"100%",position:"sticky",color:"primary.contrastText",backgroundColor:"primary.main",display:"flex",alignItems:"center",gap:2,flexShrink:0,height:t,zIndex:l?0:d.zIndex.drawer+101},children:[o.jsx(i.IconButton,{size:"medium",color:"inherit",sx:{padding:1.5,marginLeft:"12px"},onClick:a,children:o.jsx(Y.ViewHeadline,{fontSize:"medium"})}),o.jsx(i.Typography,{className:$t.titleText,variant:"h6",component:"h1",children:e}),r]})})}function Mt({children:e,initialTitleText:t,initialNavBarOpen:n,pageContainerProps:r,pageContentDataTestId:s,topBarDataTestId:a,navBarDataTestId:d,navBarMiddle:l,navBarBottom:c,user:p,domainCode:x,useNewAvatar:w=!1}){Je.useHydrateAtoms([[H,n!=null?n:!0],[K,t!=null?t:""]]);const y=k.useAtomValue(H),[m]=k.useAtom(Fe),[j]=k.useAtom(Ie),D=k.useAtomValue(K),[h]=k.useAtom(Ne),[b]=k.useAtom(Te),[E]=k.useAtom($e);return o.jsxs(ce.default,{children:[o.jsx(we.default,{}),o.jsx(Lt,{titleText:D,"data-testid":a,height:h,middle:b}),o.jsxs(ce.default,{sx:{display:"flex"},children:[o.jsx(It,{open:y,top:E,middle:l,bottom:c,user:p,domainCode:x,widthOpen:m,widthClosed:j,offsetTop:h,"data-testid":d,useNewAvatar:w}),o.jsx(Tt,B(u({"data-testid":s,topBarHeight:h},r),{children:e}))]})]})}const te=({isOpen:e,dialogTitle:t,children:n,maxWidth:r,primaryButton:s,secondaryButton:a,additionalButtons:d,onClose:l,sx:c,"data-testid":p,disableCloseOnBackdropOrEscape:x=!1,isLoading:w=!1})=>{var j,D;const[y,m]=f.useState(!1);return o.jsxs(i.Dialog,{open:e,onClose:(h,b)=>I(null,null,function*(){x&&(b==="backdropClick"||b==="escapeKeyDown")||y||(a!=null&&a.onClick?yield a.onClick():l())}),fullWidth:!0,maxWidth:r!=null?r:"xs","data-testid":p,sx:c,children:[w&&o.jsx(i.LinearProgress,{sx:{height:"4px",marginBottom:"-4px"}}),o.jsx(i.DialogTitle,{children:t}),o.jsx(i.DialogContent,{sx:{"& > :last-child":{marginBottom:0}},children:n}),o.jsxs(i.DialogActions,{children:[o.jsx(i.Button,{onClick:(j=a==null?void 0:a.onClick)!=null?j:l,"data-testid":a==null?void 0:a.testId,disabled:(a==null?void 0:a.disabled)||y,color:a==null?void 0:a.buttonColor,children:(D=a==null?void 0:a.text)!=null?D:"Cancel"}),d&&d.map((h,b)=>{var E;return o.jsx(i.Button,{onClick:h==null?void 0:h.onClick,"data-testid":h==null?void 0:h.testId,disabled:(h==null?void 0:h.disabled)||y,color:h==null?void 0:h.buttonColor,children:(E=h.text)!=null?E:`Button ${b}`},b)}),s&&o.jsx(i.Button,{onClick:()=>I(null,null,function*(){var h;m(!0),yield(h=s.onClick)==null?void 0:h.call(s),m(!1)}),"data-testid":s.testId,disabled:s.disabled||y,color:s==null?void 0:s.buttonColor,children:s.text})]})]})},oe=({minLength:e,preLoadedOptions:t,lookup:n,label:r,inputValue:s})=>Se.useQuery({queryFn:()=>e&&s.length<e?t!=null?t:[]:t?t.filter(a=>a.label.toLowerCase().includes(s.toLowerCase())):n(s),queryKey:["autocomplete",r,s]});function Pt({lookup:e=()=>I(null,null,function*(){}),enableHighlighting:t=!0,onChange:n,minLength:r=0,label:s,value:a,"data-testid":d,sx:l,boxSx:c,textFieldColor:p,textFieldVariant:x="filled",loadingText:w="Loading...",noOptionsText:y="No options",popupIcon:m=o.jsx(Y.ArrowDropDown,{}),error:j=!1,helperText:D="",preLoadedOptions:h=void 0,disablePortal:b=!1,disableIconFlip:E=!1}){const[F,O]=f.useState(""),M=(g,v)=>{const C=a.filter(S=>S.id!==v);n(C,"delete",g)},{data:A,isLoading:_}=oe({inputValue:F,label:s,lookup:e,minLength:r,preLoadedOptions:h}),P=F.length>=r;return o.jsxs("div",{"data-testid":d,children:[o.jsx(i.Autocomplete,{sx:u(u({},l),E?{".MuiAutocomplete-popupIndicatorOpen":{transform:"rotate(0deg)"}}:{}),"data-testid":d?`${d}:Autocomplete`:void 0,disablePortal:b,multiple:!0,getOptionLabel:g=>typeof g=="string"?g:g.label,loading:P?_:!1,options:[...a,...A!=null?A:[]],filterSelectedOptions:!0,includeInputInList:!0,value:a,onChange:(g,v,C)=>{n(v,C,g)},onInputChange:(g,v)=>O(v),noOptionsText:P?y:"Start typing to search",loadingText:w,popupIcon:m,renderInput:g=>o.jsx(i.TextField,B(u({},g),{label:s,fullWidth:!0,variant:x,error:j,helperText:D,InputProps:B(u({},g.InputProps),{endAdornment:o.jsxs(o.Fragment,{children:[_?o.jsx(i.CircularProgress,{color:"inherit",size:20}):null,g.InputProps.endAdornment]})}),"data-testid":d?`${d}:Autocomplete:TextField`:void 0,onKeyDown:v=>{(v.key==="Backspace"||v.key==="Delete")&&v.stopPropagation()},color:p})),renderTags:()=>null,isOptionEqualToValue:(g,v)=>g.id===v.id,renderOption:(g,v,C)=>{if(t){const S=rt.default(v.label,C.inputValue,{insideWords:!0,findAllOccurrences:!0}),G=it.default(v.label,S);return f.createElement("li",B(u({},g),{key:v.id,"data-testid":d?`${d}:Autocomplete:option(${v.id.toString()})`:void 0}),o.jsx("div",{children:G.map((re,We)=>o.jsx("span",{style:{fontWeight:re.highlight?700:400},children:re.text},We))}))}else return f.createElement("li",B(u({},g),{key:v.id,"data-testid":d?`${d}:option(${v.id.toString()})`:void 0}),v.label)}}),a.length>0&&o.jsx(i.Box,{sx:c,children:a.map(g=>o.jsx(i.Chip,{sx:{marginTop:1,marginRight:1,height:"auto"},label:o.jsx(i.Tooltip,{title:g.tooltipContent||"",placement:"bottom-start",PopperProps:{modifiers:[{name:"offset",options:{offset:[115,-15]}}]},children:o.jsx(i.Typography,{style:{whiteSpace:"normal"},children:g.chipLabel?g.chipLabel:g.label})}),"data-testid":d?`${d}:Chip(${g.id.toString()})`:void 0,onDelete:v=>M(v,g.id),deleteIcon:o.jsx(Y.Cancel,{"data-testid":d?`${d}:Chip(${g.id.toString()}):deleteIcon`:void 0})},g.id))})]})}const Rt=/MUI: The value provided to.*is invalid/i,Ot=({lookup:e=()=>I(null,null,function*(){}),onChange:t,label:n,value:r,sx:s,textFieldColor:a,textFieldVariant:d="filled",error:l=!1,"data-testid":c,noOptionsText:p="No options",minLength:x=3,disablePortal:w=!1,preLoadedOptions:y,helperText:m="",disabled:j,popupIcon:D,disableIconFlip:h})=>{const[b,E]=f.useState(""),{data:F,isLoading:O}=oe({inputValue:b,label:n,lookup:e,minLength:x!=null?x:0,preLoadedOptions:y}),M=b.length>=x;return o.jsx("div",{"data-testid":c,children:o.jsx(i.Stack,{direction:"row",spacing:1,children:o.jsx(i.Autocomplete,{sx:u(u({},s),h?{".MuiAutocomplete-popupIndicatorOpen":{transform:"rotate(0deg)"}}:{}),"data-testid":c?`${c}:Autocomplete`:void 0,loading:M?O:!1,options:F!=null?F:[],onChange:(A,_,P)=>{t(A,_,P)},disablePortal:w,filterOptions:A=>A,value:r,noOptionsText:M?p:"Start typing to search",getOptionLabel:A=>A.label,popupIcon:D,renderInput:A=>o.jsx(i.TextField,B(u({"data-testid":c?`${c}:Autocomplete:TextField`:void 0},A),{variant:d,label:n,color:a,error:l,helperText:m})),isOptionEqualToValue:(A,_)=>A.id===_.id,onInputChange:(A,_)=>{E(_)},renderOption:(A,_)=>f.createElement("li",B(u({},A),{key:_.id,"data-testid":c?`${c}:Autocomplete:option(${_.id.toString()})`:void 0}),_.label),disabled:j})})})},Re=e=>{if(!e)return-1;try{const n=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),r=decodeURIComponent(ot.Buffer.from(n,"base64").toString("utf8").split("").map(function(a){return"%"+("00"+a.charCodeAt(0).toString(16)).slice(-2)}).join("")),s=JSON.parse(r);return s!=null&&s.exp?s.exp:-1}catch(t){return-1}},qt=({open:e=!1,closeHandler:t,setAuth0ExpiryTime:n})=>{const{logout:r,getAccessTokenSilently:s}=J.useAuth0(),[a,d]=f.useState(0),l=()=>I(null,null,function*(){r({logoutParams:{returnTo:`${window.location.origin}`}})}),c=()=>I(null,null,function*(){d(a+1),t()});f.useEffect(()=>{I(null,null,function*(){if(a>0){const y=yield s({cacheMode:"off"}),m=Re(y)*1e3;n(m)}})},[a,s,n]);const p={text:"Continue",onClick:c,disabled:!1,testId:"PreferencesDialog",buttonColor:"secondary"},x={text:"Log out",onClick:l,disabled:!1,testId:"PreferencesDialog",buttonColor:"secondary"};return o.jsx(te,{isOpen:e,primaryButton:p,secondaryButton:x,onClose:t,dialogTitle:"Session expiry",disableCloseOnBackdropOrEscape:!0,children:o.jsx("p",{style:{marginBottom:0},children:"Your session is about to time out due to inactivity. Do you want to continue?"})})};function Ht(e){return"error"in e}function Ut(e){var r;const t=e.error,n=(r=e==null?void 0:e.error_description)!=null?r:"";return t==="access_denied"&&n.startsWith("You do not have the required authorization")}function Wt(e){var r;const t=e.error,n=(r=e==null?void 0:e.error_description)!=null?r:"";return t==="access_denied"&&n.startsWith("User did not authorize the request")}function Vt(e){var r;const t=e.error,n=(r=e==null?void 0:e.error_description)!=null?r:"";return t==="access_denied"&&n.match(/Script.*time.*exceeded/)}function zt({children:e,appName:t="the app",throwErrors:n="none",disableConsoleLogging:r=!1,onError:s=()=>{}}){var w,y;const{isAuthenticated:a,isLoading:d,error:l,loginWithRedirect:c,logout:p}=J.useAuth0();f.useEffect(()=>{l&&s(l)},[l,s]);const x=f.useMemo(()=>({appState:{returnTo:`${window.location.pathname}${window.location.search}`}}),[]);if(f.useEffect(()=>{d||a||l||c(x)},[d,a,l,c,s,x]),l){if(r||console.error(`Error detected in AuthGuard [isAuthenticated=${a},isLoading=${d}]`,l),n==="all")throw l;if(Ht(l)){let m="Auth error",j="An unknown Auth0 error occurred.";if(Ut(l))m="Unauthorised",j=`You are not authorised to access ${t}.`;else if(Wt(l))m="App not authorised",j=`You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`;else if(Vt(l))m="Auth0 script execution time exceeded",j="The Auth0 login flow exceeded the time limit (20s). Try again in a minute by clicking the RELOAD button below.";else if(l.message==="Invalid state"){const D=localStorage.getItem("auth0_redirect_count");D?D&&parseInt(D)<2&&(localStorage.setItem("auth0_redirect_count",String(parseInt(D)+1)),c(x)):(localStorage.setItem("auth0_redirect_count","1"),c(x))}else if(n==="unknown")throw l;return o.jsxs(i.Dialog,{open:!0,children:[o.jsx(i.DialogTitle,{children:m}),o.jsxs(i.DialogContent,{children:[o.jsx(i.Typography,{children:j}),o.jsx("br",{}),o.jsx(i.Typography,{variant:"subtitle2",children:"Details from Auth0"}),o.jsxs(i.Typography,{variant:"body2",children:["error: ",(w=l==null?void 0:l.error)!=null?w:"N/A"]}),o.jsxs(i.Typography,{variant:"body2",children:["description: ",(y=l==null?void 0:l.error_description)!=null?y:"N/A"]})]}),o.jsxs(i.DialogActions,{children:[m==="Auth0 script execution time exceeded"&&o.jsx(i.Button,{href:window.location.origin+window.location.pathname,children:"Reload"}),o.jsx(i.Button,{onClick:()=>p({logoutParams:{returnTo:window.location.origin}}),children:"Logout"})]})]})}else if(n==="unknown")throw l}return a?(localStorage.removeItem("auth0_redirect_count"),o.jsx(o.Fragment,{children:e})):o.jsx(st.default,{variant:"rectangular",animation:"pulse",height:"100vh",width:"100vw"})}const Gt={autoHideDuration:6e3,anchorOrigin:{vertical:"top",horizontal:"center"},disableWindowBlurListener:!1},Xt={shouldClose:(e,t)=>t!=="clickaway"},fe={message:"",severity:"info",variant:"standard",progressIndicator:void 0},Ae=100,ve=2e3,Yt=2e3,Kt=(()=>{let e=0;return()=>(e+=1,e)})(),Qt={borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px"},Jt={},Zt={},ne=f.createContext(null);function Oe(a){var d=a,{overrideState:e=Jt,overrideActions:t=Zt,shouldClose:n=Xt.shouldClose,children:r}=d,s=ae(d,["overrideState","overrideActions","shouldClose","children"]);var v;const[{open:l},c]=f.useState({open:!1}),p=f.useRef([]),x=f.useRef(Date.now()),w=f.useRef(0),y=f.useCallback(C=>{c({open:C})},[]),m=f.useCallback((C={})=>{w.current+=1,p.current.length>=Ae&&Date.now()-x.current>=ve&&(x.current=Date.now(),console.error(`SaladBarProvider: MAX_QUEUE_LENGTH (${Ae}) hit ${w.current} times in last ${ve}ms)`),w.current=0);const S=u(B(u({},fe),{key:Kt()}),C);return p.current.push(S),p.current.length===1&&c({open:!0}),S.key},[]),j=(C="",S={})=>m(u({message:C,severity:"success"},S)),D=(C="",S={})=>m(u({message:C,severity:"info"},S)),h=(C="",S={})=>m(u({message:C,severity:"warning"},S)),b=(C="",S={})=>m(u({message:C,severity:"error"},S)),E=C=>{const S=p.current.findIndex(G=>G.key===C);if(S!==-1)return S===0?(c({open:!1}),p.current[0]):p.current.splice(S,1)},F=(C,S)=>{n(C,S)&&c({open:!1})},O=()=>{},M=()=>{p.current.shift(),p.current.length>0&&c({open:!0})},A=(v=p.current[0])!=null?v:u({},fe),_={};"autoHideDuration"in A&&(_.autoHideDuration=A.autoHideDuration);const P=u(u({},Gt),s),g=u(u({open:l,setOpen:y,enqueueNotification:m,enqueueSuccessNotification:j,enqueueInfoNotification:D,enqueueWarningNotification:h,enqueueErrorNotification:b,removeNotification:E},e),t);return o.jsxs(ne.Provider,{value:g,children:[r,o.jsx(i.Snackbar,B(u(u({},P),_),{open:l,onClose:F,TransitionProps:{onExited:M,onExit:O},sx:{zIndex:Yt},children:o.jsxs("div",{children:[o.jsx(i.Alert,{onClose:C=>F(C,"closeAlert"),severity:A.severity,variant:"filled",icon:A.progressIndicator==="circular"?o.jsx(i.CircularProgress,{size:"1em"}):void 0,style:A.progressIndicator==="linear"?Qt:void 0,children:A.message}),A.progressIndicator==="linear"&&o.jsx(i.LinearProgress,{color:"primary"})]})}))]})}function qe(){const e=f.useContext(ne);if(e===null)throw new z("Error: Tried to useSaladBar outside of a <SaladBarProvider>");return e}const eo=Q.createHelper((e={autoHideDuration:1},t={},n={})=>({children:r})=>o.jsx(Oe,B(u({},e),{overrideState:t,overrideActions:n,children:o.jsx(o.Fragment,{children:r})}))),He="domainCode";var ye;const Ce=k.atom(JSON.parse((ye=localStorage.getItem(He))!=null?ye:'{"domainCode": ""}').domainCode),Ue=k.atom(e=>e(Ce),(e,t,n)=>{t(Ce,n),localStorage.setItem(He,JSON.stringify({domainCode:n}))}),to={act:"ACT",nsw:"NSW",nt:"NT",qld:"QLD",sa:"SA",tas:"TAS",vic:"VIC",wa:"WA",ag:"AG",fedmps:"Fedmps","":""},oo=e=>{var t;return e===null?"N/A":(t=to[e])!=null?t:""},no=({isLoading:e,isOpen:t,onClose:n,onDomainChange:r,domainOptions:s,applicationName:a,handleLogout:d})=>{const[l,c]=k.useAtom(Ue),[p,x]=f.useState(l),{enqueueSuccessNotification:w}=qe(),y=s.length===0,m=!!l&&!s.includes(l)&&!s.includes(p),j=!l||y||m,D=()=>I(null,null,function*(){p?(c(p),r==null||r(p),w(`Set organisation to ${p}`),n()):(c(""),r==null||r(""))}),h=()=>I(null,null,function*(){l&&!y&&!m?(x(l),n()):j&&d()});let b;return y?b="Unable to retrieve your active organisations. Try logging in again.":m&&(b="You no longer have any roles in your chosen organisation. Please choose another."),o.jsxs(te,{isOpen:t,dialogTitle:"Select an organisation",primaryButton:{text:"Confirm",onClick:D,disabled:!p||y||m,buttonColor:"primary"},secondaryButton:{text:j?"Logout":"Cancel",onClick:h},onClose:j?()=>{}:n,children:[o.jsxs(i.Typography,{marginBottom:2,children:["Select the default organisation that you want to use with the ",a,"."]}),o.jsx(i.Autocomplete,{loading:e,multiple:!1,disableClearable:!1,value:p!==""?p:null,onChange:(E,F)=>x(F!=null?F:""),getOptionLabel:oo,options:[...s.toSorted()],renderInput:E=>o.jsx(i.TextField,B(u({},E),{variant:"filled",label:"Select organisation",InputProps:B(u({},E.InputProps),{endAdornment:o.jsxs(o.Fragment,{children:[e?o.jsx(i.CircularProgress,{color:"inherit",size:20,sx:{marginTop:"-20px"}}):null,E.InputProps.endAdornment]})})}))}),b&&o.jsx(i.FormHelperText,{error:!0,children:b})]})},ro=T.createTheme({palette:{primary:{dark:"#00A651",light:"#A3D39C",main:"#007236",contrastText:"#FFF"},warning:{main:"#F5871F",light:"#FCC589",dark:"#A2590A",contrastText:"#FFF"},secondary:{main:"#662D91",light:"#BD8CBF",dark:"#440E62",contrastText:"#FFF"},error:{main:"#D43C95",light:"#8F2064",dark:"#F9CDE0",contrastText:"#FFF"},info:{main:"#00A88D",light:"#ADDCCF",dark:"#005243",contrastText:"#FFF"},success:{main:"#00A651",light:"#A3D39C",dark:"#007236",contrastText:"#FFF"}},typography:{explainer:{fontSize:"14px",marginBlockStart:"1em"}},navBar:{backgroundColor:"#E8E8E8"}}),io=T.createTheme({palette:{primary:{main:"#007236",dark:"#005221",light:"#00A04E",contrastText:"#FFFFFF"},secondary:{main:"#662D91",dark:"#440E62",light:"#93268F",contrastText:"#FFFFFF"},error:{main:"#D32F2F",dark:"#C62828",light:"#EF5350"},info:{main:"#0288D1",dark:"#01579B",light:"#03A9F4"},success:{main:"#0288D1",dark:"#01579B",light:"#03A9F4"}},components:{MuiTextField:{defaultProps:{color:"secondary"}},MuiToggleButtonGroup:{defaultProps:{color:"secondary"}},MuiCheckbox:{defaultProps:{color:"secondary"}},MuiSelect:{defaultProps:{color:"secondary"}},MuiSwitch:{defaultProps:{color:"secondary"}},MuiFormControl:{defaultProps:{color:"secondary"}},MuiMenuItem:{styleOverrides:{root:({theme:e})=>({"&.Mui-selected":{backgroundColor:T.alpha(e.palette.secondary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:T.alpha(e.palette.secondary.main,e.palette.action.selectedOpacity)},"&.Mui-focusVisible":{backgroundColor:T.alpha(e.palette.secondary.main,e.palette.action.focusOpacity)}}})}}},typography:{h4:{fontSize:"1.88rem",fontWeight:500},h5:{fontWeight:500},explainer:{fontSize:"14px",marginBlockStart:"1em"}},navBar:{backgroundColor:"#E8E8E8"}});exports.AgDialog=te;exports.AppLayout=Mt;exports.AuthGuard=zt;exports.Context=ne;exports.ContextError=z;exports.DomainCodeDialog=no;exports.ExampleComponent=at;exports.FetchAutocomplete=Pt;exports.MUI_AUTOCOMPLETE_VALUE_WARNING_REGEX=Rt;exports.NAVBAR_WIDTH_CLOSED=ee;exports.NAVBAR_WIDTH_OPENED=Z;exports.NavBar=At;exports.NavBarDarkStyledList=mt;exports.NavBarLightStyledList=ft;exports.NavBarProvider=De;exports.SaladBarProvider=Oe;exports.SessionExpiryDialog=qt;exports.SingleAutocomplete=Ot;exports.buildNavBarState=Ee;exports.determineUserLevelFromClaims=kt;exports.domainCodeAtom=Ue;exports.fed21Theme=ro;exports.getAuth0Expiry=Re;exports.getValidBusinessRoles=Bt;exports.internalAgSystemsTheme=io;exports.navBarClasses=$;exports.navBarOpenAtom=H;exports.navBarTopAtom=$e;exports.navBarWidthClosedAtom=Ie;exports.navBarWidthOpenAtom=Fe;exports.simpleHashCode=Pe;exports.suppressConsole=Et;exports.titleTextAtom=K;exports.topBarHeightAtom=Ne;exports.topBarMiddleAtom=Te;exports.unsuppressConsole=_t;exports.useAutocompleteOptions=oe;exports.useNavBar=Be;exports.useSaladBar=qe;exports.useValidDomains=Dt;exports.withBrowserRouter=xt;exports.withNavBarProvider=gt;exports.withSaladBarProvider=eo;
|
|
1
|
+
"use strict";var Te=Object.defineProperty,Ie=Object.defineProperties;var Be=Object.getOwnPropertyDescriptors;var U=Object.getOwnPropertySymbols;var ee=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable;var z=(e,t,n)=>t in e?Te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,p=(e,t)=>{for(var n in t||(t={}))ee.call(t,n)&&z(e,n,t[n]);if(U)for(var n of U(t))te.call(t,n)&&z(e,n,t[n]);return e},_=(e,t)=>Ie(e,Be(t));var oe=(e,t)=>{var n={};for(var i in e)ee.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&U)for(var i of U(e))t.indexOf(i)<0&&te.call(e,i)&&(n[i]=e[i]);return n};var ne=(e,t,n)=>z(e,typeof t!="symbol"?t+"":t,n);var I=(e,t,n)=>new Promise((i,s)=>{var l=c=>{try{a(n.next(c))}catch(u){s(u)}},d=c=>{try{a(n.throw(c))}catch(u){s(u)}},a=c=>c.done?i(c.value):Promise.resolve(c.value).then(l,d);a((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),D=require("react"),r=require("@mui/material"),G=require("@mui/icons-material"),Pe=require("autosuggest-highlight/match"),Ne=require("autosuggest-highlight/parse"),xe=require("@tanstack/react-query"),X=require("@auth0/auth0-react"),Me=require("buffer"),$e=require("@mui/material/Skeleton"),w=require("jotai"),Re=require("souvlaki"),Le=require("@mui/material/CssBaseline"),qe=require("@mui/material/Box"),Ue=require("jotai/utils"),B=require("@mui/material/styles"),Oe=require("react-avatar"),$=e=>e&&e.__esModule?e:{default:e},He=$(Pe),We=$(Ne),ze=$($e),Ge=$(Le),ie=$(qe),re=$(Oe);function Ve({text:e}){const[t,n]=D.useState(0);return o.jsxs(o.Fragment,{children:[o.jsx(r.Typography,{variant:"h6",color:"inherit",component:"div",sx:{fontSize:"22px"},children:"Hello world"}),o.jsx(r.Typography,{variant:"caption",display:"block",children:o.jsx("span",{children:"Just ensuring MUI is working as planned as a peer dependency. v0.0.11"})}),o.jsx(r.Button,{variant:"outlined",onClick:()=>n(i=>i+1),"aria-label":"Increment",children:"Hello I am a button"}),o.jsxs("p",{children:["This is some text: ",o.jsx("span",{children:e})]}),o.jsxs(r.Paper,{children:["This number will incremember when button pressed: ",t]})]})}const K=({isOpen:e,dialogTitle:t,children:n,maxWidth:i,primaryButton:s,secondaryButton:l,additionalButtons:d,onClose:a,sx:c,"data-testid":u,disableCloseOnBackdropOrEscape:x=!1,isLoading:k=!1})=>{var y,F;const[v,g]=D.useState(!1);return o.jsxs(r.Dialog,{open:e,onClose:(h,j)=>I(null,null,function*(){x&&(j==="backdropClick"||j==="escapeKeyDown")||v||(l!=null&&l.onClick?yield l.onClick():a())}),fullWidth:!0,maxWidth:i!=null?i:"xs","data-testid":u,sx:c,children:[k&&o.jsx(r.LinearProgress,{sx:{height:"4px",marginBottom:"-4px"}}),o.jsx(r.DialogTitle,{children:t}),o.jsx(r.DialogContent,{sx:{"& > :last-child":{marginBottom:0}},children:n}),o.jsxs(r.DialogActions,{children:[o.jsx(r.Button,{onClick:(y=l==null?void 0:l.onClick)!=null?y:a,"data-testid":l==null?void 0:l.testId,disabled:(l==null?void 0:l.disabled)||v,color:l==null?void 0:l.buttonColor,children:(F=l==null?void 0:l.text)!=null?F:"Cancel"}),d&&d.map((h,j)=>{var b;return o.jsx(r.Button,{onClick:h==null?void 0:h.onClick,"data-testid":h==null?void 0:h.testId,disabled:(h==null?void 0:h.disabled)||v,color:h==null?void 0:h.buttonColor,children:(b=h.text)!=null?b:`Button ${j}`},j)}),s&&o.jsx(r.Button,{onClick:()=>I(null,null,function*(){var h;g(!0),yield(h=s.onClick)==null?void 0:h.call(s),g(!1)}),"data-testid":s.testId,disabled:s.disabled||v,color:s==null?void 0:s.buttonColor,children:s.text})]})]})},Q=({minLength:e,preLoadedOptions:t,lookup:n,label:i,inputValue:s})=>xe.useQuery({queryFn:()=>e&&s.length<e?t!=null?t:[]:t?t.filter(l=>l.label.toLowerCase().includes(s.toLowerCase())):n(s),queryKey:["autocomplete",i,s]});function Xe({lookup:e=()=>I(null,null,function*(){}),enableHighlighting:t=!0,onChange:n,minLength:i=0,label:s,value:l,"data-testid":d,sx:a,boxSx:c,textFieldColor:u,textFieldVariant:x="filled",loadingText:k="Loading...",noOptionsText:v="No options",popupIcon:g=o.jsx(G.ArrowDropDown,{}),error:y=!1,helperText:F="",preLoadedOptions:h=void 0,disablePortal:j=!1,disableIconFlip:b=!1}){const[T,R]=D.useState(""),P=(m,A)=>{const C=l.filter(S=>S.id!==A);n(C,"delete",m)},{data:f,isLoading:E}=Q({inputValue:T,label:s,lookup:e,minLength:i,preLoadedOptions:h}),N=T.length>=i;return o.jsxs("div",{"data-testid":d,children:[o.jsx(r.Autocomplete,{sx:p(p({},a),b?{".MuiAutocomplete-popupIndicatorOpen":{transform:"rotate(0deg)"}}:{}),"data-testid":d?`${d}:Autocomplete`:void 0,disablePortal:j,multiple:!0,getOptionLabel:m=>typeof m=="string"?m:m.label,loading:N?E:!1,options:[...l,...f!=null?f:[]],filterSelectedOptions:!0,includeInputInList:!0,value:l,onChange:(m,A,C)=>{n(A,C,m)},onInputChange:(m,A)=>R(A),noOptionsText:N?v:"Start typing to search",loadingText:k,popupIcon:g,renderInput:m=>o.jsx(r.TextField,_(p({},m),{label:s,fullWidth:!0,variant:x,error:y,helperText:F,InputProps:_(p({},m.InputProps),{endAdornment:o.jsxs(o.Fragment,{children:[E?o.jsx(r.CircularProgress,{color:"inherit",size:20}):null,m.InputProps.endAdornment]})}),"data-testid":d?`${d}:Autocomplete:TextField`:void 0,onKeyDown:A=>{(A.key==="Backspace"||A.key==="Delete")&&A.stopPropagation()},color:u})),renderTags:()=>null,isOptionEqualToValue:(m,A)=>m.id===A.id,renderOption:(m,A,C)=>{if(t){const S=He.default(A.label,C.inputValue,{insideWords:!0,findAllOccurrences:!0}),W=We.default(A.label,S);return D.createElement("li",_(p({},m),{key:A.id,"data-testid":d?`${d}:Autocomplete:option(${A.id.toString()})`:void 0}),o.jsx("div",{children:W.map((Z,_e)=>o.jsx("span",{style:{fontWeight:Z.highlight?700:400},children:Z.text},_e))}))}else return D.createElement("li",_(p({},m),{key:A.id,"data-testid":d?`${d}:option(${A.id.toString()})`:void 0}),A.label)}}),l.length>0&&o.jsx(r.Box,{sx:c,children:l.map(m=>o.jsx(r.Chip,{sx:{marginTop:1,marginRight:1,height:"auto"},label:o.jsx(r.Tooltip,{title:m.tooltipContent||"",placement:"bottom-start",PopperProps:{modifiers:[{name:"offset",options:{offset:[115,-15]}}]},children:o.jsx(r.Typography,{style:{whiteSpace:"normal"},children:m.chipLabel?m.chipLabel:m.label})}),"data-testid":d?`${d}:Chip(${m.id.toString()})`:void 0,onDelete:A=>P(A,m.id),deleteIcon:o.jsx(G.Cancel,{"data-testid":d?`${d}:Chip(${m.id.toString()}):deleteIcon`:void 0})},m.id))})]})}const Ke=/MUI: The value provided to.*is invalid/i,Qe=({lookup:e=()=>I(null,null,function*(){}),onChange:t,label:n,value:i,sx:s,textFieldColor:l,textFieldVariant:d="filled",error:a=!1,"data-testid":c,noOptionsText:u="No options",minLength:x=3,disablePortal:k=!1,preLoadedOptions:v,helperText:g="",disabled:y,popupIcon:F,disableIconFlip:h})=>{const[j,b]=D.useState(""),{data:T,isLoading:R}=Q({inputValue:j,label:n,lookup:e,minLength:x!=null?x:0,preLoadedOptions:v}),P=j.length>=x;return o.jsx("div",{"data-testid":c,children:o.jsx(r.Stack,{direction:"row",spacing:1,children:o.jsx(r.Autocomplete,{sx:p(p({},s),h?{".MuiAutocomplete-popupIndicatorOpen":{transform:"rotate(0deg)"}}:{}),"data-testid":c?`${c}:Autocomplete`:void 0,loading:P?R:!1,options:T!=null?T:[],onChange:(f,E,N)=>{t(f,E,N)},disablePortal:k,filterOptions:f=>f,value:i,noOptionsText:P?u:"Start typing to search",getOptionLabel:f=>f.label,popupIcon:F,renderInput:f=>o.jsx(r.TextField,_(p({"data-testid":c?`${c}:Autocomplete:TextField`:void 0},f),{variant:d,label:n,color:l,error:a,helperText:g})),isOptionEqualToValue:(f,E)=>f.id===E.id,onInputChange:(f,E)=>{b(E)},renderOption:(f,E)=>D.createElement("li",_(p({},f),{key:E.id,"data-testid":c?`${c}:Autocomplete:option(${E.id.toString()})`:void 0}),E.label),disabled:y})})})},ge=e=>{if(!e)return-1;try{const n=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(Me.Buffer.from(n,"base64").toString("utf8").split("").map(function(l){return"%"+("00"+l.charCodeAt(0).toString(16)).slice(-2)}).join("")),s=JSON.parse(i);return s!=null&&s.exp?s.exp:-1}catch(t){return-1}},Ye=({open:e=!1,closeHandler:t,setAuth0ExpiryTime:n})=>{const{logout:i,getAccessTokenSilently:s}=X.useAuth0(),l=()=>I(null,null,function*(){i({logoutParams:{returnTo:`${window.location.origin}`}})}),a={text:"Continue",onClick:()=>I(null,null,function*(){const u=yield s({cacheMode:"off"}),x=ge(u)*1e3;n(x),t()}),disabled:!1,testId:"PreferencesDialog",buttonColor:"secondary"},c={text:"Log out",onClick:l,disabled:!1,testId:"PreferencesDialog",buttonColor:"secondary"};return o.jsx(K,{isOpen:e,primaryButton:a,secondaryButton:c,onClose:t,dialogTitle:"Session expiry",disableCloseOnBackdropOrEscape:!0,children:o.jsx("p",{style:{marginBottom:0},children:"Your session is about to time out due to inactivity. Do you want to continue?"})})};function Je(e){return"error"in e}function Ze(e){var i;const t=e.error,n=(i=e==null?void 0:e.error_description)!=null?i:"";return t==="access_denied"&&n.startsWith("You do not have the required authorization")}function et(e){var i;const t=e.error,n=(i=e==null?void 0:e.error_description)!=null?i:"";return t==="access_denied"&&n.startsWith("User did not authorize the request")}function tt(e){var i;const t=e.error,n=(i=e==null?void 0:e.error_description)!=null?i:"";return t==="access_denied"&&n.match(/Script.*time.*exceeded/)}function ot({children:e,appName:t="the app",throwErrors:n="none",disableConsoleLogging:i=!1,onError:s=()=>{}}){var k,v;const{isAuthenticated:l,isLoading:d,error:a,loginWithRedirect:c,logout:u}=X.useAuth0();D.useEffect(()=>{a&&s(a)},[a,s]);const x=D.useMemo(()=>({appState:{returnTo:`${window.location.pathname}${window.location.search}`}}),[]);if(D.useEffect(()=>{d||l||a||c(x)},[d,l,a,c,s,x]),a){if(i||console.error(`Error detected in AuthGuard [isAuthenticated=${l},isLoading=${d}]`,a),n==="all")throw a;if(Je(a)){let g="Auth error",y="An unknown Auth0 error occurred.";if(Ze(a))g="Unauthorised",y=`You are not authorised to access ${t}.`;else if(et(a))g="App not authorised",y=`You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`;else if(tt(a))g="Auth0 script execution time exceeded",y="The Auth0 login flow exceeded the time limit (20s). Try again in a minute by clicking the RELOAD button below.";else if(a.message==="Invalid state"){const F=localStorage.getItem("auth0_redirect_count");F?F&&parseInt(F)<2&&(localStorage.setItem("auth0_redirect_count",String(parseInt(F)+1)),c(x)):(localStorage.setItem("auth0_redirect_count","1"),c(x))}else if(n==="unknown")throw a;return o.jsxs(r.Dialog,{open:!0,children:[o.jsx(r.DialogTitle,{children:g}),o.jsxs(r.DialogContent,{children:[o.jsx(r.Typography,{children:y}),o.jsx("br",{}),o.jsx(r.Typography,{variant:"subtitle2",children:"Details from Auth0"}),o.jsxs(r.Typography,{variant:"body2",children:["error: ",(k=a==null?void 0:a.error)!=null?k:"N/A"]}),o.jsxs(r.Typography,{variant:"body2",children:["description: ",(v=a==null?void 0:a.error_description)!=null?v:"N/A"]})]}),o.jsxs(r.DialogActions,{children:[g==="Auth0 script execution time exceeded"&&o.jsx(r.Button,{href:window.location.origin+window.location.pathname,children:"Reload"}),o.jsx(r.Button,{onClick:()=>u({logoutParams:{returnTo:window.location.origin}}),children:"Logout"})]})]})}else if(n==="unknown")throw a}return l?(localStorage.removeItem("auth0_redirect_count"),o.jsx(o.Fragment,{children:e})):o.jsx(ze.default,{variant:"rectangular",animation:"pulse",height:"100vh",width:"100vw"})}const nt={autoHideDuration:6e3,anchorOrigin:{vertical:"top",horizontal:"center"},disableWindowBlurListener:!1},it={shouldClose:(e,t)=>t!=="clickaway"},se={message:"",severity:"info",variant:"standard",progressIndicator:void 0},ae=100,le=2e3,rt=2e3,st=(()=>{let e=0;return()=>(e+=1,e)})(),at={borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px"},lt={},ct={},Y=D.createContext(null);function fe(l){var d=l,{overrideState:e=lt,overrideActions:t=ct,shouldClose:n=it.shouldClose,children:i}=d,s=oe(d,["overrideState","overrideActions","shouldClose","children"]);var A;const[{open:a},c]=D.useState({open:!1}),u=D.useRef([]),x=D.useRef(Date.now()),k=D.useRef(0),v=D.useCallback(C=>{c({open:C})},[]),g=D.useCallback((C={})=>{k.current+=1,u.current.length>=ae&&Date.now()-x.current>=le&&(x.current=Date.now(),console.error(`SaladBarProvider: MAX_QUEUE_LENGTH (${ae}) hit ${k.current} times in last ${le}ms)`),k.current=0);const S=p(_(p({},se),{key:st()}),C);return u.current.push(S),u.current.length===1&&c({open:!0}),S.key},[]),y=(C="",S={})=>g(p({message:C,severity:"success"},S)),F=(C="",S={})=>g(p({message:C,severity:"info"},S)),h=(C="",S={})=>g(p({message:C,severity:"warning"},S)),j=(C="",S={})=>g(p({message:C,severity:"error"},S)),b=C=>{const S=u.current.findIndex(W=>W.key===C);if(S!==-1)return S===0?(c({open:!1}),u.current[0]):u.current.splice(S,1)},T=(C,S)=>{n(C,S)&&c({open:!1})},R=()=>{},P=()=>{u.current.shift(),u.current.length>0&&c({open:!0})},f=(A=u.current[0])!=null?A:p({},se),E={};"autoHideDuration"in f&&(E.autoHideDuration=f.autoHideDuration);const N=p(p({},nt),s),m=p(p({open:a,setOpen:v,enqueueNotification:g,enqueueSuccessNotification:y,enqueueInfoNotification:F,enqueueWarningNotification:h,enqueueErrorNotification:j,removeNotification:b},e),t);return o.jsxs(Y.Provider,{value:m,children:[i,o.jsx(r.Snackbar,_(p(p({},N),E),{open:a,onClose:T,TransitionProps:{onExited:P,onExit:R},sx:{zIndex:rt},children:o.jsxs("div",{children:[o.jsx(r.Alert,{onClose:C=>T(C,"closeAlert"),severity:f.severity,variant:"filled",icon:f.progressIndicator==="circular"?o.jsx(r.CircularProgress,{size:"1em"}):void 0,style:f.progressIndicator==="linear"?at:void 0,children:f.message}),f.progressIndicator==="linear"&&o.jsx(r.LinearProgress,{color:"primary"})]})}))]})}class J extends Error{}ne(J,"errorName","ContextError");function Ae(){const e=D.useContext(Y);if(e===null)throw new J("Error: Tried to useSaladBar outside of a <SaladBarProvider>");return e}const dt=Re.createHelper((e={autoHideDuration:1},t={},n={})=>({children:i})=>o.jsx(fe,_(p({},e),{overrideState:t,overrideActions:n,children:o.jsx(o.Fragment,{children:i})}))),Ce="domainCode";var me;const ce=w.atom(JSON.parse((me=localStorage.getItem(Ce))!=null?me:'{"domainCode": ""}').domainCode),ve=w.atom(e=>e(ce),(e,t,n)=>{t(ce,n),localStorage.setItem(Ce,JSON.stringify({domainCode:n}))}),ut={act:"ACT",nsw:"NSW",nt:"NT",qld:"QLD",sa:"SA",tas:"TAS",vic:"VIC",wa:"WA",ag:"AG",fedmps:"Fedmps","":""},pt=e=>{var t;return e===null?"N/A":(t=ut[e])!=null?t:""},ht=({isLoading:e,isOpen:t,onClose:n,onDomainChange:i,domainOptions:s,applicationName:l,handleLogout:d})=>{const[a,c]=w.useAtom(ve),[u,x]=D.useState(a),{enqueueSuccessNotification:k}=Ae(),v=s.length===0,g=!!a&&!s.includes(a)&&!s.includes(u),y=!a||v||g,F=()=>I(null,null,function*(){u?(c(u),i==null||i(u),k(`Set organisation to ${u}`),n()):(c(""),i==null||i(""))}),h=()=>I(null,null,function*(){a&&!v&&!g?(x(a),n()):y&&d()});let j;return v?j="Unable to retrieve your active organisations. Try logging in again.":g&&(j="You no longer have any roles in your chosen organisation. Please choose another."),o.jsxs(K,{isOpen:t,dialogTitle:"Select an organisation",primaryButton:{text:"Confirm",onClick:F,disabled:!u||v||g,buttonColor:"primary"},secondaryButton:{text:y?"Logout":"Cancel",onClick:h},onClose:y?()=>{}:n,children:[o.jsxs(r.Typography,{marginBottom:2,children:["Select the default organisation that you want to use with the ",l,"."]}),o.jsx(r.Autocomplete,{loading:e,multiple:!1,disableClearable:!1,value:u!==""?u:null,onChange:(b,T)=>x(T!=null?T:""),getOptionLabel:pt,options:[...s.toSorted()],renderInput:b=>o.jsx(r.TextField,_(p({},b),{variant:"filled",label:"Select organisation",InputProps:_(p({},b.InputProps),{endAdornment:o.jsxs(o.Fragment,{children:[e?o.jsx(r.CircularProgress,{color:"inherit",size:20,sx:{marginTop:"-20px"}}):null,b.InputProps.endAdornment]})})}))}),j&&o.jsx(r.FormHelperText,{error:!0,children:j})]})},Se=()=>{const e=r.useTheme();return r.useMediaQuery(e.breakpoints.down("sm"))},mt=64,xt=72,gt=256,q=w.atom(!0),ye=w.atom(gt),je=w.atom(xt),V=w.atom(""),we=w.atom(void 0),De=w.atom(mt),ke=w.atom(void 0);function ft({links:e}){return o.jsx("div",{children:"LinksMenu not implemented yet"})}const O="Navbar",L={root:`${O}-root`,menuButton:`${O}-menuButton`,hide:`${O}-hide`,content:`${O}-content`},At=B.styled(r.Box,{name:"NavBar"})(({theme:e})=>({[`&.${L.root}`]:{display:"flex"},[`& .${L.menuButton}`]:{marginRight:36},[`& .${L.hide}`]:{display:"none"},[`& .${L.content}`]:{flexGrow:1,padding:e.spacing(3)}})),M=(e,t,n)=>e.transitions.create(t,{easing:e.transitions.easing.sharp,duration:n==="leaving"?e.transitions.duration.leavingScreen:e.transitions.duration.enteringScreen}),Ct=e=>{const t=r.useTheme();return o.jsx(r.Collapse,p({easing:t.transitions.easing.sharp,timeout:{enter:t.transitions.duration.enteringScreen,exit:t.transitions.duration.leavingScreen}},e))},Fe=e=>{var t,n;return{overflowX:"hidden",color:"inherit",backgroundColor:(n=(t=e==null?void 0:e.navBar)==null?void 0:t.backgroundColor)!=null?n:"white"}},de=(e,t)=>p({width:t,transition:M(e,"width","entering")},Fe(e)),ue=(e,t)=>p({width:t,transition:M(e,"width","leaving")},Fe(e)),vt=B.styled(r.Drawer,{shouldForwardProp:e=>!["widthOpen","widthClosed","isSmallScreen"].includes(e)})(({theme:e,open:t,widthOpen:n,widthClosed:i,isSmallScreen:s})=>p(p({flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box",display:"flex",flexDirection:"column"},t&&_(p({},de(e,n)),{backgroundColor:"","& .MuiDrawer-paper":de(e,n)})),!t&&_(p({},ue(e,s?n:i)),{backgroundColor:"","& .MuiDrawer-paper":ue(e,s?n:i)})));function be(e){return e.replace(/(^|-)([a-z])/g,(t,n,i)=>n==="-"?" "+i.toUpperCase():i.toUpperCase())}function St(e,t,n,i){var d;if(!e)return"None";const l=Object.entries(e).filter(([a,c])=>a.startsWith("https://greens.org.au/roles/")&&c.includes(t)).map(([a])=>{var c;return be((c=a.split("/").at(-1))!=null?c:"")});return(d=i.find(a=>n[a].some(c=>l.includes(c))))!=null?d:"None"}const yt=e=>{const{getIdTokenClaims:t,user:n}=X.useAuth0();return xe.useQuery({queryKey:["availableDomains",n==null?void 0:n.sub],queryFn:()=>I(null,null,function*(){const i=yield t();return i?Object.entries(i).reduce((s,[l,d])=>{var u;const a=be((u=l.split("/").at(-1))!=null?u:""),c=l.startsWith("https://greens.org.au/roles/")&&e.includes(a)?d:[];return[...new Set([...s,...c])]},[]):[]})})},jt=e=>Object.values(e).reduce((t,n)=>[...new Set([...t,...n])],[]),H={log:console.warn.bind(console),error:console.error.bind(console),warn:console.warn.bind(console),info:console.info.bind(console),debug:console.debug.bind(console)};function wt(e,t){console[e]=(...n)=>{for(const i of t)if(typeof i=="function"){if(i(...n))return}else if(i instanceof RegExp&&n.length>0){for(const s of n)if(typeof s=="string"&&i.test(s))return}H[e](n)}}function Dt(e){if(e)console[e]=H[e];else for(const t of Object.keys(H))console[t]=H[t]}function Ee(e){let t=0;for(let n=0,i=e.length;n<i;n++){const s=e.charCodeAt(n);t=(t<<5)-t+s,t|=0}return t}const pe=["#A62A21","#7e3794","#0B51C1","#3A6024","#A81563","#B3003C"],he=e=>e.split(/\s/).map(t=>t.substring(0,1).toUpperCase()).filter(t=>!!t).slice(0,2).join("").toUpperCase();function kt({user:e,domainCode:t,open:n,useNewAvatar:i=!1}){const s=r.useTheme();return o.jsxs(r.Box,{sx:{paddingTop:3,display:"flex",alignItems:"center",flexDirection:"column",gap:"0.5rem"},children:[!i&&o.jsx(r.Box,{sx:{width:n?"5rem":"2rem",transition:n?M(s,["width","height"],"entering"):M(s,["width","height"],"leaving"),aspectRatio:1},children:e!=null&&e.name?o.jsx(o.Fragment,{children:o.jsx(r.Avatar,{src:e==null?void 0:e.picture,sx:{width:"100%",height:"100%",bgcolor:pe[Math.abs(Ee(e==null?void 0:e.name))%pe.length]},children:he(e==null?void 0:e.name)})}):o.jsx(r.Avatar,{sx:{width:"100%",height:"100%"}})}),i&&o.jsx(r.Box,{sx:{width:n?"5rem":"2rem",transition:n?M(s,["width","height"],"entering"):M(s,["width","height"],"leaving"),aspectRatio:1},children:e!=null&&e.name?o.jsx(o.Fragment,{children:o.jsxs(re.default,{src:e==null?void 0:e.picture,name:e==null?void 0:e.name,round:!0,size:n?"80":"32",children:[" ",he(e==null?void 0:e.name)," ","ab"]})}):o.jsx(re.default,{})}),o.jsx(Ct,{sx:{width:"100%"},in:n,children:o.jsx(r.Fade,{in:n,children:o.jsxs(r.Box,{width:"100%",display:"flex",flexDirection:"column",alignItems:"center",children:[e!=null&&e.name?o.jsx(r.Typography,{children:e==null?void 0:e.name}):o.jsx(r.Skeleton,{animation:!1,width:"50%"}),t?o.jsx(r.Typography,{children:t.toUpperCase()}):o.jsx(r.Skeleton,{animation:!1,width:"25%"})]})})})]})}function Ft({open:e,widthClosed:t,widthOpen:n,"data-testid":i,top:s,middle:l,bottom:d,user:a,domainCode:c,useNewAvatar:u=!1}){const x=Se(),k=w.useSetAtom(q);return o.jsx(At,{className:L.root,"data-testid":i,children:o.jsxs(vt,{open:e,widthOpen:n,widthClosed:t,anchor:"left",variant:x?"temporary":"permanent",PaperProps:{component:"nav"},onClose:()=>{k(!1)},isSmallScreen:x,children:[!x&&o.jsx(r.Toolbar,{}),s&&o.jsxs(r.Box,{flexGrow:"0",children:[s,o.jsx(r.Divider,{variant:"middle",sx:{marginY:"0.5rem"}})]}),o.jsx(r.Box,{flexGrow:"1",children:Array.isArray(l)?o.jsx(ft,{links:l}):l}),o.jsxs(r.Box,{flexGrow:"0",children:[o.jsx(r.Divider,{variant:"middle",sx:{marginY:"0.5rem"}}),o.jsx(kt,{user:a,domainCode:c,open:e,useNewAvatar:u}),d&&o.jsx(o.Fragment,{children:d})]})]})})}function bt({children:e,topBarHeight:t,maxWidth:n=!1,noPadding:i}){return o.jsx(r.Box,{sx:{overflow:"auto",height:`calc(100vh - ${t}px)`,flexGrow:1},children:i?o.jsx(r.Box,{component:"main",id:"main-content",height:"inherit",children:e}):o.jsx(r.Container,{component:"main",id:"main-content",maxWidth:n,sx:{paddingTop:3,paddingBottom:3,flexGrow:1},children:e})})}const Et="TopBar",_t={titleText:`${Et}-titleText`};function Tt({titleText:e="",height:t,"data-testid":n,middle:i}){const s=w.useSetAtom(q),l=()=>s(c=>!c),d=r.useTheme(),a=Se();return o.jsx("header",{"data-testid":n,children:o.jsxs(r.Paper,{square:!0,elevation:0,sx:{width:"100%",position:"sticky",color:"primary.contrastText",backgroundColor:"primary.main",display:"flex",alignItems:"center",gap:2,flexShrink:0,height:t,zIndex:a?0:d.zIndex.drawer+101},children:[o.jsx(r.IconButton,{size:"medium",color:"inherit",sx:{padding:1.5,marginLeft:"12px"},onClick:l,children:o.jsx(G.ViewHeadline,{fontSize:"medium"})}),o.jsx(r.Typography,{className:_t.titleText,variant:"h6",component:"h1",children:e}),i]})})}function It({children:e,initialTitleText:t,initialNavBarOpen:n,pageContainerProps:i,pageContentDataTestId:s,topBarDataTestId:l,navBarDataTestId:d,navBarMiddle:a,navBarBottom:c,user:u,domainCode:x,useNewAvatar:k=!1}){Ue.useHydrateAtoms([[q,n!=null?n:!0],[V,t!=null?t:""]]);const v=w.useAtomValue(q),[g]=w.useAtom(ye),[y]=w.useAtom(je),F=w.useAtomValue(V),[h]=w.useAtom(De),[j]=w.useAtom(we),[b]=w.useAtom(ke);return o.jsxs(ie.default,{children:[o.jsx(Ge.default,{}),o.jsx(Tt,{titleText:F,"data-testid":l,height:h,middle:j}),o.jsxs(ie.default,{sx:{display:"flex"},children:[o.jsx(Ft,{open:v,top:b,middle:a,bottom:c,user:u,domainCode:x,widthOpen:g,widthClosed:y,offsetTop:h,"data-testid":d,useNewAvatar:k}),o.jsx(bt,_(p({"data-testid":s,topBarHeight:h},i),{children:e}))]})]})}const Bt=B.createTheme({palette:{primary:{dark:"#00A651",light:"#A3D39C",main:"#007236",contrastText:"#FFF"},warning:{main:"#F5871F",light:"#FCC589",dark:"#A2590A",contrastText:"#FFF"},secondary:{main:"#662D91",light:"#BD8CBF",dark:"#440E62",contrastText:"#FFF"},error:{main:"#D43C95",light:"#8F2064",dark:"#F9CDE0",contrastText:"#FFF"},info:{main:"#00A88D",light:"#ADDCCF",dark:"#005243",contrastText:"#FFF"},success:{main:"#00A651",light:"#A3D39C",dark:"#007236",contrastText:"#FFF"}},typography:{explainer:{fontSize:"14px",marginBlockStart:"1em"}},navBar:{backgroundColor:"#E8E8E8"}}),Pt=B.createTheme({palette:{primary:{main:"#007236",dark:"#005221",light:"#00A04E",contrastText:"#FFFFFF"},secondary:{main:"#662D91",dark:"#440E62",light:"#93268F",contrastText:"#FFFFFF"},error:{main:"#D32F2F",dark:"#C62828",light:"#EF5350"},info:{main:"#0288D1",dark:"#01579B",light:"#03A9F4"},success:{main:"#0288D1",dark:"#01579B",light:"#03A9F4"}},components:{MuiTextField:{defaultProps:{color:"secondary"}},MuiToggleButtonGroup:{defaultProps:{color:"secondary"}},MuiCheckbox:{defaultProps:{color:"secondary"}},MuiSelect:{defaultProps:{color:"secondary"}},MuiSwitch:{defaultProps:{color:"secondary"}},MuiFormControl:{defaultProps:{color:"secondary"}},MuiMenuItem:{styleOverrides:{root:({theme:e})=>({"&.Mui-selected":{backgroundColor:B.alpha(e.palette.secondary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:B.alpha(e.palette.secondary.main,e.palette.action.selectedOpacity)},"&.Mui-focusVisible":{backgroundColor:B.alpha(e.palette.secondary.main,e.palette.action.focusOpacity)}}})}}},typography:{h4:{fontSize:"1.88rem",fontWeight:500},h5:{fontWeight:500},explainer:{fontSize:"14px",marginBlockStart:"1em"}},navBar:{backgroundColor:"#E8E8E8"}});exports.AgDialog=K;exports.AppLayout=It;exports.AuthGuard=ot;exports.Context=Y;exports.ContextError=J;exports.DomainCodeDialog=ht;exports.ExampleComponent=Ve;exports.FetchAutocomplete=Xe;exports.MUI_AUTOCOMPLETE_VALUE_WARNING_REGEX=Ke;exports.SaladBarProvider=fe;exports.SessionExpiryDialog=Ye;exports.SingleAutocomplete=Qe;exports.determineUserLevelFromClaims=St;exports.domainCodeAtom=ve;exports.fed21Theme=Bt;exports.getAuth0Expiry=ge;exports.getValidBusinessRoles=jt;exports.internalAgSystemsTheme=Pt;exports.navBarOpenAtom=q;exports.navBarTopAtom=ke;exports.navBarWidthClosedAtom=je;exports.navBarWidthOpenAtom=ye;exports.simpleHashCode=Ee;exports.suppressConsole=wt;exports.titleTextAtom=V;exports.topBarHeightAtom=De;exports.topBarMiddleAtom=we;exports.unsuppressConsole=Dt;exports.useAutocompleteOptions=Q;exports.useSaladBar=Ae;exports.useValidDomains=yt;exports.withSaladBarProvider=dt;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|