UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

109 lines (108 loc) 3.73 kB
import { PivotDimensionType_$type } from "./PivotDimensionType"; import { DimensionsChangeDetail as DimensionsChangeDetail_internal } from "./DimensionsChangeDetail"; import { ensureEnum } from "igniteui-react-core"; import { IgrPivotDimension } from "./igr-pivot-dimension"; /** * Event emitted when dimension collection for rows, columns of filters is changed. */ var IgrDimensionsChangeDetail = /** @class */ /*@__PURE__*/ (function () { function IgrDimensionsChangeDetail() { this.mounted = false; this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } } IgrDimensionsChangeDetail.prototype.createImplementation = function () { return new DimensionsChangeDetail_internal(); }; Object.defineProperty(IgrDimensionsChangeDetail.prototype, "nativeElement", { get: function () { return this._implementation.nativeElement; }, enumerable: false, configurable: true }); Object.defineProperty(IgrDimensionsChangeDetail.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgrDimensionsChangeDetail.prototype.onImplementationCreated = function () { }; IgrDimensionsChangeDetail.prototype._provideImplementation = function (i) { this._implementation = i; this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } }; Object.defineProperty(IgrDimensionsChangeDetail.prototype, "dimensions", { /** * The new list of dimensions. */ get: function () { if (!this.i.a) { return undefined; } var ret = []; for (var i = 0; i < this.i.a.length; i++) { var impl = this.i.a[i]; if (!impl.externalObject) { if (impl instanceof IgrPivotDimension) { ret.push(impl); continue; } var e = new IgrPivotDimension(); e._implementation = impl; impl.externalObject = e; } ret.push(impl.externalObject); } return ret; }, set: function (v) { var arr = []; for (var i = 0; i < v.length; i++) { arr.push(v[i].i); } this.i.a = arr; }, enumerable: false, configurable: true }); Object.defineProperty(IgrDimensionsChangeDetail.prototype, "dimensionCollectionType", { /** * The dimension list type - Row, Column or Filter. */ get: function () { return this.i.b; }, set: function (v) { this.i.b = ensureEnum(PivotDimensionType_$type, v); }, enumerable: false, configurable: true }); IgrDimensionsChangeDetail.prototype.findByName = function (name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } return null; }; IgrDimensionsChangeDetail.prototype.setNativeElement = function (element) { this.i.setNativeElement(element); }; return IgrDimensionsChangeDetail; }()); export { IgrDimensionsChangeDetail };