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