UNPKG

igniteui-webcomponents-charts

Version:

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

221 lines (218 loc) 9.14 kB
import { __extends } from "tslib"; 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"; /** * Represents an annotation layer that displays tooltips for all target series individually. */ export var IgcUserAnnotationToolTipLayerComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgcUserAnnotationToolTipLayerComponent, _super); function IgcUserAnnotationToolTipLayerComponent() { var _this = _super.call(this) || this; _this._contentUpdating = null; _this._contentUpdating_wrapped = null; return _this; } IgcUserAnnotationToolTipLayerComponent.prototype.createImplementation = function () { return new UserAnnotationToolTipLayer(); }; Object.defineProperty(IgcUserAnnotationToolTipLayerComponent.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgcUserAnnotationToolTipLayerComponent.prototype.connectedCallback = function () { if (_super.prototype["connectedCallback"]) { _super.prototype["connectedCallback"].call(this); } if (this.i.connectedCallback) { this.i.connectedCallback(); } if (!this._attached) { this._attached = true; this._flushQueuedAttributes(); } }; IgcUserAnnotationToolTipLayerComponent.prototype.disconnectedCallback = function () { if (_super.prototype["disconnectedCallback"]) { _super.prototype["disconnectedCallback"].call(this); } if (this.i.disconnectedCallback) { this.i.disconnectedCallback(); } if (this._attached) { this._attached = false; } }; Object.defineProperty(IgcUserAnnotationToolTipLayerComponent, "observedAttributes", { get: function () { if (IgcUserAnnotationToolTipLayerComponent._observedAttributesIgcUserAnnotationToolTipLayerComponent == null) { var names = getAllPropertyNames(IgcUserAnnotationToolTipLayerComponent); for (var i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcUserAnnotationToolTipLayerComponent._observedAttributesIgcUserAnnotationToolTipLayerComponent = names; } return IgcUserAnnotationToolTipLayerComponent._observedAttributesIgcUserAnnotationToolTipLayerComponent; }, enumerable: false, configurable: true }); IgcUserAnnotationToolTipLayerComponent.register = function () { if (!IgcUserAnnotationToolTipLayerComponent._isElementRegistered) { IgcUserAnnotationToolTipLayerComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcUserAnnotationToolTipLayerComponent.htmlTagName, IgcUserAnnotationToolTipLayerComponent); } }; Object.defineProperty(IgcUserAnnotationToolTipLayerComponent.prototype, "isAnnotationHoverLayer", { /** * Gets whether the series is an annotation layer displayed only when hovering over the chart. */ get: function () { return this.i.eu; }, enumerable: false, configurable: true }); Object.defineProperty(IgcUserAnnotationToolTipLayerComponent.prototype, "targetSeriesName", { /** * Gets or sets the name of the series series to target this annotation to. If null, this annotation targets all series simultaneously. */ get: function () { return this.i.abh; }, set: function (v) { this.i.abh = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcUserAnnotationToolTipLayerComponent.prototype, "targetSeries", { /** * Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously. */ get: function () { var r = this.i.aa2; if (r == null) { return null; } if (!r.externalObject) { var e = IgcSeriesComponent._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; }, set: function (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; }, enumerable: false, configurable: true }); Object.defineProperty(IgcUserAnnotationToolTipLayerComponent.prototype, "skipUnknownValues", { /** * Gets or sets whether to skip past unknown values when searching for series values. */ get: function () { return this.i.abc; }, set: function (v) { this.i.abc = ensureBool(v); this._a("skipUnknownValues", this.i.abc); }, enumerable: false, configurable: true }); Object.defineProperty(IgcUserAnnotationToolTipLayerComponent.prototype, "isUserAnnotationToolTipLayer", { get: function () { return this.i.ga; }, enumerable: false, configurable: true }); Object.defineProperty(IgcUserAnnotationToolTipLayerComponent.prototype, "isToolTipLayer", { get: function () { return this.i.f7; }, enumerable: false, configurable: true }); IgcUserAnnotationToolTipLayerComponent.prototype.findByName = function (name) { var baseResult = _super.prototype.findByName.call(this, name); if (baseResult) { return baseResult; } if (this.targetSeries && this.targetSeries.name && this.targetSeries.name == name) { return this.targetSeries; } return null; }; IgcUserAnnotationToolTipLayerComponent.prototype._styling = function (container, component, parent) { _super.prototype._styling.call(this, 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. */ IgcUserAnnotationToolTipLayerComponent.prototype.hideToolTips = function () { this.i.ql(); }; /** * Hides any tooltips presented by the layer, if any. */ IgcUserAnnotationToolTipLayerComponent.prototype.hideToolTipsImmediate = function () { this.i.qm(); }; Object.defineProperty(IgcUserAnnotationToolTipLayerComponent.prototype, "contentUpdating", { /** * Called when the content is being created or updated. */ get: function () { return this._contentUpdating; }, set: function (ev) { var _this = this; 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 = function (o, e) { var 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); ; }, enumerable: false, configurable: true }); IgcUserAnnotationToolTipLayerComponent._observedAttributesIgcUserAnnotationToolTipLayerComponent = null; IgcUserAnnotationToolTipLayerComponent.htmlTagName = "igc-user-annotation-tool-tip-layer"; IgcUserAnnotationToolTipLayerComponent._isElementRegistered = false; return IgcUserAnnotationToolTipLayerComponent; }(IgcAnnotationLayerComponent));