UNPKG

igniteui-react-core

Version:
140 lines (139 loc) 5.14 kB
import { delegateCombine, delegateRemove } from './type'; import { DataSourceSummaryOperand_$type } from "./DataSourceSummaryOperand"; import { IgrProvideCalculatorEventArgs } from "./igr-provide-calculator-event-args"; import { DataSourceSummaryDescription as DataSourceSummaryDescription_internal } from "./DataSourceSummaryDescription"; import { ensureEnum } from "./componentUtil"; var IgrDataSourceSummaryDescription = /** @class */ /*@__PURE__*/ (function () { function IgrDataSourceSummaryDescription() { this.mounted = false; this._provideCalculator = null; this._provideCalculator_wrapped = null; this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } } IgrDataSourceSummaryDescription.prototype.createImplementation = function () { return new DataSourceSummaryDescription_internal(0); }; Object.defineProperty(IgrDataSourceSummaryDescription.prototype, "nativeElement", { get: function () { return this._implementation.nativeElement; }, enumerable: false, configurable: true }); Object.defineProperty(IgrDataSourceSummaryDescription.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgrDataSourceSummaryDescription.prototype.onImplementationCreated = function () { }; IgrDataSourceSummaryDescription.prototype._provideImplementation = function (i) { this._implementation = i; this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } }; Object.defineProperty(IgrDataSourceSummaryDescription.prototype, "field", { get: function () { return this.i.p; }, set: function (v) { this.i.p = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrDataSourceSummaryDescription.prototype, "operand", { get: function () { return this.i.c; }, set: function (v) { this.i.c = ensureEnum(DataSourceSummaryOperand_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrDataSourceSummaryDescription.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(IgrDataSourceSummaryDescription.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 }); IgrDataSourceSummaryDescription.prototype.findByName = function (name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } return null; }; IgrDataSourceSummaryDescription.prototype.equals = function (other) { var iv = this.i.equals(other); return (iv); }; Object.defineProperty(IgrDataSourceSummaryDescription.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 IgrProvideCalculatorEventArgs(); 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 IgrDataSourceSummaryDescription; }()); export { IgrDataSourceSummaryDescription };