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