UNPKG

igniteui-react-core

Version:
91 lines (90 loc) 3.28 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 { Base, Delegate_$type, Number_$type, markType } from "./type"; import { FastIterationDictionary$2 } from "./FastIterationDictionary$2"; import { DelayManagerCallbackSettings } from "./DelayManagerCallbackSettings"; /** * @hidden */ export let DelayManager = /*@__PURE__*/ (() => { class DelayManager extends Base { get b() { return this.a; } set b(a) { this.a = a; } constructor(a, ..._rest) { super(); this.a = null; this.c = null; this.d = null; this.e = 0; a = (a == void 0) ? 0 : a; switch (a) { case 0: { this.c = new FastIterationDictionary$2(Delegate_$type, DelayManagerCallbackSettings.$, 0); this.d = new FastIterationDictionary$2(Number_$type, Delegate_$type, 0); } break; case 1: { let c = _rest[0]; { this.c = new FastIterationDictionary$2(Delegate_$type, DelayManagerCallbackSettings.$, 0); this.d = new FastIterationDictionary$2(Number_$type, Delegate_$type, 0); } this.a = c; } break; } } f(a, b) { if (this.a == null) { return -1; } if (this.c.d(a)) { this.c.item(a).c = this.a.getCurrentRelativeTime(); } else { let c = new DelayManagerCallbackSettings(); c.a = this.e++; c.c = this.a.getCurrentRelativeTime(); c.b = b; this.c.s(a, c); this.d.s(c.a, a); } this.a.executeDelayed(() => this.h(a), b); return this.c.item(a).a; } g(a) { if (this.d.d(a)) { let b = this.d.item(a); this.d.f(a); this.c.f(b); } } h(a) { if (this.c.d(a)) { let b = this.c.item(a); let c = this.a == null ? 0 : this.a.getCurrentRelativeTime(); let d = c - b.c; if (this.a == null || d >= b.b) { a(); this.c.f(a); this.d.f(b.a); } else { this.a.executeDelayed(() => this.h(a), (b.b - d)); } } } } DelayManager.$t = /*@__PURE__*/ markType(DelayManager, 'DelayManager'); return DelayManager; })();