Local modifications to ClusterLabs/Anvil by Alteeve
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
12 KiB

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[762],{4845:function(e,n,o){var l=o(85893),r=o(89262),t=o(67294),c=o(25934),i=o(99429),s=o(56903),a=o(25137);let u=(0,r.ZP)(s.Z)({justifyContent:"flex-end",width:"100%"});n.Z=e=>{let{actions:n=[],loading:o}=e,r=(0,t.useMemo)(()=>n.map(e=>(0,l.jsx)(i.Z,{...e,children:e.children},(0,c.Z)())),[n]);return o?(0,l.jsx)(a.Z,{mt:0}):(0,l.jsx)(u,{row:!0,spacing:".5em",children:r})}},77583:function(e,n,o){var l=o(85893),r=o(14440),t=o(67294),c=o(33544),i=o(56903),s=o(87006),a=o(59278);let u=(0,t.forwardRef)((e,n)=>{let{actionCancelText:o="Cancel",actionProceedText:u,children:d,closeOnProceed:p=!1,contentContainerProps:h,dialogProps:f,disableProceed:x,loading:Z,loadingAction:m=!1,onActionAppend:v,onCancelAppend:g,onProceedAppend:b,openInitially:j,preActionArea:C,proceedButtonProps:y,proceedColour:k="blue",scrollContent:P=!1,scrollBoxProps:w,showActionArea:M=!0,showCancel:A,showClose:R,titleText:O,wide:F,content:E=d}=e,D=(0,t.useRef)(null),W=(0,t.useMemo)(()=>(0,s.Z)(E,a.Ac),[E]),I=(0,t.useMemo)(()=>(0,t.createElement)(P?c.VZ:r.Z,w,W),[W,w,P]),N=(0,t.useMemo)(()=>M&&(0,l.jsx)(c.ux,{cancelProps:{children:o,onClick:function(){for(var e=arguments.length,n=Array(e),o=0;o<e;o++)n[o]=arguments[o];null==v||v.call(null,...n),null==g||g.call(null,...n)}},closeOnProceed:p,loading:m,proceedProps:{background:k,children:u,disabled:x,onClick:function(){for(var e=arguments.length,n=Array(e),o=0;o<e;o++)n[o]=arguments[o];null==v||v.call(null,...n),null==b||b.call(null,...n)},...y},showCancel:A}),[o,u,p,x,m,v,g,b,y,k,M,A]);return(0,t.useImperativeHandle)(n,()=>({setOpen:e=>{var n;return null===(n=D.current)||void 0===n?void 0:n.setOpen(e)}}),[]),(0,l.jsx)(c.Js,{dialogProps:f,header:O,loading:Z,openInitially:j,ref:D,showClose:R,wide:F,children:(0,l.jsxs)(i.Z,{...h,children:[I,C,N]})})});u.displayName="ConfirmDialog",n.Z=u},33544:function(e,n,o){o.d(n,{ux:function(){return p},VZ:function(){return b},Js:function(){return C}});var l=o(85893),r=o(92309),t=o(67294),c=o(23930),i=o(25137);let s=(0,t.createContext)(void 0),a=(0,t.forwardRef)((e,n)=>{let{children:o,dialogProps:a={},loading:u,openInitially:d=!1,wide:p}=e,{open:h,PaperProps:f={},...x}=a,{sx:Z,...m}=f,[v,g]=(0,t.useState)(d),b=(0,t.useMemo)(()=>null!=h?h:v,[v,h]),j=(0,t.useMemo)(()=>u?(0,l.jsx)(i.Z,{mt:0}):o,[o,u]),C=(0,t.useMemo)(()=>({minWidth:p?{xs:"calc(100%)",md:"50em"}:null,overflow:"visible",...Z}),[Z,p]);return(0,t.useImperativeHandle)(n,()=>({open:b,setOpen:g}),[b]),(0,l.jsx)(r.Z,{open:b,PaperComponent:c.s_,PaperProps:{...m,sx:C},...x,children:(0,l.jsx)(s.Provider,{value:{open:b,setOpen:g},children:j})})});a.displayName="Dialog";var u=o(4845);let d=function(e){let{handlers:{base:n,origin:o}}=e;for(var l=arguments.length,r=Array(l>1?l-1:0),t=1;t<l;t++)r[t-1]=arguments[t];null==n||n.call(null,...r),null==o||o.call(null,...r)};var p=e=>{let{cancelProps:n,closeOnProceed:o,loading:r=!1,onCancel:c=d,onProceed:i=d,proceedColour:a,proceedProps:p,showCancel:h=!0,cancelChildren:f=null==n?void 0:n.children,proceedChildren:x=null==p?void 0:p.children}=e,Z=(0,t.useContext)(s),m=(0,t.useCallback)(function(){for(var e=arguments.length,o=Array(e),l=0;l<e;l++)o[l]=arguments[l];return c({handlers:{base:()=>{null==Z||Z.setOpen(!1)},origin:null==n?void 0:n.onClick}},...o)},[null==n?void 0:n.onClick,Z,c]),v=(0,t.useCallback)(function(){for(var e=arguments.length,n=Array(e),l=0;l<e;l++)n[l]=arguments[l];return i({handlers:{base:()=>{o&&(null==Z||Z.setOpen(!1))},origin:null==p?void 0:p.onClick}},...n)},[o,Z,i,null==p?void 0:p.onClick]);return(0,t.useMemo)(()=>{let e=[{background:a,...p,children:x,onClick:v}];return h&&e.unshift({...n,children:f,onClick:m}),(0,l.jsx)(u.Z,{actions:e,loading:r})},[f,m,n,r,x,a,v,p,h])},h=o(65895),f=o(87006),x=o(59278),Z=e=>{let{children:n,onClose:o=function(e){let{handlers:{base:n}}=e;for(var o=arguments.length,l=Array(o>1?o-1:0),r=1;r<o;r++)l[r-1]=arguments[r];return null==n?void 0:n.call(null,...l)},showClose:r}=e,i=(0,t.useContext)(s),a=(0,t.useCallback)(function(){for(var e=arguments.length,n=Array(e),l=0;l