UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

97 lines (96 loc) 3.45 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { __extends } from "tslib"; import { CellPresenterBase } from "./CellPresenterBase"; import { CellModel } from "./CellModel"; import { ImageCellModel } from "./ImageCellModel"; import { markType } from "igniteui-react-core"; import { stringStartsWith } from "igniteui-react-core"; /** * @hidden */ var ImageCellPresenter = /** @class */ /*@__PURE__*/ (function (_super) { __extends(ImageCellPresenter, _super); function ImageCellPresenter(a) { return _super.call(this, a) || this; } Object.defineProperty(ImageCellPresenter.prototype, "d", { get: function () { return this.a; }, enumerable: false, configurable: true }); ImageCellPresenter.prototype.b = function (a) { _super.prototype.b.call(this, a); var b = a; if (a.a3) { if (a.a8(CellModel.fa) || a.a8(CellModel.hc)) { var c = Math.min(1, Math.max(0, a.ct)); var d = a.cj * (1 - c); this.d.co = d; } if (b.a8(ImageCellModel.mj) || b.a8(ImageCellModel.mk)) { this.e(b.mn, b.mg); } if (b.a8(ImageCellModel.ml) || b.a8(ImageCellModel.fw) || b.a8(ImageCellModel.hb)) { this.f(b.mi, b.g, b.i); } if (b.a8(ImageCellModel.g6)) { if (a.u == 1) { this.d.ct(); } else if (a.u == 2) { this.e(b.mn, b.mg); } } } }; ImageCellPresenter.prototype.f = function (a, b, c) { this.d.cz(a); }; ImageCellPresenter.prototype.e = function (a, b) { var c = a.toLowerCase(); if (b == 0) { b = 4; } if (stringStartsWith(c, "http") || b == 4) { this.d.cw(a, 4); } if (stringStartsWith(c, "asset") || b == 2) { var d = a; if (stringStartsWith(c, "asset")) { d = a.substr(8); } this.d.cw(d, 2); } if (stringStartsWith(c, "drawable") || b == 1) { var e = a; if (stringStartsWith(c, "drawable")) { e = a.substr(11); } this.d.cw(e, 1); } if (stringStartsWith(c, "nativeresource") || b == 1) { var f = a; if (stringStartsWith(c, "nativeresource")) { f = a.substr(17); } this.d.cw(f, 1); } if (stringStartsWith(c, "embeddedresource") || b == 3) { var g = a; if (stringStartsWith(c, "embeddedresource")) { g = a.substr(19); } this.d.cw(g, 3); } }; ImageCellPresenter.$t = markType(ImageCellPresenter, 'ImageCellPresenter', CellPresenterBase.$); return ImageCellPresenter; }(CellPresenterBase)); export { ImageCellPresenter };