@reactodia/workspace
Version:
Reactodia Workspace -- library for visual interaction with graphs in a form of a diagram.
31 lines • 1.54 kB
TypeScript
import type { Translation } from '../coreUtils/i18n';
import { ElementModel, PropertyTypeIri } from '../data/model';
import * as Rdf from '../data/rdf/rdfModel';
import type { DataDiagramModel } from './dataDiagramModel';
export interface DataLocaleProvider {
selectEntityLabel(entity: ElementModel): readonly Rdf.Literal[];
selectEntityImageUrl(entity: ElementModel): string | undefined;
formatIri(iri: string): string;
formatEntityLabel(entity: ElementModel, language: string): string;
formatEntityTypeList(entity: ElementModel, language: string): string;
}
export interface DefaultDataLocaleProviderOptions {
readonly model: DataDiagramModel;
readonly translation: Translation;
readonly labelProperties?: readonly PropertyTypeIri[];
readonly imageProperties?: readonly PropertyTypeIri[];
}
export declare class DefaultDataLocaleProvider implements DataLocaleProvider {
protected readonly model: DataDiagramModel;
protected readonly translation: Translation;
private readonly labelProperties;
private readonly imageProperties;
private readonly EMPTY_LABELS;
constructor(options: DefaultDataLocaleProviderOptions);
selectEntityLabel(entity: ElementModel): readonly Rdf.Literal[];
selectEntityImageUrl(entity: ElementModel): string | undefined;
formatIri(iri: string): string;
formatEntityLabel(entity: ElementModel, language: string): string;
formatEntityTypeList(entity: ElementModel, language: string): string;
}
//# sourceMappingURL=dataLocaleProvider.d.ts.map