UNPKG

igniteui-webcomponents-charts

Version:

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

135 lines (134 loc) 4.97 kB
import { delegateCombine, delegateRemove } from "igniteui-webcomponents-core"; import { DataSourceSummaryOperand_$type } from "igniteui-webcomponents-core"; import { IgcProvideCalculatorEventArgs } from "igniteui-webcomponents-core"; import { ChartSummaryDescription as ChartSummaryDescription_internal } from "./ChartSummaryDescription"; import { ensureEnum } from "igniteui-webcomponents-core"; /** * Represents a summary that is applied to a datasource. Changes to this object are not observed or expected after it is initially assigned to a collection. */ var IgcChartSummaryDescription = /** @class */ /*@__PURE__*/ (function () { function IgcChartSummaryDescription() { this._provideCalculator = null; this._provideCalculator_wrapped = null; this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } } IgcChartSummaryDescription.prototype.createImplementation = function () { return new ChartSummaryDescription_internal(0); }; Object.defineProperty(IgcChartSummaryDescription.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgcChartSummaryDescription.prototype.onImplementationCreated = function () { }; IgcChartSummaryDescription.prototype._provideImplementation = function (i) { this._implementation = i; this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } }; Object.defineProperty(IgcChartSummaryDescription.prototype, "field", { get: function () { return this.i.p; }, set: function (v) { this.i.p = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcChartSummaryDescription.prototype, "operand", { get: function () { return this.i.c; }, set: function (v) { this.i.c = ensureEnum(DataSourceSummaryOperand_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgcChartSummaryDescription.prototype, "alias", { /** * Gets or sets an alias for the summary. Currently only used in aggregated data situations. */ get: function () { return this.i.n; }, set: function (v) { this.i.n = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcChartSummaryDescription.prototype, "calculatorDisplayName", { /** * Gets or sets the name to use when displaying the calculator name. */ get: function () { return this.i.o; }, set: function (v) { this.i.o = v; }, enumerable: false, configurable: true }); IgcChartSummaryDescription.prototype.findByName = function (name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } return null; }; IgcChartSummaryDescription.prototype.equals = function (other) { var iv = this.i.equals(other); return (iv); }; Object.defineProperty(IgcChartSummaryDescription.prototype, "provideCalculator", { /** * Called when the summary calculator is required. */ get: function () { return this._provideCalculator; }, set: function (ev) { var _this = this; if (this._provideCalculator_wrapped !== null) { this.i.provideCalculator = delegateRemove(this.i.provideCalculator, this._provideCalculator_wrapped); this._provideCalculator_wrapped = null; this._provideCalculator = null; } this._provideCalculator = ev; this._provideCalculator_wrapped = function (o, e) { var outerArgs = new IgcProvideCalculatorEventArgs(); outerArgs._provideImplementation(e); if (_this.beforeProvideCalculator) { _this.beforeProvideCalculator(_this, outerArgs); } if (_this._provideCalculator) { _this._provideCalculator(_this, outerArgs); } }; this.i.provideCalculator = delegateCombine(this.i.provideCalculator, this._provideCalculator_wrapped); ; }, enumerable: false, configurable: true }); return IgcChartSummaryDescription; }()); export { IgcChartSummaryDescription };