forked from MapComplete/MapComplete
Refactoring: use more accurate context in conversion, fix tests
This commit is contained in:
parent
86d0de3806
commit
f77d99f8ed
43 changed files with 999 additions and 367 deletions
|
@ -1,4 +1,4 @@
|
|||
import { TagRenderingConfigJson } from "./TagRenderingConfigJson"
|
||||
import { MinimalTagRenderingConfigJson, TagRenderingConfigJson } from "./TagRenderingConfigJson"
|
||||
import { TagConfigJson } from "./TagConfigJson"
|
||||
|
||||
export interface IconConfigJson {
|
||||
|
@ -7,13 +7,13 @@ export interface IconConfigJson {
|
|||
* type: icon
|
||||
* suggestions: return ["pin","square","circle","checkmark","clock","close","crosshair","help","home","invalid","location","location_empty","location_locked","note","resolved","ring","scissors","teardrop","teardrop_with_hole_green","triangle"].map(i => ({if: "value="+i, then: i, icon: i}))
|
||||
*/
|
||||
icon: string | TagRenderingConfigJson | { builtin: string; override: any }
|
||||
icon: string | MinimalTagRenderingConfigJson | { builtin: string; override: any }
|
||||
/**
|
||||
* question: What colour should the icon be?
|
||||
* This will only work for the default icons such as `pin`,`circle`,...
|
||||
* type: color
|
||||
*/
|
||||
color?: string | TagRenderingConfigJson | { builtin: string; override: any }
|
||||
color?: string | MinimalTagRenderingConfigJson | { builtin: string; override: any }
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -57,7 +57,7 @@ export default interface PointRenderingConfigJson {
|
|||
* Badge to show
|
||||
* Type: icon
|
||||
*/
|
||||
then: string | TagRenderingConfigJson
|
||||
then: string | MinimalTagRenderingConfigJson
|
||||
}[]
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { TagConfigJson } from "./TagConfigJson"
|
||||
import { TagRenderingConfigJson } from "./TagRenderingConfigJson"
|
||||
import type { Translatable } from "./Translatable"
|
||||
import { TagsFilter } from "../../../Logic/Tags/TagsFilter"
|
||||
|
||||
export interface MappingConfigJson {
|
||||
/**
|
||||
|
@ -244,6 +245,12 @@ export interface QuestionableTagRenderingConfigJson extends TagRenderingConfigJs
|
|||
* ifunset: do not prefill the textfield
|
||||
*/
|
||||
default?: string
|
||||
/**
|
||||
* question: What values of the freeform key should be interpreted as 'unknown'?
|
||||
* For example, if a feature has `shop=yes`, the question 'what type of shop is this?' should still asked
|
||||
* ifunset: The question will be considered answered if any value is set for the key
|
||||
*/
|
||||
invalidValues?: string[]
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue