forked from MapComplete/MapComplete
Studio: more finetuning, first version working
This commit is contained in:
parent
c4d4a57a08
commit
ac1e7c7f06
39 changed files with 2971 additions and 7187 deletions
|
@ -5,7 +5,7 @@
|
|||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
|
@ -29,7 +29,7 @@
|
|||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
|
@ -181,111 +181,13 @@
|
|||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"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",
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Record<string,string>"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"special": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Record<string,string|Record<string,string>>"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"special"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"icon": {
|
||||
"description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-<classtype>', so defining your own in combination with a custom CSS is possible (but discouraged)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"condition": {
|
||||
"description": "question: When should this item be shown?\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[];}"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/{or:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"metacondition": {
|
||||
"description": "question: When should this item be shown (including special conditions)?\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_",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/{and:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/{or:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"freeform": {
|
||||
"description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key"
|
||||
]
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
|
@ -298,39 +200,8 @@
|
|||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Record<string,string>"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"icon": {
|
||||
"description": "question: What icon should be added to this mapping?\nAn icon supporting this mapping; typically shown pretty small\ninline: <img src='{icon}' class=\"w-8 h-8\" /> {icon}\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-<classtype>', so defining your own in combination with a custom CSS is possible (but discouraged)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
@ -338,21 +209,6 @@
|
|||
"then"
|
||||
]
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Record<string,string>"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"classes": {
|
||||
"description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
|
|
|
@ -5,7 +5,7 @@ export default {
|
|||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
|
@ -29,7 +29,7 @@ export default {
|
|||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
|
@ -176,111 +176,13 @@ export default {
|
|||
"canonicalDenomination"
|
||||
]
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"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",
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Record<string,string>"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"special": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Record<string,string|Record<string,string>>"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"special"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"icon": {
|
||||
"description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-<classtype>', so defining your own in combination with a custom CSS is possible (but discouraged)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"condition": {
|
||||
"description": "question: When should this item be shown?\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[];}"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/{or:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"metacondition": {
|
||||
"description": "question: When should this item be shown (including special conditions)?\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_",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/{and:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/{or:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"freeform": {
|
||||
"description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key"
|
||||
]
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
|
@ -293,39 +195,8 @@ export default {
|
|||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Record<string,string>"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"icon": {
|
||||
"description": "question: What icon should be added to this mapping?\nAn icon supporting this mapping; typically shown pretty small\ninline: <img src='{icon}' class=\"w-8 h-8\" /> {icon}\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-<classtype>', so defining your own in combination with a custom CSS is possible (but discouraged)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
@ -333,21 +204,6 @@ export default {
|
|||
"then"
|
||||
]
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Record<string,string>"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"classes": {
|
||||
"description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
"type": "number"
|
||||
},
|
||||
"title": {
|
||||
"description": "question: What title should be shown on the infobox?\nThe title shown in a popup for elements of this layer.\n\ngroup: title\ntypes: use a fixed translation ; Use a dynamic tagRendering ; hidden\ntypesdefault: 1\ntype: translation",
|
||||
"description": "question: What title should be shown on the infobox?\nThe title shown in a popup for elements of this layer.\n\ngroup: title\ntypes: use a fixed translation ; Use a dynamic tagRendering ; hidden\ntypesdefault: 1\ntype: translation\ninline: {translated{value}}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Record<string,string>"
|
||||
|
@ -199,7 +199,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add <b>{value}</b> here",
|
||||
"description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add <b>{translated(value)}</b> here",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Record<string,string>"
|
||||
|
@ -242,7 +242,7 @@
|
|||
}
|
||||
},
|
||||
"maxSnapDistance": {
|
||||
"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",
|
||||
"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\nifunset: Do not snap to a layer",
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
|
@ -342,7 +342,7 @@
|
|||
]
|
||||
},
|
||||
"deletion": {
|
||||
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n### The delete dialog\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted fromOSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n##### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.\n\ngroup: editing\ntypes: Use an advanced delete configuration ; boolean\niftrue: Allow deletion\niffalse: Do not allow deletion",
|
||||
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n### The delete dialog\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted fromOSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n##### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.\n\ngroup: editing\ntypes: Use an advanced delete configuration ; boolean\niftrue: Allow deletion\niffalse: Do not allow deletion\nifunset: Do not allow deletion",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/DeleteConfigJson"
|
||||
|
@ -525,6 +525,95 @@
|
|||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"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",
|
||||
|
@ -701,95 +790,6 @@
|
|||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"Record<string,string[]>": {
|
||||
"type": "object",
|
||||
"additionalProperties": false
|
||||
|
@ -939,7 +939,7 @@
|
|||
"description": "Badge to show\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -987,7 +987,7 @@
|
|||
]
|
||||
},
|
||||
"label": {
|
||||
"description": "question: What label should be shown beneath the marker?\nFor example: `<div style=\"background: white\">{name}</div>`\n\nIf the icon is undefined, then the label is shown in the center of the feature.\ntypes: Dynamic value | string\ninline: Always show label <b>{value}</b> beneath the marker",
|
||||
"description": "question: What label should be shown beneath the marker?\nFor example: `<div style=\"background: white\">{name}</div>`\n\nIf the icon is undefined, then the label is shown in the center of the feature.\ntypes: Dynamic value | string\ninline: Always show label <b>{value}</b> beneath the marker\nifunset: Do not show a label beneath the marker",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -998,7 +998,7 @@
|
|||
]
|
||||
},
|
||||
"css": {
|
||||
"description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style <b>{value}</b> to the _entire marker_\ntypes: Dynamic value ; string",
|
||||
"description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style <b>{value}</b> to the _entire marker_\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS element to the entire marker",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -1009,7 +1009,7 @@
|
|||
]
|
||||
},
|
||||
"cssClasses": {
|
||||
"description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the entire container\ntypes: Dynamic value ; string",
|
||||
"description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the entire container\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -1020,7 +1020,7 @@
|
|||
]
|
||||
},
|
||||
"labelCss": {
|
||||
"description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style <b>{value}</b> to the label\ntypes: Dynamic value ; string",
|
||||
"description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style <b>{value}</b> to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -1031,7 +1031,7 @@
|
|||
]
|
||||
},
|
||||
"labelCssClasses": {
|
||||
"description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the label\ntypes: Dynamic value ; string",
|
||||
"description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the label",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -1201,10 +1201,17 @@
|
|||
},
|
||||
"invalidValues": {
|
||||
"description": "question: What values of the freeform key should be interpreted as 'unknown'?\nFor example, if a feature has `shop=yes`, the question 'what type of shop is this?' should still asked\nifunset: The question will be considered answered if any value is set for the key",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/{and:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/{or:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
@ -1404,10 +1411,17 @@
|
|||
},
|
||||
"invalidValues": {
|
||||
"description": "question: What values of the freeform key should be interpreted as 'unknown'?\nFor example, if a feature has `shop=yes`, the question 'what type of shop is this?' should still asked\nifunset: The question will be considered answered if any value is set for the key",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/{and:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/{or:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
|
|
@ -118,7 +118,7 @@ export default {
|
|||
"type": "number"
|
||||
},
|
||||
"title": {
|
||||
"description": "question: What title should be shown on the infobox?\nThe title shown in a popup for elements of this layer.\n\ngroup: title\ntypes: use a fixed translation ; Use a dynamic tagRendering ; hidden\ntypesdefault: 1\ntype: translation",
|
||||
"description": "question: What title should be shown on the infobox?\nThe title shown in a popup for elements of this layer.\n\ngroup: title\ntypes: use a fixed translation ; Use a dynamic tagRendering ; hidden\ntypesdefault: 1\ntype: translation\ninline: {translated{value}}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Record<string,string>"
|
||||
|
@ -199,7 +199,7 @@ export default {
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add <b>{value}</b> here",
|
||||
"description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add <b>{translated(value)}</b> here",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Record<string,string>"
|
||||
|
@ -242,7 +242,7 @@ export default {
|
|||
}
|
||||
},
|
||||
"maxSnapDistance": {
|
||||
"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",
|
||||
"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\nifunset: Do not snap to a layer",
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
|
@ -342,7 +342,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"deletion": {
|
||||
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n### The delete dialog\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted fromOSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n##### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.\n\ngroup: editing\ntypes: Use an advanced delete configuration ; boolean\niftrue: Allow deletion\niffalse: Do not allow deletion",
|
||||
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n### The delete dialog\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted fromOSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n##### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.\n\ngroup: editing\ntypes: Use an advanced delete configuration ; boolean\niftrue: Allow deletion\niffalse: Do not allow deletion\nifunset: Do not allow deletion",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/DeleteConfigJson"
|
||||
|
@ -520,6 +520,93 @@ export default {
|
|||
"canonicalDenomination"
|
||||
]
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
]
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"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",
|
||||
|
@ -695,93 +782,6 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
]
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Record<string,string[]>": {
|
||||
"type": "object"
|
||||
},
|
||||
|
@ -928,7 +928,7 @@ export default {
|
|||
"description": "Badge to show\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -976,7 +976,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"label": {
|
||||
"description": "question: What label should be shown beneath the marker?\nFor example: `<div style=\"background: white\">{name}</div>`\n\nIf the icon is undefined, then the label is shown in the center of the feature.\ntypes: Dynamic value | string\ninline: Always show label <b>{value}</b> beneath the marker",
|
||||
"description": "question: What label should be shown beneath the marker?\nFor example: `<div style=\"background: white\">{name}</div>`\n\nIf the icon is undefined, then the label is shown in the center of the feature.\ntypes: Dynamic value | string\ninline: Always show label <b>{value}</b> beneath the marker\nifunset: Do not show a label beneath the marker",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -987,7 +987,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"css": {
|
||||
"description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style <b>{value}</b> to the _entire marker_\ntypes: Dynamic value ; string",
|
||||
"description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style <b>{value}</b> to the _entire marker_\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS element to the entire marker",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -998,7 +998,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"cssClasses": {
|
||||
"description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the entire container\ntypes: Dynamic value ; string",
|
||||
"description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the entire container\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -1009,7 +1009,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"labelCss": {
|
||||
"description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style <b>{value}</b> to the label\ntypes: Dynamic value ; string",
|
||||
"description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style <b>{value}</b> to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -1020,7 +1020,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"labelCssClasses": {
|
||||
"description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the label\ntypes: Dynamic value ; string",
|
||||
"description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the label",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -1188,10 +1188,17 @@ export default {
|
|||
},
|
||||
"invalidValues": {
|
||||
"description": "question: What values of the freeform key should be interpreted as 'unknown'?\nFor example, if a feature has `shop=yes`, the question 'what type of shop is this?' should still asked\nifunset: The question will be considered answered if any value is set for the key",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/{and:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/{or:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
@ -1390,10 +1397,17 @@ export default {
|
|||
},
|
||||
"invalidValues": {
|
||||
"description": "question: What values of the freeform key should be interpreted as 'unknown'?\nFor example, if a feature has `shop=yes`, the question 'what type of shop is this?' should still asked\nifunset: The question will be considered answered if any value is set for the key",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/{and:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/{or:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
|
|
@ -432,6 +432,95 @@
|
|||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"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",
|
||||
|
@ -608,95 +697,6 @@
|
|||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"Record<string,string[]>": {
|
||||
"type": "object",
|
||||
"additionalProperties": false
|
||||
|
@ -846,7 +846,7 @@
|
|||
"description": "Badge to show\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -894,7 +894,7 @@
|
|||
]
|
||||
},
|
||||
"label": {
|
||||
"description": "question: What label should be shown beneath the marker?\nFor example: `<div style=\"background: white\">{name}</div>`\n\nIf the icon is undefined, then the label is shown in the center of the feature.\ntypes: Dynamic value | string\ninline: Always show label <b>{value}</b> beneath the marker",
|
||||
"description": "question: What label should be shown beneath the marker?\nFor example: `<div style=\"background: white\">{name}</div>`\n\nIf the icon is undefined, then the label is shown in the center of the feature.\ntypes: Dynamic value | string\ninline: Always show label <b>{value}</b> beneath the marker\nifunset: Do not show a label beneath the marker",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -905,7 +905,7 @@
|
|||
]
|
||||
},
|
||||
"css": {
|
||||
"description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style <b>{value}</b> to the _entire marker_\ntypes: Dynamic value ; string",
|
||||
"description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style <b>{value}</b> to the _entire marker_\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS element to the entire marker",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -916,7 +916,7 @@
|
|||
]
|
||||
},
|
||||
"cssClasses": {
|
||||
"description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the entire container\ntypes: Dynamic value ; string",
|
||||
"description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the entire container\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -927,7 +927,7 @@
|
|||
]
|
||||
},
|
||||
"labelCss": {
|
||||
"description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style <b>{value}</b> to the label\ntypes: Dynamic value ; string",
|
||||
"description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style <b>{value}</b> to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -938,7 +938,7 @@
|
|||
]
|
||||
},
|
||||
"labelCssClasses": {
|
||||
"description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the label\ntypes: Dynamic value ; string",
|
||||
"description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the label",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -1108,10 +1108,17 @@
|
|||
},
|
||||
"invalidValues": {
|
||||
"description": "question: What values of the freeform key should be interpreted as 'unknown'?\nFor example, if a feature has `shop=yes`, the question 'what type of shop is this?' should still asked\nifunset: The question will be considered answered if any value is set for the key",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/{and:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/{or:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
@ -1311,10 +1318,17 @@
|
|||
},
|
||||
"invalidValues": {
|
||||
"description": "question: What values of the freeform key should be interpreted as 'unknown'?\nFor example, if a feature has `shop=yes`, the question 'what type of shop is this?' should still asked\nifunset: The question will be considered answered if any value is set for the key",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/{and:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/{or:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
@ -1886,7 +1900,7 @@
|
|||
"type": "number"
|
||||
},
|
||||
"title": {
|
||||
"description": "question: What title should be shown on the infobox?\nThe title shown in a popup for elements of this layer.\n\ngroup: title\ntypes: use a fixed translation ; Use a dynamic tagRendering ; hidden\ntypesdefault: 1\ntype: translation",
|
||||
"description": "question: What title should be shown on the infobox?\nThe title shown in a popup for elements of this layer.\n\ngroup: title\ntypes: use a fixed translation ; Use a dynamic tagRendering ; hidden\ntypesdefault: 1\ntype: translation\ninline: {translated{value}}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Record<string,string>"
|
||||
|
@ -1967,7 +1981,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add <b>{value}</b> here",
|
||||
"description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add <b>{translated(value)}</b> here",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Record<string,string>"
|
||||
|
@ -2010,7 +2024,7 @@
|
|||
}
|
||||
},
|
||||
"maxSnapDistance": {
|
||||
"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",
|
||||
"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\nifunset: Do not snap to a layer",
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
|
@ -2110,7 +2124,7 @@
|
|||
]
|
||||
},
|
||||
"deletion": {
|
||||
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n### The delete dialog\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted fromOSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n##### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.\n\ngroup: editing\ntypes: Use an advanced delete configuration ; boolean\niftrue: Allow deletion\niffalse: Do not allow deletion",
|
||||
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n### The delete dialog\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted fromOSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n##### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.\n\ngroup: editing\ntypes: Use an advanced delete configuration ; boolean\niftrue: Allow deletion\niffalse: Do not allow deletion\nifunset: Do not allow deletion",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/DeleteConfigJson"
|
||||
|
@ -2286,7 +2300,7 @@
|
|||
"type": "number"
|
||||
},
|
||||
"title": {
|
||||
"description": "question: What title should be shown on the infobox?\nThe title shown in a popup for elements of this layer.\n\ngroup: title\ntypes: use a fixed translation ; Use a dynamic tagRendering ; hidden\ntypesdefault: 1\ntype: translation",
|
||||
"description": "question: What title should be shown on the infobox?\nThe title shown in a popup for elements of this layer.\n\ngroup: title\ntypes: use a fixed translation ; Use a dynamic tagRendering ; hidden\ntypesdefault: 1\ntype: translation\ninline: {translated{value}}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Record<string,string>"
|
||||
|
@ -2367,7 +2381,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add <b>{value}</b> here",
|
||||
"description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add <b>{translated(value)}</b> here",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Record<string,string>"
|
||||
|
@ -2410,7 +2424,7 @@
|
|||
}
|
||||
},
|
||||
"maxSnapDistance": {
|
||||
"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",
|
||||
"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\nifunset: Do not snap to a layer",
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
|
@ -2510,7 +2524,7 @@
|
|||
]
|
||||
},
|
||||
"deletion": {
|
||||
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n### The delete dialog\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted fromOSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n##### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.\n\ngroup: editing\ntypes: Use an advanced delete configuration ; boolean\niftrue: Allow deletion\niffalse: Do not allow deletion",
|
||||
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n### The delete dialog\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted fromOSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n##### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.\n\ngroup: editing\ntypes: Use an advanced delete configuration ; boolean\niftrue: Allow deletion\niffalse: Do not allow deletion\nifunset: Do not allow deletion",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/DeleteConfigJson"
|
||||
|
|
|
@ -427,6 +427,93 @@ export default {
|
|||
"canonicalDenomination"
|
||||
]
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
]
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"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",
|
||||
|
@ -602,93 +689,6 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
]
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Record<string,string[]>": {
|
||||
"type": "object"
|
||||
},
|
||||
|
@ -835,7 +835,7 @@ export default {
|
|||
"description": "Badge to show\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -883,7 +883,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"label": {
|
||||
"description": "question: What label should be shown beneath the marker?\nFor example: `<div style=\"background: white\">{name}</div>`\n\nIf the icon is undefined, then the label is shown in the center of the feature.\ntypes: Dynamic value | string\ninline: Always show label <b>{value}</b> beneath the marker",
|
||||
"description": "question: What label should be shown beneath the marker?\nFor example: `<div style=\"background: white\">{name}</div>`\n\nIf the icon is undefined, then the label is shown in the center of the feature.\ntypes: Dynamic value | string\ninline: Always show label <b>{value}</b> beneath the marker\nifunset: Do not show a label beneath the marker",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -894,7 +894,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"css": {
|
||||
"description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style <b>{value}</b> to the _entire marker_\ntypes: Dynamic value ; string",
|
||||
"description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style <b>{value}</b> to the _entire marker_\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS element to the entire marker",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -905,7 +905,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"cssClasses": {
|
||||
"description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the entire container\ntypes: Dynamic value ; string",
|
||||
"description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the entire container\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -916,7 +916,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"labelCss": {
|
||||
"description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style <b>{value}</b> to the label\ntypes: Dynamic value ; string",
|
||||
"description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style <b>{value}</b> to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -927,7 +927,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"labelCssClasses": {
|
||||
"description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the label\ntypes: Dynamic value ; string",
|
||||
"description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the label",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -1095,10 +1095,17 @@ export default {
|
|||
},
|
||||
"invalidValues": {
|
||||
"description": "question: What values of the freeform key should be interpreted as 'unknown'?\nFor example, if a feature has `shop=yes`, the question 'what type of shop is this?' should still asked\nifunset: The question will be considered answered if any value is set for the key",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/{and:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/{or:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
@ -1297,10 +1304,17 @@ export default {
|
|||
},
|
||||
"invalidValues": {
|
||||
"description": "question: What values of the freeform key should be interpreted as 'unknown'?\nFor example, if a feature has `shop=yes`, the question 'what type of shop is this?' should still asked\nifunset: The question will be considered answered if any value is set for the key",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/{and:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/{or:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
@ -1864,7 +1878,7 @@ export default {
|
|||
"type": "number"
|
||||
},
|
||||
"title": {
|
||||
"description": "question: What title should be shown on the infobox?\nThe title shown in a popup for elements of this layer.\n\ngroup: title\ntypes: use a fixed translation ; Use a dynamic tagRendering ; hidden\ntypesdefault: 1\ntype: translation",
|
||||
"description": "question: What title should be shown on the infobox?\nThe title shown in a popup for elements of this layer.\n\ngroup: title\ntypes: use a fixed translation ; Use a dynamic tagRendering ; hidden\ntypesdefault: 1\ntype: translation\ninline: {translated{value}}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Record<string,string>"
|
||||
|
@ -1945,7 +1959,7 @@ export default {
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add <b>{value}</b> here",
|
||||
"description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add <b>{translated(value)}</b> here",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Record<string,string>"
|
||||
|
@ -1988,7 +2002,7 @@ export default {
|
|||
}
|
||||
},
|
||||
"maxSnapDistance": {
|
||||
"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",
|
||||
"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\nifunset: Do not snap to a layer",
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
|
@ -2088,7 +2102,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"deletion": {
|
||||
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n### The delete dialog\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted fromOSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n##### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.\n\ngroup: editing\ntypes: Use an advanced delete configuration ; boolean\niftrue: Allow deletion\niffalse: Do not allow deletion",
|
||||
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n### The delete dialog\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted fromOSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n##### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.\n\ngroup: editing\ntypes: Use an advanced delete configuration ; boolean\niftrue: Allow deletion\niffalse: Do not allow deletion\nifunset: Do not allow deletion",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/DeleteConfigJson"
|
||||
|
@ -2263,7 +2277,7 @@ export default {
|
|||
"type": "number"
|
||||
},
|
||||
"title": {
|
||||
"description": "question: What title should be shown on the infobox?\nThe title shown in a popup for elements of this layer.\n\ngroup: title\ntypes: use a fixed translation ; Use a dynamic tagRendering ; hidden\ntypesdefault: 1\ntype: translation",
|
||||
"description": "question: What title should be shown on the infobox?\nThe title shown in a popup for elements of this layer.\n\ngroup: title\ntypes: use a fixed translation ; Use a dynamic tagRendering ; hidden\ntypesdefault: 1\ntype: translation\ninline: {translated{value}}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Record<string,string>"
|
||||
|
@ -2344,7 +2358,7 @@ export default {
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"title": {
|
||||
"description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add <b>{value}</b> here",
|
||||
"description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add <b>{translated(value)}</b> here",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Record<string,string>"
|
||||
|
@ -2387,7 +2401,7 @@ export default {
|
|||
}
|
||||
},
|
||||
"maxSnapDistance": {
|
||||
"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",
|
||||
"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\nifunset: Do not snap to a layer",
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
|
@ -2487,7 +2501,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"deletion": {
|
||||
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n### The delete dialog\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted fromOSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n##### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.\n\ngroup: editing\ntypes: Use an advanced delete configuration ; boolean\niftrue: Allow deletion\niffalse: Do not allow deletion",
|
||||
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n### The delete dialog\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted fromOSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n##### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.\n\ngroup: editing\ntypes: Use an advanced delete configuration ; boolean\niftrue: Allow deletion\niffalse: Do not allow deletion\nifunset: Do not allow deletion",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/DeleteConfigJson"
|
||||
|
|
|
@ -193,6 +193,95 @@
|
|||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"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",
|
||||
|
@ -368,95 +457,6 @@
|
|||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
|
|
|
@ -188,6 +188,93 @@ export default {
|
|||
"canonicalDenomination"
|
||||
]
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
]
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"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",
|
||||
|
@ -362,93 +449,6 @@ export default {
|
|||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
]
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
|
|
|
@ -233,6 +233,95 @@
|
|||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"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",
|
||||
|
@ -409,95 +498,6 @@
|
|||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"Record<string,string[]>": {
|
||||
"type": "object",
|
||||
"additionalProperties": false
|
||||
|
|
|
@ -228,6 +228,93 @@ export default {
|
|||
"canonicalDenomination"
|
||||
]
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
]
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"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",
|
||||
|
@ -403,93 +490,6 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
]
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Record<string,string[]>": {
|
||||
"type": "object"
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
"description": "Badge to show\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -78,7 +78,7 @@
|
|||
]
|
||||
},
|
||||
"label": {
|
||||
"description": "question: What label should be shown beneath the marker?\nFor example: `<div style=\"background: white\">{name}</div>`\n\nIf the icon is undefined, then the label is shown in the center of the feature.\ntypes: Dynamic value | string\ninline: Always show label <b>{value}</b> beneath the marker",
|
||||
"description": "question: What label should be shown beneath the marker?\nFor example: `<div style=\"background: white\">{name}</div>`\n\nIf the icon is undefined, then the label is shown in the center of the feature.\ntypes: Dynamic value | string\ninline: Always show label <b>{value}</b> beneath the marker\nifunset: Do not show a label beneath the marker",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -89,7 +89,7 @@
|
|||
]
|
||||
},
|
||||
"css": {
|
||||
"description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style <b>{value}</b> to the _entire marker_\ntypes: Dynamic value ; string",
|
||||
"description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style <b>{value}</b> to the _entire marker_\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS element to the entire marker",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -100,7 +100,7 @@
|
|||
]
|
||||
},
|
||||
"cssClasses": {
|
||||
"description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the entire container\ntypes: Dynamic value ; string",
|
||||
"description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the entire container\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -111,7 +111,7 @@
|
|||
]
|
||||
},
|
||||
"labelCss": {
|
||||
"description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style <b>{value}</b> to the label\ntypes: Dynamic value ; string",
|
||||
"description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style <b>{value}</b> to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -122,7 +122,7 @@
|
|||
]
|
||||
},
|
||||
"labelCssClasses": {
|
||||
"description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the label\ntypes: Dynamic value ; string",
|
||||
"description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the label",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -294,6 +294,95 @@
|
|||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"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",
|
||||
|
@ -469,63 +558,6 @@
|
|||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
|
|
|
@ -30,7 +30,7 @@ export default {
|
|||
"description": "Badge to show\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -78,7 +78,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"label": {
|
||||
"description": "question: What label should be shown beneath the marker?\nFor example: `<div style=\"background: white\">{name}</div>`\n\nIf the icon is undefined, then the label is shown in the center of the feature.\ntypes: Dynamic value | string\ninline: Always show label <b>{value}</b> beneath the marker",
|
||||
"description": "question: What label should be shown beneath the marker?\nFor example: `<div style=\"background: white\">{name}</div>`\n\nIf the icon is undefined, then the label is shown in the center of the feature.\ntypes: Dynamic value | string\ninline: Always show label <b>{value}</b> beneath the marker\nifunset: Do not show a label beneath the marker",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -89,7 +89,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"css": {
|
||||
"description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style <b>{value}</b> to the _entire marker_\ntypes: Dynamic value ; string",
|
||||
"description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style <b>{value}</b> to the _entire marker_\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS element to the entire marker",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -100,7 +100,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"cssClasses": {
|
||||
"description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the entire container\ntypes: Dynamic value ; string",
|
||||
"description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the entire container\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -111,7 +111,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"labelCss": {
|
||||
"description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style <b>{value}</b> to the label\ntypes: Dynamic value ; string",
|
||||
"description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style <b>{value}</b> to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -122,7 +122,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"labelCssClasses": {
|
||||
"description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the label\ntypes: Dynamic value ; string",
|
||||
"description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the label",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -289,6 +289,93 @@ export default {
|
|||
"canonicalDenomination"
|
||||
]
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
]
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"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",
|
||||
|
@ -463,62 +550,6 @@ export default {
|
|||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
]
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
|
|
|
@ -53,10 +53,17 @@
|
|||
},
|
||||
"invalidValues": {
|
||||
"description": "question: What values of the freeform key should be interpreted as 'unknown'?\nFor example, if a feature has `shop=yes`, the question 'what type of shop is this?' should still asked\nifunset: The question will be considered answered if any value is set for the key",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/{and:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/{or:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
@ -328,6 +335,95 @@
|
|||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"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",
|
||||
|
@ -504,95 +600,6 @@
|
|||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"Record<string,string[]>": {
|
||||
"type": "object",
|
||||
"additionalProperties": false
|
||||
|
|
|
@ -53,10 +53,17 @@ export default {
|
|||
},
|
||||
"invalidValues": {
|
||||
"description": "question: What values of the freeform key should be interpreted as 'unknown'?\nFor example, if a feature has `shop=yes`, the question 'what type of shop is this?' should still asked\nifunset: The question will be considered answered if any value is set for the key",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/{and:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/{or:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
@ -323,6 +330,93 @@ export default {
|
|||
"canonicalDenomination"
|
||||
]
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
]
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"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",
|
||||
|
@ -498,93 +592,6 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
]
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Record<string,string[]>": {
|
||||
"type": "object"
|
||||
},
|
||||
|
|
|
@ -160,6 +160,95 @@
|
|||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"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",
|
||||
|
@ -336,95 +425,6 @@
|
|||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"Record<string,string[]>": {
|
||||
"type": "object",
|
||||
"additionalProperties": false
|
||||
|
|
|
@ -155,6 +155,93 @@ export default {
|
|||
"canonicalDenomination"
|
||||
]
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
]
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"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",
|
||||
|
@ -330,93 +417,6 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
"IconConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"description": "question: What icon should be used?\ntype: icon\nsuggestions: return [\"pin\",\"square\",\"circle\",\"checkmark\",\"clock\",\"close\",\"crosshair\",\"help\",\"home\",\"invalid\",\"location\",\"location_empty\",\"location_locked\",\"note\",\"resolved\",\"ring\",\"scissors\",\"teardrop\",\"teardrop_with_hole_green\",\"triangle\"].map(i => ({if: \"value=\"+i, then: i, icon: i}))",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
"override"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"icon"
|
||||
]
|
||||
},
|
||||
"MinimalTagRenderingConfigJson": {
|
||||
"description": "Mostly used for lineRendering and pointRendering",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"render": {
|
||||
"description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`",
|
||||
"type": "string"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Record<string,string[]>": {
|
||||
"type": "object"
|
||||
},
|
||||
|
|
|
@ -813,6 +813,16 @@ video {
|
|||
margin: 1px;
|
||||
}
|
||||
|
||||
.mx-2 {
|
||||
margin-left: 0.5rem;
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
|
||||
.my-1 {
|
||||
margin-top: 0.25rem;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.mx-1 {
|
||||
margin-left: 0.25rem;
|
||||
margin-right: 0.25rem;
|
||||
|
@ -838,16 +848,6 @@ video {
|
|||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.mx-2 {
|
||||
margin-left: 0.5rem;
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
|
||||
.my-1 {
|
||||
margin-top: 0.25rem;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.mx-4 {
|
||||
margin-left: 1rem;
|
||||
margin-right: 1rem;
|
||||
|
@ -874,6 +874,10 @@ video {
|
|||
margin-right: 1.5rem;
|
||||
}
|
||||
|
||||
.mr-1 {
|
||||
margin-right: 0.25rem;
|
||||
}
|
||||
|
||||
.mt-1 {
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
|
@ -886,10 +890,6 @@ video {
|
|||
margin-right: 0px;
|
||||
}
|
||||
|
||||
.mr-1 {
|
||||
margin-right: 0.25rem;
|
||||
}
|
||||
|
||||
.ml-1 {
|
||||
margin-left: 0.25rem;
|
||||
}
|
||||
|
@ -1066,6 +1066,10 @@ video {
|
|||
height: 1.5rem;
|
||||
}
|
||||
|
||||
.h-4 {
|
||||
height: 1rem;
|
||||
}
|
||||
|
||||
.h-12 {
|
||||
height: 3rem;
|
||||
}
|
||||
|
@ -1076,10 +1080,6 @@ video {
|
|||
height: fit-content;
|
||||
}
|
||||
|
||||
.h-4 {
|
||||
height: 1rem;
|
||||
}
|
||||
|
||||
.h-1\/2 {
|
||||
height: 50%;
|
||||
}
|
||||
|
@ -1156,6 +1156,10 @@ video {
|
|||
width: 1.5rem;
|
||||
}
|
||||
|
||||
.w-4 {
|
||||
width: 1rem;
|
||||
}
|
||||
|
||||
.w-12 {
|
||||
width: 3rem;
|
||||
}
|
||||
|
@ -1174,10 +1178,6 @@ video {
|
|||
width: 6rem;
|
||||
}
|
||||
|
||||
.w-4 {
|
||||
width: 1rem;
|
||||
}
|
||||
|
||||
.w-0 {
|
||||
width: 0px;
|
||||
}
|
||||
|
@ -1483,14 +1483,14 @@ video {
|
|||
word-break: break-all;
|
||||
}
|
||||
|
||||
.rounded {
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
|
||||
.rounded-full {
|
||||
border-radius: 9999px;
|
||||
}
|
||||
|
||||
.rounded {
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
|
||||
.rounded-xl {
|
||||
border-radius: 0.75rem;
|
||||
}
|
||||
|
@ -1627,10 +1627,20 @@ video {
|
|||
border-color: rgb(107 114 128 / var(--tw-border-opacity));
|
||||
}
|
||||
|
||||
.border-gray-200 {
|
||||
--tw-border-opacity: 1;
|
||||
border-color: rgb(229 231 235 / var(--tw-border-opacity));
|
||||
}
|
||||
|
||||
.border-opacity-50 {
|
||||
--tw-border-opacity: 0.5;
|
||||
}
|
||||
|
||||
.bg-gray-500 {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(107 114 128 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-red-400 {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(248 113 113 / var(--tw-bg-opacity));
|
||||
|
|
|
@ -127,31 +127,6 @@ export default class DetermineLayout {
|
|||
return layoutToUse
|
||||
}
|
||||
|
||||
public static ShowErrorOnCustomTheme(
|
||||
intro: string = "Error: could not parse the custom layout:",
|
||||
error: BaseUIElement,
|
||||
json?: any
|
||||
) {
|
||||
new Combine([
|
||||
intro,
|
||||
error.SetClass("alert"),
|
||||
new SubtleButton(Svg.back_svg(), "Go back to the theme overview", {
|
||||
url: window.location.protocol + "//" + window.location.host + "/index.html",
|
||||
newTab: false,
|
||||
}),
|
||||
json !== undefined
|
||||
? new SubtleButton(Svg.download_svg(), "Download the JSON file").onClick(() => {
|
||||
Utils.offerContentsAsDownloadableFile(
|
||||
JSON.stringify(json, null, " "),
|
||||
"theme_definition.json"
|
||||
)
|
||||
})
|
||||
: undefined,
|
||||
])
|
||||
.SetClass("flex flex-col clickable")
|
||||
.AttachTo("maindiv")
|
||||
}
|
||||
|
||||
private static getSharedTagRenderings(): Map<string, QuestionableTagRenderingConfigJson> {
|
||||
const dict = new Map<string, QuestionableTagRenderingConfigJson>()
|
||||
|
||||
|
|
|
@ -153,9 +153,6 @@ export class Pipe<TIn, TInter, TOut> extends Conversion<TIn, TOut> {
|
|||
|
||||
convert(json: TIn, context: ConversionContext): TOut {
|
||||
const r0 = this._step0.convert(json, context.inOperation(this._step0.name))
|
||||
if (context.hasErrors()) {
|
||||
return undefined
|
||||
}
|
||||
return this._step1.convert(r0, context.inOperation(this._step1.name))
|
||||
}
|
||||
}
|
||||
|
@ -308,9 +305,6 @@ export class Fuse<T> extends DesugaringStep<T> {
|
|||
if (r === undefined || r === null) {
|
||||
break
|
||||
}
|
||||
if (context.hasErrors()) {
|
||||
break
|
||||
}
|
||||
json = r
|
||||
} catch (e) {
|
||||
console.error("Step " + step.name + " failed due to ", e, e.stack)
|
||||
|
|
|
@ -731,6 +731,77 @@ export class ValidateLayer extends Conversion<
|
|||
return null
|
||||
}
|
||||
|
||||
if (typeof json === "string") {
|
||||
context.err(
|
||||
`Not a valid layer: the layerConfig is a string. 'npm run generate:layeroverview' might be needed`
|
||||
)
|
||||
return undefined
|
||||
}
|
||||
|
||||
if (json.id === undefined) {
|
||||
context.err(`Not a valid layer: id is undefined: ${JSON.stringify(json)}`)
|
||||
}
|
||||
|
||||
if (json.source === undefined) {
|
||||
context.enter("source").err("No source section is defined")
|
||||
} else {
|
||||
if (json.source === "special" || json.source === "special:library") {
|
||||
} else if (json.source && json.source["osmTags"] === undefined) {
|
||||
context
|
||||
.enters("source", "osmTags")
|
||||
.err(
|
||||
"No osmTags defined in the source section - these should always be present, even for geojson layer"
|
||||
)
|
||||
} else {
|
||||
const osmTags = TagUtils.Tag(json.source["osmTags"], context + "source.osmTags")
|
||||
if (osmTags.isNegative()) {
|
||||
context
|
||||
.enters("source", "osmTags")
|
||||
.err(
|
||||
"The source states tags which give a very wide selection: it only uses negative expressions, which will result in too much and unexpected data. Add at least one required tag. The tags are:\n\t" +
|
||||
osmTags.asHumanString(false, false, {})
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if (json.source["geoJsonSource"] !== undefined) {
|
||||
context
|
||||
.enters("source", "geoJsonSource")
|
||||
.err("Use 'geoJson' instead of 'geoJsonSource'")
|
||||
}
|
||||
|
||||
if (json.source["geojson"] !== undefined) {
|
||||
context
|
||||
.enters("source", "geojson")
|
||||
.err("Use 'geoJson' instead of 'geojson' (the J is a capital letter)")
|
||||
}
|
||||
}
|
||||
|
||||
if (json.id?.toLowerCase() !== json.id) {
|
||||
context.enter("id").err(`The id of a layer should be lowercase: ${json.id}`)
|
||||
}
|
||||
if (json.id?.match(/[a-z0-9-_]/) == null) {
|
||||
context.enter("id").err(`The id of a layer should match [a-z0-9-_]*: ${json.id}`)
|
||||
}
|
||||
|
||||
if (
|
||||
json.syncSelection !== undefined &&
|
||||
LayerConfig.syncSelectionAllowed.indexOf(json.syncSelection) < 0
|
||||
) {
|
||||
context
|
||||
.enter("syncSelection")
|
||||
.err(
|
||||
"Invalid sync-selection: must be one of " +
|
||||
LayerConfig.syncSelectionAllowed.map((v) => `'${v}'`).join(", ") +
|
||||
" but got '" +
|
||||
json.syncSelection +
|
||||
"'"
|
||||
)
|
||||
}
|
||||
|
||||
if (context.hasErrors()) {
|
||||
return undefined
|
||||
}
|
||||
let layerConfig: LayerConfig
|
||||
try {
|
||||
layerConfig = new LayerConfig(json, "validation", true)
|
||||
|
|
|
@ -136,7 +136,7 @@ export interface LayerConfigJson {
|
|||
* There are a few extra functions available. Refer to <a>Docs/CalculatedTags.md</a> for more information
|
||||
* The functions will be run in order, e.g.
|
||||
* [
|
||||
* "_max_overlap_m2=Math.max(...feat.overlapsWith("someOtherLayer").map(o => o.overlap))
|
||||
Not found... * "_max_overlap_m2=Math.max(...feat.overlapsWith("someOtherLayer").map(o => o.overlap))
|
||||
* "_max_overlap_ratio=Number(feat._max_overlap_m2)/feat.area
|
||||
* ]
|
||||
*
|
||||
|
@ -208,6 +208,7 @@ export interface LayerConfigJson {
|
|||
* types: use a fixed translation ; Use a dynamic tagRendering ; hidden
|
||||
* typesdefault: 1
|
||||
* type: translation
|
||||
* inline: {translated{value}}
|
||||
*/
|
||||
title?: TagRenderingConfigJson | Translatable
|
||||
|
||||
|
@ -309,7 +310,7 @@ export interface LayerConfigJson {
|
|||
* Do _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!
|
||||
*
|
||||
* question: What is the word to describe this object?
|
||||
* inline: Add <b>{value}</b> here
|
||||
* inline: Add <b>{translated(value)}</b> here
|
||||
*/
|
||||
title: Translatable
|
||||
/**
|
||||
|
@ -360,7 +361,7 @@ export interface LayerConfigJson {
|
|||
* If further away, it'll be placed in the center of the location input
|
||||
* Distance in meter
|
||||
*
|
||||
* Default: 10
|
||||
* ifunset: Do not snap to a layer
|
||||
*/
|
||||
maxSnapDistance?: number
|
||||
}[]
|
||||
|
@ -463,6 +464,7 @@ export interface LayerConfigJson {
|
|||
* types: Use an advanced delete configuration ; boolean
|
||||
* iftrue: Allow deletion
|
||||
* iffalse: Do not allow deletion
|
||||
* ifunset: Do not allow deletion
|
||||
*
|
||||
**/
|
||||
deletion?: DeleteConfigJson | boolean
|
||||
|
|
|
@ -18,7 +18,6 @@ export default interface LineRenderingConfigJson {
|
|||
* types: dynamic value ; string
|
||||
* title: Line Colour
|
||||
* inline: The line colour always is <b>{value}</b>
|
||||
* ifunset: Round ending
|
||||
* type: color
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -91,6 +91,7 @@ export default interface PointRenderingConfigJson {
|
|||
* If the icon is undefined, then the label is shown in the center of the feature.
|
||||
* types: Dynamic value | string
|
||||
* inline: Always show label <b>{value}</b> beneath the marker
|
||||
* ifunset: Do not show a label beneath the marker
|
||||
*/
|
||||
label?: string | TagRenderingConfigJson
|
||||
|
||||
|
@ -100,6 +101,8 @@ export default interface PointRenderingConfigJson {
|
|||
* This will be applied to the _container_ containing both the marker and the label
|
||||
* inline: Apply CSS-style <b>{value}</b> to the _entire marker_
|
||||
* types: Dynamic value ; string
|
||||
* ifunset: Do not apply extra CSS element to the entire marker
|
||||
*
|
||||
*/
|
||||
css?: string | TagRenderingConfigJson
|
||||
|
||||
|
@ -111,7 +114,9 @@ export default interface PointRenderingConfigJson {
|
|||
* You can use most Tailwind-css classes, see https://tailwindcss.com/ for more information
|
||||
* For example: `center bg-gray-500 mx-2 my-1 rounded-full`
|
||||
* inline: Apply CSS-classes <b>{value}</b> to the entire container
|
||||
* ifunset: Do not apply extra CSS-classes to the label
|
||||
* types: Dynamic value ; string
|
||||
* ifunset: Do not apply extra CSS-classes to the entire marker
|
||||
*/
|
||||
cssClasses?: string | TagRenderingConfigJson
|
||||
|
||||
|
@ -120,6 +125,8 @@ export default interface PointRenderingConfigJson {
|
|||
* You can set the css-properties here, e.g. `background: red; font-size: 12px; `
|
||||
* inline: Apply CSS-style <b>{value}</b> to the label
|
||||
* types: Dynamic value ; string
|
||||
* ifunset: Do not apply extra CSS-labels to the label
|
||||
*
|
||||
*/
|
||||
labelCss?: TagRenderingConfigJson | string
|
||||
|
||||
|
@ -131,6 +138,7 @@ export default interface PointRenderingConfigJson {
|
|||
* For example: `center bg-gray-500 mx-2 my-1 rounded-full`
|
||||
* inline: Apply CSS-classes <b>{value}</b> to the label
|
||||
* types: Dynamic value ; string
|
||||
* ifunset: Do not apply extra CSS-classes to the label
|
||||
*/
|
||||
labelCssClasses?: string | TagRenderingConfigJson
|
||||
|
||||
|
|
|
@ -187,7 +187,7 @@ export interface QuestionableTagRenderingConfigJson extends TagRenderingConfigJs
|
|||
*
|
||||
* question: Should a contributor be allowed to select multiple mappings?
|
||||
*
|
||||
* iftrue: allow to select multiple mappigns
|
||||
* iftrue: allow to select multiple mappings
|
||||
* iffalse: only allow to select a single mapping
|
||||
* ifunset: only allow to select a single mapping
|
||||
*/
|
||||
|
@ -250,7 +250,7 @@ export interface QuestionableTagRenderingConfigJson extends TagRenderingConfigJs
|
|||
* For example, if a feature has `shop=yes`, the question 'what type of shop is this?' should still asked
|
||||
* ifunset: The question will be considered answered if any value is set for the key
|
||||
*/
|
||||
invalidValues?: string[]
|
||||
invalidValues?: TagConfigJson
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -75,65 +75,17 @@ export default class LayerConfig extends WithContextLoader {
|
|||
const translationContext = "layers:" + json.id
|
||||
super(json, context)
|
||||
this.id = json.id
|
||||
if (typeof json === "string") {
|
||||
throw `Not a valid layer: the layerConfig is a string. 'npm run generate:layeroverview' might be needed (at ${context})`
|
||||
}
|
||||
|
||||
if (json.id === undefined) {
|
||||
throw `Not a valid layer: id is undefined: ${JSON.stringify(json)} (At ${context})`
|
||||
}
|
||||
|
||||
if (json.source === undefined) {
|
||||
throw "Layer " + this.id + " does not define a source section (" + context + ")"
|
||||
}
|
||||
|
||||
if (json.source === "special" || json.source === "special:library") {
|
||||
this.source = null
|
||||
} else if (json.source["osmTags"] === undefined) {
|
||||
throw (
|
||||
"Layer " +
|
||||
this.id +
|
||||
" does not define a osmTags in the source section - these should always be present, even for geojson layers (" +
|
||||
context +
|
||||
")"
|
||||
)
|
||||
}
|
||||
|
||||
if (json.id.toLowerCase() !== json.id) {
|
||||
throw `${context}: The id of a layer should be lowercase: ${json.id}`
|
||||
}
|
||||
if (json.id.match(/[a-z0-9-_]/) == null) {
|
||||
throw `${context}: The id of a layer should match [a-z0-9-_]*: ${json.id}`
|
||||
}
|
||||
|
||||
if (
|
||||
json.syncSelection !== undefined &&
|
||||
LayerConfig.syncSelectionAllowed.indexOf(json.syncSelection) < 0
|
||||
) {
|
||||
throw (
|
||||
context +
|
||||
" Invalid sync-selection: must be one of " +
|
||||
LayerConfig.syncSelectionAllowed.map((v) => `'${v}'`).join(", ") +
|
||||
" but got '" +
|
||||
json.syncSelection +
|
||||
"'"
|
||||
)
|
||||
}
|
||||
this.syncSelection = json.syncSelection ?? "no"
|
||||
if (typeof json.source !== "string") {
|
||||
this.maxAgeOfCache = json.source["maxCacheAge"] ?? 24 * 60 * 60 * 30
|
||||
const osmTags = TagUtils.Tag(json.source["osmTags"], context + "source.osmTags")
|
||||
if (osmTags.isNegative()) {
|
||||
throw (
|
||||
context +
|
||||
"The source states tags which give a very wide selection: it only uses negative expressions, which will result in too much and unexpected data. Add at least one required tag. The tags are:\n\t" +
|
||||
osmTags.asHumanString(false, false, {})
|
||||
)
|
||||
}
|
||||
|
||||
this.source = new SourceConfig(
|
||||
{
|
||||
osmTags: osmTags,
|
||||
osmTags: TagUtils.Tag(json.source["osmTags"], context + "source.osmTags"),
|
||||
geojsonSource: json.source["geoJson"],
|
||||
geojsonSourceLevel: json.source["geoJsonZoomLevel"],
|
||||
overpassScript: json.source["overpassScript"],
|
||||
|
@ -145,14 +97,6 @@ export default class LayerConfig extends WithContextLoader {
|
|||
)
|
||||
}
|
||||
|
||||
if (json.source["geoJsonSource"] !== undefined) {
|
||||
throw context + "Use 'geoJson' instead of 'geoJsonSource'"
|
||||
}
|
||||
|
||||
if (json.source["geojson"] !== undefined) {
|
||||
throw context + "Use 'geoJson' instead of 'geojson' (the J is a capital letter)"
|
||||
}
|
||||
|
||||
this.allowSplit = json.allowSplit ?? false
|
||||
this.name = Translations.T(json.name, translationContext + ".name")
|
||||
if (json.units !== undefined && !Array.isArray(json.units)) {
|
||||
|
|
|
@ -53,6 +53,7 @@ export default class TagRenderingConfig {
|
|||
public readonly question?: TypedTranslation<object>
|
||||
public readonly questionhint?: TypedTranslation<object>
|
||||
public readonly condition?: TagsFilter
|
||||
public readonly invalidValues?: TagsFilter
|
||||
/**
|
||||
* Evaluated against the current 'usersettings'-state
|
||||
*/
|
||||
|
@ -133,6 +134,9 @@ export default class TagRenderingConfig {
|
|||
this.questionhint = Translations.T(json.questionHint, translationKey + ".questionHint")
|
||||
this.description = Translations.T(json.description, translationKey + ".description")
|
||||
this.condition = TagUtils.Tag(json.condition ?? { and: [] }, `${context}.condition`)
|
||||
this.invalidValues = json["invalidValues"]
|
||||
? TagUtils.Tag(json["invalidValues"], `${context}.invalidValues`)
|
||||
: undefined
|
||||
if (typeof json.icon === "string") {
|
||||
this.renderIcon = json.icon
|
||||
this.renderIconClass = "small"
|
||||
|
@ -469,9 +473,12 @@ export default class TagRenderingConfig {
|
|||
*/
|
||||
public IsKnown(tags: Record<string, string>): boolean {
|
||||
if (this.condition && !this.condition.matchesProperties(tags)) {
|
||||
// Filtered away by the condition, so it is kindof known
|
||||
// Filtered away by the condition, so it is kind of known
|
||||
return true
|
||||
}
|
||||
if (this.invalidValues && this.invalidValues.matchesProperties(tags)) {
|
||||
return false
|
||||
}
|
||||
if (this.multiAnswer) {
|
||||
for (const m of this.mappings ?? []) {
|
||||
if (TagUtils.MatchesMultiAnswer(m.if, tags)) {
|
||||
|
@ -482,6 +489,9 @@ export default class TagRenderingConfig {
|
|||
const free = this.freeform?.key
|
||||
if (free !== undefined) {
|
||||
const value = tags[free]
|
||||
if (typeof value === "object") {
|
||||
return Object.keys(value).length > 0
|
||||
}
|
||||
return value !== undefined && value !== ""
|
||||
}
|
||||
return false
|
||||
|
@ -679,7 +689,9 @@ export default class TagRenderingConfig {
|
|||
multiSelectedMapping: boolean[] | undefined,
|
||||
currentProperties: Record<string, string>
|
||||
): UploadableTag {
|
||||
freeformValue = freeformValue?.trim()
|
||||
if (typeof freeformValue === "string") {
|
||||
freeformValue = freeformValue?.trim()
|
||||
}
|
||||
const validator = Validators.get(<ValidatorType>this.freeform?.type)
|
||||
if (validator && freeformValue) {
|
||||
freeformValue = validator.reformat(freeformValue, () => currentProperties["_country"])
|
||||
|
|
|
@ -141,7 +141,7 @@
|
|||
*/
|
||||
const kv = selectedTags.asChange(tags.data);
|
||||
for (const { k, v } of kv) {
|
||||
if (v === undefined) {
|
||||
if (v === undefined || v === "") {
|
||||
delete tags.data[k];
|
||||
} else {
|
||||
tags.data[k] = v;
|
||||
|
|
|
@ -1317,6 +1317,7 @@ export default class SpecialVisualizations {
|
|||
{
|
||||
funcName: "translated",
|
||||
docs: "If the given key can be interpreted as a JSON, only show the key containing the current language (or 'en'). This specialRendering is meant to be used by MapComplete studio and is not useful in map themes",
|
||||
needsUrls: [],
|
||||
args: [
|
||||
{
|
||||
name: "key",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts">
|
||||
|
||||
import EditLayerState, { LayerStateSender } from "./EditLayerState";
|
||||
import { LayerStateSender } from "./EditLayerState";
|
||||
import layerSchemaRaw from "../../assets/schemas/layerconfigmeta.json";
|
||||
import Region from "./Region.svelte";
|
||||
import TabbedGroup from "../Base/TabbedGroup.svelte";
|
||||
|
@ -10,12 +10,13 @@
|
|||
import type { LayerConfigJson } from "../../Models/ThemeConfig/Json/LayerConfigJson";
|
||||
|
||||
const layerSchema: ConfigMeta[] = <any>layerSchemaRaw;
|
||||
let state = new EditLayerState(layerSchema);
|
||||
|
||||
export let state;
|
||||
const messages = state.messages;
|
||||
export let initialLayerConfig: Partial<LayerConfigJson> = {};
|
||||
state.configuration.setData(initialLayerConfig);
|
||||
const configuration = state.configuration;
|
||||
new LayerStateSender("http://localhost:1235", state);
|
||||
new LayerStateSender(state);
|
||||
/**
|
||||
* Blacklist of regions for the general area tab
|
||||
* These are regions which are handled by a different tab
|
||||
|
@ -76,6 +77,7 @@
|
|||
</div>
|
||||
{#each $messages as message}
|
||||
<li>
|
||||
{message.level}
|
||||
<span class="literal-code">{message.context.path.join(".")}</span>
|
||||
{message.message}
|
||||
</li>
|
||||
|
|
|
@ -13,26 +13,21 @@ import { PrepareLayer } from "../../Models/ThemeConfig/Conversion/PrepareLayer"
|
|||
import { ValidateLayer } from "../../Models/ThemeConfig/Conversion/Validation"
|
||||
import { AllSharedLayers } from "../../Customizations/AllSharedLayers"
|
||||
import { QuestionableTagRenderingConfigJson } from "../../Models/ThemeConfig/Json/QuestionableTagRenderingConfigJson"
|
||||
import { TagUtils } from "../../Logic/Tags/TagUtils"
|
||||
import StudioServer from "./StudioServer"
|
||||
|
||||
/**
|
||||
* Sends changes back to the server
|
||||
*/
|
||||
export class LayerStateSender {
|
||||
constructor(serverLocation: string, layerState: EditLayerState) {
|
||||
constructor(layerState: EditLayerState) {
|
||||
layerState.configuration.addCallback(async (config) => {
|
||||
// console.log("Current config is", Utils.Clone(config))
|
||||
const id = config.id
|
||||
if (id === undefined) {
|
||||
console.log("No id found in layer, not updating")
|
||||
console.warn("No id found in layer, not updating")
|
||||
return
|
||||
}
|
||||
const fresponse = await fetch(`${serverLocation}/layers/${id}/${id}.json`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json;charset=utf-8",
|
||||
},
|
||||
body: JSON.stringify(config, null, " "),
|
||||
})
|
||||
await layerState.server.updateLayer(<LayerConfigJson>config)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -47,9 +42,11 @@ export default class EditLayerState {
|
|||
Partial<LayerConfigJson>
|
||||
>({})
|
||||
public readonly messages: Store<ConversionMessage[]>
|
||||
public readonly server: StudioServer
|
||||
|
||||
constructor(schema: ConfigMeta[]) {
|
||||
constructor(schema: ConfigMeta[], server: StudioServer) {
|
||||
this.schema = schema
|
||||
this.server = server
|
||||
this.osmConnection = new OsmConnection({
|
||||
oauth_token: QueryParameters.GetQueryParameter(
|
||||
"oauth_token",
|
||||
|
@ -73,18 +70,36 @@ export default class EditLayerState {
|
|||
sharedLayers: layers,
|
||||
}
|
||||
}
|
||||
this.messages = this.configuration.map((config) => {
|
||||
this.messages = this.configuration.mapD((config) => {
|
||||
const context = ConversionContext.construct([], ["prepare"])
|
||||
|
||||
for (let i = 0; i < (config.tagRenderings ?? []).length; i++) {
|
||||
const tr = config.tagRenderings[i]
|
||||
if (typeof tr === "string") {
|
||||
continue
|
||||
}
|
||||
if (!tr["id"] && !tr["override"]) {
|
||||
const qtr = <QuestionableTagRenderingConfigJson>tr
|
||||
let id = "" + i
|
||||
if (qtr?.freeform?.key) {
|
||||
id = qtr?.freeform?.key
|
||||
} else if (qtr.mappings?.[0]?.if) {
|
||||
id =
|
||||
qtr.freeform?.key ??
|
||||
TagUtils.Tag(qtr.mappings[0].if).usedKeys()?.[0] ??
|
||||
"" + i
|
||||
}
|
||||
qtr["id"] = id
|
||||
}
|
||||
}
|
||||
|
||||
const prepare = new Pipe(
|
||||
new PrepareLayer(state),
|
||||
new ValidateLayer("dynamic", false, undefined)
|
||||
)
|
||||
prepare.convert(<LayerConfigJson>config, context)
|
||||
console.log(context.messages)
|
||||
return context.messages
|
||||
})
|
||||
console.log("Configuration store:", this.configuration)
|
||||
}
|
||||
|
||||
public getCurrentValueFor(path: ReadonlyArray<string | number>): any | undefined {
|
||||
|
@ -104,7 +119,6 @@ export default class EditLayerState {
|
|||
public getStoreFor(path: ReadonlyArray<string | number>): UIEventSource<any | undefined> {
|
||||
const store = new UIEventSource<any>(this.getCurrentValueFor(path))
|
||||
store.addCallback((v) => {
|
||||
console.log("UPdating store", path, v)
|
||||
this.setValueAt(path, v)
|
||||
})
|
||||
return store
|
||||
|
@ -156,7 +170,6 @@ export default class EditLayerState {
|
|||
|
||||
public setValueAt(path: ReadonlyArray<string | number>, v: any) {
|
||||
let entry = this.configuration.data
|
||||
console.log("Setting value", v, "to", path, "in entry", entry)
|
||||
for (let i = 0; i < path.length - 1; i++) {
|
||||
const breadcrumb = path[i]
|
||||
if (entry[breadcrumb] === undefined) {
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
const subparts: ConfigMeta = state.getSchemaStartingWith(schema.path)
|
||||
.filter(part => part.path.length - 1 === schema.path.length);
|
||||
console.log("For ", schema.path, "got subparts", subparts)
|
||||
/**
|
||||
* Store the _indices_
|
||||
*/
|
||||
|
|
|
@ -100,6 +100,7 @@
|
|||
try {
|
||||
onDestroy(state.register(path, tags.map(tgs => {
|
||||
const v = tgs["value"];
|
||||
console.log("Registering",path,"setting value to", v)
|
||||
if(typeof v !== "string"){
|
||||
return v
|
||||
}
|
||||
|
@ -116,6 +117,9 @@
|
|||
}
|
||||
}
|
||||
if (schema.type === "number") {
|
||||
if(v === ""){
|
||||
return undefined
|
||||
}
|
||||
return Number(v)
|
||||
}
|
||||
if (isTranslation) {
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
types.splice(hasBooleanOption);
|
||||
}
|
||||
|
||||
|
||||
let lastIsString = false;
|
||||
{
|
||||
const types: string | string[] = Array.isArray(schema.type) ? schema.type[schema.type.length - 1].type : [];
|
||||
|
@ -217,5 +218,4 @@
|
|||
path={[...subpath, (subschema?.path?.at(-1) ?? "???")]}></SchemaBasedInput>
|
||||
{/each}
|
||||
{/if}
|
||||
{chosenOption}
|
||||
</div>
|
||||
|
|
|
@ -3,15 +3,15 @@ import Constants from "../../Models/Constants"
|
|||
import { LayerConfigJson } from "../../Models/ThemeConfig/Json/LayerConfigJson"
|
||||
|
||||
export default class StudioServer {
|
||||
private _url: string
|
||||
private readonly url: string
|
||||
|
||||
constructor(url: string) {
|
||||
this._url = url
|
||||
this.url = url
|
||||
}
|
||||
|
||||
public async fetchLayerOverview(): Promise<Set<string>> {
|
||||
const { allFiles } = <{ allFiles: string[] }>(
|
||||
await Utils.downloadJson(this._url + "/overview")
|
||||
await Utils.downloadJson(this.url + "/overview")
|
||||
)
|
||||
const layers = allFiles
|
||||
.filter((f) => f.startsWith("layers/"))
|
||||
|
@ -20,19 +20,27 @@ export default class StudioServer {
|
|||
return new Set<string>(layers)
|
||||
}
|
||||
|
||||
async fetchLayer(layerId: string, checkNew: boolean = false): Promise<LayerConfigJson> {
|
||||
async fetchLayer(layerId: string): Promise<LayerConfigJson> {
|
||||
try {
|
||||
return await Utils.downloadJson(
|
||||
this._url +
|
||||
"/layers/" +
|
||||
layerId +
|
||||
"/" +
|
||||
layerId +
|
||||
".json" +
|
||||
(checkNew ? ".new.json" : "")
|
||||
this.url + "/layers/" + layerId + "/" + layerId + ".json"
|
||||
)
|
||||
} catch (e) {
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
async updateLayer(config: LayerConfigJson) {
|
||||
const id = config.id
|
||||
if (id === undefined || id === "") {
|
||||
return
|
||||
}
|
||||
await fetch(`${this.url}/layers/${id}/${id}.json`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json;charset=utf-8",
|
||||
},
|
||||
body: JSON.stringify(config, null, " "),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,6 +82,7 @@ const freeformSchema = <ConfigMeta[]> questionableTagRenderingSchemaRaw.filter(
|
|||
|
||||
<SchemaBasedField {state} path={[...path,"question"]} schema={topLevelItems["question"]}></SchemaBasedField>
|
||||
<SchemaBasedField {state} path={[...path,"questionHint"]} schema={topLevelItems["questionHint"]}></SchemaBasedField>
|
||||
<SchemaBasedField {state} path={[...path,"render"]} schema={topLevelItems["render"]}></SchemaBasedField>
|
||||
|
||||
{#each ($mappings ?? []) as mapping, i (mapping)}
|
||||
<div class="flex interactive w-full">
|
||||
|
@ -102,7 +103,12 @@ const freeformSchema = <ConfigMeta[]> questionableTagRenderingSchemaRaw.filter(
|
|||
Add a mapping
|
||||
</button>
|
||||
|
||||
<SchemaBasedField {state} path={[...path,"multiAnswer"]} schema={topLevelItems["multiAnswer"]}></SchemaBasedField>
|
||||
|
||||
<div class="border border-gray-200 border-dashed">
|
||||
<h3>Text field and input element configuration</h3>
|
||||
<Region {state} {path} configs={freeformSchema}/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{/if}
|
||||
|
|
|
@ -14,8 +14,9 @@
|
|||
import { OsmConnection } from "../Logic/Osm/OsmConnection";
|
||||
import { QueryParameters } from "../Logic/Web/QueryParameters";
|
||||
|
||||
import layerSchemaRaw from "../../src/assets/schemas/layerconfigmeta.json";
|
||||
|
||||
export let studioUrl = "http://127.0.0.1:1235";
|
||||
export let studioUrl = /*"https://studio.mapcomplete.org"; /*/ "http://127.0.0.1:1235"; //*/
|
||||
const studio = new StudioServer(studioUrl);
|
||||
let layers = UIEventSource.FromPromise(studio.fetchLayerOverview());
|
||||
let state: undefined | "edit_layer" | "new_layer" | "edit_theme" | "new_theme" | "editing_layer" | "loading" = undefined;
|
||||
|
@ -33,101 +34,121 @@
|
|||
}, [layers]);
|
||||
|
||||
|
||||
let editLayerState = new EditLayerState();
|
||||
const layerSchema: ConfigMeta[] = <any>layerSchemaRaw;
|
||||
|
||||
let editLayerState = new EditLayerState(layerSchema, studio);
|
||||
|
||||
function fetchIconDescription(layerId): any {
|
||||
const icon = AllSharedLayers.getSharedLayersConfigs().get(layerId)?._layerIcon;
|
||||
console.log(icon);
|
||||
return icon;
|
||||
return AllSharedLayers.getSharedLayersConfigs().get(layerId)?._layerIcon;
|
||||
}
|
||||
|
||||
async function createNewLayer(){
|
||||
state = "loading"
|
||||
const id = newLayerId.data
|
||||
const createdBy = osmConnection.userDetails.data.name
|
||||
|
||||
const loaded = await studio.fetchLayer(id, true)
|
||||
initialLayerConfig = loaded ?? {id, credits: createdBy};
|
||||
state = "editing_layer"}
|
||||
|
||||
let osmConnection = new OsmConnection( new OsmConnection({
|
||||
async function createNewLayer() {
|
||||
state = "loading";
|
||||
const id = newLayerId.data;
|
||||
const createdBy = osmConnection.userDetails.data.name;
|
||||
|
||||
try {
|
||||
|
||||
const loaded = await studio.fetchLayer(id);
|
||||
initialLayerConfig = loaded ?? {
|
||||
id, credits: createdBy,
|
||||
pointRendering: [
|
||||
{
|
||||
location: ["point", "centroid"],
|
||||
marker: [{
|
||||
icon: "circle",
|
||||
color: "white"
|
||||
}]
|
||||
}
|
||||
],
|
||||
lineRendering : [{
|
||||
width : 1,
|
||||
color: "blue"
|
||||
}]
|
||||
};
|
||||
} catch (e) {
|
||||
initialLayerConfig = { id, credits: createdBy };
|
||||
}
|
||||
state = "editing_layer";
|
||||
}
|
||||
|
||||
let osmConnection = new OsmConnection(new OsmConnection({
|
||||
oauth_token: QueryParameters.GetQueryParameter(
|
||||
"oauth_token",
|
||||
undefined,
|
||||
"Used to complete the login"
|
||||
),
|
||||
}))
|
||||
)
|
||||
}));
|
||||
|
||||
</script>
|
||||
|
||||
<LoginToggle state={{osmConnection}}>
|
||||
<div slot="not-logged-in" >
|
||||
<NextButton clss="primary">
|
||||
Please log in to use MapComplete Studio
|
||||
</NextButton>
|
||||
</div>
|
||||
{#if state === undefined}
|
||||
<h1>MapComplete Studio</h1>
|
||||
<div class="w-full flex flex-col">
|
||||
|
||||
<NextButton on:click={() => state = "edit_layer"}>
|
||||
Edit an existing layer
|
||||
</NextButton>
|
||||
<NextButton on:click={() => state = "new_layer"}>
|
||||
Create a new layer
|
||||
</NextButton>
|
||||
<NextButton on:click={() => state = "edit_theme"}>
|
||||
Edit a theme
|
||||
</NextButton>
|
||||
<NextButton on:click={() => state = "new_theme"}>
|
||||
Create a new theme
|
||||
<LoginToggle state={{osmConnection}} ignoreLoading={true}>
|
||||
<div slot="not-logged-in">
|
||||
<NextButton clss="primary">
|
||||
Please log in to use MapComplete Studio
|
||||
</NextButton>
|
||||
</div>
|
||||
{:else if state === "edit_layer"}
|
||||
<div class="flex flex-wrap">
|
||||
{#each Array.from($layers) as layerId}
|
||||
<NextButton clss="small" on:click={async () => {
|
||||
console.log("Editing layer",layerId)
|
||||
{#if state === undefined}
|
||||
<h1>MapComplete Studio</h1>
|
||||
<div class="w-full flex flex-col">
|
||||
|
||||
<NextButton on:click={() => state = "edit_layer"}>
|
||||
Edit an existing layer
|
||||
</NextButton>
|
||||
<NextButton on:click={() => state = "new_layer"}>
|
||||
Create a new layer
|
||||
</NextButton>
|
||||
<NextButton on:click={() => state = "edit_theme"}>
|
||||
Edit a theme
|
||||
</NextButton>
|
||||
<NextButton on:click={() => state = "new_theme"}>
|
||||
Create a new theme
|
||||
</NextButton>
|
||||
</div>
|
||||
{:else if state === "edit_layer"}
|
||||
<div class="flex flex-wrap">
|
||||
{#each Array.from($layers) as layerId}
|
||||
<NextButton clss="small" on:click={async () => {
|
||||
state = "loading"
|
||||
initialLayerConfig = await studio.fetchLayer(layerId)
|
||||
state = "editing_layer"
|
||||
}}>
|
||||
<div class="w-4 h-4 mr-1">
|
||||
<Marker icons={fetchIconDescription(layerId)} />
|
||||
<div class="w-4 h-4 mr-1">
|
||||
<Marker icons={fetchIconDescription(layerId)} />
|
||||
</div>
|
||||
{layerId}
|
||||
</NextButton>
|
||||
{/each}
|
||||
</div>
|
||||
{:else if state === "new_layer"}
|
||||
<div class="interactive flex m-2 rounded-2xl flex-col p-2">
|
||||
<h3>Enter the ID for the new layer</h3>
|
||||
A good ID is:
|
||||
<ul>
|
||||
<li>a noun</li>
|
||||
<li>singular</li>
|
||||
<li>describes the object</li>
|
||||
<li>in English</li>
|
||||
</ul>
|
||||
<div class="m-2 p-2 w-full">
|
||||
|
||||
<ValidatedInput type="id" value={newLayerId} feedback={layerIdFeedback} on:submit={() => createNewLayer()} />
|
||||
</div>
|
||||
{#if $layerIdFeedback !== undefined}
|
||||
<div class="alert">
|
||||
{$layerIdFeedback}
|
||||
</div>
|
||||
{layerId}
|
||||
</NextButton>
|
||||
{/each}
|
||||
</div>
|
||||
{:else if state === "new_layer"}
|
||||
<div class="interactive flex m-2 rounded-2xl flex-col p-2">
|
||||
<h3>Enter the ID for the new layer</h3>
|
||||
A good ID is:
|
||||
<ul>
|
||||
<li>a noun</li>
|
||||
<li>singular</li>
|
||||
<li>describes the object</li>
|
||||
<li>in English</li>
|
||||
</ul>
|
||||
<div class="m-2 p-2 w-full">
|
||||
|
||||
<ValidatedInput type="id" value={newLayerId} feedback={layerIdFeedback} on:submit={() => createNewLayer()}/>
|
||||
{:else }
|
||||
<NextButton clss="primary" on:click={() => createNewLayer()}>
|
||||
Create layer {$newLayerId}
|
||||
</NextButton>
|
||||
{/if}
|
||||
</div>
|
||||
{#if $layerIdFeedback !== undefined}
|
||||
<div class="alert">
|
||||
{$layerIdFeedback}
|
||||
{:else if state === "loading"}
|
||||
<div class="w-8 h-8">
|
||||
<Loading />
|
||||
</div>
|
||||
{:else }
|
||||
<NextButton clss="primary" on:click={() => createNewLayer()}>
|
||||
Create layer {$newLayerId}
|
||||
</NextButton>
|
||||
{:else if state === "editing_layer"}
|
||||
<EditLayer {initialLayerConfig} state={editLayerState} />
|
||||
{/if}
|
||||
</div>
|
||||
{:else if state === "loading"}
|
||||
<div class="w-8 h-8">
|
||||
<Loading />
|
||||
</div>
|
||||
{:else if state === "editing_layer"}
|
||||
<EditLayer {initialLayerConfig} />
|
||||
{/if}
|
||||
</LoginToggle>
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -639,9 +639,87 @@
|
|||
"question": "What values of the freeform key should be interpreted as 'unknown'?",
|
||||
"ifunset": "The question will be considered answered if any value is set for the key"
|
||||
},
|
||||
"type": "array",
|
||||
"type": [
|
||||
{
|
||||
"$ref": "#/definitions/{and:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/{or:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"description": "For example, if a feature has `shop=yes`, the question 'what type of shop is this?' should still asked"
|
||||
},
|
||||
{
|
||||
"path": [
|
||||
"freeform",
|
||||
"invalidValues",
|
||||
"and"
|
||||
],
|
||||
"required": false,
|
||||
"hints": {
|
||||
"typehint": "tag"
|
||||
},
|
||||
"type": [
|
||||
{
|
||||
"$ref": "#/definitions/{and:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||
},
|
||||
{
|
||||
"path": [
|
||||
"freeform",
|
||||
"invalidValues",
|
||||
"or"
|
||||
],
|
||||
"required": false,
|
||||
"hints": {
|
||||
"typehint": "tag"
|
||||
},
|
||||
"type": [
|
||||
{
|
||||
"$ref": "#/definitions/{and:TagConfigJson[];}"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||
},
|
||||
{
|
||||
"path": [
|
||||
"question"
|
||||
|
|
Loading…
Reference in a new issue