UNPKG

igniteui-angular-core

Version:

Ignite UI Angular Core logic used in multiple UI components.

139 lines (138 loc) 4.54 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 { EventArgs, markType } from "./type"; /** * @hidden */ var KeyEventArgs = /** @class */ /*@__PURE__*/ (function (_super) { __extends(KeyEventArgs, _super); function KeyEventArgs(a) { var _rest = []; for (var _i = 1; _i < arguments.length; _i++) { _rest[_i - 1] = arguments[_i]; } var _this = this; a = (a == void 0) ? 0 : a; switch (a) { case 0: { var c = _rest[0]; var d = [c.which, c.altKey, c.shiftKey, c.ctrlKey, c]; { var f = d[0]; var g = d[1]; var h = d[2]; var i = d[3]; var j = d[4]; _this = _super.call(this) || this; _this.h = 0; _this.n = 0; _this.j = null; _this.g = null; _this.b = false; _this.j = j; _this.h = f; _this.n = KeyEventArgs.o(g, h, i); } _this.g = c; } break; case 1: { var c = _rest[0]; var d = _rest[1]; var e = _rest[2]; var f = _rest[3]; var g = _rest[4]; _this = _super.call(this) || this; _this.h = 0; _this.n = 0; _this.j = null; _this.g = null; _this.b = false; _this.j = g; _this.h = c; _this.n = KeyEventArgs.o(d, e, f); } break; } return _this; } Object.defineProperty(KeyEventArgs.prototype, "originalEvent", { get: function () { return this.j; }, enumerable: false, configurable: true }); Object.defineProperty(KeyEventArgs.prototype, "alt", { get: function () { return 1 == (this.n & 1); }, enumerable: false, configurable: true }); Object.defineProperty(KeyEventArgs.prototype, "ctrl", { get: function () { return 2 == (this.n & 2); }, enumerable: false, configurable: true }); Object.defineProperty(KeyEventArgs.prototype, "keyCode", { get: function () { return this.h; }, enumerable: false, configurable: true }); Object.defineProperty(KeyEventArgs.prototype, "modifiers", { get: function () { return this.n; }, enumerable: false, configurable: true }); Object.defineProperty(KeyEventArgs.prototype, "shift", { get: function () { return 4 == (this.n & 4); }, enumerable: false, configurable: true }); Object.defineProperty(KeyEventArgs.prototype, "defaultPrevented", { get: function () { return this.b; }, enumerable: false, configurable: true }); KeyEventArgs.prototype.preventDefault = function () { this.g.preventDefault(); this.b = true; }; KeyEventArgs.prototype.stopPropagation = function () { this.g.stopPropagation(); }; KeyEventArgs.o = function (a, b, c) { var d = 0; if (a) { d |= 1; } if (b) { d |= 4; } if (c) { d |= 2; } return d; }; KeyEventArgs.$t = markType(KeyEventArgs, 'KeyEventArgs', EventArgs.$); return KeyEventArgs; }(EventArgs)); export { KeyEventArgs };