igniteui-webcomponents-inputs
Version:
Ignite UI Web Components inputs components.
1,486 lines • 199 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 { Base, typeCast, Delegate_$type, fromEnum, runOn, markType, Point_$type, typeGetValue, INotifyPropertyChanged_$type, PropertyChangedEventArgs, enumGetBox, EventArgs, delegateCombine, fromEn, toNullable, Number_$type, String_$type } from "igniteui-webcomponents-core";
import { List$1 } from "igniteui-webcomponents-core";
import { ScaleTransform } from "igniteui-webcomponents-core";
import { NativeUI } from "igniteui-webcomponents-core";
import { ControlDisplayDensity_$type } from "igniteui-webcomponents-core";
import { FontInfo } from "igniteui-webcomponents-core";
import { KeyFrameAnimationFactory } from "igniteui-webcomponents-core";
import { AnimationKeyFrameEffect } from "igniteui-webcomponents-core";
import { AnimationKeyFrameEffectTiming } from "igniteui-webcomponents-core";
import { stringReplace, stringIsNullOrEmpty } from "igniteui-webcomponents-core";
import { TransformGroup } from "igniteui-webcomponents-core";
import { TranslateTransform } from "igniteui-webcomponents-core";
import { SuffixShiftType_$type } from "./SuffixShiftType";
import { isNaN_ } from "igniteui-webcomponents-core";
import { PrefixShiftType_$type } from "./PrefixShiftType";
import { LabelShiftType_$type } from "./LabelShiftType";
import { HorizontalAlignment_$type } from "igniteui-webcomponents-core";
import { MouseButtonEventArgs } from "igniteui-webcomponents-core";
import { KeyEventArgs } from "igniteui-webcomponents-core";
import { InputShiftType_$type } from "./InputShiftType";
import { SuffixVisualModelExport } from "./SuffixVisualModelExport";
import { PrefixVisualModelExport } from "./PrefixVisualModelExport";
import { InputGroupDisplayType_$type } from "./InputGroupDisplayType";
import { BaseControlTheme_$type } from "igniteui-webcomponents-core";
import { CornerRadius } from "igniteui-webcomponents-core";
import { Thickness } from "igniteui-webcomponents-core";
import { ThemeResolver } from "./ThemeResolver";
import { ObservableCollection$1 } from "igniteui-webcomponents-core";
import { AnimationKeyFrameProperty } from "igniteui-webcomponents-core";
import { InputGroupVisualModelExport } from "./InputGroupVisualModelExport";
import { AppearanceHelper } from "igniteui-webcomponents-core";
import { LabelVisualModelExport } from "./LabelVisualModelExport";
import { InputVisualModelExport } from "./InputVisualModelExport";
import { Dictionary$2 } from "igniteui-webcomponents-core";
import { Theme } from "./Theme";
import { DeviceUtils } from "igniteui-webcomponents-core";
import { BrushUtil } from "igniteui-webcomponents-core";
import { FontUtil } from "igniteui-webcomponents-core";
import { MaskParsingService } from "./MaskParsingService";
import { InputChangeEventArgs } from "./InputChangeEventArgs";
import { MaskOptions } from "./MaskOptions";
let InputGroupView = /*@__PURE__*/ (() => {
class InputGroupView extends Base {
constructor() {
super();
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;
}
ak() {
}
ac(a) {
if (typeCast(XLabel.$, a) !== null) {
a.be = "flex-start";
}
}
ae(a) {
}
ad() {
}
g() {
return true;
}
get w() {
return this.n;
}
get as() {
return null;
}
get h() {
return true;
}
ah(a) {
if (a == null) {
for (let b of fromEnum(this.i)) {
b();
}
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");
let c = this.v;
this.i.add(c.listen("focusin", runOn(this, this.aj)));
this.i.add(c.listen("focusout", runOn(this, this.am)));
let 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;
let 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", (f) => {
let comp_ = f.componentRef;
this.t = comp_;
this.p.setStyleProperty("flex-direction", "row");
}, true);
let 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");
let 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, ((() => {
let $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();
}
get s() {
return this.p;
}
get v() {
return this.l.rootWrapper;
}
get u() {
return this.m;
}
get x() {
return this.q;
}
get y() {
return this.r;
}
aq(a) {
if (this.z != a) {
this.z = a;
if (this.o != null) {
this.o.setAttribute("d", this.z);
}
}
}
ap() {
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;
}
}
aa(a) {
}
al() {
if (this.g()) {
}
}
j() {
let a = this.l.rootWrapper.getStyleProperty("height");
return parseFloat(stringReplace(a, "px", ""));
}
ag() {
this.f = true;
}
ai() {
this.f = false;
for (let a of fromEnum(this.i)) {
a();
}
this.i.clear();
}
ar(a) {
if (a != null) {
this.l.rootWrapper.setStyleProperty("font", a.fontString);
}
}
k(a) {
return a.view.j();
}
af() {
if (KeyFrameAnimationFactory.h == null) {
KeyFrameAnimationFactory.h = this.l;
}
}
a(a) {
return new AnimationKeyFrameEffect(0, this.u, 0, null, a);
}
c(a) {
return new AnimationKeyFrameEffect(0, this.x, 0, null, a);
}
b(a) {
return new AnimationKeyFrameEffect(0, this.r, 0, null, a);
}
ao(a) {
}
ab(a) {
this.p.append(a);
}
an(a) {
this.p.removeChild(a);
}
aj(a) {
this.d.jz();
}
am(a) {
this.d.j1();
}
}
InputGroupView.$t = /*@__PURE__*/ markType(InputGroupView, 'InputGroupView');
return InputGroupView;
})();
export { InputGroupView };
let SuffixView = /*@__PURE__*/ (() => {
class SuffixView extends Base {
constructor() {
super();
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;
}
p() {
}
e() {
return true;
}
get s() {
return null;
}
n(a) {
if (a == null) {
for (let b of fromEnum(this.f)) {
b();
}
this.f.clear();
}
this.h = a;
this.h.rootWrapper.setStyleProperty("display", "inline-block");
let 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", (d) => {
}, true);
this.a.am();
}
r() {
let a = this.g();
if (isNaN_(a) || a == 0) {
if (!this.d) {
this.d = true;
this.h.setTimeout(() => {
this.d = false;
this.r();
}, 100);
}
}
let b = new TransformGroup();
b.j.add(((() => {
let $ret = new TranslateTransform();
$ret.k = this.a.k == 2 ? (this.g() * -0.25) : 0;
return $ret;
})()));
b.j.add(((() => {
let $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");
}
g() {
let a = this.h.rootWrapper.getStyleProperty("height");
return parseFloat(stringReplace(a, "px", ""));
}
q() {
if (this.e()) {
}
}
j(a) {
this.a.aj();
}
k(a) {
this.a.ak();
}
m() {
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)));
}
o() {
this.c = false;
for (let a of fromEnum(this.f)) {
a();
}
this.f.clear();
}
l(a) {
this.i.append(a);
}
}
SuffixView.$t = /*@__PURE__*/ markType(SuffixView, 'SuffixView');
return SuffixView;
})();
export { SuffixView };
let PrefixView = /*@__PURE__*/ (() => {
class PrefixView extends Base {
constructor() {
super();
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;
}
p() {
}
e() {
return true;
}
get s() {
return null;
}
n(a) {
if (a == null) {
for (let b of fromEnum(this.f)) {
b();
}
this.f.clear();
}
this.h = a;
this.h.rootWrapper.setStyleProperty("display", "inline-block");
let 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", (d) => {
}, true);
this.a.am();
}
r() {
let a = this.g();
if (isNaN_(a) || a == 0) {
if (!this.d) {
this.d = true;
this.h.setTimeout(() => {
this.d = false;
this.r();
}, 100);
}
}
let b = new TransformGroup();
b.j.add(((() => {
let $ret = new TranslateTransform();
$ret.k = this.a.k == 2 ? (this.g() * -0.25) : 0;
return $ret;
})()));
b.j.add(((() => {
let $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");
}
g() {
let a = this.h.rootWrapper.getStyleProperty("height");
return parseFloat(stringReplace(a, "px", ""));
}
q() {
if (this.e()) {
}
}
j(a) {
this.a.aj();
}
k(a) {
this.a.ak();
}
m() {
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)));
}
o() {
this.c = false;
for (let a of fromEnum(this.f)) {
a();
}
this.f.clear();
}
l(a) {
this.i.append(a);
}
}
PrefixView.$t = /*@__PURE__*/ markType(PrefixView, 'PrefixView');
return PrefixView;
})();
export { PrefixView };
let LabelView = /*@__PURE__*/ (() => {
class LabelView extends Base {
constructor() {
super();
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;
}
ae() {
}
g() {
return true;
}
get q() {
return this.n;
}
get an() {
return null;
}
get h() {
return true;
}
v() {
if (KeyFrameAnimationFactory.h == null) {
KeyFrameAnimationFactory.h = this.m;
}
}
b(a) {
return new AnimationKeyFrameEffect(0, this.m.rootWrapper, 0, null, a);
}
a(a) {
return new AnimationKeyFrameEffect(0, this.m.rootWrapper, 0, null, a);
}
z(a) {
if (a == null) {
for (let b of fromEnum(this.i)) {
b();
}
this.i.clear();
}
this.m = a;
this.m.rootWrapper.setStyleProperty("display", "inline-block");
this.m.rootWrapper.setStyleProperty("position", "relative");
let 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();
}
l() {
return this.c.l == 0 ? (this.j() * 0.5) : 0;
}
aj() {
this.c.bk = "block";
let a = new TransformGroup();
a.j.add(((() => {
let $ret = new TranslateTransform();
$ret.k = this.c.l == 0 ? (this.j() * 0.5) : 0;
return $ret;
})()));
a.j.add(((() => {
let $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");
}
ak() {
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;
}
}
ai() {
this.n.setText(this.c.text != null ? this.c.text : "");
}
al(a) {
if (this.r != a) {
this.r = a;
if (this.o != null) {
this.o.setAttribute("d", this.r);
}
}
}
ab() {
if (this.m != null) {
this.m.rootWrapper.setStyleProperty("display", this.c.bk);
this.n.setStyleProperty("display", this.c.bk);
let ext_ = this.m.getExternal(this.c, null, null);
if (ext_ && ext_._onDisplayChanged) {
ext_._onDisplayChanged();
}
;
}
}
w() {
if (this.m != null) {
this.m.rootWrapper.setStyleProperty("align-items", this.c.bc);
this.n.setStyleProperty("align-items", this.c.bc);
let ext_ = this.m.getExternal(this.c, null, null);
if (ext_ && ext_._onAlignItemsChanged) {
ext_._onAlignItemsChanged();
}
;
}
}
x() {
if (this.m != null) {
this.m.rootWrapper.setStyleProperty("align-self", this.c.be);
this.n.setStyleProperty("align-self", this.c.be);
let ext_ = this.m.getExternal(this.c, null, null);
if (ext_ && ext_._onAlignSelfChanged) {
ext_._onAlignSelfChanged();
}
;
}
}
ac() {
if (this.m != null) {
this.m.rootWrapper.setStyleProperty("flex-direction", this.c.bn);
this.n.setStyleProperty("flex-direction", this.c.bn);
let ext_ = this.m.getExternal(this.c, null, null);
if (ext_ && ext_._onFlexDirectionChanged) {
ext_._onFlexDirectionChanged();
}
;
}
}
ad() {
if (this.m != null) {
this.m.rootWrapper.setStyleProperty("flex-grow", this.c.bp);
this.n.setStyleProperty("flex-grow", this.c.bp);
let ext_ = this.m.getExternal(this.c, null, null);
if (ext_ && ext_._onFlexGrowChanged) {
ext_._onFlexGrowChanged();
}
;
}
}
s(a) {
}
ag() {
if (this.g()) {
}
}
j() {
let a = this.k();
if (a == 0 || isNaN_(a)) {
let b = NaN;
let c = this.m.rootWrapper.parent();
if (c != null) {
if (c.getChildCount() > 1) {
let d = null;
let e = null;
for (let f = 0; f < c.getChildCount(); f++) {
let 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;
}
k() {
let a = this.m.rootWrapper.getStyleProperty("height");
return parseFloat(stringReplace(a, "px", ""));
}
t(a) {
this.c.ch();
}
u(a) {
this.c.ci();
}
y() {
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)));
}
aa() {
this.f = false;
for (let a of fromEnum(this.i)) {
a();
}
this.i.clear();
}
am(a) {
if (a != null) {
this.n.setStyleProperty("font", a.fontString);
}
}
ah(a) {
NativeUI.q(this.n, a);
}
e() {
return ((() => {
let $ret = new FontInfo();
$ret.q = "Verdana";
$ret.f = 13;
return $ret;
})());
}
af() {
}
}
LabelView.$t = /*@__PURE__*/ markType(LabelView, 'LabelView');
return LabelView;
})();
export { LabelView };
let InputView = /*@__PURE__*/ (() => {
class InputView extends Base {
constructor() {
super();
this.c = null;
this.m = null;
this.d = null;
this.k = new List$1(Delegate_$type, 0);
this.h = false;
this.g = false;
this.s = null;
this.e = true;
this.n = null;
this.o = null;
this.h = false;
}
at() {
}
i() {
return true;
}
get r() {
return this.n;
}
get be() {
return null;
}
get j() {
return true;
}
aq(a) {
if (a == null) {
for (let b of fromEnum(this.k)) {
b();
}
this.k.clear();
}
this.m = a;
this.m.rootWrapper.setStyleProperty("display", "inline-block");
let c = this.m.createElement("input");
c.setAttribute("type", this.c.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.c.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.u(this.c.dy));
c.setStyleProperty("font-family", "Verdana");
c.setStyleProperty("font-size", "1rem");
this.k.add(c.listen("change", runOn(this, this.z)));
this.k.add(c.listen("input", runOn(this, this.aa)));
this.k.add(c.listen("focus", runOn(this, this.af)));
this.k.add(c.listen("blur", runOn(this, this.y)));
this.k.add(c.listen("mouseenter", runOn(this, this.w)));
this.k.add(c.listen("mouseleave", runOn(this, this.x)));
this.k.add(c.listen("keydown", runOn(this, this.ag)));
this.k.add(c.listen("keyup", runOn(this, this.ai)));
this.k.add(c.listen("keypress", runOn(this, this.ah)));
this.k.add(c.listen("paste", runOn(this, this.al)));
this.k.add(c.listen("dragenter", runOn(this, this.ad)));
this.k.add(c.listen("dragleave", runOn(this, this.ae)));
this.k.add(c.listen("compositionstart", runOn(this, this.ac)));
this.k.add(c.listen("compositionend", runOn(this, this.ab)));
this.k.add(c.listen("mousedown", runOn(this, this.aj)));
this.k.add(c.listen("mouseup", runOn(this, this.ak)));
this.n = c;
this.m.append(this.n);
this.an();
this.c.dl();
}
a1(a) {
if (a) {
this.n.setAttribute("readonly", a.toString());
}
else {
this.n.getNativeElement().removeAttribute("readonly");
}
}
az(a) {
if (a) {
this.n.setAttribute("disabled", "true");
}
else {
this.n.getNativeElement().removeAttribute("disabled");
}
}
a6(a) {
this.n.setStyleProperty("text-align", this.u(a));
}
a5(a) {
if (a) {
this.n.removeClass("ig-input-hide-spinner");
}
else {
this.n.addClass("ig-input-hide-spinner");
}
}
ac(a) {
this.h = true;
this.c.c3();
}
ab(a) {
this.h = false;
let b = null;
if (a.originalEvent != null) {
b = (a.originalEvent.data);
}
this.c.c2(b);
}
u(a) {
switch (a) {
case 0: return "left";
case 2: return "right";
case 1: return "center";
}
return "left";
}
ax() {
this.n.setAttribute("type", this.c.b8);
if (this.c.b8 == "date") {
this.n.setStyleProperty("line-height", "normal");
}
else {
this.n.setStyleProperty("line-height", "0");
}
}
av() {
this.n.setAttribute("placeholder", this.c.cg);
}
ba() {
switch (this.c.z) {
case 1:
this.n.setStyleProperty("height", "2rem");
this.n.setStyleProperty("font-size", "1rem");
break;
case 2:
this.n.setStyleProperty("height", "1.68421rem");
this.n.setStyleProperty("font-size", "1rem");
break;
case 3:
this.n.setStyleProperty("height", "1.45455rem");
this.n.setStyleProperty("font-size", ".95455rem");
break;
case 4:
this.n.setStyleProperty("height", "1.388445rem");
this.n.setStyleProperty("font-size", "0.91116rem");
break;
}
}
a9() {
let a = this.l();
if (isNaN_(a) || a == 0) {
if (!this.g) {
this.g = true;
this.m.setTimeout(() => {
this.g = false;
this.a9();
}, 100);
}
}
let b = new TransformGroup();
b.j.add(((() => {
let $ret = new TranslateTransform();
$ret.k = this.c.o == 2 ? (this.l() * -0.25) : 0;
return $ret;
})()));
b.j.add(((() => {
let $ret = new ScaleTransform();
$ret.l = 1;
$ret.m = 1;
return $ret;
})()));
NativeUI.af(this.m.rootWrapper, b);
this.m.rootWrapper.setStyleProperty("transform-origin", "0px 0px");
}
l() {
let a = this.m.rootWrapper.getStyleProperty("height");
let b = parseFloat(stringReplace(a, "px", ""));
return b;
}
ay(a) {
this.n.setProperty("value", a);
}
a0(a) {
this.n.setAttribute("name", a);
}
y(a) {
this.c.cz();
}
af(a) {
this.c.c7();
}
aj(a) {
let b = this.bd(a);
this.c.dd(b);
if (b.handled) {
a.preventDefault();
}
}
ak(a) {
let b = this.bd(a);
this.c.dg(b);
if (b.handled) {
a.preventDefault();
}
}
bd(a) {
let b = new MouseButtonEventArgs();
b.position = { $type: Point_$type, x: a.offsetX, y: a.offsetY };
return b;
}
z(a) {
this.c.c0();
}
aa(a) {
this.c.c1();
}
ag(a) {
let b = new KeyEventArgs(0, a);
this.c.da(b);
}
ai(a) {
let b = new KeyEventArgs(0, a);
this.c.dc(b);
}
ah(a) {
let b = new KeyEventArgs(0, a);
this.c.db(b);
}
al(a) {
this.c.dh();
}
ad(a) {
this.c.c5();
}
ae(a) {
this.c.c6();
}
bb(a) {
if (this.s != a) {
this.s = a;
if (this.o != null) {
this.o.setAttribute("d", this.s);
}
}
}
t() {
return this.n.getProperty("value");
}
v(a) {
}
a8() {
if (this.i()) {
if (this.c.as) {
this.n.setAttribute("tabindex", this.c.be.toString());
}
else {
this.n.getNativeElement().removeAttribute("tabindex");
}
}
}
q() {
let a = this.n.getProperty("selectionStart");
return typeGetValue(a);
}
p() {
let a = this.n.getProperty("selectionEnd");
return typeGetValue(a);
}
a4(a) {
this.n.setProperty("selectionStart", a);
}
a2(a) {
this.n.setProperty("selectionEnd", a);
}
au() {
if (this.i()) {
}
}
w(a) {
this.c.de();
}
x(a) {
this.c.df();
}
ao() {
this.e = true;
this.k.add(this.n.listen("change", runOn(this, this.z)));
this.k.add(this.n.listen("input", runOn(this, this.aa)));
this.k.add(this.n.listen("focus", runOn(this, this.af)));
this.k.add(this.n.listen("blur", runOn(this, this.y)));
this.k.add(this.n.listen("mouseenter", runOn(this, this.w)));
this.k.add(this.n.listen("mouseleave", runOn(this, this.x)));
this.k.add(this.n.listen("keydown", runOn(this, this.ag)));
this.k.add(this.n.listen("paste", runOn(this, this.al)));
this.k.add(this.n.listen("dragenter", runOn(this, this.ad)));
this.k.add(this.n.listen("dragleave", runOn(this, this.ae)));
this.k.add(this.n.listen("compositionstart", runOn(this, this.ac)));
this.k.add(this.n.listen("compositionend", runOn(this, this.ab)));
this.k.add(this.n.listen("mousedown", runOn(this, this.aj)));
this.k.add(this.n.listen("mouseup", runOn(this, this.ak)));
}
ar() {
this.e = false;
for (let a of fromEnum(this.k)) {
a();
}
this.k.clear();
}
bc(a) {
if (a != null) {
this.n.setStyleProperty("font", a.fontString);
}
}
a7() {
}
ap() {
if (this.n != null) {
let a = this.n.getNativeElement();
a.blur();
}
}
as(a) {
if (this.n != null) {
this.n.focus(a);
}
}
aw() {
if (this.n != null) {
let nativeInput_ = this.n;
nativeInput_.getNativeElement().select();
}
}
a3(a, b) {
if (this.n != null) {
let c = this.n.getNativeElement();
c.setSelectionRange(a, b);
}
}
am() {
if (KeyFrameAnimationFactory.h == null) {
KeyFrameAnimationFactory.h = this.m;
}
}
b(a) {
return new AnimationKeyFrameEffect(0, this.m.rootWrapper, 0, null, a);
}
an() {
if (InputView.f) {
return;
}
let 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}";
let b = this.m.createElement("style");
b.setRawText(a);
document.head.appendChild(b.getNativeElement());
InputView.f = true;
}
a() {
let rect_ = this.n.getNativeElement().getBoundingClientRect();
let a = (rect_.top);
let b = (rect_.left);
let c = new Array(2);
c[0] = a;
c[1] = b;
return c;
}
}
InputView.$t = /*@__PURE__*/ markType(InputView, 'InputView');
InputView.f = false;
return InputView;
})();
export { InputView };
let XInputGroupItem = /*@__PURE__*/ (() => {
class XInputGroupItem extends Base {
constructor() {
super(...arguments);
this.c = null;
this.a = null;
this.propertyChanged = null;
}
get e() {
return this.c;
}
set e(a) {
let b = this.c;
this.c = a;
if (b != this.c) {
this.g("Name", b, a);
}
}
get b() {
return this.a;
}
set b(a) {
let b = this.a;
this.a = a;
if (b != this.a) {
this.g("InputGroup", b, a);
}
}
g(a, b, c) {
if (this.propertyChanged != null) {
this.propertyChanged(this, new PropertyChangedEventArgs(a));
}
this.h(a, b, c);
}
h(a, b, c) {
}
}
XInputGroupItem.$t = /*@__PURE__*/ markType(XInputGroupItem, 'XInputGroupItem', Base.$, [INotifyPropertyChanged_$type]);
return XInputGroupItem;
})();
export { XInputGroupItem };
let XSuffix = /*@__PURE__*/ (() => {
class XSuffix extends XInputGroupItem {
constructor() {
super();
this._view = null;
this.j = 0;
this.v = "ig-suffix-" + XSuffix.s++;
this.u = null;
this.n = false;
this.m = false;
this.o = false;
let a = new SuffixView();
a.a = this;
this.view = a;
this.view.p();
}
get view() {
return this._view;
}
set view(a) {
this._view = a;
}
destroy() {
this.provideContainer(null);
}
get k() {
return this.j;
}
set k(a) {
let b = this.j;
this.j = a;
if (b != this.j) {
this.g("ShiftType", enumGetBox(SuffixShiftType_$type, b), enumGetBox(SuffixShiftType_$type, a));
}
}
h(a, b, c) {
super.h(a, b, c);
switch (a) {
case "InputGroup":
this.ai();
break;
case "ShiftType":
this.al();
break;
}
}
al() {
this.view.r();
}
ai() {
this.view.r();
}
ap() {
}
ao() {
}
aj() {
this.q = true;
}
ak() {
this.q = false;
}
get z() {
return this.v;
}
set z(a) {
let b = this.v;
this.v = a;
if (b != this.v) {
this.g("Id", b, a);
}
}
get w() {
return this.u;
}
set w(a) {
let b = this.u;
this.u = a;
if (b != this.u) {
this.g("AriaLabel", b, a);
}
}
get q() {
return this.n;
}
set q(a) {
let b = this.n;
this.n = a;
if (b != this.n) {
this.g("IsHover", b, a);
}
}
get disabled() {
return this.m;
}
set disabled(a) {
let b = this.m;
this.m = a;
if (b != this.m) {
this.g("IsDisabled", b, a);
}
}
am() {
}
onDetachedFromUI() {
this.view.o();
}
onAttachedToUI() {
this.view.m();
}
r() {
return this.view.e();
}
t() {
return this.i();
}
y() {
let a = this.i();
return a.e();
}
i() {
let a = new SuffixVisualModelExport();
a.a = this.k;
a.c = this.q;
a.b = this.disabled;
a.d = this.e;
return a;
}
appendContentChild(a) {
this.view.l(a);
}
provideContainer(a) {
this.view.n(a);
}
}
XSuffix.$t = /*@__PURE__*/ markType(XSuffix, 'XSuffix', XInputGroupItem.$);
XSuffix.s = 0;
return XSuffix;
})();
export { XSuffix };
let XPrefix = /*@__PURE__*/ (() => {
class XPrefix extends XInputGroupItem {
constructor() {
super();
this._view = null;
this.j = 0;
this.v = "ig-prefix-" + XPrefix.s++;
this.u = null;
this.n = false;
this.m = false;
this.o = false;
let a = new PrefixView();
a.a = this;
this.view = a;
this.view.p();
}
get view() {
return this._view;
}
set view(a) {
this._view = a;
}
destroy() {
this.provideContainer(null);
}
get k() {
return this.j;
}
set k(a) {
let b = this.j;
this.j = a;
if (b != this.j) {
this.g("ShiftType", enumGetBox(PrefixShiftType_$type, b), enumGetBox(PrefixShiftType_$type, a));
}
}
h(a, b, c) {
super.h(a, b, c);
switch (a) {
case "InputGroup":
this.ai();
break;
case "ShiftType":
this.al();
break;
}
}
al() {
this.view.r();
}
ai() {
this.view.r();
}
ap() {
}
ao() {
}
aj() {
this.q = true;
}
ak() {
this.q = false;
}
get z() {
return this.v;
}
set z(a) {
let b = this.v;
this.v = a;
if (b != this.v) {
this.g("Id", b, a);
}
}
get w() {
return this.u;
}
set w(a) {
let b = this.u;
this.u = a;
if (b != this.u) {
this.g("AriaLabel", b, a);
}
}
get q() {
return this.n;
}
set q(a) {
let b = this.n;
this.n = a;
if (b != this.n) {
this.g("IsHover", b, a);
}
}
get disabled() {
return this.m;
}
set disabled(a) {
let b = this.m;
this.m = a;
if (b != this.m) {
this.g("IsDisabled", b, a);
}
}
am() {
}
onDetachedFromUI() {
this.view.o();
}
onAttachedToUI() {
this.view.m();
}
r() {
return this.view.e();
}
t() {
return this.i();
}
y() {
let a = this.i();
return a.e();
}
i() {
let a = new PrefixVisualModelExport();
a.a = this.k;
a.c = this.q;
a.b = this.disabled;
a.d = this.e;
return a;
}
appendContentChild(a) {
this.view.l(a);
}
provideContainer(a) {
this.view.n(a);
}
}
XPrefix.$t = /*@__PURE__*/ markType(XPrefix, 'XPrefix', XInputGroupItem.$);
XPrefix.s = 0;
return XPrefix;
})();
export { XPrefix };
let XInputGroup = /*@__PURE__*/ (() => {
class XInputGroup extends Base {
constructor() {
super();
this.c = 0;
this.r = 1;
this.q = 1;
this.aj = false;
this.n = 0;
this._view = null;
this.w = null;
this.u = null;
this.lostFocus = null;
this.gotFocus = null;
this.dw = XInputGroup.m.i(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 0), "BorderWidth");
this.dx = XInputGroup.m.i(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 0), "FocusBorderWidth");
this.kv = XInputGroup.m.y(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 0), "CornerRadius");
this.ol = XInputGroup.m.ai(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 0), "ContentPadding");
this.m9 = XInputGroup.m.ad(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 0), "BorderColor");
this.na = XInputGroup.m.ad(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 0), "FocusBorderColor");
this.nb = XInputGroup.m.ad(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 0), "FocusLabelColor");
this.d5 = XInputGroup.m.i(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 0), "UnderlineWidth");
this.d4 = XInputGroup.m.i(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 0), "UnderlineRippleWidth");
this.d1 = XInputGroup.m.i(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 0), "HoverUnderlineWidth");
this.ne = XInputGroup.m.ad(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 0), "UnderlineColor");
this.nf = XInputGroup.m.ad(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 0), "UnderlineRippleColor");
this.nd = XInputGroup.m.ad(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 0), "HoverUnderlineColor");
this.nc = XInputGroup.m.ad(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 0), "FocusUnderlineColor");
this.d2 = XInputGroup.m.i(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 0), "UnderlineOpacity");
this.d0 = XInputGroup.m.i(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 0), "HoverUnderlineOpacity");
this.dy = XInputGroup.m.i(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 0), "FocusUnderlineOpacity");
this.dz = XInputGroup.m.i(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 0), "FocusUnderlineRippleOpacity");
this.d3 = XInputGroup.m.i(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 0), "UnderlineRippleOpacity");
this.m8 = XInputGroup.m.ad(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 0), "BackgroundColor");
this.dl = XInputGroup.m.i(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 1), "BorderWidth");
this.dm = XInputGroup.m.i(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 1), "FocusBorderWidth");
this.ku = XInputGroup.m.y(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 1), "CornerRadius");
this.ok = XInputGroup.m.ai(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 1), "ContentPadding");
this.m1 = XInputGroup.m.ad(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 1), "BorderColor");
this.m2 = XInputGroup.m.ad(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 1), "FocusBorderColor");
this.m3 = XInputGroup.m.ad(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 1), "FocusLabelColor");
this.dv = XInputGroup.m.i(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 1), "UnderlineWidth");
this.du = XInputGroup.m.i(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 1), "UnderlineRippleWidth");
this.dr = XInputGroup.m.i(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 1), "HoverUnderlineWidth");
this.m6 = XInputGroup.m.ad(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 1), "UnderlineColor");
this.m7 = XInputGroup.m.ad(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 1), "UnderlineRippleColor");
this.m5 = XInputGroup.m.ad(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 1), "HoverUnderlineColor");
this.m4 = XInputGroup.m.ad(XInputGroup.o, enumGetBox(InputGroupDisplayType_$type, 1), "F