62ce97102746d98b84ecb9b2b9e963cdadd77e68
[oweals/peertube.git] / client / src / app / shared / shared.module.ts
1 import { CommonModule } from '@angular/common'
2 import { HttpClientModule } from '@angular/common/http'
3 import { NgModule } from '@angular/core'
4 import { FormsModule, ReactiveFormsModule } from '@angular/forms'
5 import { RouterModule } from '@angular/router'
6 import { MarkdownTextareaComponent } from '@app/shared/forms/markdown-textarea.component'
7 import { HelpComponent } from '@app/shared/misc/help.component'
8 import { InfiniteScrollerDirective } from '@app/shared/video/infinite-scroller.directive'
9 import { MarkdownService } from '@app/videos/shared'
10
11 import { BsDropdownModule } from 'ngx-bootstrap/dropdown'
12 import { ModalModule } from 'ngx-bootstrap/modal'
13 import { PopoverModule } from 'ngx-bootstrap/popover'
14 import { TabsModule } from 'ngx-bootstrap/tabs'
15 import { TooltipModule } from 'ngx-bootstrap/tooltip'
16 import { BytesPipe, KeysPipe, NgPipesModule } from 'ngx-pipes'
17 import { SharedModule as PrimeSharedModule } from 'primeng/components/common/shared'
18
19 import { AUTH_INTERCEPTOR_PROVIDER } from './auth'
20 import { DeleteButtonComponent } from './misc/delete-button.component'
21 import { EditButtonComponent } from './misc/edit-button.component'
22 import { FromNowPipe } from './misc/from-now.pipe'
23 import { LoaderComponent } from './misc/loader.component'
24 import { NumberFormatterPipe } from './misc/number-formatter.pipe'
25 import { ObjectLengthPipe } from './misc/object-length.pipe'
26 import { RestExtractor, RestService } from './rest'
27 import { UserService } from './users'
28 import { VideoAbuseService } from './video-abuse'
29 import { VideoBlacklistService } from './video-blacklist'
30 import { VideoMiniatureComponent } from './video/video-miniature.component'
31 import { VideoFeedComponent } from './video/video-feed.component'
32 import { VideoThumbnailComponent } from './video/video-thumbnail.component'
33 import { VideoService } from './video/video.service'
34 import { AccountService } from '@app/shared/account/account.service'
35 import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
36 import { I18n } from '@ngx-translate/i18n-polyfill'
37 import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
38 import {
39   CustomConfigValidatorsService,
40   LoginValidatorsService,
41   ReactiveFileComponent,
42   ResetPasswordValidatorsService,
43   UserValidatorsService,
44   VideoAbuseValidatorsService,
45   VideoChannelValidatorsService,
46   VideoCommentValidatorsService,
47   VideoValidatorsService
48 } from '@app/shared/forms'
49 import { I18nPrimengCalendarService } from '@app/shared/i18n/i18n-primeng-calendar'
50 import { ScreenService } from '@app/shared/misc/screen.service'
51 import { VideoCaptionsValidatorsService } from '@app/shared/forms/form-validators/video-captions-validators.service'
52 import { VideoCaptionService } from '@app/shared/video-caption'
53 import { PeertubeCheckboxComponent } from '@app/shared/forms/peertube-checkbox.component'
54 import { VideoImportService } from '@app/shared/video-import/video-import.service'
55
56 @NgModule({
57   imports: [
58     CommonModule,
59     FormsModule,
60     ReactiveFormsModule,
61     RouterModule,
62     HttpClientModule,
63
64     BsDropdownModule.forRoot(),
65     ModalModule.forRoot(),
66     PopoverModule.forRoot(),
67     TabsModule.forRoot(),
68     TooltipModule.forRoot(),
69
70     PrimeSharedModule,
71     NgPipesModule
72   ],
73
74   declarations: [
75     LoaderComponent,
76     VideoThumbnailComponent,
77     VideoMiniatureComponent,
78     VideoFeedComponent,
79     DeleteButtonComponent,
80     EditButtonComponent,
81     NumberFormatterPipe,
82     ObjectLengthPipe,
83     FromNowPipe,
84     MarkdownTextareaComponent,
85     InfiniteScrollerDirective,
86     HelpComponent,
87     ReactiveFileComponent,
88     PeertubeCheckboxComponent
89   ],
90
91   exports: [
92     CommonModule,
93     FormsModule,
94     ReactiveFormsModule,
95     RouterModule,
96     HttpClientModule,
97
98     BsDropdownModule,
99     ModalModule,
100     PopoverModule,
101     TabsModule,
102     TooltipModule,
103     PrimeSharedModule,
104     BytesPipe,
105     KeysPipe,
106
107     LoaderComponent,
108     VideoThumbnailComponent,
109     VideoMiniatureComponent,
110     VideoFeedComponent,
111     DeleteButtonComponent,
112     EditButtonComponent,
113     MarkdownTextareaComponent,
114     InfiniteScrollerDirective,
115     HelpComponent,
116     ReactiveFileComponent,
117     PeertubeCheckboxComponent,
118
119     NumberFormatterPipe,
120     ObjectLengthPipe,
121     FromNowPipe
122   ],
123
124   providers: [
125     AUTH_INTERCEPTOR_PROVIDER,
126     RestExtractor,
127     RestService,
128     VideoAbuseService,
129     VideoBlacklistService,
130     UserService,
131     VideoService,
132     AccountService,
133     MarkdownService,
134     VideoChannelService,
135     VideoCaptionService,
136
137     FormValidatorService,
138     CustomConfigValidatorsService,
139     LoginValidatorsService,
140     ResetPasswordValidatorsService,
141     UserValidatorsService,
142     VideoAbuseValidatorsService,
143     VideoChannelValidatorsService,
144     VideoCommentValidatorsService,
145     VideoValidatorsService,
146     VideoCaptionsValidatorsService,
147     VideoImportService,
148
149     I18nPrimengCalendarService,
150     ScreenService,
151
152     I18n
153   ]
154 })
155 export class SharedModule { }