UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

172 lines (171 loc) 5.4 kB
import { __extends } from "tslib"; import { DateTimeFormats_$type } from "./DateTimeFormats"; import { EditorType_$type } from "./EditorType"; import { IgrDataGridColumn } from "./igr-data-grid-column"; import { DateTimeColumn } from "./DateTimeColumn"; import { ensureEnum, ensureBool, arrayFindByName } from "igniteui-react-core"; /** * A column for displaying date/time values. */ var IgrDateTimeColumn = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgrDateTimeColumn, _super); function IgrDateTimeColumn(props) { return _super.call(this, props) || this; } IgrDateTimeColumn.prototype.createImplementation = function () { return new DateTimeColumn(); }; Object.defineProperty(IgrDateTimeColumn.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgrDateTimeColumn.prototype, "dateTimeFormat", { /** * Gets or sets the date time format to use for this column. If FormatString is specificied this value is ignored. */ get: function () { return this.i.n7; }, set: function (v) { this.i.n7 = ensureEnum(DateTimeFormats_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrDateTimeColumn.prototype, "formatString", { /** * Gets or sets the format string to apply to the value. If set, the other value formatting properties on this column are ignored. */ get: function () { return this.i.op; }, set: function (v) { this.i.op = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrDateTimeColumn.prototype, "editorFormatString", { /** * Gets or sets the format string to use when editing dates. */ get: function () { return this.i.oi; }, set: function (v) { this.i.oi = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrDateTimeColumn.prototype, "formatSpecifiers", { get: function () { return this.i.n3; }, set: function (v) { if (v && !Array.isArray(v) && typeof (v) == "string") { var re = /\s*(?:,|\s|$)\s*/gm; v = v.split(re); } this.i.n3 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrDateTimeColumn.prototype, "formatOverride", { /** * Gets or sets the INTL DateTimeFormat object to use for formatting the date values. */ get: function () { return this.i.oe; }, set: function (v) { this.i.oe = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrDateTimeColumn.prototype, "showTodayButton", { /** * Gets or sets the ShowTodayButton property to detirmine if the today button is shown */ get: function () { return this.i.oa; }, set: function (v) { this.i.oa = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrDateTimeColumn.prototype, "editorType", { /** * Gets or sets the editor type used for editing cells in this column. */ get: function () { return this.i.n8; }, set: function (v) { this.i.n8 = ensureEnum(EditorType_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrDateTimeColumn.prototype, "editorDataSource", { /** * Gets or sets the ComboBox data source. */ get: function () { return this.i.od; }, set: function (v) { this.i.od = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrDateTimeColumn.prototype, "editorTextField", { /** * Gets or sets the ComboBox text field. */ get: function () { return this.i.ok; }, set: function (v) { this.i.ok = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrDateTimeColumn.prototype, "editorValueField", { /** * Gets or sets the ComboBox value field. */ get: function () { return this.i.ol; }, set: function (v) { this.i.ol = v; }, enumerable: false, configurable: true }); IgrDateTimeColumn.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 IgrDateTimeColumn; }(IgrDataGridColumn)); export { IgrDateTimeColumn };