Sonsino, Ofir (os0695) | ff76b5e | 2018-07-10 15:57:37 +0300 | [diff] [blame] | 1 | import {NgModule, ModuleWithProviders} from '@angular/core'; |
| 2 | import {CommonModule} from '@angular/common'; |
| 3 | import {RouterModule} from '@angular/router'; |
| 4 | import { BrowserModule } from '@angular/platform-browser'; |
| 5 | import { HttpClientModule } from '@angular/common/http'; |
| 6 | import { ServiceInfoService } from './server/serviceInfo/serviceInfo.service'; |
| 7 | import { PopoverModule } from 'ngx-bootstrap'; |
| 8 | import { AngularSvgIconModule } from 'angular-svg-icon'; |
| 9 | import { SvgDirective } from './directives/svg/svg.directive'; |
| 10 | import { PopoverComponent } from './components/popover/popover.component'; |
| 11 | import { EllipsisComponent } from './components/ellipsis/ellipsis.component'; |
| 12 | import { MessageBoxComponent } from './components/messageBox/messageBox.component'; |
| 13 | import { MessageBoxService } from './components/messageBox/messageBox.service'; |
| 14 | import { SdcUiComponentsModule , SdcUiComponents} from 'sdc-ui/lib/angular'; |
| 15 | import { HttpInterceptorService } from './utils/httpInterceptor/httpInterceptor.service'; |
| 16 | import { FormControlErrorComponent } from './components/formControlError/formControlError.component'; |
| 17 | import { InputPreventionPatternDirective } from './directives/inputPrevention/inputPreventionPattern.directive'; |
| 18 | import { FormGeneralErrorsComponent } from './components/formGeneralErrors/formGeneralErrors.component'; |
| 19 | import { NumbersLettersUnderscoreValidator } from './components/validators/numbersLettersUnderscore/numbersLettersUnderscore.validator'; |
| 20 | import { SpinnerComponent } from './components/spinner/spinner.component'; |
| 21 | import { NoContentMessageAndIconComponent } from './components/no-content-message-and-icon/no-content-message-and-icon.component'; |
| 22 | import { ModelInformationComponent } from './components/model-information/model-information.component'; |
| 23 | import { TooltipModule } from 'ngx-tooltip'; |
| 24 | import {IframeService} from "./utils/iframe.service"; |
| 25 | import {CapitalizeAndFormatPipe} from "./pipes/capitalize/capitalize-and-format.pipe"; |
| 26 | import { DefaultDataGeneratorService } from './services/defaultDataServiceGenerator/default.data.generator.service'; |
| 27 | import {ServiceInfoPipe} from "./pipes/serviceInfo/serviceInfo.pipe"; |
| 28 | import {HealthStatusService} from "./server/healthStatusService/health-status.service"; |
| 29 | import {ConfigurationService} from "../services/configuration.service"; |
| 30 | import {FlagsResolve} from "../services/flags.resolve"; |
| 31 | |
| 32 | |
| 33 | @NgModule({ |
| 34 | imports: [ |
| 35 | BrowserModule, |
| 36 | HttpClientModule, |
| 37 | CommonModule, |
| 38 | RouterModule, |
| 39 | PopoverModule.forRoot(), |
| 40 | AngularSvgIconModule, |
| 41 | TooltipModule, |
| 42 | SdcUiComponentsModule, |
| 43 | ], |
| 44 | declarations: [ |
| 45 | PopoverComponent, |
| 46 | SvgDirective, |
| 47 | EllipsisComponent, |
| 48 | MessageBoxComponent, |
| 49 | FormControlErrorComponent, |
| 50 | InputPreventionPatternDirective, |
| 51 | FormGeneralErrorsComponent, |
| 52 | SpinnerComponent, |
| 53 | NoContentMessageAndIconComponent, |
| 54 | ModelInformationComponent, |
| 55 | CapitalizeAndFormatPipe, |
| 56 | ServiceInfoPipe, |
| 57 | ], |
| 58 | exports: [ |
| 59 | PopoverComponent, |
| 60 | SvgDirective, |
| 61 | EllipsisComponent, |
| 62 | MessageBoxComponent, |
| 63 | FormControlErrorComponent, |
| 64 | InputPreventionPatternDirective, |
| 65 | FormGeneralErrorsComponent, |
| 66 | SpinnerComponent, |
| 67 | NoContentMessageAndIconComponent, |
| 68 | ModelInformationComponent, |
| 69 | CapitalizeAndFormatPipe, |
| 70 | ServiceInfoPipe, |
| 71 | ], |
| 72 | providers: [ |
| 73 | ServiceInfoService, |
| 74 | MessageBoxService, |
| 75 | SdcUiComponents.ModalService, |
| 76 | HttpInterceptorService, |
| 77 | IframeService, |
| 78 | NumbersLettersUnderscoreValidator, |
| 79 | DefaultDataGeneratorService, |
| 80 | HealthStatusService, |
| 81 | ConfigurationService, |
| 82 | FlagsResolve |
| 83 | ] |
| 84 | }) |
| 85 | export class SharedModule { |
| 86 | static forRoot(): ModuleWithProviders { |
| 87 | return { |
| 88 | ngModule: SharedModule, |
| 89 | providers: [MessageBoxService] |
| 90 | }; |
| 91 | } |
| 92 | } |