mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 23:13:04 +00:00
dependency upgrades, server and platform module updates, linting wip
This commit is contained in:
40
src/modules/transfer-state/transfer-state.ts
Normal file
40
src/modules/transfer-state/transfer-state.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
import { Action } from '@ngrx/store';
|
||||
import { Store } from '@ngrx/store';
|
||||
|
||||
@Injectable()
|
||||
export class TransferState {
|
||||
|
||||
protected map = new Map<string, any>();
|
||||
|
||||
keys() {
|
||||
return this.map.keys();
|
||||
}
|
||||
|
||||
get(key: string): any {
|
||||
return this.map.get(key);
|
||||
}
|
||||
|
||||
set(key: string, value: any): Map<string, any> {
|
||||
return this.map.set(key, value);
|
||||
}
|
||||
|
||||
toJson(): any {
|
||||
const json: any = {};
|
||||
Array.from(this.keys())
|
||||
.forEach((key: string) => {
|
||||
json[key] = this.get(key);
|
||||
});
|
||||
return json;
|
||||
}
|
||||
|
||||
initialize(): void {
|
||||
console.log('Initialize does nothing!');
|
||||
}
|
||||
|
||||
inject(): void {
|
||||
console.log('Inject does nothing!');
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user