« 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
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/composite')
-rw-r--r--src/data/composite/things/artwork/withDate.js6
-rw-r--r--src/data/composite/wiki-data/withConstitutedArtwork.js8
-rw-r--r--src/data/composite/wiki-properties/constitutibleArtwork.js8
-rw-r--r--src/data/composite/wiki-properties/constitutibleArtworkList.js8
4 files changed, 18 insertions, 12 deletions
diff --git a/src/data/composite/things/artwork/withDate.js b/src/data/composite/things/artwork/withDate.js
index 08f1427c..5e05b814 100644
--- a/src/data/composite/things/artwork/withDate.js
+++ b/src/data/composite/things/artwork/withDate.js
@@ -1,5 +1,6 @@
 import {input, templateCompositeFrom} from '#composite';
 
+import {raiseOutputWithoutDependency} from '#composite/control-flow';
 import {withPropertyFromObject} from '#composite/data';
 
 export default templateCompositeFrom({
@@ -25,6 +26,11 @@ export default templateCompositeFrom({
           : continuation()),
     },
 
+    raiseOutputWithoutDependency({
+      dependency: 'dateFromThingProperty',
+      output: input.value({'#date': null}),
+    }),
+
     withPropertyFromObject({
       object: 'thing',
       property: 'dateFromThingProperty',
diff --git a/src/data/composite/wiki-data/withConstitutedArtwork.js b/src/data/composite/wiki-data/withConstitutedArtwork.js
index ab3c45e0..44623450 100644
--- a/src/data/composite/wiki-data/withConstitutedArtwork.js
+++ b/src/data/composite/wiki-data/withConstitutedArtwork.js
@@ -7,10 +7,10 @@ export default templateCompositeFrom({
 
   inputs: {
     dimensionsFromThingProperty: input({type: 'string', acceptsNull: true}),
-    fileExtensionFromThingProperty: input({type: 'string'}),
-    artistContribsFromThingProperty: input({type: 'string'}),
-    artistContribsArtistProperty: input({type: 'string'}),
-    dateFromThingProperty: input({type: 'string'}),
+    fileExtensionFromThingProperty: input({type: 'string', acceptsNull: true}),
+    artistContribsFromThingProperty: input({type: 'string', acceptsNull: true}),
+    artistContribsArtistProperty: input({type: 'string', acceptsNull: true}),
+    dateFromThingProperty: input({type: 'string', acceptsNull: true}),
   },
 
   outputs: ['#constitutedArtwork'],
diff --git a/src/data/composite/wiki-properties/constitutibleArtwork.js b/src/data/composite/wiki-properties/constitutibleArtwork.js
index 870e44c7..9f7ba13e 100644
--- a/src/data/composite/wiki-properties/constitutibleArtwork.js
+++ b/src/data/composite/wiki-properties/constitutibleArtwork.js
@@ -18,10 +18,10 @@ const template = templateCompositeFrom({
 
   inputs: {
     dimensionsFromThingProperty: input({type: 'string', acceptsNull: true}),
-    fileExtensionFromThingProperty: input({type: 'string'}),
-    artistContribsFromThingProperty: input({type: 'string'}),
-    artistContribsArtistProperty: input({type: 'string'}),
-    dateFromThingProperty: input({type: 'string'}),
+    fileExtensionFromThingProperty: input({type: 'string', acceptsNull: true}),
+    artistContribsFromThingProperty: input({type: 'string', acceptsNull: true}),
+    artistContribsArtistProperty: input({type: 'string', acceptsNull: true}),
+    dateFromThingProperty: input({type: 'string', acceptsNull: true}),
   },
 
   steps: () => [
diff --git a/src/data/composite/wiki-properties/constitutibleArtworkList.js b/src/data/composite/wiki-properties/constitutibleArtworkList.js
index 6a48cba8..29e6c774 100644
--- a/src/data/composite/wiki-properties/constitutibleArtworkList.js
+++ b/src/data/composite/wiki-properties/constitutibleArtworkList.js
@@ -17,10 +17,10 @@ const template = templateCompositeFrom({
 
   inputs: {
     dimensionsFromThingProperty: input({type: 'string', acceptsNull: true}),
-    fileExtensionFromThingProperty: input({type: 'string'}),
-    artistContribsFromThingProperty: input({type: 'string'}),
-    artistContribsArtistProperty: input({type: 'string'}),
-    dateFromThingProperty: input({type: 'string'}),
+    fileExtensionFromThingProperty: input({type: 'string', acceptsNull: true}),
+    artistContribsFromThingProperty: input({type: 'string', acceptsNull: true}),
+    artistContribsArtistProperty: input({type: 'string', acceptsNull: true}),
+    dateFromThingProperty: input({type: 'string', acceptsNull: true}),
   },
 
   steps: () => [