From 928a8247048d3476d46b0e8817f11fc5b068506a Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 1 May 2025 16:50:50 -0300 Subject: data: ContentEntry: implicit references via artistText --- .../composite/things/content/contentArtists.js | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/data/composite/things/content/contentArtists.js (limited to 'src/data/composite/things/content/contentArtists.js') diff --git a/src/data/composite/things/content/contentArtists.js b/src/data/composite/things/content/contentArtists.js new file mode 100644 index 00000000..77273047 --- /dev/null +++ b/src/data/composite/things/content/contentArtists.js @@ -0,0 +1,39 @@ +import {input, templateCompositeFrom} from '#composite'; +import {validateReferenceList} from '#validators'; + +import {exitWithoutDependency, exposeDependency} + from '#composite/control-flow'; +import {withResolvedReferenceList} from '#composite/wiki-data'; +import {soupyFind} from '#composite/wiki-properties'; + +import withExpressedOrImplicitArtistReferences + from './helpers/withExpressedOrImplicitArtistReferences.js'; + +export default templateCompositeFrom({ + annotation: `contentArtists`, + + compose: false, + + update: { + validate: validateReferenceList('artist'), + }, + + steps: () => [ + withExpressedOrImplicitArtistReferences({ + from: input.updateValue(), + }), + + exitWithoutDependency({ + dependency: '#artistReferences', + }), + + withResolvedReferenceList({ + list: '#artistReferences', + find: soupyFind.input('artist'), + }), + + exposeDependency({ + dependency: '#resolvedReferenceList', + }), + ], +}); -- cgit 1.3.0-6-gf8a5