@progress/kendo-react-treeview
Advanced tools
Comparing version 2.8.0-dev.201903111130 to 2.8.0-dev.201903111629
@@ -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(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},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 r,i=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)?i.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),u=n(0),p=(r=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}r(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 p(t,e),t.prototype.render=function(){var e=this.props,t=e.label,n=e.id,r=e.className,o=e.value,a=e.placeholder,s=e.valid,c=e.style,u=i({"k-textbox-container":!0,"k-state-focused":this.state.focused,"k-state-empty":!(o||a),"k-state-invalid":!s&&void 0!==s},r);return l.createElement("span",{className:u,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:u.string,id:u.string,value:u.string,placeholder:u.string,valid:u.bool},t}(l.Component);function h(e,t,n,r){if(e){var i={syntheticEvent:t,nativeEvent:t.nativeEvent,target:n};e.call(void 0,Object.assign(i,r))}}var f=function(){return"undefined"==typeof window},m=function(e,t){return function(n){return t(e(n))}},v=function(e,t,n){return e.addEventListener&&e.addEventListener(t,n)},y=function(e,t,n){return e.removeEventListener&&e.removeEventListener(t,n)},g=function(){},b=function(e){return e.preventDefault()},x=/touch/;function E(e){return e.type.match(x)?{pageX:e.changedTouches[0].pageX,pageY:e.changedTouches[0].pageY,clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY,type:e.type,originalEvent:e,isTouch:!0}:{pageX:e.pageX,pageY:e.pageY,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,type:e.type,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,originalEvent:e}}var I=function(e){var t=this,n=e.press;void 0===n&&(n=g);var r=e.drag;void 0===r&&(r=g);var i=e.release;void 0===i&&(i=g);var o=e.mouseOnly;void 0===o&&(o=!1),this._pressHandler=m(E,n),this._dragHandler=m(E,r),this._releaseHandler=m(E,i),this._ignoreMouse=!1,this._mouseOnly=o,this._touchAction,this._touchstart=function(e){1===e.touches.length&&t._pressHandler(e)},this._touchmove=function(e){1===e.touches.length&&t._dragHandler(e)},this._touchend=function(e){0===e.touches.length&&1===e.changedTouches.length&&(t._releaseHandler(e),t._ignoreMouse=!0,setTimeout(t._restoreMouse,2e3))},this._restoreMouse=function(){t._ignoreMouse=!1},this._mousedown=function(e){var n=e.which;n&&n>1||t._ignoreMouse||(v(document,"mousemove",t._mousemove),v(document,"mouseup",t._mouseup),t._pressHandler(e))},this._mousemove=function(e){t._dragHandler(e)},this._mouseup=function(e){y(document,"mousemove",t._mousemove),y(document,"mouseup",t._mouseup),t._releaseHandler(e)},this._pointerdown=function(e){e.isPrimary&&0===e.button&&(v(t._element,"pointermove",t._pointermove),v(t._element,"pointerup",t._pointerup),v(t._element,"contextmenu",b),t._touchAction=e.target.style.touchAction,e.target.style.touchAction="none",e.target.setPointerCapture(e.pointerId),t._pressHandler(e))},this._pointermove=function(e){e.isPrimary&&t._dragHandler(e)},this._pointerup=function(e){e.isPrimary&&(y(t._element,"pointermove",t._pointermove),y(t._element,"pointerup",t._pointerup),y(t._element,"contextmenu",b),e.target.style.touchAction=t._touchAction,e.target.releasePointerCapture(e.pointerId),t._releaseHandler(e))}};I.supportPointerEvent=function(){return"undefined"!=typeof window&&window.PointerEvent},I.prototype.bindTo=function(e){e!==this._element&&(this._element&&this._unbindFromCurrent(),this._element=e,this._bindToCurrent())},I.prototype._bindToCurrent=function(){var e=this._element;this._usePointers()?v(e,"pointerdown",this._pointerdown):(v(e,"mousedown",this._mousedown),this._mouseOnly||(v(e,"touchstart",this._touchstart),v(e,"touchmove",this._touchmove),v(e,"touchend",this._touchend)))},I.prototype._unbindFromCurrent=function(){var e=this._element;if(this._usePointers())return y(e,"pointerdown",this._pointerdown),y(e,"pointermove",this._pointermove),void y(e,"pointerup",this._pointerup);y(e,"mousedown",this._mousedown),this._mouseOnly||(y(e,"touchstart",this._touchstart),y(e,"touchmove",this._touchmove),y(e,"touchend",this._touchend))},I.prototype._usePointers=function(){return!this._mouseOnly&&I.supportPointerEvent()},I.prototype.destroy=function(){this._unbindFromCurrent(),this._element=null},I.default=I;var O=I,_=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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),k=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.element=null,t.draggable=new O({press:function(e){t.element&&t.props.onPress&&t.props.onPress.call(void 0,{target:t,event:e,element:t.element})},drag:function(e){t.element&&t.props.onDrag&&t.props.onDrag.call(void 0,{target:t,event:e,element:t.element})},release:function(e){t.element&&t.props.onRelease&&t.props.onRelease.call(void 0,{target:t,event:e})}}),t}return _(t,e),t.prototype.componentDidMount=function(){this.element&&this.draggable.bindTo(this.element)},t.prototype.componentWillUnmount=function(){this.draggable.destroy()},t.prototype.render=function(){var e=this;return l.cloneElement(l.Children.only(this.props.children),{ref:function(t){return e.element=t}})},t.propTypes={children:u.element.isRequired},t}(l.PureComponent);n.d(t,"classNames",function(){return i}),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 h}),n.d(t,"isServerRendering",function(){return f}),n.d(t,"Draggable",function(){return k})},function(e,t,n){"use strict";function r(e){return a(e)?e:e.split(t.SEPARATOR)[0]}function i(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(r(t))];return o&&o.items&&o.items.length?e(i(t),o.items):void 0},t.getRootParentId=r,t.getIdWithoutRootParentId=i,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 r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};Object.defineProperty(t,"__esModule",{value:!0});var i=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,r){for(var o=void 0,s=0;s<n.length;s++){var c=n[s];if(t(c)){o=i.createId(s,r);break}if(a(c)&&(o=e(t,c.items,i.createId(s,r))))break}return o}(e,t,i.EMPTY_ID)},t.updateItem=function e(t,n,o){for(var a=[],s=0;s<t.length;s++)if(Number(i.getRootParentId(n))===s){var c=r({},t[s]);i.isIdZeroLevel(n)?o(c):t[s].items&&(c.items=e(t[s].items,i.getIdWithoutRootParentId(n),o)),a.push(c)}else a.push(t[s]);return a},t.hasChildren=a,t.isEnabledAndAllParentsEnabled=function(e,t,n){for(var r=i.getAllShortIds(e),o=t,a=0;a<r.length;a++){var s=o[Number(r[a])];if(n.disabled(s))return!1;o=s.items}return!0},t.getAllDirectIndirectChildrenIds=function(e,t,n){return n?function e(t){var r=[];if(t.items)for(var i=0;i<t.items.length;i++)r.push(o.getNestedValue(n,t.items[i])),r=r.concat(e(t.items[i]));return r}(e):function e(t,n){var r=[];if(t.items)for(var o=0;o<t.items.length;o++){var a=i.createId(o,n);r.push(a),r=r.concat(e(t.items[o],a))}return r}(e,t)},t.areAllDirectChildrenChecked=function(e,t,n,r){return!e.items||e.items.every(function(e,a){return r.indexOf(n?o.getNestedValue(n,e):i.createId(a,t))>-1})},t.getAllParents=function(e,t){for(var n=[],r=i.getAllShortIds(e),o=t,a=0;a<r.length-1&&o;a++){var s=o[Number(r[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("."),r=t;return n.forEach(function(e){r=r?r[e]:void 0}),r},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 r=n(9);t.TreeView=r.default;var i=n(13);t.processTreeViewItems=i.default;var o=n(14);t.handleTreeViewCheckChange=o.handleTreeViewCheckChange},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=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}r(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),u=n(11),p=n(3),d=n(12),h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={focusedItemId:void 0,focusedItemPublicId:void 0,tabbableItemId:p.ZERO_LEVEL_ZERO_NODE_ID},t.allowExplicitFocus=!1,t.onFocusDomElNeeded=function(e){t.allowExplicitFocus&&t.focusDomItem(e)},t.onCheckChange=function(e,n,r){t.setFocus(r),t.dispatchCheckChange(e,n,r)},t.onExpandChange=function(e,n,r){t.setFocus(r),t.dispatchExpandChange(e,n,r)},t.onDragStart=function(){},t.onDrop=function(){},t.onDragOver=function(){},t.onItemClick=function(e,n,r){t.setFocus(r),t.dispatchItemClick(e,n,r)},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 r=c.default(n,t.state.focusedItemId,t.data,e.keyCode,t.fieldsSvc);r!==t.state.focusedItemId&&(e.preventDefault(),t.allowExplicitFocus=!0,t.setFocus(r)),t.dispatchEventsOnKeyDown(e,n)}},t}return i(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.data.map(function(t,n){return o.createElement(u.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,onFocusDomElNeeded:e.onFocusDomElNeeded,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(){this.allowExplicitFocus=!1,this.refocusDueToFocusIdField()},t.prototype.dispatchEventsOnKeyDown=function(e,t){var n=this,r=function(){return l.isEnabledAndAllParentsEnabled(n.state.focusedItemId,n.data,n.fieldsSvc)};e.keyCode===s.Keys.left&&this.fieldsSvc.expanded(t)&&r()?this.dispatchExpandChange(e,t,this.state.focusedItemId):e.keyCode===s.Keys.right&&!this.fieldsSvc.expanded(t)&&(this.fieldsSvc.hasChildren(t)||l.hasChildren(t))&&r()?this.dispatchExpandChange(e,t,this.state.focusedItemId):e.keyCode===s.Keys.enter&&r()?this.dispatchItemClick(e,t,this.state.focusedItemId):e.keyCode===s.Keys.space&&r()&&(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 p.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})},t.prototype.refocusDueToFocusIdField=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.allowExplicitFocus=!0,this.setState({focusedItemId: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.prototype.focusDomItem=function(e){e.focus()},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=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(3),o=n(4);t.default=function(e,t,n,a,s){switch(a){case r.Keys.left:return i.isIdZeroLevel(t)||s.expanded(e)&&o.isEnabledAndAllParentsEnabled(t,n,s)?t:i.getDirectParentId(t);case r.Keys.right:return o.isItemExpandedAndWithChildren(e,s)?i.getFirstChildId(t):t;case r.Keys.up:return c=Number(i.getShortId(t)),l=i.getDirectParentId(t),c?function e(t,n,r){var a=i.getItemById(t,n);return o.isItemExpandedAndWithChildren(a,r)?e(i.createId(a.items.length-1,t),n,r):t}(i.createId(c-1,l),n,s):i.isIdZeroLevel(t)?t:l;case r.Keys.down:return o.isItemExpandedAndWithChildren(e,s)?i.getFirstChildId(t):function e(t,n){var r=i.getDirectParentId(t),o=r?i.getItemById(r,n):void 0,a=o?o.items:n,s=Number(i.getShortId(t));return s<a.length-1?i.createId(s+1,r):o?e(r,n):void 0}(t,n)||t;case r.Keys.home:return i.ZERO_LEVEL_ZERO_NODE_ID;case r.Keys.end:return function(){for(var e=(n.length-1).toString(),t=n[n.length-1];o.isItemExpandedAndWithChildren(t,s);)e=i.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 r,i=this&&this.__extends||(r=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}r(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),u=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 i(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.props.onFocusDomElNeeded(this.itemElement),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.props.onFocusDomElNeeded(this.itemElement),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,r){return o.createElement(t,{item:n,animate:e.props.animate,itemId:s.createId(r,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,onFocusDomElNeeded:e.props.onFocusDomElNeeded,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:r})})):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=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),i=n(5),o=function(){function e(e){this.expandField=e.expandField||r.EXPAND_FIELD,this.selectField=e.selectField||r.SELECT_FIELD,this.hasChildrenField=e.hasChildrenField||"hasChildren",this.textField=e.textField||"text",this.disableField=e.disableField||"disabled",this.checkField=e.checkField||r.CHECK_FIELD,this.checkIndeterminateField=e.checkIndeterminateField||r.CHECK_INDETERMINATE_FIELD,this.focusIdField=e.focusIdField}return e.prototype.expanded=function(e){return i.getNestedValue(this.expandField,e)},e.prototype.selected=function(e){return i.getNestedValue(this.selectField,e)},e.prototype.text=function(e){return i.getNestedValue(this.textField,e)},e.prototype.disabled=function(e){return i.getNestedValue(this.disableField,e)},e.prototype.hasChildren=function(e){return i.getNestedValue(this.hasChildrenField,e)},e.prototype.checked=function(e){return i.getNestedValue(this.checkField,e)},e.prototype.checkIndeterminate=function(e){return i.getNestedValue(this.checkIndeterminateField,e)},e.prototype.focusId=function(e){return this.focusIdField&&i.getNestedValue(this.focusIdField,e)},e}();t.default=o},function(e,t,n){"use strict";var r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),o=n(7),a=n(5);function s(e,t,n){if(n){var r=c(n,t),o=r.ids,s=r.field,u=o;return!a.isArray(n)&&n.idField&&(u=function(e,t,n){var r=[];return e.forEach(function(e){r.push(i.resolveItemId(function(n){return a.getNestedValue(t,n)===e},n))}),r}(o,n.idField,e)),function(e,t,n){var r=e;return t.forEach(function(e){r=i.updateItem(r,e,function(e){return l(n,e)})}),r}(e,u,s)}return e}function c(e,t){var n,r;return a.isArray(e)?(n=e,r=t):(n=e.ids||[],r=e.operationField||t),{ids:n,field:r}}function l(e,t){for(var n=(e||"").split("."),i=t,o=0;o<n.length;o++){var a=n[o];if(o===n.length-1)i[a]=!0;else{if(void 0===i[a])return;i[a]=r({},i[a]),i=i[a]}}}function u(e,t,n,r){for(var i=!1,o=0;o<e.length;o++){var s=e[o];if(a.getNestedValue(n,s)){if(!i)for(var c=0;c<t.length;c++)l(r,t[c]);i=!0,s.items&&u(s.items,[],n,r)}else s.items&&u(s.items,i?[s]:t.concat([s]),n,r)}}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,r=t.checkIndeterminateField||o.CHECK_INDETERMINATE_FIELD,i=0;i<e.length;i++){var s=e[i];s.items&&u(s.items,a.getNestedValue(n,s)?[]:[s],n,r)}}(n=s(n,o.CHECK_FIELD,t.check),t.check),n):[]}},function(e,t,n){"use strict";var r=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[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,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=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 i=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),u=l.ids,p=l.idField,d=p?a.getNestedValue(p,e.item):e.itemHierarchicalIndex,h=u.indexOf(d),f=-1===h;return s.singleMode?c=f?[d]:[]:(c=u.slice(),f?c.push(d):c.splice(h,1),s.checkChildren&&function(e,t,n,r,o){i.getAllDirectIndirectChildrenIds(e,t,r).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,f,p,c),s.checkParents&&function(e,t,n,s,c){var l=function(){var s,l,u;return r(this,function(r){switch(r.label){case 0:if(!n)return[3,5];s=i.getAllParents(e,c),l=s.length-1,r.label=1;case 1:return l>-1?[4,{id:a.getNestedValue(n,s[l]),item:t?s[l]:void 0}]:[3,4];case 2:r.sent(),r.label=3;case 3:return l--,[3,1];case 4:return[3,8];case 5:u=o.getDirectParentId(e),r.label=6;case 6:return u?[4,{id:u,item:t?o.getItemById(u,c):void 0}]:[3,8];case 7:return r.sent(),u=o.getDirectParentId(u),[3,6];case 8:return[2]}})}(),u=l.next();t?function(){for(;!u.done;){var e=u.value,t=e.id,r=e.item;if(-1!==s.indexOf(t)||!i.areAllDirectChildrenChecked(r,t,n,s))break;s.push(t),u=l.next()}}():function(){for(;!u.done;){var e=u.value.id,t=s.indexOf(e);if(!(t>-1))break;s.splice(t,1),u=l.next()}}()}(e.itemHierarchicalIndex,f,p,c,n)),a.isArray(t)?c:Object.assign({},t,{ids:c})}},function(e,t,n){"use strict";n.r(t);var r,i=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),r=parseFloat(t.marginBottom);return e.offsetHeight+n+r},outerWidth:function(e){if(!e)return 0;var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginLeft),r=parseFloat(t.marginRight);return e.offsetWidth+n+r},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=(r=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}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n},d=c.styles,h=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,r=t.style,o=t.appear,c=t.enter,l=t.exit,h=t.transitionName,f=t.transitionEnterDuration,m=t.transitionExitDuration,v=t.className,y=t.onEnter,g=t.onEntering,b=t.onEntered,x=t.onExit,E=t.onExiting,I=t.onExited,O=t.mountOnEnter,_=t.unmountOnExit,k=t.animationEnteringStyle,C=t.animationEnteredStyle,P=t.animationExitingStyle,w=t.animationExitedStyle,S=p(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,d["child-animation-container"]),F=u({transitionDelay:"0ms"},r),j={entering:u({transitionDuration:f+"ms"},k),entered:u({},C),exiting:u({transitionDuration:m+"ms"},P),exited:u({},w)},N={in:this.props.in,appear:o,enter:c,exit:l,mountOnEnter:O,unmountOnExit:_,timeout:{enter:f,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){E&&E.call(void 0,{animatedElement:t,target:e})},onExited:function(t){I&&I.call(void 0,{animatedElement:t,target:e})},classNames:{appear:d[h+"-appear"]||h+"-appear",appearActive:d[h+"-appear-active"]||h+"-appear-active",enter:d[h+"-enter"]||h+"-enter",enterActive:d[h+"-enter-active"]||h+"-enter-active",exit:d[h+"-exit"]||h+"-exit",exitActive:d[h+"-exit-active"]||h+"-exit-active"}};return i.createElement(s.CSSTransition,u({},N,S),function(t){return i.createElement("div",{style:u({},F,j[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}(i.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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),m=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n},y=c.styles,g=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.id,n=e.style,r=e.children,o=e.component,c=e.className,l=e.childFactory,u=(e.stackChildren,e.componentChildStyle),p=e.componentChildClassName,d=v(e,["id","style","children","component","className","childFactory","stackChildren","componentChildStyle","componentChildClassName"]),f={id:t,style:n,component:o,childFactory:l,className:Object(a.classNames)(y["animation-container"],y["animation-container-relative"],c)},g=i.Children.map(r,function(e){return i.createElement(h,m({},d,{style:u,className:p}),e)});return i.createElement(s.TransitionGroup,m({},f),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}(i.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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),x=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},E=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n},I=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=E(e,["children"]);return i.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}(i.Component),O=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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},k=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n},C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return O(t,e),t.prototype.render=function(){var e=this.props,t=e.direction,n=e.children,r=k(e,["direction","children"]),o={transitionName:"expand-"+t};return i.createElement(g,_({},o,r),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}(i.Component),P=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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),w=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},S=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n},D={position:"absolute",top:"0",left:"0"},F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return P(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.direction,r=S(e,["children","direction"]);return i.createElement(g,w({},r,{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}(i.Component),j=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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),N=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},A=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n},T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.render=function(){var e=this.props,t=e.direction,n=e.children,r=A(e,["direction","children"]),o={transitionName:"slide-"+t};return i.createElement(g,N({},o,r),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}(i.Component),R=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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),z=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},H=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n},M={position:"absolute",top:"0",left:"0"},L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return R(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.direction,r=H(e,["children","direction"]);return i.createElement(g,z({},r,{transitionName:"zoom-"+n,animationExitingStyle:this.props.stackChildren?M: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}(i.Component),K=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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),V=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},W=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}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 r=e.firstChild;if(r){var i=c.outerHeight(r),o=c.outerWidth(r);t.setState({maxHeight:i,maxWidth:o},n)}},t}return K(t,e),t.prototype.render=function(){var e,t=this.props,n=t.direction,r=t.children,o=t.childFactory,a=W(t,["direction","children","childFactory"]),s=this.state,c=s.maxHeight,l=s.maxWidth,u={maxHeight:(e="vertical"===n?{maxHeight:c?c+"px":null}:{maxWidth:l?l+"px":null}).maxHeight,maxWidth:e.maxWidth};return i.createElement(g,V({},a,{childFactory:o||function(t){return t.props.in?t:i.cloneElement(t,V({},t.props,{style:V({},t.props.style,{maxHeight:e.maxHeight,maxWidth:e.maxWidth})}))},onEnter:this.componentWillEnter,onEntering:this.componentIsEntering,onExit:this.componentWillExit,animationEnteringStyle:u,transitionName:"reveal-"+n}),r)},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}(i.Component);n.d(t,"Animation",function(){return g}),n.d(t,"AnimationChild",function(){return h}),n.d(t,"Fade",function(){return I}),n.d(t,"Expand",function(){return C}),n.d(t,"Push",function(){return F}),n.d(t,"Slide",function(){return T}),n.d(t,"Zoom",function(){return L}),n.d(t,"Reveal",function(){return B})}])}); | ||
!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(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},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 r,i=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)?i.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),u=n(0),p=(r=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}r(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 p(t,e),t.prototype.render=function(){var e=this.props,t=e.label,n=e.id,r=e.className,o=e.value,a=e.placeholder,s=e.valid,c=e.style,u=i({"k-textbox-container":!0,"k-state-focused":this.state.focused,"k-state-empty":!(o||a),"k-state-invalid":!s&&void 0!==s},r);return l.createElement("span",{className:u,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:u.string,id:u.string,value:u.string,placeholder:u.string,valid:u.bool},t}(l.Component);function h(e,t,n,r){if(e){var i={syntheticEvent:t,nativeEvent:t.nativeEvent,target:n};e.call(void 0,Object.assign(i,r))}}var f=function(){return"undefined"==typeof window},m=function(e,t){return function(n){return t(e(n))}},v=function(e,t,n){return e.addEventListener&&e.addEventListener(t,n)},y=function(e,t,n){return e.removeEventListener&&e.removeEventListener(t,n)},g=function(){},b=function(e){return e.preventDefault()},x=/touch/;function E(e){return e.type.match(x)?{pageX:e.changedTouches[0].pageX,pageY:e.changedTouches[0].pageY,clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY,type:e.type,originalEvent:e,isTouch:!0}:{pageX:e.pageX,pageY:e.pageY,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,type:e.type,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,originalEvent:e}}var I=function(e){var t=this,n=e.press;void 0===n&&(n=g);var r=e.drag;void 0===r&&(r=g);var i=e.release;void 0===i&&(i=g);var o=e.mouseOnly;void 0===o&&(o=!1),this._pressHandler=m(E,n),this._dragHandler=m(E,r),this._releaseHandler=m(E,i),this._ignoreMouse=!1,this._mouseOnly=o,this._touchAction,this._touchstart=function(e){1===e.touches.length&&t._pressHandler(e)},this._touchmove=function(e){1===e.touches.length&&t._dragHandler(e)},this._touchend=function(e){0===e.touches.length&&1===e.changedTouches.length&&(t._releaseHandler(e),t._ignoreMouse=!0,setTimeout(t._restoreMouse,2e3))},this._restoreMouse=function(){t._ignoreMouse=!1},this._mousedown=function(e){var n=e.which;n&&n>1||t._ignoreMouse||(v(document,"mousemove",t._mousemove),v(document,"mouseup",t._mouseup),t._pressHandler(e))},this._mousemove=function(e){t._dragHandler(e)},this._mouseup=function(e){y(document,"mousemove",t._mousemove),y(document,"mouseup",t._mouseup),t._releaseHandler(e)},this._pointerdown=function(e){e.isPrimary&&0===e.button&&(v(t._element,"pointermove",t._pointermove),v(t._element,"pointerup",t._pointerup),v(t._element,"contextmenu",b),t._touchAction=e.target.style.touchAction,e.target.style.touchAction="none",e.target.setPointerCapture(e.pointerId),t._pressHandler(e))},this._pointermove=function(e){e.isPrimary&&t._dragHandler(e)},this._pointerup=function(e){e.isPrimary&&(y(t._element,"pointermove",t._pointermove),y(t._element,"pointerup",t._pointerup),y(t._element,"contextmenu",b),e.target.style.touchAction=t._touchAction,e.target.releasePointerCapture(e.pointerId),t._releaseHandler(e))}};I.supportPointerEvent=function(){return"undefined"!=typeof window&&window.PointerEvent},I.prototype.bindTo=function(e){e!==this._element&&(this._element&&this._unbindFromCurrent(),this._element=e,this._bindToCurrent())},I.prototype._bindToCurrent=function(){var e=this._element;this._usePointers()?v(e,"pointerdown",this._pointerdown):(v(e,"mousedown",this._mousedown),this._mouseOnly||(v(e,"touchstart",this._touchstart),v(e,"touchmove",this._touchmove),v(e,"touchend",this._touchend)))},I.prototype._unbindFromCurrent=function(){var e=this._element;if(this._usePointers())return y(e,"pointerdown",this._pointerdown),y(e,"pointermove",this._pointermove),void y(e,"pointerup",this._pointerup);y(e,"mousedown",this._mousedown),this._mouseOnly||(y(e,"touchstart",this._touchstart),y(e,"touchmove",this._touchmove),y(e,"touchend",this._touchend))},I.prototype._usePointers=function(){return!this._mouseOnly&&I.supportPointerEvent()},I.prototype.destroy=function(){this._unbindFromCurrent(),this._element=null},I.default=I;var O=I,_=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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),k=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.element=null,t.draggable=new O({press:function(e){t.element&&t.props.onPress&&t.props.onPress.call(void 0,{target:t,event:e,element:t.element})},drag:function(e){t.element&&t.props.onDrag&&t.props.onDrag.call(void 0,{target:t,event:e,element:t.element})},release:function(e){t.element&&t.props.onRelease&&t.props.onRelease.call(void 0,{target:t,event:e})}}),t}return _(t,e),t.prototype.componentDidMount=function(){this.element&&this.draggable.bindTo(this.element)},t.prototype.componentWillUnmount=function(){this.draggable.destroy()},t.prototype.render=function(){var e=this;return l.cloneElement(l.Children.only(this.props.children),{ref:function(t){return e.element=t}})},t.propTypes={children:u.element.isRequired},t}(l.PureComponent);n.d(t,"classNames",function(){return i}),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 h}),n.d(t,"isServerRendering",function(){return f}),n.d(t,"Draggable",function(){return k})},function(e,t,n){"use strict";function r(e){return a(e)?e:e.split(t.SEPARATOR)[0]}function i(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(r(t))];return o&&o.items&&o.items.length?e(i(t),o.items):void 0},t.getRootParentId=r,t.getIdWithoutRootParentId=i,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 r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};Object.defineProperty(t,"__esModule",{value:!0});var i=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,r){for(var o=void 0,s=0;s<n.length;s++){var c=n[s];if(t(c)){o=i.createId(s,r);break}if(a(c)&&(o=e(t,c.items,i.createId(s,r))))break}return o}(e,t,i.EMPTY_ID)},t.updateItem=function e(t,n,o){for(var a=[],s=0;s<t.length;s++)if(Number(i.getRootParentId(n))===s){var c=r({},t[s]);i.isIdZeroLevel(n)?o(c):t[s].items&&(c.items=e(t[s].items,i.getIdWithoutRootParentId(n),o)),a.push(c)}else a.push(t[s]);return a},t.hasChildren=a,t.isEnabledAndAllParentsEnabled=function(e,t,n){for(var r=i.getAllShortIds(e),o=t,a=0;a<r.length;a++){var s=o[Number(r[a])];if(n.disabled(s))return!1;o=s.items}return!0},t.getAllDirectIndirectChildrenIds=function(e,t,n){return n?function e(t){var r=[];if(t.items)for(var i=0;i<t.items.length;i++)r.push(o.getNestedValue(n,t.items[i])),r=r.concat(e(t.items[i]));return r}(e):function e(t,n){var r=[];if(t.items)for(var o=0;o<t.items.length;o++){var a=i.createId(o,n);r.push(a),r=r.concat(e(t.items[o],a))}return r}(e,t)},t.areAllDirectChildrenChecked=function(e,t,n,r){return!e.items||e.items.every(function(e,a){return r.indexOf(n?o.getNestedValue(n,e):i.createId(a,t))>-1})},t.getAllParents=function(e,t){for(var n=[],r=i.getAllShortIds(e),o=t,a=0;a<r.length-1&&o;a++){var s=o[Number(r[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("."),r=t;return n.forEach(function(e){r=r?r[e]:void 0}),r},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 r=n(9);t.TreeView=r.default;var i=n(13);t.processTreeViewItems=i.default;var o=n(14);t.handleTreeViewCheckChange=o.handleTreeViewCheckChange},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=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}r(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),u=n(11),p=n(3),d=n(12),h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={focusedItemId:void 0,focusedItemPublicId:void 0,tabbableItemId:p.ZERO_LEVEL_ZERO_NODE_ID},t.allowExplicitFocus=!1,t.onFocusDomElNeeded=function(e){t.allowExplicitFocus&&t.focusDomItem(e)},t.onCheckChange=function(e,n,r){t.setFocus(r),t.dispatchCheckChange(e,n,r)},t.onExpandChange=function(e,n,r){t.setFocus(r),t.dispatchExpandChange(e,n,r)},t.onDragStart=function(){},t.onDrop=function(){},t.onDragOver=function(){},t.onItemClick=function(e,n,r){t.setFocus(r),t.dispatchItemClick(e,n,r)},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 r=c.default(n,t.state.focusedItemId,t.data,e.keyCode,t.fieldsSvc);r!==t.state.focusedItemId&&(e.preventDefault(),t.allowExplicitFocus=!0,t.setFocus(r)),t.dispatchEventsOnKeyDown(e,n)}},t}return i(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"+(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"]},o.createElement("ul",{className:"k-treeview-lines",role:"group"},this.data.map(function(t,n){return o.createElement(u.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,onFocusDomElNeeded:e.onFocusDomElNeeded,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(){this.allowExplicitFocus=!1,this.refocusDueToFocusIdField()},t.prototype.dispatchEventsOnKeyDown=function(e,t){var n=this,r=function(){return l.isEnabledAndAllParentsEnabled(n.state.focusedItemId,n.data,n.fieldsSvc)};e.keyCode===s.Keys.left&&this.fieldsSvc.expanded(t)&&r()?this.dispatchExpandChange(e,t,this.state.focusedItemId):e.keyCode===s.Keys.right&&!this.fieldsSvc.expanded(t)&&(this.fieldsSvc.hasChildren(t)||l.hasChildren(t))&&r()?this.dispatchExpandChange(e,t,this.state.focusedItemId):e.keyCode===s.Keys.enter&&r()?this.dispatchItemClick(e,t,this.state.focusedItemId):e.keyCode===s.Keys.space&&r()&&(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 p.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})},t.prototype.refocusDueToFocusIdField=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.allowExplicitFocus=!0,this.setState({focusedItemId: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.prototype.focusDomItem=function(e){e.focus()},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=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(3),o=n(4);t.default=function(e,t,n,a,s){switch(a){case r.Keys.left:return i.isIdZeroLevel(t)||s.expanded(e)&&o.isEnabledAndAllParentsEnabled(t,n,s)?t:i.getDirectParentId(t);case r.Keys.right:return o.isItemExpandedAndWithChildren(e,s)?i.getFirstChildId(t):t;case r.Keys.up:return c=Number(i.getShortId(t)),l=i.getDirectParentId(t),c?function e(t,n,r){var a=i.getItemById(t,n);return o.isItemExpandedAndWithChildren(a,r)?e(i.createId(a.items.length-1,t),n,r):t}(i.createId(c-1,l),n,s):i.isIdZeroLevel(t)?t:l;case r.Keys.down:return o.isItemExpandedAndWithChildren(e,s)?i.getFirstChildId(t):function e(t,n){var r=i.getDirectParentId(t),o=r?i.getItemById(r,n):void 0,a=o?o.items:n,s=Number(i.getShortId(t));return s<a.length-1?i.createId(s+1,r):o?e(r,n):void 0}(t,n)||t;case r.Keys.home:return i.ZERO_LEVEL_ZERO_NODE_ID;case r.Keys.end:return function(){for(var e=(n.length-1).toString(),t=n[n.length-1];o.isItemExpandedAndWithChildren(t,s);)e=i.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 r,i=this&&this.__extends||(r=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}r(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),u=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 i(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.props.onFocusDomElNeeded(this.itemElement),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.props.onFocusDomElNeeded(this.itemElement),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,r){return o.createElement(t,{item:n,animate:e.props.animate,itemId:s.createId(r,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,onFocusDomElNeeded:e.props.onFocusDomElNeeded,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:r})})):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=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),i=n(5),o=function(){function e(e){this.expandField=e.expandField||r.EXPAND_FIELD,this.selectField=e.selectField||r.SELECT_FIELD,this.hasChildrenField=e.hasChildrenField||"hasChildren",this.textField=e.textField||"text",this.disableField=e.disableField||"disabled",this.checkField=e.checkField||r.CHECK_FIELD,this.checkIndeterminateField=e.checkIndeterminateField||r.CHECK_INDETERMINATE_FIELD,this.focusIdField=e.focusIdField}return e.prototype.expanded=function(e){return i.getNestedValue(this.expandField,e)},e.prototype.selected=function(e){return i.getNestedValue(this.selectField,e)},e.prototype.text=function(e){return i.getNestedValue(this.textField,e)},e.prototype.disabled=function(e){return i.getNestedValue(this.disableField,e)},e.prototype.hasChildren=function(e){return i.getNestedValue(this.hasChildrenField,e)},e.prototype.checked=function(e){return i.getNestedValue(this.checkField,e)},e.prototype.checkIndeterminate=function(e){return i.getNestedValue(this.checkIndeterminateField,e)},e.prototype.focusId=function(e){return this.focusIdField&&i.getNestedValue(this.focusIdField,e)},e}();t.default=o},function(e,t,n){"use strict";var r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),o=n(7),a=n(5);function s(e,t,n){if(n){var r=c(n,t),o=r.ids,s=r.field,u=o;return!a.isArray(n)&&n.idField&&(u=function(e,t,n){var r=[];return e.forEach(function(e){r.push(i.resolveItemId(function(n){return a.getNestedValue(t,n)===e},n))}),r}(o,n.idField,e)),function(e,t,n){var r=e;return t.forEach(function(e){r=i.updateItem(r,e,function(e){return l(n,e)})}),r}(e,u,s)}return e}function c(e,t){var n,r;return a.isArray(e)?(n=e,r=t):(n=e.ids||[],r=e.operationField||t),{ids:n,field:r}}function l(e,t){for(var n=(e||"").split("."),i=t,o=0;o<n.length;o++){var a=n[o];if(o===n.length-1)i[a]=!0;else{if(void 0===i[a])return;i[a]=r({},i[a]),i=i[a]}}}function u(e,t,n,r){for(var i=!1,o=0;o<e.length;o++){var s=e[o];if(a.getNestedValue(n,s)){if(!i)for(var c=0;c<t.length;c++)l(r,t[c]);i=!0,s.items&&u(s.items,[],n,r)}else s.items&&u(s.items,i?[s]:t.concat([s]),n,r)}}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,r=t.checkIndeterminateField||o.CHECK_INDETERMINATE_FIELD,i=0;i<e.length;i++){var s=e[i];s.items&&u(s.items,a.getNestedValue(n,s)?[]:[s],n,r)}}(n=s(n,o.CHECK_FIELD,t.check),t.check),n):[]}},function(e,t,n){"use strict";var r=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[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,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=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 i=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),u=l.ids,p=l.idField,d=p?a.getNestedValue(p,e.item):e.itemHierarchicalIndex,h=u.indexOf(d),f=-1===h;return s.singleMode?c=f?[d]:[]:(c=u.slice(),f?c.push(d):c.splice(h,1),s.checkChildren&&function(e,t,n,r,o){i.getAllDirectIndirectChildrenIds(e,t,r).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,f,p,c),s.checkParents&&function(e,t,n,s,c){var l=function(){var s,l,u;return r(this,function(r){switch(r.label){case 0:if(!n)return[3,5];s=i.getAllParents(e,c),l=s.length-1,r.label=1;case 1:return l>-1?[4,{id:a.getNestedValue(n,s[l]),item:t?s[l]:void 0}]:[3,4];case 2:r.sent(),r.label=3;case 3:return l--,[3,1];case 4:return[3,8];case 5:u=o.getDirectParentId(e),r.label=6;case 6:return u?[4,{id:u,item:t?o.getItemById(u,c):void 0}]:[3,8];case 7:return r.sent(),u=o.getDirectParentId(u),[3,6];case 8:return[2]}})}(),u=l.next();t?function(){for(;!u.done;){var e=u.value,t=e.id,r=e.item;if(-1!==s.indexOf(t)||!i.areAllDirectChildrenChecked(r,t,n,s))break;s.push(t),u=l.next()}}():function(){for(;!u.done;){var e=u.value.id,t=s.indexOf(e);if(!(t>-1))break;s.splice(t,1),u=l.next()}}()}(e.itemHierarchicalIndex,f,p,c,n)),a.isArray(t)?c:Object.assign({},t,{ids:c})}},function(e,t,n){"use strict";n.r(t);var r,i=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),r=parseFloat(t.marginBottom);return e.offsetHeight+n+r},outerWidth:function(e){if(!e)return 0;var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginLeft),r=parseFloat(t.marginRight);return e.offsetWidth+n+r},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=(r=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}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n},d=c.styles,h=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,r=t.style,o=t.appear,c=t.enter,l=t.exit,h=t.transitionName,f=t.transitionEnterDuration,m=t.transitionExitDuration,v=t.className,y=t.onEnter,g=t.onEntering,b=t.onEntered,x=t.onExit,E=t.onExiting,I=t.onExited,O=t.mountOnEnter,_=t.unmountOnExit,k=t.animationEnteringStyle,C=t.animationEnteredStyle,P=t.animationExitingStyle,w=t.animationExitedStyle,S=p(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,d["child-animation-container"]),F=u({transitionDelay:"0ms"},r),j={entering:u({transitionDuration:f+"ms"},k),entered:u({},C),exiting:u({transitionDuration:m+"ms"},P),exited:u({},w)},N={in:this.props.in,appear:o,enter:c,exit:l,mountOnEnter:O,unmountOnExit:_,timeout:{enter:f,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){E&&E.call(void 0,{animatedElement:t,target:e})},onExited:function(t){I&&I.call(void 0,{animatedElement:t,target:e})},classNames:{appear:d[h+"-appear"]||h+"-appear",appearActive:d[h+"-appear-active"]||h+"-appear-active",enter:d[h+"-enter"]||h+"-enter",enterActive:d[h+"-enter-active"]||h+"-enter-active",exit:d[h+"-exit"]||h+"-exit",exitActive:d[h+"-exit-active"]||h+"-exit-active"}};return i.createElement(s.CSSTransition,u({},N,S),function(t){return i.createElement("div",{style:u({},F,j[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}(i.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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),m=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n},y=c.styles,g=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.id,n=e.style,r=e.children,o=e.component,c=e.className,l=e.childFactory,u=(e.stackChildren,e.componentChildStyle),p=e.componentChildClassName,d=v(e,["id","style","children","component","className","childFactory","stackChildren","componentChildStyle","componentChildClassName"]),f={id:t,style:n,component:o,childFactory:l,className:Object(a.classNames)(y["animation-container"],y["animation-container-relative"],c)},g=i.Children.map(r,function(e){return i.createElement(h,m({},d,{style:u,className:p}),e)});return i.createElement(s.TransitionGroup,m({},f),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}(i.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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),x=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},E=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n},I=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=E(e,["children"]);return i.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}(i.Component),O=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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},k=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n},C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return O(t,e),t.prototype.render=function(){var e=this.props,t=e.direction,n=e.children,r=k(e,["direction","children"]),o={transitionName:"expand-"+t};return i.createElement(g,_({},o,r),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}(i.Component),P=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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),w=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},S=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n},D={position:"absolute",top:"0",left:"0"},F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return P(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.direction,r=S(e,["children","direction"]);return i.createElement(g,w({},r,{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}(i.Component),j=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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),N=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},A=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n},T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.render=function(){var e=this.props,t=e.direction,n=e.children,r=A(e,["direction","children"]),o={transitionName:"slide-"+t};return i.createElement(g,N({},o,r),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}(i.Component),R=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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),z=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},H=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n},M={position:"absolute",top:"0",left:"0"},L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return R(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.direction,r=H(e,["children","direction"]);return i.createElement(g,z({},r,{transitionName:"zoom-"+n,animationExitingStyle:this.props.stackChildren?M: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}(i.Component),K=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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),V=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},W=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}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 r=e.firstChild;if(r){var i=c.outerHeight(r),o=c.outerWidth(r);t.setState({maxHeight:i,maxWidth:o},n)}},t}return K(t,e),t.prototype.render=function(){var e,t=this.props,n=t.direction,r=t.children,o=t.childFactory,a=W(t,["direction","children","childFactory"]),s=this.state,c=s.maxHeight,l=s.maxWidth,u={maxHeight:(e="vertical"===n?{maxHeight:c?c+"px":null}:{maxWidth:l?l+"px":null}).maxHeight,maxWidth:e.maxWidth};return i.createElement(g,V({},a,{childFactory:o||function(t){return t.props.in?t:i.cloneElement(t,V({},t.props,{style:V({},t.props.style,{maxHeight:e.maxHeight,maxWidth:e.maxWidth})}))},onEnter:this.componentWillEnter,onEntering:this.componentIsEntering,onExit:this.componentWillExit,animationEnteringStyle:u,transitionName:"reveal-"+n}),r)},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}(i.Component);n.d(t,"Animation",function(){return g}),n.d(t,"AnimationChild",function(){return h}),n.d(t,"Fade",function(){return I}),n.d(t,"Expand",function(){return C}),n.d(t,"Push",function(){return F}),n.d(t,"Slide",function(){return T}),n.d(t,"Zoom",function(){return L}),n.d(t,"Reveal",function(){return B})}])}); |
@@ -111,3 +111,3 @@ var __extends = (this && this.__extends) || (function () { | ||
this.fieldsSvc = new FieldsService(this.props); | ||
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'] }, | ||
return (React.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 ? true : undefined, "aria-label": this.props['aria-label'], "aria-labelledby": this.props['aria-labelledby'] }, | ||
React.createElement("ul", { className: "k-treeview-lines", role: "group" }, this.data.map(function (item, index) { | ||
@@ -114,0 +114,0 @@ 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, onFocusDomElNeeded: _this.onFocusDomElNeeded, draggable: false, onDragStart: _this.onDragStart, onDragOver: _this.onDragOver, onDrop: _this.onDrop, |
@@ -9,2 +9,6 @@ import { ComponentType } from 'react'; | ||
/** | ||
* Sets a class of the TreeView DOM element. | ||
*/ | ||
className?: string; | ||
/** | ||
* Sets the data of the TreeView ([more information and examples]({% slug databinding_treeview %})). | ||
@@ -11,0 +15,0 @@ */ |
@@ -113,3 +113,3 @@ "use strict"; | ||
this.fieldsSvc = new FieldsService_1.default(this.props); | ||
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'] }, | ||
return (React.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 ? true : undefined, "aria-label": this.props['aria-label'], "aria-labelledby": this.props['aria-labelledby'] }, | ||
React.createElement("ul", { className: "k-treeview-lines", role: "group" }, this.data.map(function (item, index) { | ||
@@ -116,0 +116,0 @@ 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, onFocusDomElNeeded: _this.onFocusDomElNeeded, draggable: false, onDragStart: _this.onDragStart, onDragOver: _this.onDragOver, onDrop: _this.onDrop, |
@@ -9,2 +9,6 @@ import { ComponentType } from 'react'; | ||
/** | ||
* Sets a class of the TreeView DOM element. | ||
*/ | ||
className?: string; | ||
/** | ||
* Sets the data of the TreeView ([more information and examples]({% slug databinding_treeview %})). | ||
@@ -11,0 +15,0 @@ */ |
@@ -1,1 +0,1 @@ | ||
System.register("@progress/kendo-react-treeview",["prop-types","react","@progress/kendo-react-common","@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=r},function(e,t){e.exports=i},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.allowExplicitFocus=!1,i.onFocusDomElNeeded=function(e){i.allowExplicitFocus&&i.focusDomItem(e)},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.allowExplicitFocus=!0,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,onFocusDomElNeeded:n.onFocusDomElNeeded,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(){this.allowExplicitFocus=!1,this.refocusDueToFocusIdField()},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()&&(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,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})},t.prototype.refocusDueToFocusIdField=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.allowExplicitFocus=!0,this.setState({focusedItemId:e}))}}},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()},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=n},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.props.onFocusDomElNeeded(this.itemElement),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.props.onFocusDomElNeeded(this.itemElement),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,onFocusDomElNeeded:n.props.onFocusDomElNeeded,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 _=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 S=n(1),F=n(0),O=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,v,b,y=(o=t,a=void 0,O.isArray(o)?s=o:(s=o.ids||[],a=o.idField),{ids:s,idField:a}),E=y.ids,C=y.idField,x=C?O.getNestedValue(C,e.item):e.itemHierarchicalIndex,k=E.indexOf(x),D=-1===k;return i.singleMode?r=D?[x]:[]:(r=E.slice(),D?r.push(x):r.splice(k,1),i.checkChildren&&(m=e.item,I=e.itemHierarchicalIndex,g=D,v=C,b=r,S.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)})),i.checkParents&&(c=e.itemHierarchicalIndex,d=D,l=C,u=r,h=n,p=function(){var t,n,i;return _(this,function(e){switch(e.label){case 0:if(!l)return[3,5];t=S.getAllParents(c,h),n=t.length-1,e.label=1;case 1:return-1<n?[4,{id:O.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=F.getDirectParentId(c),e.label=6;case 6:return i?[4,{id:i,item:d?F.getItemById(i,h):void 0}]:[3,8];case 7:return e.sent(),i=F.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)||!S.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()}}())),O.isArray(t)?r:Object.assign({},t,{ids:r})}}])}}}); | ||
System.register("@progress/kendo-react-treeview",["prop-types","react","@progress/kendo-react-common","@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=r},function(e,t){e.exports=i},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.allowExplicitFocus=!1,i.onFocusDomElNeeded=function(e){i.allowExplicitFocus&&i.focusDomItem(e)},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.allowExplicitFocus=!0,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"+(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"]},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,onFocusDomElNeeded:n.onFocusDomElNeeded,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(){this.allowExplicitFocus=!1,this.refocusDueToFocusIdField()},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()&&(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,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})},t.prototype.refocusDueToFocusIdField=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.allowExplicitFocus=!0,this.setState({focusedItemId:e}))}}},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()},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=n},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.props.onFocusDomElNeeded(this.itemElement),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.props.onFocusDomElNeeded(this.itemElement),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,onFocusDomElNeeded:n.props.onFocusDomElNeeded,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 _=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 S=n(1),F=n(0),O=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,v,b,y=(o=t,a=void 0,O.isArray(o)?s=o:(s=o.ids||[],a=o.idField),{ids:s,idField:a}),E=y.ids,C=y.idField,x=C?O.getNestedValue(C,e.item):e.itemHierarchicalIndex,k=E.indexOf(x),D=-1===k;return i.singleMode?r=D?[x]:[]:(r=E.slice(),D?r.push(x):r.splice(k,1),i.checkChildren&&(m=e.item,I=e.itemHierarchicalIndex,g=D,v=C,b=r,S.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)})),i.checkParents&&(c=e.itemHierarchicalIndex,d=D,l=C,u=r,h=n,p=function(){var t,n,i;return _(this,function(e){switch(e.label){case 0:if(!l)return[3,5];t=S.getAllParents(c,h),n=t.length-1,e.label=1;case 1:return-1<n?[4,{id:O.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=F.getDirectParentId(c),e.label=6;case 6:return i?[4,{id:i,item:d?F.getItemById(i,h):void 0}]:[3,8];case 7:return e.sent(),i=F.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)||!S.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()}}())),O.isArray(t)?r:Object.assign({},t,{ids:r})}}])}}}); |
{ | ||
"name": "@progress/kendo-react-treeview", | ||
"version": "2.8.0-dev.201903111130", | ||
"version": "2.8.0-dev.201903111629", | ||
"description": "KendoReact TreeView package", | ||
@@ -31,7 +31,7 @@ "repository": { | ||
"dependencies": { | ||
"@progress/kendo-react-common": "2.8.0-dev.201903111130", | ||
"@progress/kendo-react-common": "2.8.0-dev.201903111629", | ||
"prop-types": "^15.6.0" | ||
}, | ||
"devDependencies": { | ||
"@progress/kendo-react-animation": "2.8.0-dev.201903111130" | ||
"@progress/kendo-react-animation": "2.8.0-dev.201903111629" | ||
}, | ||
@@ -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
294743
3735
26
35
8
251
+ Added@progress/kendo-react-common@2.8.0-dev.201903111629(transitive)
- Removed@progress/kendo-react-common@2.8.0-dev.201903111130(transitive)