UNPKG

igniteui-react-core

Version:
104 lines (103 loc) 3.36 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 { EventArgs, markType } from "./type"; /** * @hidden */ export let KeyEventArgs = /*@__PURE__*/ (() => { class KeyEventArgs extends EventArgs { get originalEvent() { return this.j; } constructor(a, ..._rest) { a = (a == void 0) ? 0 : a; switch (a) { case 0: { let c = _rest[0]; let d = [c.which, c.altKey, c.shiftKey, c.ctrlKey, c]; { let f = d[0]; let g = d[1]; let h = d[2]; let i = d[3]; let j = d[4]; super(); 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: { let c = _rest[0]; let d = _rest[1]; let e = _rest[2]; let f = _rest[3]; let g = _rest[4]; super(); 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; } } get alt() { return 1 == (this.n & 1); } get ctrl() { return 2 == (this.n & 2); } get keyCode() { return this.h; } get modifiers() { return this.n; } get shift() { return 4 == (this.n & 4); } get defaultPrevented() { return this.b; } preventDefault() { this.g.preventDefault(); this.b = true; } stopPropagation() { this.g.stopPropagation(); } static o(a, b, c) { let d = 0; if (a) { d |= 1; } if (b) { d |= 4; } if (c) { d |= 2; } return d; } } KeyEventArgs.$t = /*@__PURE__*/ markType(KeyEventArgs, 'KeyEventArgs', EventArgs.$); return KeyEventArgs; })();