igniteui-react-grids
Version:
Ignite UI React grid components.
120 lines (119 loc) • 3.8 kB
JavaScript
import { PivotAggregationType_$type } from "./PivotAggregationType";
import { PivotAggregator as PivotAggregator_internal } from "./PivotAggregator";
import { ensureEnum } from "igniteui-react-core";
/**
* Interface describing a IPivotAggregator class.
* Used for specifying custom aggregator lists.
*/
var IgrPivotAggregator = /** @class */ /*@__PURE__*/ (function () {
function IgrPivotAggregator() {
this.mounted = false;
this._implementation = this.createImplementation();
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
}
IgrPivotAggregator.prototype.createImplementation = function () {
var impl = new PivotAggregator_internal();
if (impl.setNativeElement) {
impl.setNativeElement({});
}
return impl;
};
Object.defineProperty(IgrPivotAggregator.prototype, "nativeElement", {
get: function () {
return this._implementation.nativeElement;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPivotAggregator.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgrPivotAggregator.prototype.onImplementationCreated = function () {
};
IgrPivotAggregator.prototype._provideImplementation = function (i) {
this._implementation = i;
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
};
Object.defineProperty(IgrPivotAggregator.prototype, "key", {
/**
* Aggregation unique key.
*/
get: function () {
return this.i.g;
},
set: function (v) {
this.i.g = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPivotAggregator.prototype, "label", {
/**
* Aggregation label to show in the UI.
*/
get: function () {
return this.i.h;
},
set: function (v) {
this.i.h = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPivotAggregator.prototype, "aggregatorName", {
/**
* Aggregation name that will be used from a list of predefined aggregations.
* If not set will use the specified aggregator function.
*/
get: function () {
return this.i.b;
},
set: function (v) {
this.i.b = ensureEnum(PivotAggregationType_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPivotAggregator.prototype, "aggregator", {
/**
* Aggregator function can be a custom implementation of `PivotAggregation`, or
* use predefined ones from `IgxPivotAggregate` and its variants.
*/
get: function () {
return this.i.a;
},
set: function (v) {
this.i.a = v;
},
enumerable: false,
configurable: true
});
IgrPivotAggregator.prototype.findByName = function (name) {
if (this.findEphemera) {
if (name && name.indexOf("@@e:") == 0) {
return this.findEphemera(name);
}
}
return null;
};
IgrPivotAggregator.prototype.setNativeElement = function (element) {
this.i.setNativeElement(element);
};
return IgrPivotAggregator;
}());
export { IgrPivotAggregator };