UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

209 lines (208 loc) 6.24 kB
import { __extends } from "tslib"; import { IgrCellInfo } from "./igr-cell-info"; import { NumericCellModel as NumericCellModel_internal } from "./NumericCellModel"; import { ensureBool, arrayFindByName } from "igniteui-react-core"; /** * Backing information for a numeric cell in the grid. */ var IgrNumericCellInfo = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgrNumericCellInfo, _super); function IgrNumericCellInfo() { return _super.call(this) || this; } IgrNumericCellInfo.prototype.createImplementation = function () { return new NumericCellModel_internal(); }; Object.defineProperty(IgrNumericCellInfo.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgrNumericCellInfo.prototype, "numericValue", { /** * Sets or gets the numeric value to use for the cell. */ get: function () { return this.i.mo; }, set: function (v) { this.i.mo = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrNumericCellInfo.prototype, "hasDecimalValue", { /** * Sets or gets whether there is a decimal numeric value to use for the cell. */ get: function () { return this.i.mk; }, set: function (v) { this.i.mk = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrNumericCellInfo.prototype, "formatStringOverride", { /** * The format string to apply to the value */ get: function () { return this.i.ni; }, set: function (v) { this.i.ni = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrNumericCellInfo.prototype, "formatSpecifiers", { get: function () { return this.i.mg; }, set: function (v) { if (v && !Array.isArray(v) && typeof (v) == "string") { var re = /\s*(?:,|\s|$)\s*/gm; v = v.split(re); } this.i.mg = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrNumericCellInfo.prototype, "formatOverride", { /** * The format options to apply to the value */ get: function () { return this.i.na; }, set: function (v) { this.i.na = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrNumericCellInfo.prototype, "negativePrefix", { /** * Sets or gets the text prepended to a negative numeric value */ get: function () { return this.i.no; }, set: function (v) { this.i.no = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrNumericCellInfo.prototype, "positivePrefix", { /** * Sets or gets the text prepended to a positive numeric value */ get: function () { return this.i.nt; }, set: function (v) { this.i.nt = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrNumericCellInfo.prototype, "negativeSuffix", { /** * Sets or gets the text appended to a negative numeric value */ get: function () { return this.i.nq; }, set: function (v) { this.i.nq = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrNumericCellInfo.prototype, "positiveSuffix", { /** * Sets or gets the text appended to a positive numeric value */ get: function () { return this.i.nv; }, set: function (v) { this.i.nv = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrNumericCellInfo.prototype, "maxFractionDigits", { /** * The maximum number of decimal places to display when formatting */ get: function () { return this.i.mw; }, set: function (v) { this.i.mw = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrNumericCellInfo.prototype, "minFractionDigits", { /** * The minimum number of decimal places to display when formatting */ get: function () { return this.i.my; }, set: function (v) { this.i.my = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrNumericCellInfo.prototype, "minIntegerDigits", { /** * The minimum number of integer digits to display when formatting */ get: function () { return this.i.m0; }, set: function (v) { this.i.m0 = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrNumericCellInfo.prototype, "showGroupingSeparator", { /** * Sets or gets if the grouping separator is shown */ get: function () { return this.i.mm; }, set: function (v) { this.i.mm = ensureBool(v); }, enumerable: false, configurable: true }); IgrNumericCellInfo.prototype.findByName = function (name) { var baseResult = _super.prototype.findByName.call(this, name); if (baseResult) { return baseResult; } if (this.formatSpecifiers != null && arrayFindByName(this.formatSpecifiers, name)) { return arrayFindByName(this.formatSpecifiers, name); } return null; }; return IgrNumericCellInfo; }(IgrCellInfo)); export { IgrNumericCellInfo };