igniteui-react-inputs
Version:
Ignite UI React input components.
1,588 lines (1,587 loc) • 48.6 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, String_$type, Delegate_$type, fromEnum, runOn, typeCast, markType, INotifyPropertyChanged_$type, PropertyChangedEventArgs, enumGetBox } from "igniteui-react-core";
import { DomWrapper_$type } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { Tuple$2 } from "igniteui-react-core";
import { SVGNode } from "igniteui-react-core";
import { FastIterationDictionary$2 } from "igniteui-react-core";
import { Dictionary$2 } from "igniteui-react-core";
import { Brush } from "igniteui-react-core";
import { NativeUI } from "igniteui-react-core";
import { PrimitiveVisualData } from "igniteui-react-core";
import { Path } from "igniteui-react-core";
import { Line } from "igniteui-react-core";
import { Rectangle } from "igniteui-react-core";
import { Ellipse } from "igniteui-react-core";
import { PathVisualData } from "igniteui-react-core";
import { LineVisualData } from "igniteui-react-core";
import { RectangleVisualData } from "igniteui-react-core";
import { EllipseVisualData } from "igniteui-react-core";
import { DoubleCollection } from "igniteui-react-core";
import { LegendItemHelper } from "igniteui-react-core";
import { isNaN_ } from "igniteui-react-core";
import { IIcon_$type } from "igniteui-react-core";
import { BaseControlTheme_$type } from "igniteui-react-core";
import { IconClickedEventArgs } from "./IconClickedEventArgs";
import { IconVisualModelExport } from "./IconVisualModelExport";
import { FontUtil } from "igniteui-react-core";
import { stringStartsWith } from "igniteui-react-core";
import { trimStart } from "igniteui-react-core";
/**
* @hidden
*/
var IconView = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IconView, _super);
function IconView() {
var _this = _super.call(this) || this;
_this.d = null;
_this.v = null;
_this.g = null;
_this.o = new List$1(Delegate_$type, 0);
_this.q = null;
_this.r = null;
_this.s = null;
_this.t = null;
_this.u = null;
_this.e = null;
_this.f = null;
_this.ac = null;
_this.n = new Dictionary$2(Brush.$, String_$type, 0);
_this.j = true;
_this.y = null;
_this.x = null;
_this.z = null;
_this.w = null;
_this.p = new List$1(DomWrapper_$type, 0);
_this.q = new List$1(Tuple$2.$.specialize(SVGNode.$, Base.$), 0);
_this.r = new List$1(Tuple$2.$.specialize(SVGNode.$, Base.$), 0);
_this.s = new List$1(Tuple$2.$.specialize(SVGNode.$, Base.$), 0);
_this.t = new List$1(Tuple$2.$.specialize(SVGNode.$, Base.$), 0);
_this.u = new List$1(Tuple$2.$.specialize(SVGNode.$, Base.$), 0);
_this.e = new FastIterationDictionary$2(String_$type, List$1.$.specialize(Tuple$2.$.specialize(SVGNode.$, Base.$)), 0);
_this.f = new FastIterationDictionary$2(String_$type, List$1.$.specialize(Tuple$2.$.specialize(SVGNode.$, Base.$)), 0);
return _this;
}
IconView.prototype.an = function () {
};
IconView.prototype.l = function () {
return true;
};
Object.defineProperty(IconView.prototype, "aa", {
get: function () {
return this.y;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IconView.prototype, "ab", {
get: function () {
return null;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IconView.prototype, "c", {
get: function () {
return this.p.toArray();
},
enumerable: false,
configurable: true
});
Object.defineProperty(IconView.prototype, "m", {
get: function () {
return true;
},
enumerable: false,
configurable: true
});
IconView.prototype.al = function (a) {
var e_1, _a;
if (a == null) {
try {
for (var _b = __values(fromEnum(this.o)), _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.o.clear();
if (this.y != null) {
this.y.unlistenAll();
}
if (this.x != null) {
this.x.unlistenAll();
}
}
this.v = a;
a.rootWrapper.setStyleProperty("position", "relative");
this.v.rootWrapper.setStyleProperty("display", "flex");
this.v.rootWrapper.setStyleProperty("flex-direction", "row");
this.v.rootWrapper.setStyleProperty("flex-wrap", "no-wrap");
this.v.rootWrapper.setStyleProperty("align-items", "center");
this.v.rootWrapper.setStyleProperty("justify-content", "center");
this.av();
var c = this.v.createElementNS("svg", "http://www.w3.org/2000/svg");
c.setStyleProperty("position", "absolute");
c.setStyleProperty("top", "0");
c.setStyleProperty("left", "0");
c.setStyleProperty("right", "0");
c.setStyleProperty("bottom", "0");
this.y = c;
var d = this.v.createElement("img");
d.setStyleProperty("height", "100%");
d.setStyleProperty("width", "100%");
d.setStyleProperty("object-fit", "contain");
this.x = d;
this.a1();
this.w = a.createElementNS("defs", "http://www.w3.org/2000/svg");
this.y.append(this.w);
this.v.append(this.y);
this.o.add(c.listen("click", runOn(this, this.ak)));
this.d.c6();
};
IconView.prototype.ay = function (a) {
this.z = null;
this.n.clear();
this.v.rootWrapper.removeChildren();
this.v.rootWrapper.append(this.y);
this.y.removeChildren();
this.w.removeChildren();
this.p.clear();
if (a != null) {
var b = this.v.createElementNS("path", "http://www.w3.org/2000/svg");
b.setAttribute("d", a);
this.y.append(this.w);
this.y.append(b);
this.p.add(b);
}
};
IconView.prototype.az = function (a) {
this.z = null;
this.n.clear();
this.v.rootWrapper.removeChildren();
this.v.rootWrapper.append(this.y);
this.y.removeChildren();
this.w.removeChildren();
this.p.clear();
if (a != null && a.length > 0) {
this.y.append(this.w);
for (var b = 0; b < a.length; b++) {
var c = this.v.createElementNS("path", "http://www.w3.org/2000/svg");
c.setAttribute("d", a[b]);
this.y.append(c);
this.p.add(c);
}
}
};
IconView.prototype.ax = function (a) {
this.z = null;
this.v.rootWrapper.removeChildren();
if (a != null) {
var b = this.v.rootWrapper.getNativeElement();
b.innerHTML = a;
this.z = this.v.rootWrapper.getChildAt(0);
var c = this.z.getAttribute("viewbox");
if (c != null) {
var d = c.split(' ');
if (d.length == 1) {
d = c.split(',');
}
if (d.length == 4) {
var e = parseFloat(d[0].trim());
var f = parseFloat(d[1].trim());
var g = parseFloat(d[2].trim());
var h = parseFloat(d[3].trim());
this.d.dd(e, f, g, h);
}
}
else {
this.d.dd(NaN, NaN, NaN, NaN);
}
}
};
IconView.prototype.at = function (a) {
this.z = null;
if (this.ac != a) {
this.ac = a;
this.v.rootWrapper.removeChildren();
this.v.rootWrapper.append(this.x);
this.x.setAttribute("src", a);
}
};
IconView.prototype.aw = function (a) {
if (typeof a === 'string') {
this.at(typeCast(String_$type, a));
}
};
IconView.prototype.ai = function () {
if (this.d.k != 3 && this.d.k != 4) {
this.ac = null;
}
};
IconView.prototype.k = function () {
return this.d.svgPath != null || this.d.svg != null || this.d.b != null;
};
IconView.prototype.av = function () {
this.v.rootWrapper.setStyleProperty("width", isNaN_(this.d.a9) ? "1.5rem" : this.d.a9 + "px");
this.v.rootWrapper.setStyleProperty("height", isNaN_(this.d.a1) ? "1.5rem" : this.d.a1 + "px");
};
IconView.prototype.a1 = function () {
var a = this.d.as;
var b = this.d.at;
var c = this.d.au;
var d = this.d.ar;
this.y.setAttribute("viewBox", a + " " + b + " " + c + " " + d);
if (this.z != null) {
this.z.setAttribute("viewBox", a + " " + b + " " + c + " " + d);
}
};
IconView.prototype.ap = function (a, b) {
var c = a.color;
if (!this.n.containsKey(a)) {
if (a.isGradient) {
var d = this.w.getChildCount();
var e = a;
var f = this.v.createElementNS("linearGradient", "http://www.w3.org/2000/svg");
var g = "ig_gradient_" + b + "_" + d;
f.setAttribute("id", g);
f.setAttribute("x1", e.startX.toString());
f.setAttribute("x2", e.endX.toString());
f.setAttribute("y1", e.startY.toString());
f.setAttribute("y2", e.endY.toString());
var j = e.gradientStops;
for (var i = 0; i < j.length; i++) {
var h = j[i];
var k = this.v.createElementNS("stop", "http://www.w3.org/2000/svg");
k.setAttribute("offset", h.offset * 100 + "%");
k.setAttribute("stop-color", h._fill);
f.append(k);
}
this.w.append(f);
this.n.addItem(a, g);
}
else if (a.isRadialGradient) {
}
}
};
IconView.prototype.aq = function (a, b) {
var c = a;
if (this.n.containsKey(b)) {
c.setAttribute("fill", "url(#" + this.n.item(b) + ")");
this.v.rootWrapper.removeChildren();
this.v.rootWrapper.append(this.y);
}
else {
NativeUI.r(a, b);
}
};
IconView.prototype.ar = function (a, b) {
var c = a;
if (this.n.containsKey(b)) {
c.setAttribute("stroke", "url('#" + this.n.item(b) + "')");
}
else {
NativeUI.aa(a, b);
}
};
IconView.prototype.ad = function (a) {
};
IconView.prototype.ao = function () {
if (this.l()) {
}
};
IconView.prototype.ae = function (a) {
this.d.c3();
};
IconView.prototype.af = function (a) {
this.d.c4();
};
IconView.prototype.aj = function () {
this.j = true;
this.o.add(this.v.rootWrapper.listen("mouseenter", runOn(this, this.ae)));
this.o.add(this.v.rootWrapper.listen("mouseleave", runOn(this, this.af)));
};
IconView.prototype.am = function () {
var e_2, _a;
this.j = false;
try {
for (var _b = __values(fromEnum(this.o)), _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.o.clear();
};
IconView.prototype.a0 = function (a) {
if (a != null) {
this.v.rootWrapper.setStyleProperty("font", a.fontString);
}
};
IconView.prototype.b = function () {
var rect_ = this.v.rootWrapper.getNativeElement().getBoundingClientRect();
var a = (rect_.top);
var b = (rect_.left);
var c = new Array(2);
c[0] = a;
c[1] = b;
return c;
};
IconView.prototype.ak = function (a) {
if (this.d.x()) {
a.stopPropagation();
a.preventDefault();
}
};
IconView.prototype.a = function () {
var a = new List$1(PrimitiveVisualData.$, 0);
var b = this.v.rootWrapper.getNativeElement();
return a.toArray();
};
IconView.prototype.ah = function (a, b) {
for (var c = 0; c < b.e.count; c++) {
var d = b.e._inner[c];
var e = this.h(d);
if (e != null) {
a.add(e);
}
else {
this.ah(a, d);
}
}
};
IconView.prototype.h = function (a) {
var b = null;
switch (a.c) {
case 7:
var c = ((function () {
var $ret = new Path();
$ret.an = a.w;
return $ret;
})());
this.au(c, a);
b = new PathVisualData(1, "path1", c);
break;
case 3:
var d = a;
var e = new Line();
e.an = d.w;
e.ao = d.x;
e.ap = d.y;
e.aq = d.z;
this.au(e, a);
b = new LineVisualData(1, "line1", e);
break;
case 4:
var f = a;
var g = new Rectangle();
g.width = f.z;
g.height = f.w;
g.ap = f.x;
g.aq = f.y;
this.au(g, a);
b = new RectangleVisualData(1, "rect1", g);
break;
case 5:
case 6:
var h = a;
var i = new Ellipse();
i.width = h.y * 2;
i.height = h.z * 2;
this.au(i, a);
b = new EllipseVisualData(1, "ellipse1", i);
break;
}
return b;
};
IconView.prototype.au = function (a, b) {
var c = b;
a.ad = b.t;
a.j = c.h;
a.am = c.v;
a.al = c.u;
a.ak = c.u;
a._opacity = c.q;
if (c.i != null) {
var d = new DoubleCollection();
var g = c.i;
for (var f = 0; f < g.length; f++) {
var e = g[f];
d.add(e);
}
a.ai = d;
}
};
IconView.prototype.i = function (a) {
if (typeCast(Path.$, a) !== null) {
return new PathVisualData(1, "path1", a);
}
else if (typeCast(Line.$, a) !== null) {
return new LineVisualData(1, "line1", a);
}
else if (typeCast(Rectangle.$, a) !== null) {
return new RectangleVisualData(1, "rect1", a);
}
else if (typeCast(Ellipse.$, a) !== null) {
return new EllipseVisualData(1, "ellipse1", a);
}
return null;
};
IconView.prototype.as = function (a, b) {
this.v.rootWrapper.removeChildren();
if (a == null) {
return;
}
LegendItemHelper.c(this.v, 0, 0, 24, 24, b, null, a, null);
};
IconView.prototype.ag = function () {
this.v.rootWrapper.removeChildren();
};
IconView.$t = markType(IconView, 'IconView');
return IconView;
}(Base));
export { IconView };
/**
* @hidden
*/
var XIcon = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(XIcon, _super);
function XIcon() {
var _this = _super.call(this) || this;
_this._view = null;
_this.k = 0;
_this.l = 0;
_this.dg = XIcon.dx;
_this.dh = XIcon.d1;
_this.di = XIcon.d2;
_this.y = XIcon.aw;
_this.dj = XIcon.dx;
_this.ds = XIcon.d1;
_this.ak = XIcon.aw;
_this.dt = XIcon.d2;
_this.dk = XIcon.dy;
_this.dl = XIcon.dz;
_this.ae = XIcon.av;
_this.dm = null;
_this.c = null;
_this.d = null;
_this.dn = null;
_this.dp = null;
_this.dq = null;
_this.dr = null;
_this.be = null;
_this.bj = null;
_this.bm = null;
_this.bl = null;
_this.a = null;
_this.de = null;
_this.bd = null;
_this.n = null;
_this.bk = "ig-icon-" + XIcon.bc++;
_this.ba = 0;
_this.p = false;
_this.bi = null;
_this.r = false;
_this.q = false;
_this.af = 1;
_this.aa = 0;
_this.am = NaN;
_this.ab = 0;
_this.an = NaN;
_this.ac = 24;
_this.ao = NaN;
_this.z = 24;
_this.al = NaN;
_this.ap = NaN;
_this.ad = NaN;
_this.clicked = null;
_this.propertyChanged = null;
_this.ah = NaN;
_this.ai = NaN;
_this.aj = NaN;
_this.ag = NaN;
var a = new IconView();
a.d = _this;
_this.view = a;
_this.view.an();
return _this;
}
Object.defineProperty(XIcon.prototype, "view", {
get: function () {
return this._view;
},
set: function (a) {
this._view = a;
},
enumerable: false,
configurable: true
});
XIcon.prototype.destroy = function () {
this.provideContainer(null);
};
XIcon.prototype.c5 = function (a, b, c) {
if (this.propertyChanged != null) {
this.propertyChanged(this, new PropertyChangedEventArgs(a));
}
this.c8(a, b, c);
};
XIcon.prototype.c8 = function (a, b, c) {
switch (a) {
case "Fill":
case "Stroke":
case "StrokeWidth":
case "HoverFill":
case "HoverStroke":
case "HoverStrokeThickness":
case "IsHover":
this.dc();
break;
case "FillColors":
case "StrokeColors":
case "ActualFill":
case "ActualStroke":
case "ActualStrokeWidth":
this.da();
break;
case "SVG":
this.bm = null;
this.a = null;
this.da();
break;
case "SVGPath":
this.bl = null;
this.a = null;
this.da();
break;
case "SVGPaths":
this.bl = null;
this.bm = null;
this.da();
break;
case "DataURL":
this.bl = null;
this.bm = null;
this.a = null;
this.da();
break;
case "Source":
this.bl = null;
this.bm = null;
this.a = null;
this.da();
break;
case "DataTemplate":
case "DataTemplateContext":
this.bl = null;
this.bm = null;
this.a = null;
this.da();
break;
case "Opacity":
this.db();
break;
case "ViewBoxLeft":
this.as = !isNaN_(this.a6) ? this.a6 : !isNaN_(this.ah) ? this.ah : 0;
break;
case "ViewBoxTop":
this.at = !isNaN_(this.a7) ? this.a7 : !isNaN_(this.ai) ? this.ai : 0;
break;
case "ViewBoxWidth":
this.au = !isNaN_(this.a8) ? this.a8 : !isNaN_(this.aj) ? this.aj : 24;
break;
case "ViewBoxHeight":
this.ar = !isNaN_(this.a5) ? this.a5 : !isNaN_(this.ag) ? this.ag : 24;
break;
case "ActualViewBoxLeft":
case "ActualViewBoxTop":
case "ActualViewBoxWidth":
case "ActualViewBoxHeight":
this.view.a1();
break;
case "Width":
case "Height":
this.view.av();
break;
}
};
XIcon.prototype.dc = function () {
var a = this.fill != null ? this.fill : XIcon.dx;
var b = this.ea != null ? this.ea : XIcon.d1;
var c = !isNaN_(this.a4) ? this.a4 : XIcon.aw;
var d = this.eb != null ? this.eb : XIcon.d2;
if (this.v) {
this.du = this.d3 != null ? this.d3 : a;
this.dv = this.d4 != null ? this.d4 : b;
this.aq = !isNaN_(this.a2) ? this.a2 : c;
this.dw = this.d5 != null ? this.d5 : d;
}
else {
this.du = a;
this.dv = b;
this.aq = c;
this.dw = d;
}
};
Object.defineProperty(XIcon.prototype, "t", {
get: function () {
return this.svgPath != null && !this.view.m;
},
enumerable: false,
configurable: true
});
XIcon.prototype.db = function () {
NativeUI.y(this.view.aa, this.a3);
};
XIcon.prototype.cz = function () {
this.view.ag();
};
XIcon.prototype.da = function () {
var a = this.view.aa;
if (this.t) {
var b = this.view.ab;
NativeUI.r(b, this.du);
NativeUI.aa(b, this.dv);
NativeUI.ad(b, this.aq);
}
else {
var c = this.j();
if (c != this.k) {
this.k = c;
this.view.ai();
}
var d = false;
if (this.df != null) {
this.view.as(this.df, this.bf);
}
else if (this.svgPath != null) {
if (stringStartsWith(trimStart(this.svgPath, ' ', '\n', '\r', '\t'), "<svg")) {
this.view.ax(this.svgPath);
d = true;
}
else {
this.view.ay(this.svgPath);
}
}
else if (this.b != null) {
this.view.az(this.b);
var e = this.view.c;
if (e != null && e.length > 0) {
var f = NativeUI.r;
var g = NativeUI.aa;
this.c7();
f = runOn(this.view, this.view.aq);
g = runOn(this.view, this.view.ar);
for (var h = 0; h < e.length; h++) {
if (this.du != null) {
f(e[h], this.du);
}
if (this.dv != null) {
g(e[h], this.dv);
}
if (!isNaN_(this.aq)) {
NativeUI.ad(e[h], this.aq);
}
if (this.dw != null) {
NativeUI.q(e[h], this.dw);
}
if (this.e != null && this.e.count == e.length) {
f(e[h], this.e.item(h));
}
if (this.f != null && this.f.count == e.length) {
g(e[h], this.f.item(h));
}
}
}
if (this.o != null) {
this.view.a0(this.o);
}
return;
}
else if (this.svg != null) {
this.view.ax(this.svg);
d = true;
}
else if (this.b0 != null) {
this.view.at(this.b0);
}
else if (this.bh != null) {
this.view.aw(this.bh);
}
else {
}
if (d) {
for (var i = 0; i < this.view.r.count; i++) {
var j = this.view.r._inner[i].c;
NativeUI.r(this.view.r._inner[i].d, j.l.f(this.d6));
}
for (var k = 0; k < this.view.s.count; k++) {
var l = this.view.s._inner[k].c;
NativeUI.aa(this.view.s._inner[k].d, l.m.f(this.d7));
}
for (var m = 0; m < this.view.t.count; m++) {
var n = this.view.t._inner[m].c;
NativeUI.r(this.view.t._inner[m].d, n.l.f(this.d8));
}
for (var o = 0; o < this.view.u.count; o++) {
var p = this.view.u._inner[o].c;
NativeUI.aa(this.view.u._inner[o].d, p.m.f(this.d9));
}
for (var q = 0; q < this.view.e.o.count; q++) {
var r = this.view.e.o._inner[q];
var s = r.split('-');
var t = parseInt(s[s.length - 1]);
if (t < this.e.count) {
for (var u = 0; u < this.view.e.q._inner[q].count; u++) {
var v = this.view.e.q._inner[q]._inner[u].c;
NativeUI.r(this.view.e.q._inner[q]._inner[u].d, v.l.f(this.e.item(t)));
}
}
}
for (var w = 0; w < this.view.f.o.count; w++) {
var x = this.view.f.o._inner[w];
var y = x.split('-');
var z = parseInt(y[y.length - 1]);
if (z < this.f.count) {
for (var aa = 0; aa < this.view.f.q._inner[w].count; aa++) {
var ab = this.view.f.q._inner[w]._inner[aa].c;
NativeUI.aa(this.view.f.q._inner[w]._inner[aa].d, ab.m.f(this.f.item(z)));
}
}
}
for (var ac = 0; ac < this.view.q.count; ac++) {
var ad = this.view.q._inner[ac].c;
NativeUI.r(this.view.q._inner[ac].d, ad.l.f(this.du));
NativeUI.aa(this.view.q._inner[ac].d, ad.m.f(this.dv));
}
}
var ae = this.view.aa;
if (this.du != null) {
NativeUI.r(ae, this.du);
}
if (this.dv != null) {
NativeUI.aa(ae, this.dv);
}
if (!isNaN_(this.aq)) {
NativeUI.ad(ae, this.aq);
}
}
if (this.o != null) {
this.view.a0(this.o);
}
if (this.dw != null) {
NativeUI.q(this.view.aa, this.dw);
}
};
XIcon.prototype.c7 = function () {
var e_3, _a, e_4, _b;
if (this.du != null) {
this.view.ap(this.du, "fill");
}
if (this.dv != null) {
this.view.ap(this.dv, "stroke");
}
if (this.e != null) {
try {
for (var _c = __values(fromEnum(this.e)), _d = _c.next(); !_d.done; _d = _c.next()) {
var a = _d.value;
this.view.ap(a, "fills");
}
}
catch (e_3_1) {
e_3 = { error: e_3_1 };
}
finally {
try {
if (_d && !_d.done && (_a = _c.return))
_a.call(_c);
}
finally {
if (e_3)
throw e_3.error;
}
}
}
if (this.f != null) {
try {
for (var _e = __values(fromEnum(this.f)), _f = _e.next(); !_f.done; _f = _e.next()) {
var b = _f.value;
this.view.ap(b, "strokes");
}
}
catch (e_4_1) {
e_4 = { error: e_4_1 };
}
finally {
try {
if (_f && !_f.done && (_b = _e.return))
_b.call(_e);
}
finally {
if (e_4)
throw e_4.error;
}
}
}
};
XIcon.prototype.j = function () {
var a = 5;
if (this.svgPath != null) {
a = 1;
}
else if (this.b != null && this.b.length > 0) {
a = 2;
}
else if (this.svg != null) {
a = 0;
}
else if (this.b0 != null) {
a = 3;
}
else if (this.bh != null) {
a = 4;
}
return a;
};
Object.defineProperty(XIcon.prototype, "m", {
get: function () {
return this.l;
},
set: function (a) {
var b = this.l;
this.l = a;
if (b != this.l) {
this.c5("BaseTheme", enumGetBox(BaseControlTheme_$type, b), enumGetBox(BaseControlTheme_$type, a));
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "du", {
get: function () {
return this.dg;
},
set: function (a) {
var b = this.dg;
this.dg = a;
if (b != this.dg) {
this.c5("ActualFill", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "dv", {
get: function () {
return this.dh;
},
set: function (a) {
var b = this.dh;
this.dh = a;
if (b != this.dh) {
this.c5("ActualStroke", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "dw", {
get: function () {
return this.di;
},
set: function (a) {
var b = this.di;
this.di = a;
if (b != this.di) {
this.c5("ActualTextColor", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "aq", {
get: function () {
return this.y;
},
set: function (a) {
var b = this.y;
this.y = a;
if (b != this.y) {
this.c5("ActualStrokeWidth", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "fill", {
get: function () {
return this.dj;
},
set: function (a) {
var b = this.dj;
this.dj = a;
if (b != this.dj) {
this.c5("Fill", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "ea", {
get: function () {
return this.ds;
},
set: function (a) {
var b = this.ds;
this.ds = a;
if (b != this.ds) {
this.c5("Stroke", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "a4", {
get: function () {
return this.ak;
},
set: function (a) {
var b = this.ak;
this.ak = a;
if (b != this.ak) {
this.c5("StrokeWidth", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "eb", {
get: function () {
return this.dt;
},
set: function (a) {
var b = this.dt;
this.dt = a;
if (b != this.dt) {
this.c5("TextColor", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "d3", {
get: function () {
return this.dk;
},
set: function (a) {
var b = this.dk;
this.dk = a;
if (b != this.dk) {
this.c5("HoverFill", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "d4", {
get: function () {
return this.dl;
},
set: function (a) {
var b = this.dl;
this.dl = a;
if (b != this.dl) {
this.c5("HoverStroke", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "a2", {
get: function () {
return this.ae;
},
set: function (a) {
var b = this.ae;
this.ae = a;
if (b != this.ae) {
this.c5("HoverStrokeThickness", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "d5", {
get: function () {
return this.dm;
},
set: function (a) {
var b = this.dm;
this.dm = a;
if (b != this.dm) {
this.c5("HoverTextColor", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "e", {
get: function () {
return this.c;
},
set: function (a) {
var b = this.c;
this.c = a;
if (b != this.c) {
this.c5("FillColors", b, this.c);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "f", {
get: function () {
return this.d;
},
set: function (a) {
var b = this.d;
this.d = a;
if (b != this.d) {
this.c5("StrokeColors", b, this.d);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "d6", {
get: function () {
return this.dn;
},
set: function (a) {
var b = this.dn;
this.dn = a;
if (b != this.dn) {
this.c5("PrimaryFillColor", b, this.dn);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "d7", {
get: function () {
return this.dp;
},
set: function (a) {
var b = this.dp;
this.dp = a;
if (b != this.dp) {
this.c5("PrimaryStrokeColor", b, this.dp);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "d8", {
get: function () {
return this.dq;
},
set: function (a) {
var b = this.dq;
this.dq = a;
if (b != this.dq) {
this.c5("SecondaryFillColor", b, this.dq);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "d9", {
get: function () {
return this.dr;
},
set: function (a) {
var b = this.dr;
this.dr = a;
if (b != this.dr) {
this.c5("SecondaryStrokeColor", b, this.dr);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "bh", {
get: function () {
return this.be;
},
set: function (a) {
var b = this.be;
this.be = a;
if (b != this.be) {
this.c5("Source", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "b0", {
get: function () {
return this.bj;
},
set: function (a) {
var b = this.bj;
this.bj = a;
if (b != this.bj) {
this.c5("DataURL", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "svgPath", {
get: function () {
return this.bm;
},
set: function (a) {
var b = this.bm;
this.bm = a;
if (b != this.bm) {
this.c5("SVGPath", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "svg", {
get: function () {
return this.bl;
},
set: function (a) {
var b = this.bl;
this.bl = a;
if (b != this.bl) {
this.c5("SVG", b, this.bl);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "b", {
get: function () {
return this.a;
},
set: function (a) {
var b = this.a;
this.a = a;
if (b != this.a) {
this.c5("SVGPaths", b, this.a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "df", {
get: function () {
return this.de;
},
set: function (a) {
var b = this.de;
this.de = a;
if (b != this.de) {
this.c5("DataTemplate", b, this.de);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "bf", {
get: function () {
return this.bd;
},
set: function (a) {
var b = this.bd;
this.bd = a;
if (b != this.bd) {
this.c5("DataTemplateContext", b, this.bd);
}
},
enumerable: false,
configurable: true
});
XIcon.prototype.c3 = function () {
this.v = true;
};
XIcon.prototype.c4 = function () {
this.v = false;
};
Object.defineProperty(XIcon.prototype, "o", {
get: function () {
return this.n;
},
set: function (a) {
var b = this.n;
this.n = a;
if (b != this.n) {
this.c5("TextStyle", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "ca", {
get: function () {
return this.bk;
},
set: function (a) {
var b = this.bk;
this.bk = a;
if (b != this.bk) {
this.c5("Id", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "s", {
get: function () {
return this.p;
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "bb", {
get: function () {
return this.ba;
},
set: function (a) {
var b = this.ba;
this.ba = a;
this.p = true;
if (b != this.ba) {
this.c5("TabIndex", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "bv", {
get: function () {
return this.bi;
},
set: function (a) {
var b = this.bi;
this.bi = a;
if (b != this.bi) {
this.c5("AriaLabel", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "v", {
get: function () {
return this.r;
},
set: function (a) {
var b = this.r;
this.r = a;
if (b != this.r) {
this.c5("IsHover", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "disabled", {
get: function () {
return this.q;
},
set: function (a) {
var b = this.q;
this.q = a;
if (b != this.q) {
this.c5("IsDisabled", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "a3", {
get: function () {
return this.af;
},
set: function (a) {
var b = this.af;
this.af = a;
if (b != this.af) {
this.c5("Opacity", b, this.af);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "as", {
get: function () {
return this.aa;
},
set: function (a) {
var b = this.aa;
this.aa = a;
if (b != this.aa) {
this.c5("ActualViewBoxLeft", b, this.aa);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "a6", {
get: function () {
return this.am;
},
set: function (a) {
var b = this.am;
this.am = a;
if (b != this.am) {
this.c5("ViewBoxLeft", b, this.am);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "at", {
get: function () {
return this.ab;
},
set: function (a) {
var b = this.ab;
this.ab = a;
if (b != this.ab) {
this.c5("ActualViewBoxTop", b, this.ab);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "a7", {
get: function () {
return this.an;
},
set: function (a) {
var b = this.an;
this.an = a;
if (b != this.an) {
this.c5("ViewBoxTop", b, this.an);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "au", {
get: function () {
return this.ac;
},
set: function (a) {
var b = this.ac;
this.ac = a;
if (b != this.ac) {
this.c5("ActualViewBoxWidth", b, this.ac);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "a8", {
get: function () {
return this.ao;
},
set: function (a) {
var b = this.ao;
this.ao = a;
if (b != this.ao) {
this.c5("ViewBoxWidth", b, this.ao);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "ar", {
get: function () {
return this.z;
},
set: function (a) {
var b = this.z;
this.z = a;
if (b != this.z) {
this.c5("ActualViewBoxHeight", b, this.z);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "a5", {
get: function () {
return this.al;
},
set: function (a) {
var b = this.al;
this.al = a;
if (b != this.al) {
this.c5("ViewBoxHeight", b, this.al);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "a9", {
get: function () {
return this.ap;
},
set: function (a) {
var b = this.ap;
this.ap = a;
if (b != this.ap) {
this.c5("Width", b, this.ap);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(XIcon.prototype, "a1", {
get: function () {
return this.ad;
},
set: function (a) {
var b = this.ad;
this.ad = a;
if (b != this.ad) {
this.c5("Height", b, this.ad);
}
},
enumerable: false,
configurable: true
});
XIcon.prototype.c6 = function () {
};
XIcon.prototype.onDetachedFromUI = function () {
this.view.am();
};
XIcon.prototype.onAttachedToUI = function () {
this.view.aj();
};
XIcon.prototype.x = function () {
if (this.disabled) {
return false;
}
if (this.clicked != null) {
var a = new IconClickedEventArgs();
this.clicked(this, a);
return a.handled;
}
return false;
};
XIcon.prototype.w = function () {
return this.view.l();
};
XIcon.prototype.bg = function () {
return this.g();
};
XIcon.prototype.b2 = function () {
var a = this.g();
return a.l();
};
XIcon.prototype.g = function () {
var a = new IconVisualModelExport();
var b = this.view.b();
a.i = b[0];
a.g = b[1];
a.f = NativeUI.d(this.view.aa);
a.j = NativeUI.k(this.view.aa);
a.a = this.view.a();
a.svg = this.svg;
a.svgPath = this.svgPath;
a.k = this.b0;
if (this.o != null) {
var c = this.o;
if (this.view != null && c.q == null) {
var d = this.view.v;
var e = FontUtil.getFontInfoFromString(d, c.fontString);
c.q = e.q;
c.f = e.f;
c.r = e.r;
c.t = e.t;
c.u = e.u;
c.v = e.v;
}
if (c.q != null) {
a.o = c.q;
}
if (!isNaN_(c.f)) {
a.h = c.f;
}
if (c.v != null) {
a.s = c.v;
}
if (c.t != null) {
a.q = c.t;
}
if (c.r != null) {
a.p = c.t;
}
}
return a;
};
XIcon.prototype.provideContainer = function (a) {
this.view.al(a);
};
XIcon.prototype.dd = function (a, b, c, d) {
this.ah = a;
this.ai = b;
this.aj = c;
this.ag = d;
this.aa = !isNaN_(this.a6) ? this.a6 : !isNaN_(this.ah) ? this.ah : 0;
this.ab = !isNaN_(this.a7) ? this.a7 : !isNaN_(this.ai) ? this.ai : 0;
this.ac = !isNaN_(this.a8) ? this.a8 : !isNaN_(this.aj) ? this.aj : 24;
this.z = !isNaN_(this.a5) ? this.a5 : !isNaN_(this.ag) ? this.ag : 24;
this.view.a1();
};
XIcon.$t = markType(XIcon, 'XIcon', Base.$, [INotifyPropertyChanged_$type, IIcon_$type]);
XIcon.dx = null;
XIcon.d2 = null;
XIcon.d1 = null;
XIcon.dy = null;
XIcon.dz = null;
XIcon.d0 = null;
XIcon.aw = NaN;
XIcon.av = NaN;
XIcon.bc = 0;
return XIcon;
}(Base));
export { XIcon };