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:
@@ -85,8 +85,8 @@ describe('PdfThumbListComponent', () => {
|
||||
fixture.nativeElement.scrollTop = 0;
|
||||
fixture.detectChanges();
|
||||
|
||||
const renderedIds = component.renderItems.map(item => item.id);
|
||||
const rangeIds = viewerMock._pages.slice(0, 6).map(item => item.id);
|
||||
const renderedIds = component.renderItems.map((item) => item.id);
|
||||
const rangeIds = viewerMock._pages.slice(0, 6).map((item) => item.id);
|
||||
|
||||
expect(renderedIds).toEqual(rangeIds);
|
||||
});
|
||||
@@ -96,8 +96,8 @@ describe('PdfThumbListComponent', () => {
|
||||
fixture.nativeElement.scrollTop = 700;
|
||||
fixture.detectChanges();
|
||||
|
||||
const renderedIds = component.renderItems.map(item => item.id);
|
||||
const rangeIds = viewerMock._pages.slice(5, 12).map(item => item.id);
|
||||
const renderedIds = component.renderItems.map((item) => item.id);
|
||||
const rangeIds = viewerMock._pages.slice(5, 12).map((item) => item.id);
|
||||
|
||||
expect(renderedIds).toEqual(rangeIds);
|
||||
});
|
||||
@@ -105,13 +105,13 @@ describe('PdfThumbListComponent', () => {
|
||||
it('should render items containing current document page', () => {
|
||||
fixture.detectChanges();
|
||||
|
||||
const renderedIds = component.renderItems.map(item => item.id);
|
||||
const renderedIds = component.renderItems.map((item) => item.id);
|
||||
|
||||
expect(renderedIds).not.toContain(10);
|
||||
|
||||
component.scrollInto(10);
|
||||
|
||||
const newRenderedIds = component.renderItems.map(item => item.id);
|
||||
const newRenderedIds = component.renderItems.map((item) => item.id);
|
||||
|
||||
expect(newRenderedIds).toContain(10);
|
||||
});
|
||||
@@ -120,14 +120,14 @@ describe('PdfThumbListComponent', () => {
|
||||
fixture.nativeElement.scrollTop = 1700;
|
||||
fixture.detectChanges();
|
||||
|
||||
const renderedIds = component.renderItems.map(item => item.id);
|
||||
const renderedIds = component.renderItems.map((item) => item.id);
|
||||
|
||||
expect(renderedIds).toContain(12);
|
||||
|
||||
/* cspell:disable-next-line */
|
||||
viewerMock.eventBus.dispatch('pagechange', { pageNumber: 12 });
|
||||
|
||||
const newRenderedIds = component.renderItems.map(item => item.id);
|
||||
const newRenderedIds = component.renderItems.map((item) => item.id);
|
||||
|
||||
expect(newRenderedIds).toContain(12);
|
||||
});
|
||||
|
@@ -251,7 +251,7 @@ describe('Test PdfViewer component', () => {
|
||||
let componentBlobTestComponent: BlobTestComponent;
|
||||
let elementBlobTestComponent: HTMLElement;
|
||||
|
||||
beforeEach(done => {
|
||||
beforeEach((done) => {
|
||||
fixtureBlobTestComponent = TestBed.createComponent(BlobTestComponent);
|
||||
componentBlobTestComponent = fixtureBlobTestComponent.componentInstance;
|
||||
elementBlobTestComponent = fixtureBlobTestComponent.nativeElement;
|
||||
|
@@ -417,7 +417,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
|
||||
disableClose: true,
|
||||
data: { reason }
|
||||
})
|
||||
.afterClosed().subscribe(password => {
|
||||
.afterClosed().subscribe((password) => {
|
||||
if (password) {
|
||||
callback(password);
|
||||
}
|
||||
|
@@ -58,7 +58,7 @@ export class TxtViewerComponent implements OnChanges {
|
||||
|
||||
private getUrlContent(url: string): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.http.get(url, { responseType: 'text' }).subscribe(res => {
|
||||
this.http.get(url, { responseType: 'text' }).subscribe((res) => {
|
||||
this.content = res;
|
||||
resolve();
|
||||
}, (event) => {
|
||||
|
@@ -569,7 +569,7 @@ describe('ViewerComponent', () => {
|
||||
component.fileName = 'fileName';
|
||||
fixture.detectChanges();
|
||||
|
||||
component.download.subscribe(e => {
|
||||
component.download.subscribe((e) => {
|
||||
expect(e).not.toBeNull();
|
||||
done();
|
||||
});
|
||||
@@ -617,7 +617,7 @@ describe('ViewerComponent', () => {
|
||||
component.allowPrint = true;
|
||||
fixture.detectChanges();
|
||||
|
||||
component.print.subscribe(e => {
|
||||
component.print.subscribe((e) => {
|
||||
expect(e).not.toBeNull();
|
||||
done();
|
||||
});
|
||||
@@ -665,7 +665,7 @@ describe('ViewerComponent', () => {
|
||||
component.allowShare = true;
|
||||
fixture.detectChanges();
|
||||
|
||||
component.share.subscribe(e => {
|
||||
component.share.subscribe((e) => {
|
||||
expect(e).not.toBeNull();
|
||||
done();
|
||||
});
|
||||
|
@@ -288,12 +288,12 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
|
||||
|
||||
ngOnInit() {
|
||||
this.subscriptions.push(
|
||||
this.apiService.nodeUpdated.subscribe(node => this.onNodeUpdated(node))
|
||||
this.apiService.nodeUpdated.subscribe((node) => this.onNodeUpdated(node))
|
||||
);
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.subscriptions.forEach(subscription => subscription.unsubscribe());
|
||||
this.subscriptions.forEach((subscription) => subscription.unsubscribe());
|
||||
this.subscriptions = [];
|
||||
}
|
||||
|
||||
@@ -335,7 +335,7 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
|
||||
} else if (this.sharedLinkId) {
|
||||
|
||||
this.apiService.sharedLinksApi.getSharedLink(this.sharedLinkId).then(
|
||||
details => {
|
||||
(details) => {
|
||||
this.setUpSharedLinkFile(details);
|
||||
this.isLoading = false;
|
||||
},
|
||||
@@ -710,10 +710,10 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
|
||||
|
||||
const supported = await this.apiService.renditionsApi.getRenditions(nodeId);
|
||||
|
||||
let rendition = supported.list.entries.find(obj => obj.entry.id.toLowerCase() === renditionId);
|
||||
let rendition = supported.list.entries.find((obj) => obj.entry.id.toLowerCase() === renditionId);
|
||||
if (!rendition) {
|
||||
renditionId = 'imgpreview';
|
||||
rendition = supported.list.entries.find(obj => obj.entry.id.toLowerCase() === renditionId);
|
||||
rendition = supported.list.entries.find((obj) => obj.entry.id.toLowerCase() === renditionId);
|
||||
}
|
||||
|
||||
if (rendition) {
|
||||
|
Reference in New Issue
Block a user