@zydon/common-csr 2.1.12 → 2.1.13
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.
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { E as EditorProps } from '../../types-
|
|
2
|
+
import { E as EditorProps } from '../../types-3f173119.js';
|
|
3
3
|
import { BaseField } from '../../types/baseField.js';
|
|
4
4
|
import 'react-hook-form';
|
|
5
5
|
import '@mui/material/styles';
|
|
6
|
+
import '@tiptap/core';
|
|
6
7
|
import '@tiptap/react';
|
|
7
8
|
|
|
8
9
|
type EditorFieldProps = BaseField<EditorProps>;
|
|
@@ -2,9 +2,10 @@ import * as react from 'react';
|
|
|
2
2
|
import * as _mui_system from '@mui/system';
|
|
3
3
|
import * as _mui_material from '@mui/material';
|
|
4
4
|
import * as _tiptap_react from '@tiptap/react';
|
|
5
|
-
export { c as EditorCodeHighlightBlockProps, E as EditorProps, b as EditorToolbarItemProps, a as EditorToolbarProps } from '../../types-
|
|
5
|
+
export { c as EditorCodeHighlightBlockProps, E as EditorProps, b as EditorToolbarItemProps, a as EditorToolbarProps } from '../../types-3f173119.js';
|
|
6
6
|
import 'react-hook-form';
|
|
7
7
|
import '@mui/material/styles';
|
|
8
|
+
import '@tiptap/core';
|
|
8
9
|
|
|
9
10
|
declare const editorClasses: {
|
|
10
11
|
root: string;
|
|
@@ -49,7 +50,7 @@ declare const editorClasses: {
|
|
|
49
50
|
};
|
|
50
51
|
};
|
|
51
52
|
|
|
52
|
-
declare const Editor: react.ForwardRefExoticComponent<Partial<_tiptap_react.
|
|
53
|
+
declare const Editor: react.ForwardRefExoticComponent<Partial<_tiptap_react.UseEditorOptions> & {
|
|
53
54
|
value?: string | undefined;
|
|
54
55
|
error?: boolean | undefined;
|
|
55
56
|
fullItem?: boolean | undefined;
|
|
@@ -15,6 +15,6 @@ import oo from '@mui/material/Paper';
|
|
|
15
15
|
import to from '@mui/material/Popover';
|
|
16
16
|
import Yo from '@mui/material/Divider';
|
|
17
17
|
|
|
18
|
-
var t={mini:{root:"nav__section__mini"},horizontal:{root:"nav__section__horizontal"},vertical:{root:"nav__section__vertical"},item:{root:"mnl__nav__item",icon:"mnl__nav__item__icon",info:"mnl__nav__item__info",texts:"mnl__nav__item__texts",title:"mnl__nav__item__title",arrow:"mnl__nav__item__arrow",caption:"mnl__nav__item__caption"},li:"mnl__nav__li",ul:"mnl__nav__ul",paper:"mnl__nav__paper",subheader:"mnl__nav__subheader",state:{open:"state--open",active:"state--active",disabled:"state--disabled"}};var fe={dark:"#282F37",light:"#EDEFF2"};function Z(e,i){let{vars:{palette:o}}=e;return {"--nav-item-color":o.text.secondary,"--nav-item-hover-bg":o.action.hover,"--nav-item-caption-color":o.text.disabled,"--nav-item-root-active-color":o.primary.main,"--nav-item-root-active-color-on-dark":e.palette.primary.contrastText,"--nav-item-root-active-bg":varAlpha(o.primary.mainChannel,.08),"--nav-item-root-active-hover-bg":varAlpha(o.primary.mainChannel,.16),"--nav-item-root-open-color":o.text.primary,"--nav-item-root-open-bg":o.action.hover,"--nav-item-sub-active-color":o.text.primary,"--nav-item-sub-active-bg":o.action.selected,"--nav-item-sub-open-color":o.text.primary,"--nav-item-sub-open-bg":o.action.hover,...i==="vertical"&&{"--nav-item-sub-active-bg":o.action.hover,"--nav-subheader-color":o.text.disabled,"--nav-subheader-hover-color":o.text.primary}}}function _e(e){let{shape:i,spacing:o}=e;return {...Z(e,"vertical"),"--nav-item-gap":o(.5),"--nav-item-radius":`${i.borderRadius}px`,"--nav-item-pt":o(.5),"--nav-item-pr":o(1),"--nav-item-pb":o(.5),"--nav-item-pl":o(1.5),"--nav-item-root-height":"44px","--nav-item-sub-height":"36px","--nav-icon-size":"24px","--nav-icon-margin":o(0,1.5,0,0),"--nav-bullet-size":"12px","--nav-bullet-light-color":fe.light,"--nav-bullet-dark-color":fe.dark}}function Ee(e){let{shape:i,spacing:o}=e;return {...Z(e,"mini"),"--nav-item-gap":o(.5),"--nav-item-radius":`${i.borderRadius}px`,"--nav-item-root-height":"56px","--nav-item-root-padding":o(1,.5,.75,.5),"--nav-item-sub-height":"34px","--nav-item-sub-padding":o(0,1),"--nav-icon-size":"22px","--nav-icon-root-margin":o(0,0,.75,0),"--nav-icon-sub-margin":o(0,1,0,0)}}function Me(e){let{shape:i,spacing:o}=e;return {...Z(e,"horizontal"),"--nav-item-gap":o(.75),"--nav-height":"56px","--nav-item-radius":`${i.borderRadius*.75}px`,"--nav-item-root-height":"32px","--nav-item-root-padding":o(0,.75),"--nav-item-sub-height":"34px","--nav-item-sub-padding":o(0,1),"--nav-icon-size":"22px","--nav-icon-sub-margin":o(0,1,0,0),"--nav-icon-root-margin":o(0,1,0,0)}}var k={mini:Ee,vertical:_e,horizontal:Me};function S({open:e,active:i,disabled:o}){let a=t.item.root;return i?a+=` ${t.state.active}`:e?a+=` ${t.state.open}`:o&&(a+=` ${t.state.disabled}`),a}var u={icon:{flexShrink:0,display:"inline-flex",["& svg, & img"]:{width:"100%",height:"100%"}},arrow:{width:16,height:16,flexShrink:0,marginLeft:"6px",display:"inline-flex"},info:{fontSize:12,flexShrink:0,fontWeight:600,marginLeft:"6px",lineHeight:18/12,display:"inline-flex"},noWrap:{width:"100%",maxWidth:"100%",display:"block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},disabled:{opacity:.48,pointerEvents:"none"}};function Q({sx:e,children:i}){return jsx(Fragment,{children:jsx(We,{component:"div",sx:{gap:1,alignItems:"center",position:"relative",typography:"overline",display:"inline-flex",alignSelf:"flex-start",color:"var(--nav-subheader-color)",padding:o=>o.spacing(2,1,1,1.5),fontSize:o=>o.typography.pxToRem(11),transition:o=>o.transitions.create(["color","padding-left"],{duration:o.transitions.duration.standard}),...e},children:i})})}function X({sx:e,depth:i,children:o,...a}){return jsx(Te,{sx:{...i+1!==1&&{pl:"calc(var(--nav-item-pl) + var(--nav-icon-size) / 2)",[`& .${t.ul}`]:{position:"relative",pl:"var(--nav-bullet-size)","&::before":{top:0,left:0,width:"2px",content:'""',position:"absolute",bottom:"calc(var(--nav-item-sub-height) - 2px - var(--nav-bullet-size) / 2)",bgcolor:"var(--nav-bullet-light-color)",[stylesMode.dark]:{bgcolor:"var(--nav-bullet-dark-color)"}}}},...e},...a,children:o})}function g({sx:e,children:i,disabled:o,...a}){return jsx(q,{component:"li",className:t.li,sx:{display:"flex",flexDirection:"column",...o&&{cursor:"not-allowed"},...e},...a,children:i})}function N({children:e,sx:i,...o}){return jsx(q,{component:"ul",className:t.ul,sx:{display:"flex",flexDirection:"column",...i},...o,children:e})}var be=forwardRef(({href:e,...i},o)=>jsx(Link,{ref:o,to:e,...i}));function M({path:e,icon:i,info:o,depth:a,render:r,hasChild:s,externalLink:m,enabledRootRedirect:n}){let l=a===1,v=!l,p=Number(a)>2,b=s&&!n?{component:"div"}:m?{href:e,target:"_blank",rel:"noopener"}:{component:be,href:e},d=null;i&&r?.navIcon&&typeof i=="string"?d=r?.navIcon[i]:d=i;let f=null;if(o&&r?.navInfo&&Array.isArray(o)){let[x,h]=o,y=r.navInfo(h)[x];f=y?cloneElement(y):null;}else f=o;return {subItem:v,rootItem:l,subDeepItem:p,baseProps:b,renderIcon:d,renderInfo:f}}var ee=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,...f},x)=>{let h=M({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d});return jsxs(Ke,{ref:x,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...h.baseProps,...f,children:[i&&jsx(q,{component:"span",className:t.item.icon,children:h.renderIcon}),a&&jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,arrow:!0,children:jsx(ge,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&jsx(q,{component:"span",className:t.item.info,children:h.renderInfo}),p&&jsx(ge,{icon:h.subItem?"CHEVRON_RIGHT":"ARROW_DOWN_SIMPLE",className:t.item.arrow})]})}),Ke=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={item:{flexShrink:0,color:"var(--nav-item-color)",borderRadius:"var(--nav-item-radius)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},title:{...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium},caption:{width:16,height:16,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...n.item,padding:"var(--nav-item-root-padding)",minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-root-margin)"},[`& .${t.item.title}`]:{...n.title,whiteSpace:"nowrap"},[`& .${t.item.caption}`]:{...n.caption,marginLeft:r.spacing(.75)},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-root-active-color)",backgroundColor:"var(--nav-item-root-active-bg)","&:hover":{backgroundColor:"var(--nav-item-root-active-hover-bg)"},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,padding:"var(--nav-item-sub-padding)",minHeight:"var(--nav-item-sub-height)",color:r.vars.palette.text.secondary,[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...n.title,flexGrow:1},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow,marginRight:r.spacing(-.5)},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var Ne=e=>{let i=e.split("?")[1];return i?new URLSearchParams(i).toString().length>0:!1};function oe(e){return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}function xe(e){try{let i=new URL(e,window.location.origin);return oe(i.pathname)}catch{return e}}function I(e){return e.startsWith("http")}function W(e){return e.replace(window.location.origin,"")}function w(){let{pathname:e}=useLocation();return useMemo(()=>e,[e])}function z(e,i=!0){let o=oe(w()),a=Ne(e);if(e.startsWith("#")||I(e))return !1;if(i||a){let m=o.includes(e),n=xe(e);return m||a&&n===o}return o===e}function te({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s}){let m=useTheme(),n=w(),l=useRef(null),v=z(e.path,!!e.children),[p,c]=useState(!1);useEffect(()=>{p&&d();},[n]);let b=useCallback(()=>{e.children&&c(!0);},[e.children]),d=useCallback(()=>{c(!1);},[]),f=jsx(ee,{ref:l,render:o,title:e.title,path:e.path,icon:e.icon,info:e.info,caption:e.caption,depth:i,active:v,disabled:e.disabled,hasChild:!!e.children,open:e.children&&p,externalLink:I(e.path),enabledRootRedirect:s,slotProps:i===1?r?.rootItem:r?.subItem,onMouseEnter:b,onMouseLeave:d});return e.roles&&r?.currentRole&&!e?.roles?.includes(r?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,children:[f,jsx(to,{disableScrollLock:!0,open:p,anchorEl:l.current,anchorOrigin:i===1?{vertical:"bottom",horizontal:"left"}:{vertical:"center",horizontal:"right"},transformOrigin:i===1?{vertical:"top",horizontal:"left"}:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:b,onMouseLeave:d,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...i===1&&{ml:-.75},...p&&{pointerEvents:"auto"}}}},sx:{...a,pointerEvents:"none"},children:jsx(oo,{className:t.paper,sx:{minWidth:180,...paper({theme:m,dropdown:!0}),...r?.paper},children:jsx(io,{data:e.children,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s})})})]}):jsx(g,{disabled:e.disabled,children:f})}function io({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s}){return jsx(N,{sx:{gap:.5},children:e.map(m=>jsx(te,{data:m,render:o,depth:i+1,cssVars:a,slotProps:r,enabledRootRedirect:s},m.title))})}function un({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s}){let m=useTheme(),n={...k.horizontal(m),...s};return jsx(lo,{sx:{height:1},slotProps:{content:{height:1,display:"flex",alignItems:"center"}},children:jsx(so,{component:"nav",direction:"row",alignItems:"center",className:t.horizontal.root,sx:{...n,mx:"auto",height:1,minHeight:"var(--nav-height)",...e},children:jsx(N,{sx:{flexDirection:"row",gap:"var(--nav-item-gap)"},children:i.map(l=>jsx(po,{render:o,cssVars:n,items:l.items,slotProps:a,enabledRootRedirect:r},l.subheader??l.items[0].title))})})})}function po({items:e,render:i,slotProps:o,enabledRootRedirect:a,cssVars:r}){return jsx(g,{children:jsx(N,{sx:{flexDirection:"row",gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(te,{depth:1,data:s,render:i,cssVars:r,slotProps:o,enabledRootRedirect:a},s.title))})})}var ne=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,...f},x)=>{let h=M({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d});return jsxs(go,{ref:x,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...h.baseProps,...f,children:[i&&jsx(q,{component:"span",className:t.item.icon,children:h.renderIcon}),a&&jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,arrow:!0,placement:"right",children:jsx(ge,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&h.subItem&&jsx(q,{component:"span",className:t.item.info,children:h.renderInfo})]})}),go=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={item:{width:"100%",borderRadius:"var(--nav-item-radius)",color:"var(--nav-item-color)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},title:{},caption:{width:16,height:16,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...n.item,textAlign:"center",flexDirection:"column",width:48,minHeight:44,padding:"var(--nav-item-root-padding)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.title}`]:{...n.title,...u.noWrap,lineHeight:"16px",fontSize:r.typography.pxToRem(10),fontWeight:e?r.typography.fontWeightBold:r.typography.fontWeightSemiBold},[`& .${t.item.caption}`]:{...n.caption,top:11,left:6,position:"absolute"},[`& .${t.item.arrow}`]:{...n.arrow,top:11,right:6,position:"absolute"},[`& .${t.item.info}`]:{...n.info},...e&&{color:r.palette.primary.contrastText,backgroundColor:r.palette.primary.main,"&:hover":{backgroundColor:r.palette.primary.lighter},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,color:r.vars.palette.text.secondary,minHeight:"var(--nav-item-sub-height)",padding:"var(--nav-item-sub-padding)",[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...n.title,...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium,flex:"1 1 auto"},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow,marginRight:r.spacing(-.5)},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var ie=({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s})=>{let m=useTheme(),n=w(),l=useRef(null),v=z(e.path,!!e.children),[p,c]=useState(!1);useEffect(()=>{p&&d();},[n]);let b=useCallback(()=>{e.children&&c(!0);},[e.children]),d=useCallback(()=>{c(!1);},[]),f=jsx(ne,{ref:l,render:o,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:i,active:v,disabled:e.disabled,hasChild:!!e.children,open:e.children&&p,externalLink:I(e.path),enabledRootRedirect:s,slotProps:i===1?r?.rootItem:r?.subItem,onMouseEnter:b,onMouseLeave:d});return e.roles&&r?.currentRole&&!e?.roles?.includes(r?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,children:[f,jsx(to,{disableScrollLock:!0,open:p,anchorEl:l.current,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:b,onMouseLeave:d,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...i>1&&{mt:-1},...p&&{pointerEvents:"auto"}}}},sx:{...a,pointerEvents:"none"},children:jsx(oo,{className:t.paper,sx:{minWidth:180,...paper({theme:m,dropdown:!0}),...r?.paper},children:jsx(Lo,{data:e.children,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s})})})]}):jsx(g,{disabled:e.disabled,children:f})};function Lo({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,cssVars:s}){return jsx(N,{sx:{gap:.5},children:e.map(m=>jsx(ie,{data:m,render:i,depth:o+1,cssVars:s,slotProps:a,enabledRootRedirect:r},m.title))})}var Yn=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s})=>{let m=useTheme(),n={...k.mini(m),...s};return jsx(so,{component:"nav",className:t.mini.root,sx:{...n,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:i.map(l=>jsx(Bo,{render:o,cssVars:n,items:l.items,slotProps:a,enabledRootRedirect:r},l.subheader??l.items[0].title))})})},Bo=({items:e,render:i,slotProps:o,enabledRootRedirect:a,cssVars:r})=>jsx(g,{children:jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(ie,{depth:1,data:s,render:i,cssVars:r,slotProps:o,enabledRootRedirect:a},s.title))})});function Y({path:e,icon:i,info:o,depth:a,render:r,hasChild:s,externalLink:m,enabledRootRedirect:n,onNavigate:l}){let v=a===1,p=!v,c=Number(a)>2,d=s&&!n?{component:"div"}:m?{href:e,target:"_blank",rel:"noopener"}:{onClick:h=>l(h,e)},f=null;i&&r?.navIcon&&typeof i=="string"?f=r?.navIcon[i]:f=i;let x=null;if(o&&r?.navInfo&&Array.isArray(o)){let[h,y]=o,E=r.navInfo(y)[h];x=E?cloneElement(E):null;}else x=o;return {subItem:p,rootItem:v,subDeepItem:c,baseProps:d,renderIcon:f,renderInfo:x}}var se=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,onNavigate:f,...x},h)=>{let y=Y({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d,onNavigate:f}),K=!(m===1),de=jsxs(Oo,{ref:h,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...y.baseProps,...x,...y.baseProps.onClick?{onClick:y.baseProps.onClick,style:{textAlign:"left"}}:{},children:[i&&jsx(q,{component:"span",className:t.item.icon,children:y.renderIcon}),a&&K&&jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,arrow:!0,placement:"right",children:jsx(ge,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&y.subItem&&jsx(q,{component:"span",className:t.item.info,children:y.renderInfo})]});return de}),Oo=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={item:{width:"100%",borderRadius:"var(--nav-item-radius)",color:"var(--nav-item-color)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},title:{},caption:{width:16,height:16,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...n.item,textAlign:"center",flexDirection:"column",width:48,minHeight:44,padding:"var(--nav-item-root-padding)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.title}`]:{...n.title,...u.noWrap,lineHeight:"16px",fontSize:r.typography.pxToRem(10),fontWeight:e?r.typography.fontWeightBold:r.typography.fontWeightSemiBold},[`& .${t.item.caption}`]:{...n.caption,top:11,left:6,position:"absolute"},[`& .${t.item.arrow}`]:{...n.arrow,top:11,right:6,position:"absolute"},[`& .${t.item.info}`]:{...n.info},...e&&{color:r.palette.primary.contrastText,backgroundColor:r.palette.primary.main,"&:hover":{backgroundColor:r.palette.primary.lighter},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,color:r.vars.palette.text.secondary,minHeight:"var(--nav-item-sub-height)",padding:"var(--nav-item-sub-padding)",[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...n.title,...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium,flex:"1 1 auto"},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow,marginRight:r.spacing(-.5)},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var me=({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s,onNavigate:m,pathname:n})=>{let l=useTheme(),v=useRef(null),p=I(e.path),c=W(e.path),b=!!matchPath({path:c||"",end:!p},n),d=Array.isArray(e.children)?e.children.some(K=>matchPath({path:W(K.path)||"",end:!p},n)):b,[f,x]=useState(!1);useEffect(()=>{f&&y();},[n]);let h=useCallback(()=>{e.children&&x(!0);},[e.children]),y=useCallback(()=>{x(!1);},[]),E=jsx(se,{ref:v,render:o,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:i,active:d,disabled:e.disabled,hasChild:!!e.children,open:e.children&&f,externalLink:!1,enabledRootRedirect:s,slotProps:i===1?r?.rootItem:r?.subItem,onMouseEnter:h,onMouseLeave:y,onNavigate:m});return e.roles&&r?.currentRole&&!e?.roles?.includes(r?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,children:[E,jsx(to,{disableScrollLock:!0,open:f,anchorEl:v.current,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:h,onMouseLeave:y,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...i>1&&{mt:-1},...f&&{pointerEvents:"auto"}}}},sx:{...a,pointerEvents:"none"},children:jsx(oo,{className:t.paper,sx:{minWidth:180,...paper({theme:l,dropdown:!0}),...r?.paper},children:jsx(Ko,{data:e.children,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s,onNavigate:m,pathname:n})})})]}):jsx(g,{disabled:e.disabled,children:E})};function Ko({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,cssVars:s,onNavigate:m,pathname:n}){return jsx(N,{sx:{gap:.5},children:e.map(l=>jsx(me,{data:l,render:i,depth:o+1,cssVars:s,slotProps:a,enabledRootRedirect:r,onNavigate:m,pathname:n},l.title))})}var zi=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s,onNavigate:m,pathname:n})=>{let l=useTheme(),v={...k.mini(l),...s};return jsx(so,{component:"nav",className:t.mini.root,sx:{...v,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)",alignItems:"center",justifyContent:"center"},children:i.filter(p=>"divider"in p?!0:!p.hidden).map((p,c)=>"divider"in p?jsx("li",{children:p.divider},`divider-${c}`):jsxs(Fragment,{children:[p.subheader&&jsx(Fragment,{children:jsx(Yo,{sx:{my:2},flexItem:!0})}),jsx(et,{render:o,cssVars:v,items:p.items,renderEmptyView:p.renderEmptyView,slotProps:a,enabledRootRedirect:r,onNavigate:m,pathname:n,hidden:p.hidden})]},p.subheader??p.items[0]?.title??c))})})},et=({items:e,render:i,renderEmptyView:o,slotProps:a,enabledRootRedirect:r,cssVars:s,onNavigate:m,pathname:n})=>{let l=o&&e.length===0?o():jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.filter(v=>!v.hidden).map(v=>jsx(me,{depth:1,data:v,render:i,cssVars:s,slotProps:a,enabledRootRedirect:r,onNavigate:m,pathname:n},v.title))});return jsx(g,{children:l})};var le=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,...f},x)=>{let h=M({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d});return jsxs(mt,{ref:x,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.texts}`]:c?.texts,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...h.baseProps,...f,children:[i&&jsx(q,{component:"span",className:t.item.icon,children:h.renderIcon}),a&&jsxs(q,{component:"span",className:t.item.texts,children:[jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,placement:"top-start",children:jsx(q,{component:"span",className:t.item.caption,children:r})})]}),o&&jsx(q,{component:"span",className:t.item.info,children:h.renderInfo}),p&&jsx(ge,{icon:s?"ARROW_DOWN_SIMPLE":"CHEVRON_LEFT",className:t.item.arrow})]})}),mt=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={item:{width:"100%",paddingTop:"var(--nav-item-pt)",paddingLeft:"var(--nav-item-pl)",paddingRight:"var(--nav-item-pr)",paddingBottom:"var(--nav-item-pb)",borderRadius:"var(--nav-item-radius)",color:"var(--nav-item-color)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},texts:{minWidth:0,flex:"1 1 auto"},title:{...u.noWrap,...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium},caption:{...u.noWrap,...r.typography.caption,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)",margin:"var(--nav-icon-margin)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...n.item,minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-root-active-color)",backgroundColor:"var(--nav-item-root-active-bg)","&:hover":{backgroundColor:"var(--nav-item-root-active-hover-bg)"},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,minHeight:"var(--nav-item-sub-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.info},"&::before":{left:0,content:'""',position:"absolute",width:"var(--nav-bullet-size)",height:"var(--nav-bullet-size)",transform:"translate(calc(var(--nav-bullet-size) * -1), calc(var(--nav-bullet-size) * -0.4))",backgroundColor:"var(--nav-bullet-light-color)",mask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,WebkitMask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,[stylesMode.dark]:{backgroundColor:"var(--nav-bullet-dark-color)"}},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var pe=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r})=>{let s=w(),m=z(e.path,!!e.children),[n,l]=useState(m);useEffect(()=>{m||p();},[s]);let v=useCallback(()=>{e.children&&l(b=>!b);},[e.children]),p=useCallback(()=>{l(!1);},[]),c=jsx(le,{render:i,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:o,active:m,disabled:e.disabled,hasChild:!!e.children,open:e.children&&n,externalLink:I(e.path),enabledRootRedirect:r,slotProps:o===1?a?.rootItem:a?.subItem,onClick:v});return e.roles&&a?.currentRole&&!e?.roles?.includes(a?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,sx:{[`& .${t.li}`]:{"&:first-of-type":{mt:"var(--nav-item-gap)"}}},children:[c,jsx(X,{"data-group":e.title,in:n,depth:o,unmountOnExit:!0,mountOnEnter:!0,children:jsx(ct,{data:e.children,render:i,depth:o,slotProps:a,enabledRootRedirect:r})})]}):jsx(g,{disabled:e.disabled,children:c})},ct=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r})=>jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(pe,{data:s,render:i,depth:o+1,slotProps:a,enabledRootRedirect:r},s.title))});var ga=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s})=>{let m=useTheme(),n={...k.vertical(m),...s};return jsx(so,{component:"nav",className:t.vertical.root,sx:{...n,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:i.map(l=>jsx(gt,{subheader:l.subheader,items:l.items,render:o,slotProps:a,enabledRootRedirect:r},l.subheader??l.items[0].title))})})},gt=({items:e,render:i,subheader:o,slotProps:a,enabledRootRedirect:r})=>{let[s,m]=useState(!0),n=useCallback(()=>{m(v=>!v);},[]),l=jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(v=>jsx(pe,{data:v,render:i,depth:1,slotProps:a,enabledRootRedirect:r},v.title))});return jsx(g,{children:o?jsxs(Fragment,{children:[jsx(Q,{"data-title":o,open:s,onClick:n,sx:a?.subheader,children:o}),jsx(Te,{in:s,children:l})]}):l})};var ce=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,onNavigate:f,...x},h)=>{let y=Y({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d,onNavigate:f});return jsxs(Ct,{ref:h,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.texts}`]:c?.texts,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...y.baseProps,...x,...y.baseProps.onClick?{onClick:y.baseProps.onClick,style:{textAlign:"left"}}:{},children:[i&&jsx(q,{component:"span",className:t.item.icon,children:y.renderIcon}),a&&jsxs(q,{component:"span",className:t.item.texts,children:[jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,placement:"top-start",children:jsx(q,{component:"span",className:t.item.caption,children:r})})]}),o&&jsx(q,{component:"span",className:t.item.info,children:y.renderInfo}),p&&jsx(ge,{icon:s?"ARROW_DOWN_SIMPLE":"CHEVRON_RIGHT",className:t.item.arrow})]})}),Ct=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={item:{width:"100%",paddingTop:"var(--nav-item-pt)",paddingLeft:"var(--nav-item-pl)",paddingRight:"var(--nav-item-pr)",paddingBottom:"var(--nav-item-pb)",borderRadius:"var(--nav-item-radius)",color:"var(--nav-item-color)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},texts:{minWidth:0,flex:"1 1 auto"},title:{...u.noWrap,...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium},caption:{...u.noWrap,...r.typography.caption,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)",margin:"var(--nav-icon-margin)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...n.item,minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-root-active-color)",backgroundColor:"var(--nav-item-root-active-bg)","&:hover":{backgroundColor:"var(--nav-item-root-active-hover-bg)"},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,minHeight:"var(--nav-item-sub-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.info},"&::before":{left:0,content:'""',position:"absolute",width:"var(--nav-bullet-size)",height:"var(--nav-bullet-size)",transform:"translate(calc(var(--nav-bullet-size) * -1), calc(var(--nav-bullet-size) * -0.4))",backgroundColor:"var(--nav-bullet-light-color)",mask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,WebkitMask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,[stylesMode.dark]:{backgroundColor:"var(--nav-bullet-dark-color)"}},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var ve=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m})=>{let n=I(e.path),l=W(e.path),v=!!matchPath({path:l||"",end:!n},m),p=Array.isArray(e.children)?e.children.some(h=>matchPath({path:W(h.path)||"",end:!n},m)):v,[c,b]=useState(p);useEffect(()=>{p||f();},[m]);let d=useCallback(()=>{e.children&&b(h=>!h);},[e.children]),f=useCallback(()=>{b(!1);},[]),x=jsx(ce,{render:i,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:o,active:p,disabled:e.disabled,hasChild:!!e.children,open:e.children&&c,externalLink:!1,enabledRootRedirect:r,slotProps:o===1?a?.rootItem:a?.subItem,onClick:d,onNavigate:s});return e.roles&&a?.currentRole&&!e?.roles?.includes(a?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,sx:{[`& .${t.li}`]:{"&:first-of-type":{mt:"var(--nav-item-gap)"}}},children:[x,jsx(X,{"data-group":e.title,in:c,depth:o,unmountOnExit:!0,mountOnEnter:!0,children:jsx(Rt,{data:e.children,render:i,depth:o,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m})})]}):jsx(g,{disabled:e.disabled,children:x})},Rt=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m})=>jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(n=>jsx(ve,{data:n,render:i,depth:o+1,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m},n.title))});var Za=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s,onNavigate:m,pathname:n})=>{let l=useTheme(),v={...k.vertical(l),...s};return jsx(so,{component:"nav",className:t.vertical.root,sx:{...v,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:i.filter(p=>"divider"in p?!0:!p.hidden).map((p,c)=>"divider"in p?jsx("li",{children:p.divider},`divider-${c}`):jsx(Wt,{subheader:p.subheader,items:p.items,render:o,renderEmptyView:p.renderEmptyView,slotProps:a,enabledRootRedirect:r,onNavigate:m,pathname:n,hidden:p.hidden,hiddenSubheader:p.hiddenSubheader},p.subheader??p.items[0]?.title??c))})})},Wt=({items:e,render:i,renderEmptyView:o,subheader:a,hiddenSubheader:r,slotProps:s,enabledRootRedirect:m,onNavigate:n,pathname:l})=>{let[v,p]=useState(!0),c=useCallback(()=>{p(d=>!d);},[]),b=o&&e.length===0?o():jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.filter(d=>!d.hidden).map(d=>jsx(ve,{data:d,render:i,depth:1,slotProps:s,enabledRootRedirect:m,onNavigate:n,pathname:l},d.title))});return jsx(g,{children:a&&!r?jsxs(Fragment,{children:[jsx(Q,{"data-title":a,open:v,onClick:c,sx:s?.subheader,children:a}),jsx(Te,{in:v,children:b})]}):b})};
|
|
18
|
+
var t={mini:{root:"nav__section__mini"},horizontal:{root:"nav__section__horizontal"},vertical:{root:"nav__section__vertical"},item:{root:"mnl__nav__item",icon:"mnl__nav__item__icon",info:"mnl__nav__item__info",texts:"mnl__nav__item__texts",title:"mnl__nav__item__title",arrow:"mnl__nav__item__arrow",caption:"mnl__nav__item__caption"},li:"mnl__nav__li",ul:"mnl__nav__ul",paper:"mnl__nav__paper",subheader:"mnl__nav__subheader",state:{open:"state--open",active:"state--active",disabled:"state--disabled"}};var fe={dark:"#282F37",light:"#EDEFF2"};function Z(e,i){let{vars:{palette:o}}=e;return {"--nav-item-color":o.text.secondary,"--nav-item-hover-bg":o.action.hover,"--nav-item-caption-color":o.text.disabled,"--nav-item-root-active-color":o.primary.main,"--nav-item-root-active-color-on-dark":e.palette.primary.contrastText,"--nav-item-root-active-bg":varAlpha(o.primary.mainChannel,.08),"--nav-item-root-active-hover-bg":varAlpha(o.primary.mainChannel,.16),"--nav-item-root-open-color":o.text.primary,"--nav-item-root-open-bg":o.action.hover,"--nav-item-sub-active-color":o.text.primary,"--nav-item-sub-active-bg":o.action.selected,"--nav-item-sub-open-color":o.text.primary,"--nav-item-sub-open-bg":o.action.hover,...i==="vertical"&&{"--nav-item-sub-active-bg":o.action.hover,"--nav-subheader-color":o.text.disabled,"--nav-subheader-hover-color":o.text.primary}}}function _e(e){let{shape:i,spacing:o}=e;return {...Z(e,"vertical"),"--nav-item-gap":o(.5),"--nav-item-radius":`${i.borderRadius}px`,"--nav-item-pt":o(.5),"--nav-item-pr":o(1),"--nav-item-pb":o(.5),"--nav-item-pl":o(1.5),"--nav-item-root-height":"44px","--nav-item-sub-height":"36px","--nav-icon-size":"24px","--nav-icon-margin":o(0,1.5,0,0),"--nav-bullet-size":"12px","--nav-bullet-light-color":fe.light,"--nav-bullet-dark-color":fe.dark}}function Ee(e){let{shape:i,spacing:o}=e;return {...Z(e,"mini"),"--nav-item-gap":o(.5),"--nav-item-radius":`${i.borderRadius}px`,"--nav-item-root-height":"56px","--nav-item-root-padding":o(1,.5,.75,.5),"--nav-item-sub-height":"34px","--nav-item-sub-padding":o(0,1),"--nav-icon-size":"22px","--nav-icon-root-margin":o(0,0,.75,0),"--nav-icon-sub-margin":o(0,1,0,0)}}function Me(e){let{shape:i,spacing:o}=e;return {...Z(e,"horizontal"),"--nav-item-gap":o(.75),"--nav-height":"56px","--nav-item-radius":`${i.borderRadius*.75}px`,"--nav-item-root-height":"32px","--nav-item-root-padding":o(0,.75),"--nav-item-sub-height":"34px","--nav-item-sub-padding":o(0,1),"--nav-icon-size":"22px","--nav-icon-sub-margin":o(0,1,0,0),"--nav-icon-root-margin":o(0,1,0,0)}}var k={mini:Ee,vertical:_e,horizontal:Me};function S({open:e,active:i,disabled:o}){let a=t.item.root;return i?a+=` ${t.state.active}`:e?a+=` ${t.state.open}`:o&&(a+=` ${t.state.disabled}`),a}var u={icon:{flexShrink:0,display:"inline-flex",["& svg, & img"]:{width:"100%",height:"100%"}},arrow:{width:16,height:16,flexShrink:0,marginLeft:"6px",display:"inline-flex"},info:{fontSize:12,flexShrink:0,fontWeight:600,marginLeft:"6px",lineHeight:18/12,display:"inline-flex"},noWrap:{width:"100%",maxWidth:"100%",display:"block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},disabled:{opacity:.48,pointerEvents:"none"}};function Q({sx:e,children:i}){return jsx(Fragment,{children:jsx(We,{component:"div",sx:{gap:1,alignItems:"center",position:"relative",typography:"overline",display:"inline-flex",alignSelf:"flex-start",color:"var(--nav-subheader-color)",padding:o=>o.spacing(2,1,1,1.5),fontSize:o=>o.typography.pxToRem(11),transition:o=>o.transitions.create(["color","padding-left"],{duration:o.transitions.duration.standard}),...e},children:i})})}function X({sx:e,depth:i,children:o,...a}){return jsx(Te,{sx:{...i+1!==1&&{pl:"calc(var(--nav-item-pl) + var(--nav-icon-size) / 2)",[`& .${t.ul}`]:{position:"relative",pl:"var(--nav-bullet-size)","&::before":{top:0,left:0,width:"2px",content:'""',position:"absolute",bottom:"calc(var(--nav-item-sub-height) - 2px - var(--nav-bullet-size) / 2)",bgcolor:"var(--nav-bullet-light-color)",[stylesMode.dark]:{bgcolor:"var(--nav-bullet-dark-color)"}}}},...e},...a,children:o})}function g({sx:e,children:i,disabled:o,...a}){return jsx(q,{component:"li",className:t.li,sx:{display:"flex",flexDirection:"column",...o&&{cursor:"not-allowed"},...e},...a,children:i})}function N({children:e,sx:i,...o}){return jsx(q,{component:"ul",className:t.ul,sx:{display:"flex",flexDirection:"column",...i},...o,children:e})}var be=forwardRef(({href:e,...i},o)=>jsx(Link,{ref:o,to:e,...i}));function M({path:e,icon:i,info:o,depth:a,render:r,hasChild:s,externalLink:m,enabledRootRedirect:n}){let l=a===1,v=!l,p=Number(a)>2,b=s&&!n?{component:"div"}:m?{href:e,target:"_blank",rel:"noopener"}:{component:be,href:e},d=null;i&&r?.navIcon&&typeof i=="string"?d=r?.navIcon[i]:d=i;let f=null;if(o&&r?.navInfo&&Array.isArray(o)){let[x,h]=o,y=r.navInfo(h)[x];f=y?cloneElement(y):null;}else f=o;return {subItem:v,rootItem:l,subDeepItem:p,baseProps:b,renderIcon:d,renderInfo:f}}var ee=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,...f},x)=>{let h=M({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d});return jsxs(Ke,{ref:x,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...h.baseProps,...f,children:[i&&jsx(q,{component:"span",className:t.item.icon,children:h.renderIcon}),a&&jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,arrow:!0,children:jsx(ge,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&jsx(q,{component:"span",className:t.item.info,children:h.renderInfo}),p&&jsx(ge,{icon:h.subItem?"CHEVRON_RIGHT":"ARROW_DOWN_SIMPLE",className:t.item.arrow})]})}),Ke=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={item:{flexShrink:0,color:"var(--nav-item-color)",borderRadius:"var(--nav-item-radius)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},title:{...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium},caption:{width:16,height:16,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...n.item,padding:"var(--nav-item-root-padding)",minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-root-margin)"},[`& .${t.item.title}`]:{...n.title,whiteSpace:"nowrap"},[`& .${t.item.caption}`]:{...n.caption,marginLeft:r.spacing(.75)},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-root-active-color)",backgroundColor:"var(--nav-item-root-active-bg)","&:hover":{backgroundColor:"var(--nav-item-root-active-hover-bg)"},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,padding:"var(--nav-item-sub-padding)",minHeight:"var(--nav-item-sub-height)",color:r.vars.palette.text.secondary,[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...n.title,flexGrow:1},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow,marginRight:r.spacing(-.5)},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var Ne=e=>{let i=e.split("?")[1];return i?new URLSearchParams(i).toString().length>0:!1};function oe(e){return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}function xe(e){try{let i=new URL(e,window.location.origin);return oe(i.pathname)}catch{return e}}function I(e){return e.startsWith("http")}function W(e){return e.replace(window.location.origin,"")}function w(){let{pathname:e}=useLocation();return useMemo(()=>e,[e])}function z(e,i=!0){let o=oe(w()),a=Ne(e);if(e.startsWith("#")||I(e))return !1;if(i||a){let m=o.includes(e),n=xe(e);return m||a&&n===o}return o===e}function te({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s}){let m=useTheme(),n=w(),l=useRef(null),v=z(e.path,!!e.children),[p,c]=useState(!1);useEffect(()=>{p&&d();},[n]);let b=useCallback(()=>{e.children&&c(!0);},[e.children]),d=useCallback(()=>{c(!1);},[]),f=jsx(ee,{ref:l,render:o,title:e.title,path:e.path,icon:e.icon,info:e.info,caption:e.caption,depth:i,active:v,disabled:e.disabled,hasChild:!!e.children,open:e.children&&p,externalLink:I(e.path),enabledRootRedirect:s,slotProps:i===1?r?.rootItem:r?.subItem,onMouseEnter:b,onMouseLeave:d});return e.roles&&r?.currentRole&&!e?.roles?.includes(r?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,children:[f,jsx(to,{disableScrollLock:!0,open:p,anchorEl:l.current,anchorOrigin:i===1?{vertical:"bottom",horizontal:"left"}:{vertical:"center",horizontal:"right"},transformOrigin:i===1?{vertical:"top",horizontal:"left"}:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:b,onMouseLeave:d,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...i===1&&{ml:-.75},...p&&{pointerEvents:"auto"}}}},sx:{...a,pointerEvents:"none"},children:jsx(oo,{className:t.paper,sx:{minWidth:180,...paper({theme:m,dropdown:!0}),...r?.paper},children:jsx(io,{data:e.children,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s})})})]}):jsx(g,{disabled:e.disabled,children:f})}function io({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s}){return jsx(N,{sx:{gap:.5},children:e.map(m=>jsx(te,{data:m,render:o,depth:i+1,cssVars:a,slotProps:r,enabledRootRedirect:s},m.title))})}function qr({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s}){let m=useTheme(),n={...k.horizontal(m),...s};return jsx(lo,{sx:{height:1},slotProps:{content:{height:1,display:"flex",alignItems:"center"}},children:jsx(so,{component:"nav",direction:"row",alignItems:"center",className:t.horizontal.root,sx:{...n,mx:"auto",height:1,minHeight:"var(--nav-height)",...e},children:jsx(N,{sx:{flexDirection:"row",gap:"var(--nav-item-gap)"},children:i.map(l=>jsx(po,{render:o,cssVars:n,items:l.items,slotProps:a,enabledRootRedirect:r},l.subheader??l.items[0].title))})})})}function po({items:e,render:i,slotProps:o,enabledRootRedirect:a,cssVars:r}){return jsx(g,{children:jsx(N,{sx:{flexDirection:"row",gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(te,{depth:1,data:s,render:i,cssVars:r,slotProps:o,enabledRootRedirect:a},s.title))})})}var ne=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,...f},x)=>{let h=M({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d});return jsxs(go,{ref:x,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...h.baseProps,...f,children:[i&&jsx(q,{component:"span",className:t.item.icon,children:h.renderIcon}),a&&jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,arrow:!0,placement:"right",children:jsx(ge,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&h.subItem&&jsx(q,{component:"span",className:t.item.info,children:h.renderInfo})]})}),go=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={item:{width:"100%",borderRadius:"var(--nav-item-radius)",color:"var(--nav-item-color)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},title:{},caption:{width:16,height:16,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...n.item,textAlign:"center",flexDirection:"column",width:48,minHeight:44,padding:"var(--nav-item-root-padding)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.title}`]:{...n.title,...u.noWrap,lineHeight:"16px",fontSize:r.typography.pxToRem(10),fontWeight:e?r.typography.fontWeightBold:r.typography.fontWeightSemiBold},[`& .${t.item.caption}`]:{...n.caption,top:11,left:6,position:"absolute"},[`& .${t.item.arrow}`]:{...n.arrow,top:11,right:6,position:"absolute"},[`& .${t.item.info}`]:{...n.info},...e&&{color:r.palette.primary.contrastText,backgroundColor:r.palette.primary.main,"&:hover":{backgroundColor:r.palette.primary.lighter},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,color:r.vars.palette.text.secondary,minHeight:"var(--nav-item-sub-height)",padding:"var(--nav-item-sub-padding)",[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...n.title,...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium,flex:"1 1 auto"},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow,marginRight:r.spacing(-.5)},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var ie=({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s})=>{let m=useTheme(),n=w(),l=useRef(null),v=z(e.path,!!e.children),[p,c]=useState(!1);useEffect(()=>{p&&d();},[n]);let b=useCallback(()=>{e.children&&c(!0);},[e.children]),d=useCallback(()=>{c(!1);},[]),f=jsx(ne,{ref:l,render:o,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:i,active:v,disabled:e.disabled,hasChild:!!e.children,open:e.children&&p,externalLink:I(e.path),enabledRootRedirect:s,slotProps:i===1?r?.rootItem:r?.subItem,onMouseEnter:b,onMouseLeave:d});return e.roles&&r?.currentRole&&!e?.roles?.includes(r?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,children:[f,jsx(to,{disableScrollLock:!0,open:p,anchorEl:l.current,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:b,onMouseLeave:d,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...i>1&&{mt:-1},...p&&{pointerEvents:"auto"}}}},sx:{...a,pointerEvents:"none"},children:jsx(oo,{className:t.paper,sx:{minWidth:180,...paper({theme:m,dropdown:!0}),...r?.paper},children:jsx(Lo,{data:e.children,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s})})})]}):jsx(g,{disabled:e.disabled,children:f})};function Lo({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,cssVars:s}){return jsx(N,{sx:{gap:.5},children:e.map(m=>jsx(ie,{data:m,render:i,depth:o+1,cssVars:s,slotProps:a,enabledRootRedirect:r},m.title))})}var $n=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s})=>{let m=useTheme(),n={...k.mini(m),...s};return jsx(so,{component:"nav",className:t.mini.root,sx:{...n,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:i.map(l=>jsx(Bo,{render:o,cssVars:n,items:l.items,slotProps:a,enabledRootRedirect:r},l.subheader??l.items[0].title))})})},Bo=({items:e,render:i,slotProps:o,enabledRootRedirect:a,cssVars:r})=>jsx(g,{children:jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(ie,{depth:1,data:s,render:i,cssVars:r,slotProps:o,enabledRootRedirect:a},s.title))})});function Y({path:e,icon:i,info:o,depth:a,render:r,hasChild:s,externalLink:m,enabledRootRedirect:n,onNavigate:l}){let v=a===1,p=!v,c=Number(a)>2,d=s&&!n?{component:"div"}:m?{href:e,target:"_blank",rel:"noopener"}:{onClick:h=>l(h,e)},f=null;i&&r?.navIcon&&typeof i=="string"?f=r?.navIcon[i]:f=i;let x=null;if(o&&r?.navInfo&&Array.isArray(o)){let[h,y]=o,E=r.navInfo(y)[h];x=E?cloneElement(E):null;}else x=o;return {subItem:p,rootItem:v,subDeepItem:c,baseProps:d,renderIcon:f,renderInfo:x}}var se=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,onNavigate:f,...x},h)=>{let y=Y({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d,onNavigate:f}),K=!(m===1),de=jsxs(Oo,{ref:h,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...y.baseProps,...x,...y.baseProps.onClick?{onClick:y.baseProps.onClick,style:{textAlign:"left"}}:{},children:[i&&jsx(q,{component:"span",className:t.item.icon,children:y.renderIcon}),a&&K&&jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,arrow:!0,placement:"right",children:jsx(ge,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&y.subItem&&jsx(q,{component:"span",className:t.item.info,children:y.renderInfo})]});return de}),Oo=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={item:{width:"100%",borderRadius:"var(--nav-item-radius)",color:"var(--nav-item-color)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},title:{},caption:{width:16,height:16,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...n.item,textAlign:"center",flexDirection:"column",width:48,minHeight:44,padding:"var(--nav-item-root-padding)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.title}`]:{...n.title,...u.noWrap,lineHeight:"16px",fontSize:r.typography.pxToRem(10),fontWeight:e?r.typography.fontWeightBold:r.typography.fontWeightSemiBold},[`& .${t.item.caption}`]:{...n.caption,top:11,left:6,position:"absolute"},[`& .${t.item.arrow}`]:{...n.arrow,top:11,right:6,position:"absolute"},[`& .${t.item.info}`]:{...n.info},...e&&{color:r.palette.primary.contrastText,backgroundColor:r.palette.primary.main,"&:hover":{backgroundColor:r.palette.primary.lighter},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,color:r.vars.palette.text.secondary,minHeight:"var(--nav-item-sub-height)",padding:"var(--nav-item-sub-padding)",[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...n.title,...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium,flex:"1 1 auto"},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow,marginRight:r.spacing(-.5)},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var me=({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s,onNavigate:m,pathname:n})=>{let l=useTheme(),v=useRef(null),p=I(e.path),c=W(e.path),b=!!matchPath({path:c||"",end:!p},n),d=Array.isArray(e.children)?e.children.some(K=>matchPath({path:W(K.path)||"",end:!p},n)):b,[f,x]=useState(!1);useEffect(()=>{f&&y();},[n]);let h=useCallback(()=>{e.children&&x(!0);},[e.children]),y=useCallback(()=>{x(!1);},[]),E=jsx(se,{ref:v,render:o,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:i,active:d,disabled:e.disabled,hasChild:!!e.children,open:e.children&&f,externalLink:!1,enabledRootRedirect:s,slotProps:i===1?r?.rootItem:r?.subItem,onMouseEnter:h,onMouseLeave:y,onNavigate:m});return e.roles&&r?.currentRole&&!e?.roles?.includes(r?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,children:[E,jsx(to,{disableScrollLock:!0,open:f,anchorEl:v.current,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:h,onMouseLeave:y,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...i>1&&{mt:-1},...f&&{pointerEvents:"auto"}}}},sx:{...a,pointerEvents:"none"},children:jsx(oo,{className:t.paper,sx:{minWidth:180,...paper({theme:l,dropdown:!0}),...r?.paper},children:jsx(Ko,{data:e.children,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s,onNavigate:m,pathname:n})})})]}):jsx(g,{disabled:e.disabled,children:E})};function Ko({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,cssVars:s,onNavigate:m,pathname:n}){return jsx(N,{sx:{gap:.5},children:e.map(l=>jsx(me,{data:l,render:i,depth:o+1,cssVars:s,slotProps:a,enabledRootRedirect:r,onNavigate:m,pathname:n},l.title))})}var hi=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s,onNavigate:m,pathname:n})=>{let l=useTheme(),v={...k.mini(l),...s};return jsx(so,{component:"nav",className:t.mini.root,sx:{...v,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)",alignItems:"center",justifyContent:"center"},children:i.filter(p=>"divider"in p?!0:!p.hidden).map((p,c)=>"divider"in p?jsx("li",{children:p.divider},`divider-${c}`):jsxs(Fragment,{children:[p.subheader&&jsx(Fragment,{children:jsx(Yo,{sx:{my:2},flexItem:!0})}),jsx(et,{render:o,cssVars:v,items:p.items,renderEmptyView:p.renderEmptyView,slotProps:a,enabledRootRedirect:r,onNavigate:m,pathname:n,hidden:p.hidden})]},p.subheader??p.items[0]?.title??c))})})},et=({items:e,render:i,renderEmptyView:o,slotProps:a,enabledRootRedirect:r,cssVars:s,onNavigate:m,pathname:n})=>{let l=o&&e.length===0?o():jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.filter(v=>!v.hidden).map(v=>jsx(me,{depth:1,data:v,render:i,cssVars:s,slotProps:a,enabledRootRedirect:r,onNavigate:m,pathname:n},v.title))});return jsx(g,{children:l})};var le=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,...f},x)=>{let h=M({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d});return jsxs(mt,{ref:x,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.texts}`]:c?.texts,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...h.baseProps,...f,children:[i&&jsx(q,{component:"span",className:t.item.icon,children:h.renderIcon}),a&&jsxs(q,{component:"span",className:t.item.texts,children:[jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,placement:"top-start",children:jsx(q,{component:"span",className:t.item.caption,children:r})})]}),o&&jsx(q,{component:"span",className:t.item.info,children:h.renderInfo}),p&&jsx(ge,{icon:s?"ARROW_DOWN_SIMPLE":"CHEVRON_LEFT",className:t.item.arrow})]})}),mt=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={item:{width:"100%",paddingTop:"var(--nav-item-pt)",paddingLeft:"var(--nav-item-pl)",paddingRight:"var(--nav-item-pr)",paddingBottom:"var(--nav-item-pb)",borderRadius:"var(--nav-item-radius)",color:"var(--nav-item-color)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},texts:{minWidth:0,flex:"1 1 auto"},title:{...u.noWrap,...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium},caption:{...u.noWrap,...r.typography.caption,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)",margin:"var(--nav-icon-margin)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...n.item,minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-root-active-color)",backgroundColor:"var(--nav-item-root-active-bg)","&:hover":{backgroundColor:"var(--nav-item-root-active-hover-bg)"},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,minHeight:"var(--nav-item-sub-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.info},"&::before":{left:0,content:'""',position:"absolute",width:"var(--nav-bullet-size)",height:"var(--nav-bullet-size)",transform:"translate(calc(var(--nav-bullet-size) * -1), calc(var(--nav-bullet-size) * -0.4))",backgroundColor:"var(--nav-bullet-light-color)",mask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,WebkitMask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,[stylesMode.dark]:{backgroundColor:"var(--nav-bullet-dark-color)"}},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var pe=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r})=>{let s=w(),m=z(e.path,!!e.children),[n,l]=useState(m);useEffect(()=>{m||p();},[s]);let v=useCallback(()=>{e.children&&l(b=>!b);},[e.children]),p=useCallback(()=>{l(!1);},[]),c=jsx(le,{render:i,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:o,active:m,disabled:e.disabled,hasChild:!!e.children,open:e.children&&n,externalLink:I(e.path),enabledRootRedirect:r,slotProps:o===1?a?.rootItem:a?.subItem,onClick:v});return e.roles&&a?.currentRole&&!e?.roles?.includes(a?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,sx:{[`& .${t.li}`]:{"&:first-of-type":{mt:"var(--nav-item-gap)"}}},children:[c,jsx(X,{"data-group":e.title,in:n,depth:o,unmountOnExit:!0,mountOnEnter:!0,children:jsx(ct,{data:e.children,render:i,depth:o,slotProps:a,enabledRootRedirect:r})})]}):jsx(g,{disabled:e.disabled,children:c})},ct=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r})=>jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(pe,{data:s,render:i,depth:o+1,slotProps:a,enabledRootRedirect:r},s.title))});var Yi=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s})=>{let m=useTheme(),n={...k.vertical(m),...s};return jsx(so,{component:"nav",className:t.vertical.root,sx:{...n,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:i.map(l=>jsx(gt,{subheader:l.subheader,items:l.items,render:o,slotProps:a,enabledRootRedirect:r},l.subheader??l.items[0].title))})})},gt=({items:e,render:i,subheader:o,slotProps:a,enabledRootRedirect:r})=>{let[s,m]=useState(!0),n=useCallback(()=>{m(v=>!v);},[]),l=jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(v=>jsx(pe,{data:v,render:i,depth:1,slotProps:a,enabledRootRedirect:r},v.title))});return jsx(g,{children:o?jsxs(Fragment,{children:[jsx(Q,{"data-title":o,open:s,onClick:n,sx:a?.subheader,children:o}),jsx(Te,{in:s,children:l})]}):l})};var ce=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,onNavigate:f,...x},h)=>{let y=Y({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d,onNavigate:f});return jsxs(Ct,{ref:h,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.texts}`]:c?.texts,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...y.baseProps,...x,...y.baseProps.onClick?{onClick:y.baseProps.onClick,style:{textAlign:"left"}}:{},children:[i&&jsx(q,{component:"span",className:t.item.icon,children:y.renderIcon}),a&&jsxs(q,{component:"span",className:t.item.texts,children:[jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,placement:"top-start",children:jsx(q,{component:"span",className:t.item.caption,children:r})})]}),o&&jsx(q,{component:"span",className:t.item.info,children:y.renderInfo}),p&&jsx(ge,{icon:s?"ARROW_DOWN_SIMPLE":"CHEVRON_RIGHT",className:t.item.arrow})]})}),Ct=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={item:{width:"100%",paddingTop:"var(--nav-item-pt)",paddingLeft:"var(--nav-item-pl)",paddingRight:"var(--nav-item-pr)",paddingBottom:"var(--nav-item-pb)",borderRadius:"var(--nav-item-radius)",color:"var(--nav-item-color)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},texts:{minWidth:0,flex:"1 1 auto"},title:{...u.noWrap,...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium},caption:{...u.noWrap,...r.typography.caption,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)",margin:"var(--nav-icon-margin)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...n.item,minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-root-active-color)",backgroundColor:"var(--nav-item-root-active-bg)","&:hover":{backgroundColor:"var(--nav-item-root-active-hover-bg)"},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,minHeight:"var(--nav-item-sub-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.info},"&::before":{left:0,content:'""',position:"absolute",width:"var(--nav-bullet-size)",height:"var(--nav-bullet-size)",transform:"translate(calc(var(--nav-bullet-size) * -1), calc(var(--nav-bullet-size) * -0.4))",backgroundColor:"var(--nav-bullet-light-color)",mask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,WebkitMask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,[stylesMode.dark]:{backgroundColor:"var(--nav-bullet-dark-color)"}},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var ve=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m})=>{let n=I(e.path),l=W(e.path),v=!!matchPath({path:l||"",end:!n},m),p=Array.isArray(e.children)?e.children.some(h=>matchPath({path:W(h.path)||"",end:!n},m)):v,[c,b]=useState(p);useEffect(()=>{p||f();},[m]);let d=useCallback(()=>{e.children&&b(h=>!h);},[e.children]),f=useCallback(()=>{b(!1);},[]),x=jsx(ce,{render:i,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:o,active:p,disabled:e.disabled,hasChild:!!e.children,open:e.children&&c,externalLink:!1,enabledRootRedirect:r,slotProps:o===1?a?.rootItem:a?.subItem,onClick:d,onNavigate:s});return e.roles&&a?.currentRole&&!e?.roles?.includes(a?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,sx:{[`& .${t.li}`]:{"&:first-of-type":{mt:"var(--nav-item-gap)"}}},children:[x,jsx(X,{"data-group":e.title,in:c,depth:o,unmountOnExit:!0,mountOnEnter:!0,children:jsx(Pt,{data:e.children,render:i,depth:o,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m})})]}):jsx(g,{disabled:e.disabled,children:x})},Pt=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m})=>jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(n=>jsx(ve,{data:n,render:i,depth:o+1,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m},n.title))});var Ba=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s,onNavigate:m,pathname:n})=>{let l=useTheme(),v={...k.vertical(l),...s};return jsx(so,{component:"nav",className:t.vertical.root,sx:{...v,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:i.filter(p=>"divider"in p?!0:!p.hidden).map((p,c)=>"divider"in p?jsx("li",{children:p.divider},`divider-${c}`):jsx(Wt,{subheader:p.subheader,items:p.items,render:o,renderEmptyView:p.renderEmptyView,slotProps:a,enabledRootRedirect:r,onNavigate:m,pathname:n,hidden:p.hidden,hiddenSubheader:p.hiddenSubheader},p.subheader??p.items[0]?.title??c))})})},Wt=({items:e,render:i,renderEmptyView:o,subheader:a,hiddenSubheader:r,slotProps:s,enabledRootRedirect:m,onNavigate:n,pathname:l})=>{let[v,p]=useState(!0),c=useCallback(()=>{p(d=>!d);},[]),b=o&&e.length===0?o():jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.filter(d=>!d.hidden).map(d=>jsx(ve,{data:d,render:i,depth:1,slotProps:s,enabledRootRedirect:m,onNavigate:n,pathname:l},d.title))});return jsx(g,{children:a&&!r?jsxs(Fragment,{children:[jsx(Q,{"data-title":a,open:v,onClick:c,sx:s?.subheader,children:a}),jsx(Te,{in:v,children:b})]}):b})};
|
|
19
19
|
|
|
20
|
-
export { X as NavCollapse, g as NavLi,
|
|
20
|
+
export { X as NavCollapse, g as NavLi, qr as NavSectionHorizontal, ee as NavSectionHorizontalItem, $n as NavSectionMini, se as NavSectionMiniButtonItem, ne as NavSectionMiniItem, hi as NavSectionMiniWithButtons, Yi as NavSectionVertical, ce as NavSectionVerticalButtonItem, le as NavSectionVerticalItem, Ba as NavSectionVerticalWithButtons, N as NavUl, Q as Subheader, fe as bulletColor, t as navSectionClasses, k as navSectionCssVars, u as sharedStyles, S as stateClasses, M as useNavItem };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { DeepPartial } from 'react-hook-form';
|
|
2
2
|
import { SxProps, Theme } from '@mui/material/styles';
|
|
3
|
-
import {
|
|
3
|
+
import { Editor, NodeViewProps, Extension } from '@tiptap/core';
|
|
4
|
+
import { UseEditorOptions } from '@tiptap/react';
|
|
4
5
|
|
|
5
|
-
type EditorProps = Partial<
|
|
6
|
+
type EditorProps = Partial<UseEditorOptions> & {
|
|
6
7
|
value?: string;
|
|
7
8
|
error?: boolean;
|
|
8
9
|
fullItem?: boolean;
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
2
|
+
"version": "2.1.13",
|
|
3
3
|
"name": "@zydon/common-csr",
|
|
4
4
|
"description": "Zydon common resources for React projects (only Client-Side Rendering (CSR))",
|
|
5
5
|
"license": "MIT",
|
|
@@ -19,7 +19,13 @@
|
|
|
19
19
|
"README"
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
|
+
"dev": "vite",
|
|
23
|
+
"test": "jest --ci --collectCoverage=false",
|
|
24
|
+
"report": "jest --ci --coverage --reporters=default --reporters=jest-junit",
|
|
25
|
+
"test:coverage": "jest --coverage",
|
|
26
|
+
"test:watch": "jest --watch --collectCoverage=false",
|
|
22
27
|
"build": "tsup",
|
|
28
|
+
"build:watch": "tsup --watch",
|
|
23
29
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
24
30
|
"lint:fix": "eslint --fix src/**/*.{jsx,ts,tsx}",
|
|
25
31
|
"format": "prettier --write \"**/*.*\""
|
|
@@ -55,42 +61,53 @@
|
|
|
55
61
|
"@emotion/styled": "^11.13.0",
|
|
56
62
|
"@mui/material": "^5.16.7",
|
|
57
63
|
"@mui/x-data-grid-premium": "^7.14.0",
|
|
64
|
+
"@mui/x-license": "^8.19.0",
|
|
65
|
+
"@testing-library/dom": "10.0.0",
|
|
66
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
67
|
+
"@testing-library/react": "^16.1.0",
|
|
68
|
+
"@testing-library/user-event": "14.5.2",
|
|
69
|
+
"@types/jest": "^30.0.0",
|
|
70
|
+
"@types/jest-axe": "^3.5.9",
|
|
71
|
+
"@types/node": "^24.10.1",
|
|
58
72
|
"@types/react": "^18.3.4",
|
|
59
73
|
"@types/react-dom": "^18.3.0",
|
|
60
74
|
"@types/react-lazy-load-image-component": "^1.6.4",
|
|
61
75
|
"@typescript-eslint/eslint-plugin": "^6.4.1",
|
|
62
76
|
"@typescript-eslint/parser": "^6.4.1",
|
|
63
|
-
"@zydon/common": "^2.
|
|
64
|
-
"autoprefixer": "^10.4.20",
|
|
77
|
+
"@zydon/common": "^2.7.54",
|
|
65
78
|
"eslint": "^8.47.0",
|
|
66
79
|
"eslint-config-prettier": "^9.0.0",
|
|
67
|
-
"eslint-plugin-
|
|
80
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
68
81
|
"eslint-plugin-react": "^7.33.2",
|
|
69
82
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
70
|
-
"eslint-plugin-react-refresh": "^0.4.3",
|
|
71
83
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
84
|
+
"identity-obj-proxy": "^3.0.0",
|
|
85
|
+
"jest": "^29.7.0",
|
|
86
|
+
"jest-axe": "^10.0.0",
|
|
87
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
88
|
+
"jest-junit": "^16.0.0",
|
|
72
89
|
"postcss": "^8.4.41",
|
|
73
|
-
"postcss-import": "^16.1.0",
|
|
74
90
|
"prettier": "^3.0.2",
|
|
75
91
|
"react": "^18.3.1",
|
|
76
92
|
"react-dom": "^18.3.1",
|
|
77
93
|
"react-hook-form": "^7.53.0",
|
|
78
94
|
"react-router-dom": "^6.26.1",
|
|
95
|
+
"ts-jest": "^29.2.5",
|
|
79
96
|
"tsup": "6.6.0",
|
|
80
97
|
"typescript": "5.3.3"
|
|
81
98
|
},
|
|
82
99
|
"dependencies": {
|
|
83
100
|
"@codemirror/lang-sql": "^6.7.1",
|
|
84
|
-
"@tiptap/core": "^2.
|
|
85
|
-
"@tiptap/extension-code-block": "^2.
|
|
86
|
-
"@tiptap/extension-code-block-lowlight": "^2.
|
|
87
|
-
"@tiptap/extension-image": "^2.
|
|
88
|
-
"@tiptap/extension-link": "^2.
|
|
89
|
-
"@tiptap/extension-placeholder": "^2.
|
|
90
|
-
"@tiptap/extension-text-align": "^2.
|
|
91
|
-
"@tiptap/pm": "^2.
|
|
92
|
-
"@tiptap/react": "^2.
|
|
93
|
-
"@tiptap/starter-kit": "^2.
|
|
101
|
+
"@tiptap/core": "^2.27.1",
|
|
102
|
+
"@tiptap/extension-code-block": "^2.27.1",
|
|
103
|
+
"@tiptap/extension-code-block-lowlight": "^2.27.1",
|
|
104
|
+
"@tiptap/extension-image": "^2.27.1",
|
|
105
|
+
"@tiptap/extension-link": "^2.27.1",
|
|
106
|
+
"@tiptap/extension-placeholder": "^2.27.1",
|
|
107
|
+
"@tiptap/extension-text-align": "^2.27.1",
|
|
108
|
+
"@tiptap/pm": "^2.27.1",
|
|
109
|
+
"@tiptap/react": "^2.27.1",
|
|
110
|
+
"@tiptap/starter-kit": "^2.27.1",
|
|
94
111
|
"@uiw/react-codemirror": "^4.23.0",
|
|
95
112
|
"ace-builds": "1.32.9",
|
|
96
113
|
"lowlight": "^3.1.0",
|
|
@@ -107,5 +124,14 @@
|
|
|
107
124
|
"react-dom": "^18.3.1",
|
|
108
125
|
"react-hook-form": "^7.53.0",
|
|
109
126
|
"react-router-dom": "^6.26.1"
|
|
127
|
+
},
|
|
128
|
+
"jest-junit": {
|
|
129
|
+
"outputDirectory": "./reports",
|
|
130
|
+
"outputName": "junit.xml",
|
|
131
|
+
"ancestorSeparator": " › ",
|
|
132
|
+
"uniqueOutputName": "false",
|
|
133
|
+
"suiteNameTemplate": "{filepath}",
|
|
134
|
+
"classNameTemplate": "{classname}",
|
|
135
|
+
"titleTemplate": "{title}"
|
|
110
136
|
}
|
|
111
137
|
}
|