{"version":3,"sources":["kendo.view.js"],"names":["f","define","$","undefined","parseTransition","transition","matches","match","transitionRegExp","type","direction","reverse","kendo","window","attr","ui","attrValue","directiveSelector","Observable","Widget","roleSelector","SCRIPT","INIT","TRANSITION_START","TRANSITION_END","SHOW","HIDE","ATTACH","DETACH","sizzleErrorRegExp","bodyRegExp","LOAD_START","LOAD_COMPLETE","SHOW_START","SAME_VIEW_REQUESTED","VIEW_SHOW","VIEW_TYPE_DETERMINED","AFTER","classNames","content","view","stretchedView","widget","header","footer","View","extend","init","options","that","this","id","guid","fn","call","renderOnInit","_createElement","wrapInSections","_renderSections","tagName","model","_wrap","wrap","_evalTemplate","evalTemplate","_fragments","bind","name","detachOnHide","detachOnDestroy","render","container","notInitialized","element","append","trigger","_eachFragment","clone","ViewClone","triggerBeforeShow","triggerBeforeHide","showStart","css","showEnd","hideEnd","hide","beforeTransition","afterTransition","detach","destroy","unbind","remove","purge","add","wrapper","off","fragments","methodName","placeholder","result","document","getElementById","html","e","test","message","replace","template","contents","contains","replaceWith","wrapAll","parent","_wrapper","_createContent","_createHeader","_createFooter","is","ns","addClass","ccontentElements","contentSelector","children","filter","child","contentElement","Class","noop","Layout","containers","selector","_createContainer","showIn","show","root","find","length","Error","ViewContainer","Fragment","attach","history","running","after","end","previous","locationID","current","previousEntry","back","theTransition","transitionData","effect","stop","pop","push","effects","enabled","fx","setReverse","run","then","ViewEngine","views","sandbox","_hideViews","rootView","first","layouts","viewContainer","params","events","showView","url","RegExp","remoteViewURLPrefix","_findViewElement","widgetInstance","reload","remote","_createView","urlPath","split","$1","innerHTML","wrapInner","_locate","selectors","$angular","indexOf","charAt","_findViewElementById","_createSpaView","_createMobileView","initWidget","defaultTransition","loader","getLayout","getLayoutProxy","modelScope","roles","viewOptions","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,cACH,aACA,eACA,YACDD,IACL,WA2gBE,MA9fC,UAAUE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define) {\n define('kendo.view', [\n 'kendo.core',\n 'kendo.binder',\n 'kendo.fx'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'view',\n name: 'View',\n category: 'framework',\n description: 'The View class instantiates and handles the events of a certain screen from the application.',\n depends: [\n 'core',\n 'binder',\n 'fx'\n ],\n hidden: false\n };\n (function ($, undefined) {\n var kendo = window.kendo, attr = kendo.attr, ui = kendo.ui, attrValue = kendo.attrValue, directiveSelector = kendo.directiveSelector, Observable = kendo.Observable, Widget = kendo.ui.Widget, roleSelector = kendo.roleSelector, SCRIPT = 'SCRIPT', INIT = 'init', TRANSITION_START = 'transitionStart', TRANSITION_END = 'transitionEnd', SHOW = 'show', HIDE = 'hide', ATTACH = 'attach', DETACH = 'detach', sizzleErrorRegExp = /unrecognized expression/;\n var bodyRegExp = /
]*>(([\\u000a\\u000d\\u2028\\u2029]|.)*)<\\/body>/i;\n var LOAD_START = 'loadStart';\n var LOAD_COMPLETE = 'loadComplete';\n var SHOW_START = 'showStart';\n var SAME_VIEW_REQUESTED = 'sameViewRequested';\n var VIEW_SHOW = 'viewShow';\n var VIEW_TYPE_DETERMINED = 'viewTypeDetermined';\n var AFTER = 'after';\n var classNames = {\n content: 'k-content',\n view: 'k-view',\n stretchedView: 'k-stretched-view',\n widget: 'k-widget',\n header: 'k-header',\n footer: 'k-footer'\n };\n var View = kendo.ui.Widget.extend({\n init: function (content, options) {\n var that = this;\n options = options || {};\n that.id = kendo.guid();\n Observable.fn.init.call(that);\n this.options = $.extend({}, this.options, options);\n that.content = content;\n if (that.options.renderOnInit) {\n Widget.fn.init.call(that, that._createElement(), options);\n }\n if (that.options.wrapInSections) {\n that._renderSections();\n }\n that.tagName = options.tagName || 'div';\n that.model = options.model;\n that._wrap = options.wrap !== false;\n this._evalTemplate = options.evalTemplate || false;\n that._fragments = {};\n that.bind([\n INIT,\n SHOW,\n HIDE,\n TRANSITION_START,\n TRANSITION_END\n ], options);\n },\n options: {\n name: 'View',\n renderOnInit: false,\n wrapInSections: false,\n detachOnHide: true,\n detachOnDestroy: true\n },\n render: function (container) {\n var that = this, notInitialized = !that.element;\n if (notInitialized) {\n that.element = that._createElement();\n }\n if (container) {\n $(container).append(that.element);\n }\n if (notInitialized) {\n kendo.bind(that.element, that.model);\n that.trigger(INIT);\n }\n if (container) {\n that._eachFragment(ATTACH);\n that.trigger(SHOW);\n }\n return that.element;\n },\n clone: function () {\n return new ViewClone(this);\n },\n triggerBeforeShow: function () {\n return true;\n },\n triggerBeforeHide: function () {\n return true;\n },\n showStart: function () {\n var that = this;\n var element = that.render();\n if (element) {\n element.css('display', '');\n }\n this.trigger(SHOW_START, { view: this });\n },\n showEnd: function () {\n },\n hideEnd: function () {\n this.hide();\n },\n beforeTransition: function (type) {\n this.trigger(TRANSITION_START, { type: type });\n },\n afterTransition: function (type) {\n this.trigger(TRANSITION_END, { type: type });\n },\n hide: function () {\n if (this.options.detachOnHide) {\n this._eachFragment(DETACH);\n $(this.element).detach();\n }\n this.trigger(HIDE);\n },\n destroy: function () {\n var that = this;\n var element = that.element;\n if (element) {\n Widget.fn.destroy.call(that);\n kendo.unbind(element);\n kendo.destroy(element);\n if (that.options.detachOnDestroy) {\n element.remove();\n }\n }\n },\n purge: function () {\n var that = this;\n that.destroy();\n $(that.element).add(that.content).add(that.wrapper).off().remove();\n },\n fragments: function (fragments) {\n $.extend(this._fragments, fragments);\n },\n _eachFragment: function (methodName) {\n for (var placeholder in this._fragments) {\n this._fragments[placeholder][methodName](this, placeholder);\n }\n },\n _createElement: function () {\n var that = this, wrapper = '<' + that.tagName + '>', element, content;\n try {\n content = $(document.getElementById(that.content) || that.content);\n if (content[0].tagName === SCRIPT) {\n content = content.html();\n }\n } catch (e) {\n if (sizzleErrorRegExp.test(e.message)) {\n content = that.content;\n }\n }\n if (typeof content === 'string') {\n content = content.replace(/^\\s+|\\s+$/g, '');\n if (that._evalTemplate) {\n content = kendo.template(content)(that.model || {});\n }\n element = $(wrapper).append(content);\n if (!that._wrap) {\n element = element.contents();\n }\n } else {\n element = content;\n if (that._evalTemplate) {\n var result = $(kendo.template($('').append(element.clone(true)).html())(that.model || {}));\n if ($.contains(document, element[0])) {\n element.replaceWith(result);\n }\n element = result;\n }\n if (that._wrap) {\n element = element.wrapAll(wrapper).parent();\n }\n }\n return element;\n },\n _renderSections: function () {\n var that = this;\n if (that.options.wrapInSections) {\n that._wrapper();\n that._createContent();\n that._createHeader();\n that._createFooter();\n }\n },\n _wrapper: function () {\n var that = this;\n var content = that.content;\n if (content.is(roleSelector('view'))) {\n that.wrapper = that.content;\n } else {\n that.wrapper = content.wrap('').parent();\n }\n var wrapper = that.wrapper;\n wrapper.attr('id', that.id);\n wrapper.addClass(classNames.view);\n wrapper.addClass(classNames.widget);\n wrapper.attr('role', 'view');\n },\n _createContent: function () {\n var that = this;\n var wrapper = $(that.wrapper);\n var contentSelector = roleSelector('content');\n if (!wrapper.children(contentSelector)[0]) {\n var ccontentElements = wrapper.children().filter(function () {\n var child = $(this);\n if (!child.is(roleSelector('header')) && !child.is(roleSelector('footer'))) {\n return child;\n }\n });\n ccontentElements.wrap('');\n }\n this.contentElement = wrapper.children(roleSelector('content'));\n this.contentElement.addClass(classNames.stretchedView).addClass(classNames.content);\n },\n _createHeader: function () {\n var that = this;\n var wrapper = that.wrapper;\n this.header = wrapper.children(roleSelector('header')).addClass(classNames.header);\n },\n _createFooter: function () {\n var that = this;\n var wrapper = that.wrapper;\n this.footer = wrapper.children(roleSelector('footer')).addClass(classNames.footer);\n }\n });\n var ViewClone = kendo.Class.extend({\n init: function (view) {\n $.extend(this, {\n element: view.element.clone(true),\n transition: view.transition,\n id: view.id\n });\n view.element.parent().append(this.element);\n },\n hideEnd: function () {\n this.element.remove();\n },\n beforeTransition: $.noop,\n afterTransition: $.noop\n });\n var Layout = View.extend({\n init: function (content, options) {\n View.fn.init.call(this, content, options);\n this.containers = {};\n },\n container: function (selector) {\n var container = this.containers[selector];\n if (!container) {\n container = this._createContainer(selector);\n this.containers[selector] = container;\n }\n return container;\n },\n showIn: function (selector, view, transition) {\n this.container(selector).show(view, transition);\n },\n _createContainer: function (selector) {\n var root = this.render(), element = root.find(selector), container;\n if (!element.length && root.is(selector)) {\n if (root.is(selector)) {\n element = root;\n } else {\n throw new Error('can\\'t find a container with the specified ' + selector + ' selector');\n }\n }\n container = new ViewContainer(element);\n container.bind('accepted', function (e) {\n e.view.render(element);\n });\n return container;\n }\n });\n var Fragment = View.extend({\n attach: function (view, placeholder) {\n view.element.find(placeholder).replaceWith(this.render());\n },\n detach: function () {\n }\n });\n var transitionRegExp = /^(\\w+)(:(\\w+))?( (\\w+))?$/;\n function parseTransition(transition) {\n if (!transition) {\n return {};\n }\n var matches = transition.match(transitionRegExp) || [];\n return {\n type: matches[1],\n direction: matches[3],\n reverse: matches[5] === 'reverse'\n };\n }\n var ViewContainer = Observable.extend({\n init: function (container) {\n Observable.fn.init.call(this);\n this.container = container;\n this.history = [];\n this.view = null;\n this.running = false;\n },\n after: function () {\n this.running = false;\n this.trigger('complete', { view: this.view });\n this.trigger('after');\n },\n end: function () {\n this.view.showEnd();\n this.previous.hideEnd();\n this.after();\n },\n show: function (view, transition, locationID) {\n if (!view.triggerBeforeShow() || this.view && !this.view.triggerBeforeHide()) {\n this.trigger('after');\n return false;\n }\n locationID = locationID || view.id;\n var that = this, current = view === that.view ? view.clone() : that.view, history = that.history, previousEntry = history[history.length - 2] || {}, back = previousEntry.id === locationID, theTransition = transition || (back ? history[history.length - 1].transition : view.transition), transitionData = parseTransition(theTransition);\n if (that.running) {\n that.effect.stop();\n }\n if (theTransition === 'none') {\n theTransition = null;\n }\n that.trigger('accepted', { view: view });\n that.view = view;\n that.previous = current;\n that.running = true;\n if (!back) {\n history.push({\n id: locationID,\n transition: theTransition\n });\n } else {\n history.pop();\n }\n if (!current) {\n view.showStart();\n view.showEnd();\n that.after();\n return true;\n }\n if (!theTransition || !kendo.effects.enabled) {\n view.showStart();\n that.end();\n } else {\n view.element.addClass('k-fx-hidden');\n view.showStart();\n if (back && !transition) {\n transitionData.reverse = !transitionData.reverse;\n }\n that.effect = kendo.fx(view.element).replace(current.element, transitionData.type).beforeTransition(function () {\n view.beforeTransition('show');\n current.beforeTransition('hide');\n }).afterTransition(function () {\n view.afterTransition('show');\n current.afterTransition('hide');\n }).direction(transitionData.direction).setReverse(transitionData.reverse);\n that.effect.run().then(function () {\n that.end();\n });\n }\n return true;\n },\n destroy: function () {\n var that = this;\n var view = that.view;\n if (view && view.destroy) {\n view.destroy();\n }\n }\n });\n var ViewEngine = Observable.extend({\n init: function (options) {\n var that = this, views, container;\n Observable.fn.init.call(that);\n that.options = options;\n $.extend(that, options);\n that.sandbox = $('');\n container = that.container;\n views = that._hideViews(container);\n that.rootView = views.first();\n that.layouts = {};\n that.viewContainer = new kendo.ViewContainer(that.container);\n that.viewContainer.bind('accepted', function (e) {\n e.view.params = that.params;\n });\n that.viewContainer.bind('complete', function (e) {\n that.trigger(VIEW_SHOW, { view: e.view });\n });\n that.viewContainer.bind(AFTER, function () {\n that.trigger(AFTER);\n });\n this.bind(this.events, options);\n },\n events: [\n SHOW_START,\n AFTER,\n VIEW_SHOW,\n LOAD_START,\n LOAD_COMPLETE,\n SAME_VIEW_REQUESTED,\n VIEW_TYPE_DETERMINED\n ],\n destroy: function () {\n var that = this;\n var viewContainer = that.viewContainer;\n kendo.destroy(that.container);\n for (var id in that.layouts) {\n this.layouts[id].destroy();\n }\n if (viewContainer) {\n viewContainer.destroy();\n }\n },\n view: function () {\n return this.viewContainer.view;\n },\n showView: function (url, transition, params) {\n url = url.replace(new RegExp('^' + this.remoteViewURLPrefix), '');\n if (url === '' && this.remoteViewURLPrefix) {\n url = '/';\n }\n if (url.replace(/^#/, '') === this.url) {\n this.trigger(SAME_VIEW_REQUESTED);\n return false;\n }\n this.trigger(SHOW_START);\n var that = this, element = that._findViewElement(url), view = kendo.widgetInstance(element);\n that.url = url.replace(/^#/, '');\n that.params = params;\n if (view && view.reload) {\n view.purge();\n element = [];\n }\n this.trigger(VIEW_TYPE_DETERMINED, {\n remote: element.length === 0,\n url: url\n });\n if (element[0]) {\n if (!view) {\n view = that._createView(element);\n }\n return that.viewContainer.show(view, transition, url);\n } else {\n return true;\n }\n },\n append: function (html, url) {\n var sandbox = this.sandbox, urlPath = (url || '').split('?')[0], container = this.container, views, view;\n if (bodyRegExp.test(html)) {\n html = RegExp.$1;\n }\n sandbox[0].innerHTML = html;\n container.append(sandbox.children('script, style'));\n views = this._hideViews(sandbox);\n view = views.first();\n if (!view.length) {\n views = view = sandbox.wrapInner('').children();\n }\n if (urlPath) {\n view.hide().attr(attr('url'), urlPath);\n }\n container.append(views);\n return this._createView(view);\n },\n _locate: function (selectors) {\n return this.$angular ? directiveSelector(selectors) : roleSelector(selectors);\n },\n _findViewElement: function (url) {\n var element, urlPath = url.split('?')[0];\n if (!urlPath) {\n return this.rootView;\n }\n element = this.container.children('[' + attr('url') + '=\\'' + urlPath + '\\']');\n if (!element[0] && urlPath.indexOf('/') === -1) {\n element = this.container.children(urlPath.charAt(0) === '#' ? urlPath : '#' + urlPath);\n }\n if (!element[0]) {\n element = this._findViewElementById(url);\n }\n return element;\n },\n _findViewElementById: function (id) {\n var element = this.container.children('[id=\\'' + id + '\\']');\n return element;\n },\n _createView: function (element) {\n return this._createSpaView(element);\n },\n _createMobileView: function (element) {\n return kendo.initWidget(element, {\n defaultTransition: this.transition,\n loader: this.loader,\n container: this.container,\n getLayout: this.getLayoutProxy,\n modelScope: this.modelScope,\n reload: attrValue(element, 'reload')\n }, ui.roles);\n },\n _createSpaView: function (element) {\n var viewOptions = (this.options || {}).viewOptions || {};\n return new kendo.View(element, {\n renderOnInit: viewOptions.renderOnInit,\n wrap: viewOptions.wrap || false,\n wrapInSections: viewOptions.wrapInSections,\n detachOnHide: viewOptions.detachOnHide,\n detachOnDestroy: viewOptions.detachOnDestroy\n });\n },\n _hideViews: function (container) {\n return container.children(this._locate('view')).hide();\n }\n });\n kendo.ViewEngine = ViewEngine;\n kendo.ViewContainer = ViewContainer;\n kendo.Fragment = Fragment;\n kendo.Layout = Layout;\n kendo.View = View;\n kendo.ViewClone = ViewClone;\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"]}