From 0df2ba538cfced993ec6794a589512302a62373d Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 23 Apr 2025 14:40:15 -0300 Subject: data: Artwork: withAttachedArtwork & friends --- .../artwork/withContribsFromAttachedArtwork.js | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/data/composite/things/artwork/withContribsFromAttachedArtwork.js (limited to 'src/data/composite/things/artwork/withContribsFromAttachedArtwork.js') diff --git a/src/data/composite/things/artwork/withContribsFromAttachedArtwork.js b/src/data/composite/things/artwork/withContribsFromAttachedArtwork.js new file mode 100644 index 00000000..36abb3fe --- /dev/null +++ b/src/data/composite/things/artwork/withContribsFromAttachedArtwork.js @@ -0,0 +1,28 @@ +import {input, templateCompositeFrom} from '#composite'; + +import {raiseOutputWithoutDependency} from '#composite/control-flow'; +import {withPropertyFromObject} from '#composite/data'; +import {withRecontextualizedContributionList} from '#composite/wiki-data'; + +import withPropertyFromAttachedArtwork from './withPropertyFromAttachedArtwork.js'; + +export default templateCompositeFrom({ + annotaion: `withContribsFromAttachedArtwork`, + + outputs: ['#attachedArtwork.artistContribs'], + + steps: () => [ + withPropertyFromAttachedArtwork({ + property: input.value('artistContribs'), + }), + + raiseOutputWithoutDependency({ + dependency: '#attachedArtwork.artistContribs', + output: input.value({'#attachedArtwork.artistContribs': null}), + }), + + withRecontextualizedContributionList({ + list: '#attachedArtwork.artistContribs', + }), + ], +}); -- cgit 1.3.0-6-gf8a5