fix: Create typed services and allow lower case access to agree with naming conventions (#3141)
* fix: Add typed services * fix: Typed services - PR changes * remaining of the cineService and toolbarService renaming --------- Co-authored-by: Alireza <ar.sedghi@gmail.com>
This commit is contained in:
1 parent
0e1a58da79
commit
7f799b8e3d
55 files changed
+302
-233
No files matched your search
+13
-8
@@ -1,4 +1,4 @@
|
||||
import pubSubServiceInterface from '../_shared/pubSubServiceInterface';
|
||||
import { PubSubService } from '../_shared/pubSubServiceInterface';
|
||||
import EVENTS from './EVENTS';
|
||||
|
||||
const displaySetCache = [];
|
||||
@@ -28,16 +28,21 @@ const findInstance = (instance, displaySets) => {
|
||||
return false;
|
||||
};
|
||||
|
||||
export default class DisplaySetService {
|
||||
constructor() {
|
||||
this.activeDisplaySets = [];
|
||||
this.listeners = {};
|
||||
this.EVENTS = EVENTS;
|
||||
export default class DisplaySetService extends PubSubService {
|
||||
public static REGISTRATION = {
|
||||
altName: 'DisplaySetService',
|
||||
name: 'displaySetService',
|
||||
create: ({ configuration = {} }) => {
|
||||
return new DisplaySetService();
|
||||
},
|
||||
};
|
||||
|
||||
Object.assign(this, pubSubServiceInterface);
|
||||
public activeDisplaySets = [];
|
||||
constructor() {
|
||||
super(EVENTS);
|
||||
}
|
||||
|
||||
init(extensionManager, SOPClassHandlerIds) {
|
||||
public init(extensionManager, SOPClassHandlerIds): void {
|
||||
this.extensionManager = extensionManager;
|
||||
this.SOPClassHandlerIds = SOPClassHandlerIds;
|
||||
this.activeDisplaySets = [];
|
||||
@@ -1,8 +0,0 @@
|
||||
import DisplaySetService from './DisplaySetService';
|
||||
|
||||
export default {
|
||||
name: 'DisplaySetService',
|
||||
create: ({ configuration = {} }) => {
|
||||
return new DisplaySetService();
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
import DisplaySetService from './DisplaySetService';
|
||||
|
||||
export default DisplaySetService;
|
||||
Reference in new issue
Block a user