igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
127 lines (126 loc) • 5.43 kB
JavaScript
import { __extends } from "tslib";
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";
var IgcCustomIndicatorComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcCustomIndicatorComponent, _super);
function IgcCustomIndicatorComponent() {
var _this = _super.call(this) || this;
_this._indicator = null;
_this._indicator_wrapped = null;
_this._basedOnColumns = null;
_this._basedOnColumns_wrapped = null;
return _this;
}
IgcCustomIndicatorComponent.prototype.createImplementation = function () {
return new CustomIndicator();
};
Object.defineProperty(IgcCustomIndicatorComponent.prototype, "i", {
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcCustomIndicatorComponent.prototype, "indicator", {
/**
* Event raised when the indicator values need to be computed.
*/
get: function () {
return this._indicator;
},
set: function (ev) {
var _this = this;
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 = function (o, e) {
var outerArgs = new IgcFinancialEventArgs();
outerArgs._provideImplementation(e);
_this._indicator(_this, outerArgs);
};
this.i.indicator = delegateCombine(this.i.indicator, this._indicator_wrapped);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcCustomIndicatorComponent.prototype, "basedOnColumns", {
/**
* Event raised when the basedOnColumns values need to be computed.
*/
get: function () {
return this._basedOnColumns;
},
set: function (ev) {
var _this = this;
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 = function (o, e) {
var outerArgs = new IgcFinancialEventArgs();
outerArgs._provideImplementation(e);
_this._basedOnColumns(_this, outerArgs);
};
this.i.basedOnColumns = delegateCombine(this.i.basedOnColumns, this._basedOnColumns_wrapped);
},
enumerable: false,
configurable: true
});
IgcCustomIndicatorComponent.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();
}
};
IgcCustomIndicatorComponent.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(IgcCustomIndicatorComponent, "observedAttributes", {
get: function () {
if (IgcCustomIndicatorComponent._observedAttributesIgcCustomIndicatorComponent == null) {
var names = getAllPropertyNames(IgcCustomIndicatorComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcCustomIndicatorComponent._observedAttributesIgcCustomIndicatorComponent = names;
}
return IgcCustomIndicatorComponent._observedAttributesIgcCustomIndicatorComponent;
},
enumerable: false,
configurable: true
});
IgcCustomIndicatorComponent.register = function () {
if (!IgcCustomIndicatorComponent._isElementRegistered) {
IgcCustomIndicatorComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcCustomIndicatorComponent.htmlTagName, IgcCustomIndicatorComponent);
}
};
IgcCustomIndicatorComponent._observedAttributesIgcCustomIndicatorComponent = null;
IgcCustomIndicatorComponent.htmlTagName = "igc-custom-indicator";
IgcCustomIndicatorComponent._isElementRegistered = false;
return IgcCustomIndicatorComponent;
}(IgcStrategyBasedIndicatorComponent));
export { IgcCustomIndicatorComponent };