1+ import { DefinitionWalker } from 'sequential-workflow-model' ;
12import { DefinitionValidator } from './core/definition-validator' ;
23import { IconProvider } from './core/icon-provider' ;
3- import { I18n , StepsConfiguration , ValidatorConfiguration } from './designer-configuration' ;
4+ import { DesignerConfiguration , I18n , PreferenceStorage } from './designer-configuration' ;
45import { PlaceholderController } from './designer-extension' ;
56import { DesignerState } from './designer-state' ;
67import { Services } from './services' ;
@@ -9,26 +10,38 @@ import { StepExtensionResolver } from './workspace/step-extension-resolver';
910
1011export class ComponentContext {
1112 public static create (
12- stepsConfiguration : StepsConfiguration ,
13- validatorConfiguration : ValidatorConfiguration | undefined ,
13+ configuration : DesignerConfiguration ,
1414 state : DesignerState ,
1515 stepExtensionResolver : StepExtensionResolver ,
16+ definitionWalker : DefinitionWalker ,
17+ preferenceStorage : PreferenceStorage ,
1618 i18n : I18n ,
1719 services : Services
1820 ) : ComponentContext {
19- const validator = new DefinitionValidator ( validatorConfiguration , state ) ;
20- const iconProvider = new IconProvider ( stepsConfiguration ) ;
21+ const validator = new DefinitionValidator ( configuration . validator , state ) ;
22+ const iconProvider = new IconProvider ( configuration . steps ) ;
2123 const placeholderController = services . placeholderController . create ( ) ;
2224 const stepComponentFactory = new StepComponentFactory ( stepExtensionResolver ) ;
23- return new ComponentContext ( validator , iconProvider , placeholderController , stepComponentFactory , i18n , services ) ;
25+ return new ComponentContext (
26+ validator ,
27+ iconProvider ,
28+ placeholderController ,
29+ stepComponentFactory ,
30+ definitionWalker ,
31+ services ,
32+ preferenceStorage ,
33+ i18n
34+ ) ;
2435 }
2536
2637 private constructor (
2738 public readonly validator : DefinitionValidator ,
2839 public readonly iconProvider : IconProvider ,
2940 public readonly placeholderController : PlaceholderController ,
3041 public readonly stepComponentFactory : StepComponentFactory ,
31- public readonly i18n : I18n ,
32- public readonly services : Services
42+ public readonly definitionWalker : DefinitionWalker ,
43+ public readonly services : Services ,
44+ public readonly preferenceStorage : PreferenceStorage ,
45+ public readonly i18n : I18n
3346 ) { }
3447}
0 commit comments