Mike Phares 5c9f0d1aff Remove with Text
Remove GetEngineeringSpcReview
Better error message
EnforceCodeStyleInBuild
NginxFileSystem
Remove Reactors and Working Directory
AppSettings
Delete self contained Thunder Tests
Back to .net8.0
api/v4/InfinityQS
ApiExplorerSettings
Wafer Counter
2024-04-15 13:13:55 -07:00

2 lines
1.5 KiB
JavaScript

import{r as t,c as s,h as n,a as e}from"./p-5308bbce.js";import{g as o}from"./p-68f17bb5.js";const i="ifx-icon{display:inline-flex;justify-content:center}ifx-icon:empty{display:none}";const r=class{constructor(n){t(this,n);this.consoleError=s(this,"consoleError",7);this.icon="";this.ifxIcon=undefined}convertStringToHtml(t){const s=document.createElement("div");s.innerHTML=t;return s.firstChild}convertHtmlToObject(t){let s=Array.from(t.attributes,(({name:t,value:s})=>({name:t,value:s}))).reduce(((t,s)=>{t[s.name]=s.value;return t}),{});return s}convertPathsToVnode(t){let s=[];const e=this.convertHtmlToObject(t);const o=n("path",e);s.push(o);if(t.firstChild){const e=t.querySelectorAll("path");const o=t.querySelectorAll("path").length;for(let t=0;t<o;t++){let o=this.convertHtmlToObject(e[t]);let i=n("path",o);s.push(i)}}return s}getSVG(t){return n("svg",{class:"inline-svg",width:this.ifxIcon.width,height:this.ifxIcon.height,xmlns:"http://www.w3.org/2000/svg",fill:this.ifxIcon.fill,viewBox:this.ifxIcon.viewBox},...t)}constructIcon(){if(this.ifxIcon){const t=this.convertStringToHtml(this.ifxIcon.svgContent);const s=this.convertPathsToVnode(t);const n=this.getSVG(s);this.consoleError.emit(false);return n}else{console.error("Icon not found!");this.consoleError.emit(true);return""}}componentWillLoad(){const t=t=>t.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g,((t,s)=>s));this.ifxIcon=o(t(this.icon))}render(){return n(e,null,this.constructIcon())}};r.style=i;export{r as ifx_icon};
//# sourceMappingURL=p-5f0c8cc4.entry.js.map