From c63cf25423141491d74cd27be822adf2c66240c3 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 27 Nov 2025 17:19:50 -0400 Subject: data: Track: chop withPropertyFromMainRelease --- src/data/composite/things/track/index.js | 1 - .../inheritContributionListFromMainRelease.js | 15 +++--- .../things/track/inheritFromMainRelease.js | 9 ++-- .../things/track/withPropertyFromMainRelease.js | 53 ---------------------- 4 files changed, 12 insertions(+), 66 deletions(-) delete mode 100644 src/data/composite/things/track/withPropertyFromMainRelease.js (limited to 'src/data') diff --git a/src/data/composite/things/track/index.js b/src/data/composite/things/track/index.js index 88fd3d45..c200df19 100644 --- a/src/data/composite/things/track/index.js +++ b/src/data/composite/things/track/index.js @@ -1,3 +1,2 @@ export {default as inheritContributionListFromMainRelease} from './inheritContributionListFromMainRelease.js'; export {default as inheritFromMainRelease} from './inheritFromMainRelease.js'; -export {default as withPropertyFromMainRelease} from './withPropertyFromMainRelease.js'; diff --git a/src/data/composite/things/track/inheritContributionListFromMainRelease.js b/src/data/composite/things/track/inheritContributionListFromMainRelease.js index 94e19872..8db50060 100644 --- a/src/data/composite/things/track/inheritContributionListFromMainRelease.js +++ b/src/data/composite/things/track/inheritContributionListFromMainRelease.js @@ -5,12 +5,10 @@ import {input, templateCompositeFrom} from '#composite'; import {exposeDependency, raiseOutputWithoutDependency} from '#composite/control-flow'; +import {withPropertyFromObject} from '#composite/data'; import {withRecontextualizedContributionList, withRedatedContributionList} from '#composite/wiki-data'; -import withPropertyFromMainRelease - from './withPropertyFromMainRelease.js'; - export default templateCompositeFrom({ annotation: `inheritContributionListFromMainRelease`, @@ -20,21 +18,24 @@ export default templateCompositeFrom({ mode: input.value('falsy'), }), - withPropertyFromMainRelease({ + withPropertyFromObject({ + object: 'mainReleaseTrack', property: input.thisProperty(), + }).outputs({ + '#value': '#contributions', }), withRecontextualizedContributionList({ - list: '#mainReleaseValue', + list: '#contributions', }), withRedatedContributionList({ - list: '#mainReleaseValue', + list: '#contributions', date: 'date', }), exposeDependency({ - dependency: '#mainReleaseValue', + dependency: '#contributions', }), ], }); diff --git a/src/data/composite/things/track/inheritFromMainRelease.js b/src/data/composite/things/track/inheritFromMainRelease.js index 32a3165d..ca532bc7 100644 --- a/src/data/composite/things/track/inheritFromMainRelease.js +++ b/src/data/composite/things/track/inheritFromMainRelease.js @@ -6,9 +6,7 @@ import {input, templateCompositeFrom} from '#composite'; import {exposeDependency, raiseOutputWithoutDependency} from '#composite/control-flow'; - -import withPropertyFromMainRelease - from './withPropertyFromMainRelease.js'; +import {withPropertyFromObject} from '#composite/data'; export default templateCompositeFrom({ annotation: `inheritFromMainRelease`, @@ -19,12 +17,13 @@ export default templateCompositeFrom({ mode: input.value('falsy'), }), - withPropertyFromMainRelease({ + withPropertyFromObject({ + object: 'mainReleaseTrack', property: input.thisProperty(), }), exposeDependency({ - dependency: '#mainReleaseValue', + dependency: '#value', }), ], }); diff --git a/src/data/composite/things/track/withPropertyFromMainRelease.js b/src/data/composite/things/track/withPropertyFromMainRelease.js deleted file mode 100644 index ba3e2275..00000000 --- a/src/data/composite/things/track/withPropertyFromMainRelease.js +++ /dev/null @@ -1,53 +0,0 @@ -// Provides a value inherited from the main release, or null, -// if this track is not a secondary release. - -import {input, templateCompositeFrom} from '#composite'; - -import {withPropertyFromObject} from '#composite/data'; - -export default templateCompositeFrom({ - annotation: `withPropertyFromMainRelease`, - - inputs: { - property: input({type: 'string'}), - }, - - outputs: ({ - [input.staticValue('property')]: property, - }) => [ - (property - ? '#mainRelease.' + property - : '#mainReleaseValue'), - ], - - steps: () => [ - { - dependencies: ['isSecondaryRelease', input.staticValue('property')], - compute: (continuation, { - ['isSecondaryRelease']: isSecondaryRelease, - [input.staticValue('property')]: property, - }) => - (isSecondaryRelease - ? continuation() - : property - ? continuation.raiseOutput({['#mainRelease.' + property]: null}) - : continuation.raiseOutput({'#mainReleaseValue': null})), - }, - - withPropertyFromObject({ - object: 'mainReleaseTrack', - property: input('property'), - }), - - { - dependencies: ['#value', input.staticValue('property')], - compute: (continuation, { - ['#value']: value, - [input.staticValue('property')]: property, - }) => - (property - ? continuation.raiseOutput({['#mainRelease.' + property]: value}) - : continuation.raiseOutput({'#mainReleaseValue': value})), - }, - ], -}); -- cgit 1.3.0-6-gf8a5