UNPKG

nakedobjects.spa

Version:

Single Page Application client for a Naked Objects application.

25 lines (24 loc) 1.39 kB
import { CustomComponentConfigService } from './custom-component-config.service'; import * as Models from './models'; import { ViewType } from './route-data'; import { Type } from '@angular/core/src/type'; import { ContextService } from './context.service'; export interface ICustomComponentConfigurator { addType: (type: string, result: Type<any>) => void; addMatch: (matcher: RegExp, result: Type<any>) => void; addSubtype: (type: string, result: Type<any>) => void; setDefault: (def: Type<any>) => void; } export interface ICustomErrorComponentConfigurator { addError(rc: Models.ErrorCategory, code: Models.HttpStatusCode | Models.ClientErrorCode, result: Type<any>): void; } export declare class CustomComponentService implements ICustomErrorComponentConfigurator { private readonly context; private readonly config; constructor(context: ContextService, config: CustomComponentConfigService); private readonly customComponentCaches; private getErrorKey(rc, code); getCustomComponent(domainType: string, viewType: ViewType.Object | ViewType.List | ViewType.Error): Promise<any>; getCustomErrorComponent(rc: Models.ErrorCategory, code: Models.HttpStatusCode | Models.ClientErrorCode): Promise<any>; addError(rc: Models.ErrorCategory, code: Models.HttpStatusCode | Models.ClientErrorCode, result: Type<any>): void; }