UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

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