UNPKG

igniteui-webcomponents-grids

Version:

Ignite UI Web Components grid components.

119 lines (118 loc) 3.77 kB
import { __extends } from "tslib"; import { DateTimeFormats_$type } from "./DateTimeFormats"; import { IgcCellInfo } from "./igc-cell-info"; import { DateTimeCellModel as DateTimeCellModel_internal } from "./DateTimeCellModel"; import { ensureEnum, ensureBool, arrayFindByName } from "igniteui-webcomponents-core"; /** * Backing information about a date time cell for the grid. */ var IgcDateTimeCellInfo = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgcDateTimeCellInfo, _super); function IgcDateTimeCellInfo() { return _super.call(this) || this; } IgcDateTimeCellInfo.prototype.createImplementation = function () { return new DateTimeCellModel_internal(); }; Object.defineProperty(IgcDateTimeCellInfo.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgcDateTimeCellInfo.prototype, "dateTimeValue", { /** * Sets or gets the DateTime value for the cell. */ get: function () { return this.i.mp; }, set: function (v) { this.i.mp = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcDateTimeCellInfo.prototype, "formatStringOverride", { /** * The format string to apply to the value */ get: function () { return this.i.m6; }, set: function (v) { this.i.m6 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcDateTimeCellInfo.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(IgcDateTimeCellInfo.prototype, "formatOverride", { /** * The format options to apply to the value */ get: function () { return this.i.mz; }, set: function (v) { this.i.mz = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcDateTimeCellInfo.prototype, "dateTimeFormat", { /** * Sets or gets the simple DateTimeFormat to use for the cell. */ get: function () { return this.i.ml; }, set: function (v) { this.i.ml = ensureEnum(DateTimeFormats_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgcDateTimeCellInfo.prototype, "isOffsetValue", { /** * Sets or gets whether the value to use is a DateTimeOffset value. */ get: function () { return this.i.mn; }, set: function (v) { this.i.mn = ensureBool(v); }, enumerable: false, configurable: true }); IgcDateTimeCellInfo.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 IgcDateTimeCellInfo; }(IgcCellInfo)); export { IgcDateTimeCellInfo };