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
This commit is contained in:
7
Server/wwwroot/package/dist/collection/components/icon/infineonIconStencil.css
vendored
Normal file
7
Server/wwwroot/package/dist/collection/components/icon/infineonIconStencil.css
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
ifx-icon {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
}
|
||||
ifx-icon:empty {
|
||||
display: none;
|
||||
}
|
131
Server/wwwroot/package/dist/collection/components/icon/infineonIconStencil.js
vendored
Normal file
131
Server/wwwroot/package/dist/collection/components/icon/infineonIconStencil.js
vendored
Normal file
@ -0,0 +1,131 @@
|
||||
import { h, Host } from "@stencil/core";
|
||||
import { getIcon } from "@infineon/infineon-icons";
|
||||
export class InfineonIconStencil {
|
||||
constructor() {
|
||||
this.icon = "";
|
||||
this.ifxIcon = undefined;
|
||||
}
|
||||
convertStringToHtml(htmlString) {
|
||||
const div = document.createElement('div');
|
||||
div.innerHTML = htmlString;
|
||||
return div.firstChild;
|
||||
}
|
||||
convertHtmlToObject(htmlElement) {
|
||||
let pathToObject = Array
|
||||
.from(htmlElement.attributes, ({ name, value }) => ({ name, value }))
|
||||
.reduce((acc, current) => {
|
||||
acc[current.name] = current.value;
|
||||
return acc;
|
||||
}, {});
|
||||
return pathToObject;
|
||||
}
|
||||
convertPathsToVnode(htmlPath) {
|
||||
let svgPaths = [];
|
||||
const parentPath = this.convertHtmlToObject(htmlPath);
|
||||
const parentPathToVnode = h("path", parentPath);
|
||||
svgPaths.push(parentPathToVnode);
|
||||
if (htmlPath.firstChild) {
|
||||
const paths = htmlPath.querySelectorAll('path');
|
||||
const pathLength = htmlPath.querySelectorAll('path').length;
|
||||
for (let i = 0; i < pathLength; i++) {
|
||||
let pathToObject = this.convertHtmlToObject(paths[i]);
|
||||
let objToVnode = h("path", pathToObject);
|
||||
svgPaths.push(objToVnode);
|
||||
}
|
||||
}
|
||||
return svgPaths;
|
||||
}
|
||||
getSVG(svgPath) {
|
||||
return h("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 }, ...svgPath);
|
||||
}
|
||||
constructIcon() {
|
||||
if (this.ifxIcon) {
|
||||
const htmlPath = this.convertStringToHtml(this.ifxIcon.svgContent);
|
||||
const svgPath = this.convertPathsToVnode(htmlPath);
|
||||
const SVG = this.getSVG(svgPath);
|
||||
this.consoleError.emit(false);
|
||||
return SVG;
|
||||
}
|
||||
else {
|
||||
console.error('Icon not found!');
|
||||
this.consoleError.emit(true);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
componentWillLoad() {
|
||||
const removeHyphen = (str) => str.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g, (_m, chr) => chr);
|
||||
this.ifxIcon = getIcon(removeHyphen(this.icon));
|
||||
}
|
||||
render() {
|
||||
return (h(Host, null, this.constructIcon()));
|
||||
}
|
||||
static get is() { return "ifx-icon"; }
|
||||
static get originalStyleUrls() {
|
||||
return {
|
||||
"$": ["./infineonIconStencil.scss"]
|
||||
};
|
||||
}
|
||||
static get styleUrls() {
|
||||
return {
|
||||
"$": ["infineonIconStencil.css"]
|
||||
};
|
||||
}
|
||||
static get properties() {
|
||||
return {
|
||||
"icon": {
|
||||
"type": "string",
|
||||
"mutable": true,
|
||||
"complexType": {
|
||||
"original": "string",
|
||||
"resolved": "string",
|
||||
"references": {}
|
||||
},
|
||||
"required": false,
|
||||
"optional": false,
|
||||
"docs": {
|
||||
"tags": [],
|
||||
"text": ""
|
||||
},
|
||||
"attribute": "icon",
|
||||
"reflect": false,
|
||||
"defaultValue": "\"\""
|
||||
},
|
||||
"ifxIcon": {
|
||||
"type": "any",
|
||||
"mutable": true,
|
||||
"complexType": {
|
||||
"original": "any",
|
||||
"resolved": "any",
|
||||
"references": {}
|
||||
},
|
||||
"required": false,
|
||||
"optional": false,
|
||||
"docs": {
|
||||
"tags": [],
|
||||
"text": ""
|
||||
},
|
||||
"attribute": "ifx-icon",
|
||||
"reflect": false
|
||||
}
|
||||
};
|
||||
}
|
||||
static get events() {
|
||||
return [{
|
||||
"method": "consoleError",
|
||||
"name": "consoleError",
|
||||
"bubbles": true,
|
||||
"cancelable": true,
|
||||
"composed": true,
|
||||
"docs": {
|
||||
"tags": [],
|
||||
"text": ""
|
||||
},
|
||||
"complexType": {
|
||||
"original": "boolean",
|
||||
"resolved": "boolean",
|
||||
"references": {}
|
||||
}
|
||||
}];
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=infineonIconStencil.js.map
|
1
Server/wwwroot/package/dist/collection/components/icon/infineonIconStencil.js.map
vendored
Normal file
1
Server/wwwroot/package/dist/collection/components/icon/infineonIconStencil.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"infineonIconStencil.js","sourceRoot":"","sources":["../../../src/components/icon/infineonIconStencil.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAQlD,MAAM,OAAO,mBAAmB;;gBACU,EAAE;;;EAI1C,mBAAmB,CAAC,UAAU;IAC5B,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;IACzC,GAAG,CAAC,SAAS,GAAG,UAAU,CAAA;IAC1B,OAAO,GAAG,CAAC,UAAU,CAAA;EACvB,CAAC;EAED,mBAAmB,CAAC,WAAW;IAC7B,IAAI,YAAY,GAAG,KAAK;OACrB,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE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CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,OAAM,OAAO,CAAO,CAAA;EACtM,CAAC;EAED,aAAa;IACX,IAAG,IAAI,CAAC,OAAO,EAAE;MACf,MAAM,QAAQ,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;MAClE,MAAM,OAAO,GAAG,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAA;MAClD,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;MAChC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;MAC7B,OAAO,GAAG,CAAC;KACZ;SAAM;MACL,OAAO,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAA;MAChC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;MAC5B,OAAO,EAAE,CAAA;KACV;EACH,CAAC;EAED,iBAAiB;IACf,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;IAC/F,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;EAClD,CAAC;EAED,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,QACJ,IAAI,CAAC,aAAa,EAAE,CACd,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Host, Event, EventEmitter } from '@stencil/core';\nimport { getIcon } from '@infineon/infineon-icons'\n\n\n@Component({\n tag: 'ifx-icon',\n styleUrl: './infineonIconStencil.scss'\n})\n\nexport class InfineonIconStencil {\n @Prop({ mutable: true }) icon: string = \"\"\n @Prop({ mutable: true }) ifxIcon: any;\n @Event() consoleError: EventEmitter<boolean>;\n \n convertStringToHtml(htmlString) { \n const div = document.createElement('div')\n div.innerHTML = htmlString\n return div.firstChild\n }\n\n convertHtmlToObject(htmlElement) { \n let pathToObject = Array\n .from(htmlElement.attributes, ({ name, value }) => ({ name, value }))\n .reduce((acc, current) => {\n acc[current.name] = current.value\n return acc\n }, {})\n\n return pathToObject\n }\n\n convertPathsToVnode(htmlPath) { \n let svgPaths = []\n const parentPath = this.convertHtmlToObject(htmlPath);\n const parentPathToVnode = h(\"path\", parentPath);\n svgPaths.push(parentPathToVnode)\n if(htmlPath.firstChild) { \n const paths = htmlPath.querySelectorAll('path');\n const pathLength = htmlPath.querySelectorAll('path').length;\n for(let i = 0; i < pathLength; i++) { \n let pathToObject = this.convertHtmlToObject(paths[i])\n let objToVnode = h(\"path\", pathToObject)\n svgPaths.push(objToVnode)\n } \n }\n return svgPaths\n }\n\n getSVG(svgPath) {\n return <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}>{...svgPath}</svg>\n }\n\n constructIcon() {\n if(this.ifxIcon) {\n const htmlPath = this.convertStringToHtml(this.ifxIcon.svgContent)\n const svgPath = this.convertPathsToVnode(htmlPath)\n const SVG = this.getSVG(svgPath)\n this.consoleError.emit(false)\n return SVG;\n } else {\n console.error('Icon not found!')\n this.consoleError.emit(true)\n return \"\"\n }\n }\n\n componentWillLoad() {\n const removeHyphen = (str) => str.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g, (_m, chr) => chr);\n this.ifxIcon = getIcon(removeHyphen(this.icon));\n }\n\n render() {\n return (\n <Host>\n {this.constructIcon()}\n </Host>\n );\n }\n}"]}
|
33
Server/wwwroot/package/dist/collection/components/icon/infineonIconStencil.stories.js
vendored
Normal file
33
Server/wwwroot/package/dist/collection/components/icon/infineonIconStencil.stories.js
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
import { icons } from "@infineon/infineon-icons";
|
||||
import { action } from "@storybook/addon-actions";
|
||||
export default {
|
||||
title: 'Components/Icon',
|
||||
tags: ['autodocs'],
|
||||
args: {
|
||||
icon: "c-check-16"
|
||||
},
|
||||
argTypes: {
|
||||
icon: {
|
||||
options: Object.values(icons).map(i => i['name']),
|
||||
control: { type: 'select' }
|
||||
},
|
||||
consoleError: {
|
||||
action: 'consoleError',
|
||||
description: 'Custom event emitted when icon is invalid',
|
||||
table: {
|
||||
type: {
|
||||
summary: 'Framework integration',
|
||||
detail: 'React: onConsoleError={handleChange}\nVue:@consoleError="handleChange"\nAngular:(consoleError)="handleChange()"\nVanillaJs:.addEventListener("consoleError", (event) => {//handle change});',
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
const DefaultTemplate = ({ icon }) => {
|
||||
const ifxIcon = document.createElement('ifx-icon');
|
||||
ifxIcon.setAttribute('icon', icon);
|
||||
ifxIcon.addEventListener('consoleError', action('consoleError'));
|
||||
return ifxIcon;
|
||||
};
|
||||
export const Default = DefaultTemplate.bind({});
|
||||
//# sourceMappingURL=infineonIconStencil.stories.js.map
|
1
Server/wwwroot/package/dist/collection/components/icon/infineonIconStencil.stories.js.map
vendored
Normal file
1
Server/wwwroot/package/dist/collection/components/icon/infineonIconStencil.stories.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"infineonIconStencil.stories.js","sourceRoot":"","sources":["../../../src/components/icon/infineonIconStencil.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;EACb,KAAK,EAAE,iBAAiB;EACxB,IAAI,EAAE,CAAC,UAAU,CAAC;EAElB,IAAI,EAAE;IACJ,IAAI,EAAE,YAAY;GACnB;EACD,QAAQ,EAAE;IACR,IAAI,EAAE;MACJ,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;MACjD,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC5B;IACD,YAAY,EAAE;MACZ,MAAM,EAAE,cAAc;MACtB,WAAW,EAAE,2CAA2C;MACxD,KAAK,EAAE;QACL,IAAI,EAAE;UACJ,OAAO,EAAE,uBAAuB;UAChC,MAAM,EAAE,6LAA6L;SACtM;OACF;KACF;GACF;CACF,CAAA;AAEC,MAAM,eAAe,GAAG,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;EACnC,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;EACnD,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;EACnC,OAAO,CAAC,gBAAgB,CAAC,cAAc,EAAE,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC;EACjE,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { icons } from '@infineon/infineon-icons';\nimport { action } from '@storybook/addon-actions';\n\nexport default {\n title: 'Components/Icon',\n tags: ['autodocs'],\n\n args: {\n icon: \"c-check-16\"\n },\n argTypes: {\n icon: {\n options: Object.values(icons).map(i => i['name']),\n control: { type: 'select' }\n },\n consoleError: {\n action: 'consoleError',\n description: 'Custom event emitted when icon is invalid',\n table: {\n type: {\n summary: 'Framework integration',\n detail: 'React: onConsoleError={handleChange}\\nVue:@consoleError=\"handleChange\"\\nAngular:(consoleError)=\"handleChange()\"\\nVanillaJs:.addEventListener(\"consoleError\", (event) => {//handle change});',\n },\n },\n }\n },\n}\n\n const DefaultTemplate = ({ icon }) => {\n const ifxIcon = document.createElement('ifx-icon');\n ifxIcon.setAttribute('icon', icon);\n ifxIcon.addEventListener('consoleError', action('consoleError'));\n return ifxIcon;\n };\n\nexport const Default = DefaultTemplate.bind({});\n\n"]}
|
Reference in New Issue
Block a user