2018-07-23 16:42:17 +02:00
|
|
|
import { NgModule } from '@angular/core';
|
2018-09-06 07:14:55 +02:00
|
|
|
import { RouterModule } from '@angular/router';
|
2019-04-12 15:11:12 +02:00
|
|
|
import { CommonModule, DecimalPipe } from '@angular/common';
|
2018-07-31 15:46:55 +02:00
|
|
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
2019-01-28 19:23:09 +01:00
|
|
|
import { OwlDateTimeModule, OwlNativeDateTimeModule } from 'ng-pick-datetime';
|
2018-07-23 16:42:17 +02:00
|
|
|
|
|
|
|
// MaterialUI modules
|
|
|
|
import {
|
|
|
|
MatButtonModule,
|
|
|
|
MatCheckboxModule,
|
|
|
|
MatToolbarModule,
|
|
|
|
MatCardModule,
|
|
|
|
MatInputModule,
|
2018-11-16 16:09:15 +01:00
|
|
|
MatProgressBarModule,
|
2018-07-23 16:42:17 +02:00
|
|
|
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,
|
2018-09-18 15:51:57 +02:00
|
|
|
MatTooltipModule,
|
|
|
|
MatDatepickerModule,
|
|
|
|
MatNativeDateModule,
|
2018-10-11 14:03:44 +02:00
|
|
|
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,
|
2019-01-10 15:06:10 +01:00
|
|
|
MatBottomSheetModule,
|
|
|
|
MatSliderModule
|
2018-07-23 16:42:17 +02:00
|
|
|
} from '@angular/material';
|
2018-09-13 07:57:38 +02:00
|
|
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
|
|
import { MatChipsModule } from '@angular/material';
|
2018-09-30 18:43:20 +02:00
|
|
|
import { MatRadioModule } from '@angular/material';
|
2018-09-13 07:57:38 +02:00
|
|
|
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
|
2018-08-02 16:39:08 +02:00
|
|
|
import { MatDialogModule } from '@angular/material/dialog';
|
2018-07-23 16:42:17 +02:00
|
|
|
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';
|
2018-10-15 11:52:57 +02:00
|
|
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
Replaces the old `angular2tree` with a custom drag&drop tree
Calculates the direction of the moving.
Finishes the moving of nodes in same level
Adds some style
Sets the padding dynamically
Adds placeholder depends on the horizontal movement
Set the placeholder at the correct place, so the user can see, where he will drop the moved node
Finishes moving of nodes
- Old parents change their option to expand.
- New parents change their option to expand.
- If the user moves a node between nodes with a higher level, the node will be moved to the next index with same or lower level.
Fixes the visibility of moved node
- If the new parent is not visible, the moved node will not be seen.
If the user moves an expanded node, the new parent should expanded, too, if it's not already.
Sending successfully data to the server
- Sorting the items
Handles moving nodes between parent and children
- If the user moves a node between a parent and its children, the children will be relinked to the moved node as their new parent.
Replaces the old `sorting-tree` to a new one
- The new `sorted-tree` replaces the old `sorting-tree`.
- The old package `angular-tree-component` was removed.
- The user will only see the buttons to save or cancel his changes, if he made changes.
- The buttons, that do not work currently, were removed.
Adds a guard to check if the user made changes.
- If the user made changes but he has not saved them, then there is a dialog that will prompt to ask for confirmation.
Before cancelling the changes the user has to confirm this.
2019-02-22 12:04:36 +01:00
|
|
|
import { CdkTreeModule } from '@angular/cdk/tree';
|
2019-04-25 12:57:11 +02:00
|
|
|
import { ScrollingModule } from '@angular/cdk/scrolling';
|
2018-07-23 16:42:17 +02:00
|
|
|
|
|
|
|
// 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';
|
|
|
|
|
2018-07-23 16:42:17 +02:00
|
|
|
// directives
|
2018-09-03 17:57:20 +02:00
|
|
|
import { PermsDirective } from './directives/perms.directive';
|
2018-07-31 15:46:55 +02:00
|
|
|
import { DomChangeDirective } from './directives/dom-change.directive';
|
2018-10-05 16:34:08 +02:00
|
|
|
import { AutofocusDirective } from './directives/autofocus.directive';
|
2018-09-02 11:05:09 +02:00
|
|
|
|
|
|
|
// components
|
2018-08-28 13:54:25 +02:00
|
|
|
import { HeadBarComponent } from './components/head-bar/head-bar.component';
|
2018-09-06 07:14:55 +02:00
|
|
|
import { LegalNoticeContentComponent } from './components/legal-notice-content/legal-notice-content.component';
|
|
|
|
import { PrivacyPolicyContentComponent } from './components/privacy-policy-content/privacy-policy-content.component';
|
2018-09-13 07:57:38 +02:00
|
|
|
import { SearchValueSelectorComponent } from './components/search-value-selector/search-value-selector.component';
|
2018-09-18 15:51:57 +02:00
|
|
|
import { OpenSlidesDateAdapter } from './date-adapter';
|
2018-10-01 15:36:16 +02:00
|
|
|
import { PromptDialogComponent } from './components/prompt-dialog/prompt-dialog.component';
|
2018-10-15 11:52:57 +02:00
|
|
|
import { SortingListComponent } from './components/sorting-list/sorting-list.component';
|
2018-11-16 10:25:17 +01:00
|
|
|
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';
|
2019-05-07 16:25:39 +02:00
|
|
|
import { SortFilterBarComponent } from './components/sort-filter-bar/sort-filter-bar.component';
|
|
|
|
import { SortBottomSheetComponent } from './components/sort-filter-bar/sort-bottom-sheet/sort-bottom-sheet.component';
|
|
|
|
import { FilterMenuComponent } from './components/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';
|
2019-01-10 15:06:10 +01:00
|
|
|
import { ProjectorButtonComponent } from './components/projector-button/projector-button.component';
|
|
|
|
import { ProjectionDialogComponent } from './components/projection-dialog/projection-dialog.component';
|
|
|
|
import { ResizedDirective } from './directives/resized.directive';
|
2019-01-24 16:25:50 +01:00
|
|
|
import { MetaTextBlockComponent } from './components/meta-text-block/meta-text-block.component';
|
2018-11-08 15:34:43 +01:00
|
|
|
import { OpenSlidesTranslateModule } from '../core/translate/openslides-translate-module';
|
2019-01-31 13:40:27 +01:00
|
|
|
import { ProjectorComponent } from './components/projector/projector.component';
|
|
|
|
import { SlideContainerComponent } from './components/slide-container/slide-container.component';
|
2019-02-14 16:02:18 +01:00
|
|
|
import { CountdownTimeComponent } from './components/contdown-time/countdown-time.component';
|
2019-02-21 16:48:19 +01:00
|
|
|
import { MediaUploadContentComponent } from './components/media-upload-content/media-upload-content.component';
|
2019-04-12 15:11:12 +02:00
|
|
|
import { PrecisionPipe } from './pipes/precision.pipe';
|
2018-07-23 16:42:17 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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,
|
2018-07-31 15:46:55 +02:00
|
|
|
ReactiveFormsModule,
|
2018-09-13 07:57:38 +02:00
|
|
|
MatAutocompleteModule,
|
2018-07-23 16:42:17 +02:00
|
|
|
MatButtonModule,
|
|
|
|
MatCheckboxModule,
|
|
|
|
MatToolbarModule,
|
2018-09-18 15:51:57 +02:00
|
|
|
MatDatepickerModule,
|
|
|
|
MatNativeDateModule,
|
2018-07-23 16:42:17 +02:00
|
|
|
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,
|
2018-07-23 16:42:17 +02:00
|
|
|
MatProgressSpinnerModule,
|
|
|
|
MatSidenavModule,
|
|
|
|
MatListModule,
|
|
|
|
MatExpansionModule,
|
|
|
|
MatMenuModule,
|
2018-08-02 16:39:08 +02:00
|
|
|
MatDialogModule,
|
2018-09-06 07:14:55 +02:00
|
|
|
MatSnackBarModule,
|
2018-09-11 16:38:23 +02:00
|
|
|
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,
|
2018-10-11 14:03:44 +02:00
|
|
|
// 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,
|
2019-01-10 15:06:10 +01:00
|
|
|
MatSliderModule,
|
2019-01-28 19:23:09 +01:00
|
|
|
OwlDateTimeModule,
|
|
|
|
OwlNativeDateTimeModule,
|
2018-10-15 11:52:57 +02:00
|
|
|
DragDropModule,
|
2018-11-08 15:34:43 +01:00
|
|
|
OpenSlidesTranslateModule.forChild(),
|
2018-09-13 07:57:38 +02:00
|
|
|
RouterModule,
|
2018-11-16 16:09:15 +01:00
|
|
|
NgxMatSelectSearchModule,
|
2018-11-20 13:31:56 +01:00
|
|
|
FileDropModule,
|
2018-11-16 10:25:17 +01:00
|
|
|
EditorModule,
|
2019-04-25 12:57:11 +02:00
|
|
|
CdkTreeModule,
|
|
|
|
ScrollingModule
|
2018-07-23 16:42:17 +02:00
|
|
|
],
|
|
|
|
exports: [
|
|
|
|
FormsModule,
|
2018-09-13 07:57:38 +02:00
|
|
|
MatAutocompleteModule,
|
2018-08-16 17:03:39 +02:00
|
|
|
MatFormFieldModule,
|
|
|
|
MatSelectModule,
|
2018-07-31 15:46:55 +02:00
|
|
|
ReactiveFormsModule,
|
2018-07-23 16:42:17 +02:00
|
|
|
MatButtonModule,
|
|
|
|
MatCheckboxModule,
|
|
|
|
MatToolbarModule,
|
|
|
|
MatCardModule,
|
2018-09-18 15:51:57 +02:00
|
|
|
MatDatepickerModule,
|
2018-07-23 16:42:17 +02:00
|
|
|
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,
|
2018-07-23 16:42:17 +02:00
|
|
|
MatProgressSpinnerModule,
|
|
|
|
MatSidenavModule,
|
|
|
|
MatListModule,
|
|
|
|
MatExpansionModule,
|
|
|
|
MatMenuModule,
|
2018-08-02 16:39:08 +02:00
|
|
|
MatDialogModule,
|
2018-07-23 16:42:17 +02:00
|
|
|
MatSnackBarModule,
|
2018-09-11 16:38:23 +02:00
|
|
|
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,
|
2018-10-11 14:03:44 +02:00
|
|
|
MatIconModule,
|
2018-09-30 18:43:20 +02:00
|
|
|
MatRadioModule,
|
|
|
|
MatButtonToggleModule,
|
2018-11-04 11:11:48 +01:00
|
|
|
MatStepperModule,
|
2019-01-10 15:06:10 +01:00
|
|
|
MatSliderModule,
|
2018-10-15 11:52:57 +02:00
|
|
|
DragDropModule,
|
2018-09-13 07:57:38 +02:00
|
|
|
NgxMatSelectSearchModule,
|
2018-11-16 16:09:15 +01:00
|
|
|
FileDropModule,
|
2018-07-23 16:42:17 +02:00
|
|
|
TranslateModule,
|
2018-11-08 15:34:43 +01:00
|
|
|
OpenSlidesTranslateModule,
|
2018-09-03 17:57:20 +02:00
|
|
|
PermsDirective,
|
2018-08-28 13:54:25 +02:00
|
|
|
DomChangeDirective,
|
2018-10-05 16:34:08 +02:00
|
|
|
AutofocusDirective,
|
2018-09-06 07:14:55 +02:00
|
|
|
HeadBarComponent,
|
2018-09-13 07:57:38 +02:00
|
|
|
SearchValueSelectorComponent,
|
2018-09-06 07:14:55 +02:00
|
|
|
LegalNoticeContentComponent,
|
2018-10-01 15:36:16 +02:00
|
|
|
PrivacyPolicyContentComponent,
|
2018-10-15 11:52:57 +02:00
|
|
|
PromptDialogComponent,
|
2018-11-20 13:31:56 +01:00
|
|
|
SortingListComponent,
|
2018-11-16 10:25:17 +01:00
|
|
|
EditorModule,
|
|
|
|
SortingTreeComponent,
|
2019-05-07 16:25:39 +02:00
|
|
|
SortFilterBarComponent,
|
2019-01-18 16:55:56 +01:00
|
|
|
LogoComponent,
|
|
|
|
CopyrightSignComponent,
|
2019-01-10 15:06:10 +01:00
|
|
|
C4DialogComponent,
|
|
|
|
ProjectorButtonComponent,
|
|
|
|
ProjectionDialogComponent,
|
2019-01-24 16:25:50 +01:00
|
|
|
ResizedDirective,
|
2019-01-31 13:40:27 +01:00
|
|
|
MetaTextBlockComponent,
|
|
|
|
ProjectorComponent,
|
2019-01-28 19:23:09 +01:00
|
|
|
SlideContainerComponent,
|
|
|
|
OwlDateTimeModule,
|
2019-02-14 16:02:18 +01:00
|
|
|
OwlNativeDateTimeModule,
|
2019-02-21 16:48:19 +01:00
|
|
|
CountdownTimeComponent,
|
2019-04-12 15:11:12 +02:00
|
|
|
MediaUploadContentComponent,
|
2019-04-25 12:57:11 +02:00
|
|
|
PrecisionPipe,
|
|
|
|
ScrollingModule
|
2018-07-23 16:42:17 +02:00
|
|
|
],
|
2018-09-06 07:14:55 +02:00
|
|
|
declarations: [
|
|
|
|
PermsDirective,
|
|
|
|
DomChangeDirective,
|
2018-10-05 16:34:08 +02:00
|
|
|
AutofocusDirective,
|
2018-09-06 07:14:55 +02:00
|
|
|
HeadBarComponent,
|
|
|
|
LegalNoticeContentComponent,
|
2018-09-13 07:57:38 +02:00
|
|
|
PrivacyPolicyContentComponent,
|
2018-10-01 15:36:16 +02:00
|
|
|
SearchValueSelectorComponent,
|
2018-10-15 11:52:57 +02:00
|
|
|
PromptDialogComponent,
|
2018-10-23 14:20:29 +02:00
|
|
|
SortingListComponent,
|
2018-11-27 22:44:37 +01:00
|
|
|
SortingTreeComponent,
|
2018-10-22 16:44:18 +02:00
|
|
|
ChoiceDialogComponent,
|
2019-05-07 16:25:39 +02:00
|
|
|
SortFilterBarComponent,
|
|
|
|
SortBottomSheetComponent,
|
2019-01-16 15:54:34 +01:00
|
|
|
FilterMenuComponent,
|
2019-01-18 16:55:56 +01:00
|
|
|
LogoComponent,
|
|
|
|
CopyrightSignComponent,
|
2019-01-10 15:06:10 +01:00
|
|
|
C4DialogComponent,
|
|
|
|
ProjectorButtonComponent,
|
|
|
|
ProjectionDialogComponent,
|
2019-01-24 16:25:50 +01:00
|
|
|
ResizedDirective,
|
2019-01-31 13:40:27 +01:00
|
|
|
MetaTextBlockComponent,
|
|
|
|
ProjectorComponent,
|
2019-02-14 16:02:18 +01:00
|
|
|
SlideContainerComponent,
|
2019-02-21 16:48:19 +01:00
|
|
|
CountdownTimeComponent,
|
2019-04-12 15:11:12 +02:00
|
|
|
MediaUploadContentComponent,
|
|
|
|
PrecisionPipe
|
2018-09-18 15:51:57 +02:00
|
|
|
],
|
2018-10-15 11:52:57 +02:00
|
|
|
providers: [
|
|
|
|
{ provide: DateAdapter, useClass: OpenSlidesDateAdapter },
|
|
|
|
SearchValueSelectorComponent,
|
2018-11-16 10:25:17 +01:00
|
|
|
SortingListComponent,
|
2018-10-22 16:44:18 +02:00
|
|
|
SortingTreeComponent,
|
2019-05-07 16:25:39 +02:00
|
|
|
SortFilterBarComponent,
|
|
|
|
SortBottomSheetComponent,
|
2019-04-12 15:11:12 +02:00
|
|
|
DecimalPipe
|
2018-10-22 16:44:18 +02:00
|
|
|
],
|
2019-05-07 16:25:39 +02:00
|
|
|
entryComponents: [SortBottomSheetComponent, C4DialogComponent]
|
2018-07-23 16:42:17 +02:00
|
|
|
})
|
|
|
|
export class SharedModule {}
|