UNPKG

igniteui-react-inputs

Version:

Ignite UI React input components.

328 lines (327 loc) 11.3 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 } from "tslib"; import { XComponentBridge } from "./XComponentBridge"; import { INativeUIPopupBridge_$type } from "igniteui-react-core"; import { List$1 } from "igniteui-react-core"; import { NativeUIComponent } from "igniteui-react-core"; import { runOn, delegateCombine, delegateRemove, enumGetBox, typeGetValue, EnumUtil, markType } from "igniteui-react-core"; import { NativeUIPopupOpenedEventArgs } from "igniteui-react-core"; import { NativeUIPopupClosedEventArgs } from "igniteui-react-core"; import { NativeUIMouseEventArgs } from "igniteui-react-core"; import { NativeUIFocusEventArgs } from "igniteui-react-core"; import { NativeUIPopupMeasuringContentEventArgs } from "igniteui-react-core"; import { NativeUIPopupAnimationType_$type } from "igniteui-react-core"; import { NativeUIPopupPointerPosition_$type } from "igniteui-react-core"; /** * @hidden */ var XPopupBridge = /** @class */ /*@__PURE__*/ (function (_super) { __extends(XPopupBridge, _super); function XPopupBridge(a) { var _this = _super.call(this, a) || this; _this.ak = null; _this.af = null; _this.ai = null; _this.aj = null; _this.ag = null; _this.ah = null; _this.ad = null; _this.ab = null; _this.z = null; _this.aa = null; _this.x = null; _this.y = null; _this.ac = null; _this.w = null; _this.ae = null; _this.ae = new List$1(NativeUIComponent.$, 0); return _this; } XPopupBridge.prototype.contains = function (a, b) { var c = this.t; return c.contains(b); }; XPopupBridge.prototype.addHandler = function (a, b, c, d) { var e = a; switch (c) { case 5: e.onPopup = delegateCombine(e.onPopup, runOn(this, this.aq)); this.ad = d; this.ak = b; break; case 6: e.onClosed = delegateCombine(e.onClosed, runOn(this, this.al)); this.ab = d; this.af = b; break; case 7: e.popupMouseEnter = delegateCombine(e.popupMouseEnter, runOn(this, this.ao)); this.z = d; this.ai = b; break; case 8: e.popupMouseLeave = delegateCombine(e.popupMouseLeave, runOn(this, this.ap)); this.aa = d; this.aj = b; break; case 13: e.popupGotFocus = delegateCombine(e.popupGotFocus, runOn(this, this.am)); this.x = d; this.ag = b; break; case 14: e.popupLostFocus = delegateCombine(e.popupLostFocus, runOn(this, this.an)); this.y = d; this.ah = b; break; case 29: e.measuringContentSize = delegateCombine(e.measuringContentSize, runOn(this, this.ar)); this.ac = d; this.w = b; break; } }; XPopupBridge.prototype.ar = function (a, b) { if (this.ac != null) { this.ac(this.w, new NativeUIPopupMeasuringContentEventArgs()); } }; XPopupBridge.prototype.removeHandler = function (a, b, c, d) { var e = a; switch (c) { case 5: e.onPopup = delegateRemove(e.onPopup, runOn(this, this.aq)); this.ad = null; this.ak = null; break; case 6: e.onClosed = delegateRemove(e.onClosed, runOn(this, this.al)); this.ab = null; this.af = null; break; case 7: e.popupMouseEnter = delegateRemove(e.popupMouseEnter, runOn(this, this.ao)); this.z = null; this.ai = null; break; case 8: e.popupMouseLeave = delegateRemove(e.popupMouseLeave, runOn(this, this.ap)); this.aa = null; this.aj = null; break; case 13: e.popupGotFocus = delegateRemove(e.popupGotFocus, runOn(this, this.am)); this.x = null; this.ag = null; break; case 14: e.popupLostFocus = delegateRemove(e.popupLostFocus, runOn(this, this.an)); this.y = null; this.ah = null; break; case 29: e.measuringContentSize = delegateRemove(e.measuringContentSize, runOn(this, this.ar)); this.ac = null; this.w = null; break; } }; XPopupBridge.prototype.aq = function (a, b) { if (this.ad != null) { this.ad(this.ak, new NativeUIPopupOpenedEventArgs()); } }; XPopupBridge.prototype.al = function (a, b) { if (this.ab != null) { this.ab(this.af, new NativeUIPopupClosedEventArgs()); } }; XPopupBridge.prototype.ao = function (a, b) { if (this.z != null) { this.z(this.ai, new NativeUIMouseEventArgs()); } }; XPopupBridge.prototype.ap = function (a, b) { if (this.aa != null) { this.aa(this.aj, new NativeUIMouseEventArgs()); } }; XPopupBridge.prototype.am = function (a, b) { if (this.x != null) { this.x(this.ag, new NativeUIFocusEventArgs()); } }; XPopupBridge.prototype.an = function (a, b) { if (this.y != null) { this.y(this.ah, ((function () { var $ret = new NativeUIFocusEventArgs(); $ret.b = b.b; $ret.a = b.a; return $ret; })())); } }; XPopupBridge.prototype.getValue = function (a, b) { var c = a; switch (b) { case 22: return c.ax; case 60: return c.av; case 61: return c.aq; case 25: return c.am; case 26: return c.a9; case 17: return c.a1; case 23: return c.c0; case 35: switch (c.p) { case 1: return enumGetBox(NativeUIPopupAnimationType_$type, 1); default: return enumGetBox(NativeUIPopupAnimationType_$type, 0); } case 36: return c.at; case 37: return c.as; case 40: return c.bb; case 41: return c.au; case 43: switch (c.v) { case 1: return enumGetBox(NativeUIPopupPointerPosition_$type, 1); default: return enumGetBox(NativeUIPopupPointerPosition_$type, 2); } case 42: return c.c4; case 39: return c.ao; case 62: return c.a4; case 110: return c.ay; } return _super.prototype.getValue.call(this, a, b); }; XPopupBridge.prototype.setValue = function (a, b, c) { var d = a; switch (b) { case 25: d.am = c; break; case 26: d.a9 = typeGetValue(c); break; case 17: d.a1 = c; break; case 23: d.c0 = c; break; case 35: switch (EnumUtil.getEnumValue(NativeUIPopupAnimationType_$type, c)) { case 1: d.p = 1; break; default: d.p = 0; break; } break; case 36: d.at = c; break; case 37: d.as = c; break; case 40: d.bb = typeGetValue(c); break; case 41: d.au = c; break; case 42: d.c4 = c; break; case 43: switch (EnumUtil.getEnumValue(NativeUIPopupPointerPosition_$type, c)) { case 1: d.v = 1; break; case 2: d.v = 2; break; } break; case 39: d.ao = c; break; case 62: d.a4 = c; break; case 110: d.ay = c; break; } _super.prototype.setValue.call(this, a, b, c); }; XPopupBridge.prototype.showRelativeToExclusionRect = function (a, b, c, d) { a.showRelativeToExclusionRect(b, this.v(c), this.u(d)); }; XPopupBridge.prototype.showRelativeToTarget = function (a, b, c, d) { var e = b.an.getNativeElement(); a.cr(e, this.v(c), this.u(d)); }; XPopupBridge.prototype.close = function (a) { a.b6(); }; XPopupBridge.prototype.notifyContentSizeChanged = function (a) { a.b9(); }; XPopupBridge.prototype.notifyExclusionRectChanged = function (a, b) { a.ca(b); }; XPopupBridge.prototype.v = function (a) { switch (a) { case 0: return 0; case 1: return 1; case 2: return 2; case 3: return 3; case 4: return 4; default: return 0; } }; XPopupBridge.prototype.u = function (a) { switch (a) { case 0: return 0; case 2: return 2; case 1: return 1; case 3: return 3; default: return 0; } }; XPopupBridge.prototype.exportVisualData = function (a) { return a.bg(); }; XPopupBridge.prototype.addChild = function (a, b) { this.ae.add(b); var c = a; c.appendPopupContent(b.an); }; XPopupBridge.prototype.insertChild = function (a, b, c) { this.ae.add(c); var d = a; d.appendPopupContent(c.an); }; XPopupBridge.prototype.getChildAt = function (a, b) { return this.ae._inner[b]; }; XPopupBridge.prototype.getChildrenCount = function (a) { return this.ae.count; }; XPopupBridge.prototype.removeChild = function (a, b) { var c = a; c.removePopupContent(b.an); this.ae.remove(b); }; XPopupBridge.prototype.removeChildAt = function (a, b) { var c = a; c.removePopupContent(this.ae._inner[b].an); this.ae.removeAt(b); }; XPopupBridge.$t = markType(XPopupBridge, 'XPopupBridge', XComponentBridge.$, [INativeUIPopupBridge_$type]); return XPopupBridge; }(XComponentBridge)); export { XPopupBridge };