summaryrefslogtreecommitdiffstats
path: root/public/src/app/app.module.ts
blob: 8ed8c87fa57a382b1e1781460f3aa09d229a2fde (plain)
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import { BrowserModule } from '@angular/platform-browser';
import { NgModule, APP_INITIALIZER } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { HttpClientModule } from '@angular/common/http';

import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { MobxAngularModule } from 'mobx-angular';

import { TabViewModule, DialogModule, TooltipModule } from 'primeng/primeng';
import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
import { MatDialogModule } from '@angular/material/dialog';
import { ToastrModule } from 'ngx-toastr';
import { NgSelectModule } from '@ng-select/ng-select';

// import { SdcUiComponentsModule } from 'sdc-ui/lib/angular';

import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { HomeComponent } from './home/home.component';
import { GeneralComponent } from './general/general.component';
import { MainComponent } from './main/main.component';
import { RuleFrameComponent } from './rule-frame/rule-frame.component';

import { HostService } from './host/host.service';
import { RestApiService } from './api/rest-api.service';
import { FeatherIconsPipe } from './api/feather-pipe';
import { Store } from './store/store';
import { LoaderComponent } from './loader/loader.component';
import { ErrorDialogComponent } from './error-dialog/error-dialog.component';

// rule engine
import { TreeModule } from 'angular-tree-component';
import { TargetComponent } from './rule-engine/target/target.component';
import { VersionTypeSelectComponent } from './rule-engine/version-type-select/version-type-select.component';
import { FromComponent } from './rule-engine/from/from.component';
import { ActionComponent } from './rule-engine/action/action.component';
import { ActionListComponent } from './rule-engine/action-list/action-list.component';
import { ConditionComponent } from './rule-engine/condition/condition.component';
import { RuleEngineApiService } from './rule-engine/api/rule-engine-api.service';
import { ConfirmPopupComponent } from './rule-engine/confirm-popup/confirm-popup.component';
import { SlidePanelComponent } from './rule-engine/slide-panel/slide-panel.component';
import { RuleListComponent } from './rule-engine/rule-list/rule-list.component';
import { BarIconsComponent } from './bar-icons/bar-icons.component';
import { DiagramComponent } from './diagram/diagram.component';

const appInitializerFn = () => {
  return () => {
    console.log('app initializing');
  };
};

@NgModule({
  declarations: [
    AppComponent,
    HomeComponent,
    GeneralComponent,
    MainComponent,
    RuleFrameComponent,
    LoaderComponent,
    FeatherIconsPipe,
    ErrorDialogComponent,
    TargetComponent,
    VersionTypeSelectComponent,
    FromComponent,
    ActionComponent,
    ActionListComponent,
    ConditionComponent,
    ConfirmPopupComponent,
    SlidePanelComponent,
    RuleListComponent,
    BarIconsComponent,
    DiagramComponent
  ],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    FormsModule,
    HttpModule,
    HttpClientModule,
    AppRoutingModule,
    MobxAngularModule,
    TabViewModule,
    DialogModule,
    MatButtonModule,
    MatIconModule,
    MatDialogModule,
    TreeModule,
    NgSelectModule,
    TooltipModule,
    ToastrModule.forRoot({ enableHtml: true })
  ],
  entryComponents: [ConfirmPopupComponent],
  providers: [
    HostService,
    RestApiService,
    RuleEngineApiService,
    Store,
    {
      provide: APP_INITIALIZER,
      useFactory: appInitializerFn,
      multi: true,
      deps: []
    }
  ],
  bootstrap: [AppComponent]
})
export class AppModule {}