UNPKG

igniteui-webcomponents-charts

Version:

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

65 lines (64 loc) 2.8 kB
import { IgcFinancialIndicatorComponent } from "./igc-financial-indicator-component"; import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core"; /** * A base class for indicator series with simple calculations that separates the calculation * responsibility from the other responsibilities of the financial series, this enables * easier unit testing and decoupling of individual calculation strategies. * A contract is defined between the financial series and these simple indicator calculations * detailing the data which the series agrees to provide the simple indicator calculations, * this contract is defined by * FinancialCalculationDataSource. If more * complex interactions are needed between the indicator calculation and the series, the * indicators should instead derive from * FinancialIndicator directly, or some * derivative other than * StrategyBasedIndicator */ export let IgcStrategyBasedIndicatorComponent = /*@__PURE__*/ (() => { class IgcStrategyBasedIndicatorComponent extends IgcFinancialIndicatorComponent { /** * @hidden */ get i() { return this._implementation; } constructor() { super(); } 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 (IgcStrategyBasedIndicatorComponent._observedAttributesIgcStrategyBasedIndicatorComponent == null) { let names = getAllPropertyNames(IgcStrategyBasedIndicatorComponent); for (let i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcStrategyBasedIndicatorComponent._observedAttributesIgcStrategyBasedIndicatorComponent = names; } return IgcStrategyBasedIndicatorComponent._observedAttributesIgcStrategyBasedIndicatorComponent; } } IgcStrategyBasedIndicatorComponent._observedAttributesIgcStrategyBasedIndicatorComponent = null; return IgcStrategyBasedIndicatorComponent; })();