This commit is contained in:
Ibrahim committed 2024-09-22 20:30:00 -04:00
1 parent 331778dfef
commit eba85aa5b3
15 files changed
+391 -360

No files matched your search

@@ -1,82 +0,0 @@
const name = 'onboardingService';
const serviceImplementation = {
_startTour: () => console.warn('startTour() NOT IMPLEMENTED'),
_exitTour: () => console.warn('exitTour() NOT IMPLEMENTED'),
_nextStep: () => console.warn('nextStep() NOT IMPLEMENTED'),
_previousStep: () => console.warn('previousStep() NOT IMPLEMENTED'),
_initializeTour: (steps, tourOptions) => console.warn('initializeTour() NOT IMPLEMENTED'),
};
class OnboardingService {
static REGISTRATION = {
name,
altName: 'OnboardingService',
create: (): OnboardingService => {
return new OnboardingService();
},
};
readonly name = name;
/**
* Initialize the step tour
*/
initializeTour(steps, tourOptions = {}) {
return serviceImplementation._initializeTour(steps, tourOptions);
}
/**
* Start the step tour
*/
startTour() {
return serviceImplementation._startTour();
}
/**
* Exit the step tour
*/
exitTour() {
return serviceImplementation._exitTour();
}
/**
* Move to the next step in the tour
*/
nextStep() {
return serviceImplementation._nextStep();
}
/**
* Move to the previous step in the tour
*/
previousStep() {
return serviceImplementation._previousStep();
}
setServiceImplementation({
initializeTour: initializeTourImplementation,
startTour: startStepsImplementation,
exitTour: exitStepsImplementation,
nextStep: nextStepImplementation,
previousStep: previousStepImplementation,
}) {
if (initializeTourImplementation) {
serviceImplementation._initializeTour = initializeTourImplementation;
}
if (startStepsImplementation) {
serviceImplementation._startTour = startStepsImplementation;
}
if (exitStepsImplementation) {
serviceImplementation._exitTour = exitStepsImplementation;
}
if (nextStepImplementation) {
serviceImplementation._nextStep = nextStepImplementation;
}
if (previousStepImplementation) {
serviceImplementation._previousStep = previousStepImplementation;
}
}
}
export default OnboardingService;
@@ -1,3 +0,0 @@
import OnboardingService from './OnboardingService';
export default OnboardingService;
-2
View File
@@ -18,7 +18,6 @@ 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';
@@ -45,5 +44,4 @@ export {
PanelService,
WorkflowStepsService,
StudyPrefetcherService,
OnboardingService,
};