igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
107 lines (106 loc) • 4.53 kB
JavaScript
import { IgcStrategyBasedIndicatorComponent } from './igc-strategy-based-indicator-component';
import { CustomIndicator } from "./CustomIndicator";
import { IgcFinancialEventArgs } from "./igc-financial-event-args";
import { delegateCombine, delegateRemove } from "igniteui-webcomponents-core";
import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
export let IgcCustomIndicatorComponent = /*@__PURE__*/ (() => {
class IgcCustomIndicatorComponent extends IgcStrategyBasedIndicatorComponent {
createImplementation() {
return new CustomIndicator();
}
get i() {
return this._implementation;
}
constructor() {
super();
this._indicator = null;
this._indicator_wrapped = null;
this._basedOnColumns = null;
this._basedOnColumns_wrapped = null;
}
/**
* Event raised when the indicator values need to be computed.
*/
get indicator() {
return this._indicator;
}
set indicator(ev) {
if (this._indicator !== null) {
this.i.indicator = delegateRemove(this.i.indicator, this._indicator_wrapped);
this._indicator_wrapped = null;
this._indicator = null;
}
this._indicator = ev;
this._indicator_wrapped = (o, e) => {
let outerArgs = new IgcFinancialEventArgs();
outerArgs._provideImplementation(e);
this._indicator(this, outerArgs);
};
this.i.indicator = delegateCombine(this.i.indicator, this._indicator_wrapped);
}
/**
* Event raised when the basedOnColumns values need to be computed.
*/
get basedOnColumns() {
return this._basedOnColumns;
}
set basedOnColumns(ev) {
if (this._basedOnColumns !== null) {
this.i.basedOnColumns = delegateRemove(this.i.basedOnColumns, this._basedOnColumns_wrapped);
this._basedOnColumns_wrapped = null;
this._basedOnColumns = null;
}
this._basedOnColumns = ev;
this._basedOnColumns_wrapped = (o, e) => {
let outerArgs = new IgcFinancialEventArgs();
outerArgs._provideImplementation(e);
this._basedOnColumns(this, outerArgs);
};
this.i.basedOnColumns = delegateCombine(this.i.basedOnColumns, this._basedOnColumns_wrapped);
}
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 (IgcCustomIndicatorComponent._observedAttributesIgcCustomIndicatorComponent == null) {
let names = getAllPropertyNames(IgcCustomIndicatorComponent);
for (let i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcCustomIndicatorComponent._observedAttributesIgcCustomIndicatorComponent = names;
}
return IgcCustomIndicatorComponent._observedAttributesIgcCustomIndicatorComponent;
}
static register() {
if (!IgcCustomIndicatorComponent._isElementRegistered) {
IgcCustomIndicatorComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcCustomIndicatorComponent.htmlTagName, IgcCustomIndicatorComponent);
}
}
}
IgcCustomIndicatorComponent._observedAttributesIgcCustomIndicatorComponent = null;
IgcCustomIndicatorComponent.htmlTagName = "igc-custom-indicator";
IgcCustomIndicatorComponent._isElementRegistered = false;
return IgcCustomIndicatorComponent;
})();