UNPKG

igniteui-react-core

Version:
88 lines (87 loc) 4.02 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { __extends } from "tslib"; import { IgcButtonBridge } from "./IgcButtonBridge"; import { EnumUtil, markType } from "./type"; import { NativeUIDisplayDensity_$type } from "./NativeUIDisplayDensity"; import { SvgIconRegistry } from "./SvgIconRegistry"; import { stringReplace } from "./string"; /** * @hidden */ var IgcIconButtonBridge = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgcIconButtonBridge, _super); function IgcIconButtonBridge() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.z = null; _this.y = "default"; _this.aa = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"@@Inject\"/></svg>"; return _this; } IgcIconButtonBridge.prototype.getValue = function (a, b) { switch (b) { case 16: return this.z; case 15: return this.y; } return _super.prototype.getValue.call(this, a, b); }; IgcIconButtonBridge.prototype.setValue = function (a, b, c) { var nativeEle_ = a.getNativeElement(); switch (b) { case 16: this.z = c; if (this.z != null && this.y != null) { if (SvgIconRegistry.instance.getSvgPathString(this.y, this.z) != null) { var svg_ = stringReplace(this.aa, "@@Inject", (SvgIconRegistry.instance.getSvgPathString(this.y, this.z))); var iconName_ = this.z; var iconCollection_ = this.y; nativeEle_.registerIconFromText(iconName_, svg_, iconCollection_); a.setProperty("name", this.z); a.setProperty("collection", this.y); } else { a.setProperty("name", this.z); a.setProperty("collection", this.y); } } return; case 15: this.y = c; if (this.z != null && this.y != null) { if (SvgIconRegistry.instance.getSvgPathString(this.y, this.z) != null) { var svg_ = stringReplace(this.aa, "@@Inject", (SvgIconRegistry.instance.getSvgPathString(this.y, this.z))); var iconName_ = this.z; var iconCollection_ = this.y; nativeEle_.registerIconFromText(iconName_, svg_, iconCollection_); a.setProperty("name", this.z); a.setProperty("collection", this.y); } else { a.setProperty("name", this.z); a.setProperty("collection", this.y); } } return; case 1: switch (EnumUtil.getEnumValue(NativeUIDisplayDensity_$type, c)) { case 1: nativeEle_.size = "large"; break; case 2: nativeEle_.size = "medium"; break; case 3: nativeEle_.size = "small"; break; } break; } }; IgcIconButtonBridge.$t = markType(IgcIconButtonBridge, 'IgcIconButtonBridge', IgcButtonBridge.$); return IgcIconButtonBridge; }(IgcButtonBridge)); export { IgcIconButtonBridge };