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