« get me outta code hell

data: LyricsEntry & co - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things/commentary-entry.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-04-14 21:16:30 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-04-16 14:29:30 -0300
commit850821c8e99e160370f926a3e25b003de0489f45 (patch)
tree54d2dbacac95c9ef8c256bcc4c659dbf0797b5a6 /src/data/things/commentary-entry.js
parent3453dc831989829f996a2ef3cefa408b94ca70d6 (diff)
data: LyricsEntry & co
Diffstat (limited to 'src/data/things/commentary-entry.js')
-rw-r--r--src/data/things/commentary-entry.js118
1 files changed, 0 insertions, 118 deletions
diff --git a/src/data/things/commentary-entry.js b/src/data/things/commentary-entry.js
deleted file mode 100644
index 3cc53d85..00000000
--- a/src/data/things/commentary-entry.js
+++ /dev/null
@@ -1,118 +0,0 @@
-import {input} from '#composite';
-import find from '#find';
-import Thing from '#thing';
-import {is, isDate} from '#validators';
-import {parseDate} from '#yaml';
-
-import {contentString, referenceList, simpleDate, soupyFind, thing}
-  from '#composite/wiki-properties';
-
-import {
-  exposeConstant,
-  exposeDependencyOrContinue,
-  exposeUpdateValueOrContinue,
-  withResultOfAvailabilityCheck,
-} from '#composite/control-flow';
-
-import {withWebArchiveDate} from '#composite/things/commentary-entry';
-
-export class CommentaryEntry extends Thing {
-  static [Thing.getPropertyDescriptors] = ({Artist}) => ({
-    // Update & expose
-
-    thing: thing(),
-
-    artists: referenceList({
-      class: input.value(Artist),
-      find: soupyFind.input('artist'),
-    }),
-
-    artistText: contentString(),
-
-    annotation: contentString(),
-
-    dateKind: {
-      flags: {update: true, expose: true},
-
-      update: {
-        validate: is(...[
-          'sometime',
-          'throughout',
-          'around',
-        ]),
-      },
-    },
-
-    accessKind: [
-      exposeUpdateValueOrContinue({
-        validate: input.value(
-          is(...[
-            'captured',
-            'accessed',
-          ])),
-      }),
-
-      withWebArchiveDate(),
-
-      withResultOfAvailabilityCheck({
-        from: '#webArchiveDate',
-      }),
-
-      {
-        dependencies: ['#availability'],
-        compute: (continuation, {['#availability']: availability}) =>
-          (availability
-            ? continuation.exit('captured')
-            : continuation()),
-      },
-
-      exposeConstant({
-        value: input.value(null),
-      }),
-    ],
-
-    date: simpleDate(),
-
-    secondDate: simpleDate(),
-
-    accessDate: [
-      exposeUpdateValueOrContinue({
-        validate: input.value(isDate),
-      }),
-
-      withWebArchiveDate(),
-
-      exposeDependencyOrContinue({
-        dependency: '#webArchiveDate',
-      }),
-
-      exposeConstant({
-        value: input.value(null),
-      }),
-    ],
-
-    body: contentString(),
-
-    // Update only
-
-    find: soupyFind(),
-  });
-
-  static [Thing.yamlDocumentSpec] = {
-    fields: {
-      'Artists': {property: 'artists'},
-      'Artist Text': {property: 'artistText'},
-
-      'Annotation': {property: 'annotation'},
-
-      'Date Kind': {property: 'dateKind'},
-      'Access Kind': {property: 'accessKind'},
-
-      'Date': {property: 'date', transform: parseDate},
-      'Second Date': {property: 'secondDate', transform: parseDate},
-      'Access Date': {property: 'accessDate', transform: parseDate},
-
-      'Body': {property: 'body'},
-    },
-  };
-}