This commit is contained in:
Ibrahim committed 2024-09-13 11:01:41 -04:00
1 parent 926f549e91
commit 118922f365
13 files changed
+271 -24

No files matched your search

+3
View File
@@ -34,6 +34,7 @@ import {
PanelService,
WorkflowStepsService,
StudyPrefetcherService,
OnboardingService,
} from './services';
import { DisplaySetMessage, DisplaySetMessageList } from './services/DisplaySetService';
@@ -87,6 +88,7 @@ const OHIF = {
useToolbar,
WorkflowStepsService,
StudyPrefetcherService,
OnboardingService,
};
export {
@@ -133,6 +135,7 @@ export {
PanelService,
WorkflowStepsService,
StudyPrefetcherService,
OnboardingService,
useToolbar,
};
@@ -0,0 +1,121 @@
const name = 'onboardingService';
const serviceImplementation = {
_showHints: () => console.warn('showHints() NOT IMPLEMENTED'),
_hideHints: () => console.warn('hideHints() NOT IMPLEMENTED'),
_startSteps: () => console.warn('startSteps() NOT IMPLEMENTED'),
_exitSteps: () => console.warn('exitSteps() NOT IMPLEMENTED'),
_nextStep: () => console.warn('nextStep() NOT IMPLEMENTED'),
_previousStep: () => console.warn('previousStep() NOT IMPLEMENTED'),
_setHints: hints => console.warn('setHints() NOT IMPLEMENTED'),
_setSteps: steps => console.warn('setSteps() NOT IMPLEMENTED'),
};
class OnboardingService {
static REGISTRATION = {
name,
altName: 'OnboardingService',
create: (): OnboardingService => {
return new OnboardingService();
},
};
readonly name = name;
/**
* Show hints dynamically
*/
showHints() {
return serviceImplementation._showHints();
}
/**
* Hide hints
*/
hideHints() {
return serviceImplementation._hideHints();
}
/**
* Start the step tour dynamically
*/
startSteps() {
return serviceImplementation._startSteps();
}
/**
* Exit the step tour
*/
exitSteps() {
return serviceImplementation._exitSteps();
}
/**
* Move to the next step in the tour
*/
nextStep() {
return serviceImplementation._nextStep();
}
/**
* Move to the previous step in the tour
*/
previousStep() {
return serviceImplementation._previousStep();
}
/**
* Dynamically set the hints
*/
setHints(hints) {
return serviceImplementation._setHints(hints);
}
/**
* Dynamically set the steps
*/
setSteps(steps) {
return serviceImplementation._setSteps(steps);
}
/**
* Sets the service implementation for hints and steps
*/
setServiceImplementation({
showHints: showHintsImplementation,
hideHints: hideHintsImplementation,
startSteps: startStepsImplementation,
exitSteps: exitStepsImplementation,
nextStep: nextStepImplementation,
previousStep: previousStepImplementation,
setHints: setHintsImplementation,
setSteps: setStepsImplementation,
}) {
if (showHintsImplementation) {
serviceImplementation._showHints = showHintsImplementation;
}
if (hideHintsImplementation) {
serviceImplementation._hideHints = hideHintsImplementation;
}
if (startStepsImplementation) {
serviceImplementation._startSteps = startStepsImplementation;
}
if (exitStepsImplementation) {
serviceImplementation._exitSteps = exitStepsImplementation;
}
if (nextStepImplementation) {
serviceImplementation._nextStep = nextStepImplementation;
}
if (previousStepImplementation) {
serviceImplementation._previousStep = previousStepImplementation;
}
if (setHintsImplementation) {
serviceImplementation._setHints = setHintsImplementation;
}
if (setStepsImplementation) {
serviceImplementation._setSteps = setStepsImplementation;
}
}
}
export default OnboardingService;
@@ -0,0 +1,3 @@
import OnboardingService from './OnboardingService';
export default OnboardingService;
+2
View File
@@ -18,6 +18,7 @@ import StateSyncService from './StateSyncService';
import PanelService from './PanelService';
import WorkflowStepsService from './WorkflowStepsService';
import StudyPrefetcherService from './StudyPrefetcherService';
import OnboardingService from './OnboardingService';
import type Services from '../types/Services';
@@ -44,4 +45,5 @@ export {
PanelService,
WorkflowStepsService,
StudyPrefetcherService,
OnboardingService,
};
+3
View File
@@ -15,6 +15,7 @@ import PanelServiceType from '../services/PanelService';
import UIDialogServiceType from '../services/UIDialogService';
import UIViewportDialogServiceType from '../services/UIViewportDialogService';
import StudyPrefetcherServiceType from '../services/StudyPrefetcherService';
import onboardingServiceType from '../services/OnboardingService';
import ServicesManagerType from '../services/ServicesManager';
import CommandsManagerType from '../classes/CommandsManager';
@@ -43,6 +44,7 @@ declare global {
export type UIViewportDialogService = UIViewportDialogServiceType;
export type PanelService = PanelServiceType;
export type StudyPrefetcherService = StudyPrefetcherServiceType;
export type OnboardingService = onboardingServiceType;
export interface Managers {
servicesManager?: ServicesManager;
@@ -67,6 +69,7 @@ declare global {
uiViewportDialogService?: UIViewportDialogServiceType;
panelService?: PanelServiceType;
studyPrefetcherService?: StudyPrefetcherServiceType;
onboardingService?: onboardingServiceType;
}
export interface Config {
routerBasename?: string;
+2
View File
@@ -14,6 +14,7 @@ import {
PanelService,
UIDialogService,
UIViewportDialogService,
OnboardingService,
} from '../services';
/**
@@ -36,6 +37,7 @@ interface Services {
uiDialogService?: UIDialogService;
uiViewportDialogService?: UIViewportDialogService;
panelService?: PanelService;
onboardingService?: OnboardingService;
}
export default Services;