import { EventEmitter, OnChanges, OnDestroy, OnInit } from '@angular/core'; import { DeleteValue, IHasPropertyWithPropertyDefinition, KnoraApiConnection, PropertyDefinition, ReadLinkValue, ReadProject, ReadResource, ReadValue, SystemPropertyDefinition } from '@dasch-swiss/dsp-js'; import { Subscription } from 'rxjs'; import { NotificationService } from '../../../action/services/notification.service'; import { StillImageRepresentation } from '../../representation/still-image/still-image.component'; import { ValueOperationEventService } from '../../services/value-operation-event.service'; import { ValueService } from '../../services/value.service'; export interface PropertyInfoValues { guiDef: IHasPropertyWithPropertyDefinition; propDef: PropertyDefinition; values: ReadValue[]; } export declare class ResourceViewComponent implements OnInit, OnChanges, OnDestroy { private _dspApiConnection; private _notification; private _valueOperationEventService; private _valueService; /** * Resource iri * * @param [iri] Resource iri */ iri: string; /** * Show all properties, even they don't have a value. * * @param (showAllProps) */ showAllProps: boolean; /** * Show toolbar with project info and some action tools on top of properties if true. * * @param (showToolbar) */ showToolbar: boolean; /** * @deprecated Use `referredProjectClicked` instead * @param openProject EventEmitter which sends project information to parent component */ openProject: EventEmitter; /** * Output `referredProjectClicked` of resource view component: * Can be used to go to project page */ referredProjectClicked: EventEmitter; /** * Output `referredProjectHovered` of resource view component: * Can be used for preview when hovering on project */ referredProjectHovered: EventEmitter; /** * Output `referredResourceClicked` of resource view component: * Can be used to open resource */ referredResourceClicked: EventEmitter; /** * Output `referredResourceHovered` of resource view component: * Can be used for preview of resource on hover */ referredResourceHovered: EventEmitter; resource: ReadResource; resPropInfoVals: PropertyInfoValues[]; systemPropDefs: SystemPropertyDefinition[]; valueOperationEventSubscriptions: Subscription[]; stillImageRepresentations: StillImageRepresentation[]; constructor(_dspApiConnection: KnoraApiConnection, _notification: NotificationService, _valueOperationEventService: ValueOperationEventService, _valueService: ValueService); ngOnInit(): void; ngOnChanges(): void; ngOnDestroy(): void; /** * Get a read resource sequence with ontology information and incoming resources. * * @param iri resourceIri */ getResource(iri: string): void; /** * Updates the UI in the event of a new value being added to show the new value * * @param valueToAdd the value to add to the end of the values array of the filtered property */ addValueToResource(valueToAdd: ReadValue): void; /** * Updates the UI in the event of an existing value being updated to show the updated value * * @param valueToReplace the value to be replaced within the values array of the filtered property * @param updatedValue the value to replace valueToReplace with */ updateValueInResource(valueToReplace: ReadValue, updatedValue: ReadValue): void; /** * Updates the UI in the event of an existing value being deleted * * @param valueToDelete the value to remove from the values array of the filtered property */ deleteValueFromResource(valueToDelete: DeleteValue): void; /** * Updates the standoff link value for the resource being displayed. * */ private _updateStandoffLinkValue; /** * Event receiver: Show all props or not * * @param show */ toggleProps(show: boolean): void; }