auto migrate standalone components
This commit is contained in:
@@ -8,8 +8,8 @@ describe('FilterComponent', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [FilterComponent],
|
||||
}).compileComponents();
|
||||
imports: [FilterComponent],
|
||||
}).compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {KeyValue} from '@angular/common';
|
||||
import { KeyValue, NgFor } from '@angular/common';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {UntypedFormBuilder, UntypedFormGroup} from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, ReactiveFormsModule } from '@angular/forms';
|
||||
import {FilterValues} from './filter-values';
|
||||
import {Show} from '../../services/show';
|
||||
import {ShowService} from '../../services/show.service';
|
||||
@@ -10,12 +10,25 @@ import {combineLatest, Observable} from 'rxjs';
|
||||
import {dynamicSort, onlyUnique} from '../../../../services/filter.helper';
|
||||
import {UserService} from '../../../../services/user/user.service';
|
||||
import {isEqual} from 'lodash';
|
||||
import { MatFormField, MatLabel } from '@angular/material/form-field';
|
||||
import { MatSelect } from '@angular/material/select';
|
||||
import { MatOption, MatOptgroup } from '@angular/material/core';
|
||||
import { ShowTypePipe } from '../../../../widget-modules/pipes/show-type-translater/show-type.pipe';
|
||||
|
||||
@Component({
|
||||
selector: 'app-filter',
|
||||
templateUrl: './filter.component.html',
|
||||
styleUrls: ['./filter.component.less'],
|
||||
standalone: false,
|
||||
selector: 'app-filter',
|
||||
templateUrl: './filter.component.html',
|
||||
styleUrls: ['./filter.component.less'],
|
||||
imports: [
|
||||
ReactiveFormsModule,
|
||||
MatFormField,
|
||||
MatLabel,
|
||||
MatSelect,
|
||||
NgFor,
|
||||
MatOption,
|
||||
MatOptgroup,
|
||||
ShowTypePipe,
|
||||
],
|
||||
})
|
||||
export class FilterComponent {
|
||||
@Input() public route = '/shows/';
|
||||
|
||||
@@ -9,8 +9,8 @@ describe('ListItemComponent', () => {
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
declarations: [ListItemComponent],
|
||||
}).compileComponents();
|
||||
imports: [ListItemComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
@@ -1,11 +1,19 @@
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {Show} from '../../services/show';
|
||||
import { NgIf, DatePipe } from '@angular/common';
|
||||
import { UserNameComponent } from '../../../../services/user/user-name/user-name.component';
|
||||
import { ShowTypePipe } from '../../../../widget-modules/pipes/show-type-translater/show-type.pipe';
|
||||
|
||||
@Component({
|
||||
selector: 'app-list-item',
|
||||
templateUrl: './list-item.component.html',
|
||||
styleUrls: ['./list-item.component.less'],
|
||||
standalone: false,
|
||||
selector: 'app-list-item',
|
||||
templateUrl: './list-item.component.html',
|
||||
styleUrls: ['./list-item.component.less'],
|
||||
imports: [
|
||||
NgIf,
|
||||
UserNameComponent,
|
||||
DatePipe,
|
||||
ShowTypePipe,
|
||||
],
|
||||
})
|
||||
export class ListItemComponent {
|
||||
@Input() public show: Show | null = null;
|
||||
|
||||
@@ -9,8 +9,8 @@ describe('ListComponent', () => {
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
declarations: [ListComponent],
|
||||
}).compileComponents();
|
||||
imports: [ListComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
@@ -4,15 +4,33 @@ import {Show} from '../services/show';
|
||||
import {fade} from '../../../animations';
|
||||
import {ShowService} from '../services/show.service';
|
||||
import {FilterValues} from './filter/filter-values';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import { ActivatedRoute, RouterLink } from '@angular/router';
|
||||
import {map} from 'rxjs/operators';
|
||||
import { RoleDirective } from '../../../services/user/role.directive';
|
||||
import { ListHeaderComponent } from '../../../widget-modules/components/list-header/list-header.component';
|
||||
import { NgIf, NgFor, AsyncPipe } from '@angular/common';
|
||||
import { FilterComponent } from './filter/filter.component';
|
||||
import { CardComponent } from '../../../widget-modules/components/card/card.component';
|
||||
import { ListItemComponent } from './list-item/list-item.component';
|
||||
import { SortByPipe } from '../../../widget-modules/pipes/sort-by/sort-by.pipe';
|
||||
|
||||
@Component({
|
||||
selector: 'app-list',
|
||||
templateUrl: './list.component.html',
|
||||
styleUrls: ['./list.component.less'],
|
||||
animations: [fade],
|
||||
standalone: false,
|
||||
selector: 'app-list',
|
||||
templateUrl: './list.component.html',
|
||||
styleUrls: ['./list.component.less'],
|
||||
animations: [fade],
|
||||
imports: [
|
||||
RoleDirective,
|
||||
ListHeaderComponent,
|
||||
NgIf,
|
||||
FilterComponent,
|
||||
CardComponent,
|
||||
NgFor,
|
||||
ListItemComponent,
|
||||
RouterLink,
|
||||
AsyncPipe,
|
||||
SortByPipe,
|
||||
],
|
||||
})
|
||||
export class ListComponent {
|
||||
public shows$ = this.showService.list$();
|
||||
|
||||
Reference in New Issue
Block a user