UNPKG

@knora/viewer

Version:
68 lines (67 loc) 2.15 kB
import { OnChanges, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { KuiMessageData } from '@knora/action'; import { Constants, IHasProperty, KnoraApiConnection, ReadResource, ReadValue } from '@knora/api'; import { PropertyDefinition } from '@knora/api/src/models/v2/ontologies/property-definition'; import { GuiOrder, OntologyInformation } from '@knora/core'; import { StillImageComponent } from '../../representation'; export interface TempProperty { guiDef: IHasProperty; propDef: PropertyDefinition; values: ReadValue[]; } export declare class FileRepresentation { static list: string[]; } export declare class ResourceViewComponent implements OnInit, OnChanges { private knoraApiConnection; protected _route: ActivatedRoute; protected _router: Router; /** * Resource iri * * @param {string} [iri] Resource iri */ iri?: string; /** * Show all properties, even they don't have a value. * * @param {boolean} [allProps] */ allProps?: boolean; /** * Show toolbar with project info and some action tools on top of properties if true. * * @param {boolean} [toolbar] */ toolbar?: boolean; kuiStillImage: StillImageComponent; loading: boolean; resource: ReadResource; activeResource: ReadResource; propArray: TempProperty[]; fileRepresentation: ReadValue[]; Constants: typeof Constants; ontologyInfo: OntologyInformation; sequence: ReadResource[]; guiOrder: GuiOrder[]; error: KuiMessageData; constructor(knoraApiConnection: KnoraApiConnection, _route: ActivatedRoute, _router: Router); ngOnInit(): void; ngOnChanges(): void; /** * Get a read resource sequence with ontology information and incoming resources. * * @param {string} id Resource iri */ getResource(id: string): void; /** * Get incoming links for a resource. * * @param offset * @param callback */ openLink(id: string): void; refreshProperties(index: number): void; toggleProps(show: boolean): void; }