75 lines
2.3 KiB
TypeScript
75 lines
2.3 KiB
TypeScript
import { NgModule, ModuleWithProviders } from '@angular/core';
|
|
import { CommonModule } from '@angular/common';
|
|
|
|
import { FlexLayoutModule } from '@angular/flex-layout';
|
|
|
|
import { MatButtonModule } from '@angular/material/button';
|
|
import { MatCardModule } from '@angular/material/card';
|
|
import { MatDialogModule } from '@angular/material/dialog';
|
|
import { MatIconModule } from '@angular/material/icon';
|
|
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
|
|
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
|
|
import { FileUploadQueueComponent } from './components/file-upload-queue.component';
|
|
|
|
import { BottomSheetService } from './services/bottom-sheet.service';
|
|
import { ClipboardService } from './services/clipboard.service';
|
|
import { DialogService } from './services/dialog.service';
|
|
import { SnackBarService } from './services/snack-bar.service';
|
|
|
|
import { ClickOutsideDirective } from './directives/click-outside.directive';
|
|
import { FileUploadForDirective } from './directives/file-upload-for.directive';
|
|
import { ImageDirective } from './directives/image.directive';
|
|
|
|
import { AlertDialogComponent } from './dialogs/alert.dialog.component';
|
|
import { ConfirmDialogComponent } from './dialogs/confirm.dialog.component';
|
|
|
|
import { BytesPipe } from './pipes/bytes.pipe';
|
|
import { LinefeedToHtmlPipe, HtmlToLinefeedPipe } from './pipes/linefeed.pipe';
|
|
import { DateToStringForChatRoomListPipe } from './pipes/dates.pipe';
|
|
|
|
const COMPONENTS = [FileUploadQueueComponent];
|
|
const DIALOGS = [AlertDialogComponent, ConfirmDialogComponent];
|
|
const DIRECTIVES = [
|
|
ClickOutsideDirective,
|
|
FileUploadForDirective,
|
|
ImageDirective
|
|
];
|
|
const PIPES = [
|
|
BytesPipe,
|
|
LinefeedToHtmlPipe,
|
|
HtmlToLinefeedPipe,
|
|
DateToStringForChatRoomListPipe
|
|
];
|
|
const SERVICES = [
|
|
BottomSheetService,
|
|
ClipboardService,
|
|
DialogService,
|
|
SnackBarService
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [
|
|
CommonModule,
|
|
FlexLayoutModule,
|
|
MatButtonModule,
|
|
MatCardModule,
|
|
MatDialogModule,
|
|
MatIconModule,
|
|
MatSnackBarModule,
|
|
DragDropModule
|
|
],
|
|
exports: [...COMPONENTS, ...DIRECTIVES, ...PIPES],
|
|
declarations: [...COMPONENTS, ...DIALOGS, ...DIRECTIVES, ...PIPES],
|
|
entryComponents: [...DIALOGS]
|
|
})
|
|
export class UCapUiModule {
|
|
public static forRoot(): ModuleWithProviders<UCapUiModule> {
|
|
return {
|
|
ngModule: UCapUiModule,
|
|
providers: [...SERVICES]
|
|
};
|
|
}
|
|
}
|