UNPKG

igniteui-react-core

Version:
101 lines (100 loc) 3.24 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, Number_$type, fromEnum, markType } from "./type"; import { List$1 } from "./List$1"; import { DataLegendSeriesValueInfo } from "./DataLegendSeriesValueInfo"; import { Dictionary$2 } from "./Dictionary$2"; import { DataLegendSeriesValueType_$type } from "./DataLegendSeriesValueType"; /** * @hidden */ export let DataLegendSeriesContext = /*@__PURE__*/ (() => { class DataLegendSeriesContext extends Base { b(a) { if (this.c.containsKey(a)) { return this.c.item(a); } return null; } f(a) { if (this.c.containsKey(a)) { return this.c.item(a).l; } return NaN; } k(a, b) { let c = null; if (!this.c.containsKey(a)) { c = new DataLegendSeriesValueInfo(); c.a = a; this.i(c); } c.l = b; } l(a, b) { let c = b; if (this.c.containsKey(a)) { this.j(a); } c.a = a; this.i(c); } j(a) { if (this.c.containsKey(a)) { let b = this.c.item(a); this.e.remove(b); this.c.removeItem(a); } } i(a) { let b = false; if (a.o == -1) { b = true; a.o = this.g(); } this.c.item(a.a, a); this.e.add(a); if (!b) { this.e.aa((c, d) => c.o - d.o); } } g() { let a = -1; for (let b = 0; b < this.e.count; b++) { a = Math.max(a, this.e._inner[b].o); } return a + 1; } constructor() { super(); this.c = new Dictionary$2(DataLegendSeriesValueType_$type, DataLegendSeriesValueInfo.$, 0); this.h = null; this.d = null; this.e = new List$1(DataLegendSeriesValueInfo.$, 0); } get e() { return this.d; } set e(a) { this.d = a; this.c.clear(); for (let b = 0; b < this.d.count; b++) { this.d._inner[b].o = b; this.c.item(this.d._inner[b].a, this.d._inner[b]); } } a() { let a = new List$1(Number_$type, 0); for (let b of fromEnum(this.e)) { a.add(b.l); } return a.toArray(); } } DataLegendSeriesContext.$t = /*@__PURE__*/ markType(DataLegendSeriesContext, 'DataLegendSeriesContext'); return DataLegendSeriesContext; })();