UNPKG

igniteui-react-core

Version:
653 lines (652 loc) 19.6 kB
/* 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, __read, __spreadArray } 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.apply(this, __spreadArray([], __read(arguments), false)) || this; _this.j = null; _this.ap = null; _this.d = null; _this.ao = null; _this.p = null; _this.r = null; _this.l = null; _this.m = null; return _this; } NativeUIComponent.prototype.a2 = function () { if (this.j != null) { this.j.bq(this); } }; NativeUIComponent.prototype.bg = function (a) { return this.d.getDesiredSize(this.ao, a); }; NativeUIComponent.prototype.bf = function () { return this.d.getBoundingRect(this.ao); }; NativeUIComponent.prototype.t = function (a) { return this.d.contains(this.ao, a); }; NativeUIComponent.prototype.a0 = function () { this.d.focus(this.ao); }; NativeUIComponent.prototype.a1 = function () { this.d.focusWithScrollPrevented(this.ao); }; 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, "an", { get: function () { return this.d.getMethodTarget(this.ao); }, enumerable: false, configurable: true }); NativeUIComponent.at = function (a) { if (!NativeUIComponent.x.contains(a)) { NativeUIComponent.x.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.x.count; h++) { if (NativeUIComponent.x._inner[h].flavor == g) { d.add(NativeUIComponent.x._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.x.count; j++) { if (NativeUIComponent.x._inner[j].supportsComponent(f)) { c.add(NativeUIComponent.x._inner[j]); break; } } if (c.count - 1 != e) { c.add(null); } d.clear(); } return c.toArray(); }; NativeUIComponent.w = function (a, b) { var c = NativeUIComponent.a([a], [b]); return c != null && c.length > 0 && c[0] != null; }; NativeUIComponent.au = 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.av = function (a, b, c) { NativeUIComponent.au(a, b, 0, c); }; NativeUIComponent.aw = 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.ax = function (a, b, c) { var d = new Array(b.length); for (var e = 0; e < d.length; e++) { d[e] = 0; } NativeUIComponent.aw(a, b, d, c); }; NativeUIComponent.ay = 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.az = function (a, b, c) { NativeUIComponent.ay(a, b, 0, c); }; NativeUIComponent.prototype.am = function (a) { return this.d.getTargetForProperty(a, this.ao); }; NativeUIComponent.prototype.aj = function (a) { var b = this.am(a); return NativeUI.l(a, b); }; NativeUIComponent.prototype.a7 = function (a, b) { var c = this.am(a); this.d.beforeSetNativeValue(a, b); NativeUI.aj(a, c, b); this.d.afterSetNativeValue(a, b); }; NativeUIComponent.prototype.ah = function (a) { var b = this.al(a); return this.ai(b, a); }; NativeUIComponent.prototype.a5 = function (a, b) { var c = this.al(a); this.a6(c, a, b); }; NativeUIComponent.prototype.ar = function (a, b) { var c = this.ak(a); this.as(c, this, a, b); }; NativeUIComponent.prototype.as = function (a, b, c, d) { this.d.addHandler(a, b, c, d); }; NativeUIComponent.prototype.a3 = function (a, b) { var c = this.ak(a); this.a4(c, this, a, b); }; NativeUIComponent.prototype.a4 = function (a, b, c, d) { this.d.removeHandler(a, b, c, d); }; NativeUIComponent.prototype.ai = function (a, b) { return this.d.getValue(a, b); }; NativeUIComponent.prototype.a6 = function (a, b, c) { this.d.setValue(a, b, c); }; NativeUIComponent.prototype.al = function (a) { var b = this.ao; b = this.d.getTargetForBuildInProperty(b, a); return b; }; NativeUIComponent.prototype.ak = function (a) { var b = this.ao; b = this.d.getTargetForBuildInEvent(b, a); return b; }; Object.defineProperty(NativeUIComponent.prototype, "aq", { get: function () { return this.ah(109); }, set: function (a) { this.a5(109, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "v", { get: function () { return this.ah(122); }, set: function (a) { this.a5(122, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "af", { get: function () { return this.aj(9); }, set: function (a) { this.a7(9, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "z", { get: function () { return this.aj(10); }, set: function (a) { this.a7(10, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "ab", { get: function () { return this.aj(1); }, set: function (a) { this.a7(1, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "c", { get: function () { var a = this.ah(18); return EnumUtil.getEnumValue(BaseControlTheme_$type, a); }, set: function (a) { this.a5(18, enumGetBox(BaseControlTheme_$type, a)); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "a9", { get: function () { return this.aj(2); }, set: function (a) { this.a7(2, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "ba", { get: function () { return this.aj(3); }, set: function (a) { this.a7(3, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "bh", { get: function () { return this.aj(4); }, set: function (a) { this.a7(4, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "a8", { get: function () { return this.aj(5); }, set: function (a) { this.a7(5, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "bj", { get: function () { return this.aj(6); }, set: function (a) { this.a7(6, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "bb", { get: function () { return this.aj(7); }, set: function (a) { this.a7(7, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "y", { get: function () { return this.aj(8); }, set: function (a) { this.a7(8, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "aa", { get: function () { return this.aj(11); }, set: function (a) { this.a7(11, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "ae", { get: function () { return this.aj(12); }, set: function (a) { this.a7(12, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "bi", { get: function () { return this.aj(13); }, set: function (a) { this.a7(13, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "be", { get: function () { return this.aj(14); }, set: function (a) { this.a7(14, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "bd", { get: function () { return this.aj(15); }, set: function (a) { this.a7(15, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "bc", { get: function () { return this.aj(16); }, set: function (a) { this.a7(16, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "ad", { get: function () { return this.aj(17); }, set: function (a) { this.a7(17, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "b", { get: function () { return this.aj(18); }, set: function (a) { this.a7(18, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "ac", { get: function () { return this.aj(19); }, set: function (a) { this.a7(19, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "f", { get: function () { return this.d.getHorizontalAlignment(this.ao); }, set: function (a) { this.d.setHorizontalAlignment(this.ao, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "h", { get: function () { return this.d.getVerticalAlignment(this.ao); }, set: function (a) { this.d.setVerticalAlignment(this.ao, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "g", { get: function () { return this.d.getHorizontalContentAlignment(this.ao); }, set: function (a) { this.d.setHorizontalContentAlignment(this.ao, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "i", { get: function () { return this.d.getVerticalContentAlignment(this.ao); }, set: function (a) { this.d.setVerticalContentAlignment(this.ao, a); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIComponent.prototype, "k", { get: function () { return EnumUtil.getEnumValue(NativeUICursor_$type, this.aj(20)); }, set: function (a) { this.a7(20, enumGetBox(NativeUICursor_$type, a)); }, enumerable: false, configurable: true }); NativeUIComponent.prototype.get_u = function () { return this.aj(21); }; NativeUIComponent.prototype.set_u = function (a) { this.a7(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, "bk", { get: function () { return EnumUtil.getEnumValue(Visibility_$type, this.aj(24)); }, set: function (a) { this.a7(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.a3(7, b); } if (this.p != null) { this.ar(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.a3(8, b); } if (this.p != null) { this.ar(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.a3(13, b); } if (this.l != null) { this.ar(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.a3(14, b); } if (this.m != null) { this.ar(14, this.m); } } }, enumerable: false, configurable: true }); NativeUIComponent.prototype.ag = function () { return this.d.exportVisualData(this.an); }; NativeUIComponent.$t = markType(NativeUIComponent, 'NativeUIComponent'); NativeUIComponent.x = 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, "bn", { get: function () { return this.bl.getChildrenCount(this.an); }, enumerable: false, configurable: true }); Object.defineProperty(NativeUIContainer.prototype, "bl", { get: function () { return this.d; }, enumerable: false, configurable: true }); NativeUIContainer.prototype.bm = function (a) { return this.bl.getChildAt(this.an, a); }; NativeUIContainer.prototype.br = function (a) { var b = this.bm(a); if (b != null) { b.j = null; } this.bl.removeChildAt(this.an, a); }; NativeUIContainer.prototype.bo = function (a) { a.j = this; this.bl.addChild(this.an, a); }; NativeUIContainer.prototype.bp = function (a, b) { b.j = this; this.bl.insertChild(this.an, a, b); }; NativeUIContainer.prototype.bq = function (a) { a.j = null; this.bl.removeChild(this.an, a); }; NativeUIContainer.$t = markType(NativeUIContainer, 'NativeUIContainer', NativeUIComponent.$); return NativeUIContainer; }(NativeUIComponent)); export { NativeUIContainer };