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

@@ -6,6 +6,8 @@ import {
useViewportGrid,
} from '@ohif/ui';
import { ServicesManager } from '@ohif/core';
function LayoutSelector({
rows,
columns,
@@ -17,7 +19,10 @@ function LayoutSelector({
const [disableSelector, setDisableSelector] = useState(false);
const [viewportGridState, viewportGridService] = useViewportGrid();
const { HangingProtocolService, ToolBarService } = servicesManager.services;
const {
HangingProtocolService,
toolbarService,
} = (servicesManager as ServicesManager).services;
const closeOnOutsideClick = () => {
if (isOpen) {
@@ -61,7 +66,7 @@ function LayoutSelector({
// TODO Here the layout change will amount to a change of hanging protocol as specified by the extension for this layout selector tool
// followed by the change of the grid itself.
if (HangingProtocolService.getActiveProtocol().protocol.id === 'mpr') {
ToolBarService.recordInteraction({
toolbarService.recordInteraction({
groupId: 'MPR',
itemId: 'MPR',
interactionType: 'toggle',
@@ -104,6 +109,7 @@ LayoutSelector.propTypes = {
rows: PropTypes.number,
columns: PropTypes.number,
onLayoutChange: PropTypes.func,
servicesManager: PropTypes.instanceOf(ServicesManager),
};
LayoutSelector.defaultProps = {