igniteui-react-grids
Version:
Ignite UI React grid components.
119 lines (118 loc) • 3.76 kB
JavaScript
import { __extends } from "tslib";
import { DateTimeFormats_$type } from "./DateTimeFormats";
import { IgrCellInfo } from "./igr-cell-info";
import { DateTimeCellModel as DateTimeCellModel_internal } from "./DateTimeCellModel";
import { ensureEnum, ensureBool, arrayFindByName } from "igniteui-react-core";
/**
* Backing information about a date time cell for the grid.
*/
var IgrDateTimeCellInfo = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgrDateTimeCellInfo, _super);
function IgrDateTimeCellInfo() {
return _super.call(this) || this;
}
IgrDateTimeCellInfo.prototype.createImplementation = function () {
return new DateTimeCellModel_internal();
};
Object.defineProperty(IgrDateTimeCellInfo.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDateTimeCellInfo.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(IgrDateTimeCellInfo.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(IgrDateTimeCellInfo.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(IgrDateTimeCellInfo.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(IgrDateTimeCellInfo.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(IgrDateTimeCellInfo.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
});
IgrDateTimeCellInfo.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 IgrDateTimeCellInfo;
}(IgrCellInfo));
export { IgrDateTimeCellInfo };