diff --git a/package-lock.json b/package-lock.json index f1d0d1ba71..505daf0e24 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2922,150 +2922,6 @@ "node": ">= 10" } }, - "node_modules/@lerna/create/node_modules/@nx/nx-darwin-x64": { - "version": "16.10.0", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-16.10.0.tgz", - "integrity": "sha512-ypi6YxwXgb0kg2ixKXE3pwf5myVNUgWf1CsV5OzVccCM8NzheMO51KDXTDmEpXdzUsfT0AkO1sk5GZeCjhVONg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@lerna/create/node_modules/@nx/nx-freebsd-x64": { - "version": "16.10.0", - "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-16.10.0.tgz", - "integrity": "sha512-UeEYFDmdbbDkTQamqvtU8ibgu5jQLgFF1ruNb/U4Ywvwutw2d4ruOMl2e0u9hiNja9NFFAnDbvzrDcMo7jYqYw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@lerna/create/node_modules/@nx/nx-linux-arm-gnueabihf": { - "version": "16.10.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-16.10.0.tgz", - "integrity": "sha512-WV3XUC2DB6/+bz1sx+d1Ai9q2Cdr+kTZRN50SOkfmZUQyEBaF6DRYpx/a4ahhxH3ktpNfyY8Maa9OEYxGCBkQA==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@lerna/create/node_modules/@nx/nx-linux-arm64-gnu": { - "version": "16.10.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-16.10.0.tgz", - "integrity": "sha512-aWIkOUw995V3ItfpAi5FuxQ+1e9EWLS1cjWM1jmeuo+5WtaKToJn5itgQOkvSlPz+HSLgM3VfXMvOFALNk125g==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@lerna/create/node_modules/@nx/nx-linux-arm64-musl": { - "version": "16.10.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-16.10.0.tgz", - "integrity": "sha512-uO6Gg+irqpVcCKMcEPIQcTFZ+tDI02AZkqkP7koQAjniLEappd8DnUBSQdcn53T086pHpdc264X/ZEpXFfrKWQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@lerna/create/node_modules/@nx/nx-linux-x64-gnu": { - "version": "16.10.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-16.10.0.tgz", - "integrity": "sha512-134PW/u/arNFAQKpqMJniC7irbChMPz+W+qtyKPAUXE0XFKPa7c1GtlI/wK2dvP9qJDZ6bKf0KtA0U/m2HMUOA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@lerna/create/node_modules/@nx/nx-linux-x64-musl": { - "version": "16.10.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-16.10.0.tgz", - "integrity": "sha512-q8sINYLdIJxK/iUx9vRk5jWAWb/2O0PAbOJFwv4qkxBv4rLoN7y+otgCZ5v0xfx/zztFgk/oNY4lg5xYjIso2Q==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@lerna/create/node_modules/@nx/nx-win32-arm64-msvc": { - "version": "16.10.0", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-16.10.0.tgz", - "integrity": "sha512-moJkL9kcqxUdJSRpG7dET3UeLIciwrfP08mzBQ12ewo8K8FzxU8ZUsTIVVdNrwt01CXOdXoweGfdQLjJ4qTURA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@lerna/create/node_modules/@nx/nx-win32-x64-msvc": { - "version": "16.10.0", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-16.10.0.tgz", - "integrity": "sha512-5iV2NKZnzxJwZZ4DM5JVbRG/nkhAbzEskKaLBB82PmYGKzaDHuMHP1lcPoD/rtYMlowZgNA/RQndfKvPBPwmXA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, "node_modules/@lerna/create/node_modules/glob": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", @@ -5763,159 +5619,6 @@ "node": ">= 10" } }, - "node_modules/@nrwl/devkit/node_modules/@nx/nx-darwin-x64": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-17.3.2.tgz", - "integrity": "sha512-5F28wrfE7yU60MzEXGjndy1sPJmNMIaV2W/g82kTXzxAbGHgSjwrGFmrJsrexzLp9oDlWkbc6YmInKV8gmmIaQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "peer": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nrwl/devkit/node_modules/@nx/nx-freebsd-x64": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-17.3.2.tgz", - "integrity": "sha512-07MMTfsJooONqL1Vrm5L6qk/gzmSrYLazjkiTmJz+9mrAM61RdfSYfO3mSyAoyfgWuQ5yEvfI56P036mK8aoPg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "peer": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nrwl/devkit/node_modules/@nx/nx-linux-arm-gnueabihf": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-17.3.2.tgz", - "integrity": "sha512-gQxMF6U/h18Rz+FZu50DZCtfOdk27hHghNh3d3YTeVsrJTd1SmUQbYublmwU/ia1HhFS8RVI8GvkaKt5ph0HoA==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nrwl/devkit/node_modules/@nx/nx-linux-arm64-gnu": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-17.3.2.tgz", - "integrity": "sha512-X20wiXtXmKlC01bpVEREsRls1uVOM22xDTpqILvVty6+P+ytEYFR3Vs5EjDtzBKF51wjrwf03rEoToZbmgM8MA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nrwl/devkit/node_modules/@nx/nx-linux-arm64-musl": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-17.3.2.tgz", - "integrity": "sha512-yko3Xsezkn4tjeudZYLjxFl07X/YB84K+DLK7EFyh9elRWV/8VjFcQmBAKUS2r9LfaEMNXq8/vhWMOWYyWBrIA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nrwl/devkit/node_modules/@nx/nx-linux-x64-gnu": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-17.3.2.tgz", - "integrity": "sha512-RiPvvQMmlZmDu9HdT6n6sV0+fEkyAqR5VocrD5ZAzEzFIlh4dyVLripFR3+MD+QhIhXyPt/hpri1kq9sgs4wnw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nrwl/devkit/node_modules/@nx/nx-linux-x64-musl": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-17.3.2.tgz", - "integrity": "sha512-PWfVGmFsFJi+N1Nljg/jTKLHdufpGuHlxyfHqhDso/o4Qc0exZKSeZ1C63WkD7eTcT5kInifTQ/PffLiIDE3MA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nrwl/devkit/node_modules/@nx/nx-win32-arm64-msvc": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-17.3.2.tgz", - "integrity": "sha512-O+4FFPbQz1mqaIj+SVE02ppe7T9ELj7Z5soQct5TbRRhwjGaw5n5xaPPBW7jUuQe2L5htid1E82LJyq3JpVc8A==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "peer": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nrwl/devkit/node_modules/@nx/nx-win32-x64-msvc": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-17.3.2.tgz", - "integrity": "sha512-4hQm+7coy+hBqGY9J709hz/tUPijhf/WS7eML2r2xBmqBew3PMHfeZuaAAYWN690nIsu0WX3wyDsNjulR8HGPQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "peer": true, - "engines": { - "node": ">= 10" - } - }, "node_modules/@nrwl/devkit/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -6162,150 +5865,6 @@ "node": ">= 10" } }, - "node_modules/@nx/nx-darwin-x64": { - "version": "18.3.4", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-18.3.4.tgz", - "integrity": "sha512-tSzPRnNB3QdPM+KYiIuRCUtyCwcuIRC95FfP0ZB3WvfDeNxJChEAChNqmCMDE4iFvZhGuze8WqkJuIVdte+lyQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nx/nx-freebsd-x64": { - "version": "18.3.4", - "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-18.3.4.tgz", - "integrity": "sha512-bjSPak/d+bcR95/pxHMRhnnpHc6MnrQcG6f5AjX15Esm4JdrdQKPBmG1RybuK0WKSyD5wgVhkAGc/QQUom9l8g==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nx/nx-linux-arm-gnueabihf": { - "version": "18.3.4", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-18.3.4.tgz", - "integrity": "sha512-/1HnUL7jhH0S7PxJqf6R1pk3QlAU22GY89EQV9fd+RDUtp7IyzaTlkebijTIqfxlSjC4OO3bPizaxEaxdd3uKQ==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nx/nx-linux-arm64-gnu": { - "version": "18.3.4", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-18.3.4.tgz", - "integrity": "sha512-g/2IaB2bZTKaBNPEf9LxtIXb1XHdhh3VO9PnePIrwkkixPMLN0dTxT5Sttt75lvLP3EU1AUR5w3Aaz2Q1mYtWA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nx/nx-linux-arm64-musl": { - "version": "18.3.4", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-18.3.4.tgz", - "integrity": "sha512-MgfKLoEF6I1cCS+0ooFLEjJSSVdCYyCT9Q96IHRJntAEL8u/0GR2OUoBoLC+q1lnbIkJr/uqTJxA2Jh+sJTIbA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nx/nx-linux-x64-gnu": { - "version": "18.3.4", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-18.3.4.tgz", - "integrity": "sha512-vbHxv7m3gjthBvw50EYCtgyY0Zg5nVTaQtX+wRsmKybV2i7wHbw5zIe1aL4zHUm6TcPGbIQK+utVM+hyCqKHVA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nx/nx-linux-x64-musl": { - "version": "18.3.4", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-18.3.4.tgz", - "integrity": "sha512-qIJKJCYFRLVSALsvg3avjReOjuYk91Q0hFXMJ2KaEM1Y3tdzcFN0fKBiaHexgbFIUk8zJuS4dJObTqSYMXowbg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nx/nx-win32-arm64-msvc": { - "version": "18.3.4", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-18.3.4.tgz", - "integrity": "sha512-UxC8mRkFTPdZbKFprZkiBqVw8624xU38kI0xyooxKlFpt5lccTBwJ0B7+R8p1RoWyvh2DSyFI9VvfD7lczg1lA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nx/nx-win32-x64-msvc": { - "version": "18.3.4", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-18.3.4.tgz", - "integrity": "sha512-/RqEjNU9hxIBxRLafCNKoH3SaB2FShf+1ZnIYCdAoCZBxLJebDpnhiyrVs0lPnMj9248JbizEMdJj1+bs/bXig==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, "node_modules/@octokit/auth-token": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.4.tgz", @@ -17914,150 +17473,6 @@ "node": ">= 10" } }, - "node_modules/lerna/node_modules/@nx/nx-darwin-x64": { - "version": "16.10.0", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-16.10.0.tgz", - "integrity": "sha512-ypi6YxwXgb0kg2ixKXE3pwf5myVNUgWf1CsV5OzVccCM8NzheMO51KDXTDmEpXdzUsfT0AkO1sk5GZeCjhVONg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/lerna/node_modules/@nx/nx-freebsd-x64": { - "version": "16.10.0", - "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-16.10.0.tgz", - "integrity": "sha512-UeEYFDmdbbDkTQamqvtU8ibgu5jQLgFF1ruNb/U4Ywvwutw2d4ruOMl2e0u9hiNja9NFFAnDbvzrDcMo7jYqYw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/lerna/node_modules/@nx/nx-linux-arm-gnueabihf": { - "version": "16.10.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-16.10.0.tgz", - "integrity": "sha512-WV3XUC2DB6/+bz1sx+d1Ai9q2Cdr+kTZRN50SOkfmZUQyEBaF6DRYpx/a4ahhxH3ktpNfyY8Maa9OEYxGCBkQA==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/lerna/node_modules/@nx/nx-linux-arm64-gnu": { - "version": "16.10.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-16.10.0.tgz", - "integrity": "sha512-aWIkOUw995V3ItfpAi5FuxQ+1e9EWLS1cjWM1jmeuo+5WtaKToJn5itgQOkvSlPz+HSLgM3VfXMvOFALNk125g==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/lerna/node_modules/@nx/nx-linux-arm64-musl": { - "version": "16.10.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-16.10.0.tgz", - "integrity": "sha512-uO6Gg+irqpVcCKMcEPIQcTFZ+tDI02AZkqkP7koQAjniLEappd8DnUBSQdcn53T086pHpdc264X/ZEpXFfrKWQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/lerna/node_modules/@nx/nx-linux-x64-gnu": { - "version": "16.10.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-16.10.0.tgz", - "integrity": "sha512-134PW/u/arNFAQKpqMJniC7irbChMPz+W+qtyKPAUXE0XFKPa7c1GtlI/wK2dvP9qJDZ6bKf0KtA0U/m2HMUOA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/lerna/node_modules/@nx/nx-linux-x64-musl": { - "version": "16.10.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-16.10.0.tgz", - "integrity": "sha512-q8sINYLdIJxK/iUx9vRk5jWAWb/2O0PAbOJFwv4qkxBv4rLoN7y+otgCZ5v0xfx/zztFgk/oNY4lg5xYjIso2Q==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/lerna/node_modules/@nx/nx-win32-arm64-msvc": { - "version": "16.10.0", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-16.10.0.tgz", - "integrity": "sha512-moJkL9kcqxUdJSRpG7dET3UeLIciwrfP08mzBQ12ewo8K8FzxU8ZUsTIVVdNrwt01CXOdXoweGfdQLjJ4qTURA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/lerna/node_modules/@nx/nx-win32-x64-msvc": { - "version": "16.10.0", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-16.10.0.tgz", - "integrity": "sha512-5iV2NKZnzxJwZZ4DM5JVbRG/nkhAbzEskKaLBB82PmYGKzaDHuMHP1lcPoD/rtYMlowZgNA/RQndfKvPBPwmXA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, "node_modules/lerna/node_modules/glob": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", diff --git a/packages/openscd/src/translations/de.ts b/packages/openscd/src/translations/de.ts index 544d9c2d5b..81d1e88891 100644 --- a/packages/openscd/src/translations/de.ts +++ b/packages/openscd/src/translations/de.ts @@ -272,6 +272,29 @@ export const de: Translations = { }, }, }, + ln: { + wizard: { + title: { + edit: 'LN bearbeiten', + }, + descHelper: 'Logical Node Beschreibung', + lnTypeHelper: 'Logical Node Typ', + prefixHelper: 'Prefix des Logical Nodes', + lnClassHelper: 'Logical Node Klasse', + instHelper: 'Instanz', + } + }, + ln0: { + wizard: { + title: { + edit: 'LN0 bearbeiten', + }, + descHelper: 'Logical Node Beschreibung', + lnTypeHelper: 'Logical Node Typ', + lnClassHelper: 'Logical Node Klasse', + instHelper: 'Instanz', + } + }, powertransformer: { wizard: { nameHelper: '`Name des Leistungstransformators', diff --git a/packages/openscd/src/translations/en.ts b/packages/openscd/src/translations/en.ts index 5a7c2867b2..156be665bb 100644 --- a/packages/openscd/src/translations/en.ts +++ b/packages/openscd/src/translations/en.ts @@ -269,6 +269,29 @@ export const en = { }, }, }, + ln: { + wizard: { + title: { + edit: 'Edit LN', + }, + descHelper: 'Logical node description', + lnTypeHelper: 'Logical node type', + prefixHelper: 'Prefix of the logical node', + lnClassHelper: 'Logical node class', + instHelper: 'Instance', + } + }, + ln0: { + wizard: { + title: { + edit: 'Edit LN0', + }, + descHelper: 'Logical node description', + lnTypeHelper: 'Logical node type', + lnClassHelper: 'Logical node class', + instHelper: 'Instance', + } + }, powertransformer: { wizard: { nameHelper: 'Power transformer name', diff --git a/packages/plugins/src/editors/ied/ln-container.ts b/packages/plugins/src/editors/ied/ln-container.ts index 383b2891c6..190b65a295 100644 --- a/packages/plugins/src/editors/ied/ln-container.ts +++ b/packages/plugins/src/editors/ied/ln-container.ts @@ -6,6 +6,7 @@ import { get } from 'lit-translate'; import { getInstanceAttribute, getNameAttribute, + newWizardEvent, } from '@openscd/open-scd/src/foundation.js'; import { IconButtonToggle } from '@material/mwc-icon-button-toggle'; @@ -13,6 +14,7 @@ import '@openscd/open-scd/src/action-pane.js'; import './do-container.js'; import { Container } from './foundation.js'; +import { wizards } from '../../wizards/wizard-library.js'; /** [[`IED`]] plugin subeditor for editing `LN` and `LN0` element. */ @customElement('ln-container') @@ -23,11 +25,13 @@ export class LNContainer extends Container { private header(): TemplateResult { const prefix = this.element.getAttribute('prefix'); const inst = getInstanceAttribute(this.element); + const desc = this.element.getAttribute('desc'); const data = this.nsdoc.getDataDescription(this.element); return html`${prefix != null ? html`${prefix} — ` : nothing} - ${data.label} ${inst ? html` — ${inst}` : nothing}`; + ${data.label} ${inst ? html` — ${inst}` : nothing} + ${desc ? html` — ${desc}` : nothing}`; } /** @@ -55,12 +59,26 @@ export class LNContainer extends Container { return this.element.querySelector(`:scope > DOI[name="${doName}"]`); } + private openEditWizard(): void { + const wizardType = this.element.tagName === 'LN' ? 'LN' : 'LN0'; + const wizard = wizards[wizardType].edit(this.element); + if (wizard) this.dispatchEvent(newWizardEvent(wizard)); + } + render(): TemplateResult { const doElements = this.getDOElements(); return html` ${doElements.length > 0 - ? html` + + + diff --git a/packages/plugins/src/wizards/ln.ts b/packages/plugins/src/wizards/ln.ts new file mode 100644 index 0000000000..ba4ff37543 --- /dev/null +++ b/packages/plugins/src/wizards/ln.ts @@ -0,0 +1,99 @@ +import { html, TemplateResult } from 'lit-element'; +import { get } from 'lit-translate'; + +import '@openscd/open-scd/src/wizard-textfield.js'; +import { + getValue, + Wizard, + WizardActor, + WizardInputElement, +} from '@openscd/open-scd/src/foundation.js'; + +import { cloneElement } from '@openscd/xml'; + +import { SimpleAction } from '@openscd/core/foundation/deprecated/editor.js'; +import { patterns } from './foundation/limits.js'; + +export function renderLNWizard( + lnType: string | null, + desc: string | null, + prefix: string | null, + lnClass: string | null, + inst: string | null +): TemplateResult[] { + return [ + html``, + html``, + html``, + html``, + html``, + ]; +} + +function updateAction(element: Element): WizardActor { + return (inputs: WizardInputElement[]): SimpleAction[] => { + const ldAttrs: Record = {}; + const ldKeys = ['lnType', 'desc', 'prefix', 'lnClass', 'inst']; + ldKeys.forEach(key => { + ldAttrs[key] = getValue(inputs.find(i => i.label === key)!); + }); + + if (ldKeys.some(key => ldAttrs[key] !== element.getAttribute(key))) { + const newElement = cloneElement(element, ldAttrs); + return [ + { + old: { element }, + new: { element: newElement }, + }, + ]; + } + return []; + }; +} + + +export function editLNWizard(element: Element): Wizard { + return [ + { + title: get('ln.wizard.title.edit'), + element, + primary: { + icon: 'edit', + label: get('save'), + action: updateAction(element), + }, + content: renderLNWizard( + element.getAttribute('lnType'), + element.getAttribute('desc'), + element.getAttribute('prefix'), + element.getAttribute('lnClass'), + element.getAttribute('inst') + ), + }, + ]; +} diff --git a/packages/plugins/src/wizards/ln0.ts b/packages/plugins/src/wizards/ln0.ts new file mode 100644 index 0000000000..f66244a3bc --- /dev/null +++ b/packages/plugins/src/wizards/ln0.ts @@ -0,0 +1,91 @@ +import { html, TemplateResult } from 'lit-element'; +import { get } from 'lit-translate'; + +import '@openscd/open-scd/src/wizard-textfield.js'; +import { + getValue, + Wizard, + WizardActor, + WizardInputElement, +} from '@openscd/open-scd/src/foundation.js'; + +import { cloneElement } from '@openscd/xml'; + +import { SimpleAction } from '@openscd/core/foundation/deprecated/editor.js'; +import { patterns } from './foundation/limits.js'; + +export function renderLN0Wizard( + lnType: string | null, + desc: string | null, + lnClass: string | null, + inst: string | null +): TemplateResult[] { + return [ + html``, + html``, + html``, + html``, + ]; +} + +function updateAction(element: Element): WizardActor { + return (inputs: WizardInputElement[]): SimpleAction[] => { + const ldAttrs: Record = {}; + const ldKeys = ['lnType', 'desc', 'lnClass', 'inst']; + ldKeys.forEach(key => { + ldAttrs[key] = getValue(inputs.find(i => i.label === key)!); + }); + + if (ldKeys.some(key => ldAttrs[key] !== element.getAttribute(key))) { + const newElement = cloneElement(element, ldAttrs); + return [ + { + old: { element }, + new: { element: newElement }, + }, + ]; + } + return []; + }; +} + + +export function editLN0Wizard(element: Element): Wizard { + return [ + { + title: get('ln0.wizard.title.edit'), + element, + primary: { + icon: 'edit', + label: get('save'), + action: updateAction(element), + }, + content: renderLN0Wizard( + element.getAttribute('lnType'), + element.getAttribute('desc'), + element.getAttribute('lnClass'), + element.getAttribute('inst') + ), + }, + ]; +} diff --git a/packages/plugins/src/wizards/wizard-library.ts b/packages/plugins/src/wizards/wizard-library.ts index df9b982a15..56eb2457c0 100644 --- a/packages/plugins/src/wizards/wizard-library.ts +++ b/packages/plugins/src/wizards/wizard-library.ts @@ -52,6 +52,8 @@ import { import { createTapChangerWizard, editTapChangerWizard } from './tapchanger.js'; import { createLineWizard, editLineWizard } from './line.js'; import { createProcessWizard, editProcessWizard } from './process.js'; +import { editLNWizard } from './ln.js'; +import { editLN0Wizard } from './ln0.js'; type SclElementWizard = ( element: Element, @@ -322,11 +324,11 @@ export const wizards: Record< create: emptyWizard, }, LN: { - edit: emptyWizard, + edit: editLNWizard, create: emptyWizard, }, LN0: { - edit: emptyWizard, + edit: editLN0Wizard, create: emptyWizard, }, LNode: { diff --git a/packages/plugins/test/unit/editors/ied/__snapshots__/ln-container.test.snap.js b/packages/plugins/test/unit/editors/ied/__snapshots__/ln-container.test.snap.js index 5e3e71bde1..a1bd1625d6 100644 --- a/packages/plugins/test/unit/editors/ied/__snapshots__/ln-container.test.snap.js +++ b/packages/plugins/test/unit/editors/ied/__snapshots__/ln-container.test.snap.js @@ -3,6 +3,14 @@ export const snapshots = {}; snapshots["looks like the latest snapshot with a LN0 element."] = ` + + + + + + + + + + + + + + + + { + let doc: XMLDocument; + let element: OscdWizards; + let inputs: WizardInputElement[]; + + const values = { + lnType: 'LN-type', + desc: 'LN-description', + prefix: 'LN-prefix', + lnClass: 'LN-class', + inst: '1', + }; + const requiredFields = [ + 'lnType', + 'lnClass', + 'inst', + ]; + + const ln = ( + new DOMParser().parseFromString( + ``, + 'application/xml' + ).documentElement + ); + + beforeEach(async () => { + doc = await fetchDoc('/test/testfiles/wizards/ied.scd'); + + element = await fixture( + html`` + ); + const wizard = editLNWizard(ln); + + element.workflow.push(() => wizard); + await element.requestUpdate(); + inputs = Array.from(element.wizardUI.inputs); + }); + + Object.entries(values).forEach(([key, value]) => { + it(`contains a wizard-textfield with a non-empty "${key}" value`, async () => { + expect( + (inputs).find( + (textField) => textField.label === key + )?.value + ).to.equal(value); + }); + }); + + requiredFields.forEach((field) => { + it(`is a required field ${field}`, async () => { + const input = (inputs).find( + (textField) => textField.label === field + ) as WizardTextField; + + await setWizardTextFieldValue(input!, ''); + + expect(input.checkValidity()).to.be.false; + }); + }); +}); diff --git a/packages/plugins/test/unit/wizards/ln0.test.ts b/packages/plugins/test/unit/wizards/ln0.test.ts new file mode 100644 index 0000000000..79545f2716 --- /dev/null +++ b/packages/plugins/test/unit/wizards/ln0.test.ts @@ -0,0 +1,70 @@ +import { expect, fixture, html } from '@open-wc/testing'; +import '@openscd/open-scd/src/addons/Wizards.js'; +import { OscdWizards } from '@openscd/open-scd/src/addons/Wizards'; + +import { editLN0Wizard } from '../../../src/wizards/ln0.js'; +import { WizardInputElement } from '@openscd/open-scd/src/foundation.js'; +import { fetchDoc, setWizardTextFieldValue } from './test-support.js'; +import { WizardTextField } from '@openscd/open-scd/src/wizard-textfield.js'; + + + +describe('ln0 wizards', () => { + let doc: XMLDocument; + let element: OscdWizards; + let inputs: WizardInputElement[]; + + const values = { + lnType: 'LN0-type', + desc: 'LN0-description', + lnClass: 'LN0-class', + inst: '1', + }; + const requiredFields = [ + 'lnType', + 'lnClass', + 'inst', + ]; + + const ln = ( + new DOMParser().parseFromString( + ``, + 'application/xml' + ).documentElement + ); + + beforeEach(async () => { + doc = await fetchDoc('/test/testfiles/wizards/ied.scd'); + + element = await fixture( + html`` + ); + const wizard = editLN0Wizard(ln); + + element.workflow.push(() => wizard); + await element.requestUpdate(); + inputs = Array.from(element.wizardUI.inputs); + }); + + Object.entries(values).forEach(([key, value]) => { + it(`contains a wizard-textfield with a non-empty "${key}" value`, async () => { + expect( + (inputs).find( + (textField) => textField.label === key + )?.value + ).to.equal(value); + }); + }); + + requiredFields.forEach((field) => { + it(`is a required field ${field}`, async () => { + const input = (inputs).find( + (textField) => textField.label === field + ) as WizardTextField; + + await setWizardTextFieldValue(input!, ''); + + expect(input.checkValidity()).to.be.false; + }); + }); +});