Prettier code cleanup for .ts files

See #182
This commit is contained in:
Michael Shamoon
2022-03-11 10:53:32 -08:00
parent d56c9dc94b
commit bd4a705769
159 changed files with 3882 additions and 2716 deletions

View File

@@ -1,25 +1,24 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed } from '@angular/core/testing'
import { SelectComponent } from './select.component';
import { SelectComponent } from './select.component'
describe('SelectComponent', () => {
let component: SelectComponent;
let fixture: ComponentFixture<SelectComponent>;
let component: SelectComponent
let fixture: ComponentFixture<SelectComponent>
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ SelectComponent ]
})
.compileComponents();
});
declarations: [SelectComponent],
}).compileComponents()
})
beforeEach(() => {
fixture = TestBed.createComponent(SelectComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
fixture = TestBed.createComponent(SelectComponent)
component = fixture.componentInstance
fixture.detectChanges()
})
it('should create', () => {
expect(component).toBeTruthy();
});
});
expect(component).toBeTruthy()
})
})

View File

@@ -1,23 +1,30 @@
import { Component, EventEmitter, forwardRef, Input, Output } from '@angular/core';
import { NG_VALUE_ACCESSOR } from '@angular/forms';
import { AbstractInputComponent } from '../abstract-input';
import {
Component,
EventEmitter,
forwardRef,
Input,
Output,
} from '@angular/core'
import { NG_VALUE_ACCESSOR } from '@angular/forms'
import { AbstractInputComponent } from '../abstract-input'
@Component({
providers: [{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => SelectComponent),
multi: true
}],
providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => SelectComponent),
multi: true,
},
],
selector: 'app-input-select',
templateUrl: './select.component.html',
styleUrls: ['./select.component.scss']
styleUrls: ['./select.component.scss'],
})
export class SelectComponent extends AbstractInputComponent<number> {
constructor() {
super()
this.addItemRef = this.addItem.bind(this)
}
}
@Input()
items: any[]
@@ -47,7 +54,9 @@ export class SelectComponent extends AbstractInputComponent<number> {
getSuggestions() {
if (this.suggestions && this.items) {
return this.suggestions.filter(id => id != this.value).map(id => this.items.find(item => item.id == id))
return this.suggestions
.filter((id) => id != this.value)
.map((id) => this.items.find((item) => item.id == id))
} else {
return []
}
@@ -75,7 +84,6 @@ export class SelectComponent extends AbstractInputComponent<number> {
onBlur() {
setTimeout(() => {
this.clearLastSearchTerm()
}, 3000);
}, 3000)
}
}