UNPKG

@progress/kendo-treeview-react-wrapper

Version:

Kendo UI TreeView wrapper for React

2 lines 4.93 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.KendoTreeviewReactWrapper=e(require("react")):t.KendoTreeviewReactWrapper=e(t.React)}("undefined"!=typeof self?self:this,function(t){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=1)}([function(e,n){e.exports=t},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2);e.TreeView=o.default;var r=n(4);e.TreeViewSubItems=r.default;var i=n(5);e.TreeViewItem=i.default},function(t,e,n){"use strict";var o=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),r=this&&this.__rest||function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&(n[o[r]]=t[o[r]]);return n};Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),u=n(3),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.componentDidMount=function(){var e=this.domNode,n=this.props,o=(n.children,n.widgetRef,r(n,["children","widgetRef"]));e&&(this.widgetInstance=new kendo.ui.TreeView(e,o),t.prototype.componentDidMount.call(this))},e.prototype.render=function(){if(this.didMount){var t=this.props,e=(t.children,t.widgetRef,r(t,["children","widgetRef"])),n=this.widgetInstance;e.dataSource&&e.dataSource===n.options.dataSource&&delete e.dataSource,this.widgetInstance.setOptions(e)}return i.createElement("ul",{ref:this.elementRef},this.props.children)},e}(u.default);e.default=c},function(t,e,n){"use strict";var o=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.didMount=!1,e.elementRef=function(t){e.domNode=t},e.exposeWidget=function(){e.props.widgetRef&&"function"==typeof e.props.widgetRef&&e.props.widgetRef(e.widgetInstance)},e.overrideDestroy=function(){e.widgetDestroy=e.widgetInstance.destroy,e.widgetInstance.destroy=function(){e.destroyed=!e.destroyed,e.widgetDestroy.call(e.widgetInstance)}},e}return o(e,t),e.prototype.componentDidMount=function(){this.exposeWidget(),this.overrideDestroy(),this.didMount=!0},e.prototype.componentWillUnmount=function(){this.destroyed||this.widgetDestroy.call(this.widgetInstance),this.exposeWidget()},e}(r.PureComponent);e.default=i},function(t,e,n){"use strict";var o=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.render=function(){return r.createElement("ul",null,this.props.children)},e}(r.Component);e.default=i},function(t,e,n){"use strict";var o=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.render=function(){return r.createElement("li",null,this.props.children)},e}(r.Component);e.default=i}])}); //# sourceMappingURL=kendo-treeview-react-wrapper.min.js.map