|
|
|
@ -1,5 +1,6 @@ |
|
|
|
import { Type } from '@angular/core'; |
|
|
|
import { Type, EventEmitter } from '@angular/core'; |
|
|
|
import { ABP } from './common'; |
|
|
|
import { Subject, BehaviorSubject } from 'rxjs'; |
|
|
|
|
|
|
|
export namespace ReplaceableComponents { |
|
|
|
export interface State { |
|
|
|
@ -11,7 +12,10 @@ export namespace ReplaceableComponents { |
|
|
|
key: string; |
|
|
|
} |
|
|
|
|
|
|
|
export interface ReplaceableTemplateData<I, O> { |
|
|
|
export interface ReplaceableTemplateData< |
|
|
|
I, |
|
|
|
O extends { [K in keyof O]: EventEmitter<any> | Subject<any> } |
|
|
|
> { |
|
|
|
inputs: ReplaceableTemplateInputs<I>; |
|
|
|
outputs: ReplaceableTemplateOutputs<O>; |
|
|
|
componentKey: string; |
|
|
|
@ -21,8 +25,10 @@ export namespace ReplaceableComponents { |
|
|
|
[K in keyof T]: T[K]; |
|
|
|
}; |
|
|
|
|
|
|
|
export type ReplaceableTemplateOutputs<T> = { |
|
|
|
[K in keyof T]: (value: ABP.ExtractFromGeneric<T[K]>) => void; |
|
|
|
export type ReplaceableTemplateOutputs< |
|
|
|
T extends { [K in keyof T]: EventEmitter<any> | Subject<any> } |
|
|
|
> = { |
|
|
|
[K in keyof T]: (value: ABP.ExtractFromOutput<T[K]>) => void; |
|
|
|
}; |
|
|
|
|
|
|
|
export interface RouteData<T = any> { |
|
|
|
|