diff options
Diffstat (limited to 'src/data/composite/wiki-properties/annotatedReferenceList.js')
-rw-r--r-- | src/data/composite/wiki-properties/annotatedReferenceList.js | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/data/composite/wiki-properties/annotatedReferenceList.js b/src/data/composite/wiki-properties/annotatedReferenceList.js new file mode 100644 index 00000000..e8e5ac8c --- /dev/null +++ b/src/data/composite/wiki-properties/annotatedReferenceList.js @@ -0,0 +1,39 @@ +import {input, templateCompositeFrom} from '#composite'; +import find from '#find'; +import {validateAnnotatedReferenceList} from '#validators'; +import {combineWikiDataArrays} from '#wiki-data'; + +import {exposeDependency} from '#composite/control-flow'; +import {inputWikiData, withResolvedAnnotatedReferenceList} + from '#composite/wiki-data'; + +import {referenceListInputDescriptions, referenceListUpdateDescription} + from './helpers/reference-list-helpers.js'; + +export default templateCompositeFrom({ + annotation: `referencedArtworkList`, + + compose: false, + + inputs: { + ...referenceListInputDescriptions(), + + data: inputWikiData({allowMixedTypes: true}), + find: input({type: 'function'}), + }, + + update: + referenceListUpdateDescription({ + validateReferenceList: validateAnnotatedReferenceList, + }), + + steps: () => [ + withResolvedAnnotatedReferenceList({ + list: input.updateValue(), + data: input('data'), + find: input('find'), + }), + + exposeDependency({dependency: '#resolvedAnnotatedReferenceList'}), + ], +}); |