igniteui-react-grids
Version:
Ignite UI React grid components.
111 lines (110 loc) • 3.64 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 { __extends } from "tslib";
import { Base, markType } from "igniteui-react-core";
import { ICellPresenter_$type } from "./ICellPresenter";
import { CellModel } from "./CellModel";
import { BrushUtil } from "igniteui-react-core";
/**
* @hidden
*/
var CellPresenterBase = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(CellPresenterBase, _super);
function CellPresenterBase(a) {
var _this = _super.call(this) || this;
_this.a = null;
_this.a = a;
return _this;
}
CellPresenterBase.prototype.modelUpdated = function (a) {
this.b(a);
};
CellPresenterBase.prototype.b = function (a) {
this.a.bz(a.c);
this.a.b5(a.e);
this.a.b2(a.d);
this.a.br();
if (a.a8(CellModel.f8)) {
this.a.y = a.bd;
}
if (a.a8(CellModel.em) || a.a8(CellModel.eq) || a.a8(CellModel.eo) || a.a8(CellModel.ek)) {
this.a.b7(a.el, a.ep, a.en, a.ej);
}
if (a.a1) {
this.a.b1(a.lv, a.d9, a.ee, a.ec, a.d7);
if (a.a8(CellModel.d5)) {
if (!a.bf && a.p.ix && a.bc && a.cf == 1) {
this.a.bh();
}
}
}
if (a.bo) {
this.a.b3(a.fu, (a.ep + a.ej + a.ee + a.d7));
this.a.b9(a.hd, (a.el + a.en + a.d9 + a.ec));
}
if (a.a3) {
if (a.bi && !this.a.u) {
this.a.bg();
}
if (a.a8(CellModel.d6)) {
this.a.b0(a.lu.color);
}
if (a.a8(CellModel.ei)) {
this.a.b6(a.ch);
}
if (a.a7("IsCollapsable")) {
this.a.v = a.a2;
this.a.a6 = a.f0;
this.a.w = a.ba;
this.a.b9(a.hd, (a.el + a.en + a.d9 + a.ec));
}
if (a.a7("Indent")) {
this.a.a6 = a.f0;
this.a.b9(a.hd, (a.el + a.en + a.d9 + a.ec));
}
if (a.a7("IsExpanded")) {
this.a.w = a.ba;
}
}
if (a.bo && a.bi) {
this.a.ch(a);
}
if (a.a7("DoClone")) {
if (a.ax) {
a.ax = false;
this.a.bf();
}
}
};
CellPresenterBase.prototype.c = function (a, b, c) {
if (c == 0) {
return a.color;
}
if (c == 1) {
return b.color;
}
var d = BrushUtil.l(a, c, b, 0);
return d.color;
};
Object.defineProperty(CellPresenterBase.prototype, "nativeCell", {
get: function () {
return this.a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(CellPresenterBase.prototype, "isCanvasBased", {
get: function () {
return false;
},
enumerable: false,
configurable: true
});
CellPresenterBase.$t = markType(CellPresenterBase, 'CellPresenterBase', Base.$, [ICellPresenter_$type]);
return CellPresenterBase;
}(Base));
export { CellPresenterBase };