igniteui-webcomponents-inputs
Version:
Ignite UI Web Components inputs components.
132 lines (131 loc) • 4.24 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 } from "tslib";
import { XComponentBridge } from "./XComponentBridge";
import { enumGetBox, markType } from "igniteui-webcomponents-core";
import { BaseControlTheme_$type } from "igniteui-webcomponents-core";
import { SvgIconRegistry } from "igniteui-webcomponents-core";
import { stringStartsWith } from "igniteui-webcomponents-core";
import { trimStart } from "igniteui-webcomponents-core";
/**
* @hidden
*/
var XIconBridge = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(XIconBridge, _super);
function XIconBridge(a) {
var _this = _super.call(this, a) || this;
_this.u = "default";
_this.v = null;
return _this;
}
XIconBridge.prototype.getValue = function (a, b) {
var c = a;
switch (b) {
case 16: return this.v;
case 15: return this.u;
case 18: return enumGetBox(BaseControlTheme_$type, c.m);
case 44: return c.aq;
case 45: return c.ar;
case 46: return c.as;
case 47: return c.ap;
case 48: return c.at;
case 49: return c.al;
case 63: return c.e;
case 64: return c.f;
case 65: return c.ao;
}
return _super.prototype.getValue.call(this, a, b);
};
XIconBridge.prototype.setValue = function (a, b, c) {
_super.prototype.setValue.call(this, a, b, c);
var d = a;
switch (b) {
case 15:
{
this.u = c;
this.w(d);
}
break;
case 16:
{
this.v = c;
this.w(d);
}
break;
case 44:
d.aq = c;
break;
case 45:
d.ar = c;
break;
case 46:
d.as = c;
break;
case 47:
d.ap = c;
break;
case 48:
d.at = c;
break;
case 49:
d.al = c;
break;
case 63:
d.e = c;
break;
case 64:
d.f = c;
break;
case 65:
d.ao = c;
break;
}
};
XIconBridge.prototype.getTargetForProperty = function (a, b) {
switch (a) {
case 24: return b;
}
return _super.prototype.getTargetForProperty.call(this, a, b);
};
XIconBridge.prototype.w = function (a) {
a.svg = null;
a.svgPath = null;
a.b = null;
a.bg = null;
a.a1 = null;
var b = SvgIconRegistry.instance.getSvgPathString(this.u, this.v);
if (b != null) {
if (stringStartsWith(trimStart(b, ' ', '\n', '\r', '\t'), "<svg")) {
a.svg = b;
}
else {
a.svgPath = b;
}
return;
}
var c = SvgIconRegistry.instance.getSvgPathsString(this.u, this.v);
if (c != null) {
a.b = c;
return;
}
var d = SvgIconRegistry.instance.getDataURLString(this.u, this.v);
if (d != null) {
a.bg = d;
return;
}
var e = SvgIconRegistry.instance.getIconSource(this.u, this.v);
if (e != null) {
a.a1 = e;
}
};
XIconBridge.prototype.exportVisualData = function (a) {
return a.a0();
};
XIconBridge.$t = markType(XIconBridge, 'XIconBridge', XComponentBridge.$);
return XIconBridge;
}(XComponentBridge));
export { XIconBridge };