migrate standalone pipes

This commit is contained in:
2025-01-05 10:20:05 +01:00
parent 597e89ffb3
commit 8b8395fc3c
24 changed files with 39 additions and 139 deletions

View File

@@ -2,8 +2,8 @@ import {CUSTOM_ELEMENTS_SCHEMA, NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {GuestComponent} from './guest.component';
import {RouterModule} from '@angular/router';
import {ShowTypeTranslaterModule} from '../../widget-modules/pipes/show-type-translater/show-type-translater.module';
import {SongTextComponent} from '../../widget-modules/components/song-text/song-text.component';
import {ShowTypePipe} from '../../widget-modules/pipes/show-type-translater/show-type.pipe';
@NgModule({
declarations: [GuestComponent],
@@ -16,7 +16,7 @@ import {SongTextComponent} from '../../widget-modules/components/song-text/song-
},
]),
SongTextComponent,
ShowTypeTranslaterModule,
ShowTypePipe,
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})

View File

@@ -7,8 +7,6 @@ import {RemoteComponent} from './remote/remote.component';
import {CardModule} from '../../widget-modules/components/card/card.module';
import {MatFormFieldModule} from '@angular/material/form-field';
import {MatSelectModule} from '@angular/material/select';
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 {LegalComponent} from './monitor/legal/legal.component';
import {MatButtonModule} from '@angular/material/button';
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
@@ -20,6 +18,8 @@ import {MatInputModule} from '@angular/material/input';
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';
import {SectionTypePipe} from '../../widget-modules/pipes/section-type-translator/section-type.pipe';
import {ShowTypePipe} from '../../widget-modules/pipes/show-type-translater/show-type.pipe';
@NgModule({
declarations: [MonitorComponent, RemoteComponent, LegalComponent, LogoComponent, SelectComponent],
@@ -30,8 +30,8 @@ import {AddSongComponent} from '../../widget-modules/components/add-song/add-son
CardModule,
MatFormFieldModule,
MatSelectModule,
ShowTypeTranslaterModule,
SectionTypeTranslatorModule,
ShowTypePipe,
SectionTypePipe,
SongTextComponent,
MatButtonModule,
FontAwesomeModule,

View File

@@ -175,7 +175,7 @@ export class ShowComponent implements OnInit, OnDestroy {
return show.order.map(_ => list.filter(f => f.id === _)[0]);
}
public trackBy = (_: number, show: ShowSong) => show.id;
public trackBy = (_: number, show: ShowSong) => show?.id;
public async onChange(showId: string) {
await this.router.navigateByUrl('/shows/' + showId + '/edit');

View File

@@ -15,7 +15,6 @@ import {ButtonRowModule} from '../../widget-modules/components/button-row/button
import {MatButtonModule} from '@angular/material/button';
import {MatDatepickerModule} from '@angular/material/datepicker';
import {MatSelectModule} from '@angular/material/select';
import {ShowTypeTranslaterModule} from '../../widget-modules/pipes/show-type-translater/show-type-translater.module';
import {MatNativeDateModule} from '@angular/material/core';
import {ShowComponent} from './show/show.component';
import {SongComponent} from './show/song/song.component';
@@ -28,7 +27,6 @@ import {UserNameModule} from '../../services/user/user-name/user-name.module';
import {MatMenuModule} from '@angular/material/menu';
import {DragDropModule} from '@angular/cdk/drag-drop';
import {RoleModule} from '../../services/user/role.module';
import {SortByModule} from '../../widget-modules/pipes/sort-by/sort-by.module';
import {MatTooltipModule} from '@angular/material/tooltip';
import {FilterComponent} from './list/filter/filter.component';
import {EditComponent} from './edit/edit.component';
@@ -36,6 +34,8 @@ import {ArchiveDialogComponent} from './dialog/archive-dialog/archive-dialog.com
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';
import {ShowTypePipe} from '../../widget-modules/pipes/show-type-translater/show-type.pipe';
import {SortByPipe} from '../../widget-modules/pipes/sort-by/sort-by.pipe';
@NgModule({
declarations: [NewComponent, ListComponent, ListItemComponent, ShowComponent, SongComponent, FilterComponent, EditComponent, ArchiveDialogComponent],
@@ -53,7 +53,7 @@ import {AddSongComponent} from '../../widget-modules/components/add-song/add-son
MatDatepickerModule,
MatNativeDateModule,
MatSelectModule,
ShowTypeTranslaterModule,
ShowTypePipe,
FontAwesomeModule,
MenuButtonModule,
FormsModule,
@@ -66,7 +66,7 @@ import {AddSongComponent} from '../../widget-modules/components/add-song/add-son
MatMenuModule,
DragDropModule,
RoleModule,
SortByModule,
SortByPipe,
MatTooltipModule,
MatDialogModule,
],

View File

@@ -3,20 +3,18 @@ import {CommonModule} from '@angular/common';
import {SongListComponent} from './song-list.component';
import {CardModule} from '../../../widget-modules/components/card/card.module';
import {RouterModule} from '@angular/router';
import {
LegalTypeTranslatorModule,
} from '../../../widget-modules/pipes/legal-type-translator/legal-type-translator.module';
import {ListHeaderModule} from '../../../widget-modules/components/list-header/list-header.module';
import {MatFormFieldModule} from '@angular/material/form-field';
import {MatInputModule} from '@angular/material/input';
import {FilterComponent} from './filter/filter.component';
import {ReactiveFormsModule} from '@angular/forms';
import {MatSelectModule} from '@angular/material/select';
import {SongTypeTranslaterModule} from '../../../widget-modules/pipes/song-type-translater/song-type-translater.module';
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
import {MatTooltipModule} from '@angular/material/tooltip';
import {RoleModule} from '../../../services/user/role.module';
import {KeyTranslatorModule} from '../../../widget-modules/pipes/key-translator/key-translator.module';
import {KeyPipe} from '../../../widget-modules/pipes/key-translator/key.pipe';
import {LegalTypePipe} from '../../../widget-modules/pipes/legal-type-translator/legal-type.pipe';
import {SongTypePipe} from '../../../widget-modules/pipes/song-type-translater/song-type.pipe';
@NgModule({
declarations: [SongListComponent, FilterComponent],
@@ -26,18 +24,17 @@ import {KeyTranslatorModule} from '../../../widget-modules/pipes/key-translator/
RouterModule,
CardModule,
LegalTypeTranslatorModule,
LegalTypePipe,
ListHeaderModule,
MatFormFieldModule,
MatInputModule,
ReactiveFormsModule,
MatSelectModule,
SongTypeTranslaterModule,
FontAwesomeModule,
MatTooltipModule,
RoleModule,
KeyTranslatorModule,
KeyPipe,
SongTypePipe,
],
})
export class SongListModule {
}
export class SongListModule {}

View File

@@ -2,7 +2,6 @@ import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {EditComponent} from './edit.component';
import {CardModule} from '../../../../widget-modules/components/card/card.module';
import {SongTypeTranslaterModule} from '../../../../widget-modules/pipes/song-type-translater/song-type-translater.module';
import {ReactiveFormsModule} from '@angular/forms';
import {MatInputModule} from '@angular/material/input';
import {MatCheckboxModule} from '@angular/material/checkbox';
@@ -14,18 +13,19 @@ import {EditSongComponent} from './edit-song/edit-song.component';
import {EditFileComponent} from './edit-file/edit-file.component';
import {MatIconModule} from '@angular/material/icon';
import {FileComponent} from './edit-file/file/file.component';
import {LegalOwnerTranslatorModule} 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 {MatChipsModule} from '@angular/material/chips';
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
import {StatusTranslaterModule} from '../../../../widget-modules/pipes/status-translater/status-translater.module';
import {ButtonModule} from '../../../../widget-modules/components/button/button.module';
import {MatTooltipModule} from '@angular/material/tooltip';
import {SaveDialogComponent} from './edit-song/save-dialog/save-dialog.component';
import {MatDialogModule} from '@angular/material/dialog';
import {HistoryComponent} from './history/history.component';
import {SongTextComponent} from '../../../../widget-modules/components/song-text/song-text.component';
import {KeyPipe} from '../../../../widget-modules/pipes/key-translator/key.pipe';
import {LegalOwnerPipe} from '../../../../widget-modules/pipes/legal-owner-translator/legal-owner.pipe';
import {LegalTypePipe} from '../../../../widget-modules/pipes/legal-type-translator/legal-type.pipe';
import {SongTypePipe} from '../../../../widget-modules/pipes/song-type-translater/song-type.pipe';
import {StatusPipe} from '../../../../widget-modules/pipes/status-translater/status.pipe';
@NgModule({
declarations: [EditComponent, EditSongComponent, EditFileComponent, FileComponent, SaveDialogComponent, HistoryComponent],
@@ -34,7 +34,7 @@ import {SongTextComponent} from '../../../../widget-modules/components/song-text
imports: [
CommonModule,
CardModule,
SongTypeTranslaterModule,
SongTypePipe,
ReactiveFormsModule,
RouterModule,
@@ -45,12 +45,12 @@ import {SongTextComponent} from '../../../../widget-modules/components/song-text
ButtonRowModule,
MatIconModule,
LegalOwnerTranslatorModule,
LegalTypeTranslatorModule,
KeyTranslatorModule,
LegalOwnerPipe,
LegalTypePipe,
KeyPipe,
MatChipsModule,
FontAwesomeModule,
StatusTranslaterModule,
StatusPipe,
ButtonModule,
MatTooltipModule,
MatDialogModule,

View File

@@ -2,19 +2,19 @@ import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {SongComponent} from './song.component';
import {CardModule} from '../../../widget-modules/components/card/card.module';
import {SongTypeTranslaterModule} from '../../../widget-modules/pipes/song-type-translater/song-type-translater.module';
import {MatButtonModule} from '@angular/material/button';
import {ButtonRowModule} from '../../../widget-modules/components/button-row/button-row.module';
import {RouterModule} from '@angular/router';
import {LegalOwnerTranslatorModule} from '../../../widget-modules/pipes/legal-owner-translator/legal-owner-translator.module';
import {MatChipsModule} from '@angular/material/chips';
import {RoleModule} from '../../../services/user/role.module';
import {StatusTranslaterModule} from '../../../widget-modules/pipes/status-translater/status-translater.module';
import {ButtonModule} from '../../../widget-modules/components/button/button.module';
import {FileComponent} from './file/file.component';
import {MatMenuModule} from '@angular/material/menu';
import {ShowTypeTranslaterModule} from '../../../widget-modules/pipes/show-type-translater/show-type-translater.module';
import {SongTextComponent} from '../../../widget-modules/components/song-text/song-text.component';
import {LegalOwnerPipe} from '../../../widget-modules/pipes/legal-owner-translator/legal-owner.pipe';
import {ShowTypePipe} from '../../../widget-modules/pipes/show-type-translater/show-type.pipe';
import {SongTypePipe} from '../../../widget-modules/pipes/song-type-translater/song-type.pipe';
import {StatusPipe} from '../../../widget-modules/pipes/status-translater/status.pipe';
@NgModule({
declarations: [SongComponent, FileComponent],
@@ -24,17 +24,17 @@ import {SongTextComponent} from '../../../widget-modules/components/song-text/so
CardModule,
RouterModule,
SongTypeTranslaterModule,
SongTypePipe,
MatButtonModule,
ButtonRowModule,
LegalOwnerTranslatorModule,
LegalOwnerPipe,
SongTextComponent,
MatChipsModule,
RoleModule,
StatusTranslaterModule,
StatusPipe,
ButtonModule,
MatMenuModule,
ShowTypeTranslaterModule,
ShowTypePipe,
],
})
export class SongModule {}

View File

@@ -22,7 +22,7 @@ import {NewComponent} from './new/new.component';
import {ButtonModule} from '../../widget-modules/components/button/button.module';
import {LogoModule} from '../../widget-modules/components/logo/logo.module';
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
import {SortByModule} from '../../widget-modules/pipes/sort-by/sort-by.module';
import {SortByPipe} from '../../widget-modules/pipes/sort-by/sort-by.pipe';
@NgModule({
declarations: [LoginComponent, AuthMessagePipe, InfoComponent, LogoutComponent, RolePipe, PasswordComponent, PasswordSendComponent, UsersComponent, UserComponent, NewComponent],
@@ -41,8 +41,7 @@ import {SortByModule} from '../../widget-modules/pipes/sort-by/sort-by.module';
ButtonModule,
LogoModule,
FontAwesomeModule,
SortByModule,
SortByPipe,
],
})
export class UserModule {
}
export class UserModule {}