« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/composite/things/content/helpers/withExpressedOrImplicitArtistReferences.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/composite/things/content/helpers/withExpressedOrImplicitArtistReferences.js')
-rw-r--r--src/data/composite/things/content/helpers/withExpressedOrImplicitArtistReferences.js61
1 files changed, 0 insertions, 61 deletions
diff --git a/src/data/composite/things/content/helpers/withExpressedOrImplicitArtistReferences.js b/src/data/composite/things/content/helpers/withExpressedOrImplicitArtistReferences.js
deleted file mode 100644
index 69da8c75..00000000
--- a/src/data/composite/things/content/helpers/withExpressedOrImplicitArtistReferences.js
+++ /dev/null
@@ -1,61 +0,0 @@
-import {input, templateCompositeFrom} from '#composite';
-
-import {raiseOutputWithoutDependency} from '#composite/control-flow';
-import {withFilteredList, withMappedList} from '#composite/data';
-import {withContentNodes} from '#composite/wiki-data';
-
-export default templateCompositeFrom({
-  annotation: `withExpressedOrImplicitArtistReferences`,
-
-  inputs: {
-    from: input({type: 'array', acceptsNull: true}),
-  },
-
-  outputs: ['#artistReferences'],
-
-  steps: () => [
-    {
-      dependencies: [input('from')],
-      compute: (continuation, {
-        [input('from')]: expressedArtistReferences,
-      }) =>
-        (expressedArtistReferences
-          ? continuation.raiseOutput({'#artistReferences': expressedArtistReferences})
-          : continuation()),
-    },
-
-    raiseOutputWithoutDependency({
-      dependency: 'artistText',
-      output: input.value({'#artistReferences': null}),
-    }),
-
-    withContentNodes({
-      from: 'artistText',
-    }),
-
-    withMappedList({
-      list: '#contentNodes',
-      map: input.value(node =>
-        node.type === 'tag' &&
-        node.data.replacerKey?.data === 'artist'),
-    }).outputs({
-      '#mappedList': '#artistTagFilter',
-    }),
-
-    withFilteredList({
-      list: '#contentNodes',
-      filter: '#artistTagFilter',
-    }).outputs({
-      '#filteredList': '#artistTags',
-    }),
-
-    withMappedList({
-      list: '#artistTags',
-      map: input.value(node =>
-        'artist:' +
-        node.data.replacerValue[0].data),
-    }).outputs({
-      '#mappedList': '#artistReferences',
-    }),
-  ],
-});