import * as React from 'react'; import { providers } from '@logilab/cwclientlibjs'; /** * Base componentn for a group of entity relation */ export declare class EntityRelationsGroup

extends React.Component { } /** * The parameters for relations group components */ export interface EntityRelationsGroupProps { /** * The entity */ entity: providers.Entity; /** * The shema for the relations in the group */ relations: providers.EntityRelationSchema[]; /** * Whether the entity is the relation's subject */ entityIsSubject: boolean; /** * Whether to enable the edition of the relations */ editable: boolean; /** * The CSS class name(s) for the component in normal conditions */ className: string; /** * Handler of events when the user click on a link to an entity */ onClickGotoTarget: (eid: number) => void; /** * Handler of events when the user wants to edit the relations */ onClickEdit: (relations: providers.EntityRelationSchema[]) => void; /** * Gets the target link for the specified entity * @param eid The entity */ getTargetLink: (eid: number) => string; /** * Gets the displayable value for the specified entity and schema * @param entity The entity that will be rendered * @param schema The schema for the entity */ renderDisplayValue: (entity: providers.Entity, schema: providers.EntitySchema) => JSX.Element; /** * Renders a specific relation in the group * @param component The current component (this) * @param relation The relation to render */ renderRelation: (component: EntityRelationsGroup, relation: providers.EntityRelationSchema) => JSX.Element; /** * Renders the component * @param component The current component (this) */ render: (component: EntityRelationsGroup) => JSX.Element; } /** * The values for the default parameters of relations components */ export declare const ENTITY_RELATIONS_GROUP_DEFAULT_PROPS: { editable: boolean; className: string; onClickGotoTarget: (eid: number) => void; onClickEdit: (relations: providers.EntityRelationSchema[]) => void; getTargetLink: (eid: number) => string; renderDisplayValue: (entity: providers.Entity, schema: providers.EntitySchema) => JSX.Element; renderRelation: (component: EntityRelationsGroup, relation: providers.EntityRelationSchema) => JSX.Element; render: (component: EntityRelationsGroup) => JSX.Element; };