igniteui-react-grids
Version:
Ignite UI React grid components.
68 lines (67 loc) • 2.72 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 { GridCellBase } from "./GridCellBase";
import { markType } from "igniteui-react-core";
/**
* @hidden
*/
var TextCell = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(TextCell, _super);
function TextCell(a) {
var _this = _super.call(this, a) || this;
_this.ck = null;
_this.cn = -1;
_this.cm = -1;
_this.ck = a.createElement("span");
_this.ah.setRawStyleProperty("text-align", "left");
_this.ck.setRawStyleProperty("display", "inline-block");
_this.ck.setRawStyleProperty("line-height", "normal");
_this.ck.setRawStyleProperty("vertical-align", "middle");
_this.ck.setRawStyleProperty("overflow", "hidden");
_this.ck.setRawStyleProperty("white-space", "nowrap");
_this.ck.setRawStyleProperty("text-overflow", "ellipsis");
_this.ah.setRawStyleProperty("vertical-align", "middle");
_this.ah.append(_this.ck);
return _this;
}
Object.defineProperty(TextCell.prototype, "cl", {
get: function () {
return this.ck;
},
enumerable: false,
configurable: true
});
TextCell.prototype.b9 = function (a, b) {
_super.prototype.b9.call(this, a, b);
var c = Math.max(0, a - b - (this.a3 + this.a5 + this.a4));
if (this.cn != c) {
this.cn = c;
this.ck.setRawStyleProperty("max-width", c.toString() + "px");
}
};
TextCell.prototype.b3 = function (a, b) {
_super.prototype.b3.call(this, a, b);
var c = Math.max(0, a - b);
if (this.cm != c) {
this.cm = c;
this.ck.setRawStyleProperty("max-height", c.toString() + "px");
}
};
TextCell.prototype.get_z = function () {
return true;
};
TextCell.prototype.bs = function (a, b, c) {
_super.prototype.bs.call(this, a, b, c);
if (a == "Indent" || a == "IsCollapsable") {
this.ck.setRawStyleProperty("margin-left", this.a3 + this.a5 + this.a4 + "px");
}
};
TextCell.$t = markType(TextCell, 'TextCell', GridCellBase.$);
return TextCell;
}(GridCellBase));
export { TextCell };