igniteui-react-core
Version:
Ignite UI React Core.
114 lines (113 loc) • 3.89 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, 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
*/
export let DescriptionTreeNode = /*@__PURE__*/ (() => {
class DescriptionTreeNode extends Base {
constructor() {
super();
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;
}
}
b() {
let a = new DescriptionTreeNode();
a.g = this.g;
a.i = this.i;
for (let b = 0; b < this.e.count; b++) {
let c = this.e._inner[b].c;
let d = this.e._inner[b].a;
let e = this.e._inner[b].b;
if (typeCast(DescriptionTreeNode.$, e) !== null) {
e = e.b();
}
if (typeCast(Array_$type, e) !== null) {
let f = e;
let g = new Array(f.length);
for (let 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;
}
j(a, b) {
let c = new DescriptionPropertyValue();
c.c = a;
c.b = b;
this.d.addItem(a.toLowerCase(), c);
this.e.add(c);
}
k(a, b, c) {
let d = new DescriptionPropertyValue();
d.c = a;
d.b = b;
d.a = c;
this.d.addItem(a.toLowerCase(), d);
this.e.add(d);
}
n(a, b) {
if (this.d.containsKey(a.toLowerCase())) {
let c = this.d.item(a.toLowerCase());
c.b = b;
}
else {
this.j(a, b);
}
}
o(a, b, c) {
if (this.d.containsKey(a.toLowerCase())) {
let d = this.d.item(a.toLowerCase());
d.b = b;
}
else {
this.k(a, b, c);
}
}
a(a) {
return this.d.item(a.toLowerCase());
}
c(a) {
return this.d.containsKey(a.toLowerCase());
}
m(a) {
if (this.d.containsKey(a.toLowerCase())) {
let b = this.d.item(a.toLowerCase());
this.d.removeItem(a.toLowerCase());
this.e.remove(b);
}
}
l() {
this.d.clear();
this.e.clear();
}
f() {
return this.e;
}
}
DescriptionTreeNode.$t = /*@__PURE__*/ markType(DescriptionTreeNode, 'DescriptionTreeNode');
DescriptionTreeNode.h = 0;
return DescriptionTreeNode;
})();