UNPKG

igniteui-angular-core

Version:

Ignite UI Angular Core logic used in multiple UI components.

75 lines (74 loc) 3.61 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 { markType } from "./type"; 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.j = null; _this.i = "default"; _this.k = "<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 14: return this.j; case 13: return this.i; } return _super.prototype.getValue.call(this, a, b); }; IgcIconButtonBridge.prototype.setValue = function (a, b, c) { switch (b) { case 14: this.j = c; if (this.j != null && this.i != null) { if (SvgIconRegistry.instance.getSvgPathString(this.i, this.j) != null) { var svg_ = stringReplace(this.k, "@@Inject", (SvgIconRegistry.instance.getSvgPathString(this.i, this.j))); var nativeEle_ = a.getNativeElement(); var iconName_ = this.j; var iconCollection_ = this.i; nativeEle_.registerIconFromText(iconName_, svg_, iconCollection_); a.setProperty("name", this.j); a.setProperty("collection", this.i); } else { a.setProperty("name", this.j); a.setProperty("collection", this.i); } } return; case 13: this.i = c; if (this.j != null && this.i != null) { if (SvgIconRegistry.instance.getSvgPathString(this.i, this.j) != null) { var svg_ = stringReplace(this.k, "@@Inject", (SvgIconRegistry.instance.getSvgPathString(this.i, this.j))); var nativeEle_ = a.getNativeElement(); var iconName_ = this.j; var iconCollection_ = this.i; nativeEle_.registerIconFromText(iconName_, svg_, iconCollection_); a.setProperty("name", this.j); a.setProperty("collection", this.i); } else { a.setProperty("name", this.j); a.setProperty("collection", this.i); } } return; } }; IgcIconButtonBridge.$t = markType(IgcIconButtonBridge, 'IgcIconButtonBridge', IgcButtonBridge.$); return IgcIconButtonBridge; }(IgcButtonBridge)); export { IgcIconButtonBridge };