Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@progress/kendo-react-treeview

Package Overview
Dependencies
Maintainers
1
Versions
1115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@progress/kendo-react-treeview - npm Package Compare versions

Comparing version 2.7.0-dev.201902220837 to 2.7.0-dev.201902221817

dist/es/handleTreeViewCheckChange.d.ts

2

dist/cdn/js/kendo-react-treeview.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("prop-types"),require("react"),require("react-transition-group")):"function"==typeof define&&define.amd?define(["prop-types","react","react-transition-group"],t):"object"==typeof exports?exports.KendoReactTreeview=t(require("prop-types"),require("react"),require("react-transition-group")):e.KendoReactTreeview=t(e.PropTypes,e.React,e.ReactTransitionGroup)}(window,function(e,t,n){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=8)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";n.r(t);var i,r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(e){return!0!==e&&!!e}).map(function(e){return Array.isArray(e)?r.apply(void 0,e):"object"==typeof e?Object.keys(e).map(function(t,n){return e[n]||e[t]&&t||null}).filter(function(e){return null!==e}).join(" "):e}).filter(function(e){return!!e}).join(" ")},o=function(){var e,t,n="";for(e=0;e<32;e++)t=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(n+="-"),n+=(12===e?4:16===e?3&t|8:t).toString(16);return n},a={backspace:8,tab:9,enter:13,shift:16,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,delete:46},s=function(){},c=function(){return function(){}}(),l=n(1),p=n(0),u=(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={focused:!1},t.handleFocus=function(e){t.setState({focused:!0})},t.handleBlur=function(e){t.setState({focused:!1})},t}return u(t,e),t.prototype.render=function(){var e=this.props,t=e.label,n=e.id,i=e.className,o=e.value,a=e.placeholder,s=e.valid,c=e.style,p=r({"k-textbox-container":!0,"k-state-focused":this.state.focused,"k-state-empty":!(o||a),"k-state-invalid":!s&&void 0!==s},i);return l.createElement("span",{className:p,onFocus:this.handleFocus,onBlur:this.handleBlur,style:c},this.props.children,t?n?l.createElement("label",{htmlFor:n,className:"k-label"},t):l.createElement("span",{className:"k-label"},t):null)},t.propTypes={label:p.string,id:p.string,value:p.string,placeholder:p.string,valid:p.bool},t}(l.Component);function f(e,t,n,i){if(e){var r={syntheticEvent:t,nativeEvent:t.nativeEvent,target:n};e.call(void 0,Object.assign(r,i))}}var h=function(){return"undefined"==typeof window};n.d(t,"classNames",function(){return r}),n.d(t,"guid",function(){return o}),n.d(t,"Keys",function(){return a}),n.d(t,"noop",function(){return s}),n.d(t,"FloatingLabel",function(){return d}),n.d(t,"FormComponent",function(){return c}),n.d(t,"dispatchEvent",function(){return f}),n.d(t,"isServerRendering",function(){return h})},function(e,t,n){"use strict";function i(e){return a(e)?e:e.split(t.SEPARATOR)[0]}function r(e){if(a(e))return e;var n=e.indexOf(t.SEPARATOR);return e.substring(n+1)}function o(e,n){return e=e.toString(),n?n+t.SEPARATOR+e:e}function a(e){return e===t.EMPTY_ID||e.indexOf(t.SEPARATOR)<0}function s(e){return e!==t.EMPTY_ID&&e.indexOf(t.SEPARATOR)<0}Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_ID="",t.ZERO_LEVEL_ZERO_NODE_ID="0",t.SEPARATOR="_",t.getItemById=function e(t,n){if(s(t))return n[Number(t)];var o=n[Number(i(t))];return o&&o.items&&o.items.length?e(r(t),o.items):void 0},t.getRootParentId=i,t.getIdWithoutRootParentId=r,t.getFirstChildId=function(e){return o("0",e)},t.createId=o,t.getDirectParentId=function(e){var n=e.lastIndexOf(t.SEPARATOR);return n<0?t.EMPTY_ID:e.substring(0,n)},t.isIdEmptyOrZeroLevel=a,t.isIdZeroLevel=s,t.getAllParentsShortIds=function(e){return e.split(t.SEPARATOR)},t.getShortId=function(e){var n=e.lastIndexOf(t.SEPARATOR);return n<0?e:e.substring(n+1)}},function(e,t,n){"use strict";var i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0});var r=n(3);function o(e){return Boolean(e.items&&e.items.length)}t.isItemExpandedAndWithChildren=function(e,t){return t.expanded(e)&&o(e)},t.resolveItemId=function(e,t){return function e(t,n,i){for(var a=void 0,s=0;s<n.length;s++){var c=n[s];if(t(c)){a=r.createId(s,i);break}if(o(c)&&(a=e(t,c.items,r.createId(s,i))))break}return a}(e,t,r.EMPTY_ID)},t.updateItem=function e(t,n,o){for(var a=[],s=0;s<t.length;s++)if(Number(r.getRootParentId(n))===s){var c=i({},t[s]);r.isIdZeroLevel(n)?o(c):t[s].items&&(c.items=e(t[s].items,r.getIdWithoutRootParentId(n),o)),a.push(c)}else a.push(t[s]);return a},t.hasChildren=o,t.isEnabledAndAllParentsEnabled=function(e,t,n){for(var i=r.getAllParentsShortIds(e),o=t,a=0;a<i.length;a++){var s=o[Number(i[a])];if(n.disabled(s))return!1;o=s.items}return!0}},function(e,t){e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXPAND_FIELD="expanded",t.SELECT_FIELD="selected"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNestedValue=function(e,t){var n=(e||"").split("."),i=t;return n.forEach(function(e){i=i?i[e]:void 0}),i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(9);t.TreeView=i.default;var r=n(13);t.processTreeViewItems=r.default},function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=n(0),s=n(2),c=n(10),l=n(4),p=n(11),u=n(3),d=n(12),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={focusedItemId:void 0,focusedItemPublicId:void 0,tabbableItemId:u.ZERO_LEVEL_ZERO_NODE_ID},t.onExpandChange=function(e,n){t.setFocus(n),t.dispatchExpandChange(e,t.getItemById(n),n)},t.onItemClick=function(e,n){t.setFocus(n),t.dispatchItemClick(e,t.getItemById(n),n)},t.onFocus=function(){clearTimeout(t.blurRequest),void 0===t.state.focusedItemId&&t.props.data&&t.props.data.length&&t.setFocus(t.state.tabbableItemId)},t.onBlur=function(){clearTimeout(t.blurRequest),t.blurRequest=setTimeout(function(){return t.setFocus(void 0)},0)},t.onKeyDown=function(e){var n=t.getFocusedItem();if(n){var i=c.default(n,t.state.focusedItemId,t.props.data,e.keyCode,t.fieldsSvc);i!==t.state.focusedItemId&&(e.preventDefault(),t.setFocus(i)),t.dispatchEventsUponKeyboardNavigation(e,n)}},t}return r(t,e),t.prototype.render=function(){var e=this;return this.fieldsSvc=new d.default(this.props),o.createElement("div",{className:"k-widget k-treeview",onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,role:"tree","aria-multiselectable":!!this.ariaMultiSelectable||void 0,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},o.createElement("ul",{className:"k-treeview-lines",role:"group"},this.props.data.map(function(t,n){return o.createElement(p.default,{item:t,animate:e.props.animate,itemId:n.toString(),focusedItemId:e.state.focusedItemId,tabbableItemId:e.state.tabbableItemId,fieldsService:e.fieldsSvc,itemRender:e.props.itemRender,ariaMultiSelectable:e.ariaMultiSelectable,onItemClick:e.onItemClick,onExpandChange:e.onExpandChange,key:n})})))},t.prototype.componentDidUpdate=function(){var e=this;if(this.fieldsSvc.focusIdField){var t=this.state.focusedItemPublicId;if(t){var n=this.props.getFocusHierarchicalIndex?this.props.getFocusHierarchicalIndex(t):l.resolveItemId(function(n){return e.fieldsSvc.focusId(n)===t},this.props.data);n!==this.state.focusedItemId&&this.setState({focusedItemId:n})}}},t.prototype.dispatchEventsUponKeyboardNavigation=function(e,t){var n=this,i=function(){return l.isEnabledAndAllParentsEnabled(n.state.focusedItemId,n.props.data,n.fieldsSvc)};e.keyCode===s.Keys.left&&this.fieldsSvc.expanded(t)&&i()&&this.dispatchExpandChange(e,t,this.state.focusedItemId),e.keyCode===s.Keys.right&&!this.fieldsSvc.expanded(t)&&(this.fieldsSvc.hasChildren(t)||l.hasChildren(t))&&i()&&this.dispatchExpandChange(e,t,this.state.focusedItemId),e.keyCode===s.Keys.enter&&i()&&this.dispatchItemClick(e,t,this.state.focusedItemId)},t.prototype.setFocus=function(e){if(e)if(this.fieldsSvc.focusIdField){var t=this.getItemById(e);this.setState({focusedItemId:e,focusedItemPublicId:this.fieldsSvc.focusId(t)})}else this.setState({focusedItemId:e});else this.setState(function(e){return{focusedItemId:void 0,focusedItemPublicId:void 0,tabbableItemId:e.focusedItemId}})},t.prototype.getFocusedItem=function(){return this.state.focusedItemId?this.getItemById(this.state.focusedItemId):void 0},t.prototype.getItemById=function(e){return u.getItemById(e,this.props.data)},t.prototype.dispatchExpandChange=function(e,t,n){s.dispatchEvent(this.props.onExpandChange,e,this,{item:t,itemHierarchicalIndex:n})},t.prototype.dispatchItemClick=function(e,t,n){s.dispatchEvent(this.props.onItemClick,e,this,{item:t,itemHierarchicalIndex:n})},Object.defineProperty(t.prototype,"ariaMultiSelectable",{get:function(){return!0===this.props["aria-multiselectable"]||"true"===this.props["aria-multiselectable"]},enumerable:!0,configurable:!0}),t.propTypes={data:a.arrayOf(a.any),animate:a.bool,focusIdField:a.string,getHierarchicalIndexById:a.func,onExpandChange:a.func,onItemClick:a.func,expandField:a.string,selectField:a.string,hasChildrenField:a.string,textField:a.string,disableField:a.string,itemRender:a.any,"aria-multiselectable":a.oneOfType([a.bool,a.oneOf(["false","true"])]),"aria-label":a.string,"aria-labelledby":a.string},t.defaultProps={animate:!0},t}(o.Component);t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(4);t.default=function(e,t,n,a,s){switch(a){case i.Keys.left:return s.expanded(e)||r.isIdZeroLevel(t)?t:r.getDirectParentId(t);case i.Keys.right:return o.isItemExpandedAndWithChildren(e,s)?r.getFirstChildId(t):t;case i.Keys.up:return c=Number(r.getShortId(t)),l=r.getDirectParentId(t),c?function e(t,n,i){var a=r.getItemById(t,n);return o.isItemExpandedAndWithChildren(a,i)?e(r.createId(a.items.length-1,t),n,i):t}(r.createId(c-1,l),n,s):r.isIdZeroLevel(t)?t:l;case i.Keys.down:return o.isItemExpandedAndWithChildren(e,s)?r.getFirstChildId(t):function e(t,n){var i=r.getDirectParentId(t),o=i?r.getItemById(i,n):void 0,a=o?o.items:n,s=Number(r.getShortId(t));return s<a.length-1?r.createId(s+1,i):o?e(i,n):void 0}(t,n)||t;case i.Keys.home:return r.ZERO_LEVEL_ZERO_NODE_ID;case i.Keys.end:return function(){for(var e=(n.length-1).toString(),t=n[n.length-1];o.isItemExpandedAndWithChildren(t,s);)e=r.createId(t.items.length-1,e),t=t.items[t.items.length-1];return e}();default:return t}var c,l}},function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=n(2),s=n(3),c=n(4),l=n(14),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(){var e=this,t=this.renderSubitemsIfApplicable();return o.createElement("li",{className:this.getRootClassName(),tabIndex:this.tabIndex,role:"treeitem","aria-expanded":this.ariaExpanded,"aria-selected":this.ariaSelected,"aria-disabled":!!this.fieldsSvc.disabled(this.item)||void 0,ref:function(t){return e.itemElement=t}},o.createElement("div",{className:"k-mid"},this.renderIcon(),o.createElement("span",{className:this.getContentClassName(),onClick:function(t){return e.props.onItemClick(t,e.itemId)}},this.props.itemRender?o.createElement(this.props.itemRender,{item:this.item,itemHierarchicalIndex:this.itemId}):this.fieldsSvc.text(this.item))),this.props.animate?o.createElement(l.Reveal,{transitionEnterDuration:200,transitionExitDuration:200,style:{display:"block"},children:t}):t)},t.prototype.componentDidMount=function(){var e=this.props.focusedItemId,t=this.itemId;e&&e===t&&this.itemElement.focus()},t.prototype.componentDidUpdate=function(e){var t=this.props.focusedItemId;t&&t!==e.focusedItemId&&t===this.itemId&&this.itemElement.focus()},t.prototype.renderIcon=function(){var e=this;return this.fieldsSvc.hasChildren(this.item)||c.hasChildren(this.item)?o.createElement("span",{className:this.getIconClassName(),onClick:function(t){return e.props.onExpandChange(t,e.itemId)}}):void 0},t.prototype.renderSubitemsIfApplicable=function(){var e=this;return c.isItemExpandedAndWithChildren(this.item,this.fieldsSvc)?o.createElement("ul",{className:"k-content",role:"group"},this.item.items.map(function(n,i){return o.createElement(t,{item:n,animate:e.props.animate,itemId:s.createId(i,e.itemId),focusedItemId:e.props.focusedItemId,tabbableItemId:e.props.tabbableItemId,fieldsService:e.props.fieldsService,itemRender:e.props.itemRender,ariaMultiSelectable:e.props.ariaMultiSelectable,onItemClick:e.props.onItemClick,onExpandChange:e.props.onExpandChange,key:i})})):void 0},Object.defineProperty(t.prototype,"fieldsSvc",{get:function(){return this.props.fieldsService},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"itemId",{get:function(){return this.props.itemId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabIndex",{get:function(){return(this.props.focusedItemId||this.props.tabbableItemId)===this.itemId?0:-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ariaExpanded",{get:function(){return this.fieldsSvc.hasChildren(this.item)||c.hasChildren(this.item)?Boolean(this.fieldsSvc.expanded(this.item)):void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ariaSelected",{get:function(){return!!this.fieldsSvc.selected(this.item)||(this.props.ariaMultiSelectable?!!this.fieldsSvc.disabled(this.item)&&void 0:void 0)},enumerable:!0,configurable:!0}),t.prototype.getIconClassName=function(){return a.classNames("k-icon",{"k-i-expand":!this.fieldsSvc.expanded(this.item),"k-i-collapse":this.fieldsSvc.expanded(this.item),"k-i-loading":this.fieldsSvc.expanded(this.item)&&!c.hasChildren(this.item)})},t.prototype.getRootClassName=function(){return a.classNames("k-item k-treeview-item",{"k-state-disabled":this.fieldsSvc.disabled(this.item)})},t.prototype.getContentClassName=function(){return a.classNames("k-in",{"k-state-focused":this.props.focusedItemId===this.itemId,"k-state-selected":this.fieldsSvc.selected(this.item)})},t}(o.Component);t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),r=n(7),o=function(){function e(e){this.expandField=e.expandField||i.EXPAND_FIELD,this.selectField=e.selectField||i.SELECT_FIELD,this.hasChildrenField=e.hasChildrenField||"hasChildren",this.textField=e.textField||"text",this.disableField=e.disableField||"disabled",this.focusIdField=e.focusIdField}return e.prototype.expanded=function(e){return r.getNestedValue(this.expandField,e)},e.prototype.selected=function(e){return r.getNestedValue(this.selectField,e)},e.prototype.text=function(e){return r.getNestedValue(this.textField,e)},e.prototype.disabled=function(e){return r.getNestedValue(this.disableField,e)},e.prototype.hasChildren=function(e){return r.getNestedValue(this.hasChildrenField,e)},e.prototype.focusId=function(e){return this.focusIdField&&r.getNestedValue(this.focusIdField,e)},e}();t.default=o},function(e,t,n){"use strict";var i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),o=n(6),a=n(7);function s(e,t,n){if(n){var o=function(e,t){var n,i;c(e)?(n=e,i=t):(n=e.ids||[],i=e.operationField||t);return{ids:n,field:i}}(n,t),s=o.ids,l=o.field,p=s;return!c(n)&&n.idField&&(p=function(e,t,n){var i=[];return e.forEach(function(e){i.push(r.resolveItemId(function(n){return a.getNestedValue(t,n)===e},n))}),i}(s,n.idField,e)),function(e,t,n){var o=e;return t.forEach(function(e){o=r.updateItem(o,e,function(e){return function(e,t){for(var n=(e||"").split("."),r=t,o=0;o<n.length;o++){var a=n[o];if(o===n.length-1)r[a]=!0;else{if(void 0===r[a])return;r[a]=i({},r[a]),r=r[a]}}}(n,e)})}),o}(e,p,l)}return e}function c(e){return void 0!==e.length}t.default=function(e,t){var n=e;return n=s(n,o.EXPAND_FIELD,t.expand),n=s(n,o.SELECT_FIELD,t.select)}},function(e,t,n){"use strict";n.r(t);var i,r=n(1),o=n(0),a=n(2),s=n(5),c={outerHeight:function(e){if(!e)return 0;var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop),i=parseFloat(t.marginBottom);return e.offsetHeight+n+i},outerWidth:function(e){if(!e)return 0;var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginLeft),i=parseFloat(t.marginRight);return e.offsetWidth+n+i},styles:{"animation-container":"k-animation-container","animation-container-relative":"k-animation-container-relative","animation-container-fixed":"k-animation-container-fixed","push-right-enter":"k-push-right-enter","push-right-appear":"k-push-right-appear","push-right-enter-active":"k-push-right-enter-active","push-right-appear-active":"k-push-right-appear-active","push-right-exit":"k-push-right-exit","push-right-exit-active":"k-push-right-exit-active","push-left-enter":"k-push-left-enter","push-left-appear":"k-push-left-appear","push-left-enter-active":"k-push-left-enter-active","push-left-appear-active":"k-push-left-appear-active","push-left-exit":"k-push-left-exit","push-left-exit-active":"k-push-left-exit-active","push-down-enter":"k-push-down-enter","push-down-appear":"k-push-down-appear","push-down-enter-active":"k-push-down-enter-active","push-down-appear-active":"k-push-down-appear-active","push-down-exit":"k-push-down-exit","push-down-exit-active":"k-push-down-exit-active","push-up-enter":"k-push-up-enter","push-up-appear":"k-push-up-appear","push-up-enter-active":"k-push-up-enter-active","push-up-appear-active":"k-push-up-appear-active","push-up-exit":"k-push-up-exit","push-up-exit-active":"k-push-up-exit-active",expand:"k-expand","expand-vertical-enter":"k-expand-vertical-enter","expand-vertical-appear":"k-expand-vertical-appear","expand-vertical-enter-active":"k-expand-vertical-enter-active","expand-vertical-appear-active":"k-expand-vertical-appear-active","expand-vertical-exit":"k-expand-vertical-exit","expand-vertical-exit-active":"k-expand-vertical-exit-active","expand-horizontal-enter":"k-expand-horizontal-enter","expand-horizontal-appear":"k-expand-horizontal-appear","expand-horizontal-enter-active":"k-expand-horizontal-enter-active","expand-horizontal-appear-active":"k-expand-horizontal-appear-active","expand-horizontal-exit":"k-expand-horizontal-exit","expand-horizontal-exit-active":"k-expand-horizontal-exit-active","child-animation-container":"k-child-animation-container","fade-enter":"k-fade-enter","fade-appear":"k-fade-appear","fade-enter-active":"k-fade-enter-active","fade-appear-active":"k-fade-appear-active","fade-exit":"k-fade-exit","fade-exit-active":"k-fade-exit-active","zoom-in-enter":"k-zoom-in-enter","zoom-in-appear":"k-zoom-in-appear","zoom-in-enter-active":"k-zoom-in-enter-active","zoom-in-appear-active":"k-zoom-in-appear-active","zoom-in-exit":"k-zoom-in-exit","zoom-in-exit-active":"k-zoom-in-exit-active","zoom-out-enter":"k-zoom-out-enter","zoom-out-appear":"k-zoom-out-appear","zoom-out-enter-active":"k-zoom-out-enter-active","zoom-out-appear-active":"k-zoom-out-appear-active","zoom-out-exit":"k-zoom-out-exit","zoom-out-exit-active":"k-zoom-out-exit-active","slide-in-appear":"k-slide-in-appear",centered:"k-centered","slide-in-appear-active":"k-slide-in-appear-active","slide-down-enter":"k-slide-down-enter","slide-down-appear":"k-slide-down-appear","slide-down-enter-active":"k-slide-down-enter-active","slide-down-appear-active":"k-slide-down-appear-active","slide-down-exit":"k-slide-down-exit","slide-down-exit-active":"k-slide-down-exit-active","slide-up-enter":"k-slide-up-enter","slide-up-appear":"k-slide-up-appear","slide-up-enter-active":"k-slide-up-enter-active","slide-up-appear-active":"k-slide-up-appear-active","slide-up-exit":"k-slide-up-exit","slide-up-exit-active":"k-slide-up-exit-active","slide-right-enter":"k-slide-right-enter","slide-right-appear":"k-slide-right-appear","slide-right-enter-active":"k-slide-right-enter-active","slide-right-appear-active":"k-slide-right-appear-active","slide-right-exit":"k-slide-right-exit","slide-right-exit-active":"k-slide-right-exit-active","slide-left-enter":"k-slide-left-enter","slide-left-appear":"k-slide-left-appear","slide-left-enter-active":"k-slide-left-enter-active","slide-left-appear-active":"k-slide-left-appear-active","slide-left-exit":"k-slide-left-exit","slide-left-exit-active":"k-slide-left-exit-active","reveal-vertical-enter":"k-reveal-vertical-enter","reveal-vertical-appear":"k-reveal-vertical-appear","reveal-vertical-enter-active":"k-reveal-vertical-enter-active","reveal-vertical-appear-active":"k-reveal-vertical-appear-active","reveal-vertical-exit":"k-reveal-vertical-exit","reveal-vertical-exit-active":"k-reveal-vertical-exit-active","reveal-horizontal-enter":"k-reveal-horizontal-enter","reveal-horizontal-appear":"k-reveal-horizontal-appear","reveal-horizontal-enter-active":"k-reveal-horizontal-enter-active","reveal-horizontal-appear-active":"k-reveal-horizontal-appear-active","reveal-horizontal-exit":"k-reveal-horizontal-exit","reveal-horizontal-exit-active":"k-reveal-horizontal-exit-active"}},l=(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),p=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},u=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&(n[i[r]]=e[i[r]])}return n},d=c.styles,f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this,t=this.props,n=t.children,i=t.style,o=t.appear,c=t.enter,l=t.exit,f=t.transitionName,h=t.transitionEnterDuration,m=t.transitionExitDuration,v=t.className,y=t.onEnter,g=t.onEntering,x=t.onEntered,b=t.onExit,O=t.onExiting,I=t.onExited,E=t.mountOnEnter,k=t.unmountOnExit,_=t.animationEnteringStyle,P=t.animationEnteredStyle,S=t.animationExitingStyle,w=t.animationExitedStyle,j=u(t,["children","style","appear","enter","exit","transitionName","transitionEnterDuration","transitionExitDuration","className","onEnter","onEntering","onEntered","onExit","onExiting","onExited","mountOnEnter","unmountOnExit","animationEnteringStyle","animationEnteredStyle","animationExitingStyle","animationExitedStyle"]),C=Object(a.classNames)(v,d["child-animation-container"]),F=p({transitionDelay:"0ms"},i),N={entering:p({transitionDuration:h+"ms"},_),entered:p({},P),exiting:p({transitionDuration:m+"ms"},S),exited:p({},w)},D={in:this.props.in,appear:o,enter:c,exit:l,mountOnEnter:E,unmountOnExit:k,timeout:{enter:h,exit:m},onEnter:function(t){y&&y.call(void 0,{animatedElement:t,target:e})},onEntering:function(t){g&&g.call(void 0,{animatedElement:t,target:e})},onEntered:function(t){x&&x.call(void 0,{animatedElement:t,target:e})},onExit:function(t){b&&b.call(void 0,{animatedElement:t,target:e})},onExiting:function(t){O&&O.call(void 0,{animatedElement:t,target:e})},onExited:function(t){I&&I.call(void 0,{animatedElement:t,target:e})},classNames:{appear:d[f+"-appear"]||f+"-appear",appearActive:d[f+"-appear-active"]||f+"-appear-active",enter:d[f+"-enter"]||f+"-enter",enterActive:d[f+"-enter-active"]||f+"-enter-active",exit:d[f+"-exit"]||f+"-exit",exitActive:d[f+"-exit-active"]||f+"-exit-active"}};return r.createElement(s.CSSTransition,p({},D,j),function(t){return r.createElement("div",{style:p({},F,N[t]),className:C,ref:function(t){e._element=t}},n)})},t.propTypes={in:o.bool,children:o.oneOfType([o.arrayOf(o.node),o.node]),transitionName:o.string.isRequired,className:o.string,appear:o.bool,enter:o.bool,exit:o.bool,transitionEnterDuration:o.number.isRequired,transitionExitDuration:o.number.isRequired,mountOnEnter:o.bool,unmountOnExit:o.bool,animationEnteringStyle:o.object,animationEnteredStyle:o.object,animationExitingStyle:o.object,animationExitedStyle:o.object},t.defaultProps={mountOnEnter:!0,unmountOnExit:!1,onEnter:a.noop,onEntering:a.noop,onEntered:a.noop,onExit:a.noop,onExiting:a.noop,onExited:a.noop,animationEnteringStyle:{},animationEnteredStyle:{},animationExitingStyle:{},animationExitedStyle:{}},t}(r.Component),h=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),m=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},v=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&(n[i[r]]=e[i[r]])}return n},y=c.styles,g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t.prototype.render=function(){var e=this.props,t=e.id,n=e.style,i=e.children,o=e.component,c=e.className,l=e.childFactory,p=(e.stackChildren,e.componentChildStyle),u=e.componentChildClassName,d=v(e,["id","style","children","component","className","childFactory","stackChildren","componentChildStyle","componentChildClassName"]),h={id:t,style:n,component:o,childFactory:l,className:Object(a.classNames)(y["animation-container"],y["animation-container-relative"],c)},g=r.Children.map(i,function(e){return r.createElement(f,m({},d,{style:p,className:u}),e)});return r.createElement(s.TransitionGroup,m({},h),g)},t.propTypes={children:o.oneOfType([o.arrayOf(o.node),o.node]),childFactory:o.any,className:o.string,component:o.string,id:o.string,style:o.any,transitionName:o.string.isRequired,appear:o.bool.isRequired,enter:o.bool.isRequired,exit:o.bool.isRequired,transitionEnterDuration:o.number.isRequired,transitionExitDuration:o.number.isRequired},t.defaultProps={component:"div"},t}(r.Component),x=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),b=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},O=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&(n[i[r]]=e[i[r]])}return n},I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return x(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=O(e,["children"]);return r.createElement(g,b({},{transitionName:"fade"},n),t)},t.propTypes={children:o.oneOfType([o.arrayOf(o.node),o.node]),childFactory:o.any,className:o.string,component:o.string,id:o.string,style:o.any},t.defaultProps={appear:!1,enter:!0,exit:!1,transitionEnterDuration:500,transitionExitDuration:500},t}(r.Component),E=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),k=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},_=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&(n[i[r]]=e[i[r]])}return n},P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return E(t,e),t.prototype.render=function(){var e=this.props,t=e.direction,n=e.children,i=_(e,["direction","children"]),o={transitionName:"expand-"+t};return r.createElement(g,k({},o,i),n)},t.propTypes={children:o.oneOfType([o.arrayOf(o.node),o.node]),childFactory:o.any,className:o.string,direction:o.oneOf(["horizontal","vertical"]),component:o.string,id:o.string,style:o.any},t.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"},t}(r.Component),S=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),w=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},j=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&(n[i[r]]=e[i[r]])}return n},C={position:"absolute",top:"0",left:"0"},F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return S(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.direction,i=j(e,["children","direction"]);return r.createElement(g,w({},i,{transitionName:"push-"+n,animationExitingStyle:this.props.stackChildren?C:void 0}),t)},t.propTypes={children:o.oneOfType([o.arrayOf(o.node),o.node]),childFactory:o.any,className:o.string,direction:o.oneOf(["up","down","left","right"]),component:o.string,id:o.string,style:o.any,stackChildren:o.bool},t.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"right",stackChildren:!1},t}(r.Component),N=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),D=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},R=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&(n[i[r]]=e[i[r]])}return n},A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return N(t,e),t.prototype.render=function(){var e=this.props,t=e.direction,n=e.children,i=R(e,["direction","children"]),o={transitionName:"slide-"+t};return r.createElement(g,D({},o,i),n)},t.propTypes={children:o.oneOfType([o.arrayOf(o.node),o.node]),childFactory:o.any,className:o.string,direction:o.oneOf(["up","down","left","right"]),component:o.string,id:o.string,style:o.any},t.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"down"},t}(r.Component),z=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),T=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},M=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&(n[i[r]]=e[i[r]])}return n},W={position:"absolute",top:"0",left:"0"},L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.direction,i=M(e,["children","direction"]);return r.createElement(g,T({},i,{transitionName:"zoom-"+n,animationExitingStyle:this.props.stackChildren?W:void 0}),t)},t.propTypes={children:o.oneOfType([o.arrayOf(o.node),o.node]),childFactory:o.any,className:o.string,direction:o.oneOf(["in","out"]),component:o.string,id:o.string,style:o.any,stackChildren:o.bool},t.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"out",stackChildren:!1},t}(r.Component),B=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),q=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},H=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&(n[i[r]]=e[i[r]])}return n},K=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={maxHeight:void 0,maxWidth:void 0},t.componentWillEnter=function(e){var n=t.props.onEnter;t.updateContainerDimensions(e.animatedElement,function(){n&&n.call(void 0,e)})},t.componentIsEntering=function(e){var n=t.props.onEntering;t.updateContainerDimensions(e.animatedElement,function(){n&&n.call(void 0,e)})},t.componentWillExit=function(e){var n=t.props.onExit;t.updateContainerDimensions(e.animatedElement,function(){n&&n.call(void 0,e)})},t.updateContainerDimensions=function(e,n){void 0===n&&(n=a.noop);var i=e.firstChild;if(i){var r=c.outerHeight(i),o=c.outerWidth(i);t.setState({maxHeight:r,maxWidth:o},n)}},t}return B(t,e),t.prototype.render=function(){var e,t=this.props,n=t.direction,i=t.children,o=t.childFactory,a=H(t,["direction","children","childFactory"]),s=this.state,c=s.maxHeight,l=s.maxWidth,p={maxHeight:(e="vertical"===n?{maxHeight:c?c+"px":null}:{maxWidth:l?l+"px":null}).maxHeight,maxWidth:e.maxWidth};return r.createElement(g,q({},a,{childFactory:o||function(t){return t.props.in?t:r.cloneElement(t,q({},t.props,{style:q({},t.props.style,{maxHeight:e.maxHeight,maxWidth:e.maxWidth})}))},onEnter:this.componentWillEnter,onEntering:this.componentIsEntering,onExit:this.componentWillExit,animationEnteringStyle:p,transitionName:"reveal-"+n}),i)},t.propTypes={children:o.oneOfType([o.arrayOf(o.node),o.node]),childFactory:o.any,className:o.string,direction:o.oneOf(["horizontal","vertical"]),component:o.string,id:o.string,style:o.any},t.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"},t}(r.Component);n.d(t,"Animation",function(){return g}),n.d(t,"AnimationChild",function(){return f}),n.d(t,"Fade",function(){return I}),n.d(t,"Expand",function(){return P}),n.d(t,"Push",function(){return F}),n.d(t,"Slide",function(){return A}),n.d(t,"Zoom",function(){return L}),n.d(t,"Reveal",function(){return K})}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("prop-types"),require("react"),require("react-transition-group")):"function"==typeof define&&define.amd?define(["prop-types","react","react-transition-group"],t):"object"==typeof exports?exports.KendoReactTreeview=t(require("prop-types"),require("react"),require("react-transition-group")):e.KendoReactTreeview=t(e.PropTypes,e.React,e.ReactTransitionGroup)}(window,function(e,t,n){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=8)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";n.r(t);var i,r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(e){return!0!==e&&!!e}).map(function(e){return Array.isArray(e)?r.apply(void 0,e):"object"==typeof e?Object.keys(e).map(function(t,n){return e[n]||e[t]&&t||null}).filter(function(e){return null!==e}).join(" "):e}).filter(function(e){return!!e}).join(" ")},o=function(){var e,t,n="";for(e=0;e<32;e++)t=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(n+="-"),n+=(12===e?4:16===e?3&t|8:t).toString(16);return n},a={backspace:8,tab:9,enter:13,shift:16,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,delete:46},s=function(){},c=function(){return function(){}}(),l=n(1),p=n(0),d=(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={focused:!1},t.handleFocus=function(e){t.setState({focused:!0})},t.handleBlur=function(e){t.setState({focused:!1})},t}return d(t,e),t.prototype.render=function(){var e=this.props,t=e.label,n=e.id,i=e.className,o=e.value,a=e.placeholder,s=e.valid,c=e.style,p=r({"k-textbox-container":!0,"k-state-focused":this.state.focused,"k-state-empty":!(o||a),"k-state-invalid":!s&&void 0!==s},i);return l.createElement("span",{className:p,onFocus:this.handleFocus,onBlur:this.handleBlur,style:c},this.props.children,t?n?l.createElement("label",{htmlFor:n,className:"k-label"},t):l.createElement("span",{className:"k-label"},t):null)},t.propTypes={label:p.string,id:p.string,value:p.string,placeholder:p.string,valid:p.bool},t}(l.Component);function f(e,t,n,i){if(e){var r={syntheticEvent:t,nativeEvent:t.nativeEvent,target:n};e.call(void 0,Object.assign(r,i))}}var h=function(){return"undefined"==typeof window};n.d(t,"classNames",function(){return r}),n.d(t,"guid",function(){return o}),n.d(t,"Keys",function(){return a}),n.d(t,"noop",function(){return s}),n.d(t,"FloatingLabel",function(){return u}),n.d(t,"FormComponent",function(){return c}),n.d(t,"dispatchEvent",function(){return f}),n.d(t,"isServerRendering",function(){return h})},function(e,t,n){"use strict";function i(e){return a(e)?e:e.split(t.SEPARATOR)[0]}function r(e){if(a(e))return e;var n=e.indexOf(t.SEPARATOR);return e.substring(n+1)}function o(e,n){return e=e.toString(),n?n+t.SEPARATOR+e:e}function a(e){return e===t.EMPTY_ID||e.indexOf(t.SEPARATOR)<0}function s(e){return e!==t.EMPTY_ID&&e.indexOf(t.SEPARATOR)<0}Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_ID="",t.ZERO_LEVEL_ZERO_NODE_ID="0",t.SEPARATOR="_",t.getItemById=function e(t,n){if(s(t))return n[Number(t)];var o=n[Number(i(t))];return o&&o.items&&o.items.length?e(r(t),o.items):void 0},t.getRootParentId=i,t.getIdWithoutRootParentId=r,t.getFirstChildId=function(e){return o("0",e)},t.createId=o,t.getDirectParentId=function(e){var n=e.lastIndexOf(t.SEPARATOR);return n<0?t.EMPTY_ID:e.substring(0,n)},t.isIdEmptyOrZeroLevel=a,t.isIdZeroLevel=s,t.getAllShortIds=function(e){return e.split(t.SEPARATOR)},t.getShortId=function(e){var n=e.lastIndexOf(t.SEPARATOR);return n<0?e:e.substring(n+1)}},function(e,t,n){"use strict";var i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=n(5);function a(e){return Boolean(e.items&&e.items.length)}t.isItemExpandedAndWithChildren=function(e,t){return t.expanded(e)&&a(e)},t.resolveItemId=function(e,t){return function e(t,n,i){for(var o=void 0,s=0;s<n.length;s++){var c=n[s];if(t(c)){o=r.createId(s,i);break}if(a(c)&&(o=e(t,c.items,r.createId(s,i))))break}return o}(e,t,r.EMPTY_ID)},t.updateItem=function e(t,n,o){for(var a=[],s=0;s<t.length;s++)if(Number(r.getRootParentId(n))===s){var c=i({},t[s]);r.isIdZeroLevel(n)?o(c):t[s].items&&(c.items=e(t[s].items,r.getIdWithoutRootParentId(n),o)),a.push(c)}else a.push(t[s]);return a},t.hasChildren=a,t.isEnabledAndAllParentsEnabled=function(e,t,n){for(var i=r.getAllShortIds(e),o=t,a=0;a<i.length;a++){var s=o[Number(i[a])];if(n.disabled(s))return!1;o=s.items}return!0},t.getAllDirectIndirectChildrenIds=function(e,t,n){return n?function e(t){var i=[];if(t.items)for(var r=0;r<t.items.length;r++)i.push(o.getNestedValue(n,t.items[r])),i=i.concat(e(t.items[r]));return i}(e):function e(t,n){var i=[];if(t.items)for(var o=0;o<t.items.length;o++){var a=r.createId(o,n);i.push(a),i=i.concat(e(t.items[o],a))}return i}(e,t)},t.areAllDirectChildrenChecked=function(e,t,n,i){return!e.items||e.items.every(function(e,a){return i.indexOf(n?o.getNestedValue(n,e):r.createId(a,t))>-1})},t.getAllParents=function(e,t){for(var n=[],i=r.getAllShortIds(e),o=t,a=0;a<i.length-1&&o;a++){var s=o[Number(i[a])];n.push(s),o=s.items}return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNestedValue=function(e,t){var n=(e||"").split("."),i=t;return n.forEach(function(e){i=i?i[e]:void 0}),i},t.isArray=function(e){return void 0!==e.length}},function(e,t){e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXPAND_FIELD="expanded",t.SELECT_FIELD="selected",t.CHECK_FIELD="checked",t.CHECK_INDETERMINATE_FIELD="checkIndeterminate"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(9);t.TreeView=i.default;var r=n(13);t.processTreeViewItems=r.default;var o=n(14);t.handleTreeViewCheckChange=o.handleTreeViewCheckChange},function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=n(0),s=n(2),c=n(10),l=n(4),p=n(11),d=n(3),u=n(12),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={focusedItemId:void 0,focusedItemPublicId:void 0,tabbableItemId:d.ZERO_LEVEL_ZERO_NODE_ID},t.onCheckChange=function(e,n,i){t.setFocus(i),t.dispatchCheckChange(e,n,i)},t.onExpandChange=function(e,n,i){t.setFocus(i),t.dispatchExpandChange(e,n,i)},t.onDragStart=function(){},t.onDrop=function(){},t.onDragOver=function(){},t.onItemClick=function(e,n,i){t.setFocus(i),t.dispatchItemClick(e,n,i)},t.onFocus=function(){clearTimeout(t.blurRequest),void 0===t.state.focusedItemId&&t.data.length&&t.setFocus(t.state.tabbableItemId)},t.onBlur=function(){clearTimeout(t.blurRequest),t.blurRequest=setTimeout(function(){return t.setFocus(void 0)},0)},t.onKeyDown=function(e){var n=t.getFocusedItem();if(n){var i=c.default(n,t.state.focusedItemId,t.data,e.keyCode,t.fieldsSvc);i!==t.state.focusedItemId&&(e.preventDefault(),t.setFocus(i)),t.dispatchEventsOnKeyDown(e,n)}},t}return r(t,e),t.prototype.render=function(){var e=this;return this.fieldsSvc=new u.default(this.props),o.createElement("div",{className:"k-widget k-treeview",onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,role:"tree","aria-multiselectable":!!this.ariaMultiSelectable||void 0,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},o.createElement("ul",{className:"k-treeview-lines",role:"group"},this.data.map(function(t,n){return o.createElement(p.default,{item:t,animate:e.props.animate,itemId:n.toString(),focusedItemId:e.state.focusedItemId,tabbableItemId:e.state.tabbableItemId,fieldsService:e.fieldsSvc,itemRender:e.props.itemRender,checkboxes:e.props.checkboxes,ariaMultiSelectable:e.ariaMultiSelectable,onItemClick:e.onItemClick,draggable:!1,onDragStart:e.onDragStart,onDragOver:e.onDragOver,onDrop:e.onDrop,expandIcons:e.props.expandIcons,onExpandChange:e.onExpandChange,onCheckChange:e.onCheckChange,key:n})})))},t.prototype.componentDidUpdate=function(){var e=this;if(this.fieldsSvc.focusIdField){var t=this.state.focusedItemPublicId;if(t){var n=this.props.getFocusHierarchicalIndex?this.props.getFocusHierarchicalIndex(t):l.resolveItemId(function(n){return e.fieldsSvc.focusId(n)===t},this.data);n!==this.state.focusedItemId&&this.setState({focusedItemId:n})}}},t.prototype.dispatchEventsOnKeyDown=function(e,t){var n=this,i=function(){return l.isEnabledAndAllParentsEnabled(n.state.focusedItemId,n.data,n.fieldsSvc)};e.keyCode===s.Keys.left&&this.fieldsSvc.expanded(t)&&i()?this.dispatchExpandChange(e,t,this.state.focusedItemId):e.keyCode===s.Keys.right&&!this.fieldsSvc.expanded(t)&&(this.fieldsSvc.hasChildren(t)||l.hasChildren(t))&&i()?this.dispatchExpandChange(e,t,this.state.focusedItemId):e.keyCode===s.Keys.enter&&i()?this.dispatchItemClick(e,t,this.state.focusedItemId):e.keyCode===s.Keys.space&&i()&&this.dispatchCheckChange(e,t,this.state.focusedItemId)},t.prototype.setFocus=function(e){if(e)if(this.fieldsSvc.focusIdField){var t=this.getItemById(e);this.setState({focusedItemId:e,focusedItemPublicId:this.fieldsSvc.focusId(t)})}else this.setState({focusedItemId:e});else this.setState(function(e){return{focusedItemId:void 0,focusedItemPublicId:void 0,tabbableItemId:e.focusedItemId}})},t.prototype.getFocusedItem=function(){return this.state.focusedItemId?this.getItemById(this.state.focusedItemId):void 0},t.prototype.getItemById=function(e){return d.getItemById(e,this.data)},t.prototype.dispatchCheckChange=function(e,t,n){s.dispatchEvent(this.props.onCheckChange,e,this,{item:t,itemHierarchicalIndex:n})},t.prototype.dispatchExpandChange=function(e,t,n){s.dispatchEvent(this.props.onExpandChange,e,this,{item:t,itemHierarchicalIndex:n})},t.prototype.dispatchItemClick=function(e,t,n){s.dispatchEvent(this.props.onItemClick,e,this,{item:t,itemHierarchicalIndex:n})},Object.defineProperty(t.prototype,"ariaMultiSelectable",{get:function(){return!0===this.props["aria-multiselectable"]||"true"===this.props["aria-multiselectable"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this.props.data||[]},enumerable:!0,configurable:!0}),t.propTypes={data:a.arrayOf(a.any),animate:a.bool,focusIdField:a.string,getHierarchicalIndexById:a.func,onExpandChange:a.func,onItemClick:a.func,expandField:a.string,selectField:a.string,hasChildrenField:a.string,textField:a.string,disableField:a.string,itemRender:a.any,"aria-multiselectable":a.oneOfType([a.bool,a.oneOf(["false","true"])]),"aria-label":a.string,"aria-labelledby":a.string},t.defaultProps={animate:!0},t}(o.Component);t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(4);t.default=function(e,t,n,a,s){switch(a){case i.Keys.left:return r.isIdZeroLevel(t)||s.expanded(e)&&o.isEnabledAndAllParentsEnabled(t,n,s)?t:r.getDirectParentId(t);case i.Keys.right:return o.isItemExpandedAndWithChildren(e,s)?r.getFirstChildId(t):t;case i.Keys.up:return c=Number(r.getShortId(t)),l=r.getDirectParentId(t),c?function e(t,n,i){var a=r.getItemById(t,n);return o.isItemExpandedAndWithChildren(a,i)?e(r.createId(a.items.length-1,t),n,i):t}(r.createId(c-1,l),n,s):r.isIdZeroLevel(t)?t:l;case i.Keys.down:return o.isItemExpandedAndWithChildren(e,s)?r.getFirstChildId(t):function e(t,n){var i=r.getDirectParentId(t),o=i?r.getItemById(i,n):void 0,a=o?o.items:n,s=Number(r.getShortId(t));return s<a.length-1?r.createId(s+1,i):o?e(i,n):void 0}(t,n)||t;case i.Keys.home:return r.ZERO_LEVEL_ZERO_NODE_ID;case i.Keys.end:return function(){for(var e=(n.length-1).toString(),t=n[n.length-1];o.isItemExpandedAndWithChildren(t,s);)e=r.createId(t.items.length-1,e),t=t.items[t.items.length-1];return e}();default:return t}var c,l}},function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=n(2),s=n(3),c=n(4),l=n(15),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.guid=a.guid(),t.onCheckChange=function(e){t.props.onCheckChange(e,t.item,t.itemId)},t.onExpandChange=function(e){t.props.onExpandChange(e,t.item,t.itemId)},t.onItemClick=function(e){t.props.onItemClick(e,t.item,t.itemId)},t.onDragStart=function(e){t.props.draggable&&t.props.onDragStart(e,t.item,t.itemId)},t.onDrop=function(e){t.props.onDrop(e,t.item,t.itemId,t.getDropZonePosition(e.clientY))},t.onDragOver=function(e){t.props.onDragOver(e,t.item,t.itemId,t.getDropZonePosition(e.clientY))},t}return r(t,e),t.prototype.render=function(){var e=this,t=this.renderSubitemsIfApplicable();return o.createElement("li",{className:this.getRootClassName(),tabIndex:this.tabIndex,role:"treeitem","aria-expanded":this.ariaExpanded,"aria-selected":this.ariaSelected,"aria-checked":this.ariaChecked,"aria-disabled":!!this.fieldsSvc.disabled(this.item)||void 0,ref:function(t){return e.itemElement=t}},o.createElement("div",{className:"k-mid",onDragOver:this.onDragOver,onDrop:this.onDrop,ref:function(t){return e.dropZone=t}},this.renderExpandIcon(),this.renderCheckbox(),o.createElement("span",{className:this.getContentClassName(),onClick:this.onItemClick,draggable:this.props.draggable,onDragStart:this.onDragStart},this.props.itemRender?o.createElement(this.props.itemRender,{item:this.item,itemHierarchicalIndex:this.itemId}):this.fieldsSvc.text(this.item))),this.props.animate?o.createElement(l.Reveal,{transitionEnterDuration:200,transitionExitDuration:200,style:{display:"block"},children:t}):t)},t.prototype.componentDidMount=function(){var e=this.props.focusedItemId,t=this.itemId;e&&e===t&&this.itemElement.focus(),this.checkboxElement&&(this.checkboxElement.indeterminate=this.fieldsSvc.checkIndeterminate(this.item))},t.prototype.componentDidUpdate=function(e){var t=this.props.focusedItemId;if(t&&t!==e.focusedItemId&&t===this.itemId&&this.itemElement.focus(),this.checkboxElement){var n=this.fieldsSvc.checkIndeterminate(this.item);n!==e.fieldsService.checkIndeterminate(e.item)&&(this.checkboxElement.indeterminate=n)}},t.prototype.renderCheckbox=function(){var e=this;return this.props.checkboxes?o.createElement("div",{className:"k-checkbox-wrapper"},o.createElement("input",{type:"checkbox",className:"k-checkbox",checked:Boolean(this.fieldsSvc.checked(this.item)),id:this.guid,tabIndex:-1,onChange:this.onCheckChange,ref:function(t){return e.checkboxElement=t}}),o.createElement("label",{className:"k-checkbox-label",htmlFor:this.guid})):void 0},t.prototype.renderExpandIcon=function(){return this.props.expandIcons&&(this.fieldsSvc.hasChildren(this.item)||c.hasChildren(this.item))?o.createElement("span",{className:this.getIconClassName(),onClick:this.onExpandChange}):void 0},t.prototype.renderSubitemsIfApplicable=function(){var e=this;return c.isItemExpandedAndWithChildren(this.item,this.fieldsSvc)?o.createElement("ul",{className:"k-content",role:"group"},this.item.items.map(function(n,i){return o.createElement(t,{item:n,animate:e.props.animate,itemId:s.createId(i,e.itemId),focusedItemId:e.props.focusedItemId,tabbableItemId:e.props.tabbableItemId,fieldsService:e.props.fieldsService,itemRender:e.props.itemRender,checkboxes:e.props.checkboxes,ariaMultiSelectable:e.props.ariaMultiSelectable,onItemClick:e.props.onItemClick,draggable:e.props.draggable,onDragStart:e.props.onDragStart,onDragOver:e.props.onDragOver,onDrop:e.props.onDrop,expandIcons:e.props.expandIcons,onExpandChange:e.props.onExpandChange,onCheckChange:e.props.onCheckChange,key:i})})):void 0},t.prototype.getDropZonePosition=function(e){var t=this.dropZone.getBoundingClientRect(),n=t.y;return n+t.height-e<5?"after":e-n<5?"before":"over"},Object.defineProperty(t.prototype,"fieldsSvc",{get:function(){return this.props.fieldsService},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"itemId",{get:function(){return this.props.itemId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabIndex",{get:function(){return(this.props.focusedItemId||this.props.tabbableItemId)===this.itemId?0:-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ariaExpanded",{get:function(){return this.fieldsSvc.hasChildren(this.item)||c.hasChildren(this.item)?Boolean(this.fieldsSvc.expanded(this.item)):void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ariaChecked",{get:function(){return this.props.checkboxes?this.fieldsSvc.checked(this.item)?"true":this.fieldsSvc.checkIndeterminate(this.item)?"mixed":"false":void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ariaSelected",{get:function(){return!!this.fieldsSvc.selected(this.item)||(this.props.ariaMultiSelectable?!!this.fieldsSvc.disabled(this.item)&&void 0:void 0)},enumerable:!0,configurable:!0}),t.prototype.getIconClassName=function(){return a.classNames("k-icon",{"k-i-expand":!this.fieldsSvc.expanded(this.item),"k-i-collapse":this.fieldsSvc.expanded(this.item),"k-i-loading":this.fieldsSvc.expanded(this.item)&&!c.hasChildren(this.item)})},t.prototype.getRootClassName=function(){return a.classNames("k-item k-treeview-item",{"k-state-disabled":this.fieldsSvc.disabled(this.item)})},t.prototype.getContentClassName=function(){return a.classNames("k-in",{"k-state-focused":this.props.focusedItemId===this.itemId,"k-state-selected":this.fieldsSvc.selected(this.item)})},t}(o.Component);t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7),r=n(5),o=function(){function e(e){this.expandField=e.expandField||i.EXPAND_FIELD,this.selectField=e.selectField||i.SELECT_FIELD,this.hasChildrenField=e.hasChildrenField||"hasChildren",this.textField=e.textField||"text",this.disableField=e.disableField||"disabled",this.checkField=e.checkField||i.CHECK_FIELD,this.checkIndeterminateField=e.checkIndeterminateField||i.CHECK_INDETERMINATE_FIELD,this.focusIdField=e.focusIdField}return e.prototype.expanded=function(e){return r.getNestedValue(this.expandField,e)},e.prototype.selected=function(e){return r.getNestedValue(this.selectField,e)},e.prototype.text=function(e){return r.getNestedValue(this.textField,e)},e.prototype.disabled=function(e){return r.getNestedValue(this.disableField,e)},e.prototype.hasChildren=function(e){return r.getNestedValue(this.hasChildrenField,e)},e.prototype.checked=function(e){return r.getNestedValue(this.checkField,e)},e.prototype.checkIndeterminate=function(e){return r.getNestedValue(this.checkIndeterminateField,e)},e.prototype.focusId=function(e){return this.focusIdField&&r.getNestedValue(this.focusIdField,e)},e}();t.default=o},function(e,t,n){"use strict";var i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),o=n(7),a=n(5);function s(e,t,n){if(n){var i=c(n,t),o=i.ids,s=i.field,p=o;return!a.isArray(n)&&n.idField&&(p=function(e,t,n){var i=[];return e.forEach(function(e){i.push(r.resolveItemId(function(n){return a.getNestedValue(t,n)===e},n))}),i}(o,n.idField,e)),function(e,t,n){var i=e;return t.forEach(function(e){i=r.updateItem(i,e,function(e){return l(n,e)})}),i}(e,p,s)}return e}function c(e,t){var n,i;return a.isArray(e)?(n=e,i=t):(n=e.ids||[],i=e.operationField||t),{ids:n,field:i}}function l(e,t){for(var n=(e||"").split("."),r=t,o=0;o<n.length;o++){var a=n[o];if(o===n.length-1)r[a]=!0;else{if(void 0===r[a])return;r[a]=i({},r[a]),r=r[a]}}}function p(e,t,n,i){for(var r=!1,o=0;o<e.length;o++){var s=e[o];if(a.getNestedValue(n,s)){if(!r)for(var c=0;c<t.length;c++)l(i,t[c]);r=!0,s.items&&p(s.items,[],n,i)}else s.items&&p(s.items,r?[s]:t.concat([s]),n,i)}}t.default=function(e,t){var n=e;return e&&e.length?(n=s(n,o.EXPAND_FIELD,t.expand),n=s(n,o.SELECT_FIELD,t.select),function(e,t){if(t&&!a.isArray(t)&&t.applyCheckIndeterminate)for(var n=c(t,o.CHECK_FIELD).field,i=t.checkIndeterminateField||o.CHECK_INDETERMINATE_FIELD,r=0;r<e.length;r++){var s=e[r];s.items&&p(s.items,a.getNestedValue(n,s)?[]:[s],n,i)}}(n=s(n,o.CHECK_FIELD,t.check),t.check),n):[]}},function(e,t,n){"use strict";var i=this&&this.__generator||function(e,t){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),o=n(3),a=n(5);t.handleTreeViewCheckChange=function(e,t,n,s){if(void 0===s&&(s={}),!n||!n.length)return[];var c,l=function(e){var t,n=void 0;return a.isArray(e)?t=e:(t=e.ids||[],n=e.idField),{ids:t,idField:n}}(t),p=l.ids,d=l.idField,u=d?a.getNestedValue(d,e.item):e.itemHierarchicalIndex,f=p.indexOf(u),h=-1===f;return s.singleMode?c=h?[u]:[]:(c=p.slice(),h?c.push(u):c.splice(f,1),s.checkChildren&&function(e,t,n,i,o){r.getAllDirectIndirectChildrenIds(e,t,i).forEach(function(e){n&&-1===o.indexOf(e)?o.push(e):!n&&o.indexOf(e)>-1&&o.splice(o.indexOf(e),1)})}(e.item,e.itemHierarchicalIndex,h,d,c),s.checkParents&&function(e,t,n,s,c){var l=function(){var s,l,p;return i(this,function(i){switch(i.label){case 0:if(!n)return[3,5];s=r.getAllParents(e,c),l=s.length-1,i.label=1;case 1:return l>-1?[4,{id:a.getNestedValue(n,s[l]),item:t?s[l]:void 0}]:[3,4];case 2:i.sent(),i.label=3;case 3:return l--,[3,1];case 4:return[3,8];case 5:p=o.getDirectParentId(e),i.label=6;case 6:return p?[4,{id:p,item:t?o.getItemById(p,c):void 0}]:[3,8];case 7:return i.sent(),p=o.getDirectParentId(p),[3,6];case 8:return[2]}})}(),p=l.next();t?function(){for(;!p.done;){var e=p.value,t=e.id,i=e.item;if(-1!==s.indexOf(t)||!r.areAllDirectChildrenChecked(i,t,n,s))break;s.push(t),p=l.next()}}():function(){for(;!p.done;){var e=p.value.id,t=s.indexOf(e);if(!(t>-1))break;s.splice(t,1),p=l.next()}}()}(e.itemHierarchicalIndex,h,d,c,n)),a.isArray(t)?c:Object.assign({},t,{ids:c})}},function(e,t,n){"use strict";n.r(t);var i,r=n(1),o=n(0),a=n(2),s=n(6),c={outerHeight:function(e){if(!e)return 0;var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop),i=parseFloat(t.marginBottom);return e.offsetHeight+n+i},outerWidth:function(e){if(!e)return 0;var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginLeft),i=parseFloat(t.marginRight);return e.offsetWidth+n+i},styles:{"animation-container":"k-animation-container","animation-container-relative":"k-animation-container-relative","animation-container-fixed":"k-animation-container-fixed","push-right-enter":"k-push-right-enter","push-right-appear":"k-push-right-appear","push-right-enter-active":"k-push-right-enter-active","push-right-appear-active":"k-push-right-appear-active","push-right-exit":"k-push-right-exit","push-right-exit-active":"k-push-right-exit-active","push-left-enter":"k-push-left-enter","push-left-appear":"k-push-left-appear","push-left-enter-active":"k-push-left-enter-active","push-left-appear-active":"k-push-left-appear-active","push-left-exit":"k-push-left-exit","push-left-exit-active":"k-push-left-exit-active","push-down-enter":"k-push-down-enter","push-down-appear":"k-push-down-appear","push-down-enter-active":"k-push-down-enter-active","push-down-appear-active":"k-push-down-appear-active","push-down-exit":"k-push-down-exit","push-down-exit-active":"k-push-down-exit-active","push-up-enter":"k-push-up-enter","push-up-appear":"k-push-up-appear","push-up-enter-active":"k-push-up-enter-active","push-up-appear-active":"k-push-up-appear-active","push-up-exit":"k-push-up-exit","push-up-exit-active":"k-push-up-exit-active",expand:"k-expand","expand-vertical-enter":"k-expand-vertical-enter","expand-vertical-appear":"k-expand-vertical-appear","expand-vertical-enter-active":"k-expand-vertical-enter-active","expand-vertical-appear-active":"k-expand-vertical-appear-active","expand-vertical-exit":"k-expand-vertical-exit","expand-vertical-exit-active":"k-expand-vertical-exit-active","expand-horizontal-enter":"k-expand-horizontal-enter","expand-horizontal-appear":"k-expand-horizontal-appear","expand-horizontal-enter-active":"k-expand-horizontal-enter-active","expand-horizontal-appear-active":"k-expand-horizontal-appear-active","expand-horizontal-exit":"k-expand-horizontal-exit","expand-horizontal-exit-active":"k-expand-horizontal-exit-active","child-animation-container":"k-child-animation-container","fade-enter":"k-fade-enter","fade-appear":"k-fade-appear","fade-enter-active":"k-fade-enter-active","fade-appear-active":"k-fade-appear-active","fade-exit":"k-fade-exit","fade-exit-active":"k-fade-exit-active","zoom-in-enter":"k-zoom-in-enter","zoom-in-appear":"k-zoom-in-appear","zoom-in-enter-active":"k-zoom-in-enter-active","zoom-in-appear-active":"k-zoom-in-appear-active","zoom-in-exit":"k-zoom-in-exit","zoom-in-exit-active":"k-zoom-in-exit-active","zoom-out-enter":"k-zoom-out-enter","zoom-out-appear":"k-zoom-out-appear","zoom-out-enter-active":"k-zoom-out-enter-active","zoom-out-appear-active":"k-zoom-out-appear-active","zoom-out-exit":"k-zoom-out-exit","zoom-out-exit-active":"k-zoom-out-exit-active","slide-in-appear":"k-slide-in-appear",centered:"k-centered","slide-in-appear-active":"k-slide-in-appear-active","slide-down-enter":"k-slide-down-enter","slide-down-appear":"k-slide-down-appear","slide-down-enter-active":"k-slide-down-enter-active","slide-down-appear-active":"k-slide-down-appear-active","slide-down-exit":"k-slide-down-exit","slide-down-exit-active":"k-slide-down-exit-active","slide-up-enter":"k-slide-up-enter","slide-up-appear":"k-slide-up-appear","slide-up-enter-active":"k-slide-up-enter-active","slide-up-appear-active":"k-slide-up-appear-active","slide-up-exit":"k-slide-up-exit","slide-up-exit-active":"k-slide-up-exit-active","slide-right-enter":"k-slide-right-enter","slide-right-appear":"k-slide-right-appear","slide-right-enter-active":"k-slide-right-enter-active","slide-right-appear-active":"k-slide-right-appear-active","slide-right-exit":"k-slide-right-exit","slide-right-exit-active":"k-slide-right-exit-active","slide-left-enter":"k-slide-left-enter","slide-left-appear":"k-slide-left-appear","slide-left-enter-active":"k-slide-left-enter-active","slide-left-appear-active":"k-slide-left-appear-active","slide-left-exit":"k-slide-left-exit","slide-left-exit-active":"k-slide-left-exit-active","reveal-vertical-enter":"k-reveal-vertical-enter","reveal-vertical-appear":"k-reveal-vertical-appear","reveal-vertical-enter-active":"k-reveal-vertical-enter-active","reveal-vertical-appear-active":"k-reveal-vertical-appear-active","reveal-vertical-exit":"k-reveal-vertical-exit","reveal-vertical-exit-active":"k-reveal-vertical-exit-active","reveal-horizontal-enter":"k-reveal-horizontal-enter","reveal-horizontal-appear":"k-reveal-horizontal-appear","reveal-horizontal-enter-active":"k-reveal-horizontal-enter-active","reveal-horizontal-appear-active":"k-reveal-horizontal-appear-active","reveal-horizontal-exit":"k-reveal-horizontal-exit","reveal-horizontal-exit-active":"k-reveal-horizontal-exit-active"}},l=(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),p=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},d=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&(n[i[r]]=e[i[r]])}return n},u=c.styles,f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this,t=this.props,n=t.children,i=t.style,o=t.appear,c=t.enter,l=t.exit,f=t.transitionName,h=t.transitionEnterDuration,m=t.transitionExitDuration,v=t.className,y=t.onEnter,g=t.onEntering,b=t.onEntered,x=t.onExit,I=t.onExiting,O=t.onExited,E=t.mountOnEnter,k=t.unmountOnExit,C=t.animationEnteringStyle,_=t.animationEnteredStyle,S=t.animationExitingStyle,P=t.animationExitedStyle,w=d(t,["children","style","appear","enter","exit","transitionName","transitionEnterDuration","transitionExitDuration","className","onEnter","onEntering","onEntered","onExit","onExiting","onExited","mountOnEnter","unmountOnExit","animationEnteringStyle","animationEnteredStyle","animationExitingStyle","animationExitedStyle"]),D=Object(a.classNames)(v,u["child-animation-container"]),j=p({transitionDelay:"0ms"},i),F={entering:p({transitionDuration:h+"ms"},C),entered:p({},_),exiting:p({transitionDuration:m+"ms"},S),exited:p({},P)},N={in:this.props.in,appear:o,enter:c,exit:l,mountOnEnter:E,unmountOnExit:k,timeout:{enter:h,exit:m},onEnter:function(t){y&&y.call(void 0,{animatedElement:t,target:e})},onEntering:function(t){g&&g.call(void 0,{animatedElement:t,target:e})},onEntered:function(t){b&&b.call(void 0,{animatedElement:t,target:e})},onExit:function(t){x&&x.call(void 0,{animatedElement:t,target:e})},onExiting:function(t){I&&I.call(void 0,{animatedElement:t,target:e})},onExited:function(t){O&&O.call(void 0,{animatedElement:t,target:e})},classNames:{appear:u[f+"-appear"]||f+"-appear",appearActive:u[f+"-appear-active"]||f+"-appear-active",enter:u[f+"-enter"]||f+"-enter",enterActive:u[f+"-enter-active"]||f+"-enter-active",exit:u[f+"-exit"]||f+"-exit",exitActive:u[f+"-exit-active"]||f+"-exit-active"}};return r.createElement(s.CSSTransition,p({},N,w),function(t){return r.createElement("div",{style:p({},j,F[t]),className:D,ref:function(t){e._element=t}},n)})},t.propTypes={in:o.bool,children:o.oneOfType([o.arrayOf(o.node),o.node]),transitionName:o.string.isRequired,className:o.string,appear:o.bool,enter:o.bool,exit:o.bool,transitionEnterDuration:o.number.isRequired,transitionExitDuration:o.number.isRequired,mountOnEnter:o.bool,unmountOnExit:o.bool,animationEnteringStyle:o.object,animationEnteredStyle:o.object,animationExitingStyle:o.object,animationExitedStyle:o.object},t.defaultProps={mountOnEnter:!0,unmountOnExit:!1,onEnter:a.noop,onEntering:a.noop,onEntered:a.noop,onExit:a.noop,onExiting:a.noop,onExited:a.noop,animationEnteringStyle:{},animationEnteredStyle:{},animationExitingStyle:{},animationExitedStyle:{}},t}(r.Component),h=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),m=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},v=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&(n[i[r]]=e[i[r]])}return n},y=c.styles,g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t.prototype.render=function(){var e=this.props,t=e.id,n=e.style,i=e.children,o=e.component,c=e.className,l=e.childFactory,p=(e.stackChildren,e.componentChildStyle),d=e.componentChildClassName,u=v(e,["id","style","children","component","className","childFactory","stackChildren","componentChildStyle","componentChildClassName"]),h={id:t,style:n,component:o,childFactory:l,className:Object(a.classNames)(y["animation-container"],y["animation-container-relative"],c)},g=r.Children.map(i,function(e){return r.createElement(f,m({},u,{style:p,className:d}),e)});return r.createElement(s.TransitionGroup,m({},h),g)},t.propTypes={children:o.oneOfType([o.arrayOf(o.node),o.node]),childFactory:o.any,className:o.string,component:o.string,id:o.string,style:o.any,transitionName:o.string.isRequired,appear:o.bool.isRequired,enter:o.bool.isRequired,exit:o.bool.isRequired,transitionEnterDuration:o.number.isRequired,transitionExitDuration:o.number.isRequired},t.defaultProps={component:"div"},t}(r.Component),b=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),x=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},I=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&(n[i[r]]=e[i[r]])}return n},O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return b(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=I(e,["children"]);return r.createElement(g,x({},{transitionName:"fade"},n),t)},t.propTypes={children:o.oneOfType([o.arrayOf(o.node),o.node]),childFactory:o.any,className:o.string,component:o.string,id:o.string,style:o.any},t.defaultProps={appear:!1,enter:!0,exit:!1,transitionEnterDuration:500,transitionExitDuration:500},t}(r.Component),E=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),k=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},C=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&(n[i[r]]=e[i[r]])}return n},_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return E(t,e),t.prototype.render=function(){var e=this.props,t=e.direction,n=e.children,i=C(e,["direction","children"]),o={transitionName:"expand-"+t};return r.createElement(g,k({},o,i),n)},t.propTypes={children:o.oneOfType([o.arrayOf(o.node),o.node]),childFactory:o.any,className:o.string,direction:o.oneOf(["horizontal","vertical"]),component:o.string,id:o.string,style:o.any},t.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"},t}(r.Component),S=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),P=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},w=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&(n[i[r]]=e[i[r]])}return n},D={position:"absolute",top:"0",left:"0"},j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return S(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.direction,i=w(e,["children","direction"]);return r.createElement(g,P({},i,{transitionName:"push-"+n,animationExitingStyle:this.props.stackChildren?D:void 0}),t)},t.propTypes={children:o.oneOfType([o.arrayOf(o.node),o.node]),childFactory:o.any,className:o.string,direction:o.oneOf(["up","down","left","right"]),component:o.string,id:o.string,style:o.any,stackChildren:o.bool},t.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"right",stackChildren:!1},t}(r.Component),F=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),N=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},A=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&(n[i[r]]=e[i[r]])}return n},R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return F(t,e),t.prototype.render=function(){var e=this.props,t=e.direction,n=e.children,i=A(e,["direction","children"]),o={transitionName:"slide-"+t};return r.createElement(g,N({},o,i),n)},t.propTypes={children:o.oneOfType([o.arrayOf(o.node),o.node]),childFactory:o.any,className:o.string,direction:o.oneOf(["up","down","left","right"]),component:o.string,id:o.string,style:o.any},t.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"down"},t}(r.Component),T=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),z=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},M=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&(n[i[r]]=e[i[r]])}return n},L={position:"absolute",top:"0",left:"0"},H=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return T(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.direction,i=M(e,["children","direction"]);return r.createElement(g,z({},i,{transitionName:"zoom-"+n,animationExitingStyle:this.props.stackChildren?L:void 0}),t)},t.propTypes={children:o.oneOfType([o.arrayOf(o.node),o.node]),childFactory:o.any,className:o.string,direction:o.oneOf(["in","out"]),component:o.string,id:o.string,style:o.any,stackChildren:o.bool},t.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"out",stackChildren:!1},t}(r.Component),V=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),K=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},W=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&(n[i[r]]=e[i[r]])}return n},B=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={maxHeight:void 0,maxWidth:void 0},t.componentWillEnter=function(e){var n=t.props.onEnter;t.updateContainerDimensions(e.animatedElement,function(){n&&n.call(void 0,e)})},t.componentIsEntering=function(e){var n=t.props.onEntering;t.updateContainerDimensions(e.animatedElement,function(){n&&n.call(void 0,e)})},t.componentWillExit=function(e){var n=t.props.onExit;t.updateContainerDimensions(e.animatedElement,function(){n&&n.call(void 0,e)})},t.updateContainerDimensions=function(e,n){void 0===n&&(n=a.noop);var i=e.firstChild;if(i){var r=c.outerHeight(i),o=c.outerWidth(i);t.setState({maxHeight:r,maxWidth:o},n)}},t}return V(t,e),t.prototype.render=function(){var e,t=this.props,n=t.direction,i=t.children,o=t.childFactory,a=W(t,["direction","children","childFactory"]),s=this.state,c=s.maxHeight,l=s.maxWidth,p={maxHeight:(e="vertical"===n?{maxHeight:c?c+"px":null}:{maxWidth:l?l+"px":null}).maxHeight,maxWidth:e.maxWidth};return r.createElement(g,K({},a,{childFactory:o||function(t){return t.props.in?t:r.cloneElement(t,K({},t.props,{style:K({},t.props.style,{maxHeight:e.maxHeight,maxWidth:e.maxWidth})}))},onEnter:this.componentWillEnter,onEntering:this.componentIsEntering,onExit:this.componentWillExit,animationEnteringStyle:p,transitionName:"reveal-"+n}),i)},t.propTypes={children:o.oneOfType([o.arrayOf(o.node),o.node]),childFactory:o.any,className:o.string,direction:o.oneOf(["horizontal","vertical"]),component:o.string,id:o.string,style:o.any},t.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"},t}(r.Component);n.d(t,"Animation",function(){return g}),n.d(t,"AnimationChild",function(){return f}),n.d(t,"Fade",function(){return O}),n.d(t,"Expand",function(){return _}),n.d(t,"Push",function(){return j}),n.d(t,"Slide",function(){return R}),n.d(t,"Zoom",function(){return H}),n.d(t,"Reveal",function(){return B})}])});

@@ -29,1 +29,14 @@ import { BaseEvent } from '@progress/kendo-react-common';

}
/**
* Represents the object of the `onCheckChange` event ([see example]({% slug check_items_directly_treeview %})).
*/
export interface TreeViewCheckChangeEvent extends BaseEvent<TreeView> {
/**
* The item that is checked or unchecked.
*/
item: any;
/**
* The hierarchical index of the item. The indices are zero-based. The first root item has a `0` (zero) index. If the first root item has children, the first child acquires a `0_0` index and the second acquires a `0_1` index.
*/
itemHierarchicalIndex: string;
}

@@ -0,1 +1,15 @@

// export interface TreeViewItemDragOverEvent extends BaseEvent<TreeView> {
// item: any;
// itemHierarchicalIndex: string;
// position: 'before' | 'over' | 'after';
// }
// export interface TreeViewItemDropEvent extends BaseEvent<TreeView> {
// item: any;
// itemHierarchicalIndex: string;
// position: 'before' | 'over' | 'after';
// }
// export interface TreeViewItemDragStartEvent extends BaseEvent<TreeView> {
// item: any;
// itemHierarchicalIndex: string;
// }
//# sourceMappingURL=events.js.map
import TreeView from './TreeView';
import { TreeViewItemClickEvent, TreeViewExpandChangeEvent } from './events';
import { TreeViewItemClickEvent, TreeViewExpandChangeEvent, TreeViewCheckChangeEvent } from './events';
import processTreeViewItems from './processTreeViewItems';
import { TreeViewOperationDescriptor, TreeViewOperationDescriptors } from './TreeViewOperationDescriptors';
import { handleTreeViewCheckChange, TreeViewCheckChangeSettings } from './handleTreeViewCheckChange';
import { TreeViewOperationDescriptor, TreeViewOperationDescriptors, TreeViewCheckDescriptor } from './TreeViewOperationDescriptors';
import { ItemRenderProps } from './ItemRenderProps';
import { TreeViewProps } from './TreeViewProps';
export { TreeView, processTreeViewItems, TreeViewItemClickEvent, TreeViewExpandChangeEvent, TreeViewOperationDescriptor, TreeViewOperationDescriptors, TreeViewProps, ItemRenderProps };
export { TreeView, processTreeViewItems, handleTreeViewCheckChange, TreeViewCheckChangeSettings, TreeViewItemClickEvent, TreeViewExpandChangeEvent, TreeViewCheckChangeEvent, TreeViewOperationDescriptor, TreeViewOperationDescriptors, TreeViewCheckDescriptor, TreeViewProps, ItemRenderProps };
import TreeView from './TreeView';
import processTreeViewItems from './processTreeViewItems';
export { TreeView, processTreeViewItems };
import { handleTreeViewCheckChange } from './handleTreeViewCheckChange';
export { TreeView, processTreeViewItems, handleTreeViewCheckChange };
//# sourceMappingURL=main.js.map

@@ -6,2 +6,3 @@ import { TreeViewOperationDescriptors } from './TreeViewOperationDescriptors';

* * [Selecting and deselecting items]({% slug selection_ways_treeview %}#toc-using-a-helper-function)
* * [Checking and unchecking items]({% slug check_helper_funcs_treeview %})
*

@@ -15,9 +16,11 @@ * @param data - The data that will be processed.

* class App extends React.Component {
* state = { items: tree, expand: [], select: [] };
* state = { items: tree, expand: [], select: [], check: [] };
* render() {
* const { expand, select, check } = this.state;
* return (
* <TreeView
* data={processTreeViewItems(this.state.items, { expand: this.state.expand, select: this.state.select })}
* onExpandChange={this.onExpandChange}
* onItemClick={event => this.setState({ select: [event.itemHierarchicalIndex] })}
* data={processTreeViewItems(this.state.items, { expand, select, check })}
* expandIcons={true} onExpandChange={this.onExpandChange} checkboxes={true}
* onCheckChange={event => this.setState({ check: [ event.itemHierarchicalIndex ] })}
* onItemClick={event => this.setState({ select: [ event.itemHierarchicalIndex ] })}
* />

@@ -50,2 +53,2 @@ * );

*/
export default function processTreeViewItems(data: any[], operations: TreeViewOperationDescriptors): any[];
export default function processTreeViewItems(data: any[] | null | undefined, operations: TreeViewOperationDescriptors): any[];

@@ -11,4 +11,4 @@ /* tslint:disable:max-line-length */

import { updateItem, resolveItemId } from './utils/itemUtils';
import { EXPAND_FIELD, SELECT_FIELD } from './utils/consts';
import { getNestedValue } from './utils/misc';
import { EXPAND_FIELD, SELECT_FIELD, CHECK_FIELD, CHECK_INDETERMINATE_FIELD } from './utils/consts';
import { getNestedValue, isArray } from './utils/misc';
/**

@@ -18,2 +18,3 @@ * A helper function which applies the specified operation descriptors to the data.

* * [Selecting and deselecting items]({% slug selection_ways_treeview %}#toc-using-a-helper-function)
* * [Checking and unchecking items]({% slug check_helper_funcs_treeview %})
*

@@ -27,9 +28,11 @@ * @param data - The data that will be processed.

* class App extends React.Component {
* state = { items: tree, expand: [], select: [] };
* state = { items: tree, expand: [], select: [], check: [] };
* render() {
* const { expand, select, check } = this.state;
* return (
* <TreeView
* data={processTreeViewItems(this.state.items, { expand: this.state.expand, select: this.state.select })}
* onExpandChange={this.onExpandChange}
* onItemClick={event => this.setState({ select: [event.itemHierarchicalIndex] })}
* data={processTreeViewItems(this.state.items, { expand, select, check })}
* expandIcons={true} onExpandChange={this.onExpandChange} checkboxes={true}
* onCheckChange={event => this.setState({ check: [ event.itemHierarchicalIndex ] })}
* onItemClick={event => this.setState({ select: [ event.itemHierarchicalIndex ] })}
* />

@@ -64,4 +67,9 @@ * );

var result = data;
if (!data || !data.length) {
return [];
}
result = handleOperation(result, EXPAND_FIELD, operations.expand);
result = handleOperation(result, SELECT_FIELD, operations.select);
result = handleOperation(result, CHECK_FIELD, operations.check);
applyCheckIndeterminate(result, operations.check);
return result;

@@ -84,2 +92,4 @@ }

var result = [];
// TODO: Most probably the more performant way is the opposite:
// Iterate the tree only once and compare each item id against `publicIds`.
publicIds.forEach(function (publicId) {

@@ -90,5 +100,2 @@ result.push(resolveItemId(function (item) { return getNestedValue(idField, item) === publicId; }, items));

}
function isArray(operation) {
return operation.length !== undefined;
}
function parseOperation(operation, defaultField) {

@@ -131,2 +138,38 @@ var ids;

}
function applyCheckIndeterminate(items, check) {
if (check && !isArray(check) && check.applyCheckIndeterminate) {
var checkField = parseOperation(check, CHECK_FIELD).field;
var checkIndeterminateField = check.checkIndeterminateField || CHECK_INDETERMINATE_FIELD;
for (var i = 0; i < items.length; i++) {
var item = items[i];
if (item.items) {
applyCheckIndeterminateHelper(item.items, getNestedValue(checkField, item) ? [] : [item], checkField, checkIndeterminateField);
}
}
}
}
function applyCheckIndeterminateHelper(data, parents, checkField, checkIndeterminateField) {
// The updates will be direct because the corresponding items
// are already cloned because of their checked children.
var parentsAlreadyUpdated = false;
for (var i = 0; i < data.length; i++) {
var item = data[i];
if (getNestedValue(checkField, item)) {
if (!parentsAlreadyUpdated) {
for (var j = 0; j < parents.length; j++) {
raiseNestedFlag(checkIndeterminateField, parents[j]);
}
}
parentsAlreadyUpdated = true;
if (item.items) {
applyCheckIndeterminateHelper(item.items, [], checkField, checkIndeterminateField);
}
}
else {
if (item.items) {
applyCheckIndeterminateHelper(item.items, parentsAlreadyUpdated ? [item] : parents.concat([item]), checkField, checkIndeterminateField);
}
}
}
}
//# sourceMappingURL=processTreeViewItems.js.map

@@ -77,3 +77,7 @@ import * as React from 'react';

componentDidUpdate(): void;
private onCheckChange;
private onExpandChange;
private onDragStart;
private onDrop;
private onDragOver;
private onItemClick;

@@ -83,9 +87,11 @@ private onFocus;

private onKeyDown;
private dispatchEventsUponKeyboardNavigation;
private dispatchEventsOnKeyDown;
private setFocus;
private getFocusedItem;
private getItemById;
private dispatchCheckChange;
private dispatchExpandChange;
private dispatchItemClick;
private readonly ariaMultiSelectable;
private readonly data;
}

@@ -14,3 +14,3 @@ var __extends = (this && this.__extends) || (function () {

import { Keys, dispatchEvent } from '@progress/kendo-react-common';
import getItemIdUponKeyboardNavigation from './utils/getItemIdUponKeyboardNavigation';
import nav from './utils/getItemIdUponKeyboardNavigation';
import { resolveItemId, isEnabledAndAllParentsEnabled, hasChildren } from './utils/itemUtils';

@@ -48,13 +48,29 @@ import TreeViewItem from './TreeViewItem';

_this.state = { focusedItemId: undefined, focusedItemPublicId: undefined, tabbableItemId: ZERO_LEVEL_ZERO_NODE_ID };
_this.onExpandChange = function (event, itemId) {
_this.onCheckChange = function (event, item, itemId) {
_this.setFocus(itemId);
_this.dispatchExpandChange(event, _this.getItemById(itemId), itemId);
_this.dispatchCheckChange(event, item, itemId);
};
_this.onItemClick = function (event, itemId) {
_this.onExpandChange = function (event, item, itemId) {
_this.setFocus(itemId);
_this.dispatchItemClick(event, _this.getItemById(itemId), itemId);
_this.dispatchExpandChange(event, item, itemId);
};
_this.onDragStart = function () { };
_this.onDrop = function () { };
_this.onDragOver = function () { };
// private onDragStart = (event: React.DragEvent<HTMLElement>, item: any, itemId: string) => {
// dispatchEvent(this.props.onItemDragStart, event, this, { item, itemHierarchicalIndex: itemId });
// }
// private onDrop = (event: React.DragEvent<HTMLElement>, item: any, itemId: string, position: string) => {
// dispatchEvent(this.props.onItemDrop, event, this, { item, itemHierarchicalIndex: itemId, position });
// }
// private onDragOver = (event: React.DragEvent<HTMLElement>, item: any, itemId: string, position: string) => {
// dispatchEvent(this.props.onItemDragOver, event, this, { item, itemHierarchicalIndex: itemId, position });
// }
_this.onItemClick = function (event, item, itemId) {
_this.setFocus(itemId);
_this.dispatchItemClick(event, item, itemId);
};
_this.onFocus = function () {
clearTimeout(_this.blurRequest);
if (_this.state.focusedItemId === undefined && _this.props.data && _this.props.data.length) {
if (_this.state.focusedItemId === undefined && _this.data.length) {
_this.setFocus(_this.state.tabbableItemId);

@@ -70,3 +86,3 @@ }

if (focusedItem) {
var newItemId = getItemIdUponKeyboardNavigation(focusedItem, _this.state.focusedItemId, _this.props.data, event.keyCode, _this.fieldsSvc);
var newItemId = nav(focusedItem, _this.state.focusedItemId, _this.data, event.keyCode, _this.fieldsSvc);
if (newItemId !== _this.state.focusedItemId) {

@@ -77,3 +93,3 @@ // This disables the auto-scroll. The scroll is achieved via item focusing.

}
_this.dispatchEventsUponKeyboardNavigation(event, focusedItem);
_this.dispatchEventsOnKeyDown(event, focusedItem);
}

@@ -90,4 +106,9 @@ };

return (React.createElement("div", { className: "k-widget k-treeview", onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, role: "tree", "aria-multiselectable": this.ariaMultiSelectable ? true : undefined, "aria-label": this.props['aria-label'], "aria-labelledby": this.props['aria-labelledby'] },
React.createElement("ul", { className: "k-treeview-lines", role: "group" }, this.props.data.map(function (item, index) {
return React.createElement(TreeViewItem, { item: item, animate: _this.props.animate, itemId: index.toString(), focusedItemId: _this.state.focusedItemId, tabbableItemId: _this.state.tabbableItemId, fieldsService: _this.fieldsSvc, itemRender: _this.props.itemRender, ariaMultiSelectable: _this.ariaMultiSelectable, onItemClick: _this.onItemClick, onExpandChange: _this.onExpandChange, key: index });
React.createElement("ul", { className: "k-treeview-lines", role: "group" }, this.data.map(function (item, index) {
return React.createElement(TreeViewItem, { item: item, animate: _this.props.animate, itemId: index.toString(), focusedItemId: _this.state.focusedItemId, tabbableItemId: _this.state.tabbableItemId, fieldsService: _this.fieldsSvc, itemRender: _this.props.itemRender, checkboxes: _this.props.checkboxes, ariaMultiSelectable: _this.ariaMultiSelectable, onItemClick: _this.onItemClick, draggable: false, onDragStart: _this.onDragStart, onDragOver: _this.onDragOver, onDrop: _this.onDrop,
// draggable={this.props.draggable}
// onDragStart={this.onDragStart}
// onDragOver={this.onDragOver}
// onDrop={this.onDrop}
expandIcons: _this.props.expandIcons, onExpandChange: _this.onExpandChange, onCheckChange: _this.onCheckChange, key: index });
}))));

@@ -105,3 +126,3 @@ };

this.props.getFocusHierarchicalIndex(focusedItemPublicId_1) :
resolveItemId(function (item) { return _this.fieldsSvc.focusId(item) === focusedItemPublicId_1; }, this.props.data);
resolveItemId(function (item) { return _this.fieldsSvc.focusId(item) === focusedItemPublicId_1; }, this.data);
if (focusedItemId !== this.state.focusedItemId) {

@@ -113,7 +134,7 @@ this.setState({ focusedItemId: focusedItemId });

};
TreeView.prototype.dispatchEventsUponKeyboardNavigation = function (event, focusedItem) {
TreeView.prototype.dispatchEventsOnKeyDown = function (event, focusedItem) {
var _this = this;
// isEnabled is the most expensive op and that is why is left last.
var isEnabled = function () {
return isEnabledAndAllParentsEnabled(_this.state.focusedItemId, _this.props.data, _this.fieldsSvc);
return isEnabledAndAllParentsEnabled(_this.state.focusedItemId, _this.data, _this.fieldsSvc);
};

@@ -123,9 +144,12 @@ if (event.keyCode === Keys.left && this.fieldsSvc.expanded(focusedItem) && isEnabled()) {

}
if (event.keyCode === Keys.right && !this.fieldsSvc.expanded(focusedItem) &&
else if (event.keyCode === Keys.right && !this.fieldsSvc.expanded(focusedItem) &&
(this.fieldsSvc.hasChildren(focusedItem) || hasChildren(focusedItem)) && isEnabled()) {
this.dispatchExpandChange(event, focusedItem, this.state.focusedItemId);
}
if (event.keyCode === Keys.enter && isEnabled()) {
else if (event.keyCode === Keys.enter && isEnabled()) {
this.dispatchItemClick(event, focusedItem, this.state.focusedItemId);
}
else if (event.keyCode === Keys.space && isEnabled()) {
this.dispatchCheckChange(event, focusedItem, this.state.focusedItemId);
}
};

@@ -156,4 +180,7 @@ TreeView.prototype.setFocus = function (focusedItemId) {

TreeView.prototype.getItemById = function (itemId) {
return getItemById(itemId, this.props.data);
return getItemById(itemId, this.data);
};
TreeView.prototype.dispatchCheckChange = function (dispatchedEvent, item, itemId) {
dispatchEvent(this.props.onCheckChange, dispatchedEvent, this, { item: item, itemHierarchicalIndex: itemId });
};
TreeView.prototype.dispatchExpandChange = function (dispatchedEvent, item, itemId) {

@@ -172,2 +199,9 @@ dispatchEvent(this.props.onExpandChange, dispatchedEvent, this, { item: item, itemHierarchicalIndex: itemId });

});
Object.defineProperty(TreeView.prototype, "data", {
get: function () {
return this.props.data || [];
},
enumerable: true,
configurable: true
});
/**

@@ -174,0 +208,0 @@ * @hidden

@@ -19,3 +19,10 @@ import * as React from 'react';

onItemClick: any;
expandIcons?: boolean;
onExpandChange: any;
onCheckChange: any;
checkboxes?: boolean;
draggable?: boolean;
onDragStart: any;
onDragOver: any;
onDrop: any;
}

@@ -32,7 +39,18 @@ /**

private itemElement;
private checkboxElement;
private guid;
private dropZone;
render(): JSX.Element;
componentDidMount(): void;
componentDidUpdate(prevProps: TreeViewItemProps): void;
private renderIcon;
private renderCheckbox;
private renderExpandIcon;
private renderSubitemsIfApplicable;
private onCheckChange;
private onExpandChange;
private onItemClick;
private onDragStart;
private onDrop;
private onDragOver;
private getDropZonePosition;
private readonly fieldsSvc;

@@ -43,2 +61,3 @@ private readonly itemId;

private readonly ariaExpanded;
private readonly ariaChecked;
private readonly ariaSelected;

@@ -45,0 +64,0 @@ private getIconClassName;

@@ -12,6 +12,7 @@ var __extends = (this && this.__extends) || (function () {

import * as React from 'react';
import { classNames } from '@progress/kendo-react-common';
import { classNames, guid } from '@progress/kendo-react-common';
import { createId } from './utils/itemIdUtils';
import { isItemExpandedAndWithChildren, hasChildren } from './utils/itemUtils';
import { Reveal } from '@progress/kendo-react-animation';
var DROPZONE_BOUNDARY_DELTA = 5;
/**

@@ -23,3 +24,25 @@ * @hidden

function TreeViewItem() {
return _super !== null && _super.apply(this, arguments) || this;
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.guid = guid();
_this.onCheckChange = function (e) {
_this.props.onCheckChange(e, _this.item, _this.itemId);
};
_this.onExpandChange = function (e) {
_this.props.onExpandChange(e, _this.item, _this.itemId);
};
_this.onItemClick = function (e) {
_this.props.onItemClick(e, _this.item, _this.itemId);
};
_this.onDragStart = function (e) {
if (_this.props.draggable) {
_this.props.onDragStart(e, _this.item, _this.itemId);
}
};
_this.onDrop = function (e) {
_this.props.onDrop(e, _this.item, _this.itemId, _this.getDropZonePosition(e.clientY));
};
_this.onDragOver = function (e) {
_this.props.onDragOver(e, _this.item, _this.itemId, _this.getDropZonePosition(e.clientY));
};
return _this;
}

@@ -29,6 +52,7 @@ TreeViewItem.prototype.render = function () {

var subitems = this.renderSubitemsIfApplicable();
return (React.createElement("li", { className: this.getRootClassName(), tabIndex: this.tabIndex, role: "treeitem", "aria-expanded": this.ariaExpanded, "aria-selected": this.ariaSelected, "aria-disabled": this.fieldsSvc.disabled(this.item) ? true : undefined, ref: function (el) { return _this.itemElement = el; } },
React.createElement("div", { className: "k-mid" },
this.renderIcon(),
React.createElement("span", { className: this.getContentClassName(), onClick: function (e) { return _this.props.onItemClick(e, _this.itemId); } }, this.props.itemRender ?
return (React.createElement("li", { className: this.getRootClassName(), tabIndex: this.tabIndex, role: "treeitem", "aria-expanded": this.ariaExpanded, "aria-selected": this.ariaSelected, "aria-checked": this.ariaChecked, "aria-disabled": this.fieldsSvc.disabled(this.item) ? true : undefined, ref: function (el) { return _this.itemElement = el; } },
React.createElement("div", { className: "k-mid", onDragOver: this.onDragOver, onDrop: this.onDrop, ref: function (el) { return _this.dropZone = el; } },
this.renderExpandIcon(),
this.renderCheckbox(),
React.createElement("span", { className: this.getContentClassName(), onClick: this.onItemClick, draggable: this.props.draggable, onDragStart: this.onDragStart }, this.props.itemRender ?
React.createElement(this.props.itemRender, { item: this.item, itemHierarchicalIndex: this.itemId }) :

@@ -45,2 +69,5 @@ this.fieldsSvc.text(this.item))),

}
if (this.checkboxElement) {
this.checkboxElement.indeterminate = this.fieldsSvc.checkIndeterminate(this.item);
}
};

@@ -54,11 +81,27 @@ TreeViewItem.prototype.componentDidUpdate = function (prevProps) {

}
if (this.checkboxElement) {
var indeterminate = this.fieldsSvc.checkIndeterminate(this.item);
if (indeterminate !== prevProps.fieldsService.checkIndeterminate(prevProps.item)) {
this.checkboxElement.indeterminate = indeterminate;
}
}
};
TreeViewItem.prototype.renderIcon = function () {
// If it is explicitly said that the item has children (even not loaded yet)
// or if the item actually has children, then render the icon.
TreeViewItem.prototype.renderCheckbox = function () {
var _this = this;
return this.fieldsSvc.hasChildren(this.item) || hasChildren(this.item) ?
React.createElement("span", { className: this.getIconClassName(), onClick: function (e) { return _this.props.onExpandChange(e, _this.itemId); } }) :
undefined;
if (this.props.checkboxes) {
return (React.createElement("div", { className: "k-checkbox-wrapper" },
React.createElement("input", { type: "checkbox", className: "k-checkbox", checked: Boolean(this.fieldsSvc.checked(this.item)), id: this.guid, tabIndex: -1, onChange: this.onCheckChange, ref: function (el) { return _this.checkboxElement = el; } }),
React.createElement("label", { className: "k-checkbox-label", htmlFor: this.guid })));
}
else {
return undefined;
}
};
TreeViewItem.prototype.renderExpandIcon = function () {
return this.props.expandIcons &&
// If it is explicitly said that the item has children (even not loaded yet)
// or if the item actually has children, then render the icon.
(this.fieldsSvc.hasChildren(this.item) || hasChildren(this.item)) ?
React.createElement("span", { className: this.getIconClassName(), onClick: this.onExpandChange }) : undefined;
};
TreeViewItem.prototype.renderSubitemsIfApplicable = function () {

@@ -68,5 +111,19 @@ var _this = this;

(React.createElement("ul", { className: "k-content", role: "group" }, this.item.items.map(function (item, index) {
return React.createElement(TreeViewItem, { item: item, animate: _this.props.animate, itemId: createId(index, _this.itemId), focusedItemId: _this.props.focusedItemId, tabbableItemId: _this.props.tabbableItemId, fieldsService: _this.props.fieldsService, itemRender: _this.props.itemRender, ariaMultiSelectable: _this.props.ariaMultiSelectable, onItemClick: _this.props.onItemClick, onExpandChange: _this.props.onExpandChange, key: index });
return React.createElement(TreeViewItem, { item: item, animate: _this.props.animate, itemId: createId(index, _this.itemId), focusedItemId: _this.props.focusedItemId, tabbableItemId: _this.props.tabbableItemId, fieldsService: _this.props.fieldsService, itemRender: _this.props.itemRender, checkboxes: _this.props.checkboxes, ariaMultiSelectable: _this.props.ariaMultiSelectable, onItemClick: _this.props.onItemClick, draggable: _this.props.draggable, onDragStart: _this.props.onDragStart, onDragOver: _this.props.onDragOver, onDrop: _this.props.onDrop, expandIcons: _this.props.expandIcons, onExpandChange: _this.props.onExpandChange, onCheckChange: _this.props.onCheckChange, key: index });
}))) : undefined;
};
TreeViewItem.prototype.getDropZonePosition = function (cursorY) {
// The call to getBoundingClientRect() does not provide the right
// information when not called at the last moment.
var _a = this.dropZone.getBoundingClientRect(), y = _a.y, height = _a.height;
if (y + height - cursorY < DROPZONE_BOUNDARY_DELTA) {
return 'after';
}
else if (cursorY - y < DROPZONE_BOUNDARY_DELTA) {
return 'before';
}
else {
return 'over';
}
};
Object.defineProperty(TreeViewItem.prototype, "fieldsSvc", {

@@ -108,2 +165,19 @@ get: function () {

});
Object.defineProperty(TreeViewItem.prototype, "ariaChecked", {
get: function () {
if (this.props.checkboxes) {
if (this.fieldsSvc.checked(this.item)) {
return 'true';
}
else {
return this.fieldsSvc.checkIndeterminate(this.item) ? 'mixed' : 'false';
}
}
else {
return undefined;
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(TreeViewItem.prototype, "ariaSelected", {

@@ -110,0 +184,0 @@ get: function () {

@@ -6,12 +6,16 @@ /**

/**
* The hierarchical indices of the items to which the operation will be applied, or the descriptor of the operation.
* The hierarchical indices of the items to which the expand operation will be applied, or the descriptor of the operation.
*/
expand?: string[] | TreeViewOperationDescriptor;
/**
* The hierarchical indices of the items to which the operation will be applied, or the descriptor of the operation.
* The hierarchical indices of the items to which the select operation will be applied, or the descriptor of the operation.
*/
select?: string[] | TreeViewOperationDescriptor;
/**
* The hierarchical indices of the items to which the check operation will be applied, or the descriptor of the operation.
*/
check?: string[] | TreeViewCheckDescriptor;
}
/**
* The descriptor which is used for expanding or selecting.
* The descriptor which is used for expanding, selecting, and checking.
*/

@@ -29,2 +33,3 @@ export interface TreeViewOperationDescriptor {

* * `selected`&mdash;Indicates that an item is selected.
* * `checked`&mdash;Indicates that an item is checked.
*/

@@ -37,1 +42,15 @@ operationField?: string;

}
/**
* The descriptor which is used for checking.
*/
export interface TreeViewCheckDescriptor extends TreeViewOperationDescriptor {
/**
* Determines if a parent item will have an indeterminate state when not all its children are checked.
*/
applyCheckIndeterminate?: boolean;
/**
* The name of the field which will provide a Boolean representation for the indeterminate state of a parent item.
* Defaults to `checkIndeterminate`.
*/
checkIndeterminateField?: string;
}

@@ -11,3 +11,3 @@ import { ComponentType } from 'react';

*/
data: any[];
data?: any[] | null;
/**

@@ -26,7 +26,11 @@ * Controls the animation. By default, the expand and collapse animations are enabled.

/**
* Fires when the expanding or collapsing of an item is requested ([see example]({% slug overview_treeview %}#toc-basic-usage)).
* Controls the rendering of the expand (collapse) icons. By default, the icons are not rendered ([see example]({% slug expansion_ways_treeview %})).
*/
expandIcons?: boolean;
/**
* Fires when the expanding or collapsing of an item is requested ([see example]({% slug expansion_ways_treeview %})).
*/
onExpandChange?: (event: events.TreeViewExpandChangeEvent) => void;
/**
* Fires when an item is clicked or when `Enter` is pressed on a focused item ([see example]({% slug overview_treeview %}#toc-basic-usage)).
* Fires when an item is clicked or when `Enter` is pressed on a focused item ([see example]({% slug selection_ways_treeview %})).
*/

@@ -59,3 +63,3 @@ onItemClick?: (event: events.TreeViewItemClickEvent) => void;

/**
* Indicates that the user can select more than one TreeView item. If the TreeView is in a multiple selection mode, set the `aria-multiselectable` prop to `true` ([more on accessibility by the TreeView]({% slug accessibility_treeview %})).
* Indicates that the user can select more than one TreeView items. If the TreeView is in a multiple selection mode, set the `aria-multiselectable` prop to `true` ([more on accessibility by the TreeView]({% slug accessibility_treeview %})).
*/

@@ -71,2 +75,18 @@ 'aria-multiselectable'?: boolean | 'false' | 'true';

'aria-labelledby'?: string;
/**
* Controls the rendering of checkboxes. By default, the checkboxes are not rendered ([see example]({% slug check_items_directly_treeview %})).
*/
checkboxes?: boolean;
/**
* Specifies the name of the field which will provide a Boolean representation for the checked state of the item. Defaults to `checked`.
*/
checkField?: string;
/**
* Specifies the name of the field which will provide a Boolean representation for the check indeterminate state of the item. Defaults to `checkIndeterminate`.
*/
checkIndeterminateField?: string;
/**
* Fires when a checkbox is clicked or when `Space` is pressed on a focused item ([see example]({% slug check_items_directly_treeview %})).
*/
onCheckChange?: (event: events.TreeViewCheckChangeEvent) => void;
}

@@ -9,1 +9,9 @@ /**

export declare const SELECT_FIELD = "selected";
/**
* @hidden
*/
export declare const CHECK_FIELD = "checked";
/**
* @hidden
*/
export declare const CHECK_INDETERMINATE_FIELD = "checkIndeterminate";

@@ -9,2 +9,10 @@ /**

export var SELECT_FIELD = 'selected';
/**
* @hidden
*/
export var CHECK_FIELD = 'checked';
/**
* @hidden
*/
export var CHECK_INDETERMINATE_FIELD = 'checkIndeterminate';
//# sourceMappingURL=consts.js.map

@@ -6,8 +6,10 @@ import { TreeViewProps } from '../TreeViewProps';

export default class FieldsService {
expandField: string;
selectField: string;
hasChildrenField: string;
textField: string;
disableField: string;
focusIdField: string | undefined;
private expandField;
private selectField;
private hasChildrenField;
private textField;
private disableField;
private checkField;
private checkIndeterminateField;
constructor(treeViewProps: TreeViewProps);

@@ -19,3 +21,5 @@ expanded(item: any): boolean | undefined;

hasChildren(item: any): boolean | undefined;
checked(item: any): boolean | undefined;
checkIndeterminate(item: any): boolean | undefined;
focusId(item: any): any;
}

@@ -1,2 +0,2 @@

import { EXPAND_FIELD, SELECT_FIELD } from './consts';
import { EXPAND_FIELD, SELECT_FIELD, CHECK_FIELD, CHECK_INDETERMINATE_FIELD } from './consts';
import { getNestedValue } from './misc';

@@ -13,2 +13,4 @@ /**

this.disableField = treeViewProps.disableField || 'disabled';
this.checkField = treeViewProps.checkField || CHECK_FIELD;
this.checkIndeterminateField = treeViewProps.checkIndeterminateField || CHECK_INDETERMINATE_FIELD;
this.focusIdField = treeViewProps.focusIdField;

@@ -31,2 +33,8 @@ }

};
FieldsService.prototype.checked = function (item) {
return getNestedValue(this.checkField, item);
};
FieldsService.prototype.checkIndeterminate = function (item) {
return getNestedValue(this.checkIndeterminateField, item);
};
FieldsService.prototype.focusId = function (item) {

@@ -33,0 +41,0 @@ return this.focusIdField && getNestedValue(this.focusIdField, item);

import { Keys } from '@progress/kendo-react-common';
import * as idUtils from './itemIdUtils';
import { isItemExpandedAndWithChildren } from './itemUtils';
import { isItemExpandedAndWithChildren, isEnabledAndAllParentsEnabled } from './itemUtils';
/**

@@ -25,3 +25,7 @@ * @hidden

function getIdUponLeftKey() {
return fieldsSvc.expanded(item) || idUtils.isIdZeroLevel(itemId) ? itemId : idUtils.getDirectParentId(itemId);
return idUtils.isIdZeroLevel(itemId)
// For expanded disabled items, navigate directly to the parent.
// Collapse cannot happen because an event is not fired to the client.
|| (fieldsSvc.expanded(item) && isEnabledAndAllParentsEnabled(itemId, items, fieldsSvc)) ?
itemId : idUtils.getDirectParentId(itemId);
}

@@ -28,0 +32,0 @@ function getIdUponRightKey() {

@@ -48,3 +48,3 @@ /**

*/
export declare function getAllParentsShortIds(itemId: string): string[];
export declare function getAllShortIds(itemId: string): string[];
/**

@@ -51,0 +51,0 @@ * @hidden

@@ -79,3 +79,3 @@ /**

*/
export function getAllParentsShortIds(itemId) {
export function getAllShortIds(itemId) {
return itemId.split(SEPARATOR);

@@ -82,0 +82,0 @@ }

@@ -22,1 +22,13 @@ import FieldsService from './FieldsService';

export declare function isEnabledAndAllParentsEnabled(itemId: string, items: any, fieldsSvc: FieldsService): any;
/**
* @hidden
*/
export declare function getAllDirectIndirectChildrenIds(item: any, itemId: string, idField: string | undefined): any[];
/**
* @hidden
*/
export declare function areAllDirectChildrenChecked(item: any, itemId: any, idField: string | undefined, check: string[]): any;
/**
* @hidden
*/
export declare function getAllParents(itemId: string, items: any[]): any[];

@@ -9,3 +9,4 @@ var __assign = (this && this.__assign) || Object.assign || function(t) {

};
import { EMPTY_ID, isIdZeroLevel, createId, getRootParentId, getIdWithoutRootParentId, getAllParentsShortIds } from './itemIdUtils';
import { EMPTY_ID, isIdZeroLevel, createId, getRootParentId, getIdWithoutRootParentId, getAllShortIds } from './itemIdUtils';
import { getNestedValue } from './misc';
/**

@@ -55,6 +56,6 @@ * @hidden

export function isEnabledAndAllParentsEnabled(itemId, items, fieldsSvc) {
var ids = getAllParentsShortIds(itemId);
var ids = getAllShortIds(itemId);
var currentItems = items;
for (var index = 0; index < ids.length; index++) {
var currentItem = currentItems[Number(ids[index])];
for (var i = 0; i < ids.length; i++) {
var currentItem = currentItems[Number(ids[i])];
if (fieldsSvc.disabled(currentItem)) {

@@ -69,2 +70,59 @@ return false;

}
/**
* @hidden
*/
export function getAllDirectIndirectChildrenIds(item, itemId, idField) {
return idField ? getChildrenPublicIds(item) : getChildrenHierarchicalIndices(item, itemId);
function getChildrenHierarchicalIndices(startItem, startItemId) {
var result = [];
if (startItem.items) {
for (var i = 0; i < startItem.items.length; i++) {
var id = createId(i, startItemId);
result.push(id);
result = result.concat(getChildrenHierarchicalIndices(startItem.items[i], id));
}
}
return result;
}
function getChildrenPublicIds(startItem) {
var result = [];
if (startItem.items) {
for (var i = 0; i < startItem.items.length; i++) {
result.push(getNestedValue(idField, startItem.items[i]));
result = result.concat(getChildrenPublicIds(startItem.items[i]));
}
}
return result;
}
}
/**
* @hidden
*/
export function areAllDirectChildrenChecked(item, itemId, idField, check) {
if (item.items) {
return item.items.every(function (child, index) {
return check.indexOf(idField ? getNestedValue(idField, child) : createId(index, itemId)) > -1;
});
}
else {
return true;
}
}
/**
* @hidden
*/
export function getAllParents(itemId, items) {
var result = [];
var ids = getAllShortIds(itemId);
var currentItems = items;
for (var i = 0; i < ids.length - 1; i++) {
if (!currentItems) {
break;
}
var currentItem = currentItems[Number(ids[i])];
result.push(currentItem);
currentItems = currentItem.items;
}
return result;
}
function resolveItemIdHelper(itemMatcher, items, parentItemId) {

@@ -71,0 +129,0 @@ var result = undefined;

@@ -0,1 +1,2 @@

import { TreeViewOperationDescriptor } from '../TreeViewOperationDescriptors';
/**

@@ -5,1 +6,5 @@ * @hidden

export declare function getNestedValue(fieldName: string | undefined, dataItem: any): any;
/**
* @hidden
*/
export declare function isArray(operation: string[] | TreeViewOperationDescriptor): operation is any[];

@@ -12,2 +12,8 @@ /**

}
/**
* @hidden
*/
export function isArray(operation) {
return operation.length !== undefined;
}
//# sourceMappingURL=misc.js.map

@@ -29,1 +29,14 @@ import { BaseEvent } from '@progress/kendo-react-common';

}
/**
* Represents the object of the `onCheckChange` event ([see example]({% slug check_items_directly_treeview %})).
*/
export interface TreeViewCheckChangeEvent extends BaseEvent<TreeView> {
/**
* The item that is checked or unchecked.
*/
item: any;
/**
* The hierarchical index of the item. The indices are zero-based. The first root item has a `0` (zero) index. If the first root item has children, the first child acquires a `0_0` index and the second acquires a `0_1` index.
*/
itemHierarchicalIndex: string;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// export interface TreeViewItemDragOverEvent extends BaseEvent<TreeView> {
// item: any;
// itemHierarchicalIndex: string;
// position: 'before' | 'over' | 'after';
// }
// export interface TreeViewItemDropEvent extends BaseEvent<TreeView> {
// item: any;
// itemHierarchicalIndex: string;
// position: 'before' | 'over' | 'after';
// }
// export interface TreeViewItemDragStartEvent extends BaseEvent<TreeView> {
// item: any;
// itemHierarchicalIndex: string;
// }
//# sourceMappingURL=events.js.map
import TreeView from './TreeView';
import { TreeViewItemClickEvent, TreeViewExpandChangeEvent } from './events';
import { TreeViewItemClickEvent, TreeViewExpandChangeEvent, TreeViewCheckChangeEvent } from './events';
import processTreeViewItems from './processTreeViewItems';
import { TreeViewOperationDescriptor, TreeViewOperationDescriptors } from './TreeViewOperationDescriptors';
import { handleTreeViewCheckChange, TreeViewCheckChangeSettings } from './handleTreeViewCheckChange';
import { TreeViewOperationDescriptor, TreeViewOperationDescriptors, TreeViewCheckDescriptor } from './TreeViewOperationDescriptors';
import { ItemRenderProps } from './ItemRenderProps';
import { TreeViewProps } from './TreeViewProps';
export { TreeView, processTreeViewItems, TreeViewItemClickEvent, TreeViewExpandChangeEvent, TreeViewOperationDescriptor, TreeViewOperationDescriptors, TreeViewProps, ItemRenderProps };
export { TreeView, processTreeViewItems, handleTreeViewCheckChange, TreeViewCheckChangeSettings, TreeViewItemClickEvent, TreeViewExpandChangeEvent, TreeViewCheckChangeEvent, TreeViewOperationDescriptor, TreeViewOperationDescriptors, TreeViewCheckDescriptor, TreeViewProps, ItemRenderProps };

@@ -7,2 +7,4 @@ "use strict";

exports.processTreeViewItems = processTreeViewItems_1.default;
var handleTreeViewCheckChange_1 = require("./handleTreeViewCheckChange");
exports.handleTreeViewCheckChange = handleTreeViewCheckChange_1.handleTreeViewCheckChange;
//# sourceMappingURL=main.js.map

@@ -6,2 +6,3 @@ import { TreeViewOperationDescriptors } from './TreeViewOperationDescriptors';

* * [Selecting and deselecting items]({% slug selection_ways_treeview %}#toc-using-a-helper-function)
* * [Checking and unchecking items]({% slug check_helper_funcs_treeview %})
*

@@ -15,9 +16,11 @@ * @param data - The data that will be processed.

* class App extends React.Component {
* state = { items: tree, expand: [], select: [] };
* state = { items: tree, expand: [], select: [], check: [] };
* render() {
* const { expand, select, check } = this.state;
* return (
* <TreeView
* data={processTreeViewItems(this.state.items, { expand: this.state.expand, select: this.state.select })}
* onExpandChange={this.onExpandChange}
* onItemClick={event => this.setState({ select: [event.itemHierarchicalIndex] })}
* data={processTreeViewItems(this.state.items, { expand, select, check })}
* expandIcons={true} onExpandChange={this.onExpandChange} checkboxes={true}
* onCheckChange={event => this.setState({ check: [ event.itemHierarchicalIndex ] })}
* onItemClick={event => this.setState({ select: [ event.itemHierarchicalIndex ] })}
* />

@@ -50,2 +53,2 @@ * );

*/
export default function processTreeViewItems(data: any[], operations: TreeViewOperationDescriptors): any[];
export default function processTreeViewItems(data: any[] | null | undefined, operations: TreeViewOperationDescriptors): any[];

@@ -19,2 +19,3 @@ "use strict";

* * [Selecting and deselecting items]({% slug selection_ways_treeview %}#toc-using-a-helper-function)
* * [Checking and unchecking items]({% slug check_helper_funcs_treeview %})
*

@@ -28,9 +29,11 @@ * @param data - The data that will be processed.

* class App extends React.Component {
* state = { items: tree, expand: [], select: [] };
* state = { items: tree, expand: [], select: [], check: [] };
* render() {
* const { expand, select, check } = this.state;
* return (
* <TreeView
* data={processTreeViewItems(this.state.items, { expand: this.state.expand, select: this.state.select })}
* onExpandChange={this.onExpandChange}
* onItemClick={event => this.setState({ select: [event.itemHierarchicalIndex] })}
* data={processTreeViewItems(this.state.items, { expand, select, check })}
* expandIcons={true} onExpandChange={this.onExpandChange} checkboxes={true}
* onCheckChange={event => this.setState({ check: [ event.itemHierarchicalIndex ] })}
* onItemClick={event => this.setState({ select: [ event.itemHierarchicalIndex ] })}
* />

@@ -65,4 +68,9 @@ * );

var result = data;
if (!data || !data.length) {
return [];
}
result = handleOperation(result, consts_1.EXPAND_FIELD, operations.expand);
result = handleOperation(result, consts_1.SELECT_FIELD, operations.select);
result = handleOperation(result, consts_1.CHECK_FIELD, operations.check);
applyCheckIndeterminate(result, operations.check);
return result;

@@ -75,3 +83,3 @@ }

var indices = ids;
if (!isArray(operation) && operation.idField) {
if (!misc_1.isArray(operation) && operation.idField) {
indices = convertPublicIdsToIndices(ids, operation.idField, items);

@@ -87,2 +95,4 @@ }

var result = [];
// TODO: Most probably the more performant way is the opposite:
// Iterate the tree only once and compare each item id against `publicIds`.
publicIds.forEach(function (publicId) {

@@ -93,9 +103,6 @@ result.push(itemUtils_1.resolveItemId(function (item) { return misc_1.getNestedValue(idField, item) === publicId; }, items));

}
function isArray(operation) {
return operation.length !== undefined;
}
function parseOperation(operation, defaultField) {
var ids;
var field;
if (isArray(operation)) {
if (misc_1.isArray(operation)) {
ids = operation;

@@ -134,2 +141,38 @@ field = defaultField;

}
function applyCheckIndeterminate(items, check) {
if (check && !misc_1.isArray(check) && check.applyCheckIndeterminate) {
var checkField = parseOperation(check, consts_1.CHECK_FIELD).field;
var checkIndeterminateField = check.checkIndeterminateField || consts_1.CHECK_INDETERMINATE_FIELD;
for (var i = 0; i < items.length; i++) {
var item = items[i];
if (item.items) {
applyCheckIndeterminateHelper(item.items, misc_1.getNestedValue(checkField, item) ? [] : [item], checkField, checkIndeterminateField);
}
}
}
}
function applyCheckIndeterminateHelper(data, parents, checkField, checkIndeterminateField) {
// The updates will be direct because the corresponding items
// are already cloned because of their checked children.
var parentsAlreadyUpdated = false;
for (var i = 0; i < data.length; i++) {
var item = data[i];
if (misc_1.getNestedValue(checkField, item)) {
if (!parentsAlreadyUpdated) {
for (var j = 0; j < parents.length; j++) {
raiseNestedFlag(checkIndeterminateField, parents[j]);
}
}
parentsAlreadyUpdated = true;
if (item.items) {
applyCheckIndeterminateHelper(item.items, [], checkField, checkIndeterminateField);
}
}
else {
if (item.items) {
applyCheckIndeterminateHelper(item.items, parentsAlreadyUpdated ? [item] : parents.concat([item]), checkField, checkIndeterminateField);
}
}
}
}
//# sourceMappingURL=processTreeViewItems.js.map

@@ -77,3 +77,7 @@ import * as React from 'react';

componentDidUpdate(): void;
private onCheckChange;
private onExpandChange;
private onDragStart;
private onDrop;
private onDragOver;
private onItemClick;

@@ -83,9 +87,11 @@ private onFocus;

private onKeyDown;
private dispatchEventsUponKeyboardNavigation;
private dispatchEventsOnKeyDown;
private setFocus;
private getFocusedItem;
private getItemById;
private dispatchCheckChange;
private dispatchExpandChange;
private dispatchItemClick;
private readonly ariaMultiSelectable;
private readonly data;
}

@@ -49,13 +49,29 @@ "use strict";

_this.state = { focusedItemId: undefined, focusedItemPublicId: undefined, tabbableItemId: itemIdUtils_1.ZERO_LEVEL_ZERO_NODE_ID };
_this.onExpandChange = function (event, itemId) {
_this.onCheckChange = function (event, item, itemId) {
_this.setFocus(itemId);
_this.dispatchExpandChange(event, _this.getItemById(itemId), itemId);
_this.dispatchCheckChange(event, item, itemId);
};
_this.onItemClick = function (event, itemId) {
_this.onExpandChange = function (event, item, itemId) {
_this.setFocus(itemId);
_this.dispatchItemClick(event, _this.getItemById(itemId), itemId);
_this.dispatchExpandChange(event, item, itemId);
};
_this.onDragStart = function () { };
_this.onDrop = function () { };
_this.onDragOver = function () { };
// private onDragStart = (event: React.DragEvent<HTMLElement>, item: any, itemId: string) => {
// dispatchEvent(this.props.onItemDragStart, event, this, { item, itemHierarchicalIndex: itemId });
// }
// private onDrop = (event: React.DragEvent<HTMLElement>, item: any, itemId: string, position: string) => {
// dispatchEvent(this.props.onItemDrop, event, this, { item, itemHierarchicalIndex: itemId, position });
// }
// private onDragOver = (event: React.DragEvent<HTMLElement>, item: any, itemId: string, position: string) => {
// dispatchEvent(this.props.onItemDragOver, event, this, { item, itemHierarchicalIndex: itemId, position });
// }
_this.onItemClick = function (event, item, itemId) {
_this.setFocus(itemId);
_this.dispatchItemClick(event, item, itemId);
};
_this.onFocus = function () {
clearTimeout(_this.blurRequest);
if (_this.state.focusedItemId === undefined && _this.props.data && _this.props.data.length) {
if (_this.state.focusedItemId === undefined && _this.data.length) {
_this.setFocus(_this.state.tabbableItemId);

@@ -71,3 +87,3 @@ }

if (focusedItem) {
var newItemId = getItemIdUponKeyboardNavigation_1.default(focusedItem, _this.state.focusedItemId, _this.props.data, event.keyCode, _this.fieldsSvc);
var newItemId = getItemIdUponKeyboardNavigation_1.default(focusedItem, _this.state.focusedItemId, _this.data, event.keyCode, _this.fieldsSvc);
if (newItemId !== _this.state.focusedItemId) {

@@ -78,3 +94,3 @@ // This disables the auto-scroll. The scroll is achieved via item focusing.

}
_this.dispatchEventsUponKeyboardNavigation(event, focusedItem);
_this.dispatchEventsOnKeyDown(event, focusedItem);
}

@@ -91,4 +107,9 @@ };

return (React.createElement("div", { className: "k-widget k-treeview", onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, role: "tree", "aria-multiselectable": this.ariaMultiSelectable ? true : undefined, "aria-label": this.props['aria-label'], "aria-labelledby": this.props['aria-labelledby'] },
React.createElement("ul", { className: "k-treeview-lines", role: "group" }, this.props.data.map(function (item, index) {
return React.createElement(TreeViewItem_1.default, { item: item, animate: _this.props.animate, itemId: index.toString(), focusedItemId: _this.state.focusedItemId, tabbableItemId: _this.state.tabbableItemId, fieldsService: _this.fieldsSvc, itemRender: _this.props.itemRender, ariaMultiSelectable: _this.ariaMultiSelectable, onItemClick: _this.onItemClick, onExpandChange: _this.onExpandChange, key: index });
React.createElement("ul", { className: "k-treeview-lines", role: "group" }, this.data.map(function (item, index) {
return React.createElement(TreeViewItem_1.default, { item: item, animate: _this.props.animate, itemId: index.toString(), focusedItemId: _this.state.focusedItemId, tabbableItemId: _this.state.tabbableItemId, fieldsService: _this.fieldsSvc, itemRender: _this.props.itemRender, checkboxes: _this.props.checkboxes, ariaMultiSelectable: _this.ariaMultiSelectable, onItemClick: _this.onItemClick, draggable: false, onDragStart: _this.onDragStart, onDragOver: _this.onDragOver, onDrop: _this.onDrop,
// draggable={this.props.draggable}
// onDragStart={this.onDragStart}
// onDragOver={this.onDragOver}
// onDrop={this.onDrop}
expandIcons: _this.props.expandIcons, onExpandChange: _this.onExpandChange, onCheckChange: _this.onCheckChange, key: index });
}))));

@@ -106,3 +127,3 @@ };

this.props.getFocusHierarchicalIndex(focusedItemPublicId_1) :
itemUtils_1.resolveItemId(function (item) { return _this.fieldsSvc.focusId(item) === focusedItemPublicId_1; }, this.props.data);
itemUtils_1.resolveItemId(function (item) { return _this.fieldsSvc.focusId(item) === focusedItemPublicId_1; }, this.data);
if (focusedItemId !== this.state.focusedItemId) {

@@ -114,7 +135,7 @@ this.setState({ focusedItemId: focusedItemId });

};
TreeView.prototype.dispatchEventsUponKeyboardNavigation = function (event, focusedItem) {
TreeView.prototype.dispatchEventsOnKeyDown = function (event, focusedItem) {
var _this = this;
// isEnabled is the most expensive op and that is why is left last.
var isEnabled = function () {
return itemUtils_1.isEnabledAndAllParentsEnabled(_this.state.focusedItemId, _this.props.data, _this.fieldsSvc);
return itemUtils_1.isEnabledAndAllParentsEnabled(_this.state.focusedItemId, _this.data, _this.fieldsSvc);
};

@@ -124,9 +145,12 @@ if (event.keyCode === kendo_react_common_1.Keys.left && this.fieldsSvc.expanded(focusedItem) && isEnabled()) {

}
if (event.keyCode === kendo_react_common_1.Keys.right && !this.fieldsSvc.expanded(focusedItem) &&
else if (event.keyCode === kendo_react_common_1.Keys.right && !this.fieldsSvc.expanded(focusedItem) &&
(this.fieldsSvc.hasChildren(focusedItem) || itemUtils_1.hasChildren(focusedItem)) && isEnabled()) {
this.dispatchExpandChange(event, focusedItem, this.state.focusedItemId);
}
if (event.keyCode === kendo_react_common_1.Keys.enter && isEnabled()) {
else if (event.keyCode === kendo_react_common_1.Keys.enter && isEnabled()) {
this.dispatchItemClick(event, focusedItem, this.state.focusedItemId);
}
else if (event.keyCode === kendo_react_common_1.Keys.space && isEnabled()) {
this.dispatchCheckChange(event, focusedItem, this.state.focusedItemId);
}
};

@@ -157,4 +181,7 @@ TreeView.prototype.setFocus = function (focusedItemId) {

TreeView.prototype.getItemById = function (itemId) {
return itemIdUtils_1.getItemById(itemId, this.props.data);
return itemIdUtils_1.getItemById(itemId, this.data);
};
TreeView.prototype.dispatchCheckChange = function (dispatchedEvent, item, itemId) {
kendo_react_common_1.dispatchEvent(this.props.onCheckChange, dispatchedEvent, this, { item: item, itemHierarchicalIndex: itemId });
};
TreeView.prototype.dispatchExpandChange = function (dispatchedEvent, item, itemId) {

@@ -173,2 +200,9 @@ kendo_react_common_1.dispatchEvent(this.props.onExpandChange, dispatchedEvent, this, { item: item, itemHierarchicalIndex: itemId });

});
Object.defineProperty(TreeView.prototype, "data", {
get: function () {
return this.props.data || [];
},
enumerable: true,
configurable: true
});
/**

@@ -175,0 +209,0 @@ * @hidden

@@ -19,3 +19,10 @@ import * as React from 'react';

onItemClick: any;
expandIcons?: boolean;
onExpandChange: any;
onCheckChange: any;
checkboxes?: boolean;
draggable?: boolean;
onDragStart: any;
onDragOver: any;
onDrop: any;
}

@@ -32,7 +39,18 @@ /**

private itemElement;
private checkboxElement;
private guid;
private dropZone;
render(): JSX.Element;
componentDidMount(): void;
componentDidUpdate(prevProps: TreeViewItemProps): void;
private renderIcon;
private renderCheckbox;
private renderExpandIcon;
private renderSubitemsIfApplicable;
private onCheckChange;
private onExpandChange;
private onItemClick;
private onDragStart;
private onDrop;
private onDragOver;
private getDropZonePosition;
private readonly fieldsSvc;

@@ -43,2 +61,3 @@ private readonly itemId;

private readonly ariaExpanded;
private readonly ariaChecked;
private readonly ariaSelected;

@@ -45,0 +64,0 @@ private getIconClassName;

@@ -18,2 +18,3 @@ "use strict";

var kendo_react_animation_1 = require("@progress/kendo-react-animation");
var DROPZONE_BOUNDARY_DELTA = 5;
/**

@@ -25,3 +26,25 @@ * @hidden

function TreeViewItem() {
return _super !== null && _super.apply(this, arguments) || this;
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.guid = kendo_react_common_1.guid();
_this.onCheckChange = function (e) {
_this.props.onCheckChange(e, _this.item, _this.itemId);
};
_this.onExpandChange = function (e) {
_this.props.onExpandChange(e, _this.item, _this.itemId);
};
_this.onItemClick = function (e) {
_this.props.onItemClick(e, _this.item, _this.itemId);
};
_this.onDragStart = function (e) {
if (_this.props.draggable) {
_this.props.onDragStart(e, _this.item, _this.itemId);
}
};
_this.onDrop = function (e) {
_this.props.onDrop(e, _this.item, _this.itemId, _this.getDropZonePosition(e.clientY));
};
_this.onDragOver = function (e) {
_this.props.onDragOver(e, _this.item, _this.itemId, _this.getDropZonePosition(e.clientY));
};
return _this;
}

@@ -31,6 +54,7 @@ TreeViewItem.prototype.render = function () {

var subitems = this.renderSubitemsIfApplicable();
return (React.createElement("li", { className: this.getRootClassName(), tabIndex: this.tabIndex, role: "treeitem", "aria-expanded": this.ariaExpanded, "aria-selected": this.ariaSelected, "aria-disabled": this.fieldsSvc.disabled(this.item) ? true : undefined, ref: function (el) { return _this.itemElement = el; } },
React.createElement("div", { className: "k-mid" },
this.renderIcon(),
React.createElement("span", { className: this.getContentClassName(), onClick: function (e) { return _this.props.onItemClick(e, _this.itemId); } }, this.props.itemRender ?
return (React.createElement("li", { className: this.getRootClassName(), tabIndex: this.tabIndex, role: "treeitem", "aria-expanded": this.ariaExpanded, "aria-selected": this.ariaSelected, "aria-checked": this.ariaChecked, "aria-disabled": this.fieldsSvc.disabled(this.item) ? true : undefined, ref: function (el) { return _this.itemElement = el; } },
React.createElement("div", { className: "k-mid", onDragOver: this.onDragOver, onDrop: this.onDrop, ref: function (el) { return _this.dropZone = el; } },
this.renderExpandIcon(),
this.renderCheckbox(),
React.createElement("span", { className: this.getContentClassName(), onClick: this.onItemClick, draggable: this.props.draggable, onDragStart: this.onDragStart }, this.props.itemRender ?
React.createElement(this.props.itemRender, { item: this.item, itemHierarchicalIndex: this.itemId }) :

@@ -47,2 +71,5 @@ this.fieldsSvc.text(this.item))),

}
if (this.checkboxElement) {
this.checkboxElement.indeterminate = this.fieldsSvc.checkIndeterminate(this.item);
}
};

@@ -56,11 +83,27 @@ TreeViewItem.prototype.componentDidUpdate = function (prevProps) {

}
if (this.checkboxElement) {
var indeterminate = this.fieldsSvc.checkIndeterminate(this.item);
if (indeterminate !== prevProps.fieldsService.checkIndeterminate(prevProps.item)) {
this.checkboxElement.indeterminate = indeterminate;
}
}
};
TreeViewItem.prototype.renderIcon = function () {
// If it is explicitly said that the item has children (even not loaded yet)
// or if the item actually has children, then render the icon.
TreeViewItem.prototype.renderCheckbox = function () {
var _this = this;
return this.fieldsSvc.hasChildren(this.item) || itemUtils_1.hasChildren(this.item) ?
React.createElement("span", { className: this.getIconClassName(), onClick: function (e) { return _this.props.onExpandChange(e, _this.itemId); } }) :
undefined;
if (this.props.checkboxes) {
return (React.createElement("div", { className: "k-checkbox-wrapper" },
React.createElement("input", { type: "checkbox", className: "k-checkbox", checked: Boolean(this.fieldsSvc.checked(this.item)), id: this.guid, tabIndex: -1, onChange: this.onCheckChange, ref: function (el) { return _this.checkboxElement = el; } }),
React.createElement("label", { className: "k-checkbox-label", htmlFor: this.guid })));
}
else {
return undefined;
}
};
TreeViewItem.prototype.renderExpandIcon = function () {
return this.props.expandIcons &&
// If it is explicitly said that the item has children (even not loaded yet)
// or if the item actually has children, then render the icon.
(this.fieldsSvc.hasChildren(this.item) || itemUtils_1.hasChildren(this.item)) ?
React.createElement("span", { className: this.getIconClassName(), onClick: this.onExpandChange }) : undefined;
};
TreeViewItem.prototype.renderSubitemsIfApplicable = function () {

@@ -70,5 +113,19 @@ var _this = this;

(React.createElement("ul", { className: "k-content", role: "group" }, this.item.items.map(function (item, index) {
return React.createElement(TreeViewItem, { item: item, animate: _this.props.animate, itemId: itemIdUtils_1.createId(index, _this.itemId), focusedItemId: _this.props.focusedItemId, tabbableItemId: _this.props.tabbableItemId, fieldsService: _this.props.fieldsService, itemRender: _this.props.itemRender, ariaMultiSelectable: _this.props.ariaMultiSelectable, onItemClick: _this.props.onItemClick, onExpandChange: _this.props.onExpandChange, key: index });
return React.createElement(TreeViewItem, { item: item, animate: _this.props.animate, itemId: itemIdUtils_1.createId(index, _this.itemId), focusedItemId: _this.props.focusedItemId, tabbableItemId: _this.props.tabbableItemId, fieldsService: _this.props.fieldsService, itemRender: _this.props.itemRender, checkboxes: _this.props.checkboxes, ariaMultiSelectable: _this.props.ariaMultiSelectable, onItemClick: _this.props.onItemClick, draggable: _this.props.draggable, onDragStart: _this.props.onDragStart, onDragOver: _this.props.onDragOver, onDrop: _this.props.onDrop, expandIcons: _this.props.expandIcons, onExpandChange: _this.props.onExpandChange, onCheckChange: _this.props.onCheckChange, key: index });
}))) : undefined;
};
TreeViewItem.prototype.getDropZonePosition = function (cursorY) {
// The call to getBoundingClientRect() does not provide the right
// information when not called at the last moment.
var _a = this.dropZone.getBoundingClientRect(), y = _a.y, height = _a.height;
if (y + height - cursorY < DROPZONE_BOUNDARY_DELTA) {
return 'after';
}
else if (cursorY - y < DROPZONE_BOUNDARY_DELTA) {
return 'before';
}
else {
return 'over';
}
};
Object.defineProperty(TreeViewItem.prototype, "fieldsSvc", {

@@ -110,2 +167,19 @@ get: function () {

});
Object.defineProperty(TreeViewItem.prototype, "ariaChecked", {
get: function () {
if (this.props.checkboxes) {
if (this.fieldsSvc.checked(this.item)) {
return 'true';
}
else {
return this.fieldsSvc.checkIndeterminate(this.item) ? 'mixed' : 'false';
}
}
else {
return undefined;
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(TreeViewItem.prototype, "ariaSelected", {

@@ -112,0 +186,0 @@ get: function () {

@@ -6,12 +6,16 @@ /**

/**
* The hierarchical indices of the items to which the operation will be applied, or the descriptor of the operation.
* The hierarchical indices of the items to which the expand operation will be applied, or the descriptor of the operation.
*/
expand?: string[] | TreeViewOperationDescriptor;
/**
* The hierarchical indices of the items to which the operation will be applied, or the descriptor of the operation.
* The hierarchical indices of the items to which the select operation will be applied, or the descriptor of the operation.
*/
select?: string[] | TreeViewOperationDescriptor;
/**
* The hierarchical indices of the items to which the check operation will be applied, or the descriptor of the operation.
*/
check?: string[] | TreeViewCheckDescriptor;
}
/**
* The descriptor which is used for expanding or selecting.
* The descriptor which is used for expanding, selecting, and checking.
*/

@@ -29,2 +33,3 @@ export interface TreeViewOperationDescriptor {

* * `selected`&mdash;Indicates that an item is selected.
* * `checked`&mdash;Indicates that an item is checked.
*/

@@ -37,1 +42,15 @@ operationField?: string;

}
/**
* The descriptor which is used for checking.
*/
export interface TreeViewCheckDescriptor extends TreeViewOperationDescriptor {
/**
* Determines if a parent item will have an indeterminate state when not all its children are checked.
*/
applyCheckIndeterminate?: boolean;
/**
* The name of the field which will provide a Boolean representation for the indeterminate state of a parent item.
* Defaults to `checkIndeterminate`.
*/
checkIndeterminateField?: string;
}

@@ -11,3 +11,3 @@ import { ComponentType } from 'react';

*/
data: any[];
data?: any[] | null;
/**

@@ -26,7 +26,11 @@ * Controls the animation. By default, the expand and collapse animations are enabled.

/**
* Fires when the expanding or collapsing of an item is requested ([see example]({% slug overview_treeview %}#toc-basic-usage)).
* Controls the rendering of the expand (collapse) icons. By default, the icons are not rendered ([see example]({% slug expansion_ways_treeview %})).
*/
expandIcons?: boolean;
/**
* Fires when the expanding or collapsing of an item is requested ([see example]({% slug expansion_ways_treeview %})).
*/
onExpandChange?: (event: events.TreeViewExpandChangeEvent) => void;
/**
* Fires when an item is clicked or when `Enter` is pressed on a focused item ([see example]({% slug overview_treeview %}#toc-basic-usage)).
* Fires when an item is clicked or when `Enter` is pressed on a focused item ([see example]({% slug selection_ways_treeview %})).
*/

@@ -59,3 +63,3 @@ onItemClick?: (event: events.TreeViewItemClickEvent) => void;

/**
* Indicates that the user can select more than one TreeView item. If the TreeView is in a multiple selection mode, set the `aria-multiselectable` prop to `true` ([more on accessibility by the TreeView]({% slug accessibility_treeview %})).
* Indicates that the user can select more than one TreeView items. If the TreeView is in a multiple selection mode, set the `aria-multiselectable` prop to `true` ([more on accessibility by the TreeView]({% slug accessibility_treeview %})).
*/

@@ -71,2 +75,18 @@ 'aria-multiselectable'?: boolean | 'false' | 'true';

'aria-labelledby'?: string;
/**
* Controls the rendering of checkboxes. By default, the checkboxes are not rendered ([see example]({% slug check_items_directly_treeview %})).
*/
checkboxes?: boolean;
/**
* Specifies the name of the field which will provide a Boolean representation for the checked state of the item. Defaults to `checked`.
*/
checkField?: string;
/**
* Specifies the name of the field which will provide a Boolean representation for the check indeterminate state of the item. Defaults to `checkIndeterminate`.
*/
checkIndeterminateField?: string;
/**
* Fires when a checkbox is clicked or when `Space` is pressed on a focused item ([see example]({% slug check_items_directly_treeview %})).
*/
onCheckChange?: (event: events.TreeViewCheckChangeEvent) => void;
}

@@ -9,1 +9,9 @@ /**

export declare const SELECT_FIELD = "selected";
/**
* @hidden
*/
export declare const CHECK_FIELD = "checked";
/**
* @hidden
*/
export declare const CHECK_INDETERMINATE_FIELD = "checkIndeterminate";

@@ -11,2 +11,10 @@ "use strict";

exports.SELECT_FIELD = 'selected';
/**
* @hidden
*/
exports.CHECK_FIELD = 'checked';
/**
* @hidden
*/
exports.CHECK_INDETERMINATE_FIELD = 'checkIndeterminate';
//# sourceMappingURL=consts.js.map

@@ -6,8 +6,10 @@ import { TreeViewProps } from '../TreeViewProps';

export default class FieldsService {
expandField: string;
selectField: string;
hasChildrenField: string;
textField: string;
disableField: string;
focusIdField: string | undefined;
private expandField;
private selectField;
private hasChildrenField;
private textField;
private disableField;
private checkField;
private checkIndeterminateField;
constructor(treeViewProps: TreeViewProps);

@@ -19,3 +21,5 @@ expanded(item: any): boolean | undefined;

hasChildren(item: any): boolean | undefined;
checked(item: any): boolean | undefined;
checkIndeterminate(item: any): boolean | undefined;
focusId(item: any): any;
}

@@ -15,2 +15,4 @@ "use strict";

this.disableField = treeViewProps.disableField || 'disabled';
this.checkField = treeViewProps.checkField || consts_1.CHECK_FIELD;
this.checkIndeterminateField = treeViewProps.checkIndeterminateField || consts_1.CHECK_INDETERMINATE_FIELD;
this.focusIdField = treeViewProps.focusIdField;

@@ -33,2 +35,8 @@ }

};
FieldsService.prototype.checked = function (item) {
return misc_1.getNestedValue(this.checkField, item);
};
FieldsService.prototype.checkIndeterminate = function (item) {
return misc_1.getNestedValue(this.checkIndeterminateField, item);
};
FieldsService.prototype.focusId = function (item) {

@@ -35,0 +43,0 @@ return this.focusIdField && misc_1.getNestedValue(this.focusIdField, item);

@@ -27,3 +27,7 @@ "use strict";

function getIdUponLeftKey() {
return fieldsSvc.expanded(item) || idUtils.isIdZeroLevel(itemId) ? itemId : idUtils.getDirectParentId(itemId);
return idUtils.isIdZeroLevel(itemId)
// For expanded disabled items, navigate directly to the parent.
// Collapse cannot happen because an event is not fired to the client.
|| (fieldsSvc.expanded(item) && itemUtils_1.isEnabledAndAllParentsEnabled(itemId, items, fieldsSvc)) ?
itemId : idUtils.getDirectParentId(itemId);
}

@@ -30,0 +34,0 @@ function getIdUponRightKey() {

@@ -48,3 +48,3 @@ /**

*/
export declare function getAllParentsShortIds(itemId: string): string[];
export declare function getAllShortIds(itemId: string): string[];
/**

@@ -51,0 +51,0 @@ * @hidden

@@ -89,6 +89,6 @@ "use strict";

*/
function getAllParentsShortIds(itemId) {
function getAllShortIds(itemId) {
return itemId.split(exports.SEPARATOR);
}
exports.getAllParentsShortIds = getAllParentsShortIds;
exports.getAllShortIds = getAllShortIds;
/**

@@ -95,0 +95,0 @@ * @hidden

@@ -22,1 +22,13 @@ import FieldsService from './FieldsService';

export declare function isEnabledAndAllParentsEnabled(itemId: string, items: any, fieldsSvc: FieldsService): any;
/**
* @hidden
*/
export declare function getAllDirectIndirectChildrenIds(item: any, itemId: string, idField: string | undefined): any[];
/**
* @hidden
*/
export declare function areAllDirectChildrenChecked(item: any, itemId: any, idField: string | undefined, check: string[]): any;
/**
* @hidden
*/
export declare function getAllParents(itemId: string, items: any[]): any[];

@@ -12,2 +12,3 @@ "use strict";

var itemIdUtils_1 = require("./itemIdUtils");
var misc_1 = require("./misc");
/**

@@ -61,6 +62,6 @@ * @hidden

function isEnabledAndAllParentsEnabled(itemId, items, fieldsSvc) {
var ids = itemIdUtils_1.getAllParentsShortIds(itemId);
var ids = itemIdUtils_1.getAllShortIds(itemId);
var currentItems = items;
for (var index = 0; index < ids.length; index++) {
var currentItem = currentItems[Number(ids[index])];
for (var i = 0; i < ids.length; i++) {
var currentItem = currentItems[Number(ids[i])];
if (fieldsSvc.disabled(currentItem)) {

@@ -76,2 +77,62 @@ return false;

exports.isEnabledAndAllParentsEnabled = isEnabledAndAllParentsEnabled;
/**
* @hidden
*/
function getAllDirectIndirectChildrenIds(item, itemId, idField) {
return idField ? getChildrenPublicIds(item) : getChildrenHierarchicalIndices(item, itemId);
function getChildrenHierarchicalIndices(startItem, startItemId) {
var result = [];
if (startItem.items) {
for (var i = 0; i < startItem.items.length; i++) {
var id = itemIdUtils_1.createId(i, startItemId);
result.push(id);
result = result.concat(getChildrenHierarchicalIndices(startItem.items[i], id));
}
}
return result;
}
function getChildrenPublicIds(startItem) {
var result = [];
if (startItem.items) {
for (var i = 0; i < startItem.items.length; i++) {
result.push(misc_1.getNestedValue(idField, startItem.items[i]));
result = result.concat(getChildrenPublicIds(startItem.items[i]));
}
}
return result;
}
}
exports.getAllDirectIndirectChildrenIds = getAllDirectIndirectChildrenIds;
/**
* @hidden
*/
function areAllDirectChildrenChecked(item, itemId, idField, check) {
if (item.items) {
return item.items.every(function (child, index) {
return check.indexOf(idField ? misc_1.getNestedValue(idField, child) : itemIdUtils_1.createId(index, itemId)) > -1;
});
}
else {
return true;
}
}
exports.areAllDirectChildrenChecked = areAllDirectChildrenChecked;
/**
* @hidden
*/
function getAllParents(itemId, items) {
var result = [];
var ids = itemIdUtils_1.getAllShortIds(itemId);
var currentItems = items;
for (var i = 0; i < ids.length - 1; i++) {
if (!currentItems) {
break;
}
var currentItem = currentItems[Number(ids[i])];
result.push(currentItem);
currentItems = currentItem.items;
}
return result;
}
exports.getAllParents = getAllParents;
function resolveItemIdHelper(itemMatcher, items, parentItemId) {

@@ -78,0 +139,0 @@ var result = undefined;

@@ -0,1 +1,2 @@

import { TreeViewOperationDescriptor } from '../TreeViewOperationDescriptors';
/**

@@ -5,1 +6,5 @@ * @hidden

export declare function getNestedValue(fieldName: string | undefined, dataItem: any): any;
/**
* @hidden
*/
export declare function isArray(operation: string[] | TreeViewOperationDescriptor): operation is any[];

@@ -15,2 +15,9 @@ "use strict";

exports.getNestedValue = getNestedValue;
/**
* @hidden
*/
function isArray(operation) {
return operation.length !== undefined;
}
exports.isArray = isArray;
//# sourceMappingURL=misc.js.map

@@ -1,1 +0,1 @@

System.register("@progress/kendo-react-treeview",["react","prop-types","@progress/kendo-react-common","@progress/kendo-react-animation"],function(s){var i,n,r,o;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){i=t(e)},function(e){n=t(e)},function(e){r=t(e)},function(e){o=t(e)}],execute:function(){!function(i){var n={};function r(e){if(n[e])return n[e].exports;var t=n[e]={i:e,l:!1,exports:{}};return i[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}r.m=i,r.c=n,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=6)}([function(e,i,t){"use strict";function r(e){return o(e)?e:e.split(i.SEPARATOR)[0]}function s(e){if(o(e))return e;var t=e.indexOf(i.SEPARATOR);return e.substring(t+1)}function n(e,t){return e=e.toString(),t?t+i.SEPARATOR+e:e}function o(e){return e===i.EMPTY_ID||e.indexOf(i.SEPARATOR)<0}function a(e){return e!==i.EMPTY_ID&&e.indexOf(i.SEPARATOR)<0}Object.defineProperty(i,"__esModule",{value:!0}),i.EMPTY_ID="",i.ZERO_LEVEL_ZERO_NODE_ID="0",i.SEPARATOR="_",i.getItemById=function e(t,i){if(a(t))return i[Number(t)];var n=i[Number(r(t))];return n&&n.items&&n.items.length?e(s(t),n.items):void 0},i.getRootParentId=r,i.getIdWithoutRootParentId=s,i.getFirstChildId=function(e){return n("0",e)},i.createId=n,i.getDirectParentId=function(e){var t=e.lastIndexOf(i.SEPARATOR);return t<0?i.EMPTY_ID:e.substring(0,t)},i.isIdEmptyOrZeroLevel=o,i.isIdZeroLevel=a,i.getAllParentsShortIds=function(e){return e.split(i.SEPARATOR)},i.getShortId=function(e){var t=e.lastIndexOf(i.SEPARATOR);return t<0?e:e.substring(t+1)}},function(e,t,i){"use strict";var a=this&&this.__assign||Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0});var d=i(0);function u(e){return Boolean(e.items&&e.items.length)}t.isItemExpandedAndWithChildren=function(e,t){return t.expanded(e)&&u(e)},t.resolveItemId=function(e,t){return function e(t,i,n){for(var r=void 0,s=0;s<i.length;s++){var o=i[s];if(t(o)){r=d.createId(s,n);break}if(u(o)&&(r=e(t,o.items,d.createId(s,n))))break}return r}(e,t,d.EMPTY_ID)},t.updateItem=function e(t,i,n){for(var r=[],s=0;s<t.length;s++)if(Number(d.getRootParentId(i))===s){var o=a({},t[s]);d.isIdZeroLevel(i)?n(o):t[s].items&&(o.items=e(t[s].items,d.getIdWithoutRootParentId(i),n)),r.push(o)}else r.push(t[s]);return r},t.hasChildren=u,t.isEnabledAndAllParentsEnabled=function(e,t,i){for(var n=d.getAllParentsShortIds(e),r=t,s=0;s<n.length;s++){var o=r[Number(n[s])];if(i.disabled(o))return!1;r=o.items}return!0}},function(e,t){e.exports=r},function(e,t){e.exports=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXPAND_FIELD="expanded",t.SELECT_FIELD="selected"},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNestedValue=function(e,t){var i=(e||"").split("."),n=t;return i.forEach(function(e){n=n?n[e]:void 0}),n}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(7);t.TreeView=n.default;var r=i(13);t.processTreeViewItems=r.default,function(e){for(var t in e)s(t,e[t])}(t)},function(e,t,i){"use strict";var n,r=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var s=i(3),o=i(8),a=i(2),d=i(9),u=i(1),c=i(10),l=i(0),p=i(12),f=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.state={focusedItemId:void 0,focusedItemPublicId:void 0,tabbableItemId:l.ZERO_LEVEL_ZERO_NODE_ID},n.onExpandChange=function(e,t){n.setFocus(t),n.dispatchExpandChange(e,n.getItemById(t),t)},n.onItemClick=function(e,t){n.setFocus(t),n.dispatchItemClick(e,n.getItemById(t),t)},n.onFocus=function(){clearTimeout(n.blurRequest),void 0===n.state.focusedItemId&&n.props.data&&n.props.data.length&&n.setFocus(n.state.tabbableItemId)},n.onBlur=function(){clearTimeout(n.blurRequest),n.blurRequest=setTimeout(function(){return n.setFocus(void 0)},0)},n.onKeyDown=function(e){var t=n.getFocusedItem();if(t){var i=d.default(t,n.state.focusedItemId,n.props.data,e.keyCode,n.fieldsSvc);i!==n.state.focusedItemId&&(e.preventDefault(),n.setFocus(i)),n.dispatchEventsUponKeyboardNavigation(e,t)}},n}return r(t,e),t.prototype.render=function(){var i=this;return this.fieldsSvc=new p.default(this.props),s.createElement("div",{className:"k-widget k-treeview",onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,role:"tree","aria-multiselectable":!!this.ariaMultiSelectable||void 0,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},s.createElement("ul",{className:"k-treeview-lines",role:"group"},this.props.data.map(function(e,t){return s.createElement(c.default,{item:e,animate:i.props.animate,itemId:t.toString(),focusedItemId:i.state.focusedItemId,tabbableItemId:i.state.tabbableItemId,fieldsService:i.fieldsSvc,itemRender:i.props.itemRender,ariaMultiSelectable:i.ariaMultiSelectable,onItemClick:i.onItemClick,onExpandChange:i.onExpandChange,key:t})})))},t.prototype.componentDidUpdate=function(){var t=this;if(this.fieldsSvc.focusIdField){var i=this.state.focusedItemPublicId;if(i){var e=this.props.getFocusHierarchicalIndex?this.props.getFocusHierarchicalIndex(i):u.resolveItemId(function(e){return t.fieldsSvc.focusId(e)===i},this.props.data);e!==this.state.focusedItemId&&this.setState({focusedItemId:e})}}},t.prototype.dispatchEventsUponKeyboardNavigation=function(e,t){var i=this,n=function(){return u.isEnabledAndAllParentsEnabled(i.state.focusedItemId,i.props.data,i.fieldsSvc)};e.keyCode===a.Keys.left&&this.fieldsSvc.expanded(t)&&n()&&this.dispatchExpandChange(e,t,this.state.focusedItemId),e.keyCode===a.Keys.right&&!this.fieldsSvc.expanded(t)&&(this.fieldsSvc.hasChildren(t)||u.hasChildren(t))&&n()&&this.dispatchExpandChange(e,t,this.state.focusedItemId),e.keyCode===a.Keys.enter&&n()&&this.dispatchItemClick(e,t,this.state.focusedItemId)},t.prototype.setFocus=function(e){if(e)if(this.fieldsSvc.focusIdField){var t=this.getItemById(e);this.setState({focusedItemId:e,focusedItemPublicId:this.fieldsSvc.focusId(t)})}else this.setState({focusedItemId:e});else this.setState(function(e){return{focusedItemId:void 0,focusedItemPublicId:void 0,tabbableItemId:e.focusedItemId}})},t.prototype.getFocusedItem=function(){return this.state.focusedItemId?this.getItemById(this.state.focusedItemId):void 0},t.prototype.getItemById=function(e){return l.getItemById(e,this.props.data)},t.prototype.dispatchExpandChange=function(e,t,i){a.dispatchEvent(this.props.onExpandChange,e,this,{item:t,itemHierarchicalIndex:i})},t.prototype.dispatchItemClick=function(e,t,i){a.dispatchEvent(this.props.onItemClick,e,this,{item:t,itemHierarchicalIndex:i})},Object.defineProperty(t.prototype,"ariaMultiSelectable",{get:function(){return!0===this.props["aria-multiselectable"]||"true"===this.props["aria-multiselectable"]},enumerable:!0,configurable:!0}),t.propTypes={data:o.arrayOf(o.any),animate:o.bool,focusIdField:o.string,getHierarchicalIndexById:o.func,onExpandChange:o.func,onItemClick:o.func,expandField:o.string,selectField:o.string,hasChildrenField:o.string,textField:o.string,disableField:o.string,itemRender:o.any,"aria-multiselectable":o.oneOfType([o.bool,o.oneOf(["false","true"])]),"aria-label":o.string,"aria-labelledby":o.string},t.defaultProps={animate:!0},t}(s.Component);t.default=f},function(e,t){e.exports=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=i(2),d=i(0),u=i(1);t.default=function(e,t,i,n,r){switch(n){case a.Keys.left:return r.expanded(e)||d.isIdZeroLevel(t)?t:d.getDirectParentId(t);case a.Keys.right:return u.isItemExpandedAndWithChildren(e,r)?d.getFirstChildId(t):t;case a.Keys.up:return s=Number(d.getShortId(t)),o=d.getDirectParentId(t),s?function e(t,i,n){var r=d.getItemById(t,i);return u.isItemExpandedAndWithChildren(r,n)?e(d.createId(r.items.length-1,t),i,n):t}(d.createId(s-1,o),i,r):d.isIdZeroLevel(t)?t:o;case a.Keys.down:return u.isItemExpandedAndWithChildren(e,r)?d.getFirstChildId(t):function e(t,i){var n=d.getDirectParentId(t),r=n?d.getItemById(n,i):void 0,s=r?r.items:i,o=Number(d.getShortId(t));return o<s.length-1?d.createId(o+1,n):r?e(n,i):void 0}(t,i)||t;case a.Keys.home:return d.ZERO_LEVEL_ZERO_NODE_ID;case a.Keys.end:return function(){for(var e=(i.length-1).toString(),t=i[i.length-1];u.isItemExpandedAndWithChildren(t,r);)e=d.createId(t.items.length-1,e),t=t.items[t.items.length-1];return e}();default:return t}var s,o}},function(e,t,i){"use strict";var n,r=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var s=i(3),o=i(2),a=i(0),d=i(1),u=i(11),c=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return r(n,e),n.prototype.render=function(){var t=this,e=this.renderSubitemsIfApplicable();return s.createElement("li",{className:this.getRootClassName(),tabIndex:this.tabIndex,role:"treeitem","aria-expanded":this.ariaExpanded,"aria-selected":this.ariaSelected,"aria-disabled":!!this.fieldsSvc.disabled(this.item)||void 0,ref:function(e){return t.itemElement=e}},s.createElement("div",{className:"k-mid"},this.renderIcon(),s.createElement("span",{className:this.getContentClassName(),onClick:function(e){return t.props.onItemClick(e,t.itemId)}},this.props.itemRender?s.createElement(this.props.itemRender,{item:this.item,itemHierarchicalIndex:this.itemId}):this.fieldsSvc.text(this.item))),this.props.animate?s.createElement(u.Reveal,{transitionEnterDuration:200,transitionExitDuration:200,style:{display:"block"},children:e}):e)},n.prototype.componentDidMount=function(){var e=this.props.focusedItemId,t=this.itemId;e&&e===t&&this.itemElement.focus()},n.prototype.componentDidUpdate=function(e){var t=this.props.focusedItemId;t&&t!==e.focusedItemId&&t===this.itemId&&this.itemElement.focus()},n.prototype.renderIcon=function(){var t=this;return this.fieldsSvc.hasChildren(this.item)||d.hasChildren(this.item)?s.createElement("span",{className:this.getIconClassName(),onClick:function(e){return t.props.onExpandChange(e,t.itemId)}}):void 0},n.prototype.renderSubitemsIfApplicable=function(){var i=this;return d.isItemExpandedAndWithChildren(this.item,this.fieldsSvc)?s.createElement("ul",{className:"k-content",role:"group"},this.item.items.map(function(e,t){return s.createElement(n,{item:e,animate:i.props.animate,itemId:a.createId(t,i.itemId),focusedItemId:i.props.focusedItemId,tabbableItemId:i.props.tabbableItemId,fieldsService:i.props.fieldsService,itemRender:i.props.itemRender,ariaMultiSelectable:i.props.ariaMultiSelectable,onItemClick:i.props.onItemClick,onExpandChange:i.props.onExpandChange,key:t})})):void 0},Object.defineProperty(n.prototype,"fieldsSvc",{get:function(){return this.props.fieldsService},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"itemId",{get:function(){return this.props.itemId},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"item",{get:function(){return this.props.item},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"tabIndex",{get:function(){return(this.props.focusedItemId||this.props.tabbableItemId)===this.itemId?0:-1},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"ariaExpanded",{get:function(){return this.fieldsSvc.hasChildren(this.item)||d.hasChildren(this.item)?Boolean(this.fieldsSvc.expanded(this.item)):void 0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"ariaSelected",{get:function(){return!!this.fieldsSvc.selected(this.item)||(this.props.ariaMultiSelectable?!!this.fieldsSvc.disabled(this.item)&&void 0:void 0)},enumerable:!0,configurable:!0}),n.prototype.getIconClassName=function(){return o.classNames("k-icon",{"k-i-expand":!this.fieldsSvc.expanded(this.item),"k-i-collapse":this.fieldsSvc.expanded(this.item),"k-i-loading":this.fieldsSvc.expanded(this.item)&&!d.hasChildren(this.item)})},n.prototype.getRootClassName=function(){return o.classNames("k-item k-treeview-item",{"k-state-disabled":this.fieldsSvc.disabled(this.item)})},n.prototype.getContentClassName=function(){return o.classNames("k-in",{"k-state-focused":this.props.focusedItemId===this.itemId,"k-state-selected":this.fieldsSvc.selected(this.item)})},n}(s.Component);t.default=c},function(e,t){e.exports=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(4),r=i(5),s=function(){function e(e){this.expandField=e.expandField||n.EXPAND_FIELD,this.selectField=e.selectField||n.SELECT_FIELD,this.hasChildrenField=e.hasChildrenField||"hasChildren",this.textField=e.textField||"text",this.disableField=e.disableField||"disabled",this.focusIdField=e.focusIdField}return e.prototype.expanded=function(e){return r.getNestedValue(this.expandField,e)},e.prototype.selected=function(e){return r.getNestedValue(this.selectField,e)},e.prototype.text=function(e){return r.getNestedValue(this.textField,e)},e.prototype.disabled=function(e){return r.getNestedValue(this.disableField,e)},e.prototype.hasChildren=function(e){return r.getNestedValue(this.hasChildrenField,e)},e.prototype.focusId=function(e){return this.focusIdField&&r.getNestedValue(this.focusIdField,e)},e}();t.default=s},function(e,t,i){"use strict";var v=this&&this.__assign||Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0});var b=i(1),n=i(4),g=i(5);function r(e,t,i){if(i){var n=(h=t,I=y(f=i)?(m=f,h):(m=f.ids||[],f.operationField||h),{ids:m,field:I}),r=n.ids,s=n.field,o=r;return!y(i)&&i.idField&&(u=r,c=i.idField,l=e,p=[],u.forEach(function(t){p.push(b.resolveItemId(function(e){return g.getNestedValue(c,e)===t},l))}),o=p),a=s,d=e,o.forEach(function(e){d=b.updateItem(d,e,function(e){return function(e,t){for(var i=(a||"").split("."),n=t,r=0;r<i.length;r++){var s=i[r];if(r===i.length-1)n[s]=!0;else{if(void 0===n[s])return;n[s]=v({},n[s]),n=n[s]}}}(0,e)})}),d}var a,d,u,c,l,p,f,h,m,I;return e}function y(e){return void 0!==e.length}t.default=function(e,t){var i=e;return r(i=r(i,n.EXPAND_FIELD,t.expand),n.SELECT_FIELD,t.select)}}])}}});
System.register("@progress/kendo-react-treeview",["react","@progress/kendo-react-common","prop-types","@progress/kendo-react-animation"],function(s){var n,i,r,o;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){n=t(e)},function(e){i=t(e)},function(e){r=t(e)},function(e){o=t(e)}],execute:function(){!function(n){var i={};function r(e){if(i[e])return i[e].exports;var t=i[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}r.m=n,r.c=i,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=6)}([function(e,n,t){"use strict";function r(e){return s(e)?e:e.split(n.SEPARATOR)[0]}function o(e){if(s(e))return e;var t=e.indexOf(n.SEPARATOR);return e.substring(t+1)}function i(e,t){return e=e.toString(),t?t+n.SEPARATOR+e:e}function s(e){return e===n.EMPTY_ID||e.indexOf(n.SEPARATOR)<0}function a(e){return e!==n.EMPTY_ID&&e.indexOf(n.SEPARATOR)<0}Object.defineProperty(n,"__esModule",{value:!0}),n.EMPTY_ID="",n.ZERO_LEVEL_ZERO_NODE_ID="0",n.SEPARATOR="_",n.getItemById=function e(t,n){if(a(t))return n[Number(t)];var i=n[Number(r(t))];return i&&i.items&&i.items.length?e(o(t),i.items):void 0},n.getRootParentId=r,n.getIdWithoutRootParentId=o,n.getFirstChildId=function(e){return i("0",e)},n.createId=i,n.getDirectParentId=function(e){var t=e.lastIndexOf(n.SEPARATOR);return t<0?n.EMPTY_ID:e.substring(0,t)},n.isIdEmptyOrZeroLevel=s,n.isIdZeroLevel=a,n.getAllShortIds=function(e){return e.split(n.SEPARATOR)},n.getShortId=function(e){var t=e.lastIndexOf(n.SEPARATOR);return t<0?e:e.substring(t+1)}},function(e,t,n){"use strict";var a=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0});var c=n(0),o=n(2);function d(e){return Boolean(e.items&&e.items.length)}t.isItemExpandedAndWithChildren=function(e,t){return t.expanded(e)&&d(e)},t.resolveItemId=function(e,t){return function e(t,n,i){for(var r=void 0,o=0;o<n.length;o++){var s=n[o];if(t(s)){r=c.createId(o,i);break}if(d(s)&&(r=e(t,s.items,c.createId(o,i))))break}return r}(e,t,c.EMPTY_ID)},t.updateItem=function e(t,n,i){for(var r=[],o=0;o<t.length;o++)if(Number(c.getRootParentId(n))===o){var s=a({},t[o]);c.isIdZeroLevel(n)?i(s):t[o].items&&(s.items=e(t[o].items,c.getIdWithoutRootParentId(n),i)),r.push(s)}else r.push(t[o]);return r},t.hasChildren=d,t.isEnabledAndAllParentsEnabled=function(e,t,n){for(var i=c.getAllShortIds(e),r=t,o=0;o<i.length;o++){var s=r[Number(i[o])];if(n.disabled(s))return!1;r=s.items}return!0},t.getAllDirectIndirectChildrenIds=function(e,t,r){return r?function e(t){var n=[];if(t.items)for(var i=0;i<t.items.length;i++)n.push(o.getNestedValue(r,t.items[i])),n=n.concat(e(t.items[i]));return n}(e):function e(t,n){var i=[];if(t.items)for(var r=0;r<t.items.length;r++){var o=c.createId(r,n);i.push(o),i=i.concat(e(t.items[r],o))}return i}(e,t)},t.areAllDirectChildrenChecked=function(e,n,i,r){return!e.items||e.items.every(function(e,t){return-1<r.indexOf(i?o.getNestedValue(i,e):c.createId(t,n))})},t.getAllParents=function(e,t){for(var n=[],i=c.getAllShortIds(e),r=t,o=0;o<i.length-1&&r;o++){var s=r[Number(i[o])];n.push(s),r=s.items}return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNestedValue=function(e,t){var n=(e||"").split("."),i=t;return n.forEach(function(e){i=i?i[e]:void 0}),i},t.isArray=function(e){return void 0!==e.length}},function(e,t){e.exports=i},function(e,t){e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXPAND_FIELD="expanded",t.SELECT_FIELD="selected",t.CHECK_FIELD="checked",t.CHECK_INDETERMINATE_FIELD="checkIndeterminate"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7);t.TreeView=i.default;var r=n(13);t.processTreeViewItems=r.default;var o=n(14);t.handleTreeViewCheckChange=o.handleTreeViewCheckChange,function(e){for(var t in e)s(t,e[t])}(t)},function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),s=n(8),a=n(3),c=n(9),d=n(1),l=n(10),u=n(0),h=n(12),p=function(e){function t(){var i=null!==e&&e.apply(this,arguments)||this;return i.state={focusedItemId:void 0,focusedItemPublicId:void 0,tabbableItemId:u.ZERO_LEVEL_ZERO_NODE_ID},i.onCheckChange=function(e,t,n){i.setFocus(n),i.dispatchCheckChange(e,t,n)},i.onExpandChange=function(e,t,n){i.setFocus(n),i.dispatchExpandChange(e,t,n)},i.onDragStart=function(){},i.onDrop=function(){},i.onDragOver=function(){},i.onItemClick=function(e,t,n){i.setFocus(n),i.dispatchItemClick(e,t,n)},i.onFocus=function(){clearTimeout(i.blurRequest),void 0===i.state.focusedItemId&&i.data.length&&i.setFocus(i.state.tabbableItemId)},i.onBlur=function(){clearTimeout(i.blurRequest),i.blurRequest=setTimeout(function(){return i.setFocus(void 0)},0)},i.onKeyDown=function(e){var t=i.getFocusedItem();if(t){var n=c.default(t,i.state.focusedItemId,i.data,e.keyCode,i.fieldsSvc);n!==i.state.focusedItemId&&(e.preventDefault(),i.setFocus(n)),i.dispatchEventsOnKeyDown(e,t)}},i}return r(t,e),t.prototype.render=function(){var n=this;return this.fieldsSvc=new h.default(this.props),o.createElement("div",{className:"k-widget k-treeview",onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,role:"tree","aria-multiselectable":!!this.ariaMultiSelectable||void 0,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},o.createElement("ul",{className:"k-treeview-lines",role:"group"},this.data.map(function(e,t){return o.createElement(l.default,{item:e,animate:n.props.animate,itemId:t.toString(),focusedItemId:n.state.focusedItemId,tabbableItemId:n.state.tabbableItemId,fieldsService:n.fieldsSvc,itemRender:n.props.itemRender,checkboxes:n.props.checkboxes,ariaMultiSelectable:n.ariaMultiSelectable,onItemClick:n.onItemClick,draggable:!1,onDragStart:n.onDragStart,onDragOver:n.onDragOver,onDrop:n.onDrop,expandIcons:n.props.expandIcons,onExpandChange:n.onExpandChange,onCheckChange:n.onCheckChange,key:t})})))},t.prototype.componentDidUpdate=function(){var t=this;if(this.fieldsSvc.focusIdField){var n=this.state.focusedItemPublicId;if(n){var e=this.props.getFocusHierarchicalIndex?this.props.getFocusHierarchicalIndex(n):d.resolveItemId(function(e){return t.fieldsSvc.focusId(e)===n},this.data);e!==this.state.focusedItemId&&this.setState({focusedItemId:e})}}},t.prototype.dispatchEventsOnKeyDown=function(e,t){var n=this,i=function(){return d.isEnabledAndAllParentsEnabled(n.state.focusedItemId,n.data,n.fieldsSvc)};e.keyCode===a.Keys.left&&this.fieldsSvc.expanded(t)&&i()?this.dispatchExpandChange(e,t,this.state.focusedItemId):e.keyCode===a.Keys.right&&!this.fieldsSvc.expanded(t)&&(this.fieldsSvc.hasChildren(t)||d.hasChildren(t))&&i()?this.dispatchExpandChange(e,t,this.state.focusedItemId):e.keyCode===a.Keys.enter&&i()?this.dispatchItemClick(e,t,this.state.focusedItemId):e.keyCode===a.Keys.space&&i()&&this.dispatchCheckChange(e,t,this.state.focusedItemId)},t.prototype.setFocus=function(e){if(e)if(this.fieldsSvc.focusIdField){var t=this.getItemById(e);this.setState({focusedItemId:e,focusedItemPublicId:this.fieldsSvc.focusId(t)})}else this.setState({focusedItemId:e});else this.setState(function(e){return{focusedItemId:void 0,focusedItemPublicId:void 0,tabbableItemId:e.focusedItemId}})},t.prototype.getFocusedItem=function(){return this.state.focusedItemId?this.getItemById(this.state.focusedItemId):void 0},t.prototype.getItemById=function(e){return u.getItemById(e,this.data)},t.prototype.dispatchCheckChange=function(e,t,n){a.dispatchEvent(this.props.onCheckChange,e,this,{item:t,itemHierarchicalIndex:n})},t.prototype.dispatchExpandChange=function(e,t,n){a.dispatchEvent(this.props.onExpandChange,e,this,{item:t,itemHierarchicalIndex:n})},t.prototype.dispatchItemClick=function(e,t,n){a.dispatchEvent(this.props.onItemClick,e,this,{item:t,itemHierarchicalIndex:n})},Object.defineProperty(t.prototype,"ariaMultiSelectable",{get:function(){return!0===this.props["aria-multiselectable"]||"true"===this.props["aria-multiselectable"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this.props.data||[]},enumerable:!0,configurable:!0}),t.propTypes={data:s.arrayOf(s.any),animate:s.bool,focusIdField:s.string,getHierarchicalIndexById:s.func,onExpandChange:s.func,onItemClick:s.func,expandField:s.string,selectField:s.string,hasChildrenField:s.string,textField:s.string,disableField:s.string,itemRender:s.any,"aria-multiselectable":s.oneOfType([s.bool,s.oneOf(["false","true"])]),"aria-label":s.string,"aria-labelledby":s.string},t.defaultProps={animate:!0},t}(o.Component);t.default=p},function(e,t){e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),c=n(0),d=n(1);t.default=function(e,t,n,i,r){switch(i){case a.Keys.left:return c.isIdZeroLevel(t)||r.expanded(e)&&d.isEnabledAndAllParentsEnabled(t,n,r)?t:c.getDirectParentId(t);case a.Keys.right:return d.isItemExpandedAndWithChildren(e,r)?c.getFirstChildId(t):t;case a.Keys.up:return o=Number(c.getShortId(t)),s=c.getDirectParentId(t),o?function e(t,n,i){var r=c.getItemById(t,n);return d.isItemExpandedAndWithChildren(r,i)?e(c.createId(r.items.length-1,t),n,i):t}(c.createId(o-1,s),n,r):c.isIdZeroLevel(t)?t:s;case a.Keys.down:return d.isItemExpandedAndWithChildren(e,r)?c.getFirstChildId(t):function e(t,n){var i=c.getDirectParentId(t),r=i?c.getItemById(i,n):void 0,o=r?r.items:n,s=Number(c.getShortId(t));return s<o.length-1?c.createId(s+1,i):r?e(i,n):void 0}(t,n)||t;case a.Keys.home:return c.ZERO_LEVEL_ZERO_NODE_ID;case a.Keys.end:return function(){for(var e=(n.length-1).toString(),t=n[n.length-1];d.isItemExpandedAndWithChildren(t,r);)e=c.createId(t.items.length-1,e),t=t.items[t.items.length-1];return e}();default:return t}var o,s}},function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),s=n(3),a=n(0),c=n(1),d=n(11),l=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.guid=s.guid(),t.onCheckChange=function(e){t.props.onCheckChange(e,t.item,t.itemId)},t.onExpandChange=function(e){t.props.onExpandChange(e,t.item,t.itemId)},t.onItemClick=function(e){t.props.onItemClick(e,t.item,t.itemId)},t.onDragStart=function(e){t.props.draggable&&t.props.onDragStart(e,t.item,t.itemId)},t.onDrop=function(e){t.props.onDrop(e,t.item,t.itemId,t.getDropZonePosition(e.clientY))},t.onDragOver=function(e){t.props.onDragOver(e,t.item,t.itemId,t.getDropZonePosition(e.clientY))},t}return r(i,e),i.prototype.render=function(){var t=this,e=this.renderSubitemsIfApplicable();return o.createElement("li",{className:this.getRootClassName(),tabIndex:this.tabIndex,role:"treeitem","aria-expanded":this.ariaExpanded,"aria-selected":this.ariaSelected,"aria-checked":this.ariaChecked,"aria-disabled":!!this.fieldsSvc.disabled(this.item)||void 0,ref:function(e){return t.itemElement=e}},o.createElement("div",{className:"k-mid",onDragOver:this.onDragOver,onDrop:this.onDrop,ref:function(e){return t.dropZone=e}},this.renderExpandIcon(),this.renderCheckbox(),o.createElement("span",{className:this.getContentClassName(),onClick:this.onItemClick,draggable:this.props.draggable,onDragStart:this.onDragStart},this.props.itemRender?o.createElement(this.props.itemRender,{item:this.item,itemHierarchicalIndex:this.itemId}):this.fieldsSvc.text(this.item))),this.props.animate?o.createElement(d.Reveal,{transitionEnterDuration:200,transitionExitDuration:200,style:{display:"block"},children:e}):e)},i.prototype.componentDidMount=function(){var e=this.props.focusedItemId,t=this.itemId;e&&e===t&&this.itemElement.focus(),this.checkboxElement&&(this.checkboxElement.indeterminate=this.fieldsSvc.checkIndeterminate(this.item))},i.prototype.componentDidUpdate=function(e){var t=this.props.focusedItemId;if(t&&t!==e.focusedItemId&&t===this.itemId&&this.itemElement.focus(),this.checkboxElement){var n=this.fieldsSvc.checkIndeterminate(this.item);n!==e.fieldsService.checkIndeterminate(e.item)&&(this.checkboxElement.indeterminate=n)}},i.prototype.renderCheckbox=function(){var t=this;return this.props.checkboxes?o.createElement("div",{className:"k-checkbox-wrapper"},o.createElement("input",{type:"checkbox",className:"k-checkbox",checked:Boolean(this.fieldsSvc.checked(this.item)),id:this.guid,tabIndex:-1,onChange:this.onCheckChange,ref:function(e){return t.checkboxElement=e}}),o.createElement("label",{className:"k-checkbox-label",htmlFor:this.guid})):void 0},i.prototype.renderExpandIcon=function(){return this.props.expandIcons&&(this.fieldsSvc.hasChildren(this.item)||c.hasChildren(this.item))?o.createElement("span",{className:this.getIconClassName(),onClick:this.onExpandChange}):void 0},i.prototype.renderSubitemsIfApplicable=function(){var n=this;return c.isItemExpandedAndWithChildren(this.item,this.fieldsSvc)?o.createElement("ul",{className:"k-content",role:"group"},this.item.items.map(function(e,t){return o.createElement(i,{item:e,animate:n.props.animate,itemId:a.createId(t,n.itemId),focusedItemId:n.props.focusedItemId,tabbableItemId:n.props.tabbableItemId,fieldsService:n.props.fieldsService,itemRender:n.props.itemRender,checkboxes:n.props.checkboxes,ariaMultiSelectable:n.props.ariaMultiSelectable,onItemClick:n.props.onItemClick,draggable:n.props.draggable,onDragStart:n.props.onDragStart,onDragOver:n.props.onDragOver,onDrop:n.props.onDrop,expandIcons:n.props.expandIcons,onExpandChange:n.props.onExpandChange,onCheckChange:n.props.onCheckChange,key:t})})):void 0},i.prototype.getDropZonePosition=function(e){var t=this.dropZone.getBoundingClientRect(),n=t.y;return n+t.height-e<5?"after":e-n<5?"before":"over"},Object.defineProperty(i.prototype,"fieldsSvc",{get:function(){return this.props.fieldsService},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"itemId",{get:function(){return this.props.itemId},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"item",{get:function(){return this.props.item},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tabIndex",{get:function(){return(this.props.focusedItemId||this.props.tabbableItemId)===this.itemId?0:-1},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"ariaExpanded",{get:function(){return this.fieldsSvc.hasChildren(this.item)||c.hasChildren(this.item)?Boolean(this.fieldsSvc.expanded(this.item)):void 0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"ariaChecked",{get:function(){return this.props.checkboxes?this.fieldsSvc.checked(this.item)?"true":this.fieldsSvc.checkIndeterminate(this.item)?"mixed":"false":void 0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"ariaSelected",{get:function(){return!!this.fieldsSvc.selected(this.item)||(this.props.ariaMultiSelectable?!!this.fieldsSvc.disabled(this.item)&&void 0:void 0)},enumerable:!0,configurable:!0}),i.prototype.getIconClassName=function(){return s.classNames("k-icon",{"k-i-expand":!this.fieldsSvc.expanded(this.item),"k-i-collapse":this.fieldsSvc.expanded(this.item),"k-i-loading":this.fieldsSvc.expanded(this.item)&&!c.hasChildren(this.item)})},i.prototype.getRootClassName=function(){return s.classNames("k-item k-treeview-item",{"k-state-disabled":this.fieldsSvc.disabled(this.item)})},i.prototype.getContentClassName=function(){return s.classNames("k-in",{"k-state-focused":this.props.focusedItemId===this.itemId,"k-state-selected":this.fieldsSvc.selected(this.item)})},i}(o.Component);t.default=l},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),r=n(2),o=function(){function e(e){this.expandField=e.expandField||i.EXPAND_FIELD,this.selectField=e.selectField||i.SELECT_FIELD,this.hasChildrenField=e.hasChildrenField||"hasChildren",this.textField=e.textField||"text",this.disableField=e.disableField||"disabled",this.checkField=e.checkField||i.CHECK_FIELD,this.checkIndeterminateField=e.checkIndeterminateField||i.CHECK_INDETERMINATE_FIELD,this.focusIdField=e.focusIdField}return e.prototype.expanded=function(e){return r.getNestedValue(this.expandField,e)},e.prototype.selected=function(e){return r.getNestedValue(this.selectField,e)},e.prototype.text=function(e){return r.getNestedValue(this.textField,e)},e.prototype.disabled=function(e){return r.getNestedValue(this.disableField,e)},e.prototype.hasChildren=function(e){return r.getNestedValue(this.hasChildrenField,e)},e.prototype.checked=function(e){return r.getNestedValue(this.checkField,e)},e.prototype.checkIndeterminate=function(e){return r.getNestedValue(this.checkIndeterminateField,e)},e.prototype.focusId=function(e){return this.focusIdField&&r.getNestedValue(this.focusIdField,e)},e}();t.default=o},function(e,t,n){"use strict";var s=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0});var p=n(1),a=n(5),f=n(2);function i(e,t,n){if(n){var i=m(n,t),r=i.ids,o=i.field,s=r;return!f.isArray(n)&&n.idField&&(d=r,l=n.idField,u=e,h=[],d.forEach(function(t){h.push(p.resolveItemId(function(e){return f.getNestedValue(l,e)===t},u))}),s=h),a=o,c=e,s.forEach(function(e){c=p.updateItem(c,e,function(e){return I(a,e)})}),c}var a,c,d,l,u,h;return e}function m(e,t){var n,i;return i=f.isArray(e)?(n=e,t):(n=e.ids||[],e.operationField||t),{ids:n,field:i}}function I(e,t){for(var n=(e||"").split("."),i=t,r=0;r<n.length;r++){var o=n[r];if(r===n.length-1)i[o]=!0;else{if(void 0===i[o])return;i[o]=s({},i[o]),i=i[o]}}}function c(e,t,n,i){for(var r=!1,o=0;o<e.length;o++){var s=e[o];if(f.getNestedValue(n,s)){if(!r)for(var a=0;a<t.length;a++)I(i,t[a]);r=!0,s.items&&c(s.items,[],n,i)}else s.items&&c(s.items,r?[s]:t.concat([s]),n,i)}}t.default=function(e,t){var n=e;return e&&e.length?(function(e,t){if(t&&!f.isArray(t)&&t.applyCheckIndeterminate)for(var n=m(t,a.CHECK_FIELD).field,i=t.checkIndeterminateField||a.CHECK_INDETERMINATE_FIELD,r=0;r<e.length;r++){var o=e[r];o.items&&c(o.items,f.getNestedValue(n,o)?[]:[o],n,i)}}(n=i(n=i(n=i(n,a.EXPAND_FIELD,t.expand),a.SELECT_FIELD,t.select),a.CHECK_FIELD,t.check),t.check),n):[]}},function(e,t,n){"use strict";var S=this&&this.__generator||function(n,i){var r,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=i.call(n,a)}catch(e){t=[6,e],o=0}finally{r=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}};Object.defineProperty(t,"__esModule",{value:!0});var O=n(1),D=n(0),P=n(2);t.handleTreeViewCheckChange=function(e,t,n,i){if(void 0===i&&(i={}),!n||!n.length)return[];var r,o,s,a,c,d,l,u,h,p,f,m,I,g,b,v,y=(o=t,a=void 0,P.isArray(o)?s=o:(s=o.ids||[],a=o.idField),{ids:s,idField:a}),E=y.ids,C=y.idField,x=C?P.getNestedValue(C,e.item):e.itemHierarchicalIndex,k=E.indexOf(x),_=-1===k;return i.singleMode?r=_?[x]:[]:(r=E.slice(),_?r.push(x):r.splice(k,1),i.checkChildren&&(m=e.item,I=e.itemHierarchicalIndex,g=_,b=C,v=r,O.getAllDirectIndirectChildrenIds(m,I,b).forEach(function(e){g&&-1===v.indexOf(e)?v.push(e):!g&&-1<v.indexOf(e)&&v.splice(v.indexOf(e),1)})),i.checkParents&&(c=e.itemHierarchicalIndex,d=_,l=C,u=r,h=n,p=function(){var t,n,i;return S(this,function(e){switch(e.label){case 0:if(!l)return[3,5];t=O.getAllParents(c,h),n=t.length-1,e.label=1;case 1:return-1<n?[4,{id:P.getNestedValue(l,t[n]),item:d?t[n]:void 0}]:[3,4];case 2:e.sent(),e.label=3;case 3:return n--,[3,1];case 4:return[3,8];case 5:i=D.getDirectParentId(c),e.label=6;case 6:return i?[4,{id:i,item:d?D.getItemById(i,h):void 0}]:[3,8];case 7:return e.sent(),i=D.getDirectParentId(i),[3,6];case 8:return[2]}})}(),f=p.next(),d?function(){for(;!f.done;){var e=f.value,t=e.id,n=e.item;if(-1!==u.indexOf(t)||!O.areAllDirectChildrenChecked(n,t,l,u))break;u.push(t),f=p.next()}}():function(){for(;!f.done;){var e=f.value.id,t=u.indexOf(e);if(!(-1<t))break;u.splice(t,1),f=p.next()}}())),P.isArray(t)?r:Object.assign({},t,{ids:r})}}])}}});
{
"name": "@progress/kendo-react-treeview",
"version": "2.7.0-dev.201902220837",
"version": "2.7.0-dev.201902221817",
"description": "KendoReact TreeView package",

@@ -31,7 +31,7 @@ "repository": {

"dependencies": {
"@progress/kendo-react-common": "2.7.0-dev.201902220837",
"@progress/kendo-react-common": "2.7.0-dev.201902221817",
"prop-types": "^15.6.0"
},
"devDependencies": {
"@progress/kendo-react-animation": "2.7.0-dev.201902220837"
"@progress/kendo-react-animation": "2.7.0-dev.201902221817"
},

@@ -38,0 +38,0 @@ "@progress": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc