UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

206 lines (205 loc) 5.51 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 { Base, markType } from "igniteui-react-core"; import { IEditorView_$type } from "./IEditorView"; /** * @hidden */ export let BaseEditorView = /*@__PURE__*/ (() => { class BaseEditorView extends Base { get container() { return this._container; } set container(a) { this._container = a; } get value() { return this.j; } set value(a) { let b = this.j; this.j = a; this.v("Value", b, this.j); } get isEnabled() { return this.e; } set isEnabled(a) { let b = this.e; this.e = a; if (b != this.e) { this.v("IsEnabled", b, this.e); } } get focusOnValueChanged() { return this.c; } set focusOnValueChanged(a) { this.c = a; } get showClearButton() { return this.f; } set showClearButton(a) { let b = this.f; this.f = a; if (b != this.f) { this.v("ShowClearButton", b, this.f); } } get textColor() { return this.y; } set textColor(a) { let b = this.y; this.y = a; if (b != this.y) { this.v("TextColor", b, this.y); } } r(a, b) { if (this.valueProvided != null) { this.valueProvided(this, a, b); } } q() { if (this.userTyping != null) { this.userTyping(this); } } p() { if (this.lostFocus != null) { this.lostFocus(this); } } o() { if (this.gotFocus != null) { this.gotFocus(this); } } h() { if (this.a != null) { return this.a.shouldSkipFocusRetain(); } return false; } constructor(a, b) { super(); this.d = false; this.j = null; this.e = true; this.c = true; this.f = true; this.b = null; this.i = null; this._container = null; this.g = false; this.y = null; this.valueProvided = null; this.userTyping = null; this.lostFocus = null; this.gotFocus = null; this.a = null; this.i = a; this.a = b; } setFont(a) { } attachEvents() { } detachEvents() { } onTargetChanged() { } onEditEnded() { this.g = false; } onEditStarted() { this.g = true; } cleanUp() { this.j = null; this.g = false; } focus() { if (this.d) { return; } if (this.b == null) { this.b = this.i.getRequestAnimationFrame(); } this.b(() => { this.t(); this.d = false; }); this.d = true; } t() { } getEditorValue() { return null; } setEditorValue(a) { } v(a, b, c) { switch (a) { case "Value": this.x(); break; case "IsEnabled": this.s(); break; case "TextColor": this.w(); break; } } x() { } s() { } w() { } onInputKeyDown(a, b) { if (!this.g) { if (!this.isEnabled) { b.preventDefault(); return; } let c = b.keyCode; switch (c) { case 37: case 39: case 38: case 40: case 32: b.preventDefault(); break; case 67: if (b.ctrl) { b.preventDefault(); } break; } } else { let d = b.keyCode; switch (d) { case 37: case 39: case 38: case 40: case 32: b.stopPropagation(); break; } } } } BaseEditorView.$t = /*@__PURE__*/ markType(BaseEditorView, 'BaseEditorView', Base.$, [IEditorView_$type]); return BaseEditorView; })();