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:
Bill WallaceandAlireza authored and GitHub committed 2023-02-07 14:31:55 -05:00
1 parent 0e1a58da79
commit 7f799b8e3d
55 files changed
+302 -233

No files matched your search

@@ -1,6 +1,7 @@
import merge from 'lodash.merge';
import { PubSubService } from '../_shared/pubSubServiceInterface';
import { Customization, NestedStrings, Obj } from './types';
import { CommandsManager } from '../../classes';
const EVENTS = {
MODE_CUSTOMIZATION_MODIFIED: 'event::CustomizationService:modeModified',
@@ -50,7 +51,14 @@ const flattenNestedStrings = (
* every module for the given id and to load it/add it to the extensions.
*/
export default class CustomizationService extends PubSubService {
commandsManager: Record<string, unknown>;
public static REGISTRATION = {
name: 'customizationService',
create: ({ configuration = {}, commandsManager }) => {
return new CustomizationService({ configuration, commandsManager });
},
};
commandsManager: CommandsManager;
extensionManager: Record<string, unknown>;
modeCustomizations: Record<string, Customization> = {};
@@ -1,11 +1,3 @@
import CustomizationService from './CustomizationService';
const CustomizationServiceRegistration = {
name: 'customizationService',
create: ({ configuration = {}, commandsManager }) => {
return new CustomizationService({ configuration, commandsManager });
},
};
export default CustomizationServiceRegistration;
export { CustomizationService, CustomizationServiceRegistration };
export default CustomizationService;