igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
211 lines (210 loc) • 6.83 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, fromEnum, toEnum, Number_$type, markType } from "igniteui-react-core";
import { IFastItemColumn$1_$type } from "igniteui-react-core";
import { isNaN_, isInfinity } from "igniteui-react-core";
/**
* @hidden
*/
export let FastItemCoalescingColumn = /*@__PURE__*/ (() => {
class FastItemCoalescingColumn extends Base {
get c() {
return this.b;
}
constructor(a, b, c) {
super();
this.a = null;
this.b = null;
this.d = false;
this.a = a;
this.b = b;
this.d = c;
}
item(a, b) {
if (arguments.length === 2) {
this.b.item(a, b);
return b;
}
else {
if (this.a.isOthersValue(a)) {
return NaN;
}
if (this.a.hasOthersCategory && this.a.othersIndex == a) {
if (!this.d) {
return this.e();
}
let b = this.e() / this.a.othersValue;
return b;
}
if (this.d) {
let c = this.a.getNormalizingValueAtIndex(a, this.b.item(a));
return this.b.item(a) / c;
}
else {
return this.b.item(a);
}
}
}
get minimum() {
if (this.d) {
return 0;
}
if (this.a.hasOthersCategory) {
return Math.min(this.a.othersValue, this.b.minimum);
}
return this.b.minimum;
}
get maximum() {
if (this.d) {
return 1;
}
if (this.a.hasOthersCategory) {
return Math.max(this.a.othersValue, this.b.maximum);
}
return this.b.maximum;
}
get mayContainUnknowns() {
return this.a.normalizationMayContainUnknowns || this.a.hasOthersCategory || this.b.mayContainUnknowns;
}
get count() {
return this.a.itemsCount;
}
get isReadOnly() {
return this.b.isReadOnly;
}
get propertyName() {
return this.b.propertyName;
}
add(a) {
this.b.add(a);
}
clear() {
this.b.clear();
}
contains(a) {
return this.b.contains(a);
}
copyTo(a, b) {
for (let c = 0; c < this.count; c++) {
if (this.d) {
let d = this.a.getNormalizingValueAtIndex(c, this.b.item(c));
a[b + c] = this.b.item(c) / d;
}
else {
a[b + c] = this.b.item(c);
}
if (this.a.hasOthersCategory && c == this.a.othersIndex) {
if (this.d) {
if (!this.d) {
a[b + c] = this.e();
}
else {
let e = this.e() / this.a.othersValue;
a[b + c] = e;
}
}
}
}
}
*_getEnumerator() {
let a = 0;
for (let b of fromEnum(this.b)) {
if (this.d) {
let c = this.a.getNormalizingValueAtIndex(a, this.b.item(a));
yield this.b.item(a) / c;
}
else {
yield this.b.item(a);
}
a++;
}
if (this.a.hasOthersCategory) {
if (!this.d) {
yield this.e();
}
else {
let d = this.e() / this.a.othersValue;
yield d;
}
}
}
getEnumerator() {
return toEnum(() => this._getEnumerator()).getEnumerator();
}
getItem(a) {
if (this.a.hasOthersCategory && a == this.a.othersIndex) {
return this.b.minimum;
}
return this.b.getItem(a);
}
indexOf(a) {
let b = this.b.indexOf(a);
if (b >= 0) {
return b;
}
if (a == this.a.othersValue) {
return this.a.othersIndex;
}
return -1;
}
insert(a, b) {
this.b.insert(a, b);
}
remove(a) {
return this.b.remove(a);
}
removeAt(a) {
this.b.removeAt(a);
}
*_getEnumeratorObject() {
let a = 0;
for (let b of fromEnum(this.b)) {
if (this.d) {
let c = this.a.getNormalizingValueAtIndex(a, this.b.item(a));
yield this.b.item(a) / c;
}
else {
yield this.b.item(a);
}
a++;
}
if (this.a.hasOthersCategory) {
if (!this.d) {
yield this.e();
}
else {
let d = this.e() / this.a.othersValue;
yield d;
}
}
}
getEnumeratorObject() {
return toEnum(() => this._getEnumeratorObject()).getEnumeratorObject();
}
get f() {
return this.e();
}
e() {
let a = 0;
for (let b = 0; b < this.count; b++) {
if (this.a.isOthersValue(b)) {
if (!isNaN_(this.b.item(b)) && !isInfinity(this.b.item(b)) && this.b.item(b) >= 0) {
a += this.b.item(b);
}
}
}
return a;
}
asArray() {
let a = new Array(this.count);
this.copyTo(a, 0);
return a;
}
}
FastItemCoalescingColumn.$t = /*@__PURE__*/ markType(FastItemCoalescingColumn, 'FastItemCoalescingColumn', Base.$, [/*@__PURE__*/ IFastItemColumn$1_$type.specialize(Number_$type)]);
return FastItemCoalescingColumn;
})();