interface TemplateOpts {
    apiErrorHandler?: ApiErrorHandler;
    appInitialization?: ((logger) => Promise<boolean>)[];
    appInitializationLoader?: ComponentClass<{
        appStatus: AppStatus;
    }, any> | FunctionComponent<{
        appStatus: AppStatus;
    }>;
    appName?: string;
    blockPages?: BlockPage[];
    error500Component?: ComponentClass<BlockComponentProps, any> | FunctionComponent<BlockComponentProps>;
    errorMessageI18nHandler?: ErrorMessageI18nHandler;
    i18nOptions?: InitOptions<object>;
    logger?: Logger;
    navigationComponent?: ComponentClass<NavigationComponentProps, any> | FunctionComponent<NavigationComponentProps>;
    notFound404Component?: ComponentClass<BlockComponentProps, any> | FunctionComponent<BlockComponentProps>;
    pageTitleConfiguration?: PageTitleConfiguration;
    theme?: Theme;
    toastConfiguration?: ToastConfiguration;
}

Properties

apiErrorHandler?: ApiErrorHandler

The onApiError callback to retry request or not

appInitialization?: ((logger) => Promise<boolean>)[]

An array of methods to run on app initialization (before the page renders). Use this to initialize user sessions, initial data setup and validation etc. If any of these methods return false, the app will stop and not initialize.

Type declaration

    • (logger): Promise<boolean>
    • Parameters

      • logger: Logger

      Returns Promise<boolean>

appInitializationLoader?: ComponentClass<{
    appStatus: AppStatus;
}, any> | FunctionComponent<{
    appStatus: AppStatus;
}>

Component to render while the app is initializing. If the app fails to initialize, this will be displayed forever. Use this to show your app logo or similar while the app is loading.

appName?: string

Name of the app (for use in logging and identification)

blockPages?: BlockPage[]

List of pages (as blocks) that make up this template

error500Component?: ComponentClass<BlockComponentProps, any> | FunctionComponent<BlockComponentProps>

Component to render when a 500 error occurs (crash)

errorMessageI18nHandler?: ErrorMessageI18nHandler

Translation method for handling error messages

i18nOptions?: InitOptions<object>

i18n options to use for this template. Can be a blank object if using the default i18n options

logger?: Logger

Logger to use in the application

navigationComponent?: ComponentClass<NavigationComponentProps, any> | FunctionComponent<NavigationComponentProps>

Component to use for rendering navigation bars and sidebars

notFound404Component?: ComponentClass<BlockComponentProps, any> | FunctionComponent<BlockComponentProps>

Component to render when 404

pageTitleConfiguration?: PageTitleConfiguration

Configuration for the page title

theme?: Theme

Theme to use for this template. Can be a blank object if using the default theme

toastConfiguration?: ToastConfiguration

Configuration for app toast messages

Generated using TypeDoc