common-ui/src/lib/common-ui.module.ts

76 lines
2.9 KiB
TypeScript

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MatIconModule } from '@angular/material/icon';
import { TranslateModule } from '@ngx-translate/core';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { SortByPipe } from './sorting';
import { HumanizePipe } from './utils';
import {
HiddenActionComponent,
LogoComponent,
ProgressBarComponent,
SideNavComponent,
SmallChipComponent,
StatusBarComponent,
ToastComponent,
} from './misc';
import { FullPageLoadingIndicatorComponent, ProgressLoadingComponent } from './loading';
import { ConnectionStatusComponent, FullPageErrorComponent } from './error';
import { IqserListingModule } from './listing';
import { IqserFiltersModule } from './filtering';
import { IqserInputsModule } from './inputs';
import { IqserHelpModeModule } from './help-mode';
import { IqserIconsModule } from './icons';
import { IqserButtonsModule } from './buttons';
import { IqserScrollbarModule } from './scrollbar';
import { IqserEmptyStatesModule } from './empty-states';
import { LogPipe } from './utils/pipes/log.pipe';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatDialogModule } from '@angular/material/dialog';
import { CapitalizePipe } from './utils/pipes/capitalize.pipe';
import { KeycloakAngularModule } from 'keycloak-angular';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { UploadFileComponent } from './upload-file/upload-file.component';
import { DragDropFileUploadDirective } from './upload-file/drag-drop-file-upload.directive';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { ConfirmationDialogComponent } from './dialog';
const matModules = [MatIconModule, MatProgressSpinnerModule, MatButtonModule, MatDialogModule, MatCheckboxModule];
const modules = [
TranslateModule,
IqserIconsModule,
IqserButtonsModule,
IqserListingModule,
IqserFiltersModule,
IqserInputsModule,
IqserHelpModeModule,
IqserScrollbarModule,
IqserEmptyStatesModule,
];
const components = [
StatusBarComponent,
FullPageLoadingIndicatorComponent,
ProgressLoadingComponent,
ConnectionStatusComponent,
FullPageErrorComponent,
LogoComponent,
HiddenActionComponent,
ConfirmationDialogComponent,
SideNavComponent,
ToastComponent,
SmallChipComponent,
ProgressBarComponent,
UploadFileComponent,
DragDropFileUploadDirective,
];
const pipes = [SortByPipe, HumanizePipe, CapitalizePipe, LogPipe];
@NgModule({
declarations: [...components, ...pipes],
imports: [CommonModule, ...matModules, ...modules, FormsModule, ReactiveFormsModule, KeycloakAngularModule, MatProgressBarModule],
exports: [...components, ...pipes, ...modules, LogPipe],
})
export class CommonUiModule {}