igniteui-react-inputs
Version:
Ignite UI React input components.
1,523 lines (1,522 loc) • 234 kB
JavaScript
/*
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, __values } from "tslib";
import { Base, typeCast, Delegate_$type, fromEnum, runOn, markType, Point_$type, typeGetValue, INotifyPropertyChanged_$type, PropertyChangedEventArgs, enumGetBox, EventArgs, delegateCombine, fromEn, toNullable, Number_$type, String_$type } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { ScaleTransform } from "igniteui-react-core";
import { NativeUI } from "igniteui-react-core";
import { ControlDisplayDensity_$type } from "igniteui-react-core";
import { FontInfo } from "igniteui-react-core";
import { KeyFrameAnimationFactory } from "igniteui-react-core";
import { AnimationKeyFrameEffect } from "igniteui-react-core";
import { AnimationKeyFrameEffectTiming } from "igniteui-react-core";
import { stringReplace, stringIsNullOrEmpty } from "igniteui-react-core";
import { TransformGroup } from "igniteui-react-core";
import { TranslateTransform } from "igniteui-react-core";
import { SuffixShiftType_$type } from "./SuffixShiftType";
import { isNaN_ } from "igniteui-react-core";
import { PrefixShiftType_$type } from "./PrefixShiftType";
import { LabelShiftType_$type } from "./LabelShiftType";
import { HorizontalAlignment_$type } from "igniteui-react-core";
import { MouseButtonEventArgs } from "igniteui-react-core";
import { KeyEventArgs } from "igniteui-react-core";
import { InputShiftType_$type } from "./InputShiftType";
import { SuffixVisualModelExport } from "./SuffixVisualModelExport";
import { PrefixVisualModelExport } from "./PrefixVisualModelExport";
import { InputGroupDisplayType_$type } from "./InputGroupDisplayType";
import { BaseControlTheme_$type } from "igniteui-react-core";
import { CornerRadius } from "igniteui-react-core";
import { Thickness } from "igniteui-react-core";
import { ThemeResolver } from "./ThemeResolver";
import { ObservableCollection$1 } from "igniteui-react-core";
import { AnimationKeyFrameProperty } from "igniteui-react-core";
import { InputGroupVisualModelExport } from "./InputGroupVisualModelExport";
import { AppearanceHelper } from "igniteui-react-core";
import { LabelVisualModelExport } from "./LabelVisualModelExport";
import { InputVisualModelExport } from "./InputVisualModelExport";
import { Dictionary$2 } from "igniteui-react-core";
import { Theme } from "./Theme";
import { DeviceUtils } from "igniteui-react-core";
import { BrushUtil } from "igniteui-react-core";
import { FontUtil } from "igniteui-react-core";
import { MaskParsingService } from "./MaskParsingService";
import { InputChangeEventArgs } from "./InputChangeEventArgs";
import { MaskOptions } from "./MaskOptions";
/**
* @hidden
*/
var InputGroupView = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(InputGroupView, _super);
function InputGroupView() {
var _this = _super.call(this) || this;
_this.d = null;
_this.l = null;
_this.e = null;
_this.i = new List$1(Delegate_$type, 0);
_this.z = null;
_this.f = true;
_this.n = null;
_this.o = null;
_this.p = null;
_this.t = null;
_this.r = null;
_this.q = null;
_this.m = null;
return _this;
}
InputGroupView.prototype.ak = function () {
};
InputGroupView.prototype.ac = function (a) {
if (typeCast(XLabel.$, a) !== null) {
a.be = "flex-start";
}
};
InputGroupView.prototype.ae = function (a) {
};
InputGroupView.prototype.ad = function () {
};
InputGroupView.prototype.g = function () {
return true;
};
Object.defineProperty(InputGroupView.prototype, "w", {
get: function () {
return this.n;
},
enumerable: false,
configurable: true
});
Object.defineProperty(InputGroupView.prototype, "as", {
get: function () {
return null;
},
enumerable: false,
configurable: true
});
Object.defineProperty(InputGroupView.prototype, "h", {
get: function () {
return true;
},
enumerable: false,
configurable: true
});
InputGroupView.prototype.ah = function (a) {
var e_1, _a;
var _this = this;
if (a == null) {
try {
for (var _b = __values(fromEnum(this.i)), _c = _b.next(); !_c.done; _c = _b.next()) {
var b = _c.value;
b();
}
}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_1)
throw e_1.error;
}
}
this.i.clear();
}
this.l = a;
a.rootWrapper.setStyleProperty("position", "relative");
a.rootWrapper.setStyleProperty("box-sizing", "border-box");
a.rootWrapper.setStyleProperty("border-width", "0px");
a.rootWrapper.setStyleProperty("border-style", "solid");
var c = this.v;
this.i.add(c.listen("focusin", runOn(this, this.aj)));
this.i.add(c.listen("focusout", runOn(this, this.am)));
var d = this.l.createElement("div");
d.setStyleProperty("position", "absolute");
d.setStyleProperty("width", "100%");
d.setStyleProperty("height", "100%");
d.setStyleProperty("border-style", "solid");
d.setStyleProperty("box-sizing", "border-box");
d.setStyleProperty("left", "0px");
d.setStyleProperty("top", "0px");
this.l.append(d);
this.m = d;
var e = this.l.createElement("div");
e.addClass("ig-input-content");
e.setStyleProperty("width", "100%");
e.setStyleProperty("position", "relative");
e.setStyleProperty("display", "flex");
e.setStyleProperty("flex-direction", "row");
e.setStyleProperty("flex-wrap", "no-wrap");
e.setStyleProperty("flex-flow", "row nowrap");
e.setStyleProperty("flex-grow", "1");
e.setStyleProperty("align-items", "center");
e.setStyleProperty("padding-top", "1.125rem");
this.p = e;
this.i.add(e.listen("click", runOn(this, this.aa)));
this.l.append(e);
this.l.getPortal(e, "ChildContent", function (f) {
var comp_ = f.componentRef;
_this.t = comp_;
_this.p.setStyleProperty("flex-direction", "row");
}, true);
var f = this.l.createElement("div");
f.setStyleProperty("position", "absolute");
f.setStyleProperty("width", "100%");
f.setStyleProperty("background-color", "rgba(0, 0, 0, 0.54)");
f.setStyleProperty("height", "1px");
f.setStyleProperty("pointer-events", "none");
f.setStyleProperty("left", "0px");
f.setStyleProperty("bottom", "1px");
f.setStyleProperty("overflow", "visible");
var g = this.l.createElement("span");
g.setStyleProperty("width", "100%");
g.setStyleProperty("height", "2px");
g.setStyleProperty("display", "block");
g.setStyleProperty("pointer-events", "none");
NativeUI.af(g, ((function () {
var $ret = new ScaleTransform();
$ret.l = 0.5;
$ret.m = 1;
return $ret;
})()));
g.setStyleProperty("opacity", "0");
this.r = g;
f.append(this.r);
this.q = f;
this.l.append(f);
this.d.j3();
};
Object.defineProperty(InputGroupView.prototype, "s", {
get: function () {
return this.p;
},
enumerable: false,
configurable: true
});
Object.defineProperty(InputGroupView.prototype, "v", {
get: function () {
return this.l.rootWrapper;
},
enumerable: false,
configurable: true
});
Object.defineProperty(InputGroupView.prototype, "u", {
get: function () {
return this.m;
},
enumerable: false,
configurable: true
});
Object.defineProperty(InputGroupView.prototype, "x", {
get: function () {
return this.q;
},
enumerable: false,
configurable: true
});
Object.defineProperty(InputGroupView.prototype, "y", {
get: function () {
return this.r;
},
enumerable: false,
configurable: true
});
InputGroupView.prototype.aq = function (a) {
if (this.z != a) {
this.z = a;
if (this.o != null) {
this.o.setAttribute("d", this.z);
}
}
};
InputGroupView.prototype.ap = function () {
switch (this.d.s) {
case 1:
this.p.setStyleProperty("padding-top", "1.125rem");
break;
case 2:
this.p.setStyleProperty("padding-top", ".94737rem");
break;
case 3:
this.p.setStyleProperty("padding-top", ".81818rem");
break;
case 4:
this.p.setStyleProperty("padding-top", ".68899rem");
break;
}
};
InputGroupView.prototype.aa = function (a) {
};
InputGroupView.prototype.al = function () {
if (this.g()) {
}
};
InputGroupView.prototype.j = function () {
var a = this.l.rootWrapper.getStyleProperty("height");
return parseFloat(stringReplace(a, "px", ""));
};
InputGroupView.prototype.ag = function () {
this.f = true;
};
InputGroupView.prototype.ai = function () {
var e_2, _a;
this.f = false;
try {
for (var _b = __values(fromEnum(this.i)), _c = _b.next(); !_c.done; _c = _b.next()) {
var a = _c.value;
a();
}
}
catch (e_2_1) {
e_2 = { error: e_2_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_2)
throw e_2.error;
}
}
this.i.clear();
};
InputGroupView.prototype.ar = function (a) {
if (a != null) {
this.l.rootWrapper.setStyleProperty("font", a.fontString);
}
};
InputGroupView.prototype.k = function (a) {
return a.view.j();
};
InputGroupView.prototype.af = function () {
if (KeyFrameAnimationFactory.h == null) {
KeyFrameAnimationFactory.h = this.l;
}
};
InputGroupView.prototype.a = function (a) {
return new AnimationKeyFrameEffect(0, this.u, 0, null, a);
};
InputGroupView.prototype.c = function (a) {
return new AnimationKeyFrameEffect(0, this.x, 0, null, a);
};
InputGroupView.prototype.b = function (a) {
return new AnimationKeyFrameEffect(0, this.r, 0, null, a);
};
InputGroupView.prototype.ao = function (a) {
};
InputGroupView.prototype.ab = function (a) {
this.p.append(a);
};
InputGroupView.prototype.an = function (a) {
this.p.removeChild(a);
};
InputGroupView.prototype.aj = function (a) {
this.d.jz();
};
InputGroupView.prototype.am = function (a) {
this.d.j1();
};
InputGroupView.$t = markType(InputGroupView, 'InputGroupView');
return InputGroupView;
}(Base));
export { InputGroupView };
/**
* @hidden
*/
var SuffixView = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(SuffixView, _super);
function SuffixView() {
var _this = _super.call(this) || this;
_this.a = null;
_this.h = null;
_this.b = null;
_this.f = new List$1(Delegate_$type, 0);
_this.d = false;
_this.c = true;
_this.i = null;
return _this;
}
SuffixView.prototype.p = function () {
};
SuffixView.prototype.e = function () {
return true;
};
Object.defineProperty(SuffixView.prototype, "s", {
get: function () {
return null;
},
enumerable: false,
configurable: true
});
SuffixView.prototype.n = function (a) {
var e_3, _a;
if (a == null) {
try {
for (var _b = __values(fromEnum(this.f)), _c = _b.next(); !_c.done; _c = _b.next()) {
var b = _c.value;
b();
}
}
catch (e_3_1) {
e_3 = { error: e_3_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_3)
throw e_3.error;
}
}
this.f.clear();
}
this.h = a;
this.h.rootWrapper.setStyleProperty("display", "inline-block");
var c = this.h.createElement("div");
c.addClass("ig-suffix-content");
this.h.append(c);
c.setStyleProperty("cursor", "pointer");
this.i = c;
this.h.getPortal(c, "ChildContent", function (d) {
}, true);
this.a.am();
};
SuffixView.prototype.r = function () {
var _this = this;
var a = this.g();
if (isNaN_(a) || a == 0) {
if (!this.d) {
this.d = true;
this.h.setTimeout(function () {
_this.d = false;
_this.r();
}, 100);
}
}
var b = new TransformGroup();
b.j.add(((function () {
var $ret = new TranslateTransform();
$ret.k = _this.a.k == 2 ? (_this.g() * -0.25) : 0;
return $ret;
})()));
b.j.add(((function () {
var $ret = new ScaleTransform();
$ret.l = 1;
$ret.m = 1;
return $ret;
})()));
NativeUI.af(this.h.rootWrapper, b);
this.h.rootWrapper.setStyleProperty("transform-origin", "0px 0px");
};
SuffixView.prototype.g = function () {
var a = this.h.rootWrapper.getStyleProperty("height");
return parseFloat(stringReplace(a, "px", ""));
};
SuffixView.prototype.q = function () {
if (this.e()) {
}
};
SuffixView.prototype.j = function (a) {
this.a.aj();
};
SuffixView.prototype.k = function (a) {
this.a.ak();
};
SuffixView.prototype.m = function () {
this.c = true;
this.f.add(this.h.rootWrapper.listen("mouseenter", runOn(this, this.j)));
this.f.add(this.h.rootWrapper.listen("mouseleave", runOn(this, this.k)));
};
SuffixView.prototype.o = function () {
var e_4, _a;
this.c = false;
try {
for (var _b = __values(fromEnum(this.f)), _c = _b.next(); !_c.done; _c = _b.next()) {
var a = _c.value;
a();
}
}
catch (e_4_1) {
e_4 = { error: e_4_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_4)
throw e_4.error;
}
}
this.f.clear();
};
SuffixView.prototype.l = function (a) {
this.i.append(a);
};
SuffixView.$t = markType(SuffixView, 'SuffixView');
return SuffixView;
}(Base));
export { SuffixView };
/**
* @hidden
*/
var PrefixView = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(PrefixView, _super);
function PrefixView() {
var _this = _super.call(this) || this;
_this.a = null;
_this.h = null;
_this.b = null;
_this.f = new List$1(Delegate_$type, 0);
_this.d = false;
_this.c = true;
_this.i = null;
return _this;
}
PrefixView.prototype.p = function () {
};
PrefixView.prototype.e = function () {
return true;
};
Object.defineProperty(PrefixView.prototype, "s", {
get: function () {
return null;
},
enumerable: false,
configurable: true
});
PrefixView.prototype.n = function (a) {
var e_5, _a;
if (a == null) {
try {
for (var _b = __values(fromEnum(this.f)), _c = _b.next(); !_c.done; _c = _b.next()) {
var b = _c.value;
b();
}
}
catch (e_5_1) {
e_5 = { error: e_5_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_5)
throw e_5.error;
}
}
this.f.clear();
}
this.h = a;
this.h.rootWrapper.setStyleProperty("display", "inline-block");
var c = this.h.createElement("div");
c.addClass("ig-prefix-content");
this.h.append(c);
c.setStyleProperty("cursor", "pointer");
this.i = c;
this.h.getPortal(c, "ChildContent", function (d) {
}, true);
this.a.am();
};
PrefixView.prototype.r = function () {
var _this = this;
var a = this.g();
if (isNaN_(a) || a == 0) {
if (!this.d) {
this.d = true;
this.h.setTimeout(function () {
_this.d = false;
_this.r();
}, 100);
}
}
var b = new TransformGroup();
b.j.add(((function () {
var $ret = new TranslateTransform();
$ret.k = _this.a.k == 2 ? (_this.g() * -0.25) : 0;
return $ret;
})()));
b.j.add(((function () {
var $ret = new ScaleTransform();
$ret.l = 1;
$ret.m = 1;
return $ret;
})()));
NativeUI.af(this.h.rootWrapper, b);
this.h.rootWrapper.setStyleProperty("transform-origin", "0px 0px");
};
PrefixView.prototype.g = function () {
var a = this.h.rootWrapper.getStyleProperty("height");
return parseFloat(stringReplace(a, "px", ""));
};
PrefixView.prototype.q = function () {
if (this.e()) {
}
};
PrefixView.prototype.j = function (a) {
this.a.aj();
};
PrefixView.prototype.k = function (a) {
this.a.ak();
};
PrefixView.prototype.m = function () {
this.c = true;
this.f.add(this.h.rootWrapper.listen("mouseenter", runOn(this, this.j)));
this.f.add(this.h.rootWrapper.listen("mouseleave", runOn(this, this.k)));
};
PrefixView.prototype.o = function () {
var e_6, _a;
this.c = false;
try {
for (var _b = __values(fromEnum(this.f)), _c = _b.next(); !_c.done; _c = _b.next()) {
var a = _c.value;
a();
}
}
catch (e_6_1) {
e_6 = { error: e_6_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_6)
throw e_6.error;
}
}
this.f.clear();
};
PrefixView.prototype.l = function (a) {
this.i.append(a);
};
PrefixView.$t = markType(PrefixView, 'PrefixView');
return PrefixView;
}(Base));
export { PrefixView };
/**
* @hidden
*/
var LabelView = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(LabelView, _super);
function LabelView() {
var _this = _super.call(this) || this;
_this.c = null;
_this.m = null;
_this.d = null;
_this.i = new List$1(Delegate_$type, 0);
_this.r = null;
_this.f = true;
_this.n = null;
_this.o = null;
_this.p = -1;
return _this;
}
LabelView.prototype.ae = function () {
};
LabelView.prototype.g = function () {
return true;
};
Object.defineProperty(LabelView.prototype, "q", {
get: function () {
return this.n;
},
enumerable: false,
configurable: true
});
Object.defineProperty(LabelView.prototype, "an", {
get: function () {
return null;
},
enumerable: false,
configurable: true
});
Object.defineProperty(LabelView.prototype, "h", {
get: function () {
return true;
},
enumerable: false,
configurable: true
});
LabelView.prototype.v = function () {
if (KeyFrameAnimationFactory.h == null) {
KeyFrameAnimationFactory.h = this.m;
}
};
LabelView.prototype.b = function (a) {
return new AnimationKeyFrameEffect(0, this.m.rootWrapper, 0, null, a);
};
LabelView.prototype.a = function (a) {
return new AnimationKeyFrameEffect(0, this.m.rootWrapper, 0, null, a);
};
LabelView.prototype.z = function (a) {
var e_7, _a;
if (a == null) {
try {
for (var _b = __values(fromEnum(this.i)), _c = _b.next(); !_c.done; _c = _b.next()) {
var b = _c.value;
b();
}
}
catch (e_7_1) {
e_7 = { error: e_7_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_7)
throw e_7.error;
}
}
this.i.clear();
}
this.m = a;
this.m.rootWrapper.setStyleProperty("display", "inline-block");
this.m.rootWrapper.setStyleProperty("position", "relative");
var c = this.m.createElement("label");
c.setStyleProperty("position", "relative");
c.setStyleProperty("display", "inline-block");
c.setStyleProperty("white-space", "nowrap");
c.setStyleProperty("text-overflow", "ellipsis");
c.setStyleProperty("line-height", "1");
c.setStyleProperty("overflow", "hidden");
c.setStyleProperty("height", "1.125rem");
c.setStyleProperty("backface-visibility", "hidden");
NativeUI.q(this.m.rootWrapper, this.c.c3);
c.setStyleProperty("outline-style", "none");
c.setStyleProperty("box-shadow", "none");
c.setStyleProperty("font-family", "Verdana");
c.setStyleProperty("font-size", "1rem");
this.n = c;
this.m.append(this.n);
this.c.cl();
};
LabelView.prototype.l = function () {
return this.c.l == 0 ? (this.j() * 0.5) : 0;
};
LabelView.prototype.aj = function () {
var _this = this;
this.c.bk = "block";
var a = new TransformGroup();
a.j.add(((function () {
var $ret = new TranslateTransform();
$ret.k = _this.c.l == 0 ? (_this.j() * 0.5) : 0;
return $ret;
})()));
a.j.add(((function () {
var $ret = new ScaleTransform();
$ret.l = 1;
$ret.m = 1;
return $ret;
})()));
NativeUI.af(this.m.rootWrapper, a);
this.n.setStyleProperty("height", "1.125rem");
this.m.rootWrapper.setStyleProperty("position", "absolute");
this.m.rootWrapper.setStyleProperty("transform-origin", "0px 0px");
};
LabelView.prototype.ak = function () {
switch (this.c.s) {
case 1:
this.m.rootWrapper.setStyleProperty("margin-top", "0px");
break;
case 2:
this.m.rootWrapper.setStyleProperty("margin-top", "-.125rem");
break;
case 3:
this.m.rootWrapper.setStyleProperty("margin-top", "-.25rem");
break;
case 4:
this.m.rootWrapper.setStyleProperty("margin-top", "-.5rem");
break;
}
};
LabelView.prototype.ai = function () {
this.n.setText(this.c.text != null ? this.c.text : "");
};
LabelView.prototype.al = function (a) {
if (this.r != a) {
this.r = a;
if (this.o != null) {
this.o.setAttribute("d", this.r);
}
}
};
LabelView.prototype.ab = function () {
if (this.m != null) {
this.m.rootWrapper.setStyleProperty("display", this.c.bk);
this.n.setStyleProperty("display", this.c.bk);
var ext_ = this.m.getExternal(this.c, null, null);
if (ext_ && ext_._onDisplayChanged) {
ext_._onDisplayChanged();
}
;
}
};
LabelView.prototype.w = function () {
if (this.m != null) {
this.m.rootWrapper.setStyleProperty("align-items", this.c.bc);
this.n.setStyleProperty("align-items", this.c.bc);
var ext_ = this.m.getExternal(this.c, null, null);
if (ext_ && ext_._onAlignItemsChanged) {
ext_._onAlignItemsChanged();
}
;
}
};
LabelView.prototype.x = function () {
if (this.m != null) {
this.m.rootWrapper.setStyleProperty("align-self", this.c.be);
this.n.setStyleProperty("align-self", this.c.be);
var ext_ = this.m.getExternal(this.c, null, null);
if (ext_ && ext_._onAlignSelfChanged) {
ext_._onAlignSelfChanged();
}
;
}
};
LabelView.prototype.ac = function () {
if (this.m != null) {
this.m.rootWrapper.setStyleProperty("flex-direction", this.c.bn);
this.n.setStyleProperty("flex-direction", this.c.bn);
var ext_ = this.m.getExternal(this.c, null, null);
if (ext_ && ext_._onFlexDirectionChanged) {
ext_._onFlexDirectionChanged();
}
;
}
};
LabelView.prototype.ad = function () {
if (this.m != null) {
this.m.rootWrapper.setStyleProperty("flex-grow", this.c.bp);
this.n.setStyleProperty("flex-grow", this.c.bp);
var ext_ = this.m.getExternal(this.c, null, null);
if (ext_ && ext_._onFlexGrowChanged) {
ext_._onFlexGrowChanged();
}
;
}
};
LabelView.prototype.s = function (a) {
};
LabelView.prototype.ag = function () {
if (this.g()) {
}
};
LabelView.prototype.j = function () {
var a = this.k();
if (a == 0 || isNaN_(a)) {
var b = NaN;
var c = this.m.rootWrapper.parent();
if (c != null) {
if (c.getChildCount() > 1) {
var d = null;
var e = null;
for (var f = 0; f < c.getChildCount(); f++) {
var g = c.getChildAt(f);
if (g.getNativeElement() == this.m.rootWrapper.getNativeElement()) {
if (f == c.getChildCount() - 1) {
d = c.getChildAt(f - 1);
}
else {
e = c.getChildAt(f + 1);
}
break;
}
}
this.m.rootWrapper.remove();
document.body.appendChild(this.m.rootWrapper.getNativeElement());
b = this.k();
this.m.rootWrapper.remove();
if (e != null) {
e.before(this.m.rootWrapper);
}
else {
c.append(this.m.rootWrapper);
}
}
else {
this.m.rootWrapper.remove();
document.body.appendChild(this.m.rootWrapper.getNativeElement());
b = this.k();
this.m.rootWrapper.remove();
c.append(this.m.rootWrapper);
}
}
else {
this.m.rootWrapper.remove();
document.body.appendChild(this.m.rootWrapper.getNativeElement());
b = this.k();
this.m.rootWrapper.remove();
}
return b;
}
return a;
};
LabelView.prototype.k = function () {
var a = this.m.rootWrapper.getStyleProperty("height");
return parseFloat(stringReplace(a, "px", ""));
};
LabelView.prototype.t = function (a) {
this.c.ch();
};
LabelView.prototype.u = function (a) {
this.c.ci();
};
LabelView.prototype.y = function () {
this.f = true;
this.i.add(this.m.rootWrapper.listen("mouseenter", runOn(this, this.t)));
this.i.add(this.m.rootWrapper.listen("mouseleave", runOn(this, this.u)));
};
LabelView.prototype.aa = function () {
var e_8, _a;
this.f = false;
try {
for (var _b = __values(fromEnum(this.i)), _c = _b.next(); !_c.done; _c = _b.next()) {
var a = _c.value;
a();
}
}
catch (e_8_1) {
e_8 = { error: e_8_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_8)
throw e_8.error;
}
}
this.i.clear();
};
LabelView.prototype.am = function (a) {
if (a != null) {
this.n.setStyleProperty("font", a.fontString);
}
};
LabelView.prototype.ah = function (a) {
NativeUI.q(this.n, a);
};
LabelView.prototype.e = function () {
return ((function () {
var $ret = new FontInfo();
$ret.q = "Verdana";
$ret.f = 13;
return $ret;
})());
};
LabelView.prototype.af = function () {
};
LabelView.$t = markType(LabelView, 'LabelView');
return LabelView;
}(Base));
export { LabelView };
/**
* @hidden
*/
var InputView = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(InputView, _super);
function InputView() {
var _this = _super.call(this) || this;
_this.b = null;
_this.l = null;
_this.c = null;
_this.j = new List$1(Delegate_$type, 0);
_this.g = false;
_this.f = false;
_this.r = null;
_this.d = true;
_this.m = null;
_this.n = null;
_this.g = false;
return _this;
}
InputView.prototype.as = function () {
};
InputView.prototype.h = function () {
return true;
};
Object.defineProperty(InputView.prototype, "q", {
get: function () {
return this.m;
},
enumerable: false,
configurable: true
});
Object.defineProperty(InputView.prototype, "bd", {
get: function () {
return null;
},
enumerable: false,
configurable: true
});
Object.defineProperty(InputView.prototype, "i", {
get: function () {
return true;
},
enumerable: false,
configurable: true
});
InputView.prototype.ap = function (a) {
var e_9, _a;
if (a == null) {
try {
for (var _b = __values(fromEnum(this.j)), _c = _b.next(); !_c.done; _c = _b.next()) {
var b = _c.value;
b();
}
}
catch (e_9_1) {
e_9 = { error: e_9_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_9)
throw e_9.error;
}
}
this.j.clear();
}
this.l = a;
this.l.rootWrapper.setStyleProperty("display", "inline-block");
var c = this.l.createElement("input");
c.setAttribute("type", this.b.b8);
c.setStyleProperty("position", "relative");
c.setStyleProperty("box-sizing", "border-box");
c.setStyleProperty("display", "inline-block");
c.setStyleProperty("border", "none");
c.setStyleProperty("height", "2rem");
c.setStyleProperty("line-height", "0");
c.setStyleProperty("width", "100%");
c.setStyleProperty("min-width", "0");
c.setStyleProperty("overflow", "visible");
c.setStyleProperty("background", "transparent");
c.setStyleProperty("background-position-x", "initial");
c.setStyleProperty("background-position-y", "initial");
c.setStyleProperty("background-size", "initial");
c.setStyleProperty("background-repeat-x", "initial");
c.setStyleProperty("background-repeat-y", "initial");
c.setStyleProperty("background-attachment", "initial");
c.setStyleProperty("background-origin", "initial");
c.setStyleProperty("background-color", "transparent");
NativeUI.q(c, this.b.d4);
c.setStyleProperty("outline-style", "none");
c.setStyleProperty("box-shadow", "none");
c.setStyleProperty("border-top", "0.1875rem solid transparent");
c.setStyleProperty("padding-bottom", "0.1875rem");
c.setStyleProperty("text-align", this.t(this.b.dy));
c.setStyleProperty("font-family", "Verdana");
c.setStyleProperty("font-size", "1rem");
this.j.add(c.listen("change", runOn(this, this.y)));
this.j.add(c.listen("input", runOn(this, this.z)));
this.j.add(c.listen("focus", runOn(this, this.ae)));
this.j.add(c.listen("blur", runOn(this, this.x)));
this.j.add(c.listen("mouseenter", runOn(this, this.v)));
this.j.add(c.listen("mouseleave", runOn(this, this.w)));
this.j.add(c.listen("keydown", runOn(this, this.af)));
this.j.add(c.listen("keyup", runOn(this, this.ah)));
this.j.add(c.listen("keypress", runOn(this, this.ag)));
this.j.add(c.listen("paste", runOn(this, this.ak)));
this.j.add(c.listen("dragenter", runOn(this, this.ac)));
this.j.add(c.listen("dragleave", runOn(this, this.ad)));
this.j.add(c.listen("compositionstart", runOn(this, this.ab)));
this.j.add(c.listen("compositionend", runOn(this, this.aa)));
this.j.add(c.listen("mousedown", runOn(this, this.ai)));
this.j.add(c.listen("mouseup", runOn(this, this.aj)));
this.m = c;
this.l.append(this.m);
this.am();
this.b.dl();
};
InputView.prototype.a0 = function (a) {
if (a) {
this.m.setAttribute("readonly", a.toString());
}
else {
this.m.getNativeElement().removeAttribute("readonly");
}
};
InputView.prototype.ay = function (a) {
if (a) {
this.m.setAttribute("disabled", "true");
}
else {
this.m.getNativeElement().removeAttribute("disabled");
}
};
InputView.prototype.a5 = function (a) {
this.m.setStyleProperty("text-align", this.t(a));
};
InputView.prototype.a4 = function (a) {
if (a) {
this.m.removeClass("ig-input-hide-spinner");
}
else {
this.m.addClass("ig-input-hide-spinner");
}
};
InputView.prototype.ab = function (a) {
this.g = true;
this.b.c3();
};
InputView.prototype.aa = function (a) {
this.g = false;
var b = null;
if (a.originalEvent != null) {
b = (a.originalEvent.data);
}
this.b.c2(b);
};
InputView.prototype.t = function (a) {
switch (a) {
case 0: return "left";
case 2: return "right";
case 1: return "center";
}
return "left";
};
InputView.prototype.aw = function () {
this.m.setAttribute("type", this.b.b8);
if (this.b.b8 == "date") {
this.m.setStyleProperty("line-height", "normal");
}
else {
this.m.setStyleProperty("line-height", "0");
}
};
InputView.prototype.au = function () {
this.m.setAttribute("placeholder", this.b.cg);
};
InputView.prototype.a9 = function () {
switch (this.b.z) {
case 1:
this.m.setStyleProperty("height", "2rem");
this.m.setStyleProperty("font-size", "1rem");
break;
case 2:
this.m.setStyleProperty("height", "1.68421rem");
this.m.setStyleProperty("font-size", "1rem");
break;
case 3:
this.m.setStyleProperty("height", "1.45455rem");
this.m.setStyleProperty("font-size", ".95455rem");
break;
case 4:
this.m.setStyleProperty("height", "1.388445rem");
this.m.setStyleProperty("font-size", "0.91116rem");
break;
}
};
InputView.prototype.a8 = function () {
var _this = this;
var a = this.k();
if (isNaN_(a) || a == 0) {
if (!this.f) {
this.f = true;
this.l.setTimeout(function () {
_this.f = false;
_this.a8();
}, 100);
}
}
var b = new TransformGroup();
b.j.add(((function () {
var $ret = new TranslateTransform();
$ret.k = _this.b.o == 2 ? (_this.k() * -0.25) : 0;
return $ret;
})()));
b.j.add(((function () {
var $ret = new ScaleTransform();
$ret.l = 1;
$ret.m = 1;
return $ret;
})()));
NativeUI.af(this.l.rootWrapper, b);
this.l.rootWrapper.setStyleProperty("transform-origin", "0px 0px");
};
InputView.prototype.k = function () {
var a = this.l.rootWrapper.getStyleProperty("height");
var b = parseFloat(stringReplace(a, "px", ""));
return b;
};
InputView.prototype.ax = function (a) {
this.m.setProperty("value", a);
};
InputView.prototype.az = function (a) {
this.m.setAttribute("name", a);
};
InputView.prototype.x = function (a) {
this.b.cz();
};
InputView.prototype.ae = function (a) {
this.b.c7();
};
InputView.prototype.ai = function (a) {
var b = this.bc(a);
this.b.dd(b);
if (b.handled) {
a.preventDefault();
}
};
InputView.prototype.aj = function (a) {
var b = this.bc(a);
this.b.dg(b);
if (b.handled) {
a.preventDefault();
}
};
InputView.prototype.bc = function (a) {
var b = new MouseButtonEventArgs();
b.position = { $type: Point_$type, x: a.offsetX, y: a.offsetY };
return b;
};
InputView.prototype.y = function (a) {
this.b.c0();
};
InputView.prototype.z = function (a) {
this.b.c1();
};
InputView.prototype.af = function (a) {
var b = new KeyEventArgs(0, a);
this.b.da(b);
};
InputView.prototype.ah = function (a) {
var b = new KeyEventArgs(0, a);
this.b.dc(b);
};
InputView.prototype.ag = function (a) {
var b = new KeyEventArgs(0, a);
this.b.db(b);
};
InputView.prototype.ak = function (a) {
this.b.dh();
};
InputView.prototype.ac = function (a) {
this.b.c5();
};
InputView.prototype.ad = function (a) {
this.b.c6();
};
InputView.prototype.ba = function (a) {
if (this.r != a) {
this.r = a;
if (this.n != null) {
this.n.setAttribute("d", this.r);
}
}
};
InputView.prototype.s = function () {
return this.m.getProperty("value");
};
InputView.prototype.u = function (a) {
};
InputView.prototype.a7 = function () {
if (this.h()) {
if (this.b.as) {
this.m.setAttribute("tabindex", this.b.be.toString());
}
else {
this.m.getNativeElement().removeAttribute("tabindex");
}
}
};
InputView.prototype.p = function () {
var a = this.m.getProperty("selectionStart");
return typeGetValue(a);
};
InputView.prototype.o = function () {
var a = this.m.getProperty("selectionEnd");
return typeGetValue(a);
};
InputView.prototype.a3 = function (a) {
this.m.setProperty("selectionStart", a);
};
InputView.prototype.a1 = function (a) {
this.m.setProperty("selectionEnd", a);
};
InputView.prototype.at = function () {
if (this.h()) {
}
};
InputView.prototype.v = function (a) {
this.b.de();
};
InputView.prototype.w = function (a) {
this.b.df();
};
InputView.prototype.an = function () {
this.d = true;
this.j.add(this.m.listen("change", runOn(this, this.y)));
this.j.add(this.m.listen("input", runOn(this, this.z)));
this.j.add(this.m.listen("focus", runOn(this, this.ae)));
this.j.add(this.m.listen("blur", runOn(this, this.x)));
this.j.add(this.m.listen("mouseenter", runOn(this, this.v)));
this.j.add(this.m.listen("mouseleave", runOn(this, this.w)));
this.j.add(this.m.listen("keydown", runOn(this, this.af)));
this.j.add(this.m.listen("paste", runOn(this, this.ak)));
this.j.add(this.m.listen("dragenter", runOn(this, this.ac)));
this.j.add(this.m.listen("dragleave", runOn(this, this.ad)));
this.j.add(this.m.listen("compositionstart", runOn(this, this.ab)));
this.j.add(this.m.listen("compositionend", runOn(this, this.aa)));
this.j.add(this.m.listen("mousedown", runOn(this, this.ai)));
this.j.add(this.m.listen("mouseup", runOn(this, this.aj)));
};
InputView.prototype.aq = function () {
var e_10, _a;
this.d = false;
try {
for (var _b = __values(fromEnum(this.j)), _c = _b.next(); !_c.done; _c = _b.next()) {
var a = _c.value;
a();
}
}
catch (e_10_1) {
e_10 = { error: e_10_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_10)
throw e_10.error;
}
}
this.j.clear();
};
InputView.prototype.bb = function (a) {
if (a != null) {
this.m.setStyleProperty("font", a.fontString);
}
};
InputView.prototype.a6 = function () {
};
InputView.prototype.ao = function () {
if (this.m != null) {
var a = this.m.getNativeElement();
a.blur();
}
};
InputView.prototype.ar = function (a) {
if (this.m != null) {
this.m.focus(a);
}
};
InputView.prototype.av = function () {
if (this.m != null) {
var nativeInput_ = this.m;
nativeInput_.getNativeElement().select();
}
};
InputView.prototype.a2 = function (a, b) {
if (this.m != null) {
var c = this.m.getNativeElement();
c.setSelectionRange(a, b);
}
};
InputView.prototype.al = function () {
if (KeyFrameAnimationFactory.h == null) {
KeyFrameAnimationFactory.h = this.l;
}
};
InputView.prototype.a = function (a) {
return new AnimationKeyFrameEffect(0, this.l.rootWrapper, 0, null, a);
};
InputView.prototype.am = function () {
if (InputView.e) {
return;
}
var a = "\r\n.ig-input-hide-spinner::-webkit-outer-spin-button,\r\n.ig-input-hide-spinner::-webkit-inner-spin-button {\r\n -webkit-appearance: none;\r\n margin: 0;\r\n}";
var b = this.l.createElement("style");
b.setRawText(a);
document.head.appendChild(b.getNativeElement());
InputView.e = true;
};
InputView.$t = markType(InputView, 'InputView');
InputView.e = false;
return InputView;
}(Base));
export { InputView };
/**
* @hidden
*/
var XInputGroupItem = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(XInputGroupItem, _super);
function XInputGroupItem() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.c = null;
_this.a = null;
_this.propertyChanged = null;
return _this;
}
Object.defineProperty(XInputGroupItem.prototype, "e", {
get: function () {
return this.c;
},
set: function (a) {
var b = this.c;
this.c = a;
if (b != this.c) {
this.g("Name", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XInputGroupItem.prototype, "b", {
get: function () {
return this.a;
},
set: function (a) {
var b = this.a;
this.a = a;
if (b != this.a) {
this.g("InputGroup", b, a);
}
},
enumerable: false,
configurable: true
});
XInputGroupItem.prototype.g = function (a, b, c) {
if (this.propertyChanged != null) {
this.propertyChanged(this, new PropertyChangedEventArgs(a));
}
this.h(a, b, c);
};
XInputGroupItem.prototype.h = function (a, b, c) {
};
XInputGroupItem.$t = markType(XInputGroupItem, 'XInputGroupItem', Base.$, [INotifyPropertyChanged_$type]);
return XInputGroupItem;
}(Base));
export { XInputGroupItem };
/**
* @hidden
*/
var XSuffix = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(XSuffix, _super);
function XSuffix() {
var _this = _super.call(this) || this;
_this._view = null;
_this.j = 0;
_this.v = "ig-suffix-" + XSuffix.s++;
_this.u = null;
_this.n = false;
_this.m = false;
_this.o = false;
var a = new SuffixView();
a.a = _this;
_this.view = a;
_this.view.p();
return _this;
}
Object.defineProperty(XSuffix.prototype, "view", {
get: function () {
return this._view;
},
set: function (a) {
this._view = a;
},
enumerable: false,
configurable: true
});
XSuffix.prototype.destroy = function () {
this.provideContainer(null);
};
Object.defineProperty(XSuffix.prototype, "k", {
get: function () {
return this.j;
},
set: function (a) {
var b = this.j;
this.j = a;
if (b != this.j) {
this.g("ShiftType", enumGetBox(SuffixShiftType_$type, b), enumGetBox(SuffixShiftType_$type, a));
}
},
enumerable: false,
configurable: true
});
XSuffix.prototype.h = function (a, b, c) {
_super.prototype.h.call(this, a, b, c);
switch (a) {
case "InputGroup":
this.ai();
break;
case "ShiftType":
this.al();
break;
}
};
XSuffix.prototype.al = function () {
this.view.r();
};
XSuffix.prototype.ai = function () {
this.view.r();
};
XSuffix.prototype.ap = function () {
};
XSuffix.prototype.ao = function () {
};
XSuffix.prototype.aj = function () {
this.q = true;
};
XSuffix.prototype.ak = function () {
this.q = false;
};
Object.defineProperty(XSuffix.prototype, "z", {
get: function () {
return this.v;
},
set: function (a) {
var b = this.v;
this.v = a;
if (b != this.v) {
this.g("Id", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XSuffix.prototype, "w", {
get: function () {
return this.u;
},
set: function (a) {
var b = this.u;
this.u = a;
if (b != this.u) {
this.g("AriaLabel", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XSuffix.prototype, "q", {
get: function () {
return this.n;
},
set: function (a) {