UNPKG

@progress/kendo-gauges-react-wrapper

Version:

Kendo UI Gauges wrapper for React

2 lines 5.77 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.KendoGaugesReactWrapper=e(require("react")):t.KendoGaugesReactWrapper=e(t.React)}("undefined"!=typeof self?self:this,function(t){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},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=2)}([function(e,n){e.exports=t},function(t,e,n){"use strict";var r=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=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 r(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}(o.PureComponent);e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3);e.LinearGauge=r.default;var o=n(4);e.RadialGauge=o.default},function(t,e,n){"use strict";var r=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},o.apply(this,arguments)},i=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&(n[r[o]]=t[r[o]]);return n};Object.defineProperty(e,"__esModule",{value:!0});var s=n(0),u=n(1),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.componentDidMount=function(){var e=this.domNode,n=this.props,r=(n.children,n.widgetRef,i(n,["children","widgetRef"]));e&&(this.widgetInstance=new kendo.dataviz.ui.LinearGauge(e,r),t.prototype.componentDidMount.call(this))},e.prototype.render=function(){if(this.didMount){var t=this.props,e=(t.children,t.widgetRef,i(t,["children","widgetRef"]));this.widgetInstance.setOptions(e);var n=this.props.pointer,r=n.map(function(t){return t.value});this.widgetInstance.allValues(r)}var u=s.Children.toArray(this.props.children).filter(function(t){return t&&"div"===t.type}).shift();return u?s.cloneElement(u,o({},u.props,{ref:this.elementRef})):s.createElement("div",{ref:this.elementRef})},e}(u.default);e.default=c},function(t,e,n){"use strict";var r=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},o.apply(this,arguments)},i=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&(n[r[o]]=t[r[o]]);return n};Object.defineProperty(e,"__esModule",{value:!0});var s=n(0),u=n(1),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.componentDidMount=function(){var e=this.domNode,n=this.props,r=(n.children,n.widgetRef,i(n,["children","widgetRef"]));e&&(this.widgetInstance=new kendo.dataviz.ui.RadialGauge(e,r),t.prototype.componentDidMount.call(this))},e.prototype.render=function(){if(this.didMount){var t=this.props,e=(t.children,t.widgetRef,i(t,["children","widgetRef"]));this.widgetInstance.setOptions(e);var n=this.props.pointer,r=n.map(function(t){return t.value});this.widgetInstance.allValues(r)}var u=s.Children.toArray(this.props.children).filter(function(t){return t&&"div"===t.type}).shift();return u?s.cloneElement(u,o({},u.props,{ref:this.elementRef})):s.createElement("div",{ref:this.elementRef})},e}(u.default);e.default=c}])}); //# sourceMappingURL=kendo-gauges-react-wrapper.min.js.map