UNPKG

@nakedobjects/gemini

Version:

Single Page Application client for a Naked Objects application.

26 lines (25 loc) 1.49 kB
import { Type } from '@angular/core'; import { ContextService, ViewType, ClientErrorCode, ErrorCategory, HttpStatusCode } from '@nakedobjects/services'; import { CustomComponentConfigService } from './custom-component-config.service'; import * as i0 from "@angular/core"; export interface ICustomComponentConfigurator { addType: (type: string, result: Type<unknown>) => void; addMatch: (matcher: RegExp, result: Type<unknown>) => void; addSubtype: (type: string, result: Type<unknown>) => void; setDefault: (def: Type<unknown>) => void; } export interface ICustomErrorComponentConfigurator { addError(rc: ErrorCategory, code: HttpStatusCode | ClientErrorCode, result: Type<unknown>): void; } export declare class CustomComponentService implements ICustomErrorComponentConfigurator { private readonly context; private readonly config; constructor(context: ContextService, config: CustomComponentConfigService); private readonly customComponentCaches; private getErrorKey; getCustomComponent(domainType: string, viewType: ViewType.Object | ViewType.List | ViewType.Error): Promise<unknown>; getCustomErrorComponent(rc: ErrorCategory, code: HttpStatusCode | ClientErrorCode): Promise<unknown>; addError(rc: ErrorCategory, code: HttpStatusCode | ClientErrorCode, result: Type<unknown>): void; static ɵfac: i0.ɵɵFactoryDeclaration<CustomComponentService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<CustomComponentService>; }