{"version":3,"sources":["kendo.treeview.js"],"names":["f","define","$","undefined","contentChild","filter","node","result","children","length","templateNoWith","code","kendo","template","useWithBlock","checkboxes","find","insertAction","indexOffset","nodeData","referenceNode","closest","NODE","parentNode","group","parent","is","this","_dataSourceMove","dataSource","model","_insert","data","index","moveContents","container","tmp","nodeName","toLowerCase","nextSibling","nodeType","nodeValue","trim","spriteRe","test","className","insertBefore","firstChild","appendChild","updateNodeHtml","wrapper","toggleButton","checkbox","innerWrapper","hasClass","prependTo","remove","appendTo","append","eq","addClass","TreeView","subGroup","nodeContents","nodeIcon","window","ui","extend","isArray","Widget","HierarchicalDataSource","proxy","keys","NS","SELECT","CHECK","NAVIGATE","EXPAND","CHANGE","ERROR","CHECKED","INDETERMINATE","COLLAPSE","DRAGSTART","DRAG","DROP","DRAGEND","DATABOUND","CLICK","UNDEFINED","KSTATEHOVER","KTREEVIEW","VISIBLE","STRING","ARIASELECTED","ARIADISABLED","bindings","text","url","spriteCssClass","imageUrl","isDomElement","o","HTMLElement","DataBoundWidget","init","element","options","list","that","inferred","hasDataSource","loadOnDemand","prototype","call","_animation","_accessors","_templates","root","_wrapper","_group","_tabindex","attr","_dataSource","_attachEvents","_dragging","_syncHtmlAndDataSource","autoBind","_progress","fetch","checkChildren","updateIndeterminate","id","_ariaId","format","notify","clickableItems","MOUSEENTER","on","e","preventDefault","removeClass","_click","_toggleButtonClick","_keydown","_focus","_blur","_mousedown","_checkboxChange","_checkboxClick","_retryRequest","target","focus","prop","i","item","dataItem","uid","itemCheckbox","view","uidAttr","expandedAttr","checkboxesEnabled","items","expanded","checked","next","animationOptions","animation","expand","effects","collapse","hide","reverse","widget","enabled","dragAndDrop","dragging","HierarchicalDragAndDrop","reorderable","$angular","autoScroll","allowedContainers","itemSelector","hintText","_hintText","contains","source","destination","dropHintContainer","itemFromTarget","content","first","last","dropPositionFrom","dropHint","prevAll","dragstart","trigger","sourceNode","drag","originalEvent","dropTarget","pageY","pageX","statusClass","status","setStatusClass","setStatus","drop","destinationNode","valid","setValid","state","dropPosition","position","dragend","triggerDragEnd","insertAfter","destroy","templates","dragClue","treeview","fieldAccessor","_fieldAccessor","_checkboxes","wrapperCssClass","firstLevel","cssClass","groupLength","textClass","isLink","selected","toggleButtonClass","groupAttributes","attributes","groupCssClass","itemContent","itemElement","loading","retry","setDataSource","one","_bindDataSource","_refreshHandler","refresh","_errorHandler","_error","bind","_unbindDataSource","unbind","silentRead","recursiveRead","_initChildren","fields","field","create","events","name","duration","messages","requestFailed","dataTextField","textField","fieldName","fieldBindings","count","map","x","expr","join","setOptions","fn","_trigger","eventName","_setChecked","datasource","value","isFunction","nodes","_setIndeterminate","siblings","all","indeterminate","subnodes","_bubbleIndeterminate","set","isChecked","currentTarget","toggle","_clickTarget","current","_focusable","select","clickTarget","support","touch","_nextVisible","scrollContainer","containers","offsets","documentElement","document","scrollHeight","clientHeight","push","scrollTop","_enabled","skipSelf","wrapperRe","itemRe","nextParent","_expanded","_previousVisible","lastChild","prev","key","keyCode","focused","rtl","isRtl","RIGHT","LEFT","DOWN","UP","HOME","END","ENTER","SPACEBAR","shouldNavigate","contents","href","indexOf","wrapperClasses","wrap","groupElement","css","_nodes","groupData","each","_updateNodeClasses","defaultTemplate","textWrap","_processNodes","callback","getByUid","_insertNode","insertCallback","collapsed","childrenData","updatedGroupLength","nodeHtml","_renderItem","angular","elements","get","_renderGroup","hasChildren","_updateNodes","setCheckedState","nodeWrapper","isCollapsed","context","render","findByUid","toggleClass","end","html","_toggle","removeAttr","ns","_appendItems","_refreshChildren","child","empty","_refreshRoot","groupHtml","_angularItems","bubble","action","level","_remove","load","retryHtml","loaded","enable","arguments","_current","direction","height","kendoStop","kendoAnimate","reset","complete","off","showProgress","loadingText","Math","min","_objectOrSelf","referenceDataItem","destTreeview","destDataSource","loadPromise","Deferred","resolve","promise","_toObservableData","jQuery","ObservableArray","toJSON","splice","apply","concat","success","loadModel","add","max","inserted","done","noop","keepData","prevSibling","detach","findByText","getAttribute","expandPath","path","proceed","nodeIds","shift","then","slice","_parentIds","parents","unshift","expandTo","Node","r","renderItems","len","plugin","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,kBACH,aACA,8BACDD,IACL,WAs8CE,MAx7CC,UAAUE,EAAGC,GASV,QAASC,GAAaC,GAClB,MAAO,UAAUC,GACb,GAAIC,GAASD,EAAKE,SAAS,yBAI3B,OAHKD,GAAOE,SACRF,EAASD,GAENC,EAAOC,SAASH,IAG/B,QAASK,GAAeC,GACpB,MAAOC,GAAMC,SAASF,GAAQG,cAAc,IAOhD,QAASC,GAAWT,GAChB,MAAOA,GAAKU,KAAK,6CAErB,QAASC,GAAaC,GAClB,MAAO,UAAUC,EAAUC,GACvBA,EAAgBA,EAAcC,QAAQC,EACtC,IAAoCC,GAAhCC,EAAQJ,EAAcK,QAI1B,OAHID,GAAMC,SAASC,GAAG,QAClBH,EAAaC,EAAMC,UAEhBE,KAAKC,gBAAgBT,EAAUK,EAAOD,EAAY,SAAUM,EAAYC,GAC3E,MAAOH,MAAKI,QAAQF,EAAWG,OAAQF,EAAOV,EAAca,QAAUf,MAKlF,QAASgB,GAAa5B,EAAM6B,GAExB,IADA,GAAIC,GACG9B,GAAuC,MAA/BA,EAAK+B,SAASC,eACzBF,EAAM9B,EACNA,EAAOA,EAAKiC,YACQ,GAAhBH,EAAII,WACJJ,EAAIK,UAAYvC,EAAEwC,KAAKN,EAAIK,YAE3BE,EAASC,KAAKR,EAAIS,WAClBV,EAAUW,aAAaV,EAAKD,EAAUY,YAEtCZ,EAAUa,YAAYZ,GAIlC,QAASa,GAAe3C,GACpB,GAAI4C,GAAU5C,EAAKE,SAAS,OAAQgB,EAAQlB,EAAKE,SAAS,MAAO2C,EAAeD,EAAQ1C,SAAS,WAAY4C,EAAW9C,EAAKE,SAAS,aAAc6C,EAAeH,EAAQ1C,SAAS,QAChLF,GAAKgD,SAAS,gBAGbJ,EAAQzC,SACTyC,E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treeview.draganddrop'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'treeview',\n name: 'TreeView',\n category: 'web',\n description: 'The TreeView widget displays hierarchical data in a traditional tree structure,with support for interactive drag-and-drop operations.',\n depends: ['data'],\n features: [{\n id: 'treeview-dragging',\n name: 'Drag & Drop',\n description: 'Support for drag & drop',\n depends: ['treeview.draganddrop']\n }]\n };\n (function ($, undefined) {\n var kendo = window.kendo, ui = kendo.ui, data = kendo.data, extend = $.extend, template = kendo.template, isArray = $.isArray, Widget = ui.Widget, HierarchicalDataSource = data.HierarchicalDataSource, proxy = $.proxy, keys = kendo.keys, NS = '.kendoTreeView', SELECT = 'select', CHECK = 'check', NAVIGATE = 'navigate', EXPAND = 'expand', CHANGE = 'change', ERROR = 'error', CHECKED = 'checked', INDETERMINATE = 'indeterminate', COLLAPSE = 'collapse', DRAGSTART = 'dragstart', DRAG = 'drag', DROP = 'drop', DRAGEND = 'dragend', DATABOUND = 'dataBound', CLICK = 'click', UNDEFINED = 'undefined', KSTATEHOVER = 'k-state-hover', KTREEVIEW = 'k-treeview', VISIBLE = ':visible', NODE = '.k-item', STRING = 'string', ARIASELECTED = 'aria-selected', ARIADISABLED = 'aria-disabled', TreeView, subGroup, nodeContents, nodeIcon, spriteRe, bindings = {\n text: 'dataTextField',\n url: 'dataUrlField',\n spriteCssClass: 'dataSpriteCssClassField',\n imageUrl: 'dataImageUrlField'\n }, isDomElement = function (o) {\n return typeof HTMLElement === 'object' ? o instanceof HTMLElement : o && typeof o === 'object' && o.nodeType === 1 && typeof o.nodeName === STRING;\n };\n function contentChild(filter) {\n return function (node) {\n var result = node.children('.k-animation-container');\n if (!result.length) {\n result = node;\n }\n return result.children(filter);\n };\n }\n function templateNoWith(code) {\n return kendo.template(code, { useWithBlock: false });\n }\n subGroup = contentChild('.k-group');\n nodeContents = contentChild('.k-group,.k-content');\n nodeIcon = function (node) {\n return node.children('div').children('.k-icon');\n };\n function checkboxes(node) {\n return node.find('> div .k-checkbox-wrapper [type=checkbox]');\n }\n function insertAction(indexOffset) {\n return function (nodeData, referenceNode) {\n referenceNode = referenceNode.closest(NODE);\n var group = referenceNode.parent(), parentNode;\n if (group.parent().is('li')) {\n parentNode = group.parent();\n }\n return this._dataSourceMove(nodeData, group, parentNode, function (dataSource, model) {\n return this._insert(dataSource.data(), model, referenceNode.index() + indexOffset);\n });\n };\n }\n spriteRe = /k-sprite/;\n function moveContents(node, container) {\n var tmp;\n while (node && node.nodeName.toLowerCase() != 'ul') {\n tmp = node;\n node = node.nextSibling;\n if (tmp.nodeType == 3) {\n tmp.nodeValue = $.trim(tmp.nodeValue);\n }\n if (spriteRe.test(tmp.className)) {\n container.insertBefore(tmp, container.firstChild);\n } else {\n container.appendChild(tmp);\n }\n }\n }\n function updateNodeHtml(node) {\n var wrapper = node.children('div'), group = node.children('ul'), toggleButton = wrapper.children('.k-icon'), checkbox = node.children(':checkbox'), innerWrapper = wrapper.children('.k-in');\n if (node.hasClass('k-treeview')) {\n return;\n }\n if (!wrapper.length) {\n wrapper = $('
').prependTo(node);\n }\n if (!toggleButton.length && group.length) {\n toggleButton = $('').prependTo(wrapper);\n } else if (!group.length || !group.children().length) {\n toggleButton.remove();\n group.remove();\n }\n if (checkbox.length) {\n $('').appendTo(wrapper).append(checkbox);\n }\n if (!innerWrapper.length) {\n innerWrapper = node.children('a').eq(0).addClass('k-in k-link');\n if (!innerWrapper.length) {\n innerWrapper = $('');\n }\n innerWrapper.appendTo(wrapper);\n if (wrapper.length) {\n moveContents(wrapper[0].nextSibling, innerWrapper[0]);\n }\n }\n }\n TreeView = kendo.ui.DataBoundWidget.extend({\n init: function (element, options) {\n var that = this, inferred = false, hasDataSource = options && !!options.dataSource, list;\n if (isArray(options)) {\n options = { dataSource: options };\n }\n if (options && typeof options.loadOnDemand == UNDEFINED && isArray(options.dataSource)) {\n options.loadOnDemand = false;\n }\n Widget.prototype.init.call(that, element, options);\n element = that.element;\n options = that.options;\n list = element.is('ul') && element || element.hasClass(KTREEVIEW) && element.children('ul');\n inferred = !hasDataSource && list.length;\n if (inferred) {\n options.dataSource.list = list;\n }\n that._animation();\n that._accessors();\n that._templates();\n if (!element.hasClass(KTREEVIEW)) {\n that._wrapper();\n if (list) {\n that.root = element;\n that._group(that.wrapper);\n }\n } else {\n that.wrapper = element;\n that.root = element.children('ul').eq(0);\n }\n that._tabindex();\n that.root.attr('role', 'tree');\n that._dataSource(inferred);\n that._attachEvents();\n that._dragging();\n if (!inferred) {\n if (options.autoBind) {\n that._progress(true);\n that.dataSource.fetch();\n }\n } else {\n that._syncHtmlAndDataSource();\n }\n if (options.checkboxes && options.checkboxes.checkChildren) {\n that.updateIndeterminate();\n }\n if (that.element[0].id) {\n that._ariaId = kendo.format('{0}_tv_active', that.element[0].id);\n }\n kendo.notify(that);\n },\n _attachEvents: function () {\n var that = this, clickableItems = '.k-in:not(.k-state-selected,.k-state-disabled)', MOUSEENTER = 'mouseenter';\n that.wrapper.on(MOUSEENTER + NS, '.k-in.k-state-selected', function (e) {\n e.preventDefault();\n }).on(MOUSEENTER + NS, clickableItems, function () {\n $(this).addClass(KSTATEHOVER);\n }).on('mouseleave' + NS, clickableItems, function () {\n $(this).removeClass(KSTATEHOVER);\n }).on(CLICK + NS, clickableItems, proxy(that._click, that)).on('dblclick' + NS, '.k-in:not(.k-state-disabled)', proxy(that._toggleButtonClick, that)).on(CLICK + NS, '.k-i-expand,.k-i-collapse', proxy(that._toggleButtonClick, that)).on('keydown' + NS, proxy(that._keydown, that)).on('focus' + NS, proxy(that._focus, that)).on('blur' + NS, proxy(that._blur, that)).on('mousedown' + NS, '.k-in,.k-checkbox-wrapper :checkbox,.k-i-expand,.k-i-collapse', proxy(that._mousedown, that)).on('change' + NS, '.k-checkbox-wrapper :checkbox', proxy(that._checkboxChange, that)).on('click' + NS, '.k-checkbox-wrapper :checkbox', proxy(that._checkboxClick, that)).on('click' + NS, '.k-request-retry', proxy(that._retryRequest, that)).on('click' + NS, function (e) {\n if (!$(e.target).is(':kendoFocusable')) {\n that.focus();\n }\n });\n },\n _checkboxClick: function (e) {\n var checkbox = $(e.target);\n if (checkbox.data(INDETERMINATE)) {\n checkbox.data(INDETERMINATE, false).prop(INDETERMINATE, false).prop(CHECKED, true);\n this._checkboxChange(e);\n }\n },\n _syncHtmlAndDataSource: function (root, dataSource) {\n root = root || this.root;\n dataSource = dataSource || this.dataSource;\n var data = dataSource.view(), uidAttr = kendo.attr('uid'), expandedAttr = kendo.attr('expanded'), checkboxesEnabled = this.options.checkboxes, items = root.children('li'), i, item, dataItem, uid, itemCheckbox;\n for (i = 0; i < items.length; i++) {\n dataItem = data[i];\n uid = dataItem.uid;\n item = items.eq(i);\n item.attr('role', 'treeitem').attr(uidAttr, uid);\n dataItem.expanded = item.attr(expandedAttr) === 'true';\n if (checkboxesEnabled) {\n itemCheckbox = checkboxes(item);\n dataItem.checked = itemCheckbox.prop(CHECKED);\n itemCheckbox.attr('id', '_' + uid);\n itemCheckbox.next('.k-checkbox-label').attr('for', '_' + uid);\n }\n this._syncHtmlAndDataSource(item.children('ul'), dataItem.children);\n }\n },\n _animation: function () {\n var options = this.options, animationOptions = options.animation;\n if (animationOptions === false) {\n animationOptions = {\n expand: { effects: {} },\n collapse: {\n hide: true,\n effects: {}\n }\n };\n } else if (!animationOptions.collapse || !('effects' in animationOptions.collapse)) {\n animationOptions.collapse = extend({ reverse: true }, animationOptions.expand);\n }\n extend(animationOptions.collapse, { hide: true });\n options.animation = animationOptions;\n },\n _dragging: function () {\n var enabled = this.options.dragAndDrop;\n var dragging = this.dragging;\n if (enabled && !dragging) {\n var widget = this;\n this.dragging = new ui.HierarchicalDragAndDrop(this.element, {\n reorderable: true,\n $angular: this.options.$angular,\n autoScroll: this.options.autoScroll,\n filter: 'div:not(.k-state-disabled) .k-in',\n allowedContainers: '.k-treeview',\n itemSelector: '.k-treeview .k-item',\n hintText: proxy(this._hintText, this),\n contains: function (source, destination) {\n return $.contains(source, destination);\n },\n dropHintContainer: function (item) {\n return item;\n },\n itemFromTarget: function (target) {\n var item = target.closest('.k-top,.k-mid,.k-bot');\n return {\n item: item,\n content: target.closest('.k-in'),\n first: item.hasClass('k-top'),\n last: item.hasClass('k-bot')\n };\n },\n dropPositionFrom: function (dropHint) {\n return dropHint.prevAll('.k-in').length > 0 ? 'after' : 'before';\n },\n dragstart: function (source) {\n return widget.trigger(DRAGSTART, { sourceNode: source[0] });\n },\n drag: function (options) {\n widget.trigger(DRAG, {\n originalEvent: options.originalEvent,\n sourceNode: options.source[0],\n dropTarget: options.target[0],\n pageY: options.pageY,\n pageX: options.pageX,\n statusClass: options.status,\n setStatusClass: options.setStatus\n });\n },\n drop: function (options) {\n return widget.trigger(DROP, {\n originalEvent: options.originalEvent,\n sourceNode: options.source,\n destinationNode: options.destination,\n valid: options.valid,\n setValid: function (state) {\n this.valid = state;\n options.setValid(state);\n },\n dropTarget: options.dropTarget,\n dropPosition: options.position\n });\n },\n dragend: function (options) {\n var source = options.source;\n var destination = options.destination;\n var position = options.position;\n function triggerDragEnd(source) {\n widget.updateIndeterminate();\n widget.trigger(DRAGEND, {\n originalEvent: options.originalEvent,\n sourceNode: source && source[0],\n destinationNode: destination[0],\n dropPosition: position\n });\n }\n if (position == 'over') {\n widget.append(source, destination, triggerDragEnd);\n } else {\n if (position == 'before') {\n source = widget.insertBefore(source, destination);\n } else if (position == 'after') {\n source = widget.insertAfter(source, destination);\n }\n triggerDragEnd(source);\n }\n }\n });\n } else if (!enabled && dragging) {\n dragging.destroy();\n this.dragging = null;\n }\n },\n _hintText: function (node) {\n return this.templates.dragClue({\n item: this.dataItem(node),\n treeview: this.options\n });\n },\n _templates: function () {\n var that = this, options = that.options, fieldAccessor = proxy(that._fieldAccessor, that);\n if (options.template && typeof options.template == STRING) {\n options.template = template(options.template);\n } else if (!options.template) {\n options.template = templateNoWith('# var text = ' + fieldAccessor('text') + '(data.item); #' + '# if (typeof data.item.encoded != \\'undefined\\' && data.item.encoded === false) {#' + '#= text #' + '# } else { #' + '#: text #' + '# } #');\n }\n that._checkboxes();\n that.templates = {\n wrapperCssClass: function (group, item) {\n var result = 'k-item', index = item.index;\n if (group.firstLevel && index === 0) {\n result += ' k-first';\n }\n if (index == group.length - 1) {\n result += ' k-last';\n }\n return result;\n },\n cssClass: function (group, item) {\n var result = '', index = item.index, groupLength = group.length - 1;\n if (group.firstLevel && index === 0) {\n result += 'k-top ';\n }\n if (index === 0 && index != groupLength) {\n result += 'k-top';\n } else if (index == groupLength) {\n result += 'k-bot';\n } else {\n result += 'k-mid';\n }\n return result;\n },\n textClass: function (item, isLink) {\n var result = 'k-in';\n if (isLink) {\n result += ' k-link';\n }\n if (item.enabled === false) {\n result += ' k-state-disabled';\n }\n if (item.selected === true) {\n result += ' k-state-selected';\n }\n return result;\n },\n toggleButtonClass: function (item) {\n var result = 'k-icon';\n if (item.expanded !== true) {\n result += ' k-i-expand';\n } else {\n result += ' k-i-collapse';\n }\n return result;\n },\n groupAttributes: function (group) {\n var attributes = '';\n if (!group.firstLevel) {\n attributes = 'role=\\'group\\'';\n }\n return attributes + (group.expanded !== true ? ' style=\\'display:none\\'' : '');\n },\n groupCssClass: function (group) {\n var cssClass = 'k-group';\n if (group.firstLevel) {\n cssClass += ' k-treeview-lines';\n }\n return cssClass;\n },\n dragClue: templateNoWith('#= data.treeview.template(data) #'),\n group: templateNoWith('
    ' + '#= data.renderItems(data) #' + '
'),\n itemContent: templateNoWith('# var imageUrl = ' + fieldAccessor('imageUrl') + '(data.item); #' + '# var spriteCssClass = ' + fieldAccessor('spriteCssClass') + '(data.item); #' + '# if (imageUrl) { #' + '\\'\\'' + '# } #' + '# if (spriteCssClass) { #' + '' + '# } #' + '#= data.treeview.template(data) #'),\n itemElement: templateNoWith('# var item = data.item, r = data.r; #' + '# var url = ' + fieldAccessor('url') + '(item); #' + '
' + '# if (item.hasChildren) { #' + '' + '# } #' + '# if (data.treeview.checkboxes) { #' + '' + '#= data.treeview.checkboxes.template(data) #' + '' + '# } #' + '# var tag = url ? \\'a\\' : \\'span\\'; #' + '# var textAttr = url ? \\' href=\\\\\\'\\' + url + \\'\\\\\\'\\' : \\'\\'; #' + '<#=tag# class=\\'#= r.textClass(item, !!url) #\\'#= textAttr #>' + '#= r.itemContent(data) #' + '' + '
'),\n item: templateNoWith('# var item = data.item, r = data.r; #' + '
  • ' + '#= r.itemElement(data) #' + '
  • '),\n loading: templateNoWith('
    #: data.messages.loading #'),\n retry: templateNoWith('#: data.messages.requestFailed # ' + '')\n };\n },\n items: function () {\n return this.element.find('.k-item > div:first-child');\n },\n setDataSource: function (dataSource) {\n var options = this.options;\n options.dataSource = dataSource;\n this._dataSource();\n if (options.checkboxes && options.checkboxes.checkChildren) {\n this.dataSource.one('change', $.proxy(this.updateIndeterminate, this, null));\n }\n if (this.options.autoBind) {\n this.dataSource.fetch();\n }\n },\n _bindDataSource: function () {\n this._refreshHandler = proxy(this.refresh, this);\n this._errorHandler = proxy(this._error, this);\n this.dataSource.bind(CHANGE, this._refreshHandler);\n this.dataSource.bind(ERROR, this._errorHandler);\n },\n _unbindDataSource: function () {\n var dataSource = this.dataSource;\n if (dataSource) {\n dataSource.unbind(CHANGE, this._refreshHandler);\n dataSource.unbind(ERROR, this._errorHandler);\n }\n },\n _dataSource: function (silentRead) {\n var that = this, options = that.options, dataSource = options.dataSource;\n function recursiveRead(data) {\n for (var i = 0; i < data.length; i++) {\n data[i]._initChildren();\n data[i].children.fetch();\n recursiveRead(data[i].children.view());\n }\n }\n dataSource = isArray(dataSource) ? { data: dataSource } : dataSource;\n that._unbindDataSource();\n if (!dataSource.fields) {\n dataSource.fields = [\n { field: 'text' },\n { field: 'url' },\n { field: 'spriteCssClass' },\n { field: 'imageUrl' }\n ];\n }\n that.dataSource = dataSource = HierarchicalDataSource.create(dataSource);\n if (silentRead) {\n dataSource.fetch();\n recursiveRead(dataSource.view());\n }\n that._bindDataSource();\n },\n events: [\n DRAGSTART,\n DRAG,\n DROP,\n DRAGEND,\n DATABOUND,\n EXPAND,\n COLLAPSE,\n SELECT,\n CHANGE,\n NAVIGATE,\n CHECK\n ],\n options: {\n name: 'TreeView',\n dataSource: {},\n animation: {\n expand: {\n effects: 'expand:vertical',\n duration: 200\n },\n collapse: { duration: 100 }\n },\n messages: {\n loading: 'Loading...',\n requestFailed: 'Request failed.',\n retry: 'Retry'\n },\n dragAndDrop: false,\n checkboxes: false,\n autoBind: true,\n autoScroll: false,\n loadOnDemand: true,\n template: '',\n dataTextField: null\n },\n _accessors: function () {\n var that = this, options = that.options, i, field, textField, element = that.element;\n for (i in bindings) {\n field = options[bindings[i]];\n textField = element.attr(kendo.attr(i + '-field'));\n if (!field && textField) {\n field = textField;\n }\n if (!field) {\n field = i;\n }\n if (!isArray(field)) {\n field = [field];\n }\n options[bindings[i]] = field;\n }\n },\n _fieldAccessor: function (fieldName) {\n var fieldBindings = this.options[bindings[fieldName]], count = fieldBindings.length, result = '(function(item) {';\n if (count === 0) {\n result += 'return item[\\'' + fieldName + '\\'];';\n } else {\n result += 'var levels = [' + $.map(fieldBindings, function (x) {\n return 'function(d){ return ' + kendo.expr(x) + '}';\n }).join(',') + '];';\n result += 'return levels[Math.min(item.level(), ' + count + '-1)](item)';\n }\n result += '})';\n return result;\n },\n setOptions: function (options) {\n Widget.fn.setOptions.call(this, options);\n this._animation();\n this._dragging();\n this._templates();\n },\n _trigger: function (eventName, node) {\n return this.trigger(eventName, { node: node.closest(NODE)[0] });\n },\n _setChecked: function (datasource, value) {\n if (!datasource || !$.isFunction(datasource.view)) {\n return;\n }\n for (var i = 0, nodes = datasource.view(); i < nodes.length; i++) {\n nodes[i][CHECKED] = value;\n if (nodes[i].children) {\n this._setChecked(nodes[i].children, value);\n }\n }\n },\n _setIndeterminate: function (node) {\n var group = subGroup(node), siblings, length, all = true, i;\n if (!group.length) {\n return;\n }\n siblings = checkboxes(group.children());\n length = siblings.length;\n if (!length) {\n return;\n } else if (length > 1) {\n for (i = 1; i < length; i++) {\n if (siblings[i].checked != siblings[i - 1].checked || siblings[i].indeterminate || siblings[i - 1].indeterminate) {\n all = false;\n break;\n }\n }\n } else {\n all = !siblings[0].indeterminate;\n }\n return checkboxes(node).data(INDETERMINATE, !all).prop(INDETERMINATE, !all).prop(CHECKED, all && siblings[0].checked);\n },\n updateIndeterminate: function (node) {\n node = node || this.wrapper;\n var subnodes = subGroup(node).children();\n var i;\n var checkbox;\n if (subnodes.length) {\n for (i = 0; i < subnodes.length; i++) {\n this.updateIndeterminate(subnodes.eq(i));\n }\n checkbox = this._setIndeterminate(node);\n if (checkbox && checkbox.prop(CHECKED)) {\n this.dataItem(node).checked = true;\n }\n }\n },\n _bubbleIndeterminate: function (node) {\n if (!node.length) {\n return;\n }\n var parentNode = this.parent(node), checkbox;\n if (parentNode.length) {\n this._setIndeterminate(parentNode);\n checkbox = parentNode.children('div').find('.k-checkbox-wrapper :checkbox');\n if (checkbox.prop(INDETERMINATE) === false) {\n this.dataItem(parentNode).set(CHECKED, checkbox.prop(CHECKED));\n } else {\n delete this.dataItem(parentNode).checked;\n }\n this._bubbleIndeterminate(parentNode);\n }\n },\n _checkboxChange: function (e) {\n var checkbox = $(e.target);\n var isChecked = checkbox.prop(CHECKED);\n var node = checkbox.closest(NODE);\n var dataItem = this.dataItem(node);\n if (dataItem.checked != isChecked) {\n dataItem.set(CHECKED, isChecked);\n this._trigger(CHECK, node);\n }\n },\n _toggleButtonClick: function (e) {\n var node = $(e.currentTarget).closest(NODE);\n if (node.is('[aria-disabled=\\'true\\']')) {\n return;\n }\n this.toggle($(e.target).closest(NODE));\n },\n _mousedown: function (e) {\n var node = $(e.currentTarget).closest(NODE);\n if (node.is('[aria-disabled=\\'true\\']')) {\n return;\n }\n this._clickTarget = node;\n this.current(node);\n },\n _focusable: function (node) {\n return node && node.length && node.is(':visible') && !node.find('.k-in:first').hasClass('k-state-disabled');\n },\n _focus: function () {\n var current = this.select(), clickTarget = this._clickTarget;\n if (kendo.support.touch) {\n return;\n }\n if (clickTarget && clickTarget.length) {\n current = clickTarget;\n }\n if (!this._focusable(current)) {\n current = this.current();\n }\n if (!this._focusable(current)) {\n current = this._nextVisible($());\n }\n this.current(current);\n },\n focus: function () {\n var wrapper = this.wrapper, scrollContainer = wrapper[0], containers = [], offsets = [], documentElement = document.documentElement, i;\n do {\n scrollContainer = scrollContainer.parentNode;\n if (scrollContainer.scrollHeight > scrollContainer.clientHeight) {\n containers.push(scrollContainer);\n offsets.push(scrollContainer.scrollTop);\n }\n } while (scrollContainer != documentElement);\n wrapper.focus();\n for (i = 0; i < containers.length; i++) {\n containers[i].scrollTop = offsets[i];\n }\n },\n _blur: function () {\n this.current().find('.k-in:first').removeClass('k-state-focused');\n },\n _enabled: function (node) {\n return !node.children('div').children('.k-in').hasClass('k-state-disabled');\n },\n parent: function (node) {\n var wrapperRe = /\\bk-treeview\\b/, itemRe = /\\bk-item\\b/, result, skipSelf;\n if (typeof node == STRING) {\n node = this.element.find(node);\n }\n if (!isDomElement(node)) {\n node = node[0];\n }\n skipSelf = itemRe.test(node.className);\n do {\n node = node.parentNode;\n if (itemRe.test(node.className)) {\n if (skipSelf) {\n result = node;\n } else {\n skipSelf = true;\n }\n }\n } while (!wrapperRe.test(node.className) && !result);\n return $(result);\n },\n _nextVisible: function (node) {\n var that = this, expanded = that._expanded(node), result;\n function nextParent(node) {\n while (node.length && !node.next().length) {\n node = that.parent(node);\n }\n if (node.next().length) {\n return node.next();\n } else {\n return node;\n }\n }\n if (!node.length || !node.is(':visible')) {\n result = that.root.children().eq(0);\n } else if (expanded) {\n result = subGroup(node).children().first();\n if (!result.length) {\n result = nextParent(node);\n }\n } else {\n result = nextParent(node);\n }\n if (!that._enabled(result)) {\n result = that._nextVisible(result);\n }\n return result;\n },\n _previousVisible: function (node) {\n var that = this, lastChild, result;\n if (!node.length || node.prev().length) {\n if (node.length) {\n result = node.prev();\n } else {\n result = that.root.children().last();\n }\n while (that._expanded(result)) {\n lastChild = subGroup(result).children().last();\n if (!lastChild.length) {\n break;\n }\n result = lastChild;\n }\n } else {\n result = that.parent(node) || node;\n }\n if (!that._enabled(result)) {\n result = that._previousVisible(result);\n }\n return result;\n },\n _keydown: function (e) {\n var that = this, key = e.keyCode, target, focused = that.current(), expanded = that._expanded(focused), checkbox = focused.find('.k-checkbox-wrapper:first :checkbox'), rtl = kendo.support.isRtl(that.element);\n if (e.target != e.currentTarget) {\n return;\n }\n if (!rtl && key == keys.RIGHT || rtl && key == keys.LEFT) {\n if (expanded) {\n target = that._nextVisible(focused);\n } else {\n that.expand(focused);\n }\n } else if (!rtl && key == keys.LEFT || rtl && key == keys.RIGHT) {\n if (expanded) {\n that.collapse(focused);\n } else {\n target = that.parent(focused);\n if (!that._enabled(target)) {\n target = undefined;\n }\n }\n } else if (key == keys.DOWN) {\n target = that._nextVisible(focused);\n } else if (key == keys.UP) {\n target = that._previousVisible(focused);\n } else if (key == keys.HOME) {\n target = that._nextVisible($());\n } else if (key == keys.END) {\n target = that._previousVisible($());\n } else if (key == keys.ENTER) {\n if (!focused.find('.k-in:first').hasClass('k-state-selected')) {\n if (!that._trigger(SELECT, focused)) {\n that.select(focused);\n }\n }\n } else if (key == keys.SPACEBAR && checkbox.length) {\n checkbox.prop(CHECKED, !checkbox.prop(CHECKED)).data(INDETERMINATE, false).prop(INDETERMINATE, false);\n that._checkboxChange({ target: checkbox });\n target = focused;\n }\n if (target) {\n e.preventDefault();\n if (focused[0] != target[0]) {\n that._trigger(NAVIGATE, target);\n that.current(target);\n }\n }\n },\n _click: function (e) {\n var that = this, node = $(e.currentTarget), contents = nodeContents(node.closest(NODE)), href = node.attr('href'), shouldNavigate;\n if (href) {\n shouldNavigate = href == '#' || href.indexOf('#' + this.element.id + '-') >= 0;\n } else {\n shouldNavigate = contents.length && !contents.children().length;\n }\n if (shouldNavigate) {\n e.preventDefault();\n }\n if (!node.hasClass('.k-state-selected') && !that._trigger(SELECT, node)) {\n that.select(node);\n }\n },\n _wrapper: function () {\n var that = this, element = that.element, wrapper, root, wrapperClasses = 'k-widget k-treeview';\n if (element.is('ul')) {\n wrapper = element.wrap('
    ').parent();\n root = element;\n } else {\n wrapper = element;\n root = wrapper.children('ul').eq(0);\n }\n that.wrapper = wrapper.addClass(wrapperClasses);\n that.root = root;\n },\n _group: function (item) {\n var that = this, firstLevel = item.hasClass(KTREEVIEW), group = {\n firstLevel: firstLevel,\n expanded: firstLevel || that._expanded(item)\n }, groupElement = item.children('ul');\n groupElement.addClass(that.templates.groupCssClass(group)).css('display', group.expanded ? '' : 'none');\n that._nodes(groupElement, group);\n },\n _nodes: function (groupElement, groupData) {\n var that = this, nodes = groupElement.children('li'), nodeData;\n groupData = extend({ length: nodes.length }, groupData);\n nodes.each(function (i, node) {\n node = $(node);\n nodeData = {\n index: i,\n expanded: that._expanded(node)\n };\n updateNodeHtml(node);\n that._updateNodeClasses(node, groupData, nodeData);\n that._group(node);\n });\n },\n _checkboxes: function () {\n var options = this.options;\n var checkboxes = options.checkboxes;\n var defaultTemplate;\n if (checkboxes) {\n defaultTemplate = '';\n checkboxes = extend({ template: defaultTemplate }, options.checkboxes);\n if (typeof checkboxes.template == STRING) {\n checkboxes.template = template(checkboxes.template);\n }\n options.checkboxes = checkboxes;\n }\n },\n _updateNodeClasses: function (node, groupData, nodeData) {\n var wrapper = node.children('div'), group = node.children('ul'), templates = this.templates;\n if (node.hasClass('k-treeview')) {\n return;\n }\n nodeData = nodeData || {};\n nodeData.expanded = typeof nodeData.expanded != UNDEFINED ? nodeData.expanded : this._expanded(node);\n nodeData.index = typeof nodeData.index != UNDEFINED ? nodeData.index : node.index();\n nodeData.enabled = typeof nodeData.enabled != UNDEFINED ? nodeData.enabled : !wrapper.children('.k-in').hasClass('k-state-disabled');\n groupData = groupData || {};\n groupData.firstLevel = typeof groupData.firstLevel != UNDEFINED ? groupData.firstLevel : node.parent().parent().hasClass(KTREEVIEW);\n groupData.length = typeof groupData.length != UNDEFINED ? groupData.length : node.parent().children().length;\n node.removeClass('k-first k-last').addClass(templates.wrapperCssClass(groupData, nodeData));\n wrapper.removeClass('k-top k-mid k-bot').addClass(templates.cssClass(groupData, nodeData));\n var textWrap = wrapper.children('.k-in');\n var isLink = textWrap[0] && textWrap[0].nodeName.toLowerCase() == 'a';\n textWrap.removeClass('k-in k-link k-state-default k-state-disabled').addClass(templates.textClass(nodeData, isLink));\n if (group.length || node.attr('data-hasChildren') == 'true') {\n wrapper.children('.k-icon').removeClass('k-i-expand k-i-collapse').addClass(templates.toggleButtonClass(nodeData));\n group.addClass('k-group');\n }\n },\n _processNodes: function (nodes, callback) {\n var that = this;\n that.element.find(nodes).each(function (index, item) {\n callback.call(that, index, $(item).closest(NODE));\n });\n },\n dataItem: function (node) {\n var uid = $(node).closest(NODE).attr(kendo.attr('uid')), dataSource = this.dataSource;\n return dataSource && dataSource.getByUid(uid);\n },\n _insertNode: function (nodeData, index, parentNode, insertCallback, collapsed) {\n var that = this, group = subGroup(parentNode), updatedGroupLength = group.children().length + 1, childrenData, groupData = {\n firstLevel: parentNode.hasClass(KTREEVIEW),\n expanded: !collapsed,\n length: updatedGroupLength\n }, node, i, item, nodeHtml = '', append = function (item, group) {\n item.appendTo(group);\n };\n for (i = 0; i < nodeData.length; i++) {\n item = nodeData[i];\n item.index = index + i;\n nodeHtml += that._renderItem({\n group: groupData,\n item: item\n });\n }\n node = $(nodeHtml);\n if (!node.length) {\n return;\n }\n that.angular('compile', function () {\n return {\n elements: node.get(),\n data: nodeData.map(function (item) {\n return { dataItem: item };\n })\n };\n });\n if (!group.length) {\n group = $(that._renderGroup({ group: groupData })).appendTo(parentNode);\n }\n insertCallback(node, group);\n if (parentNode.hasClass('k-item')) {\n updateNodeHtml(parentNode);\n that._updateNodeClasses(parentNode);\n }\n that._updateNodeClasses(node.prev().first());\n that._updateNodeClasses(node.next().last());\n for (i = 0; i < nodeData.length; i++) {\n item = nodeData[i];\n if (item.hasChildren) {\n childrenData = item.children.data();\n if (childrenData.length) {\n that._insertNode(childrenData, item.index, node.eq(i), append, !that._expanded(node.eq(i)));\n }\n }\n }\n return node;\n },\n _updateNodes: function (items, field) {\n var that = this;\n var i, node, nodeWrapper, item, isChecked, isCollapsed;\n var context = {\n treeview: that.options,\n item: item\n };\n var render = field != 'expanded' && field != 'checked';\n function setCheckedState(root, state) {\n root.find('.k-checkbox-wrapper :checkbox').prop(CHECKED, state).data(INDETERMINATE, false).prop(INDETERMINATE, false);\n }\n if (field == 'selected') {\n item = items[0];\n node = that.findByUid(item.uid).find('.k-in:first').removeClass('k-state-hover').toggleClass('k-state-selected', item[field]).end();\n if (item[field]) {\n that.current(node);\n }\n node.attr(ARIASELECTED, !!item[field]);\n } else {\n var elements = $.map(items, function (item) {\n return that.findByUid(item.uid).children('div');\n });\n if (render) {\n that.angular('cleanup', function () {\n return { elements: elements };\n });\n }\n for (i = 0; i < items.length; i++) {\n context.item = item = items[i];\n nodeWrapper = elements[i];\n node = nodeWrapper.parent();\n if (render) {\n nodeWrapper.children('.k-in').html(that.templates.itemContent(context));\n }\n if (field == CHECKED) {\n isChecked = item[field];\n setCheckedState(nodeWrapper, isChecked);\n if (that.options.checkboxes.checkChildren) {\n setCheckedState(node.children('.k-group'), isChecked);\n that._setChecked(item.children, isChecked);\n that._bubbleIndeterminate(node);\n }\n } else if (field == 'expanded') {\n that._toggle(node, item, item[field]);\n } else if (field == 'enabled') {\n node.find('.k-checkbox-wrapper :checkbox').prop('disabled', !item[field]);\n isCollapsed = !nodeContents(node).is(VISIBLE);\n node.removeAttr(ARIADISABLED);\n if (!item[field]) {\n if (item.selected) {\n item.set('selected', false);\n }\n if (item.expanded) {\n item.set('expanded', false);\n }\n isCollapsed = true;\n node.attr(ARIASELECTED, false).attr(ARIADISABLED, true);\n }\n that._updateNodeClasses(node, {}, {\n enabled: item[field],\n expanded: !isCollapsed\n });\n }\n if (nodeWrapper.length) {\n this.trigger('itemChange', {\n item: nodeWrapper,\n data: item,\n ns: ui\n });\n }\n }\n if (render) {\n that.angular('compile', function () {\n return {\n elements: elements,\n data: $.map(items, function (item) {\n return [{ dataItem: item }];\n })\n };\n });\n }\n }\n },\n _appendItems: function (index, items, parentNode) {\n var group = subGroup(parentNode);\n var children = group.children();\n var collapsed = !this._expanded(parentNode);\n if (typeof index == UNDEFINED) {\n index = children.length;\n }\n this._insertNode(items, index, parentNode, function (item, group) {\n if (index >= children.length) {\n item.appendTo(group);\n } else {\n item.insertBefore(children.eq(index));\n }\n }, collapsed);\n if (this._expanded(parentNode)) {\n this._updateNodeClasses(parentNode);\n subGroup(parentNode).css('display', 'block');\n }\n },\n _refreshChildren: function (parentNode, items, index) {\n var i, children, child;\n var options = this.options;\n var loadOnDemand = options.loadOnDemand;\n var checkChildren = options.checkboxes && options.checkboxes.checkChildren;\n subGroup(parentNode).empty();\n if (!items.length) {\n updateNodeHtml(parentNode);\n } else {\n this._appendItems(index, items, parentNode);\n children = subGroup(parentNode).children();\n if (loadOnDemand && checkChildren) {\n this._bubbleIndeterminate(children.last());\n }\n for (i = 0; i < children.length; i++) {\n child = children.eq(i);\n this.trigger('itemChange', {\n item: child.children('div'),\n data: this.dataItem(child),\n ns: ui\n });\n }\n }\n },\n _refreshRoot: function (items) {\n var groupHtml = this._renderGroup({\n items: items,\n group: {\n firstLevel: true,\n expanded: true\n }\n });\n if (this.root.length) {\n this._angularItems('cleanup');\n var group = $(groupHtml);\n this.root.attr('class', group.attr('class')).html(group.html());\n } else {\n this.root = this.wrapper.html(groupHtml).children('ul');\n }\n this.root.attr('role', 'tree');\n var elements = this.root.children('.k-item');\n for (var i = 0; i < items.length; i++) {\n this.trigger('itemChange', {\n item: elements.eq(i),\n data: items[i],\n ns: ui\n });\n }\n this._angularItems('compile');\n },\n refresh: function (e) {\n var node = e.node;\n var action = e.action;\n var items = e.items;\n var parentNode = this.wrapper;\n var options = this.options;\n var loadOnDemand = options.loadOnDemand;\n var checkChildren = options.checkboxes && options.checkboxes.checkChildren;\n var i;\n if (e.field) {\n if (!items[0] || !items[0].level) {\n return;\n }\n return this._updateNodes(items, e.field);\n }\n if (node) {\n parentNode = this.findByUid(node.uid);\n this._progress(parentNode, false);\n }\n if (checkChildren && action != 'remove') {\n var bubble = false;\n for (i = 0; i < items.length; i++) {\n if ('checked' in items[i]) {\n bubble = true;\n break;\n }\n }\n if (!bubble && node && node.checked) {\n for (i = 0; i < items.length; i++) {\n items[i].checked = true;\n }\n }\n }\n if (action == 'add') {\n this._appendItems(e.index, items, parentNode);\n } else if (action == 'remove') {\n this._remove(this.findByUid(items[0].uid), false);\n } else if (action == 'itemchange') {\n this._updateNodes(items);\n } else if (action == 'itemloaded') {\n this._refreshChildren(parentNode, items, e.index);\n } else {\n this._refreshRoot(items);\n }\n if (action != 'remove') {\n for (i = 0; i < items.length; i++) {\n if (!loadOnDemand || items[i].expanded) {\n items[i].load();\n }\n }\n }\n this.trigger(DATABOUND, { node: node ? parentNode : undefined });\n },\n _error: function (e) {\n var node = e.node && this.findByUid(e.node.uid);\n var retryHtml = this.templates.retry({ messages: this.options.messages });\n if (node) {\n this._progress(node, false);\n this._expanded(node, false);\n nodeIcon(node).addClass('k-i-refresh');\n e.node.loaded(false);\n } else {\n this._progress(false);\n this.element.html(retryHtml);\n }\n },\n _retryRequest: function (e) {\n e.preventDefault();\n this.dataSource.fetch();\n },\n expand: function (nodes) {\n this._processNodes(nodes, function (index, item) {\n this.toggle(item, true);\n });\n },\n collapse: function (nodes) {\n this._processNodes(nodes, function (index, item) {\n this.toggle(item, false);\n });\n },\n enable: function (nodes, enable) {\n enable = arguments.length == 2 ? !!enable : true;\n this._processNodes(nodes, function (index, item) {\n this.dataItem(item).set('enabled', enable);\n });\n },\n current: function (node) {\n var that = this, current = that._current, element = that.element, id = that._ariaId;\n if (arguments.length > 0 && node && node.length) {\n if (current) {\n if (current[0].id === id) {\n current.removeAttr('id');\n }\n current.find('.k-in:first').removeClass('k-state-focused');\n }\n current = that._current = $(node, element).closest(NODE);\n current.find('.k-in:first').addClass('k-state-focused');\n id = current[0].id || id;\n if (id) {\n that.wrapper.removeAttr('aria-activedescendant');\n current.attr('id', id);\n that.wrapper.attr('aria-activedescendant', id);\n }\n return;\n }\n if (!current) {\n current = that._nextVisible($());\n }\n return current;\n },\n select: function (node) {\n var that = this, element = that.element;\n if (!arguments.length) {\n return element.find('.k-state-selected').closest(NODE);\n }\n node = $(node, element).closest(NODE);\n element.find('.k-state-selected').each(function () {\n var dataItem = that.dataItem(this);\n if (dataItem) {\n dataItem.set('selected', false);\n delete dataItem.selected;\n } else {\n $(this).removeClass('k-state-selected');\n }\n });\n if (node.length) {\n that.dataItem(node).set('selected', true);\n that._clickTarget = node;\n }\n that.trigger(CHANGE);\n },\n _toggle: function (node, dataItem, expand) {\n var options = this.options;\n var contents = nodeContents(node);\n var direction = expand ? 'expand' : 'collapse';\n var loaded;\n if (contents.data('animating')) {\n return;\n }\n if (!this._trigger(direction, node)) {\n this._expanded(node, expand);\n loaded = dataItem && dataItem.loaded();\n if (expand && !loaded) {\n if (options.loadOnDemand) {\n this._progress(node, true);\n }\n contents.remove();\n dataItem.load();\n } else {\n this._updateNodeClasses(node, {}, { expanded: expand });\n if (!expand) {\n contents.css('height', contents.height()).css('height');\n }\n contents.kendoStop(true, true).kendoAnimate(extend({ reset: true }, options.animation[direction], {\n complete: function () {\n if (expand) {\n contents.css('height', '');\n }\n }\n }));\n }\n }\n },\n toggle: function (node, expand) {\n node = $(node);\n if (!nodeIcon(node).is('.k-i-expand, .k-i-collapse')) {\n return;\n }\n if (arguments.length == 1) {\n expand = !this._expanded(node);\n }\n this._expanded(node, expand);\n },\n destroy: function () {\n var that = this;\n Widget.fn.destroy.call(that);\n that.wrapper.off(NS);\n that._unbindDataSource();\n if (that.dragging) {\n that.dragging.destroy();\n }\n kendo.destroy(that.element);\n that.root = that.wrapper = that.element = null;\n },\n _expanded: function (node, value) {\n var expandedAttr = kendo.attr('expanded');\n var dataItem = this.dataItem(node);\n var expanded = value;\n if (arguments.length == 1) {\n return node.attr(expandedAttr) === 'true' || dataItem && dataItem.expanded;\n }\n if (nodeContents(node).data('animating')) {\n return;\n }\n if (dataItem) {\n dataItem.set('expanded', expanded);\n expanded = dataItem.expanded;\n }\n if (expanded) {\n node.attr(expandedAttr, 'true');\n node.attr('aria-expanded', 'true');\n } else {\n node.removeAttr(expandedAttr);\n node.attr('aria-expanded', 'false');\n }\n },\n _progress: function (node, showProgress) {\n var element = this.element;\n var loadingText = this.templates.loading({ messages: this.options.messages });\n if (arguments.length == 1) {\n showProgress = node;\n if (showProgress) {\n element.html(loadingText);\n } else {\n element.empty();\n }\n } else {\n nodeIcon(node).toggleClass('k-i-loading', showProgress).removeClass('k-i-refresh');\n }\n },\n text: function (node, text) {\n var dataItem = this.dataItem(node), fieldBindings = this.options[bindings.text], level = dataItem.level(), length = fieldBindings.length, field = fieldBindings[Math.min(level, length - 1)];\n if (text) {\n dataItem.set(field, text);\n } else {\n return dataItem[field];\n }\n },\n _objectOrSelf: function (node) {\n return $(node).closest('[data-role=treeview]').data('kendoTreeView') || this;\n },\n _dataSourceMove: function (nodeData, group, parentNode, callback) {\n var referenceDataItem, destTreeview = this._objectOrSelf(parentNode || group), destDataSource = destTreeview.dataSource;\n var loadPromise = $.Deferred().resolve().promise();\n if (parentNode && parentNode[0] != destTreeview.element[0]) {\n referenceDataItem = destTreeview.dataItem(parentNode);\n if (!referenceDataItem.loaded()) {\n destTreeview._progress(parentNode, true);\n loadPromise = referenceDataItem.load();\n }\n if (parentNode != this.root) {\n destDataSource = referenceDataItem.children;\n if (!destDataSource || !(destDataSource instanceof HierarchicalDataSource)) {\n referenceDataItem._initChildren();\n referenceDataItem.loaded(true);\n destDataSource = referenceDataItem.children;\n }\n }\n }\n nodeData = this._toObservableData(nodeData);\n return callback.call(destTreeview, destDataSource, nodeData, loadPromise);\n },\n _toObservableData: function (node) {\n var dataItem = node, dataSource, uid;\n if (node instanceof window.jQuery || isDomElement(node)) {\n dataSource = this._objectOrSelf(node).dataSource;\n uid = $(node).attr(kendo.attr('uid'));\n dataItem = dataSource.getByUid(uid);\n if (dataItem) {\n dataItem = dataSource.remove(dataItem);\n }\n }\n return dataItem;\n },\n _insert: function (data, model, index) {\n if (!(model instanceof kendo.data.ObservableArray)) {\n if (!isArray(model)) {\n model = [model];\n }\n } else {\n model = model.toJSON();\n }\n var parentNode = data.parent();\n if (parentNode && parentNode._initChildren) {\n parentNode.hasChildren = true;\n parentNode._initChildren();\n }\n data.splice.apply(data, [\n index,\n 0\n ].concat(model));\n return this.findByUid(data[index].uid);\n },\n insertAfter: insertAction(1),\n insertBefore: insertAction(0),\n append: function (nodeData, parentNode, success) {\n var group = this.root;\n if (parentNode) {\n group = subGroup(parentNode);\n }\n return this._dataSourceMove(nodeData, group, parentNode, function (dataSource, model, loadModel) {\n var inserted;\n var that = this;\n function add() {\n if (parentNode) {\n that._expanded(parentNode, true);\n }\n var data = dataSource.data(), index = Math.max(data.length, 0);\n return that._insert(data, model, index);\n }\n loadModel.done(function () {\n inserted = add();\n success = success || $.noop;\n success(inserted);\n });\n return inserted || null;\n });\n },\n _remove: function (node, keepData) {\n var that = this, parentNode, prevSibling, nextSibling;\n node = $(node, that.element);\n this.angular('cleanup', function () {\n return { elements: node.get() };\n });\n parentNode = node.parent().parent();\n prevSibling = node.prev();\n nextSibling = node.next();\n node[keepData ? 'detach' : 'remove']();\n if (parentNode.hasClass('k-item')) {\n updateNodeHtml(parentNode);\n that._updateNodeClasses(parentNode);\n }\n that._updateNodeClasses(prevSibling);\n that._updateNodeClasses(nextSibling);\n return node;\n },\n remove: function (node) {\n var dataItem = this.dataItem(node);\n if (dataItem) {\n this.dataSource.remove(dataItem);\n }\n },\n detach: function (node) {\n return this._remove(node, true);\n },\n findByText: function (text) {\n return $(this.element).find('.k-in').filter(function (i, element) {\n return $(element).text() == text;\n }).closest(NODE);\n },\n findByUid: function (uid) {\n var items = this.element.find('.k-item');\n var uidAttr = kendo.attr('uid');\n var result;\n for (var i = 0; i < items.length; i++) {\n if (items[i].getAttribute(uidAttr) == uid) {\n result = items[i];\n break;\n }\n }\n return $(result);\n },\n expandPath: function (path, complete) {\n var treeview = this;\n var nodeIds = path.slice(0);\n var callback = complete || $.noop;\n function proceed() {\n nodeIds.shift();\n if (nodeIds.length) {\n expand(nodeIds[0]).then(proceed);\n } else {\n callback.call(treeview);\n }\n }\n function expand(id) {\n var result = $.Deferred();\n var node = treeview.dataSource.get(id);\n if (node) {\n if (node.loaded()) {\n node.set('expanded', true);\n result.resolve();\n } else {\n treeview._progress(treeview.findByUid(node.uid), true);\n node.load().then(function () {\n node.set('expanded', true);\n result.resolve();\n });\n }\n } else {\n result.resolve();\n }\n return result.promise();\n }\n expand(nodeIds[0]).then(proceed);\n },\n _parentIds: function (node) {\n var parent = node && node.parentNode();\n var parents = [];\n while (parent && parent.parentNode) {\n parents.unshift(parent.id);\n parent = parent.parentNode();\n }\n return parents;\n },\n expandTo: function (node) {\n if (!(node instanceof kendo.data.Node)) {\n node = this.dataSource.get(node);\n }\n var parents = this._parentIds(node);\n this.expandPath(parents);\n },\n _renderItem: function (options) {\n if (!options.group) {\n options.group = {};\n }\n options.treeview = this.options;\n options.r = this.templates;\n return this.templates.item(options);\n },\n _renderGroup: function (options) {\n var that = this;\n options.renderItems = function (options) {\n var html = '', i = 0, items = options.items, len = items ? items.length : 0, group = options.group;\n group.length = len;\n for (; i < len; i++) {\n options.group = group;\n options.item = items[i];\n options.item.index = i;\n html += that._renderItem(options);\n }\n return html;\n };\n options.r = that.templates;\n return that.templates.group(options);\n }\n });\n ui.plugin(TreeView);\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"],"sourceRoot":"/source/"}