Enable video upload and edit
[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   InstanceValidatorsService,
41   TextareaAutoResizeDirective,
42   UserValidatorsService,
43   VideoAbuseValidatorsService,
44   VideoAcceptOwnershipValidatorsService,
45   VideoBlacklistValidatorsService,
46   VideoChangeOwnershipValidatorsService,
47   VideoChannelValidatorsService,
48   VideoCommentValidatorsService,
49   VideoValidatorsService
50 } from '@app/shared/forms'
51 import { I18nPrimengCalendarService } from '@app/shared/i18n/i18n-primeng-calendar'
52 import { ScreenService } from '@app/shared/misc/screen.service'
53 import { VideoCaptionsValidatorsService } from '@app/shared/forms/form-validators/video-captions-validators.service'
54 import { VideoCaptionService } from '@app/shared/video-caption'
55 import { PeertubeCheckboxComponent } from '@app/shared/forms/peertube-checkbox.component'
56 import { VideoImportService } from '@app/shared/video-import/video-import.service'
57 import { ActionDropdownComponent } from '@app/shared/buttons/action-dropdown.component'
58 import { NgbDropdownModule, NgbModalModule, NgbPopoverModule, NgbTabsetModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'
59 import { RemoteSubscribeComponent, SubscribeButtonComponent, UserSubscriptionService } from '@app/shared/user-subscription'
60 import { InstanceFeaturesTableComponent } from '@app/shared/instance/instance-features-table.component'
61 import { OverviewService } from '@app/shared/overview'
62 import { UserBanModalComponent } from '@app/shared/moderation'
63 import { UserModerationDropdownComponent } from '@app/shared/moderation/user-moderation-dropdown.component'
64 import { BlocklistService } from '@app/shared/blocklist'
65 import { TopMenuDropdownComponent } from '@app/shared/menu/top-menu-dropdown.component'
66 import { UserHistoryService } from '@app/shared/users/user-history.service'
67 import { UserNotificationService } from '@app/shared/users/user-notification.service'
68 import { UserNotificationsComponent } from '@app/shared/users/user-notifications.component'
69 import { InstanceService } from '@app/shared/instance/instance.service'
70
71 @NgModule({
72   imports: [
73     CommonModule,
74     FormsModule,
75     ReactiveFormsModule,
76     RouterModule,
77     HttpClientModule,
78
79     NgbDropdownModule,
80     NgbModalModule,
81     NgbPopoverModule,
82     NgbTabsetModule,
83     NgbTooltipModule,
84
85     PrimeSharedModule,
86     NgPipesModule
87   ],
88
89   declarations: [
90     LoaderComponent,
91     VideoThumbnailComponent,
92     VideoMiniatureComponent,
93     FeedComponent,
94     ButtonComponent,
95     DeleteButtonComponent,
96     EditButtonComponent,
97     ActionDropdownComponent,
98     NumberFormatterPipe,
99     ObjectLengthPipe,
100     FromNowPipe,
101     MarkdownTextareaComponent,
102     InfiniteScrollerDirective,
103     TextareaAutoResizeDirective,
104     HelpComponent,
105     ReactiveFileComponent,
106     PeertubeCheckboxComponent,
107     SubscribeButtonComponent,
108     RemoteSubscribeComponent,
109     InstanceFeaturesTableComponent,
110     UserBanModalComponent,
111     UserModerationDropdownComponent,
112     TopMenuDropdownComponent,
113     UserNotificationsComponent
114   ],
115
116   exports: [
117     CommonModule,
118     FormsModule,
119     ReactiveFormsModule,
120     RouterModule,
121     HttpClientModule,
122
123     NgbDropdownModule,
124     NgbModalModule,
125     NgbPopoverModule,
126     NgbTabsetModule,
127     NgbTooltipModule,
128
129     PrimeSharedModule,
130     BytesPipe,
131     KeysPipe,
132
133     LoaderComponent,
134     VideoThumbnailComponent,
135     VideoMiniatureComponent,
136     FeedComponent,
137     ButtonComponent,
138     DeleteButtonComponent,
139     EditButtonComponent,
140     ActionDropdownComponent,
141     MarkdownTextareaComponent,
142     InfiniteScrollerDirective,
143     TextareaAutoResizeDirective,
144     HelpComponent,
145     ReactiveFileComponent,
146     PeertubeCheckboxComponent,
147     SubscribeButtonComponent,
148     RemoteSubscribeComponent,
149     InstanceFeaturesTableComponent,
150     UserBanModalComponent,
151     UserModerationDropdownComponent,
152     TopMenuDropdownComponent,
153     UserNotificationsComponent,
154
155     NumberFormatterPipe,
156     ObjectLengthPipe,
157     FromNowPipe
158   ],
159
160   providers: [
161     AUTH_INTERCEPTOR_PROVIDER,
162     RestExtractor,
163     RestService,
164     VideoAbuseService,
165     VideoBlacklistService,
166     VideoOwnershipService,
167     UserService,
168     VideoService,
169     AccountService,
170     MarkdownService,
171     VideoChannelService,
172     VideoCaptionService,
173     VideoImportService,
174     UserSubscriptionService,
175
176     FormValidatorService,
177     CustomConfigValidatorsService,
178     LoginValidatorsService,
179     ResetPasswordValidatorsService,
180     UserValidatorsService,
181     VideoAbuseValidatorsService,
182     VideoChannelValidatorsService,
183     VideoCommentValidatorsService,
184     VideoValidatorsService,
185     VideoCaptionsValidatorsService,
186     VideoBlacklistValidatorsService,
187     OverviewService,
188     VideoChangeOwnershipValidatorsService,
189     VideoAcceptOwnershipValidatorsService,
190     InstanceValidatorsService,
191     BlocklistService,
192     UserHistoryService,
193     InstanceService,
194
195     I18nPrimengCalendarService,
196     ScreenService,
197
198     UserNotificationService,
199
200     I18n
201   ]
202 })
203 export class SharedModule { }