From 0dc4db58b90f46cc938b72d571d690e197c6c243 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 5 Aug 2024 12:19:58 -0300 Subject: data, test: Album.trackSections: use direct links --- src/data/composite/things/album/index.js | 1 - .../composite/things/album/withTrackSections.js | 21 --------------------- src/data/composite/things/album/withTracks.js | 9 ++++++--- 3 files changed, 6 insertions(+), 25 deletions(-) delete mode 100644 src/data/composite/things/album/withTrackSections.js (limited to 'src/data/composite/things/album') diff --git a/src/data/composite/things/album/index.js b/src/data/composite/things/album/index.js index 0ef91b87..8b5098f0 100644 --- a/src/data/composite/things/album/index.js +++ b/src/data/composite/things/album/index.js @@ -1,2 +1 @@ -export {default as withTrackSections} from './withTrackSections.js'; export {default as withTracks} from './withTracks.js'; diff --git a/src/data/composite/things/album/withTrackSections.js b/src/data/composite/things/album/withTrackSections.js deleted file mode 100644 index a56bda31..00000000 --- a/src/data/composite/things/album/withTrackSections.js +++ /dev/null @@ -1,21 +0,0 @@ -import {input, templateCompositeFrom} from '#composite'; - -import find from '#find'; - -import {withResolvedReferenceList} from '#composite/wiki-data'; - -export default templateCompositeFrom({ - annotation: `withTrackSections`, - - outputs: ['#trackSections'], - - steps: () => [ - withResolvedReferenceList({ - list: 'trackSections', - data: 'ownTrackSectionData', - find: input.value(find.unqualifiedTrackSection), - }).outputs({ - ['#resolvedReferenceList']: '#trackSections', - }), - ], -}); diff --git a/src/data/composite/things/album/withTracks.js b/src/data/composite/things/album/withTracks.js index c8d27c4c..348220e7 100644 --- a/src/data/composite/things/album/withTracks.js +++ b/src/data/composite/things/album/withTracks.js @@ -3,7 +3,7 @@ import {input, templateCompositeFrom} from '#composite'; import {withFlattenedList, withPropertyFromList} from '#composite/data'; import {withResolvedReferenceList} from '#composite/wiki-data'; -import withTrackSections from './withTrackSections.js'; +import {raiseOutputWithoutDependency} from '#composite/control-flow'; export default templateCompositeFrom({ annotation: `withTracks`, @@ -11,10 +11,13 @@ export default templateCompositeFrom({ outputs: ['#tracks'], steps: () => [ - withTrackSections(), + raiseOutputWithoutDependency({ + dependency: 'trackSections', + output: input.value({'#tracks': []}), + }), withPropertyFromList({ - list: '#trackSections', + list: 'trackSections', property: input.value('tracks'), }), -- cgit 1.3.0-6-gf8a5