igniteui-react-core
Version:
Ignite UI React Core.
116 lines (115 loc) • 4.09 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, typeCast, Array_$type, String_$type, markType } from "./type";
import { List$1 } from "./List$1";
import { DescriptionPropertyValue } from "./DescriptionPropertyValue";
import { Dictionary$2 } from "./Dictionary$2";
/**
* @hidden
*/
var DescriptionTreeNode = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(DescriptionTreeNode, _super);
function DescriptionTreeNode() {
var _this = _super.call(this) || this;
_this.g = 0;
_this.e = new List$1(DescriptionPropertyValue.$, 0);
_this.d = new Dictionary$2(String_$type, DescriptionPropertyValue.$, 0);
_this.i = null;
_this.g = DescriptionTreeNode.h;
DescriptionTreeNode.h++;
if (DescriptionTreeNode.h >= 0x7FFFFFFFFFFFFFFF) {
DescriptionTreeNode.h = 0;
}
return _this;
}
DescriptionTreeNode.prototype.b = function () {
var a = new DescriptionTreeNode();
a.g = this.g;
a.i = this.i;
for (var b = 0; b < this.e.count; b++) {
var c = this.e._inner[b].c;
var d = this.e._inner[b].a;
var e = this.e._inner[b].b;
if (typeCast(DescriptionTreeNode.$, e) !== null) {
e = e.b();
}
if (typeCast(Array_$type, e) !== null) {
var f = e;
var g = new Array(f.length);
for (var h = 0; h < f.length; h++) {
if (typeCast(DescriptionTreeNode.$, f[h]) !== null) {
g[h] = f[h].b();
}
else {
g[h] = f[h];
}
}
e = g;
}
a.k(c, e, d);
}
return a;
};
DescriptionTreeNode.prototype.j = function (a, b) {
var c = new DescriptionPropertyValue();
c.c = a;
c.b = b;
this.d.addItem(a.toLowerCase(), c);
this.e.add(c);
};
DescriptionTreeNode.prototype.k = function (a, b, c) {
var d = new DescriptionPropertyValue();
d.c = a;
d.b = b;
d.a = c;
this.d.addItem(a.toLowerCase(), d);
this.e.add(d);
};
DescriptionTreeNode.prototype.n = function (a, b) {
if (this.d.containsKey(a.toLowerCase())) {
var c = this.d.item(a.toLowerCase());
c.b = b;
}
else {
this.j(a, b);
}
};
DescriptionTreeNode.prototype.o = function (a, b, c) {
if (this.d.containsKey(a.toLowerCase())) {
var d = this.d.item(a.toLowerCase());
d.b = b;
}
else {
this.k(a, b, c);
}
};
DescriptionTreeNode.prototype.a = function (a) {
return this.d.item(a.toLowerCase());
};
DescriptionTreeNode.prototype.c = function (a) {
return this.d.containsKey(a.toLowerCase());
};
DescriptionTreeNode.prototype.m = function (a) {
if (this.d.containsKey(a.toLowerCase())) {
var b = this.d.item(a.toLowerCase());
this.d.removeItem(a.toLowerCase());
this.e.remove(b);
}
};
DescriptionTreeNode.prototype.l = function () {
this.d.clear();
this.e.clear();
};
DescriptionTreeNode.prototype.f = function () {
return this.e;
};
DescriptionTreeNode.$t = markType(DescriptionTreeNode, 'DescriptionTreeNode');
DescriptionTreeNode.h = 0;
return DescriptionTreeNode;
}(Base));
export { DescriptionTreeNode };