Fix new Angular 7 issues
[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 { MarkdownService } from '@app/videos/shared'
10
11 import { BytesPipe, KeysPipe, NgPipesModule } from 'ngx-pipes'
12 import { SharedModule as PrimeSharedModule } from 'primeng/components/common/shared'
13
14 import { AUTH_INTERCEPTOR_PROVIDER } from './auth'
15 import { ButtonComponent } from './buttons/button.component'
16 import { DeleteButtonComponent } from './buttons/delete-button.component'
17 import { EditButtonComponent } from './buttons/edit-button.component'
18 import { FromNowPipe } from './misc/from-now.pipe'
19 import { LoaderComponent } from './misc/loader.component'
20 import { NumberFormatterPipe } from './misc/number-formatter.pipe'
21 import { ObjectLengthPipe } from './misc/object-length.pipe'
22 import { RestExtractor, RestService } from './rest'
23 import { UserService } from './users'
24 import { VideoAbuseService } from './video-abuse'
25 import { VideoBlacklistService } from './video-blacklist'
26 import { VideoOwnershipService } from './video-ownership'
27 import { VideoMiniatureComponent } from './video/video-miniature.component'
28 import { FeedComponent } from './video/feed.component'
29 import { VideoThumbnailComponent } from './video/video-thumbnail.component'
30 import { VideoService } from './video/video.service'
31 import { AccountService } from '@app/shared/account/account.service'
32 import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
33 import { I18n } from '@ngx-translate/i18n-polyfill'
34 import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
35 import {
36   CustomConfigValidatorsService,
37   LoginValidatorsService,
38   ReactiveFileComponent,
39   ResetPasswordValidatorsService,
40   TextareaAutoResizeDirective,
41   UserValidatorsService,
42   VideoAbuseValidatorsService,
43   VideoAcceptOwnershipValidatorsService,
44   VideoBlacklistValidatorsService,
45   VideoChangeOwnershipValidatorsService,
46   VideoChannelValidatorsService,
47   VideoCommentValidatorsService,
48   VideoValidatorsService
49 } from '@app/shared/forms'
50 import { I18nPrimengCalendarService } from '@app/shared/i18n/i18n-primeng-calendar'
51 import { ScreenService } from '@app/shared/misc/screen.service'
52 import { VideoCaptionsValidatorsService } from '@app/shared/forms/form-validators/video-captions-validators.service'
53 import { VideoCaptionService } from '@app/shared/video-caption'
54 import { PeertubeCheckboxComponent } from '@app/shared/forms/peertube-checkbox.component'
55 import { VideoImportService } from '@app/shared/video-import/video-import.service'
56 import { ActionDropdownComponent } from '@app/shared/buttons/action-dropdown.component'
57 import { NgbDropdownModule, NgbModalModule, NgbPopoverModule, NgbTabsetModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'
58 import { RemoteSubscribeComponent, SubscribeButtonComponent, UserSubscriptionService } from '@app/shared/user-subscription'
59 import { InstanceFeaturesTableComponent } from '@app/shared/instance/instance-features-table.component'
60 import { OverviewService } from '@app/shared/overview'
61 import { UserBanModalComponent } from '@app/shared/moderation'
62 import { UserModerationDropdownComponent } from '@app/shared/moderation/user-moderation-dropdown.component'
63 import { BlocklistService } from '@app/shared/blocklist'
64
65 @NgModule({
66   imports: [
67     CommonModule,
68     FormsModule,
69     ReactiveFormsModule,
70     RouterModule,
71     HttpClientModule,
72
73     NgbDropdownModule,
74     NgbModalModule,
75     NgbPopoverModule,
76     NgbTabsetModule,
77     NgbTooltipModule,
78
79     PrimeSharedModule,
80     NgPipesModule
81   ],
82
83   declarations: [
84     LoaderComponent,
85     VideoThumbnailComponent,
86     VideoMiniatureComponent,
87     FeedComponent,
88     ButtonComponent,
89     DeleteButtonComponent,
90     EditButtonComponent,
91     ActionDropdownComponent,
92     NumberFormatterPipe,
93     ObjectLengthPipe,
94     FromNowPipe,
95     MarkdownTextareaComponent,
96     InfiniteScrollerDirective,
97     TextareaAutoResizeDirective,
98     HelpComponent,
99     ReactiveFileComponent,
100     PeertubeCheckboxComponent,
101     SubscribeButtonComponent,
102     RemoteSubscribeComponent,
103     InstanceFeaturesTableComponent,
104     UserBanModalComponent,
105     UserModerationDropdownComponent
106   ],
107
108   exports: [
109     CommonModule,
110     FormsModule,
111     ReactiveFormsModule,
112     RouterModule,
113     HttpClientModule,
114
115     NgbDropdownModule,
116     NgbModalModule,
117     NgbPopoverModule,
118     NgbTabsetModule,
119     NgbTooltipModule,
120
121     PrimeSharedModule,
122     BytesPipe,
123     KeysPipe,
124
125     LoaderComponent,
126     VideoThumbnailComponent,
127     VideoMiniatureComponent,
128     FeedComponent,
129     ButtonComponent,
130     DeleteButtonComponent,
131     EditButtonComponent,
132     ActionDropdownComponent,
133     MarkdownTextareaComponent,
134     InfiniteScrollerDirective,
135     TextareaAutoResizeDirective,
136     HelpComponent,
137     ReactiveFileComponent,
138     PeertubeCheckboxComponent,
139     SubscribeButtonComponent,
140     RemoteSubscribeComponent,
141     InstanceFeaturesTableComponent,
142     UserBanModalComponent,
143     UserModerationDropdownComponent,
144
145     NumberFormatterPipe,
146     ObjectLengthPipe,
147     FromNowPipe
148   ],
149
150   providers: [
151     AUTH_INTERCEPTOR_PROVIDER,
152     RestExtractor,
153     RestService,
154     VideoAbuseService,
155     VideoBlacklistService,
156     VideoOwnershipService,
157     UserService,
158     VideoService,
159     AccountService,
160     MarkdownService,
161     VideoChannelService,
162     VideoCaptionService,
163     VideoImportService,
164     UserSubscriptionService,
165
166     FormValidatorService,
167     CustomConfigValidatorsService,
168     LoginValidatorsService,
169     ResetPasswordValidatorsService,
170     UserValidatorsService,
171     VideoAbuseValidatorsService,
172     VideoChannelValidatorsService,
173     VideoCommentValidatorsService,
174     VideoValidatorsService,
175     VideoCaptionsValidatorsService,
176     VideoBlacklistValidatorsService,
177     OverviewService,
178     VideoChangeOwnershipValidatorsService,
179     VideoAcceptOwnershipValidatorsService,
180     BlocklistService,
181
182     I18nPrimengCalendarService,
183     ScreenService,
184
185     I18n
186   ]
187 })
188 export class SharedModule { }