igniteui-react-core
Version:
Ignite UI React Core.
225 lines (224 loc) • 7.32 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 { __extends } from "tslib";
import { Base, String_$type, markType } from "./type";
import { List$1 } from "./List$1";
import { AggregatedDataProviderLayerInfo } from "./AggregatedDataProviderLayerInfo";
import { DataSourceSummaryOperand_$type } from "./DataSourceSummaryOperand";
import { stringStartsWith } from "./string";
/**
* @hidden
*/
var AggregatedDataProviderTopLayer = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(AggregatedDataProviderTopLayer, _super);
function AggregatedDataProviderTopLayer() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.q = "";
_this.m = "";
_this.c = new List$1(AggregatedDataProviderLayerInfo.$, 0);
_this.e = new List$1(String_$type, 0);
_this.d = new List$1(String_$type, 0);
_this.g = new List$1(Base.$, 0);
_this.f = new List$1(DataSourceSummaryOperand_$type, 0);
return _this;
}
AggregatedDataProviderTopLayer.prototype.n = function () {
return {};
};
AggregatedDataProviderTopLayer.prototype.aa = function (a, b, c) {
var d = a;
d[b] = c;
};
AggregatedDataProviderTopLayer.prototype.o = function (a) {
var b = this.n();
this.aa(b, this.w, this.p);
if (this.j.count == 0) {
}
var c = this.a();
for (var d = 0; d < this.j.count; d++) {
var e = this.s(d);
this.aa(b, e, this.l._inner[d]);
var f = this.r(d);
this.aa(b, f, c);
}
for (var g = 0; g < this.h.count; g++) {
var h = this.h._inner[g];
if (h.a) {
continue;
}
var i = this.b(h);
if (h.m != null && h.m.count > 0) {
for (var j = 0; j < h.m.count; j++) {
var k = h.m._inner[j];
var l = h.n._inner[j];
var m = h.o._inner[j];
var n = this.u(h, k, l, j);
this.aa(b, n, m);
var o = this.t(h, k, l, j);
this.aa(b, o, c);
if (!a.contains(n)) {
a.add(n);
}
}
}
}
return b;
};
AggregatedDataProviderTopLayer.prototype.t = function (a, b, c, d) {
var e = this.u(a, b, c, d);
return e + "_Drill";
};
AggregatedDataProviderTopLayer.prototype.u = function (a, b, c, d) {
var e = "";
for (var f = 1; f < a.j.count; f++) {
var g = a.j._inner[f];
if (g == null) {
continue;
}
e += g.toString();
}
if (a.l._inner[d] != null) {
return e + a.l._inner[d];
}
var h = b;
var i = this.v(c);
return e + h + i;
};
AggregatedDataProviderTopLayer.prototype.r = function (a) {
return this.s(a) + "_Drill";
};
AggregatedDataProviderTopLayer.prototype.v = function (a) {
var b = "";
switch (a) {
case 3:
b = "Average";
break;
case 4:
b = "Count";
break;
case 5:
b = "Custom";
break;
case 1:
b = "Max";
break;
case 0:
b = "Min";
break;
case 2:
b = "Sum";
break;
}
return b;
};
AggregatedDataProviderTopLayer.prototype.s = function (a) {
if (this.i._inner[a] != null) {
return this.i._inner[a];
}
var b = this.j._inner[a];
var c = this.v(this.k._inner[a]);
return b + c;
};
AggregatedDataProviderTopLayer.prototype.y = function () {
var a = this.a();
var b = a.length;
this.j.add(this.w);
this.k.add(4);
this.l.add1(b);
};
AggregatedDataProviderTopLayer.prototype.a = function () {
var a = new List$1(Base.$, 0);
for (var b = 0; b < this.h.count; b++) {
if (this.h._inner[b].a) {
for (var c = 0; c < this.h._inner[b].k.count; c++) {
a.add1(this.h._inner[b].k._inner[c]);
}
}
}
return a.toArray();
};
AggregatedDataProviderTopLayer.prototype.b = function (a) {
var b = new List$1(Base.$, 0);
for (var c = 0; c < a.k.count; c++) {
b.add1(a.k._inner[c]);
}
return b.toArray();
};
Object.defineProperty(AggregatedDataProviderTopLayer.prototype, "w", {
get: function () {
return this.q;
},
set: function (a) {
this.q = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AggregatedDataProviderTopLayer.prototype, "p", {
get: function () {
return this.m;
},
set: function (a) {
this.m = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AggregatedDataProviderTopLayer.prototype, "h", {
get: function () {
return this.c;
},
enumerable: false,
configurable: true
});
AggregatedDataProviderTopLayer.prototype.z = function (a, b, c, d) {
this.j.add(this.x(a));
this.i.add(b);
this.k.add(c);
this.l.add1(d);
};
AggregatedDataProviderTopLayer.prototype.x = function (a) {
if (a == null) {
return null;
}
if (stringStartsWith(a, "[")) {
return a.substr(1, a.length - 2);
}
return a;
};
Object.defineProperty(AggregatedDataProviderTopLayer.prototype, "j", {
get: function () {
return this.e;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AggregatedDataProviderTopLayer.prototype, "i", {
get: function () {
return this.d;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AggregatedDataProviderTopLayer.prototype, "l", {
get: function () {
return this.g;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AggregatedDataProviderTopLayer.prototype, "k", {
get: function () {
return this.f;
},
enumerable: false,
configurable: true
});
AggregatedDataProviderTopLayer.$t = markType(AggregatedDataProviderTopLayer, 'AggregatedDataProviderTopLayer');
return AggregatedDataProviderTopLayer;
}(Base));
export { AggregatedDataProviderTopLayer };