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:
Mike Phares 2024-04-15 13:13:55 -07:00
parent 7e16ee7f98
commit 5c9f0d1aff
974 changed files with 205399 additions and 1385 deletions

View File

@ -93,24 +93,27 @@ csharp_using_directive_placement = outside_namespace
dotnet_code_quality_unused_parameters = all
dotnet_code_quality_unused_parameters = non_public # IDE0060: Remove unused parameter
dotnet_code_quality.CAXXXX.api_surface = private, internal
dotnet_diagnostic.CA1511.severity = none # CA1511: Use 'ArgumentException.ThrowIfNullOrEmpty' instead of explicitly throwing a new exception instance
dotnet_diagnostic.CA1825.severity = warning # CA1823: Avoid zero-length array allocations
dotnet_diagnostic.CA1829.severity = warning # CA1829: Use Length/Count property instead of Count() when available
dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
dotnet_diagnostic.CA1860.severity = error # CA1860: Prefer comparing 'Count' to 0 rather than using 'Any()', both for clarity and for performance
dotnet_diagnostic.CA1862.severity = warning # CA1862: Prefer using 'string.Equals(string, StringComparison)' to perform a case-insensitive comparison, but keep in mind that this might cause subtle changes in behavior, so make sure to conduct thorough testing after applying the suggestion, or if culturally sensitive comparison is not required, consider using 'StringComparison.OrdinalIgnoreCase'
dotnet_diagnostic.CA1869.severity = none # CA1869: Avoid creating a new 'JsonSerializerOptions' instance for every serialization operation. Cache and reuse instances instead.
dotnet_diagnostic.CA2254.severity = none # CA2254: The logging message template should not vary between calls to 'LoggerExtensions.LogInformation(ILogger, string?, params object?[])'
dotnet_diagnostic.CS8936.severity = error # Feature 'collection expressions' is not available in C# 10.0. Please use language version 12.0 or greater.
dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name
dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) - System.Version.Equals("1", "2"); Version.Equals("1", "2");
dotnet_diagnostic.IDE0004.severity = warning # IDE0004: Cast is redundant.
dotnet_diagnostic.IDE0005.severity = warning # Using directive is unnecessary
dotnet_diagnostic.IDE0028.severity = error # IDE0028: Collection initialization can be simplified
dotnet_diagnostic.IDE0028.severity = none # IDE0028: Collection initialization can be simplified
dotnet_diagnostic.IDE0031.severity = warning # Use null propagation (IDE0031)
dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed
dotnet_diagnostic.IDE0049.severity = warning # Use language keywords instead of framework type names for type references (IDE0049)
dotnet_diagnostic.IDE0060.severity = warning # IDE0060: Remove unused parameter
dotnet_diagnostic.IDE0290.severity = none # Use primary constructor [Distance]csharp(IDE0290)
dotnet_diagnostic.IDE0300.severity = error # IDE0300: Collection initialization can be simplified
dotnet_diagnostic.IDE0301.severity = error #IDE0301: Collection initialization can be simplified
dotnet_diagnostic.IDE0300.severity = none # IDE0300: Collection initialization can be simplified
dotnet_diagnostic.IDE0301.severity = none #IDE0301: Collection initialization can be simplified
dotnet_diagnostic.IDE0305.severity = none # IDE0305: Collection initialization can be simplified
dotnet_naming_rule.abstract_method_should_be_pascal_case.severity = warning
dotnet_naming_rule.abstract_method_should_be_pascal_case.style = pascal_case

3
.gitignore vendored
View File

@ -342,4 +342,5 @@ ASALocalRun/
# Libman.json
/wwwroot/lib/*
Tests/.kanbn/**/*
.kanbn
Tests/.kanbn

2
.vscode/launch.json vendored
View File

@ -10,7 +10,7 @@
"request": "launch",
"preLaunchTask": "buildServer",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/Server/bin/Debug/net7.0/win-x64/OI.Metrology.Server.dll",
"program": "${workspaceFolder}/Server/bin/Debug/net8.0/win-x64/OI.Metrology.Server.dll",
"args": [],
"cwd": "${workspaceFolder}/Server",
"stopAtEntry": false,

14
.vscode/tasks.json vendored
View File

@ -51,6 +51,18 @@
],
"problemMatcher": "$msCompile"
},
{
"label": "buildShared",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/Shared/OI.Metrology.Shared.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publishServer",
"command": "dotnet",
@ -209,7 +221,7 @@
{
"label": "File-Folder-Helper AOT s M Self .Kanbn Tasks",
"type": "shell",
"command": "& L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net7.0/win-x64/publish/File-Folder-Helper.exe s M '.kanbn/tasks'",
"command": "L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net8.0/win-x64/publish/File-Folder-Helper.exe s M L:/DevOps/Mesa_FI/OI-Metrology -s L:/DevOps/Mesa_FI/OI-Metrology/.kanbn/tasks",
"problemMatcher": []
}
]

View File

@ -1,198 +0,0 @@
[
{
"_id": "646e3a9b-8fe9-4eb3-a532-f94270f752ac",
"colId": "history",
"containerId": "",
"name": "http://localhost:5126/api/inbound/cde",
"url": "http://localhost:5126/api/inbound/cde",
"method": "POST",
"sortNum": 0,
"created": "2023-02-28T14:41:33.596Z",
"modified": "2023-02-28T15:19:48.924Z",
"headers": [],
"params": [],
"body": {
"type": "json",
"raw": "{\n \"SentToMetrology\": false,\n \"SentToSPC\": false,\n \"AutoOptimizeGain\": \"YES\",\n \"AutoProbeHeightSet\": \"NO\",\n \"Avg\": \"1824.053\",\n \"CellName\": \"CDE2\",\n \"DLRatio\": \"0.9680\",\n \"DataReject\": \"> 3.0Sigma\",\n \"Date\": \"02/27/2023 03:03:00 AM\",\n \"Engineer\": \"Engineer\",\n \"EquipId\": \"CDE2\",\n \"FileName\": \"0 C:\\\\4p_NT\\\\LSL8in.prj\\\\10PT_5mm.rcp\\\\3227D036.RsM 03:03 02/27/23\",\n \"FilePath\": \"\",\n \"Id\": \"-1\",\n \"Layer\": \"\",\n \"LotId\": \"LotID\",\n \"Op\": \"Operator\",\n \"PSN\": \"4628\",\n \"RDS\": \"577845\",\n \"Reactor\": \"20\",\n \"Recipe\": \"LSL8in \\\\ 10PT_5mm\",\n \"ResistivitySpec\": \"\",\n \"Run\": \"20-577845-4628\",\n \"SemiRadial\": \"1.55%\",\n \"StDev\": \"1.33%\",\n \"Temp\": \"19.2\",\n \"UniqueId\": \"21.16;1;95.0;1803.847;270.0_Point-1\",\n \"Zone\": null,\n \"Details\": [\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"21.16\",\n \"Pt\": \"1\",\n \"R\": \"95.0\",\n \"Rs\": \"1803.847\",\n \"T\": \"270.0\",\n \"UniqueId\": \"21.16;1;95.0;1803.847;270.0_Point-1\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"22.39\",\n \"Pt\": \"2\",\n \"R\": \"71.0\",\n \"Rs\": \"1858.424\",\n \"T\": \"270.0\",\n \"UniqueId\": \"22.39;2;71.0;1858.424;270.0_Point-2\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"21.07\",\n \"Pt\": \"3\",\n \"R\": \"47.0\",\n \"Rs\": \"1834.141\",\n \"T\": \"270.0\",\n \"UniqueId\": \"21.07;3;47.0;1834.141;270.0_Point-3\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"22.91\",\n \"Pt\": \"4\",\n \"R\": \"23.0\",\n \"Rs\": \"1803.609\",\n \"T\": \"270.0\",\n \"UniqueId\": \"22.91;4;23.0;1803.609;270.0_Point-4\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"21.94\",\n \"Pt\": \"5\",\n \"R\": \"0.0\",\n \"Rs\": \"1801.623\",\n \"T\": \"0.0\",\n \"UniqueId\": \"21.94;5;0.0;1801.623;0.0_Point-5\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"25.61\",\n \"Pt\": \"6\",\n \"R\": \"11.0\",\n \"Rs\": \"1803.997\",\n \"T\": \"90.0\",\n \"UniqueId\": \"25.61;6;11.0;1803.997;90.0_Point-6\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"24.73\",\n \"Pt\": \"7\",\n \"R\": \"35.0\",\n \"Rs\": \"1819.854\",\n \"T\": \"90.0\",\n \"UniqueId\": \"24.73;7;35.0;1819.854;90.0_Point-7\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"23.13\",\n \"Pt\": \"8\",\n \"R\": \"59.0\",\n \"Rs\": \"1855.965\",\n \"T\": \"90.0\",\n \"UniqueId\": \"23.13;8;59.0;1855.965;90.0_Point-8\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"23.44\",\n \"Pt\": \"9\",\n \"R\": \"83.0\",\n \"Rs\": \"1853.631\",\n \"T\": \"90.0\",\n \"UniqueId\": \"23.44;9;83.0;1853.631;90.0_Point-9\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"21.75\",\n \"Pt\": \"10\",\n \"R\": \"95.0\",\n \"Rs\": \"1805.438\",\n \"T\": \"90.0\",\n \"UniqueId\": \"21.75;10;95.0;1805.438;90.0_Point-10\"\n }\n ]\n}",
"form": []
},
"tests": []
},
{
"_id": "7f723103-2cd6-4d09-b780-28afe34b3cd7",
"colId": "history",
"containerId": "",
"name": "Delete",
"url": "https://tfs.intra.infineon.com/tfs/manufacturingit/APC%20Trend/_apis/test/runs/413094?api-version=6.0",
"method": "DELETE",
"sortNum": 0,
"created": "2023-03-02T15:43:07.175Z",
"modified": "2023-03-02T15:49:54.662Z",
"headers": [
{
"name": "Authorization",
"value": "Basic OmtzZHJveW9xMmJsdGI2N2xzN3NmZGhyYXlrY3l6cGlmemtkZjNndGs1bnl4ZnZmZHBqa2E="
}
],
"params": [
{
"name": "api-version",
"value": "6.0",
"isPath": false
}
],
"tests": []
},
{
"_id": "2874b1ad-b298-48c1-8edb-6fd78ce7d2d9",
"colId": "history",
"containerId": "",
"name": "Get",
"url": "https://tfs.intra.infineon.com/tfs/manufacturingit/Mesa_FI/_apis/test/runs?branchName=amaster&api-version=6.0",
"method": "GET",
"sortNum": 0,
"created": "2023-03-02T15:53:18.138Z",
"modified": "2023-03-02T16:12:27.892Z",
"headers": [
{
"name": "Authorization",
"value": "Basic OmtzZHJveW9xMmJsdGI2N2xzN3NmZGhyYXlrY3l6cGlmemtkZjNndGs1bnl4ZnZmZHBqa2E="
}
],
"params": [
{
"name": "branchName",
"value": "amaster",
"isPath": false
},
{
"name": "api-version",
"value": "6.0",
"isPath": false
}
],
"tests": []
},
{
"_id": "ed8728f5-9afa-4e69-bca3-9c059a9a831b",
"colId": "history",
"containerId": "",
"name": "Patch",
"url": "https://tfs.intra.infineon.com/tfs/manufacturingit/Mesa_FI/_apis/test/runs/410737?api-version=6.0",
"method": "PATCH",
"sortNum": 0,
"created": "2023-03-02T15:53:18.138Z",
"modified": "2023-03-02T15:58:09.720Z",
"headers": [
{
"name": "Authorization",
"value": "Basic OmtzZHJveW9xMmJsdGI2N2xzN3NmZGhyYXlrY3l6cGlmemtkZjNndGs1bnl4ZnZmZHBqa2E="
}
],
"params": [
{
"name": "api-version",
"value": "6.0",
"isPath": false
}
],
"body": {
"type": "json",
"raw": "{\n \"name\": \"MET08RESIHGCV\",\n \"comment\": \"40 passed\"\n}",
"form": []
},
"tests": []
},
{
"_id": "727621f0-63a3-4df2-9cfc-2610c532670d",
"colId": "history",
"containerId": "",
"name": "OI-RDS",
"url": "http://messa020ec.ec.local/api/oiWizard/materials/rds/578941",
"method": "GET",
"sortNum": 0,
"created": "2023-03-02T18:20:01.561Z",
"modified": "2023-03-06T18:40:43.162Z",
"headers": [],
"params": [],
"tests": [
{
"type": "json-query",
"custom": "json.rds.rdsLayers",
"action": "count",
"value": "1"
}
]
},
{
"_id": "4eafe190-e59e-4a3e-af76-356f62fde842",
"colId": "history",
"containerId": "",
"name": "https://oi-metrology-viewer-prod.mes.infineon.com/api/tooltypes",
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/tooltypes",
"method": "GET",
"sortNum": 0,
"created": "2023-03-07T17:20:54.044Z",
"modified": "2023-03-07T17:20:54.044Z",
"headers": [],
"params": [],
"tests": []
},
{
"_id": "280ea9be-50e3-4813-8eb0-ffff739fe196",
"colId": "history",
"containerId": "",
"name": "GetHeaders",
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/export/headers",
"method": "GET",
"sortNum": 0,
"created": "2023-03-07T17:21:05.219Z",
"modified": "2023-03-07T19:35:11.146Z",
"headers": [],
"params": [],
"body": {
"type": "json",
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": 1678296039\n}",
"form": []
},
"tests": []
},
{
"_id": "6d8098aa-eb50-422e-b38d-32709d985e8e",
"colId": "history",
"containerId": "",
"name": "GetHeaders-Dev",
"url": "http://mestsa008/api/export/headers",
"method": "POST",
"sortNum": 0,
"created": "2023-03-07T17:21:05.219Z",
"modified": "2023-03-08T18:18:04.054Z",
"headers": [],
"params": [],
"body": {
"type": "json",
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": 1678296039\n}",
"form": []
},
"tests": []
},
{
"_id": "61383ad6-ceb4-4d98-86c1-bf00c0e4204d",
"colId": "history",
"containerId": "",
"name": "GetHeaders-localhost",
"url": "http://localhost:5126/api/export/headers",
"method": "GET",
"sortNum": 0,
"created": "2023-03-07T17:21:05.219Z",
"modified": "2023-03-08T19:05:54.744Z",
"headers": [],
"params": [],
"body": {
"type": "json",
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": -1678296039\n}",
"form": []
},
"tests": []
}
]

View File

@ -1,30 +0,0 @@
[
{
"_id": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
"colName": "InfinityQS EC Only",
"created": "2023-02-27T20:07:11.913Z",
"sortNum": 10000,
"folders": []
},
{
"_id": "fb96b15a-0cc4-48c7-8767-34f1242750e8",
"colName": "Export EC",
"created": "2023-03-08T17:16:29.420Z",
"sortNum": 20000,
"folders": []
},
{
"_id": "5bfd00bc-b58c-49d3-9f27-5acadd060a51",
"colName": "Export IFX",
"created": "2023-03-08T17:31:19.468Z",
"sortNum": 30000,
"folders": []
},
{
"_id": "9ebfb84d-fa73-4c00-a2e0-e9ec69a31a16",
"colName": "LocalHost",
"created": "2023-05-08T19:34:00.425Z",
"sortNum": 40000,
"folders": []
}
]

View File

@ -1 +0,0 @@
[]

View File

@ -1,440 +0,0 @@
[
{
"_id": "acbbcc8d-3daf-43be-9081-f4be2f8a95b9",
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
"containerId": "",
"name": "GetCommandText",
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQS/commandText/?sub_group_id=1677273357&process=61&job=CDE5&part=5012&lot=575908&date_time=2023-02-24 14:15:00",
"method": "GET",
"sortNum": 20000,
"created": "2023-02-27T20:07:11.921Z",
"modified": "2023-02-27T20:07:11.921Z",
"headers": [],
"params": [
{
"name": "sub_group_id",
"value": "1677273357",
"isPath": false
},
{
"name": "process",
"value": "61",
"isPath": false
},
{
"name": "job",
"value": "CDE5",
"isPath": false
},
{
"name": "part",
"value": "5012",
"isPath": false
},
{
"name": "lot",
"value": "575908",
"isPath": false
},
{
"name": "date_time",
"value": "2023-02-24 14:15:00",
"isPath": false
}
],
"tests": [
{
"type": "Content-Length",
"custom": "",
"action": ">",
"value": "100"
}
]
},
{
"_id": "29e56599-0093-481e-9386-9e6c1bb828a8",
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
"containerId": "",
"name": "GetCommandTextV2",
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV2/1677273357/commandText/?process=61&job=CDE5&part=5012&lot=575908&date_time=2023-02-24 14:15:00",
"method": "GET",
"sortNum": 30000,
"created": "2023-02-27T20:07:11.923Z",
"modified": "2023-02-27T20:07:11.923Z",
"headers": [],
"params": [
{
"name": "process",
"value": "61",
"isPath": false
},
{
"name": "job",
"value": "CDE5",
"isPath": false
},
{
"name": "part",
"value": "5012",
"isPath": false
},
{
"name": "lot",
"value": "575908",
"isPath": false
},
{
"name": "date_time",
"value": "2023-02-24 14:15:00",
"isPath": false
}
],
"tests": [
{
"type": "Content-Length",
"custom": "",
"action": ">",
"value": "100"
}
]
},
{
"_id": "2810520f-7a8b-4282-a593-92da3043e491",
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
"containerId": "",
"name": "GetData",
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQS/1677273357/data",
"method": "GET",
"sortNum": 40000,
"created": "2023-02-27T20:07:11.924Z",
"modified": "2023-02-27T20:07:11.924Z",
"headers": [],
"params": [],
"tests": [
{
"type": "json-query",
"custom": "json.",
"action": "count",
"value": "2"
}
]
},
{
"_id": "8628d1b1-cedb-45e3-9958-0ba4e233a2ac",
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
"containerId": "",
"name": "GetDataV2",
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV2/1677273357/data",
"method": "GET",
"sortNum": 41250,
"created": "2023-02-27T20:07:11.925Z",
"modified": "2023-02-27T20:07:11.925Z",
"headers": [],
"params": [],
"tests": [
{
"type": "json-query",
"custom": "json.",
"action": "count",
"value": "2"
}
]
},
{
"_id": "55c863ce-b828-4cdb-8a72-26da369c44ee",
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
"containerId": "",
"name": "GetDescriptors",
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQS/1677273357/descriptors",
"method": "GET",
"sortNum": 41875,
"created": "2023-02-27T20:07:11.926Z",
"modified": "2023-02-27T20:07:11.926Z",
"headers": [],
"params": [],
"tests": [
{
"type": "json-query",
"custom": "json.",
"action": "count",
"value": "2"
}
]
},
{
"_id": "b25fade2-44b5-4897-94a6-e31062c27e58",
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
"containerId": "",
"name": "GetDescriptorsV2",
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV2/1677273357/descriptors",
"method": "GET",
"sortNum": 42187.5,
"created": "2023-02-27T20:07:11.927Z",
"modified": "2023-02-27T20:07:11.927Z",
"headers": [],
"params": [],
"tests": [
{
"type": "json-query",
"custom": "json.",
"action": "count",
"value": "2"
}
]
},
{
"_id": "f24e826e-578c-45fe-a80a-ce31f0a13dfc",
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
"containerId": "",
"name": "GetEvents",
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQS/1677273357/events",
"method": "GET",
"sortNum": 42500,
"created": "2023-02-27T20:07:11.928Z",
"modified": "2023-02-27T20:07:11.928Z",
"headers": [],
"params": [],
"tests": [
{
"type": "json-query",
"custom": "json.",
"action": "count",
"value": "2"
}
]
},
{
"_id": "81118bd8-5919-4501-aa34-eaa2f4baeabf",
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
"containerId": "",
"name": "GetEventsV2",
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV2/1677273357/events",
"method": "GET",
"sortNum": 43750,
"created": "2023-02-27T20:07:11.929Z",
"modified": "2023-02-27T20:07:11.929Z",
"headers": [],
"params": [],
"tests": [
{
"type": "json-query",
"custom": "json.",
"action": "count",
"value": "2"
}
]
},
{
"_id": "26ded486-79ad-4fc8-b526-98187b8fde91",
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
"containerId": "",
"name": "GetHeader",
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQS/1677273357/header",
"method": "GET",
"sortNum": 45000,
"created": "2023-02-27T20:07:11.930Z",
"modified": "2023-02-27T20:07:11.930Z",
"headers": [],
"params": [],
"tests": [
{
"type": "json-query",
"custom": "json.",
"action": "count",
"value": "2"
}
]
},
{
"_id": "b8ee8160-6ca2-4276-be91-d1f6f2dd90dc",
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
"containerId": "",
"name": "GetHeaderV2",
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV2/1677273357/header",
"method": "GET",
"sortNum": 55000,
"created": "2023-02-27T20:07:11.931Z",
"modified": "2023-02-27T20:07:11.931Z",
"headers": [],
"params": [],
"tests": [
{
"type": "json-query",
"custom": "json.",
"action": "count",
"value": "2"
}
]
},
{
"_id": "0aafd6ed-26a6-4a07-825c-8c1fee603b6a",
"colId": "fb96b15a-0cc4-48c7-8767-34f1242750e8",
"containerId": "",
"name": "GetHeaders",
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/export/headers",
"method": "GET",
"sortNum": 10000,
"created": "2023-03-08T17:16:56.561Z",
"modified": "2023-03-08T17:17:39.783Z",
"headers": [],
"params": [],
"body": {
"type": "json",
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": 1678296039\n}",
"form": []
},
"tests": []
},
{
"_id": "af298148-482d-4822-80ba-1abb86e1f9c2",
"colId": "fb96b15a-0cc4-48c7-8767-34f1242750e8",
"containerId": "",
"name": "GetExport",
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/export/export",
"method": "GET",
"sortNum": 15000,
"created": "2023-03-08T17:17:47.597Z",
"modified": "2023-03-08T17:19:13.764Z",
"headers": [],
"params": [],
"body": {
"type": "json",
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": 1678296039\n}",
"form": []
},
"tests": []
},
{
"_id": "a787c81d-381e-451d-9d96-e607f06efdaf",
"colId": "fb96b15a-0cc4-48c7-8767-34f1242750e8",
"containerId": "",
"name": "GetLogistics",
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/export/logistics",
"method": "GET",
"sortNum": 30000,
"created": "2023-03-08T17:18:38.179Z",
"modified": "2023-03-08T17:19:21.874Z",
"headers": [],
"params": [],
"body": {
"type": "json",
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": 1678296039\n}",
"form": []
},
"tests": []
},
{
"_id": "7e19c7d4-2d93-46e1-88fd-ba5312885713",
"colId": "fb96b15a-0cc4-48c7-8767-34f1242750e8",
"containerId": "",
"name": "GetProcessDataStandardFormat",
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/export/pdsf",
"method": "GET",
"sortNum": 40000,
"created": "2023-03-08T17:18:49.042Z",
"modified": "2023-03-08T17:19:27.119Z",
"headers": [],
"params": [],
"body": {
"type": "json",
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": 1678296039\n}",
"form": []
},
"tests": []
},
{
"_id": "25eb571f-064c-4b3f-8c20-666c66c1b123",
"colId": "5bfd00bc-b58c-49d3-9f27-5acadd060a51",
"containerId": "",
"name": "GetHeaders",
"url": "https://messa017.infineon.com/api/export/headers",
"method": "GET",
"sortNum": 10000,
"created": "2023-03-08T17:31:19.471Z",
"modified": "2023-04-07T15:10:34.584Z",
"headers": [],
"params": [],
"body": {
"type": "json",
"raw": "{\n \"PSN\": \"4830\",\n \"Reactor\": \"41\",\n \"RDS\": \"584740\",\n \"ID\": 1680657537,\n \"Path\": \"\\\\\\\\messdv002.na.infineon.com\\\\Candela\\\\Archive\\\\API\\\\2023_Week_14\\\\-4830\\\\-41\\\\-584740\\\\-1680657537\\\\638162291037289598.json\"\n}",
"form": []
},
"tests": []
},
{
"_id": "f5feb8e3-0e82-4b47-a15e-97ef069a1539",
"colId": "5bfd00bc-b58c-49d3-9f27-5acadd060a51",
"containerId": "",
"name": "GetExport",
"url": "https://messa017.infineon.com/api/export/export",
"method": "GET",
"sortNum": 15000,
"created": "2023-03-08T17:31:19.472Z",
"modified": "2023-04-07T15:10:45.402Z",
"headers": [],
"params": [],
"body": {
"type": "json",
"raw": "{\n \"PSN\": \"4830\",\n \"Reactor\": \"41\",\n \"RDS\": \"584740\",\n \"ID\": 1680657537,\n \"Path\": \"\\\\\\\\messdv002.na.infineon.com\\\\Candela\\\\Archive\\\\API\\\\2023_Week_14\\\\-4830\\\\-41\\\\-584740\\\\-1680657537\\\\638162291037289598.json\"\n}",
"form": []
},
"tests": []
},
{
"_id": "7fddba99-14a2-4c6a-bf4a-4b94391929cf",
"colId": "5bfd00bc-b58c-49d3-9f27-5acadd060a51",
"containerId": "",
"name": "GetLogistics",
"url": "https://messa017.infineon.com/api/export/logistics",
"method": "GET",
"sortNum": 30000,
"created": "2023-03-08T17:31:19.473Z",
"modified": "2023-04-07T15:10:49.000Z",
"headers": [],
"params": [],
"body": {
"type": "json",
"raw": "{\n \"PSN\": \"4830\",\n \"Reactor\": \"41\",\n \"RDS\": \"584740\",\n \"ID\": 1680657537,\n \"Path\": \"\\\\\\\\messdv002.na.infineon.com\\\\Candela\\\\Archive\\\\API\\\\2023_Week_14\\\\-4830\\\\-41\\\\-584740\\\\-1680657537\\\\638162291037289598.json\"\n}",
"form": []
},
"tests": []
},
{
"_id": "07d5b0c3-684a-4cad-8a48-b164e8da87b0",
"colId": "5bfd00bc-b58c-49d3-9f27-5acadd060a51",
"containerId": "",
"name": "GetProcessDataStandardFormat",
"url": "https://messa017.infineon.com/api/export/pdsf",
"method": "GET",
"sortNum": 40000,
"created": "2023-03-08T17:31:19.474Z",
"modified": "2023-04-07T15:10:53.080Z",
"headers": [],
"params": [],
"body": {
"type": "json",
"raw": "{\n \"PSN\": \"4830\",\n \"Reactor\": \"41\",\n \"RDS\": \"584740\",\n \"ID\": 1680657537,\n \"Path\": \"\\\\\\\\messdv002.na.infineon.com\\\\Candela\\\\Archive\\\\API\\\\2023_Week_14\\\\-4830\\\\-41\\\\-584740\\\\-1680657537\\\\638162291037289598.json\"\n}",
"form": []
},
"tests": []
},
{
"_id": "524e5261-69eb-4888-8818-608cde1ce506",
"colId": "9ebfb84d-fa73-4c00-a2e0-e9ec69a31a16",
"containerId": "",
"name": "Inbound-SRP",
"url": "http://localhost:5126/api/inbound/SRP",
"method": "POST",
"sortNum": 10000,
"created": "2023-05-08T19:34:14.843Z",
"modified": "2023-05-08T19:50:20.646Z",
"headers": [],
"params": [],
"body": {
"type": "json",
"raw": "{\n \"SentToMetrology\": false,\n \"SentToSPC\": false,\n \"Id\": 0,\n \"Batch\": \"BIORAD#2\",\n \"Cassette\": \"BIORAD2\",\n \"CellName\": \"BIORAD2\",\n \"Date\": \"05/08/2023 12:23:23 AM\",\n \"FilePath\": \"\",\n \"Layer\": \"1\",\n \"MeanThickness\": \"21.8224\",\n \"Op\": \"C\",\n \"PSN\": \"5010\",\n \"PassFail\": \"PASS\",\n \"RDS\": \"588252\",\n \"RVThickness\": \"2.0559\",\n \"Reactor\": \"23\",\n \"Recipe\": \"PROD_8inch\",\n \"StdDev\": \"0.1483\",\n \"Title\": \"Bio-RadQS400MEPI\",\n \"UniqueId\": \"Bio-RadQS400MEPI_23-588252-5010.1_202305080023237034_5.4661928_Point-1\",\n \"Wafer\": \"23-588252-5010.1\",\n \"Zone\": \"-\",\n \"Details\": []\n}",
"form": []
},
"tests": []
}
]

View File

@ -29,6 +29,23 @@ public class AppSettings
return result;
}
private static void PreVerify(IConfigurationRoot configurationRoot, AppSettings? appSettings)
{
if (appSettings?.ApiLoggingContentTypes is null)
{
List<string> paths = [];
foreach (IConfigurationProvider configurationProvider in configurationRoot.Providers)
{
if (configurationProvider is not Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider jsonConfigurationProvider)
continue;
if (jsonConfigurationProvider.Source.FileProvider is not Microsoft.Extensions.FileProviders.PhysicalFileProvider physicalFileProvider)
continue;
paths.Add(physicalFileProvider.Root);
}
throw new NotSupportedException($"Not found!{Environment.NewLine}{string.Join(Environment.NewLine, paths.Distinct())}");
}
}
private static Models.AppSettings Get(AppSettings? appSettings)
{
Models.AppSettings result;
@ -73,20 +90,7 @@ public class AppSettings
#pragma warning disable IL3050, IL2026
AppSettings? appSettings = configurationRoot.Get<AppSettings>();
#pragma warning restore IL3050, IL2026
if (appSettings?.ApiLoggingContentTypes is null)
{
foreach (IConfigurationProvider configurationProvider in configurationRoot.Providers)
{
if (configurationProvider is not Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider jsonConfigurationProvider)
continue;
if (jsonConfigurationProvider.Source.FileProvider is not Microsoft.Extensions.FileProviders.PhysicalFileProvider physicalFileProvider)
continue;
if (!physicalFileProvider.Root.Contains("UserSecrets"))
continue;
throw new NotSupportedException(physicalFileProvider.Root);
}
throw new NotSupportedException("Not found!");
}
PreVerify(configurationRoot, appSettings);
result = Get(appSettings);
return result;
}

View File

@ -26,14 +26,14 @@
<Content Remove="compilerconfig.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Dapper" Version="2.1.4" />
<PackageReference Include="Dapper" Version="2.1.24" />
<PackageReference Include="EntityFramework" Version="6.4.4" />
<PackageReference Include="jQuery" Version="3.7.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
</ItemGroup>

View File

@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30114.105
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Archive", "Archive\OI.Metrology.Archive.csproj", "{D02BA20E-0ACE-4D1C-9132-90773AF3CF5A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared", "Shared\OI.Metrology.Shared.csproj", "{A807EAE3-7DCB-4E5E-BE54-0D7410D18B3E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server\OI.Metrology.Server.csproj", "{25C86DF8-EC1A-4D4B-AD4E-6561174824B9}"

View File

@ -10,7 +10,7 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/bin/Debug/net7.0/win-x64/OI.Metrology.Server.dll",
"program": "${workspaceFolder}/bin/Debug/net8.0/OI.Metrology.Server.dll",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,

View File

@ -0,0 +1,5 @@
{
"cSpell.words": [
"Infineon"
]
}

View File

@ -13,6 +13,59 @@
],
"problemMatcher": "$msCompile"
},
{
"label": "buildTests",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/../Tests/OI.Metrology.Tests.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "testDebug",
"command": "dotnet",
"type": "process",
"args": [
"test",
"${workspaceFolder}/../Tests/OI.Metrology.Tests.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "testRelease",
"command": "dotnet",
"type": "process",
"args": [
"test",
"${workspaceFolder}/../Tests/OI.Metrology.Tests.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary",
"-c",
"Release"
],
"problemMatcher": "$msCompile"
},
{
"label": "Format",
"command": "dotnet",
"type": "process",
"args": [
"format",
"--report",
".vscode",
"--verbosity",
"detailed",
"--severity",
"warn"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
@ -21,7 +74,14 @@
"publish",
"${workspaceFolder}/OI.Metrology.Server.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
"/consoleloggerparameters:NoSummary",
"--configuration",
"Release",
"--runtime",
"win-x64",
"--self-contained",
"-o",
"D:/web-sites/OI-Metrology/hh-3498d1da-_______-OI-Metrology-Release/Server"
],
"problemMatcher": "$msCompile"
},
@ -72,9 +132,9 @@
}
},
{
"label": "File-Folder-Helper AOT s V Repositories",
"label": "File-Folder-Helper AOT s X Server",
"type": "shell",
"command": "& L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net7.0/win-x64/publish/File-Folder-Helper.exe s V Repositories",
"command": "L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net8.0/win-x64/publish/File-Folder-Helper.exe s X L:/DevOps/Mesa_FI/OI-Metrology Day-Helper-2024-01-08 L:/DevOps/Mesa_FI/OI-Metrology/Server",
"problemMatcher": []
}
]

View File

@ -0,0 +1,36 @@
using Microsoft.AspNetCore.Mvc;
using OI.Metrology.Shared.Models.Stateless;
namespace OI.Metrology.Server.ApiControllers;
[Route("api/v1/file-share")]
public class FileShareController : Controller, IFileShareController<IResult>
{
private readonly IFileShareRepository _FileShareRepository;
public FileShareController(IFileShareRepository fileShareRepository) =>
_FileShareRepository = fileShareRepository;
[HttpGet("copy-file")]
public IResult CopyFile(string from, string to)
{
_FileShareRepository.CopyFile(from, to);
return Results.Ok();
}
[HttpGet("move-file")]
public IResult MoveFile(string from, string to)
{
_FileShareRepository.CopyFile(from, to);
return Results.Ok();
}
[HttpGet("file-write")]
public IResult FileWrite(string path, string contents)
{
_FileShareRepository.FileWrite(path, contents);
return Results.Ok();
}
}

View File

@ -0,0 +1,82 @@
using Microsoft.AspNetCore.Mvc;
namespace OI.Metrology.Server.ApiControllers;
using OI.Metrology.Shared.DataModels;
using OI.Metrology.Shared.Models.Stateless;
using System.Text.Json;
[Route("api/v4/InfinityQS")]
public class InfinityQSV4Controller : Controller, IInfinityQSV4Controller<IActionResult>
{
private readonly IInfinityQSV4Repository _InfinityQSRepositoryV4;
public InfinityQSV4Controller(IInfinityQSV4Repository InfinityQSRepositoryV4) => _InfinityQSRepositoryV4 = InfinityQSRepositoryV4;
[HttpGet("{sub_group_id}/commandText")]
public IActionResult GetCommandText(string sub_group_id, string process, string job, string part, string lot, string date_time)
{
string commandText = _InfinityQSRepositoryV4.GetCommandText(sub_group_id, process, job, part, lot, date_time);
return Content(commandText, "text/plain; charset=utf-8");
}
[HttpGet("{sub_group_id}/data")]
public IActionResult GetData(string sub_group_id)
{
Result<InfinityQSV4[]> result = _InfinityQSRepositoryV4.GetData(sub_group_id);
string json = JsonSerializer.Serialize(result, ResultInfinityQSV4SourceGenerationContext.Default.ResultInfinityQSV4Array);
return Content(json, "application/json", System.Text.Encoding.UTF8);
}
[HttpGet("{sub_group_id}/descriptors")]
public IActionResult GetDescriptors(string sub_group_id)
{
Result<InfinityQSDescriptorV4[]> result = _InfinityQSRepositoryV4.GetDescriptors(sub_group_id);
string json = JsonSerializer.Serialize(result, ResultInfinityQSDescriptorV4SourceGenerationContext.Default.ResultInfinityQSDescriptorV4Array);
return Content(json, "application/json", System.Text.Encoding.UTF8);
}
[HttpGet("{sub_group_id}/header")]
public IActionResult GetHeader(string sub_group_id)
{
Result<InfinityQSV4[]> result = _InfinityQSRepositoryV4.GetHeader(sub_group_id);
string json = JsonSerializer.Serialize(result, ResultInfinityQSV4SourceGenerationContext.Default.ResultInfinityQSV4Array);
return Content(json, "application/json", System.Text.Encoding.UTF8);
}
[HttpGet("{process}/product-data-average-sum-of-defects-process-mean-process-sigma")]
public IActionResult GetProductDataAverageSumOfDefectsProcessMeanProcessSigma(string process, string? recipe)
{
string result = _InfinityQSRepositoryV4.GetProductDataAverageSumOfDefectsProcessMeanProcessSigma(process, recipe);
return Content(result, "application/json", System.Text.Encoding.UTF8);
}
[HttpGet("epi-pro-temp-verification")]
public IActionResult GetEpiProTempVerification(int[] night)
{
string result = _InfinityQSRepositoryV4.GetEpiProTempVerification(night);
return Content(result, "text/html", System.Text.Encoding.UTF8);
}
[HttpGet("epi-pro-temp-verification-rows")]
public IActionResult GetEpiProTempVerificationRows(int[] night)
{
List<string[]> results = _InfinityQSRepositoryV4.GetEpiProTempVerificationRows(night);
string json = JsonSerializer.Serialize(results);
return Content(json, "application/json", System.Text.Encoding.UTF8);
}
[HttpGet("reactors")]
public IActionResult GetReactors() =>
Json(_InfinityQSRepositoryV4.GetReactors());
[HttpGet("{rds}/run-data-sheet")]
public IActionResult GetRunDataSheet(string rds) =>
Content(_InfinityQSRepositoryV4.GetRunDataSheet(rds));
[HttpGet("{part}/production-specification")]
public IActionResult GetProductionSpecification(string part) =>
Content(_InfinityQSRepositoryV4.GetProductionSpecification(part));
}

View File

@ -1,24 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using OI.Metrology.Shared.Models.Stateless;
using System.Text.Json;
namespace OI.Metrology.Server.ApiControllers;
[Route("api/[controller]")]
public class ReactorsController : Controller, IReactorsController<IActionResult>
{
private readonly IReactorsRepository _ReactorsRepository;
public ReactorsController(IReactorsRepository reactorsRepository) =>
_ReactorsRepository = reactorsRepository;
[HttpGet("{even}")]
public IActionResult Get(bool even) =>
Json(even ? _ReactorsRepository.EvenReactors() : _ReactorsRepository.OddReactors(), new JsonSerializerOptions { PropertyNamingPolicy = null, WriteIndented = true });
[HttpPost()]
public IActionResult Post(Shared.DataModels.WorkMaterialOut workMaterialOut) =>
Ok(_ReactorsRepository.GetKey(workMaterialOut, save: true));
}

View File

@ -40,7 +40,7 @@ public class ToolTypesController : Controller, IToolTypesController<IActionResul
[HttpGet]
[Route("{id}/headers")]
public IActionResult GetHeaders(int id, [FromQuery] DateTime? datebegin, [FromQuery] DateTime? dateend, [FromQuery] int? page, [FromQuery] int? pagesize, [FromQuery] long? headerid)
public IActionResult GetHeaders(int id, [FromQuery] string? datebegin, [FromQuery] string? dateend, [FromQuery] int? page, [FromQuery] int? pagesize, [FromQuery] long? headerid)
{
Shared.DataModels.Result<DataTable> r = _ToolTypesRepository.GetHeaders(_MetrologyRepo, id, datebegin, dateend, page, pagesize, headerid);
string json = JsonConvert.SerializeObject(r);
@ -68,7 +68,7 @@ public class ToolTypesController : Controller, IToolTypesController<IActionResul
[HttpGet]
[Route("{toolTypeId}/export")]
public IActionResult GetExportData(int toolTypeId, [FromQuery] DateTime? datebegin, [FromQuery] DateTime? dateend)
public IActionResult GetExportData(int toolTypeId, [FromQuery] string? datebegin, [FromQuery] string? dateend)
{
Shared.DataModels.Result<DataTable> r = _ToolTypesRepository.GetExportData(_MetrologyRepo, toolTypeId, datebegin, dateend);
string json = JsonConvert.SerializeObject(r);
@ -77,7 +77,7 @@ public class ToolTypesController : Controller, IToolTypesController<IActionResul
[HttpGet]
[Route("{toolTypeId}/csv")]
public IActionResult GetCSVExport(int toolTypeId, [FromQuery] DateTime? datebegin, [FromQuery] DateTime? dateend, [FromQuery] string? filename)
public IActionResult GetCSVExport(int toolTypeId, [FromQuery] string? datebegin, [FromQuery] string? dateend, [FromQuery] string? filename)
{
byte[] r = _ToolTypesRepository.GetCSVExport(_MetrologyRepo, toolTypeId, datebegin, dateend);
return File(r, "application/octet-stream", filename);
@ -100,7 +100,7 @@ public class ToolTypesController : Controller, IToolTypesController<IActionResul
[Route("{toolTypeId}/headers/{headerid}/oiexport")]
public IActionResult OIExport(int toolTypeId, long headerid)
{
string? message = _ToolTypesRepository.OIExport(_MetrologyRepo, _AttachmentsService, _AppSettings.AttachmentPath, _AppSettings.TableToPath, toolTypeId, headerid);
string? message = _ToolTypesRepository.OIExport(_MetrologyRepo, _AttachmentsService, toolTypeId, headerid);
if (message is null)
return Ok(new { Message = "OK" });
else

View File

@ -0,0 +1,18 @@
using Microsoft.AspNetCore.Mvc;
using OI.Metrology.Shared.Models.Stateless;
namespace OI.Metrology.Server.ApiControllers;
[Route("api/v1/[controller]")]
public class WaferCounterController : Controller, IWaferCounterController<IActionResult>
{
private readonly IWaferCounterRepository _WaferCounterRepository;
public WaferCounterController(IWaferCounterRepository waferCounterRepository) =>
_WaferCounterRepository = waferCounterRepository;
[HttpGet("{waferSize}/last-quantity-and-slot-map")]
public IActionResult GetLastQuantityAndSlotMap(string area, string waferSize) =>
Json(_WaferCounterRepository.GetLastQuantityAndSlotMap(area, waferSize));
}

View File

@ -10,6 +10,7 @@ public class ErrorHandlerController : Controller
public ErrorHandlerController(ILogger<ErrorHandlerController> logger) => _Logger = logger;
[ApiExplorerSettings(IgnoreApi = true)]
public IActionResult Index()
{
IExceptionHandlerFeature? error = HttpContext.Features.Get<IExceptionHandlerFeature>();

View File

@ -1,82 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using OI.Metrology.Server.Models;
using OI.Metrology.Shared.ViewModels;
namespace OI.Metrology.Server.Controllers;
public class ReactorsController : Controller
{
private readonly bool _IsTestDatabase;
private readonly AppSettings _AppSettings;
public ReactorsController(AppSettings appSettings)
{
_AppSettings = appSettings;
_IsTestDatabase = appSettings.ConnectionString.Contains("test", StringComparison.InvariantCultureIgnoreCase);
}
public override void OnActionExecuted(ActionExecutedContext context)
{
base.OnActionExecuted(context);
ViewBag.IsTestDatabase = _IsTestDatabase;
}
private string GetApiUrl() => string.IsNullOrEmpty(_AppSettings.ApiUrl) ? Url.Content("~/") : _AppSettings.ApiUrl[0] == '~' ? Url.Content(_AppSettings.ApiUrl) : _AppSettings.ApiUrl;
[HttpGet]
[Route("/Step1")]
[Route("/Metrology/Step1")]
public IActionResult Step1(string mod = "", string equipment = "", string layer = "", string zone = "", string rds = "", string initials = "")
{
string directory = "D:/Tmp/Metrology";
if (!Directory.Exists(directory))
_ = Directory.CreateDirectory(directory);
string[] model = new string[] { mod, equipment, layer, zone, rds, initials };
if (!string.IsNullOrEmpty(initials))
System.IO.File.WriteAllLines(Path.Combine(directory, $"{DateTime.Now.Ticks}-{initials}.rsv"), model);
return View(model);
}
[HttpGet]
[Route("/Step2")]
[Route("/Metrology/Step2")]
public IActionResult Step2(string mod) =>
View(new string[] { mod });
[HttpGet]
[Route("/Step3")]
[Route("/Metrology/Step3")]
public IActionResult Step3(string mod, string equipment) =>
View(new string[] { mod, equipment });
[HttpGet]
[Route("/Step4")]
[Route("/Metrology/Step4")]
public IActionResult Step4(string mod, string equipment, string layer) =>
View(new string[] { mod, equipment, layer });
[HttpGet]
[Route("/Step5")]
[Route("/Metrology/Step5")]
public IActionResult Step5(string mod, string equipment, string layer, string zone) =>
View(new string[] { mod, equipment, layer, zone });
[HttpGet]
[Route("/Step6")]
[Route("/Metrology/Step6")]
public IActionResult Step6(string mod, string equipment, string layer, string zone, string rds) =>
View(new string[] { mod, equipment, layer, zone, rds });
[HttpGet]
[Route("/Reactor")]
[Route("/Metrology/Reactor")]
public IActionResult Reactor() => View(new RunInfo());
[HttpGet]
[Route("/WorkMaterial")]
[Route("/Metrology/WorkMaterial")]
public IActionResult WorkMaterial() => View();
}

View File

@ -2,26 +2,34 @@ using System.Text.Json;
namespace OI.Metrology.Server.Models;
public record AppSettings(string ApiExportPath,
public record AppSettings(string ApiFileShare,
string ApiLoggingContentTypes,
string ApiLoggingPathPrefixes,
string ApiLogPath,
string ApiUrl,
string AttachmentPath,
string BuildNumber,
string Company,
string ConnectionString,
string EcCharacterizationSi,
string EcMesaFileShareCharacterizationSi,
string EcMesaFileShareMetrologySi,
string GitCommitSeven,
string InboundApiAllowedIPList,
string IqsColumns,
string[] IqsFileSegments,
string IqsKey,
string IqsRed,
string IqsYellow,
bool IsDevelopment,
bool IsStaging,
string MockRoot,
string MonAResource,
string MonASite,
string OI2SqlConnectionString,
string OpenInsightApplicationProgrammingInterface,
Dictionary<string, string> TableToPath,
string URLs,
string WaferCounterDestinationDirectory,
int WaferCounterTwoFileSecondsWait,
string WorkingDirectoryName)
{

View File

@ -6,26 +6,34 @@ namespace OI.Metrology.Server.Models.Binder;
public class AppSettings
{
public string? ApiExportPath { get; set; }
public string? ApiFileShare { get; set; }
public string? ApiLoggingContentTypes { get; set; }
public string? ApiLoggingPathPrefixes { get; set; }
public string? ApiLogPath { get; set; }
public string? ApiUrl { get; set; }
public string? AttachmentPath { get; set; }
public string? BuildNumber { get; set; }
public string? Company { get; set; }
public string? ConnectionString { get; set; }
public string? EcCharacterizationSi { get; set; }
public string? EcMesaFileShareCharacterizationSi { get; set; }
public string? EcMesaFileShareMetrologySi { get; set; }
public string? GitCommitSeven { get; set; }
public string? InboundApiAllowedIPList { get; set; }
public string? IqsColumns { get; set; }
public string[]? IqsFileSegments { get; set; }
public string? IqsKey { get; set; }
public string? IqsRed { get; set; }
public string? IqsYellow { get; set; }
public bool? IsDevelopment { get; set; }
public bool? IsStaging { get; set; }
public string? MockRoot { get; set; }
public string? MonAResource { get; set; }
public string? MonASite { get; set; }
public string? Oi2SqlConnectionString { get; set; }
public string? OpenInsightApplicationProgrammingInterface { get; set; }
public Dictionary<string, string>? TableToPath { get; set; }
public string? URLs { get; set; }
public string? WaferCounterDestinationDirectory { get; set; }
public int? WaferCounterTwoFileSecondsWait { get; set; }
public string? WorkingDirectoryName { get; set; }
public override string ToString()
@ -34,52 +42,85 @@ public class AppSettings
return result;
}
private static void PreVerify(IConfigurationRoot configurationRoot, AppSettings? appSettings)
{
if (appSettings?.ApiFileShare is null)
{
List<string> paths = new();
foreach (IConfigurationProvider configurationProvider in configurationRoot.Providers)
{
if (configurationProvider is not Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider jsonConfigurationProvider)
continue;
if (jsonConfigurationProvider.Source.FileProvider is not Microsoft.Extensions.FileProviders.PhysicalFileProvider physicalFileProvider)
continue;
paths.Add(physicalFileProvider.Root);
}
throw new NotSupportedException($"Not found!{Environment.NewLine}{string.Join(Environment.NewLine, paths.Distinct())}");
}
}
private static Models.AppSettings Get(AppSettings? appSettings)
{
Models.AppSettings result;
if (appSettings is null) throw new NullReferenceException(nameof(appSettings));
if (appSettings.ApiExportPath is null) throw new NullReferenceException(nameof(ApiExportPath));
if (appSettings.ApiFileShare is null) throw new NullReferenceException(nameof(ApiFileShare));
if (appSettings.ApiLoggingContentTypes is null) throw new NullReferenceException(nameof(ApiLoggingContentTypes));
if (appSettings.ApiLoggingPathPrefixes is null) throw new NullReferenceException(nameof(ApiLoggingPathPrefixes));
if (appSettings.ApiLogPath is null) throw new NullReferenceException(nameof(ApiLogPath));
if (appSettings.ApiUrl is null) throw new NullReferenceException(nameof(ApiUrl));
if (appSettings.AttachmentPath is null) throw new NullReferenceException(nameof(AttachmentPath));
if (appSettings.BuildNumber is null) throw new NullReferenceException(nameof(BuildNumber));
if (appSettings.Company is null) throw new NullReferenceException(nameof(Company));
if (appSettings.ConnectionString is null) throw new NullReferenceException(nameof(ConnectionString));
if (appSettings.EcCharacterizationSi is null) throw new NullReferenceException(nameof(EcCharacterizationSi));
if (appSettings.EcMesaFileShareCharacterizationSi is null) throw new NullReferenceException(nameof(EcMesaFileShareCharacterizationSi));
if (appSettings.EcMesaFileShareMetrologySi is null) throw new NullReferenceException(nameof(EcMesaFileShareMetrologySi));
if (appSettings.GitCommitSeven is null) throw new NullReferenceException(nameof(GitCommitSeven));
if (appSettings.InboundApiAllowedIPList is null) throw new NullReferenceException(nameof(InboundApiAllowedIPList));
if (appSettings.IqsColumns is null) throw new NullReferenceException(nameof(IqsColumns));
if (appSettings.IqsFileSegments is null) throw new NullReferenceException(nameof(IqsFileSegments));
if (appSettings.IqsKey is null) throw new NullReferenceException(nameof(IqsKey));
if (appSettings.IqsRed is null) throw new NullReferenceException(nameof(IqsRed));
if (appSettings.IqsYellow is null) throw new NullReferenceException(nameof(IqsYellow));
if (appSettings.IsDevelopment is null) throw new NullReferenceException(nameof(IsDevelopment));
if (appSettings.IsStaging is null) throw new NullReferenceException(nameof(IsStaging));
if (appSettings.MockRoot is null) throw new NullReferenceException(nameof(MockRoot));
if (appSettings.MonAResource is null) throw new NullReferenceException(nameof(MonAResource));
if (appSettings.MonASite is null) throw new NullReferenceException(nameof(MonASite));
if (appSettings.Oi2SqlConnectionString is null) throw new NullReferenceException(nameof(Oi2SqlConnectionString));
if (appSettings.OpenInsightApplicationProgrammingInterface is null) throw new NullReferenceException(nameof(OpenInsightApplicationProgrammingInterface));
if (appSettings.URLs is null) throw new NullReferenceException(nameof(URLs));
if (appSettings.TableToPath is null) throw new NullReferenceException(nameof(TableToPath));
if (appSettings.WaferCounterDestinationDirectory is null) throw new NullReferenceException(nameof(WaferCounterDestinationDirectory));
if (appSettings.WaferCounterTwoFileSecondsWait is null) throw new NullReferenceException(nameof(WaferCounterTwoFileSecondsWait));
if (appSettings.WorkingDirectoryName is null) throw new NullReferenceException(nameof(WorkingDirectoryName));
result = new(
appSettings.ApiExportPath,
appSettings.ApiFileShare,
appSettings.ApiLoggingContentTypes,
appSettings.ApiLoggingPathPrefixes,
appSettings.ApiLogPath,
appSettings.ApiUrl,
appSettings.AttachmentPath,
appSettings.BuildNumber,
appSettings.Company,
appSettings.ConnectionString,
appSettings.EcCharacterizationSi,
appSettings.EcMesaFileShareCharacterizationSi,
appSettings.EcMesaFileShareMetrologySi,
appSettings.GitCommitSeven,
appSettings.InboundApiAllowedIPList,
appSettings.IqsColumns,
appSettings.IqsFileSegments,
appSettings.IqsKey,
appSettings.IqsRed,
appSettings.IqsYellow,
appSettings.IsDevelopment.Value,
appSettings.IsStaging.Value,
appSettings.MockRoot,
appSettings.MonAResource,
appSettings.MonASite,
appSettings.Oi2SqlConnectionString,
appSettings.OpenInsightApplicationProgrammingInterface,
appSettings.TableToPath,
appSettings.URLs,
appSettings.WaferCounterDestinationDirectory,
appSettings.WaferCounterTwoFileSecondsWait.Value,
appSettings.WorkingDirectoryName);
return result;
}
@ -90,20 +131,7 @@ public class AppSettings
#pragma warning disable IL3050, IL2026
AppSettings? appSettings = configurationRoot.Get<AppSettings>();
#pragma warning restore IL3050, IL2026
if (appSettings?.ApiExportPath is null)
{
foreach (IConfigurationProvider configurationProvider in configurationRoot.Providers)
{
if (configurationProvider is not Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider jsonConfigurationProvider)
continue;
if (jsonConfigurationProvider.Source.FileProvider is not Microsoft.Extensions.FileProviders.PhysicalFileProvider physicalFileProvider)
continue;
if (!physicalFileProvider.Root.Contains("UserSecrets"))
continue;
throw new NotSupportedException(physicalFileProvider.Root);
}
throw new NotSupportedException("Not found!");
}
PreVerify(configurationRoot, appSettings);
result = Get(appSettings);
return result;
}

View File

@ -6,12 +6,13 @@
<SccLocalPath>SAK</SccLocalPath>
</PropertyGroup>
<PropertyGroup>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
<OutputType>Exe</OutputType>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<TargetFramework>net7.0</TargetFramework>
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
<TargetFramework>net8.0</TargetFramework>
<UserSecretsId>b0a3891c-b775-422c-80ee-63a2f385045d</UserSecretsId>
</PropertyGroup>
<ItemGroup>
@ -24,22 +25,22 @@
<Content Remove="compilerconfig.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Dapper" Version="2.1.4" />
<PackageReference Include="Dapper" Version="2.1.37" />
<PackageReference Include="EntityFramework" Version="6.4.4" />
<PackageReference Include="jQuery" Version="3.7.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.13" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.3" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="8.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
<PackageReference Include="System.Drawing.Common" Version="8.0.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Shared\OI.Metrology.Shared.csproj" />

View File

@ -4,7 +4,6 @@ using OI.Metrology.Server.Models;
using OI.Metrology.Server.Repositories;
using OI.Metrology.Server.Repository;
using OI.Metrology.Server.Services;
using OI.Metrology.Shared.Models;
using OI.Metrology.Shared.Models.Stateless;
using OI.Metrology.Shared.Repositories;
using OI.Metrology.Shared.Services;
@ -49,8 +48,6 @@ public class Program
throw new Exception("Company name must have a value!");
if (string.IsNullOrEmpty(appSettings.WorkingDirectoryName))
throw new Exception("Working directory name must have a value!");
string workingDirectory = IWorkingDirectory.GetWorkingDirectory(assemblyName, appSettings.WorkingDirectoryName);
Environment.SetEnvironmentVariable(nameof(workingDirectory), workingDirectory);
try
{
_ = webApplicationBuilder.Services.AddMemoryCache();
@ -70,12 +67,14 @@ public class Program
_ = webApplicationBuilder.Services.AddScoped<IInboundDataService, InboundDataService>();
_ = webApplicationBuilder.Services.AddSingleton<IInboundRepository, InboundRepository>();
_ = webApplicationBuilder.Services.AddScoped<IMetrologyRepository, MetrologyRepository>();
_ = webApplicationBuilder.Services.AddSingleton<IReactorsRepository, ReactorsRepository>();
_ = webApplicationBuilder.Services.AddSingleton<IFileShareRepository, FileShareRepository>();
_ = webApplicationBuilder.Services.AddSingleton<IToolTypesRepository, ToolTypesRepository>();
_ = webApplicationBuilder.Services.AddSingleton<IInfinityQSRepository, InfinityQSRepository>();
_ = webApplicationBuilder.Services.AddScoped<IOpenInsightV1Repository, OpenInsightV1Repository>();
_ = webApplicationBuilder.Services.AddSingleton<IInfinityQSV2Repository, InfinityQSV2Repository>();
_ = webApplicationBuilder.Services.AddSingleton<IInfinityQSV3Repository, InfinityQSV3Repository>();
_ = webApplicationBuilder.Services.AddSingleton<IInfinityQSV4Repository, InfinityQSV4Repository>();
_ = webApplicationBuilder.Services.AddSingleton<IWaferCounterRepository, WaferCounterRepository>();
_ = webApplicationBuilder.Services.AddSingleton<IClientSettingsRepository>(_ => clientSettingsRepository);
_ = webApplicationBuilder.Services.AddSingleton<IServiceShopOrderRepository, ServiceShopOrderRepository>();
_ = webApplicationBuilder.Services.AddSingleton<ISpreadingResistanceProfileService, SpreadingResistanceProfileService>();

View File

@ -35,19 +35,13 @@ public class AppSettingsRepository : IAppSettingsRepository<Models.Binder.AppSet
{
if (string.IsNullOrEmpty(_AppSettings.ConnectionString))
throw new NotSupportedException();
if (string.IsNullOrEmpty(_AppSettings.OI2SqlConnectionString))
throw new NotSupportedException();
#if DEBUG
if (!_AppSettings.ConnectionString.Contains("test", StringComparison.CurrentCultureIgnoreCase))
throw new NotSupportedException();
if (!_AppSettings.OI2SqlConnectionString.Contains("test", StringComparison.CurrentCultureIgnoreCase))
throw new NotSupportedException();
#endif
#if !DEBUG
if (_AppSettings.ConnectionString.Contains("test", StringComparison.CurrentCultureIgnoreCase))
throw new NotSupportedException();
if (_AppSettings.OI2SqlConnectionString.Contains("test", StringComparison.CurrentCultureIgnoreCase))
throw new NotSupportedException();
#endif
}

View File

@ -13,11 +13,7 @@ public class ClientSettingsRepository : IClientSettingsRepository
internal List<string> GetClientSettings(IPAddress? remoteIpAddress)
{
List<string> results = new();
if (remoteIpAddress is null)
results.Add(nameof(remoteIpAddress));
else
results.Add(remoteIpAddress.ToString());
List<string> results = new() { remoteIpAddress is null ? nameof(remoteIpAddress) : remoteIpAddress.ToString() };
if (!_AppSettings.IsDevelopment)
throw new Exception("Shouldn't expose!");
return results;

View File

@ -1,5 +1,6 @@
using OI.Metrology.Server.Models;
using OI.Metrology.Shared.DataModels;
using OI.Metrology.Shared.Models;
using OI.Metrology.Shared.Models.Stateless;
using System.Globalization;
using System.Text.Json;
@ -12,13 +13,17 @@ public class ExportRepository : IExportRepository
private readonly string _RepositoryName;
private readonly AppSettings _AppSettings;
private readonly ILogger<ExportRepository> _Logger;
private readonly IHttpClientFactory _HttpClientFactory;
private readonly IFileShareRepository _FileShareRepository;
private readonly Dictionary<string, Dictionary<long, HeaderCommon>> _RdsToHeaderCommonCollection;
public ExportRepository(ILogger<ExportRepository> logger, AppSettings appSettings)
public ExportRepository(ILogger<ExportRepository> logger, AppSettings appSettings, IHttpClientFactory httpClientFactory, IFileShareRepository fileShareRepository)
{
_Logger = logger;
_AppSettings = appSettings;
_RdsToHeaderCommonCollection = new();
_HttpClientFactory = httpClientFactory;
_FileShareRepository = fileShareRepository;
_RepositoryName = nameof(ExportRepository)[..^10];
}
@ -32,32 +37,47 @@ public class ExportRepository : IExportRepository
return new string[] { weekOfYear, lastWeekOfYear };
}
private List<string> GetFiles(HeaderCommon headerCommon, string searchPattern)
private NginxFileSystemSortable[] GetNginxFileSystemSortableCollection(HeaderCommon headerCommon, HttpClient httpClient, string endsWith)
{
List<string> results = new();
string directory;
List<NginxFileSystemSortable> results = new();
Uri uri;
string[] weeks = Get();
List<NginxFileSystemSortable> nginxFileSystemSortableCollection;
foreach (string weekYear in weeks)
{
if (headerCommon.ID < 1)
directory = Path.Combine(_AppSettings.ApiExportPath, "Archive", "API", weekYear, $"-{headerCommon.PSN}", $"-{headerCommon.Reactor}", $"-{headerCommon.RDS}");
uri = _FileShareRepository.Append(new Uri(_AppSettings.EcMesaFileShareMetrologySi), "Archive", "API", weekYear, $"-{headerCommon.PSN}", $"-{headerCommon.Reactor}", $"-{headerCommon.RDS}");
else
directory = Path.Combine(_AppSettings.ApiExportPath, "Archive", "API", weekYear, $"-{headerCommon.PSN}", $"-{headerCommon.Reactor}", $"-{headerCommon.RDS}", $"-{headerCommon.ID}");
if (!Directory.Exists(directory))
continue;
results.AddRange(Directory.GetFiles(directory, searchPattern, SearchOption.AllDirectories));
uri = _FileShareRepository.Append(new Uri(_AppSettings.EcMesaFileShareMetrologySi), "Archive", "API", weekYear, $"-{headerCommon.PSN}", $"-{headerCommon.Reactor}", $"-{headerCommon.RDS}", $"-{headerCommon.ID}");
nginxFileSystemSortableCollection = _FileShareRepository.GetNginxFileSystemSortableCollection(httpClient, uri, endsWith);
results.AddRange(nginxFileSystemSortableCollection);
}
return results;
return results.OrderByDescending(l => l.DateTime).ToArray();
}
private string GetLines(HttpClient httpClient, NginxFileSystemSortable[] nginxFileSystemSortableCollection)
{
string result;
if (nginxFileSystemSortableCollection.Length != 1)
result = string.Empty;
else
{
HttpResponseMessage httpResponseMessage = _FileShareRepository.ReadFile(httpClient, nginxFileSystemSortableCollection.First().Uri);
if (httpResponseMessage.StatusCode != System.Net.HttpStatusCode.OK)
throw new Exception("File not found!");
Task<string> lines = httpResponseMessage.Content.ReadAsStringAsync();
lines.Wait();
result = lines.Result;
}
return result;
}
string IExportRepository.GetExport(HeaderCommon headerCommon)
{
string result;
List<string> files = GetFiles(headerCommon, "*.txt");
if (files.Count != 1)
result = string.Empty;
else
result = File.ReadAllText(files.First());
HttpClient httpClient = _HttpClientFactory.CreateClient();
NginxFileSystemSortable[] nginxFileSystemSortableCollection = GetNginxFileSystemSortableCollection(headerCommon, httpClient, ".txt");
result = GetLines(httpClient, nginxFileSystemSortableCollection);
return result;
}
@ -72,16 +92,17 @@ public class ExportRepository : IExportRepository
JsonElement? jsonElement;
const string ticks = "Ticks";
JsonProperty[] jsonProperties;
List<string> files = GetFiles(headerCommon, "*.json");
foreach (string file in files)
HttpClient httpClient = _HttpClientFactory.CreateClient();
NginxFileSystemSortable[] nginxFileSystemSortableCollection = GetNginxFileSystemSortableCollection(headerCommon, httpClient, ".json");
foreach (NginxFileSystemSortable nginxFileSystemSortable in nginxFileSystemSortableCollection)
{
json = File.ReadAllText(file);
json = GetLines(httpClient, nginxFileSystemSortableCollection);
hc = JsonSerializer.Deserialize<HeaderCommon>(json);
if (hc is null)
continue;
if (hc.ID < 1)
{
directory = Path.GetDirectoryName(file);
directory = Path.GetDirectoryName(nginxFileSystemSortable.Uri.OriginalString);
if (directory is null)
continue;
directoryName = Path.GetFileName(directory);
@ -112,10 +133,11 @@ public class ExportRepository : IExportRepository
List<HeaderCommon> results = new();
string json;
HeaderCommon? hc;
List<string> files = GetFiles(headerCommon, "*.json");
foreach (string file in files)
HttpClient httpClient = _HttpClientFactory.CreateClient();
NginxFileSystemSortable[] nginxFileSystemSortableCollection = GetNginxFileSystemSortableCollection(headerCommon, httpClient, ".json");
foreach (NginxFileSystemSortable nginxFileSystemSortable in nginxFileSystemSortableCollection)
{
json = File.ReadAllText(file);
json = GetLines(httpClient, nginxFileSystemSortableCollection);
hc = JsonSerializer.Deserialize<HeaderCommon>(json);
if (hc is null)
continue;
@ -132,11 +154,9 @@ public class ExportRepository : IExportRepository
string IExportRepository.GetProcessDataStandardFormat(HeaderCommon headerCommon)
{
string result;
List<string> files = GetFiles(headerCommon, "*.pdsf");
if (files.Count != 1)
result = string.Empty;
else
result = File.ReadAllText(files.First());
HttpClient httpClient = _HttpClientFactory.CreateClient();
NginxFileSystemSortable[] nginxFileSystemSortableCollection = GetNginxFileSystemSortableCollection(headerCommon, httpClient, ".pdsf");
result = GetLines(httpClient, nginxFileSystemSortableCollection);
return result;
}

View File

@ -0,0 +1,107 @@
using OI.Metrology.Shared.Models;
using OI.Metrology.Shared.Models.Stateless;
using System.Text.Json;
namespace OI.Metrology.Server.Repository;
public class FileShareRepository : IFileShareRepository
{
Uri IFileShareRepository.Append(Uri uri, params string[] paths) =>
new(paths.Aggregate(uri.AbsoluteUri, (current, path) => string.Format("{0}/{1}", current.TrimEnd('/'), path.TrimStart('/'))));
private Uri GetEndPoint(HttpClient httpClient, string method)
{
Uri result;
if (httpClient.BaseAddress is null)
throw new NullReferenceException(nameof(httpClient.BaseAddress));
IFileShareRepository fileShareRepository = this;
result = fileShareRepository.Append(httpClient.BaseAddress, "api", "v1", "file-share", method);
return result;
}
void IFileShareRepository.CopyFile(string from, string to)
{
string directory = Path.GetDirectoryName(to) ?? throw new NullReferenceException();
if (!Directory.Exists(directory))
_ = Directory.CreateDirectory(directory);
File.Copy(from, to);
}
void IFileShareRepository.MoveFile(string from, string to)
{
string directory = Path.GetDirectoryName(to) ?? throw new NullReferenceException();
if (!Directory.Exists(directory))
_ = Directory.CreateDirectory(directory);
if (File.Exists(to))
File.Move(to, $"{to}.{DateTime.Now.Ticks}.old");
File.Move(from, to);
}
void IFileShareRepository.FileWrite(string path, string contents)
{
string directory = Path.GetDirectoryName(path) ?? throw new NullReferenceException();
if (!Directory.Exists(directory))
_ = Directory.CreateDirectory(directory);
File.WriteAllText(path, contents);
}
void IFileShareRepository.CopyFile(HttpClient httpClient, string from, string to)
{
Uri uri = GetEndPoint(httpClient, "copy-file");
Task<HttpResponseMessage> httpResponseMessage = httpClient.GetAsync(uri);
httpResponseMessage.Wait();
if (httpResponseMessage.Result.StatusCode != System.Net.HttpStatusCode.OK)
throw new Exception(httpResponseMessage.Result.StatusCode.ToString());
}
void IFileShareRepository.MoveFile(HttpClient httpClient, string from, string to)
{
Uri uri = GetEndPoint(httpClient, "move-file");
Task<HttpResponseMessage> httpResponseMessage = httpClient.GetAsync(uri);
httpResponseMessage.Wait();
if (httpResponseMessage.Result.StatusCode != System.Net.HttpStatusCode.OK)
throw new Exception(httpResponseMessage.Result.StatusCode.ToString());
}
void IFileShareRepository.FileWrite(HttpClient httpClient, string path, string contents)
{
Uri uri = GetEndPoint(httpClient, "file-write");
Task<HttpResponseMessage> httpResponseMessage = httpClient.GetAsync(uri);
httpResponseMessage.Wait();
if (httpResponseMessage.Result.StatusCode != System.Net.HttpStatusCode.OK)
throw new Exception(httpResponseMessage.Result.StatusCode.ToString());
}
HttpResponseMessage IFileShareRepository.ReadFile(HttpClient httpClient, Uri uri)
{
HttpResponseMessage result;
Task<HttpResponseMessage> httpResponseMessage = httpClient.GetAsync(uri);
httpResponseMessage.Wait();
result = httpResponseMessage.Result;
return result;
}
List<NginxFileSystemSortable> IFileShareRepository.GetNginxFileSystemSortableCollection(HttpClient httpClient, Uri uri, string? endsWith)
{
List<NginxFileSystemSortable> results = new();
Task<HttpResponseMessage> httpResponseMessage = httpClient.GetAsync(uri);
httpResponseMessage.Wait();
if (httpResponseMessage.Result.StatusCode == System.Net.HttpStatusCode.OK)
{
FileShareRepository fileShareRepository = this;
Task<string> json = httpResponseMessage.Result.Content.ReadAsStringAsync();
json.Wait();
NginxFileSystem[]? nginxFileSystemCollection = JsonSerializer.Deserialize(json.Result, NginxFileSystemCollectionSourceGenerationContext.Default.NginxFileSystemArray);
List<NginxFileSystemSortable> nginxFileSystemSortableCollection = NginxFileSystemSortable.Convert(fileShareRepository, uri, nginxFileSystemCollection);
foreach (NginxFileSystemSortable nginxFileSystemSortable in nginxFileSystemSortableCollection.OrderByDescending(l => l.DateTime))
{
if (!string.IsNullOrEmpty(endsWith) && !nginxFileSystemSortable.Name.EndsWith(endsWith))
continue;
results.Add(nginxFileSystemSortable);
}
}
return results;
}
}

View File

@ -30,7 +30,7 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
}
string IInfinityQSV3Repository.GetCommandText(string subGroupId)
{
{ // cSpell:disable
StringBuilder result = new();
if (string.IsNullOrEmpty(subGroupId))
throw new ArgumentException(null, nameof(subGroupId));
@ -50,10 +50,10 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
_ = result.Append(" where sd.f_sgrp = ").Append(subGroupId).AppendLine(" ");
_ = result.AppendLine(" for json path ");
return result.ToString();
}
} // cSpell:enable
string IInfinityQSV3Repository.GetCommandText(string? subGroupId, string? process, string? job, string? part, string? lot, string? dateTime)
{
{ // cSpell:disable
StringBuilder result = new();
const string dateTimeFormat = "yyyy-MM-dd HH:mm:ss";
if (!string.IsNullOrEmpty(dateTime) && (dateTime.Contains('-') || dateTime.Contains(' ') || dateTime.Contains(':')) && dateTime.Length != dateTimeFormat.Length)
@ -144,7 +144,7 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
.AppendLine(" iq.td_test ")
.AppendLine(" for json path ");
return result.ToString();
}
} // cSpell:enable
private static StringBuilder GetForJsonPath(IDbConnectionFactory dbConnectionFactory, string commandText)
{
@ -226,7 +226,7 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
}
string IInfinityQSV3Repository.GetCommandText(InfinityQSV3 infinityQSV3)
{
{ // cSpell:disable
StringBuilder result = new();
if (string.IsNullOrEmpty(infinityQSV3.Process))
throw new ArgumentException(nameof(infinityQSV3.Process));
@ -254,7 +254,7 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
.Append(" and ev.f_sgtm = ").Append(infinityQSV3.SubGroupDateTime).AppendLine(" ")
.AppendLine(" for json path ");
return result.ToString();
}
} // cSpell:enable
Result<InfinityQSV3[]> IInfinityQSV3Repository.GetHeader(string subGroupId)
{
@ -281,7 +281,7 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
}
string IInfinityQSV3Repository.GetCommandText(string process, string? part)
{
{ // cSpell:disable
StringBuilder result = new();
if (string.IsNullOrEmpty(process))
throw new ArgumentException(null, nameof(process));
@ -304,7 +304,7 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
.Append(" and part.f_name = '").Append(part).AppendLine("' ")
.AppendLine(" for json path; ");
return result.ToString();
}
} // cSpell:enable
string IInfinityQSV3Repository.GetProductDataAverageSumOfDefectsProcessMeanProcessSigma(string process, string? recipe)
{
@ -363,7 +363,7 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
}
string IInfinityQSV3Repository.GetCommandText(List<string> eppReactorNumbers)
{
{ // cSpell:disable
StringBuilder result = new();
_ = result
.AppendLine(" select se.f_sgrp, ")
@ -411,7 +411,7 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
.AppendLine(" order by iq.pr_name ")
.AppendLine(" for json path; ");
return result.ToString();
}
} // cSpell:enable
private static List<string> Convert(int[] night)
{
@ -484,17 +484,16 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
continue;
used.Add(i);
found = false;
timeSpan = new(ticks - infinityQS1090FullLoad.SubGroupIdFormated.Ticks);
timeSpan = new(ticks - infinityQS1090FullLoad.SubGroupIdFormatted.Ticks);
loadedCount = reactor.LoadedRDS is null ? 0 : reactor.LoadedRDS.Count;
loadedRDS = reactor.LoadedRDS is null ? "&nbsp;" : reactor.LoadedRDS[0].ToString();
results.Add(new string[]
{
results.Add(new string[]{
reactor.ReactorNo.ToString(),
reactor.E10State,
loadedRDS,
infinityQS1090FullLoad.Value.ToString(),
infinityQS1090FullLoad.TemperatureOffsetPercentage.ToString(),
infinityQS1090FullLoad.SubGroupIdFormated.ToString(),
infinityQS1090FullLoad.SubGroupIdFormatted.ToString(),
Math.Floor(timeSpan.TotalHours).ToString()
});
for (int j = i + 1; j < infinityQS1090FullLoads.Length; j++)
@ -510,21 +509,21 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
continue;
used.Add(j);
found = true;
timeSpan = new(ticks - infinityQS1090FullLoad.SubGroupIdFormated.Ticks);
timeSpan = new(ticks - infinityQS1090FullLoad.SubGroupIdFormatted.Ticks);
loadedCount = reactor.LoadedRDS is null ? 0 : reactor.LoadedRDS.Count;
loadedRDS = reactor.LoadedRDS is null ? "&nbsp;" : reactor.LoadedRDS[0].ToString();
columns = new();
columns.AddRange(results[^1]);
columns.AddRange(new string[]
{
"&nbsp;",
reactor.ReactorNo.ToString(),
reactor.E10State,
loadedRDS,
infinityQS1090FullLoad.Value.ToString(),
infinityQS1090FullLoad.TemperatureOffsetPercentage.ToString(),
infinityQS1090FullLoad.SubGroupIdFormated.ToString(),
Math.Floor(timeSpan.TotalHours).ToString()
"&nbsp;",
reactor.ReactorNo.ToString(),
reactor.E10State,
loadedRDS,
infinityQS1090FullLoad.Value.ToString(),
infinityQS1090FullLoad.TemperatureOffsetPercentage.ToString(),
infinityQS1090FullLoad.SubGroupIdFormatted.ToString(),
Math.Floor(timeSpan.TotalHours).ToString()
});
results[^1] = columns.ToArray();
break;
@ -556,8 +555,8 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
foreach (string[] row in collection)
{
_ = result.Append("<tr>");
foreach (string coulmn in row)
_ = result.Append("<td>").Append(coulmn).Append("</td>");
foreach (string column in row)
_ = result.Append("<td>").Append(column).Append("</td>");
_ = result.Append("</tr>");
}
return result.ToString();

View File

@ -0,0 +1,654 @@
using OI.Metrology.Server.Models;
using OI.Metrology.Shared.DataModels;
using OI.Metrology.Shared.Models;
using OI.Metrology.Shared.Models.Stateless;
using OI.Metrology.Shared.Repositories;
using System.Collections.ObjectModel;
using System.Data;
using System.Data.Common;
using System.Text;
using System.Text.Json;
namespace OI.Metrology.Server.Repository;
public class InfinityQSV4Repository : IInfinityQSV4Repository
{
private record Record(string? Color, string Text);
private readonly string _MockRoot;
private readonly string _RepositoryName;
private readonly AppSettings _AppSettings;
private readonly IHttpClientFactory _HttpClientFactory;
private readonly IDbConnectionFactory _DBConnectionFactory;
private readonly IFileShareRepository _FileShareRepository;
private readonly string _OpenInsightApplicationProgrammingInterface;
public InfinityQSV4Repository(AppSettings appSettings, IDbConnectionFactory dbConnectionFactory, IHttpClientFactory httpClientFactory, IFileShareRepository fileShareRepository)
{
_AppSettings = appSettings;
_MockRoot = appSettings.MockRoot;
_HttpClientFactory = httpClientFactory;
_DBConnectionFactory = dbConnectionFactory;
_FileShareRepository = fileShareRepository;
_RepositoryName = nameof(InfinityQSV4Repository)[..^10];
_OpenInsightApplicationProgrammingInterface = appSettings.OpenInsightApplicationProgrammingInterface;
}
string IInfinityQSV4Repository.GetCommandText(string subGroupId)
{ // cSpell:disable
StringBuilder result = new();
if (string.IsNullOrEmpty(subGroupId))
throw new ArgumentException(null, nameof(subGroupId));
_ = result
.AppendLine(" select ")
.AppendLine(" sd.f_sgrp sd_sgrp, ")
.AppendLine(" sd.f_tsno sd_tsno, ")
.AppendLine(" dd.f_dsgp dd_dsgp, ")
.AppendLine(" dg.f_name gd_name, ")
.AppendLine(" dd.f_name dd_name ")
.AppendLine(" from [SPCEPIWORLD].[dbo].[SGRP_DSC] sd ")
.AppendLine(" join [SPCEPIWORLD].[dbo].[DESC_DAT] dd ")
.AppendLine(" on sd.f_dsgp = dd.f_dsgp ")
.AppendLine(" and sd.f_desc = dd.f_desc ")
.AppendLine(" join [SPCEPIWORLD].[dbo].[DESC_GRP] dg ")
.AppendLine(" on dd.f_dsgp = dg.f_dsgp ");
_ = result.Append(" where sd.f_sgrp = ").Append(subGroupId).AppendLine(" ");
_ = result.AppendLine(" for json path ");
return result.ToString();
} // cSpell:enable
string IInfinityQSV4Repository.GetCommandText(string? subGroupId, string? process, string? job, string? part, string? lot, string? dateTime)
{ // cSpell:disable
StringBuilder result = new();
const string dateTimeFormat = "yyyy-MM-dd HH:mm:ss";
if (!string.IsNullOrEmpty(dateTime) && (dateTime.Contains('-') || dateTime.Contains(' ') || dateTime.Contains(':')) && dateTime.Length != dateTimeFormat.Length)
throw new ArgumentException(null, nameof(dateTime));
_ = result
.AppendLine(" select case when iq.sl_loos is null then 0 else iq.sl_loos end + ")
.AppendLine(" case when iq.sl_uoos is null then 0 else iq.sl_uoos end + ")
.AppendLine(" iq.ev_count as iq_sum, ")
.AppendLine(" iq.sl_aflag, ")
.AppendLine(" iq.sl_loos, ")
.AppendLine(" iq.sl_uoos, ")
.AppendLine(" iq.se_sgrp, ")
.AppendLine(" iq.se_sgtm, ")
.AppendLine(" iq.se_tsno, ")
.AppendLine(" iq.td_test, ")
.AppendLine(" iq.pr_name, ")
.AppendLine(" iq.jd_name, ")
.AppendLine(" iq.pl_name, ")
.AppendLine(" iq.pd_name, ")
.AppendLine(" iq.td_name, ")
.AppendLine(" iq.se_val, ")
.AppendLine(" iq.sl_eflag, ")
.AppendLine(" iq.sl_scal, ")
.AppendLine(" iq.sl_sls, ")
.AppendLine(" iq.sl_usl ")
.AppendLine(" from ( ")
.AppendLine(" select ")
.AppendLine(" se.f_sgrp se_sgrp, ")
.AppendLine(" se.f_sgtm se_sgtm, ")
.AppendLine(" se.f_tsno se_tsno, ")
.AppendLine(" se.f_val se_val, ")
.AppendLine(" pr.f_name pr_name, ")
.AppendLine(" jd.f_name jd_name, ")
.AppendLine(" pl.f_name pl_name, ")
.AppendLine(" pd.f_name pd_name, ")
.AppendLine(" td.f_test td_test, ")
.AppendLine(" td.f_name td_name, ")
.AppendLine(" sl.f_eflag sl_eflag, ")
.AppendLine(" sl.f_aflag sl_aflag, ")
.AppendLine(" sl.f_scal sl_scal, ")
.AppendLine(" sl.f_lsl sl_sls, ")
.AppendLine(" sl.f_usl sl_usl, ")
.AppendLine(" case when sl.f_aflag is null or sl.f_aflag = 0 then null else ")
.AppendLine(" case when round(se.f_val, sl.F_scal, 1) < sl.f_lsl then 1 else 0 end ")
.AppendLine(" end as sl_loos, ")
.AppendLine(" case when sl.f_aflag is null or sl.f_aflag = 0 then null else ")
.AppendLine(" case when round(se.f_val, sl.F_scal, 1) > sl.f_usl then 1 else 0 end ")
.AppendLine(" end as sl_uoos, ")
.AppendLine(" (select count(ev.f_evnt) ")
.AppendLine(" from [spcepiworld].[dbo].[evnt_inf] ev ")
.AppendLine(" where ev.f_prcs = pr.f_prcs ")
.AppendLine(" and ev.f_part = pd.f_part ")
.AppendLine(" and ev.f_sgtm = se.f_sgtm ")
.AppendLine(" ) ev_count ")
.AppendLine(" from [spcepiworld].[dbo].[sgrp_ext] se ")
.AppendLine(" join [spcepiworld].[dbo].[prcs_dat] pr ")
.AppendLine(" on se.f_prcs = pr.f_prcs ")
.AppendLine(" join [spcepiworld].[dbo].[job_dat] jd ")
.AppendLine(" on se.f_job = jd.f_job ")
.AppendLine(" join [spcepiworld].[dbo].[part_lot] pl ")
.AppendLine(" on se.f_lot = pl.f_lot ")
.AppendLine(" join [spcepiworld].[dbo].[part_dat] pd ")
.AppendLine(" on se.f_part = pd.f_part ")
.AppendLine(" join [spcepiworld].[dbo].[test_dat] td ")
.AppendLine(" on se.f_test = td.f_test ")
.AppendLine(" left join [spcepiworld].[dbo].[spec_lim] sl ")
.AppendLine(" on se.f_part = sl.f_part ")
.AppendLine(" and se.f_test = sl.f_test ")
.AppendLine(" where se.f_flag = 0 ")
.AppendLine(" and (sl.f_prcs is null or se.f_prcs = sl.f_prcs or sl.f_prcs = 0) ");
if (!string.IsNullOrEmpty(subGroupId))
_ = result.Append(" and se.f_sgrp = ").Append(subGroupId.Split(" ")[0]).AppendLine(" ");
if (!string.IsNullOrEmpty(process))
_ = result.Append(" and pr.f_name = '").Append(process).AppendLine("' ");
if (!string.IsNullOrEmpty(part))
_ = result.Append(" and pd.f_name = '").Append(part).AppendLine("' ");
if (!string.IsNullOrEmpty(job))
_ = result.Append(" and jd.f_name = '").Append(job).AppendLine("' ");
if (!string.IsNullOrEmpty(lot))
_ = result.Append(" and pl.f_name = '").Append(lot).AppendLine("' ");
if (!string.IsNullOrEmpty(dateTime) && (dateTime.Contains('-') || dateTime.Contains(' ') || dateTime.Contains(':')))
_ = result.Append(" and dateadd(HH, -7, (dateadd(SS, convert(bigint, se.f_sgtm), '19700101'))) = '").Append(dateTime).AppendLine("' ");
_ = result.AppendLine(" ) as iq ")
.AppendLine(" order by iq.sl_loos + iq.sl_uoos + iq.ev_count desc, ")
.AppendLine(" iq.sl_aflag desc, ")
.AppendLine(" iq.se_sgrp, ")
.AppendLine(" iq.se_tsno, ")
.AppendLine(" iq.td_test ")
.AppendLine(" for json path ");
return result.ToString();
} // cSpell:enable
private JsonElement[] GetAllReactorsAsJsonElementElement()
{
JsonElement[]? results;
HttpClient httpClient = _HttpClientFactory.CreateClient();
Task<string> task = httpClient.GetStringAsync($"{_OpenInsightApplicationProgrammingInterface}/reactors");
task.Wait();
JsonElement? jsonElement = JsonSerializer.Deserialize<JsonElement>(task.Result);
if (jsonElement is null)
throw new NullReferenceException(nameof(jsonElement));
string json = jsonElement.Value.EnumerateObject().First().Value.ToString();
results = JsonSerializer.Deserialize<JsonElement[]>(json);
if (results is null)
throw new NullReferenceException(nameof(results));
return results;
}
private static StringBuilder GetForJsonPath(IDbConnectionFactory dbConnectionFactory, string commandText, bool useIqsConnection)
{
StringBuilder stringBuilder = new();
using DbConnection dbConnection = dbConnectionFactory.GetDbConnection(useIqsConnection);
DbCommand dbCommand = dbConnection.CreateCommand();
dbCommand.CommandText = commandText;
DbDataReader dbDataReader = dbCommand.ExecuteReader(CommandBehavior.SequentialAccess);
while (dbDataReader.Read())
_ = stringBuilder.Append(dbDataReader.GetString(0));
return stringBuilder;
}
private void GetOI(InfinityQSV4 infinityQSV4)
{
IInfinityQSV4Repository infinityQSV4Repository = this;
if (string.IsNullOrEmpty(infinityQSV4.Part))
throw new ArgumentException(nameof(infinityQSV4.Part));
string json = infinityQSV4Repository.GetProductionSpecification(infinityQSV4.Part);
ProdSpecRoot? prodSpec = JsonSerializer.Deserialize(json, ProdSpecRootSourceGenerationContext.Default.ProdSpecRoot);
if (prodSpec is null)
{
if (prodSpec is null)
{ }
}
}
private static List<string> Convert(int[] night)
{
List<string> results = new();
foreach (int reactor in night)
results.Add(reactor.ToString());
return results;
}
private ReadOnlyDictionary<int, Reactor> GetReactorsMatchingType(string? reactTypeFilter)
{
Dictionary<int, Reactor> results = new();
string json;
Reactor? reactor;
JsonElement[]? jsonElements = GetAllReactorsAsJsonElementElement();
foreach (JsonElement jsonElement in jsonElements)
{
json = jsonElement.EnumerateObject().First().Value.ToString();
if (reactTypeFilter is not null && !json.Contains(reactTypeFilter))
continue;
try
{ reactor = JsonSerializer.Deserialize(json, ReactorSourceGenerationContext.Default.Reactor); }
catch (Exception) { reactor = null; }
if (reactor is null || (reactTypeFilter is not null && reactor.ReactType != reactTypeFilter))
continue;
results.Add(reactor.ReactorNo, reactor);
}
return new(results);
}
private static InfinityQSV4 GetInfinityQSV4(IDbConnectionFactory dbConnectionFactory, IInfinityQSV4Repository infinityQSV4Repository, string subGroupId)
{
InfinityQSV4 result;
string commandText = infinityQSV4Repository.GetCommandText(subGroupId, process: string.Empty, job: string.Empty, part: string.Empty, lot: string.Empty, dateTime: string.Empty);
StringBuilder stringBuilder = GetForJsonPath(dbConnectionFactory, commandText, useIqsConnection: false);
InfinityQSV4[]? results = stringBuilder.Length == 0 ? Array.Empty<InfinityQSV4>() : JsonSerializer.Deserialize(stringBuilder.ToString(), ResultInfinityQSV4SourceGenerationContext.Default.InfinityQSV4Array); // , new JsonSerializerOptions { PropertyNameCaseInsensitive = true }
if (results is null)
throw new NullReferenceException(nameof(results));
result = results.First();
return result;
}
Result<InfinityQSV4[]> IInfinityQSV4Repository.GetData(string subGroupId)
{
Result<InfinityQSV4[]>? result;
if (!string.IsNullOrEmpty(_MockRoot))
{
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IInfinityQSV4Repository.GetData)}.json"));
result = JsonSerializer.Deserialize(json, ResultInfinityQSV4SourceGenerationContext.Default.ResultInfinityQSV4Array);
if (result is null)
throw new NullReferenceException(nameof(result));
}
else
{
IInfinityQSV4Repository infinityQSV4Repository = this;
InfinityQSV4 infinityQSV4 = GetInfinityQSV4(_DBConnectionFactory, infinityQSV4Repository, subGroupId);
GetOI(infinityQSV4);
string commandText = infinityQSV4Repository.GetCommandText(subGroupId, process: infinityQSV4.Process, job: infinityQSV4.Job, part: infinityQSV4.Part, lot: infinityQSV4.Lot, dateTime: string.Concat(infinityQSV4.SubGroupDateTime));
StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText, useIqsConnection: false);
InfinityQSV4[]? results = stringBuilder.Length == 0 ? Array.Empty<InfinityQSV4>() : JsonSerializer.Deserialize(stringBuilder.ToString(), ResultInfinityQSV4SourceGenerationContext.Default.InfinityQSV4Array); // , new JsonSerializerOptions { PropertyNameCaseInsensitive = true }
if (results is null)
throw new NullReferenceException(nameof(results));
result = new()
{
Results = results,
TotalRows = results.Length,
};
}
return result;
}
Result<InfinityQSDescriptorV4[]> IInfinityQSV4Repository.GetDescriptors(string subGroupId)
{
Result<InfinityQSDescriptorV4[]>? result;
if (!string.IsNullOrEmpty(_MockRoot))
{
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IInfinityQSV4Repository.GetDescriptors)}.json"));
result = JsonSerializer.Deserialize(json, ResultInfinityQSDescriptorV4SourceGenerationContext.Default.ResultInfinityQSDescriptorV4Array);
if (result is null)
throw new NullReferenceException(nameof(result));
}
else
{
IInfinityQSV4Repository infinityQSV4Repository = this;
string commandText = infinityQSV4Repository.GetCommandText(subGroupId);
StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText, useIqsConnection: false);
InfinityQSDescriptorV4[]? results = stringBuilder.Length == 0 ? Array.Empty<InfinityQSDescriptorV4>() : JsonSerializer.Deserialize(stringBuilder.ToString(), ResultInfinityQSDescriptorV4SourceGenerationContext.Default.InfinityQSDescriptorV4Array); // , new JsonSerializerOptions { PropertyNameCaseInsensitive = true }
if (results is null)
throw new NullReferenceException(nameof(results));
result = new()
{
Results = results,
TotalRows = results.Length,
};
}
return result;
}
string IInfinityQSV4Repository.GetCommandText(InfinityQSV4 infinityQSV4)
{ // cSpell:disable
StringBuilder result = new();
if (string.IsNullOrEmpty(infinityQSV4.Process))
throw new ArgumentException(nameof(infinityQSV4.Process));
if (string.IsNullOrEmpty(infinityQSV4.Part))
throw new ArgumentException(nameof(infinityQSV4.Part));
_ = result
.AppendLine(" select ")
.AppendLine(" ev.f_evnt [ev_evnt], ")
.AppendLine(" ev.f_sgtm [ev_sgtm], ")
.AppendLine(" dateadd(HH, -7, (dateadd(SS, convert(bigint, ev.f_sgtm), '19700101'))) [ev_utc7], ")
.AppendLine(" pr.f_name [pr_name], ")
.AppendLine(" pd.f_name [pd_name], ")
.AppendLine(" td.f_test [td_test], ")
.AppendLine(" td.f_name [td_name], ")
.AppendLine(" ev.f_name [ev_name] ")
.AppendLine(" from [spcepiworld].[dbo].[evnt_inf] ev ")
.AppendLine(" join [spcepiworld].[dbo].[prcs_dat] pr ")
.AppendLine(" on ev.f_prcs = pr.f_prcs ")
.AppendLine(" join [spcepiworld].[dbo].[part_dat] pd ")
.AppendLine(" on ev.f_part = pd.f_part ")
.AppendLine(" join [spcepiworld].[dbo].[test_dat] td ")
.AppendLine(" on ev.f_test = td.f_test ")
.Append(" where pr.f_name = '").Append(infinityQSV4.Process).AppendLine("' ")
.Append(" and pd.f_name = '").Append(infinityQSV4.Part).AppendLine("' ")
.Append(" and ev.f_sgtm = ").Append(infinityQSV4.SubGroupDateTime).AppendLine(" ")
.AppendLine(" for json path ");
return result.ToString();
} // cSpell:enable
Result<InfinityQSV4[]> IInfinityQSV4Repository.GetHeader(string subGroupId)
{
Result<InfinityQSV4[]>? result;
if (!string.IsNullOrEmpty(_MockRoot))
{
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IInfinityQSV4Repository.GetHeader)}.json"));
result = JsonSerializer.Deserialize(json, ResultInfinityQSV4SourceGenerationContext.Default.ResultInfinityQSV4Array);
if (result is null)
throw new NullReferenceException(nameof(result));
}
else
{
IInfinityQSV4Repository infinityQSV4Repository = this;
InfinityQSV4 infinityQSV4 = GetInfinityQSV4(_DBConnectionFactory, infinityQSV4Repository, subGroupId);
InfinityQSV4[] results = new InfinityQSV4[] { infinityQSV4 };
result = new()
{
Results = results,
TotalRows = results.Length,
};
}
return result;
}
string IInfinityQSV4Repository.GetCommandText(string process, string? part)
{ // cSpell:disable
StringBuilder result = new();
if (string.IsNullOrEmpty(process))
throw new ArgumentException(null, nameof(process));
if (string.IsNullOrEmpty(part))
throw new ArgumentException(null, nameof(part));
_ = result
.AppendLine(" select [f_mean] as ProcessMean, ")
.AppendLine(" [f_sp] as ProcessSigma ")
.AppendLine(" from [spcepiworld].[dbo].[test_dat] test ")
.AppendLine(" join [spcepiworld].[dbo].[ctrl_lim] ctrl ")
.AppendLine(" on test.f_test = ctrl.f_test ")
.AppendLine(" and test.f_tsgp = 1104848523 /* Product Data */ ")
.AppendLine(" join [spcepiworld].[dbo].[part_dat] part ")
.AppendLine(" on part.f_part = ctrl.f_part ")
.AppendLine(" and ctrl.f_test = 1125073605 /* Average Sum of Defects */ ")
.AppendLine(" join [spcepiworld].[dbo].[prcs_dat] process ")
.AppendLine(" on process.f_prcs = ctrl.f_prcs ")
.AppendLine(" where test.f_name = 'Average Sum of Defects' ")
.Append(" and process.f_name = '").Append(process).AppendLine("' ")
.Append(" and part.f_name = '").Append(part).AppendLine("' ")
.AppendLine(" for json path; ");
return result.ToString();
} // cSpell:enable
string IInfinityQSV4Repository.GetProductDataAverageSumOfDefectsProcessMeanProcessSigma(string process, string? recipe)
{
StringBuilder result;
if (!string.IsNullOrEmpty(_MockRoot))
{
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IInfinityQSV4Repository.GetProductDataAverageSumOfDefectsProcessMeanProcessSigma)}.json"));
result = new(json);
}
else
{
IInfinityQSV4Repository infinityQSV4Repository = this;
string commandText = infinityQSV4Repository.GetCommandText(process, recipe);
result = GetForJsonPath(_DBConnectionFactory, commandText, useIqsConnection: false);
if (result.Length == 0)
result = new("{}");
}
return result.ToString();
}
string IInfinityQSV4Repository.GetCommandText(List<string> eppReactorNumbers)
{ // cSpell:disable
StringBuilder result = new();
_ = result
.AppendLine(" select se.f_sgrp, ")
.AppendLine(" dateadd(HH, -7, (dateadd(SS, convert(bigint, se.f_sgrp), '19700101'))) date_time, ")
.AppendLine(" iq.pr_name, ")
.AppendLine(" iq.pd_name, ")
.AppendLine(" max(case ")
.AppendLine(" when td.f_test = 1104769646 ")
.AppendLine(" then se.f_val ")
.AppendLine(" else null ")
.AppendLine(" end) as iq_value, ")
.AppendLine(" max(case ")
.AppendLine(" when td.f_test = 1312288843 ")
.AppendLine(" then se.f_val else null ")
.AppendLine(" end) as iq_temp_offset_percent ")
.AppendLine(" from ( ")
.AppendLine(" select ")
.AppendLine(" max(se.f_sgrp) se_max_sgrp, ")
.AppendLine(" se.f_test se_test, ")
.AppendLine(" pr.f_name pr_name, ")
.AppendLine(" pd.f_name pd_name ")
.AppendLine(" from [spcepiworld].[dbo].[sgrp_ext] se ")
.AppendLine(" join [spcepiworld].[dbo].[prcs_dat] pr ")
.AppendLine(" on se.f_prcs = pr.f_prcs ")
.AppendLine(" join [spcepiworld].[dbo].[part_dat] pd ")
.AppendLine(" on se.f_part = pd.f_part ")
.AppendLine(" where se.f_flag = 0 ")
.Append(" and pr.f_name in (").Append(string.Join(',', eppReactorNumbers)).AppendLine(") ")
.AppendLine(" and pd.f_name = '1090 - Full Load' ")
.AppendLine(" and se.f_test in (1104769646, 1312288843) ")
.AppendLine(" group by se.f_test, ")
.AppendLine(" pr.f_name, ")
.AppendLine(" pd.f_name ")
.AppendLine(" ) as iq ")
.AppendLine(" join [spcepiworld].[dbo].[sgrp_ext] se ")
.AppendLine(" on iq.se_max_sgrp = se.f_sgrp ")
.AppendLine(" join [spcepiworld].[dbo].[test_dat] td ")
.AppendLine(" on iq.se_test = td.f_test ")
.AppendLine(" and se.f_test = td.f_test ")
.AppendLine(" where se.f_flag = 0 ")
.AppendLine(" and td.f_test in (1104769646, 1312288843) ")
.AppendLine(" group by se.f_sgrp, ")
.AppendLine(" iq.pr_name, ")
.AppendLine(" iq.pd_name ")
.AppendLine(" order by iq.pr_name ")
.AppendLine(" for json path; ");
return result.ToString();
} // cSpell:enable
List<string[]> IInfinityQSV4Repository.GetEpiProTempVerificationRows(int[] night)
{
List<string[]>? results;
List<string> eppReactorNumbers = new();
List<string> nightSiftReactors = Convert(night);
ReadOnlyDictionary<int, Reactor> eppReactors = GetReactorsMatchingType("EPP");
foreach (KeyValuePair<int, Reactor> keyValuePair in eppReactors)
eppReactorNumbers.Add($"'{keyValuePair.Key}'");
if (!string.IsNullOrEmpty(_MockRoot))
{
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IInfinityQSV4Repository.GetEpiProTempVerificationRows)}.json"));
results = JsonSerializer.Deserialize<List<string[]>>(json);
if (results is null)
throw new NullReferenceException(nameof(results));
}
else
{
bool found;
results = new();
int loadedCount;
Reactor? reactor;
string loadedRDS;
int reactorNumber;
TimeSpan timeSpan;
List<string> columns;
List<int> used = new();
List<int> dayShiftOrder = new();
long ticks = DateTime.Now.Ticks;
List<int> nightShiftOrder = new();
InfinityQS1090FullLoad infinityQS1090FullLoad;
IInfinityQSV4Repository infinityQSV4Repository = this;
string commandText = infinityQSV4Repository.GetCommandText(eppReactorNumbers);
StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText, useIqsConnection: false);
InfinityQS1090FullLoad[]? infinityQS1090FullLoads = stringBuilder.Length == 0 ? Array.Empty<InfinityQS1090FullLoad>() : JsonSerializer.Deserialize(stringBuilder.ToString(), InfinityQS1090FullLoadArraySourceGenerationContext.Default.InfinityQS1090FullLoadArray);
if (infinityQS1090FullLoads is null)
throw new NullReferenceException(nameof(infinityQS1090FullLoads));
for (int i = 0; i < infinityQS1090FullLoads.Length; i++)
{
infinityQS1090FullLoad = infinityQS1090FullLoads[i];
if (infinityQS1090FullLoad.Reactor is null)
continue;
if (!int.TryParse(infinityQS1090FullLoad.Reactor, out reactorNumber))
continue;
if (!eppReactors.TryGetValue(reactorNumber, out reactor))
continue;
if (!nightSiftReactors.Contains(infinityQS1090FullLoad.Reactor))
dayShiftOrder.Add(i);
else
nightShiftOrder.Add(i);
}
for (int i = 0; i < infinityQS1090FullLoads.Length; i++)
{
if (used.Contains(i) || !dayShiftOrder.Contains(i))
continue;
infinityQS1090FullLoad = infinityQS1090FullLoads[i];
if (infinityQS1090FullLoad.Reactor is null)
continue;
if (!int.TryParse(infinityQS1090FullLoad.Reactor, out reactorNumber))
continue;
if (!eppReactors.TryGetValue(reactorNumber, out reactor))
continue;
used.Add(i);
found = false;
timeSpan = new(ticks - infinityQS1090FullLoad.SubGroupIdFormatted.Ticks);
loadedCount = reactor.LoadedRDS is null ? 0 : reactor.LoadedRDS.Count;
loadedRDS = reactor.LoadedRDS is null ? "&nbsp;" : reactor.LoadedRDS[0].ToString();
results.Add(new string[]{
reactor.ReactorNo.ToString(),
reactor.E10State,
loadedRDS,
infinityQS1090FullLoad.Value.ToString(),
infinityQS1090FullLoad.TemperatureOffsetPercentage.ToString(),
infinityQS1090FullLoad.SubGroupIdFormatted.ToString(),
Math.Floor(timeSpan.TotalHours).ToString()
});
for (int j = i + 1; j < infinityQS1090FullLoads.Length; j++)
{
if (used.Contains(j) || !nightShiftOrder.Contains(j))
continue;
infinityQS1090FullLoad = infinityQS1090FullLoads[j];
if (infinityQS1090FullLoad.Reactor is null)
continue;
if (!int.TryParse(infinityQS1090FullLoad.Reactor, out reactorNumber))
continue;
if (!eppReactors.TryGetValue(reactorNumber, out reactor))
continue;
used.Add(j);
found = true;
timeSpan = new(ticks - infinityQS1090FullLoad.SubGroupIdFormatted.Ticks);
loadedCount = reactor.LoadedRDS is null ? 0 : reactor.LoadedRDS.Count;
loadedRDS = reactor.LoadedRDS is null ? "&nbsp;" : reactor.LoadedRDS[0].ToString();
columns = new();
columns.AddRange(results[^1]);
columns.AddRange(new string[]
{
"&nbsp;",
reactor.ReactorNo.ToString(),
reactor.E10State,
loadedRDS,
infinityQS1090FullLoad.Value.ToString(),
infinityQS1090FullLoad.TemperatureOffsetPercentage.ToString(),
infinityQS1090FullLoad.SubGroupIdFormatted.ToString(),
Math.Floor(timeSpan.TotalHours).ToString()
});
results[^1] = columns.ToArray();
break;
}
if (!found)
{
columns = new();
columns.AddRange(results[^1]);
columns.Add("&nbsp;");
columns.Add("&nbsp;");
columns.Add("&nbsp;");
columns.Add("&nbsp;");
columns.Add("&nbsp;");
columns.Add("&nbsp;");
columns.Add("&nbsp;");
columns.Add("&nbsp;");
results[^1] = columns.ToArray();
}
}
}
return results;
}
string IInfinityQSV4Repository.GetEpiProTempVerification(int[] night)
{
StringBuilder result = new();
IInfinityQSV4Repository infinityQSV4Repository = this;
List<string[]> collection = infinityQSV4Repository.GetEpiProTempVerificationRows(night);
foreach (string[] row in collection)
{
_ = result.Append("<tr>");
foreach (string column in row)
_ = result.Append("<td>").Append(column).Append("</td>");
_ = result.Append("</tr>");
}
return result.ToString();
}
List<Reactor> IInfinityQSV4Repository.GetReactors()
{
List<Reactor> results = new();
ReadOnlyDictionary<int, Reactor> keyValuePairs = GetReactorsMatchingType(reactTypeFilter: null);
foreach (KeyValuePair<int, Reactor> keyValuePair in keyValuePairs)
results.Add(keyValuePair.Value);
return results;
}
string IInfinityQSV4Repository.GetRunDataSheet(string rds)
{
string result;
HttpClient httpClient = _HttpClientFactory.CreateClient();
Task<string> task = httpClient.GetStringAsync($"{_OpenInsightApplicationProgrammingInterface}/materials/rds/{rds}");
task.Wait();
result = task.Result;
if (rds == "123456")
{
RunDataSheetRoot? runDataSheetRoot = JsonSerializer.Deserialize(result, RunDataSheetRootSourceGenerationContext.Default.RunDataSheetRoot);
if (runDataSheetRoot is not null)
{
List<string> lines = new();
foreach (char ch in runDataSheetRoot.RunDataSheet.PSN)
{
if (ch is '1')
continue;
}
result = string.Join(Environment.NewLine, lines);
}
}
return result;
}
string IInfinityQSV4Repository.GetProductionSpecification(string part)
{
string result;
HttpClient httpClient = _HttpClientFactory.CreateClient();
Task<string> task = httpClient.GetStringAsync($"{_OpenInsightApplicationProgrammingInterface}/materials/prod_spec/{part}");
task.Wait();
result = task.Result;
if (part == "4992")
{
ProdSpecRoot? prodSpecRoot = JsonSerializer.Deserialize(result, ProdSpecRootSourceGenerationContext.Default.ProdSpecRoot);
if (prodSpecRoot is not null)
{
List<string> lines = new();
foreach (PrsStage prsStage in prodSpecRoot.ProdSpec.PrsStages)
{
if (prsStage.QaMetTests is null)
continue;
foreach (QaMetTest qaMetTest in prsStage.QaMetTests)
{
lines.Add(qaMetTest.Test);
// lines.Add(qaMetTest.Slots);
lines.Add(qaMetTest.Recipe);
lines.Add(qaMetTest.RecipePattern);
if (qaMetTest.Test != "THICK_ONLY")
continue;
lines.Add(qaMetTest.Min.ToString());
lines.Add(qaMetTest.Max.ToString());
}
}
result = string.Join(Environment.NewLine, lines);
}
}
return result;
}
}

View File

@ -312,7 +312,7 @@ public class MetrologyRepository : IMetrologyRepository
return sb.ToString();
}
internal DataTable GetHeaders(int toolTypeId, DateTime? startTime, DateTime? endTime, int? pageNo, int? pageSize, long? headerId, out long totalRecords)
internal DataTable GetHeaders(int toolTypeId, string? startTime, string? endTime, int? pageNo, int? pageSize, long? headerId, out long totalRecords)
{
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
@ -341,16 +341,16 @@ public class MetrologyRepository : IMetrologyRepository
}
else
{
if (startTime.HasValue)
if (startTime is not null)
{
whereClause = "[Date] >= @StartTime ";
DateTime startTimeLocal = startTime.Value.ToLocalTime();
AddParameter(cmd, "@StartTime", startTimeLocal);
DateTime startTimeLocal = DateTime.Parse(startTime).ToLocalTime();
AddParameter(cmd, "@StartTime", startTimeLocal.ToString("yyyy-MM-dd HH:mm:ss"));
}
if (endTime.HasValue)
if (endTime is not null)
{
DateTime endTimeLocal = endTime.Value.ToLocalTime();
DateTime endTimeLocal = DateTime.Parse(endTime).ToLocalTime();
TimeSpan timeSpan = new(DateTime.Now.Ticks - endTimeLocal.Ticks);
if (timeSpan.TotalMinutes > 5)
{
@ -358,7 +358,7 @@ public class MetrologyRepository : IMetrologyRepository
whereClause += "AND ";
whereClause += "[Date] <= @EndTime ";
AddParameter(cmd, "@EndTime", endTimeLocal);
AddParameter(cmd, "@EndTime", endTimeLocal.ToString("yyyy-MM-dd HH:mm:ss"));
}
}
}
@ -773,7 +773,7 @@ public class MetrologyRepository : IMetrologyRepository
void IMetrologyRepository.PurgeExistingData(int toolTypeId, string title) => PurgeExistingData(toolTypeId, title);
long IMetrologyRepository.InsertToolDataJSON(JToken jsonbody, long headerId, List<ToolTypeMetadata> metaData, string tableName) => InsertToolDataJSON(jsonbody, headerId, metaData, tableName);
DataTable IMetrologyRepository.ExportData(string spName, DateTime startTime, DateTime endTime) => ExportData(spName, startTime, endTime);
DataTable IMetrologyRepository.GetHeaders(int toolTypeId, DateTime? startTime, DateTime? endTime, int? pageNo, int? pageSize, long? headerid, out long totalRecords) => GetHeaders(toolTypeId, startTime, endTime, pageNo, pageSize, headerid, out totalRecords);
DataTable IMetrologyRepository.GetHeaders(int toolTypeId, string? startTime, string? endTime, int? pageNo, int? pageSize, long? headerid, out long totalRecords) => GetHeaders(toolTypeId, startTime, endTime, pageNo, pageSize, headerid, out totalRecords);
DataTable IMetrologyRepository.GetData(int toolTypeId, long headerId) => GetData(toolTypeId, headerId);
HeaderCommon[] IMetrologyRepository.GetHeaderTitles(int? toolTypeId, int? pageNo, int? pageSize, out long totalRecords) => GetHeaderTitles(toolTypeId, pageNo, pageSize, out totalRecords);
Guid IMetrologyRepository.GetHeaderAttachmentIDByTitle(int toolTypeId, string title) => GetHeaderAttachmentIDByTitle(toolTypeId, title);

View File

@ -1,146 +0,0 @@
using OI.Metrology.Server.Models;
using OI.Metrology.Shared.DataModels;
using OI.Metrology.Shared.Models.Stateless;
using System.Globalization;
using System.Text.Json;
namespace OI.Metrology.Server.Repository;
public class ReactorsRepository : IReactorsRepository
{
private readonly AppSettings _AppSettings;
private readonly Dictionary<int, char> _SecondsToAlpha;
public ReactorsRepository(AppSettings appSettings)
{
_AppSettings = appSettings;
_SecondsToAlpha = new();
for (int i = 65; i < 91; i++)
{
if (i is 73 or 79)
continue;
_SecondsToAlpha.Add(i - 65, (char)i);
}
}
Result<int[]> IReactorsRepository.EvenReactors()
{
Result<int[]> results;
int[] collection = new int[] {
20,
22,
24,
26,
28,
30,
32,
34,
36,
38,
40,
42,
44,
46,
48,
50,
52,
54,
56,
58,
60,
62,
64,
66,
68,
70,
72,
74
};
results = new()
{
Results = collection,
TotalRows = collection.Length,
};
return results;
}
Result<int[]> IReactorsRepository.OddReactors()
{
Result<int[]> results;
int[] collection = new int[] {
21,
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,
59,
61,
63,
65,
73,
75,
77,
79
};
results = new()
{
Results = collection,
TotalRows = collection.Length,
};
return results;
}
string? IReactorsRepository.GetKey(WorkMaterialOut workMaterialOut, bool save)
{
if (workMaterialOut is null)
throw new Exception();
if (workMaterialOut.Username is null || workMaterialOut.Username.Length < 2)
throw new ArgumentException(nameof(workMaterialOut.Username));
if (workMaterialOut.RunDataSheet is null || workMaterialOut.RunDataSheet.Length < 2)
throw new ArgumentException(nameof(workMaterialOut.RunDataSheet));
string? result = null;
char c;
string? fileName = null;
DateTime dateTime = DateTime.Now;
Calendar calendar = new CultureInfo("en-US").Calendar;
string json = JsonSerializer.Serialize(workMaterialOut, new JsonSerializerOptions { WriteIndented = true });
string weekOfYear = $"{dateTime:yyyy}_Week_{calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday):00}";
string directory = Path.Combine(_AppSettings.ApiExportPath, "WorkMaterialOut", "API", weekOfYear, dateTime.ToString("yyyy-MM-dd_HH"));
if (!Directory.Exists(directory))
_ = Directory.CreateDirectory(directory);
for (int i = 0; i < int.MaxValue; i++)
{
dateTime = dateTime.AddSeconds(i);
if (!_SecondsToAlpha.TryGetValue(dateTime.Second, out c))
continue;
fileName = Path.Combine(directory, $"WMO-{dateTime:mm}{c}.json");
if (!File.Exists(fileName))
{
result = $"{c}{dateTime:mm}";
break;
}
}
if (fileName is null)
throw new Exception();
if (save)
File.WriteAllText(fileName, json);
return result;
}
}

View File

@ -13,10 +13,16 @@ public class ToolTypesRepository : IToolTypesRepository
private readonly string _MockRoot;
private readonly string _RepositoryName;
private readonly AppSettings _AppSettings;
private readonly IHttpClientFactory _HttpClientFactory;
private readonly IFileShareRepository _FileShareRepository;
public ToolTypesRepository(AppSettings appSettings)
public ToolTypesRepository(AppSettings appSettings, IHttpClientFactory httpClientFactory, IFileShareRepository fileShareRepository)
{
_AppSettings = appSettings;
_MockRoot = appSettings.MockRoot;
_HttpClientFactory = httpClientFactory;
_FileShareRepository = fileShareRepository;
_RepositoryName = nameof(ToolTypesRepository)[..^10];
}
@ -78,7 +84,7 @@ public class ToolTypesRepository : IToolTypesRepository
// Gets headers, request/response format is to allow paging with igniteUI
// The headerid parameter is used for navigating directly to a header, when the button is clicked in Awaiting Dispo
Result<DataTable> IToolTypesRepository.GetHeaders(IMetrologyRepository metrologyRepository, int id, DateTime? datebegin, DateTime? dateend, int? page, int? pagesize, long? headerid)
Result<DataTable> IToolTypesRepository.GetHeaders(IMetrologyRepository metrologyRepository, int id, string? datebegin, string? dateend, int? page, int? pagesize, long? headerid)
{
Result<DataTable>? r;
if (!string.IsNullOrEmpty(_MockRoot))
@ -203,7 +209,7 @@ public class ToolTypesRepository : IToolTypesRepository
return new(message, contentType, stream);
}
string? IToolTypesRepository.OIExport(IMetrologyRepository metrologyRepository, IAttachmentsService attachmentsService, string attachmentPath, Dictionary<string, string> tableToPath, int toolTypeId, long headerid)
string? IToolTypesRepository.OIExport(IMetrologyRepository metrologyRepository, IAttachmentsService attachmentsService, int toolTypeId, long headerid)
{
string? result;
ToolType toolType = metrologyRepository.GetToolTypeByID(toolTypeId);
@ -211,16 +217,18 @@ public class ToolTypesRepository : IToolTypesRepository
result = $"Invalid tool id [{toolTypeId}] [{headerid}]!";
else
{
string? processDataStandardFormat = attachmentsService.GetProcessDataStandardFormat(metrologyRepository, attachmentPath, toolTypeId, headerid);
string? processDataStandardFormat = attachmentsService.GetProcessDataStandardFormat(metrologyRepository, toolTypeId, headerid);
if (processDataStandardFormat is null)
result = $"Export file doesn't exist for [{toolTypeId}] [{headerid}] at <{attachmentPath}>!";
else if (!tableToPath.TryGetValue(toolType.HeaderTableName, out string? directly))
result = $"Export file doesn't exist for [{toolTypeId}] [{headerid}] at <{attachmentPath}>!";
result = $"Export file doesn't exist for [{toolTypeId}] [{headerid}] at <{_AppSettings.EcMesaFileShareMetrologySi}>!";
else if (!_AppSettings.TableToPath.TryGetValue(toolType.HeaderTableName, out string? directly))
result = $"Export file doesn't exist for [{toolTypeId}] [{headerid}] at <{_AppSettings.EcMesaFileShareMetrologySi}>!";
else
{
try
{
File.Copy(processDataStandardFormat, Path.Combine(directly, $"Viewer_{Path.GetFileName(processDataStandardFormat)}"));
HttpClient httpClient = _HttpClientFactory.CreateClient();
httpClient.BaseAddress = new(_AppSettings.ApiFileShare);
_FileShareRepository.CopyFile(httpClient, processDataStandardFormat, Path.Combine(directly, $"Viewer_{Path.GetFileName(processDataStandardFormat)}"));
result = null;
}
catch (Exception ex) { result = ex.Message; }
@ -229,7 +237,7 @@ public class ToolTypesRepository : IToolTypesRepository
return result;
}
Result<DataTable> IToolTypesRepository.GetExportData(IMetrologyRepository metrologyRepository, int toolTypeId, DateTime? datebegin, DateTime? dateend)
Result<DataTable> IToolTypesRepository.GetExportData(IMetrologyRepository metrologyRepository, int toolTypeId, string? datebegin, string? dateend)
{
Result<DataTable>? r;
if (!string.IsNullOrEmpty(_MockRoot))
@ -241,12 +249,12 @@ public class ToolTypesRepository : IToolTypesRepository
}
else
{
dateend ??= DateTime.Now;
datebegin ??= dateend.Value.AddMonths(-1);
DateTime dateEnd = dateend is null ? DateTime.Now : DateTime.Parse(dateend);
DateTime dateBegin = datebegin is null ? dateEnd.AddMonths(-1) : DateTime.Parse(datebegin);
ToolType tt = metrologyRepository.GetToolTypeByID(toolTypeId);
if (string.IsNullOrEmpty(tt.ExportSPName))
throw new NullReferenceException(nameof(tt.ExportSPName));
DataTable dataTable = metrologyRepository.ExportData(tt.ExportSPName, datebegin.Value, dateend.Value);
DataTable dataTable = metrologyRepository.ExportData(tt.ExportSPName, dateBegin, dateEnd);
r = new()
{
Results = dataTable,
@ -305,7 +313,7 @@ public class ToolTypesRepository : IToolTypesRepository
return result.ToString();
}
byte[] IToolTypesRepository.GetCSVExport(IMetrologyRepository metrologyRepository, int toolTypeId, DateTime? datebegin, DateTime? dateend)
byte[] IToolTypesRepository.GetCSVExport(IMetrologyRepository metrologyRepository, int toolTypeId, string? datebegin, string? dateend)
{
byte[] results;
Result<DataTable> result;

View File

@ -0,0 +1,188 @@
using OI.Metrology.Server.Models;
using OI.Metrology.Shared.DataModels;
using OI.Metrology.Shared.Models;
using OI.Metrology.Shared.Models.Stateless;
using OI.Metrology.Shared.Repositories;
using System.Globalization;
namespace OI.Metrology.Server.Repository;
public class WaferCounterRepository : IWaferCounterRepository
{
private record Record(int Check,
int Total,
string? SlotMap);
private readonly string _MockRoot;
private readonly string _RepositoryName;
private readonly AppSettings _AppSettings;
private readonly IHttpClientFactory _HttpClientFactory;
private readonly IDbConnectionFactory _DBConnectionFactory;
private readonly IFileShareRepository _FileShareRepository;
private readonly string _OpenInsightApplicationProgrammingInterface;
public WaferCounterRepository(AppSettings appSettings, IDbConnectionFactory dbConnectionFactory, IHttpClientFactory httpClientFactory, IFileShareRepository fileShareRepository)
{
_AppSettings = appSettings;
_MockRoot = appSettings.MockRoot;
_HttpClientFactory = httpClientFactory;
_DBConnectionFactory = dbConnectionFactory;
_FileShareRepository = fileShareRepository;
_RepositoryName = nameof(WaferCounterRepository)[..^10];
_OpenInsightApplicationProgrammingInterface = appSettings.OpenInsightApplicationProgrammingInterface;
}
private void MoveFile(string waferSizeDirectory, NginxFileSystemSortable nginxFileSystemSortable)
{
Calendar calendar = new CultureInfo("en-US").Calendar;
string from = Path.Combine(waferSizeDirectory, nginxFileSystemSortable.Name);
string weekOfYear = $"{nginxFileSystemSortable.DateTime:yyyy}_Week_{calendar.GetWeekOfYear(nginxFileSystemSortable.DateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday):00}";
string to = Path.Combine(waferSizeDirectory, "Archive", weekOfYear, nginxFileSystemSortable.Name);
_FileShareRepository.MoveFile(from, to);
}
private static Record GetRecord(string line1, string line2)
{
Record result;
string? slotMap = string.IsNullOrEmpty(line2) || line2.Length != 8 ? null : line2.Substring(1, 1);
int check = slotMap == "1" ? 1 : 0;
#pragma warning disable IDE0057
int total = int.Parse(line1.Substring(1));
foreach (char item in line2.Substring(2))
#pragma warning restore IDE0057
{
switch (item)
{
case '0':
check += 0;
slotMap += "0000";
break;
case '1':
check += 1;
slotMap += "0001";
break;
case '2':
check += 1;
slotMap += "0010";
break;
case '3':
check += 2;
slotMap += "0011";
break;
case '4':
check += 1;
slotMap += "0100";
break;
case '5':
check += 2;
slotMap += "0101";
break;
case '6':
check += 2;
slotMap += "0110";
break;
case '7':
check += 3;
slotMap += "0111";
break;
case '8':
check += 1;
slotMap += "1000";
break;
case '9':
check += 2;
slotMap += "1001";
break;
case 'A':
check += 2;
slotMap += "1010";
break;
case 'B':
check += 3;
slotMap += "1011";
break;
case 'C':
check += 2;
slotMap += "1100";
break;
case 'D':
check += 3;
slotMap += "1101";
break;
case 'E':
check += 3;
slotMap += "1110";
break;
case 'F':
check += 4;
slotMap += "1111";
break;
default:
break;
}
}
result = new(check, total, slotMap);
return result;
}
private Uri GetWaferSizeUri(string area, string waferSize) =>
_FileShareRepository.Append(new Uri(_AppSettings.EcMesaFileShareCharacterizationSi), "WaferCounter", area, waferSize);
private string GetWaferSizeDirectory(string area, string waferSize, bool destination) =>
destination ? Path.Combine(_AppSettings.WaferCounterDestinationDirectory, area, waferSize) : Path.Combine(_AppSettings.EcCharacterizationSi, "WaferCounter", area, waferSize);
string? IWaferCounterRepository.GetSlotMap(string line1, string line2) =>
GetRecord(line1, line2).SlotMap;
private List<NginxFileSystemSortable> GetNginxFileSystemSortableCollection(HttpClient httpClient, Uri waferSizeUri)
{
List<NginxFileSystemSortable> results = new();
DateTime dateTime = DateTime.Now;
long ticks = dateTime.AddSeconds(_AppSettings.WaferCounterTwoFileSecondsWait).Ticks;
for (int i = 0; i < int.MaxValue; i++)
{
results = _FileShareRepository.GetNginxFileSystemSortableCollection(httpClient, waferSizeUri, ".wc");
if (results.Count > 0 || DateTime.Now.Ticks > ticks)
break;
Thread.Sleep(250);
}
return results;
}
private static WaferCounter GetLastQuantityAndSlotMap(string waferSize, HttpClient httpClient, NginxFileSystemSortable nginxFileSystemSortable)
{
WaferCounter result;
string text = string.Empty;
Task<string> value = httpClient.GetStringAsync(nginxFileSystemSortable.Uri);
value.Wait();
string[] lines = value.Result.Split("\r\n");
if (lines.Length <= 1)
throw new Exception("Incomplete file length!");
string[] segments = nginxFileSystemSortable.Name.Split('-');
Record record = GetRecord(lines[0], lines[1]);
string equipmentId = segments.Length <= 1 ? nginxFileSystemSortable.Name : segments[1].Split('.')[0];
if (string.IsNullOrEmpty(record.SlotMap) || record.SlotMap.Length != 25)
throw new Exception("Wrong length for slot-map!");
if (record.Total != record.Check)
throw new Exception($"Invalid {record.Total} != {record.Check}");
result = new(nginxFileSystemSortable.DateTime, nginxFileSystemSortable.DateTime.ToString("yyyy-MM-dd hh:mm tt"), $"WC{waferSize}{equipmentId}", text, record.Total, record.SlotMap);
return result;
}
WaferCounter IWaferCounterRepository.GetLastQuantityAndSlotMap(string area, string waferSize)
{
WaferCounter result;
Uri waferSizeUri = GetWaferSizeUri(area, waferSize);
HttpClient httpClient = _HttpClientFactory.CreateClient();
string waferSizeDirectory = GetWaferSizeDirectory(area, waferSize, destination: false);
List<NginxFileSystemSortable> nginxFileSystemSortableCollection = GetNginxFileSystemSortableCollection(httpClient, waferSizeUri);
if (nginxFileSystemSortableCollection.Count < 1)
throw new Exception("No files!");
result = GetLastQuantityAndSlotMap(waferSize, httpClient, nginxFileSystemSortableCollection[0]);
for (int i = 0; i < nginxFileSystemSortableCollection.Count; i++)
MoveFile(waferSizeDirectory, nginxFileSystemSortableCollection[i]);
return result;
}
}

View File

@ -4,17 +4,24 @@ namespace OI.Metrology.Server.Services;
using OI.Metrology.Server.Models;
using OI.Metrology.Shared.DataModels;
using OI.Metrology.Shared.Models;
using OI.Metrology.Shared.Models.Stateless;
using OI.Metrology.Shared.Services;
using System.Text.Json;
public class AttachmentsService : IAttachmentsService
{
private readonly AppSettings _AppSettings;
private readonly IHttpClientFactory _HttpClientFactory;
private readonly IFileShareRepository _FileShareRepository;
private readonly IMetrologyRepository _MetrologyRepository;
public AttachmentsService(AppSettings appSettings, IMetrologyRepository metrologyRepository)
public AttachmentsService(AppSettings appSettings, IHttpClientFactory httpClientFactory, IFileShareRepository fileShareRepository, IMetrologyRepository metrologyRepository)
{
_AppSettings = appSettings;
_HttpClientFactory = httpClientFactory;
_FileShareRepository = fileShareRepository;
_MetrologyRepository = metrologyRepository;
}
@ -27,23 +34,16 @@ public class AttachmentsService : IAttachmentsService
throw new NullReferenceException(nameof(tableName));
DateTime insertDate = Convert.ToDateTime(_MetrologyRepository.GetAttachmentInsertDateByGUID(tableName, attachmentId));
string year = insertDate.Year.ToString();
HttpClient httpClient = _HttpClientFactory.CreateClient();
Uri mesaFileShareMetrologySi = new(_AppSettings.EcMesaFileShareMetrologySi);
int weekNum = CultureInfo.CurrentCulture.Calendar.GetWeekOfYear(insertDate, CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
string directory = Path.Combine(_AppSettings.AttachmentPath, tableName + "_", year, $"WW{weekNum:00}", attachmentId.ToString());
if (!Directory.Exists(directory))
_ = Directory.CreateDirectory(directory);
string fullPath = Path.Combine(directory, filename);
// Check to see if file exists in the "New" directory structure, if not change the path back to the old. and check there
if (!File.Exists(fullPath))
{
fullPath = Path.Combine(_AppSettings.AttachmentPath, tableName, attachmentId.ToString(), filename);
}
if (!File.Exists(fullPath))
throw new Exception("File not found");
return new FileStream(fullPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
Uri uri = _FileShareRepository.Append(mesaFileShareMetrologySi, $"{tableName}_", year, $"WW{weekNum:00}", attachmentId.ToString(), filename);
HttpResponseMessage httpResponseMessage = _FileShareRepository.ReadFile(httpClient, uri);
if (httpResponseMessage.StatusCode != System.Net.HttpStatusCode.OK)
throw new Exception("File not found!");
return httpResponseMessage.Content.ReadAsStream();
}
Stream IAttachmentsService.GetAttachmentStreamByTitle(ToolType toolType, bool header, string title, string filename)
@ -86,7 +86,6 @@ public class AttachmentsService : IAttachmentsService
Guid attachmentId = Guid.Empty;
DateTime insertDate = new();
string? tableName = "";
if (string.IsNullOrWhiteSpace(dataUniqueId))
{
attachmentId = _MetrologyRepository.GetHeaderAttachmentID(toolType.ID, headerId);
@ -101,18 +100,22 @@ public class AttachmentsService : IAttachmentsService
tableName = toolType.DataTableName;
}
if (Equals(attachmentId, Guid.Empty))
throw new Exception("Invalid attachment ID");
{
trans.Dispose();
throw new Exception("Invalid attachment ID!");
}
string year = insertDate.Year.ToString();
HttpClient httpClient = _HttpClientFactory.CreateClient();
Uri mesaFileShareMetrologySi = new(_AppSettings.EcMesaFileShareMetrologySi);
int weekNum = CultureInfo.CurrentCulture.Calendar.GetWeekOfYear(insertDate, CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
string directory = Path.Combine(_AppSettings.AttachmentPath, $"{tableName}_", year, $"WW{weekNum:00}", attachmentId.ToString());
if (!Directory.Exists(directory))
_ = Directory.CreateDirectory(directory);
string fullPath = Path.Combine(directory, filename);
using (FileStream fileStream = new(fullPath, FileMode.Create, FileAccess.ReadWrite, FileShare.None))
uploadedFile.CopyTo(fileStream);
Uri uri = _FileShareRepository.Append(mesaFileShareMetrologySi, $"{tableName}_", year, $"WW{weekNum:00}", attachmentId.ToString(), filename);
HttpResponseMessage httpResponseMessage = _FileShareRepository.ReadFile(httpClient, uri);
if (httpResponseMessage.StatusCode != System.Net.HttpStatusCode.OK)
{
trans.Dispose();
throw new Exception("Invalid attachment path!");
}
uploadedFile.CopyTo(httpResponseMessage.Content.ReadAsStream());
trans.Complete();
}
@ -122,27 +125,38 @@ public class AttachmentsService : IAttachmentsService
SaveAttachment(toolType, headerId, dataUniqueId, filename, formFile);
}
string? IAttachmentsService.GetProcessDataStandardFormat(IMetrologyRepository metrologyRepository, string attachmentPath, int toolTypeId, long headerId)
string? IAttachmentsService.GetProcessDataStandardFormat(IMetrologyRepository metrologyRepository, int toolTypeId, long headerId)
{
string? result;
string year;
int weekNum;
string directory;
string checkDirectory;
string year;
Task<string> json;
Uri weekDirectory;
Uri checkDirectory;
List<string> files = new();
NginxFileSystem[]? nginxFileSystemCollection;
Task<HttpResponseMessage> httpResponseMessage;
HttpClient httpClient = _HttpClientFactory.CreateClient();
Uri mesaFileShareMetrologySi = new(_AppSettings.EcMesaFileShareMetrologySi);
DateTime[] dateTimes = new DateTime[] { DateTime.Now, DateTime.Now.AddDays(-6.66) };
ToolType toolType = metrologyRepository.GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
foreach (DateTime dateTime in dateTimes)
{
year = dateTime.Year.ToString();
weekNum = CultureInfo.CurrentCulture.Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
directory = Path.Combine(_AppSettings.AttachmentPath, $"{toolType.HeaderTableName}_", year, $"WW{weekNum:00}");
if (!Directory.Exists(directory))
_ = Directory.CreateDirectory(directory);
checkDirectory = Path.Combine(directory, headerId.ToString());
if (!Directory.Exists(checkDirectory))
weekDirectory = _FileShareRepository.Append(mesaFileShareMetrologySi, $"{toolType.HeaderTableName}_", year, $"WW{weekNum:00}");
checkDirectory = _FileShareRepository.Append(weekDirectory, headerId.ToString());
httpResponseMessage = httpClient.GetAsync(checkDirectory);
httpResponseMessage.Wait();
if (httpResponseMessage.Result.StatusCode != System.Net.HttpStatusCode.OK)
continue;
files.AddRange(Directory.GetFiles(checkDirectory));
json = httpResponseMessage.Result.Content.ReadAsStringAsync();
json.Wait();
nginxFileSystemCollection = JsonSerializer.Deserialize(json.Result, NginxFileSystemCollectionSourceGenerationContext.Default.NginxFileSystemArray);
if (nginxFileSystemCollection is null)
continue;
foreach (NginxFileSystem nginxFileSystem in nginxFileSystemCollection)
files.Add(_FileShareRepository.Append(checkDirectory, nginxFileSystem.Name).AbsoluteUri);
if (files.Count != 0)
break;
}

View File

@ -13,7 +13,7 @@ public class SQLDbConnectionFactory : IDbConnectionFactory
public SQLDbConnectionFactory(AppSettings appSettings) => _AppSettings = appSettings;
public DbConnection GetDbConnection(bool? useOI2Sql)
public DbConnection GetDbConnection(bool? useIqsConnection)
{
DbProviderFactories.RegisterFactory(
typeof(SqlConnection).Namespace,
@ -22,11 +22,8 @@ public class SQLDbConnectionFactory : IDbConnectionFactory
if (string.IsNullOrEmpty(_AppSettings.ConnectionString))
throw new Exception("Connection string is missing");
if (string.IsNullOrEmpty(_AppSettings.OI2SqlConnectionString))
throw new Exception("Connection string is missing");
DbConnection dbConnection = SqlClientFactory.Instance.CreateConnection();
dbConnection.ConnectionString = useOI2Sql is not null && useOI2Sql.Value ? _AppSettings.OI2SqlConnectionString : _AppSettings.ConnectionString;
dbConnection.ConnectionString = useIqsConnection is null || !useIqsConnection.Value ? _AppSettings.ConnectionString : throw new Exception();
dbConnection.Open();
return dbConnection;
}

View File

@ -98,8 +98,7 @@ public class SpreadingResistanceProfileService : ISpreadingResistanceProfileServ
private static ReadOnlyCollection<string> GetRectanglesDescriptions(Info info, Setup setup, List<Layer> layers)
{
List<string> results = new()
{
List<string> results = new() {
string.Empty, // 0
string.Empty, // 1
string.Empty, // 2

View File

@ -12,7 +12,7 @@
<link href="~/igniteui/css/themes/bootstrap3/default/infragistics.theme.css" rel="stylesheet"
asp-append-version="true" />
<link href="~/igniteui/css/structure/infragistics.css" rel="stylesheet" asp-append-version="true" />
<link href="~/styles/site.css" rel="stylesheet" asp-append-version="true" />
<link href="~/styles/site-server.css" rel="stylesheet" asp-append-version="true" />
<script src="~/js/jquery-3.6.0.min.js" type="text/javascript" asp-append-version="true"></script>
<script src="~/js/jquery-ui.min.js" type="text/javascript" asp-append-version="true"></script>
@ -23,7 +23,7 @@
<script src="~/js/chart-4.3.0.min.js" type="module"></script>
<script src="~/js/common.js" type="text/javascript" asp-append-version="true"></script>
<script src="~/js/site.js" type="text/javascript" asp-append-version="true"></script>
<script src="~/js/site-server.js" type="text/javascript" asp-append-version="true"></script>
<script>
$(document).ready(function () {
if (location.pathname == "/") {

View File

@ -0,0 +1,106 @@
var _count = -1;
var _apiUrl = null;
function getUrlParameter(param) {
var pageURL = window.location.search.substring(1),
urlVariables = pageURL.split('&'),
parameterName,
i;
for (i = 0; i < urlVariables.length; i++) {
parameterName = urlVariables[i].split('=');
if (parameterName[0] === param) {
return parameterName[1] === undefined ? true : decodeURIComponent(parameterName[1]);
}
}
return false;
}
function setSlots(slotMap) {
var slots = slotMap.split("");
if (slots.length !== 25)
throw Error;
$('.slot').each(function (index) {
if (slots[index] === '0')
$(this).addClass('waferSlotEmpty').removeClass('waferSlotPresent');
else if (slots[index] === '1')
$(this).addClass('waferSlotPresent').removeClass('waferSlotEmpty');
else
throw Error;
});
}
function setValues(data) {
if (!data)
clearMap();
else {
$('#waferCount').val(data.total);
setSlots(data.slotMap);
$('#lastDateTime').text(new Date().toLocaleString());
}
}
function clearText() {
$("#lot").val('');
$("#lot").show();
$("#lot").focus();
}
function clearMap() {
setSlots('0000000000000000000000000');
}
function poll() {
if (_count >= _stop) {
_count = -1;
$("#Connect").show();
$('#lastDateTime').hide();
}
else if (_count > -1) {
_count++;
$.get(_apiUrl + $("#toolId").val() + '/last-quantity-and-slot-map/?area=' + $("#operation").val(), function (data) {
setValues(data);
}).fail(function () {
ShowErrorMessage("Error");
});
}
}
function save() {
$.get(_apiUrl + $("#toolId").val() + '/last-quantity-and-slot-map-with-text/?area=' + $("#operation").val() + '&text=' + $("#lot").val(), function (data) {
setValues(data);
}).fail(function () {
ShowErrorMessage("Error");
});
}
function initWaferCounter(apiUrl) {
_apiUrl = apiUrl;
$("#Save").click(function () {
save();
});
$("#Clear").click(function () {
clearText();
clearMap();
});
$("#Connect").click(function () {
$("#Connect").hide();
$('#lastDateTime').show();
_count = 0;
clearMap();
});
// http://localhost:5051/wafer-counter.html?interval=1000&stop=3&toolId=8INCH&operation=EPP-East&a=1
$('#waferCount').val('0');
$('#lastDateTime').hide();
var stop = getUrlParameter('stop');
_stop = !stop ? 10 : parseInt(stop);
var interval = getUrlParameter('interval');
$("#toolId").val(getUrlParameter('toolId'));
$("#operation").val(getUrlParameter('operation'));
setInterval(function () {
poll();
}, !interval ? 10000 : parseInt(interval));
clearText();
clearMap();
}

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2018
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,413 @@
# Infineon Design System Stencil Web Components (MVP)
[![GitHub Repo Issues](https://img.shields.io/github/issues/Infineon/infineon-design-system-stencil?style=plastic)](https://github.com/Infineon/infineon-design-system-stencil/issues)
[![GitHub Pull Requests](https://img.shields.io/github/issues-pr-raw/Infineon/infineon-design-system-stencil?style=plastic)](https://github.com/Infineon/infineon-design-system-stencil/pulls)
[![GitHub Repo Version](https://img.shields.io/github/package-json/v/Infineon/infineon-design-system-stencil?style=plastic)](https://github.com/Infineon/infineon-design-system-stencil/blob/master/package.json)
[![GitHub Master Branch Weekly Commits](https://img.shields.io/github/commit-activity/w/Infineon/infineon-design-system-stencil/master?style=plastic)](https://github.com/Infineon/infineon-design-system-stencil/tree/master)
[![GitHub Repo Contributors](https://img.shields.io/github/contributors/Infineon/infineon-design-system-stencil?style=plastic)](https://github.com/Infineon/infineon-design-system-stencil/graphs/contributors)
[![GitHub Repo Discussions](https://img.shields.io/github/discussions/Infineon/infineon-design-system-stencil)](https://github.com/Infineon/infineon-design-system-stencil/)
<!-- TABLE OF CONTENTS -->
<details id="tableContent">
<summary>Table of Contents</summary>
<ol>
<li>
<a href="#about-the-project">About The Project</a>
<ul>
<li><a href="#built-with">Built With</a></li>
<li><a href="#examples">Example applications demonstrating the usage of the IFX web components</a></li>
</ul>
</li>
<li><a href="#project-structure">Project structure</a></li>
<li>
<a href="#getting-started">Getting Started</a>
<ul>
<li><a href="#prerequisites">Prerequisites</a></li>
<li><a href="#installation">Installation</a><li>
<ul>
<li><a href="#angular">Angular</a></li>
<li><a href="#react/vue">React/Vue</a></li>
<li><a href="#vanilla">Vanilla</a></li>
</ul>
</ul>
</li>
<li><a href="#usage-of-components">Usage</a></li>
<li><a href="#local-development">Local development</a></li>
<li><a href="#contributing">Contributing</a></li>
<li><a href="#contact">Contact</a></li>
</ol>
</details>
<!-- ABOUT THE PROJECT -->
## About The Project
As part of the Infineon brand guidelines, the Infineon Digital Design System supports designers, developers and project managers to build user interfaces faster and better with the ultimate goal to create a coherent and optimal user journey across all internal and external Infineon digital touchpoints.
This repository contains an implementation of Infineons Digital Design System and it's Storybook sourcecode using Stencil web components.
Use it to build & run storybook and distribute the Stencil web components.
### Built With
[Stencil web components][Stencil-url]
### Example applications demonstrating the usage of IFX Web Components
- [Angular][Angular-example]
- [React + Javascript][React-example]
- [Vanilla][Vanilla-example]
- [Vue + Javascript][Vue-example]
<p align="right"><a href="#tableContent">back to top</a></p>
## Project structure
### Overall structure
The repository has a monorepo architecture using Lerna. It contains not only our Stencil Web Components, but also framework integrations for Vue and React as well as example applications demonstrating component usage (not included in the Lerna workspaces)
### Wrapper components
Stencil Web Components can be used with any JavaScript framework or with no framework at all, just like any other HTML elements. This is because they are built on Web APIs that are native to the browser. They are self-contained and encapsulate their functionality in a way that makes them portable and easy to drop into any project.
To bridge the gap between Stencil components and specific frameworks, it can be useful to create wrapper components
A Stencil Wrapper Component is a component that wraps around a Stencil Web Component and translates the properties, events, and methods to work seamlessly within the specific framework context.
Our Wrapper Components are built automatically every time ```npm run stencil:build``` is executed.
<p align="right"><a href="#tableContent">back to top</a></p>
<br>
---
<!-- GETTING STARTED -->
## Getting Started
### Prerequisites
- [Node](https://nodejs.org/en/) > v16 .
- [Yarn](https://classic.yarnpkg.com/en/) > v1.22.10, or [Npm](https://www.npmjs.com/) > v8.
### Installation of the component libraray
---
#### Angular
**1.**
- **with NPM**
```npm install --save @infineon/infineon-design-system-stencil```
- **with Yarn**
```yarn add @infineon/infineon-design-system-stencil```
**2. Installation of SASS**
```bash
npm install sass
```
**3. Import the module inside your entry point file**
```bash
#main.ts
import { defineCustomElements } from "@infineon/infineon-design-system-stencil/loader";
defineCustomElements(window);
```
**4. Additional steps only for Angular**
Inside <b>app.modules.ts</b> file:
```bash
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
@NgModule({
...
schemas: [
CUSTOM_ELEMENTS_SCHEMA
],
...
})
```
<p align="right"><a href="#tableContent">back to top</a></p>
<br>
---
#### React
React Wrappers: Similarly to Vue, a React wrapper provides a React interface to a Stencil web component, making the web component feel more like a typical React component. This includes proper handling of props, state, and events within the context of a React application.
**1. Installation**
**- with NPM**
```npm install @infineon/infineon-design-system-react```
**- with Yarn**
```yarn add @infineon/infineon-design-system-react```
**2. Installation of SASS**
```bash
npm install sass
```
**3. Import the module inside your entry point file**
```js
import { defineCustomElements } from '@infineon/infineon-design-system-react';
//...
defineCustomElements(window)
```
In React, there isn't a built-in mechanism to globally register components like in Vue. Therefore, components need to be imported in the file that they are being used in.
**4. Usage**
```js
import { IfxProgressBar, IfxSearchBar, IfxButton } from '@infineon/infineon-design-system-react';
//...
<IfxSearchBar onIfxChange={handleSearch} show-close-button="true"></IfxSearchBar>
```
**React + Javascript specific**
It may be necessary to add the following to your .env file at project root:
``GENERATE_SOURCEMAP=false``
This can also be achieved by updating your start script in the ``package.json`` accordingly.
<p align="right"><a href="#tableContent">back to top</a></p>
<br>
---
#### Vanilla
Include the following script tag in your index.html
```bash
<script type="module" src="https://cdn.jsdelivr.net/npm/@infineon/infineon-design-system-stencil/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js"></script>'
```
<p align="right"><a href="#tableContent">back to top</a></p>
<br>
---
#### Vue
**1. Installation**
**- with NPM**
```npm install @infineon/infineon-design-system-vue```
**- with Yarn**
```yarn add @infineon/infineon-design-system-vue```
**2. Installation of SASS**
```bash
npm install sass
```
**3. Import the module inside your entry point file**
```js
//main.js/main.ts
import { ComponentLibrary } from '@infineon/infineon-design-system-vue';
//...
createApp(App).use(ComponentLibrary).mount('#app');
```
In Vue, this registers the components globally.
**4. Usage**
```js
<ifx-progress-bar v-model="progress" size="m" show-label="true"></ifx-progress-bar>
```
<p align="right"><a href="#tableContent">back to top</a></p>
<br>
---
## General usage of IFX web components
Explore our currently available web components in Storybook. You will also find the code snippets needed to include them in your application.
https://infineon.github.io/infineon-design-system-stencil
<br>
---
## Using only the Icons
For the case in which you only want to use our icons, please follow these steps:
1. install the package by following the instructions for the respective framework
2. Import only the ifx-icon component inside your entry point file as explained below;
For React: <b>index.js/index.ts</b> <br />
For Vue: <b>main.js/main.ts</b> <br />
For Angular: <b>main.ts</b>
```bash
import { defineCustomElement as defineCustomElementIfxIcon } from "@infineon/infineon-design-system-stencil/dist/components/ifx-icon";
defineCustomElementIfxIcon(window);
```
<p align="right"><a href="#tableContent">back to top</a></p>
<br>
---
## Local development
### Installation
```bash
git clone https://github.com/Infineon/infineon-design-system-stencil.git
```
Install all the modules and dependencies listed on the ```package.json``` file with:
```bash
yarn/npm install
```
<p align="right"><a href="#tableContent">back to top</a></p>
<br>
---
### Build Storybook
To run Storybook to view and test our Stencil Web Components, we first need to export it as a static web app.
For building the application for the first time (to load fonts, assets and stylesheets) run:
```bash
yarn/npm run build:components
```
### Start Storybook
To run storybook locally (automatically rebuilds on changes), run:
```bash
yarn/npm run storybook
```
<p align="right"><a href="#tableContent">back to top</a></p>
<br>
---
### Example applications
To test the standard Stencil components within our example applicatons, navigate to
```bash
cd examples/stencil-components
```
and go to the folder for Vue, React, Angular or VanillaJs. Follow the instructions described in the ```readme.md``` in each of these folders.
To test the Wrapper components within React or Vue applicatons, navigate to
```bash
cd examples/wrapper-components
```
and go to the application folder you want to use for testing. (React-Ts, React-Js, Vue-Ts, Vue-Js). Again, follow the instructions described in the ```readme.md``` in each of these folders.
<p align="right"><a href="#tableContent">back to top</a></p>
<br>
---
### Contributing
+ Clone the repository
+ Create an issue with a proper description (Naming convention: 'name-of-component: feature/bug')
+ Create a pull request with a proper description
+ Request a review (tishoyanchev || verena-ifx)
<p align="right"><a href="#tableContent">back to top</a></p>
<br>
## Contact
### Email
dds@infineon.com <br />
<p align="right"><a href="#tableContent">back to top</a></p>
<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
[contributors-shield]: https://img.shields.io/github/contributors/othneildrew/Best-README-Template.svg?style=for-the-badge
[contributors-url]: https://github.com/othneildrew/Best-README-Template/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/othneildrew/Best-README-Template.svg?style=for-the-badge
[forks-url]: https://github.com/othneildrew/Best-README-Template/network/members
[stars-shield]: https://img.shields.io/github/stars/othneildrew/Best-README-Template.svg?style=for-the-badge
[stars-url]: https://github.com/othneildrew/Best-README-Template/stargazers
[issues-shield]: https://img.shields.io/github/issues/othneildrew/Best-README-Template.svg?style=for-the-badge
[issues-url]: https://github.com/othneildrew/Best-README-Template/issues
[license-shield]: https://img.shields.io/github/license/othneildrew/Best-README-Template.svg?style=for-the-badge
[license-url]: https://github.com/othneildrew/Best-README-Template/blob/master/LICENSE.txt
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
[linkedin-url]: https://linkedin.com/in/othneildrew
[product-screenshot]: images/screenshot.png
[Next.js]: https://img.shields.io/badge/next.js-000000?style=for-the-badge&logo=nextdotjs&logoColor=white
[Next-url]: https://nextjs.org/
[React.js]: https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB
[React-url]: https://reactjs.org/
[Vue.js]: https://img.shields.io/badge/Vue.js-35495E?style=for-the-badge&logo=vuedotjs&logoColor=4FC08D
[Vue-url]: https://vuejs.org/
[Angular.io]: https://img.shields.io/badge/Angular-DD0031?style=for-the-badge&logo=angular&logoColor=white
[Angular-url]: https://angular.io/
[Svelte.dev]: https://img.shields.io/badge/Svelte-4A4A55?style=for-the-badge&logo=svelte&logoColor=FF3E00
[Svelte-url]: https://svelte.dev/
[Laravel.com]: https://img.shields.io/badge/Laravel-FF2D20?style=for-the-badge&logo=laravel&logoColor=white
[Laravel-url]: https://laravel.com
[Bootstrap.com]: https://img.shields.io/badge/Bootstrap-563D7C?style=for-the-badge&logo=bootstrap&logoColor=white
[Bootstrap-url]: https://getbootstrap.com
[JQuery.com]: https://img.shields.io/badge/jQuery-0769AD?style=for-the-badge&logo=jquery&logoColor=white
[JQuery-url]: https://jquery.com
[Stencil-url]: https://stenciljs.com/
[Vue-example]: https://infineon.github.io/infineon-design-system-stencil/vue-example
[React-example]: https://infineon.github.io/infineon-design-system-stencil/react-example
[Angular-example]: https://infineon.github.io/infineon-design-system-stencil/angular-example
[Vanilla-example]: https://infineon.github.io/infineon-design-system-stencil/vanilla-example

View File

@ -0,0 +1,24 @@
'use strict';
function getDefaultExportFromCjs (x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
}
function createCommonjsModule(fn, basedir, module) {
return module = {
path: basedir,
exports: {},
require: function (path, base) {
return commonjsRequire();
}
}, fn(module, module.exports), module.exports;
}
function commonjsRequire () {
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
}
exports.createCommonjsModule = createCommonjsModule;
exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
//# sourceMappingURL=_commonjsHelpers-4213291f.js.map

View File

@ -0,0 +1 @@
{"file":"_commonjsHelpers-4213291f.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,110 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca0e0765.js');
const accordionCss = ":root{--ifx-font-family:\"Source Sans 3\";font-family:var(--ifx-font-family, sans-serif)}:host{display:block}.accordion-wrapper{display:flex;flex-direction:column;gap:8px;font-family:var(--ifx-font-family)}";
const Accordion = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.autoCollapse = false;
}
async onItemOpen(event) {
if (this.autoCollapse) {
const items = Array.from(this.el.querySelectorAll('ifx-accordion-item'));
for (const item of items) {
const itemElement = item;
if (itemElement !== event.target && (await itemElement.open)) {
itemElement.open = false;
}
}
}
}
render() {
return (index.h("div", { class: "accordion-wrapper" }, index.h("slot", null)));
}
get el() { return index.getElement(this); }
};
Accordion.style = accordionCss;
const accordionItemCss = ":root{--ifx-font-family:\"Source Sans 3\";font-family:var(--ifx-font-family, sans-serif)}.accordion-item{border-radius:3px;overflow:hidden;transition:all 0.3s;font-family:var(--ifx-font-family)}.accordion-title:hover{border:1px solid #EEEDED;color:#08665C}.accordion-title{display:flex;align-items:center;padding:12px 16px;gap:12px;color:#0A8276;background-color:#FFFFFF;border:1px solid #EEEDED;cursor:pointer}.accordion-caption{font-weight:600;font-size:1.125rem}.accordion-content{gap:8px;max-height:0;overflow:hidden;transition:max-height 0.3s ease-in-out;line-height:24px;font-size:1rem;font-weight:400}.inner-content{background-color:#FFFFFF;padding:24px;word-wrap:break-word;overflow-wrap:anywhere;align-self:stretch;}.accordion-icon{font-weight:bold;display:inline-block;transition:transform 0.3s}.accordion-icon:hover{color:#08665C}.accordion-item.open .accordion-icon{transform:rotate(-180deg)}";
const IfxAccordionItem = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.ifxItemOpen = index.createEvent(this, "ifxItemOpen", 7);
this.ifxItemClose = index.createEvent(this, "ifxItemClose", 7);
this.caption = undefined;
this.open = false;
this.initialCollapse = true;
this.internalOpen = false;
}
componentWillLoad() {
this.internalOpen = this.open;
if (!this.initialCollapse) {
this.internalOpen = true;
}
}
componentDidLoad() {
this.openAccordionItem();
}
componentDidUpdate() {
this.openAccordionItem();
}
openChanged(newValue) {
this.internalOpen = newValue;
}
toggleOpen() {
this.internalOpen = !this.internalOpen;
this.open = this.internalOpen;
if (this.internalOpen) {
this.ifxItemOpen.emit({ isOpen: this.internalOpen });
}
else {
this.ifxItemClose.emit({ isClosed: !this.internalOpen });
}
}
openAccordionItem() {
if (this.internalOpen) {
this.contentEl.style.maxHeight = `${this.contentEl.scrollHeight}px`;
}
else {
this.contentEl.style.maxHeight = '0';
}
}
handleSlotChange(e) {
const slotElement = e.target;
const nodes = slotElement.assignedNodes();
if (nodes.length > 0) {
nodes.forEach(node => {
const observer = new MutationObserver((mutationsList, _) => {
for (let mutation of mutationsList) {
if (mutation.type === 'childList') {
if (this.internalOpen) {
this.openAccordionItem();
}
}
}
});
observer.observe(node, { attributes: true, childList: true, subtree: true });
});
}
if (this.internalOpen) {
this.openAccordionItem();
}
}
render() {
return (index.h("div", { "aria-label": this.caption, class: `accordion-item ${this.internalOpen ? 'open' : ''}` }, index.h("div", { class: "accordion-title", onClick: () => this.toggleOpen() }, index.h("span", { class: "accordion-icon" }, index.h("ifx-icon", { icon: "chevron-down-12" })), index.h("span", { class: "accordion-caption" }, this.caption)), index.h("div", { class: "accordion-content", ref: (el) => (this.contentEl = el) }, index.h("div", { class: "inner-content" }, index.h("slot", { onSlotchange: (e) => this.handleSlotChange(e) })))));
}
static get watchers() { return {
"open": ["openChanged"]
}; }
};
IfxAccordionItem.style = accordionItemCss;
exports.ifx_accordion = Accordion;
exports.ifx_accordion_item = IfxAccordionItem;
//# sourceMappingURL=ifx-accordion_2.cjs.entry.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,30 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca0e0765.js');
const alertCss = ":root{--ifx-font-family:\"Source Sans 3\";font-family:var(--ifx-font-family, sans-serif)}:host{display:block}.alert__info-wrapper{display:flex;padding:16px 24px;font-family:var(--ifx-font-family)}.alert__info-wrapper .info__text-wrapper{display:flex;flex-direction:column;gap:8px;width:100%}.alert__info-wrapper .info__text-wrapper .info__headline-wrapper{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.alert__info-wrapper .info__text-wrapper .info__headline-wrapper,.alert__info-wrapper .info__text-wrapper .info__description-wrapper{color:#1D1D1D;font-size:16px;font-style:normal;font-weight:600;line-height:24px}.alert__info-wrapper .info__text-wrapper .info__headline-wrapper ::slotted(p),.alert__info-wrapper .info__text-wrapper .info__description-wrapper ::slotted(p){padding:0;margin:0}.alert__info-wrapper .info__text-wrapper .info__description-wrapper{font-weight:400}.alert__info-wrapper .close-icon-wrapper{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start}.alert__info-wrapper .close-icon-wrapper a{line-height:0;color:#1D1D1D}.alert{display:flex;border:1px solid #0A8276;border-radius:1px;color:#1D1D1D;background-color:#FFFFFF;font-family:var(--ifx-font-family)}.alert .close-icon-wrapper{display:flex;align-items:center;justify-content:center;min-width:40px}.alert .close-icon-wrapper a{line-height:0;color:#1D1D1D}.alert .icon-wrapper{position:relative;min-width:48px;display:flex;justify-content:center;align-items:center;background-color:#0A8276}.alert .alert-text{font-size:16px;width:100%;padding:12px 0px 12px 12px;color:#1D1D1D;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;}.alert.primary{border:1px solid #0A8276}.alert.primary .icon-wrapper{background-color:#0A8276;color:#FFFFFF}.alert.secondary{border:1px solid #9C216E}.alert.secondary .icon-wrapper{background-color:#9C216E;color:#FFFFFF}.alert.danger{border:1px solid #CD002F}.alert.danger .icon-wrapper{background-color:#CD002F;color:#FFFFFF}.alert.warning{border:1px solid #E16B25}.alert.warning .icon-wrapper{background-color:#E16B25;color:#FFFFFF}.close-icon-wrapper ifx-icon:hover{cursor:pointer}";
const Alert = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.ifxClose = index.createEvent(this, "ifxClose", 7);
this.variant = 'primary';
this.icon = undefined;
this.closable = true;
}
handleClose() {
this.ifxClose.emit();
}
render() {
return (this.variant === 'info'
? index.h("div", { class: 'alert__info-wrapper' }, index.h("div", { class: 'info__text-wrapper' }, index.h("div", { class: "info__headline-wrapper" }, index.h("slot", { name: 'headline' })), index.h("div", { class: "info__description-wrapper" }, index.h("slot", { name: 'desc' }))), this.closable && index.h("div", { class: "close-icon-wrapper" }, index.h("a", { href: undefined, onClick: this.handleClose.bind(this) }, index.h("ifx-icon", { icon: 'cross-16' }))))
: index.h("div", { class: `alert ${this.variant}` }, this.icon && (index.h("div", { class: 'icon-wrapper' }, index.h("ifx-icon", { icon: this.icon }))), index.h("div", { class: "alert-text" }, index.h("slot", null)), this.closable && index.h("div", { class: "close-icon-wrapper" }, index.h("a", { href: undefined, onClick: this.handleClose.bind(this) }, index.h("ifx-icon", { icon: 'cross-16' })))));
}
};
Alert.style = alertCss;
exports.ifx_alert = Alert;
//# sourceMappingURL=ifx-alert.cjs.entry.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,21 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca0e0765.js');
const badgeCss = ":root{--ifx-font-family:\"Source Sans 3\";font-family:var(--ifx-font-family, sans-serif)}:host{display:inline-flex}.badge__container{display:inline-flex;justify-content:center;align-items:center;padding:4px 8px;gap:8px;border:1px solid #EEEDED;background-color:#EEEDED;border-radius:100px;font-family:var(--ifx-font-family);font-size:0.875rem;line-height:1.25rem;font-weight:400;color:#1D1D1D}";
const Badge = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
}
render() {
return (index.h("div", { class: "badge__container" }, index.h("slot", null)));
}
};
Badge.style = badgeCss;
exports.ifx_badge = Badge;
//# sourceMappingURL=ifx-badge.cjs.entry.js.map

View File

@ -0,0 +1 @@
{"file":"ifx-badge.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,QAAQ,GAAG,2YAA2Y;;MCO/Y,KAAK;;;;EAEhB,MAAM;IACJ,QACEA,iBAAK,KAAK,EAAC,kBAAkB,IAC3BA,qBAAQ,CACJ,EACN;GACH;;;;;;","names":["h"],"sources":["src/components/badge/badge.scss?tag=ifx-badge&encapsulation=shadow","src/components/badge/badge.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n:host {\n display: inline-flex;\n}\n\n.badge__container {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n padding: 4px 8px;\n gap: tokens.$ifxSpace100;\n border: 1px solid tokens.$ifxColorEngineering200;\n background-color: tokens.$ifxColorEngineering200;\n border-radius: 100px;\n font-family: var(--ifx-font-family);\n font-size: tokens.$ifxFontSizeS;\n line-height: tokens.$ifxLineHeightS;\n font-weight: 400;\n color: tokens.$ifxColorBaseBlack;\n}","import { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'ifx-badge',\n styleUrl: 'badge.scss',\n shadow: true\n})\nexport class Badge {\n\n render() {\n return (\n <div class=\"badge__container\">\n <slot />\n </div>\n );\n }\n}"],"version":3}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,31 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca0e0765.js');
const breadcrumbItemLabelCss = ":root{--ifx-font-family:\"Source Sans 3\";font-family:var(--ifx-font-family, sans-serif)}.breadcrumb-item-label-container{display:flex;align-items:center;gap:8px;text-decoration:none;color:#1D1D1D}.breadcrumb-item-label-container.margin{margin-left:16px}.breadcrumb-item-label-container ifx-icon:empty{display:none}.breadcrumb-item-label-container .label-icon-wrapper{display:inline-flex}.breadcrumb-item-label-container .menu-icon-wrapper{display:flex;justify-content:center;align-items:center;width:16px;height:16px}.breadcrumb-item-label-container .menu-icon-wrapper.hide{display:none}.breadcrumb-item-label-container .menu-icon-wrapper ifx-icon{transition:0.3s}.breadcrumb-item-label-container .menu-icon-wrapper.show ifx-icon{transition:0.3s;transform:rotate(180deg)}";
const BreadcrumbItemLabel = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.breadcrumbMenuIconWrapper = index.createEvent(this, "breadcrumbMenuIconWrapper", 7);
this.icon = undefined;
this.url = undefined;
this.target = "_self";
}
componentDidLoad() {
const container = this.el.shadowRoot.querySelector('.breadcrumb-item-label-container');
const menuWrapper = container.querySelector('.menu-icon-wrapper');
this.breadcrumbMenuIconWrapper.emit(menuWrapper);
}
render() {
return (index.h("a", { href: this.url, target: this.target, class: "breadcrumb-item-label-container" }, index.h("ifx-icon", { icon: this.icon }), index.h("span", { class: "label-wrapper" }, index.h("slot", null)), index.h("span", { class: "menu-icon-wrapper" }, index.h("ifx-icon", { icon: "chevron-down-12" }))));
}
get el() { return index.getElement(this); }
};
BreadcrumbItemLabel.style = breadcrumbItemLabelCss;
exports.ifx_breadcrumb_item_label = BreadcrumbItemLabel;
//# sourceMappingURL=ifx-breadcrumb-item-label.cjs.entry.js.map

View File

@ -0,0 +1 @@
{"file":"ifx-breadcrumb-item-label.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,sBAAsB,GAAG,swBAAswB;;MCOxxB,mBAAmB;;;;;;kBAGL,OAAO;;EAIhC,gBAAgB;IACd,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,kCAAkC,CAAC,CAAA;IACtF,MAAM,WAAW,GAAG,SAAS,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAA;IACjE,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;GACjD;EAED,MAAM;IACJ,QACEA,eAAG,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAC,iCAAiC,IAC7EA,sBAAU,IAAI,EAAE,IAAI,CAAC,IAAI,GAAa,EACtCA,kBAAM,KAAK,EAAC,eAAe,IACzBA,qBAAQ,CACH,EACRA,kBAAM,KAAK,EAAC,mBAAmB,IAC9BA,sBAAU,IAAI,EAAC,iBAAiB,GAAY,CACtC,CACJ,EACJ;GACH;;;;;;;","names":["h"],"sources":["src/components/breadcrumb/breadcrumb-item-label.scss?tag=ifx-breadcrumb-item-label&encapsulation=shadow","src/components/breadcrumb/breadcrumb-item-label.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n.breadcrumb-item-label-container {\n display: flex;\n align-items: center;\n gap: tokens.$ifxSpace100;\n text-decoration: none;\n color: tokens.$ifxColorBaseBlack;\n\n &.margin {\n margin-left: 16px;\n }\n\n & ifx-icon:empty {\n display: none;\n }\n\n & .label-icon-wrapper {\n display: inline-flex;\n }\n\n & .menu-icon-wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n width: tokens.$ifxSize200;\n height: tokens.$ifxSize200;\n\n &.hide {\n display: none;\n }\n\n & ifx-icon {\n transition: .3s;\n }\n\n &.show {\n & ifx-icon {\n transition: .3s;\n transform: rotate(180deg);\n }\n }\n }\n}","import { Component, h, Prop, Element, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'ifx-breadcrumb-item-label',\n styleUrl: 'breadcrumb-item-label.scss',\n shadow: true,\n})\nexport class BreadcrumbItemLabel {\n @Prop() icon: string;\n @Prop() url: string;\n @Prop() target: string = \"_self\"\n @Element() el;\n @Event() breadcrumbMenuIconWrapper: EventEmitter<CustomEvent>;\n\n componentDidLoad() { \n const container = this.el.shadowRoot.querySelector('.breadcrumb-item-label-container')\n const menuWrapper = container.querySelector('.menu-icon-wrapper')\n this.breadcrumbMenuIconWrapper.emit(menuWrapper)\n }\n\n render() {\n return (\n <a href={this.url} target={this.target} class=\"breadcrumb-item-label-container\">\n <ifx-icon icon={this.icon}></ifx-icon>\n <span class=\"label-wrapper\">\n <slot />\n </span>\n <span class=\"menu-icon-wrapper\">\n <ifx-icon icon=\"chevron-down-12\"></ifx-icon>\n </span>\n </a>\n );\n }\n}\n"],"version":3}

View File

@ -0,0 +1,78 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca0e0765.js');
const breadcrumbItemCss = ":root{--ifx-font-family:\"Source Sans 3\";font-family:var(--ifx-font-family, sans-serif)}.breadcrumb-parent{display:flex;flex-direction:row;align-items:center;padding:0px;gap:12px}.breadcrumb-parent:hover{cursor:pointer}.breadcrumb-parent .breadcrumb-wrapper{display:flex;flex-direction:row;align-items:center;padding:0px;gap:8px;position:relative}.breadcrumb-parent .breadcrumb-wrapper .dropdown-menu{display:none;position:absolute;top:20px}.breadcrumb-parent .breadcrumb-wrapper .dropdown-menu.open{display:block}.breadcrumb-parent .breadcrumb-wrapper a{text-decoration:none;color:#1D1D1D;font-family:var(--ifx-font-family);font-style:normal;font-weight:400;font-size:0.875rem;line-height:1.25rem;display:flex;align-items:center;color:#1D1D1D;flex-direction:column;justify-content:center;padding:0px;border-bottom:1px solid #1D1D1D}.breadcrumb-parent .breadcrumb-divider{width:10px;height:16px;color:#EEEDED;line-height:13px;font-size:1.25rem;margin-right:12px}";
const BreadcrumbItem = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.isLastItem = false;
}
handleOutsideClick(event) {
const path = event.composedPath();
if (!path.includes(this.el)) {
this.closeDropdownMenu();
}
}
getDropdownMenu() {
const dropdownMenu = this.el.shadowRoot.querySelector('.dropdown-menu');
return dropdownMenu;
}
menuWrapperEventReEmitter(event) {
this.emittedElement = event.detail;
}
getMenuIconWrapper() {
return this.emittedElement;
}
handleClassList(el, type, className) {
el.classList[type](className);
}
closeDropdownMenu() {
const dropdownMenu = this.getDropdownMenu();
const menuWrapper = this.getMenuIconWrapper();
this.handleClassList(dropdownMenu, 'remove', 'open');
this.handleClassList(menuWrapper, 'remove', 'show');
}
toggleDropdownMenu() {
const dropdownMenu = this.getDropdownMenu();
const menuWrapper = this.getMenuIconWrapper();
this.handleClassList(dropdownMenu, 'toggle', 'open');
this.handleClassList(menuWrapper, 'toggle', 'show');
}
handleLastItem() {
const breadcrumbItems = this.el.closest('ifx-breadcrumb').querySelectorAll('ifx-breadcrumb-item');
if (this.el === breadcrumbItems[breadcrumbItems.length - 1]) {
this.isLastItem = true;
}
else
this.isLastItem = false;
}
componentWillLoad() {
this.handleLastItem();
}
componentDidUpdate() {
this.handleLastItem();
}
componentDidLoad() {
const dropdownMenu = this.el.querySelector('ifx-dropdown-menu');
if (!dropdownMenu) {
const iconMenuWrapper = this.getMenuIconWrapper();
this.handleClassList(iconMenuWrapper, 'toggle', 'hide');
}
else {
dropdownMenu.isOpen = true;
}
}
render() {
return (index.h("li", { class: 'breadcrumb-parent', "aria-current": `${this.isLastItem ? 'page' : ""}`, onClick: () => this.toggleDropdownMenu() }, index.h("li", { class: "breadcrumb-wrapper" }, index.h("slot", { name: 'label' }), index.h("div", { class: "dropdown-menu" }, index.h("slot", null))), !this.isLastItem && index.h("span", { class: "breadcrumb-divider" }, "/")));
}
get el() { return index.getElement(this); }
};
BreadcrumbItem.style = breadcrumbItemCss;
exports.ifx_breadcrumb_item = BreadcrumbItem;
//# sourceMappingURL=ifx-breadcrumb-item.cjs.entry.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,51 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca0e0765.js');
const breadcrumbCss = ":root{--ifx-font-family:\"Source Sans 3\";font-family:var(--ifx-font-family, sans-serif)}:host{display:flex}.breadcrumb{list-style:none;padding:0px;margin:0px;display:flex;flex-direction:row;font-family:var(--ifx-font-family);font-size:0.875rem;align-items:flex-start}";
const Breadcrumb = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
}
componentDidLoad() {
const element = this.el.shadowRoot.firstChild;
this.addEventListenersToHandleCustomFocusState(element);
}
addEventListenersToHandleCustomFocusState(element) {
if (!element) {
console.error('element not found');
return;
}
element.tabIndex = -1;
const slot = element.querySelector('slot');
if (slot) {
const assignedNodes = slot.assignedNodes();
for (let i = 0; i < assignedNodes.length; i++) {
const node = assignedNodes[i];
if (node.nodeName === 'IFX-BREADCRUMB-ITEM') {
const breadcrumbLabel = node;
if (!breadcrumbLabel.hasAttribute('url')) {
breadcrumbLabel.tabIndex = -1;
breadcrumbLabel.addEventListener('focus', () => {
if (breadcrumbLabel.hasAttribute('url')) {
breadcrumbLabel.blur();
}
});
}
}
}
}
}
render() {
return (index.h("nav", { "aria-label": "Page navigation breadcrumb" }, index.h("ol", { class: "breadcrumb" }, index.h("slot", null))));
}
get el() { return index.getElement(this); }
};
Breadcrumb.style = breadcrumbCss;
exports.ifx_breadcrumb = Breadcrumb;
//# sourceMappingURL=ifx-breadcrumb.cjs.entry.js.map

View File

@ -0,0 +1 @@
{"file":"ifx-breadcrumb.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,aAAa,GAAG,8QAA8Q;;MCOvR,UAAU;;;;EAGrB,gBAAgB;IACd,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IAC9C,IAAI,CAAC,yCAAyC,CAAC,OAAO,CAAC,CAAC;GAEzD;EAEO,yCAAyC,CAAC,OAAoB;IACpE,IAAI,CAAC,OAAO,EAAE;MACZ,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;MACnC,OAAO;KACR;IACD,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;IAEtB,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC3C,IAAG,IAAI,EAAE;MACP,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;MAE3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC7C,MAAM,IAAI,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAI,IAAI,CAAC,QAAQ,KAAK,qBAAqB,EAAE;UAC3C,MAAM,eAAe,GAAG,IAAoC,CAAC;UAC7D,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE;YACxC,eAAe,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;YAC9B,eAAe,CAAC,gBAAgB,CAAC,OAAO,EAAE;cACxC,IAAI,eAAe,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE;gBACvC,eAAe,CAAC,IAAI,EAAE,CAAC;eACxB;aACF,CAAC,CAAC;WACJ;SACF;OACF;KACF;GACF;EAED,MAAM;IACJ,QACEA,+BAAgB,4BAA4B,IAC1CA,gBAAI,KAAK,EAAC,YAAY,IACpBA,qBAAQ,CACL,CACD,EACN;GACH;;;;;;;","names":["h"],"sources":["src/components/breadcrumb/breadcrumb.scss?tag=ifx-breadcrumb&encapsulation=shadow","src/components/breadcrumb/breadcrumb.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n:host {\n display: flex;\n}\n\n.breadcrumb {\n list-style: none;\n padding: 0px;\n margin: 0px;\n display: flex;\n flex-direction: row;\n font-family: var(--ifx-font-family);\n font-size: tokens.$ifxFontSizeS;\n align-items: flex-start;\n //gap: tokens.$ifxSpace200; //this is where the gap comes from\n\n}\n\n// .separator {\n// color: tokens.$ifxColorEngineering300;\n// margin: 0 16px;\n// }","import { Component, h, Element } from '@stencil/core';\n\n@Component({\n tag: 'ifx-breadcrumb',\n styleUrl: 'breadcrumb.scss',\n shadow: true\n})\nexport class Breadcrumb {\n @Element() el;\n\n componentDidLoad() {\n const element = this.el.shadowRoot.firstChild;\n this.addEventListenersToHandleCustomFocusState(element);\n\n }\n\n private addEventListenersToHandleCustomFocusState(element: HTMLElement) {\n if (!element) {\n console.error('element not found');\n return;\n }\n element.tabIndex = -1;\n\n const slot = element.querySelector('slot');\n if(slot) { \n const assignedNodes = slot.assignedNodes();\n \n for (let i = 0; i < assignedNodes.length; i++) {\n const node = assignedNodes[i];\n if (node.nodeName === 'IFX-BREADCRUMB-ITEM') {\n const breadcrumbLabel = node as HTMLIfxBreadcrumbItemElement;\n if (!breadcrumbLabel.hasAttribute('url')) {\n breadcrumbLabel.tabIndex = -1;\n breadcrumbLabel.addEventListener('focus', () => {\n if (breadcrumbLabel.hasAttribute('url')) {\n breadcrumbLabel.blur();\n }\n });\n }\n }\n }\n }\n }\n\n render() {\n return (\n <nav aria-label=\"Page navigation breadcrumb\">\n <ol class=\"breadcrumb\">\n <slot />\n </ol>\n </nav>\n );\n }\n}\n"],"version":3}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,39 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca0e0765.js');
const cardHeadlineCss = ":root{--ifx-font-family:\"Source Sans 3\";font-family:var(--ifx-font-family, sans-serif)}:host{pointer-events:none}.card__headline-wrapper{padding-bottom:16px}.card__headline-wrapper.withDesc{padding-bottom:8px}.card-headline{margin-top:0;padding-top:0;font-family:var(--ifx-font-family);font-weight:600;font-size:1.5rem;line-height:2rem;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.card-headline.isHovered{color:#0A8276}.card-headline.horizontal{font-size:1.25rem;line-height:28px}";
const CardHeadline = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.direction = undefined;
this.hasDesc = undefined;
this.isHovered = false;
}
componentWillLoad() {
var _a;
const cardElement = this.el.closest('ifx-card');
if (cardElement) {
const cardClass = (_a = cardElement.shadowRoot.querySelector('.card')) === null || _a === void 0 ? void 0 : _a.className;
if (cardClass && cardClass.includes('horizontal')) {
this.direction = 'horizontal';
}
const desc = cardElement.querySelector('ifx-card-text');
if (desc) {
this.hasDesc = true;
}
}
}
render() {
return (index.h("div", { class: `card__headline-wrapper ${this.hasDesc ? 'withDesc' : ""}` }, index.h("div", { class: `card-headline ${this.direction} ${this.isHovered ? 'isHovered' : ""}` }, index.h("slot", null))));
}
get el() { return index.getElement(this); }
};
CardHeadline.style = cardHeadlineCss;
exports.ifx_card_headline = CardHeadline;
//# sourceMappingURL=ifx-card-headline.cjs.entry.js.map

View File

@ -0,0 +1 @@
{"file":"ifx-card-headline.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,oiBAAoiB;;MCQ/iB,YAAY;;;;;qBAIM,KAAK;;EAElC,iBAAiB;;IACf,MAAM,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAEhD,IAAI,WAAW,EAAE;MACf,MAAM,SAAS,GAAG,MAAA,WAAW,CAAC,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC,0CAAE,SAAS,CAAC;MAE3E,IAAI,SAAS,IAAI,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE;QACjD,IAAI,CAAC,SAAS,GAAG,YAAY,CAAA;OAC9B;MAED,MAAM,IAAI,GAAG,WAAW,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;MACxD,IAAI,IAAI,EAAE;QACR,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;OACrB;KACF;GACF;EAGD,MAAM;IACJ,QACEA,iBAAK,KAAK,EAAE,0BAA0B,IAAI,CAAC,OAAO,GAAG,UAAU,GAAG,EAAE,EAAE,IACpEA,iBAAK,KAAK,EAAE,iBAAiB,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,GAAG,WAAW,GAAG,EAAE,EAAE,IAChFA,qBAAQ,CACJ,CACF,EACP;GACF;;;;;;;","names":["h"],"sources":["src/components/card/card-headline/card-headline.scss?tag=ifx-card-headline&encapsulation=shadow","src/components/card/card-headline/card-headline.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../../global/font.scss\";\n\n:host {\n pointer-events: none;\n}\n\n.card__headline-wrapper {\n padding-bottom: 16px;\n\n &.withDesc {\n padding-bottom: 8px;\n }\n}\n\n.card-headline {\n margin-top: 0;\n padding-top: 0;\n font-family: var(--ifx-font-family);\n font-weight: tokens.$ifxFontWeightSemibold;\n font-size: tokens.$ifxFontSize3xl;\n line-height: tokens.$ifxLineHeight3xl;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n\n &.isHovered {\n color: #0A8276;\n }\n\n &.horizontal {\n font-size: tokens.$ifxFontSizeXl;\n line-height: 28px;\n }\n\n}","import { Component, h, Element, State, Prop } from '@stencil/core';\n\n@Component({\n tag: 'ifx-card-headline',\n styleUrl: 'card-headline.scss',\n shadow: true,\n})\n\nexport class CardHeadline {\n @Element() el;\n @State() direction: string;\n @State() hasDesc: boolean;\n @Prop() isHovered: boolean = false;\n\n componentWillLoad() {\n const cardElement = this.el.closest('ifx-card');\n\n if (cardElement) {\n const cardClass = cardElement.shadowRoot.querySelector('.card')?.className;\n\n if (cardClass && cardClass.includes('horizontal')) {\n this.direction = 'horizontal'\n }\n\n const desc = cardElement.querySelector('ifx-card-text');\n if (desc) {\n this.hasDesc = true;\n }\n }\n }\n\n\n render() {\n return (\n <div class={`card__headline-wrapper ${this.hasDesc ? 'withDesc' : \"\"}`}>\n <div class={`card-headline ${this.direction} ${this.isHovered ? 'isHovered' : \"\"}`}>\n <slot />\n </div>\n </div>\n )\n }\n}\n"],"version":3}

View File

@ -0,0 +1,34 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca0e0765.js');
const cardImageCss = ".card-image{width:100%;height:100%;vertical-align:bottom;object-fit:cover}";
const CardImage = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.imgPosition = index.createEvent(this, "imgPosition", 7);
this.src = undefined;
this.alt = undefined;
this.position = undefined;
}
handlePosition(position) {
this.imgPosition.emit(position);
}
componentWillLoad() {
this.handlePosition(this.position);
}
componentDidUpdate() {
this.handlePosition(this.position);
}
render() {
return (index.h("img", { src: this.src, alt: this.alt, class: "card-image" }));
}
};
CardImage.style = cardImageCss;
exports.ifx_card_image = CardImage;
//# sourceMappingURL=ifx-card-image.cjs.entry.js.map

View File

@ -0,0 +1 @@
{"file":"ifx-card-image.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,4EAA4E;;MCQpF,SAAS;;;;;;;;EAMpB,cAAc,CAAC,QAAQ;IACrB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;GAChC;EAED,iBAAiB;IACf,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;GACnC;EAED,kBAAkB;IAChB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;GACnC;EAED,MAAM;IACJ,QACEA,iBAAK,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAC,YAAY,GAAG,EACxD;GACH;;;;;;","names":["h"],"sources":["src/components/card/card-image/card-image.scss?tag=ifx-card-image&encapsulation=shadow","src/components/card/card-image/card-image.tsx"],"sourcesContent":[".card-image {\n width: 100%;\n height: 100%;\n vertical-align: bottom;\n object-fit: cover;\n}","import { Component, h, Prop, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'ifx-card-image',\n styleUrl: 'card-image.scss',\n shadow: true,\n})\n\nexport class CardImage {\n @Prop() src: string;\n @Prop() alt: string;\n @Prop() position: string;\n @Event() imgPosition: EventEmitter;\n\n handlePosition(position) {\n this.imgPosition.emit(position)\n }\n\n componentWillLoad() {\n this.handlePosition(this.position)\n }\n\n componentDidUpdate() {\n this.handlePosition(this.position)\n }\n\n render() {\n return (\n <img src={this.src} alt={this.alt} class=\"card-image\" />\n );\n }\n}\n"],"version":3}

View File

@ -0,0 +1,22 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca0e0765.js');
const cardLinksCss = ":root{--ifx-font-family:\"Source Sans 3\";font-family:var(--ifx-font-family, sans-serif)}.container{display:flex;align-items:center;gap:20px;flex-wrap:wrap;text-decoration:none;color:#1D1D1D;padding:0px 24px 24px 24px;word-wrap:break-word;overflow-wrap:anywhere;}.container:hover{cursor:initial}";
const CardLinks = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
}
render() {
return (index.h("div", { class: 'container' }, index.h("slot", null)));
}
get el() { return index.getElement(this); }
};
CardLinks.style = cardLinksCss;
exports.ifx_card_links = CardLinks;
//# sourceMappingURL=ifx-card-links.cjs.entry.js.map

View File

@ -0,0 +1 @@
{"file":"ifx-card-links.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,ySAAyS;;MCQjT,SAAS;;;;EAGpB,MAAM;IACJ,QACEA,iBAAK,KAAK,EAAC,WAAW,IACpBA,qBAAQ,CACJ,EACP;GACF;;;;;;;","names":["h"],"sources":["src/components/card/card-links/card-links.scss?tag=ifx-card-links&encapsulation=shadow","src/components/card/card-links/card-links.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../../global/font.scss\";\n\n.container {\n display: flex;\n align-items: center;\n gap: tokens.$ifxSpace250;\n flex-wrap: wrap;\n text-decoration: none;\n color: tokens.$ifxColorBaseBlack;\n padding: 0px 24px 24px 24px;\n\n /* wraps text at spaces and within words */\n word-wrap: break-word;\n /* breaks text within a word if necessary */\n overflow-wrap: anywhere;\n /* breaks text at arbitrary points when needed */\n\n &:hover {\n cursor: initial;\n }\n}","import { Component, h, Element } from '@stencil/core';\n\n@Component({\n tag: 'ifx-card-links',\n styleUrl: 'card-links.scss',\n shadow: true,\n})\n\nexport class CardLinks {\n @Element() el;\n\n render() {\n return (\n <div class='container'>\n <slot />\n </div>\n )\n }\n}\n"],"version":3}

View File

@ -0,0 +1,21 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca0e0765.js');
const cardOverlineCss = ":root{--ifx-font-family:\"Source Sans 3\";font-family:var(--ifx-font-family, sans-serif)}:host{pointer-events:none}.card-overline{font-size:1rem;font-weight:400;color:#575352;padding-bottom:4px;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-all}";
const CardOverline = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
}
render() {
return (index.h("div", { class: "card-overline" }, index.h("slot", null)));
}
};
CardOverline.style = cardOverlineCss;
exports.ifx_card_overline = CardOverline;
//# sourceMappingURL=ifx-card-overline.cjs.entry.js.map

View File

@ -0,0 +1 @@
{"file":"ifx-card-overline.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,qUAAqU;;MCQhV,YAAY;;;;EAEvB,MAAM;IACJ,QACEA,iBAAK,KAAK,EAAC,eAAe,IACxBA,qBAAQ,CACJ,EACN;GACH;;;;;;","names":["h"],"sources":["src/components/card/card-overline/card-overline.scss?tag=ifx-card-overline&encapsulation=shadow","src/components/card/card-overline/card-overline.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../../global/font.scss\";\n\n:host {\n pointer-events: none;\n}\n\n.card-overline {\n font-size: tokens.$ifxFontSizeM;\n font-weight: tokens.$ifxFontWeightRegular;\n color: tokens.$ifxColorEngineering500;\n padding-bottom: 4px;\n\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n\n word-break: break-all;\n\n}","import { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'ifx-card-overline',\n styleUrl: 'card-overline.scss',\n shadow: true,\n})\n\nexport class CardOverline {\n\n render() {\n return (\n <div class=\"card-overline\">\n <slot />\n </div>\n );\n }\n}\n"],"version":3}

View File

@ -0,0 +1,30 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca0e0765.js');
const cardTextCss = ":root{--ifx-font-family:\"Source Sans 3\";font-family:var(--ifx-font-family, sans-serif)}:host{pointer-events:none}.card__text-wrapper{padding-bottom:0px}.card__text-wrapper.hasBtn{padding-bottom:16px}.card-text{line-height:1.5rem;font-size:1rem;font-weight:400;white-space:wrap;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}";
const CardText = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.hasBtn = undefined;
}
componentWillLoad() {
const link = this.el.closest('ifx-card').querySelector('ifx-link');
const button = this.el.closest('ifx-card').querySelector('ifx-button');
if (link || button) {
this.hasBtn = true;
}
}
render() {
return (index.h("div", { class: `card__text-wrapper ${this.hasBtn ? 'hasBtn' : ""}` }, index.h("div", { class: `card-text` }, index.h("slot", null))));
}
get el() { return index.getElement(this); }
};
CardText.style = cardTextCss;
exports.ifx_card_text = CardText;
//# sourceMappingURL=ifx-card-text.cjs.entry.js.map

View File

@ -0,0 +1 @@
{"file":"ifx-card-text.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,WAAW,GAAG,qYAAqY;;MCQ5Y,QAAQ;;;;;EAInB,iBAAiB;IACf,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACnE,MAAM,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IACvE,IAAG,IAAI,IAAI,MAAM,EAAE;MACjB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;KACpB;GACF;EAED,MAAM;IACJ,QACEA,iBAAK,KAAK,EAAE,sBAAsB,IAAI,CAAC,MAAM,GAAG,QAAQ,GAAG,EAAE,EAAE,IAC7DA,iBAAK,KAAK,EAAE,WAAW,IACrBA,qBAAQ,CACJ,CACF,EACN;GACH;;;;;;;","names":["h"],"sources":["src/components/card/card-text/card-text.scss?tag=ifx-card-text&encapsulation=shadow","src/components/card/card-text/card-text.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../../global/font.scss\";\n\n:host {\n pointer-events: none;\n}\n\n.card__text-wrapper {\n padding-bottom: 0px;\n\n &.hasBtn {\n padding-bottom: 16px;\n }\n}\n\n.card-text {\n line-height: tokens.$ifxLineHeightM;\n font-size: tokens.$ifxFontSizeM;\n font-weight: 400;\n white-space: wrap;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n}","import { Component, h, Element, State} from '@stencil/core';\n\n@Component({\n tag: 'ifx-card-text',\n styleUrl: './card-text.scss',\n shadow: true,\n})\n\nexport class CardText {\n @Element() el;\n @State() hasBtn: boolean;\n\n componentWillLoad() { \n const link = this.el.closest('ifx-card').querySelector('ifx-link');\n const button = this.el.closest('ifx-card').querySelector('ifx-button');\n if(link || button) { \n this.hasBtn = true;\n }\n }\n\n render() {\n return (\n <div class={`card__text-wrapper ${this.hasBtn ? 'hasBtn' : \"\"}`}>\n <div class={`card-text`}>\n <slot />\n </div>\n </div>\n );\n }\n}\n"],"version":3}

View File

@ -0,0 +1,113 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca0e0765.js');
const cardCss = ":root{--ifx-font-family:\"Source Sans 3\";font-family:var(--ifx-font-family, sans-serif)}:host{display:inline-flex}.card{position:relative;display:inline-flex;flex-direction:column;word-wrap:break-word;background-color:#FFFFFF;background-clip:border-box;border:1px solid #EEEDED;border-radius:1px;width:350px;height:auto;font-family:var(--ifx-font-family)}.card.linkHovered{border-color:#EEEDED}.card.cardHovered{border-color:#0A8276}.card.noBtns .vertical .lower__body-wrapper{padding-bottom:24px}.card.noBtns .horizontal .lower__body-wrapper{padding-bottom:24px}.card .horizontal{display:flex;flex-direction:row;min-height:218px}.card .horizontal .card-img{flex:1;text-decoration:none}.card .horizontal .card-img.noImage{display:none}.card .horizontal .card-img ::slotted([slot=img]){width:100%;vertical-align:bottom}.card .horizontal .lower__body-wrapper{flex:1;display:grid;grid-template-rows:1fr auto}.card .horizontal .lower__body-wrapper .upper-body{display:flex;flex-direction:column;text-decoration:none;color:#1D1D1D;padding:24px 24px 0px 24px}.card .vertical .upper__body-wrapper{text-decoration:none;color:#1D1D1D}.card .vertical .upper__body-wrapper .card-img{height:190px}.card .vertical .upper__body-wrapper .card-img.noImage{display:none}.card .vertical .upper__body-wrapper .upper-body{padding:24px 24px 0px 24px}.card .vertical .lower__body-wrapper:hover{border-color:#EEEDED}.card.horizontal{flex-direction:row;width:538px}.card.horizontal .card-img{flex:1;order:2}.card.horizontal .card-img ::slotted([slot=img]){width:100%;height:100%;vertical-align:bottom;object-fit:cover}.card.horizontal.left .horizontal .card-img{order:1}.card.horizontal.left .horizontal .lower__body-wrapper{order:2}.card:focus,.card:focus-visible,.focus{outline:none;border-color:#0A8276 !important}";
const Card = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.noBtns = undefined;
this.direction = 'vertical';
this.alignment = undefined;
this.noImg = undefined;
this.href = "";
this.internalHref = "";
this.target = "_self";
}
setImgPosition(event) {
this.alignment = event.detail;
}
handleComponentAdjustment() {
const image = this.el.querySelector('ifx-card-image');
const links = this.el.querySelector('ifx-card-links');
if (!image) {
this.noImg = true;
}
else
this.noImg = false;
if (!links) {
this.noBtns = true;
}
else
this.noBtns = false;
if (this.href.trim() === "") {
this.internalHref = undefined;
}
else
this.internalHref = this.href;
}
handleClassList(el, type, className) {
el.classList[type](className);
}
handleHovering() {
const card = this.el.shadowRoot.querySelector('.card');
let cardHeadline = this.el.querySelector('ifx-card-headline');
if (this.href) {
card.addEventListener('mouseover', (ev) => {
// const target = ev.target;
// const relatedTarget = ev.relatedTarget;
// if (relatedTarget && relatedTarget !== target && !target.contains(relatedTarget)) {
// this.handleClassList(card, 'add', 'borderHovered')
// }
if (ev.target.nodeName === 'IFX-CARD-LINKS' || ev.target.nodeName === 'IFX-BUTTON') {
this.handleClassList(card, 'add', 'linkHovered');
}
else {
this.handleClassList(card, 'add', 'cardHovered');
if (cardHeadline) {
cardHeadline.isHovered = true;
}
}
});
card.addEventListener('mouseout', () => {
if (cardHeadline) {
cardHeadline.isHovered = false;
}
//this.handleClassList(card, 'remove', 'borderHovered')
this.handleClassList(card, 'remove', 'cardHovered');
this.handleClassList(card, 'add', 'linkHovered');
});
}
}
componentWillLoad() {
this.handleComponentAdjustment();
}
componentDidLoad() {
this.handleHovering();
this.addEventListenersToHandleCustomFocusState();
}
addEventListenersToHandleCustomFocusState() {
const element = this.el.shadowRoot;
if (!element) {
console.error('element not found');
return;
}
const upperBodyWrapper = element.querySelector('.upper__body-wrapper');
if (!upperBodyWrapper) {
console.error('upper body wrapper not found');
return;
}
element.tabIndex = -1;
upperBodyWrapper.tabIndex = -1;
}
componentWillUpdate() {
this.handleComponentAdjustment();
}
render() {
return (index.h(index.Host, null, index.h("div", { "aria-labelledby": "label", class: `card
${this.noBtns ? 'noBtns' : ""}
${this.direction}
${this.alignment}` }, this.direction === 'horizontal' &&
index.h("div", { class: "horizontal" }, index.h("a", { class: `card-img ${this.noImg ? 'noImage' : ""}`, href: this.internalHref }, index.h("slot", { name: "img" })), index.h("div", { class: 'lower__body-wrapper' }, index.h("a", { class: 'upper-body', href: this.internalHref }, index.h("slot", null)), index.h("div", null, index.h("slot", { name: 'buttons' })))), this.direction === 'vertical' &&
index.h("div", { class: "vertical" }, index.h("a", { class: 'upper__body-wrapper', href: this.internalHref, target: this.target }, index.h("div", { class: `card-img ${this.noImg ? 'noImage' : ""}` }, index.h("slot", { name: "img" })), index.h("div", { class: 'upper-body' }, index.h("slot", null))), index.h("div", { class: 'lower__body-wrapper' }, index.h("slot", { name: 'buttons' }))))));
}
get el() { return index.getElement(this); }
};
Card.style = cardCss;
exports.ifx_card = Card;
//# sourceMappingURL=ifx-card.cjs.entry.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,100 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca0e0765.js');
const checkboxCss = ":host{display:inline-flex;vertical-align:top}.checkbox__container{box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;padding:0px;gap:8px;font-family:var(--ifx-font-family)}.checkbox__container .checkbox__wrapper{display:flex;position:relative;justify-content:center;align-items:center;width:20px;height:20px;background-color:#FFFFFF;border:1px solid #575352;border-radius:1px;flex:none;order:0;flex-grow:0}.checkbox__container .checkbox__wrapper.checkbox-m{height:24px;width:24px}.checkbox__container .checkbox__wrapper.error{border-color:#CD002F}.checkbox__container .checkbox__wrapper:focus-visible{border:1px solid #575352;outline:2px solid #0A8276;outline-offset:2px}.checkbox__container .checkbox__wrapper:hover{background-color:#EEEDED;border:1px solid #575352;border-radius:1px;flex:none;order:0;flex-grow:0}.checkbox__container .checkbox__wrapper.disabled{background-color:#BFBBBB;border-color:#BFBBBB;border-radius:1px;flex:none;order:0;flex-grow:0}.checkbox__container .checkbox__wrapper.checked{background-color:#0A8276;border-radius:1px;border-color:transparent;flex:none;order:0;flex-grow:0;color:#FFFFFF}.checkbox__container .checkbox__wrapper.checked.error{background-color:#CD002F}.checkbox__container .checkbox__wrapper.checked:focus-visible{border:1px solid transparent;outline:2px solid #0A8276;outline-offset:2px}.checkbox__container .checkbox__wrapper.checked:hover{background-color:#08665C;border-radius:1px;flex:none;order:0;flex-grow:0}.checkbox__container .checkbox__wrapper.checked.disabled{background:#BFBBBB;border-radius:1px;flex:none;order:0;flex-grow:0}.checkbox__container .checkbox__wrapper.indeterminate:before{content:\"\";display:block;width:70%;height:2px;background-color:#08665C;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.checkbox__container .label{height:20px;font-style:normal;font-weight:400;font-size:0.875rem;line-height:1.25rem;color:#1D1D1D;flex:none;order:1;flex-grow:0}.checkbox__container .label.label-m{height:24px;font-size:1rem;line-height:1.5rem}.checkbox__container .label.disabled{color:#BFBBBB}.checkbox__container .checkbox__wrapper:hover,.checkbox__container .label:hover{cursor:pointer}";
const Checkbox = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.ifxChange = index.createEvent(this, "ifxChange", 7);
this.disabled = false;
this.value = false;
this.error = false;
this.name = '';
this.size = 'm';
this.internalValue = undefined;
this.indeterminate = false;
this.internalIndeterminate = undefined;
}
handleCheckbox() {
if (!this.disabled) {
if (this.inputElement.indeterminate) {
this.internalValue = true;
this.internalIndeterminate = false;
}
else {
this.internalValue = !this.internalValue;
}
this.ifxChange.emit(this.internalValue);
}
}
valueChanged(newValue, oldValue) {
if (newValue !== oldValue) {
this.internalValue = newValue;
this.inputElement.checked = this.internalValue; // update the checkbox's checked property
}
}
indeterminateChanged(newValue, oldValue) {
if (newValue !== oldValue) {
this.internalIndeterminate = newValue;
this.inputElement.indeterminate = this.internalIndeterminate; // update the checkbox's indeterminate property
}
}
handleKeydown(event) {
// Keycode 32 corresponds to the Space key, 13 corresponds to the Enter key
if (event.keyCode === 32 || event.keyCode === 13) {
this.handleCheckbox();
event.preventDefault(); // prevent the default action when space or enter is pressed
}
}
componentWillLoad() {
this.internalValue = this.value;
this.internalIndeterminate = this.indeterminate;
}
componentDidRender() {
this.inputElement.indeterminate = this.internalIndeterminate;
}
getCheckedClassName() {
if (this.error) {
if (this.internalValue) {
return "checked error";
}
else {
return "error";
}
}
else if (this.internalValue) {
return "checked";
}
else
return "";
}
render() {
const slot = this.el.innerHTML;
let hasSlot = false;
if (slot) {
hasSlot = true;
}
return (index.h("div", { class: "checkbox__container" }, index.h("input", { type: "checkbox", hidden: true, ref: (el) => (this.inputElement = el), name: this.name, checked: this.internalValue, onChange: this.handleCheckbox.bind(this), id: 'checkbox', value: `${this.internalValue}` }), index.h("div", { tabindex: "0", onClick: this.handleCheckbox.bind(this), onKeyDown: this.handleKeydown.bind(this), role: "checkbox" // role attribute
,
"aria-value": this.internalValue, "aria-disabled": this.disabled, "aria-labelledby": "label", class: `checkbox__wrapper
${this.getCheckedClassName()}
${this.size === "m" ? "checkbox-m" : ""}
${this.indeterminate ? 'indeterminate' : ""}
${this.disabled ? 'disabled' : ""}` }, this.internalValue && index.h("ifx-icon", { icon: "check-12" })), hasSlot &&
index.h("div", { id: "label", class: `label ${this.size === "m" ? "label-m" : ""} ${this.disabled ? 'disabled' : ""} `, onClick: this.handleCheckbox.bind(this) }, index.h("slot", null))));
}
get el() { return index.getElement(this); }
static get watchers() { return {
"value": ["valueChanged"],
"indeterminate": ["indeterminateChanged"]
}; }
};
Checkbox.style = checkboxCss;
exports.ifx_checkbox = Checkbox;
//# sourceMappingURL=ifx-checkbox.cjs.entry.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,53 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca0e0765.js');
const chipCss = ":root{--ifx-font-family:\"Source Sans 3\";font-family:var(--ifx-font-family, sans-serif)}:host{display:inline-block}.container{position:relative;font-family:var(--ifx-font-family)}.container .wrapper{display:inline-flex;flex-direction:row;align-items:center;padding:8px 16px;gap:8px;background:#FFFFFF;border:1px solid #BFBBBB;border-radius:100px}.container .wrapper:hover{cursor:pointer;border:1px solid #575352}.container .wrapper:active{border:1px solid #0A8276}.container .wrapper .wrapper-label{font-style:normal;font-weight:400;font-size:0.875rem;line-height:1.25rem;display:flex;align-items:center;color:#1D1D1D;flex:none;order:0;flex-grow:0}.container .wrapper .wrapper-close-button ifx-icon{transition:0.3s;width:12px;height:12px}.container .wrapper .wrapper-close-button.show ifx-icon{transition:0.3s;transform:rotate(-180deg)}";
const Chip = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.ifxDropdownMenu = index.createEvent(this, "ifxDropdownMenu", 7);
this.placeholder = undefined;
this.selectedValue = "";
}
handleOutsideClick(event) {
const path = event.composedPath();
if (!path.includes(this.el)) {
this.closedMenu();
}
}
handleDropdownItemValueEmission(event) {
this.selectedValue = event.detail;
this.ifxDropdownMenu.emit(event.detail);
this.toggleMenu();
}
getDropdownMenu() {
let dropdownMenuComponent = this.el.querySelector('ifx-dropdown-menu');
return dropdownMenuComponent;
}
closedMenu() {
let dropdownMenuComponent = this.getDropdownMenu();
dropdownMenuComponent.isOpen = false;
}
toggleMenu() {
let dropdownMenuComponent = this.getDropdownMenu();
dropdownMenuComponent.isOpen = !dropdownMenuComponent.isOpen;
this.toggleCloseIcon();
}
toggleCloseIcon() {
const closeIconWrapper = this.el.shadowRoot.querySelector('.wrapper-close-button');
closeIconWrapper.classList.toggle('show');
}
render() {
return (index.h("div", { "aria-value": this.selectedValue, "aria-label": 'chip with a dropdown menu', class: "dropdown container" }, index.h("div", { class: "wrapper", onClick: () => this.toggleMenu() }, index.h("div", { class: "wrapper-label" }, this.selectedValue ? this.selectedValue : this.placeholder), index.h("div", { class: "wrapper-close-button" }, index.h("ifx-icon", { icon: "chevrondown12" }))), index.h("slot", { name: "menu" })));
}
get el() { return index.getElement(this); }
};
Chip.style = chipCss;
exports.ifx_chip = Chip;
//# sourceMappingURL=ifx-chip.cjs.entry.js.map

View File

@ -0,0 +1 @@
{"file":"ifx-chip.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,OAAO,GAAG,u0BAAu0B;;MCQ10B,IAAI;;;;;yBAGkB,EAAE;;EAInC,kBAAkB,CAAC,KAAiB;IAClC,MAAM,IAAI,GAAG,KAAK,CAAC,YAAY,EAAE,CAAC;IAClC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;MAC3B,IAAI,CAAC,UAAU,EAAE,CAAC;KACnB;GACF;EAGD,+BAA+B,CAAC,KAAkB;IAChD,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC;IAClC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACxC,IAAI,CAAC,UAAU,EAAE,CAAA;GAClB;EAED,eAAe;IACb,IAAI,qBAAqB,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;IACvE,OAAO,qBAAqB,CAAA;GAC7B;EAED,UAAU;IACR,IAAI,qBAAqB,GAAG,IAAI,CAAC,eAAe,EAAE,CAAA;IAClD,qBAAqB,CAAC,MAAM,GAAG,KAAK,CAAC;GACtC;EAED,UAAU;IACR,IAAI,qBAAqB,GAAG,IAAI,CAAC,eAAe,EAAE,CAAA;IAClD,qBAAqB,CAAC,MAAM,GAAG,CAAC,qBAAqB,CAAC,MAAM,CAAC;IAC7D,IAAI,CAAC,eAAe,EAAE,CAAA;GACvB;EAED,eAAe;IACb,MAAM,gBAAgB,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,uBAAuB,CAAC,CAAA;IAClF,gBAAgB,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;GAC1C;EAED,MAAM;IACJ,QACEA,+BAAiB,IAAI,CAAC,aAAa,gBAAa,2BAA2B,EAAC,KAAK,EAAC,oBAAoB,IACpGA,iBAAK,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,UAAU,EAAE,IACnDA,iBAAK,KAAK,EAAC,eAAe,IACvB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,WAAW,CACvD,EACNA,iBAAK,KAAK,EAAC,sBAAsB,IAC/BA,sBAAU,IAAI,EAAC,eAAe,GAAY,CACtC,CACF,EACNA,kBAAM,IAAI,EAAC,MAAM,GAAG,CAChB,EACN;GACH;;;;;;;","names":["h"],"sources":["src/components/chips/chip.scss?tag=ifx-chip&encapsulation=shadow","src/components/chips/chip.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n:host {\n display: inline-block;\n}\n\n.container {\n //display: inline-block;\n position: relative;\n font-family: var(--ifx-font-family);\n\n & .wrapper {\n display: inline-flex;\n flex-direction: row;\n align-items: center;\n padding: 8px 16px;\n gap: tokens.$ifxSpace100;\n\n background: tokens.$ifxColorBaseWhite;\n\n border: 1px solid #BFBBBB;\n border-radius: 100px;\n\n &:hover {\n cursor: pointer;\n border: 1px solid #575352;\n }\n\n &:active {\n border: 1px solid #0A8276;\n }\n\n & .wrapper-label {\n font-style: normal;\n font-weight: 400;\n font-size: tokens.$ifxFontSizeS;\n line-height: tokens.$ifxLineHeightS;\n display: flex;\n align-items: center;\n color: tokens.$ifxColorBaseBlack;\n flex: none;\n order: 0;\n flex-grow: 0;\n }\n\n & .wrapper-close-button {\n & ifx-icon {\n transition: .3s;\n width: 12px;\n height: 12px;\n }\n\n &.show {\n & ifx-icon {\n transition: .3s;\n transform: rotate(-180deg);\n }\n }\n }\n }\n}","import { Component, h, Element, Prop, Listen, State, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'ifx-chip',\n styleUrl: 'chip.scss',\n shadow: true\n})\n\nexport class Chip {\n @Element() el;\n @Prop() placeholder: string;\n @State() selectedValue: string = \"\";\n @Event() ifxDropdownMenu: EventEmitter<CustomEvent>;\n\n @Listen('mousedown', { target: 'document' })\n handleOutsideClick(event: MouseEvent) {\n const path = event.composedPath();\n if (!path.includes(this.el)) {\n this.closedMenu();\n }\n }\n\n @Listen('ifxDropdownItem')\n handleDropdownItemValueEmission(event: CustomEvent) {\n this.selectedValue = event.detail;\n this.ifxDropdownMenu.emit(event.detail);\n this.toggleMenu()\n }\n\n getDropdownMenu() { \n let dropdownMenuComponent = this.el.querySelector('ifx-dropdown-menu');\n return dropdownMenuComponent\n }\n\n closedMenu() {\n let dropdownMenuComponent = this.getDropdownMenu()\n dropdownMenuComponent.isOpen = false;\n }\n\n toggleMenu() { \n let dropdownMenuComponent = this.getDropdownMenu()\n dropdownMenuComponent.isOpen = !dropdownMenuComponent.isOpen;\n this.toggleCloseIcon()\n }\n\n toggleCloseIcon() { \n const closeIconWrapper = this.el.shadowRoot.querySelector('.wrapper-close-button')\n closeIconWrapper.classList.toggle('show')\n }\n\n render() {\n return (\n <div aria-value={this.selectedValue} aria-label='chip with a dropdown menu' class=\"dropdown container\">\n <div class=\"wrapper\" onClick={() => this.toggleMenu()}>\n <div class=\"wrapper-label\">\n {this.selectedValue ? this.selectedValue : this.placeholder}\n </div>\n <div class=\"wrapper-close-button\">\n <ifx-icon icon=\"chevrondown12\"></ifx-icon>\n </div>\n </div>\n <slot name=\"menu\" />\n </div>\n );\n }\n}"],"version":3}

View File

@ -0,0 +1,21 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca0e0765.js');
const dropdownHeaderCss = ":root{--ifx-font-family:\"Source Sans 3\";font-family:var(--ifx-font-family, sans-serif)}.dropdown-header{display:flex;padding:8px 16px;align-items:center;gap:8px;align-self:stretch;border-bottom:1px solid #EEEDED;font-family:var(--ifx-font-family)}.dropdown-header span{color:#575352;font-family:var(--ifx-font-family);font-size:14px;font-style:normal;font-weight:400;line-height:20px;}";
const DropdownHeader = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
}
render() {
return (index.h("div", { class: 'dropdown-header' }, index.h("span", null, index.h("slot", null))));
}
};
DropdownHeader.style = dropdownHeaderCss;
exports.ifx_dropdown_header = DropdownHeader;
//# sourceMappingURL=ifx-dropdown-header.cjs.entry.js.map

View File

@ -0,0 +1 @@
{"file":"ifx-dropdown-header.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,iBAAiB,GAAG,qYAAqY;;MCSlZ,cAAc;;;;EACzB,MAAM;IACJ,QACEA,iBAAK,KAAK,EAAC,iBAAiB,IAC1BA,sBACEA,qBAAQ,CACH,CACH,EACP;GACF;;;;;;","names":["h"],"sources":["src/components/dropdown/dropdown-header/dropdown-header.scss?tag=ifx-dropdown-header&encapsulation=shadow","src/components/dropdown/dropdown-header/dropdown-header.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../../global/font.scss\";\n\n.dropdown-header {\n display: flex;\n padding: 8px 16px;\n align-items: center;\n gap: 8px;\n align-self: stretch;\n border-bottom: 1px solid tokens.$ifxColorEngineering200;\n font-family: var(--ifx-font-family);\n\n\n & span {\n color: tokens.$ifxColorEngineering500;\n font-family: var(--ifx-font-family);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n /* 142.857% */\n }\n}","// dropdown-separator.tsx\nimport { Component, h } from \"@stencil/core\";\n\n@Component({\n tag: 'ifx-dropdown-header',\n styleUrl: 'dropdown-header.scss',\n shadow: true\n})\n\nexport class DropdownHeader {\n render() {\n return (\n <div class='dropdown-header'>\n <span>\n <slot />\n </span>\n </div>\n )\n }\n}"],"version":3}

View File

@ -0,0 +1,35 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca0e0765.js');
const dropdownItemCss = ":root{--ifx-font-family:\"Source Sans 3\";font-family:var(--ifx-font-family, sans-serif)}.dropdown-item{text-decoration:none;color:#1D1D1D;display:flex;align-items:center;padding:8px 16px;gap:8px;font-family:var(--ifx-font-family)}.dropdown-item.hide{display:none}.dropdown-item span{color:#1D1D1D;font-size:16px;font-style:normal;font-weight:400;line-height:24px;}.dropdown-item.small span{font-size:14px}.dropdown-item:hover{cursor:pointer;background-color:#EEEDED}.dropdown-item:active{background-color:#BFBBBB}.icon{margin-right:4px}";
const DropdownItem = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.ifxDropdownItem = index.createEvent(this, "ifxDropdownItem", 7);
this.icon = undefined;
this.href = "";
this.target = "_self";
this.hide = false;
this.size = 'l';
}
handleMenuSize(event) {
this.size = event.detail;
}
handleEventEmission() {
this.ifxDropdownItem.emit(this.el.textContent);
}
render() {
let hrefAttr = this.href ? { href: this.href, target: this.target } : {};
return (index.h("a", Object.assign({}, hrefAttr, { onClick: () => this.handleEventEmission(), class: `dropdown-item ${this.size === 's' ? 'small' : ""} ${this.hide ? 'hide' : ""}` }), this.icon && index.h("ifx-icon", { class: "icon", icon: this.icon }), index.h("span", null, index.h("slot", null))));
}
get el() { return index.getElement(this); }
};
DropdownItem.style = dropdownItemCss;
exports.ifx_dropdown_item = DropdownItem;
//# sourceMappingURL=ifx-dropdown-item.cjs.entry.js.map

View File

@ -0,0 +1 @@
{"file":"ifx-dropdown-item.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,2hBAA2hB;;MCStiB,YAAY;;;;;gBAEA,EAAE;kBACA,OAAO;gBACR,KAAK;gBACL,GAAG;;EAK3B,cAAc,CAAC,KAAkB;IAC/B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC;GAC1B;EAED,mBAAmB;IACjB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,CAAA;GAC/C;EAED,MAAM;IACJ,IAAI,QAAQ,GAAG,IAAI,CAAC,IAAI,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC;IACzE,QACEA,+BAAO,QAAQ,IAAE,OAAO,EAAE,MAAM,IAAI,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,iBAAiB,IAAI,CAAC,IAAI,KAAK,GAAG,GAAG,OAAO,GAAG,EAAE,IAAI,IAAI,CAAC,IAAI,GAAG,MAAM,GAAG,EAAE,EAAE,KAC9I,IAAI,CAAC,IAAI,IAAIA,sBAAU,KAAK,EAAC,MAAM,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,GAAa,EACjEA,sBACEA,qBAAQ,CACH,CACL,EACJ;GACH;;;;;;;","names":["h"],"sources":["src/components/dropdown/dropdown-item/dropdown-item.scss?tag=ifx-dropdown-item&encapsulation=shadow","src/components/dropdown/dropdown-item/dropdown-item.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../../global/font.scss\";\n\n.dropdown-item {\n text-decoration: none;\n color: tokens.$ifxColorBaseBlack;\n display: flex;\n align-items: center;\n padding: 8px 16px;\n gap: tokens.$ifxSize100;\n font-family: var(--ifx-font-family);\n\n &.hide {\n display: none;\n }\n\n & span {\n color: tokens.$ifxColorBaseBlack;\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 24px;\n /* 150% */\n }\n\n &.small {\n & span {\n font-size: 14px;\n }\n }\n\n &:hover {\n cursor: pointer;\n background-color: tokens.$ifxColorEngineering200;\n }\n\n &:active {\n background-color: tokens.$ifxColorEngineering300;\n }\n}\n\n.icon {\n margin-right: 4px;\n}","// dropdown-item.tsx\nimport { Component, Prop, h, Listen, State, Event, EventEmitter, Element } from \"@stencil/core\";\n\n@Component({\n tag: 'ifx-dropdown-item',\n styleUrl: 'dropdown-item.scss',\n shadow: true\n})\n\nexport class DropdownItem {\n @Prop() icon: string;\n @Prop() href: string = \"\"\n @Prop() target: string = \"_self\"\n @Prop() hide: boolean = false;\n @State() size: string = 'l'\n @Event() ifxDropdownItem: EventEmitter;\n @Element() el;\n\n @Listen('menuSize', { target: 'body' })\n handleMenuSize(event: CustomEvent) {\n this.size = event.detail;\n }\n\n handleEventEmission() {\n this.ifxDropdownItem.emit(this.el.textContent)\n }\n\n render() {\n let hrefAttr = this.href ? { href: this.href, target: this.target } : {};\n return (\n <a {...hrefAttr} onClick={() => this.handleEventEmission()} class={`dropdown-item ${this.size === 's' ? 'small' : \"\"} ${this.hide ? 'hide' : \"\"}`}>\n {this.icon && <ifx-icon class=\"icon\" icon={this.icon}></ifx-icon>}\n <span>\n <slot />\n </span>\n </a>\n );\n }\n}"],"version":3}

View File

@ -0,0 +1,66 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca0e0765.js');
const dropdownMenuCss = ":host{position:relative;z-index:1000}.dropdown-menu{display:none;visibility:hidden;flex-direction:column;width:224px;max-height:289px;min-width:224px;overflow-y:auto;background:#FFFFFF;box-shadow:0px 6px 9px 0px rgba(29, 29, 29, 0.1019607843);border:1px solid #EEEDED;padding:8px 0px;font-family:var(--ifx-font-family)}.dropdown-menu.small{max-height:266px;max-width:186px;overflow-y:auto}.dropdown-menu.hideTopPadding{padding-top:0px}.dropdown-menu.show{display:flex;visibility:visible}";
const DropdownMenu = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.menuSize = index.createEvent(this, "menuSize", 7);
this.ifxDropdownMenuItem = index.createEvent(this, "ifxDropdownMenuItem", 7);
this.isOpen = false;
this.size = 'l';
this.hideTopPadding = false;
this.filteredItems = [];
}
handleMenuFilter(event) {
const searchValue = event.detail;
this.filterDropdownItems(searchValue);
}
handleDropdownItemValueEmission(event) {
this.ifxDropdownMenuItem.emit(event.detail);
}
filterDropdownItems(searchValue) {
const allItems = Array.from(this.el.querySelectorAll('ifx-dropdown-item'));
let dropdownItem, txtValue;
let query = searchValue.toUpperCase();
for (let i = 0; i < allItems.length; i++) {
dropdownItem = allItems[i];
txtValue = dropdownItem.textContent || dropdownItem.innerText;
if (txtValue.toUpperCase().indexOf(query) > -1) {
dropdownItem.setAttribute('hide', false);
}
else {
dropdownItem.setAttribute('hide', true);
}
}
}
componentWillUpdate() {
this.menuSize.emit(this.size);
}
componentWillLoad() {
this.filteredItems = Array.from(this.el.querySelectorAll('ifx-dropdown-item'));
const searchField = this.el.querySelector('ifx-search-field');
const dropdownHeader = this.el.querySelector('ifx-dropdown-header');
if (searchField || dropdownHeader) {
this.hideTopPadding = true;
}
else
this.hideTopPadding = false;
}
render() {
return (index.h("div", { class: `dropdown-menu
${this.isOpen ? 'show' : ''}
${this.hideTopPadding ? 'hideTopPadding' : ""}
${this.size === 's' ? 'small' : ""}` }, index.h("slot", null)));
}
get el() { return index.getElement(this); }
};
DropdownMenu.style = dropdownMenuCss;
exports.ifx_dropdown_menu = DropdownMenu;
//# sourceMappingURL=ifx-dropdown-menu.cjs.entry.js.map

View File

@ -0,0 +1 @@
{"file":"ifx-dropdown-menu.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,yeAAye;;MCSpf,YAAY;;;;;kBACG,KAAK;gBACR,GAAG;0BACS,KAAK;yBAIe,EAAE;;EAIzD,gBAAgB,CAAC,KAAkB;IACjC,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC;IACjC,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAA;GACtC;EAGD,+BAA+B,CAAC,KAAkB;IAChD,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;GAC5C;EAED,mBAAmB,CAAC,WAAmB;IACrC,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAC3E,IAAI,YAAY,EAAE,QAAQ,CAAC;IAC3B,IAAI,KAAK,GAAG,WAAW,CAAC,WAAW,EAAE,CAAA;IAErC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;MACxC,YAAY,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;MAC3B,QAAQ,GAAG,YAAY,CAAC,WAAW,IAAI,YAAY,CAAC,SAAS,CAAC;MAE9D,IAAI,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE;QAC9C,YAAY,CAAC,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;OACzC;WAAM;QACL,YAAY,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;OACxC;KACF;GACF;EAED,mBAAmB;IACjB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC9B;EAED,iBAAiB;IACf,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAiC,CAAC;IAC/G,MAAM,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAA;IAC7D,MAAM,cAAc,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAA;IAEnE,IAAI,WAAW,IAAI,cAAc,EAAE;MACjC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;KAC5B;;MAAM,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;GACpC;EAGD,MAAM;IACJ,QACEA,iBAAK,KAAK,EAAE;QACV,IAAI,CAAC,MAAM,GAAG,MAAM,GAAG,EAAE;QACzB,IAAI,CAAC,cAAc,GAAG,gBAAgB,GAAG,EAAE;QAC3C,IAAI,CAAC,IAAI,KAAK,GAAG,GAAG,OAAO,GAAG,EAAE,EAAE,IAElCA,qBAAQ,CACH,EACP;GACH;;;;;;;","names":["h"],"sources":["src/components/dropdown/dropdown-menu/dropdown-menu.scss?tag=ifx-dropdown-menu&encapsulation=shadow","src/components/dropdown/dropdown-menu/dropdown-menu.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n\n:host {\n position: relative;\n z-index: 1000;\n}\n\n.dropdown-menu {\n display: none;\n visibility: hidden;\n flex-direction: column;\n width: 224px;\n max-height: 289px;\n min-width: 224px;\n overflow-y: auto;\n background: tokens.$ifxColorBaseWhite;\n box-shadow: 0px 6px 9px 0px #1d1d1d1a;\n border: 1px solid tokens.$ifxColorEngineering200;\n padding: 8px 0px;\n font-family: var(--ifx-font-family);\n\n &.small {\n max-height: 266px;\n max-width: 186px;\n overflow-y: auto;\n }\n\n &.hideTopPadding {\n padding-top: 0px;\n }\n}\n\n.dropdown-menu.show {\n display: flex;\n visibility: visible;\n}","// dropdown-menu.tsx\nimport { Component, h, Prop, Element, State, Event, EventEmitter, Listen } from \"@stencil/core\";\n\n@Component({\n tag: 'ifx-dropdown-menu',\n styleUrl: 'dropdown-menu.scss',\n shadow: true\n})\n\nexport class DropdownMenu {\n @Prop() isOpen: boolean = false;\n @Prop() size: string = 'l'\n @State() hideTopPadding: boolean = false;\n @Element() el;\n\n @Event() menuSize: EventEmitter;\n @State() filteredItems: HTMLIfxDropdownItemElement[] = [];\n @Event() ifxDropdownMenuItem: EventEmitter<CustomEvent>;\n\n @Listen('ifxInput')\n handleMenuFilter(event: CustomEvent) {\n const searchValue = event.detail;\n this.filterDropdownItems(searchValue)\n }\n\n @Listen('ifxDropdownItem')\n handleDropdownItemValueEmission(event: CustomEvent) {\n this.ifxDropdownMenuItem.emit(event.detail)\n }\n\n filterDropdownItems(searchValue: string) {\n const allItems = Array.from(this.el.querySelectorAll('ifx-dropdown-item'));\n let dropdownItem, txtValue;\n let query = searchValue.toUpperCase()\n\n for (let i = 0; i < allItems.length; i++) {\n dropdownItem = allItems[i];\n txtValue = dropdownItem.textContent || dropdownItem.innerText;\n\n if (txtValue.toUpperCase().indexOf(query) > -1) {\n dropdownItem.setAttribute('hide', false)\n } else {\n dropdownItem.setAttribute('hide', true)\n }\n }\n }\n\n componentWillUpdate() {\n this.menuSize.emit(this.size)\n }\n\n componentWillLoad() {\n this.filteredItems = Array.from(this.el.querySelectorAll('ifx-dropdown-item')) as HTMLIfxDropdownItemElement[];\n const searchField = this.el.querySelector('ifx-search-field')\n const dropdownHeader = this.el.querySelector('ifx-dropdown-header')\n\n if (searchField || dropdownHeader) {\n this.hideTopPadding = true;\n } else this.hideTopPadding = false;\n }\n\n\n render() {\n return (\n <div class={`dropdown-menu \n ${this.isOpen ? 'show' : ''} \n ${this.hideTopPadding ? 'hideTopPadding' : \"\"}\n ${this.size === 's' ? 'small' : \"\"}`\n } >\n <slot />\n </div >\n );\n }\n}"],"version":3}

View File

@ -0,0 +1,21 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca0e0765.js');
const dropdownSeparatorCss = ".dropdown-separator{height:1px;background-color:#EEEDED;margin:8px 16px}";
const DropdownSeparator = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
}
render() {
return (index.h("div", { class: 'dropdown-separator' }));
}
};
DropdownSeparator.style = dropdownSeparatorCss;
exports.ifx_dropdown_separator = DropdownSeparator;
//# sourceMappingURL=ifx-dropdown-separator.cjs.entry.js.map

View File

@ -0,0 +1 @@
{"file":"ifx-dropdown-separator.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,oBAAoB,GAAG,0EAA0E;;MCS1F,iBAAiB;;;;EAC5B,MAAM;IACJ,QACEA,iBAAK,KAAK,EAAC,oBAAoB,GAAO,EACvC;GACF;;;;;;","names":["h"],"sources":["src/components/dropdown/dropdown-seperator/dropdown-separator.scss?tag=ifx-dropdown-separator&encapsulation=shadow","src/components/dropdown/dropdown-seperator/dropdown-separator.tsx"],"sourcesContent":["// dropdown-separator.scss\n@use \"~@infineon/design-system-tokens/dist/tokens\";\n\n.dropdown-separator {\n height: 1px;\n background-color: tokens.$ifxColorEngineering200;\n margin: 8px 16px;\n}","// dropdown-separator.tsx\nimport { Component, h } from \"@stencil/core\";\n\n@Component({\n tag: 'ifx-dropdown-separator',\n styleUrl: 'dropdown-separator.scss',\n shadow: true\n})\n\nexport class DropdownSeparator {\n render() {\n return (\n <div class='dropdown-separator'></div>\n )\n }\n}"],"version":3}

View File

@ -0,0 +1,28 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca0e0765.js');
const dropdownTriggerButtonCss = ":host{display:inline-block}.rotate{transition:transform 0.2s ease-in-out;transform:rotate(-180deg);margin-top:0em}.icon{margin-top:0em;transition:transform 0.2s ease-in-out}";
const DropdownItem = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.isOpen = false;
this.theme = 'default';
this.variant = undefined;
this.size = 'm';
this.disabled = undefined;
this.hideArrow = false;
}
render() {
return (index.h("ifx-button", { variant: this.variant, theme: this.theme, size: this.size, disabled: this.disabled, class: "dropdown-trigger-button" }, index.h("slot", null), !this.hideArrow &&
index.h("ifx-icon", { icon: "chevron-down-12", class: `icon${this.isOpen ? ' rotate' : ''}` })));
}
};
DropdownItem.style = dropdownTriggerButtonCss;
exports.ifx_dropdown_trigger_button = DropdownItem;
//# sourceMappingURL=ifx-dropdown-trigger-button.cjs.entry.js.map

View File

@ -0,0 +1 @@
{"file":"ifx-dropdown-trigger-button.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,wBAAwB,GAAG,+KAA+K;;MCUnM,YAAY;;;kBACG,KAAK;iBAEmB,SAAS;;gBAEjC,GAAG;;qBAEA,KAAK;;EAElC,MAAM;IACJ,QACEA,wBACE,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,KAAK,EAAC,yBAAyB,IAE/BA,qBAAQ,EACP,CAAC,IAAI,CAAC,SAAS;MACdA,sBAAU,IAAI,EAAC,iBAAiB,EAAC,KAAK,EAAE,OAAO,IAAI,CAAC,MAAM,GAAG,SAAS,GAAG,EAAE,EAAE,GAAI,CAExE,EACd;GACF;;;;;;","names":["h"],"sources":["src/components/dropdown/dropdown-trigger-button/dropdown-trigger-button.scss?tag=ifx-dropdown-trigger-button&encapsulation=shadow","src/components/dropdown/dropdown-trigger-button/dropdown-trigger-button.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n\n:host {\n display: inline-block;\n}\n\n.rotate {\n transition: transform 0.2s ease-in-out;\n transform: rotate(-180deg);\n margin-top: 0em;\n}\n\n.icon {\n margin-top: 0em;\n transition: transform 0.2s ease-in-out;\n}\n","// dropdown-trigger-button.tsx\nimport { Component, Prop, h } from \"@stencil/core\";\nimport { IOpenable } from '../IOpenable';\n\n@Component({\n tag: 'ifx-dropdown-trigger-button',\n styleUrl: 'dropdown-trigger-button.scss',\n shadow: true\n})\n\nexport class DropdownItem implements IOpenable {\n @Prop() isOpen: boolean = false;\n\n @Prop() theme: 'default' | 'danger' | 'inverse' = 'default';\n @Prop() variant: 'primary';\n @Prop() size: 's' | 'm' = 'm';\n @Prop() disabled: boolean;\n @Prop() hideArrow: boolean = false;\n\n render() {\n return (\n <ifx-button\n variant={this.variant}\n theme={this.theme}\n size={this.size}\n disabled={this.disabled}\n class=\"dropdown-trigger-button\"\n >\n <slot />\n {!this.hideArrow &&\n <ifx-icon icon=\"chevron-down-12\" class={`icon${this.isOpen ? ' rotate' : ''}`} />\n }\n </ifx-button>\n )\n }\n}"],"version":3}

View File

@ -0,0 +1,22 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca0e0765.js');
const dropdownTriggerCss = ":host{display:inline-block;cursor:pointer}";
const DropdownItem = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.isOpen = false;
}
render() {
return (index.h("slot", null));
}
};
DropdownItem.style = dropdownTriggerCss;
exports.ifx_dropdown_trigger = DropdownItem;
//# sourceMappingURL=ifx-dropdown-trigger.cjs.entry.js.map

View File

@ -0,0 +1 @@
{"file":"ifx-dropdown-trigger.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,kBAAkB,GAAG,4CAA4C;;MCU1D,YAAY;;;kBACG,KAAK;;EAE/B,MAAM;IACJ,QACEA,qBAAQ,EACT;GACF;;;;;;","names":["h"],"sources":["src/components/dropdown/dropdown-trigger/dropdown-trigger.scss?tag=ifx-dropdown-trigger&encapsulation=shadow","src/components/dropdown/dropdown-trigger/dropdown-trigger.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n\n:host {\n display: inline-block;\n cursor: pointer;\n}","// dropdown-trigger-button.tsx\nimport { Component, Prop, h } from \"@stencil/core\";\nimport { IOpenable } from '../IOpenable';\n\n@Component({\n tag: 'ifx-dropdown-trigger',\n styleUrl: 'dropdown-trigger.scss',\n shadow: true\n})\n\nexport class DropdownItem implements IOpenable {\n @Prop() isOpen: boolean = false;\n\n render() {\n return (\n <slot />\n )\n }\n}"],"version":3}

View File

@ -0,0 +1,153 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca0e0765.js');
const popper = require('./popper-9a6aec9e.js');
const dropdownCss = ":host{display:inline-block}";
const Dropdown = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.ifxOpen = index.createEvent(this, "ifxOpen", 7);
this.ifxClose = index.createEvent(this, "ifxClose", 7);
this.ifxDropdown = index.createEvent(this, "ifxDropdown", 7);
this.placement = 'bottom-start';
this.defaultOpen = false;
this.internalIsOpen = false;
this.noAppendToBody = false;
this.disabled = undefined;
this.noCloseOnOutsideClick = false;
this.noCloseOnMenuClick = false;
this.trigger = undefined;
this.menu = undefined;
}
componentWillLoad() {
//maybe not needed
this.updateSlotContent();
this.watchHandlerIsOpen(this.defaultOpen, this.internalIsOpen);
}
watchHandlerIsOpen(newValue, oldValue) {
if (newValue !== oldValue && newValue !== this.internalIsOpen) {
if (newValue) {
this.openDropdown();
}
else {
this.closeDropdown();
}
}
}
watchHandlerDisabled(newValue) {
if (this.trigger) {
this.trigger.disabled = newValue;
}
}
watchHandlerSlot() {
this.updateSlotContent();
}
// handling assignment of trigger and menu
updateSlotContent() {
// Get dropdown trigger. name has to start with ifx-dropdown-trigger
this.trigger = this.el.querySelector('ifx-dropdown-trigger-button, ifx-dropdown-trigger');
if (this.trigger) {
this.trigger.disabled = this.disabled;
this.trigger.removeEventListener('click', this.triggerClickHandler.bind(this));
this.trigger.addEventListener('click', this.triggerClickHandler.bind(this));
}
// Remove menu if exists from body
if (!this.noAppendToBody) {
if (this.menu) {
this.menu.remove();
}
// Get new menu and add to body
this.menu = this.el.querySelector('ifx-dropdown-menu');
// event handler for closing dropdown on menu click
document.body.append(this.menu);
}
else {
this.menu = this.el.querySelector('ifx-dropdown-menu');
}
this.menu.removeEventListener('click', this.menuClickHandler.bind(this));
this.menu.addEventListener('click', this.menuClickHandler.bind(this));
}
menuClickHandler() {
if (!this.noCloseOnMenuClick) {
this.closeDropdown();
}
}
triggerClickHandler() {
if (!this.internalIsOpen) {
this.openDropdown();
}
else {
this.closeDropdown();
}
}
disconnectedCallback() {
// Destroy popper instance if exists
if (this.popperInstance) {
this.popperInstance.destroy();
this.popperInstance = null;
}
// Remove menu if exists
if (this.menu) {
this.menu.remove();
}
}
async isOpen() {
return this.internalIsOpen;
}
async closeDropdown() {
if (this.internalIsOpen) {
this.internalIsOpen = false;
// sets isOpen prop on trigger and menu
this.trigger.isOpen = false;
this.menu.isOpen = false;
// Emit close event
this.ifxClose.emit();
}
// Destroy popper instance if exists
if (this.popperInstance) {
this.popperInstance.destroy();
this.popperInstance = null;
}
}
async openDropdown() {
if (!this.internalIsOpen && !this.disabled) {
this.internalIsOpen = true;
// sets isOpen prop on trigger and menu
this.trigger.isOpen = true;
this.menu.isOpen = true;
// Create popper instance for positioning
this.popperInstance = popper.createPopper(this.el, this.menu, { placement: this.placement });
this.ifxOpen.emit();
}
}
//emitted by and listening to it from the dropdown menu right now
// @Listen('ifxDropdownMenu')
// handleDropdownMenuEvents(event: CustomEvent) {
// this.ifxDropdown.emit(event.detail)
// console.log('Selected item received in higher-level parent:');
// }
handleOutsideClick(event) {
const target = event.target;
// Close dropdown if outside click
if (!this.noCloseOnOutsideClick && !this.el.contains(target) && !this.menu.contains(target)) {
this.closeDropdown();
}
}
render() {
return (index.h("div", { "aria-label": 'dropdown menu', class: 'dropdown' }, index.h("slot", null)));
}
get el() { return index.getElement(this); }
static get watchers() { return {
"defaultOpen": ["watchHandlerIsOpen"],
"disabled": ["watchHandlerDisabled"]
}; }
};
Dropdown.style = dropdownCss;
exports.ifx_dropdown = Dropdown;
//# sourceMappingURL=ifx-dropdown.cjs.entry.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,21 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca0e0765.js');
const faqCss = ".container{padding-top:10px}";
const Faq = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
}
render() {
return (index.h("div", { class: 'container' }, index.h("ifx-accordion", null, index.h("ifx-accordion-item", { caption: "What is the Infineon DDS?" }, "The Infineon Digital Design System consists of code components, design principles, tools and guidelines as well as a dedicated interdisciplinary team. Its purpose is to support internal and external colleagues create digital user interfaces with a high level of usability as well as a consistent expression of the Infineon brand. The DDS does not focus on the content of a web application but it describes how the design of the application\u2019s structure should be."), index.h("ifx-accordion-item", { caption: "How do I get access to the DDS?" }, "You can use the provided Figma file as a foundation for mockups and prototypes, use Storybook to view what UI components and variants are available and use code components provided via Storybook or Github."), index.h("ifx-accordion-item", { caption: "Can I integrate the Infineon DDS into my project?" }, "Yes, you can. We are happy to discuss with you which point in time and which scope of integration is bestsuited for updating your interface to the Infineon DDS. (To avoid that users get confused by a mixture of UI components, we recommend choosing larger updates or technology changes as opportunity to integrate the Infineon DDS.)"), index.h("ifx-accordion-item", { caption: "Are Infineon DDS components accessable?" }, "We have taken WCAG 2.0 Level AA as baseline level for all design decisions inside the Infineon Digital Design System. To make an online experience truly accessible you have to implement the specific code, content, and visual design according to the accessibility standard. Find an introduction to this topic here."), index.h("ifx-accordion-item", { caption: "How to request a new component?" }, "Please contact us like described in the contribution section! We are planning to expand the number of components continually. If your component is also usable for multiple other projects, there is a good chance we might work together with you."))));
}
};
Faq.style = faqCss;
exports.ifx_faq = Faq;
//# sourceMappingURL=ifx-faq.cjs.entry.js.map

View File

@ -0,0 +1 @@
{"file":"ifx-faq.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,MAAM,GAAG,8BAA8B;;MCOhC,GAAG;;;;EAEd,MAAM;IACJ,QACEA,iBAAK,KAAK,EAAC,WAAW,IACtBA,+BACEA,gCAAoB,OAAO,EAAC,2BAA2B,0dAElC,EACrBA,gCAAoB,OAAO,EAAC,iCAAiC,oNAExC,EACrBA,gCAAoB,OAAO,EAAC,mDAAmD,kVAE1D,EACrBA,gCAAoB,OAAO,EAAC,yCAAyC,gUAEhD,EACrBA,gCAAoB,OAAO,EAAC,iCAAiC,0PAExC,CACP,CACV,EACN;GACH;;;;;;","names":["h"],"sources":["src/stories/setup-and-installation/faq/faq.scss?tag=ifx-faq&encapsulation=shadow","src/stories/setup-and-installation/faq/faq.tsx"],"sourcesContent":[".container { \n padding-top: 10px;\n}","import { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'ifx-faq',\n styleUrl: './faq.scss',\n shadow: true,\n})\nexport class Faq {\n\n render() {\n return (\n <div class='container'>\n <ifx-accordion>\n <ifx-accordion-item caption=\"What is the Infineon DDS?\">\n The Infineon Digital Design System consists of code components, design principles, tools and guidelines as well as a dedicated interdisciplinary team. Its purpose is to support internal and external colleagues create digital user interfaces with a high level of usability as well as a consistent expression of the Infineon brand. The DDS does not focus on the content of a web application but it describes how the design of the applications structure should be.\n </ifx-accordion-item>\n <ifx-accordion-item caption=\"How do I get access to the DDS?\">\n You can use the provided Figma file as a foundation for mockups and prototypes, use Storybook to view what UI components and variants are available and use code components provided via Storybook or Github.\n </ifx-accordion-item>\n <ifx-accordion-item caption=\"Can I integrate the Infineon DDS into my project?\">\n Yes, you can. We are happy to discuss with you which point in time and which scope of integration is bestsuited for updating your interface to the Infineon DDS. (To avoid that users get confused by a mixture of UI components, we recommend choosing larger updates or technology changes as opportunity to integrate the Infineon DDS.)\n </ifx-accordion-item>\n <ifx-accordion-item caption=\"Are Infineon DDS components accessable?\">\n We have taken WCAG 2.0 Level AA as baseline level for all design decisions inside the Infineon Digital Design System. To make an online experience truly accessible you have to implement the specific code, content, and visual design according to the accessibility standard. Find an introduction to this topic here.\n </ifx-accordion-item>\n <ifx-accordion-item caption=\"How to request a new component?\">\n Please contact us like described in the contribution section! We are planning to expand the number of components continually. If your component is also usable for multiple other projects, there is a good chance we might work together with you.\n </ifx-accordion-item>\n </ifx-accordion>\n </div>\n );\n }\n}\n"],"version":3}

View File

@ -0,0 +1,22 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca0e0765.js');
const footerColumnCss = ":root{--ifx-font-family:\"Source Sans 3\";font-family:var(--ifx-font-family, sans-serif)}.col{display:flex;flex-direction:column;gap:12px;padding-right:8px;color:#1D1D1D;font-family:var(--ifx-font-family)}.col ::slotted([slot=title]){box-sizing:border-box;font-weight:600;font-size:1rem;line-height:1.5rem;margin:0;padding:0}.col span{display:flex;flex-direction:column;gap:12px;color:#1D1D1D}.col span ::slotted([slot=link]){box-sizing:border-box;font-weight:400;font-size:1rem;line-height:1.5rem}";
const Card = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
}
render() {
return (index.h("div", { class: "col" }, index.h("slot", { name: "title" }), index.h("span", { "aria-label": 'navigation link' }, index.h("slot", { name: "link" }))));
}
get el() { return index.getElement(this); }
};
Card.style = footerColumnCss;
exports.ifx_footer_column = Card;
//# sourceMappingURL=ifx-footer-column.cjs.entry.js.map

View File

@ -0,0 +1 @@
{"file":"ifx-footer-column.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,ofAAof;;MCQ/f,IAAI;;;;EAIf,MAAM;IACJ,QACEA,iBAAK,KAAK,EAAC,KAAK,IACdA,kBAAM,IAAI,EAAC,OAAO,GAAG,EACrBA,gCAAiB,iBAAiB,IAChCA,kBAAM,IAAI,EAAC,MAAM,GAAG,CACf,CACH,EACN;GACH;;;;;;;","names":["h"],"sources":["src/components/footer/footer-column.scss?tag=ifx-footer-column&encapsulation=shadow","src/components/footer/footer-column.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n\n.col {\n display: flex;\n flex-direction: column;\n gap: tokens.$ifxSpace150;\n padding-right: 8px;\n color: tokens.$ifxColorBaseBlack;\n font-family: var(--ifx-font-family);\n\n & ::slotted([slot=title]) {\n box-sizing: border-box;\n font-weight: tokens.$ifxFontWeightSemibold;\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightM;\n margin: 0;\n padding: 0;\n }\n\n & span {\n display: flex;\n flex-direction: column;\n gap: tokens.$ifxSpace150;\n color: tokens.$ifxColorBaseBlack;\n\n & ::slotted([slot=link]) {\n box-sizing: border-box;\n font-weight: 400;\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightM;\n }\n }\n}","import { Component, h, Element } from '@stencil/core';\n\n@Component({\n tag: 'ifx-footer-column',\n styleUrl: './footer-column.scss',\n shadow: true,\n})\n\nexport class Card {\n @Element() el;\n\n\n render() {\n return (\n <div class=\"col\">\n <slot name=\"title\" />\n <span aria-label='navigation link'>\n <slot name=\"link\" />\n </span>\n </div>\n );\n }\n}\n"],"version":3}

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More