Small bugfix in import helper
This commit is contained in:
parent
5857471be3
commit
d80cc64f77
3 changed files with 4 additions and 16 deletions
|
@ -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[],
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue