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:
@@ -71,7 +71,7 @@ describe('UploadBase', () => {
|
||||
|
||||
describe('beginUpload', () => {
|
||||
|
||||
it('should raise event', done => {
|
||||
it('should raise event', (done) => {
|
||||
spyOn(uploadService, 'addToQueue').and.stub();
|
||||
spyOn(uploadService, 'uploadFilesInTheQueue').and.stub();
|
||||
|
||||
@@ -86,7 +86,7 @@ describe('UploadBase', () => {
|
||||
spyOn(uploadService, 'uploadFilesInTheQueue').and.stub();
|
||||
|
||||
let prevented = false;
|
||||
component.beginUpload.subscribe(event => {
|
||||
component.beginUpload.subscribe((event) => {
|
||||
event.preventDefault();
|
||||
prevented = true;
|
||||
});
|
||||
@@ -105,7 +105,7 @@ describe('UploadBase', () => {
|
||||
|
||||
let prevented = false;
|
||||
let uploadEvent: UploadFilesEvent;
|
||||
component.beginUpload.subscribe(event => {
|
||||
component.beginUpload.subscribe((event) => {
|
||||
uploadEvent = event;
|
||||
event.preventDefault();
|
||||
prevented = true;
|
||||
@@ -132,7 +132,7 @@ describe('UploadBase', () => {
|
||||
spyOn(uploadService, 'uploadFilesInTheQueue').and.stub();
|
||||
|
||||
let uploadEvent: UploadFilesEvent;
|
||||
component.beginUpload.subscribe(event => {
|
||||
component.beginUpload.subscribe((event) => {
|
||||
uploadEvent = event;
|
||||
event.preventDefault();
|
||||
});
|
||||
|
@@ -95,7 +95,7 @@ export abstract class UploadBase implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.subscriptions.forEach(subscription => subscription.unsubscribe());
|
||||
this.subscriptions.forEach((subscription) => subscription.unsubscribe());
|
||||
this.subscriptions = [];
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ export abstract class UploadBase implements OnInit, OnDestroy {
|
||||
|
||||
const allowedExtensions = this.acceptedFilesType
|
||||
.split(',')
|
||||
.map(ext => ext.replace(/^\./, ''));
|
||||
.map((ext) => ext.replace(/^\./, ''));
|
||||
|
||||
if (allowedExtensions.indexOf(file.extension) !== -1) {
|
||||
return true;
|
||||
|
@@ -167,7 +167,7 @@ describe('UploadButtonComponent', () => {
|
||||
component.ngOnChanges({ rootFolderId: new SimpleChange(null, component.rootFolderId, true) });
|
||||
fixture.detectChanges();
|
||||
|
||||
component.success.subscribe(e => {
|
||||
component.success.subscribe((e) => {
|
||||
expect(e.value).toEqual('File uploaded');
|
||||
done();
|
||||
});
|
||||
|
@@ -119,8 +119,8 @@ export class UploadButtonComponent extends UploadBase implements OnInit, OnChang
|
||||
};
|
||||
|
||||
this.contentService.getNode(this.rootFolderId, opts).subscribe(
|
||||
res => this.permissionValue.next(this.nodeHasPermission(res.entry, PermissionsEnum.CREATE)),
|
||||
error => this.error.emit(error)
|
||||
(res) => this.permissionValue.next(this.nodeHasPermission(res.entry, PermissionsEnum.CREATE)),
|
||||
(error) => this.error.emit(error)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -84,7 +84,7 @@ export class UploadDragAreaComponent extends UploadBase implements NodePermissio
|
||||
*/
|
||||
onFolderEntityDropped(folder: any): void {
|
||||
if (!this.disabled && folder.isDirectory) {
|
||||
FileUtils.flatten(folder).then(filesInfo => {
|
||||
FileUtils.flatten(folder).then((filesInfo) => {
|
||||
this.uploadFilesInfo(filesInfo);
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user