UNPKG

igniteui-angular-core

Version:

Ignite UI Angular Core logic used in multiple UI components.

111 lines (110 loc) 4.06 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 { NativeUIElementBridge } from "./NativeUIElementBridge"; import { INativeUIInputBridge_$type } from "./INativeUIInputBridge"; import { runOn, enumGetBox, EnumUtil, markType } from "./type"; import { NativeUIInputChangingEventArgs } from "./NativeUIInputChangingEventArgs"; import { NativeUIDisplayDensity_$type } from "./NativeUIDisplayDensity"; /** * @hidden */ var IgcInputBridge = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgcInputBridge, _super); function IgcInputBridge() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.t = null; _this.s = null; _this.u = null; return _this; } IgcInputBridge.prototype.addHandler = function (a, b, c, d) { switch (c) { case 0: var e = a; this.t = e.listen("igcInput", runOn(this, this.v)); this.s = d; this.u = b; break; } }; IgcInputBridge.prototype.v = function (a) { if (this.s != null) { var b = new NativeUIInputChangingEventArgs(); this.s(this.u, b); } }; IgcInputBridge.prototype.getValue = function (a, b) { switch (b) { case 2: return a.getProperty("value"); case 1: var c = a.getProperty("size"); var d = 1; switch (c) { case "small": d = 3; break; case "medium": d = 2; break; case "large": d = 1; break; default: d = 1; break; } return enumGetBox(NativeUIDisplayDensity_$type, d); } return null; }; IgcInputBridge.prototype.removeHandler = function (a, b, c, d) { switch (c) { case 1: if (this.t != null) { this.t(); } this.s = null; this.u = null; break; } }; IgcInputBridge.prototype.setValue = function (a, b, c) { switch (b) { case 3: a.setProperty("value", c); break; case 1: var d = "large"; switch (EnumUtil.getEnumValue(NativeUIDisplayDensity_$type, c)) { case 0: d = "large"; break; case 1: d = "large"; break; case 3: d = "small"; break; case 2: d = "medium"; break; } a.setProperty("size", d); break; } }; IgcInputBridge.prototype.select = function (a) { }; IgcInputBridge.prototype.setSelectionRange = function (a, b, c) { }; IgcInputBridge.prototype.resetIsExpanded = function (a) { }; IgcInputBridge.$t = markType(IgcInputBridge, 'IgcInputBridge', NativeUIElementBridge.$, [INativeUIInputBridge_$type]); return IgcInputBridge; }(NativeUIElementBridge)); export { IgcInputBridge };