1a1173ca53893867bbbad717e407f6994ed3af8f
[ccsdk/features.git] / sdnr / wt / odlux / framework / src / models / applicationInfo.ts
1 import { ComponentType } from 'react';
2 import { IconType } from './iconDefinition';
3
4 import { IActionHandler } from '../flux/action';
5 import { Middleware } from '../flux/middleware';
6
7 /** Represents the information needed about an application to integrate. */
8 export class ApplicationInfo {
9   /** The name of the application. */
10   name: string;
11   /** Optional: The title of the application, if null ot undefined the name will be used. */
12   title?: string;
13   /** Optional: The icon of the application for the navigation and title bar. */
14   icon?: IconType;
15   /** Optional: The description of the application. */
16   description?: string;
17   /** The root component of the application. */
18   rootComponent: ComponentType;
19   /** Optional: The root action handler of the application. */
20   rootActionHandler?: IActionHandler<{ [key: string]: any }>;
21   /** Optional: Application speciffic middlewares. */
22   middlewares?: Middleware<{ [key: string]: any }>[];
23   /** Optional: A mapping object with the exported components. */
24   exportedComponents?: { [key: string]: ComponentType }
25   /** Optional: The entry to be shown in the menu. If undefiened the name will be used. */
26   menuEntry?: string | React.ComponentType;
27   /** Optional: A component to be shown in the menu when this app is active below the main entry. If undefiened the name will be used. */
28   subMenuEntry?: React.ComponentType;
29   /** Optional: A component to be shown in the applications status bar. If undefiened the name will be used. */
30   statusBarElement?: React.ComponentType;
31   /** Optional: A component to be shown in the dashboardview. If undefiened the name will be used. */
32   dashbaordElement?: React.ComponentType;
33   /** Optional: The pasth for this application. If undefined the name will be use as path. */
34   path?: string;
35 }