1 | import { NgModule } from '@angular/core';
|
2 | import { WidgetDemo } from './demo-widget.component';
|
3 | import { WidgetConfigDemo } from './demo-widget-config.component';
|
4 | import { FormsModule, CommonModule as C8yCommonModule, hookComponent } from '@c8y/ngx-components';
|
5 | import { ContextWidgetConfig } from '@c8y/ngx-components/context-dashboard';
|
6 | import { AssetSelectorModule } from '@c8y/ngx-components/assets-navigator';
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | @NgModule({
|
16 | declarations: [WidgetDemo, WidgetConfigDemo],
|
17 | imports: [FormsModule, AssetSelectorModule, C8yCommonModule],
|
18 | exports: [],
|
19 | providers: [
|
20 | hookComponent({
|
21 | id: 'angular.widget.demo',
|
22 | label: 'My angular widget',
|
23 | description: 'This is a description from angular',
|
24 | component: WidgetDemo,
|
25 | configComponent: WidgetConfigDemo,
|
26 |
|
27 |
|
28 | data: {
|
29 |
|
30 | settings: {
|
31 | noNewWidgets: false,
|
32 | ng1: {
|
33 | options: {
|
34 | noDeviceTarget: false,
|
35 | groupsSelectable: false
|
36 | }
|
37 | }
|
38 | },
|
39 |
|
40 | displaySettings: {
|
41 | globalTimeContext: true
|
42 | }
|
43 | } as ContextWidgetConfig
|
44 | })
|
45 | ]
|
46 | })
|
47 | export class DashboardWidgetDemoModule {}
|