Create wt-odlux directory
[ccsdk/features.git] / sdnr / wt-odlux / odlux / framework / src / models / applicationInfo.ts
1 /**
2  * ============LICENSE_START========================================================================
3  * ONAP : ccsdk feature sdnr wt odlux
4  * =================================================================================================
5  * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
6  * =================================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
8  * in compliance with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software distributed under the License
13  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
14  * or implied. See the License for the specific language governing permissions and limitations under
15  * the License.
16  * ============LICENSE_END==========================================================================
17  */
18 import { ComponentType } from 'react';
19 import { IconType } from './iconDefinition';
20
21 import { IActionHandler } from '../flux/action';
22 import { Middleware } from '../flux/middleware';
23 import { SettingsComponentProps } from './settings';
24
25 /** Represents the information needed about an application to integrate. */
26 export class ApplicationInfo {
27   /** The name of the application. */
28   name: string;
29   /** Optional: The title of the application, if null ot undefined the name will be used. */
30   title?: string;
31   /** Optional: The icon of the application for the navigation and title bar. */
32   icon?: IconType;
33   /** Optional: The description of the application. */
34   description?: string;
35   /** The root component of the application. */
36   rootComponent: ComponentType;
37   /** Optional: The root action handler of the application. */
38   rootActionHandler?: IActionHandler<{ [key: string]: any }>;
39   /** Optional: Application speciffic middlewares. */
40   middlewares?: Middleware<{ [key: string]: any }>[];
41   /** Optional: A mapping object with the exported components. */
42   exportedComponents?: { [key: string]: ComponentType }
43   /** Optional: The entry to be shown in the menu. If undefiened the name will be used. */
44   menuEntry?: string | React.ComponentType;
45   /** 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. */
46   subMenuEntry?: React.ComponentType;
47   /** Optional: A component to be shown in the applications status bar. If undefiened the name will be used. */
48   statusBarElement?: React.ComponentType;
49   /** Optional: A component to be shown in the dashboardview. If undefiened the name will be used. */
50   dashbaordElement?: React.ComponentType;
51   /** Optional: A component shown in the settings view */
52   settingsElement?: React.ComponentType<SettingsComponentProps>;
53   /** Optional: The pasth for this application. If undefined the name will be use as path. */
54   path?: string;
55 }