UNPKG

igniteui-webcomponents-charts

Version:

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

181 lines (178 loc) 7.23 kB
import { delegateCombine, delegateRemove } from "igniteui-webcomponents-core"; import { IgcSeriesComponent } from "./igc-series-component"; import { IgcUserAnnotationToolTipContentUpdatingEventArgs } from "./igc-user-annotation-tool-tip-content-updating-event-args"; import { IgcAnnotationLayerComponent } from "./igc-annotation-layer-component"; import { UserAnnotationToolTipLayer } from "./UserAnnotationToolTipLayer"; import { getAllPropertyNames, toSpinal, ensureBool } from "igniteui-webcomponents-core"; import { RegisterElementHelper } from "igniteui-webcomponents-core"; let IgcUserAnnotationToolTipLayerComponent = /*@__PURE__*/ (() => { class IgcUserAnnotationToolTipLayerComponent extends IgcAnnotationLayerComponent { createImplementation() { return new UserAnnotationToolTipLayer(); } /** * @hidden */ get i() { return this._implementation; } constructor() { super(); this._contentUpdating = null; this._contentUpdating_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 (IgcUserAnnotationToolTipLayerComponent._observedAttributesIgcUserAnnotationToolTipLayerComponent == null) { let names = getAllPropertyNames(IgcUserAnnotationToolTipLayerComponent); for (let i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcUserAnnotationToolTipLayerComponent._observedAttributesIgcUserAnnotationToolTipLayerComponent = names; } return IgcUserAnnotationToolTipLayerComponent._observedAttributesIgcUserAnnotationToolTipLayerComponent; } static register() { if (!IgcUserAnnotationToolTipLayerComponent._isElementRegistered) { IgcUserAnnotationToolTipLayerComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcUserAnnotationToolTipLayerComponent.htmlTagName, IgcUserAnnotationToolTipLayerComponent); } } /** * Gets whether the series is an annotation layer displayed only when hovering over the chart. */ get isAnnotationHoverLayer() { return this.i.eu; } /** * Gets or sets the name of the series series to target this annotation to. If null, this annotation targets all series simultaneously. */ get targetSeriesName() { return this.i.abh; } set targetSeriesName(v) { this.i.abh = v; } /** * Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously. */ get targetSeries() { const r = this.i.aa2; if (r == null) { return null; } if (!r.externalObject) { let e = IgcSeriesComponent._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; } set targetSeries(v) { if (v != null && this._stylingContainer && v._styling) v._styling(this._stylingContainer, this, this); v == null ? this.i.aa2 = null : this.i.aa2 = v.i; } /** * Gets or sets whether to skip past unknown values when searching for series values. */ get skipUnknownValues() { return this.i.abc; } set skipUnknownValues(v) { this.i.abc = ensureBool(v); this._a("skipUnknownValues", this.i.abc); } get isUserAnnotationToolTipLayer() { return this.i.ga; } get isToolTipLayer() { return this.i.f7; } findByName(name) { var baseResult = super.findByName(name); if (baseResult) { return baseResult; } if (this.targetSeries && this.targetSeries.name && this.targetSeries.name == name) { return this.targetSeries; } return null; } _styling(container, component, parent) { super._styling(container, component, parent); this._inStyling = true; if (this.targetSeries && this.targetSeries._styling) { this.targetSeries._styling(container, component, this); } this._inStyling = false; } /** * Hides any tooltips presented by the layer, if any. */ hideToolTips() { this.i.ql(); } /** * Hides any tooltips presented by the layer, if any. */ hideToolTipsImmediate() { this.i.qm(); } /** * Called when the content is being created or updated. */ get contentUpdating() { return this._contentUpdating; } set contentUpdating(ev) { if (this._contentUpdating_wrapped !== null) { this.i.contentUpdating = delegateRemove(this.i.contentUpdating, this._contentUpdating_wrapped); this._contentUpdating_wrapped = null; this._contentUpdating = null; } this._contentUpdating = ev; this._contentUpdating_wrapped = (o, e) => { let outerArgs = new IgcUserAnnotationToolTipContentUpdatingEventArgs(); outerArgs._provideImplementation(e); if (this.beforeContentUpdating) { this.beforeContentUpdating(this, outerArgs); } if (this._contentUpdating) { this._contentUpdating(this, outerArgs); } }; this.i.contentUpdating = delegateCombine(this.i.contentUpdating, this._contentUpdating_wrapped); ; } } IgcUserAnnotationToolTipLayerComponent._observedAttributesIgcUserAnnotationToolTipLayerComponent = null; IgcUserAnnotationToolTipLayerComponent.htmlTagName = "igc-user-annotation-tool-tip-layer"; IgcUserAnnotationToolTipLayerComponent._isElementRegistered = false; return IgcUserAnnotationToolTipLayerComponent; })(); export { IgcUserAnnotationToolTipLayerComponent };