Feature(distancePicker): revive geographical distance picker

This commit is contained in:
Pieter Vander Vennet 2025-04-08 02:42:30 +02:00
parent e997653284
commit 5095bffc50
16 changed files with 245 additions and 107 deletions

View file

@ -1,10 +1,7 @@
import { DesugaringStep } from "./Conversion"
import { TagRenderingConfigJson } from "../Json/TagRenderingConfigJson"
import { LayerConfigJson } from "../Json/LayerConfigJson"
import {
MappingConfigJson,
QuestionableTagRenderingConfigJson,
} from "../Json/QuestionableTagRenderingConfigJson"
import { MappingConfigJson, QuestionableTagRenderingConfigJson } from "../Json/QuestionableTagRenderingConfigJson"
import { ConversionContext } from "./ConversionContext"
import { Translation } from "../../../UI/i18n/Translation"
import { TagUtils } from "../../../Logic/Tags/TagUtils"
@ -216,6 +213,14 @@ export class MiscTagRenderingChecks extends DesugaringStep<TagRenderingConfigJso
"No need to explicitly set type to 'NSI', autodetected based on freeform type"
)
}
if (json.freeform["type"] && json.freeform["helperArgs"]) {
const validator = Validators.get(json.freeform["type"])
const feedback = validator?.validateArguments(json.freeform["helperArgs"])
if (feedback) {
context.enters("freeform", "helperArgs").err(feedback)
}
}
}
if (json.render && json["question"] && json.freeform === undefined) {
context.err(