feat(typings): Enhance typing support with withAppTypes and custom services throughout OHIF (#4090)
This commit is contained in:
1 parent
b2cd0172d6
commit
374065bc3b
153 files changed
+842
-657
No files matched your search
@@ -10,7 +10,12 @@ import { Toolbar } from '../Toolbar/Toolbar';
|
||||
|
||||
const { availableLanguages, defaultLanguage, currentLanguage } = i18n;
|
||||
|
||||
function ViewerHeader({ hotkeysManager, extensionManager, servicesManager, appConfig }) {
|
||||
function ViewerHeader({
|
||||
hotkeysManager,
|
||||
extensionManager,
|
||||
servicesManager,
|
||||
appConfig,
|
||||
}: withAppTypes) {
|
||||
const navigate = useNavigate();
|
||||
const location = useLocation();
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { useEffect, useState, useCallback } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { ErrorBoundary, LoadingIndicatorProgress, InvestigationalUseDialog } from '@ohif/ui';
|
||||
import { ServicesManager, HangingProtocolService, CommandsManager } from '@ohif/core';
|
||||
import { HangingProtocolService, CommandsManager } from '@ohif/core';
|
||||
import { useAppConfig } from '@state';
|
||||
import ViewerHeader from './ViewerHeader';
|
||||
import SidePanelWithServices from '../Components/SidePanelWithServices';
|
||||
@@ -18,7 +18,7 @@ function ViewerLayout({
|
||||
ViewportGridComp,
|
||||
leftPanelClosed = false,
|
||||
rightPanelClosed = false,
|
||||
}): React.FunctionComponent {
|
||||
}: withAppTypes): React.FunctionComponent {
|
||||
const [appConfig] = useAppConfig();
|
||||
|
||||
const { panelService, hangingProtocolService } = servicesManager.services;
|
||||
@@ -167,7 +167,7 @@ ViewerLayout.propTypes = {
|
||||
getModuleEntry: PropTypes.func.isRequired,
|
||||
}).isRequired,
|
||||
commandsManager: PropTypes.instanceOf(CommandsManager),
|
||||
servicesManager: PropTypes.instanceOf(ServicesManager),
|
||||
servicesManager: PropTypes.object.isRequired,
|
||||
// From modes
|
||||
leftPanels: PropTypes.array,
|
||||
rightPanels: PropTypes.array,
|
||||
|
||||
Reference in new issue
Block a user