UNPKG

igniteui-react-core

Version:
244 lines (243 loc) 7.49 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 "./type"; import { ISummaryResult_$type } from "./ISummaryResult"; import { List$1 } from "./List$1"; import { Dictionary$2 } from "./Dictionary$2"; /** * @hidden */ var SectionData = /** @class */ /*@__PURE__*/ (function (_super) { __extends(SectionData, _super); function SectionData() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.o = false; _this.ae = 0; _this.af = 0; _this.ad = 0; _this.e = null; _this.f = null; _this.i = null; _this.h = null; _this.g = null; _this.aa = 0; _this.ah = 0; _this.ag = 0; _this.t = 0; _this.d = null; _this.u = 0; _this.b = null; _this.s = -1; _this.c = null; _this.a = null; _this.y = 0; _this.l = true; _this.k = null; return _this; } Object.defineProperty(SectionData.prototype, "z", { get: function () { return this.s; }, set: function (a) { this.s = a; }, enumerable: false, configurable: true }); Object.defineProperty(SectionData.prototype, "ac", { get: function () { return this.af + this.y + this.ah - this.t; }, enumerable: false, configurable: true }); Object.defineProperty(SectionData.prototype, "ab", { get: function () { return this.ac + this.d[this.d.length - 1] - 1; }, enumerable: false, configurable: true }); Object.defineProperty(SectionData.prototype, "p", { get: function () { if (!this.q) { return false; } var a = this.w(); for (var b = a; b < this.c.length; b++) { if (!this.c[b]) { return false; } } return true; }, enumerable: false, configurable: true }); Object.defineProperty(SectionData.prototype, "q", { get: function () { return this.l; }, set: function (a) { this.l = a; }, enumerable: false, configurable: true }); SectionData.prototype.ai = function (a, b) { this.aj(a, b, this.e.length); }; SectionData.prototype.aj = function (a, b, c) { switch (a) { case 0: this.c = new Array(1); this.a = new Array(1); break; case 1: this.c = new Array(c); this.a = new Array(c); break; } for (var d = 0; d < this.c.length; d++) { this.c[d] = b; } }; SectionData.r = function (a) { var b = new List$1(Dictionary$2.$.specialize(String_$type, ISummaryResult_$type), 0); if (a != null) { for (var c = 0; c < a.length; c++) { if (a[c] == null) { continue; } if (!a[c].shouldDisplay) { continue; } if (b.count == 0) { b.add(new Dictionary$2(String_$type, ISummaryResult_$type, 0)); } for (var d = 0; d < b.count; d++) { if (!b._inner[d].containsKey(a[c].propertyName)) { b._inner[d].addItem(a[c].propertyName, a[c]); break; } else if (d == b.count - 1) { b.add(new Dictionary$2(String_$type, ISummaryResult_$type, 0)); } } } } return b; }; SectionData.prototype.j = function (a) { var b = this.v(); if (a >= this.af && a < this.af + b) { return 1; } if (a >= this.af + b && a < this.af + b + this.ah) { return 5; } if (a > this.ad - this.u - this.ag && a <= this.ad - this.u) { return 5; } if (a > this.ad - this.u && a <= this.ad) { return 2; } return 0; }; SectionData.prototype.x = function (a) { var b = this.v(); var c = -1; if (a >= this.af + b && a < this.af + b + this.ah) { c = a - (this.af + b); } if (a > this.ad - this.u - this.ag && a <= this.ad - this.u) { c = a - (this.ad - this.u - this.ag + 1); } return c; }; SectionData.prototype.v = function () { var a = 0; if (this.a != null) { for (var b = 0; b < this.a.length; b++) { if (this.a[b] != null) { a++; } } } return a; }; SectionData.prototype.w = function () { if (this.a != null) { for (var a = 0; a < this.a.length; a++) { if (this.a[a] != null) { return a; } } } return 0; }; SectionData.prototype.m = function () { return this.d[this.d.length - 1] > 0; }; SectionData.prototype.am = function (a) { for (var b = 0; b < this.g.length; b++) { if (this.g[b] == null) { continue; } var c = this.i[b]; var d = SectionData.r(c); for (var e = 0; e < d.count; e++) { var f = new Array(d._inner[e].count); d._inner[e].values.copyTo(f, 0); this.g[b].a[e].summaryResults = f; if (a != null) { a(this.g[b].a[e]); } } } }; SectionData.prototype.ak = function (a, b) { if (a == null || a.rowType != 5) { return; } if (b < 0 && b >= this.g[a.level - 1].a.length) { return; } this.g[a.level - 1].a[b] = a; }; SectionData.prototype.n = function () { for (var a = 0; a < this.g.length; a++) { if (this.g[a] != null) { for (var b = 0; b < this.g[a].a.length; b++) { if (this.g[a].a[b] != null) { return true; } } } } return false; }; SectionData.prototype.an = function (a, b, c) { c.summaryIndex = b; this.i[a][b] = c; if (this.o && this.k != null) { this.k.i[a][b] = c; } }; SectionData.prototype.al = function (a, b) { for (var c = a - 1; c >= 0; c--) { if (this.h[c] != -1) { this.h[c] += b; } } }; SectionData.$t = markType(SectionData, 'SectionData'); return SectionData; }(Base)); export { SectionData };