UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

111 lines (110 loc) 3.9 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 { Base, String_$type, markType } from "igniteui-react-core"; import { List$1 } from "igniteui-react-core"; import { stringContains, stringReplace, stringIsNullOrEmpty } from "igniteui-react-core"; import { tryParseNumber } from "igniteui-react-core"; /** * @hidden */ var ColumnWidth = /** @class */ /*@__PURE__*/ (function (_super) { __extends(ColumnWidth, _super); function ColumnWidth() { var _this = _super.call(this) || this; _this.g = null; _this.c = false; _this.f = 0; _this.d = 0; _this.c = true; _this.f = 1; return _this; } Object.defineProperty(ColumnWidth.prototype, "e", { get: function () { return this.d; }, set: function (a) { this.d = a; }, enumerable: false, configurable: true }); Object.defineProperty(ColumnWidth, "a", { get: function () { return ((function () { var $ret = new ColumnWidth(); $ret.c = true; $ret.e = 0; $ret.f = 1; return $ret; })()); }, enumerable: false, configurable: true }); ColumnWidth.parse = function (a) { if (a == null) { return new ColumnWidth(); } a = a.trim(); var b = stringContains(a, "*"); if (b || stringContains(a, "min=") || stringContains(a, "Min=") || stringContains(a, ",")) { var c = new ColumnWidth(); c.c = b; a = stringReplace(a, " ", ""); a = stringReplace(a, "min=", ","); a = stringReplace(a, "Min=", ","); a = stringReplace(a, "*,,", "*"); a = stringReplace(a, "*,", "*"); a = stringReplace(a, ",,", ","); var d = a.split('*'); var e_1 = new List$1(String_$type, 0); for (var f = 0; f < d.length; f++) { var g = d[f].split(','); for (var h = 0; h < g.length; h++) { e_1.add(g[h]); } } var i_1 = e_1._inner[0]; if (i_1 != null) { i_1 = i_1.trim(); } var j_1; if (stringIsNullOrEmpty(i_1)) { j_1 = 1; } else { if (!((function () { var k = tryParseNumber(i_1, j_1); j_1 = k.p1; return k.ret; })())) { return new ColumnWidth(); } } c.f = j_1; if (e_1.count > 1 && e_1._inner[1] != null) { e_1._inner[1] = stringReplace(e_1._inner[1], ">", ""); var k_1; if (((function () { var l = tryParseNumber(e_1._inner[1], k_1); k_1 = l.p1; return l.ret; })())) { c.e = k_1; } } return c; } else { var l = new ColumnWidth(); l.c = false; var m_1; if (!((function () { var n = tryParseNumber(a, m_1); m_1 = n.p1; return n.ret; })())) { return new ColumnWidth(); } l.f = m_1; return l; } }; ColumnWidth.$t = markType(ColumnWidth, 'ColumnWidth'); return ColumnWidth; }(Base)); export { ColumnWidth };