imng-kendo-chart-odata
Version:
A library to make integrating Angular Kendo Charts and NGRX a bit simpler.
40 lines (36 loc) • 1.8 kB
JavaScript
import * as i0 from '@angular/core';
import { InjectionToken, Input, Inject, Directive } from '@angular/core';
import { Subscriptions } from 'imng-ngrx-utils';
import * as i1 from 'rxjs';
/* eslint-disable @angular-eslint/prefer-inject */
const FACADE = new InjectionToken('imng-chart-facade');
class ChartODataBaseComponent {
constructor(facade, gridRefresh$ = null) {
this.facade = facade;
this.gridRefresh$ = gridRefresh$;
this.allSubscriptions = new Subscriptions();
this.height = 400; //NOSONAR
this.seriesData$ = this.facade.seriesData$;
if (gridRefresh$) {
this.allSubscriptions.push(this.gridRefresh$?.subscribe(() => this.loadChart()));
}
}
ngOnDestroy() {
this.allSubscriptions.unsubscribeAll();
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ChartODataBaseComponent, deps: [{ token: FACADE }, { token: i1.Observable }], target: i0.ɵɵFactoryTarget.Directive }); }
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.4", type: ChartODataBaseComponent, isStandalone: true, inputs: { height: "height" }, ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ChartODataBaseComponent, decorators: [{
type: Directive
}], ctorParameters: () => [{ type: undefined, decorators: [{
type: Inject,
args: [FACADE]
}] }, { type: i1.Observable }], propDecorators: { height: [{
type: Input
}] } });
/**
* Generated bundle index. Do not edit.
*/
export { ChartODataBaseComponent };
//# sourceMappingURL=imng-kendo-chart-odata.mjs.map