diff --git a/dynamic-mapping-ui/package-lock.json b/dynamic-mapping-ui/package-lock.json index 8e53c7539..bc952c854 100644 --- a/dynamic-mapping-ui/package-lock.json +++ b/dynamic-mapping-ui/package-lock.json @@ -704,9 +704,9 @@ } }, "node_modules/@angular/language-service": { - "version": "18.2.7", - "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-18.2.7.tgz", - "integrity": "sha512-gFsme3y5uC/dQGBBX05VnmT2KAEAZ6gsNk8m1b226LYvh8Oc+JQ4sXv7THGq1x5VnrTzRcCIELbkNHCiFdvL1Q==", + "version": "18.2.8", + "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-18.2.8.tgz", + "integrity": "sha512-IueQ57CPP0Dt0z2n8B1A6JTwTq6m/AJVObZzrkSfXlzY1rY2qRuTJmAbZpTJ3iAxVzNYoaGh+NFHmJL8fRiXKQ==", "dev": true, "engines": { "node": "^18.19.1 || ^20.11.1 || >=22.0.0" @@ -948,9 +948,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.7.tgz", - "integrity": "sha512-9ickoLz+hcXCeh7jrcin+/SLWm+GkxE2kTvoYyp38p4WkdFXfQJxDFGWp/YHjiKLPx06z2A7W8XKuqbReXDzsw==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.8.tgz", + "integrity": "sha512-ZsysZyXY4Tlx+Q53XdnOFmqwfB9QDTHYxaZYajWRoBLuLEAwI2UIbtxOjWh/cFaa9IKUlcB+DDuoskLuKu56JA==", "dev": true, "engines": { "node": ">=6.9.0" @@ -1002,9 +1002,9 @@ } }, "node_modules/@babel/eslint-parser": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.25.7.tgz", - "integrity": "sha512-B+BO9x86VYsQHimucBAL1fxTJKF4wyKY6ZVzee9QgzdZOUfs3BaR6AQrgoGrRI+7IFS1wUz/VyQ+SoBcSpdPbw==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.25.8.tgz", + "integrity": "sha512-Po3VLMN7fJtv0nsOjBDSbO1J71UhzShE9MuOSkWEV9IZQXzhZklYtzKZ8ZD/Ij3a0JBv1AG3Ny2L3jvAHQVOGg==", "dev": true, "dependencies": { "@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1", @@ -1418,12 +1418,12 @@ } }, "node_modules/@babel/parser": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.7.tgz", - "integrity": "sha512-aZn7ETtQsjjGG5HruveUK06cU3Hljuhd9Iojm4M8WWv3wLE6OkE5PWbDUkItmMgegmccaITudyuW5RPYrYlgWw==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.8.tgz", + "integrity": "sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==", "dev": true, "dependencies": { - "@babel/types": "^7.25.7" + "@babel/types": "^7.25.8" }, "bin": { "parser": "bin/babel-parser.js" @@ -1893,14 +1893,13 @@ } }, "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.25.7.tgz", - "integrity": "sha512-rvUUtoVlkDWtDWxGAiiQj0aNktTPn3eFynBcMC2IhsXweehwgdI9ODe+XjWw515kEmv22sSOTp/rxIRuTiB7zg==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.25.8.tgz", + "integrity": "sha512-e82gl3TCorath6YLf9xUwFehVvjvfqFhdOo4+0iVIVju+6XOi5XHkqB3P2AXnSwoeTX0HBoXq5gJFtvotJzFnQ==", "dev": true, "dependencies": { "@babel/helper-create-class-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-class-static-block": "^7.14.5" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -2020,13 +2019,12 @@ } }, "node_modules/@babel/plugin-transform-dynamic-import": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.25.7.tgz", - "integrity": "sha512-UvcLuual4h7/GfylKm2IAA3aph9rwvAM2XBA0uPKU3lca+Maai4jBjjEVUS568ld6kJcgbouuumCBhMd/Yz17w==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.25.8.tgz", + "integrity": "sha512-gznWY+mr4ZQL/EWPcbBQUP3BXS5FwZp8RUOw06BaRn8tQLzN4XLIxXejpHN9Qo8x8jjBmAAKp6FoS51AgkSA/A==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -2052,13 +2050,12 @@ } }, "node_modules/@babel/plugin-transform-export-namespace-from": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.25.7.tgz", - "integrity": "sha512-h3MDAP5l34NQkkNulsTNyjdaR+OiB0Im67VU//sFupouP8Q6m9Spy7l66DcaAQxtmCqGdanPByLsnwFttxKISQ==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.25.8.tgz", + "integrity": "sha512-sPtYrduWINTQTW7FtOy99VCTWp4H23UX7vYcut7S4CIMEXU+54zKX9uCoGkLsWXteyaMXzVHgzWbLfQ1w4GZgw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -2101,13 +2098,12 @@ } }, "node_modules/@babel/plugin-transform-json-strings": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.25.7.tgz", - "integrity": "sha512-Ot43PrL9TEAiCe8C/2erAjXMeVSnE/BLEx6eyrKLNFCCw5jvhTHKyHxdI1pA0kz5njZRYAnMO2KObGqOCRDYSA==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.25.8.tgz", + "integrity": "sha512-4OMNv7eHTmJ2YXs3tvxAfa/I43di+VcF+M4Wt66c88EAED1RoGaf1D64cL5FkRpNL+Vx9Hds84lksWvd/wMIdA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-json-strings": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -2132,13 +2128,12 @@ } }, "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.25.7.tgz", - "integrity": "sha512-iImzbA55BjiovLyG2bggWS+V+OLkaBorNvc/yJoeeDQGztknRnDdYfp2d/UPmunZYEnZi6Lg8QcTmNMHOB0lGA==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.25.8.tgz", + "integrity": "sha512-f5W0AhSbbI+yY6VakT04jmxdxz+WsID0neG7+kQZbCOjuyJNdL5Nn4WIBm4hRpKnUcO9lP0eipUhFN12JpoH8g==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -2261,13 +2256,12 @@ } }, "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.25.7.tgz", - "integrity": "sha512-FbuJ63/4LEL32mIxrxwYaqjJxpbzxPVQj5a+Ebrc8JICV6YX8nE53jY+K0RZT3um56GoNWgkS2BQ/uLGTjtwfw==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.25.8.tgz", + "integrity": "sha512-Z7WJJWdQc8yCWgAmjI3hyC+5PXIubH9yRKzkl9ZEG647O9szl9zvmKLzpbItlijBnVhTUf1cpyWBsZ3+2wjWPQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -2277,13 +2271,12 @@ } }, "node_modules/@babel/plugin-transform-numeric-separator": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.25.7.tgz", - "integrity": "sha512-8CbutzSSh4hmD+jJHIA8vdTNk15kAzOnFLVVgBSMGr28rt85ouT01/rezMecks9pkU939wDInImwCKv4ahU4IA==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.25.8.tgz", + "integrity": "sha512-rm9a5iEFPS4iMIy+/A/PiS0QN0UyjPIeVvbU5EMZFKJZHt8vQnasbpo3T3EFcxzCeYO0BHfc4RqooCZc51J86Q==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -2293,14 +2286,13 @@ } }, "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.25.7.tgz", - "integrity": "sha512-1JdVKPhD7Y5PvgfFy0Mv2brdrolzpzSoUq2pr6xsR+m+3viGGeHEokFKsCgOkbeFOQxfB1Vt2F0cPJLRpFI4Zg==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.25.8.tgz", + "integrity": "sha512-LkUu0O2hnUKHKE7/zYOIjByMa4VRaV2CD/cdGz0AxU9we+VA3kDDggKEzI0Oz1IroG+6gUP6UmWEHBMWZU316g==", "dev": true, "dependencies": { "@babel/helper-compilation-targets": "^7.25.7", "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", "@babel/plugin-transform-parameters": "^7.25.7" }, "engines": { @@ -2327,13 +2319,12 @@ } }, "node_modules/@babel/plugin-transform-optional-catch-binding": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.25.7.tgz", - "integrity": "sha512-m9obYBA39mDPN7lJzD5WkGGb0GO54PPLXsbcnj1Hyeu8mSRz7Gb4b1A6zxNX32ZuUySDK4G6it8SDFWD1nCnqg==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.25.8.tgz", + "integrity": "sha512-EbQYweoMAHOn7iJ9GgZo14ghhb9tTjgOc88xFgYngifx7Z9u580cENCV159M4xDh3q/irbhSjZVpuhpC2gKBbg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -2343,14 +2334,13 @@ } }, "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.25.7.tgz", - "integrity": "sha512-h39agClImgPWg4H8mYVAbD1qP9vClFbEjqoJmt87Zen8pjqK8FTPUwrOXAvqu5soytwxrLMd2fx2KSCp2CHcNg==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.25.8.tgz", + "integrity": "sha512-q05Bk7gXOxpTHoQ8RSzGSh/LHVB9JEIkKnk3myAWwZHnYiTGYtbdrYkIsS8Xyh4ltKf7GNUSgzs/6P2bJtBAQg==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -2391,15 +2381,14 @@ } }, "node_modules/@babel/plugin-transform-private-property-in-object": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.25.7.tgz", - "integrity": "sha512-LzA5ESzBy7tqj00Yjey9yWfs3FKy4EmJyKOSWld144OxkTji81WWnUT8nkLUn+imN/zHL8ZQlOu/MTUAhHaX3g==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.25.8.tgz", + "integrity": "sha512-8Uh966svuB4V8RHHg0QJOB32QK287NBksJOByoKmHMp1TAobNniNalIkI2i5IPj5+S9NYCG4VIjbEuiSN8r+ow==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.25.7", "@babel/helper-create-class-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -2823,9 +2812,9 @@ } }, "node_modules/@babel/types": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.7.tgz", - "integrity": "sha512-vwIVdXG+j+FOpkwqHRcBgHLYNL7XMkufrlaFvL9o6Ai9sJn9+PdyIL5qa0XzTZw084c+u9LOls53eoZWP/W5WQ==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.8.tgz", + "integrity": "sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==", "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.25.7", @@ -2928,14 +2917,13 @@ } }, "node_modules/@c8y/devkit/node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.25.7.tgz", - "integrity": "sha512-4B6OhTrwYKHYYgcwErvZjbmH9X5TxQBsaBHdzEIB4l71gR5jh/tuHGlb9in47udL2+wVUcOz5XXhhfhVJwEpEg==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.25.8.tgz", + "integrity": "sha512-9ypqkozyzpG+HxlH4o4gdctalFGIjjdufzo7I2XPda0iBnZ6a+FO0rIEQcdSPXp02CkvGsII1exJhmROPQd5oA==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.25.7", "@babel/helper-remap-async-to-generator": "^7.25.7", - "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/traverse": "^7.25.7" }, "engines": { @@ -2963,12 +2951,12 @@ } }, "node_modules/@c8y/devkit/node_modules/@babel/preset-env": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.25.7.tgz", - "integrity": "sha512-Gibz4OUdyNqqLj+7OAvBZxOD7CklCtMA5/j0JgUEwOnaRULsPDXmic2iKxL2DX2vQduPR5wH2hjZas/Vr/Oc0g==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.25.8.tgz", + "integrity": "sha512-58T2yulDHMN8YMUxiLq5YmWUnlDCyY1FsHM+v12VMx+1/FlrUj5tY50iDCpofFQEM8fMYOaY9YRvym2jcjn1Dg==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.25.7", + "@babel/compat-data": "^7.25.8", "@babel/helper-compilation-targets": "^7.25.7", "@babel/helper-plugin-utils": "^7.25.7", "@babel/helper-validator-option": "^7.25.7", @@ -2978,45 +2966,30 @@ "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.25.7", "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.25.7", "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3", "@babel/plugin-syntax-import-assertions": "^7.25.7", "@babel/plugin-syntax-import-attributes": "^7.25.7", - "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", "@babel/plugin-transform-arrow-functions": "^7.25.7", - "@babel/plugin-transform-async-generator-functions": "^7.25.7", + "@babel/plugin-transform-async-generator-functions": "^7.25.8", "@babel/plugin-transform-async-to-generator": "^7.25.7", "@babel/plugin-transform-block-scoped-functions": "^7.25.7", "@babel/plugin-transform-block-scoping": "^7.25.7", "@babel/plugin-transform-class-properties": "^7.25.7", - "@babel/plugin-transform-class-static-block": "^7.25.7", + "@babel/plugin-transform-class-static-block": "^7.25.8", "@babel/plugin-transform-classes": "^7.25.7", "@babel/plugin-transform-computed-properties": "^7.25.7", "@babel/plugin-transform-destructuring": "^7.25.7", "@babel/plugin-transform-dotall-regex": "^7.25.7", "@babel/plugin-transform-duplicate-keys": "^7.25.7", "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.25.7", - "@babel/plugin-transform-dynamic-import": "^7.25.7", + "@babel/plugin-transform-dynamic-import": "^7.25.8", "@babel/plugin-transform-exponentiation-operator": "^7.25.7", - "@babel/plugin-transform-export-namespace-from": "^7.25.7", + "@babel/plugin-transform-export-namespace-from": "^7.25.8", "@babel/plugin-transform-for-of": "^7.25.7", "@babel/plugin-transform-function-name": "^7.25.7", - "@babel/plugin-transform-json-strings": "^7.25.7", + "@babel/plugin-transform-json-strings": "^7.25.8", "@babel/plugin-transform-literals": "^7.25.7", - "@babel/plugin-transform-logical-assignment-operators": "^7.25.7", + "@babel/plugin-transform-logical-assignment-operators": "^7.25.8", "@babel/plugin-transform-member-expression-literals": "^7.25.7", "@babel/plugin-transform-modules-amd": "^7.25.7", "@babel/plugin-transform-modules-commonjs": "^7.25.7", @@ -3024,15 +2997,15 @@ "@babel/plugin-transform-modules-umd": "^7.25.7", "@babel/plugin-transform-named-capturing-groups-regex": "^7.25.7", "@babel/plugin-transform-new-target": "^7.25.7", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.25.7", - "@babel/plugin-transform-numeric-separator": "^7.25.7", - "@babel/plugin-transform-object-rest-spread": "^7.25.7", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.25.8", + "@babel/plugin-transform-numeric-separator": "^7.25.8", + "@babel/plugin-transform-object-rest-spread": "^7.25.8", "@babel/plugin-transform-object-super": "^7.25.7", - "@babel/plugin-transform-optional-catch-binding": "^7.25.7", - "@babel/plugin-transform-optional-chaining": "^7.25.7", + "@babel/plugin-transform-optional-catch-binding": "^7.25.8", + "@babel/plugin-transform-optional-chaining": "^7.25.8", "@babel/plugin-transform-parameters": "^7.25.7", "@babel/plugin-transform-private-methods": "^7.25.7", - "@babel/plugin-transform-private-property-in-object": "^7.25.7", + "@babel/plugin-transform-private-property-in-object": "^7.25.8", "@babel/plugin-transform-property-literals": "^7.25.7", "@babel/plugin-transform-regenerator": "^7.25.7", "@babel/plugin-transform-reserved-words": "^7.25.7", @@ -3305,9 +3278,9 @@ } }, "node_modules/@c8y/devkit/node_modules/memfs": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.12.0.tgz", - "integrity": "sha512-74wDsex5tQDSClVkeK1vtxqYCAgCoXxx+K4NSHzgU/muYVYByFqa+0RnrPO9NM6naWm1+G9JmZ0p6QHhXmeYfA==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.13.0.tgz", + "integrity": "sha512-dIs5KGy24fbdDhIAg0RxXpFqQp3RwL6wgSMRF9OSuphL/Uc9a4u2/SDJKPLj/zUgtOGKuHrRMrj563+IErj4Cg==", "dev": true, "dependencies": { "@jsonjoy.com/json-pack": "^1.0.3", @@ -3557,9 +3530,9 @@ } }, "node_modules/@codemirror/commands": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.6.2.tgz", - "integrity": "sha512-Fq7eWOl1Rcbrfn6jD8FPCj9Auaxdm5nIK5RYOeW7ughnd/rY5AmPg6b+CfsG39ZHdwiwe8lde3q8uR7CF5S0yQ==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.7.0.tgz", + "integrity": "sha512-+cduIZ2KbesDhbykV02K25A5xIVrquSPz4UxxYBemRlAT2aW8dhwUgLDwej7q/RJUHKk4nALYcR1puecDvbdqw==", "dependencies": { "@codemirror/language": "^6.0.0", "@codemirror/state": "^6.4.0", @@ -4589,9 +4562,9 @@ } }, "node_modules/@jsonjoy.com/util": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/util/-/util-1.3.0.tgz", - "integrity": "sha512-Cebt4Vk7k1xHy87kHY7KSPLT77A7Ev7IfOblyLZhtYEhrdQ6fX4EoLq3xOQ3O/DRMEh2ok5nyC180E+ABS8Wmw==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/util/-/util-1.5.0.tgz", + "integrity": "sha512-ojoNsrIuPI9g6o8UxhraZQSyF2ByJanAY4cTFbc8Mf2AXEF4aQRGY1dJxyJpuyav8r9FGflEt/Ff3u5Nt6YMPA==", "dev": true, "engines": { "node": ">=10.0" @@ -4605,9 +4578,12 @@ } }, "node_modules/@jsonquerylang/jsonquery": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@jsonquerylang/jsonquery/-/jsonquery-3.0.5.tgz", - "integrity": "sha512-3BcOZEd6AYnoNcFEPwDlbZn2lZeCn3sh9FJzNzYamPzImfW/SPVuJ4TodPX3DoGShxOnh4q/ioYXOsBn5mA+eQ==" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jsonquerylang/jsonquery/-/jsonquery-3.1.1.tgz", + "integrity": "sha512-P6Qo5egd3W8TBpqQsqaZtZ9lPO7oXBM21QdkYamCAYZHv9VCPXiI8NeIuSoXdoe5zKVZPUWmqaI14uacJLmcNw==", + "bin": { + "jsonquery": "bin/cli.js" + } }, "node_modules/@leichtgewicht/ip-codec": { "version": "2.0.5", @@ -4678,9 +4654,9 @@ } }, "node_modules/@mark.probst/typescript-json-schema/node_modules/@types/node": { - "version": "16.18.112", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.112.tgz", - "integrity": "sha512-EKrbKUGJROm17+dY/gMi31aJlGLJ75e1IkTojt9n6u+hnaTBDs+M1bIdOawpk2m6YUAXq/R2W0SxCng1tndHCg==", + "version": "16.18.113", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.113.tgz", + "integrity": "sha512-4jHxcEzSXpF1cBNxogs5FVbVSFSKo50sFCn7Xg7vmjJTbWFWgeuHW3QnoINlfmfG++MFR/q97RZE5RQXKeT+jg==", "dev": true }, "node_modules/@mark.probst/typescript-json-schema/node_modules/typescript": { @@ -5308,9 +5284,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.19.54", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.54.tgz", - "integrity": "sha512-+BRgt0G5gYjTvdLac9sIeE0iZcJxi4Jc4PV5EUzqi+88jmQLr+fRZdv2tCTV7IHKSGxM6SaLoOXQWWUiLUItMw==", + "version": "18.19.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.55.tgz", + "integrity": "sha512-zzw5Vw52205Zr/nmErSEkN5FLqXPuKX/k5d1D7RKHATGqU7y6YfX9QxZraUzUrFGqH6XzOzG196BC35ltJC4Cw==", "dependencies": { "undici-types": "~5.26.4" } @@ -5625,16 +5601,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.8.0.tgz", - "integrity": "sha512-QE2MgfOTem00qrlPgyByaCHay9yb1+9BjnMFnSFkUKQfu7adBXDTnCAivURnuPPAG/qiB+kzKkZKmKfaMT0zVg==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.8.1.tgz", + "integrity": "sha512-/QkNJDbV0bdL7H7d0/y0qBbV2HTtf0TIyjSDTvvmQEzeVx8jEImEbLuOA4EsvE8gIgqMitns0ifb5uQhMj8d9w==", "dev": true, "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.8.0", - "@typescript-eslint/types": "8.8.0", - "@typescript-eslint/typescript-estree": "8.8.0" + "@typescript-eslint/scope-manager": "8.8.1", + "@typescript-eslint/types": "8.8.1", + "@typescript-eslint/typescript-estree": "8.8.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -5648,14 +5624,14 @@ } }, "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.8.0.tgz", - "integrity": "sha512-EL8eaGC6gx3jDd8GwEFEV091210U97J0jeEHrAYvIYosmEGet4wJ+g0SYmLu+oRiAwbSA5AVrt6DxLHfdd+bUg==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.8.1.tgz", + "integrity": "sha512-X4JdU+66Mazev/J0gfXlcC/dV6JI37h+93W9BRYXrSn0hrE64IoWgVkO9MSJgEzoWkxONgaQpICWg8vAN74wlA==", "dev": true, "peer": true, "dependencies": { - "@typescript-eslint/types": "8.8.0", - "@typescript-eslint/visitor-keys": "8.8.0" + "@typescript-eslint/types": "8.8.1", + "@typescript-eslint/visitor-keys": "8.8.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -5666,9 +5642,9 @@ } }, "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.8.0.tgz", - "integrity": "sha512-QJwc50hRCgBd/k12sTykOJbESe1RrzmX6COk8Y525C9l7oweZ+1lw9JiU56im7Amm8swlz00DRIlxMYLizr2Vw==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.8.1.tgz", + "integrity": "sha512-WCcTP4SDXzMd23N27u66zTKMuEevH4uzU8C9jf0RO4E04yVHgQgW+r+TeVTNnO1KIfrL8ebgVVYYMMO3+jC55Q==", "dev": true, "peer": true, "engines": { @@ -5680,14 +5656,14 @@ } }, "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.8.0.tgz", - "integrity": "sha512-ZaMJwc/0ckLz5DaAZ+pNLmHv8AMVGtfWxZe/x2JVEkD5LnmhWiQMMcYT7IY7gkdJuzJ9P14fRy28lUrlDSWYdw==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.8.1.tgz", + "integrity": "sha512-A5d1R9p+X+1js4JogdNilDuuq+EHZdsH9MjTVxXOdVFfTJXunKJR/v+fNNyO4TnoOn5HqobzfRlc70NC6HTcdg==", "dev": true, "peer": true, "dependencies": { - "@typescript-eslint/types": "8.8.0", - "@typescript-eslint/visitor-keys": "8.8.0", + "@typescript-eslint/types": "8.8.1", + "@typescript-eslint/visitor-keys": "8.8.1", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -5709,13 +5685,13 @@ } }, "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.8.0.tgz", - "integrity": "sha512-8mq51Lx6Hpmd7HnA2fcHQo3YgfX1qbccxQOgZcb4tvasu//zXRaA1j5ZRFeCw/VRAdFi4mRM9DnZw0Nu0Q2d1g==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.8.1.tgz", + "integrity": "sha512-0/TdC3aeRAsW7MDvYRwEc1Uwm0TIBfzjPFgg60UU2Haj5qsCs9cc3zNgY71edqE3LbWfF/WoZQd3lJoDXFQpag==", "dev": true, "peer": true, "dependencies": { - "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/types": "8.8.1", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -7050,9 +7026,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001667", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz", - "integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==", + "version": "1.0.30001668", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001668.tgz", + "integrity": "sha512-nWLrdxqCdblixUO+27JtGJJE/txpJlyUy5YN1u53wLZkP0emYCo5zgS6QYft7VUYR42LGgi/S5hdLZTrnyIddw==", "funding": [ { "type": "opencollective", @@ -7698,21 +7674,21 @@ "dev": true }, "node_modules/cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", "dev": true, "engines": { "node": ">= 0.6" } }, "node_modules/cookie-parser": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.6.tgz", - "integrity": "sha512-z3IzaNjdwUC2olLIB5/ITd0/setiaFMLYiZJle7xg5Fe9KWAceil7xszYfHHBtDFYLSgJduS2Ty0P1uJdPDJeA==", + "version": "1.4.7", + "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.7.tgz", + "integrity": "sha512-nGUvgXnotP3BsjiLX2ypbQnWoGUPIIfHQNZkkC668ntrzGWEZVW70HDEB1qnNGMicPje6EttlIgzo51YSwNQGw==", "dev": true, "dependencies": { - "cookie": "0.4.1", + "cookie": "0.7.2", "cookie-signature": "1.0.6" }, "engines": { @@ -8997,9 +8973,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.5.32", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.32.tgz", - "integrity": "sha512-M+7ph0VGBQqqpTT2YrabjNKSQ2fEl9PVx6AK3N558gDH9NO8O6XN9SXXFWRo9u9PbEg/bWq+tjXQr+eXmxubCw==" + "version": "1.5.36", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.36.tgz", + "integrity": "sha512-HYTX8tKge/VNp6FGO+f/uVDmUkq+cEfcxYhKf15Akc4M5yxt5YmorwlAitKWjWhWQnKcDRBAQKXkhqqXMqcrjw==" }, "node_modules/emoji-regex": { "version": "8.0.0", @@ -9983,9 +9959,9 @@ } }, "node_modules/express": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz", - "integrity": "sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==", + "version": "4.21.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", + "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", "dev": true, "dependencies": { "accepts": "~1.3.8", @@ -9993,7 +9969,7 @@ "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.6.0", + "cookie": "0.7.1", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -10025,9 +10001,9 @@ } }, "node_modules/express/node_modules/cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", "dev": true, "engines": { "node": ">= 0.6" @@ -15409,9 +15385,9 @@ "dev": true }, "node_modules/regjsparser": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.11.0.tgz", - "integrity": "sha512-vTbzVAjQDzwQdKuvj7qEq6OlAprCjE656khuGQ4QaBLg7abQ9I9ISpmLuc6inWe7zP75AECjqUa4g4sdQvOXhg==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.11.1.tgz", + "integrity": "sha512-1DHODs4B8p/mQHU9kr+jv8+wIC9mtG4eBHxWxIq5mhjE3D5oORhCc6deRKzTjs9DcfRFmj9BHSDguZklqCGFWQ==", "dev": true, "dependencies": { "jsesc": "~3.0.2" diff --git a/dynamic-mapping-ui/src/mapping/core/mapping.service.ts b/dynamic-mapping-ui/src/mapping/core/mapping.service.ts index ebdeb5c9b..b3504eb11 100644 --- a/dynamic-mapping-ui/src/mapping/core/mapping.service.ts +++ b/dynamic-mapping-ui/src/mapping/core/mapping.service.ts @@ -95,6 +95,7 @@ export class MappingService { } private eventRealtimeService: EventRealtimeService; private subscription: Subscription; + private updateMappingEnriched$: Subject = new Subject(); queriesUtil: QueriesUtil; private _agentId: string; protected JSONATA = require('jsonata'); @@ -115,6 +116,13 @@ export class MappingService { ); } + listenToUpdateMapping(): Observable { + return this.updateMappingEnriched$; + } + initiateUpdateMapping(m: MappingEnriched): void { + this.updateMappingEnriched$.next(m); + } + async changeDebuggingMapping(parameter: any) { await this.sharedService.runOperation(Operation.DEBUG_MAPPING, parameter); } diff --git a/dynamic-mapping-ui/src/mapping/grid/advisor/advice-action.component.html b/dynamic-mapping-ui/src/mapping/grid/advisor/advice-action.component.html new file mode 100644 index 000000000..a4acc20c5 --- /dev/null +++ b/dynamic-mapping-ui/src/mapping/grid/advisor/advice-action.component.html @@ -0,0 +1,58 @@ + + + + + +
+

+ {{ 'Select next step ... ' | translate }} +

+ +
+
diff --git a/dynamic-mapping-ui/src/mapping/grid/advisor/advice-action.component.ts b/dynamic-mapping-ui/src/mapping/grid/advisor/advice-action.component.ts new file mode 100644 index 000000000..b1c7a1e01 --- /dev/null +++ b/dynamic-mapping-ui/src/mapping/grid/advisor/advice-action.component.ts @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2022 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, + * and/or its subsidiaries and/or its affiliates and/or their licensors. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @authors Christof Strack + */ +import { + Component, + Input, + OnDestroy, + OnInit, + ViewEncapsulation +} from '@angular/core'; +import { ModalLabels } from '@c8y/ngx-components'; +import { Subject } from 'rxjs'; +import { Mapping, MappingEnriched } from '../../../shared'; + +@Component({ + selector: 'd11r-advice-action', + templateUrl: './advice-action.component.html', + encapsulation: ViewEncapsulation.None +}) +export class AdviceActionComponent implements OnInit, OnDestroy { + @Input() enrichedMapping: MappingEnriched; + mapping: Mapping; + closeSubject: Subject = new Subject(); + labels: ModalLabels = { ok: 'Select', cancel: 'Cancel' }; + + selection: string = ''; + valid: boolean = false; + + constructor() {} + + ngOnInit(): void { + this.closeSubject = new Subject(); + } + + onDismiss() { + this.closeSubject.next('CANCEL'); + this.closeSubject.complete(); + } + + onClose() { + this.closeSubject.next(this.selection); + this.closeSubject.complete(); + } + + onSelection(t) { + this.selection = t; + this.valid = true; + } + + ngOnDestroy() { + this.closeSubject.complete(); + } +} diff --git a/dynamic-mapping-ui/src/mapping/grid/mapping.component.ts b/dynamic-mapping-ui/src/mapping/grid/mapping.component.ts index 54d154cae..0fd71bf13 100644 --- a/dynamic-mapping-ui/src/mapping/grid/mapping.component.ts +++ b/dynamic-mapping-ui/src/mapping/grid/mapping.component.ts @@ -78,6 +78,8 @@ import { } from '../shared/mapping.model'; import { EditorMode } from '../shared/stepper-model'; import { HttpStatusCode } from '@angular/common/http'; +import { MappingIdCellRendererComponent } from '../renderer/mapping-id.cell-renderer.component'; +import { AdviceActionComponent } from './advisor/advice-action.component'; @Component({ selector: 'd11r-mapping-mapping-grid', @@ -194,20 +196,20 @@ export class MappingComponent implements OnInit, OnDestroy { callback: this.deleteMappingWithConfirmation.bind(this), showIf: (item) => !item['mapping']['active'] }, - { - type: 'ACTIVATE_MAPPING', - text: 'Activate', - icon: 'toggle-on', - callback: this.activateMapping.bind(this), - showIf: (item) => !item['mapping']['active'] - }, - { - type: 'DEACTIVATE_MAPPING', - text: 'Deactivate', - icon: 'toggle-off', - callback: this.activateMapping.bind(this), - showIf: (item) => item['mapping']['active'] - }, + // { + // type: 'ACTIVATE_MAPPING', + // text: 'Activate', + // icon: 'toggle-on', + // callback: this.activateMapping.bind(this), + // showIf: (item) => !item['mapping']['active'] + // }, + // { + // type: 'DEACTIVATE_MAPPING', + // text: 'Deactivate', + // icon: 'toggle-off', + // callback: this.activateMapping.bind(this), + // showIf: (item) => item['mapping']['active'] + // }, { type: 'ENABLE_DEBUG', text: 'Enable debugging', @@ -303,6 +305,12 @@ export class MappingComponent implements OnInit, OnDestroy { this.mappingsCount = maps.length; }); await this.mappingService.startChangedMappingEvents(); + this.mappingService + .listenToUpdateMapping() + .subscribe((m: MappingEnriched) => { + console.log('Triggered updating mapping', m); + this.updateMapping(m); + }); } getColumnsMappings(): Column[] { @@ -313,7 +321,7 @@ export class MappingComponent implements OnInit, OnDestroy { path: 'mapping.name', filterable: false, dataType: ColumnDataType.TextShort, - cellRendererComponent: NameRendererComponent, + cellRendererComponent: MappingIdCellRendererComponent, sortOrder: 'asc', visible: true, gridTrackSize: '10%' @@ -529,44 +537,77 @@ export class MappingComponent implements OnInit, OnDestroy { } async updateMapping(m: MappingEnriched) { + let action = 'CONTINUE'; const { mapping } = m; - - if (mapping.active) { - this.setStepperConfiguration( - mapping.mappingType, - this.stepperConfiguration.direction, - EditorMode.READ_ONLY - ); - } else { - this.setStepperConfiguration( - mapping.mappingType, - this.stepperConfiguration.direction, - EditorMode.UPDATE + const { snoopSupported } = + MAPPING_TYPE_DESCRIPTION[mapping.mappingType].properties[ + mapping.direction + ]; + if ( + (mapping.snoopStatus == SnoopStatus.ENABLED || + mapping.snoopStatus == SnoopStatus.STARTED) && + snoopSupported + ) { + const initialState = { + mapping, + labels: { + ok: 'Ok', + cancel: 'Cancel' + } + }; + const confirmAdviceActionModalRef: BsModalRef = this.bsModalService.show( + AdviceActionComponent, + { initialState } ); + + action = + await confirmAdviceActionModalRef.content.closeSubject.toPromise(); + console.log('Result from next step:', mapping, action); } - // create deep copy of existing mapping, in case user cancels changes - this.mappingToUpdate = JSON.parse(JSON.stringify(mapping)); - // for backward compatibility set direction of mapping to inbound - if ( - !this.mappingToUpdate.direction || - this.mappingToUpdate.direction == null - ) - this.mappingToUpdate.direction = Direction.INBOUND; - const deploymentMapEntry = - await this.mappingService.getDefinedDeploymentMapEntry(mapping.ident); - this.deploymentMapEntry = { - ident: this.mappingToUpdate.ident, - connectors: deploymentMapEntry.connectors - }; - // console.log('Editing mapping', this.mappingToUpdate); - if ( - mapping.snoopStatus === SnoopStatus.NONE || - mapping.snoopStatus === SnoopStatus.STOPPED - ) { - this.showConfigMapping = true; - } else { - this.showSnoopingMapping = true; + if (action != 'CANCEL') { + // stop snooping + if (action == 'STOP_SNOOPING_AND_EDIT') { + mapping.snoopStatus = SnoopStatus.STOPPED; + if (mapping.active) await this.activateMapping(m); + } + if (mapping.active) { + this.setStepperConfiguration( + mapping.mappingType, + this.stepperConfiguration.direction, + EditorMode.READ_ONLY + ); + } else { + this.setStepperConfiguration( + mapping.mappingType, + this.stepperConfiguration.direction, + EditorMode.UPDATE + ); + } + // create deep copy of existing mapping, in case user cancels changes + this.mappingToUpdate = JSON.parse(JSON.stringify(mapping)); + + // for backward compatibility set direction of mapping to inbound + if ( + !this.mappingToUpdate.direction || + this.mappingToUpdate.direction == null + ) + this.mappingToUpdate.direction = Direction.INBOUND; + const deploymentMapEntry = + await this.mappingService.getDefinedDeploymentMapEntry(mapping.ident); + this.deploymentMapEntry = { + ident: this.mappingToUpdate.ident, + connectors: deploymentMapEntry.connectors + }; + // console.log('Editing mapping', this.mappingToUpdate); + if ( + // mapping.snoopStatus === SnoopStatus.NONE || + mapping.snoopStatus === SnoopStatus.STOPPED + ) { + this.showConfigMapping = true; + } else { + this.showSnoopingMapping = true; + } } } @@ -609,7 +650,7 @@ export class MappingComponent implements OnInit, OnDestroy { const parameter = { id: mapping.id, active: newActive }; const response = await this.mappingService.changeActivationMapping(parameter); - if (response.status != HttpStatusCode.Ok) { + if (response.status != HttpStatusCode.Created) { const failedMap = await response.json(); const failedList = Object.values(failedMap).join(','); this.alertService.warning( diff --git a/dynamic-mapping-ui/src/mapping/mapping.module.ts b/dynamic-mapping-ui/src/mapping/mapping.module.ts index 6f807418b..0a88d3cd8 100644 --- a/dynamic-mapping-ui/src/mapping/mapping.module.ts +++ b/dynamic-mapping-ui/src/mapping/mapping.module.ts @@ -30,7 +30,7 @@ import { AssetSelectorModule } from '@c8y/ngx-components/assets-navigator'; import { PopoverModule } from 'ngx-bootstrap/popover'; import { BrokerConfigurationModule } from '../configuration'; import { SharedModule } from '../shared'; -import { EditSubstitutionComponent } from './edit/edit-substitution-modal.component'; +import { EditSubstitutionComponent } from './substitution/edit/edit-substitution-modal.component'; import { MappingComponent } from './grid/mapping.component'; import { ImportMappingsComponent } from './import/import-modal.component'; import { MappingTypeComponent } from './mapping-type/mapping-type.component'; @@ -61,6 +61,9 @@ import { } from './shared/util'; import { NODE1 } from '../shared/model/util'; import { MappingSubscriptionComponent } from './subscription-grid/subscription.component'; +import { MappingIdCellRendererComponent } from './renderer/mapping-id.cell-renderer.component'; +import { SnoopExplorerComponent } from './snoop-explorer/snoop-explorer-modal.component'; +import { AdviceActionComponent } from './grid/advisor/advice-action.component'; @NgModule({ declarations: [ @@ -88,7 +91,10 @@ import { MappingSubscriptionComponent } from './subscription-grid/subscription.c FieldInputCustom, MappingConnectorComponent, MappingSubscriptionComponent, - DeviceSelectorSubscriptionComponent + DeviceSelectorSubscriptionComponent, + MappingIdCellRendererComponent, + SnoopExplorerComponent, + AdviceActionComponent ], imports: [ CoreModule, diff --git a/dynamic-mapping-ui/src/mapping/renderer/mapping-id.cell-renderer.component.ts b/dynamic-mapping-ui/src/mapping/renderer/mapping-id.cell-renderer.component.ts new file mode 100644 index 000000000..219ecd03a --- /dev/null +++ b/dynamic-mapping-ui/src/mapping/renderer/mapping-id.cell-renderer.component.ts @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2022 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, + * and/or its subsidiaries and/or its affiliates and/or their licensors. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @authors Christof Strack + */ +import { Component } from '@angular/core'; +import { CellRendererContext } from '@c8y/ngx-components'; +import { MappingService } from '../core/mapping.service'; + +/** + * The example component for custom cell renderer. + * It gets `context` with the current row item and the column. + * Additionally, a service is injected to provide a helper method. + * The template displays the icon and the label with additional styling. + */ +@Component({ + template: ` + + ` +}) +export class MappingIdCellRendererComponent { + constructor( + public context: CellRendererContext, + public mappingService: MappingService + ) {} + async updateMapping() { + const { mapping } = this.context.item; + this.mappingService.initiateUpdateMapping({ mapping, id: mapping.id }); + } +} diff --git a/dynamic-mapping-ui/src/mapping/renderer/mappingDeployment.renderer.component.ts b/dynamic-mapping-ui/src/mapping/renderer/mappingDeployment.renderer.component.ts index 116af19ca..1fae84139 100644 --- a/dynamic-mapping-ui/src/mapping/renderer/mappingDeployment.renderer.component.ts +++ b/dynamic-mapping-ui/src/mapping/renderer/mappingDeployment.renderer.component.ts @@ -25,13 +25,16 @@ import { CellRendererContext } from '@c8y/ngx-components'; selector: 'd11r-mapping-renderer-deployment', template: `
- {{ con.name }} + {{ con.name }} +
+
+ {{ 'No active connector' }}
` }) export class MappingDeploymentRendererComponent { constructor(public context: CellRendererContext) { - // console.log('Connectors', context, context.value); + console.log('Connectors', context, context.value); + context.item.mapping.active; } } diff --git a/dynamic-mapping-ui/src/mapping/renderer/snoopedTemplate.renderer.component.ts b/dynamic-mapping-ui/src/mapping/renderer/snoopedTemplate.renderer.component.ts index 1ebb2a03c..3db3dc21e 100644 --- a/dynamic-mapping-ui/src/mapping/renderer/snoopedTemplate.renderer.component.ts +++ b/dynamic-mapping-ui/src/mapping/renderer/snoopedTemplate.renderer.component.ts @@ -20,11 +20,44 @@ */ import { Component } from '@angular/core'; import { CellRendererContext } from '@c8y/ngx-components'; +import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal'; +import { SnoopExplorerComponent } from '../snoop-explorer/snoop-explorer-modal.component'; @Component({ selector: 'd11r-mapping-renderer-snooped', - template: '{{ context.value.snoopedTemplates ? context.value.snoopedTemplates.length: "" }}' + template: ` +
+ +
+ ` }) export class SnoopedTemplateRendererComponent { - constructor(public context: CellRendererContext) {} + constructor( + public context: CellRendererContext, + public bsModalService: BsModalService + ) {} + exploreSnoopedTemplates() { + const initialState = { + enrichedMapping: this.context.item, + labels: { + ok: 'Cancel', + cancel: 'Cancel' + } + }; + const confirmDeletionModalRef: BsModalRef = this.bsModalService.show( + SnoopExplorerComponent, + { initialState } + ); + } } diff --git a/dynamic-mapping-ui/src/mapping/renderer/status-cell.renderer.component.ts b/dynamic-mapping-ui/src/mapping/renderer/status-cell.renderer.component.ts index e4b3252c1..0924c4490 100644 --- a/dynamic-mapping-ui/src/mapping/renderer/status-cell.renderer.component.ts +++ b/dynamic-mapping-ui/src/mapping/renderer/status-cell.renderer.component.ts @@ -35,7 +35,7 @@ import { SnoopStatus } from '../../shared'; {{ 'snoop: stopped' }}
- {{ 'snoop: enabled' }} + {{ 'snoop: pending' }}
` }) diff --git a/dynamic-mapping-ui/src/mapping/snoop-explorer/snoop-explorer-modal.component.html b/dynamic-mapping-ui/src/mapping/snoop-explorer/snoop-explorer-modal.component.html new file mode 100644 index 000000000..b6744f5f7 --- /dev/null +++ b/dynamic-mapping-ui/src/mapping/snoop-explorer/snoop-explorer-modal.component.html @@ -0,0 +1,60 @@ + + + + +
+
+ +
+ +
+
+ + +
+
+
+
diff --git a/dynamic-mapping-ui/src/mapping/snoop-explorer/snoop-explorer-modal.component.ts b/dynamic-mapping-ui/src/mapping/snoop-explorer/snoop-explorer-modal.component.ts new file mode 100644 index 000000000..e13e98a45 --- /dev/null +++ b/dynamic-mapping-ui/src/mapping/snoop-explorer/snoop-explorer-modal.component.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2022 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, + * and/or its subsidiaries and/or its affiliates and/or their licensors. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @authors Christof Strack + */ + +import { Component, Input, OnInit } from '@angular/core'; +import { ModalLabels } from '@c8y/ngx-components'; +import { Subject } from 'rxjs'; +import { Mapping, MappingSubstitution } from '../../shared'; +import { isDisabled } from '../shared/util'; +import { MappingEnriched } from '../../shared/model/shared.model'; + +@Component({ + selector: 'd11r-snoop-explorer-modal', + templateUrl: './snoop-explorer-modal.component.html' +}) +export class SnoopExplorerComponent implements OnInit { + @Input() enrichedMapping: MappingEnriched; + mapping: Mapping; + closeSubject: Subject = new Subject(); + labels: ModalLabels; + isDisabled = isDisabled; + template: any; + editorOptions: any = { + mode: 'tree', + mainMenuBar: true, + navigationBar: false, + readOnly: true, + statusBar: true + }; + + ngOnInit(): void { + this.mapping = this.enrichedMapping.mapping; + this.labels = { + cancel: 'Cancel' + }; + } + + onDismiss() { + // console.log('Dismiss'); + this.closeSubject.next(undefined); + } + + async onSelectSnoopedTemplate(index: any) { + this.template = JSON.parse(this.mapping.snoopedTemplates[index]); + } +} diff --git a/dynamic-mapping-ui/src/mapping/step-property/mapping-properties.component.ts b/dynamic-mapping-ui/src/mapping/step-property/mapping-properties.component.ts index 8b54256ff..ea100bfab 100644 --- a/dynamic-mapping-ui/src/mapping/step-property/mapping-properties.component.ts +++ b/dynamic-mapping-ui/src/mapping/step-property/mapping-properties.component.ts @@ -91,15 +91,15 @@ export class MappingStepPropertiesComponent implements OnInit, OnDestroy { // this.mapping, // this.stepperConfiguration // ); - const numberSnooped = this.mapping.snoopedTemplates - ? this.mapping.snoopedTemplates.length - : 0; - if (this.mapping.snoopStatus == SnoopStatus.STARTED && numberSnooped > 0) { - this.alertService.success( - `Already ${numberSnooped} templates exist. To stop the snooping process click on Cancel, select the respective mapping in the list of all mappings and choose the action Toggle Snooping.`, - `The recording process is in state ${this.mapping.snoopStatus}.` - ); - } + // const numberSnooped = this.mapping.snoopedTemplates + // ? this.mapping.snoopedTemplates.length + // : 0; + // if (this.mapping.snoopStatus == SnoopStatus.STARTED && numberSnooped > 0) { + // this.alertService.success( + // `Already ${numberSnooped} templates exist. To stop the snooping process click on Cancel, select the respective mapping in the list of all mappings and choose the action Toggle Snooping.`, + // `The recording process is in state ${this.mapping.snoopStatus}.` + // ); + // } this.propertyFormlyFields = [ { validators: { @@ -109,24 +109,6 @@ export class MappingStepPropertiesComponent implements OnInit, OnDestroy { : 'checkTopicsOutboundAreValid' ] }, - // validators: { - // validation: [ - // { - // name: - // this.stepperConfiguration.direction == Direction.INBOUND - // ? 'checkTopicsInboundAreValid' - // : 'checkTopicsOutboundAreValid' - // } - // ] - // }, - - // validators: { - // validation: [ - // this.stepperConfiguration.direction == Direction.INBOUND - // ? checkTopicsInboundAreValidWithOption({ sampleOption: 3 }) - // : checkTopicsOutboundAreValid - // ] - // }, fieldGroupClassName: 'row', fieldGroup: [ { diff --git a/dynamic-mapping-ui/src/mapping/stepper-mapping/mapping-stepper.component.ts b/dynamic-mapping-ui/src/mapping/stepper-mapping/mapping-stepper.component.ts index 0fe7d99a1..24eabe042 100644 --- a/dynamic-mapping-ui/src/mapping/stepper-mapping/mapping-stepper.component.ts +++ b/dynamic-mapping-ui/src/mapping/stepper-mapping/mapping-stepper.component.ts @@ -57,7 +57,7 @@ import { } from '../../shared'; import { JsonEditor2Component } from '../../shared/editor2/jsoneditor2.component'; import { MappingService } from '../core/mapping.service'; -import { EditSubstitutionComponent } from '../edit/edit-substitution-modal.component'; +import { EditSubstitutionComponent } from '../substitution/edit/edit-substitution-modal.component'; import { C8YRequest } from '../processor/processor.model'; import { ValidationError } from '../shared/mapping.model'; import { EditorMode } from '../shared/stepper-model'; @@ -140,8 +140,8 @@ export class MappingStepperComponent implements OnInit, OnDestroy { editorOptionsSourceStep3: any = {}; editorOptionsSourceStep4: any = {}; - editorOptionsTargetStep4: any = {}; editorOptionsTargetStep3: any = {}; + editorOptionsTargetStep4: any = {}; editorOptionsTesting: any = {}; selectedSubstitution: number = -1; diff --git a/dynamic-mapping-ui/src/mapping/edit/edit-substitution-modal.component.html b/dynamic-mapping-ui/src/mapping/substitution/edit/edit-substitution-modal.component.html similarity index 100% rename from dynamic-mapping-ui/src/mapping/edit/edit-substitution-modal.component.html rename to dynamic-mapping-ui/src/mapping/substitution/edit/edit-substitution-modal.component.html diff --git a/dynamic-mapping-ui/src/mapping/edit/edit-substitution-modal.component.ts b/dynamic-mapping-ui/src/mapping/substitution/edit/edit-substitution-modal.component.ts similarity index 96% rename from dynamic-mapping-ui/src/mapping/edit/edit-substitution-modal.component.ts rename to dynamic-mapping-ui/src/mapping/substitution/edit/edit-substitution-modal.component.ts index 1dc78fd53..59ba21c9f 100644 --- a/dynamic-mapping-ui/src/mapping/edit/edit-substitution-modal.component.ts +++ b/dynamic-mapping-ui/src/mapping/substitution/edit/edit-substitution-modal.component.ts @@ -27,10 +27,10 @@ import { Mapping, MappingSubstitution, RepairStrategy -} from '../../shared'; -import { EditorMode } from '../shared/stepper-model'; +} from '../../../shared'; +import { EditorMode } from '../../shared/stepper-model'; import { StepperConfiguration } from 'src/shared/model/shared.model'; -import { definesDeviceIdentifier } from '../shared/util'; +import { definesDeviceIdentifier } from '../../shared/util'; @Component({ selector: 'd11r-edit-substitution-modal',