This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
app.module.ts
68 lines (65 loc) · 2.92 KB
/
app.module.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/** @format */
import { NgModule } from "@angular/core";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { RouterModule as NgRouterModule } from "@angular/router";
import { UpgradeModule as NgUpgradeModule } from "@angular/upgrade/static";
import { CoreModule, HOOK_COMPONENTS, RouterModule } from "@c8y/ngx-components";
import { DashboardUpgradeModule, UpgradeModule, HybridAppModule, UPGRADE_ROUTES } from "@c8y/ngx-components/upgrade";
import { AssetsNavigatorModule } from "@c8y/ngx-components/assets-navigator";
import { CockpitDashboardModule } from "@c8y/ngx-components/context-dashboard";
import { ReportsModule } from "@c8y/ngx-components/reports";
import { SensorPhoneModule } from "@c8y/ngx-components/sensor-phone";
import { CumulocityDatapointsChartingWidgetConfig } from "./src/cumulocity-datapoints-charting-widget/cumulocity-datapoints-charting-widget.config.component";
import { CumulocityDatapointsChartingWidget } from "./src/cumulocity-datapoints-charting-widget/cumulocity-datapoints-charting-widget.component";
import { NgSelectModule } from "@ng-select/ng-select";
import { ChartsModule } from "ng2-charts";
@NgModule({
imports: [
BrowserAnimationsModule,
RouterModule.forRoot(),
NgRouterModule.forRoot([...UPGRADE_ROUTES], { enableTracing: false, useHash: true }),
CoreModule.forRoot(),
AssetsNavigatorModule,
ReportsModule,
NgUpgradeModule,
DashboardUpgradeModule,
CockpitDashboardModule,
SensorPhoneModule,
UpgradeModule,
NgSelectModule,
ChartsModule
],
declarations: [CumulocityDatapointsChartingWidget, CumulocityDatapointsChartingWidgetConfig],
entryComponents: [CumulocityDatapointsChartingWidget, CumulocityDatapointsChartingWidgetConfig],
providers: [
{
provide: HOOK_COMPONENTS,
multi: true,
useValue: [
{
id: "global.presales.CumulocityDataPointsCharting.widget",
label: "Data Points Charting",
description: "Graph measurements and statistics about measurements",
component: CumulocityDatapointsChartingWidget,
configComponent: CumulocityDatapointsChartingWidgetConfig,
previewImage: require("@widget-assets/img-preview.png"),
data: {
ng1: {
options: {
noDeviceTarget: true,
noNewWidgets: false,
deviceTargetNotRequired: true,
groupsSelectable: true
},
}
}
},
],
},
],
})
export class AppModule extends HybridAppModule {
constructor(protected upgrade: NgUpgradeModule) {
super();
}
}