Lots of refactoring, first version of the import helper

This commit is contained in:
Pieter Vander Vennet 2022-01-19 20:34:04 +01:00
parent 612b8136ad
commit 3402ac0954
54 changed files with 1104 additions and 315 deletions

View file

@ -16,7 +16,7 @@ export default class QuestionBox extends VariableUiElement {
public readonly skippedQuestions: UIEventSource<number[]>;
public readonly restingQuestions: UIEventSource<BaseUIElement[]>;
constructor(options: {
constructor(state, options: {
tagsSource: UIEventSource<any>,
tagRenderings: TagRenderingConfig[], units: Unit[],
showAllQuestionsAtOnce?: boolean | UIEventSource<boolean>
@ -34,7 +34,7 @@ export default class QuestionBox extends VariableUiElement {
const tagRenderingQuestions = tagRenderings
.map((tagRendering, i) =>
new Lazy(() => new TagRenderingQuestion(tagsSource, tagRendering,
new Lazy(() => new TagRenderingQuestion(tagsSource, tagRendering, state,
{
units: units,
afterSave: () => {