funky-framadate-front/src/app/shared/shared.module.ts

83 lines
3.7 KiB
TypeScript
Raw Normal View History

import { CommonModule } from '@angular/common';
2020-04-22 12:56:18 +02:00
import { NgModule } from '@angular/core';
2020-05-05 18:17:12 +02:00
import { FormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatDialogModule } from '@angular/material/dialog';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { MatStepperModule } from '@angular/material/stepper';
2020-04-22 12:56:18 +02:00
import { TranslateModule } from '@ngx-translate/core';
import { ChartsModule } from 'ng2-charts';
2020-05-01 19:10:17 +02:00
2020-05-12 19:16:23 +02:00
import { ChoiceDetailsComponent } from './components/choice-details/choice-details.component';
import { CommentsComponent } from './components/comments/comments.component';
2020-05-05 18:17:12 +02:00
import { FeedbackComponent } from './components/feedback/feedback.component';
2020-05-01 19:10:17 +02:00
import { PageNotFoundComponent } from './components/page-not-found/page-not-found.component';
2020-05-05 18:17:12 +02:00
import { LanguageSelectorComponent } from './components/selectors/language-selector/language-selector.component';
import { ThemeSelectorComponent } from './components/selectors/theme-selector/theme-selector.component';
import { SettingsComponent } from './components/settings/settings.component';
import { SpinnerComponent } from './components/spinner/spinner.component';
2020-11-13 09:38:42 +01:00
import { CopyTextComponent } from './components/ui/copy-text/copy-text.component';
import { ErasableInputComponent } from './components/ui/erasable-input/erasable-input.component';
import { WipTodoComponent } from './components/ui/wip-todo/wip-todo.component';
2021-05-04 09:33:28 +02:00
import { ErrorsListComponent } from '../features/shared/components/ui/form/errors-list/errors-list.component';
import { ShortcutsHelpComponent } from '../features/shared/components/ui/shortcuts-help/shortcuts-help.component';
2021-11-17 15:06:36 +01:00
import { ConfirmDialogModule } from 'primeng/confirmdialog';
import { ConfirmationService } from 'primeng/api';
2021-11-19 15:25:54 +01:00
import { AboutComponent } from '../features/shared/components/ui/static-pages/about/about.component';
import { RouterModule } from '@angular/router';
import { ChoiceButtonDinumComponent } from '../features/shared/components/choice-button-dinum/choice-button-dinum.component';
2022-02-08 13:44:17 +01:00
import { DialogModule } from 'primeng/dialog';
2022-02-09 11:30:22 +01:00
import { HeaderComponent } from '../core/components/header/header.component';
import { FooterComponent } from '../core/components/footer/footer.component';
2020-05-05 18:17:12 +02:00
const COMPONENTS = [
2021-11-19 15:25:54 +01:00
AboutComponent,
2020-05-12 19:16:23 +02:00
ChoiceDetailsComponent,
CommentsComponent,
FeedbackComponent,
2020-05-05 18:17:12 +02:00
LanguageSelectorComponent,
PageNotFoundComponent,
SettingsComponent,
SpinnerComponent,
ThemeSelectorComponent,
2020-11-13 09:38:42 +01:00
CopyTextComponent,
ErasableInputComponent,
2021-05-04 09:33:28 +02:00
ErrorsListComponent,
WipTodoComponent,
ShortcutsHelpComponent,
ChoiceButtonDinumComponent,
2022-02-09 11:30:22 +01:00
HeaderComponent,
FooterComponent,
];
const ANGULAR_MODULES = [CommonModule, ChartsModule, FormsModule, TranslateModule];
const MATERIAL_MODULES = [
MatButtonModule,
MatCheckboxModule,
MatDatepickerModule,
MatDialogModule,
MatFormFieldModule,
MatInputModule,
MatProgressSpinnerModule,
MatSidenavModule,
MatSlideToggleModule,
MatSnackBarModule,
MatStepperModule,
2020-05-05 18:17:12 +02:00
];
@NgModule({
declarations: COMPONENTS,
2022-02-08 13:44:17 +01:00
imports: [...ANGULAR_MODULES, ...MATERIAL_MODULES, ConfirmDialogModule, RouterModule, DialogModule],
exports: [...ANGULAR_MODULES, ...MATERIAL_MODULES, ...COMPONENTS],
2021-11-17 15:06:36 +01:00
providers: [ConfirmationService],
})
export class SharedModule {}