UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

224 lines (223 loc) 7.27 kB
import { __extends } from "tslib"; import { IgrGridCellIdentifier } from "./igr-grid-cell-identifier"; import { IgrColumn } from "./igr-column"; import { IgrBaseEventArgsDetail } from "./igr-base-event-args-detail"; import { GridEditDoneEventArgsDetail as GridEditDoneEventArgsDetail_internal } from "./GridEditDoneEventArgsDetail"; import { ensureBool } from "igniteui-react-core"; /** * Represents event arguments related to grid editing completion. */ var IgrGridEditDoneEventArgsDetail = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgrGridEditDoneEventArgsDetail, _super); function IgrGridEditDoneEventArgsDetail() { return _super.call(this) || this; } IgrGridEditDoneEventArgsDetail.prototype.createImplementation = function () { return new GridEditDoneEventArgsDetail_internal(); }; Object.defineProperty(IgrGridEditDoneEventArgsDetail.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridEditDoneEventArgsDetail.prototype, "rowID", { /** * @deprecated Use the `rowKey` property instead. */ get: function () { return this.i.p; }, set: function (v) { this.i.p = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridEditDoneEventArgsDetail.prototype, "primaryKey", { /** * @deprecated Use the `rowKey` property instead. */ get: function () { return this.i.n; }, set: function (v) { this.i.n = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridEditDoneEventArgsDetail.prototype, "rowKey", { get: function () { return this.i.q; }, set: function (v) { this.i.q = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridEditDoneEventArgsDetail.prototype, "cellID", { get: function () { var r = this.i.i; if (r == null) { return null; } if (!r.externalObject) { var e = new IgrGridCellIdentifier(); if (r.$type) { e._implementation = r; } else { if (e.i.setNativeElement) { e.i.setNativeElement(r); } } r.externalObject = e; } return r.externalObject; }, set: function (v) { v == null ? this.i.i = null : this.i.i = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridEditDoneEventArgsDetail.prototype, "rowData", { /** * `rowData` represents the updated/committed data of the row after the edit (newValue) * The only case rowData (of the current object) is used directly, is when there is no rowEditing or transactions enabled */ get: function () { return this.i.o; }, set: function (v) { this.i.o = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridEditDoneEventArgsDetail.prototype, "oldValue", { /** * Represents the previous (before editing) value of the edited cell. * It's used when the event has been stopped/exited. */ get: function () { return this.i.m; }, set: function (v) { this.i.m = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridEditDoneEventArgsDetail.prototype, "newValue", { /** * Optional * Represents the value, that is being entered in the edited cell * When there is no `newValue` and the event has ended, the value of the cell returns to the `oldValue` */ get: function () { return this.i.l; }, set: function (v) { this.i.l = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridEditDoneEventArgsDetail.prototype, "column", { /** * Optional * Represents the column information of the edited cell */ get: function () { var r = this.i.g; if (r == null) { return null; } if (!r.externalObject) { var e = IgrColumn._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; }, set: function (v) { v == null ? this.i.g = null : this.i.g = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridEditDoneEventArgsDetail.prototype, "owner", { /** * Optional * Represents the grid instance that owns the edit event. */ get: function () { var r = this.i.h; if (r == null) { return null; } return r.externalObject; }, set: function (v) { v == null ? this.i.h = null : this.i.h = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridEditDoneEventArgsDetail.prototype, "isAddRow", { /** * Optional * Indicates if the editing consists of adding a new row */ get: function () { return this.i.j; }, set: function (v) { this.i.j = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridEditDoneEventArgsDetail.prototype, "valid", { /** * Optional * Indicates if the new value would be valid. * It can be set to return the result of the methods for validation of the grid */ get: function () { return this.i.k; }, set: function (v) { this.i.k = ensureBool(v); }, enumerable: false, configurable: true }); IgrGridEditDoneEventArgsDetail.prototype.findByName = function (name) { var baseResult = _super.prototype.findByName.call(this, name); if (baseResult) { return baseResult; } if (this.cellID && this.cellID.name && this.cellID.name == name) { return this.cellID; } if (this.column && this.column.name && this.column.name == name) { return this.column; } if (this.owner && this.owner.name && this.owner.name == name) { return this.owner; } return null; }; return IgrGridEditDoneEventArgsDetail; }(IgrBaseEventArgsDetail)); export { IgrGridEditDoneEventArgsDetail };