UNPKG

@progress/kendo-ui

Version:

This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.

1 lines 2.08 kB
module.exports=function(o){var n={};function t(e){if(n[e])return n[e].exports;var i=n[e]={exports:{},id:e,loaded:!1};return o[e].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}return t.m=o,t.c=n,t.p="",t(0)}({0:function(e,i,o){e.exports=o(1367)},3:function(e,i){e.exports=function(){throw Error("define cannot be used indirect")}},1052:function(e,i){e.exports=require("./kendo.popup")},1367:function(e,i,o){var n;o(3),o=[o(1052)],void 0===(i="function"==typeof(n=function(){var n={id:"mobile.shim",name:"Shim",category:"mobile",description:"Mobile Shim",depends:["popup"],hidden:true},u=window.kendo.jQuery,e=void 0,f=window.kendo,i=f.mobile.ui,h=f.ui.Popup,m='<div class="km-shim"></div>',v="hide",b=i.Widget,o=b.extend({init:function(e,i){var o=this,n=f.mobile.application,t=f.support.mobileOS,r=n?n.os.name:t?t.name:"ios",s=r==="ios"||r==="wp"||(n?n.os.skin:false),p=r==="blackberry",a=i.align||(s?"bottom center":p?"center right":"center center"),l=i.position||(s?"bottom center":p?"center right":"center center"),c=i.effect||(s?"slideIn:up":p?"slideIn:left":"fade:in"),d=u(m).handler(o).hide();b.fn.init.call(o,e,i);o.shim=d;e=o.element;i=o.options;if(i.className)o.shim.addClass(i.className);if(!i.modal)o.shim.on("down","_hide");(n?n.element:u(document.body)).append(d);o.popup=new h(o.element,{anchor:d,modal:true,appendTo:d,origin:a,position:l,animation:{open:{effects:c,duration:i.duration},close:{duration:i.duration}},close:function(e){var i=false;if(!o._apiCall)i=o.trigger(v);if(i)e.preventDefault();o._apiCall=false},deactivate:function(){d.hide()},open:function(){d.show()}});f.notify(o)},events:[v],options:{name:"Shim",modal:false,align:e,position:e,effect:e,duration:200},show:function(){this.popup.open()},hide:function(){this._apiCall=true;this.popup.close()},destroy:function(){b.fn.destroy.call(this);this.shim.kendoDestroy();this.popup.destroy();this.shim.remove()},_hide:function(e){if(!e||!u.contains(this.shim.children().children(".k-popup")[0],e.target))this.popup.close()}});return i.plugin(o),window.kendo})?n.apply(i,o):n)||(e.exports=i)}});