65e0f21a4d9874e9a6de1b76baed229ab9aeaf57
[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 { BytesPipe, KeysPipe, NgPipesModule } from 'ngx-pipes'
10 import { SharedModule as PrimeSharedModule } from 'primeng/components/common/shared'
11 import { AUTH_INTERCEPTOR_PROVIDER } from './auth'
12 import { ButtonComponent } from './buttons/button.component'
13 import { DeleteButtonComponent } from './buttons/delete-button.component'
14 import { EditButtonComponent } from './buttons/edit-button.component'
15 import { LoaderComponent } from './misc/loader.component'
16 import { RestExtractor, RestService } from './rest'
17 import { UserService } from './users'
18 import { VideoAbuseService } from './video-abuse'
19 import { VideoBlacklistService } from './video-blacklist'
20 import { VideoOwnershipService } from './video-ownership'
21 import { VideoMiniatureComponent } from './video/video-miniature.component'
22 import { FeedComponent } from './video/feed.component'
23 import { VideoThumbnailComponent } from './video/video-thumbnail.component'
24 import { VideoService } from './video/video.service'
25 import { AccountService } from '@app/shared/account/account.service'
26 import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
27 import { I18n } from '@ngx-translate/i18n-polyfill'
28 import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
29 import {
30   CustomConfigValidatorsService,
31   InstanceValidatorsService,
32   LoginValidatorsService,
33   ReactiveFileComponent,
34   ResetPasswordValidatorsService,
35   TextareaAutoResizeDirective,
36   UserValidatorsService,
37   VideoAbuseValidatorsService,
38   VideoAcceptOwnershipValidatorsService,
39   VideoBlacklistValidatorsService,
40   VideoChangeOwnershipValidatorsService,
41   VideoChannelValidatorsService,
42   VideoCommentValidatorsService,
43   VideoPlaylistValidatorsService,
44   VideoValidatorsService
45 } from '@app/shared/forms'
46 import { I18nPrimengCalendarService } from '@app/shared/i18n/i18n-primeng-calendar'
47 import { InputMaskModule } from 'primeng/inputmask'
48 import { ScreenService } from '@app/shared/misc/screen.service'
49 import { VideoCaptionsValidatorsService } from '@app/shared/forms/form-validators/video-captions-validators.service'
50 import { VideoCaptionService } from '@app/shared/video-caption'
51 import { PeertubeCheckboxComponent } from '@app/shared/forms/peertube-checkbox.component'
52 import { VideoImportService } from '@app/shared/video-import/video-import.service'
53 import { ActionDropdownComponent } from '@app/shared/buttons/action-dropdown.component'
54 import {
55   NgbCollapseModule,
56   NgbDropdownModule,
57   NgbModalModule,
58   NgbPopoverModule,
59   NgbTabsetModule,
60   NgbTooltipModule
61 } from '@ng-bootstrap/ng-bootstrap'
62 import { RemoteSubscribeComponent, SubscribeButtonComponent, UserSubscriptionService } from '@app/shared/user-subscription'
63 import { InstanceFeaturesTableComponent } from '@app/shared/instance/instance-features-table.component'
64 import { OverviewService } from '@app/shared/overview'
65 import { UserBanModalComponent } from '@app/shared/moderation'
66 import { UserModerationDropdownComponent } from '@app/shared/moderation/user-moderation-dropdown.component'
67 import { BlocklistService } from '@app/shared/blocklist'
68 import { TopMenuDropdownComponent } from '@app/shared/menu/top-menu-dropdown.component'
69 import { UserHistoryService } from '@app/shared/users/user-history.service'
70 import { UserNotificationService } from '@app/shared/users/user-notification.service'
71 import { UserNotificationsComponent } from '@app/shared/users/user-notifications.component'
72 import { InstanceService } from '@app/shared/instance/instance.service'
73 import { HtmlRendererService, LinkifierService, MarkdownService } from '@app/shared/renderer'
74 import { ConfirmComponent } from '@app/shared/confirm/confirm.component'
75 import { SmallLoaderComponent } from '@app/shared/misc/small-loader.component'
76 import { VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.service'
77 import { PreviewUploadComponent } from '@app/shared/images/preview-upload.component'
78 import { GlobalIconComponent } from '@app/shared/images/global-icon.component'
79 import { VideoPlaylistMiniatureComponent } from '@app/shared/video-playlist/video-playlist-miniature.component'
80 import { VideoAddToPlaylistComponent } from '@app/shared/video-playlist/video-add-to-playlist.component'
81 import { TimestampInputComponent } from '@app/shared/forms/timestamp-input.component'
82 import { VideoPlaylistElementMiniatureComponent } from '@app/shared/video-playlist/video-playlist-element-miniature.component'
83 import { VideosSelectionComponent } from '@app/shared/video/videos-selection.component'
84 import { NumberFormatterPipe } from '@app/shared/angular/number-formatter.pipe'
85 import { ObjectLengthPipe } from '@app/shared/angular/object-length.pipe'
86 import { FromNowPipe } from '@app/shared/angular/from-now.pipe'
87 import { PeerTubeTemplateDirective } from '@app/shared/angular/peertube-template.directive'
88 import { VideoActionsDropdownComponent } from '@app/shared/video/video-actions-dropdown.component'
89 import { VideoBlacklistComponent } from '@app/shared/video/modals/video-blacklist.component'
90 import { VideoDownloadComponent } from '@app/shared/video/modals/video-download.component'
91 import { VideoReportComponent } from '@app/shared/video/modals/video-report.component'
92 import { ClipboardModule } from 'ngx-clipboard'
93 import { FollowService } from '@app/shared/instance/follow.service'
94 import { MultiSelectModule } from 'primeng/multiselect'
95 import { FeatureBooleanComponent } from '@app/shared/instance/feature-boolean.component'
96
97 @NgModule({
98   imports: [
99     CommonModule,
100     FormsModule,
101     ReactiveFormsModule,
102     RouterModule,
103     HttpClientModule,
104
105     NgbDropdownModule,
106     NgbModalModule,
107     NgbPopoverModule,
108     NgbTabsetModule,
109     NgbTooltipModule,
110     NgbCollapseModule,
111
112     ClipboardModule,
113
114     PrimeSharedModule,
115     InputMaskModule,
116     NgPipesModule,
117     MultiSelectModule
118   ],
119
120   declarations: [
121     LoaderComponent,
122     SmallLoaderComponent,
123
124     VideoThumbnailComponent,
125     VideoMiniatureComponent,
126     VideoPlaylistMiniatureComponent,
127     VideoAddToPlaylistComponent,
128     VideoPlaylistElementMiniatureComponent,
129     VideosSelectionComponent,
130     VideoActionsDropdownComponent,
131
132     VideoDownloadComponent,
133     VideoReportComponent,
134     VideoBlacklistComponent,
135
136     FeedComponent,
137
138     ButtonComponent,
139     DeleteButtonComponent,
140     EditButtonComponent,
141
142     NumberFormatterPipe,
143     ObjectLengthPipe,
144     FromNowPipe,
145     PeerTubeTemplateDirective,
146
147     ActionDropdownComponent,
148     MarkdownTextareaComponent,
149     InfiniteScrollerDirective,
150     TextareaAutoResizeDirective,
151     HelpComponent,
152
153     ReactiveFileComponent,
154     PeertubeCheckboxComponent,
155     TimestampInputComponent,
156
157     SubscribeButtonComponent,
158     RemoteSubscribeComponent,
159     InstanceFeaturesTableComponent,
160     FeatureBooleanComponent,
161     UserBanModalComponent,
162     UserModerationDropdownComponent,
163     TopMenuDropdownComponent,
164     UserNotificationsComponent,
165     ConfirmComponent,
166
167     GlobalIconComponent,
168     PreviewUploadComponent
169   ],
170
171   exports: [
172     CommonModule,
173     FormsModule,
174     ReactiveFormsModule,
175     RouterModule,
176     HttpClientModule,
177
178     NgbDropdownModule,
179     NgbModalModule,
180     NgbPopoverModule,
181     NgbTabsetModule,
182     NgbTooltipModule,
183     NgbCollapseModule,
184
185     ClipboardModule,
186
187     PrimeSharedModule,
188     InputMaskModule,
189     BytesPipe,
190     KeysPipe,
191     MultiSelectModule,
192
193     LoaderComponent,
194     SmallLoaderComponent,
195
196     VideoThumbnailComponent,
197     VideoMiniatureComponent,
198     VideoPlaylistMiniatureComponent,
199     VideoAddToPlaylistComponent,
200     VideoPlaylistElementMiniatureComponent,
201     VideosSelectionComponent,
202     VideoActionsDropdownComponent,
203
204     VideoDownloadComponent,
205     VideoReportComponent,
206     VideoBlacklistComponent,
207
208     FeedComponent,
209
210     ButtonComponent,
211     DeleteButtonComponent,
212     EditButtonComponent,
213
214     ActionDropdownComponent,
215     MarkdownTextareaComponent,
216     InfiniteScrollerDirective,
217     TextareaAutoResizeDirective,
218     HelpComponent,
219
220     ReactiveFileComponent,
221     PeertubeCheckboxComponent,
222     TimestampInputComponent,
223
224     SubscribeButtonComponent,
225     RemoteSubscribeComponent,
226     InstanceFeaturesTableComponent,
227     UserBanModalComponent,
228     UserModerationDropdownComponent,
229     TopMenuDropdownComponent,
230     UserNotificationsComponent,
231     ConfirmComponent,
232
233     GlobalIconComponent,
234     PreviewUploadComponent,
235
236     NumberFormatterPipe,
237     ObjectLengthPipe,
238     FromNowPipe,
239     PeerTubeTemplateDirective
240   ],
241
242   providers: [
243     AUTH_INTERCEPTOR_PROVIDER,
244     RestExtractor,
245     RestService,
246     VideoAbuseService,
247     VideoBlacklistService,
248     VideoOwnershipService,
249     UserService,
250     VideoService,
251     AccountService,
252     VideoChannelService,
253     VideoPlaylistService,
254     VideoCaptionService,
255     VideoImportService,
256     UserSubscriptionService,
257
258     FormValidatorService,
259     CustomConfigValidatorsService,
260     LoginValidatorsService,
261     ResetPasswordValidatorsService,
262     UserValidatorsService,
263     VideoPlaylistValidatorsService,
264     VideoAbuseValidatorsService,
265     VideoChannelValidatorsService,
266     VideoCommentValidatorsService,
267     VideoValidatorsService,
268     VideoCaptionsValidatorsService,
269     VideoBlacklistValidatorsService,
270     OverviewService,
271     VideoChangeOwnershipValidatorsService,
272     VideoAcceptOwnershipValidatorsService,
273     InstanceValidatorsService,
274     BlocklistService,
275     UserHistoryService,
276     InstanceService,
277
278     MarkdownService,
279     LinkifierService,
280     HtmlRendererService,
281
282     I18nPrimengCalendarService,
283     ScreenService,
284
285     UserNotificationService,
286
287     FollowService,
288
289     I18n
290   ]
291 })
292 export class SharedModule { }