OpenSlides/client/src/app/shared/shared.module.ts

230 lines
7.8 KiB
TypeScript
Raw Normal View History

import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
// MaterialUI modules
import {
MatButtonModule,
MatCheckboxModule,
MatToolbarModule,
MatCardModule,
MatInputModule,
2018-11-16 16:09:15 +01:00
MatProgressBarModule,
MatProgressSpinnerModule,
MatSidenavModule,
2018-08-08 17:25:39 +02:00
MatSnackBarModule,
MatTableModule,
2018-08-09 13:27:04 +02:00
MatPaginatorModule,
2018-09-18 18:27:14 +02:00
MatSortModule,
MatTooltipModule,
MatDatepickerModule,
MatNativeDateModule,
DateAdapter,
2018-09-30 18:43:20 +02:00
MatIconModule,
2018-11-12 15:24:23 +01:00
MatButtonToggleModule,
2018-11-04 11:11:48 +01:00
MatBadgeModule,
2018-10-22 16:44:18 +02:00
MatStepperModule,
2019-01-11 18:55:09 +01:00
MatTabsModule,
MatBottomSheetModule,
MatSliderModule
} from '@angular/material';
import { MatAutocompleteModule } from '@angular/material/autocomplete';
import { MatChipsModule } from '@angular/material';
2018-09-30 18:43:20 +02:00
import { MatRadioModule } from '@angular/material';
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
import { MatDialogModule } from '@angular/material/dialog';
import { MatListModule } from '@angular/material/list';
import { MatExpansionModule } from '@angular/material/expansion';
import { MatMenuModule } from '@angular/material/menu';
2018-08-16 17:03:39 +02:00
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatSelectModule } from '@angular/material/select';
import { DragDropModule } from '@angular/cdk/drag-drop';
// ngx-translate
import { TranslateModule } from '@ngx-translate/core';
2018-11-16 16:09:15 +01:00
// ngx-file-drop
import { FileDropModule } from 'ngx-file-drop';
2018-11-20 13:31:56 +01:00
// TinyMCE
import { EditorModule } from '@tinymce/tinymce-angular';
// directives
import { PermsDirective } from './directives/perms.directive';
import { DomChangeDirective } from './directives/dom-change.directive';
import { AutofocusDirective } from './directives/autofocus.directive';
// tree sorting
import { TreeModule } from 'angular-tree-component';
// components
import { HeadBarComponent } from './components/head-bar/head-bar.component';
import { LegalNoticeContentComponent } from './components/legal-notice-content/legal-notice-content.component';
import { PrivacyPolicyContentComponent } from './components/privacy-policy-content/privacy-policy-content.component';
import { SearchValueSelectorComponent } from './components/search-value-selector/search-value-selector.component';
import { OpenSlidesDateAdapter } from './date-adapter';
2018-10-01 15:36:16 +02:00
import { PromptDialogComponent } from './components/prompt-dialog/prompt-dialog.component';
import { SortingListComponent } from './components/sorting-list/sorting-list.component';
import { SpeakerListComponent } from 'app/site/agenda/components/speaker-list/speaker-list.component';
import { SortingTreeComponent } from './components/sorting-tree/sorting-tree.component';
2018-11-27 22:44:37 +01:00
import { ChoiceDialogComponent } from './components/choice-dialog/choice-dialog.component';
2018-10-22 16:44:18 +02:00
import { OsSortFilterBarComponent } from './components/os-sort-filter-bar/os-sort-filter-bar.component';
import { OsSortBottomSheetComponent } from './components/os-sort-filter-bar/os-sort-bottom-sheet/os-sort-bottom-sheet.component';
import { FilterMenuComponent } from './components/os-sort-filter-bar/filter-menu/filter-menu.component';
2019-01-16 15:54:34 +01:00
import { LogoComponent } from './components/logo/logo.component';
2019-01-18 16:55:56 +01:00
import { C4DialogComponent, CopyrightSignComponent } from './components/copyright-sign/copyright-sign.component';
import { ProjectorButtonComponent } from './components/projector-button/projector-button.component';
import { ProjectionDialogComponent } from './components/projection-dialog/projection-dialog.component';
import { ResizedDirective } from './directives/resized.directive';
import { MetaTextBlockComponent } from './components/meta-text-block/meta-text-block.component';
/**
* Share Module for all "dumb" components and pipes.
*
* These components don not import and inject services from core or other features
* in their constructors.
*
* Should receive all data though attributes in the template of the component using them.
* No dependency to the rest of our application.
*/
@NgModule({
imports: [
CommonModule,
FormsModule,
2018-08-16 17:03:39 +02:00
MatFormFieldModule,
MatSelectModule,
ReactiveFormsModule,
MatAutocompleteModule,
MatButtonModule,
MatCheckboxModule,
MatToolbarModule,
MatDatepickerModule,
MatNativeDateModule,
MatCardModule,
MatInputModule,
2018-08-08 17:25:39 +02:00
MatTableModule,
2018-08-09 13:27:04 +02:00
MatSortModule,
2018-08-08 17:25:39 +02:00
MatPaginatorModule,
2018-11-16 16:09:15 +01:00
MatProgressBarModule,
MatProgressSpinnerModule,
MatSidenavModule,
MatListModule,
MatExpansionModule,
MatMenuModule,
MatDialogModule,
MatSnackBarModule,
MatChipsModule,
2018-10-22 16:44:18 +02:00
MatBottomSheetModule,
2018-09-18 18:27:14 +02:00
MatTooltipModule,
2018-11-12 15:24:23 +01:00
MatBadgeModule,
// TODO: there is an error with missing icons
// we either wait or include a fixed version manually (dirty)
// https://github.com/google/material-design-icons/issues/786
MatIconModule,
2018-09-30 18:43:20 +02:00
MatRadioModule,
MatButtonToggleModule,
2018-11-04 11:11:48 +01:00
MatStepperModule,
2019-01-11 18:55:09 +01:00
MatTabsModule,
MatSliderModule,
DragDropModule,
TranslateModule.forChild(),
RouterModule,
2018-11-16 16:09:15 +01:00
NgxMatSelectSearchModule,
2018-11-20 13:31:56 +01:00
FileDropModule,
EditorModule,
TreeModule.forRoot()
],
exports: [
FormsModule,
MatAutocompleteModule,
2018-08-16 17:03:39 +02:00
MatFormFieldModule,
MatSelectModule,
ReactiveFormsModule,
MatButtonModule,
MatCheckboxModule,
MatToolbarModule,
MatCardModule,
MatDatepickerModule,
MatInputModule,
2018-08-08 17:25:39 +02:00
MatTableModule,
2018-08-09 13:27:04 +02:00
MatSortModule,
2018-08-08 17:25:39 +02:00
MatPaginatorModule,
2018-11-16 16:09:15 +01:00
MatProgressBarModule,
MatProgressSpinnerModule,
MatSidenavModule,
MatListModule,
MatExpansionModule,
MatMenuModule,
MatDialogModule,
MatSnackBarModule,
MatChipsModule,
2018-09-18 18:27:14 +02:00
MatTooltipModule,
2019-01-11 18:55:09 +01:00
MatTabsModule,
2018-11-12 15:24:23 +01:00
MatBadgeModule,
MatIconModule,
2018-09-30 18:43:20 +02:00
MatRadioModule,
MatButtonToggleModule,
2018-11-04 11:11:48 +01:00
MatStepperModule,
MatSliderModule,
DragDropModule,
NgxMatSelectSearchModule,
2018-11-16 16:09:15 +01:00
FileDropModule,
TranslateModule,
PermsDirective,
DomChangeDirective,
AutofocusDirective,
HeadBarComponent,
SearchValueSelectorComponent,
LegalNoticeContentComponent,
2018-10-01 15:36:16 +02:00
PrivacyPolicyContentComponent,
PromptDialogComponent,
2018-11-20 13:31:56 +01:00
SortingListComponent,
EditorModule,
SortingTreeComponent,
2018-10-22 16:44:18 +02:00
TreeModule,
2019-01-16 15:54:34 +01:00
OsSortFilterBarComponent,
2019-01-18 16:55:56 +01:00
LogoComponent,
CopyrightSignComponent,
C4DialogComponent,
ProjectorButtonComponent,
ProjectionDialogComponent,
ResizedDirective,
MetaTextBlockComponent
],
declarations: [
PermsDirective,
DomChangeDirective,
AutofocusDirective,
HeadBarComponent,
LegalNoticeContentComponent,
PrivacyPolicyContentComponent,
2018-10-01 15:36:16 +02:00
SearchValueSelectorComponent,
PromptDialogComponent,
SortingListComponent,
SpeakerListComponent,
2018-11-27 22:44:37 +01:00
SortingTreeComponent,
2018-10-22 16:44:18 +02:00
ChoiceDialogComponent,
OsSortFilterBarComponent,
OsSortBottomSheetComponent,
2019-01-16 15:54:34 +01:00
FilterMenuComponent,
2019-01-18 16:55:56 +01:00
LogoComponent,
CopyrightSignComponent,
C4DialogComponent,
ProjectorButtonComponent,
ProjectionDialogComponent,
ResizedDirective,
MetaTextBlockComponent
],
providers: [
{ provide: DateAdapter, useClass: OpenSlidesDateAdapter },
SearchValueSelectorComponent,
SortingListComponent,
2018-10-22 16:44:18 +02:00
SortingTreeComponent,
OsSortFilterBarComponent,
OsSortBottomSheetComponent
],
2019-01-18 16:55:56 +01:00
entryComponents: [OsSortBottomSheetComponent, C4DialogComponent]
})
export class SharedModule {}