add the ability to mix text based metadata fields, authority controlled fields and typed items in the same section

This commit is contained in:
Art Lowel
2019-01-21 18:27:07 +01:00
parent 8ae8498ab1
commit 57999ad382
54 changed files with 833 additions and 98 deletions

View File

@@ -0,0 +1,31 @@
/**
* An Enum defining the representation type of metadata
*/
export enum MetadataRepresentationType {
None = 'none',
Item = 'item',
AuthorityControlled = 'authority_controlled',
PlainText = 'plain_text'
}
/**
* An interface containing information about how we should represent certain metadata
*/
export interface MetadataRepresentation {
/**
* The type of item this metadata is representing
* e.g. 'Person'
* This can be used for template matching
*/
itemType: string;
/**
* How we should render the metadata in a list
*/
representationType: MetadataRepresentationType,
/**
* Fetches the primary value to be displayed
*/
getPrimaryValue(): string
}