jodit-pro
Version:
PRO Version of Jodit Editor
2 lines (1 loc) • 1.12 kB
JavaScript
var u=Object.defineProperty;var c=(o,e)=>u(o,"name",{value:e,configurable:!0});var r,f=function(o,e,s,i){var h=arguments.length,t=h<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,s):i,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(o,e,s,i);else for(var p=o.length-1;p>=0;p--)(n=o[p])&&(t=(h<3?n(t):h>3?n(e,s,t):n(e,s))||t);return h>3&&t&&Object.defineProperty(e,s,t),t};import{component as a,watch as d}from"jodit/esm/core/decorators/index.js";import{ProgressBar as g}from"jodit/esm/core/ui/progress-bar/progress-bar.js";let l=(r=class extends g{className(){return"UIProgress"}constructor(e,s){super(e),this.state=s,this.onProgress()}onProgress(){this.state.progress?this.show():this.hide(),this.progress(this.state.progress)}hide(){return this.setMod("hidden",!0),this}progress(e){return this.container.style.width=e.toFixed(2)+"%",e>=98&&this.j.async.setTimeout(()=>{this.hide()},{label:"progress",timeout:300}),this}show(){return this.setMod("hidden",!1),this}},c(r,"UIProgress"),r);f([d("state.progress")],l.prototype,"onProgress",null),l=f([a],l);export{l as UIProgress};