UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

106 lines (105 loc) 3.44 kB
import { IgrCellType } from "./igr-cell-type"; import { CellTemplateContext as CellTemplateContext_internal } from "./CellTemplateContext"; var IgrCellTemplateContext = /** @class */ /*@__PURE__*/ (function () { function IgrCellTemplateContext() { this.mounted = false; this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } } IgrCellTemplateContext.prototype.createImplementation = function () { return new CellTemplateContext_internal(); }; Object.defineProperty(IgrCellTemplateContext.prototype, "nativeElement", { get: function () { return this._implementation.nativeElement; }, enumerable: false, configurable: true }); Object.defineProperty(IgrCellTemplateContext.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgrCellTemplateContext.prototype.onImplementationCreated = function () { }; IgrCellTemplateContext.prototype._provideImplementation = function (i) { this._implementation = i; this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } }; Object.defineProperty(IgrCellTemplateContext.prototype, "implicit", { get: function () { return this.i.f; }, set: function (v) { this.i.f = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrCellTemplateContext.prototype, "additionalTemplateContext", { get: function () { return this.i.e; }, set: function (v) { this.i.e = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrCellTemplateContext.prototype, "cell", { get: function () { var r = this.i.a; 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.a = null : this.i.a = v.i; }, enumerable: false, configurable: true }); IgrCellTemplateContext.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; } return null; }; IgrCellTemplateContext.prototype.setNativeElement = function (element) { this.i.setNativeElement(element); }; return IgrCellTemplateContext; }()); export { IgrCellTemplateContext };