blob: ba5d0352265a981053e1c928652494013f80190c [file] [log] [blame]
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +03001import { BrowserModule } from '@angular/platform-browser';
2import { NgModule, APP_INITIALIZER } from '@angular/core';
3import { FormsModule, ReactiveFormsModule } from '@angular/forms';
4import { HttpModule } from '@angular/http';
5import { HttpClientModule } from '@angular/common/http';
6
7import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
8import { MobxAngularModule } from 'mobx-angular';
9
10import { TabViewModule, DialogModule, TooltipModule } from 'primeng/primeng';
11import { MatButtonModule } from '@angular/material/button';
12import { MatIconModule } from '@angular/material/icon';
13import { MatDialogModule } from '@angular/material/dialog';
14import { ToastrModule } from 'ngx-toastr';
15import { NgSelectModule } from '@ng-select/ng-select';
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030016import { NgxDatatableModule } from '@swimlane/ngx-datatable';
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +030017
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030018// import {SdcUiComponentsModule} from 'sdc-ui/lib/angular';
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +030019
20import { AppComponent } from './app.component';
21import { AppRoutingModule } from './app-routing.module';
22import { HomeComponent } from './home/home.component';
23import { GeneralComponent } from './general/general.component';
24import { MainComponent } from './main/main.component';
25import { RuleFrameComponent } from './rule-frame/rule-frame.component';
26
27import { HostService } from './host/host.service';
28import { RestApiService } from './api/rest-api.service';
29import { FeatherIconsPipe } from './api/feather-pipe';
30import { Store } from './store/store';
31import { LoaderComponent } from './loader/loader.component';
32import { ErrorDialogComponent } from './error-dialog/error-dialog.component';
33
34// rule engine
35import { TreeModule } from 'angular-tree-component';
36import { TargetComponent } from './rule-engine/target/target.component';
37import { VersionTypeSelectComponent } from './rule-engine/version-type-select/version-type-select.component';
38import { FromComponent } from './rule-engine/from/from.component';
39import { ActionComponent } from './rule-engine/action/action.component';
40import { ActionListComponent } from './rule-engine/action-list/action-list.component';
41import { ConditionComponent } from './rule-engine/condition/condition.component';
42import { RuleEngineApiService } from './rule-engine/api/rule-engine-api.service';
43import { ConfirmPopupComponent } from './rule-engine/confirm-popup/confirm-popup.component';
44import { SlidePanelComponent } from './rule-engine/slide-panel/slide-panel.component';
45import { RuleListComponent } from './rule-engine/rule-list/rule-list.component';
46import { BarIconsComponent } from './bar-icons/bar-icons.component';
47import { DiagramComponent } from './diagram/diagram.component';
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030048import { SdcNotifyDialogComponent } from './sdc-notify-dialog/sdc-notify-dialog.component';
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +030049
50const appInitializerFn = () => {
51 return () => {
52 console.log('app initializing');
53 };
54};
55
56@NgModule({
57 declarations: [
58 AppComponent,
59 HomeComponent,
60 GeneralComponent,
61 MainComponent,
62 RuleFrameComponent,
63 LoaderComponent,
64 FeatherIconsPipe,
65 ErrorDialogComponent,
66 TargetComponent,
67 VersionTypeSelectComponent,
68 FromComponent,
69 ActionComponent,
70 ActionListComponent,
71 ConditionComponent,
72 ConfirmPopupComponent,
73 SlidePanelComponent,
74 RuleListComponent,
75 BarIconsComponent,
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030076 DiagramComponent,
77 SdcNotifyDialogComponent
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +030078 ],
79 imports: [
80 BrowserModule,
81 BrowserAnimationsModule,
82 FormsModule,
83 HttpModule,
84 HttpClientModule,
85 AppRoutingModule,
86 MobxAngularModule,
87 TabViewModule,
88 DialogModule,
89 MatButtonModule,
90 MatIconModule,
91 MatDialogModule,
92 TreeModule,
93 NgSelectModule,
94 TooltipModule,
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030095 ToastrModule.forRoot({ enableHtml: true }),
96 NgxDatatableModule
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +030097 ],
98 entryComponents: [ConfirmPopupComponent],
99 providers: [
100 HostService,
101 RestApiService,
102 RuleEngineApiService,
103 Store,
104 {
105 provide: APP_INITIALIZER,
106 useFactory: appInitializerFn,
107 multi: true,
108 deps: []
109 }
110 ],
111 bootstrap: [AppComponent]
112})
113export class AppModule {}