Merge branch 'develop' into feature/nsi

This commit is contained in:
Robin van der Linde 2024-05-07 11:08:44 +02:00
commit 22c2f5166d
Signed by untrusted user: Robin-van-der-Linde
GPG key ID: 53956B3252478F0D
116 changed files with 5653 additions and 1538 deletions

View file

@ -2,10 +2,15 @@ import { ImmutableStore, Store, UIEventSource } from "../UIEventSource"
import LayoutConfig from "../../Models/ThemeConfig/LayoutConfig"
import { LocalStorageSource } from "../Web/LocalStorageSource"
import { QueryParameters } from "../Web/QueryParameters"
import Hash from "../Web/Hash"
import OsmObjectDownloader from "../Osm/OsmObjectDownloader"
import { OsmObject } from "../Osm/OsmObject"
import Constants from "../../Models/Constants"
/**
* This actor is responsible to set the map location.
* It will attempt to
* - Set the map to the position of the selected element
* - Set the map to the position as passed in by the query parameters (if available)
* - Set the map to the position remembered in LocalStorage (if available)
* - Set the map to the layout default
@ -16,6 +21,7 @@ export default class InitialMapPositioning {
public zoom: UIEventSource<number>
public location: UIEventSource<{ lon: number; lat: number }>
public useTerrain: Store<boolean>
constructor(layoutToUse: LayoutConfig) {
function localStorageSynced(
key: string,
@ -38,6 +44,8 @@ export default class InitialMapPositioning {
return src
}
const initialHash = Hash.hash.data
// -- Location control initialization
this.zoom = localStorageSynced(
"z",
@ -62,5 +70,19 @@ export default class InitialMapPositioning {
lon.setData(loc.lon)
})
this.useTerrain = new ImmutableStore<boolean>(layoutToUse.enableTerrain)
if (initialHash?.match(/^(node|way|relation)\/[0-9]+$/)) {
const [type, id] = initialHash.split("/")
OsmObjectDownloader.RawDownloadObjectAsync(type, Number(id), Constants.osmAuthConfig.url + "/").then(osmObject => {
if (osmObject === "deleted") {
return
}
const targetLayer = layoutToUse.getMatchingLayer(osmObject.tags)
this.zoom.setData(Math.max(this.zoom.data, targetLayer.minzoom))
const [lat, lon] = osmObject.centerpoint()
this.location.setData({ lon, lat })
})
}
}
}

View file

@ -127,7 +127,9 @@ export abstract class OsmObject {
return result
}
// The centerpoint of the feature, as [lat, lon]
/** The centerpoint of the feature, as [lat, lon]
*
*/
public abstract centerpoint(): [number, number]
public abstract asGeoJson(): any

View file

@ -62,7 +62,7 @@ export default class OsmObjectDownloader {
if (idN < 0) {
obj = this.constructObject(<"node" | "way" | "relation">type, idN)
} else {
obj = await this.RawDownloadObjectAsync(type, idN, maxCacheAgeInSecs)
obj = await OsmObjectDownloader.RawDownloadObjectAsync(type, idN, this.backend, maxCacheAgeInSecs)
}
if (obj === "deleted") {
return obj
@ -211,13 +211,22 @@ export default class OsmObjectDownloader {
}
}
private async RawDownloadObjectAsync(
/**
* Only to be used in exceptional cases
* @param type
* @param idN
* @param backend
* @param maxCacheAgeInSecs
* @constructor
*/
public static async RawDownloadObjectAsync(
type: string,
idN: number,
backend: string,
maxCacheAgeInSecs?: number
): Promise<OsmObject | "deleted"> {
const full = type !== "node" ? "/full" : ""
const url = `${this.backend}api/0.6/${type}/${idN}${full}`
const url = `${backend}api/0.6/${type}/${idN}${full}`
const rawData = await Utils.downloadJsonCachedAdvanced(
url,
(maxCacheAgeInSecs ?? 10) * 1000
@ -227,7 +236,7 @@ export default class OsmObjectDownloader {
}
// A full query might contain more then just the requested object (e.g. nodes that are part of a way, where we only want the way)
const parsed = OsmObject.ParseObjects(rawData["content"].elements)
// Lets fetch the object we need
// Let us fetch the object we need
for (const osmObject of parsed) {
if (osmObject.type !== type) {
continue

View file

@ -435,7 +435,7 @@ export default class SimpleMetaTaggers {
() => feature.properties["_country"]
)
let canonical =
denomination?.canonicalValue(value, defaultDenom == denomination) ??
denomination?.canonicalValue(value, defaultDenom == denomination, unit.inverted) ??
undefined
if (canonical === value) {
break

View file

@ -331,6 +331,9 @@ export default class LinkedDataLoader {
return
}
output[key] = output[key].map((v) => applyF(v))
if(!output[key].some(v => v !== undefined)){
delete output[key]
}
}
function asBoolean(key: string, invert: boolean = false) {
@ -379,6 +382,7 @@ export default class LinkedDataLoader {
}
return "€" + Number(p)
})
if (output["charge"] && output["timeUnit"]) {
const duration =
Number(output["chargeEnd"] ?? "1") - Number(output["chargeStart"] ?? "0")

View file

@ -1,6 +1,7 @@
import { Translation, TypedTranslation } from "../UI/i18n/Translation"
import { DenominationConfigJson } from "./ThemeConfig/Json/UnitConfigJson"
import Translations from "../UI/i18n/Translations"
import { Validator } from "../UI/InputElement/Validator"
/**
* A 'denomination' is one way to write a certain quantity.
@ -15,6 +16,7 @@ export class Denomination {
public readonly alternativeDenominations: string[]
public readonly human: TypedTranslation<{ quantity: string }>
public readonly humanSingular?: Translation
private readonly _validator: Validator
private constructor(
canonical: string,
@ -24,7 +26,8 @@ export class Denomination {
addSpace: boolean,
alternativeDenominations: string[],
_human: TypedTranslation<{ quantity: string }>,
_humanSingular?: Translation
_humanSingular: Translation,
validator: Validator
) {
this.canonical = canonical
this._canonicalSingular = _canonicalSingular
@ -34,9 +37,10 @@ export class Denomination {
this.alternativeDenominations = alternativeDenominations
this.human = _human
this.humanSingular = _humanSingular
this._validator = validator
}
public static fromJson(json: DenominationConfigJson, context: string) {
public static fromJson(json: DenominationConfigJson, validator: Validator, context: string) {
context = `${context}.unit(${json.canonicalDenomination})`
const canonical = json.canonicalDenomination.trim()
if (canonical === undefined) {
@ -68,7 +72,8 @@ export class Denomination {
json.addSpace ?? false,
json.alternativeDenomination?.map((v) => v.trim()) ?? [],
humanTexts,
Translations.T(json.humanSingular, context + "humanSingular")
Translations.T(json.humanSingular, context + "humanSingular"),
validator
)
}
@ -81,7 +86,8 @@ export class Denomination {
this.addSpace,
this.alternativeDenominations,
this.human,
this.humanSingular
this.humanSingular,
this._validator
)
}
@ -94,7 +100,8 @@ export class Denomination {
this.addSpace,
[this.canonical, ...this.alternativeDenominations],
this.human,
this.humanSingular
this.humanSingular,
this._validator
)
}
@ -103,19 +110,21 @@ export class Denomination {
* @param value the value from OSM
* @param actAsDefault if set and the value can be parsed as number, will be parsed and trimmed
*
* import Validators from "../UI/InputElement/Validators"
*
* const unit = Denomination.fromJson({
* canonicalDenomination: "m",
* alternativeDenomination: ["meter"],
* human: {
* en: "{quantity} meter"
* }
* }, "test")
* unit.canonicalValue("42m", true) // =>"42 m"
* unit.canonicalValue("42", true) // =>"42 m"
* unit.canonicalValue("42 m", true) // =>"42 m"
* unit.canonicalValue("42 meter", true) // =>"42 m"
* unit.canonicalValue("42m", true) // =>"42 m"
* unit.canonicalValue("42", true) // =>"42 m"
* }, Validators.get("float"), "test")
* unit.canonicalValue("42m", true, false) // =>"42 m"
* unit.canonicalValue("42", true, false) // =>"42 m"
* unit.canonicalValue("42 m", true, false) // =>"42 m"
* unit.canonicalValue("42 meter", true, false) // =>"42 m"
* unit.canonicalValue("42m", true, false) // =>"42 m"
* unit.canonicalValue("42", true, false) // =>"42 m"
*
* // Should be trimmed if canonical is empty
* const unit = Denomination.fromJson({
@ -124,22 +133,26 @@ export class Denomination {
* human: {
* en: "{quantity} meter"
* }
* }, "test")
* unit.canonicalValue("42m", true) // =>"42"
* unit.canonicalValue("42", true) // =>"42"
* unit.canonicalValue("42 m", true) // =>"42"
* unit.canonicalValue("42 meter", true) // =>"42"
* }, Validators.get("float"), "test")
* unit.canonicalValue("42m", true, false) // =>"42"
* unit.canonicalValue("42", true, false) // =>"42"
* unit.canonicalValue("42 m", true, false) // =>"42"
* unit.canonicalValue("42 meter", true, false) // =>"42"
*
*
*/
public canonicalValue(value: string, actAsDefault: boolean): string {
public canonicalValue(value: string, actAsDefault: boolean, inverted: boolean): string {
if (value === undefined) {
return undefined
}
const stripped = this.StrippedValue(value, actAsDefault)
const stripped = this.StrippedValue(value, actAsDefault, inverted)
if (stripped === null) {
return null
}
if(inverted){
return (stripped + "/" + this.canonical).trim()
}
if (stripped === "1" && this._canonicalSingular !== undefined) {
return ("1 " + this._canonicalSingular).trim()
}
@ -153,8 +166,8 @@ export class Denomination {
*
* Returns null if it doesn't match this unit
*/
public StrippedValue(value: string, actAsDefault: boolean): string {
if (value === undefined) {
public StrippedValue(value: string, actAsDefault: boolean, inverted: boolean): string {
if (value === undefined || value === "") {
return undefined
}
@ -171,10 +184,16 @@ export class Denomination {
function substr(key) {
if (self.prefix) {
return value.substr(key.length).trim()
} else {
return value.substring(0, value.length - key.length).trim()
return value.substring(key.length).trim()
}
let trimmed = value.substring(0, value.length - key.length).trim()
if(!inverted){
return trimmed
}
if(trimmed.endsWith("/")){
trimmed = trimmed.substring(0, trimmed.length - 1).trim()
}
return trimmed
}
if (this.canonical !== "" && startsWith(this.canonical.toLowerCase())) {
@ -199,11 +218,13 @@ export class Denomination {
return null
}
const parsed = Number(value.trim())
if (!isNaN(parsed)) {
return value.trim()
if(!this._validator.isValid(value.trim())){
return null
}
return this._validator.reformat(value.trim())
}
return null
withValidator(validator: Validator) {
return new Denomination(this.canonical, this._canonicalSingular, this.useIfNoUnitGiven, this.prefix, this.addSpace, this.alternativeDenominations, this.human, this.humanSingular, validator)
}
}

View file

@ -519,6 +519,7 @@ export interface LayerConfigJson {
/**
* Either a list with [{"key": "unitname", "key2": {"quantity": "unitname", "denominations": ["denom", "denom"]}}]
*
* Use `"inverted": true` if the amount should be _divided_ by the denomination, e.g. for charge over time (`€5/day`)
*
* @see UnitConfigJson
*
@ -526,7 +527,7 @@ export interface LayerConfigJson {
*/
units?: (
| UnitConfigJson
| Record<string, string | { quantity: string; denominations: string[]; canonical?: string }>
| Record<string, string | { quantity: string; denominations: string[]; canonical?: string, inverted?: boolean }>
)[]
/**

View file

@ -229,6 +229,7 @@ export interface QuestionableTagRenderingConfigJson extends TagRenderingConfigJs
* A (translated) text that is shown (as gray text) within the textfield
* type: translation
* group: expert
* ifunset: No specific placeholder is set, show the type of the textfield
*/
placeholder?: Translatable

View file

@ -88,7 +88,7 @@ export interface TagRenderingConfigJson {
*
* question: When should this item be shown?
* type: tag
* ifunset: No specific condition set; always show this tagRendering or ask the question if unkown
* ifunset: No specific condition set; always show this tagRendering or show this question if unknown
*
* Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.
*
@ -132,9 +132,10 @@ export interface TagRenderingConfigJson {
/** question: When should this item be shown (including special conditions)?
* type: tag
* ifunset: No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown
*
* If set, this tag will be evaluated agains the _usersettings/application state_ table.
* Enable 'show debug info' in user settings to see available options.
* If set, this tag will be evaluated against the _usersettings/application state_ table.
* Enable 'show debug info' in user settings to see available options (at the settings-tab).
* Note that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_
*/
metacondition?: TagConfigJson

View file

@ -97,18 +97,6 @@ export default class LayerConfig extends WithContextLoader {
this.allowSplit = json.allowSplit ?? false
this.name = Translations.T(json.name, translationContext + ".name")
if (json.units !== undefined && !Array.isArray(json.units)) {
throw (
"At " +
context +
".units: the 'units'-section should be a list; you probably have an object there"
)
}
this.units = [].concat(
...(json.units ?? []).map((unitJson, i) =>
Unit.fromJson(unitJson, `${context}.unit[${i}]`)
)
)
if (json.description !== undefined) {
if (Object.keys(json.description).length === 0) {
@ -280,6 +268,18 @@ export default class LayerConfig extends WithContextLoader {
this.id + ".tagRenderings[" + i + "]"
)
)
if (json.units !== undefined && !Array.isArray(json.units)) {
throw (
"At " +
context +
".units: the 'units'-section should be a list; you probably have an object there"
)
}
this.units = [].concat(
...(json.units ?? []).map((unitJson, i) =>
Unit.fromJson(unitJson, this.tagRenderings,`${context}.unit[${i}]`)
)
)
if (
json.filter !== undefined &&

View file

@ -2,6 +2,10 @@ import BaseUIElement from "../UI/BaseUIElement"
import { Denomination } from "./Denomination"
import UnitConfigJson from "./ThemeConfig/Json/UnitConfigJson"
import unit from "../../assets/layers/unit/unit.json"
import { QuestionableTagRenderingConfigJson } from "./ThemeConfig/Json/QuestionableTagRenderingConfigJson"
import TagRenderingConfig from "./ThemeConfig/TagRenderingConfig"
import Validators, { ValidatorType } from "../UI/InputElement/Validators"
import { Validator } from "../UI/InputElement/Validator"
export class Unit {
private static allUnits = this.initUnits()
@ -10,14 +14,20 @@ export class Unit {
public readonly denominationsSorted: Denomination[]
public readonly eraseInvalid: boolean
public readonly quantity: string
private readonly _validator: Validator
public readonly inverted: boolean
constructor(
quantity: string,
appliesToKeys: string[],
applicableDenominations: Denomination[],
eraseInvalid: boolean
eraseInvalid: boolean,
validator: Validator,
inverted: boolean = false
) {
this.quantity = quantity
this._validator = validator
this.inverted = inverted
this.appliesToKeys = new Set(appliesToKeys)
this.denominations = applicableDenominations
this.eraseInvalid = eraseInvalid
@ -66,13 +76,47 @@ export class Unit {
static fromJson(
json:
| UnitConfigJson
| Record<string, string | { quantity: string; denominations: string[] }>,
| Record<string, string | { quantity: string; denominations: string[], inverted?: boolean }>,
tagRenderings: TagRenderingConfig[],
ctx: string
): Unit[] {
if (!json.appliesToKey && !json.quantity) {
return this.loadFromLibrary(<any>json, ctx)
let types: Record<string, ValidatorType> = {}
for (const tagRendering of tagRenderings) {
if (tagRendering.freeform?.type) {
types[tagRendering.freeform.key] = tagRendering.freeform.type
}
}
return [this.parse(<UnitConfigJson>json, ctx)]
if (!json.appliesToKey && !json.quantity) {
return this.loadFromLibrary(<any>json, types, ctx)
}
return this.parse(<UnitConfigJson>json, types, ctx)
}
private static parseDenomination(json: UnitConfigJson, validator: Validator, appliesToKey: string, ctx: string): Unit {
const applicable = json.applicableUnits.map((u, i) =>
Denomination.fromJson(u, validator, `${ctx}.units[${i}]`)
)
if (
json.defaultInput &&
!applicable.some((denom) => denom.canonical.trim() === json.defaultInput)
) {
throw `${ctx}: no denomination has the specified default denomination. The default denomination is '${
json.defaultInput
}', but the available denominations are ${applicable
.map((denom) => denom.canonical)
.join(", ")}`
}
return new Unit(
json.quantity ?? "",
appliesToKey === undefined ? undefined : [appliesToKey],
applicable,
json.eraseInvalidValues ?? false,
validator
)
}
/**
@ -113,7 +157,7 @@ export class Unit {
* ]
* }, "test")
*/
private static parse(json: UnitConfigJson, ctx: string): Unit {
private static parse(json: UnitConfigJson, types: Record<string, ValidatorType>, ctx: string): Unit[] {
const appliesTo = json.appliesToKey
for (let i = 0; i < (appliesTo ?? []).length; i++) {
let key = appliesTo[i]
@ -127,32 +171,22 @@ export class Unit {
}
// Some keys do have unit handling
const applicable = json.applicableUnits.map((u, i) =>
Denomination.fromJson(u, `${ctx}.units[${i}]`)
)
if (
json.defaultInput &&
!applicable.some((denom) => denom.canonical.trim() === json.defaultInput)
) {
throw `${ctx}: no denomination has the specified default denomination. The default denomination is '${
json.defaultInput
}', but the available denominations are ${applicable
.map((denom) => denom.canonical)
.join(", ")}`
const units: Unit[] = []
if (appliesTo === undefined) {
units.push(this.parseDenomination(json, Validators.get("float"), undefined, ctx))
}
return new Unit(
json.quantity ?? "",
appliesTo,
applicable,
json.eraseInvalidValues ?? false
)
for (const key of appliesTo ?? []) {
const validator = Validators.get(types[key] ?? "float")
units.push(this.parseDenomination(json, validator, undefined, ctx))
}
return units
}
private static initUnits(): Map<string, Unit> {
const m = new Map<string, Unit>()
const units = (<UnitConfigJson[]>unit.units).map((json, i) =>
this.parse(json, "unit.json.units." + i)
const units = (<UnitConfigJson[]>unit.units).flatMap((json, i) =>
this.parse(json, {}, "unit.json.units." + i)
)
for (const unit of units) {
@ -179,17 +213,19 @@ export class Unit {
private static loadFromLibrary(
spec: Record<
string,
string | { quantity: string; denominations: string[]; canonical?: string }
string | { quantity: string; denominations: string[]; canonical?: string, inverted?: boolean }
>,
types: Record<string, ValidatorType>,
ctx: string
): Unit[] {
const units: Unit[] = []
for (const key in spec) {
const toLoad = spec[key]
const validator = Validators.get(types[key] ?? "float")
if (typeof toLoad === "string") {
const loaded = this.getFromLibrary(toLoad, ctx)
units.push(
new Unit(loaded.quantity, [key], loaded.denominations, loaded.eraseInvalid)
new Unit(loaded.quantity, [key], loaded.denominations, loaded.eraseInvalid, validator, toLoad["inverted"])
)
continue
}
@ -213,12 +249,13 @@ export class Unit {
const denoms = toLoad.denominations
.map((d) => d.toLowerCase())
.map((d) => fetchDenom(d))
.map(d => d.withValidator(validator))
if (toLoad.canonical) {
const canonical = fetchDenom(toLoad.canonical)
const canonical = fetchDenom(toLoad.canonical).withValidator(validator)
denoms.unshift(canonical.withBlankCanonical())
}
units.push(new Unit(loaded.quantity, [key], denoms, loaded.eraseInvalid))
units.push(new Unit(loaded.quantity, [key], denoms, loaded.eraseInvalid, validator, toLoad["inverted"]))
}
return units
}
@ -240,7 +277,7 @@ export class Unit {
}
const defaultDenom = this.getDefaultDenomination(country)
for (const denomination of this.denominationsSorted) {
const bare = denomination.StrippedValue(valueWithDenom, defaultDenom === denomination)
const bare = denomination.StrippedValue(valueWithDenom, defaultDenom === denomination, this.inverted)
if (bare !== null) {
return [bare, denomination]
}
@ -253,10 +290,13 @@ export class Unit {
return undefined
}
const [stripped, denom] = this.findDenomination(value, country)
const human = denom?.human
if(this.inverted ){
return human.Subs({quantity: stripped+"/"})
}
if (stripped === "1") {
return denom?.humanSingular ?? stripped
}
const human = denom?.human
if (human === undefined) {
return stripped ?? value
}
@ -266,6 +306,10 @@ export class Unit {
public toOsm(value: string, denomination: string) {
const denom = this.denominations.find((d) => d.canonical === denomination)
if(this.inverted){
return value+"/"+denom._canonicalSingular
}
const space = denom.addSpace ? " " : ""
if (denom.prefix) {
return denom.canonical + space + value
@ -273,7 +317,7 @@ export class Unit {
return value + space + denom.canonical
}
public getDefaultDenomination(country: () => string) {
public getDefaultDenomination(country: () => string): Denomination {
for (const denomination of this.denominations) {
if (denomination.useIfNoUnitGiven === true) {
return denomination

View file

@ -0,0 +1,55 @@
<script lang="ts">
import ExtraLinkConfig from "../../Models/ThemeConfig/ExtraLinkConfig"
import Locale from "../i18n/Locale"
import { Utils } from "../../Utils"
import Translations from "../i18n/Translations"
import type { SpecialVisualizationState } from "../SpecialVisualization"
import Pop_out from "../../assets/svg/Pop_out.svelte"
import Tr from "../Base/Tr.svelte"
import Icon from "../Map/Icon.svelte"
export let state: SpecialVisualizationState
let theme = state.layout?.id ?? ""
let config: ExtraLinkConfig = state.layout.extraLink
const isIframe = window !== window.top
let basepath = window.location.host
let showWelcomeMessageSwitch = state.featureSwitches.featureSwitchWelcomeMessage
const t = Translations.t.general
const href = state.mapProperties.location.map(
(loc) => {
const subs = {
...loc,
theme: theme,
basepath,
language: Locale.language.data
}
return Utils.SubstituteKeys(config.href, subs)
},
[state.mapProperties.zoom]
)
</script>
{#if config !== undefined &&
!(config.requirements.has("iframe") && !isIframe) &&
!(config.requirements.has("no-iframe") && isIframe) &&
!(config.requirements.has("welcome-message") && !$showWelcomeMessageSwitch) &&
!(config.requirements.has("no-welcome-message") && $showWelcomeMessageSwitch)}
<div class="links-as-button">
<a href={$href} target={config.newTab ? "_blank" : ""} rel="noopener"
class="flex pointer-events-auto rounded-full border-black">
<Icon icon={config.icon} clss="w-6 h-6 m-2"/>
{#if config.text}
<Tr t={config.text} />
{:else}
<Tr t={t.screenToSmall.Subs({theme: state.layout.title})} />
{/if}
</a>
</div>
{/if}

View file

@ -1,101 +0,0 @@
import { UIElement } from "../UIElement"
import BaseUIElement from "../BaseUIElement"
import { Store } from "../../Logic/UIEventSource"
import ExtraLinkConfig from "../../Models/ThemeConfig/ExtraLinkConfig"
import Img from "../Base/Img"
import { SubtleButton } from "../Base/SubtleButton"
import Toggle from "../Input/Toggle"
import Locale from "../i18n/Locale"
import { Utils } from "../../Utils"
import Svg from "../../Svg"
import Translations from "../i18n/Translations"
import { Translation } from "../i18n/Translation"
interface ExtraLinkButtonState {
layout: { id: string; title: Translation }
featureSwitches: { featureSwitchWelcomeMessage: Store<boolean> }
mapProperties: {
location: Store<{ lon: number; lat: number }>
zoom: Store<number>
}
}
export default class ExtraLinkButton extends UIElement {
private readonly _config: ExtraLinkConfig
private readonly state: ExtraLinkButtonState
constructor(state: ExtraLinkButtonState, config: ExtraLinkConfig) {
super()
this.state = state
this._config = config
}
protected InnerRender(): BaseUIElement {
if (this._config === undefined) {
return undefined
}
const c = this._config
const isIframe = window !== window.top
if (c.requirements?.has("iframe") && !isIframe) {
return undefined
}
if (c.requirements?.has("no-iframe") && isIframe) {
return undefined
}
let link: BaseUIElement
const theme = this.state.layout?.id ?? ""
const basepath = window.location.host
const href = this.state.mapProperties.location.map(
(loc) => {
const subs = {
...loc,
theme: theme,
basepath,
language: Locale.language.data,
}
return Utils.SubstituteKeys(c.href, subs)
},
[this.state.mapProperties.zoom]
)
let img: BaseUIElement = Svg.pop_out_svg()
if (c.icon !== undefined) {
img = new Img(c.icon).SetClass("h-6")
}
let text: Translation
if (c.text === undefined) {
text = Translations.t.general.screenToSmall.Subs({
theme: this.state.layout.title,
})
} else {
text = c.text.Clone()
}
link = new SubtleButton(img, text, {
url: href,
newTab: c.newTab,
})
if (c.requirements?.has("no-welcome-message")) {
link = new Toggle(
undefined,
link,
this.state.featureSwitches.featureSwitchWelcomeMessage
)
}
if (c.requirements?.has("welcome-message")) {
link = new Toggle(
link,
undefined,
this.state.featureSwitches.featureSwitchWelcomeMessage
)
}
return link
}
}

View file

@ -91,11 +91,6 @@
return
}
if (unit !== undefined && isNaN(Number(v))) {
value.setData(undefined)
return
}
feedback?.setData(undefined)
if (selectedUnit.data) {
value.setData(unit.toOsm(v, selectedUnit.data))

View file

@ -34,6 +34,7 @@
import { LinkIcon } from "@babeard/svelte-heroicons/mini"
import Square_rounded from "../../assets/svg/Square_rounded.svelte"
import Bug from "../../assets/svg/Bug.svelte"
import Pop_out from "../../assets/svg/Pop_out.svelte"
/**
* Renders a single icon.
@ -123,6 +124,9 @@
<AddSmall {color} class={clss} />
{:else if icon === "link"}
<LinkIcon style="--svg-color: {color}" class={twMerge(clss, "apply-fill")} />
{:else if icon === "popout"}
<LinkIcon style="--svg-color: {color}" />
{:else}
<img class={clss ?? "h-full w-full"} src={icon} aria-hidden="true" alt="" />
{/if}

View file

@ -188,7 +188,7 @@ export default abstract class ImportFlow<ArgT extends ImportFlowArguments> {
return { error: new Translation({ "*": e }) }
}
if (state.mapProperties.zoom.data < 18) {
if (state.mapProperties.zoom.data < 16) {
return { error: t.zoomInMore }
}

View file

@ -79,7 +79,7 @@
console.log("Applying questions to ask")
const qta = questionsToAsk.data
firstQuestion.setData(undefined)
allQuestionsToAsk.setData([])
//allQuestionsToAsk.setData([])
await Utils.awaitAnimationFrame()
firstQuestion.setData(qta[0])
allQuestionsToAsk.setData(qta)

View file

@ -36,6 +36,7 @@
export let config: TagRenderingConfig
export let tags: UIEventSource<Record<string, string>>
export let selectedElement: Feature
export let state: SpecialVisualizationState
export let layer: LayerConfig | undefined
@ -71,6 +72,8 @@
/**
* Prepares and fills the checkedMappings
*/
console.log("Initing ", config.id)
function initialize(tgs: Record<string, string>, confg: TagRenderingConfig): void {
mappings = confg.mappings?.filter((m) => {
if (typeof m.hideInAnswer === "boolean") {
@ -139,11 +142,33 @@
feedback.setData(undefined)
}
$: {
// Even though 'config' is not declared as a store, Svelte uses it as one to update the component
// We want to (re)-initialize whenever the 'tags' or 'config' change - but not when 'checkedConfig' changes
initialize($tags, config)
}
let usedKeys: string[] = config.usedTags().flatMap((t) => t.usedKeys())
/**
* The 'minimalTags' is a subset of the tags of the feature, only containing the values relevant for this object.
* The main goal is to be stable and only 'ping' when an actual change is relevant
*/
let minimalTags = new UIEventSource<Record<string, string>>(undefined)
tags.addCallbackAndRunD((tags) => {
const previousMinimal = minimalTags.data
const newMinimal: Record<string, string> = {}
let somethingChanged = previousMinimal === undefined
for (const key of usedKeys) {
const newValue = tags[key]
somethingChanged ||= previousMinimal?.[key] !== newValue
if (newValue !== undefined && newValue !== null) {
newMinimal[key] = newValue
}
}
if (somethingChanged) {
console.log("Updating minimal tags to", newMinimal, "of", config.id)
minimalTags.setData(newMinimal)
}
})
minimalTags.addCallbackAndRunD((tgs) => {
initialize(tgs, config)
})
onDestroy(
freeformInput.subscribe((freeformValue) => {
if (!mappings || mappings?.length == 0 || config.freeform?.key === undefined) {
@ -180,6 +205,19 @@
checkedMappings,
tags.data
)
if (state.featureSwitches.featureSwitchIsDebugging.data) {
console.log(
"Constructing change spec from",
{
freeform: $freeformInput,
selectedMapping,
checkedMappings,
currentTags: tags.data,
},
" --> ",
selectedTags
)
}
} catch (e) {
console.error("Could not calculate changeSpecification:", e)
selectedTags = undefined
@ -210,7 +248,7 @@
if (layer === undefined || (layer?.source === null && layer.id !== "favourite")) {
/**
* This is a special, priviliged layer.
* This is a special, privileged layer.
* We simply apply the tags onto the records
*/
const kv = selectedTags.asChange(tags.data)

View file

@ -64,10 +64,14 @@
)
</script>
{#if unit.inverted}
<div class="bold px-2">/</div>
{/if}
<select bind:value={$selectedUnit}>
{#each unit.denominations as denom (denom.canonical)}
<option value={denom.canonical}>
{#if $isSingle}
{#if $isSingle || unit.inverted}
<Tr t={denom.humanSingular} />
{:else}
<Tr t={denom.human.Subs({ quantity: "" })} />

View file

@ -11,7 +11,7 @@
export let configs: ConfigMeta[]
export let title: string | undefined = undefined
export let path: (string | number)[] = []
export let path: readonly (string | number)[] = []
let expertMode = state.expertMode
let configsNoHidden = configs.filter((schema) => schema.hints?.group !== "hidden")
@ -21,9 +21,9 @@
</script>
{#if configs === undefined}
Bug: 'Region' received 'undefined'
Bug: 'Region' received 'undefined' at {path.join(".")}
{:else if configs.length === 0}
Bug: Region received empty list as configuration
Bug: Region received empty list as configuration at {path.join(".")}
{:else if title}
<div class="flex w-full flex-col">
<h3>{title}</h3>

View file

@ -7,7 +7,7 @@
import type { ConfigMeta } from "./configMeta"
import type {
MappingConfigJson,
QuestionableTagRenderingConfigJson,
QuestionableTagRenderingConfigJson
} from "../../Models/ThemeConfig/Json/QuestionableTagRenderingConfigJson"
import TagRenderingConfig from "../../Models/ThemeConfig/TagRenderingConfig"
import TagRenderingEditable from "../Popup/TagRendering/TagRenderingEditable.svelte"
@ -59,8 +59,8 @@
labelMapping = {
if: "value=" + label,
then: {
en: "Builtin collection <b>" + label + "</b>:",
},
en: "Builtin collection <b>" + label + "</b>:"
}
}
perLabel[label] = labelMapping
mappingsBuiltin.push(labelMapping)
@ -72,14 +72,14 @@
mappingsBuiltin.push({
if: "value=" + tr["id"],
then: {
en: "Builtin <b>" + tr["id"] + "</b> <div class='subtle'>" + description + "</div>",
},
en: "Builtin <b>" + tr["id"] + "</b> <div class='subtle'>" + description + "</div>"
}
})
}
const configBuiltin = new TagRenderingConfig(<QuestionableTagRenderingConfigJson>{
question: "Which builtin element should be shown?",
mappings: mappingsBuiltin,
mappings: mappingsBuiltin
})
const tags = new UIEventSource({ value })
@ -112,7 +112,7 @@
"condition",
"metacondition",
"mappings",
"icon",
"icon"
])
const ignored = new Set(["labels", "description", "classes"])
@ -196,7 +196,10 @@
<h3>Text field and input element configuration</h3>
<div class="border-l border-dashed border-gray-800 pl-2">
<SchemaBasedField {state} path={[...path, "render"]} schema={topLevelItems["render"]} />
<Region {state} {path} configs={freeformSchema} />
{#if freeformSchema?.length > 0}
<!-- In read-only cases, (e.g. popup title) there will be no freeform-schema to set and thus freeformSchema will be undefined -->
<Region {state} {path} configs={freeformSchema} />
{/if}
<SchemaBasedField {state} path={[...path, "icon"]} schema={topLevelItems["icon"]} />
</div>

View file

@ -34,7 +34,6 @@
import { Utils } from "../Utils"
import Hotkeys from "./Base/Hotkeys"
import LevelSelector from "./BigComponents/LevelSelector.svelte"
import ExtraLinkButton from "./BigComponents/ExtraLinkButton"
import SelectedElementTitle from "./BigComponents/SelectedElementTitle.svelte"
import ThemeIntroPanel from "./BigComponents/ThemeIntroPanel.svelte"
import type { RasterLayerPolygon } from "../Models/RasterLayers"
@ -73,6 +72,7 @@
import PrivacyPolicy from "./BigComponents/PrivacyPolicy.svelte"
import { BBox } from "../Logic/BBox"
import ReviewsOverview from "./Reviews/ReviewsOverview.svelte"
import ExtraLinkButton from "./BigComponents/ExtraLinkButton.svelte"
export let state: ThemeViewState
let layout = state.layout
@ -260,9 +260,7 @@
/>
</MapControlButton>
{/if}
<ToSvelte
construct={() => new ExtraLinkButton(state, layout.extraLink).SetClass("pointer-events-auto")}
/>
<ExtraLinkButton {state} />
<UploadingImageCounter featureId="*" showThankYou={false} {state} />
<PendingChangesIndicator {state} />
<If condition={state.featureSwitchIsTesting}>

View file

@ -263,6 +263,9 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
return res
}
public static NoNull<T>(array: T[] | undefined): (T[] | undefined)
public static NoNull<T>(array: undefined): undefined
public static NoNull<T>(array: T[]): T[]
public static NoNull<T>(array: T[]): NonNullable<T>[] {
return <any>array?.filter((o) => o !== undefined && o !== null)
}
@ -1039,7 +1042,14 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
Utils._download_cache.set(url, { promise, timestamp: new Date().getTime() })
return await promise
}
public static async downloadJson(
url: string,
headers?: Record<string, string>
): Promise<object | []>
public static async downloadJson<T>(
url: string,
headers?: Record<string, string>
): Promise<T>
public static async downloadJson(
url: string,
headers?: Record<string, string>

File diff suppressed because one or more lines are too long

View file

@ -445,7 +445,7 @@
]
},
"condition": {
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or show this question if unknown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -459,7 +459,7 @@
]
},
"metacondition": {
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\nifunset: No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown\n\nIf set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -672,7 +672,7 @@
"hints": {
"typehint": "tag",
"question": "When should this item be shown?",
"ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown"
"ifunset": "No specific condition set; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -763,7 +763,8 @@
"required": false,
"hints": {
"typehint": "tag",
"question": "When should this item be shown (including special conditions)?"
"question": "When should this item be shown (including special conditions)?",
"ifunset": "No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -776,7 +777,7 @@
"type": "string"
}
],
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
"description": "If set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
},
{
"path": [
@ -1225,7 +1226,7 @@
"hints": {
"typehint": "tag",
"question": "When should this item be shown?",
"ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown"
"ifunset": "No specific condition set; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -1316,7 +1317,8 @@
"required": false,
"hints": {
"typehint": "tag",
"question": "When should this item be shown (including special conditions)?"
"question": "When should this item be shown (including special conditions)?",
"ifunset": "No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -1329,7 +1331,7 @@
"type": "string"
}
],
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
"description": "If set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
},
{
"path": [
@ -2373,7 +2375,7 @@
]
},
"condition": {
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or show this question if unknown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -2387,7 +2389,7 @@
]
},
"metacondition": {
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\nifunset: No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown\n\nIf set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -2605,7 +2607,7 @@
"hints": {
"typehint": "tag",
"question": "When should this item be shown?",
"ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown"
"ifunset": "No specific condition set; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -2699,7 +2701,8 @@
"required": false,
"hints": {
"typehint": "tag",
"question": "When should this item be shown (including special conditions)?"
"question": "When should this item be shown (including special conditions)?",
"ifunset": "No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -2712,7 +2715,7 @@
"type": "string"
}
],
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
"description": "If set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
},
{
"path": [
@ -3074,7 +3077,7 @@
]
},
"condition": {
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or show this question if unknown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -3088,7 +3091,7 @@
]
},
"metacondition": {
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\nifunset: No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown\n\nIf set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -3306,7 +3309,7 @@
"hints": {
"typehint": "tag",
"question": "When should this item be shown?",
"ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown"
"ifunset": "No specific condition set; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -3400,7 +3403,8 @@
"required": false,
"hints": {
"typehint": "tag",
"question": "When should this item be shown (including special conditions)?"
"question": "When should this item be shown (including special conditions)?",
"ifunset": "No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -3413,7 +3417,7 @@
"type": "string"
}
],
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
"description": "If set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
},
{
"path": [
@ -3753,7 +3757,7 @@
]
},
"condition": {
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or show this question if unknown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -3767,7 +3771,7 @@
]
},
"metacondition": {
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\nifunset: No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown\n\nIf set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -3985,7 +3989,7 @@
"hints": {
"typehint": "tag",
"question": "When should this item be shown?",
"ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown"
"ifunset": "No specific condition set; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -4079,7 +4083,8 @@
"required": false,
"hints": {
"typehint": "tag",
"question": "When should this item be shown (including special conditions)?"
"question": "When should this item be shown (including special conditions)?",
"ifunset": "No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -4092,7 +4097,7 @@
"type": "string"
}
],
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
"description": "If set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
},
{
"path": [
@ -4434,7 +4439,7 @@
]
},
"condition": {
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or show this question if unknown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -4448,7 +4453,7 @@
]
},
"metacondition": {
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\nifunset: No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown\n\nIf set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -4666,7 +4671,7 @@
"hints": {
"typehint": "tag",
"question": "When should this item be shown?",
"ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown"
"ifunset": "No specific condition set; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -4760,7 +4765,8 @@
"required": false,
"hints": {
"typehint": "tag",
"question": "When should this item be shown (including special conditions)?"
"question": "When should this item be shown (including special conditions)?",
"ifunset": "No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -4773,7 +4779,7 @@
"type": "string"
}
],
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
"description": "If set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
},
{
"path": [
@ -5116,7 +5122,7 @@
]
},
"condition": {
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or show this question if unknown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -5130,7 +5136,7 @@
]
},
"metacondition": {
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\nifunset: No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown\n\nIf set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -5348,7 +5354,7 @@
"hints": {
"typehint": "tag",
"question": "When should this item be shown?",
"ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown"
"ifunset": "No specific condition set; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -5442,7 +5448,8 @@
"required": false,
"hints": {
"typehint": "tag",
"question": "When should this item be shown (including special conditions)?"
"question": "When should this item be shown (including special conditions)?",
"ifunset": "No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -5455,7 +5462,7 @@
"type": "string"
}
],
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
"description": "If set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
},
{
"path": [
@ -5803,7 +5810,7 @@
]
},
"condition": {
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or show this question if unknown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -5817,7 +5824,7 @@
]
},
"metacondition": {
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\nifunset: No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown\n\nIf set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -6035,7 +6042,7 @@
"hints": {
"typehint": "tag",
"question": "When should this item be shown?",
"ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown"
"ifunset": "No specific condition set; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -6129,7 +6136,8 @@
"required": false,
"hints": {
"typehint": "tag",
"question": "When should this item be shown (including special conditions)?"
"question": "When should this item be shown (including special conditions)?",
"ifunset": "No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -6142,7 +6150,7 @@
"type": "string"
}
],
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
"description": "If set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
},
{
"path": [
@ -6485,7 +6493,7 @@
]
},
"condition": {
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or show this question if unknown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -6499,7 +6507,7 @@
]
},
"metacondition": {
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\nifunset: No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown\n\nIf set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -6717,7 +6725,7 @@
"hints": {
"typehint": "tag",
"question": "When should this item be shown?",
"ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown"
"ifunset": "No specific condition set; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -6811,7 +6819,8 @@
"required": false,
"hints": {
"typehint": "tag",
"question": "When should this item be shown (including special conditions)?"
"question": "When should this item be shown (including special conditions)?",
"ifunset": "No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -6824,7 +6833,7 @@
"type": "string"
}
],
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
"description": "If set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
},
{
"path": [
@ -7167,7 +7176,7 @@
]
},
"condition": {
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or show this question if unknown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -7181,7 +7190,7 @@
]
},
"metacondition": {
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\nifunset: No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown\n\nIf set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -7399,7 +7408,7 @@
"hints": {
"typehint": "tag",
"question": "When should this item be shown?",
"ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown"
"ifunset": "No specific condition set; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -7493,7 +7502,8 @@
"required": false,
"hints": {
"typehint": "tag",
"question": "When should this item be shown (including special conditions)?"
"question": "When should this item be shown (including special conditions)?",
"ifunset": "No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -7506,7 +7516,7 @@
"type": "string"
}
],
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
"description": "If set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
},
{
"path": [
@ -7856,7 +7866,7 @@
]
},
"condition": {
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or show this question if unknown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -7870,7 +7880,7 @@
]
},
"metacondition": {
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\nifunset: No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown\n\nIf set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -8092,7 +8102,7 @@
"hints": {
"typehint": "tag",
"question": "When should this item be shown?",
"ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown"
"ifunset": "No specific condition set; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -8186,7 +8196,8 @@
"required": false,
"hints": {
"typehint": "tag",
"question": "When should this item be shown (including special conditions)?"
"question": "When should this item be shown (including special conditions)?",
"ifunset": "No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -8199,7 +8210,7 @@
"type": "string"
}
],
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
"description": "If set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
},
{
"path": [
@ -8550,7 +8561,7 @@
]
},
"condition": {
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or show this question if unknown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -8564,7 +8575,7 @@
]
},
"metacondition": {
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\nifunset: No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown\n\nIf set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -8786,7 +8797,7 @@
"hints": {
"typehint": "tag",
"question": "When should this item be shown?",
"ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown"
"ifunset": "No specific condition set; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -8880,7 +8891,8 @@
"required": false,
"hints": {
"typehint": "tag",
"question": "When should this item be shown (including special conditions)?"
"question": "When should this item be shown (including special conditions)?",
"ifunset": "No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -8893,7 +8905,7 @@
"type": "string"
}
],
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
"description": "If set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
},
{
"path": [
@ -9965,7 +9977,7 @@
"group": "presets"
},
"type": "array",
"description": "<div class='flex'>\n <div>\nPresets for this layer.\nA preset consists of one or more attributes (tags), a title and optionally a description and optionally example images.\nWhen the contributor wishes to add a point to OpenStreetMap, they'll:\n1. Press the 'add new point'-button\n2. Choose a preset from the list of all presets\n3. Confirm the choice. In this step, the `description` (if set) and `exampleImages` (if given) will be shown\n4. Confirm the location\n5. A new point will be created with the attributes that were defined in the preset\nIf no presets are defined, the button which invites to add a new preset will not be shown.\n</div>\n<a class='block m-2 min-w-64' href='./Docs/Screenshots/AddNewItemScreencast.webm' target='_blank'> <video controls autoplay muted src='./Docs/Screenshots/AddNewItemScreencast.webm' class='w-64'/></a>\n</div>"
"description": "<div class='flex'>\n <div>\nPresets for this layer.\nA preset consists of one or more attributes (tags), a title and optionally a description and optionally example images.\nWhen the contributor wishes to add a point to OpenStreetMap, they'll:\n1. Press the 'add new point'-button\n2. Choose a preset from the list of all presets\n3. Confirm the choice. In this step, the `description` (if set) and `exampleImages` (if given) will be shown\n4. Confirm the location\n5. A new point will be created with the attributes that were defined in the preset\nIf no presets are defined, the button which invites to add a new preset will not be shown.\n</div>\n<video controls autoplay muted src='./Docs/Screenshots/AddNewItemScreencast.webm' class='w-64'/>\n</div>"
},
{
"path": [
@ -10724,7 +10736,7 @@
"type": "string"
},
"placeholder": {
"description": "question: What placeholder text should be shown in the input-element if there is no input?\nA (translated) text that is shown (as gray text) within the textfield\ntype: translation\ngroup: expert",
"description": "question: What placeholder text should be shown in the input-element if there is no input?\nA (translated) text that is shown (as gray text) within the textfield\ntype: translation\ngroup: expert\nifunset: No specific placeholder is set, show the type of the textfield",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
@ -10872,7 +10884,7 @@
]
},
"condition": {
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or show this question if unknown\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -10886,7 +10898,7 @@
]
},
"metacondition": {
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"description": "question: When should this item be shown (including special conditions)?\ntype: tag\nifunset: No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown\n\nIf set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/{and:TagConfigJson[];}"
@ -11675,7 +11687,8 @@
"hints": {
"typehint": "translation",
"group": "expert",
"question": "What placeholder text should be shown in the input-element if there is no input?"
"question": "What placeholder text should be shown in the input-element if there is no input?",
"ifunset": "No specific placeholder is set, show the type of the textfield"
},
"type": [
{
@ -12020,7 +12033,7 @@
"hints": {
"typehint": "tag",
"question": "When should this item be shown?",
"ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown"
"ifunset": "No specific condition set; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -12111,7 +12124,8 @@
"required": false,
"hints": {
"typehint": "tag",
"question": "When should this item be shown (including special conditions)?"
"question": "When should this item be shown (including special conditions)?",
"ifunset": "No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -12124,7 +12138,7 @@
"type": "string"
}
],
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
"description": "If set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
},
{
"path": [
@ -12952,7 +12966,8 @@
"hints": {
"typehint": "translation",
"group": "expert",
"question": "What placeholder text should be shown in the input-element if there is no input?"
"question": "What placeholder text should be shown in the input-element if there is no input?",
"ifunset": "No specific placeholder is set, show the type of the textfield"
},
"type": [
{
@ -13313,7 +13328,7 @@
"hints": {
"typehint": "tag",
"question": "When should this item be shown?",
"ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown"
"ifunset": "No specific condition set; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -13407,7 +13422,8 @@
"required": false,
"hints": {
"typehint": "tag",
"question": "When should this item be shown (including special conditions)?"
"question": "When should this item be shown (including special conditions)?",
"ifunset": "No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -13420,7 +13436,7 @@
"type": "string"
}
],
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
"description": "If set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
},
{
"path": [
@ -14261,7 +14277,8 @@
"hints": {
"typehint": "translation",
"group": "expert",
"question": "What placeholder text should be shown in the input-element if there is no input?"
"question": "What placeholder text should be shown in the input-element if there is no input?",
"ifunset": "No specific placeholder is set, show the type of the textfield"
},
"type": [
{
@ -14622,7 +14639,7 @@
"hints": {
"typehint": "tag",
"question": "When should this item be shown?",
"ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown"
"ifunset": "No specific condition set; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -14716,7 +14733,8 @@
"required": false,
"hints": {
"typehint": "tag",
"question": "When should this item be shown (including special conditions)?"
"question": "When should this item be shown (including special conditions)?",
"ifunset": "No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -14729,7 +14747,7 @@
"type": "string"
}
],
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
"description": "If set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
},
{
"path": [
@ -15587,7 +15605,8 @@
"hints": {
"typehint": "translation",
"group": "expert",
"question": "What placeholder text should be shown in the input-element if there is no input?"
"question": "What placeholder text should be shown in the input-element if there is no input?",
"ifunset": "No specific placeholder is set, show the type of the textfield"
},
"type": [
{
@ -15964,7 +15983,7 @@
"hints": {
"typehint": "tag",
"question": "When should this item be shown?",
"ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown"
"ifunset": "No specific condition set; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -16061,7 +16080,8 @@
"required": false,
"hints": {
"typehint": "tag",
"question": "When should this item be shown (including special conditions)?"
"question": "When should this item be shown (including special conditions)?",
"ifunset": "No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -16074,7 +16094,7 @@
"type": "string"
}
],
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
"description": "If set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
},
{
"path": [
@ -16910,7 +16930,8 @@
"hints": {
"typehint": "translation",
"group": "expert",
"question": "What placeholder text should be shown in the input-element if there is no input?"
"question": "What placeholder text should be shown in the input-element if there is no input?",
"ifunset": "No specific placeholder is set, show the type of the textfield"
},
"type": [
{
@ -17271,7 +17292,7 @@
"hints": {
"typehint": "tag",
"question": "When should this item be shown?",
"ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown"
"ifunset": "No specific condition set; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -17365,7 +17386,8 @@
"required": false,
"hints": {
"typehint": "tag",
"question": "When should this item be shown (including special conditions)?"
"question": "When should this item be shown (including special conditions)?",
"ifunset": "No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -17378,7 +17400,7 @@
"type": "string"
}
],
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
"description": "If set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
},
{
"path": [
@ -18236,7 +18258,8 @@
"hints": {
"typehint": "translation",
"group": "expert",
"question": "What placeholder text should be shown in the input-element if there is no input?"
"question": "What placeholder text should be shown in the input-element if there is no input?",
"ifunset": "No specific placeholder is set, show the type of the textfield"
},
"type": [
{
@ -18613,7 +18636,7 @@
"hints": {
"typehint": "tag",
"question": "When should this item be shown?",
"ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown"
"ifunset": "No specific condition set; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -18710,7 +18733,8 @@
"required": false,
"hints": {
"typehint": "tag",
"question": "When should this item be shown (including special conditions)?"
"question": "When should this item be shown (including special conditions)?",
"ifunset": "No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -18723,7 +18747,7 @@
"type": "string"
}
],
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
"description": "If set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
},
{
"path": [
@ -19442,10 +19466,10 @@
"additionalProperties": false
},
{
"$ref": "#/definitions/Record<string,string|{quantity:string;denominations:string[];canonical?:string|undefined;}>"
"$ref": "#/definitions/Record<string,string|{quantity:string;denominations:string[];canonical?:string|undefined;inverted?:boolean|undefined;}>"
}
],
"description": "Either a list with [{\"key\": \"unitname\", \"key2\": {\"quantity\": \"unitname\", \"denominations\": [\"denom\", \"denom\"]}}]"
"description": "Either a list with [{\"key\": \"unitname\", \"key2\": {\"quantity\": \"unitname\", \"denominations\": [\"denom\", \"denom\"]}}]\nUse `\"inverted\": true` if the amount should be _divided_ by the denomination, e.g. for charge over time (`€5/day`)"
},
{
"path": [

File diff suppressed because it is too large Load diff

View file

@ -683,7 +683,8 @@
"hints": {
"typehint": "translation",
"group": "expert",
"question": "What placeholder text should be shown in the input-element if there is no input?"
"question": "What placeholder text should be shown in the input-element if there is no input?",
"ifunset": "No specific placeholder is set, show the type of the textfield"
},
"type": [
{
@ -1012,7 +1013,7 @@
"hints": {
"typehint": "tag",
"question": "When should this item be shown?",
"ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown"
"ifunset": "No specific condition set; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -1100,7 +1101,8 @@
"required": false,
"hints": {
"typehint": "tag",
"question": "When should this item be shown (including special conditions)?"
"question": "When should this item be shown (including special conditions)?",
"ifunset": "No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -1113,7 +1115,7 @@
"type": "string"
}
],
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
"description": "If set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
},
{
"path": [

View file

@ -115,7 +115,7 @@
"hints": {
"typehint": "tag",
"question": "When should this item be shown?",
"ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown"
"ifunset": "No specific condition set; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -203,7 +203,8 @@
"required": false,
"hints": {
"typehint": "tag",
"question": "When should this item be shown (including special conditions)?"
"question": "When should this item be shown (including special conditions)?",
"ifunset": "No specific metacondition set which is evaluated against the <i>usersettings/application state</i>; always show this tagRendering or show this question if unknown"
},
"type": [
{
@ -216,7 +217,7 @@
"type": "string"
}
],
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
"description": "If set, this tag will be evaluated against the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options (at the settings-tab).\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
},
{
"path": [

View file

@ -30,8 +30,8 @@ async function getAvailableLayers(): Promise<Set<string>> {
try {
const host = new URL(Constants.VectorTileServer).host
const status: { layers: string[] } = await Promise.any([
// Utils.downloadJson("https://" + host + "/summary/status.json"),
timeout(0),
Utils.downloadJson<{layers}>("https://" + host + "/summary/status.json"),
timeout(2500),
])
return new Set<string>(status.layers)
} catch (e) {

View file

@ -29,7 +29,7 @@ async function getAvailableLayers(): Promise<Set<string>> {
try {
const host = new URL(Constants.VectorTileServer).host
const status = await Promise.any([
// Utils.downloadJson("https://" + host + "/summary/status.json"),
Utils.downloadJson("https://" + host + "/summary/status.json"),
timeout(0)
])
return new Set<string>(status.layers)