From d80cc64f776580e5160967b2aa2d57d488f97b4e Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Wed, 6 Apr 2022 04:21:15 +0200 Subject: [PATCH] Small bugfix in import helper --- UI/ImportFlow/AskMetadata.ts | 11 ----------- UI/ImportFlow/ConflationChecker.ts | 4 ++-- UI/ImportFlow/ImportHelperGui.ts | 5 ++--- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/UI/ImportFlow/AskMetadata.ts b/UI/ImportFlow/AskMetadata.ts index 975d0e6d9..9f7c16caf 100644 --- a/UI/ImportFlow/AskMetadata.ts +++ b/UI/ImportFlow/AskMetadata.ts @@ -4,19 +4,8 @@ import {UIEventSource} from "../../Logic/UIEventSource"; import ValidatedTextField from "../Input/ValidatedTextField"; import {LocalStorageSource} from "../../Logic/Web/LocalStorageSource"; import Title from "../Base/Title"; -import {AllKnownLayouts} from "../../Customizations/AllKnownLayouts"; -import {DropDown} from "../Input/DropDown"; -import LayerConfig from "../../Models/ThemeConfig/LayerConfig"; -import BaseUIElement from "../BaseUIElement"; import {FixedUiElement} from "../Base/FixedUiElement"; -import {RadioButton} from "../Input/RadioButton"; -import {FixedInputElement} from "../Input/FixedInputElement"; -import LayoutConfig from "../../Models/ThemeConfig/LayoutConfig"; -import {InputElement} from "../Input/InputElement"; -import Img from "../Base/Img"; import {VariableUiElement} from "../Base/VariableUIElement"; -import {And} from "../../Logic/Tags/And"; -import Toggleable from "../Base/Toggleable"; export class AskMetadata extends Combine implements FlowStep<{ features: any[], diff --git a/UI/ImportFlow/ConflationChecker.ts b/UI/ImportFlow/ConflationChecker.ts index 192442043..f0a3f17c9 100644 --- a/UI/ImportFlow/ConflationChecker.ts +++ b/UI/ImportFlow/ConflationChecker.ts @@ -35,7 +35,7 @@ import {ImportUtils} from "./ImportUtils"; export default class ConflationChecker extends Combine implements FlowStep<{ features: any[], theme: string }> { public readonly IsValid - public readonly Value + public readonly Value: UIEventSource<{ features: any[], theme: string }> constructor( state, @@ -249,7 +249,7 @@ export default class ConflationChecker extends Combine implements FlowStep<{ fea ]) - this.Value = paritionedImport.map(feats => ({features: feats?.noNearby, layer: params.layer})) + this.Value = paritionedImport.map(feats => ({theme: params.theme, features: feats?.noNearby, layer: params.layer})) this.IsValid = this.Value.map(v => v?.features !== undefined && v.features.length > 0) } diff --git a/UI/ImportFlow/ImportHelperGui.ts b/UI/ImportFlow/ImportHelperGui.ts index b577c6cfd..8fb1c041b 100644 --- a/UI/ImportFlow/ImportHelperGui.ts +++ b/UI/ImportFlow/ImportHelperGui.ts @@ -10,7 +10,6 @@ import {RequestFile} from "./RequestFile"; import {PreviewPanel} from "./PreviewPanel"; import ConflationChecker from "./ConflationChecker"; import {AskMetadata} from "./AskMetadata"; -import LayerConfig from "../../Models/ThemeConfig/LayerConfig"; import {ConfirmProcess} from "./ConfirmProcess"; import {CreateNotes} from "./CreateNotes"; import {FixedUiElement} from "../Base/FixedUiElement"; @@ -38,8 +37,8 @@ export default class ImportHelperGui extends LeftIndex { .then("Select theme", v => new SelectTheme(v)) .then("Compare with open notes", v => new CompareToAlreadyExistingNotes(state, v)) .then("Compare with existing data", v => new ConflationChecker(state, v)) - .then("License and community check", (v : {features: any[], theme: string}) => new ConfirmProcess(v)) - .then("Metadata", (v: { features: any[], layer: LayerConfig, theme: string }) => new AskMetadata(v)) + .then("License and community check", v => new ConfirmProcess(v)) + .then("Metadata", (v) => new AskMetadata(v)) .finish("Note creation", v => new CreateNotes(state, v)); const toc = new List(