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
1103
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.11.0-dev.201904181047 to 2.11.0-dev.201904190825

2

dist/systemjs/kendo-react-treeview.js

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

System.register("@progress/kendo-react-treeview",["react","prop-types","@progress/kendo-react-common","@progress/kendo-react-animation"],function(d){var i,n,r,s;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){s=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,o,t){"use strict";function a(e){return n(e)?e:e.split(o.SEPARATOR)[0]}function c(e){if(n(e))return e;var t=e.indexOf(o.SEPARATOR);return e.substring(t+1)}function i(e,t){return e=e.toString(),t?t+o.SEPARATOR+e:e}function d(e){var t=e.lastIndexOf(o.SEPARATOR);return t<0?o.EMPTY_ID:e.substring(0,t)}function n(e){return e===o.EMPTY_ID||e.indexOf(o.SEPARATOR)<0}function r(e){return e!==o.EMPTY_ID&&e.indexOf(o.SEPARATOR)<0}function l(e){var t=e.lastIndexOf(o.SEPARATOR);return t<0?e:e.substring(t+1)}Object.defineProperty(o,"__esModule",{value:!0}),o.EMPTY_ID="",o.ZERO_LEVEL_ZERO_NODE_ID="0",o.SEPARATOR="_",o.getItemById=function e(t,i){if(r(t))return i[Number(t)];var n=i[Number(a(t))];return n&&n.items&&n.items.length?e(c(t),n.items):void 0},o.getRootParentId=a,o.getIdWithoutRootParentId=c,o.getFirstChildId=function(e){return i("0",e)},o.createId=i,o.getDirectParentId=d,o.isIdEmptyOrZeroLevel=n,o.isIdZeroLevel=r,o.getAllShortIds=function(e){return e.split(o.SEPARATOR)},o.getShortId=l,o.isItemFirstFromSiblings=function(e){return l(e)===o.ZERO_LEVEL_ZERO_NODE_ID},o.getDecrementedItemIdAfterRemoval=function(e,t){var i=t;e="r"+o.SEPARATOR+e,t="r"+o.SEPARATOR+t;var n=d(e)+o.SEPARATOR;if(t.startsWith(n)){var r=t.substring(n.length);if(r){var s=a(r);if(Number(l(e))<Number(s))return c(n+(Number(s)-1).toString()+r.substring(s.length))}}return i}},function(e,t,i){"use strict";var d=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 l=i(0),s=i(10),u=i(3);function r(e,t,i){var n=[],r=new s.default;return r.init(e),function e(t,i,n,r,s){for(var o=0;o<n.length;o++){var a=n[o],c=l.createId(o,r);t.hasId(u.getNestedValue(i,a))&&s.push(c),p(a)&&e(t,i,a.items,c,s)}}(r,t,i,l.EMPTY_ID,n),n}function p(e){return Boolean(e.items&&e.items.length)}t.isItemExpandedAndWithChildren=function(e,t){return t.expanded(e)&&p(e)},t.resolveItemId=function(e,t,i){var n=r([e],t,i);return n.length?n[0]:void 0},t.resolveItemsIds=r,t.updateItem=function e(t,i,n,r){var s,o=Number(l.getRootParentId(i));if(o>=t.length)return t;var a=t,c=t[o];return c[r]||(c=(a=t.slice())[o]=Object.assign({},c,((s={})[r]=!0,s))),l.isIdZeroLevel(i)?n(c):c.items&&(c.items=e(c.items,l.getIdWithoutRootParentId(i),n,r)),a},t.hasChildren=p,t.isEnabledAndAllParentsEnabled=function(e,t,i){for(var n=l.getAllShortIds(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},t.getAllDirectIndirectChildrenIds=function(e,t,r){return r?function e(t){var i=[];if(t.items)for(var n=0;n<t.items.length;n++)i.push(u.getNestedValue(r,t.items[n])),i=i.concat(e(t.items[n]));return i}(e):function e(t,i){var n=[];if(t.items)for(var r=0;r<t.items.length;r++){var s=l.createId(r,i);n.push(s),n=n.concat(e(t.items[r],s))}return n}(e,t)},t.areAllDirectChildrenChecked=function(e,i,n,r){return!e.items||e.items.every(function(e,t){return-1<r.indexOf(n?u.getNestedValue(n,e):l.createId(t,i))})},t.getAllParents=function(e,t){for(var i=[],n=l.getAllShortIds(e),r=t,s=0;s<n.length-1&&r;s++){var o=r[Number(n[s])];i.push(o),r=o.items}return i},t.removeItem=function e(t,i){var n=i.slice();if(l.isIdZeroLevel(t))n.splice(Number(t),1);else{var r=Number(l.getRootParentId(t)),s=n[r]=d({},n[r]);s.items=e(l.getIdWithoutRootParentId(t),s.items)}return n},t.addItem=function e(t,i,n,r){var s=r.slice();if(l.isIdZeroLevel(n))if("child"===i){var o=s[Number(n)]=d({},s[Number(n)]);o.items?(o.items=o.items.slice(),o.items.push(t)):o.items=[t]}else s.splice(Number(n)+("after"===i?1:0),0,t);else{var a=Number(l.getRootParentId(n)),c=s[a]=d({},s[a]);c.items=e(t,i,l.getIdWithoutRootParentId(n),c.items)}return s}},function(e,t){e.exports=r},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},t.isArray=function(e){return void 0!==e.length}},function(e,t,i){"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",t.DOM_KENDO_ITEM_ID_FIELD="_kendoItemId",t.DOM_KENDO_TREEVIEW_GUID_FIELD="_kendoTreeViewGuid"},function(e,t){e.exports=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(7);t.TreeView=n.default;var r=i(14);t.processTreeViewItems=r.default;var s=i(15);t.moveTreeViewItem=s.default;var o=i(16);t.handleTreeViewCheckChange=o.handleTreeViewCheckChange;var a=i(17);t.TreeViewDragClue=a.default;var c=i(18);t.TreeViewDragAnalyzer=c.default,function(e){for(var t in e)d(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(5),o=i(8),c=i(2),d=i(9),a=i(1),l=i(11),u=i(0),p=i(13),h=function(e){function t(){var a=null!==e&&e.apply(this,arguments)||this;return a.state={focusedItemId:void 0,focusedItemPublicId:void 0,tabbableItemId:u.ZERO_LEVEL_ZERO_NODE_ID},a.allowExplicitFocus=!1,a.treeGuid=c.guid(),a.onFocusDomElNeeded=function(e){a.allowExplicitFocus&&a.focusDomItem(e)},a.onCheckChange=function(e,t,i){a.setFocus(i),a.dispatchCheckChange(e,t,i)},a.onExpandChange=function(e,t,i){a.setFocus(i),a.dispatchExpandChange(e,t,i)},a.onPress=function(e,t,i){e.originalEvent.preventDefault(),a.props.onItemDragStart&&a.props.onItemDragStart.call(void 0,{target:a,item:t,itemHierarchicalIndex:i})},a.onDrag=function(e,t,i){e.originalEvent.preventDefault();var n=e.pageX,r=e.pageY,s=e.clientX,o=e.clientY;a.props.onItemDragOver&&a.props.onItemDragOver.call(void 0,{target:a,item:t,itemHierarchicalIndex:i,pageX:n,pageY:r,clientX:s,clientY:o})},a.onRelease=function(e,t,i){var n=e.pageX,r=e.pageY,s=e.clientX,o=e.clientY;a.props.onItemDragEnd&&a.props.onItemDragEnd.call(void 0,{target:a,item:t,itemHierarchicalIndex:i,pageX:n,pageY:r,clientX:s,clientY:o})},a.onItemClick=function(e,t,i){a.setFocus(i),a.dispatchItemClick(e,t,i)},a.onFocus=function(){clearTimeout(a.blurRequest),void 0===a.state.focusedItemId&&a.data.length&&a.setFocus(a.state.tabbableItemId)},a.onBlur=function(){clearTimeout(a.blurRequest),a.blurRequest=setTimeout(function(){return a.setFocus(void 0)},0)},a.onKeyDown=function(e){var t=a.getFocusedItem();if(t){var i=d.default(t,a.state.focusedItemId,a.data,e.keyCode,a.fieldsSvc);i!==a.state.focusedItemId&&(e.preventDefault(),a.allowExplicitFocus=!0,a.setFocus(i)),a.dispatchEventsOnKeyDown(e,t)}},a}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"+(this.props.className?" "+this.props.className:""),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.data.map(function(e,t){return s.createElement(l.default,{item:e,itemId:t.toString(),treeGuid:i.treeGuid,animate:i.props.animate,focusedItemId:i.state.focusedItemId,tabbableItemId:i.state.tabbableItemId,fieldsService:i.fieldsSvc,itemRender:i.props.itemRender,checkboxes:i.props.checkboxes,ariaMultiSelectable:i.ariaMultiSelectable,onItemClick:i.onItemClick,onFocusDomElNeeded:i.onFocusDomElNeeded,draggable:i.props.draggable,onPress:i.onPress,onDrag:i.onDrag,onRelease:i.onRelease,expandIcons:i.props.expandIcons,onExpandChange:i.onExpandChange,onCheckChange:i.onCheckChange,key:t})})))},t.prototype.componentDidUpdate=function(){this.allowExplicitFocus=!1,this.refocusDueToFocusIdField()},t.prototype.dispatchEventsOnKeyDown=function(e,t){var i=this,n=function(){return a.isEnabledAndAllParentsEnabled(i.state.focusedItemId,i.data,i.fieldsSvc)};e.keyCode===c.Keys.left&&this.fieldsSvc.expanded(t)&&n()?this.dispatchExpandChange(e,t,this.state.focusedItemId):e.keyCode===c.Keys.right&&!this.fieldsSvc.expanded(t)&&(this.fieldsSvc.hasChildren(t)||a.hasChildren(t))&&n()?this.dispatchExpandChange(e,t,this.state.focusedItemId):e.keyCode===c.Keys.enter&&n()?this.dispatchItemClick(e,t,this.state.focusedItemId):e.keyCode===c.Keys.space&&n()&&(e.preventDefault(),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,i){c.dispatchEvent(this.props.onCheckChange,e,this,{item:t,itemHierarchicalIndex:i})},t.prototype.dispatchExpandChange=function(e,t,i){c.dispatchEvent(this.props.onExpandChange,e,this,{item:t,itemHierarchicalIndex:i})},t.prototype.dispatchItemClick=function(e,t,i){c.dispatchEvent(this.props.onItemClick,e,this,{item:t,itemHierarchicalIndex:i})},t.prototype.refocusDueToFocusIdField=function(){if(this.fieldsSvc.focusIdField){var e=this.state.focusedItemPublicId;if(e){var t=this.props.getFocusHierarchicalIndex?this.props.getFocusHierarchicalIndex(e):a.resolveItemId(e,this.fieldsSvc.focusIdField,this.data);t!==this.state.focusedItemId&&(this.allowExplicitFocus=!0,this.setState({focusedItemId:t}))}}},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.prototype.focusDomItem=function(e){e.focus()},Object.defineProperty(t.prototype,"guid",{get:function(){return this.treeGuid},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=h},function(e,t){e.exports=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=i(2),c=i(0),d=i(1);t.default=function(e,t,i,n,r){switch(n){case a.Keys.left:return c.isIdZeroLevel(t)||r.expanded(e)&&d.isEnabledAndAllParentsEnabled(t,i,r)?t:c.getDirectParentId(t);case a.Keys.right:return d.isItemExpandedAndWithChildren(e,r)?c.getFirstChildId(t):t;case a.Keys.up:return s=Number(c.getShortId(t)),o=c.getDirectParentId(t),s?function e(t,i,n){var r=c.getItemById(t,i);return d.isItemExpandedAndWithChildren(r,n)?e(c.createId(r.items.length-1,t),i,n):t}(c.createId(s-1,o),i,r):c.isIdZeroLevel(t)?t:o;case a.Keys.down:return d.isItemExpandedAndWithChildren(e,r)?c.getFirstChildId(t):function e(t,i){var n=c.getDirectParentId(t),r=n?c.getItemById(n,i):void 0,s=r?r.items:i,o=Number(c.getShortId(t));return o<s.length-1?c.createId(o+1,n):r?e(n,i):void 0}(t,i)||t;case a.Keys.home:return c.ZERO_LEVEL_ZERO_NODE_ID;case a.Keys.end:return function(){for(var e=(i.length-1).toString(),t=i[i.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 s,o}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.objects=[]}return e.prototype.init=function(e){for(var t,i=0;i<e.length;i++)i%5e4==0&&(t={},this.objects.push(t)),t[e[i]]=!0},e.prototype.hasId=function(t){return this.objects.some(function(e){return e[t]})},e}();t.default=n},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(5),o=i(2),a=i(0),c=i(1),d=i(12),l=i(4),u=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.itemGuid=o.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.onPress=function(e){t.props.onPress(e.event,t.item,t.itemId)},t.onDrag=function(e){t.props.onDrag(e.event,t.item,t.itemId)},t.onRelease=function(e){t.props.onRelease(e.event,t.item,t.itemId)},t.assignDraggableMeta=function(e){e&&(e[l.DOM_KENDO_ITEM_ID_FIELD]=t.props.itemId,e[l.DOM_KENDO_TREEVIEW_GUID_FIELD]=t.props.treeGuid)},t}return r(n,e),n.prototype.render=function(){var t=this,e=this.renderSubitemsIfApplicable(),i=this.renderItemInPart();return s.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}},s.createElement("div",{className:"k-mid",ref:this.assignDraggableMeta},this.renderExpandIcon(),this.renderCheckbox(),this.props.draggable?s.createElement(o.Draggable,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease},i):i),this.props.animate?s.createElement(d.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.props.onFocusDomElNeeded(this.itemElement),this.checkboxElement&&(this.checkboxElement.indeterminate=this.fieldsSvc.checkIndeterminate(this.item))},n.prototype.componentDidUpdate=function(e){var t=this.props.focusedItemId;if(t&&t!==e.focusedItemId&&t===this.itemId&&this.props.onFocusDomElNeeded(this.itemElement),this.checkboxElement){var i=this.fieldsSvc.checkIndeterminate(this.item);i!==e.fieldsService.checkIndeterminate(e.item)&&(this.checkboxElement.indeterminate=i)}},n.prototype.renderCheckbox=function(){var t=this;return this.props.checkboxes?s.createElement("div",{className:"k-checkbox-wrapper"},s.createElement("input",{type:"checkbox",className:"k-checkbox",checked:Boolean(this.fieldsSvc.checked(this.item)),id:this.itemGuid,tabIndex:-1,onChange:this.onCheckChange,ref:function(e){return t.checkboxElement=e}}),s.createElement("label",{className:"k-checkbox-label",htmlFor:this.itemGuid})):void 0},n.prototype.renderExpandIcon=function(){return this.props.expandIcons&&(this.fieldsSvc.hasChildren(this.item)||c.hasChildren(this.item))?s.createElement("span",{className:this.getIconClassName(),onClick:this.onExpandChange}):void 0},n.prototype.renderSubitemsIfApplicable=function(){var i=this;return c.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,itemId:a.createId(t,i.itemId),treeGuid:i.props.treeGuid,animate:i.props.animate,focusedItemId:i.props.focusedItemId,tabbableItemId:i.props.tabbableItemId,fieldsService:i.props.fieldsService,itemRender:i.props.itemRender,checkboxes:i.props.checkboxes,ariaMultiSelectable:i.props.ariaMultiSelectable,onItemClick:i.props.onItemClick,onFocusDomElNeeded:i.props.onFocusDomElNeeded,draggable:i.props.draggable,onPress:i.props.onPress,onDrag:i.props.onDrag,onRelease:i.props.onRelease,expandIcons:i.props.expandIcons,onExpandChange:i.props.onExpandChange,onCheckChange:i.props.onCheckChange,key:t})})):void 0},n.prototype.renderItemInPart=function(){return s.createElement("span",{className:this.getContentClassName(),onClick:this.onItemClick},this.props.itemRender?s.createElement(this.props.itemRender,{item:this.item,itemHierarchicalIndex:this.itemId}):this.fieldsSvc.text(this.item))},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)||c.hasChildren(this.item)?Boolean(this.fieldsSvc.expanded(this.item)):void 0},enumerable:!0,configurable:!0}),Object.defineProperty(n.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(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)&&!c.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=u},function(e,t){e.exports=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(4),r=i(3),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.checkField=e.checkField||n.CHECK_FIELD,this.checkIndeterminateField=e.checkIndeterminateField||n.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=s},function(e,t,i){"use strict";var o=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 p=i(1),a=i(4),h=i(3);function r(e,t,i,n){if(i){var r=f(i,t),s=r.ids,o=r.field;return a=e,c=!h.isArray(i)&&i.idField?p.resolveItemsIds(s,i.idField,e):s,d=o,l=n,u=a,c.forEach(function(e){u=p.updateItem(u,e,function(e){return m(d,e)},l)}),u}var a,c,d,l,u;return e}function f(e,t){var i,n;return n=h.isArray(e)?(i=e,t):(i=e.ids||[],e.operationField||t),{ids:i,field:n}}function m(e,t){for(var i=(e||"").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]=o({},n[s]),n=n[s]}}}function c(e,t,i,n){for(var r=!1,s=0;s<e.length;s++){var o=e[s];if(h.getNestedValue(i,o)){if(!r)for(var a=0;a<t.length;a++)m(n,t[a]);r=!0,o.items&&c(o.items,[],i,n)}else o.items&&c(o.items,r?[o]:t.concat([o]),i,n)}}t.default=function(e,t){if(!e||!e.length)return[];var i=e,n=t.cloneField||"cloned";return function(e,t){if(t&&!h.isArray(t)&&t.applyCheckIndeterminate)for(var i=f(t,a.CHECK_FIELD).field,n=t.checkIndeterminateField||a.CHECK_INDETERMINATE_FIELD,r=0;r<e.length;r++){var s=e[r];s.items&&c(s.items,h.getNestedValue(i,s)?[]:[s],i,n)}}(i=r(i=r(i=r(i,a.EXPAND_FIELD,t.expand,n),a.SELECT_FIELD,t.select,n),a.CHECK_FIELD,t.check,n),t.check),i}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=i(1),l=i(0);t.default=function(t,i,e,n,r){if(!function(){if(!(i&&i.length&&t&&n))return!1;if(r&&!r.length)return!1;var e=r&&r!==i?r:i;return!!l.getItemById(n,e)}())return c();var s=l.getItemById(t,i);if(!s)return c();if(r&&r!==i)return{sourceData:d.removeItem(t,i),targetData:d.addItem(s,e,n,r)};if((n+"_").startsWith(t+"_"))return c();var o=d.removeItem(t,i),a=d.addItem(s,e,l.getDecrementedItemIdAfterRemoval(t,n),o);return r?{sourceData:a,targetData:a}:a;function c(){return r?{sourceData:i,targetData:r}:i}}},function(e,t,i){"use strict";var k=this&&this.__generator||function(i,n){var r,s,o,e,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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,s&&(o=2&t[0]?s.return:t[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,t[1])).done)return o;switch(s=0,o&&(t=[2&t[0],o.value]),t[0]){case 0:case 1:o=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,s=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!(o=0<(o=a.trys).length&&o[o.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!o||t[1]>o[0]&&t[1]<o[3])){a.label=t[1];break}if(6===t[0]&&a.label<o[1]){a.label=o[1],o=t;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(t);break}o[2]&&a.ops.pop(),a.trys.pop();continue}t=n.call(i,a)}catch(e){t=[6,e],s=0}finally{r=o=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=i(1),F=i(0),P=i(3);t.handleTreeViewCheckChange=function(e,t,i,n){if(void 0===n&&(n={}),!i||!i.length)return[];var r,s,o,a,c,d,l,u,p,h,f,m,I,g,v,b,E=(s=t,a=void 0,P.isArray(s)?o=s:(o=s.ids||[],a=s.idField),{ids:o,idField:a}),y=E.ids,_=E.idField,x=_?P.getNestedValue(_,e.item):e.itemHierarchicalIndex,D=y.indexOf(x),C=-1===D;return n.singleMode?r=C?[x]:[]:(r=y.slice(),C?r.push(x):r.splice(D,1),n.checkChildren&&(m=e.item,I=e.itemHierarchicalIndex,g=C,v=_,b=r,O.getAllDirectIndirectChildrenIds(m,I,v).forEach(function(e){g&&-1===b.indexOf(e)?b.push(e):!g&&-1<b.indexOf(e)&&b.splice(b.indexOf(e),1)})),n.checkParents&&(c=e.itemHierarchicalIndex,d=C,l=_,u=r,p=i,h=function(){var t,i,n;return k(this,function(e){switch(e.label){case 0:if(!l)return[3,5];t=O.getAllParents(c,p),i=t.length-1,e.label=1;case 1:return-1<i?[4,{id:P.getNestedValue(l,t[i]),item:d?t[i]:void 0}]:[3,4];case 2:e.sent(),e.label=3;case 3:return i--,[3,1];case 4:return[3,8];case 5:n=F.getDirectParentId(c),e.label=6;case 6:return n?[4,{id:n,item:d?F.getItemById(n,p):void 0}]:[3,8];case 7:return e.sent(),n=F.getDirectParentId(n),[3,6];case 8:return[2]}})}(),f=h.next(),d?function(){for(;!f.done;){var e=f.value,t=e.id,i=e.item;if(-1!==u.indexOf(t)||!O.areAllDirectChildrenChecked(i,t,l,u))break;u.push(t),f=h.next()}}():function(){for(;!f.done;){var e=f.value.id,t=u.indexOf(e);if(!(-1<t))break;u.splice(t,1),f=h.next()}}())),P.isArray(t)?r:Object.assign({},t,{ids:r})}},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)}),s=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 o=i(5),a=i(2),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={visible:!1,top:0,left:0,text:"",operationClassName:"k-i-cancel"},e}return r(e,t),e.prototype.render=function(){var e={top:this.state.top+"px",left:this.state.left+"px"};return this.state.visible&&o.createElement("div",{className:"k-header k-drag-clue",style:s({},this.props.style,e)},o.createElement("span",{className:a.classNames("k-icon k-drag-status k-icon-with-modifier",this.state.operationClassName)},o.createElement("span",{className:"k-icon k-icon-modifier"})),this.state.text)},e.prototype.show=function(e,t,i,n){this.setState({visible:!0,top:e,left:t,text:i,operationClassName:n})},e.prototype.hide=function(){this.setState({visible:!1})},e.defaultProps={style:{display:"block",position:"absolute",zIndex:2e4,padding:"4px 6px"}},e}(o.PureComponent);t.default=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(4),r=function(){function e(e){this.event=e,this.initialized=!1,this.itemId=e.itemHierarchicalIndex,this.treeViewGuid=e.target.guid}return e.prototype.init=function(){return this.initialized||(this.setDestimationMeta(document.elementFromPoint(this.event.clientX,this.event.clientY)),this.initialized=!0),this},Object.defineProperty(e.prototype,"isDropAllowed",{get:function(){return!!(this.initialized&&this.destItemId&&this.destTreeViewGuid)&&!(this.destTreeViewGuid+"_"+this.destItemId+"_").startsWith(this.treeViewGuid+"_"+this.itemId+"_")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"destinationMeta",{get:function(){return{itemHierarchicalIndex:this.destItemId,treeViewGuid:this.destTreeViewGuid}},enumerable:!0,configurable:!0}),e.prototype.getDropOperation=function(){if(this.initialized&&this.isDropAllowed){var e=this.destDomNodeWithMeta.getBoundingClientRect(),t=e.top;return t+e.height-this.event.clientY<6?"after":this.event.clientY-t<6?"before":"child"}},e.prototype.setDestimationMeta=function(e){for(var t=e;t&&!t[n.DOM_KENDO_ITEM_ID_FIELD];)t=t.parentNode;t&&t[n.DOM_KENDO_ITEM_ID_FIELD]&&(this.destDomNodeWithMeta=t,this.destItemId=t[n.DOM_KENDO_ITEM_ID_FIELD],this.destTreeViewGuid=t[n.DOM_KENDO_TREEVIEW_GUID_FIELD])},e}();t.default=r}])}}});
System.register("@progress/kendo-react-treeview",["react","@progress/kendo-react-common","prop-types","@progress/kendo-react-animation"],function(d){var i,n,r,s;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){s=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,o,t){"use strict";function a(e){return n(e)?e:e.split(o.SEPARATOR)[0]}function c(e){if(n(e))return e;var t=e.indexOf(o.SEPARATOR);return e.substring(t+1)}function i(e,t){return e=e.toString(),t?t+o.SEPARATOR+e:e}function d(e){var t=e.lastIndexOf(o.SEPARATOR);return t<0?o.EMPTY_ID:e.substring(0,t)}function n(e){return e===o.EMPTY_ID||e.indexOf(o.SEPARATOR)<0}function r(e){return e!==o.EMPTY_ID&&e.indexOf(o.SEPARATOR)<0}function l(e){var t=e.lastIndexOf(o.SEPARATOR);return t<0?e:e.substring(t+1)}Object.defineProperty(o,"__esModule",{value:!0}),o.EMPTY_ID="",o.ZERO_LEVEL_ZERO_NODE_ID="0",o.SEPARATOR="_",o.getItemById=function e(t,i){if(r(t))return i[Number(t)];var n=i[Number(a(t))];return n&&n.items&&n.items.length?e(c(t),n.items):void 0},o.getRootParentId=a,o.getIdWithoutRootParentId=c,o.getFirstChildId=function(e){return i("0",e)},o.createId=i,o.getDirectParentId=d,o.isIdEmptyOrZeroLevel=n,o.isIdZeroLevel=r,o.getAllShortIds=function(e){return e.split(o.SEPARATOR)},o.getShortId=l,o.isItemFirstFromSiblings=function(e){return l(e)===o.ZERO_LEVEL_ZERO_NODE_ID},o.getDecrementedItemIdAfterRemoval=function(e,t){var i=t;e="r"+o.SEPARATOR+e,t="r"+o.SEPARATOR+t;var n=d(e)+o.SEPARATOR;if(t.startsWith(n)){var r=t.substring(n.length);if(r){var s=a(r);if(Number(l(e))<Number(s))return c(n+(Number(s)-1).toString()+r.substring(s.length))}}return i}},function(e,t,i){"use strict";var d=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 l=i(0),s=i(10),u=i(3);function r(e,t,i){var n=[],r=new s.default;return r.init(e),function e(t,i,n,r,s){for(var o=0;o<n.length;o++){var a=n[o],c=l.createId(o,r);t.hasId(u.getNestedValue(i,a))&&s.push(c),p(a)&&e(t,i,a.items,c,s)}}(r,t,i,l.EMPTY_ID,n),n}function p(e){return Boolean(e.items&&e.items.length)}t.isItemExpandedAndWithChildren=function(e,t){return t.expanded(e)&&p(e)},t.resolveItemId=function(e,t,i){var n=r([e],t,i);return n.length?n[0]:void 0},t.resolveItemsIds=r,t.updateItem=function e(t,i,n,r){var s,o=Number(l.getRootParentId(i));if(o>=t.length)return t;var a=t,c=t[o];return c[r]||(c=(a=t.slice())[o]=Object.assign({},c,((s={})[r]=!0,s))),l.isIdZeroLevel(i)?n(c):c.items&&(c.items=e(c.items,l.getIdWithoutRootParentId(i),n,r)),a},t.hasChildren=p,t.isEnabledAndAllParentsEnabled=function(e,t,i){for(var n=l.getAllShortIds(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},t.getAllDirectIndirectChildrenIds=function(e,t,r){return r?function e(t){var i=[];if(t.items)for(var n=0;n<t.items.length;n++)i.push(u.getNestedValue(r,t.items[n])),i=i.concat(e(t.items[n]));return i}(e):function e(t,i){var n=[];if(t.items)for(var r=0;r<t.items.length;r++){var s=l.createId(r,i);n.push(s),n=n.concat(e(t.items[r],s))}return n}(e,t)},t.areAllDirectChildrenChecked=function(e,i,n,r){return!e.items||e.items.every(function(e,t){return-1<r.indexOf(n?u.getNestedValue(n,e):l.createId(t,i))})},t.getAllParents=function(e,t){for(var i=[],n=l.getAllShortIds(e),r=t,s=0;s<n.length-1&&r;s++){var o=r[Number(n[s])];i.push(o),r=o.items}return i},t.removeItem=function e(t,i){var n=i.slice();if(l.isIdZeroLevel(t))n.splice(Number(t),1);else{var r=Number(l.getRootParentId(t)),s=n[r]=d({},n[r]);s.items=e(l.getIdWithoutRootParentId(t),s.items)}return n},t.addItem=function e(t,i,n,r){var s=r.slice();if(l.isIdZeroLevel(n))if("child"===i){var o=s[Number(n)]=d({},s[Number(n)]);o.items?(o.items=o.items.slice(),o.items.push(t)):o.items=[t]}else s.splice(Number(n)+("after"===i?1:0),0,t);else{var a=Number(l.getRootParentId(n)),c=s[a]=d({},s[a]);c.items=e(t,i,l.getIdWithoutRootParentId(n),c.items)}return s}},function(e,t){e.exports=n},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},t.isArray=function(e){return void 0!==e.length}},function(e,t,i){"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",t.DOM_KENDO_ITEM_ID_FIELD="_kendoItemId",t.DOM_KENDO_TREEVIEW_GUID_FIELD="_kendoTreeViewGuid"},function(e,t){e.exports=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(7);t.TreeView=n.default;var r=i(14);t.processTreeViewItems=r.default;var s=i(15);t.moveTreeViewItem=s.default;var o=i(16);t.handleTreeViewCheckChange=o.handleTreeViewCheckChange;var a=i(17);t.TreeViewDragClue=a.default;var c=i(18);t.TreeViewDragAnalyzer=c.default,function(e){for(var t in e)d(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(5),o=i(8),c=i(2),d=i(9),a=i(1),l=i(11),u=i(0),p=i(13),h=function(e){function t(){var a=null!==e&&e.apply(this,arguments)||this;return a.state={focusedItemId:void 0,focusedItemPublicId:void 0,tabbableItemId:u.ZERO_LEVEL_ZERO_NODE_ID},a.allowExplicitFocus=!1,a.treeGuid=c.guid(),a.onFocusDomElNeeded=function(e){a.allowExplicitFocus&&a.focusDomItem(e)},a.onCheckChange=function(e,t,i){a.setFocus(i),a.dispatchCheckChange(e,t,i)},a.onExpandChange=function(e,t,i){a.setFocus(i),a.dispatchExpandChange(e,t,i)},a.onPress=function(e,t,i){e.originalEvent.preventDefault(),a.props.onItemDragStart&&a.props.onItemDragStart.call(void 0,{target:a,item:t,itemHierarchicalIndex:i})},a.onDrag=function(e,t,i){e.originalEvent.preventDefault();var n=e.pageX,r=e.pageY,s=e.clientX,o=e.clientY;a.props.onItemDragOver&&a.props.onItemDragOver.call(void 0,{target:a,item:t,itemHierarchicalIndex:i,pageX:n,pageY:r,clientX:s,clientY:o})},a.onRelease=function(e,t,i){var n=e.pageX,r=e.pageY,s=e.clientX,o=e.clientY;a.props.onItemDragEnd&&a.props.onItemDragEnd.call(void 0,{target:a,item:t,itemHierarchicalIndex:i,pageX:n,pageY:r,clientX:s,clientY:o})},a.onItemClick=function(e,t,i){a.setFocus(i),a.dispatchItemClick(e,t,i)},a.onFocus=function(){clearTimeout(a.blurRequest),void 0===a.state.focusedItemId&&a.data.length&&a.setFocus(a.state.tabbableItemId)},a.onBlur=function(){clearTimeout(a.blurRequest),a.blurRequest=setTimeout(function(){return a.setFocus(void 0)},0)},a.onKeyDown=function(e){var t=a.getFocusedItem();if(t){var i=d.default(t,a.state.focusedItemId,a.data,e.keyCode,a.fieldsSvc);i!==a.state.focusedItemId&&(e.preventDefault(),a.allowExplicitFocus=!0,a.setFocus(i)),a.dispatchEventsOnKeyDown(e,t)}},a}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"+(this.props.className?" "+this.props.className:""),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.data.map(function(e,t){return s.createElement(l.default,{item:e,itemId:t.toString(),treeGuid:i.treeGuid,animate:i.props.animate,focusedItemId:i.state.focusedItemId,tabbableItemId:i.state.tabbableItemId,fieldsService:i.fieldsSvc,itemRender:i.props.itemRender,checkboxes:i.props.checkboxes,ariaMultiSelectable:i.ariaMultiSelectable,onItemClick:i.onItemClick,onFocusDomElNeeded:i.onFocusDomElNeeded,draggable:i.props.draggable,onPress:i.onPress,onDrag:i.onDrag,onRelease:i.onRelease,expandIcons:i.props.expandIcons,onExpandChange:i.onExpandChange,onCheckChange:i.onCheckChange,key:t})})))},t.prototype.componentDidUpdate=function(){this.allowExplicitFocus=!1,this.refocusDueToFocusIdField()},t.prototype.dispatchEventsOnKeyDown=function(e,t){var i=this,n=function(){return a.isEnabledAndAllParentsEnabled(i.state.focusedItemId,i.data,i.fieldsSvc)};e.keyCode===c.Keys.left&&this.fieldsSvc.expanded(t)&&n()?this.dispatchExpandChange(e,t,this.state.focusedItemId):e.keyCode===c.Keys.right&&!this.fieldsSvc.expanded(t)&&(this.fieldsSvc.hasChildren(t)||a.hasChildren(t))&&n()?this.dispatchExpandChange(e,t,this.state.focusedItemId):e.keyCode===c.Keys.enter&&n()?this.dispatchItemClick(e,t,this.state.focusedItemId):e.keyCode===c.Keys.space&&n()&&(e.preventDefault(),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,i){c.dispatchEvent(this.props.onCheckChange,e,this,{item:t,itemHierarchicalIndex:i})},t.prototype.dispatchExpandChange=function(e,t,i){c.dispatchEvent(this.props.onExpandChange,e,this,{item:t,itemHierarchicalIndex:i})},t.prototype.dispatchItemClick=function(e,t,i){c.dispatchEvent(this.props.onItemClick,e,this,{item:t,itemHierarchicalIndex:i})},t.prototype.refocusDueToFocusIdField=function(){if(this.fieldsSvc.focusIdField){var e=this.state.focusedItemPublicId;if(e){var t=this.props.getFocusHierarchicalIndex?this.props.getFocusHierarchicalIndex(e):a.resolveItemId(e,this.fieldsSvc.focusIdField,this.data);t!==this.state.focusedItemId&&(this.allowExplicitFocus=!0,this.setState({focusedItemId:t}))}}},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.prototype.focusDomItem=function(e){e.focus()},Object.defineProperty(t.prototype,"guid",{get:function(){return this.treeGuid},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=h},function(e,t){e.exports=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=i(2),c=i(0),d=i(1);t.default=function(e,t,i,n,r){switch(n){case a.Keys.left:return c.isIdZeroLevel(t)||r.expanded(e)&&d.isEnabledAndAllParentsEnabled(t,i,r)?t:c.getDirectParentId(t);case a.Keys.right:return d.isItemExpandedAndWithChildren(e,r)?c.getFirstChildId(t):t;case a.Keys.up:return s=Number(c.getShortId(t)),o=c.getDirectParentId(t),s?function e(t,i,n){var r=c.getItemById(t,i);return d.isItemExpandedAndWithChildren(r,n)?e(c.createId(r.items.length-1,t),i,n):t}(c.createId(s-1,o),i,r):c.isIdZeroLevel(t)?t:o;case a.Keys.down:return d.isItemExpandedAndWithChildren(e,r)?c.getFirstChildId(t):function e(t,i){var n=c.getDirectParentId(t),r=n?c.getItemById(n,i):void 0,s=r?r.items:i,o=Number(c.getShortId(t));return o<s.length-1?c.createId(o+1,n):r?e(n,i):void 0}(t,i)||t;case a.Keys.home:return c.ZERO_LEVEL_ZERO_NODE_ID;case a.Keys.end:return function(){for(var e=(i.length-1).toString(),t=i[i.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 s,o}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.objects=[]}return e.prototype.init=function(e){for(var t,i=0;i<e.length;i++)i%5e4==0&&(t={},this.objects.push(t)),t[e[i]]=!0},e.prototype.hasId=function(t){return this.objects.some(function(e){return e[t]})},e}();t.default=n},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(5),o=i(2),a=i(0),c=i(1),d=i(12),l=i(4),u=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.itemGuid=o.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.onPress=function(e){t.props.onPress(e.event,t.item,t.itemId)},t.onDrag=function(e){t.props.onDrag(e.event,t.item,t.itemId)},t.onRelease=function(e){t.props.onRelease(e.event,t.item,t.itemId)},t.assignDraggableMeta=function(e){e&&(e[l.DOM_KENDO_ITEM_ID_FIELD]=t.props.itemId,e[l.DOM_KENDO_TREEVIEW_GUID_FIELD]=t.props.treeGuid)},t}return r(n,e),n.prototype.render=function(){var t=this,e=this.renderSubitemsIfApplicable(),i=this.renderItemInPart();return s.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}},s.createElement("div",{className:"k-mid",ref:this.assignDraggableMeta},this.renderExpandIcon(),this.renderCheckbox(),this.props.draggable?s.createElement(o.Draggable,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease},i):i),this.props.animate?s.createElement(d.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.props.onFocusDomElNeeded(this.itemElement),this.checkboxElement&&(this.checkboxElement.indeterminate=this.fieldsSvc.checkIndeterminate(this.item))},n.prototype.componentDidUpdate=function(e){var t=this.props.focusedItemId;if(t&&t!==e.focusedItemId&&t===this.itemId&&this.props.onFocusDomElNeeded(this.itemElement),this.checkboxElement){var i=this.fieldsSvc.checkIndeterminate(this.item);i!==e.fieldsService.checkIndeterminate(e.item)&&(this.checkboxElement.indeterminate=i)}},n.prototype.renderCheckbox=function(){var t=this;return this.props.checkboxes?s.createElement("div",{className:"k-checkbox-wrapper"},s.createElement("input",{type:"checkbox",className:"k-checkbox",checked:Boolean(this.fieldsSvc.checked(this.item)),id:this.itemGuid,tabIndex:-1,onChange:this.onCheckChange,ref:function(e){return t.checkboxElement=e}}),s.createElement("label",{className:"k-checkbox-label",htmlFor:this.itemGuid})):void 0},n.prototype.renderExpandIcon=function(){return this.props.expandIcons&&(this.fieldsSvc.hasChildren(this.item)||c.hasChildren(this.item))?s.createElement("span",{className:this.getIconClassName(),onClick:this.onExpandChange}):void 0},n.prototype.renderSubitemsIfApplicable=function(){var i=this;return c.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,itemId:a.createId(t,i.itemId),treeGuid:i.props.treeGuid,animate:i.props.animate,focusedItemId:i.props.focusedItemId,tabbableItemId:i.props.tabbableItemId,fieldsService:i.props.fieldsService,itemRender:i.props.itemRender,checkboxes:i.props.checkboxes,ariaMultiSelectable:i.props.ariaMultiSelectable,onItemClick:i.props.onItemClick,onFocusDomElNeeded:i.props.onFocusDomElNeeded,draggable:i.props.draggable,onPress:i.props.onPress,onDrag:i.props.onDrag,onRelease:i.props.onRelease,expandIcons:i.props.expandIcons,onExpandChange:i.props.onExpandChange,onCheckChange:i.props.onCheckChange,key:t})})):void 0},n.prototype.renderItemInPart=function(){return s.createElement("span",{className:this.getContentClassName(),onClick:this.onItemClick},this.props.itemRender?s.createElement(this.props.itemRender,{item:this.item,itemHierarchicalIndex:this.itemId}):this.fieldsSvc.text(this.item))},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)||c.hasChildren(this.item)?Boolean(this.fieldsSvc.expanded(this.item)):void 0},enumerable:!0,configurable:!0}),Object.defineProperty(n.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(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)&&!c.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=u},function(e,t){e.exports=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(4),r=i(3),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.checkField=e.checkField||n.CHECK_FIELD,this.checkIndeterminateField=e.checkIndeterminateField||n.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=s},function(e,t,i){"use strict";var o=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 p=i(1),a=i(4),h=i(3);function r(e,t,i,n){if(i){var r=f(i,t),s=r.ids,o=r.field;return a=e,c=!h.isArray(i)&&i.idField?p.resolveItemsIds(s,i.idField,e):s,d=o,l=n,u=a,c.forEach(function(e){u=p.updateItem(u,e,function(e){return m(d,e)},l)}),u}var a,c,d,l,u;return e}function f(e,t){var i,n;return n=h.isArray(e)?(i=e,t):(i=e.ids||[],e.operationField||t),{ids:i,field:n}}function m(e,t){for(var i=(e||"").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]=o({},n[s]),n=n[s]}}}function c(e,t,i,n){for(var r=!1,s=0;s<e.length;s++){var o=e[s];if(h.getNestedValue(i,o)){if(!r)for(var a=0;a<t.length;a++)m(n,t[a]);r=!0,o.items&&c(o.items,[],i,n)}else o.items&&c(o.items,r?[o]:t.concat([o]),i,n)}}t.default=function(e,t){if(!e||!e.length)return[];var i=e,n=t.cloneField||"cloned";return function(e,t){if(t&&!h.isArray(t)&&t.applyCheckIndeterminate)for(var i=f(t,a.CHECK_FIELD).field,n=t.checkIndeterminateField||a.CHECK_INDETERMINATE_FIELD,r=0;r<e.length;r++){var s=e[r];s.items&&c(s.items,h.getNestedValue(i,s)?[]:[s],i,n)}}(i=r(i=r(i=r(i,a.EXPAND_FIELD,t.expand,n),a.SELECT_FIELD,t.select,n),a.CHECK_FIELD,t.check,n),t.check),i}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=i(1),l=i(0);t.default=function(t,i,e,n,r){if(!function(){if(!(i&&i.length&&t&&n))return!1;if(r&&!r.length)return!1;var e=r&&r!==i?r:i;return!!l.getItemById(n,e)}())return c();var s=l.getItemById(t,i);if(!s)return c();if(r&&r!==i)return{sourceData:d.removeItem(t,i),targetData:d.addItem(s,e,n,r)};if((n+"_").startsWith(t+"_"))return c();var o=d.removeItem(t,i),a=d.addItem(s,e,l.getDecrementedItemIdAfterRemoval(t,n),o);return r?{sourceData:a,targetData:a}:a;function c(){return r?{sourceData:i,targetData:r}:i}}},function(e,t,i){"use strict";var k=this&&this.__generator||function(i,n){var r,s,o,e,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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,s&&(o=2&t[0]?s.return:t[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,t[1])).done)return o;switch(s=0,o&&(t=[2&t[0],o.value]),t[0]){case 0:case 1:o=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,s=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!(o=0<(o=a.trys).length&&o[o.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!o||t[1]>o[0]&&t[1]<o[3])){a.label=t[1];break}if(6===t[0]&&a.label<o[1]){a.label=o[1],o=t;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(t);break}o[2]&&a.ops.pop(),a.trys.pop();continue}t=n.call(i,a)}catch(e){t=[6,e],s=0}finally{r=o=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=i(1),F=i(0),P=i(3);t.handleTreeViewCheckChange=function(e,t,i,n){if(void 0===n&&(n={}),!i||!i.length)return[];var r,s,o,a,c,d,l,u,p,h,f,m,I,g,v,b,E=(s=t,a=void 0,P.isArray(s)?o=s:(o=s.ids||[],a=s.idField),{ids:o,idField:a}),y=E.ids,_=E.idField,x=_?P.getNestedValue(_,e.item):e.itemHierarchicalIndex,D=y.indexOf(x),C=-1===D;return n.singleMode?r=C?[x]:[]:(r=y.slice(),C?r.push(x):r.splice(D,1),n.checkChildren&&(m=e.item,I=e.itemHierarchicalIndex,g=C,v=_,b=r,O.getAllDirectIndirectChildrenIds(m,I,v).forEach(function(e){g&&-1===b.indexOf(e)?b.push(e):!g&&-1<b.indexOf(e)&&b.splice(b.indexOf(e),1)})),n.checkParents&&(c=e.itemHierarchicalIndex,d=C,l=_,u=r,p=i,h=function(){var t,i,n;return k(this,function(e){switch(e.label){case 0:if(!l)return[3,5];t=O.getAllParents(c,p),i=t.length-1,e.label=1;case 1:return-1<i?[4,{id:P.getNestedValue(l,t[i]),item:d?t[i]:void 0}]:[3,4];case 2:e.sent(),e.label=3;case 3:return i--,[3,1];case 4:return[3,8];case 5:n=F.getDirectParentId(c),e.label=6;case 6:return n?[4,{id:n,item:d?F.getItemById(n,p):void 0}]:[3,8];case 7:return e.sent(),n=F.getDirectParentId(n),[3,6];case 8:return[2]}})}(),f=h.next(),d?function(){for(;!f.done;){var e=f.value,t=e.id,i=e.item;if(-1!==u.indexOf(t)||!O.areAllDirectChildrenChecked(i,t,l,u))break;u.push(t),f=h.next()}}():function(){for(;!f.done;){var e=f.value.id,t=u.indexOf(e);if(!(-1<t))break;u.splice(t,1),f=h.next()}}())),P.isArray(t)?r:Object.assign({},t,{ids:r})}},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)}),s=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 o=i(5),a=i(2),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={visible:!1,top:0,left:0,text:"",operationClassName:"k-i-cancel"},e}return r(e,t),e.prototype.render=function(){var e={top:this.state.top+"px",left:this.state.left+"px"};return this.state.visible&&o.createElement("div",{className:"k-header k-drag-clue",style:s({},this.props.style,e)},o.createElement("span",{className:a.classNames("k-icon k-drag-status k-icon-with-modifier",this.state.operationClassName)},o.createElement("span",{className:"k-icon k-icon-modifier"})),this.state.text)},e.prototype.show=function(e,t,i,n){this.setState({visible:!0,top:e,left:t,text:i,operationClassName:n})},e.prototype.hide=function(){this.setState({visible:!1})},e.defaultProps={style:{display:"block",position:"absolute",zIndex:2e4,padding:"4px 6px"}},e}(o.PureComponent);t.default=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(4),r=function(){function e(e){this.event=e,this.initialized=!1,this.itemId=e.itemHierarchicalIndex,this.treeViewGuid=e.target.guid}return e.prototype.init=function(){return this.initialized||(this.setDestimationMeta(document.elementFromPoint(this.event.clientX,this.event.clientY)),this.initialized=!0),this},Object.defineProperty(e.prototype,"isDropAllowed",{get:function(){return!!(this.initialized&&this.destItemId&&this.destTreeViewGuid)&&!(this.destTreeViewGuid+"_"+this.destItemId+"_").startsWith(this.treeViewGuid+"_"+this.itemId+"_")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"destinationMeta",{get:function(){return{itemHierarchicalIndex:this.destItemId,treeViewGuid:this.destTreeViewGuid}},enumerable:!0,configurable:!0}),e.prototype.getDropOperation=function(){if(this.initialized&&this.isDropAllowed){var e=this.destDomNodeWithMeta.getBoundingClientRect(),t=e.top;return t+e.height-this.event.clientY<6?"after":this.event.clientY-t<6?"before":"child"}},e.prototype.setDestimationMeta=function(e){for(var t=e;t&&!t[n.DOM_KENDO_ITEM_ID_FIELD];)t=t.parentNode;t&&t[n.DOM_KENDO_ITEM_ID_FIELD]&&(this.destDomNodeWithMeta=t,this.destItemId=t[n.DOM_KENDO_ITEM_ID_FIELD],this.destTreeViewGuid=t[n.DOM_KENDO_TREEVIEW_GUID_FIELD])},e}();t.default=r}])}}});
{
"name": "@progress/kendo-react-treeview",
"version": "2.11.0-dev.201904181047",
"version": "2.11.0-dev.201904190825",
"description": "KendoReact TreeView package",

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

"dependencies": {
"@progress/kendo-react-common": "2.11.0-dev.201904181047",
"@progress/kendo-react-common": "2.11.0-dev.201904190825",
"prop-types": "^15.6.0"
},
"devDependencies": {
"@progress/kendo-react-animation": "2.11.0-dev.201904181047"
"@progress/kendo-react-animation": "2.11.0-dev.201904190825"
},

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

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