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