UNPKG

igniteui-react-core

Version:
133 lines (132 loc) 4.38 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, __values } from "tslib"; import { Base, fromEnum, markType } from "./type"; import { List$1 } from "./List$1"; import { VersionQueueAction } from "./VersionQueueAction"; import { VersionQueueActionTimeout } from "./VersionQueueActionTimeout"; /** * @hidden */ var VersionQueueHelper = /** @class */ /*@__PURE__*/ (function (_super) { __extends(VersionQueueHelper, _super); function VersionQueueHelper() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.c = new List$1(VersionQueueAction.$, 0); _this.g = {}; _this.d = new List$1(VersionQueueActionTimeout.$, 0); _this.a = null; _this.e = 0; return _this; } VersionQueueHelper.prototype.h = function () { if (this.e >= 0x7FFFFFFF - 1) { this.e = 0; } else { this.e++; } var a = new List$1(VersionQueueAction.$, 0); for (var b = 0; b < this.c.count; b++) { if (this.b(this.c._inner[b].d)) { a.add(this.c._inner[b]); } } for (var c = 0; c < a.count; c++) { this.c.remove(a._inner[c]); } for (var d = 0; d < a.count; d++) { a._inner[d].b(); } var e = new List$1(VersionQueueActionTimeout.$, 0); for (var f = 0; f < this.d.count; f++) { if (this.b(this.d._inner[f].f)) { e.add(this.d._inner[f]); } } for (var g = 0; g < e.count; g++) { this.d.remove(e._inner[g]); } for (var h = 0; h < e.count; h++) { e._inner[h].b(false); } }; VersionQueueHelper.prototype.f = function () { return this.e; }; VersionQueueHelper.prototype.j = function (a, b) { if (this.b(b)) { a(); return; } this.c.add(new VersionQueueAction(a, b)); }; VersionQueueHelper.prototype.l = function (a) { var e_1, _a; var _this = this; if (this.a == null && a != null) { var _loop_1 = function (b) { a.executeDelayed(function () { return _this.i(b); }, b.e); }; try { for (var _b = __values(fromEnum(this.d)), _c = _b.next(); !_c.done; _c = _b.next()) { var b = _c.value; _loop_1(b); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_1) throw e_1.error; } } } this.a = a; }; VersionQueueHelper.prototype.k = function (a, b, c) { var _this = this; if (c <= 0) { this.j(function () { return a(false); }, b); return; } if (this.b(b)) { a(false); return; } var d = new VersionQueueActionTimeout(a, b, c); this.d.add(d); if (this.a != null) { this.a.executeDelayed(function () { return _this.i(d); }, c); } }; VersionQueueHelper.prototype.i = function (a) { if (!this.d.contains(a)) { return; } this.d.remove(a); a.b(true); }; VersionQueueHelper.prototype.b = function (a) { if (this.e > a) { return true; } if (this.e >= 0x7FFFFFFF - 1 && a < 0x7FFFFFFF - 1) { return true; } return false; }; VersionQueueHelper.$t = markType(VersionQueueHelper, 'VersionQueueHelper'); return VersionQueueHelper; }(Base)); export { VersionQueueHelper };