UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

139 lines (138 loc) 4.69 kB
import { IgrCellType } from "./igr-cell-type"; import { IgrRowType } from "./igr-row-type"; import { GridContextMenuEventArgsDetail as GridContextMenuEventArgsDetail_internal } from "./GridContextMenuEventArgsDetail"; /** * Represents an event argument for the grid contextMenu output */ var IgrGridContextMenuEventArgsDetail = /** @class */ /*@__PURE__*/ (function () { function IgrGridContextMenuEventArgsDetail() { this.mounted = false; this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } } IgrGridContextMenuEventArgsDetail.prototype.createImplementation = function () { return new GridContextMenuEventArgsDetail_internal(); }; Object.defineProperty(IgrGridContextMenuEventArgsDetail.prototype, "nativeElement", { get: function () { return this._implementation.nativeElement; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridContextMenuEventArgsDetail.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgrGridContextMenuEventArgsDetail.prototype.onImplementationCreated = function () { }; IgrGridContextMenuEventArgsDetail.prototype._provideImplementation = function (i) { this._implementation = i; this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } }; Object.defineProperty(IgrGridContextMenuEventArgsDetail.prototype, "cell", { /** * Represents the grid cell that triggered the event. */ get: function () { var r = this.i.b; if (r == null) { return null; } if (!r.externalObject) { var e = new IgrCellType(); 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.b = null : this.i.b = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridContextMenuEventArgsDetail.prototype, "event", { /** * Represents the original event that occurred * Examples of such events include: selecting, clicking, double clicking, etc. */ get: function () { return this.i.g; }, set: function (v) { this.i.g = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridContextMenuEventArgsDetail.prototype, "row", { /** * Represents the grid row that triggered the event. */ get: function () { var r = this.i.c; if (r == null) { return null; } if (!r.externalObject) { var e = new IgrRowType(); 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.c = null : this.i.c = v.i; }, enumerable: false, configurable: true }); IgrGridContextMenuEventArgsDetail.prototype.findByName = function (name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } if (this.cell && this.cell.name && this.cell.name == name) { return this.cell; } if (this.row && this.row.name && this.row.name == name) { return this.row; } return null; }; IgrGridContextMenuEventArgsDetail.prototype.setNativeElement = function (element) { this.i.setNativeElement(element); }; return IgrGridContextMenuEventArgsDetail; }()); export { IgrGridContextMenuEventArgsDetail };