UNPKG

@progress/kendo-ui

Version:

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

1 lines 3.39 kB
module.exports=function(t){var n={};function o(i){if(n[i])return n[i].exports;var e=n[i]={exports:{},id:i,loaded:!1};return t[i].call(e.exports,e,e.exports,o),e.loaded=!0,e.exports}return o.m=t,o.c=n,o.p="",o(0)}({0:function(i,e,t){i.exports=t(1384)},3:function(i,e){i.exports=function(){throw Error("define cannot be used indirect")}},1135:function(i,e){i.exports=require("./kendo.view")},1384:function(i,e,t){var n;t(3),t=[t(1135)],void 0===(e="function"==typeof(n=function(){var p={id:"pane",name:"Pane",category:"web",description:"Pane",depends:["view"],hidden:true},e=window.kendo.jQuery,d=void 0,r=window.kendo,o=r.roleSelector,t=r.ui,n=t.Widget,u=r.ViewEngine,a=r.View,v=e.extend,s="navigate",f="viewShow",h="sameViewRequested",i=r.support.mobileOS,w=i.ios&&!i.appMode&&i.flatVersion>=700,g="#:back",y=".",l={pane:"k-pane",paneWrapper:"k-pane-wrapper",collapsiblePane:"k-collapsible-pane",vertical:"k-vertical"},c=n.extend({init:function(i,e){var o=this;n.fn.init.call(o,i,e);e=o.options;i=o.element;i.addClass(l.pane);if(o.options.collapsible)i.addClass(l.collapsiblePane);this.history=[];this.historyCallback=function(i,e,t){var n=o.transition;o.transition=null;if(w&&t)n="none";return o.viewEngine.showView(i,n,e)};this._historyNavigate=function(i){if(i===g){if(o.history.length===1)return;o.history.pop();i=o.history[o.history.length-1]}else{if(i instanceof a)i="";o.history.push(i)}o.historyCallback(i,r.parseQueryStringParams(i))};this._historyReplace=function(i){var e=r.parseQueryStringParams(i);o.history[o.history.length-1]=i;o.historyCallback(i,e)};o.viewEngine=new u(v({},{container:i,transition:e.transition,modelScope:e.modelScope,rootNeeded:!e.initial,serverNavigation:e.serverNavigation,remoteViewURLPrefix:e.root||"",layout:e.layout,$angular:e.$angular,showStart:function(){o.closeActiveDialogs()},after:function(){},viewShow:function(i){o.trigger(f,i)},loadStart:function(){},loadComplete:function(){},sameViewRequested:function(){o.trigger(h)},viewTypeDetermined:function(i){if(!i.remote||!o.options.serverNavigation)o.trigger(s,{url:i.url})}},this.options.viewEngine));this._setPortraitWidth();r.onResize(function(){o._setPortraitWidth()})},closeActiveDialogs:function(){var i=this.element.find(o("actionsheet popover modalview")).filter(":visible");i.each(function(){r.widgetInstance(e(this),t).close()})},navigateToInitial:function(){var i=this.options.initial;if(i)this.navigate(i);return i},options:{name:"Pane",portraitWidth:"",transition:"",layout:"",collapsible:false,initial:null,modelScope:window},events:[s,f,h],append:function(i){return this.viewEngine.append(i)},destroy:function(){var i=this;n.fn.destroy.call(i);if(i.viewEngine)i.viewEngine.destroy()},navigate:function(i,e){if(i instanceof a)i=i.id;this.transition=e;this._historyNavigate(i)},replace:function(i,e){if(i instanceof a)i=i.id;this.transition=e;this._historyReplace(i)},view:function(){return this.viewEngine.view()},_setPortraitWidth:function(){var i,e=this.options.portraitWidth;if(e){i=r.mobile.application.element.is(y+l.vertical)?e:"auto";this.element.css("width",i)}}});return c.wrap=function(i,e){if(!i.is(o("view")))i=i.wrap("<div data-"+r.ns+'role="view" data-stretch="true"></div>').parent();var t=i.wrap('<div class="'+l.paneWrapper+' k-widget"><div></div></div>').parent();var n=new c(t,e);n.navigate("");return n},r.Pane=c,window.kendo})?n.apply(e,t):n)||(i.exports=e)}});