mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
tslint arrow-parens rule (#4003)
This commit is contained in:
@@ -63,7 +63,7 @@ export class CardViewItemDispatcherComponent implements OnChanges {
|
||||
'ngOnDestroy'
|
||||
];
|
||||
|
||||
dynamicLifeCycleMethods.forEach(method => {
|
||||
dynamicLifeCycleMethods.forEach((method) => {
|
||||
this[method] = this.proxy.bind(this, method);
|
||||
});
|
||||
}
|
||||
@@ -75,7 +75,7 @@ export class CardViewItemDispatcherComponent implements OnChanges {
|
||||
}
|
||||
|
||||
Object.keys(changes)
|
||||
.map(changeName => [changeName, changes[changeName]])
|
||||
.map((changeName) => [changeName, changes[changeName]])
|
||||
.forEach(([inputParamName, simpleChange]: [string, SimpleChange]) => {
|
||||
this.componentReference.instance[inputParamName] = simpleChange.currentValue;
|
||||
});
|
||||
|
@@ -65,7 +65,7 @@ export class CardViewKeyValuePairsItemComponent implements OnChanges {
|
||||
}
|
||||
|
||||
save(remove?: boolean): void {
|
||||
const validValues = this.values.filter(i => i.name.length && i.value.length);
|
||||
const validValues = this.values.filter((i) => i.name.length && i.value.length);
|
||||
|
||||
if (remove || validValues.length) {
|
||||
this.cardViewUpdateService.update(this.property, validValues);
|
||||
|
@@ -50,7 +50,7 @@ export abstract class CardViewBaseItemModel {
|
||||
}
|
||||
|
||||
return this.validators
|
||||
.map(validator => validator.isValid(newValue))
|
||||
.map((validator) => validator.isValid(newValue))
|
||||
.reduce((isValidUntilNow, isValid) => isValidUntilNow && isValid, true);
|
||||
}
|
||||
|
||||
@@ -59,6 +59,6 @@ export abstract class CardViewBaseItemModel {
|
||||
return [];
|
||||
}
|
||||
|
||||
return this.validators.filter(validator => !validator.isValid(value)).map(validator => validator.message);
|
||||
return this.validators.filter((validator) => !validator.isValid(value)).map((validator) => validator.message);
|
||||
}
|
||||
}
|
||||
|
@@ -38,7 +38,7 @@ describe('CardViewSelectItemModel', () => {
|
||||
it('should return the value if it is present', async(() => {
|
||||
const itemModel = new CardViewSelectItemModel(properties);
|
||||
|
||||
itemModel.displayValue.subscribe(value => {
|
||||
itemModel.displayValue.subscribe((value) => {
|
||||
expect(value).toBe(mockData[1].label);
|
||||
});
|
||||
}));
|
||||
|
@@ -34,8 +34,8 @@ export class CardViewSelectItemModel<T> extends CardViewBaseItemModel implements
|
||||
|
||||
get displayValue() {
|
||||
return this.options$.pipe(
|
||||
switchMap(options => {
|
||||
const option = options.find(o => o.key === this.value);
|
||||
switchMap((options) => {
|
||||
const option = options.find((o) => o.key === this.value);
|
||||
return of(option ? option.label : '');
|
||||
})
|
||||
);
|
||||
|
Reference in New Issue
Block a user