Prettier upgrade and e2e type checks (#1522)

* upgrade prettier

* noImplicitAny rule

* fix type

* update tsconfig

* upgrade to 150 print width
This commit is contained in:
Denys Vuika
2020-07-14 10:03:23 +01:00
committed by GitHub
parent 32793ea7b0
commit ddc6f36ab4
339 changed files with 5170 additions and 8763 deletions

View File

@@ -25,14 +25,7 @@
import { NameColumnComponent } from '@alfresco/adf-content-services';
import { AlfrescoApiService } from '@alfresco/adf-core';
import {
ChangeDetectorRef,
Component,
ElementRef,
OnDestroy,
OnInit,
ViewEncapsulation
} from '@angular/core';
import { ChangeDetectorRef, Component, ElementRef, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
import { Actions, ofType } from '@ngrx/effects';
import { Subject } from 'rxjs';
import { filter, takeUntil } from 'rxjs/operators';
@@ -48,43 +41,35 @@ import { isLocked } from '@alfresco/aca-shared';
class: ' adf-datatable-content-cell adf-datatable-link adf-name-column'
}
})
export class CustomNameColumnComponent extends NameColumnComponent
implements OnInit, OnDestroy {
export class CustomNameColumnComponent extends NameColumnComponent implements OnInit, OnDestroy {
private onDestroy$$ = new Subject<boolean>();
constructor(
element: ElementRef,
private cd: ChangeDetectorRef,
private actions$: Actions,
private apiService: AlfrescoApiService
) {
constructor(element: ElementRef, private cd: ChangeDetectorRef, private actions$: Actions, private apiService: AlfrescoApiService) {
super(element, apiService);
}
ngOnInit() {
this.updateValue();
this.apiService.nodeUpdated
.pipe(takeUntil(this.onDestroy$$))
.subscribe((node: any) => {
const row = this.context.row;
if (row) {
const { entry } = row.node;
const currentId = entry.nodeId || entry.id;
const updatedId = node.nodeId || node.id;
this.apiService.nodeUpdated.pipe(takeUntil(this.onDestroy$$)).subscribe((node: any) => {
const row = this.context.row;
if (row) {
const { entry } = row.node;
const currentId = entry.nodeId || entry.id;
const updatedId = node.nodeId || node.id;
if (currentId === updatedId) {
entry.name = node.name;
row.node = { entry };
this.updateValue();
}
if (currentId === updatedId) {
entry.name = node.name;
row.node = { entry };
this.updateValue();
}
});
}
});
this.actions$
.pipe(
ofType<any>(NodeActionTypes.EditOffline),
filter(val => {
filter((val) => {
return this.node.entry.id === val.payload.entry.id;
}),
takeUntil(this.onDestroy$$)