UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

148 lines (147 loc) 3.57 kB
import { IgrGridCellIdentifier } from "./igr-grid-cell-identifier"; import { RowDataCancelableEventArgsDetail as RowDataCancelableEventArgsDetail_internal } from "./RowDataCancelableEventArgsDetail"; import { ensureBool } from "igniteui-react-core"; export class IgrRowDataCancelableEventArgsDetail { createImplementation() { return new RowDataCancelableEventArgsDetail_internal(); } get nativeElement() { return this._implementation.nativeElement; } /** * @hidden */ get i() { return this._implementation; } onImplementationCreated() { } constructor() { this.mounted = false; this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } } _provideImplementation(i) { this._implementation = i; this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } } /** * @deprecated */ get cellID() { const r = this.i.b; if (r == null) { return null; } if (!r.externalObject) { let 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 cellID(v) { v == null ? this.i.b = null : this.i.b = v.i; } /** * @deprecated */ get oldValue() { return this.i.j; } set oldValue(v) { this.i.j = v; } /** * @deprecated */ get newValue() { return this.i.i; } set newValue(v) { this.i.i = v; } /** * @deprecated */ get isAddRow() { return this.i.e; } set isAddRow(v) { this.i.e = ensureBool(v); } get owner() { const r = this.i.a; if (r == null) { return null; } return r.externalObject; } set owner(v) { v == null ? this.i.a = null : this.i.a = v.i; } /** * @deprecated Use the `rowData` property instead. */ get data() { return this.i.g; } set data(v) { this.i.g = v; } get rowData() { return this.i.l; } set rowData(v) { this.i.l = v; } /** * Represents the unique key, the row can be associated with. * Available if `primaryKey` exists * @deprecated Use the `rowKey` property instead. */ get primaryKey() { return this.i.k; } set primaryKey(v) { this.i.k = v; } get rowKey() { return this.i.m; } set rowKey(v) { this.i.m = v; } findByName(name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } if (this.cellID && this.cellID.name && this.cellID.name == name) { return this.cellID; } if (this.owner && this.owner.name && this.owner.name == name) { return this.owner; } return null; } setNativeElement(element) { this.i.setNativeElement(element); } }