igniteui-react-core
Version:
Ignite UI React Core.
643 lines (642 loc) • 19.3 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, Type, enumGetBox, EnumUtil, markType } from "./type";
import { BaseControlTheme_$type } from "./BaseControlTheme";
import { NativeUICursor_$type } from "./NativeUICursor";
import { Visibility_$type } from "./Visibility";
import { INativeUIElementFactory_$type } from "./INativeUIElementFactory";
import { List$1 } from "./List$1";
import { NativeUI } from "./NativeUI";
/**
* @hidden
*/
export var INativeUIElementBridge_$type = /*@__PURE__*/ new Type(null, 'INativeUIElementBridge');
/**
* @hidden
*/
export var INativeUIContainerBridge_$type = /*@__PURE__*/ new Type(null, 'INativeUIContainerBridge', null, [INativeUIElementBridge_$type]);
/**
* @hidden
*/
var NativeUIComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(NativeUIComponent, _super);
function NativeUIComponent() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.j = null;
_this.ao = null;
_this.d = null;
_this.an = null;
_this.p = null;
_this.r = null;
_this.l = null;
_this.m = null;
return _this;
}
NativeUIComponent.prototype.a1 = function () {
if (this.j != null) {
this.j.bp(this);
}
};
NativeUIComponent.prototype.bf = function (a) {
return this.d.getDesiredSize(this.an, a);
};
NativeUIComponent.prototype.be = function () {
return this.d.getBoundingRect(this.an);
};
NativeUIComponent.prototype.t = function (a) {
return this.d.contains(this.an, a);
};
NativeUIComponent.prototype.az = function () {
this.d.focus(this.an);
};
NativeUIComponent.prototype.a0 = function () {
this.d.focusWithScrollPrevented(this.an);
};
NativeUIComponent.prototype.get_e = function () {
return 8;
};
Object.defineProperty(NativeUIComponent.prototype, "e", {
get: function () {
return this.get_e();
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "am", {
get: function () {
return this.d.getMethodTarget(this.an);
},
enumerable: false,
configurable: true
});
NativeUIComponent.as = function (a) {
if (!NativeUIComponent.w.contains(a)) {
NativeUIComponent.w.add(a);
}
};
NativeUIComponent.a = function (a, b) {
var c = new List$1(INativeUIElementFactory_$type, 0);
var d = new List$1(INativeUIElementFactory_$type, 0);
for (var e = 0; e < a.length; e++) {
var f = a[e];
var g = b[e];
for (var h = 0; h < NativeUIComponent.w.count; h++) {
if (NativeUIComponent.w._inner[h].flavor == g) {
d.add(NativeUIComponent.w._inner[h]);
}
}
for (var i = 0; i < d.count; i++) {
if (d._inner[i].supportsComponent(f)) {
c.add(d._inner[i]);
break;
}
}
if (c.count - 1 == e) {
d.clear();
continue;
}
for (var j = 0; j < NativeUIComponent.w.count; j++) {
if (NativeUIComponent.w._inner[j].supportsComponent(f)) {
c.add(NativeUIComponent.w._inner[j]);
break;
}
}
if (c.count - 1 != e) {
c.add(null);
}
d.clear();
}
return c.toArray();
};
NativeUIComponent.v = function (a, b) {
var c = NativeUIComponent.a([a], [b]);
return c != null && c.length > 0 && c[0] != null;
};
NativeUIComponent.at = function (a, b, c, d) {
var e = NativeUIComponent.a([b], [c]);
if (e.length > 0 && e[0] != null) {
e[0].createComponent(a, b, d);
}
};
NativeUIComponent.au = function (a, b, c) {
NativeUIComponent.at(a, b, 0, c);
};
NativeUIComponent.av = function (a, b, c, d) {
var e = 0;
var f = new Array(b.length);
var g = NativeUIComponent.a(b, c);
var _loop_1 = function (h) {
var i = g[h];
var j = b[h];
if (i != null) {
i.createComponent(a, j, function (k) {
f[h] = k;
e++;
if (e == b.length) {
d(f);
}
});
}
else {
f[h] = null;
e++;
if (e == b.length) {
d(f);
}
}
};
for (var h = 0; h < g.length; h++) {
_loop_1(h);
}
};
NativeUIComponent.aw = function (a, b, c) {
var d = new Array(b.length);
for (var e = 0; e < d.length; e++) {
d[e] = 0;
}
NativeUIComponent.av(a, b, d, c);
};
NativeUIComponent.ax = function (a, b, c, d) {
var e = NativeUIComponent.a([b], [c]);
if (e.length > 0 && e[0] != null) {
e[0].createComponentSync(a, b, d);
}
};
NativeUIComponent.ay = function (a, b, c) {
NativeUIComponent.ax(a, b, 0, c);
};
NativeUIComponent.prototype.al = function (a) {
return this.d.getTargetForProperty(a, this.an);
};
NativeUIComponent.prototype.ai = function (a) {
var b = this.al(a);
return NativeUI.l(a, b);
};
NativeUIComponent.prototype.a6 = function (a, b) {
var c = this.al(a);
this.d.beforeSetNativeValue(a, b);
NativeUI.ag(a, c, b);
this.d.afterSetNativeValue(a, b);
};
NativeUIComponent.prototype.ag = function (a) {
var b = this.ak(a);
return this.ah(b, a);
};
NativeUIComponent.prototype.a4 = function (a, b) {
var c = this.ak(a);
this.a5(c, a, b);
};
NativeUIComponent.prototype.aq = function (a, b) {
var c = this.aj(a);
this.ar(c, this, a, b);
};
NativeUIComponent.prototype.ar = function (a, b, c, d) {
this.d.addHandler(a, b, c, d);
};
NativeUIComponent.prototype.a2 = function (a, b) {
var c = this.aj(a);
this.a3(c, this, a, b);
};
NativeUIComponent.prototype.a3 = function (a, b, c, d) {
this.d.removeHandler(a, b, c, d);
};
NativeUIComponent.prototype.ah = function (a, b) {
return this.d.getValue(a, b);
};
NativeUIComponent.prototype.a5 = function (a, b, c) {
this.d.setValue(a, b, c);
};
NativeUIComponent.prototype.ak = function (a) {
var b = this.an;
b = this.d.getTargetForBuildInProperty(b, a);
return b;
};
NativeUIComponent.prototype.aj = function (a) {
var b = this.an;
b = this.d.getTargetForBuildInEvent(b, a);
return b;
};
Object.defineProperty(NativeUIComponent.prototype, "ap", {
get: function () {
return this.ag(108);
},
set: function (a) {
this.a4(108, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "ae", {
get: function () {
return this.ai(9);
},
set: function (a) {
this.a6(9, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "y", {
get: function () {
return this.ai(10);
},
set: function (a) {
this.a6(10, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "aa", {
get: function () {
return this.ai(1);
},
set: function (a) {
this.a6(1, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "c", {
get: function () {
var a = this.ag(18);
return EnumUtil.getEnumValue(BaseControlTheme_$type, a);
},
set: function (a) {
this.a4(18, enumGetBox(BaseControlTheme_$type, a));
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "a8", {
get: function () {
return this.ai(2);
},
set: function (a) {
this.a6(2, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "a9", {
get: function () {
return this.ai(3);
},
set: function (a) {
this.a6(3, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "bg", {
get: function () {
return this.ai(4);
},
set: function (a) {
this.a6(4, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "a7", {
get: function () {
return this.ai(5);
},
set: function (a) {
this.a6(5, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "bi", {
get: function () {
return this.ai(6);
},
set: function (a) {
this.a6(6, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "ba", {
get: function () {
return this.ai(7);
},
set: function (a) {
this.a6(7, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "x", {
get: function () {
return this.ai(8);
},
set: function (a) {
this.a6(8, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "z", {
get: function () {
return this.ai(11);
},
set: function (a) {
this.a6(11, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "ad", {
get: function () {
return this.ai(12);
},
set: function (a) {
this.a6(12, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "bh", {
get: function () {
return this.ai(13);
},
set: function (a) {
this.a6(13, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "bd", {
get: function () {
return this.ai(14);
},
set: function (a) {
this.a6(14, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "bc", {
get: function () {
return this.ai(15);
},
set: function (a) {
this.a6(15, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "bb", {
get: function () {
return this.ai(16);
},
set: function (a) {
this.a6(16, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "ac", {
get: function () {
return this.ai(17);
},
set: function (a) {
this.a6(17, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "b", {
get: function () {
return this.ai(18);
},
set: function (a) {
this.a6(18, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "ab", {
get: function () {
return this.ai(19);
},
set: function (a) {
this.a6(19, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "f", {
get: function () {
return this.d.getHorizontalAlignment(this.an);
},
set: function (a) {
this.d.setHorizontalAlignment(this.an, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "h", {
get: function () {
return this.d.getVerticalAlignment(this.an);
},
set: function (a) {
this.d.setVerticalAlignment(this.an, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "g", {
get: function () {
return this.d.getHorizontalContentAlignment(this.an);
},
set: function (a) {
this.d.setHorizontalContentAlignment(this.an, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "i", {
get: function () {
return this.d.getVerticalContentAlignment(this.an);
},
set: function (a) {
this.d.setVerticalContentAlignment(this.an, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "k", {
get: function () {
return EnumUtil.getEnumValue(NativeUICursor_$type, this.ai(20));
},
set: function (a) {
this.a6(20, enumGetBox(NativeUICursor_$type, a));
},
enumerable: false,
configurable: true
});
NativeUIComponent.prototype.get_u = function () {
return this.ai(21);
};
NativeUIComponent.prototype.set_u = function (a) {
this.a6(21, a);
};
Object.defineProperty(NativeUIComponent.prototype, "u", {
get: function () {
return this.get_u();
},
set: function (a) {
this.set_u(a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "bj", {
get: function () {
return EnumUtil.getEnumValue(Visibility_$type, this.ai(24));
},
set: function (a) {
this.a6(24, enumGetBox(Visibility_$type, a));
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "q", {
get: function () {
return this.p;
},
set: function (a) {
var b = this.p;
this.p = a;
if (this.p != b) {
if (b != null) {
this.a2(7, b);
}
if (this.p != null) {
this.aq(7, this.p);
}
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "s", {
get: function () {
return this.r;
},
set: function (a) {
var b = this.r;
this.r = a;
if (this.r != b) {
if (b != null) {
this.a2(8, b);
}
if (this.p != null) {
this.aq(8, this.r);
}
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "n", {
get: function () {
return this.l;
},
set: function (a) {
var b = this.l;
this.l = a;
if (this.l != b) {
if (b != null) {
this.a2(13, b);
}
if (this.l != null) {
this.aq(13, this.l);
}
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIComponent.prototype, "o", {
get: function () {
return this.m;
},
set: function (a) {
var b = this.m;
this.m = a;
if (this.m != b) {
if (b != null) {
this.a2(14, b);
}
if (this.m != null) {
this.aq(14, this.m);
}
}
},
enumerable: false,
configurable: true
});
NativeUIComponent.prototype.af = function () {
return this.d.exportVisualData(this.am);
};
NativeUIComponent.$t = markType(NativeUIComponent, 'NativeUIComponent');
NativeUIComponent.w = new List$1(INativeUIElementFactory_$type, 0);
return NativeUIComponent;
}(Base));
export { NativeUIComponent };
/**
* @hidden
*/
var NativeUIContainer = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(NativeUIContainer, _super);
function NativeUIContainer() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(NativeUIContainer.prototype, "bm", {
get: function () {
return this.bk.getChildrenCount(this.am);
},
enumerable: false,
configurable: true
});
Object.defineProperty(NativeUIContainer.prototype, "bk", {
get: function () {
return this.d;
},
enumerable: false,
configurable: true
});
NativeUIContainer.prototype.bl = function (a) {
return this.bk.getChildAt(this.am, a);
};
NativeUIContainer.prototype.bq = function (a) {
var b = this.bl(a);
if (b != null) {
b.j = null;
}
this.bk.removeChildAt(this.am, a);
};
NativeUIContainer.prototype.bn = function (a) {
a.j = this;
this.bk.addChild(this.am, a);
};
NativeUIContainer.prototype.bo = function (a, b) {
b.j = this;
this.bk.insertChild(this.am, a, b);
};
NativeUIContainer.prototype.bp = function (a) {
a.j = null;
this.bk.removeChild(this.am, a);
};
NativeUIContainer.$t = markType(NativeUIContainer, 'NativeUIContainer', NativeUIComponent.$);
return NativeUIContainer;
}(NativeUIComponent));
export { NativeUIContainer };