blob: b90cf11f7337e705d54ccc42a32f15ffded7125e [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
Manor, Yanir (ym903w)22eda032018-09-20 14:18:38 +030010import {
11 TabViewModule,
12 DialogModule,
13 TooltipModule,
14 RadioButtonModule
15} from 'primeng/primeng';
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +030016import { MatButtonModule } from '@angular/material/button';
17import { MatIconModule } from '@angular/material/icon';
18import { MatDialogModule } from '@angular/material/dialog';
19import { ToastrModule } from 'ngx-toastr';
20import { NgSelectModule } from '@ng-select/ng-select';
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030021import { NgxDatatableModule } from '@swimlane/ngx-datatable';
Manor, Yanir (ym903w)22eda032018-09-20 14:18:38 +030022import { PapaParseModule } from 'ngx-papaparse';
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030023// import {SdcUiComponentsModule} from 'sdc-ui/lib/angular';
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +030024
25import { AppComponent } from './app.component';
26import { AppRoutingModule } from './app-routing.module';
27import { HomeComponent } from './home/home.component';
28import { GeneralComponent } from './general/general.component';
29import { MainComponent } from './main/main.component';
30import { RuleFrameComponent } from './rule-frame/rule-frame.component';
31
32import { HostService } from './host/host.service';
33import { RestApiService } from './api/rest-api.service';
34import { FeatherIconsPipe } from './api/feather-pipe';
35import { Store } from './store/store';
36import { LoaderComponent } from './loader/loader.component';
37import { ErrorDialogComponent } from './error-dialog/error-dialog.component';
38
39// rule engine
40import { TreeModule } from 'angular-tree-component';
41import { TargetComponent } from './rule-engine/target/target.component';
42import { VersionTypeSelectComponent } from './rule-engine/version-type-select/version-type-select.component';
43import { FromComponent } from './rule-engine/from/from.component';
44import { ActionComponent } from './rule-engine/action/action.component';
45import { ActionListComponent } from './rule-engine/action-list/action-list.component';
46import { ConditionComponent } from './rule-engine/condition/condition.component';
47import { RuleEngineApiService } from './rule-engine/api/rule-engine-api.service';
48import { ConfirmPopupComponent } from './rule-engine/confirm-popup/confirm-popup.component';
49import { SlidePanelComponent } from './rule-engine/slide-panel/slide-panel.component';
50import { RuleListComponent } from './rule-engine/rule-list/rule-list.component';
51import { BarIconsComponent } from './bar-icons/bar-icons.component';
52import { DiagramComponent } from './diagram/diagram.component';
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030053import { SdcNotifyDialogComponent } from './sdc-notify-dialog/sdc-notify-dialog.component';
Manor, Yanir (ym903w)22eda032018-09-20 14:18:38 +030054import { ImportRulesComponent } from './import-rules/import-rules.component';
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +030055
56const appInitializerFn = () => {
57 return () => {
58 console.log('app initializing');
59 };
60};
61
62@NgModule({
63 declarations: [
64 AppComponent,
65 HomeComponent,
66 GeneralComponent,
67 MainComponent,
68 RuleFrameComponent,
69 LoaderComponent,
70 FeatherIconsPipe,
71 ErrorDialogComponent,
72 TargetComponent,
73 VersionTypeSelectComponent,
74 FromComponent,
75 ActionComponent,
76 ActionListComponent,
77 ConditionComponent,
78 ConfirmPopupComponent,
79 SlidePanelComponent,
80 RuleListComponent,
81 BarIconsComponent,
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030082 DiagramComponent,
Manor, Yanir (ym903w)22eda032018-09-20 14:18:38 +030083 SdcNotifyDialogComponent,
84 ImportRulesComponent
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +030085 ],
86 imports: [
87 BrowserModule,
88 BrowserAnimationsModule,
89 FormsModule,
90 HttpModule,
91 HttpClientModule,
92 AppRoutingModule,
93 MobxAngularModule,
94 TabViewModule,
95 DialogModule,
Manor, Yanir (ym903w)22eda032018-09-20 14:18:38 +030096 RadioButtonModule,
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +030097 MatButtonModule,
98 MatIconModule,
99 MatDialogModule,
100 TreeModule,
101 NgSelectModule,
102 TooltipModule,
Manor, Yanir (ym903w)22eda032018-09-20 14:18:38 +0300103 PapaParseModule,
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +0300104 ToastrModule.forRoot({ enableHtml: true }),
105 NgxDatatableModule
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +0300106 ],
107 entryComponents: [ConfirmPopupComponent],
108 providers: [
109 HostService,
110 RestApiService,
111 RuleEngineApiService,
112 Store,
113 {
114 provide: APP_INITIALIZER,
115 useFactory: appInitializerFn,
116 multi: true,
117 deps: []
118 }
119 ],
120 bootstrap: [AppComponent]
121})
122export class AppModule {}