UNPKG

primevue

Version:

PrimeVue is an open source UI library for Vue featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBloc

2 lines (1 loc) 2.18 kB
this.primevue=this.primevue||{},this.primevue.blockui=function(e,t,i,o){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s={name:"BlockUI",extends:{name:"BaseBlockUI",extends:n(t).default,props:{blocked:{type:Boolean,default:!1},fullScreen:{type:Boolean,default:!1},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0}},style:n(i).default,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["block","unblock"],mask:null,data:function(){return{isBlocked:!1}},watch:{blocked:function(e){!0===e?this.block():this.unblock()}},mounted:function(){this.blocked&&this.block()},methods:{block:function(){var t="p-blockui p-component-overlay p-component-overlay-enter";this.fullScreen?(t+=" p-blockui-document",this.mask=e.DomHandler.createElement("div",{style:{position:"fixed",top:"0",left:"0",width:"100%",height:"100%"},class:!this.isUnstyled&&t,"p-bind":this.ptm("mask")}),document.body.appendChild(this.mask),e.DomHandler.blockBodyScroll(),document.activeElement.blur()):(this.mask=e.DomHandler.createElement("div",{style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},class:!this.isUnstyled&&t,"p-bind":this.ptm("mask")}),this.$refs.container.appendChild(this.mask)),this.autoZIndex&&e.ZIndexUtils.set("modal",this.mask,this.baseZIndex+this.$primevue.config.zIndex.modal),this.isBlocked=!0,this.$emit("block")},unblock:function(){var t=this;!this.isUnstyled&&e.DomHandler.addClass(this.mask,"p-component-overlay-leave"),e.DomHandler.hasCSSAnimation(this.mask)>0?this.mask.addEventListener("animationend",(function(){t.removeMask()})):this.removeMask()},removeMask:function(){e.ZIndexUtils.clear(this.mask),this.fullScreen?(document.body.removeChild(this.mask),e.DomHandler.unblockBodyScroll()):this.$refs.container.removeChild(this.mask),this.isBlocked=!1,this.$emit("unblock")}}},l=["aria-busy"];return s.render=function(e,t,i,n,s,a){return o.openBlock(),o.createElementBlock("div",o.mergeProps({ref:"container",class:e.cx("root"),"aria-busy":s.isBlocked},e.ptmi("root")),[o.renderSlot(e.$slots,"default")],16,l)},s}(primevue.utils,primevue.basecomponent,primevue.blockui.style,Vue);