diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2025-05-01 14:59:30 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-05-06 12:29:05 -0300 |
commit | 9c49b349785eea14e29a489b3f78784c659316f8 (patch) | |
tree | ad3432d5a661e0bd57712b538374508b6db461ed /src/data/composite/things/content/hasAnnotationPart.js | |
parent | ac5e149c7220a473068536cd15e52fa0fbfaf2fe (diff) |
data: CommentaryEntry.isWikiEditorCommentary, etc
Also: LyricsEntry.isWikiLyrics Also: hasAnnotationPart
Diffstat (limited to 'src/data/composite/things/content/hasAnnotationPart.js')
-rw-r--r-- | src/data/composite/things/content/hasAnnotationPart.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/data/composite/things/content/hasAnnotationPart.js b/src/data/composite/things/content/hasAnnotationPart.js new file mode 100644 index 00000000..f989d829 --- /dev/null +++ b/src/data/composite/things/content/hasAnnotationPart.js @@ -0,0 +1,31 @@ +import {input, templateCompositeFrom} from '#composite'; + +import {exposeWhetherDependencyAvailable} from '#composite/control-flow'; + +import withAnnotationParts from './withAnnotationParts.js'; + +export default templateCompositeFrom({ + annotation: `hasAnnotationPart`, + + compose: false, + + inputs: { + part: input({type: 'string'}), + }, + + steps: () => [ + withAnnotationParts({ + mode: input.value('strings'), + }), + + withIndexInList({ + item: input('part'), + list: '#annotationParts', + }), + + exposeWhetherDependencyAvailable({ + dependency: '#index', + mode: input.value('index'), + }), + ], +}); |