catreact
Version:
Catavolt Core React Components
37 lines (36 loc) • 1.25 kB
TypeScript
/**
* Created by rburson on 12/23/15.
*/
import * as React from 'react';
import { CvState, CvProps, CvEvent, CvLoginResult, CvLogoutResult, CvContext } from './catreact-core';
import { AppContext, AppWinDef } from 'catavolt-sdk';
export interface CvAppWindowState extends CvState {
appWinDef: AppWinDef;
}
export interface CvAppWindowProps extends CvProps {
/**
* {@link CvLoginResult} containing the sdk {AppWinDef}.
* Should not be used with windowId
*/
loginResult?: CvLoginResult;
/**
* A resource to allow for the retrieval of the {@link CvLoginResult} from the cache.
* Should not be used with loginResult
*/
windowId?: string;
/**
* A listener that will notified of an invalid session
*/
logoutListeners?: Array<(event: CvEvent<CvLogoutResult>) => void>;
/**
Custom renderer for CvAppWindow. Exposes the AppWinDef as the scopObj and the relevant callback object.
*/
renderer?: (cvContext: CvContext, callback?: CvAppWindowCallback) => {};
}
export interface CvAppWindowCallback {
getAppContext(): AppContext;
}
/**
* A component analogous to Catavolt AppWinDef
*/
export declare var CvAppWindow: React.ClassicComponentClass<CvAppWindowProps>;