UNPKG

igniteui-react-core

Version:
86 lines (85 loc) 3.02 kB
import { GridLayoutSizeType_$type } from "./GridLayoutSizeType"; import { GridLayoutSizeDefinition as GridLayoutSizeDefinition_internal } from "./GridLayoutSizeDefinition"; import { ensureEnum } from "./componentUtil"; /** * Represents a size ruleset for rows and columns in the grid view. */ var IgrGridLayoutSizeDefinition = /** @class */ /*@__PURE__*/ (function () { function IgrGridLayoutSizeDefinition() { this.mounted = false; this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } } IgrGridLayoutSizeDefinition.prototype.createImplementation = function () { return new GridLayoutSizeDefinition_internal(0); }; Object.defineProperty(IgrGridLayoutSizeDefinition.prototype, "nativeElement", { get: function () { return this._implementation.nativeElement; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridLayoutSizeDefinition.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgrGridLayoutSizeDefinition.prototype.onImplementationCreated = function () { }; IgrGridLayoutSizeDefinition.prototype._provideImplementation = function (i) { this._implementation = i; this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } }; Object.defineProperty(IgrGridLayoutSizeDefinition.prototype, "sizeType", { /** * Gets or sets the size type for the definition. */ get: function () { return this.i.a; }, set: function (v) { this.i.a = ensureEnum(GridLayoutSizeType_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridLayoutSizeDefinition.prototype, "value", { /** * Gets or sets the value for the definition. This value is treated differently depending * on the size type specified. For example, Star sizing will treat this property as a * weighted percentage relative to other Star sized definitions. */ get: function () { return this.i.b; }, set: function (v) { this.i.b = +v; }, enumerable: false, configurable: true }); IgrGridLayoutSizeDefinition.prototype.findByName = function (name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } return null; }; return IgrGridLayoutSizeDefinition; }()); export { IgrGridLayoutSizeDefinition };