UNPKG

igniteui-angular-core

Version:

Ignite UI Angular Core logic used in multiple UI components.

73 lines (72 loc) 3.54 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 { IgcButtonBridge } from "./IgcButtonBridge"; import { markType } from "./type"; import { SvgIconRegistry } from "./SvgIconRegistry"; import { stringReplace } from "./string"; /** * @hidden */ export let IgcIconButtonBridge = /*@__PURE__*/ (() => { class IgcIconButtonBridge extends IgcButtonBridge { constructor() { super(...arguments); 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>"; } getValue(a, b) { switch (b) { case 14: return this.j; case 13: return this.i; } return super.getValue(a, b); } setValue(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) { let svg_ = stringReplace(this.k, "@@Inject", (SvgIconRegistry.instance.getSvgPathString(this.i, this.j))); let nativeEle_ = a.getNativeElement(); let iconName_ = this.j; let 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) { let svg_ = stringReplace(this.k, "@@Inject", (SvgIconRegistry.instance.getSvgPathString(this.i, this.j))); let nativeEle_ = a.getNativeElement(); let iconName_ = this.j; let 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; })();