diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-03-04 20:31:12 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-06-18 22:56:01 -0300 |
commit | 6d0ad85bc718c2429d8dc124bba1329cc9615d12 (patch) | |
tree | 37b9b6d62fe2054170604c252e067568d42bc82d /src/data/things | |
parent | 75505899c70594e250bdcb582fd2f5c40a971639 (diff) |
data: contribution: matchingPresets
Diffstat (limited to 'src/data/things')
-rw-r--r-- | src/data/things/album.js | 6 | ||||
-rw-r--r-- | src/data/things/contribution.js | 9 | ||||
-rw-r--r-- | src/data/things/flash.js | 12 | ||||
-rw-r--r-- | src/data/things/track.js | 15 |
4 files changed, 39 insertions, 3 deletions
diff --git a/src/data/things/album.js b/src/data/things/album.js index e9f55b2c..d2942fc7 100644 --- a/src/data/things/album.js +++ b/src/data/things/album.js @@ -37,6 +37,7 @@ import { simpleDate, simpleString, singleReference, + thing, urls, wikiData, } from '#composite/wiki-properties'; @@ -53,6 +54,7 @@ export class Album extends Thing { Group, Track, TrackSection, + WikiInfo, }) => ({ // Update & expose @@ -173,6 +175,10 @@ export class Album extends Thing { class: input.value(TrackSection), }), + wikiInfo: thing({ + class: input.value(WikiInfo), + }), + // Expose only commentatorArtists: commentatorArtists(), diff --git a/src/data/things/contribution.js b/src/data/things/contribution.js index e6479a1e..6b7f050f 100644 --- a/src/data/things/contribution.js +++ b/src/data/things/contribution.js @@ -13,6 +13,7 @@ import {withResolvedReference} from '#composite/wiki-data'; import { withContributionArtist, withContributionContext, + withMatchingContributionPresets, } from '#composite/things/contribution'; export class Contribution extends Thing { @@ -66,6 +67,14 @@ export class Contribution extends Thing { }), }, ], + + matchingPresets: [ + withMatchingContributionPresets(), + + exposeDependency({ + dependency: '#matchingContributionPresets', + }), + ], }); [inspect.custom](depth, options, inspect) { diff --git a/src/data/things/flash.js b/src/data/things/flash.js index 7038df86..2c0c1417 100644 --- a/src/data/things/flash.js +++ b/src/data/things/flash.js @@ -30,6 +30,7 @@ import { name, referenceList, simpleDate, + thing, urls, wikiData, } from '#composite/wiki-properties'; @@ -40,7 +41,12 @@ import {withFlashSide} from '#composite/things/flash-act'; export class Flash extends Thing { static [Thing.referenceType] = 'flash'; - static [Thing.getPropertyDescriptors] = ({Artist, Track, FlashAct}) => ({ + static [Thing.getPropertyDescriptors] = ({ + Artist, + Track, + FlashAct, + WikiInfo, + }) => ({ // Update & expose name: name('Unnamed Flash'), @@ -118,6 +124,10 @@ export class Flash extends Thing { class: input.value(FlashAct), }), + wikiInfo: thing({ + class: input.value(WikiInfo), + }), + // Expose only commentatorArtists: commentatorArtists(), diff --git a/src/data/things/track.js b/src/data/things/track.js index 11e71151..65cc1b68 100644 --- a/src/data/things/track.js +++ b/src/data/things/track.js @@ -43,8 +43,9 @@ import { referenceList, reverseReferenceList, simpleDate, - singleReference, simpleString, + singleReference, + thing, urls, wikiData, } from '#composite/wiki-properties'; @@ -66,7 +67,13 @@ import { export class Track extends Thing { static [Thing.referenceType] = 'track'; - static [Thing.getPropertyDescriptors] = ({Album, ArtTag, Artist, Flash}) => ({ + static [Thing.getPropertyDescriptors] = ({ + Album, + ArtTag, + Artist, + Flash, + WikiInfo, + }) => ({ // Update & expose name: name('Unnamed Track'), @@ -308,6 +315,10 @@ export class Track extends Thing { class: input.value(Track), }), + wikiInfo: thing({ + class: input.value(WikiInfo), + }), + // Expose only commentatorArtists: commentatorArtists(), |