diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-09-04 12:45:11 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-09-04 12:46:21 -0300 |
commit | b0444ca365a7f1165a3aef95a85ad1f380ffc591 (patch) | |
tree | 7a27261b4b6dfab418e12b03261ec86aacbefbd9 /src/data/composite/wiki-properties | |
parent | a46db43a47928bfa9bb48ee31b521f115b754566 (diff) |
data: reverseSingleReferenceList
Diffstat (limited to 'src/data/composite/wiki-properties')
-rw-r--r-- | src/data/composite/wiki-properties/index.js | 1 | ||||
-rw-r--r-- | src/data/composite/wiki-properties/reverseSingleReferenceList.js | 24 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/data/composite/wiki-properties/index.js b/src/data/composite/wiki-properties/index.js index e35948e7..adfe4a9b 100644 --- a/src/data/composite/wiki-properties/index.js +++ b/src/data/composite/wiki-properties/index.js @@ -21,6 +21,7 @@ export {default as name} from './name.js'; export {default as referenceList} from './referenceList.js'; export {default as reverseContributionList} from './reverseContributionList.js'; export {default as reverseReferenceList} from './reverseReferenceList.js'; +export {default as reverseSingleReferenceList} from './reverseSingleReferenceList.js'; export {default as simpleDate} from './simpleDate.js'; export {default as simpleString} from './simpleString.js'; export {default as singleReference} from './singleReference.js'; diff --git a/src/data/composite/wiki-properties/reverseSingleReferenceList.js b/src/data/composite/wiki-properties/reverseSingleReferenceList.js new file mode 100644 index 00000000..d180b12d --- /dev/null +++ b/src/data/composite/wiki-properties/reverseSingleReferenceList.js @@ -0,0 +1,24 @@ +import {input, templateCompositeFrom} from '#composite'; + +import {exposeDependency} from '#composite/control-flow'; +import {inputWikiData, withReverseSingleReferenceList} from '#composite/wiki-data'; + +export default templateCompositeFrom({ + annotation: `reverseSingleReferenceList`, + + compose: false, + + inputs: { + data: inputWikiData({allowMixedTypes: false}), + ref: input({type: 'string'}), + }, + + steps: () => [ + withReverseSingleReferenceList({ + data: input('data'), + ref: input('ref'), + }), + + exposeDependency({dependency: '#reverseSingleReferenceList'}), + ], +}); |