From c78bcbbdf370ca62c8b3eb8879e57d21a95e3614 Mon Sep 17 00:00:00 2001 From: hudson-newey Date: Thu, 14 Nov 2024 13:29:33 +1000 Subject: [PATCH] bump web components version This web components bump includes fixes for verification grid result downloads by calling toJSON on subject models. This commit also removes the hacky stringification of tag names in the workbench client as the web components can now handle an array of tags Fixes: #2168 --- package-lock.json | 8 ++++---- package.json | 2 +- src/app/services/models/annotation.service.ts | 8 ++------ 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 377651d43..3b7b3ba08 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "@angular/platform-server": "17.1.2", "@angular/router": "17.1.2", "@angular/ssr": "^17.1.2", - "@ecoacoustics/web-components": "^1.2.2", + "@ecoacoustics/web-components": "^1.2.5", "@fortawesome/angular-fontawesome": "^0.14.1", "@fortawesome/fontawesome-svg-core": "^6.1.1", "@fortawesome/free-solid-svg-icons": "^6.1.1", @@ -2837,9 +2837,9 @@ } }, "node_modules/@ecoacoustics/web-components": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@ecoacoustics/web-components/-/web-components-1.2.2.tgz", - "integrity": "sha512-HGtrZ3fxLiNmj2LG4oEgpCauAKI9wdXqglhYPmAULx9UCUXPOUBo3g7npJavBM7q+OXU7z6GmMh+91J6YaIP2Q==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@ecoacoustics/web-components/-/web-components-1.2.5.tgz", + "integrity": "sha512-OmshN95yJAzSQf+CPBsFujRDRw5A3353Yi4EXJAO8MgG+/ZG83BrC6dsyuzJEFpA9Sz89UwIlceyKvC7TLvmXw==", "dependencies": { "@json2csv/plainjs": "^7.0.6", "@lit-labs/preact-signals": "^1.0.2", diff --git a/package.json b/package.json index 385704d75..f8a6c4276 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@angular/platform-server": "17.1.2", "@angular/router": "17.1.2", "@angular/ssr": "^17.1.2", - "@ecoacoustics/web-components": "^1.2.2", + "@ecoacoustics/web-components": "^1.2.5", "@fortawesome/angular-fontawesome": "^0.14.1", "@fortawesome/fontawesome-svg-core": "^6.1.1", "@fortawesome/free-solid-svg-icons": "^6.1.1", diff --git a/src/app/services/models/annotation.service.ts b/src/app/services/models/annotation.service.ts index d555e1e45..7516c3978 100644 --- a/src/app/services/models/annotation.service.ts +++ b/src/app/services/models/annotation.service.ts @@ -25,16 +25,12 @@ export class AnnotationService { ) {} public async show(audioEvent: AudioEvent): Promise { - const tags = await this.showTags(audioEvent); + const audioEventTags = await this.showTags(audioEvent); const audioRecording = await this.showAudioRecording(audioEvent); - // TODO: this is a tempoary patch for ecoacoustics/web-components#213 - // until it is fixed upstream - const tagDescriptor = tags.map((tag) => tag.text).join(", "); - const data = { ...audioEvent, - tags: tagDescriptor, + tags: audioEventTags, audioRecording, };