Studio: WIP

This commit is contained in:
Pieter Vander Vennet 2023-06-26 10:23:42 +02:00
parent a1843b006c
commit b6142c758c
27 changed files with 29013 additions and 6886 deletions

View file

@ -118,7 +118,7 @@
"type": "number"
},
"title": {
"description": "The title shown in a popup for elements of this layer.\n\ngroup: infobox",
"description": "The title shown in a popup for elements of this layer.\n\ngroup: title\nquestion: What title should be shown on the infobox?\ntypes: Use a dynamic tagRendering ; use a fixed value\ntypesdefault: 0",
"anyOf": [
{
"$ref": "#/definitions/TagRenderingConfigJson"
@ -249,7 +249,7 @@
}
},
"maxSnapDistance": {
"description": "If specified, a new point will only be snapped if it is within this range.\nDistance in meter\n\nDefault: 10",
"description": "question: What is the maximum distance in the location-input that a point can be moved to be snapped to a way?\n\ninline: a point is snapped if the location input is at most <b>{value}m</b> away from an object\n\nIf specified, a new point will only be snapped if it is within this range.\nIf further away, it'll be placed in the center of the location input\nDistance in meter\n\nDefault: 10",
"type": "number"
}
},
@ -260,7 +260,7 @@
}
},
"tagRenderings": {
"description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\nFurthermore, _all_ the questions of another layer can be reused with `otherlayer.*`\nIf you need only a single of the tagRenderings, use `otherlayer.tagrenderingId`\nIf one or more questions have a 'group' or 'label' set, select all the entries with the corresponding group or label with `otherlayer.*group`\nRemark: if a tagRendering is 'lent' from another layer, the 'source'-tags are copied and added as condition.\nIf they are not wanted, remove them with an override\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together\n\ngroup: tagrenderings",
"description": "question: Which tagRenderings should be shown in the infobox?\n\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\nFurthermore, _all_ the questions of another layer can be reused with `otherlayer.*`\nIf you need only a single of the tagRenderings, use `otherlayer.tagrenderingId`\nIf one or more questions have a 'group' or 'label' set, select all the entries with the corresponding group or label with `otherlayer.*group`\nRemark: if a tagRendering is 'lent' from another layer, the 'source'-tags are copied and added as condition.\nIf they are not wanted, remove them with an override\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together\n\ngroup: tagrenderings",
"type": "array",
"items": {
"anyOf": [
@ -536,17 +536,6 @@
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
"type": "object",
"properties": {
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
"type": "array",
"items": {
"type": "string"
}
},
"classes": {
"description": "A list of css-classes to apply to the entire tagRendering if the answer is known (not applied on the question).\nThis is only for advanced users",
"anyOf": [
@ -714,7 +703,7 @@
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
"description": "quesiton: What tags should be matched to show this option?\n\nIf in 'question'-mode and the contributor selects this option, these tags will be applied to the object"
},
"then": {
"description": "Shown if the 'if is fulfilled\nType: rendered",
@ -1131,27 +1120,20 @@
"description": "A QuestionableTagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nIf the desired tags are missing and a question is defined, a question will be shown instead.",
"type": "object",
"properties": {
"question": {
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nquestion: What is the id of this tagRendering?",
"type": "string"
},
"questionHint": {
"description": "A hint which is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
"mappings": {
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes\n\nquestion: What are common options?",
"type": "array",
"items": {
"$ref": "#/definitions/MappingConfigJson"
}
},
"multiAnswer": {
"description": "If true, use checkboxes instead of radio buttons when asking the question\n\nquestion: Should a contributor be allowed to select multiple mappings?\n\niftrue: allow to select multiple mappigns\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping",
"type": "boolean"
},
"freeform": {
"description": "Allow freeform text input from the user",
@ -1192,20 +1174,27 @@
"key"
]
},
"multiAnswer": {
"description": "If true, use checkboxes instead of radio buttons when asking the question",
"type": "boolean"
"question": {
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
},
"mappings": {
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
"type": "array",
"items": {
"$ref": "#/definitions/MappingConfigJson"
}
},
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
"questionHint": {
"description": "A hint which is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
@ -1305,32 +1294,28 @@
]
}
},
"required": [
"id"
],
"additionalProperties": false
},
"Partial<QuestionableTagRenderingConfigJson>": {
"type": "object",
"properties": {
"question": {
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nquestion: What is the id of this tagRendering?",
"type": "string"
},
"questionHint": {
"description": "A hint which is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
"mappings": {
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes\n\nquestion: What are common options?",
"type": "array",
"items": {
"$ref": "#/definitions/MappingConfigJson"
}
},
"multiAnswer": {
"description": "If true, use checkboxes instead of radio buttons when asking the question\n\nquestion: Should a contributor be allowed to select multiple mappings?\n\niftrue: allow to select multiple mappigns\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping",
"type": "boolean"
},
"freeform": {
"description": "Allow freeform text input from the user",
@ -1371,20 +1356,27 @@
"key"
]
},
"multiAnswer": {
"description": "If true, use checkboxes instead of radio buttons when asking the question",
"type": "boolean"
"question": {
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
},
"mappings": {
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
"type": "array",
"items": {
"$ref": "#/definitions/MappingConfigJson"
}
},
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
"questionHint": {
"description": "A hint which is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",

View file

@ -118,7 +118,7 @@ export default {
"type": "number"
},
"title": {
"description": "The title shown in a popup for elements of this layer.\n\ngroup: infobox",
"description": "The title shown in a popup for elements of this layer.\n\ngroup: title\nquestion: What title should be shown on the infobox?\ntypes: Use a dynamic tagRendering ; use a fixed value\ntypesdefault: 0",
"anyOf": [
{
"$ref": "#/definitions/TagRenderingConfigJson"
@ -249,7 +249,7 @@ export default {
}
},
"maxSnapDistance": {
"description": "If specified, a new point will only be snapped if it is within this range.\nDistance in meter\n\nDefault: 10",
"description": "question: What is the maximum distance in the location-input that a point can be moved to be snapped to a way?\n\ninline: a point is snapped if the location input is at most <b>{value}m</b> away from an object\n\nIf specified, a new point will only be snapped if it is within this range.\nIf further away, it'll be placed in the center of the location input\nDistance in meter\n\nDefault: 10",
"type": "number"
}
},
@ -260,7 +260,7 @@ export default {
}
},
"tagRenderings": {
"description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\nFurthermore, _all_ the questions of another layer can be reused with `otherlayer.*`\nIf you need only a single of the tagRenderings, use `otherlayer.tagrenderingId`\nIf one or more questions have a 'group' or 'label' set, select all the entries with the corresponding group or label with `otherlayer.*group`\nRemark: if a tagRendering is 'lent' from another layer, the 'source'-tags are copied and added as condition.\nIf they are not wanted, remove them with an override\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together\n\ngroup: tagrenderings",
"description": "question: Which tagRenderings should be shown in the infobox?\n\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\nFurthermore, _all_ the questions of another layer can be reused with `otherlayer.*`\nIf you need only a single of the tagRenderings, use `otherlayer.tagrenderingId`\nIf one or more questions have a 'group' or 'label' set, select all the entries with the corresponding group or label with `otherlayer.*group`\nRemark: if a tagRendering is 'lent' from another layer, the 'source'-tags are copied and added as condition.\nIf they are not wanted, remove them with an override\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together\n\ngroup: tagrenderings",
"type": "array",
"items": {
"anyOf": [
@ -531,17 +531,6 @@ export default {
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
"type": "object",
"properties": {
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
"type": "array",
"items": {
"type": "string"
}
},
"classes": {
"description": "A list of css-classes to apply to the entire tagRendering if the answer is known (not applied on the question).\nThis is only for advanced users",
"anyOf": [
@ -707,7 +696,7 @@ export default {
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
"description": "quesiton: What tags should be matched to show this option?\n\nIf in 'question'-mode and the contributor selects this option, these tags will be applied to the object"
},
"then": {
"description": "Shown if the 'if is fulfilled\nType: rendered",
@ -1119,27 +1108,20 @@ export default {
"description": "A QuestionableTagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nIf the desired tags are missing and a question is defined, a question will be shown instead.",
"type": "object",
"properties": {
"question": {
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nquestion: What is the id of this tagRendering?",
"type": "string"
},
"questionHint": {
"description": "A hint which is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
"mappings": {
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes\n\nquestion: What are common options?",
"type": "array",
"items": {
"$ref": "#/definitions/MappingConfigJson"
}
},
"multiAnswer": {
"description": "If true, use checkboxes instead of radio buttons when asking the question\n\nquestion: Should a contributor be allowed to select multiple mappings?\n\niftrue: allow to select multiple mappigns\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping",
"type": "boolean"
},
"freeform": {
"description": "Allow freeform text input from the user",
@ -1180,20 +1162,27 @@ export default {
"key"
]
},
"multiAnswer": {
"description": "If true, use checkboxes instead of radio buttons when asking the question",
"type": "boolean"
"question": {
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
},
"mappings": {
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
"type": "array",
"items": {
"$ref": "#/definitions/MappingConfigJson"
}
},
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
"questionHint": {
"description": "A hint which is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
@ -1292,32 +1281,28 @@ export default {
}
]
}
}
},
"required": [
"id"
]
},
"Partial<QuestionableTagRenderingConfigJson>": {
"type": "object",
"properties": {
"question": {
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nquestion: What is the id of this tagRendering?",
"type": "string"
},
"questionHint": {
"description": "A hint which is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
"mappings": {
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes\n\nquestion: What are common options?",
"type": "array",
"items": {
"$ref": "#/definitions/MappingConfigJson"
}
},
"multiAnswer": {
"description": "If true, use checkboxes instead of radio buttons when asking the question\n\nquestion: Should a contributor be allowed to select multiple mappings?\n\niftrue: allow to select multiple mappigns\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping",
"type": "boolean"
},
"freeform": {
"description": "Allow freeform text input from the user",
@ -1358,20 +1343,27 @@ export default {
"key"
]
},
"multiAnswer": {
"description": "If true, use checkboxes instead of radio buttons when asking the question",
"type": "boolean"
"question": {
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
},
"mappings": {
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
"type": "array",
"items": {
"$ref": "#/definitions/MappingConfigJson"
}
},
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
"questionHint": {
"description": "A hint which is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",

View file

@ -436,17 +436,6 @@
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
"type": "object",
"properties": {
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
"type": "array",
"items": {
"type": "string"
}
},
"classes": {
"description": "A list of css-classes to apply to the entire tagRendering if the answer is known (not applied on the question).\nThis is only for advanced users",
"anyOf": [
@ -614,7 +603,7 @@
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
"description": "quesiton: What tags should be matched to show this option?\n\nIf in 'question'-mode and the contributor selects this option, these tags will be applied to the object"
},
"then": {
"description": "Shown if the 'if is fulfilled\nType: rendered",
@ -1031,27 +1020,20 @@
"description": "A QuestionableTagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nIf the desired tags are missing and a question is defined, a question will be shown instead.",
"type": "object",
"properties": {
"question": {
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nquestion: What is the id of this tagRendering?",
"type": "string"
},
"questionHint": {
"description": "A hint which is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
"mappings": {
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes\n\nquestion: What are common options?",
"type": "array",
"items": {
"$ref": "#/definitions/MappingConfigJson"
}
},
"multiAnswer": {
"description": "If true, use checkboxes instead of radio buttons when asking the question\n\nquestion: Should a contributor be allowed to select multiple mappings?\n\niftrue: allow to select multiple mappigns\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping",
"type": "boolean"
},
"freeform": {
"description": "Allow freeform text input from the user",
@ -1092,20 +1074,27 @@
"key"
]
},
"multiAnswer": {
"description": "If true, use checkboxes instead of radio buttons when asking the question",
"type": "boolean"
"question": {
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
},
"mappings": {
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
"type": "array",
"items": {
"$ref": "#/definitions/MappingConfigJson"
}
},
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
"questionHint": {
"description": "A hint which is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
@ -1205,32 +1194,28 @@
]
}
},
"required": [
"id"
],
"additionalProperties": false
},
"Partial<QuestionableTagRenderingConfigJson>": {
"type": "object",
"properties": {
"question": {
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nquestion: What is the id of this tagRendering?",
"type": "string"
},
"questionHint": {
"description": "A hint which is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
"mappings": {
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes\n\nquestion: What are common options?",
"type": "array",
"items": {
"$ref": "#/definitions/MappingConfigJson"
}
},
"multiAnswer": {
"description": "If true, use checkboxes instead of radio buttons when asking the question\n\nquestion: Should a contributor be allowed to select multiple mappings?\n\niftrue: allow to select multiple mappigns\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping",
"type": "boolean"
},
"freeform": {
"description": "Allow freeform text input from the user",
@ -1271,20 +1256,27 @@
"key"
]
},
"multiAnswer": {
"description": "If true, use checkboxes instead of radio buttons when asking the question",
"type": "boolean"
"question": {
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
},
"mappings": {
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
"type": "array",
"items": {
"$ref": "#/definitions/MappingConfigJson"
}
},
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
"questionHint": {
"description": "A hint which is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
@ -1815,7 +1807,7 @@
"type": "number"
},
"title": {
"description": "The title shown in a popup for elements of this layer.\n\ngroup: infobox",
"description": "The title shown in a popup for elements of this layer.\n\ngroup: title\nquestion: What title should be shown on the infobox?\ntypes: Use a dynamic tagRendering ; use a fixed value\ntypesdefault: 0",
"anyOf": [
{
"$ref": "#/definitions/TagRenderingConfigJson"
@ -1946,7 +1938,7 @@
}
},
"maxSnapDistance": {
"description": "If specified, a new point will only be snapped if it is within this range.\nDistance in meter\n\nDefault: 10",
"description": "question: What is the maximum distance in the location-input that a point can be moved to be snapped to a way?\n\ninline: a point is snapped if the location input is at most <b>{value}m</b> away from an object\n\nIf specified, a new point will only be snapped if it is within this range.\nIf further away, it'll be placed in the center of the location input\nDistance in meter\n\nDefault: 10",
"type": "number"
}
},
@ -1957,7 +1949,7 @@
}
},
"tagRenderings": {
"description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\nFurthermore, _all_ the questions of another layer can be reused with `otherlayer.*`\nIf you need only a single of the tagRenderings, use `otherlayer.tagrenderingId`\nIf one or more questions have a 'group' or 'label' set, select all the entries with the corresponding group or label with `otherlayer.*group`\nRemark: if a tagRendering is 'lent' from another layer, the 'source'-tags are copied and added as condition.\nIf they are not wanted, remove them with an override\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together\n\ngroup: tagrenderings",
"description": "question: Which tagRenderings should be shown in the infobox?\n\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\nFurthermore, _all_ the questions of another layer can be reused with `otherlayer.*`\nIf you need only a single of the tagRenderings, use `otherlayer.tagrenderingId`\nIf one or more questions have a 'group' or 'label' set, select all the entries with the corresponding group or label with `otherlayer.*group`\nRemark: if a tagRendering is 'lent' from another layer, the 'source'-tags are copied and added as condition.\nIf they are not wanted, remove them with an override\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together\n\ngroup: tagrenderings",
"type": "array",
"items": {
"anyOf": [
@ -2222,7 +2214,7 @@
"type": "number"
},
"title": {
"description": "The title shown in a popup for elements of this layer.\n\ngroup: infobox",
"description": "The title shown in a popup for elements of this layer.\n\ngroup: title\nquestion: What title should be shown on the infobox?\ntypes: Use a dynamic tagRendering ; use a fixed value\ntypesdefault: 0",
"anyOf": [
{
"$ref": "#/definitions/TagRenderingConfigJson"
@ -2353,7 +2345,7 @@
}
},
"maxSnapDistance": {
"description": "If specified, a new point will only be snapped if it is within this range.\nDistance in meter\n\nDefault: 10",
"description": "question: What is the maximum distance in the location-input that a point can be moved to be snapped to a way?\n\ninline: a point is snapped if the location input is at most <b>{value}m</b> away from an object\n\nIf specified, a new point will only be snapped if it is within this range.\nIf further away, it'll be placed in the center of the location input\nDistance in meter\n\nDefault: 10",
"type": "number"
}
},
@ -2364,7 +2356,7 @@
}
},
"tagRenderings": {
"description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\nFurthermore, _all_ the questions of another layer can be reused with `otherlayer.*`\nIf you need only a single of the tagRenderings, use `otherlayer.tagrenderingId`\nIf one or more questions have a 'group' or 'label' set, select all the entries with the corresponding group or label with `otherlayer.*group`\nRemark: if a tagRendering is 'lent' from another layer, the 'source'-tags are copied and added as condition.\nIf they are not wanted, remove them with an override\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together\n\ngroup: tagrenderings",
"description": "question: Which tagRenderings should be shown in the infobox?\n\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\nFurthermore, _all_ the questions of another layer can be reused with `otherlayer.*`\nIf you need only a single of the tagRenderings, use `otherlayer.tagrenderingId`\nIf one or more questions have a 'group' or 'label' set, select all the entries with the corresponding group or label with `otherlayer.*group`\nRemark: if a tagRendering is 'lent' from another layer, the 'source'-tags are copied and added as condition.\nIf they are not wanted, remove them with an override\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together\n\ngroup: tagrenderings",
"type": "array",
"items": {
"anyOf": [

View file

@ -431,17 +431,6 @@ export default {
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
"type": "object",
"properties": {
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
"type": "array",
"items": {
"type": "string"
}
},
"classes": {
"description": "A list of css-classes to apply to the entire tagRendering if the answer is known (not applied on the question).\nThis is only for advanced users",
"anyOf": [
@ -607,7 +596,7 @@ export default {
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
"description": "quesiton: What tags should be matched to show this option?\n\nIf in 'question'-mode and the contributor selects this option, these tags will be applied to the object"
},
"then": {
"description": "Shown if the 'if is fulfilled\nType: rendered",
@ -1019,27 +1008,20 @@ export default {
"description": "A QuestionableTagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nIf the desired tags are missing and a question is defined, a question will be shown instead.",
"type": "object",
"properties": {
"question": {
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nquestion: What is the id of this tagRendering?",
"type": "string"
},
"questionHint": {
"description": "A hint which is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
"mappings": {
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes\n\nquestion: What are common options?",
"type": "array",
"items": {
"$ref": "#/definitions/MappingConfigJson"
}
},
"multiAnswer": {
"description": "If true, use checkboxes instead of radio buttons when asking the question\n\nquestion: Should a contributor be allowed to select multiple mappings?\n\niftrue: allow to select multiple mappigns\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping",
"type": "boolean"
},
"freeform": {
"description": "Allow freeform text input from the user",
@ -1080,20 +1062,27 @@ export default {
"key"
]
},
"multiAnswer": {
"description": "If true, use checkboxes instead of radio buttons when asking the question",
"type": "boolean"
"question": {
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
},
"mappings": {
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
"type": "array",
"items": {
"$ref": "#/definitions/MappingConfigJson"
}
},
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
"questionHint": {
"description": "A hint which is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
@ -1192,32 +1181,28 @@ export default {
}
]
}
}
},
"required": [
"id"
]
},
"Partial<QuestionableTagRenderingConfigJson>": {
"type": "object",
"properties": {
"question": {
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nquestion: What is the id of this tagRendering?",
"type": "string"
},
"questionHint": {
"description": "A hint which is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
"mappings": {
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes\n\nquestion: What are common options?",
"type": "array",
"items": {
"$ref": "#/definitions/MappingConfigJson"
}
},
"multiAnswer": {
"description": "If true, use checkboxes instead of radio buttons when asking the question\n\nquestion: Should a contributor be allowed to select multiple mappings?\n\niftrue: allow to select multiple mappigns\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping",
"type": "boolean"
},
"freeform": {
"description": "Allow freeform text input from the user",
@ -1258,20 +1243,27 @@ export default {
"key"
]
},
"multiAnswer": {
"description": "If true, use checkboxes instead of radio buttons when asking the question",
"type": "boolean"
"question": {
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
},
"mappings": {
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
"type": "array",
"items": {
"$ref": "#/definitions/MappingConfigJson"
}
},
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
"questionHint": {
"description": "A hint which is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
@ -1794,7 +1786,7 @@ export default {
"type": "number"
},
"title": {
"description": "The title shown in a popup for elements of this layer.\n\ngroup: infobox",
"description": "The title shown in a popup for elements of this layer.\n\ngroup: title\nquestion: What title should be shown on the infobox?\ntypes: Use a dynamic tagRendering ; use a fixed value\ntypesdefault: 0",
"anyOf": [
{
"$ref": "#/definitions/TagRenderingConfigJson"
@ -1925,7 +1917,7 @@ export default {
}
},
"maxSnapDistance": {
"description": "If specified, a new point will only be snapped if it is within this range.\nDistance in meter\n\nDefault: 10",
"description": "question: What is the maximum distance in the location-input that a point can be moved to be snapped to a way?\n\ninline: a point is snapped if the location input is at most <b>{value}m</b> away from an object\n\nIf specified, a new point will only be snapped if it is within this range.\nIf further away, it'll be placed in the center of the location input\nDistance in meter\n\nDefault: 10",
"type": "number"
}
},
@ -1936,7 +1928,7 @@ export default {
}
},
"tagRenderings": {
"description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\nFurthermore, _all_ the questions of another layer can be reused with `otherlayer.*`\nIf you need only a single of the tagRenderings, use `otherlayer.tagrenderingId`\nIf one or more questions have a 'group' or 'label' set, select all the entries with the corresponding group or label with `otherlayer.*group`\nRemark: if a tagRendering is 'lent' from another layer, the 'source'-tags are copied and added as condition.\nIf they are not wanted, remove them with an override\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together\n\ngroup: tagrenderings",
"description": "question: Which tagRenderings should be shown in the infobox?\n\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\nFurthermore, _all_ the questions of another layer can be reused with `otherlayer.*`\nIf you need only a single of the tagRenderings, use `otherlayer.tagrenderingId`\nIf one or more questions have a 'group' or 'label' set, select all the entries with the corresponding group or label with `otherlayer.*group`\nRemark: if a tagRendering is 'lent' from another layer, the 'source'-tags are copied and added as condition.\nIf they are not wanted, remove them with an override\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together\n\ngroup: tagrenderings",
"type": "array",
"items": {
"anyOf": [
@ -2200,7 +2192,7 @@ export default {
"type": "number"
},
"title": {
"description": "The title shown in a popup for elements of this layer.\n\ngroup: infobox",
"description": "The title shown in a popup for elements of this layer.\n\ngroup: title\nquestion: What title should be shown on the infobox?\ntypes: Use a dynamic tagRendering ; use a fixed value\ntypesdefault: 0",
"anyOf": [
{
"$ref": "#/definitions/TagRenderingConfigJson"
@ -2331,7 +2323,7 @@ export default {
}
},
"maxSnapDistance": {
"description": "If specified, a new point will only be snapped if it is within this range.\nDistance in meter\n\nDefault: 10",
"description": "question: What is the maximum distance in the location-input that a point can be moved to be snapped to a way?\n\ninline: a point is snapped if the location input is at most <b>{value}m</b> away from an object\n\nIf specified, a new point will only be snapped if it is within this range.\nIf further away, it'll be placed in the center of the location input\nDistance in meter\n\nDefault: 10",
"type": "number"
}
},
@ -2342,7 +2334,7 @@ export default {
}
},
"tagRenderings": {
"description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\nFurthermore, _all_ the questions of another layer can be reused with `otherlayer.*`\nIf you need only a single of the tagRenderings, use `otherlayer.tagrenderingId`\nIf one or more questions have a 'group' or 'label' set, select all the entries with the corresponding group or label with `otherlayer.*group`\nRemark: if a tagRendering is 'lent' from another layer, the 'source'-tags are copied and added as condition.\nIf they are not wanted, remove them with an override\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together\n\ngroup: tagrenderings",
"description": "question: Which tagRenderings should be shown in the infobox?\n\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\nFurthermore, _all_ the questions of another layer can be reused with `otherlayer.*`\nIf you need only a single of the tagRenderings, use `otherlayer.tagrenderingId`\nIf one or more questions have a 'group' or 'label' set, select all the entries with the corresponding group or label with `otherlayer.*group`\nRemark: if a tagRendering is 'lent' from another layer, the 'source'-tags are copied and added as condition.\nIf they are not wanted, remove them with an override\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together\n\ngroup: tagrenderings",
"type": "array",
"items": {
"anyOf": [

View file

@ -204,17 +204,6 @@
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
"type": "object",
"properties": {
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
"type": "array",
"items": {
"type": "string"
}
},
"classes": {
"description": "A list of css-classes to apply to the entire tagRendering if the answer is known (not applied on the question).\nThis is only for advanced users",
"anyOf": [

View file

@ -199,17 +199,6 @@ export default {
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
"type": "object",
"properties": {
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
"type": "array",
"items": {
"type": "string"
}
},
"classes": {
"description": "A list of css-classes to apply to the entire tagRendering if the answer is known (not applied on the question).\nThis is only for advanced users",
"anyOf": [

View file

@ -3,7 +3,7 @@
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
"description": "quesiton: What tags should be matched to show this option?\n\nIf in 'question'-mode and the contributor selects this option, these tags will be applied to the object"
},
"then": {
"description": "Shown if the 'if is fulfilled\nType: rendered",
@ -237,17 +237,6 @@
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
"type": "object",
"properties": {
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
"type": "array",
"items": {
"type": "string"
}
},
"classes": {
"description": "A list of css-classes to apply to the entire tagRendering if the answer is known (not applied on the question).\nThis is only for advanced users",
"anyOf": [

View file

@ -3,7 +3,7 @@ export default {
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
"description": "quesiton: What tags should be matched to show this option?\n\nIf in 'question'-mode and the contributor selects this option, these tags will be applied to the object"
},
"then": {
"description": "Shown if the 'if is fulfilled\nType: rendered",
@ -232,17 +232,6 @@ export default {
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
"type": "object",
"properties": {
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
"type": "array",
"items": {
"type": "string"
}
},
"classes": {
"description": "A list of css-classes to apply to the entire tagRendering if the answer is known (not applied on the question).\nThis is only for advanced users",
"anyOf": [

View file

@ -302,17 +302,6 @@
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
"type": "object",
"properties": {
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
"type": "array",
"items": {
"type": "string"
}
},
"classes": {
"description": "A list of css-classes to apply to the entire tagRendering if the answer is known (not applied on the question).\nThis is only for advanced users",
"anyOf": [

View file

@ -297,17 +297,6 @@ export default {
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
"type": "object",
"properties": {
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
"type": "array",
"items": {
"type": "string"
}
},
"classes": {
"description": "A list of css-classes to apply to the entire tagRendering if the answer is known (not applied on the question).\nThis is only for advanced users",
"anyOf": [

View file

@ -2,27 +2,20 @@
"description": "A QuestionableTagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nIf the desired tags are missing and a question is defined, a question will be shown instead.",
"type": "object",
"properties": {
"question": {
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nquestion: What is the id of this tagRendering?",
"type": "string"
},
"questionHint": {
"description": "A hint which is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
"mappings": {
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes\n\nquestion: What are common options?",
"type": "array",
"items": {
"$ref": "#/definitions/MappingConfigJson"
}
},
"multiAnswer": {
"description": "If true, use checkboxes instead of radio buttons when asking the question\n\nquestion: Should a contributor be allowed to select multiple mappings?\n\niftrue: allow to select multiple mappigns\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping",
"type": "boolean"
},
"freeform": {
"description": "Allow freeform text input from the user",
@ -63,20 +56,27 @@
"key"
]
},
"multiAnswer": {
"description": "If true, use checkboxes instead of radio buttons when asking the question",
"type": "boolean"
"question": {
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
},
"mappings": {
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
"type": "array",
"items": {
"$ref": "#/definitions/MappingConfigJson"
}
},
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
"questionHint": {
"description": "A hint which is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
@ -176,6 +176,9 @@
]
}
},
"required": [
"id"
],
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
@ -308,17 +311,6 @@
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
"type": "object",
"properties": {
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
"type": "array",
"items": {
"type": "string"
}
},
"classes": {
"description": "A list of css-classes to apply to the entire tagRendering if the answer is known (not applied on the question).\nThis is only for advanced users",
"anyOf": [
@ -486,7 +478,7 @@
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
"description": "quesiton: What tags should be matched to show this option?\n\nIf in 'question'-mode and the contributor selects this option, these tags will be applied to the object"
},
"then": {
"description": "Shown if the 'if is fulfilled\nType: rendered",

View file

@ -2,27 +2,20 @@ export default {
"description": "A QuestionableTagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nIf the desired tags are missing and a question is defined, a question will be shown instead.",
"type": "object",
"properties": {
"question": {
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nquestion: What is the id of this tagRendering?",
"type": "string"
},
"questionHint": {
"description": "A hint which is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
"mappings": {
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes\n\nquestion: What are common options?",
"type": "array",
"items": {
"$ref": "#/definitions/MappingConfigJson"
}
},
"multiAnswer": {
"description": "If true, use checkboxes instead of radio buttons when asking the question\n\nquestion: Should a contributor be allowed to select multiple mappings?\n\niftrue: allow to select multiple mappigns\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping",
"type": "boolean"
},
"freeform": {
"description": "Allow freeform text input from the user",
@ -63,20 +56,27 @@ export default {
"key"
]
},
"multiAnswer": {
"description": "If true, use checkboxes instead of radio buttons when asking the question",
"type": "boolean"
"question": {
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
},
"mappings": {
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
"type": "array",
"items": {
"$ref": "#/definitions/MappingConfigJson"
}
},
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
"questionHint": {
"description": "A hint which is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like",
"anyOf": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
]
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
@ -176,6 +176,9 @@ export default {
]
}
},
"required": [
"id"
],
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
@ -303,17 +306,6 @@ export default {
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
"type": "object",
"properties": {
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
"type": "array",
"items": {
"type": "string"
}
},
"classes": {
"description": "A list of css-classes to apply to the entire tagRendering if the answer is known (not applied on the question).\nThis is only for advanced users",
"anyOf": [
@ -479,7 +471,7 @@ export default {
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
"description": "quesiton: What tags should be matched to show this option?\n\nIf in 'question'-mode and the contributor selects this option, these tags will be applied to the object"
},
"then": {
"description": "Shown if the 'if is fulfilled\nType: rendered",

View file

@ -164,17 +164,6 @@
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
"type": "object",
"properties": {
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
"type": "array",
"items": {
"type": "string"
}
},
"classes": {
"description": "A list of css-classes to apply to the entire tagRendering if the answer is known (not applied on the question).\nThis is only for advanced users",
"anyOf": [
@ -342,7 +331,7 @@
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
"description": "quesiton: What tags should be matched to show this option?\n\nIf in 'question'-mode and the contributor selects this option, these tags will be applied to the object"
},
"then": {
"description": "Shown if the 'if is fulfilled\nType: rendered",

View file

@ -159,17 +159,6 @@ export default {
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
"type": "object",
"properties": {
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
"type": "array",
"items": {
"type": "string"
}
},
"classes": {
"description": "A list of css-classes to apply to the entire tagRendering if the answer is known (not applied on the question).\nThis is only for advanced users",
"anyOf": [
@ -335,7 +324,7 @@ export default {
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
"description": "quesiton: What tags should be matched to show this option?\n\nIf in 'question'-mode and the contributor selects this option, these tags will be applied to the object"
},
"then": {
"description": "Shown if the 'if is fulfilled\nType: rendered",

View file

@ -2,17 +2,6 @@
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
"type": "object",
"properties": {
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
"type": "array",
"items": {
"type": "string"
}
},
"classes": {
"description": "A list of css-classes to apply to the entire tagRendering if the answer is known (not applied on the question).\nThis is only for advanced users",
"anyOf": [

View file

@ -2,17 +2,6 @@ export default {
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
"type": "object",
"properties": {
"id": {
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
"type": "string"
},
"labels": {
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
"type": "array",
"items": {
"type": "string"
}
},
"classes": {
"description": "A list of css-classes to apply to the entire tagRendering if the answer is known (not applied on the question).\nThis is only for advanced users",
"anyOf": [

View file

@ -8,6 +8,7 @@ import PointRenderingConfigJson from "./PointRenderingConfigJson"
import LineRenderingConfigJson from "./LineRenderingConfigJson"
import { QuestionableTagRenderingConfigJson } from "./QuestionableTagRenderingConfigJson"
import RewritableConfigJson from "./RewritableConfigJson"
import { Translatable } from "./Translatable"
/**
* Configuration for a single layer
@ -30,7 +31,7 @@ export interface LayerConfigJson {
* group: Basic
* question: What is the name of this layer?
*/
name?: string | Record<string, string>
name?: Translatable
/**
* A description for the features shown in this layer.
@ -39,7 +40,7 @@ export interface LayerConfigJson {
* group: Basic
* question: How would you describe the features that are shown on this layer?
*/
description?: string | Record<string, string>
description?: Translatable
/**
*
@ -203,9 +204,13 @@ export interface LayerConfigJson {
/**
* The title shown in a popup for elements of this layer.
*
* group: infobox
* group: title
* question: What title should be shown on the infobox?
* types: Use a dynamic tagRendering ; use a fixed value
* typesdefault: 0
*
*/
title?: string | TagRenderingConfigJson
title?: TagRenderingConfigJson | string
/**
*
@ -313,7 +318,7 @@ export interface LayerConfigJson {
* question: What is the word to describe this object?
* inline: Add <b>{value}</b> here
*/
title: string | Record<string, string>
title: Translatable
/**
* A single tag (encoded as <code>key=value</code>) out of all the tags to add onto the newly created point.
* Note that the icon in the UI will be chosen automatically based on the tags provided here.
@ -332,7 +337,7 @@ export interface LayerConfigJson {
*
* question: How would you describe this feature?
*/
description?: string | Record<string, string>
description?: Translatable
/**
* The URL of an example image which shows a real-life example of what such a feature might look like.
@ -368,7 +373,8 @@ export interface LayerConfigJson {
}[]
/**
* All the tag renderings.
* question: Which tagRenderings should be shown in the infobox?
*
* A tag rendering is a block that either shows the known value or asks a question.
*
* Refer to the class `TagRenderingConfigJson` to see the possibilities.
@ -388,6 +394,7 @@ export interface LayerConfigJson {
* These will be grouped and questions will be asked together
*
* group: tagrenderings
*
*/
tagRenderings?: (
| string

View file

@ -3,9 +3,12 @@ import { TagRenderingConfigJson } from "./TagRenderingConfigJson"
export interface MappingConfigJson {
/**
* @inheritDoc
* quesiton: What tags should be matched to show this option?
*
* If in 'question'-mode and the contributor selects this option, these tags will be applied to the object
*/
if: TagConfigJson
/**
* Shown if the 'if is fulfilled
* Type: rendered
@ -143,16 +146,30 @@ export interface MappingConfigJson {
*/
export interface QuestionableTagRenderingConfigJson extends TagRenderingConfigJson {
/**
* If it turns out that this tagRendering doesn't match _any_ value, then we show this question.
* If undefined, the question is never asked and this tagrendering is read-only
* The id of the tagrendering, should be an unique string.
* Used to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.
*
* question: What is the id of this tagRendering?
*/
question?: string | Record<string, string>
id: string
/**
* A hint which is shown in subtle text under the question.
* This can give some extra information on what the answer should ook like
* Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes
*
* question: What are common options?
*/
questionHint?: string | Record<string, string>
mappings?: MappingConfigJson[]
/**
* If true, use checkboxes instead of radio buttons when asking the question
*
* question: Should a contributor be allowed to select multiple mappings?
*
* iftrue: allow to select multiple mappigns
* iffalse: only allow to select a single mapping
* ifunset: only allow to select a single mapping
*/
multiAnswer?: boolean
/**
* Allow freeform text input from the user
@ -201,12 +218,19 @@ export interface QuestionableTagRenderingConfigJson extends TagRenderingConfigJs
}
/**
* If true, use checkboxes instead of radio buttons when asking the question
* If it turns out that this tagRendering doesn't match _any_ value, then we show this question.
* If undefined, the question is never asked and this tagrendering is read-only
*/
multiAnswer?: boolean
question?: string | Record<string, string>
/**
* Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes
* A hint which is shown in subtle text under the question.
* This can give some extra information on what the answer should ook like
*/
mappings?: MappingConfigJson[]
questionHint?: string | Record<string, string>
/**
* A list of labels. These are strings that are used for various purposes, e.g. to filter them away
*/
labels?: string[]
}

View file

@ -1,23 +1,11 @@
import { TagConfigJson } from "./TagConfigJson"
import { Translatable } from "./Translatable"
/**
* A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.
* For an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one
*/
export interface TagRenderingConfigJson {
/**
* The id of the tagrendering, should be an unique string.
* Used to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.
*
* Use 'questions' to trigger the question box of this group (if a group is defined)
*/
id?: string
/**
* A list of labels. These are strings that are used for various purposes, e.g. to filter them away
*/
labels?: string[]
/**
* A list of css-classes to apply to the entire tagRendering if the answer is known (not applied on the question).
* This is only for advanced users
@ -38,8 +26,7 @@ export interface TagRenderingConfigJson {
* type: rendered
*/
render?:
| string
| Record<string, string>
| Translatable
| { special: Record<string, string | Record<string, string>> & { type: string } }
/**

View file

@ -0,0 +1 @@
export type Translatable = string | Record<string, string>

View file

@ -51,7 +51,7 @@
<div slot="title1">Information panel (questions and answers)</div>
<div slot="content1">
<Region {state} configs={perRegion["infobox"]} title="Infobox"/>
<Region {state} configs={perRegion["title"]} title="Title"/>
<Region {state} configs={perRegion["tagrenderings"]} title="Infobox"/>
<Region {state} configs={perRegion["editing"]} title="Other editing elements"/>
</div>

View file

@ -41,7 +41,7 @@
}]
}
if (schema.type === "boolean" || (Array.isArray(schema.type) && schema.type.some(t => t["type"] === "boolean") >= 0)) {
if (schema.type === "boolean" || (Array.isArray(schema.type) && schema.type.some(t => t["type"] === "boolean"))) {
configJson.mappings = configJson.mappings ?? []
configJson.mappings.push(
{

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -8,121 +8,25 @@
},
{
"path": [
"question"
"id"
],
"required": false,
"hints": {},
"type": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
],
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only"
},
{
"path": [
"questionHint"
],
"required": false,
"hints": {},
"type": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
],
"description": "A hint which is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like"
},
{
"path": [
"freeform"
],
"required": false,
"hints": {},
"type": "object",
"description": "Allow freeform text input from the user"
},
{
"path": [
"freeform",
"type"
],
"required": false,
"hints": {},
"required": true,
"hints": {
"question": "What is the id of this tagRendering?"
},
"type": "string",
"description": "The type of the text-field, e.g. 'string', 'nat', 'float', 'date',...\nSee Docs/SpecialInputElements.md and UI/Input/ValidatedTextField.ts for supported values"
},
{
"path": [
"freeform",
"placeholder"
],
"required": false,
"hints": {},
"description": "A (translated) text that is shown (as gray text) within the textfield"
},
{
"path": [
"freeform",
"helperArgs"
],
"required": false,
"hints": {},
"type": "array",
"description": "Extra parameters to initialize the input helper arguments.\nFor semantics, see the 'SpecialInputElements.md'"
},
{
"path": [
"freeform",
"addExtraTags"
],
"required": false,
"hints": {},
"type": "array",
"description": "If a value is added with the textfield, these extra tag is addded.\nUseful to add a 'fixme=freeform textfield used - to be checked'"
},
{
"path": [
"freeform",
"inline"
],
"required": false,
"hints": {},
"type": "boolean",
"description": "When set, influences the way a question is asked.\nInstead of showing a full-width text field, the text field will be shown within the rendering of the question.\n\nThis combines badly with special input elements, as it'll distort the layout.\nNote that this will be set automatically if no special elements are present."
},
{
"path": [
"freeform",
"default"
],
"required": false,
"hints": {},
"type": "string",
"description": "default value to enter if no previous tagging is present.\nNormally undefined (aka do not enter anything)"
},
{
"path": [
"multiAnswer"
],
"required": false,
"hints": {},
"type": "boolean",
"description": "If true, use checkboxes instead of radio buttons when asking the question"
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n"
},
{
"path": [
"mappings"
],
"required": false,
"hints": {},
"hints": {
"question": "What are common options?"
},
"type": "array",
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes"
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes\n"
},
{
"path": [
@ -521,12 +425,117 @@
},
{
"path": [
"id"
"multiAnswer"
],
"required": false,
"hints": {
"question": "Should a contributor be allowed to select multiple mappings?",
"iftrue": "allow to select multiple mappigns",
"iffalse": "only allow to select a single mapping",
"ifunset": "only allow to select a single mapping"
},
"type": "boolean",
"description": "If true, use checkboxes instead of radio buttons when asking the question\n\n"
},
{
"path": [
"freeform"
],
"required": false,
"hints": {},
"type": "object",
"description": "Allow freeform text input from the user"
},
{
"path": [
"freeform",
"type"
],
"required": false,
"hints": {},
"type": "string",
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)"
"description": "The type of the text-field, e.g. 'string', 'nat', 'float', 'date',...\nSee Docs/SpecialInputElements.md and UI/Input/ValidatedTextField.ts for supported values"
},
{
"path": [
"freeform",
"placeholder"
],
"required": false,
"hints": {},
"description": "A (translated) text that is shown (as gray text) within the textfield"
},
{
"path": [
"freeform",
"helperArgs"
],
"required": false,
"hints": {},
"type": "array",
"description": "Extra parameters to initialize the input helper arguments.\nFor semantics, see the 'SpecialInputElements.md'"
},
{
"path": [
"freeform",
"addExtraTags"
],
"required": false,
"hints": {},
"type": "array",
"description": "If a value is added with the textfield, these extra tag is addded.\nUseful to add a 'fixme=freeform textfield used - to be checked'"
},
{
"path": [
"freeform",
"inline"
],
"required": false,
"hints": {},
"type": "boolean",
"description": "When set, influences the way a question is asked.\nInstead of showing a full-width text field, the text field will be shown within the rendering of the question.\n\nThis combines badly with special input elements, as it'll distort the layout.\nNote that this will be set automatically if no special elements are present."
},
{
"path": [
"freeform",
"default"
],
"required": false,
"hints": {},
"type": "string",
"description": "default value to enter if no previous tagging is present.\nNormally undefined (aka do not enter anything)"
},
{
"path": [
"question"
],
"required": false,
"hints": {},
"type": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
],
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only"
},
{
"path": [
"questionHint"
],
"required": false,
"hints": {},
"type": [
{
"$ref": "#/definitions/Record<string,string>"
},
{
"type": "string"
}
],
"description": "A hint which is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like"
},
{
"path": [

View file

@ -6,24 +6,6 @@
"type": "object",
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one"
},
{
"path": [
"id"
],
"required": false,
"hints": {},
"type": "string",
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)"
},
{
"path": [
"labels"
],
"required": false,
"hints": {},
"type": "array",
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away"
},
{
"path": [
"classes"

View file

@ -139,7 +139,7 @@ function addMetafields(fieldnames: string[], fullSchema: JsonSchema): ConfigMeta
}
if (hints["types"]) {
const numberOfExpectedSubtypes = hints["types"].split(";").length
const numberOfExpectedSubtypes = hints["types"].replaceAll("|", ";").split(";").length
if (!Array.isArray(type)) {
throw (
"At " +
@ -193,9 +193,6 @@ function substituteReferences(
continue
}
const name = ref.substring("#/definitions/".length)
if (name === "TagRenderingConfigJson") {
continue
}
if (name.startsWith("{") || name.startsWith("Record<")) {
continue
}
@ -204,7 +201,7 @@ function substituteReferences(
continue
}
if (name === "DeleteConfigJson") {
if (name === "DeleteConfigJson" || name === "TagRenderingConfigJson") {
const target = allDefinitions[name]
if (!target) {
throw "Cannot expand reference for type " + name + "; it does not exist "