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

52 lines
1.5 KiB
TypeScript
Raw Normal View History

2019-09-18 06:02:21 +00:00
import { NgModule, ModuleWithProviders } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatDialogModule } from '@angular/material/dialog';
2019-10-16 09:05:18 +00:00
import { MatSnackBarModule } from '@angular/material/snack-bar';
2019-09-18 06:02:21 +00:00
2019-09-24 05:53:22 +00:00
import { DragDropModule } from '@angular/cdk/drag-drop';
2019-10-17 07:57:37 +00:00
const COMPONENTS = [];
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';
const SERVICES = [
BottomSheetService,
ClipboardService,
DialogService,
SnackBarService
];
2019-09-18 06:02:21 +00:00
import { AlertDialogComponent } from './dialogs/alert.dialog.component';
import { ConfirmDialogComponent } from './dialogs/confirm.dialog.component';
const DIALOGS = [AlertDialogComponent, ConfirmDialogComponent];
2019-10-17 07:57:37 +00:00
import { ImagePipe } from './pipes/image.pipe';
const PIPES = [ImagePipe];
2019-09-18 06:02:21 +00:00
@NgModule({
2019-09-24 05:53:22 +00:00
imports: [
CommonModule,
MatButtonModule,
MatCardModule,
MatDialogModule,
2019-10-16 09:05:18 +00:00
MatSnackBarModule,
2019-09-24 05:53:22 +00:00
DragDropModule
],
2019-10-17 07:57:37 +00:00
exports: [...COMPONENTS, ...PIPES],
declarations: [...COMPONENTS, ...DIALOGS, ...PIPES],
2019-09-18 06:02:21 +00:00
entryComponents: [...DIALOGS]
})
export class UCapUiModule {
public static forRoot(): ModuleWithProviders<UCapUiModule> {
return {
ngModule: UCapUiModule,
providers: [...SERVICES]
};
}
}