next-ucap-messenger/projects/ucap-webmessenger-ui/src/lib/ucap-ui.module.ts

128 lines
4.5 KiB
TypeScript
Raw Normal View History

import { MatTooltipModule } from '@angular/material/tooltip';
2019-09-18 06:02:21 +00:00
import { NgModule, ModuleWithProviders } from '@angular/core';
import { CommonModule } from '@angular/common';
2019-12-02 09:46:07 +00:00
import { ReactiveFormsModule } from '@angular/forms';
2019-10-21 04:36:58 +00:00
import { FlexLayoutModule } from '@angular/flex-layout';
2019-09-18 06:02:21 +00:00
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatDialogModule } from '@angular/material/dialog';
2019-10-21 04:36:58 +00:00
import { MatIconModule } from '@angular/material/icon';
2019-10-29 09:18:16 +00:00
import { MatProgressBarModule } from '@angular/material/progress-bar';
2019-11-07 06:46:02 +00:00
import { MatSliderModule } from '@angular/material/slider';
2019-10-16 09:05:18 +00:00
import { MatSnackBarModule } from '@angular/material/snack-bar';
2019-11-06 04:48:06 +00:00
import { MatToolbarModule } from '@angular/material/toolbar';
2019-12-02 09:46:07 +00:00
import { MatInputModule } from '@angular/material/input';
import { MatFormFieldModule } from '@angular/material/form-field';
2019-09-18 06:02:21 +00:00
2019-09-24 05:53:22 +00:00
import { DragDropModule } from '@angular/cdk/drag-drop';
import { FileUploadQueueComponent } from './components/file-upload-queue.component';
import { FloatActionButtonComponent } from './components/float-action-button.component';
import { FileViewerComponent } from './components/file-viewer.component';
2019-11-15 08:32:48 +00:00
import { ExpansionPanelComponent } from './components/expansion-panel.component';
import { BinaryViewerComponent } from './components/file-viewer/binary-viewer.component';
import { DocumentViewerComponent } from './components/file-viewer/document-viewer.component';
import { ImageViewerComponent } from './components/file-viewer/image-viewer.component';
import { SoundViewerComponent } from './components/file-viewer/sound-viewer.component';
import { VideoViewerComponent } from './components/file-viewer/video-viewer.component';
2019-10-17 07:57:37 +00:00
2019-09-18 06:02:21 +00:00
import { BottomSheetService } from './services/bottom-sheet.service';
2019-10-16 09:05:18 +00:00
import { ClipboardService } from './services/clipboard.service';
2019-09-18 06:02:21 +00:00
import { DialogService } from './services/dialog.service';
2019-10-16 09:05:18 +00:00
import { SnackBarService } from './services/snack-bar.service';
2019-11-25 07:48:06 +00:00
import { SplashScreenService } from './services/splash-screen.service';
2019-09-18 06:02:21 +00:00
2019-10-25 06:56:03 +00:00
import { ClickOutsideDirective } from './directives/click-outside.directive';
2019-10-21 04:36:58 +00:00
import { FileUploadForDirective } from './directives/file-upload-for.directive';
import { ImageDirective } from './directives/image.directive';
2019-11-18 07:58:27 +00:00
import { CdkVirtualScrollViewportPatchDirective } from './directives/cdk-virtual-scroll-viewport-patch.directive';
2019-10-21 04:36:58 +00:00
2019-09-18 06:02:21 +00:00
import { AlertDialogComponent } from './dialogs/alert.dialog.component';
import { ConfirmDialogComponent } from './dialogs/confirm.dialog.component';
2019-10-21 04:36:58 +00:00
import { BytesPipe } from './pipes/bytes.pipe';
import { LinefeedToHtmlPipe, HtmlToLinefeedPipe } from './pipes/linefeed.pipe';
import {
DateToStringForChatRoomListPipe,
2019-11-15 08:32:48 +00:00
DateToStringFormatPipe
} from './pipes/dates.pipe';
2019-11-07 06:46:02 +00:00
import { SecondsToMinutesPipe } from './pipes/seconds-to-minutes.pipe';
import { LinkyPipe } from './pipes/linky.pipe';
2019-11-20 09:04:24 +00:00
import { StickerSelectorComponent } from './components/sticker-selector.component';
2019-12-02 06:31:32 +00:00
import { MessageEditorComponent } from './components/message-editor.component';
import { MatTabsModule } from '@angular/material';
const COMPONENTS = [
FileUploadQueueComponent,
FloatActionButtonComponent,
FileViewerComponent,
2019-11-15 08:32:48 +00:00
ExpansionPanelComponent,
2019-11-20 09:04:24 +00:00
StickerSelectorComponent,
2019-12-02 06:31:32 +00:00
MessageEditorComponent,
BinaryViewerComponent,
DocumentViewerComponent,
ImageViewerComponent,
SoundViewerComponent,
2019-11-15 08:32:48 +00:00
VideoViewerComponent
];
const DIALOGS = [AlertDialogComponent, ConfirmDialogComponent];
2019-10-25 06:56:03 +00:00
const DIRECTIVES = [
ClickOutsideDirective,
FileUploadForDirective,
2019-11-18 07:58:27 +00:00
ImageDirective,
CdkVirtualScrollViewportPatchDirective
2019-10-25 06:56:03 +00:00
];
const PIPES = [
BytesPipe,
LinefeedToHtmlPipe,
HtmlToLinefeedPipe,
2019-11-07 06:46:02 +00:00
DateToStringForChatRoomListPipe,
DateToStringFormatPipe,
SecondsToMinutesPipe,
LinkyPipe
];
const SERVICES = [
BottomSheetService,
ClipboardService,
DialogService,
2019-11-25 07:48:06 +00:00
SnackBarService,
SplashScreenService
];
2019-10-17 07:57:37 +00:00
2019-09-18 06:02:21 +00:00
@NgModule({
2019-09-24 05:53:22 +00:00
imports: [
CommonModule,
2019-12-02 09:46:07 +00:00
ReactiveFormsModule,
2019-10-21 04:36:58 +00:00
FlexLayoutModule,
2019-09-24 05:53:22 +00:00
MatButtonModule,
MatCardModule,
MatDialogModule,
2019-10-21 04:36:58 +00:00
MatIconModule,
2019-12-02 09:46:07 +00:00
MatInputModule,
2019-10-29 09:18:16 +00:00
MatProgressBarModule,
2019-11-07 06:46:02 +00:00
MatSliderModule,
2019-10-16 09:05:18 +00:00
MatSnackBarModule,
2019-11-06 04:48:06 +00:00
MatToolbarModule,
MatTooltipModule,
MatTabsModule,
2019-12-02 09:46:07 +00:00
MatFormFieldModule,
2019-11-15 08:32:48 +00:00
DragDropModule
2019-09-24 05:53:22 +00:00
],
2019-10-21 04:36:58 +00:00
exports: [...COMPONENTS, ...DIRECTIVES, ...PIPES],
declarations: [...COMPONENTS, ...DIALOGS, ...DIRECTIVES, ...PIPES],
2019-11-15 08:32:48 +00:00
entryComponents: [...DIALOGS]
2019-09-18 06:02:21 +00:00
})
export class UCapUiModule {
public static forRoot(): ModuleWithProviders<UCapUiModule> {
return {
ngModule: UCapUiModule,
2019-11-15 08:32:48 +00:00
providers: [...SERVICES]
2019-09-18 06:02:21 +00:00
};
}
}