fix standalone

This commit is contained in:
2025-01-05 09:55:54 +01:00
parent e3fa1678c2
commit 597e89ffb3
10 changed files with 37 additions and 74 deletions

View File

@@ -2,8 +2,8 @@ import {CUSTOM_ELEMENTS_SCHEMA, NgModule} from '@angular/core';
import {CommonModule} from '@angular/common'; import {CommonModule} from '@angular/common';
import {GuestComponent} from './guest.component'; import {GuestComponent} from './guest.component';
import {RouterModule} from '@angular/router'; import {RouterModule} from '@angular/router';
import {SongTextModule} from '../../widget-modules/components/song-text/song-text.module';
import {ShowTypeTranslaterModule} from '../../widget-modules/pipes/show-type-translater/show-type-translater.module'; import {ShowTypeTranslaterModule} from '../../widget-modules/pipes/show-type-translater/show-type-translater.module';
import {SongTextComponent} from '../../widget-modules/components/song-text/song-text.component';
@NgModule({ @NgModule({
declarations: [GuestComponent], declarations: [GuestComponent],
@@ -15,10 +15,9 @@ import {ShowTypeTranslaterModule} from '../../widget-modules/pipes/show-type-tra
component: GuestComponent, component: GuestComponent,
}, },
]), ]),
SongTextModule, SongTextComponent,
ShowTypeTranslaterModule, ShowTypeTranslaterModule,
], ],
schemas: [CUSTOM_ELEMENTS_SCHEMA], schemas: [CUSTOM_ELEMENTS_SCHEMA],
}) })
export class GuestModule { export class GuestModule {}
}

View File

@@ -9,17 +9,17 @@ import {MatFormFieldModule} from '@angular/material/form-field';
import {MatSelectModule} from '@angular/material/select'; import {MatSelectModule} from '@angular/material/select';
import {ShowTypeTranslaterModule} from '../../widget-modules/pipes/show-type-translater/show-type-translater.module'; import {ShowTypeTranslaterModule} from '../../widget-modules/pipes/show-type-translater/show-type-translater.module';
import {SectionTypeTranslatorModule} from '../../widget-modules/pipes/section-type-translator/section-type-translator.module'; import {SectionTypeTranslatorModule} from '../../widget-modules/pipes/section-type-translator/section-type-translator.module';
import {SongTextModule} from '../../widget-modules/components/song-text/song-text.module';
import {LegalComponent} from './monitor/legal/legal.component'; import {LegalComponent} from './monitor/legal/legal.component';
import {MatButtonModule} from '@angular/material/button'; import {MatButtonModule} from '@angular/material/button';
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome'; import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
import {MatSliderModule} from '@angular/material/slider'; import {MatSliderModule} from '@angular/material/slider';
import {FormsModule, ReactiveFormsModule} from '@angular/forms'; import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {AddSongModule} from '../../widget-modules/components/add-song/add-song.module';
import {LogoComponent} from './monitor/logo/logo.component'; import {LogoComponent} from './monitor/logo/logo.component';
import {SelectComponent} from './select/select.component'; import {SelectComponent} from './select/select.component';
import {MatInputModule} from '@angular/material/input'; import {MatInputModule} from '@angular/material/input';
import {UserNameModule} from '../../services/user/user-name/user-name.module'; import {UserNameModule} from '../../services/user/user-name/user-name.module';
import {SongTextComponent} from '../../widget-modules/components/song-text/song-text.component';
import {AddSongComponent} from '../../widget-modules/components/add-song/add-song.component';
@NgModule({ @NgModule({
declarations: [MonitorComponent, RemoteComponent, LegalComponent, LogoComponent, SelectComponent], declarations: [MonitorComponent, RemoteComponent, LegalComponent, LogoComponent, SelectComponent],
@@ -32,12 +32,12 @@ import {UserNameModule} from '../../services/user/user-name/user-name.module';
MatSelectModule, MatSelectModule,
ShowTypeTranslaterModule, ShowTypeTranslaterModule,
SectionTypeTranslatorModule, SectionTypeTranslatorModule,
SongTextModule, SongTextComponent,
MatButtonModule, MatButtonModule,
FontAwesomeModule, FontAwesomeModule,
MatSliderModule, MatSliderModule,
FormsModule, FormsModule,
AddSongModule, AddSongComponent,
ReactiveFormsModule, ReactiveFormsModule,
MatInputModule, MatInputModule,
UserNameModule, UserNameModule,

View File

@@ -21,9 +21,7 @@ import {ShowComponent} from './show/show.component';
import {SongComponent} from './show/song/song.component'; import {SongComponent} from './show/song/song.component';
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome'; import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
import {MenuButtonModule} from '../../widget-modules/components/menu-button/menu-button.module'; import {MenuButtonModule} from '../../widget-modules/components/menu-button/menu-button.module';
import {SongTextModule} from '../../widget-modules/components/song-text/song-text.module';
import {NgxMatSelectSearchModule} from 'ngx-mat-select-search'; import {NgxMatSelectSearchModule} from 'ngx-mat-select-search';
import {AddSongModule} from '../../widget-modules/components/add-song/add-song.module';
import {ButtonModule} from '../../widget-modules/components/button/button.module'; import {ButtonModule} from '../../widget-modules/components/button/button.module';
import {OwnerModule} from '../../services/user/owner.module'; import {OwnerModule} from '../../services/user/owner.module';
import {UserNameModule} from '../../services/user/user-name/user-name.module'; import {UserNameModule} from '../../services/user/user-name/user-name.module';
@@ -36,6 +34,8 @@ import {FilterComponent} from './list/filter/filter.component';
import {EditComponent} from './edit/edit.component'; import {EditComponent} from './edit/edit.component';
import {ArchiveDialogComponent} from './dialog/archive-dialog/archive-dialog.component'; import {ArchiveDialogComponent} from './dialog/archive-dialog/archive-dialog.component';
import {MatDialogModule} from '@angular/material/dialog'; import {MatDialogModule} from '@angular/material/dialog';
import {SongTextComponent} from '../../widget-modules/components/song-text/song-text.component';
import {AddSongComponent} from '../../widget-modules/components/add-song/add-song.component';
@NgModule({ @NgModule({
declarations: [NewComponent, ListComponent, ListItemComponent, ShowComponent, SongComponent, FilterComponent, EditComponent, ArchiveDialogComponent], declarations: [NewComponent, ListComponent, ListItemComponent, ShowComponent, SongComponent, FilterComponent, EditComponent, ArchiveDialogComponent],
@@ -57,9 +57,9 @@ import {MatDialogModule} from '@angular/material/dialog';
FontAwesomeModule, FontAwesomeModule,
MenuButtonModule, MenuButtonModule,
FormsModule, FormsModule,
SongTextModule, SongTextComponent,
NgxMatSelectSearchModule, NgxMatSelectSearchModule,
AddSongModule, AddSongComponent,
ButtonModule, ButtonModule,
OwnerModule, OwnerModule,
UserNameModule, UserNameModule,
@@ -72,5 +72,4 @@ import {MatDialogModule} from '@angular/material/dialog';
], ],
schemas: [CUSTOM_ELEMENTS_SCHEMA], schemas: [CUSTOM_ELEMENTS_SCHEMA],
}) })
export class ShowsModule { export class ShowsModule {}
}

View File

@@ -2,9 +2,7 @@ import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common'; import {CommonModule} from '@angular/common';
import {EditComponent} from './edit.component'; import {EditComponent} from './edit.component';
import {CardModule} from '../../../../widget-modules/components/card/card.module'; import {CardModule} from '../../../../widget-modules/components/card/card.module';
import { import {SongTypeTranslaterModule} from '../../../../widget-modules/pipes/song-type-translater/song-type-translater.module';
SongTypeTranslaterModule,
} from '../../../../widget-modules/pipes/song-type-translater/song-type-translater.module';
import {ReactiveFormsModule} from '@angular/forms'; import {ReactiveFormsModule} from '@angular/forms';
import {MatInputModule} from '@angular/material/input'; import {MatInputModule} from '@angular/material/input';
import {MatCheckboxModule} from '@angular/material/checkbox'; import {MatCheckboxModule} from '@angular/material/checkbox';
@@ -16,12 +14,8 @@ import {EditSongComponent} from './edit-song/edit-song.component';
import {EditFileComponent} from './edit-file/edit-file.component'; import {EditFileComponent} from './edit-file/edit-file.component';
import {MatIconModule} from '@angular/material/icon'; import {MatIconModule} from '@angular/material/icon';
import {FileComponent} from './edit-file/file/file.component'; import {FileComponent} from './edit-file/file/file.component';
import { import {LegalOwnerTranslatorModule} from '../../../../widget-modules/pipes/legal-owner-translator/legal-owner-translator.module';
LegalOwnerTranslatorModule, import {LegalTypeTranslatorModule} from '../../../../widget-modules/pipes/legal-type-translator/legal-type-translator.module';
} from '../../../../widget-modules/pipes/legal-owner-translator/legal-owner-translator.module';
import {
LegalTypeTranslatorModule,
} from '../../../../widget-modules/pipes/legal-type-translator/legal-type-translator.module';
import {KeyTranslatorModule} from '../../../../widget-modules/pipes/key-translator/key-translator.module'; import {KeyTranslatorModule} from '../../../../widget-modules/pipes/key-translator/key-translator.module';
import {MatChipsModule} from '@angular/material/chips'; import {MatChipsModule} from '@angular/material/chips';
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome'; import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
@@ -31,7 +25,7 @@ import {MatTooltipModule} from '@angular/material/tooltip';
import {SaveDialogComponent} from './edit-song/save-dialog/save-dialog.component'; import {SaveDialogComponent} from './edit-song/save-dialog/save-dialog.component';
import {MatDialogModule} from '@angular/material/dialog'; import {MatDialogModule} from '@angular/material/dialog';
import {HistoryComponent} from './history/history.component'; import {HistoryComponent} from './history/history.component';
import {SongTextModule} from '../../../../widget-modules/components/song-text/song-text.module'; import {SongTextComponent} from '../../../../widget-modules/components/song-text/song-text.component';
@NgModule({ @NgModule({
declarations: [EditComponent, EditSongComponent, EditFileComponent, FileComponent, SaveDialogComponent, HistoryComponent], declarations: [EditComponent, EditSongComponent, EditFileComponent, FileComponent, SaveDialogComponent, HistoryComponent],
@@ -60,8 +54,7 @@ import {SongTextModule} from '../../../../widget-modules/components/song-text/so
ButtonModule, ButtonModule,
MatTooltipModule, MatTooltipModule,
MatDialogModule, MatDialogModule,
SongTextModule, SongTextComponent,
], ],
}) })
export class EditModule { export class EditModule {}
}

View File

@@ -6,10 +6,7 @@ import {SongTypeTranslaterModule} from '../../../widget-modules/pipes/song-type-
import {MatButtonModule} from '@angular/material/button'; import {MatButtonModule} from '@angular/material/button';
import {ButtonRowModule} from '../../../widget-modules/components/button-row/button-row.module'; import {ButtonRowModule} from '../../../widget-modules/components/button-row/button-row.module';
import {RouterModule} from '@angular/router'; import {RouterModule} from '@angular/router';
import { import {LegalOwnerTranslatorModule} from '../../../widget-modules/pipes/legal-owner-translator/legal-owner-translator.module';
LegalOwnerTranslatorModule,
} from '../../../widget-modules/pipes/legal-owner-translator/legal-owner-translator.module';
import {SongTextModule} from '../../../widget-modules/components/song-text/song-text.module';
import {MatChipsModule} from '@angular/material/chips'; import {MatChipsModule} from '@angular/material/chips';
import {RoleModule} from '../../../services/user/role.module'; import {RoleModule} from '../../../services/user/role.module';
import {StatusTranslaterModule} from '../../../widget-modules/pipes/status-translater/status-translater.module'; import {StatusTranslaterModule} from '../../../widget-modules/pipes/status-translater/status-translater.module';
@@ -17,6 +14,7 @@ import {ButtonModule} from '../../../widget-modules/components/button/button.mod
import {FileComponent} from './file/file.component'; import {FileComponent} from './file/file.component';
import {MatMenuModule} from '@angular/material/menu'; import {MatMenuModule} from '@angular/material/menu';
import {ShowTypeTranslaterModule} from '../../../widget-modules/pipes/show-type-translater/show-type-translater.module'; import {ShowTypeTranslaterModule} from '../../../widget-modules/pipes/show-type-translater/show-type-translater.module';
import {SongTextComponent} from '../../../widget-modules/components/song-text/song-text.component';
@NgModule({ @NgModule({
declarations: [SongComponent, FileComponent], declarations: [SongComponent, FileComponent],
@@ -30,7 +28,7 @@ import {ShowTypeTranslaterModule} from '../../../widget-modules/pipes/show-type-
MatButtonModule, MatButtonModule,
ButtonRowModule, ButtonRowModule,
LegalOwnerTranslatorModule, LegalOwnerTranslatorModule,
SongTextModule, SongTextComponent,
MatChipsModule, MatChipsModule,
RoleModule, RoleModule,
StatusTranslaterModule, StatusTranslaterModule,
@@ -39,5 +37,4 @@ import {ShowTypeTranslaterModule} from '../../../widget-modules/pipes/show-type-
ShowTypeTranslaterModule, ShowTypeTranslaterModule,
], ],
}) })
export class SongModule { export class SongModule {}
}

View File

@@ -3,14 +3,9 @@
<mat-label>Lied hinzufügen...</mat-label> <mat-label>Lied hinzufügen...</mat-label>
<mat-select (selectionChange)="onAddSongSelectionChanged($event)"> <mat-select (selectionChange)="onAddSongSelectionChanged($event)">
<mat-option> <mat-option>
<ngx-mat-select-search <ngx-mat-select-search [formControl]="filteredSongsControl"></ngx-mat-select-search>
[formControl]="filteredSongsControl"
></ngx-mat-select-search>
</mat-option>
<mat-option *ngFor="let song of filteredSongs()" [value]="song.id">{{
song.title
}}
</mat-option> </mat-option>
<mat-option *ngFor="let song of filteredSongs()" [value]="song.id">{{ song.title }}</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</div> </div>

View File

@@ -1,19 +1,21 @@
import {ChangeDetectionStrategy, Component, Input} from '@angular/core'; import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
import {UntypedFormControl} from '@angular/forms'; import {ReactiveFormsModule, UntypedFormControl} from '@angular/forms';
import {filterSong} from '../../../services/filter.helper'; import {filterSong} from '../../../services/filter.helper';
import {MatSelectChange} from '@angular/material/select'; import {MatFormField, MatLabel, MatOption, MatSelect, MatSelectChange} from '@angular/material/select';
import {Song} from '../../../modules/songs/services/song'; import {Song} from '../../../modules/songs/services/song';
import {ShowSong} from '../../../modules/shows/services/show-song'; import {ShowSong} from '../../../modules/shows/services/show-song';
import {ShowSongService} from '../../../modules/shows/services/show-song.service'; import {ShowSongService} from '../../../modules/shows/services/show-song.service';
import {Show} from '../../../modules/shows/services/show'; import {Show} from '../../../modules/shows/services/show';
import {ShowService} from '../../../modules/shows/services/show.service'; import {ShowService} from '../../../modules/shows/services/show.service';
import {NgForOf, NgIf} from '@angular/common';
import {NgxMatSelectSearchModule} from 'ngx-mat-select-search';
@Component({ @Component({
selector: 'app-add-song', selector: 'app-add-song',
templateUrl: './add-song.component.html', templateUrl: './add-song.component.html',
styleUrls: ['./add-song.component.less'], styleUrls: ['./add-song.component.less'],
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false, imports: [NgIf, MatFormField, MatSelect, MatOption, MatLabel, NgxMatSelectSearchModule, ReactiveFormsModule, NgForOf],
}) })
export class AddSongComponent { export class AddSongComponent {
@Input() public songs: Song[] | null = null; @Input() public songs: Song[] | null = null;
@@ -22,8 +24,10 @@ export class AddSongComponent {
@Input() public addedLive = false; @Input() public addedLive = false;
public filteredSongsControl = new UntypedFormControl(); public filteredSongsControl = new UntypedFormControl();
public constructor(private showSongService: ShowSongService, private showService: ShowService) { public constructor(
} private showSongService: ShowSongService,
private showService: ShowService
) {}
public filteredSongs(): Song[] { public filteredSongs(): Song[] {
if (!this.songs) return []; if (!this.songs) return [];

View File

@@ -1,15 +0,0 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {AddSongComponent} from './add-song.component';
import {MatFormFieldModule} from '@angular/material/form-field';
import {MatSelectModule} from '@angular/material/select';
import {NgxMatSelectSearchModule} from 'ngx-mat-select-search';
import {ReactiveFormsModule} from '@angular/forms';
@NgModule({
declarations: [AddSongComponent],
exports: [AddSongComponent],
imports: [CommonModule, MatFormFieldModule, MatSelectModule, NgxMatSelectSearchModule, ReactiveFormsModule],
})
export class AddSongModule {
}

View File

@@ -7,6 +7,9 @@ import {SectionType} from '../../../modules/songs/services/section-type';
import {LineType} from '../../../modules/songs/services/line-type'; import {LineType} from '../../../modules/songs/services/line-type';
import {Section} from '../../../modules/songs/services/section'; import {Section} from '../../../modules/songs/services/section';
import {Line} from '../../../modules/songs/services/line'; import {Line} from '../../../modules/songs/services/line';
import {NgForOf, NgIf} from '@angular/common';
import {MatIconButton} from '@angular/material/button';
import {FaIconComponent} from '@fortawesome/angular-fontawesome';
export type ChordMode = 'show' | 'hide' | 'onlyFirst'; export type ChordMode = 'show' | 'hide' | 'onlyFirst';
@@ -15,6 +18,7 @@ export type ChordMode = 'show' | 'hide' | 'onlyFirst';
templateUrl: './song-text.component.html', templateUrl: './song-text.component.html',
styleUrls: ['./song-text.component.less'], styleUrls: ['./song-text.component.less'],
animations: [songSwitch], animations: [songSwitch],
imports: [NgIf, MatIconButton, FaIconComponent, NgForOf],
}) })
export class SongTextComponent implements OnInit { export class SongTextComponent implements OnInit {
public sections: Section[] = []; public sections: Section[] = [];

View File

@@ -1,13 +0,0 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {SongTextComponent} from './song-text.component';
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
import {MatButtonModule} from '@angular/material/button';
@NgModule({
declarations: [SongTextComponent],
exports: [SongTextComponent],
imports: [CommonModule, FontAwesomeModule, MatButtonModule],
})
export class SongTextModule {
}