@syncfusion/ej2-vue-popups
Version:
A package of Essential JS 2 popup components such as Dialog and Tooltip that is used to display information or messages in separate pop-ups. for Vue
12 lines (11 loc) • 8.05 kB
JavaScript
/*!
* filename: ej2-vue-popups.umd.min.js
* version : 31.1.20
* Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
* Use of this code is subject to the terms of our license.
* A copy of the current license can be obtained at any time by e-mailing
* licensing@syncfusion.com. Any infringement will be prosecuted under
* applicable laws.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-popups"),require("@syncfusion/ej2-vue-base"),require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-popups","@syncfusion/ej2-vue-base","@syncfusion/ej2-base"],t):t((e=e||self).ej={},e.ej2Popups,e.ej2VueBase,e.ej2Base)}(this,function(t,s,o,a){"use strict";var n=o.vueDefineComponent({inject:{custom:{default:null}},render:function(e){var t;if(!o.isExecute)return t=null,(o.isExecute?e:o.gh)("div",{class:"e-directive"},t=a.isNullOrUndefined(this.$slots.default)?t:o.isExecute?this.$slots.default:this.$slots.default())},updated:function(){!o.isExecute&&this.custom&&this.custom()},methods:{getTag:function(){return"e-buttons"}}}),i={name:"e-buttons",install:function(e){e.component(i.name,n)}},r=o.vueDefineComponent({render:function(){},methods:{getTag:function(){return"e-dialogbutton"}}}),l={name:"e-dialogbutton",install:function(e){e.component(l.name,r)}},e=["isLazyUpdate","plugins","allowDragging","animationSettings","buttons","closeOnEscape","content","cssClass","enableHtmlSanitizer","enablePersistence","enableResize","enableRtl","footerTemplate","header","height","isModal","locale","minHeight","position","resizeHandles","showCloseIcon","target","visible","width","zIndex","beforeClose","beforeOpen","beforeSanitizeHtml","close","created","destroyed","drag","dragStart","dragStop","open","overlayClick","resizeStart","resizeStop","resizing"],c=["visible"],u=o.getProps({props:e}),h=u[0],u=u[1],d=Object.keys(u);d.push("modelchanged","update:modelValue");for(var p=0,m=c;p<m.length;p++)d.push("update:"+m[p]);var f=o.vueDefineComponent({name:"DialogComponent",mixins:[o.ComponentBase],props:h,watch:u,emits:d,model:{event:"modelchanged"},provide:function(){return{custom:this.custom}},data:function(){return{ej2Instances:new s.Dialog({}),propKeys:e,models:c,hasChildDirective:!0,hasInjectedModules:!1,tagMapper:{"e-buttons":"e-dialogbutton"},tagNameMapper:{},isVue3:!o.isExecute,templateCollection:{}}},created:function(){this.ej2Instances._trigger=this.ej2Instances.trigger,this.ej2Instances.trigger=this.trigger,this.bindProperties(),this.ej2Instances._setProperties=this.ej2Instances.setProperties,this.ej2Instances.setProperties=this.setProperties,this.ej2Instances.clearTemplate=this.clearTemplate,this.updated=this.updated},render:function(e){var t=null;return(o.isExecute?e:o.gh)("div",t=a.isNullOrUndefined(this.$slots.default)?t:o.isExecute?this.$slots.default:this.$slots.default())},methods:{clearTemplate:function(e){if((e=e||Object.keys(this.templateCollection||{})).length&&this.templateCollection)for(var t=0,s=e;t<s.length;t++){var n=s[t],i=this.templateCollection[n];if(i&&i.length){for(var o=0,a=i;o<a.length;o++){var r=a[o];this.destroyPortals(r)}delete this.templateCollection[n]}}},setProperties:function(s,e){var n=this;this.isVue3&&(this.models=this.models||this.ej2Instances.referModels),this.ej2Instances&&this.ej2Instances._setProperties&&this.ej2Instances._setProperties(s,e),s&&this.models&&this.models.length&&Object.keys(s).map(function(t){n.models.map(function(e){t!==e||/datasource/i.test(t)||(n.isVue3?n.ej2Instances.vueInstance.$emit("update:"+t,s[t]):(n.$emit("update:"+t,s[t]),n.$emit("modelchanged",s[t])))})})},trigger:function(e,t,s){var n,i;o.isExecute||(this.models=this.models||this.ej2Instances.referModels),"change"!==e&&"input"!==e||!this.models||0===this.models.length?"actionBegin"===e&&"dateNavigate"===t.requestType&&this.models&&0!==this.models.length&&(i=(n=this.models.toString().match(/currentView|selectedDate/)||[])[0],t)&&n&&!a.isUndefined(t[i])&&(o.isExecute?(this.$emit("update:"+i,t[i]),this):(this.ej2Instances.vueInstance.$emit("update:"+i,t[i]),this.ej2Instances.vueInstance)).$emit("modelchanged",t[i]):(i=(n=this.models.toString().match(/checked|value/)||[])[0],t&&n&&!a.isUndefined(t[i])&&(o.isExecute?("change"===e||this.$props&&!this.$props.isLazyUpdate)&&(this.$emit("update:"+i,t[i]),this.$emit("modelchanged",t[i])):(this.ej2Instances.vueInstance.$emit("update:"+i,t[i]),this.ej2Instances.vueInstance.$emit("modelchanged",t[i]),this.ej2Instances.vueInstance.$emit("update:modelValue",t[i])))),this.ej2Instances&&this.ej2Instances._trigger&&this.ej2Instances._trigger(e,t,s)},custom:function(){this.updated()},destroy:function(){return this.ej2Instances.destroy()},getButtons:function(e){return this.ej2Instances.getButtons(e)},getDimension:function(){return this.ej2Instances.getDimension()},hide:function(e){return this.ej2Instances.hide(e)},refreshPosition:function(){return this.ej2Instances.refreshPosition()},sanitizeHelper:function(e){return this.ej2Instances.sanitizeHelper(e)},show:function(e){return this.ej2Instances.show(e)}}}),g={name:"ejs-dialog",install:function(e){e.component(g.name,f),e.component(l.name,r),e.component(i.name,n)}},j=["isLazyUpdate","plugins","animation","closeDelay","container","content","cssClass","enableHtmlParse","enableHtmlSanitizer","enablePersistence","enableRtl","height","htmlAttributes","isSticky","locale","mouseTrail","offsetX","offsetY","openDelay","opensOn","position","showTipPointer","target","tipPointerPosition","width","windowCollision","afterClose","afterOpen","beforeClose","beforeCollision","beforeOpen","beforeRender","created","destroyed"],I=[],h=o.getProps({props:j}),u=h[0],h=h[1],v=Object.keys(h);v.push("modelchanged","update:modelValue");for(var b=0,y=I;b<y.length;b++)v.push("update:"+y[b]);var P=o.vueDefineComponent({name:"TooltipComponent",mixins:[o.ComponentBase],props:u,watch:h,emits:v,provide:function(){return{custom:this.custom}},data:function(){return{ej2Instances:new s.Tooltip({}),propKeys:j,models:I,hasChildDirective:!1,hasInjectedModules:!1,tagMapper:{},tagNameMapper:{},isVue3:!o.isExecute,templateCollection:{}}},created:function(){this.bindProperties(),this.ej2Instances._setProperties=this.ej2Instances.setProperties,this.ej2Instances.setProperties=this.setProperties,this.ej2Instances.clearTemplate=this.clearTemplate,this.updated=this.updated},render:function(e){var t=null;return(o.isExecute?e:o.gh)("div",t=a.isNullOrUndefined(this.$slots.default)?t:o.isExecute?this.$slots.default:this.$slots.default())},methods:{clearTemplate:function(e){if((e=e||Object.keys(this.templateCollection||{})).length&&this.templateCollection)for(var t=0,s=e;t<s.length;t++){var n=s[t],i=this.templateCollection[n];if(i&&i.length){for(var o=0,a=i;o<a.length;o++){var r=a[o];this.destroyPortals(r)}delete this.templateCollection[n]}}},setProperties:function(s,e){var n=this;this.isVue3&&(this.models=this.models||this.ej2Instances.referModels),this.ej2Instances&&this.ej2Instances._setProperties&&this.ej2Instances._setProperties(s,e),s&&this.models&&this.models.length&&Object.keys(s).map(function(t){n.models.map(function(e){t!==e||/datasource/i.test(t)||(n.isVue3?n.ej2Instances.vueInstance.$emit("update:"+t,s[t]):(n.$emit("update:"+t,s[t]),n.$emit("modelchanged",s[t])))})})},custom:function(){this.updated()},close:function(e){return this.ej2Instances.close(e)},destroy:function(){return this.ej2Instances.destroy()},open:function(e,t){return this.ej2Instances.open(e,t)},refresh:function(e){return this.ej2Instances.refresh(e)}}}),C={name:"ejs-tooltip",install:function(e){e.component(C.name,P)}};Object.keys(s).forEach(function(e){"default"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}),t.ButtonsDirective=n,t.ButtonsPlugin=i,t.DialogButtonDirective=r,t.DialogButtonPlugin=l,t.DialogComponent=f,t.DialogPlugin=g,t.TooltipComponent=P,t.TooltipPlugin=C,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-vue-popups.umd.min.js.map