diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-06-21 20:49:23 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-06-23 22:15:00 -0300 |
commit | 4abfc0347a03e28eb954817bd84bf832840b6305 (patch) | |
tree | c37bc907152e9613a4bbf898b9b36786b77bf214 /src/data/composite/wiki-data | |
parent | 67275cbf825472cafcf287b6a5ad43bc74c6b4a7 (diff) |
data: withParsedCommentaryEntries: dateKind, secondDate
Diffstat (limited to 'src/data/composite/wiki-data')
-rw-r--r-- | src/data/composite/wiki-data/withParsedCommentaryEntries.js | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/data/composite/wiki-data/withParsedCommentaryEntries.js b/src/data/composite/wiki-data/withParsedCommentaryEntries.js index 5c28d20e..144781a8 100644 --- a/src/data/composite/wiki-data/withParsedCommentaryEntries.js +++ b/src/data/composite/wiki-data/withParsedCommentaryEntries.js @@ -95,6 +95,8 @@ export default templateCompositeFrom({ 'artistDisplayText', 'annotation', 'date', + 'secondDate', + 'dateKind', 'accessDate', 'accessKind', ]), @@ -165,11 +167,28 @@ export default templateCompositeFrom({ ['#entries.date']: date, }) => continuation({ ['#entries.date']: - date.map(date => date ? new Date(date) : null), + date + .map(date => date ? new Date(date) : null), }), }, { + dependencies: ['#entries.secondDate'], + compute: (continuation, { + ['#entries.secondDate']: secondDate, + }) => continuation({ + ['#entries.secondDate']: + secondDate + .map(date => date ? new Date(date) : null), + }), + }, + + fillMissingListItems({ + list: '#entries.dateKind', + fill: input.value(null), + }), + + { dependencies: ['#entries.accessDate', '#entries.webArchiveDate'], compute: (continuation, { ['#entries.accessDate']: accessDate, @@ -206,6 +225,8 @@ export default templateCompositeFrom({ '#entries.artistDisplayText', '#entries.annotation', '#entries.date', + '#entries.secondDate', + '#entries.dateKind', '#entries.accessDate', '#entries.accessKind', '#entries.body', @@ -216,6 +237,8 @@ export default templateCompositeFrom({ ['#entries.artistDisplayText']: artistDisplayText, ['#entries.annotation']: annotation, ['#entries.date']: date, + ['#entries.secondDate']: secondDate, + ['#entries.dateKind']: dateKind, ['#entries.accessDate']: accessDate, ['#entries.accessKind']: accessKind, ['#entries.body']: body, @@ -226,6 +249,8 @@ export default templateCompositeFrom({ artistDisplayText, annotation, date, + secondDate, + dateKind, accessDate, accessKind, body, |