From e2d72d0cc769b526e8a92f7ddb03fff18dbd7ae6 Mon Sep 17 00:00:00 2001 From: Jaren Brownlee Date: Wed, 8 Mar 2023 16:10:03 -0700 Subject: [PATCH 1/2] various type mapping UI bugfixes (#269) --- .../src/components/etl/transformationDialog.vue | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/AdminWebApp/src/components/etl/transformationDialog.vue b/AdminWebApp/src/components/etl/transformationDialog.vue index caa6f5971..fdbe8eff7 100644 --- a/AdminWebApp/src/components/etl/transformationDialog.vue +++ b/AdminWebApp/src/components/etl/transformationDialog.vue @@ -690,14 +690,14 @@

{{ $t('dataMapping.metatypePropertyMapping') }} - {{ graphProperties.length }} / {{ payloadKeys.length }} properties selected - {{ graphProperties.length }} / {{ payloadKeys.length }} properties selected ({{ payloadSelectedArrayKeys.length }} array properties available) + {{ propertyMapping.filter(k => (k.metatype_key_id || k.metatype_relationship_key_id)).length }} / {{ payloadKeys.length }} properties selected + {{ propertyMapping.filter(k => (k.metatype_key_id || k.metatype_relationship_key_id)).length }} / {{ payloadKeys.length }} properties selected ({{ payloadSelectedArrayKeys.length }} array properties available)

@@ -712,7 +712,7 @@ @@ -1286,7 +1286,6 @@ export default class TransformationDialog extends Vue { payloadArrayKeys: any = [] rootArray: any = null metadataKeys: string[] = [] - graphProperties: { [key: string]: any }[] = [] operators = [ {text: "==", value: "==", requiresValue: true}, @@ -1463,7 +1462,6 @@ export default class TransformationDialog extends Vue { this.selectedMetatypeKeys = [] this.propertyMapping = [] this.metadataKeys = [] - this.graphProperties = [] } editReset() { @@ -1479,7 +1477,6 @@ export default class TransformationDialog extends Vue { if (Array.isArray(this.transformation?.keys)) this.propertyMapping = this.transformation?.keys as Array<{ [key: string]: any }> if(this.propertyMapping) { this.metadataKeys = this.propertyMapping.filter(k => k.is_metadata_key === true).map(k => k.key) as Array - this.graphProperties = this.propertyMapping.filter(k => (k.metatype_key_id || k.metatype_relationship_key_id)) as Array<{[key: string]: any}> } }) .catch(e => this.errorMessage = e) @@ -1504,7 +1501,6 @@ export default class TransformationDialog extends Vue { if (Array.isArray(this.transformation?.keys)) this.propertyMapping = this.transformation?.keys as Array<{ [key: string]: any }> if(this.propertyMapping) { this.metadataKeys = this.propertyMapping.filter(k => k.is_metadata_key === true).map(k => k.key) as Array - this.graphProperties = this.propertyMapping.filter(k => (k.metatype_key_id || k.metatype_relationship_key_id)) as Array<{[key: string]: any}> } }) .catch(e => this.errorMessage = e) @@ -1813,7 +1809,7 @@ export default class TransformationDialog extends Vue { const metatypeKey = this.selectedMetatypeKeys.find(metatypeKey => metatypeKey.property_name === rootKey) - if (metatypeKey) { + if (metatypeKey && !this.propertyMapping.some(m => (m.key === payloadKey && m.metatype_key_id === metatypeKey.id))) { this.propertyMapping.push({ id: uuidv4(), key: payloadKey, @@ -1833,7 +1829,7 @@ export default class TransformationDialog extends Vue { const relationship = this.selectedMetatypeRelationshipPairKeys.find(relationshipKey => relationshipKey.property_name === rootKey) - if (relationship) { + if (relationship && !this.propertyMapping.some(m => (m.key === payloadKey && m.metatype_relationship_key_id === relationship.id))) { this.propertyMapping.push({ id: uuidv4(), key: payloadKey, From 4b44bff95417d8bf2fb2222e9e917fdb76a1c51d Mon Sep 17 00:00:00 2001 From: John Darrington Date: Wed, 8 Mar 2023 16:53:12 -0700 Subject: [PATCH 2/2] fixed package-lock.json --- package-lock.json | 202 ++-------------------------------------------- 1 file changed, 8 insertions(+), 194 deletions(-) diff --git a/package-lock.json b/package-lock.json index 93629dbda..b72217c82 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3373,8 +3373,13 @@ ] }, "node_modules/cargo-cp-artifact": { - "resolved": "NodeLibraries/cargo-cp-artifact", - "link": true + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/cargo-cp-artifact/-/cargo-cp-artifact-0.1.8.tgz", + "integrity": "sha512-3j4DaoTrsCD1MRkTF2Soacii0Nx7UHCce0EwUf4fHnggwiE4fbmF2AbnfzayR36DF8KGadfh7M/Yfy625kgPlA==", + "dev": true, + "bin": { + "cargo-cp-artifact": "bin/cargo-cp-artifact.js" + } }, "node_modules/casbin": { "version": "5.24.3", @@ -14667,203 +14672,12 @@ "node": ">=10" } }, - "NodeLibraries/cargo-cp-artifact": { - "version": "0.1.7", - "dev": true, - "license": "MIT", - "bin": { - "cargo-cp-artifact": "bin/cargo-cp-artifact.js" - }, - "devDependencies": { - "mocha": "^10.0.0" - } - }, - "NodeLibraries/cargo-cp-artifact/node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "NodeLibraries/cargo-cp-artifact/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "NodeLibraries/cargo-cp-artifact/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "NodeLibraries/cargo-cp-artifact/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "NodeLibraries/cargo-cp-artifact/node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "NodeLibraries/cargo-cp-artifact/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "NodeLibraries/cargo-cp-artifact/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "NodeLibraries/cargo-cp-artifact/node_modules/mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", - "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", - "dev": true, - "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "NodeLibraries/cargo-cp-artifact/node_modules/mocha/node_modules/minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "NodeLibraries/cargo-cp-artifact/node_modules/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "NodeLibraries/cargo-cp-artifact/node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "NodeLibraries/cargo-cp-artifact/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "NodeLibraries/cargo-cp-artifact/node_modules/workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true - }, - "NodeLibraries/cargo-cp-artifact/node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "NodeLibraries/dl-fast-load": { "version": "0.1.0", "hasInstallScript": true, "license": "MIT", "devDependencies": { - "cargo-cp-artifact": "file:../cargo-cp-artifact", + "cargo-cp-artifact": "^0.1.8", "cross-os": "^1.5.0" } }