1"use strict";(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["app/progress-dialog"],{1884:(e,s,t)=>{t.r(s),t.d(s,{default:()=>d});var r=t(232),n=t(231),o=t(233),a=t.n(o),i=t(85);const l="error",c="running";class u extends n.Component{renderErrors(e,s){if(!Array.isArray(s)||0===s.length)return null;const t=e===l?"danger":"warning";return(0,n.jsx)(r.Alert,{intent:t,children:(0,n.jsx)(r.Media,{image:(0,n.jsx)(r.Status,{intent:t}),children:(0,n.jsx)("ul",{"data-type":"errors",children:s.map((e=>(0,n.jsx)("li",{children:e},e)))})})})}renderStatusText({status:e,progress:s,progressStatus:t}){const o={done:"statusDone",[l]:"statusError",not_started:"statusNotStarted",canceled:"statusCanceled"};return e===c&&t?t:e===c&&-1!==s?(0,n.jsx)(r.Translate,{content:"percentCompleted",params:{percent:s}}):o[e]?(0,n.jsx)(r.Translate,{content:o[e]}):null}render(){const{title:e,steps:s,isOpen:t,errors:o,onComplete:a,onHide:c,...u}=this.props,d=0===Object.keys(s).filter((e=>s[e].status===l)).length;return(0,n.jsx)(r.ProgressDialog,{title:(0,n.jsx)("span",{dangerouslySetInnerHTML:{__html:e}}),actions:c?(0,n.jsx)(r.Button,{"aria-label":i.Locale.getSection("components.tasks.common").lmsg("minimize"),ghost:!0,size:"lg",icon:"minimize",onClick:c}):null,cancelTitle:(0,n.jsx)(r.Translate,{content:"close","data-type":"close-button"}),isOpen:t,onFinish:a,onClose:c,"data-type":"progress-dialog",...u,children:Object.keys(s).map(((e,t)=>{const{title:a,icon:i,status:c,progressStatus:u,errors:p}=s[e],g=Number(s[e].progress);return(0,n.jsx)(r.ProgressStep,{title:a,icon:{src:i},status:c,statusText:this.renderStatusText({status:c,progress:g,progressStatus:u}),progress:g,children:this.renderErrors(c,Array.isArray(p)&&p.length?p:c===l||d&&Object.keys(s).length-1===t?o:[])},e)}))})}}u.propTypes={title:a().node.isRequired,steps:a().object.isRequired,isOpen:a().bool.isRequired,errors:a().array.isRequired,onComplete:a().func.isRequired,onHide:a().func.isRequired};const d=u},1883:(e,s,t)=>{t.r(s),t.d(s,{default:()=>a});var r=t(232),n=t(231),o=t(1884);const a=({locale:e,container:s,...t})=>{(0,n.render)((0,n.jsx)(r.LocaleProvider,{messages:e,children:(0,n.jsx)(o.default,{...t})}),s)}}}]); 2//# sourceMappingURL=progress-dialog.js.map?3410b7812ae4e1eddfe2
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.