@asymmetrik/angular2-sentio
Advanced tools
Comparing version 4.1.1 to 4.2.0
@@ -1,2 +0,2 @@ | ||
/*! @asymmetrik/angular2-sentio - 4.1.1 - Copyright Asymmetrik, Ltd. 2007-2017 - All Rights Reserved. + */ | ||
/*! @asymmetrik/angular2-sentio - 4.2.0 - Copyright Asymmetrik, Ltd. 2007-2017 - All Rights Reserved. + */ | ||
(function (global, factory) { | ||
@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@asymmetrik/sentio'), require('d3'), require('rxjs')) : |
@@ -1,2 +0,2 @@ | ||
/*! @asymmetrik/angular2-sentio - 4.1.1 - Copyright Asymmetrik, Ltd. 2007-2017 - All Rights Reserved. + */ | ||
/*! @asymmetrik/angular2-sentio - 4.2.0 - Copyright Asymmetrik, Ltd. 2007-2017 - All Rights Reserved. + */ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@asymmetrik/sentio"),require("d3"),require("rxjs")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@asymmetrik/sentio","d3","rxjs"],e):e(t.angular2Sentio=t.angular2Sentio||{},t.ng.core,t.sentio,t.d3,t.Rx)}(this,function(t,e,r,i,a){"use strict";var n=function(){function t(t,e,r){this.chartElement=i.select(t.nativeElement),this.chart=e,this.chartReady=r}return t.prototype.initialize=function(){this.chart.init(this.chartElement),this.chartReady.emit(this.chart)},t}(),s=function(){function t(t,e){this.width=t,this.height=e}return t}(),h=function(){function t(t,e,r,n){void 0===e&&(e=!0),void 0===r&&(r=200),void 0===n&&(n=100);var s=this;this.enabled=e,this.chartElement=i.select(t.nativeElement),this.resizeSource=a.Observable.create(function(t){s.resizeObserver=t}).publish().refCount().filter(function(){return s.enabled}),null!=r&&(this.resizeSource=this.resizeSource.debounceTime(r)),null!=n&&(this.resizeSource=this.resizeSource.sample(a.Observable.interval(n))),this.resizeSource=this.resizeSource.map(function(){return s.getSize()})}return t.parseFloat=function(t,e){var r=parseFloat(t);return isNaN(r)?e:r},t.getPixelDimension=function(t){var e;return null!=t&&""!==t&&(null==(e=parseFloat(t.substring(0,t.length-2)))||isNaN(e))&&(e=void 0),e},t.getSpecifiedSize=function(e){var r=e.attributes.width||t.getPixelDimension(e.style.width),i=e.attributes.height||t.getPixelDimension(e.style.height);return new s(r,i)},t.getActualSize=function(e){var r=getComputedStyle(e),i=t.parseFloat(r.paddingLeft,0)+t.parseFloat(r.paddingRight,0),a=t.parseFloat(r.paddingTop,0)+t.parseFloat(r.paddingBottom,0),n=t.parseFloat(r.borderLeftWidth,0)+t.parseFloat(r.borderRightWidth,0),h=t.parseFloat(r.borderTopWidth,0)+t.parseFloat(r.borderBottomWidth,0),o=e.offsetWidth-i-n,p=e.offsetHeight-a-h;return new s(o,p)},t.prototype.getSpecifiedSize=function(){return t.getSpecifiedSize(this.chartElement.node())},t.prototype.getActualSize=function(){var e=document.body,r=e.style.overflow;e.style.overflow="hidden";var i=this.chartElement.node().parentElement,a=t.getActualSize(i);return e.style.overflow=r,a},t.prototype.getSize=function(){var t=this.getSpecifiedSize(),e=this.getActualSize();return null!=t.height&&(e.height=t.height),null!=t.width&&(e.width=t.width),e},t.prototype.destroy=function(){this.resizeObserver.complete()},t}(),o=function(){function t(t){this.chartReady=new e.EventEmitter,this.chartWrapper=new n(t,r.chart.donut(),this.chartReady),this.resizeUtil=new h(t,this.resizeEnabled)}return t.prototype.setChartDimensions=function(t,e){void 0===e&&(e=!1),(e||this.resizeEnabled)&&null!=t.width&&this.chartWrapper.chart.width()!==t.width&&this.chartWrapper.chart.width(t.width).height(t.width).resize()},t.prototype.onResize=function(t){this.resizeUtil.resizeObserver.next(t)},t.prototype.ngOnInit=function(){var t=this;this.chartWrapper.initialize(),this.resizeUtil.resizeSource.subscribe(function(){t.setChartDimensions(t.resizeUtil.getSize()),t.chartWrapper.chart.redraw()}),this.setChartDimensions(this.resizeUtil.getSize(),!0),this.chartWrapper.chart.redraw()},t.prototype.ngOnDestroy=function(){this.resizeUtil.destroy()},t.prototype.ngOnChanges=function(t){var e=!1,r=!1;t.model&&(this.chartWrapper.chart.data(this.model),r=r||!t.model.isFirstChange()),t.duration&&this.chartWrapper.chart.duration(this.duration),t.colorScale&&(this.chartWrapper.chart.colorScale(this.colorScale),r=r||!t.colorScale.isFirstChange()),t.resize&&(this.resizeUtil.enabled=this.resizeEnabled,e=e||this.resizeEnabled&&!t.resize.isFirstChange(),r=r||e),e&&this.chartWrapper.chart.resize(),r&&this.chartWrapper.chart.redraw()},t}();o.decorators=[{type:e.Directive,args:[{selector:"sentioDonutChart"}]}],o.ctorParameters=function(){return[{type:e.ElementRef}]},o.propDecorators={model:[{type:e.Input}],colorScale:[{type:e.Input}],resizeEnabled:[{type:e.Input,args:["resize"]}],duration:[{type:e.Input}],chartReady:[{type:e.Output}],onResize:[{type:e.HostListener,args:["window:resize",["$event"]]}]};var p=function(){function t(t){this.chartReady=new e.EventEmitter,this.chartWrapper=new n(t,r.chart.matrix(),this.chartReady)}return t.prototype.ngOnInit=function(){this.chartWrapper.initialize(),this.chartWrapper.chart.redraw()},t.prototype.ngOnDestroy=function(){},t.prototype.ngOnChanges=function(t){var e=!1;t.model&&(this.chartWrapper.chart.data(this.model),e=e||!t.model.isFirstChange()),t.duration&&this.chartWrapper.chart.duration(this.duration),e&&this.chartWrapper.chart.redraw()},t}();p.decorators=[{type:e.Directive,args:[{selector:"sentioMatrixChart"}]}],p.ctorParameters=function(){return[{type:e.ElementRef}]},p.propDecorators={model:[{type:e.Input}],duration:[{type:e.Input}],chartReady:[{type:e.Output}]};var c=function(){function t(t){this.chartReady=new e.EventEmitter,this.markerOver=new e.EventEmitter,this.markerOut=new e.EventEmitter,this.markerClick=new e.EventEmitter,this.chartWrapper=new n(t,r.chart.realtimeTimeline(),this.chartReady),this.resizeUtil=new h(t,this.resizeHeight||this.resizeWidth)}return t.prototype.setChartDimensions=function(t,e){void 0===e&&(e=!1);var r=!1;(e||this.resizeWidth)&&null!=t.width&&this.chartWrapper.chart.width()!==t.width&&(this.chartWrapper.chart.width(t.width),r=!0),(e||this.resizeHeight)&&null!=t.height&&this.chartWrapper.chart.height()!==t.height&&(this.chartWrapper.chart.height(t.height),r=!0),r&&this.chartWrapper.chart.resize()},t.prototype.onResize=function(t){this.resizeUtil.resizeObserver.next(t)},t.prototype.ngOnInit=function(){var t=this;this.chartWrapper.initialize(),this.chartWrapper.chart.dispatch().on("markerClick",function(e){t.markerClick.emit(e)}),this.chartWrapper.chart.dispatch().on("markerMouseover",function(e){t.markerOver.emit(e)}),this.chartWrapper.chart.dispatch().on("markerMouseout",function(e){t.markerOut.emit(e)}),this.resizeUtil.resizeSource.subscribe(function(){t.setChartDimensions(t.resizeUtil.getSize()),t.chartWrapper.chart.redraw()}),this.setChartDimensions(this.resizeUtil.getSize(),!0),this.chartWrapper.chart.redraw()},t.prototype.ngOnDestroy=function(){this.resizeUtil.destroy()},t.prototype.ngOnChanges=function(t){var e=!1;t.model&&(this.chartWrapper.chart.data(this.model),e=e||!t.model.isFirstChange()),t.markers&&(this.chartWrapper.chart.markers(this.markers),e=e||!t.markers.isFirstChange()),t.yExtent&&(this.chartWrapper.chart.yExtent().overrideValue(this.yExtent),e=e||!t.yExtent.isFirstChange()),t.xExtent&&(this.chartWrapper.chart.xExtent().overrideValue(this.xExtent),e=e||!t.xExtent.isFirstChange()),t.fps&&this.chartWrapper.chart.fps(this.fps),t.delay&&(this.chartWrapper.chart.delay(this.delay),e=e||!t.delay.isFirstChange()),t.interval&&(this.chartWrapper.chart.interval(this.interval),e=e||!t.interval.isFirstChange()),e&&this.chartWrapper.chart.redraw()},t}();c.decorators=[{type:e.Directive,args:[{selector:"sentioRealtimeTimeline"}]}],c.ctorParameters=function(){return[{type:e.ElementRef}]},c.propDecorators={model:[{type:e.Input}],markers:[{type:e.Input}],yExtent:[{type:e.Input}],xExtent:[{type:e.Input}],delay:[{type:e.Input}],fps:[{type:e.Input}],interval:[{type:e.Input}],resizeWidth:[{type:e.Input}],resizeHeight:[{type:e.Input}],chartReady:[{type:e.Output}],markerOver:[{type:e.Output}],markerOut:[{type:e.Output}],markerClick:[{type:e.Output}],onResize:[{type:e.HostListener,args:["window:resize",["$event"]]}]};var u=function(){function t(t){this.chartReady=new e.EventEmitter,this.filterChange=new e.EventEmitter,this.markerOver=new e.EventEmitter,this.markerOut=new e.EventEmitter,this.markerClick=new e.EventEmitter,this.didFilterChange=function(t,e){return t!==e&&(null==t||null==e||t[0]!==e[0]||t[1]!==e[1])},this.chartWrapper=new n(t,r.chart.timeline(),this.chartReady),this.resizeUtil=new h(t,this.resizeHeight||this.resizeWidth)}return t.prototype.setChartDimensions=function(t,e){void 0===e&&(e=!1);var r=!1;(e||this.resizeWidth)&&null!=t.width&&this.chartWrapper.chart.width()!==t.width&&(this.chartWrapper.chart.width(t.width),r=!0),(e||this.resizeHeight)&&null!=t.height&&this.chartWrapper.chart.height()!==t.height&&(this.chartWrapper.chart.height(t.height),r=!0),r&&this.chartWrapper.chart.resize()},t.prototype.onResize=function(t){this.resizeUtil.resizeObserver.next(t)},t.prototype.ngOnInit=function(){var t=this;this.chartWrapper.initialize(),this.chartWrapper.chart.dispatch().on("markerClick",function(e){t.markerClick.emit(e)}),this.chartWrapper.chart.dispatch().on("markerMouseover",function(e){t.markerOver.emit(e)}),this.chartWrapper.chart.dispatch().on("markerMouseout",function(e){t.markerOut.emit(e)}),this.chartWrapper.chart.dispatch().on("filterend",function(e){t.didFilterChange(e,t.filterState)&&setTimeout(function(){t.filterChange.emit(e)})}),this.resizeUtil.resizeSource.subscribe(function(){t.setChartDimensions(t.resizeUtil.getSize()),t.chartWrapper.chart.redraw()}),this.setChartDimensions(this.resizeUtil.getSize(),!0),this.chartWrapper.chart.redraw(),null!=this.filterState&&this.chartWrapper.chart.setFilter(this.filterState)},t.prototype.ngOnDestroy=function(){this.resizeUtil.destroy()},t.prototype.ngOnChanges=function(t){var e=!1;t.model&&(this.chartWrapper.chart.data(this.model),e=e||!t.model.isFirstChange()),t.markers&&(this.chartWrapper.chart.markers(this.markers),e=e||!t.markers.isFirstChange()),t.yExtent&&(this.chartWrapper.chart.yExtent().overrideValue(this.yExtent),e=e||!t.yExtent.isFirstChange()),t.xExtent&&(this.chartWrapper.chart.xExtent().overrideValue(this.xExtent),e=e||!t.xExtent.isFirstChange()),t.filterEnabled&&(this.chartWrapper.chart.filter(this.filterEnabled),e=e||!t.filterEnabled.isFirstChange()),t.filterState&&!t.filterState.isFirstChange()&&this.didFilterChange(t.filterState.currentValue,t.filterState.previousValue)&&(this.chartWrapper.chart.setFilter(this.filterState),e=!0),e&&this.chartWrapper.chart.redraw()},t}();u.decorators=[{type:e.Directive,args:[{selector:"sentioTimeline"}]}],u.ctorParameters=function(){return[{type:e.ElementRef}]},u.propDecorators={model:[{type:e.Input}],markers:[{type:e.Input}],yExtent:[{type:e.Input}],xExtent:[{type:e.Input}],resizeWidth:[{type:e.Input}],resizeHeight:[{type:e.Input}],chartReady:[{type:e.Output}],filterEnabled:[{type:e.Input}],filterState:[{type:e.Input,args:["filter"]}],filterChange:[{type:e.Output}],markerOver:[{type:e.Output}],markerOut:[{type:e.Output}],markerClick:[{type:e.Output}],onResize:[{type:e.HostListener,args:["window:resize",["$event"]]}]};var l=function(){function t(t){this.chartReady=new e.EventEmitter,this.chartWrapper=new n(t,r.chart.verticalBars(),this.chartReady),this.resizeUtil=new h(t,this.resizeEnabled)}return t.prototype.setChartDimensions=function(t,e){void 0===e&&(e=!1),(e||this.resizeEnabled)&&null!=t.width&&this.chartWrapper.chart.width()!==t.width&&this.chartWrapper.chart.width(t.width).resize()},t.prototype.onResize=function(t){this.resizeUtil.resizeObserver.next(t)},t.prototype.ngOnInit=function(){var t=this;this.chartWrapper.initialize(),this.resizeUtil.resizeSource.subscribe(function(){t.setChartDimensions(t.resizeUtil.getSize()),t.chartWrapper.chart.redraw()}),this.setChartDimensions(this.resizeUtil.getSize(),!0),this.chartWrapper.chart.redraw()},t.prototype.ngOnDestroy=function(){this.resizeUtil.destroy()},t.prototype.ngOnChanges=function(t){var e=!1,r=!1;t.model&&(this.chartWrapper.chart.data(this.model),r=r||!t.model.isFirstChange()),t.widthExtent&&(this.chartWrapper.chart.widthExtent().overrideValue(this.widthExtent),r=r||!t.widthExtent.isFirstChange()),t.resize&&(this.resizeUtil.enabled=this.resizeEnabled,e=e||this.resizeEnabled&&!t.resize.isFirstChange(),r=r||e),e&&this.chartWrapper.chart.resize(),r&&this.chartWrapper.chart.redraw()},t}();l.decorators=[{type:e.Directive,args:[{selector:"sentioVerticalBarChart"}]}],l.ctorParameters=function(){return[{type:e.ElementRef}]},l.propDecorators={model:[{type:e.Input}],widthExtent:[{type:e.Input}],resizeEnabled:[{type:e.Input,args:["resize"]}],duration:[{type:e.Input}],chartReady:[{type:e.Output}],onResize:[{type:e.HostListener,args:["window:resize",["$event"]]}]};var d=function(){function t(){}return t.forRoot=function(){return{ngModule:t,providers:[]}},t}();d.decorators=[{type:e.NgModule,args:[{exports:[o,p,c,u,l],declarations:[o,p,c,u,l]}]}],d.ctorParameters=function(){return[]},t.SentioModule=d,Object.defineProperty(t,"__esModule",{value:!0})}); |
@@ -110,3 +110,3 @@ 'use strict'; | ||
format: 'umd', | ||
moduleName: 'angular2Sentio', | ||
moduleName: pkg.moduleName, | ||
sourceMap: true, | ||
@@ -113,0 +113,0 @@ banner: bannerString, |
{ | ||
"name": "@asymmetrik/angular2-sentio", | ||
"artifactName": "angular2-sentio", | ||
"moduleName": "angular2Sentio", | ||
"description": "Angular 2 components for Sentio", | ||
"version": "4.1.1", | ||
"version": "4.2.0", | ||
@@ -7,0 +8,0 @@ "author": "Asymmetrik, Ltd.", |
235796