mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-12 12:33:07 +00:00
ESLint: fix dangling commas
This commit is contained in:
@@ -47,7 +47,7 @@ export class ItemBitstreamsComponent extends AbstractItemUpdateComponent impleme
|
||||
bundlesOptions = {
|
||||
id: 'bundles-pagination-options',
|
||||
currentPage: 1,
|
||||
pageSize: 9999
|
||||
pageSize: 9999,
|
||||
} as any;
|
||||
|
||||
/**
|
||||
@@ -61,7 +61,7 @@ export class ItemBitstreamsComponent extends AbstractItemUpdateComponent impleme
|
||||
// Format column
|
||||
new ResponsiveColumnSizes(2, 2, 2, 2, 2),
|
||||
// Actions column
|
||||
new ResponsiveColumnSizes(6, 5, 4, 3, 3)
|
||||
new ResponsiveColumnSizes(6, 5, 4, 3, 3),
|
||||
]);
|
||||
|
||||
/**
|
||||
@@ -88,7 +88,7 @@ export class ItemBitstreamsComponent extends AbstractItemUpdateComponent impleme
|
||||
public requestService: RequestService,
|
||||
public cdRef: ChangeDetectorRef,
|
||||
public bundleService: BundleDataService,
|
||||
public zone: NgZone
|
||||
public zone: NgZone,
|
||||
) {
|
||||
super(itemService, objectUpdatesService, router, notificationsService, translateService, route);
|
||||
}
|
||||
@@ -100,7 +100,7 @@ export class ItemBitstreamsComponent extends AbstractItemUpdateComponent impleme
|
||||
this.bundles$ = this.itemService.getBundles(this.item.id, new PaginatedSearchOptions({pagination: this.bundlesOptions})).pipe(
|
||||
getFirstSucceededRemoteData(),
|
||||
getRemoteDataPayload(),
|
||||
map((bundlePage: PaginatedList<Bundle>) => bundlePage.page)
|
||||
map((bundlePage: PaginatedList<Bundle>) => bundlePage.page),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -124,12 +124,12 @@ export class ItemBitstreamsComponent extends AbstractItemUpdateComponent impleme
|
||||
// Fetch all removed bitstreams from the object update service
|
||||
const removedBitstreams$ = bundlesOnce$.pipe(
|
||||
switchMap((bundles: Bundle[]) => observableZip(
|
||||
...bundles.map((bundle: Bundle) => this.objectUpdatesService.getFieldUpdates(bundle.self, [], true))
|
||||
...bundles.map((bundle: Bundle) => this.objectUpdatesService.getFieldUpdates(bundle.self, [], true)),
|
||||
)),
|
||||
map((fieldUpdates: FieldUpdates[]) => ([] as FieldUpdate[]).concat(
|
||||
...fieldUpdates.map((updates: FieldUpdates) => Object.values(updates).filter((fieldUpdate: FieldUpdate) => fieldUpdate.changeType === FieldChangeType.REMOVE))
|
||||
...fieldUpdates.map((updates: FieldUpdates) => Object.values(updates).filter((fieldUpdate: FieldUpdate) => fieldUpdate.changeType === FieldChangeType.REMOVE)),
|
||||
)),
|
||||
map((fieldUpdates: FieldUpdate[]) => fieldUpdates.map((fieldUpdate: FieldUpdate) => fieldUpdate.field))
|
||||
map((fieldUpdates: FieldUpdate[]) => fieldUpdates.map((fieldUpdate: FieldUpdate) => fieldUpdate.field)),
|
||||
);
|
||||
|
||||
// Send out delete requests for all deleted bitstreams
|
||||
@@ -137,7 +137,7 @@ export class ItemBitstreamsComponent extends AbstractItemUpdateComponent impleme
|
||||
take(1),
|
||||
switchMap((removedBitstreams: Bitstream[]) => {
|
||||
return this.bitstreamService.removeMultiple(removedBitstreams);
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
// Perform the setup actions from above in order and display notifications
|
||||
@@ -160,7 +160,7 @@ export class ItemBitstreamsComponent extends AbstractItemUpdateComponent impleme
|
||||
const moveOperation = {
|
||||
op: 'move',
|
||||
from: `/_links/bitstreams/${event.fromIndex}/href`,
|
||||
path: `/_links/bitstreams/${event.toIndex}/href`
|
||||
path: `/_links/bitstreams/${event.toIndex}/href`,
|
||||
} as Operation;
|
||||
this.bundleService.patch(bundle, [moveOperation]).pipe(take(1)).subscribe((response: RemoteData<Bundle>) => {
|
||||
this.zone.run(() => {
|
||||
@@ -168,7 +168,7 @@ export class ItemBitstreamsComponent extends AbstractItemUpdateComponent impleme
|
||||
// Remove all cached requests from this bundle and call the event's callback when the requests are cleared
|
||||
this.requestService.removeByHrefSubstring(bundle.self).pipe(
|
||||
filter((isCached) => isCached),
|
||||
take(1)
|
||||
take(1),
|
||||
).subscribe(() => event.finish());
|
||||
});
|
||||
});
|
||||
@@ -223,7 +223,7 @@ export class ItemBitstreamsComponent extends AbstractItemUpdateComponent impleme
|
||||
isReinstatable(): Observable<boolean> {
|
||||
return this.bundles$.pipe(
|
||||
switchMap((bundles: Bundle[]) => observableZip(...bundles.map((bundle: Bundle) => this.objectUpdatesService.isReinstatable(bundle.self)))),
|
||||
map((reinstatable: boolean[]) => reinstatable.includes(true))
|
||||
map((reinstatable: boolean[]) => reinstatable.includes(true)),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ export class ItemBitstreamsComponent extends AbstractItemUpdateComponent impleme
|
||||
hasChanges(): Observable<boolean> {
|
||||
return this.bundles$.pipe(
|
||||
switchMap((bundles: Bundle[]) => observableZip(...bundles.map((bundle: Bundle) => this.objectUpdatesService.hasUpdates(bundle.self)))),
|
||||
map((hasChanges: boolean[]) => hasChanges.includes(true))
|
||||
map((hasChanges: boolean[]) => hasChanges.includes(true)),
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user