igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
114 lines (113 loc) • 3.58 kB
JavaScript
/*
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 "igniteui-react-core";
import { Dictionary$2 } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
/**
* @hidden
*/
export let SliceSelectionManager = /*@__PURE__*/ (() => {
class SliceSelectionManager extends Base {
constructor() {
super(...arguments);
this.e = new Dictionary$2(Number_$type, Base.$, 0);
}
k(a, b) {
if (this.e.containsKey(a)) {
this.e.removeItem(a);
}
else {
this.e.item(a, b);
}
}
c(a) {
return this.e.containsKey(a);
}
b() {
return this.e.count > 0;
}
d(a) {
return !this.c(a) && this.b();
}
g(a, b) {
switch (a.c) {
case 3: break;
case 1:
this.j(a.g, a.f);
break;
case 0:
this.h(a.g, a.f);
break;
case 2:
for (let c = 0; c < a.f; c++) {
if (this.e.containsKey(c)) {
this.e.item(c, b.a.item(c));
}
}
break;
case 4:
this.f();
break;
}
}
h(a, b) {
let c = new List$1(Number_$type, 0);
let d = new List$1(Base.$, 0);
for (let e of fromEnum(this.e.keys)) {
if (e >= a) {
c.add(e);
d.add1(this.e.item(e));
}
}
let f = 0;
for (let g of fromEnum(c)) {
this.e.removeItem(g);
if (g - b > a) {
this.e.item(g - b, d._inner[f]);
}
f++;
}
}
j(a, b) {
let c = new List$1(Number_$type, 0);
let d = new List$1(Base.$, 0);
for (let e of fromEnum(this.e.keys)) {
if (e >= a) {
c.add(e);
d.add1(this.e.item(e));
}
}
let f = 0;
for (let g of fromEnum(c)) {
this.e.removeItem(g);
this.e.item(g + b, d._inner[f]);
f++;
}
}
f() {
this.e.clear();
}
a() {
let a = new Array(this.e.count);
let b = 0;
for (let c of fromEnum(this.e.keys)) {
a[b] = c;
b++;
}
return a;
}
i(a, b) {
this.f();
for (let d = 0; d < a.length; d++) {
let c = a[d];
this.k(c, b.a.item(c));
}
}
}
SliceSelectionManager.$t = /*@__PURE__*/ markType(SliceSelectionManager, 'SliceSelectionManager');
return SliceSelectionManager;
})();