@tracktor/design-system 4.13.0 → 4.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -3
- package/dist/main.cjs +1 -1
- package/dist/main.js +79 -79
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/main.cjs
CHANGED
|
@@ -74,4 +74,4 @@ React keys must be passed directly to JSX without using spread:
|
|
|
74
74
|
}
|
|
75
75
|
`}),p.import&&r(n.GlobalStyles,{styles:n.css`
|
|
76
76
|
@import url("https://fonts.googleapis.com/css2?family=${d}:wght@${g}&display=swap");
|
|
77
|
-
`}),t&&r(n.CssBaseline,{enableColorScheme:e}),a&&r(V1,{}),o&&r(R1,{theme:i}),A]})})},F1={apply:"Apply",clickToUpload:"Click to upload",files:"Files",reset:"Reset",selectAll:"Select all"},q1={apply:"Appliquer",clickToUpload:"Cliquez pour télécharger",files:"Fichiers",reset:"Réinitialiser",selectAll:"Tout sélectionner"},T1={en:F1,fr:q1},Ie=()=>{const{language:A}=x.useContext(Et);return{t:t=>T1[A][t]}},ze=5,U1=(A,e)=>{const t=e==="vertical";return A==="small"?t?130:60:t?150:80},L1=A=>{if(!A)return"";const e=A.length>1,o=[...A||[]].slice(0,5).map(({name:a})=>{const i=a.split(".").pop();return a.length>10&&e?`${a.substring(0,10)}(...).${i}`:a}).join(" • ");return A.length>ze?`${o} + ${A.length-ze}`:o},M1=x.forwardRef(({accept:A,name:e,disabled:t,required:o,error:a,localeText:i,multiple:l,id:s,size:p,helperText:d,fullWidth:g,icon:h,onChange:E,label:S,pattern:C,title:f,value:b,variant:w="vertical"},R)=>{const[m,I]=x.useState(null),{t:c}=Ie(),{palette:Q}=n.useTheme(),v=w==="vertical",T=s||e,U=x.useRef(null),N=x.useRef(null),j=b!==void 0?b:m,L=L1(j);x.useImperativeHandle(R,()=>{const M=N.current;return M.reset=()=>{I(null),N.current&&(N.current.value="")},M});const _=M=>{E?.(M),I(M.target.files)},$=M=>{M.preventDefault()},H=M=>{if(M.preventDefault(),M.dataTransfer.files.length>0){const V=N.current,q=M.dataTransfer.files;I(q);const W=new DataTransfer;Array.from(q).forEach(u=>W.items.add(u)),V&&(V.files=W.files),V?.focus(),V?.blur(),E?.({...M,target:V}),M.dataTransfer.clearData()}};return B(n.InputLabel,{ref:U,htmlFor:T,onDragOver:$,onDrop:H,sx:{"&:hover, &:focus":{borderColor:Q.primary.main},border:`1px dashed ${a?Q.error.main:Q.divider}`,borderRadius:1,cursor:"pointer",height:U1(p,w),maxWidth:g?"100%":400,padding:2,position:"relative",width:"100%"},children:[B(n.Stack,{alignItems:"center",height:"100%",direction:v?"column":"row",justifyContent:v?"center":"flex-start",textAlign:v?"center":"left",spacing:.5,color:t?"text.disabled":"text.secondary",children:[h||r(I1,{sx:{height:40,width:40}}),L?B(iA,{children:[B(n.Typography,{variant:"body2",color:"textSecondary",children:[j?.length," ",i?.files||c("files")]}),r(n.Typography,{variant:"body2",color:"primary",whiteSpace:v?"normal":"nowrap",textOverflow:"ellipsis",overflow:"hidden",children:L})]}):B(n.Typography,{variant:"subtitle1",color:t?"text.disabled":"primary",children:[S||c("clickToUpload")," ",o&&"*"]}),d&&r(n.Typography,{color:a?"error":"textSecondary",variant:"body2",children:d})]}),r("input",{id:T,ref:N,type:"file",title:f,disabled:t,required:o,name:e,multiple:l,accept:A,pattern:C,onChange:_,style:{left:"50%",opacity:0,pointerEvents:"none",position:"absolute",top:"50%",transform:"translate(-50%, -50%)",zIndex:-1}},b?"has-files":"no-files")]})}),Ye=A=>{if(!A)return!1;try{return!!new URL(A).protocol}catch{return!1}},SA=1,vA={list:{marginLeft:({spacing:A})=>`-${A(.5)} !important`,marginRight:({spacing:A})=>`-${A(.5)} !important`,minWidth:250},listItem:{borderRadius:1,padding:.5}},D1=A=>typeof A=="string",Bt=({Empty:A,action:e,items:t,fullWidth:o,sx:a,alwaysDisplaySecondaryAction:i,isLoading:l,disableLightbox:s,numberLoadingItems:p=3})=>{const[d,g]=x.useState("");return!t?.length&&!l&&!e?A||null:l?r(n.List,{sx:{...vA.list,...o&&{width:"100%"}},children:[...Array(p).keys()].map(h=>B(n.ListItem,{sx:vA.listItem,children:[r(n.Skeleton,{width:40,height:40,sx:{marginRight:SA},variant:"rounded"}),r(n.ListItemText,{primary:r(n.Typography,{variant:"h6",children:r(n.Skeleton,{width:90})}),secondary:r(n.Skeleton,{width:70}),sx:{marginY:0}})]},h))}):B(n.List,{sx:{...vA.list,...o&&{width:"100%"},...a},children:[t?.map(({id:h,title:E,subtitle:S,image:C,thumbnail:f,secondaryAction:b,chipLabel:w,chipColor:R,onClick:m,icon:I,divider:c,Avatar:Q},v)=>{const T=`key-${v}-${E}-${h}`,U=!!C?.toLowerCase()?.endsWith(".pdf"),N=Ye(C),j=Ye(f),L=pe(C),_=m?"none":void 0,$=s||!!I||!N||L,H=!!m||!!(!m&&!s&&C),M=d===T,W=(j?f:"")||(N?C:"")||"";return c?r(n.ListItem,{disableGutters:!0,children:r(n.Divider,{flexItem:!0,sx:{width:"100%"}})}):B(n.ListItem,{secondaryAction:b,onClick:u=>{m?.(u,{...I&&{icon:I},...h&&{id:h},...C&&{image:C},...S&&{subtitle:S},...f&&{thumbnail:f},...E&&{thumbnail:f},isFile:L,isPdf:U}),H&&!M&&!m&&g(T)},sx:{...vA.listItem,"& .MuiListItemSecondaryAction-root":{alignItems:"center",display:"flex",justifyContent:"center",opacity:i?1:0,position:"static",right:({spacing:u})=>u(.5),transform:"none"},"&:hover":{"& .MuiListItemSecondaryAction-root":{opacity:1},backgroundColor:({palette:u})=>H?u.action.hover:"transparent"},cursor:H?"pointer":"default"},children:[Q!==void 0&&r(n.Box,{marginRight:SA,children:Q}),!Q&&U&&r(qA,{src:C,srcThumb:f,width:40,height:40,sx:{borderRadius:1,marginRight:SA},disableLightbox:s,open:M,onClose:()=>g("")}),!Q&&!U&&r(qA,{disableThumb:!0,src:C,srcThumb:f,disableLightbox:$,open:M,onClose:()=>g(""),children:r(n.Avatar,{src:L?Ct:W,variant:"rounded",sx:{marginRight:SA},slotProps:{img:{sx:{...L&&{padding:"15%"}}}},children:!L&&(I||typeof E=="string"&&(E||"")?.charAt(0).toUpperCase())})}),r(n.ListItemText,{primary:B(n.Stack,{direction:"row",alignItems:"center",spacing:1,children:[E&&r(n.Typography,{variant:"h6",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",children:E}),w&&r(n.Chip,{label:w,variant:"rounded",size:"xSmall",color:D1(R)?R:"default"})]}),secondary:S,slotProps:{primary:{component:"div"},secondary:{component:"div"}},sx:{marginY:0,userSelect:_}})]},T)}),e&&B(n.ListItemButton,{onClick:e?.onClick,sx:{...vA.listItem,"&:hover":{backgroundColor:({palette:h})=>h.action.hover}},children:[r(n.Avatar,{src:e?.image||"",variant:"rounded",sx:{marginRight:SA},children:e?.icon||e?.title?.charAt(0).toUpperCase()}),r(n.ListItemText,{primary:e?.title&&r(n.Typography,{variant:"h6",children:e?.title}),secondary:e?.subtitle,sx:{marginY:0}})]})]})},ge={padding:0,paddingRight:1},oe=A=>A==="xSmall"?{fontSize:Z(12),height:20}:A==="small"?{fontSize:Z(13),height:24}:{fontSize:Z(14),height:32},P1=(A,e)=>e?A?Array.isArray(A)?A:[A]:[]:A||null,O1=A=>{const{palette:e}=n.useTheme(),t=e.mode==="light"?"default":"primary",o=A==="chip";return function(i){return r(n.Badge,{badgeContent:`+${i}`,color:t,sx:{"& .MuiBadge-badge":{...o&&{backgroundColor:"grey.100",color:"text.primary"},position:"relative",transform:"none"},alignItems:"center"}})}},J1=({variant:A,children:e,disableSelectAll:t,localeText:o,disableReset:a,onChange:i,loading:l,options:s,value:p,multiple:d,...g})=>{const{t:h}=Ie(),E=Array.isArray(p)?p?.length===s?.length:!1,S=Array.isArray(s)&&s.every(f=>typeof f=="string"),C=!S&&s?.filter(f=>f?.isHeader)||[];return B(n.Paper,{sx:{minWidth:250},...g,children:[d&&!l&&(!t||!!C?.length)&&B(iA,{children:[B(n.List,{role:"listbox",children:[!t&&r(n.ListItem,{disablePadding:!0,role:"option",onMouseDown:f=>{if(f.stopPropagation(),f.preventDefault(),E){i?.(f,[],"removeOption");return}i?.(f,s||[],"selectOption")},children:B(n.ListItemButton,{disableRipple:!0,children:[r(n.Checkbox,{disableRipple:!0,id:"select-all-checkbox",checked:E,sx:ge}),r(n.ListItemText,{primary:o?.selectAll||h("selectAll"),slotProps:{primary:{variant:"body2"}}}),!a&&r(n.Button,{variant:"link",size:"small",sx:{marginX:1,textDecoration:"none"},onClick:f=>{i?.(f,[],"removeOption")},onMouseDown:f=>{f.stopPropagation(),f.preventDefault()},children:r(n.Typography,{variant:"body2",children:o?.reset||h("reset")})})]})}),!S&&C?.map((f,b)=>{const w=`header-options-${b}`,R=Array.isArray(p)&&p.some(m=>JSON.stringify(m)===JSON.stringify(f)||m&&typeof m=="object"&&"id"in m&&m?.id===f?.id);return r(n.ListItem,{disablePadding:!0,onMouseDown:m=>{if(m.stopPropagation(),m.preventDefault(),R){const I=Array.isArray(p)?p?.filter(c=>!(JSON.stringify(c)===JSON.stringify(f)||c&&typeof c=="object"&&"id"in c&&c?.id===f?.id)):[];i?.(m,I,"removeOption");return}i?.(m,[...Array.isArray(p)?p:[],f],"selectOption")},children:B(n.ListItemButton,{disableRipple:!0,children:[r(n.Checkbox,{disableRipple:!0,checked:R,sx:ge}),r(n.ListItemText,{primary:f?.label})]})},w)})]}),r(n.Divider,{})]}),e]})},K1=({variant:A,onChange:e,disableCheckbox:t,placeholder:o,localeText:a,disableReset:i,disableSelectAll:l,value:s,onFocus:p,onBlur:d,open:g,getOptionLabel:h,onInputChange:E,inputValue:S,disableClearable:C,loading:f,resetInputValueOnSelectOption:b,renderOption:w,renderValue:R,width:m,sx:I,size:c="small",disableCloseOnSelect:Q=!0,multiple:v=!0,options:T=[],slotProps:U,...N},j)=>{const[L,_]=x.useState(!1),[$,H]=x.useState(""),M=S||$,V=A==="chip",q=Array.isArray(s)?!!s.length:s!=null,W=P1(s,v),u=(y,k,D,P)=>{if(k===null){e?.(y,v?[]:null,D,P);return}e?.(y,k,D,P),(!Q||!v)&&_(!1)};return r(n.Autocomplete,{freeSolo:!1,multiple:v,disableClearable:C,value:W,options:T,loading:f,ref:j,size:c,disableCloseOnSelect:Q,onChange:u,getLimitTagsText:O1(A),inputValue:M,open:g||L,onOpen:()=>_(!0),sx:{width:m,...I},slots:{paper:J1},slotProps:{...U,paper:{disableReset:i,disableSelectAll:l,loading:f,localeText:a,multiple:v,onChange:e,options:T,value:s,variant:A,...U?.paper}},onInputChange:(y,k,D)=>{D==="reset"&&L&&!b||D==="selectOption"&&!b||D==="removeOption"&&!b||(S||H(k),E?.(y,k,D))},onFocus:y=>{_(!0),p?.(y)},onBlur:y=>{_(!1),d?.(y)},getOptionLabel:h||(y=>{const k=typeof y=="object"&&"label"in y?y.label:y;return String(k)}),renderOption:w||((y,k,{selected:D})=>{const P=typeof k!="string"&&k.isHeader;if(f||P)return null;const G=typeof k=="string"?k:k?.id||k?.value||"",rA=typeof k=="string"?k:k?.label,pA=typeof k=="string"?void 0:k?.image,z=`${G}-${y?.key}`;return yt.createElement(n.ListItem,{...y,key:z},!t&&r(n.Checkbox,{disableRipple:!0,checked:D,sx:ge}),pA&&r(n.ListItemAvatar,{sx:{height:24,marginRight:1,minWidth:"auto",width:24},children:r(n.Avatar,{variant:"rounded",src:pA,sx:{height:24,width:24},children:pA==="letter"&&typeof rA=="string"&&rA?.charAt(0).toUpperCase()})}),typeof rA=="string"?r(n.Typography,{variant:"body2",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",title:rA,children:rA}):rA)}),renderValue:R||(v?(y,k,D)=>Array.isArray(y)?y.map((P,G)=>{if(D?.focused)return null;const{key:rA}=k({index:G});return r(n.Typography,{marginX:1,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",children:typeof P=="object"&&"label"in P&&P?.label?P.label:P.toString()},rA)}):null:void 0),renderInput:y=>{const k=()=>{if(!(!L&&(Array.isArray(s)&&s.length||!Array.isArray(s)&&s)))return o},D=()=>V?B(n.InputAdornment,{position:"end",sx:{color:q?"text.contrast":"text.primary",position:"absolute",right:5,transform:L?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease-in-out"},children:[(M||q)&&!C&&r(n.IconButton,{size:"small",onClick:P=>{P.preventDefault(),P.stopPropagation(),H(""),E?.(P,"","clear"),q&&e?.(P,v?[]:null,"clear")},onMouseDown:P=>{P.preventDefault(),P.stopPropagation()},sx:{"& .MuiSvgIcon-root":{fontSize:Z(16),pointerEvents:"none"},".MuiTextField-root:hover &":{opacity:1},color:q?"text.contrast":"text.primary",cursor:"pointer",left:"50%",opacity:0,padding:"2px",pointerEvents:"auto",position:"absolute",top:"50%",transform:"translate(-50%, -50%)",transition:"opacity 0.2s ease-in-out",zIndex:1},children:r(FA,{})}),r(Ee,{fontSize:"small",sx:{cursor:"pointer",transition:"opacity 0.2s ease-in-out",...(M||q)&&!C&&{".MuiTextField-root:hover &":{opacity:0}}}})]}):L?B(n.InputAdornment,{position:"end",sx:{position:"absolute",right:8},children:[M&&!C&&r(n.IconButton,{size:"small",onClick:P=>{H(""),E?.(P,"","clear")},sx:{marginRight:"-3px"},children:r(FA,{sx:{fontSize:Z(20)}})}),x.isValidElement(y.InputProps?.endAdornment)&&typeof y.InputProps.endAdornment=="object"&&"props"in y.InputProps.endAdornment&&y.InputProps.endAdornment.props&&typeof y.InputProps.endAdornment.props=="object"&&"children"in y.InputProps.endAdornment.props&&Array.isArray(y.InputProps.endAdornment.props.children)&&y.InputProps.endAdornment.props.children[1]]}):x.isValidElement(y.InputProps?.endAdornment)?y.InputProps.endAdornment:null;return r(n.TextField,{sx:{"& .MuiInputBase-root .MuiInputBase-input":{flex:!v||!L&&!M||L?1:0,minWidth:0},...V&&{"& .MuiInputBase-root":{backgroundColor:q?"text.primary":"grey.100",borderRadius:20,color:q?"text.contrast":"text.primary",fieldset:{borderColor:"transparent !important"},fontSize:oe(c).fontSize,height:oe(c).height,input:{padding:"0 !important"},minWidth:90,"p.MuiTypography-root":{fontSize:oe(c).fontSize,margin:0},paddingRight:"30px !important",paddingY:"0 !important"}}},...y,slotProps:{input:{...y.InputProps,endAdornment:D()}},placeholder:k()})},...N})},X1=x.forwardRef(K1),Z1=({in:A,children:e,sx:t,padding:o,direction:a,position:i="fixed",mountOnEnter:l=!0,unmountOnExit:s=!0,...p},d)=>r(n.Slide,{mountOnEnter:l,unmountOnExit:s,in:A===void 0?!0:A,direction:"up",children:r(n.Paper,{square:!0,elevation:0,ref:d,sx:{borderTop:({palette:g})=>`1px solid ${g.divider}`,bottom:0,left:0,padding:o,paddingX:o?void 0:2,paddingY:o?void 0:3,position:i,right:0,zIndex:10,...a==="column"&&{display:"flex",flexDirection:"column"},...a==="row"&&{display:"flex",flexDirection:"row"},...t},...p,children:e})}),H1=x.forwardRef(Z1),G1=({sx:A,fontSize:e,color:t="currentColor"})=>r(n.SvgIcon,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",fontSize:e,sx:A,children:r("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12C2.73 16.39 7 19.5 12 19.5C17 19.5 21.27 16.39 23 12C21.27 7.61 17 4.5 12 4.5ZM12 17C9.24 17 7 14.76 7 12C7 9.24 9.24 7 12 7C14.76 7 17 9.24 17 12C17 14.76 14.76 17 12 17ZM12 9C10.34 9 9 10.34 9 12C9 13.66 10.34 15 12 15C13.66 15 15 13.66 15 12C15 10.34 13.66 9 12 9Z",fill:t})}),N1=({sx:A,fontSize:e,color:t="currentColor"})=>r(n.SvgIcon,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",fontSize:e,sx:A,children:r("path",{d:"M19.7231 21.1385L15.8308 17.2577C15.3884 17.4539 14.8394 17.6266 14.1836 17.776C13.5279 17.9253 12.8 18 12 18C9.81665 18 7.83139 17.4035 6.0442 16.2106C4.25702 15.0176 2.93459 13.4474 2.0769 11.5C2.46535 10.6167 2.97753 9.78943 3.61343 9.01828C4.24933 8.24713 4.92818 7.60001 5.64998 7.07693L2.8615 4.27693L3.5692 3.56923L20.4308 20.4308L19.7231 21.1385ZM12 15.1539C12.2346 15.1539 12.492 15.1263 12.7721 15.0712C13.0522 15.016 13.2711 14.9442 13.4288 14.8558L8.6442 10.0712C8.55574 10.2545 8.48395 10.483 8.42883 10.7567C8.3737 11.0304 8.34613 11.2782 8.34613 11.5C8.34613 12.5192 8.7003 13.383 9.40863 14.0914C10.117 14.7997 10.9807 15.1539 12 15.1539ZM18.6077 15.7192L15.5096 12.6462C15.5493 12.5039 15.5833 12.3349 15.6115 12.1394C15.6397 11.9439 15.6538 11.7308 15.6538 11.5C15.6538 10.4808 15.2997 9.61699 14.5913 8.90865C13.883 8.20032 13.0192 7.84615 12 7.84615C11.7692 7.84615 11.5625 7.86346 11.3798 7.89808C11.1971 7.9327 11.0282 7.98462 10.8731 8.05385L8.4192 5.61923C8.99997 5.4 9.591 5.24198 10.1923 5.14518C10.7936 5.0484 11.3961 5 12 5C14.1705 5 16.1558 5.59648 17.9558 6.78943C19.7558 7.98238 21.0782 9.55257 21.9231 11.5C21.5654 12.3039 21.1125 13.0593 20.5644 13.7664C20.0163 14.4734 19.3641 15.1244 18.6077 15.7192ZM14.6942 11.85L11.675 8.85C12.0904 8.76667 12.4939 8.79455 12.8856 8.93365C13.2772 9.07275 13.6147 9.2859 13.8981 9.57308C14.1942 9.86026 14.4144 10.2029 14.5586 10.601C14.7029 10.999 14.7481 11.4154 14.6942 11.85Z",fill:t})}),W1=({slotProps:A,...e})=>{const[t,o]=x.useState(!1),a=()=>{o(s=>!s)},i=s=>{s.preventDefault()},l=s=>{s.preventDefault()};return r(n.TextField,{type:t?"text":"password",slotProps:{...A,input:{...A?.input,endAdornment:r(n.InputAdornment,{position:"end",children:r(n.IconButton,{"aria-label":t?"hide the password":"display the password",onClick:a,onMouseDown:i,onMouseUp:l,edge:"end",children:t?r(N1,{}):r(G1,{})})})}},...e})},j1=({open:A,anchorEl:e,onClose:t,children:o,placement:a,variant:i="outlined"})=>r(n.Backdrop,{open:!!A,onClick:t,sx:{backgroundColor:"rgba(0, 0, 0, 0.2)"},children:r(n.Popper,{open:!!A,anchorEl:e,placement:a,sx:{maxWidth:"100%"},children:r(n.Paper,{role:"dialog","aria-modal":"false",variant:i,tabIndex:-1,onClick:l=>l.stopPropagation(),sx:{borderRadius:1.5},children:o})})}),_e=86,z1={"& svg":{animation:"scaleIn 0.4s ease-out"},"& svg path:first-of-type":{animation:"circleIn 2s ease-out"},"& svg path:last-child":{animation:"checkIn 0.4s ease-out 0.4s both",strokeDasharray:"30",strokeDashoffset:"-30"},"@keyframes checkIn":{"0%":{strokeDashoffset:"-30"},"100%":{strokeDashoffset:"0"}},"@keyframes circleIn":{"0%":{opacity:0},"100%":{opacity:1}},"@keyframes scaleIn":{"0%":{transform:"scale(0)"},"100%":{transform:"scale(1)"}}},Y1=({title:A,subtitle:e,buttonPrimary:t,buttonSecondary:o,color:a="secondary",fullWidth:i=!0,maxWidth:l="xs",onClose:s,...p})=>B(n.Dialog,{maxWidth:l,fullWidth:i,onClose:s,...p,sx:{"& .MuiDialog-paper":{borderColor:({palette:d})=>d[a]["30p"]}},children:[B(n.DialogContent,{sx:{alignItems:"center",backgroundColor:({palette:d})=>d[a]["4p"],display:"flex",flexDirection:"column",padding:3,textAlign:"center",...(t||o)&&{borderBottom:({palette:d})=>`1px solid ${d[a]["12p"]}`}},children:[r(ft,{onClick:d=>s?.(d,"closeButton")}),r(n.Box,{sx:{alignItems:"center",backgroundColor:({palette:d})=>d[a]["12p"],borderRadius:"50%",color:({palette:d})=>d[a].main,display:"flex",flexShrink:0,height:_e,justifyContent:"center",marginBottom:4,width:_e,...z1},children:B("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r("path",{d:"M20 36.6666C29.2048 36.6666 36.6667 29.2047 36.6667 20C36.6667 10.7952 29.2048 3.33331 20 3.33331C10.7953 3.33331 3.33334 10.7952 3.33334 20C3.33334 29.2047 10.7953 36.6666 20 36.6666Z",fill:"currentColor"}),r("path",{d:"M28 14L17 25L12 20",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),r(n.Typography,{variant:"h4",sx:{marginBottom:1},children:A}),r(n.DialogContentText,{variant:"body2",children:e})]}),(t||o)&&B(n.DialogActions,{children:[o&&r(le,{variant:"outlined",size:"small",isLoading:o?.loading,onClick:o?.onClick,sx:{flex:1},children:o?.text}),t&&r(le,{variant:"contained",size:"small",isLoading:t?.loading,onClick:t?.onClick,endIcon:r("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r("path",{d:"M7.27875 4.5L6.22125 5.5575L9.65625 9L6.22125 12.4425L7.27875 13.5L11.7788 9L7.27875 4.5Z",fill:"currentColor"})}),children:t?.text})]})]});function _1({label:A,value:e,onChange:t,checked:o,onCheckedChange:a,options:i,variant:l,disabled:s,labelMenu:p,labelOnlyAfterSelection:d,applyOnSelect:g,separatorBetweenLabelAndOptionSelected:h=":",multiple:E=!1,size:S="medium"}){const C=o!==void 0,[f,b]=x.useState(()=>C?o||!1:E?e||[]:e),w=C?o===!0:E?e?.length>0:e!=null,{anchorMenu:R,openMenu:m,isMenuOpen:I,closeMenu:c}=Be(),{t:Q}=Ie(),v=Array.isArray(i),T=i!==void 0,U=V=>{C?a?.(V):t?.(V)},N=()=>{U(f),c()},j=()=>{if(C)b(!1),a?.(!1);else if(E){const V=[];b(V),t?.(V)}else b(void 0),t?.(void 0);c()},L=V=>{if(C&&!T){a?.(!o);return}if(T&&v){m(V);return}if(T&&!v)if(C)a?.(!o);else{const q=e!=null?void 0:i?.value;t?.(E?q!==void 0?[q]:[]:q)}},_=V=>{let q;if(C)q=!0,b(q);else if(E){const W=f||[];q=W.includes(V)?W.filter(u=>u!==V):[...W,V],b(q)}else q=V,b(q);g&&(U(q),!E&&!C&&c())},$=V=>C?o===!0:E?f?.includes(V)||!1:f===V,H=V=>v?`${p?`${p} ${h} `:""}${i.find(q=>q.value===V)?.label||""}`:i?.label,M=()=>{if(C)return A;if(d&&w){const V=e||[],q=Array.isArray(V)?V.length:1;return`${A||p}${E&&q>1?` (${q})`:""}`}if(E&&w){const V=e||[],q=V.length;if(q===1)return H(V[0])||A;if(q>1){const W=H(V[0]),u=q-1;return`${W||String(V[0])}... (+${u})`}}return!E&&!C&&e!==void 0&&e!==null&&v&&H(e)||A};return B(iA,{children:[r(n.Chip,{disabled:s,size:S,label:M(),variant:l,deleteIcon:T&&v?r(Ee,{fontSize:"small",sx:{marginLeft:-.5,marginRight:.5,transform:I?"rotate(180deg)":"rotate(0deg)"}}):void 0,onClick:L,onDelete:T&&v?()=>{}:void 0,color:w?"active":"default"}),T&&v&&B(n.Menu,{anchorEl:R,open:I,onClose:c,slotProps:{paper:{sx:{minWidth:350}}},children:[B(n.Stack,{component:"li",direction:"row",paddingLeft:2,marginBottom:1,children:[r(n.ListItemText,{children:p}),r(n.IconButton,{onClick:c,children:r(FA,{fontSize:"small"})})]}),i.map((V,q)=>{const W=`${V.id||V.value}-${q}`,u=$(V.value);return B(n.MenuItem,{onClick:()=>_(V.value),children:[r(n.ListItemIcon,{children:E||C?r(n.Checkbox,{disableRipple:!0,checked:u,sx:{padding:0}}):r(n.Radio,{disableRipple:!0,checked:u,sx:{padding:0}})}),r(n.ListItemText,{sx:{color:"text.secondary"},children:V.label})]},W)}),!g&&B(n.Stack,{component:"li",direction:"row",justifyContent:"flex-end",spacing:1,marginTop:1,children:[r(n.Button,{size:"small",onClick:j,children:Q("reset")}),r(n.Button,{variant:"contained",size:"small",onClick:N,children:Q("apply")})]})]})]})}const $1=({children:A,permissions:e,disabledPermissions:t})=>{const[o,a]=x.useState(),i=x.useMemo(()=>({disabledPermissions:t,permissions:o,setPermissions:a}),[t,o]);return x.useEffect(()=>{a(e)},[e]),r($e.Provider,{value:i,children:A})},Ao={component:void 0,isOpen:!1,message:"",severity:"success",variant:"standard"},Se=x.createContext({closeSnackbar:()=>{},isOpen:!1,openSnackbar:()=>{}}),eo=({children:A,autoHideDuration:e=5e3,anchorOrigin:t={horizontal:"center",vertical:"bottom"}})=>{const[o,a]=x.useState(Ao),i=x.useCallback(p=>{a({component:p?.component,isOpen:!0,message:p?.message||"",severity:p?.severity||"success",variant:p?.variant||"standard"})},[]),l=x.useCallback((p,d)=>{d!=="clickaway"&&a(g=>({...g,isOpen:!1}))},[]),s=x.useMemo(()=>({closeSnackbar:l,isOpen:o.isOpen,openSnackbar:i}),[l,i,o.isOpen]);return B(Se.Provider,{value:s,children:[r(n.Snackbar,{open:o.isOpen,onClose:l,autoHideDuration:e,anchorOrigin:t,children:o.component?r(o.component,{}):r(n.Alert,{severity:o.severity,variant:o.variant,children:o.message})},o.message),A]})},to=()=>{const A=x.useContext(Se),{isOpen:e,closeSnackbar:t,openSnackbar:o}=A;if(A===void 0)throw new Error("SnackbarProvider must be used within a useSnackBar hook");return{closeSnackbar:t,isOpen:e,openSnackbar:o}},ro=()=>{const[A,e]=x.useState(0);return{handleChange:x.useCallback((o,a)=>{e(a)},[]),value:A}},oo=A=>`linear-gradient(${n.alpha("#fff",+n.getOverlayAlpha(A))}, ${n.alpha("#fff",+n.getOverlayAlpha(A))})`;exports.ActionAppBar=de;exports.AppBar=b1;exports.ArticleImage=l1;exports.AutocompleteFilter=X1;exports.Avatar=be;exports.AvatarAppBar=ht;exports.Backoffice=h1;exports.BottomFixedPaper=H1;exports.Button=le;exports.CardModal=Lr;exports.Chip=y1;exports.ChipFilter=_1;exports.DEFAULT_PERMISSION_CHECK_MODE=KA;exports.DialogCloseIcon=ft;exports.DialogPopper=j1;exports.DialogValidation=Y1;exports.File=M1;exports.FileViewer=qA;exports.HasPermission=vt;exports.Lightbox=me;exports.LinkTab=Tr;exports.ListAvatar=Bt;exports.ListAvatars=Bt;exports.ListItemCard=zr;exports.Logo=ut;exports.NavigationMenu=Hr;exports.NavigationMenuContext=fA;exports.PermissionProvider=$1;exports.QuantityField=Pr;exports.SnackbarContext=Se;exports.SnackbarProvider=eo;exports.StatusIcon=wA;exports.TabPanel=o1;exports.TextArea=Dr;exports.TextFieldAppBar=xt;exports.TextFieldPassword=W1;exports.ThemeProvider=k1;exports.TimeLine=f1;exports.TypographySkeleton=n1;exports.getBackgroundImageElevation=oo;exports.pxToRem=Z;exports.theme=Q1;exports.useMenu=Be;exports.usePermission=At;exports.useSnackbar=to;exports.useTabs=ro;Object.keys(n).forEach(A=>{A!=="default"&&!Object.prototype.hasOwnProperty.call(exports,A)&&Object.defineProperty(exports,A,{enumerable:!0,get:()=>n[A]})});
|
|
77
|
+
`}),t&&r(n.CssBaseline,{enableColorScheme:e}),a&&r(V1,{}),o&&r(R1,{theme:i}),A]})})},F1={apply:"Apply",clickToUpload:"Click to upload",files:"Files",reset:"Reset",selectAll:"Select all"},q1={apply:"Appliquer",clickToUpload:"Cliquez pour télécharger",files:"Fichiers",reset:"Réinitialiser",selectAll:"Tout sélectionner"},T1={en:F1,fr:q1},Ie=()=>{const{language:A}=x.useContext(Et);return{t:t=>T1[A][t]}},ze=5,U1=(A,e)=>{const t=e==="vertical";return A==="small"?t?130:60:t?150:80},L1=A=>{if(!A)return"";const e=A.length>1,o=[...A||[]].slice(0,5).map(({name:a})=>{const i=a.split(".").pop();return a.length>10&&e?`${a.substring(0,10)}(...).${i}`:a}).join(" • ");return A.length>ze?`${o} + ${A.length-ze}`:o},M1=x.forwardRef(({accept:A,name:e,disabled:t,required:o,error:a,localeText:i,multiple:l,id:s,size:p,helperText:d,fullWidth:g,icon:h,onChange:E,label:S,pattern:C,title:f,value:b,variant:w="vertical"},R)=>{const[m,I]=x.useState(null),{t:c}=Ie(),{palette:Q}=n.useTheme(),v=w==="vertical",T=s||e,U=x.useRef(null),N=x.useRef(null),j=b!==void 0?b:m,L=L1(j);x.useImperativeHandle(R,()=>{const M=N.current;return M.reset=()=>{I(null),N.current&&(N.current.value="")},M});const _=M=>{E?.(M),I(M.target.files)},$=M=>{M.preventDefault()},H=M=>{if(M.preventDefault(),M.dataTransfer.files.length>0){const V=N.current,q=M.dataTransfer.files;I(q);const W=new DataTransfer;Array.from(q).forEach(u=>W.items.add(u)),V&&(V.files=W.files),V?.focus(),V?.blur(),E?.({...M,target:V}),M.dataTransfer.clearData()}};return B(n.InputLabel,{ref:U,htmlFor:T,onDragOver:$,onDrop:H,sx:{"&:hover, &:focus":{borderColor:Q.primary.main},border:`1px dashed ${a?Q.error.main:Q.divider}`,borderRadius:1,cursor:"pointer",height:U1(p,w),maxWidth:g?"100%":400,padding:2,position:"relative",width:"100%"},children:[B(n.Stack,{alignItems:"center",height:"100%",direction:v?"column":"row",justifyContent:v?"center":"flex-start",textAlign:v?"center":"left",spacing:.5,color:t?"text.disabled":"text.secondary",children:[h||r(I1,{sx:{height:40,width:40}}),L?B(iA,{children:[B(n.Typography,{variant:"body2",color:"textSecondary",children:[j?.length," ",i?.files||c("files")]}),r(n.Typography,{variant:"body2",color:"primary",whiteSpace:v?"normal":"nowrap",textOverflow:"ellipsis",overflow:"hidden",children:L})]}):B(n.Typography,{variant:"subtitle1",color:t?"text.disabled":"primary",children:[S||c("clickToUpload")," ",o&&"*"]}),d&&r(n.Typography,{color:a?"error":"textSecondary",variant:"body2",children:d})]}),r("input",{id:T,ref:N,type:"file",title:f,disabled:t,required:o,name:e,multiple:l,accept:A,pattern:C,onChange:_,style:{left:"50%",opacity:0,pointerEvents:"none",position:"absolute",top:"50%",transform:"translate(-50%, -50%)",zIndex:-1}},b?"has-files":"no-files")]})}),Ye=A=>{if(!A)return!1;try{return!!new URL(A).protocol}catch{return!1}},SA=1,vA={list:{marginLeft:({spacing:A})=>`-${A(.5)} !important`,marginRight:({spacing:A})=>`-${A(.5)} !important`,minWidth:250},listItem:{borderRadius:1,padding:.5}},D1=A=>typeof A=="string",Bt=({Empty:A,action:e,items:t,fullWidth:o,sx:a,alwaysDisplaySecondaryAction:i,isLoading:l,disableLightbox:s,numberLoadingItems:p=3})=>{const[d,g]=x.useState("");return!t?.length&&!l&&!e?A||null:l?r(n.List,{sx:{...vA.list,...o&&{width:"100%"}},children:[...Array(p).keys()].map(h=>B(n.ListItem,{sx:vA.listItem,children:[r(n.Skeleton,{width:40,height:40,sx:{marginRight:SA},variant:"rounded"}),r(n.ListItemText,{primary:r(n.Typography,{variant:"h6",children:r(n.Skeleton,{width:90})}),secondary:r(n.Skeleton,{width:70}),sx:{marginY:0}})]},h))}):B(n.List,{sx:{...vA.list,...o&&{width:"100%"},...a},children:[t?.map(({id:h,title:E,subtitle:S,image:C,thumbnail:f,secondaryAction:b,chipLabel:w,chipColor:R,onClick:m,icon:I,divider:c,Avatar:Q},v)=>{const T=`key-${v}-${E}-${h}`,U=!!C?.toLowerCase()?.endsWith(".pdf"),N=Ye(C),j=Ye(f),L=pe(C),_=m?"none":void 0,$=s||!!I||!N||L,H=!!m||!!(!m&&!s&&C),M=d===T,W=(j?f:"")||(N?C:"")||"";return c?r(n.ListItem,{disableGutters:!0,children:r(n.Divider,{flexItem:!0,sx:{width:"100%"}})},T):B(n.ListItem,{secondaryAction:b,onClick:u=>{m?.(u,{...I&&{icon:I},...h&&{id:h},...C&&{image:C},...S&&{subtitle:S},...f&&{thumbnail:f},...E&&{thumbnail:f},isFile:L,isPdf:U}),H&&!M&&!m&&g(T)},sx:{...vA.listItem,"& .MuiListItemSecondaryAction-root":{alignItems:"center",display:"flex",justifyContent:"center",opacity:i?1:0,position:"static",right:({spacing:u})=>u(.5),transform:"none"},"&:hover":{"& .MuiListItemSecondaryAction-root":{opacity:1},backgroundColor:({palette:u})=>H?u.action.hover:"transparent"},cursor:H?"pointer":"default"},children:[Q!==void 0&&r(n.Box,{marginRight:SA,children:Q}),!Q&&U&&r(qA,{src:C,srcThumb:f,width:40,height:40,sx:{borderRadius:1,marginRight:SA},disableLightbox:s,open:M,onClose:()=>g("")}),!Q&&!U&&r(qA,{disableThumb:!0,src:C,srcThumb:f,disableLightbox:$,open:M,onClose:()=>g(""),children:r(n.Avatar,{src:L?Ct:W,variant:"rounded",sx:{marginRight:SA},slotProps:{img:{sx:{...L&&{padding:"15%"}}}},children:!L&&(I||typeof E=="string"&&(E||"")?.charAt(0).toUpperCase())})}),r(n.ListItemText,{primary:B(n.Stack,{direction:"row",alignItems:"center",spacing:1,children:[E&&r(n.Typography,{variant:"h6",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",children:E}),w&&r(n.Chip,{label:w,variant:"rounded",size:"xSmall",color:D1(R)?R:"default"})]}),secondary:S,slotProps:{primary:{component:"div"},secondary:{component:"div"}},sx:{marginY:0,userSelect:_}})]},T)}),e&&B(n.ListItemButton,{onClick:e?.onClick,sx:{...vA.listItem,"&:hover":{backgroundColor:({palette:h})=>h.action.hover}},children:[r(n.Avatar,{src:e?.image||"",variant:"rounded",sx:{marginRight:SA},children:e?.icon||e?.title?.charAt(0).toUpperCase()}),r(n.ListItemText,{primary:e?.title&&r(n.Typography,{variant:"h6",children:e?.title}),secondary:e?.subtitle,sx:{marginY:0}})]})]})},ge={padding:0,paddingRight:1},oe=A=>A==="xSmall"?{fontSize:Z(12),height:20}:A==="small"?{fontSize:Z(13),height:24}:{fontSize:Z(14),height:32},P1=(A,e)=>e?A?Array.isArray(A)?A:[A]:[]:A||null,O1=A=>{const{palette:e}=n.useTheme(),t=e.mode==="light"?"default":"primary",o=A==="chip";return function(i){return r(n.Badge,{badgeContent:`+${i}`,color:t,sx:{"& .MuiBadge-badge":{...o&&{backgroundColor:"grey.100",color:"text.primary"},position:"relative",transform:"none"},alignItems:"center"}})}},J1=({variant:A,children:e,disableSelectAll:t,localeText:o,disableReset:a,onChange:i,loading:l,options:s,value:p,multiple:d,...g})=>{const{t:h}=Ie(),E=Array.isArray(p)?p?.length===s?.length:!1,S=Array.isArray(s)&&s.every(f=>typeof f=="string"),C=!S&&s?.filter(f=>f?.isHeader)||[];return B(n.Paper,{sx:{minWidth:250},...g,children:[d&&!l&&(!t||!!C?.length)&&B(iA,{children:[B(n.List,{role:"listbox",children:[!t&&r(n.ListItem,{disablePadding:!0,role:"option",onMouseDown:f=>{if(f.stopPropagation(),f.preventDefault(),E){i?.(f,[],"removeOption");return}i?.(f,s||[],"selectOption")},children:B(n.ListItemButton,{disableRipple:!0,children:[r(n.Checkbox,{disableRipple:!0,id:"select-all-checkbox",checked:E,sx:ge}),r(n.ListItemText,{primary:o?.selectAll||h("selectAll"),slotProps:{primary:{variant:"body2"}}}),!a&&r(n.Button,{variant:"link",size:"small",sx:{marginX:1,textDecoration:"none"},onClick:f=>{i?.(f,[],"removeOption")},onMouseDown:f=>{f.stopPropagation(),f.preventDefault()},children:r(n.Typography,{variant:"body2",children:o?.reset||h("reset")})})]})}),!S&&C?.map((f,b)=>{const w=`header-options-${b}`,R=Array.isArray(p)&&p.some(m=>JSON.stringify(m)===JSON.stringify(f)||m&&typeof m=="object"&&"id"in m&&m?.id===f?.id);return r(n.ListItem,{disablePadding:!0,onMouseDown:m=>{if(m.stopPropagation(),m.preventDefault(),R){const I=Array.isArray(p)?p?.filter(c=>!(JSON.stringify(c)===JSON.stringify(f)||c&&typeof c=="object"&&"id"in c&&c?.id===f?.id)):[];i?.(m,I,"removeOption");return}i?.(m,[...Array.isArray(p)?p:[],f],"selectOption")},children:B(n.ListItemButton,{disableRipple:!0,children:[r(n.Checkbox,{disableRipple:!0,checked:R,sx:ge}),r(n.ListItemText,{primary:f?.label})]})},w)})]}),r(n.Divider,{})]}),e]})},K1=({variant:A,onChange:e,disableCheckbox:t,placeholder:o,localeText:a,disableReset:i,disableSelectAll:l,value:s,onFocus:p,onBlur:d,open:g,getOptionLabel:h,onInputChange:E,inputValue:S,disableClearable:C,loading:f,resetInputValueOnSelectOption:b,renderOption:w,renderValue:R,width:m,sx:I,size:c="small",disableCloseOnSelect:Q=!0,multiple:v=!0,options:T=[],slotProps:U,...N},j)=>{const[L,_]=x.useState(!1),[$,H]=x.useState(""),M=S||$,V=A==="chip",q=Array.isArray(s)?!!s.length:s!=null,W=P1(s,v),u=(y,k,D,P)=>{if(k===null){e?.(y,v?[]:null,D,P);return}e?.(y,k,D,P),(!Q||!v)&&_(!1)};return r(n.Autocomplete,{freeSolo:!1,multiple:v,disableClearable:C,value:W,options:T,loading:f,ref:j,size:c,disableCloseOnSelect:Q,onChange:u,getLimitTagsText:O1(A),inputValue:M,open:g||L,onOpen:()=>_(!0),sx:{width:m,...I},slots:{paper:J1},slotProps:{...U,paper:{disableReset:i,disableSelectAll:l,loading:f,localeText:a,multiple:v,onChange:e,options:T,value:s,variant:A,...U?.paper}},onInputChange:(y,k,D)=>{D==="reset"&&L&&!b||D==="selectOption"&&!b||D==="removeOption"&&!b||(S||H(k),E?.(y,k,D))},onFocus:y=>{_(!0),p?.(y)},onBlur:y=>{_(!1),d?.(y)},getOptionLabel:h||(y=>{const k=typeof y=="object"&&"label"in y?y.label:y;return String(k)}),renderOption:w||((y,k,{selected:D})=>{const P=typeof k!="string"&&k.isHeader;if(f||P)return null;const G=typeof k=="string"?k:k?.id||k?.value||"",rA=typeof k=="string"?k:k?.label,pA=typeof k=="string"?void 0:k?.image,z=`${G}-${y?.key}`;return yt.createElement(n.ListItem,{...y,key:z},!t&&r(n.Checkbox,{disableRipple:!0,checked:D,sx:ge}),pA&&r(n.ListItemAvatar,{sx:{height:24,marginRight:1,minWidth:"auto",width:24},children:r(n.Avatar,{variant:"rounded",src:pA,sx:{height:24,width:24},children:pA==="letter"&&typeof rA=="string"&&rA?.charAt(0).toUpperCase()})}),typeof rA=="string"?r(n.Typography,{variant:"body2",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",title:rA,children:rA}):rA)}),renderValue:R||(v?(y,k,D)=>Array.isArray(y)?y.map((P,G)=>{if(D?.focused)return null;const{key:rA}=k({index:G});return r(n.Typography,{marginX:1,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",children:typeof P=="object"&&"label"in P&&P?.label?P.label:P.toString()},rA)}):null:void 0),renderInput:y=>{const k=()=>{if(!(!L&&(Array.isArray(s)&&s.length||!Array.isArray(s)&&s)))return o},D=()=>V?B(n.InputAdornment,{position:"end",sx:{color:q?"text.contrast":"text.primary",position:"absolute",right:5,transform:L?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease-in-out"},children:[(M||q)&&!C&&r(n.IconButton,{size:"small",onClick:P=>{P.preventDefault(),P.stopPropagation(),H(""),E?.(P,"","clear"),q&&e?.(P,v?[]:null,"clear")},onMouseDown:P=>{P.preventDefault(),P.stopPropagation()},sx:{"& .MuiSvgIcon-root":{fontSize:Z(16),pointerEvents:"none"},".MuiTextField-root:hover &":{opacity:1},color:q?"text.contrast":"text.primary",cursor:"pointer",left:"50%",opacity:0,padding:"2px",pointerEvents:"auto",position:"absolute",top:"50%",transform:"translate(-50%, -50%)",transition:"opacity 0.2s ease-in-out",zIndex:1},children:r(FA,{})}),r(Ee,{fontSize:"small",sx:{cursor:"pointer",transition:"opacity 0.2s ease-in-out",...(M||q)&&!C&&{".MuiTextField-root:hover &":{opacity:0}}}})]}):L?B(n.InputAdornment,{position:"end",sx:{position:"absolute",right:8},children:[M&&!C&&r(n.IconButton,{size:"small",onClick:P=>{H(""),E?.(P,"","clear")},sx:{marginRight:"-3px"},children:r(FA,{sx:{fontSize:Z(20)}})}),x.isValidElement(y.InputProps?.endAdornment)&&typeof y.InputProps.endAdornment=="object"&&"props"in y.InputProps.endAdornment&&y.InputProps.endAdornment.props&&typeof y.InputProps.endAdornment.props=="object"&&"children"in y.InputProps.endAdornment.props&&Array.isArray(y.InputProps.endAdornment.props.children)&&y.InputProps.endAdornment.props.children[1]]}):x.isValidElement(y.InputProps?.endAdornment)?y.InputProps.endAdornment:null;return r(n.TextField,{sx:{"& .MuiInputBase-root .MuiInputBase-input":{flex:!v||!L&&!M||L?1:0,minWidth:0},...V&&{"& .MuiInputBase-root":{backgroundColor:q?"text.primary":"grey.100",borderRadius:20,color:q?"text.contrast":"text.primary",fieldset:{borderColor:"transparent !important"},fontSize:oe(c).fontSize,height:oe(c).height,input:{padding:"0 !important"},minWidth:90,"p.MuiTypography-root":{fontSize:oe(c).fontSize,margin:0},paddingRight:"30px !important",paddingY:"0 !important"}}},...y,slotProps:{input:{...y.InputProps,endAdornment:D()}},placeholder:k()})},...N})},X1=x.forwardRef(K1),Z1=({in:A,children:e,sx:t,padding:o,direction:a,position:i="fixed",mountOnEnter:l=!0,unmountOnExit:s=!0,...p},d)=>r(n.Slide,{mountOnEnter:l,unmountOnExit:s,in:A===void 0?!0:A,direction:"up",children:r(n.Paper,{square:!0,elevation:0,ref:d,sx:{borderTop:({palette:g})=>`1px solid ${g.divider}`,bottom:0,left:0,padding:o,paddingX:o?void 0:2,paddingY:o?void 0:3,position:i,right:0,zIndex:10,...a==="column"&&{display:"flex",flexDirection:"column"},...a==="row"&&{display:"flex",flexDirection:"row"},...t},...p,children:e})}),H1=x.forwardRef(Z1),G1=({sx:A,fontSize:e,color:t="currentColor"})=>r(n.SvgIcon,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",fontSize:e,sx:A,children:r("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12C2.73 16.39 7 19.5 12 19.5C17 19.5 21.27 16.39 23 12C21.27 7.61 17 4.5 12 4.5ZM12 17C9.24 17 7 14.76 7 12C7 9.24 9.24 7 12 7C14.76 7 17 9.24 17 12C17 14.76 14.76 17 12 17ZM12 9C10.34 9 9 10.34 9 12C9 13.66 10.34 15 12 15C13.66 15 15 13.66 15 12C15 10.34 13.66 9 12 9Z",fill:t})}),N1=({sx:A,fontSize:e,color:t="currentColor"})=>r(n.SvgIcon,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",fontSize:e,sx:A,children:r("path",{d:"M19.7231 21.1385L15.8308 17.2577C15.3884 17.4539 14.8394 17.6266 14.1836 17.776C13.5279 17.9253 12.8 18 12 18C9.81665 18 7.83139 17.4035 6.0442 16.2106C4.25702 15.0176 2.93459 13.4474 2.0769 11.5C2.46535 10.6167 2.97753 9.78943 3.61343 9.01828C4.24933 8.24713 4.92818 7.60001 5.64998 7.07693L2.8615 4.27693L3.5692 3.56923L20.4308 20.4308L19.7231 21.1385ZM12 15.1539C12.2346 15.1539 12.492 15.1263 12.7721 15.0712C13.0522 15.016 13.2711 14.9442 13.4288 14.8558L8.6442 10.0712C8.55574 10.2545 8.48395 10.483 8.42883 10.7567C8.3737 11.0304 8.34613 11.2782 8.34613 11.5C8.34613 12.5192 8.7003 13.383 9.40863 14.0914C10.117 14.7997 10.9807 15.1539 12 15.1539ZM18.6077 15.7192L15.5096 12.6462C15.5493 12.5039 15.5833 12.3349 15.6115 12.1394C15.6397 11.9439 15.6538 11.7308 15.6538 11.5C15.6538 10.4808 15.2997 9.61699 14.5913 8.90865C13.883 8.20032 13.0192 7.84615 12 7.84615C11.7692 7.84615 11.5625 7.86346 11.3798 7.89808C11.1971 7.9327 11.0282 7.98462 10.8731 8.05385L8.4192 5.61923C8.99997 5.4 9.591 5.24198 10.1923 5.14518C10.7936 5.0484 11.3961 5 12 5C14.1705 5 16.1558 5.59648 17.9558 6.78943C19.7558 7.98238 21.0782 9.55257 21.9231 11.5C21.5654 12.3039 21.1125 13.0593 20.5644 13.7664C20.0163 14.4734 19.3641 15.1244 18.6077 15.7192ZM14.6942 11.85L11.675 8.85C12.0904 8.76667 12.4939 8.79455 12.8856 8.93365C13.2772 9.07275 13.6147 9.2859 13.8981 9.57308C14.1942 9.86026 14.4144 10.2029 14.5586 10.601C14.7029 10.999 14.7481 11.4154 14.6942 11.85Z",fill:t})}),W1=({slotProps:A,...e})=>{const[t,o]=x.useState(!1),a=()=>{o(s=>!s)},i=s=>{s.preventDefault()},l=s=>{s.preventDefault()};return r(n.TextField,{type:t?"text":"password",slotProps:{...A,input:{...A?.input,endAdornment:r(n.InputAdornment,{position:"end",children:r(n.IconButton,{"aria-label":t?"hide the password":"display the password",onClick:a,onMouseDown:i,onMouseUp:l,edge:"end",children:t?r(N1,{}):r(G1,{})})})}},...e})},j1=({open:A,anchorEl:e,onClose:t,children:o,placement:a,variant:i="outlined"})=>r(n.Backdrop,{open:!!A,onClick:t,sx:{backgroundColor:"rgba(0, 0, 0, 0.2)"},children:r(n.Popper,{open:!!A,anchorEl:e,placement:a,sx:{maxWidth:"100%"},children:r(n.Paper,{role:"dialog","aria-modal":"false",variant:i,tabIndex:-1,onClick:l=>l.stopPropagation(),sx:{borderRadius:1.5},children:o})})}),_e=86,z1={"& svg":{animation:"scaleIn 0.4s ease-out"},"& svg path:first-of-type":{animation:"circleIn 2s ease-out"},"& svg path:last-child":{animation:"checkIn 0.4s ease-out 0.4s both",strokeDasharray:"30",strokeDashoffset:"-30"},"@keyframes checkIn":{"0%":{strokeDashoffset:"-30"},"100%":{strokeDashoffset:"0"}},"@keyframes circleIn":{"0%":{opacity:0},"100%":{opacity:1}},"@keyframes scaleIn":{"0%":{transform:"scale(0)"},"100%":{transform:"scale(1)"}}},Y1=({title:A,subtitle:e,buttonPrimary:t,buttonSecondary:o,color:a="secondary",fullWidth:i=!0,maxWidth:l="xs",onClose:s,...p})=>B(n.Dialog,{maxWidth:l,fullWidth:i,onClose:s,...p,sx:{"& .MuiDialog-paper":{borderColor:({palette:d})=>d[a]["30p"]}},children:[B(n.DialogContent,{sx:{alignItems:"center",backgroundColor:({palette:d})=>d[a]["4p"],display:"flex",flexDirection:"column",padding:3,textAlign:"center",...(t||o)&&{borderBottom:({palette:d})=>`1px solid ${d[a]["12p"]}`}},children:[r(ft,{onClick:d=>s?.(d,"closeButton")}),r(n.Box,{sx:{alignItems:"center",backgroundColor:({palette:d})=>d[a]["12p"],borderRadius:"50%",color:({palette:d})=>d[a].main,display:"flex",flexShrink:0,height:_e,justifyContent:"center",marginBottom:4,width:_e,...z1},children:B("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r("path",{d:"M20 36.6666C29.2048 36.6666 36.6667 29.2047 36.6667 20C36.6667 10.7952 29.2048 3.33331 20 3.33331C10.7953 3.33331 3.33334 10.7952 3.33334 20C3.33334 29.2047 10.7953 36.6666 20 36.6666Z",fill:"currentColor"}),r("path",{d:"M28 14L17 25L12 20",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),r(n.Typography,{variant:"h4",sx:{marginBottom:1},children:A}),r(n.DialogContentText,{variant:"body2",children:e})]}),(t||o)&&B(n.DialogActions,{children:[o&&r(le,{variant:"outlined",size:"small",isLoading:o?.loading,onClick:o?.onClick,sx:{flex:1},children:o?.text}),t&&r(le,{variant:"contained",size:"small",isLoading:t?.loading,onClick:t?.onClick,endIcon:r("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r("path",{d:"M7.27875 4.5L6.22125 5.5575L9.65625 9L6.22125 12.4425L7.27875 13.5L11.7788 9L7.27875 4.5Z",fill:"currentColor"})}),children:t?.text})]})]});function _1({label:A,value:e,onChange:t,checked:o,onCheckedChange:a,options:i,variant:l,disabled:s,labelMenu:p,labelOnlyAfterSelection:d,applyOnSelect:g,separatorBetweenLabelAndOptionSelected:h=":",multiple:E=!1,size:S="medium"}){const C=o!==void 0,[f,b]=x.useState(()=>C?o||!1:E?e||[]:e),w=C?o===!0:E?e?.length>0:e!=null,{anchorMenu:R,openMenu:m,isMenuOpen:I,closeMenu:c}=Be(),{t:Q}=Ie(),v=Array.isArray(i),T=i!==void 0,U=V=>{C?a?.(V):t?.(V)},N=()=>{U(f),c()},j=()=>{if(C)b(!1),a?.(!1);else if(E){const V=[];b(V),t?.(V)}else b(void 0),t?.(void 0);c()},L=V=>{if(C&&!T){a?.(!o);return}if(T&&v){m(V);return}if(T&&!v)if(C)a?.(!o);else{const q=e!=null?void 0:i?.value;t?.(E?q!==void 0?[q]:[]:q)}},_=V=>{let q;if(C)q=!0,b(q);else if(E){const W=f||[];q=W.includes(V)?W.filter(u=>u!==V):[...W,V],b(q)}else q=V,b(q);g&&(U(q),!E&&!C&&c())},$=V=>C?o===!0:E?f?.includes(V)||!1:f===V,H=V=>v?`${p?`${p} ${h} `:""}${i.find(q=>q.value===V)?.label||""}`:i?.label,M=()=>{if(C)return A;if(d&&w){const V=e||[],q=Array.isArray(V)?V.length:1;return`${A||p}${E&&q>1?` (${q})`:""}`}if(E&&w){const V=e||[],q=V.length;if(q===1)return H(V[0])||A;if(q>1){const W=H(V[0]),u=q-1;return`${W||String(V[0])}... (+${u})`}}return!E&&!C&&e!==void 0&&e!==null&&v&&H(e)||A};return B(iA,{children:[r(n.Chip,{disabled:s,size:S,label:M(),variant:l,deleteIcon:T&&v?r(Ee,{fontSize:"small",sx:{marginLeft:-.5,marginRight:.5,transform:I?"rotate(180deg)":"rotate(0deg)"}}):void 0,onClick:L,onDelete:T&&v?()=>{}:void 0,color:w?"active":"default"}),T&&v&&B(n.Menu,{anchorEl:R,open:I,onClose:c,slotProps:{paper:{sx:{minWidth:350}}},children:[B(n.Stack,{component:"li",direction:"row",paddingLeft:2,marginBottom:1,children:[r(n.ListItemText,{children:p}),r(n.IconButton,{onClick:c,children:r(FA,{fontSize:"small"})})]}),i.map((V,q)=>{const W=`${V.id||V.value}-${q}`,u=$(V.value);return B(n.MenuItem,{onClick:()=>_(V.value),children:[r(n.ListItemIcon,{children:E||C?r(n.Checkbox,{disableRipple:!0,checked:u,sx:{padding:0}}):r(n.Radio,{disableRipple:!0,checked:u,sx:{padding:0}})}),r(n.ListItemText,{sx:{color:"text.secondary"},children:V.label})]},W)}),!g&&B(n.Stack,{component:"li",direction:"row",justifyContent:"flex-end",spacing:1,marginTop:1,children:[r(n.Button,{size:"small",onClick:j,children:Q("reset")}),r(n.Button,{variant:"contained",size:"small",onClick:N,children:Q("apply")})]})]})]})}const $1=({children:A,permissions:e,disabledPermissions:t})=>{const[o,a]=x.useState(),i=x.useMemo(()=>({disabledPermissions:t,permissions:o,setPermissions:a}),[t,o]);return x.useEffect(()=>{a(e)},[e]),r($e.Provider,{value:i,children:A})},Ao={component:void 0,isOpen:!1,message:"",severity:"success",variant:"standard"},Se=x.createContext({closeSnackbar:()=>{},isOpen:!1,openSnackbar:()=>{}}),eo=({children:A,autoHideDuration:e=5e3,anchorOrigin:t={horizontal:"center",vertical:"bottom"}})=>{const[o,a]=x.useState(Ao),i=x.useCallback(p=>{a({component:p?.component,isOpen:!0,message:p?.message||"",severity:p?.severity||"success",variant:p?.variant||"standard"})},[]),l=x.useCallback((p,d)=>{d!=="clickaway"&&a(g=>({...g,isOpen:!1}))},[]),s=x.useMemo(()=>({closeSnackbar:l,isOpen:o.isOpen,openSnackbar:i}),[l,i,o.isOpen]);return B(Se.Provider,{value:s,children:[r(n.Snackbar,{open:o.isOpen,onClose:l,autoHideDuration:e,anchorOrigin:t,children:o.component?r(o.component,{}):r(n.Alert,{severity:o.severity,variant:o.variant,children:o.message})},o.message),A]})},to=()=>{const A=x.useContext(Se),{isOpen:e,closeSnackbar:t,openSnackbar:o}=A;if(A===void 0)throw new Error("SnackbarProvider must be used within a useSnackBar hook");return{closeSnackbar:t,isOpen:e,openSnackbar:o}},ro=()=>{const[A,e]=x.useState(0);return{handleChange:x.useCallback((o,a)=>{e(a)},[]),value:A}},oo=A=>`linear-gradient(${n.alpha("#fff",+n.getOverlayAlpha(A))}, ${n.alpha("#fff",+n.getOverlayAlpha(A))})`;exports.ActionAppBar=de;exports.AppBar=b1;exports.ArticleImage=l1;exports.AutocompleteFilter=X1;exports.Avatar=be;exports.AvatarAppBar=ht;exports.Backoffice=h1;exports.BottomFixedPaper=H1;exports.Button=le;exports.CardModal=Lr;exports.Chip=y1;exports.ChipFilter=_1;exports.DEFAULT_PERMISSION_CHECK_MODE=KA;exports.DialogCloseIcon=ft;exports.DialogPopper=j1;exports.DialogValidation=Y1;exports.File=M1;exports.FileViewer=qA;exports.HasPermission=vt;exports.Lightbox=me;exports.LinkTab=Tr;exports.ListAvatar=Bt;exports.ListAvatars=Bt;exports.ListItemCard=zr;exports.Logo=ut;exports.NavigationMenu=Hr;exports.NavigationMenuContext=fA;exports.PermissionProvider=$1;exports.QuantityField=Pr;exports.SnackbarContext=Se;exports.SnackbarProvider=eo;exports.StatusIcon=wA;exports.TabPanel=o1;exports.TextArea=Dr;exports.TextFieldAppBar=xt;exports.TextFieldPassword=W1;exports.ThemeProvider=k1;exports.TimeLine=f1;exports.TypographySkeleton=n1;exports.getBackgroundImageElevation=oo;exports.pxToRem=Z;exports.theme=Q1;exports.useMenu=Be;exports.usePermission=At;exports.useSnackbar=to;exports.useTabs=ro;Object.keys(n).forEach(A=>{A!=="default"&&!Object.prototype.hasOwnProperty.call(exports,A)&&Object.defineProperty(exports,A,{enumerable:!0,get:()=>n[A]})});
|
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useTheme as fA, Box as
|
|
1
|
+
import { useTheme as fA, Box as q, Skeleton as cA, Tab as lt, Card as He, GlobalStyles as XA, TextareaAutosize as ct, InputAdornment as FA, IconButton as uA, SvgIcon as pA, TextField as ge, Toolbar as dt, Stack as P, AppBar as Fe, Typography as H, Divider as Ce, Fade as Ge, List as se, ListItem as BA, Chip as kA, useMediaQuery as ZA, SwipeableDrawer as pt, Alert as Ne, alpha as gA, Button as HA, CircularProgress as Lr, Modal as ut, Avatar as vA, Tooltip as ke, Collapse as ir, CardContent as ft, Menu as Mr, MenuItem as Tr, ListItemIcon as Dr, ListItemText as wA, Backdrop as Pr, responsiveFontSizes as We, createTheme as RA, getOverlayAlpha as qe, css as le, CssBaseline as gt, ThemeProvider as Ct, InputLabel as ht, ListItemButton as Ue, Checkbox as ce, ListItemAvatar as xt, Autocomplete as bt, Paper as je, Badge as mt, Slide as Et, Popper as Bt, DialogContent as yt, DialogContentText as It, DialogActions as wt, Dialog as St, Radio as vt, Snackbar as Qt } from "@mui/material";
|
|
2
2
|
export * from "@mui/material";
|
|
3
3
|
import * as EA from "react";
|
|
4
4
|
import Rt, { createContext as he, useContext as yA, useCallback as oA, forwardRef as iA, useState as Y, useEffect as ze, cloneElement as Ye, isValidElement as GA, memo as Or, useMemo as NA, useRef as Le, Children as Vt, useImperativeHandle as Ft } from "react";
|
|
@@ -117,7 +117,7 @@ function Mt() {
|
|
|
117
117
|
return p = p.displayName, p || (p = B.displayName || B.name || "", p = p !== "" ? "ForwardRef(" + p + ")" : "ForwardRef"), p;
|
|
118
118
|
case I:
|
|
119
119
|
return B = p.displayName || null, B !== null ? B : A(p.type) || "Memo";
|
|
120
|
-
case
|
|
120
|
+
case k:
|
|
121
121
|
B = p._payload, p = p._init;
|
|
122
122
|
try {
|
|
123
123
|
return A(p(B));
|
|
@@ -148,7 +148,7 @@ function Mt() {
|
|
|
148
148
|
}
|
|
149
149
|
function n(p) {
|
|
150
150
|
if (p === f) return "<>";
|
|
151
|
-
if (typeof p == "object" && p !== null && p.$$typeof ===
|
|
151
|
+
if (typeof p == "object" && p !== null && p.$$typeof === k)
|
|
152
152
|
return "<...>";
|
|
153
153
|
try {
|
|
154
154
|
var B = A(p);
|
|
@@ -274,7 +274,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
274
274
|
function C(p) {
|
|
275
275
|
typeof p == "object" && p !== null && p.$$typeof === y && p._store && (p._store.validated = 1);
|
|
276
276
|
}
|
|
277
|
-
var b = Rt, y = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), v = Symbol.for("react.consumer"), h = Symbol.for("react.context"), E = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), I = Symbol.for("react.memo"),
|
|
277
|
+
var b = Rt, y = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), v = Symbol.for("react.consumer"), h = Symbol.for("react.context"), E = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), I = Symbol.for("react.memo"), k = Symbol.for("react.lazy"), U = Symbol.for("react.activity"), N = Symbol.for("react.client.reference"), z = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, L = Object.prototype.hasOwnProperty, AA = Array.isArray, rA = console.createTask ? console.createTask : function() {
|
|
278
278
|
return null;
|
|
279
279
|
};
|
|
280
280
|
b = {
|
|
@@ -1060,7 +1060,7 @@ function g1() {
|
|
|
1060
1060
|
}
|
|
1061
1061
|
}
|
|
1062
1062
|
}
|
|
1063
|
-
var l = c, S = d, I = a,
|
|
1063
|
+
var l = c, S = d, I = a, k = s, U = e, N = u, z = n, L = g, AA = y, rA = r, W = i, M = o, Q = C, F = !1;
|
|
1064
1064
|
function j(V) {
|
|
1065
1065
|
return F || (F = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), p(V) || E(V) === c;
|
|
1066
1066
|
}
|
|
@@ -1100,7 +1100,7 @@ function g1() {
|
|
|
1100
1100
|
function Be(V) {
|
|
1101
1101
|
return E(V) === C;
|
|
1102
1102
|
}
|
|
1103
|
-
X.AsyncMode = l, X.ConcurrentMode = S, X.ContextConsumer = I, X.ContextProvider =
|
|
1103
|
+
X.AsyncMode = l, X.ConcurrentMode = S, X.ContextConsumer = I, X.ContextProvider = k, X.Element = U, X.ForwardRef = N, X.Fragment = z, X.Lazy = L, X.Memo = AA, X.Portal = rA, X.Profiler = W, X.StrictMode = M, X.Suspense = Q, X.isAsyncMode = j, X.isConcurrentMode = p, X.isContextConsumer = B, X.isContextProvider = R, X.isElement = T, X.isForwardRef = D, X.isFragment = G, X.isLazy = aA, X.isMemo = mA, X.isPortal = $, X.isProfiler = IA, X.isStrictMode = MA, X.isSuspense = Be, X.isValidElementType = h, X.typeOf = E;
|
|
1104
1104
|
}()), X;
|
|
1105
1105
|
}
|
|
1106
1106
|
var gr;
|
|
@@ -1494,12 +1494,12 @@ const mr = 32, U1 = 24, L1 = 105, M1 = 24, T1 = 195, D1 = 44, P1 = 147, O1 = ()
|
|
|
1494
1494
|
const [C, b] = Y(""), { palette: y } = fA(), { getTextColor: g, getImageModule: f, getSize: x, getShapeColor: w, getShapeBackgroundColor: v } = O1(), { height: h, width: E } = x({ height: n, variant: c, width: o, withoutText: i }), l = g(r), S = w(A), I = v(e);
|
|
1495
1495
|
if (ze(() => {
|
|
1496
1496
|
d !== "svg" && (async () => {
|
|
1497
|
-
const
|
|
1498
|
-
|
|
1497
|
+
const k = await f(c, s || y.mode, i);
|
|
1498
|
+
k?.default && typeof k.default == "string" && b(k.default);
|
|
1499
1499
|
})();
|
|
1500
1500
|
}, [d, f, s, y.mode, c, i]), d === "img")
|
|
1501
1501
|
return C ? /* @__PURE__ */ t(
|
|
1502
|
-
|
|
1502
|
+
q,
|
|
1503
1503
|
{
|
|
1504
1504
|
component: "img",
|
|
1505
1505
|
src: C,
|
|
@@ -1525,16 +1525,16 @@ const mr = 32, U1 = 24, L1 = 105, M1 = 24, T1 = 195, D1 = 44, P1 = 147, O1 = ()
|
|
|
1525
1525
|
}
|
|
1526
1526
|
);
|
|
1527
1527
|
if (i) {
|
|
1528
|
-
const
|
|
1529
|
-
return /* @__PURE__ */ m(
|
|
1530
|
-
/* @__PURE__ */ t("path", { d: "M17 0V15H32C32 6.71026 25.2897 0 17 0Z", fill:
|
|
1531
|
-
/* @__PURE__ */ t("path", { d: "M0 0V15H15C15 6.71026 8.27968 0 0 0Z", fill:
|
|
1532
|
-
/* @__PURE__ */ t("path", { d: "M14.9955 16C14.9955 16 15.0056 16 14.9955 16V32H0C0 23.1576 6.71832 16 14.9955 16Z", fill:
|
|
1533
|
-
/* @__PURE__ */ t("path", { d: "M32 16V32H17C17 23.1576 23.7103 16 32 16Z", fill:
|
|
1528
|
+
const k = A || y.primary.main;
|
|
1529
|
+
return /* @__PURE__ */ m(q, { component: "svg", viewBox: "0 0 32 32", fill: "none", sx: { height: h, width: E, ...a }, children: [
|
|
1530
|
+
/* @__PURE__ */ t("path", { d: "M17 0V15H32C32 6.71026 25.2897 0 17 0Z", fill: k }),
|
|
1531
|
+
/* @__PURE__ */ t("path", { d: "M0 0V15H15C15 6.71026 8.27968 0 0 0Z", fill: k }),
|
|
1532
|
+
/* @__PURE__ */ t("path", { d: "M14.9955 16C14.9955 16 15.0056 16 14.9955 16V32H0C0 23.1576 6.71832 16 14.9955 16Z", fill: k }),
|
|
1533
|
+
/* @__PURE__ */ t("path", { d: "M32 16V32H17C17 23.1576 23.7103 16 32 16Z", fill: k })
|
|
1534
1534
|
] });
|
|
1535
1535
|
}
|
|
1536
1536
|
return c === "pricing" ? /* @__PURE__ */ m(
|
|
1537
|
-
|
|
1537
|
+
q,
|
|
1538
1538
|
{
|
|
1539
1539
|
component: "svg",
|
|
1540
1540
|
viewBox: "0 0 147 44",
|
|
@@ -1635,7 +1635,7 @@ const mr = 32, U1 = 24, L1 = 105, M1 = 24, T1 = 195, D1 = 44, P1 = 147, O1 = ()
|
|
|
1635
1635
|
]
|
|
1636
1636
|
}
|
|
1637
1637
|
) : c === "supplier" ? /* @__PURE__ */ m(
|
|
1638
|
-
|
|
1638
|
+
q,
|
|
1639
1639
|
{
|
|
1640
1640
|
component: "svg",
|
|
1641
1641
|
viewBox: "0 0 195 24",
|
|
@@ -1749,7 +1749,7 @@ const mr = 32, U1 = 24, L1 = 105, M1 = 24, T1 = 195, D1 = 44, P1 = 147, O1 = ()
|
|
|
1749
1749
|
]
|
|
1750
1750
|
}
|
|
1751
1751
|
) : /* @__PURE__ */ m(
|
|
1752
|
-
|
|
1752
|
+
q,
|
|
1753
1753
|
{
|
|
1754
1754
|
component: "svg",
|
|
1755
1755
|
viewBox: "0 0 105 24",
|
|
@@ -1988,7 +1988,7 @@ const mr = 32, U1 = 24, L1 = 105, M1 = 24, T1 = 195, D1 = 44, P1 = 147, O1 = ()
|
|
|
1988
1988
|
a?.(C), d?.();
|
|
1989
1989
|
};
|
|
1990
1990
|
return s ? /* @__PURE__ */ t(H, { component: "div", color: "text.disabled", "aria-disabled": "true", onClick: u, children: r }) : i && A ? /* @__PURE__ */ t(i, { onClick: u, to: A, end: e, state: o, target: c, children: r }) : /* @__PURE__ */ t(
|
|
1991
|
-
|
|
1991
|
+
q,
|
|
1992
1992
|
{
|
|
1993
1993
|
component: "a",
|
|
1994
1994
|
href: A,
|
|
@@ -2075,9 +2075,9 @@ const mr = 32, U1 = 24, L1 = 105, M1 = 24, T1 = 195, D1 = 44, P1 = 147, O1 = ()
|
|
|
2075
2075
|
NavLink: e,
|
|
2076
2076
|
isCollapsed: r,
|
|
2077
2077
|
sx: n
|
|
2078
|
-
}) => /* @__PURE__ */ t(
|
|
2079
|
-
A?.icon && /* @__PURE__ */ t(
|
|
2080
|
-
A?.label && /* @__PURE__ */ t(Ge, { in: !r, children: /* @__PURE__ */ t(
|
|
2078
|
+
}) => /* @__PURE__ */ t(q, { sx: n?.bottomLink, children: /* @__PURE__ */ t(er, { component: e, ...A, children: /* @__PURE__ */ m(P, { alignItems: "center", spacing: 1, direction: "row", children: [
|
|
2079
|
+
A?.icon && /* @__PURE__ */ t(q, { component: "span", sx: n.iconWrapper, children: A.icon }),
|
|
2080
|
+
A?.label && /* @__PURE__ */ t(Ge, { in: !r, children: /* @__PURE__ */ t(q, { component: "span", display: "flex", children: A.label }) })
|
|
2081
2081
|
] }) }) }), Br = ({ children: A, ...e }) => {
|
|
2082
2082
|
const {
|
|
2083
2083
|
hideSearchDesktop: r,
|
|
@@ -2095,7 +2095,7 @@ const mr = 32, U1 = 24, L1 = 105, M1 = 24, T1 = 195, D1 = 44, P1 = 147, O1 = ()
|
|
|
2095
2095
|
Logo: g = e.Logo
|
|
2096
2096
|
} = yA(LA), { palette: f } = fA(), x = f.mode === "dark" ? f.background.default : f.primary.black, w = o && s ? "none" : `solid 1px ${f.divider}`, h = r ? !(!o && !i) : !0;
|
|
2097
2097
|
return /* @__PURE__ */ m(
|
|
2098
|
-
|
|
2098
|
+
q,
|
|
2099
2099
|
{
|
|
2100
2100
|
component: "aside",
|
|
2101
2101
|
sx: {
|
|
@@ -2120,7 +2120,7 @@ const mr = 32, U1 = 24, L1 = 105, M1 = 24, T1 = 195, D1 = 44, P1 = 147, O1 = ()
|
|
|
2120
2120
|
spacing: 3,
|
|
2121
2121
|
children: [
|
|
2122
2122
|
/* @__PURE__ */ t(
|
|
2123
|
-
|
|
2123
|
+
q,
|
|
2124
2124
|
{
|
|
2125
2125
|
sx: {
|
|
2126
2126
|
...SA.logo,
|
|
@@ -2139,14 +2139,14 @@ const mr = 32, U1 = 24, L1 = 105, M1 = 24, T1 = 195, D1 = 44, P1 = 147, O1 = ()
|
|
|
2139
2139
|
]
|
|
2140
2140
|
}
|
|
2141
2141
|
),
|
|
2142
|
-
y && h && /* @__PURE__ */ t(
|
|
2143
|
-
/* @__PURE__ */ t(
|
|
2142
|
+
y && h && /* @__PURE__ */ t(q, { p: 2, children: y }),
|
|
2143
|
+
/* @__PURE__ */ t(q, { flex: 1, children: A }),
|
|
2144
2144
|
u && /* @__PURE__ */ t(P, { sx: SA.bottomLinkWrapper, spacing: 1, whiteSpace: "nowrap", children: Array.isArray(u) ? u.map((E, l) => {
|
|
2145
2145
|
const S = typeof E == "object" && "url" in E ? `$${E.url}-${l}` : l;
|
|
2146
2146
|
return /* @__PURE__ */ t(Er, { link: E, NavLink: C, isCollapsed: a, sx: SA }, S);
|
|
2147
2147
|
}) : /* @__PURE__ */ t(Er, { link: u, NavLink: C, isCollapsed: a, sx: SA }) }),
|
|
2148
2148
|
/* @__PURE__ */ t(Ce, {}),
|
|
2149
|
-
/* @__PURE__ */ t(
|
|
2149
|
+
/* @__PURE__ */ t(q, { display: "flex", justifyContent: "flex-end", children: /* @__PURE__ */ t(
|
|
2150
2150
|
uA,
|
|
2151
2151
|
{
|
|
2152
2152
|
onClick: c,
|
|
@@ -2225,7 +2225,7 @@ const mr = 32, U1 = 24, L1 = 105, M1 = 24, T1 = 195, D1 = 44, P1 = 147, O1 = ()
|
|
|
2225
2225
|
}
|
|
2226
2226
|
}, yr = ({ items: A, ...e }) => {
|
|
2227
2227
|
const { NavLink: r = e.NavLink, isMobile: n, isCollapsed: o } = yA(LA);
|
|
2228
|
-
return /* @__PURE__ */ t(
|
|
2228
|
+
return /* @__PURE__ */ t(q, { px: 2, component: "nav", children: /* @__PURE__ */ t(se, { sx: { ...ve.list }, children: A?.filter((i) => {
|
|
2229
2229
|
const s = !(i && typeof i == "object" && "hideOnMobile" in i && n && i.hideOnMobile), a = !(i && typeof i == "object" && "hasAccess" in i && !i.hasAccess);
|
|
2230
2230
|
return s && a;
|
|
2231
2231
|
}).map((i, s) => {
|
|
@@ -2234,7 +2234,7 @@ const mr = 32, U1 = 24, L1 = 105, M1 = 24, T1 = 195, D1 = 44, P1 = 147, O1 = ()
|
|
|
2234
2234
|
if (i && typeof i == "object" && "label" in i) {
|
|
2235
2235
|
const { count: a, url: c, label: d, icon: u, active: C, disabled: b, target: y } = i, g = `${c}-${d}-${s}`;
|
|
2236
2236
|
return /* @__PURE__ */ t(BA, { disableGutters: !0, sx: { paddingY: 0.5 }, children: /* @__PURE__ */ t(er, { url: c, component: r, active: C, disabled: b, target: y, children: /* @__PURE__ */ m(P, { direction: "row", component: "span", spacing: 1.5, width: "100%", alignItems: "center", children: [
|
|
2237
|
-
u ? /* @__PURE__ */ t(
|
|
2237
|
+
u ? /* @__PURE__ */ t(q, { component: "div", sx: ve.iconWrapper, children: u }) : o && /* @__PURE__ */ t(q, { component: "div", sx: ve.iconWrapper, children: typeof d == "string" ? d.charAt(0) : "" }),
|
|
2238
2238
|
/* @__PURE__ */ t(Ge, { in: !o, children: /* @__PURE__ */ m(P, { direction: "row", justifyContent: "space-between", flex: 1, whiteSpace: "nowrap", children: [
|
|
2239
2239
|
d,
|
|
2240
2240
|
a && /* @__PURE__ */ t(kA, { color: "warning", size: "small", label: a, variant: "rounded" })
|
|
@@ -2348,7 +2348,7 @@ const mr = 32, U1 = 24, L1 = 105, M1 = 24, T1 = 195, D1 = 44, P1 = 147, O1 = ()
|
|
|
2348
2348
|
...o
|
|
2349
2349
|
},
|
|
2350
2350
|
...c,
|
|
2351
|
-
children: /* @__PURE__ */ t(
|
|
2351
|
+
children: /* @__PURE__ */ t(q, { flex: "auto", minWidth: 0, children: A })
|
|
2352
2352
|
}
|
|
2353
2353
|
), Ao = Or(iA(_1)), An = ["warning", "info", "success", "error", "primary", "secondary"], en = (A) => An.includes(A), rn = ({ color: A, sx: e, variant: r = "filled", fontSize: n = "medium" }, o) => {
|
|
2354
2354
|
const { palette: i } = fA(), s = i.mode === "dark" ? i.text.disabled : i.grey[400], a = A || s, c = en(A) ? i?.[A]?.main : a, d = gA(c, 0.2);
|
|
@@ -2374,7 +2374,7 @@ const mr = 32, U1 = 24, L1 = 105, M1 = 24, T1 = 195, D1 = 44, P1 = 147, O1 = ()
|
|
|
2374
2374
|
medium: 16,
|
|
2375
2375
|
small: 15
|
|
2376
2376
|
}, pe = ({ size: A, loadingPosition: e, position: r = "absolute" }) => /* @__PURE__ */ t(
|
|
2377
|
-
|
|
2377
|
+
q,
|
|
2378
2378
|
{
|
|
2379
2379
|
position: r,
|
|
2380
2380
|
top: 0,
|
|
@@ -2406,15 +2406,15 @@ const mr = 32, U1 = 24, L1 = 105, M1 = 24, T1 = 195, D1 = 44, P1 = 147, O1 = ()
|
|
|
2406
2406
|
const a = i || s;
|
|
2407
2407
|
return e && n ? /* @__PURE__ */ m(P, { direction: n === "start" ? "row" : "row-reverse", alignItems: "center", children: [
|
|
2408
2408
|
/* @__PURE__ */ t(pe, { size: o, position: "relative", loadingPosition: n }),
|
|
2409
|
-
/* @__PURE__ */ t(
|
|
2409
|
+
/* @__PURE__ */ t(q, { component: "span", children: A })
|
|
2410
2410
|
] }) : e && !r && !a ? /* @__PURE__ */ m(CA, { children: [
|
|
2411
2411
|
e && !r && /* @__PURE__ */ t(pe, { size: o }),
|
|
2412
|
-
/* @__PURE__ */ t(
|
|
2412
|
+
/* @__PURE__ */ t(q, { component: "span", sx: { opacity: 0 }, children: A })
|
|
2413
2413
|
] }) : e && r ? /* @__PURE__ */ m(CA, { children: [
|
|
2414
2414
|
" ",
|
|
2415
2415
|
r,
|
|
2416
2416
|
" "
|
|
2417
|
-
] }) : /* @__PURE__ */ t(
|
|
2417
|
+
] }) : /* @__PURE__ */ t(q, { component: "span", children: A });
|
|
2418
2418
|
}, on = (A, e) => {
|
|
2419
2419
|
const {
|
|
2420
2420
|
children: r,
|
|
@@ -2460,7 +2460,7 @@ const mr = 32, U1 = 24, L1 = 105, M1 = 24, T1 = 195, D1 = 44, P1 = 147, O1 = ()
|
|
|
2460
2460
|
}, c = (d, u) => (d && (r?.(d, u), s(!1)), (C) => {
|
|
2461
2461
|
r?.(C, u), s(!1);
|
|
2462
2462
|
});
|
|
2463
|
-
return /* @__PURE__ */ t(ut, { open: e, onClose: c, ...o, children: /* @__PURE__ */ m(
|
|
2463
|
+
return /* @__PURE__ */ t(ut, { open: e, onClose: c, ...o, children: /* @__PURE__ */ m(q, { children: [
|
|
2464
2464
|
/* @__PURE__ */ t(
|
|
2465
2465
|
uA,
|
|
2466
2466
|
{
|
|
@@ -2483,9 +2483,9 @@ const mr = 32, U1 = 24, L1 = 105, M1 = 24, T1 = 195, D1 = 44, P1 = 147, O1 = ()
|
|
|
2483
2483
|
children: "×"
|
|
2484
2484
|
}
|
|
2485
2485
|
),
|
|
2486
|
-
!i && !A && /* @__PURE__ */ t(
|
|
2486
|
+
!i && !A && /* @__PURE__ */ t(q, { position: "absolute", width: "100%", height: "100%", display: "flex", alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ t(Lr, {}) }),
|
|
2487
2487
|
/* @__PURE__ */ t(
|
|
2488
|
-
|
|
2488
|
+
q,
|
|
2489
2489
|
{
|
|
2490
2490
|
sx: {
|
|
2491
2491
|
left: "50%",
|
|
@@ -2495,7 +2495,7 @@ const mr = 32, U1 = 24, L1 = 105, M1 = 24, T1 = 195, D1 = 44, P1 = 147, O1 = ()
|
|
|
2495
2495
|
transform: "translate(-50%, -50%)",
|
|
2496
2496
|
width: { lg: "auto", md: "90%", sm: "80%", xs: "100%" }
|
|
2497
2497
|
},
|
|
2498
|
-
children: A || /* @__PURE__ */ t(Ge, { in: e && i, children: /* @__PURE__ */ t(
|
|
2498
|
+
children: A || /* @__PURE__ */ t(Ge, { in: e && i, children: /* @__PURE__ */ t(q, { component: "img", src: n, width: "100%", onLoad: a }) })
|
|
2499
2499
|
}
|
|
2500
2500
|
)
|
|
2501
2501
|
] }) });
|
|
@@ -2515,7 +2515,7 @@ const mr = 32, U1 = 24, L1 = 105, M1 = 24, T1 = 195, D1 = 44, P1 = 147, O1 = ()
|
|
|
2515
2515
|
), sn = ({ children: A, value: e, index: r, orientation: n, paddingY: o, paddingX: i, fullHeight: s, sx: a }, c) => {
|
|
2516
2516
|
const d = o || 3, u = i || n === "vertical" ? 3 : 0;
|
|
2517
2517
|
return e === r ? /* @__PURE__ */ t(
|
|
2518
|
-
|
|
2518
|
+
q,
|
|
2519
2519
|
{
|
|
2520
2520
|
ref: c,
|
|
2521
2521
|
role: "tabpanel",
|
|
@@ -2575,7 +2575,7 @@ const mr = 32, U1 = 24, L1 = 105, M1 = 24, T1 = 195, D1 = 44, P1 = 147, O1 = ()
|
|
|
2575
2575
|
if (A || e) {
|
|
2576
2576
|
const i = r ? eA[r].primary : ue(Je(n.sx) ? n.sx.width : void 0), s = r ? eA[r].primary : ue(Je(n.sx) ? n.sx.height : void 0), a = ln(n?.sx, r), c = a.width / 3, d = a.height / 3;
|
|
2577
2577
|
return /* @__PURE__ */ m(
|
|
2578
|
-
|
|
2578
|
+
q,
|
|
2579
2579
|
{
|
|
2580
2580
|
sx: {
|
|
2581
2581
|
display: "flex",
|
|
@@ -2803,7 +2803,7 @@ const cn = (A, e) => {
|
|
|
2803
2803
|
height: f = 152,
|
|
2804
2804
|
width: x = 220
|
|
2805
2805
|
}) => {
|
|
2806
|
-
const [w, v] = Y(!1), [h, E] = Y(!1), [l, S] = Y(!0), I = A?.toLowerCase(),
|
|
2806
|
+
const [w, v] = Y(!1), [h, E] = Y(!1), [l, S] = Y(!0), I = A?.toLowerCase(), k = !I?.endsWith(".pdf") && !I?.startsWith("blob:") && !I?.endsWith(".eml"), U = I?.endsWith(".pdf"), N = c ? 1 : 0.8, z = d ? !0 : !l, L = Ke(A) || Ke(e), AA = (k || U) && !L && z && !h && !c && A, rA = A?.split(".").pop()?.toLowerCase(), W = r || A?.split("/").pop()?.split("?")[0] || "", M = () => {
|
|
2807
2807
|
if (g) {
|
|
2808
2808
|
const R = {
|
|
2809
2809
|
csv: Qe,
|
|
@@ -2828,7 +2828,7 @@ const cn = (A, e) => {
|
|
|
2828
2828
|
};
|
|
2829
2829
|
return /* @__PURE__ */ m(CA, { children: [
|
|
2830
2830
|
!d && !n && /* @__PURE__ */ t(ke, { arrow: !0, title: L || g ? W : "", children: /* @__PURE__ */ m(
|
|
2831
|
-
|
|
2831
|
+
q,
|
|
2832
2832
|
{
|
|
2833
2833
|
"data-test": "fileViewer",
|
|
2834
2834
|
width: x,
|
|
@@ -2854,12 +2854,12 @@ const cn = (A, e) => {
|
|
|
2854
2854
|
},
|
|
2855
2855
|
children: [
|
|
2856
2856
|
/* @__PURE__ */ t(
|
|
2857
|
-
|
|
2857
|
+
q,
|
|
2858
2858
|
{
|
|
2859
2859
|
overflow: "hidden",
|
|
2860
2860
|
width: "100%",
|
|
2861
|
-
component:
|
|
2862
|
-
height:
|
|
2861
|
+
component: k || g ? "img" : "iframe",
|
|
2862
|
+
height: k || g ? "100%" : "auto",
|
|
2863
2863
|
src: M(),
|
|
2864
2864
|
onError: j,
|
|
2865
2865
|
onLoad: p,
|
|
@@ -2875,8 +2875,8 @@ const cn = (A, e) => {
|
|
|
2875
2875
|
]
|
|
2876
2876
|
}
|
|
2877
2877
|
) }),
|
|
2878
|
-
AA && /* @__PURE__ */ t(et, { open: u !== void 0 && (U ||
|
|
2879
|
-
|
|
2878
|
+
AA && /* @__PURE__ */ t(et, { open: u !== void 0 && (U || k) ? u : w, onClose: F, src: A, title: r, children: /* @__PURE__ */ t(
|
|
2879
|
+
q,
|
|
2880
2880
|
{
|
|
2881
2881
|
component: U ? "iframe" : "img",
|
|
2882
2882
|
src: A || e || void 0,
|
|
@@ -2889,7 +2889,7 @@ const cn = (A, e) => {
|
|
|
2889
2889
|
}
|
|
2890
2890
|
) }),
|
|
2891
2891
|
n && /* @__PURE__ */ t(
|
|
2892
|
-
|
|
2892
|
+
q,
|
|
2893
2893
|
{
|
|
2894
2894
|
onClick: Q,
|
|
2895
2895
|
sx: {
|
|
@@ -2919,9 +2919,9 @@ const cn = (A, e) => {
|
|
|
2919
2919
|
return ze(() => {
|
|
2920
2920
|
c && g(!0);
|
|
2921
2921
|
}, [c]), /* @__PURE__ */ m(P, { direction: "row", alignItems: "stretch", spacing: 0, mt: 0.5, children: [
|
|
2922
|
-
/* @__PURE__ */ t(
|
|
2922
|
+
/* @__PURE__ */ t(q, { mt: 1.5, textAlign: "center", children: /* @__PURE__ */ t(P, { spacing: 1, alignItems: "center", sx: { height: "100%", width: 32 }, children: /* @__PURE__ */ m(CA, { children: [
|
|
2923
2923
|
u || /* @__PURE__ */ t(ae, { color: n ? "secondary" : "primary" }),
|
|
2924
|
-
/* @__PURE__ */ t(
|
|
2924
|
+
/* @__PURE__ */ t(q, { sx: { flex: 1 }, children: !r && /* @__PURE__ */ t(
|
|
2925
2925
|
Ce,
|
|
2926
2926
|
{
|
|
2927
2927
|
sx: {
|
|
@@ -2952,7 +2952,7 @@ const cn = (A, e) => {
|
|
|
2952
2952
|
},
|
|
2953
2953
|
children: [
|
|
2954
2954
|
/* @__PURE__ */ m(P, { spacing: 1, justifyContent: "space-between", direction: "row", children: [
|
|
2955
|
-
/* @__PURE__ */ m(
|
|
2955
|
+
/* @__PURE__ */ m(q, { children: [
|
|
2956
2956
|
/* @__PURE__ */ m(
|
|
2957
2957
|
P,
|
|
2958
2958
|
{
|
|
@@ -2991,7 +2991,7 @@ const cn = (A, e) => {
|
|
|
2991
2991
|
e && /* @__PURE__ */ t(H, { variant: "body2", color: "textSecondary", children: e })
|
|
2992
2992
|
] }),
|
|
2993
2993
|
d && /* @__PURE__ */ t(
|
|
2994
|
-
|
|
2994
|
+
q,
|
|
2995
2995
|
{
|
|
2996
2996
|
className: "action",
|
|
2997
2997
|
sx: {
|
|
@@ -3076,7 +3076,7 @@ const cn = (A, e) => {
|
|
|
3076
3076
|
}
|
|
3077
3077
|
)),
|
|
3078
3078
|
h.length > 1 && /* @__PURE__ */ t(
|
|
3079
|
-
|
|
3079
|
+
q,
|
|
3080
3080
|
{
|
|
3081
3081
|
sx: {
|
|
3082
3082
|
alignItems: "center",
|
|
@@ -3180,7 +3180,7 @@ const cn = (A, e) => {
|
|
|
3180
3180
|
/* @__PURE__ */ m(P, { height: "100%", direction: i ? "column" : "row", minHeight: 0, children: [
|
|
3181
3181
|
s,
|
|
3182
3182
|
/* @__PURE__ */ t(
|
|
3183
|
-
|
|
3183
|
+
q,
|
|
3184
3184
|
{
|
|
3185
3185
|
flex: 1,
|
|
3186
3186
|
sx: {
|
|
@@ -3188,7 +3188,7 @@ const cn = (A, e) => {
|
|
|
3188
3188
|
overflow: "auto"
|
|
3189
3189
|
},
|
|
3190
3190
|
ref: o,
|
|
3191
|
-
children: /* @__PURE__ */ t(
|
|
3191
|
+
children: /* @__PURE__ */ t(q, { component: "main", height: "100%", children: A })
|
|
3192
3192
|
}
|
|
3193
3193
|
)
|
|
3194
3194
|
] })
|
|
@@ -3564,7 +3564,7 @@ const cn = (A, e) => {
|
|
|
3564
3564
|
position: b = "static",
|
|
3565
3565
|
elevation: y = 0
|
|
3566
3566
|
}) => {
|
|
3567
|
-
const { breakpoints: g } = fA(), { closeMenu: f, isMenuOpen: x, anchorMenu: w, openMenu: v } = nt(), { menuItems: h, ...E } = i || {}, l = ZA(g.down("sm")), S = ZA(g.between("sm", "md")), I = l || S,
|
|
3567
|
+
const { breakpoints: g } = fA(), { closeMenu: f, isMenuOpen: x, anchorMenu: w, openMenu: v } = nt(), { menuItems: h, ...E } = i || {}, l = ZA(g.down("sm")), S = ZA(g.between("sm", "md")), I = l || S, k = {
|
|
3568
3568
|
logoContainer: {
|
|
3569
3569
|
a: {
|
|
3570
3570
|
display: "flex"
|
|
@@ -3594,10 +3594,10 @@ const cn = (A, e) => {
|
|
|
3594
3594
|
paddingX: l ? 1 : 3,
|
|
3595
3595
|
...C
|
|
3596
3596
|
};
|
|
3597
|
-
return d ? /* @__PURE__ */ t(Fe, { position: b, elevation: y, sx:
|
|
3598
|
-
/* @__PURE__ */ t(Fe, { position: b, elevation: y, sx:
|
|
3597
|
+
return d ? /* @__PURE__ */ t(Fe, { position: b, elevation: y, sx: k, children: d }) : /* @__PURE__ */ m(CA, { children: [
|
|
3598
|
+
/* @__PURE__ */ t(Fe, { position: b, elevation: y, sx: k, children: /* @__PURE__ */ m(P, { direction: "row", sx: { alignItems: "center", height: "100%", width: "100%" }, spacing: 1, children: [
|
|
3599
3599
|
I && /* @__PURE__ */ t(uA, { onClick: u, edge: "end", color: "inherit", "aria-label": "menu", children: /* @__PURE__ */ t(At, {}) }),
|
|
3600
|
-
I || n === null ? null : /* @__PURE__ */ t(
|
|
3600
|
+
I || n === null ? null : /* @__PURE__ */ t(q, { sx: k.logoContainer, children: n || /* @__PURE__ */ t(K1, { mode: "dark", ...c }) }),
|
|
3601
3601
|
/* @__PURE__ */ m(P, { alignItems: "center", direction: "row", justifyContent: l ? "flex-end" : "center", spacing: 1, flex: 1, children: [
|
|
3602
3602
|
l && (r === null ? null : r || /* @__PURE__ */ t(Rr, { ...a })),
|
|
3603
3603
|
e === null ? null : e || /* @__PURE__ */ t(mn, { ...s })
|
|
@@ -3646,7 +3646,7 @@ const cn = (A, e) => {
|
|
|
3646
3646
|
}
|
|
3647
3647
|
if (U && typeof U == "object" && "url" in U) {
|
|
3648
3648
|
const { url: z, label: L, icon: AA, active: rA, end: W, state: M } = U, Q = `${z}-${L}-${N}`;
|
|
3649
|
-
return /* @__PURE__ */ t(Tr, { sx:
|
|
3649
|
+
return /* @__PURE__ */ t(Tr, { sx: k.menuItem, onClick: f, children: /* @__PURE__ */ m(er, { url: z, component: o, active: rA, end: W, state: M, children: [
|
|
3650
3650
|
AA && /* @__PURE__ */ t(Dr, { children: AA }),
|
|
3651
3651
|
L && /* @__PURE__ */ t(wA, { children: L })
|
|
3652
3652
|
] }, Q) }, Q);
|
|
@@ -4813,7 +4813,7 @@ const cn = (A, e) => {
|
|
|
4813
4813
|
value: x,
|
|
4814
4814
|
variant: w = "vertical"
|
|
4815
4815
|
}, v) => {
|
|
4816
|
-
const [h, E] = Y(null), { t: l } = nr(), { palette: S } = fA(), I = w === "vertical",
|
|
4816
|
+
const [h, E] = Y(null), { t: l } = nr(), { palette: S } = fA(), I = w === "vertical", k = a || e, U = Le(null), N = Le(null), z = x !== void 0 ? x : h, L = Un(z);
|
|
4817
4817
|
Ft(v, () => {
|
|
4818
4818
|
const M = N.current;
|
|
4819
4819
|
return M.reset = () => {
|
|
@@ -4827,7 +4827,7 @@ const cn = (A, e) => {
|
|
|
4827
4827
|
ht,
|
|
4828
4828
|
{
|
|
4829
4829
|
ref: U,
|
|
4830
|
-
htmlFor:
|
|
4830
|
+
htmlFor: k,
|
|
4831
4831
|
onDragOver: (M) => {
|
|
4832
4832
|
M.preventDefault();
|
|
4833
4833
|
},
|
|
@@ -4894,7 +4894,7 @@ const cn = (A, e) => {
|
|
|
4894
4894
|
/* @__PURE__ */ t(
|
|
4895
4895
|
"input",
|
|
4896
4896
|
{
|
|
4897
|
-
id:
|
|
4897
|
+
id: k,
|
|
4898
4898
|
ref: N,
|
|
4899
4899
|
type: "file",
|
|
4900
4900
|
title: f,
|
|
@@ -4981,8 +4981,8 @@ const cn = (A, e) => {
|
|
|
4981
4981
|
children: [
|
|
4982
4982
|
r?.map(
|
|
4983
4983
|
({ id: C, title: b, subtitle: y, image: g, thumbnail: f, secondaryAction: x, chipLabel: w, chipColor: v, onClick: h, icon: E, divider: l, Avatar: S }, I) => {
|
|
4984
|
-
const
|
|
4985
|
-
return l ? /* @__PURE__ */ t(BA, { disableGutters: !0, children: /* @__PURE__ */ t(Ce, { flexItem: !0, sx: { width: "100%" } }) }) : /* @__PURE__ */ m(
|
|
4984
|
+
const k = `key-${I}-${b}-${C}`, U = !!g?.toLowerCase()?.endsWith(".pdf"), N = qr(g), z = qr(f), L = Ke(g), AA = h ? "none" : void 0, rA = a || !!E || !N || L, W = !!h || !!(!h && !a && g), M = d === k, j = (z ? f : "") || (N ? g : "") || "";
|
|
4985
|
+
return l ? /* @__PURE__ */ t(BA, { disableGutters: !0, children: /* @__PURE__ */ t(Ce, { flexItem: !0, sx: { width: "100%" } }) }, k) : /* @__PURE__ */ m(
|
|
4986
4986
|
BA,
|
|
4987
4987
|
{
|
|
4988
4988
|
secondaryAction: x,
|
|
@@ -4996,7 +4996,7 @@ const cn = (A, e) => {
|
|
|
4996
4996
|
...b && { thumbnail: f },
|
|
4997
4997
|
isFile: L,
|
|
4998
4998
|
isPdf: U
|
|
4999
|
-
}), W && !M && !h && u(
|
|
4999
|
+
}), W && !M && !h && u(k);
|
|
5000
5000
|
},
|
|
5001
5001
|
sx: {
|
|
5002
5002
|
...KA.listItem,
|
|
@@ -5018,7 +5018,7 @@ const cn = (A, e) => {
|
|
|
5018
5018
|
cursor: W ? "pointer" : "default"
|
|
5019
5019
|
},
|
|
5020
5020
|
children: [
|
|
5021
|
-
S !== void 0 && /* @__PURE__ */ t(
|
|
5021
|
+
S !== void 0 && /* @__PURE__ */ t(q, { marginRight: JA, children: S }),
|
|
5022
5022
|
!S && U && /* @__PURE__ */ t(
|
|
5023
5023
|
fe,
|
|
5024
5024
|
{
|
|
@@ -5080,7 +5080,7 @@ const cn = (A, e) => {
|
|
|
5080
5080
|
)
|
|
5081
5081
|
]
|
|
5082
5082
|
},
|
|
5083
|
-
|
|
5083
|
+
k
|
|
5084
5084
|
);
|
|
5085
5085
|
}
|
|
5086
5086
|
),
|
|
@@ -5250,7 +5250,7 @@ const cn = (A, e) => {
|
|
|
5250
5250
|
size: l = "small",
|
|
5251
5251
|
disableCloseOnSelect: S = !0,
|
|
5252
5252
|
multiple: I = !0,
|
|
5253
|
-
options:
|
|
5253
|
+
options: k = [],
|
|
5254
5254
|
slotProps: U,
|
|
5255
5255
|
...N
|
|
5256
5256
|
}, z) => {
|
|
@@ -5262,7 +5262,7 @@ const cn = (A, e) => {
|
|
|
5262
5262
|
multiple: I,
|
|
5263
5263
|
disableClearable: g,
|
|
5264
5264
|
value: j,
|
|
5265
|
-
options:
|
|
5265
|
+
options: k,
|
|
5266
5266
|
loading: f,
|
|
5267
5267
|
ref: z,
|
|
5268
5268
|
size: l,
|
|
@@ -5294,7 +5294,7 @@ const cn = (A, e) => {
|
|
|
5294
5294
|
localeText: o,
|
|
5295
5295
|
multiple: I,
|
|
5296
5296
|
onChange: e,
|
|
5297
|
-
options:
|
|
5297
|
+
options: k,
|
|
5298
5298
|
value: a,
|
|
5299
5299
|
variant: A,
|
|
5300
5300
|
...U?.paper
|
|
@@ -5640,7 +5640,7 @@ const cn = (A, e) => {
|
|
|
5640
5640
|
children: [
|
|
5641
5641
|
/* @__PURE__ */ t(an, { onClick: (d) => a?.(d, "closeButton") }),
|
|
5642
5642
|
/* @__PURE__ */ t(
|
|
5643
|
-
|
|
5643
|
+
q,
|
|
5644
5644
|
{
|
|
5645
5645
|
sx: {
|
|
5646
5646
|
alignItems: "center",
|
|
@@ -5705,7 +5705,7 @@ function xo({
|
|
|
5705
5705
|
multiple: b = !1,
|
|
5706
5706
|
size: y = "medium"
|
|
5707
5707
|
}) {
|
|
5708
|
-
const g = n !== void 0, [f, x] = Y(() => g ? n || !1 : b ? e || [] : e), w = g ? n === !0 : b ? e?.length > 0 : e != null, { anchorMenu: v, openMenu: h, isMenuOpen: E, closeMenu: l } = nt(), { t: S } = nr(), I = Array.isArray(i),
|
|
5708
|
+
const g = n !== void 0, [f, x] = Y(() => g ? n || !1 : b ? e || [] : e), w = g ? n === !0 : b ? e?.length > 0 : e != null, { anchorMenu: v, openMenu: h, isMenuOpen: E, closeMenu: l } = nt(), { t: S } = nr(), I = Array.isArray(i), k = i !== void 0, U = (Q) => {
|
|
5709
5709
|
g ? o?.(Q) : r?.(Q);
|
|
5710
5710
|
}, N = () => {
|
|
5711
5711
|
U(f), l();
|
|
@@ -5719,15 +5719,15 @@ function xo({
|
|
|
5719
5719
|
x(void 0), r?.(void 0);
|
|
5720
5720
|
l();
|
|
5721
5721
|
}, L = (Q) => {
|
|
5722
|
-
if (g && !
|
|
5722
|
+
if (g && !k) {
|
|
5723
5723
|
o?.(!n);
|
|
5724
5724
|
return;
|
|
5725
5725
|
}
|
|
5726
|
-
if (
|
|
5726
|
+
if (k && I) {
|
|
5727
5727
|
h(Q);
|
|
5728
5728
|
return;
|
|
5729
5729
|
}
|
|
5730
|
-
if (
|
|
5730
|
+
if (k && !I)
|
|
5731
5731
|
if (g)
|
|
5732
5732
|
o?.(!n);
|
|
5733
5733
|
else {
|
|
@@ -5770,7 +5770,7 @@ function xo({
|
|
|
5770
5770
|
return !b && !g && e !== void 0 && e !== null && I && W(e) || A;
|
|
5771
5771
|
})(),
|
|
5772
5772
|
variant: s,
|
|
5773
|
-
deleteIcon:
|
|
5773
|
+
deleteIcon: k && I ? /* @__PURE__ */ t(
|
|
5774
5774
|
rr,
|
|
5775
5775
|
{
|
|
5776
5776
|
fontSize: "small",
|
|
@@ -5782,12 +5782,12 @@ function xo({
|
|
|
5782
5782
|
}
|
|
5783
5783
|
) : void 0,
|
|
5784
5784
|
onClick: L,
|
|
5785
|
-
onDelete:
|
|
5785
|
+
onDelete: k && I ? () => {
|
|
5786
5786
|
} : void 0,
|
|
5787
5787
|
color: w ? "active" : "default"
|
|
5788
5788
|
}
|
|
5789
5789
|
),
|
|
5790
|
-
|
|
5790
|
+
k && I && /* @__PURE__ */ m(
|
|
5791
5791
|
Mr,
|
|
5792
5792
|
{
|
|
5793
5793
|
anchorEl: v,
|