01735c1878e5ce1d674fa570d7e48b7c524762fb
[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 import { BatchDomainsValidatorsService } from '@app/+admin/config/shared/batch-domains-validators.service'
111
112 @NgModule({
113   imports: [
114     CommonModule,
115     FormsModule,
116     ReactiveFormsModule,
117     RouterModule,
118     HttpClientModule,
119
120     NgbDropdownModule,
121     NgbModalModule,
122     NgbPopoverModule,
123     NgbNavModule,
124     NgbTooltipModule,
125     NgbCollapseModule,
126
127     ClipboardModule,
128
129     PrimeSharedModule,
130     InputMaskModule,
131     NgPipesModule,
132     MultiSelectModule,
133     InputSwitchModule
134   ],
135
136   declarations: [
137     LoaderComponent,
138     SmallLoaderComponent,
139
140     VideoThumbnailComponent,
141     VideoMiniatureComponent,
142     VideoPlaylistMiniatureComponent,
143     VideoAddToPlaylistComponent,
144     VideoPlaylistElementMiniatureComponent,
145     VideosSelectionComponent,
146     VideoActionsDropdownComponent,
147
148     VideoDownloadComponent,
149     VideoReportComponent,
150     VideoBlacklistComponent,
151
152     FeedComponent,
153
154     ButtonComponent,
155     DeleteButtonComponent,
156     EditButtonComponent,
157
158     NumberFormatterPipe,
159     ObjectLengthPipe,
160     FromNowPipe,
161     HighlightPipe,
162     PeerTubeTemplateDirective,
163     VideoDurationPipe,
164
165     ActionDropdownComponent,
166     MarkdownTextareaComponent,
167     InfiniteScrollerDirective,
168     TextareaAutoResizeDirective,
169     HelpComponent,
170     ListOverflowComponent,
171
172     ReactiveFileComponent,
173     PeertubeCheckboxComponent,
174     TimestampInputComponent,
175     InputReadonlyCopyComponent,
176
177     AvatarComponent,
178     SubscribeButtonComponent,
179     RemoteSubscribeComponent,
180     InstanceFeaturesTableComponent,
181     InstanceStatisticsComponent,
182     FeatureBooleanComponent,
183     UserBanModalComponent,
184     UserModerationDropdownComponent,
185     TopMenuDropdownComponent,
186     UserNotificationsComponent,
187     ConfirmComponent,
188     DateToggleComponent,
189
190     GlobalIconComponent,
191     PreviewUploadComponent,
192
193     MyAccountVideoSettingsComponent,
194     MyAccountInterfaceSettingsComponent,
195     ActorAvatarInfoComponent
196   ],
197
198   exports: [
199     CommonModule,
200     FormsModule,
201     ReactiveFormsModule,
202     RouterModule,
203     HttpClientModule,
204
205     NgbDropdownModule,
206     NgbModalModule,
207     NgbPopoverModule,
208     NgbNavModule,
209     NgbTooltipModule,
210     NgbCollapseModule,
211
212     ClipboardModule,
213
214     PrimeSharedModule,
215     InputMaskModule,
216     BytesPipe,
217     KeysPipe,
218     MultiSelectModule,
219
220     LoaderComponent,
221     SmallLoaderComponent,
222
223     VideoThumbnailComponent,
224     VideoMiniatureComponent,
225     VideoPlaylistMiniatureComponent,
226     VideoAddToPlaylistComponent,
227     VideoPlaylistElementMiniatureComponent,
228     VideosSelectionComponent,
229     VideoActionsDropdownComponent,
230
231     VideoDownloadComponent,
232     VideoReportComponent,
233     VideoBlacklistComponent,
234
235     FeedComponent,
236
237     ButtonComponent,
238     DeleteButtonComponent,
239     EditButtonComponent,
240
241     ActionDropdownComponent,
242     MarkdownTextareaComponent,
243     InfiniteScrollerDirective,
244     TextareaAutoResizeDirective,
245     HelpComponent,
246     ListOverflowComponent,
247     InputReadonlyCopyComponent,
248
249     ReactiveFileComponent,
250     PeertubeCheckboxComponent,
251     TimestampInputComponent,
252
253     AvatarComponent,
254     SubscribeButtonComponent,
255     RemoteSubscribeComponent,
256     InstanceFeaturesTableComponent,
257     InstanceStatisticsComponent,
258     UserBanModalComponent,
259     UserModerationDropdownComponent,
260     TopMenuDropdownComponent,
261     UserNotificationsComponent,
262     ConfirmComponent,
263     DateToggleComponent,
264
265     GlobalIconComponent,
266     PreviewUploadComponent,
267
268     NumberFormatterPipe,
269     ObjectLengthPipe,
270     FromNowPipe,
271     HighlightPipe,
272     PeerTubeTemplateDirective,
273     VideoDurationPipe,
274
275     MyAccountVideoSettingsComponent,
276     MyAccountInterfaceSettingsComponent,
277     ActorAvatarInfoComponent
278   ],
279
280   providers: [
281     AUTH_INTERCEPTOR_PROVIDER,
282     RestExtractor,
283     RestService,
284     VideoAbuseService,
285     VideoBlacklistService,
286     VideoOwnershipService,
287     UserService,
288     VideoService,
289     AccountService,
290     VideoChannelService,
291     VideoPlaylistService,
292     VideoCaptionService,
293     VideoImportService,
294     UserSubscriptionService,
295
296     FormValidatorService,
297     CustomConfigValidatorsService,
298     LoginValidatorsService,
299     ResetPasswordValidatorsService,
300     UserValidatorsService,
301     BatchDomainsValidatorsService,
302     VideoPlaylistValidatorsService,
303     VideoAbuseValidatorsService,
304     VideoChannelValidatorsService,
305     VideoCommentValidatorsService,
306     VideoValidatorsService,
307     VideoCaptionsValidatorsService,
308     VideoBlacklistValidatorsService,
309     OverviewService,
310     VideoChangeOwnershipValidatorsService,
311     VideoAcceptOwnershipValidatorsService,
312     InstanceValidatorsService,
313     BlocklistService,
314     UserHistoryService,
315     InstanceService,
316
317     MarkdownService,
318     LinkifierService,
319     HtmlRendererService,
320
321     I18nPrimengCalendarService,
322     ScreenService,
323     LocalStorageService, SessionStorageService,
324
325     UserNotificationService,
326
327     FollowService,
328     RedundancyService,
329
330     I18n
331   ]
332 })
333 export class SharedModule { }