diff options
Diffstat (limited to 'src/data/composite/wiki-properties')
-rw-r--r-- | src/data/composite/wiki-properties/annotatedReferenceList.js | 8 | ||||
-rw-r--r-- | src/data/composite/wiki-properties/referencedArtworkList.js | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/data/composite/wiki-properties/annotatedReferenceList.js b/src/data/composite/wiki-properties/annotatedReferenceList.js index 860f3c3d..d6364475 100644 --- a/src/data/composite/wiki-properties/annotatedReferenceList.js +++ b/src/data/composite/wiki-properties/annotatedReferenceList.js @@ -4,6 +4,7 @@ import {combineWikiDataArrays} from '#wiki-data'; import { isContentString, + isDate, optional, validateArrayItems, validateProperties, @@ -28,6 +29,11 @@ export default templateCompositeFrom({ data: inputWikiData({allowMixedTypes: true}), find: input({type: 'function'}), + date: input({ + validate: isDate, + acceptsNull: true, + }), + reference: input.staticValue({type: 'string', defaultValue: 'reference'}), annotation: input.staticValue({type: 'string', defaultValue: 'annotation'}), thing: input.staticValue({type: 'string', defaultValue: 'thing'}), @@ -53,6 +59,8 @@ export default templateCompositeFrom({ withResolvedAnnotatedReferenceList({ list: input.updateValue(), + date: input('date'), + reference: input('reference'), annotation: input('annotation'), thing: input('thing'), diff --git a/src/data/composite/wiki-properties/referencedArtworkList.js b/src/data/composite/wiki-properties/referencedArtworkList.js index a242af2c..819b2f43 100644 --- a/src/data/composite/wiki-properties/referencedArtworkList.js +++ b/src/data/composite/wiki-properties/referencedArtworkList.js @@ -1,5 +1,6 @@ import {input, templateCompositeFrom} from '#composite'; import find from '#find'; +import {isDate} from '#validators'; import {combineWikiDataArrays} from '#wiki-data'; import annotatedReferenceList from './annotatedReferenceList.js'; @@ -9,6 +10,13 @@ export default templateCompositeFrom({ compose: false, + inputs: { + date: input({ + validate: isDate, + acceptsNull: true, + }), + }, + steps: () => [ { dependencies: [ @@ -42,6 +50,7 @@ export default templateCompositeFrom({ referenceType: input.value(['album', 'track']), data: '#data', find: '#find', + date: input('date'), }), ], }); |