import { NavButton } from './nav_button'; import { Observable, Subscription } from 'rxjs'; import { ActiveState } from './active-state'; import { ServerCall } from './server-call'; import { CoreServices } from '../services'; // import { SubFlow_0_0_1 } from './sub_flow_0_0_1'; export interface ActiveNode { name?: string; controls?: (p) => any; activateNodeGuard?: (svc: CoreServices) => Observable; deactivateNodeGuard?: (svc: CoreServices) => Observable; layout?: { showFooter: boolean; showHeader: boolean; showToolbar: boolean; showCommandBar: boolean; }, inputs?: { [id: string]: any }; outputs?: {[id: string]: any } showTabs?: boolean; hideTabItem?: boolean; // TODO hide the current node from the tab list errorHandler?: { displayFormat: 'inline' | 'toast' | 'dialog' | 'none'; retryPolicy?: 'none' | 'manual' | 'auto' | { retryInterval: number; retryCount: number }; onRetryComplete?: (svc: CoreServices) => Observable; }; // errorDisplayFormat?: 'inline' | 'toast' | 'dialog'; initFormFields?: ( svc: CoreServices ) => void | Subscription; checkValidityForFields?: string[]; nodeType?: 'singleView' | 'decision' | 'subflow'; mockContextData?: { [id: string]: any; }; serverCalls?: { [id: string]: ServerCall; }; subFlow?: ActiveState; decision?: (p) => Observable; intersectData?: (svc: CoreServices) => void; component?: string | TemplateDefinition | any; hasLoader?: boolean; navs?: NavButton[]; } export interface TemplateDefinition { children: OrganismDefinition[]; layout?: string; } export interface OrganismDefinition { component: string; inputs?: { [key: string]: any }; outputs?: { [key: string]: any }; }