UNPKG

igniteui-webcomponents-charts

Version:

Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.

300 lines (299 loc) 13.9 kB
/* 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 { delegateCombine, delegateRemove } from "igniteui-webcomponents-core"; import { IgcSeriesComponent } from "./igc-series-component"; import { IgcUserAnnotationCollection } from "./igc-user-annotation-collection"; import { IgcUserAnnotationInformationEventArgs } from "./igc-user-annotation-information-event-args"; import { IgcUserAxisAnnotationStylingEventArgs } from "./igc-user-axis-annotation-styling-event-args"; import { IgcUserSliceAnnotationStylingEventArgs } from "./igc-user-slice-annotation-styling-event-args"; import { IgcUserStripAnnotationStylingEventArgs } from "./igc-user-strip-annotation-styling-event-args"; import { IgcUserPointAnnotationStylingEventArgs } from "./igc-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-webcomponents-core"; import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core"; import { RegisterElementHelper } from "igniteui-webcomponents-core"; let IgcUserAnnotationLayerComponent = /*@__PURE__*/ (() => { class IgcUserAnnotationLayerComponent extends IgcSeriesComponent { createImplementation() { return new UserAnnotationLayer(); } constructor() { super(); this._annotations = null; this._userAnnotationInformationRequested = null; this._userAnnotationInformationRequested_wrapped = null; this._stylingAxisAnnotation = null; this._stylingAxisAnnotation_wrapped = null; this._stylingSliceAnnotation = null; this._stylingSliceAnnotation_wrapped = null; this._stylingStripAnnotation = null; this._stylingStripAnnotation_wrapped = null; this._stylingPointAnnotation = null; this._stylingPointAnnotation_wrapped = null; } connectedCallback() { if (super["connectedCallback"]) { super["connectedCallback"](); } if (this.i.connectedCallback) { this.i.connectedCallback(); } if (!this._attached) { this._attached = true; this._flushQueuedAttributes(); } } disconnectedCallback() { if (super["disconnectedCallback"]) { super["disconnectedCallback"](); } if (this.i.disconnectedCallback) { this.i.disconnectedCallback(); } if (this._attached) { this._attached = false; } } static get observedAttributes() { if (IgcUserAnnotationLayerComponent._observedAttributesIgcUserAnnotationLayerComponent == null) { let names = getAllPropertyNames(IgcUserAnnotationLayerComponent); for (let i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcUserAnnotationLayerComponent._observedAttributesIgcUserAnnotationLayerComponent = names; } return IgcUserAnnotationLayerComponent._observedAttributesIgcUserAnnotationLayerComponent; } static register() { if (!IgcUserAnnotationLayerComponent._isElementRegistered) { IgcUserAnnotationLayerComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcUserAnnotationLayerComponent.htmlTagName, IgcUserAnnotationLayerComponent); } } /** * @hidden */ get i() { return this._implementation; } /** * Gets user annotations */ get annotations() { if (this._annotations === null) { let coll = new IgcUserAnnotationCollection(); let innerColl = this.i.annotations; if (!innerColl) { innerColl = new UserAnnotationCollection_internal(); } this._annotations = coll._fromInner(innerColl); } return this._annotations; } set annotations(v) { if (this._annotations !== null) { this._annotations._setSyncTarget(null); this._annotations = null; } let coll = new IgcUserAnnotationCollection(); this._annotations = coll._fromOuter(v); let syncColl = new SyncableObservableCollection$1(UserBaseAnnotation.$type); let innerColl = this.i.annotations; if (!innerColl) { innerColl = new UserAnnotationCollection_internal(); } syncColl._inner = innerColl; syncColl.clear(); this._annotations._setSyncTarget(syncColl); } get isAnnotationLayer() { return this.i.ev; } get isUserAnnotationLayer() { return this.i.f9; } /** * Gets if the series should appear in any legends. */ get isUsableInLegend() { return this.i.isUsableInLegend; } findByName(name) { var baseResult = super.findByName(name); if (baseResult) { return baseResult; } if (this.annotations != null && this.annotations.findByName && this.annotations.findByName(name)) { return this.annotations.findByName(name); } return null; } loadAnnotationsFromJson(jsonString) { this.i.y6(jsonString); } saveAnnotationsToJson() { let iv = this.i.yp(); return (iv); } cancelAnnotationFlow(annotationFlowID) { this.i.yw(annotationFlowID); } finishAnnotationFlow(info) { this.i.y4((info == null ? null : info.i)); } bindAxes(axes) { super.bindAxes(axes); if (this.annotations) { for (var i = 0; i < this.annotations.count; i++) { this.annotations[i].bindAxes(axes); } } } bindSeries(series) { super.bindSeries(series); if (this.annotations) { for (var i = 0; i < this.annotations.count; i++) { this.annotations[i].bindSeries(series); } } } get userAnnotationInformationRequested() { return this._userAnnotationInformationRequested; } set userAnnotationInformationRequested(ev) { if (this._userAnnotationInformationRequested_wrapped !== null) { this.i.userAnnotationInformationRequested = delegateRemove(this.i.userAnnotationInformationRequested, this._userAnnotationInformationRequested_wrapped); this._userAnnotationInformationRequested_wrapped = null; this._userAnnotationInformationRequested = null; } this._userAnnotationInformationRequested = ev; this._userAnnotationInformationRequested_wrapped = (o, e) => { let outerArgs = new IgcUserAnnotationInformationEventArgs(); outerArgs._provideImplementation(e); if (this.beforeUserAnnotationInformationRequested) { this.beforeUserAnnotationInformationRequested(this, outerArgs); } if (this._userAnnotationInformationRequested) { this._userAnnotationInformationRequested(this, outerArgs); } }; this.i.userAnnotationInformationRequested = delegateCombine(this.i.userAnnotationInformationRequested, this._userAnnotationInformationRequested_wrapped); ; } /** * Event raised when updating style of UserAxisAnnotation */ get stylingAxisAnnotation() { return this._stylingAxisAnnotation; } set stylingAxisAnnotation(ev) { if (this._stylingAxisAnnotation_wrapped !== null) { this.i.stylingAxisAnnotation = delegateRemove(this.i.stylingAxisAnnotation, this._stylingAxisAnnotation_wrapped); this._stylingAxisAnnotation_wrapped = null; this._stylingAxisAnnotation = null; } this._stylingAxisAnnotation = ev; this._stylingAxisAnnotation_wrapped = (o, e) => { let outerArgs = new IgcUserAxisAnnotationStylingEventArgs(); outerArgs._provideImplementation(e); if (this.beforeStylingAxisAnnotation) { this.beforeStylingAxisAnnotation(this, outerArgs); } if (this._stylingAxisAnnotation) { this._stylingAxisAnnotation(this, outerArgs); } }; this.i.stylingAxisAnnotation = delegateCombine(this.i.stylingAxisAnnotation, this._stylingAxisAnnotation_wrapped); ; } /** * Event raised when updating style of UserSliceAnnotation */ get stylingSliceAnnotation() { return this._stylingSliceAnnotation; } set stylingSliceAnnotation(ev) { if (this._stylingSliceAnnotation_wrapped !== null) { this.i.stylingSliceAnnotation = delegateRemove(this.i.stylingSliceAnnotation, this._stylingSliceAnnotation_wrapped); this._stylingSliceAnnotation_wrapped = null; this._stylingSliceAnnotation = null; } this._stylingSliceAnnotation = ev; this._stylingSliceAnnotation_wrapped = (o, e) => { let outerArgs = new IgcUserSliceAnnotationStylingEventArgs(); outerArgs._provideImplementation(e); if (this.beforeStylingSliceAnnotation) { this.beforeStylingSliceAnnotation(this, outerArgs); } if (this._stylingSliceAnnotation) { this._stylingSliceAnnotation(this, outerArgs); } }; this.i.stylingSliceAnnotation = delegateCombine(this.i.stylingSliceAnnotation, this._stylingSliceAnnotation_wrapped); ; } /** * Event raised when updating style of UserStripAnnotation */ get stylingStripAnnotation() { return this._stylingStripAnnotation; } set stylingStripAnnotation(ev) { if (this._stylingStripAnnotation_wrapped !== null) { this.i.stylingStripAnnotation = delegateRemove(this.i.stylingStripAnnotation, this._stylingStripAnnotation_wrapped); this._stylingStripAnnotation_wrapped = null; this._stylingStripAnnotation = null; } this._stylingStripAnnotation = ev; this._stylingStripAnnotation_wrapped = (o, e) => { let outerArgs = new IgcUserStripAnnotationStylingEventArgs(); outerArgs._provideImplementation(e); if (this.beforeStylingStripAnnotation) { this.beforeStylingStripAnnotation(this, outerArgs); } if (this._stylingStripAnnotation) { this._stylingStripAnnotation(this, outerArgs); } }; this.i.stylingStripAnnotation = delegateCombine(this.i.stylingStripAnnotation, this._stylingStripAnnotation_wrapped); ; } /** * Event raised when updating style of UserPointAnnotation */ get stylingPointAnnotation() { return this._stylingPointAnnotation; } set stylingPointAnnotation(ev) { if (this._stylingPointAnnotation_wrapped !== null) { this.i.stylingPointAnnotation = delegateRemove(this.i.stylingPointAnnotation, this._stylingPointAnnotation_wrapped); this._stylingPointAnnotation_wrapped = null; this._stylingPointAnnotation = null; } this._stylingPointAnnotation = ev; this._stylingPointAnnotation_wrapped = (o, e) => { let outerArgs = new IgcUserPointAnnotationStylingEventArgs(); outerArgs._provideImplementation(e); if (this.beforeStylingPointAnnotation) { this.beforeStylingPointAnnotation(this, outerArgs); } if (this._stylingPointAnnotation) { this._stylingPointAnnotation(this, outerArgs); } }; this.i.stylingPointAnnotation = delegateCombine(this.i.stylingPointAnnotation, this._stylingPointAnnotation_wrapped); ; } } IgcUserAnnotationLayerComponent._observedAttributesIgcUserAnnotationLayerComponent = null; IgcUserAnnotationLayerComponent.htmlTagName = "igc-user-annotation-layer"; IgcUserAnnotationLayerComponent._isElementRegistered = false; return IgcUserAnnotationLayerComponent; })(); export { IgcUserAnnotationLayerComponent };