UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

305 lines (304 loc) 14.7 kB
import { __extends } from "tslib"; /* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { EventEmitter, Output, Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core'; import { delegateCombine } from "igniteui-angular-core"; import { IgxSeriesComponent } from "./igx-series-component"; import { IgxUserAnnotationCollection } from "./igx-user-annotation-collection"; import { IgxUserAnnotationInformationEventArgs } from "./igx-user-annotation-information-event-args"; import { IgxUserAxisAnnotationStylingEventArgs } from "./igx-user-axis-annotation-styling-event-args"; import { IgxUserSliceAnnotationStylingEventArgs } from "./igx-user-slice-annotation-styling-event-args"; import { IgxUserStripAnnotationStylingEventArgs } from "./igx-user-strip-annotation-styling-event-args"; import { IgxUserPointAnnotationStylingEventArgs } from "./igx-user-point-annotation-styling-event-args"; import { UserAnnotationLayer } from "./UserAnnotationLayer"; import { UserAnnotationCollection as UserAnnotationCollection_internal } from "./UserAnnotationCollection"; import { UserBaseAnnotation } from "./UserBaseAnnotation"; import { SyncableObservableCollection$1 } from "igniteui-angular-core"; import * as i0 from "@angular/core"; /** * Represents an user annotation layer that can define UserPointAnnotation, UserSliceAnnotation, UserStripAnnotation */ var IgxUserAnnotationLayerComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgxUserAnnotationLayerComponent, _super); function IgxUserAnnotationLayerComponent() { var _this = _super.call(this) || this; _this._annotations = null; _this._userAnnotationInformationRequested = null; _this._stylingAxisAnnotation = null; _this._stylingSliceAnnotation = null; _this._stylingStripAnnotation = null; _this._stylingPointAnnotation = null; return _this; } IgxUserAnnotationLayerComponent.prototype.createImplementation = function () { return new UserAnnotationLayer(); }; Object.defineProperty(IgxUserAnnotationLayerComponent.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgxUserAnnotationLayerComponent.prototype, "annotations", { /** * Gets user annotations */ get: function () { if (this._annotations === null) { var coll = new IgxUserAnnotationCollection(); var innerColl = this.i.annotations; if (!innerColl) { innerColl = new UserAnnotationCollection_internal(); } this._annotations = coll._fromInner(innerColl); } return this._annotations; }, set: function (v) { if (this._annotations !== null) { this._annotations._setSyncTarget(null); this._annotations = null; } var coll = new IgxUserAnnotationCollection(); this._annotations = coll._fromOuter(v); var syncColl = new SyncableObservableCollection$1(UserBaseAnnotation.$type); var innerColl = this.i.annotations; if (!innerColl) { innerColl = new UserAnnotationCollection_internal(); } syncColl._inner = innerColl; syncColl.clear(); this._annotations._setSyncTarget(syncColl); }, enumerable: false, configurable: true }); Object.defineProperty(IgxUserAnnotationLayerComponent.prototype, "isAnnotationLayer", { get: function () { return this.i.ev; }, enumerable: false, configurable: true }); Object.defineProperty(IgxUserAnnotationLayerComponent.prototype, "isUserAnnotationLayer", { get: function () { return this.i.f9; }, enumerable: false, configurable: true }); Object.defineProperty(IgxUserAnnotationLayerComponent.prototype, "isUsableInLegend", { /** * Gets if the series should appear in any legends. */ get: function () { return this.i.isUsableInLegend; }, enumerable: false, configurable: true }); IgxUserAnnotationLayerComponent.prototype.findByName = function (name) { var baseResult = _super.prototype.findByName.call(this, name); if (baseResult) { return baseResult; } if (this.annotations != null && this.annotations.findByName && this.annotations.findByName(name)) { return this.annotations.findByName(name); } return null; }; IgxUserAnnotationLayerComponent.prototype.loadAnnotationsFromJson = function (jsonString) { this.i.y6(jsonString); }; IgxUserAnnotationLayerComponent.prototype.saveAnnotationsToJson = function () { var iv = this.i.yp(); return (iv); }; IgxUserAnnotationLayerComponent.prototype.cancelAnnotationFlow = function (annotationFlowID) { this.i.yw(annotationFlowID); }; IgxUserAnnotationLayerComponent.prototype.finishAnnotationFlow = function (info) { this.i.y4((info == null ? null : info.i)); }; IgxUserAnnotationLayerComponent.prototype.bindAxes = function (axes) { _super.prototype.bindAxes.call(this, axes); if (this.annotations) { for (var i = 0; i < this.annotations.count; i++) { this.annotations[i].bindAxes(axes); } } }; IgxUserAnnotationLayerComponent.prototype.bindSeries = function (series) { _super.prototype.bindSeries.call(this, series); if (this.annotations) { for (var i = 0; i < this.annotations.count; i++) { this.annotations[i].bindSeries(series); } } }; Object.defineProperty(IgxUserAnnotationLayerComponent.prototype, "userAnnotationInformationRequested", { get: function () { var _this = this; if (this._userAnnotationInformationRequested == null) { this._userAnnotationInformationRequested = new EventEmitter(); this.i.userAnnotationInformationRequested = delegateCombine(this.i.userAnnotationInformationRequested, function (o, e) { _this._runInZone(function () { var outerArgs = new IgxUserAnnotationInformationEventArgs(); outerArgs._provideImplementation(e); if (_this.beforeUserAnnotationInformationRequested) { _this.beforeUserAnnotationInformationRequested(_this, outerArgs); } _this._userAnnotationInformationRequested.emit({ sender: _this, args: outerArgs }); }); }); } return this._userAnnotationInformationRequested; }, enumerable: false, configurable: true }); Object.defineProperty(IgxUserAnnotationLayerComponent.prototype, "stylingAxisAnnotation", { /** * Event raised when updating style of UserAxisAnnotation */ get: function () { var _this = this; if (this._stylingAxisAnnotation == null) { this._stylingAxisAnnotation = new EventEmitter(); this.i.stylingAxisAnnotation = delegateCombine(this.i.stylingAxisAnnotation, function (o, e) { _this._runInZone(function () { var outerArgs = new IgxUserAxisAnnotationStylingEventArgs(); outerArgs._provideImplementation(e); if (_this.beforeStylingAxisAnnotation) { _this.beforeStylingAxisAnnotation(_this, outerArgs); } _this._stylingAxisAnnotation.emit({ sender: _this, args: outerArgs }); }); }); } return this._stylingAxisAnnotation; }, enumerable: false, configurable: true }); Object.defineProperty(IgxUserAnnotationLayerComponent.prototype, "stylingSliceAnnotation", { /** * Event raised when updating style of UserSliceAnnotation */ get: function () { var _this = this; if (this._stylingSliceAnnotation == null) { this._stylingSliceAnnotation = new EventEmitter(); this.i.stylingSliceAnnotation = delegateCombine(this.i.stylingSliceAnnotation, function (o, e) { _this._runInZone(function () { var outerArgs = new IgxUserSliceAnnotationStylingEventArgs(); outerArgs._provideImplementation(e); if (_this.beforeStylingSliceAnnotation) { _this.beforeStylingSliceAnnotation(_this, outerArgs); } _this._stylingSliceAnnotation.emit({ sender: _this, args: outerArgs }); }); }); } return this._stylingSliceAnnotation; }, enumerable: false, configurable: true }); Object.defineProperty(IgxUserAnnotationLayerComponent.prototype, "stylingStripAnnotation", { /** * Event raised when updating style of UserStripAnnotation */ get: function () { var _this = this; if (this._stylingStripAnnotation == null) { this._stylingStripAnnotation = new EventEmitter(); this.i.stylingStripAnnotation = delegateCombine(this.i.stylingStripAnnotation, function (o, e) { _this._runInZone(function () { var outerArgs = new IgxUserStripAnnotationStylingEventArgs(); outerArgs._provideImplementation(e); if (_this.beforeStylingStripAnnotation) { _this.beforeStylingStripAnnotation(_this, outerArgs); } _this._stylingStripAnnotation.emit({ sender: _this, args: outerArgs }); }); }); } return this._stylingStripAnnotation; }, enumerable: false, configurable: true }); Object.defineProperty(IgxUserAnnotationLayerComponent.prototype, "stylingPointAnnotation", { /** * Event raised when updating style of UserPointAnnotation */ get: function () { var _this = this; if (this._stylingPointAnnotation == null) { this._stylingPointAnnotation = new EventEmitter(); this.i.stylingPointAnnotation = delegateCombine(this.i.stylingPointAnnotation, function (o, e) { _this._runInZone(function () { var outerArgs = new IgxUserPointAnnotationStylingEventArgs(); outerArgs._provideImplementation(e); if (_this.beforeStylingPointAnnotation) { _this.beforeStylingPointAnnotation(_this, outerArgs); } _this._stylingPointAnnotation.emit({ sender: _this, args: outerArgs }); }); }); } return this._stylingPointAnnotation; }, enumerable: false, configurable: true }); IgxUserAnnotationLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxUserAnnotationLayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); IgxUserAnnotationLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxUserAnnotationLayerComponent, selector: "igx-user-annotation-layer", inputs: { annotations: "annotations" }, outputs: { userAnnotationInformationRequested: "userAnnotationInformationRequested", stylingAxisAnnotation: "stylingAxisAnnotation", stylingSliceAnnotation: "stylingSliceAnnotation", stylingStripAnnotation: "stylingStripAnnotation", stylingPointAnnotation: "stylingPointAnnotation" }, providers: [{ provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxUserAnnotationLayerComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); return IgxUserAnnotationLayerComponent; }(IgxSeriesComponent)); export { IgxUserAnnotationLayerComponent }; i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxUserAnnotationLayerComponent, decorators: [{ type: Component, args: [{ selector: 'igx-user-annotation-layer', template: "", providers: [{ provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxUserAnnotationLayerComponent; }) }], changeDetection: ChangeDetectionStrategy.OnPush }] }], ctorParameters: function () { return []; }, propDecorators: { annotations: [{ type: Input }], userAnnotationInformationRequested: [{ type: Output }], stylingAxisAnnotation: [{ type: Output }], stylingSliceAnnotation: [{ type: Output }], stylingStripAnnotation: [{ type: Output }], stylingPointAnnotation: [{ type: Output }] } });