igniteui-react-grids
Version:
Ignite UI React grid components.
92 lines (91 loc) • 3.33 kB
JavaScript
/*
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 { CellPresenterBase } from "./CellPresenterBase";
import { CellModel } from "./CellModel";
import { ImageCellModel } from "./ImageCellModel";
import { markType } from "igniteui-react-core";
import { stringStartsWith } from "igniteui-react-core";
/**
* @hidden
*/
export let ImageCellPresenter = /*@__PURE__*/ (() => {
class ImageCellPresenter extends CellPresenterBase {
constructor(a) {
super(a);
}
get d() {
return this.a;
}
b(a) {
super.b(a);
let b = a;
if (a.a3) {
if (a.a8(CellModel.fa) || a.a8(CellModel.hc)) {
let c = Math.min(1, Math.max(0, a.ct));
let 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);
}
}
}
}
f(a, b, c) {
this.d.cz(a);
}
e(a, b) {
let 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) {
let d = a;
if (stringStartsWith(c, "asset")) {
d = a.substr(8);
}
this.d.cw(d, 2);
}
if (stringStartsWith(c, "drawable") || b == 1) {
let e = a;
if (stringStartsWith(c, "drawable")) {
e = a.substr(11);
}
this.d.cw(e, 1);
}
if (stringStartsWith(c, "nativeresource") || b == 1) {
let f = a;
if (stringStartsWith(c, "nativeresource")) {
f = a.substr(17);
}
this.d.cw(f, 1);
}
if (stringStartsWith(c, "embeddedresource") || b == 3) {
let g = a;
if (stringStartsWith(c, "embeddedresource")) {
g = a.substr(19);
}
this.d.cw(g, 3);
}
}
}
ImageCellPresenter.$t = /*@__PURE__*/ markType(ImageCellPresenter, 'ImageCellPresenter', CellPresenterBase.$);
return ImageCellPresenter;
})();