From f2e3888a5671bfa432c8919fecb260e46360f980 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Wed, 19 Jun 2024 00:28:30 +0200 Subject: [PATCH] Chore: regenerate schemas for studio --- Docs/Schemas/IconConfigJson.schema.json | 4 +- Docs/Schemas/IconConfigJsonJSC.ts | 4 +- Docs/Schemas/LayerConfigJson.schema.json | 33 +++++++------- Docs/Schemas/LayerConfigJsonJSC.ts | 33 +++++++------- Docs/Schemas/LayoutConfigJson.schema.json | 44 ++++++++++++------- Docs/Schemas/LayoutConfigJsonJSC.ts | 44 ++++++++++++------- .../LineRenderingConfigJson.schema.json | 4 +- Docs/Schemas/LineRenderingConfigJsonJSC.ts | 4 +- Docs/Schemas/MappingConfigJson.schema.json | 4 +- Docs/Schemas/MappingConfigJsonJSC.ts | 4 +- .../PointRenderingConfigJson.schema.json | 4 +- Docs/Schemas/PointRenderingConfigJsonJSC.ts | 4 +- ...tionableTagRenderingConfigJson.schema.json | 15 +++---- .../QuestionableTagRenderingConfigJsonJSC.ts | 15 +++---- Docs/Schemas/RewritableConfigJson.schema.json | 5 ++- Docs/Schemas/RewritableConfigJsonJSC.ts | 5 ++- 16 files changed, 128 insertions(+), 98 deletions(-) diff --git a/Docs/Schemas/IconConfigJson.schema.json b/Docs/Schemas/IconConfigJson.schema.json index 8dc46d5b1..9f940de42 100644 --- a/Docs/Schemas/IconConfigJson.schema.json +++ b/Docs/Schemas/IconConfigJson.schema.json @@ -2,7 +2,7 @@ "type": "object", "properties": { "icon": { - "description": "question: What icon should be used?\ntype: icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", + "description": "question: What icon should be used?\ntype: icon\ntypes: Use a dynamic value ; icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" @@ -26,7 +26,7 @@ ] }, "color": { - "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color", + "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color\ntypes: Use a dynamic color ; icon", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" diff --git a/Docs/Schemas/IconConfigJsonJSC.ts b/Docs/Schemas/IconConfigJsonJSC.ts index df0a4dc6e..6f2294280 100644 --- a/Docs/Schemas/IconConfigJsonJSC.ts +++ b/Docs/Schemas/IconConfigJsonJSC.ts @@ -2,7 +2,7 @@ export default { "type": "object", "properties": { "icon": { - "description": "question: What icon should be used?\ntype: icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", + "description": "question: What icon should be used?\ntype: icon\ntypes: Use a dynamic value ; icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" @@ -26,7 +26,7 @@ export default { ] }, "color": { - "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color", + "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color\ntypes: Use a dynamic color ; icon", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" diff --git a/Docs/Schemas/LayerConfigJson.schema.json b/Docs/Schemas/LayerConfigJson.schema.json index 965ee4241..cc222be56 100644 --- a/Docs/Schemas/LayerConfigJson.schema.json +++ b/Docs/Schemas/LayerConfigJson.schema.json @@ -393,7 +393,7 @@ } }, "syncSelection": { - "description": "If set, synchronizes whether or not this layer is enabled.\n\ngroup: advanced\nquestion: Should enabling/disabling the layer be saved (locally or in the cloud)?\nsuggestions: return [{if: \"value=no\", then: \"Don't save, always revert to the default\"}, {if: \"value=local\", then: \"Save selection in local storage\"}, {if: \"value=theme-only\", then: \"Save the state in the OSM-usersettings, but apply on this theme only (default)\"}, {if: \"value=global\", then: \"Save in OSM-usersettings and toggle on _all_ themes using this layer\"}]", + "description": "If set, synchronizes whether this layer is enabled.\n\ngroup: advanced\nquestion: Should enabling/disabling the layer be saved (locally or in the cloud)?\nsuggestions: return [{if: \"value=no\", then: \"Don't save, always revert to the default\"}, {if: \"value=local\", then: \"Save selection in local storage\"}, {if: \"value=theme-only\", then: \"Save the state in the OSM-usersettings, but apply on this theme only (default)\"}, {if: \"value=global\", then: \"Save in OSM-usersettings and toggle on _all_ themes using this layer\"}]", "enum": [ "global", "local", @@ -409,6 +409,10 @@ "fullNodeDatabase": { "description": "_Set automatically by MapComplete, please ignore_\n\ngroup: hidden", "type": "boolean" + }, + "enableMorePrivacy": { + "description": "question: Should a theme using this layer leak some location info when making changes?\n\nWhen a changeset is made, a 'distance to object'-class is written to the changeset.\nFor some particular themes and layers, this might leak too much information, and we want to obfuscate this\n\nifunset: Write 'change_within_x_m' as usual and if GPS is enabled\niftrue: Do not write 'change_within_x_m' and do not indicate that this was done by survey", + "type": "boolean" } }, "required": [ @@ -584,7 +588,7 @@ "type": "object", "properties": { "icon": { - "description": "question: What icon should be used?\ntype: icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", + "description": "question: What icon should be used?\ntype: icon\ntypes: Use a dynamic value ; icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" @@ -608,7 +612,7 @@ ] }, "color": { - "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color", + "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color\ntypes: Use a dynamic color ; icon", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" @@ -1222,7 +1226,7 @@ } }, "multiAnswer": { - "description": "If true, use checkboxes instead of radio buttons when asking the question\n\nquestion: Should a contributor be allowed to select multiple mappings?\n\niftrue: allow to select multiple mappings\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping", + "description": "question: Should a contributor be allowed to select multiple mappings?\n\nIf true, use checkboxes instead of radio buttons when asking the question.\n\niftrue: allow to select multiple mappings (and show a freeform-value as list if ';'-separated)\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping", "type": "boolean" }, "freeform": { @@ -1248,11 +1252,6 @@ } ] }, - "helperArgs": { - "description": "Extra parameters to initialize the input helper arguments.\nFor semantics, see the 'SpecialInputElements.md'\ngroup: expert", - "type": "array", - "items": {} - }, "addExtraTags": { "description": "If a value is added with the textfield, these extra tag is addded.\nUseful to add a 'fixme=freeform textfield used - to be checked'\ngroup: expert", "type": "array", @@ -1281,6 +1280,10 @@ "type": "string" } ] + }, + "postfixDistinguished": { + "description": "question: If this key shared and distinguished by a postfix, what is the postfix?\nThis option is used specifically for `charge`, where the cost is indicated with `/item`.\n\nFor example, a vending machine might sell `bicycle_tube`.\nSetting this value to `bicycle_tube`, then answering this question will set `charge= €XX/bicycle_tube`.\nIf charge did already contain another value, e.g. `charge= €YY/some_item; €ZZ/other_item`, then `€XX/bicycle_tube`will be added.\nNote: those values are sorted alphabetically\nNote: no need to add the `/`\n\nifunset: Don't distinguish by postfix\ngroup: expert", + "type": "string" } } }, @@ -1448,7 +1451,7 @@ } }, "multiAnswer": { - "description": "If true, use checkboxes instead of radio buttons when asking the question\n\nquestion: Should a contributor be allowed to select multiple mappings?\n\niftrue: allow to select multiple mappings\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping", + "description": "question: Should a contributor be allowed to select multiple mappings?\n\nIf true, use checkboxes instead of radio buttons when asking the question.\n\niftrue: allow to select multiple mappings (and show a freeform-value as list if ';'-separated)\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping", "type": "boolean" }, "freeform": { @@ -1474,11 +1477,6 @@ } ] }, - "helperArgs": { - "description": "Extra parameters to initialize the input helper arguments.\nFor semantics, see the 'SpecialInputElements.md'\ngroup: expert", - "type": "array", - "items": {} - }, "addExtraTags": { "description": "If a value is added with the textfield, these extra tag is addded.\nUseful to add a 'fixme=freeform textfield used - to be checked'\ngroup: expert", "type": "array", @@ -1507,6 +1505,10 @@ "type": "string" } ] + }, + "postfixDistinguished": { + "description": "question: If this key shared and distinguished by a postfix, what is the postfix?\nThis option is used specifically for `charge`, where the cost is indicated with `/item`.\n\nFor example, a vending machine might sell `bicycle_tube`.\nSetting this value to `bicycle_tube`, then answering this question will set `charge= €XX/bicycle_tube`.\nIf charge did already contain another value, e.g. `charge= €YY/some_item; €ZZ/other_item`, then `€XX/bicycle_tube`will be added.\nNote: those values are sorted alphabetically\nNote: no need to add the `/`\n\nifunset: Don't distinguish by postfix\ngroup: expert", + "type": "string" } } }, @@ -1684,6 +1686,7 @@ ] }, "subexpand": { + "description": "Used to expand a sublist.\nE.g. a target `rendering` is:\n\ne.g.\n{\n rewrite: [\"{{x}}\", \"{{y}}\"],\n into:[\n [\"{{x}}\": \"some X\"],\n [\"{{y}}\", [\"option 1\", \"option 2\"]]\n ],\n renderings:[\n {\n \"question\":\"Is {{x}}\",\n \"mappings\": [\"if={{y}}\",then: \"...\"]\n }\n ]\n subExpand: {\n // The list with the key\n \"mappings\":\n // will be taken and multiplied by all possible values of\n \"{{y}}\"\n // Note that this implies that `into.[*].[{{y}}]` should be a list of items\n }\n}\n\nExpansion will result in:\n{\n question: \"Is some X\",\n mappings: [{\"if=option 1\", then: \"...\"}, {\"if=option 2\", then: \"...\"}]\n}", "$ref": "#/definitions/Record" }, "renderings": { diff --git a/Docs/Schemas/LayerConfigJsonJSC.ts b/Docs/Schemas/LayerConfigJsonJSC.ts index 24202d20b..0e1b41de0 100644 --- a/Docs/Schemas/LayerConfigJsonJSC.ts +++ b/Docs/Schemas/LayerConfigJsonJSC.ts @@ -393,7 +393,7 @@ export default { } }, "syncSelection": { - "description": "If set, synchronizes whether or not this layer is enabled.\n\ngroup: advanced\nquestion: Should enabling/disabling the layer be saved (locally or in the cloud)?\nsuggestions: return [{if: \"value=no\", then: \"Don't save, always revert to the default\"}, {if: \"value=local\", then: \"Save selection in local storage\"}, {if: \"value=theme-only\", then: \"Save the state in the OSM-usersettings, but apply on this theme only (default)\"}, {if: \"value=global\", then: \"Save in OSM-usersettings and toggle on _all_ themes using this layer\"}]", + "description": "If set, synchronizes whether this layer is enabled.\n\ngroup: advanced\nquestion: Should enabling/disabling the layer be saved (locally or in the cloud)?\nsuggestions: return [{if: \"value=no\", then: \"Don't save, always revert to the default\"}, {if: \"value=local\", then: \"Save selection in local storage\"}, {if: \"value=theme-only\", then: \"Save the state in the OSM-usersettings, but apply on this theme only (default)\"}, {if: \"value=global\", then: \"Save in OSM-usersettings and toggle on _all_ themes using this layer\"}]", "enum": [ "global", "local", @@ -409,6 +409,10 @@ export default { "fullNodeDatabase": { "description": "_Set automatically by MapComplete, please ignore_\n\ngroup: hidden", "type": "boolean" + }, + "enableMorePrivacy": { + "description": "question: Should a theme using this layer leak some location info when making changes?\n\nWhen a changeset is made, a 'distance to object'-class is written to the changeset.\nFor some particular themes and layers, this might leak too much information, and we want to obfuscate this\n\nifunset: Write 'change_within_x_m' as usual and if GPS is enabled\niftrue: Do not write 'change_within_x_m' and do not indicate that this was done by survey", + "type": "boolean" } }, "required": [ @@ -578,7 +582,7 @@ export default { "type": "object", "properties": { "icon": { - "description": "question: What icon should be used?\ntype: icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", + "description": "question: What icon should be used?\ntype: icon\ntypes: Use a dynamic value ; icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" @@ -602,7 +606,7 @@ export default { ] }, "color": { - "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color", + "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color\ntypes: Use a dynamic color ; icon", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" @@ -1209,7 +1213,7 @@ export default { } }, "multiAnswer": { - "description": "If true, use checkboxes instead of radio buttons when asking the question\n\nquestion: Should a contributor be allowed to select multiple mappings?\n\niftrue: allow to select multiple mappings\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping", + "description": "question: Should a contributor be allowed to select multiple mappings?\n\nIf true, use checkboxes instead of radio buttons when asking the question.\n\niftrue: allow to select multiple mappings (and show a freeform-value as list if ';'-separated)\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping", "type": "boolean" }, "freeform": { @@ -1235,11 +1239,6 @@ export default { } ] }, - "helperArgs": { - "description": "Extra parameters to initialize the input helper arguments.\nFor semantics, see the 'SpecialInputElements.md'\ngroup: expert", - "type": "array", - "items": {} - }, "addExtraTags": { "description": "If a value is added with the textfield, these extra tag is addded.\nUseful to add a 'fixme=freeform textfield used - to be checked'\ngroup: expert", "type": "array", @@ -1268,6 +1267,10 @@ export default { "type": "string" } ] + }, + "postfixDistinguished": { + "description": "question: If this key shared and distinguished by a postfix, what is the postfix?\nThis option is used specifically for `charge`, where the cost is indicated with `/item`.\n\nFor example, a vending machine might sell `bicycle_tube`.\nSetting this value to `bicycle_tube`, then answering this question will set `charge= €XX/bicycle_tube`.\nIf charge did already contain another value, e.g. `charge= €YY/some_item; €ZZ/other_item`, then `€XX/bicycle_tube`will be added.\nNote: those values are sorted alphabetically\nNote: no need to add the `/`\n\nifunset: Don't distinguish by postfix\ngroup: expert", + "type": "string" } } }, @@ -1434,7 +1437,7 @@ export default { } }, "multiAnswer": { - "description": "If true, use checkboxes instead of radio buttons when asking the question\n\nquestion: Should a contributor be allowed to select multiple mappings?\n\niftrue: allow to select multiple mappings\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping", + "description": "question: Should a contributor be allowed to select multiple mappings?\n\nIf true, use checkboxes instead of radio buttons when asking the question.\n\niftrue: allow to select multiple mappings (and show a freeform-value as list if ';'-separated)\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping", "type": "boolean" }, "freeform": { @@ -1460,11 +1463,6 @@ export default { } ] }, - "helperArgs": { - "description": "Extra parameters to initialize the input helper arguments.\nFor semantics, see the 'SpecialInputElements.md'\ngroup: expert", - "type": "array", - "items": {} - }, "addExtraTags": { "description": "If a value is added with the textfield, these extra tag is addded.\nUseful to add a 'fixme=freeform textfield used - to be checked'\ngroup: expert", "type": "array", @@ -1493,6 +1491,10 @@ export default { "type": "string" } ] + }, + "postfixDistinguished": { + "description": "question: If this key shared and distinguished by a postfix, what is the postfix?\nThis option is used specifically for `charge`, where the cost is indicated with `/item`.\n\nFor example, a vending machine might sell `bicycle_tube`.\nSetting this value to `bicycle_tube`, then answering this question will set `charge= €XX/bicycle_tube`.\nIf charge did already contain another value, e.g. `charge= €YY/some_item; €ZZ/other_item`, then `€XX/bicycle_tube`will be added.\nNote: those values are sorted alphabetically\nNote: no need to add the `/`\n\nifunset: Don't distinguish by postfix\ngroup: expert", + "type": "string" } } }, @@ -1669,6 +1671,7 @@ export default { ] }, "subexpand": { + "description": "Used to expand a sublist.\nE.g. a target `rendering` is:\n\ne.g.\n{\n rewrite: [\"{{x}}\", \"{{y}}\"],\n into:[\n [\"{{x}}\": \"some X\"],\n [\"{{y}}\", [\"option 1\", \"option 2\"]]\n ],\n renderings:[\n {\n \"question\":\"Is {{x}}\",\n \"mappings\": [\"if={{y}}\",then: \"...\"]\n }\n ]\n subExpand: {\n // The list with the key\n \"mappings\":\n // will be taken and multiplied by all possible values of\n \"{{y}}\"\n // Note that this implies that `into.[*].[{{y}}]` should be a list of items\n }\n}\n\nExpansion will result in:\n{\n question: \"Is some X\",\n mappings: [{\"if=option 1\", then: \"...\"}, {\"if=option 2\", then: \"...\"}]\n}", "$ref": "#/definitions/Record" }, "renderings": { diff --git a/Docs/Schemas/LayoutConfigJson.schema.json b/Docs/Schemas/LayoutConfigJson.schema.json index 519e2cfee..63609fe18 100644 --- a/Docs/Schemas/LayoutConfigJson.schema.json +++ b/Docs/Schemas/LayoutConfigJson.schema.json @@ -297,10 +297,15 @@ "enableNodeDatabase": { "description": "Enables tracking of all nodes when data is loaded.\nThis is useful for the 'ImportWay' and 'ConflateWay'-buttons who need this database.\n\nNote: this flag will be automatically set and can thus be ignored.\ngroup: hidden", "type": "boolean" + }, + "enableMorePrivacy": { + "description": "question: Should this theme leak some location info when making changes?\n\nWhen a changeset is made, a 'distance to object'-class is written to the changeset.\nFor some particular themes and layers, this might leak too much information, and we want to obfuscate this\n\nifunset: Write 'change_within_x_m' as usual and if GPS is enabled\niftrue: Do not write 'change_within_x_m' and do not indicate that this was done by survey", + "type": "boolean" } }, "required": [ "description", + "enableMorePrivacy", "icon", "id", "layers", @@ -474,7 +479,7 @@ "type": "object", "properties": { "icon": { - "description": "question: What icon should be used?\ntype: icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", + "description": "question: What icon should be used?\ntype: icon\ntypes: Use a dynamic value ; icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" @@ -498,7 +503,7 @@ ] }, "color": { - "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color", + "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color\ntypes: Use a dynamic color ; icon", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" @@ -1112,7 +1117,7 @@ } }, "multiAnswer": { - "description": "If true, use checkboxes instead of radio buttons when asking the question\n\nquestion: Should a contributor be allowed to select multiple mappings?\n\niftrue: allow to select multiple mappings\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping", + "description": "question: Should a contributor be allowed to select multiple mappings?\n\nIf true, use checkboxes instead of radio buttons when asking the question.\n\niftrue: allow to select multiple mappings (and show a freeform-value as list if ';'-separated)\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping", "type": "boolean" }, "freeform": { @@ -1138,11 +1143,6 @@ } ] }, - "helperArgs": { - "description": "Extra parameters to initialize the input helper arguments.\nFor semantics, see the 'SpecialInputElements.md'\ngroup: expert", - "type": "array", - "items": {} - }, "addExtraTags": { "description": "If a value is added with the textfield, these extra tag is addded.\nUseful to add a 'fixme=freeform textfield used - to be checked'\ngroup: expert", "type": "array", @@ -1171,6 +1171,10 @@ "type": "string" } ] + }, + "postfixDistinguished": { + "description": "question: If this key shared and distinguished by a postfix, what is the postfix?\nThis option is used specifically for `charge`, where the cost is indicated with `/item`.\n\nFor example, a vending machine might sell `bicycle_tube`.\nSetting this value to `bicycle_tube`, then answering this question will set `charge= €XX/bicycle_tube`.\nIf charge did already contain another value, e.g. `charge= €YY/some_item; €ZZ/other_item`, then `€XX/bicycle_tube`will be added.\nNote: those values are sorted alphabetically\nNote: no need to add the `/`\n\nifunset: Don't distinguish by postfix\ngroup: expert", + "type": "string" } } }, @@ -1338,7 +1342,7 @@ } }, "multiAnswer": { - "description": "If true, use checkboxes instead of radio buttons when asking the question\n\nquestion: Should a contributor be allowed to select multiple mappings?\n\niftrue: allow to select multiple mappings\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping", + "description": "question: Should a contributor be allowed to select multiple mappings?\n\nIf true, use checkboxes instead of radio buttons when asking the question.\n\niftrue: allow to select multiple mappings (and show a freeform-value as list if ';'-separated)\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping", "type": "boolean" }, "freeform": { @@ -1364,11 +1368,6 @@ } ] }, - "helperArgs": { - "description": "Extra parameters to initialize the input helper arguments.\nFor semantics, see the 'SpecialInputElements.md'\ngroup: expert", - "type": "array", - "items": {} - }, "addExtraTags": { "description": "If a value is added with the textfield, these extra tag is addded.\nUseful to add a 'fixme=freeform textfield used - to be checked'\ngroup: expert", "type": "array", @@ -1397,6 +1396,10 @@ "type": "string" } ] + }, + "postfixDistinguished": { + "description": "question: If this key shared and distinguished by a postfix, what is the postfix?\nThis option is used specifically for `charge`, where the cost is indicated with `/item`.\n\nFor example, a vending machine might sell `bicycle_tube`.\nSetting this value to `bicycle_tube`, then answering this question will set `charge= €XX/bicycle_tube`.\nIf charge did already contain another value, e.g. `charge= €YY/some_item; €ZZ/other_item`, then `€XX/bicycle_tube`will be added.\nNote: those values are sorted alphabetically\nNote: no need to add the `/`\n\nifunset: Don't distinguish by postfix\ngroup: expert", + "type": "string" } } }, @@ -1574,6 +1577,7 @@ ] }, "subexpand": { + "description": "Used to expand a sublist.\nE.g. a target `rendering` is:\n\ne.g.\n{\n rewrite: [\"{{x}}\", \"{{y}}\"],\n into:[\n [\"{{x}}\": \"some X\"],\n [\"{{y}}\", [\"option 1\", \"option 2\"]]\n ],\n renderings:[\n {\n \"question\":\"Is {{x}}\",\n \"mappings\": [\"if={{y}}\",then: \"...\"]\n }\n ]\n subExpand: {\n // The list with the key\n \"mappings\":\n // will be taken and multiplied by all possible values of\n \"{{y}}\"\n // Note that this implies that `into.[*].[{{y}}]` should be a list of items\n }\n}\n\nExpansion will result in:\n{\n question: \"Is some X\",\n mappings: [{\"if=option 1\", then: \"...\"}, {\"if=option 2\", then: \"...\"}]\n}", "$ref": "#/definitions/Record" }, "renderings": { @@ -2284,7 +2288,7 @@ } }, "syncSelection": { - "description": "If set, synchronizes whether or not this layer is enabled.\n\ngroup: advanced\nquestion: Should enabling/disabling the layer be saved (locally or in the cloud)?\nsuggestions: return [{if: \"value=no\", then: \"Don't save, always revert to the default\"}, {if: \"value=local\", then: \"Save selection in local storage\"}, {if: \"value=theme-only\", then: \"Save the state in the OSM-usersettings, but apply on this theme only (default)\"}, {if: \"value=global\", then: \"Save in OSM-usersettings and toggle on _all_ themes using this layer\"}]", + "description": "If set, synchronizes whether this layer is enabled.\n\ngroup: advanced\nquestion: Should enabling/disabling the layer be saved (locally or in the cloud)?\nsuggestions: return [{if: \"value=no\", then: \"Don't save, always revert to the default\"}, {if: \"value=local\", then: \"Save selection in local storage\"}, {if: \"value=theme-only\", then: \"Save the state in the OSM-usersettings, but apply on this theme only (default)\"}, {if: \"value=global\", then: \"Save in OSM-usersettings and toggle on _all_ themes using this layer\"}]", "enum": [ "global", "local", @@ -2300,6 +2304,10 @@ "fullNodeDatabase": { "description": "_Set automatically by MapComplete, please ignore_\n\ngroup: hidden", "type": "boolean" + }, + "enableMorePrivacy": { + "description": "question: Should a theme using this layer leak some location info when making changes?\n\nWhen a changeset is made, a 'distance to object'-class is written to the changeset.\nFor some particular themes and layers, this might leak too much information, and we want to obfuscate this\n\nifunset: Write 'change_within_x_m' as usual and if GPS is enabled\niftrue: Do not write 'change_within_x_m' and do not indicate that this was done by survey", + "type": "boolean" } }, "required": [ @@ -2703,7 +2711,7 @@ } }, "syncSelection": { - "description": "If set, synchronizes whether or not this layer is enabled.\n\ngroup: advanced\nquestion: Should enabling/disabling the layer be saved (locally or in the cloud)?\nsuggestions: return [{if: \"value=no\", then: \"Don't save, always revert to the default\"}, {if: \"value=local\", then: \"Save selection in local storage\"}, {if: \"value=theme-only\", then: \"Save the state in the OSM-usersettings, but apply on this theme only (default)\"}, {if: \"value=global\", then: \"Save in OSM-usersettings and toggle on _all_ themes using this layer\"}]", + "description": "If set, synchronizes whether this layer is enabled.\n\ngroup: advanced\nquestion: Should enabling/disabling the layer be saved (locally or in the cloud)?\nsuggestions: return [{if: \"value=no\", then: \"Don't save, always revert to the default\"}, {if: \"value=local\", then: \"Save selection in local storage\"}, {if: \"value=theme-only\", then: \"Save the state in the OSM-usersettings, but apply on this theme only (default)\"}, {if: \"value=global\", then: \"Save in OSM-usersettings and toggle on _all_ themes using this layer\"}]", "enum": [ "global", "local", @@ -2719,6 +2727,10 @@ "fullNodeDatabase": { "description": "_Set automatically by MapComplete, please ignore_\n\ngroup: hidden", "type": "boolean" + }, + "enableMorePrivacy": { + "description": "question: Should a theme using this layer leak some location info when making changes?\n\nWhen a changeset is made, a 'distance to object'-class is written to the changeset.\nFor some particular themes and layers, this might leak too much information, and we want to obfuscate this\n\nifunset: Write 'change_within_x_m' as usual and if GPS is enabled\niftrue: Do not write 'change_within_x_m' and do not indicate that this was done by survey", + "type": "boolean" } }, "additionalProperties": false diff --git a/Docs/Schemas/LayoutConfigJsonJSC.ts b/Docs/Schemas/LayoutConfigJsonJSC.ts index d0983bab9..cd020c31e 100644 --- a/Docs/Schemas/LayoutConfigJsonJSC.ts +++ b/Docs/Schemas/LayoutConfigJsonJSC.ts @@ -297,10 +297,15 @@ export default { "enableNodeDatabase": { "description": "Enables tracking of all nodes when data is loaded.\nThis is useful for the 'ImportWay' and 'ConflateWay'-buttons who need this database.\n\nNote: this flag will be automatically set and can thus be ignored.\ngroup: hidden", "type": "boolean" + }, + "enableMorePrivacy": { + "description": "question: Should this theme leak some location info when making changes?\n\nWhen a changeset is made, a 'distance to object'-class is written to the changeset.\nFor some particular themes and layers, this might leak too much information, and we want to obfuscate this\n\nifunset: Write 'change_within_x_m' as usual and if GPS is enabled\niftrue: Do not write 'change_within_x_m' and do not indicate that this was done by survey", + "type": "boolean" } }, "required": [ "description", + "enableMorePrivacy", "icon", "id", "layers", @@ -468,7 +473,7 @@ export default { "type": "object", "properties": { "icon": { - "description": "question: What icon should be used?\ntype: icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", + "description": "question: What icon should be used?\ntype: icon\ntypes: Use a dynamic value ; icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" @@ -492,7 +497,7 @@ export default { ] }, "color": { - "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color", + "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color\ntypes: Use a dynamic color ; icon", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" @@ -1099,7 +1104,7 @@ export default { } }, "multiAnswer": { - "description": "If true, use checkboxes instead of radio buttons when asking the question\n\nquestion: Should a contributor be allowed to select multiple mappings?\n\niftrue: allow to select multiple mappings\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping", + "description": "question: Should a contributor be allowed to select multiple mappings?\n\nIf true, use checkboxes instead of radio buttons when asking the question.\n\niftrue: allow to select multiple mappings (and show a freeform-value as list if ';'-separated)\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping", "type": "boolean" }, "freeform": { @@ -1125,11 +1130,6 @@ export default { } ] }, - "helperArgs": { - "description": "Extra parameters to initialize the input helper arguments.\nFor semantics, see the 'SpecialInputElements.md'\ngroup: expert", - "type": "array", - "items": {} - }, "addExtraTags": { "description": "If a value is added with the textfield, these extra tag is addded.\nUseful to add a 'fixme=freeform textfield used - to be checked'\ngroup: expert", "type": "array", @@ -1158,6 +1158,10 @@ export default { "type": "string" } ] + }, + "postfixDistinguished": { + "description": "question: If this key shared and distinguished by a postfix, what is the postfix?\nThis option is used specifically for `charge`, where the cost is indicated with `/item`.\n\nFor example, a vending machine might sell `bicycle_tube`.\nSetting this value to `bicycle_tube`, then answering this question will set `charge= €XX/bicycle_tube`.\nIf charge did already contain another value, e.g. `charge= €YY/some_item; €ZZ/other_item`, then `€XX/bicycle_tube`will be added.\nNote: those values are sorted alphabetically\nNote: no need to add the `/`\n\nifunset: Don't distinguish by postfix\ngroup: expert", + "type": "string" } } }, @@ -1324,7 +1328,7 @@ export default { } }, "multiAnswer": { - "description": "If true, use checkboxes instead of radio buttons when asking the question\n\nquestion: Should a contributor be allowed to select multiple mappings?\n\niftrue: allow to select multiple mappings\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping", + "description": "question: Should a contributor be allowed to select multiple mappings?\n\nIf true, use checkboxes instead of radio buttons when asking the question.\n\niftrue: allow to select multiple mappings (and show a freeform-value as list if ';'-separated)\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping", "type": "boolean" }, "freeform": { @@ -1350,11 +1354,6 @@ export default { } ] }, - "helperArgs": { - "description": "Extra parameters to initialize the input helper arguments.\nFor semantics, see the 'SpecialInputElements.md'\ngroup: expert", - "type": "array", - "items": {} - }, "addExtraTags": { "description": "If a value is added with the textfield, these extra tag is addded.\nUseful to add a 'fixme=freeform textfield used - to be checked'\ngroup: expert", "type": "array", @@ -1383,6 +1382,10 @@ export default { "type": "string" } ] + }, + "postfixDistinguished": { + "description": "question: If this key shared and distinguished by a postfix, what is the postfix?\nThis option is used specifically for `charge`, where the cost is indicated with `/item`.\n\nFor example, a vending machine might sell `bicycle_tube`.\nSetting this value to `bicycle_tube`, then answering this question will set `charge= €XX/bicycle_tube`.\nIf charge did already contain another value, e.g. `charge= €YY/some_item; €ZZ/other_item`, then `€XX/bicycle_tube`will be added.\nNote: those values are sorted alphabetically\nNote: no need to add the `/`\n\nifunset: Don't distinguish by postfix\ngroup: expert", + "type": "string" } } }, @@ -1559,6 +1562,7 @@ export default { ] }, "subexpand": { + "description": "Used to expand a sublist.\nE.g. a target `rendering` is:\n\ne.g.\n{\n rewrite: [\"{{x}}\", \"{{y}}\"],\n into:[\n [\"{{x}}\": \"some X\"],\n [\"{{y}}\", [\"option 1\", \"option 2\"]]\n ],\n renderings:[\n {\n \"question\":\"Is {{x}}\",\n \"mappings\": [\"if={{y}}\",then: \"...\"]\n }\n ]\n subExpand: {\n // The list with the key\n \"mappings\":\n // will be taken and multiplied by all possible values of\n \"{{y}}\"\n // Note that this implies that `into.[*].[{{y}}]` should be a list of items\n }\n}\n\nExpansion will result in:\n{\n question: \"Is some X\",\n mappings: [{\"if=option 1\", then: \"...\"}, {\"if=option 2\", then: \"...\"}]\n}", "$ref": "#/definitions/Record" }, "renderings": { @@ -2262,7 +2266,7 @@ export default { } }, "syncSelection": { - "description": "If set, synchronizes whether or not this layer is enabled.\n\ngroup: advanced\nquestion: Should enabling/disabling the layer be saved (locally or in the cloud)?\nsuggestions: return [{if: \"value=no\", then: \"Don't save, always revert to the default\"}, {if: \"value=local\", then: \"Save selection in local storage\"}, {if: \"value=theme-only\", then: \"Save the state in the OSM-usersettings, but apply on this theme only (default)\"}, {if: \"value=global\", then: \"Save in OSM-usersettings and toggle on _all_ themes using this layer\"}]", + "description": "If set, synchronizes whether this layer is enabled.\n\ngroup: advanced\nquestion: Should enabling/disabling the layer be saved (locally or in the cloud)?\nsuggestions: return [{if: \"value=no\", then: \"Don't save, always revert to the default\"}, {if: \"value=local\", then: \"Save selection in local storage\"}, {if: \"value=theme-only\", then: \"Save the state in the OSM-usersettings, but apply on this theme only (default)\"}, {if: \"value=global\", then: \"Save in OSM-usersettings and toggle on _all_ themes using this layer\"}]", "enum": [ "global", "local", @@ -2278,6 +2282,10 @@ export default { "fullNodeDatabase": { "description": "_Set automatically by MapComplete, please ignore_\n\ngroup: hidden", "type": "boolean" + }, + "enableMorePrivacy": { + "description": "question: Should a theme using this layer leak some location info when making changes?\n\nWhen a changeset is made, a 'distance to object'-class is written to the changeset.\nFor some particular themes and layers, this might leak too much information, and we want to obfuscate this\n\nifunset: Write 'change_within_x_m' as usual and if GPS is enabled\niftrue: Do not write 'change_within_x_m' and do not indicate that this was done by survey", + "type": "boolean" } }, "required": [ @@ -2680,7 +2688,7 @@ export default { } }, "syncSelection": { - "description": "If set, synchronizes whether or not this layer is enabled.\n\ngroup: advanced\nquestion: Should enabling/disabling the layer be saved (locally or in the cloud)?\nsuggestions: return [{if: \"value=no\", then: \"Don't save, always revert to the default\"}, {if: \"value=local\", then: \"Save selection in local storage\"}, {if: \"value=theme-only\", then: \"Save the state in the OSM-usersettings, but apply on this theme only (default)\"}, {if: \"value=global\", then: \"Save in OSM-usersettings and toggle on _all_ themes using this layer\"}]", + "description": "If set, synchronizes whether this layer is enabled.\n\ngroup: advanced\nquestion: Should enabling/disabling the layer be saved (locally or in the cloud)?\nsuggestions: return [{if: \"value=no\", then: \"Don't save, always revert to the default\"}, {if: \"value=local\", then: \"Save selection in local storage\"}, {if: \"value=theme-only\", then: \"Save the state in the OSM-usersettings, but apply on this theme only (default)\"}, {if: \"value=global\", then: \"Save in OSM-usersettings and toggle on _all_ themes using this layer\"}]", "enum": [ "global", "local", @@ -2696,6 +2704,10 @@ export default { "fullNodeDatabase": { "description": "_Set automatically by MapComplete, please ignore_\n\ngroup: hidden", "type": "boolean" + }, + "enableMorePrivacy": { + "description": "question: Should a theme using this layer leak some location info when making changes?\n\nWhen a changeset is made, a 'distance to object'-class is written to the changeset.\nFor some particular themes and layers, this might leak too much information, and we want to obfuscate this\n\nifunset: Write 'change_within_x_m' as usual and if GPS is enabled\niftrue: Do not write 'change_within_x_m' and do not indicate that this was done by survey", + "type": "boolean" } } }, diff --git a/Docs/Schemas/LineRenderingConfigJson.schema.json b/Docs/Schemas/LineRenderingConfigJson.schema.json index 6a545bb3a..f1f24ea9d 100644 --- a/Docs/Schemas/LineRenderingConfigJson.schema.json +++ b/Docs/Schemas/LineRenderingConfigJson.schema.json @@ -260,7 +260,7 @@ "type": "object", "properties": { "icon": { - "description": "question: What icon should be used?\ntype: icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", + "description": "question: What icon should be used?\ntype: icon\ntypes: Use a dynamic value ; icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" @@ -284,7 +284,7 @@ ] }, "color": { - "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color", + "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color\ntypes: Use a dynamic color ; icon", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" diff --git a/Docs/Schemas/LineRenderingConfigJsonJSC.ts b/Docs/Schemas/LineRenderingConfigJsonJSC.ts index cc39685ab..efd52ec8c 100644 --- a/Docs/Schemas/LineRenderingConfigJsonJSC.ts +++ b/Docs/Schemas/LineRenderingConfigJsonJSC.ts @@ -254,7 +254,7 @@ export default { "type": "object", "properties": { "icon": { - "description": "question: What icon should be used?\ntype: icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", + "description": "question: What icon should be used?\ntype: icon\ntypes: Use a dynamic value ; icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" @@ -278,7 +278,7 @@ export default { ] }, "color": { - "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color", + "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color\ntypes: Use a dynamic color ; icon", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" diff --git a/Docs/Schemas/MappingConfigJson.schema.json b/Docs/Schemas/MappingConfigJson.schema.json index 64a0b8bbc..3cbb6a0a6 100644 --- a/Docs/Schemas/MappingConfigJson.schema.json +++ b/Docs/Schemas/MappingConfigJson.schema.json @@ -287,7 +287,7 @@ "type": "object", "properties": { "icon": { - "description": "question: What icon should be used?\ntype: icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", + "description": "question: What icon should be used?\ntype: icon\ntypes: Use a dynamic value ; icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" @@ -311,7 +311,7 @@ ] }, "color": { - "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color", + "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color\ntypes: Use a dynamic color ; icon", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" diff --git a/Docs/Schemas/MappingConfigJsonJSC.ts b/Docs/Schemas/MappingConfigJsonJSC.ts index 15109ccf2..58576267b 100644 --- a/Docs/Schemas/MappingConfigJsonJSC.ts +++ b/Docs/Schemas/MappingConfigJsonJSC.ts @@ -281,7 +281,7 @@ export default { "type": "object", "properties": { "icon": { - "description": "question: What icon should be used?\ntype: icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", + "description": "question: What icon should be used?\ntype: icon\ntypes: Use a dynamic value ; icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" @@ -305,7 +305,7 @@ export default { ] }, "color": { - "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color", + "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color\ntypes: Use a dynamic color ; icon", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" diff --git a/Docs/Schemas/PointRenderingConfigJson.schema.json b/Docs/Schemas/PointRenderingConfigJson.schema.json index add2432a8..08038c8c9 100644 --- a/Docs/Schemas/PointRenderingConfigJson.schema.json +++ b/Docs/Schemas/PointRenderingConfigJson.schema.json @@ -334,7 +334,7 @@ "type": "object", "properties": { "icon": { - "description": "question: What icon should be used?\ntype: icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", + "description": "question: What icon should be used?\ntype: icon\ntypes: Use a dynamic value ; icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" @@ -358,7 +358,7 @@ ] }, "color": { - "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color", + "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color\ntypes: Use a dynamic color ; icon", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" diff --git a/Docs/Schemas/PointRenderingConfigJsonJSC.ts b/Docs/Schemas/PointRenderingConfigJsonJSC.ts index 8abfa94f5..fac57cc24 100644 --- a/Docs/Schemas/PointRenderingConfigJsonJSC.ts +++ b/Docs/Schemas/PointRenderingConfigJsonJSC.ts @@ -328,7 +328,7 @@ export default { "type": "object", "properties": { "icon": { - "description": "question: What icon should be used?\ntype: icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", + "description": "question: What icon should be used?\ntype: icon\ntypes: Use a dynamic value ; icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" @@ -352,7 +352,7 @@ export default { ] }, "color": { - "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color", + "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color\ntypes: Use a dynamic color ; icon", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" diff --git a/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json b/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json index c311e9501..83a44470b 100644 --- a/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json +++ b/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json @@ -13,7 +13,7 @@ } }, "multiAnswer": { - "description": "If true, use checkboxes instead of radio buttons when asking the question\n\nquestion: Should a contributor be allowed to select multiple mappings?\n\niftrue: allow to select multiple mappings\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping", + "description": "question: Should a contributor be allowed to select multiple mappings?\n\nIf true, use checkboxes instead of radio buttons when asking the question.\n\niftrue: allow to select multiple mappings (and show a freeform-value as list if ';'-separated)\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping", "type": "boolean" }, "freeform": { @@ -39,11 +39,6 @@ } ] }, - "helperArgs": { - "description": "Extra parameters to initialize the input helper arguments.\nFor semantics, see the 'SpecialInputElements.md'\ngroup: expert", - "type": "array", - "items": {} - }, "addExtraTags": { "description": "If a value is added with the textfield, these extra tag is addded.\nUseful to add a 'fixme=freeform textfield used - to be checked'\ngroup: expert", "type": "array", @@ -72,6 +67,10 @@ "type": "string" } ] + }, + "postfixDistinguished": { + "description": "question: If this key shared and distinguished by a postfix, what is the postfix?\nThis option is used specifically for `charge`, where the cost is indicated with `/item`.\n\nFor example, a vending machine might sell `bicycle_tube`.\nSetting this value to `bicycle_tube`, then answering this question will set `charge= €XX/bicycle_tube`.\nIf charge did already contain another value, e.g. `charge= €YY/some_item; €ZZ/other_item`, then `€XX/bicycle_tube`will be added.\nNote: those values are sorted alphabetically\nNote: no need to add the `/`\n\nifunset: Don't distinguish by postfix\ngroup: expert", + "type": "string" } } }, @@ -391,7 +390,7 @@ "type": "object", "properties": { "icon": { - "description": "question: What icon should be used?\ntype: icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", + "description": "question: What icon should be used?\ntype: icon\ntypes: Use a dynamic value ; icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" @@ -415,7 +414,7 @@ ] }, "color": { - "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color", + "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color\ntypes: Use a dynamic color ; icon", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" diff --git a/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts b/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts index 90b69e6a2..3421a5a96 100644 --- a/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts +++ b/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts @@ -13,7 +13,7 @@ export default { } }, "multiAnswer": { - "description": "If true, use checkboxes instead of radio buttons when asking the question\n\nquestion: Should a contributor be allowed to select multiple mappings?\n\niftrue: allow to select multiple mappings\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping", + "description": "question: Should a contributor be allowed to select multiple mappings?\n\nIf true, use checkboxes instead of radio buttons when asking the question.\n\niftrue: allow to select multiple mappings (and show a freeform-value as list if ';'-separated)\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping", "type": "boolean" }, "freeform": { @@ -39,11 +39,6 @@ export default { } ] }, - "helperArgs": { - "description": "Extra parameters to initialize the input helper arguments.\nFor semantics, see the 'SpecialInputElements.md'\ngroup: expert", - "type": "array", - "items": {} - }, "addExtraTags": { "description": "If a value is added with the textfield, these extra tag is addded.\nUseful to add a 'fixme=freeform textfield used - to be checked'\ngroup: expert", "type": "array", @@ -72,6 +67,10 @@ export default { "type": "string" } ] + }, + "postfixDistinguished": { + "description": "question: If this key shared and distinguished by a postfix, what is the postfix?\nThis option is used specifically for `charge`, where the cost is indicated with `/item`.\n\nFor example, a vending machine might sell `bicycle_tube`.\nSetting this value to `bicycle_tube`, then answering this question will set `charge= €XX/bicycle_tube`.\nIf charge did already contain another value, e.g. `charge= €YY/some_item; €ZZ/other_item`, then `€XX/bicycle_tube`will be added.\nNote: those values are sorted alphabetically\nNote: no need to add the `/`\n\nifunset: Don't distinguish by postfix\ngroup: expert", + "type": "string" } } }, @@ -385,7 +384,7 @@ export default { "type": "object", "properties": { "icon": { - "description": "question: What icon should be used?\ntype: icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", + "description": "question: What icon should be used?\ntype: icon\ntypes: Use a dynamic value ; icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" @@ -409,7 +408,7 @@ export default { ] }, "color": { - "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color", + "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color\ntypes: Use a dynamic color ; icon", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" diff --git a/Docs/Schemas/RewritableConfigJson.schema.json b/Docs/Schemas/RewritableConfigJson.schema.json index 2742a9a19..950830dc5 100644 --- a/Docs/Schemas/RewritableConfigJson.schema.json +++ b/Docs/Schemas/RewritableConfigJson.schema.json @@ -25,6 +25,7 @@ ] }, "subexpand": { + "description": "Used to expand a sublist.\nE.g. a target `rendering` is:\n\ne.g.\n{\n rewrite: [\"{{x}}\", \"{{y}}\"],\n into:[\n [\"{{x}}\": \"some X\"],\n [\"{{y}}\", [\"option 1\", \"option 2\"]]\n ],\n renderings:[\n {\n \"question\":\"Is {{x}}\",\n \"mappings\": [\"if={{y}}\",then: \"...\"]\n }\n ]\n subExpand: {\n // The list with the key\n \"mappings\":\n // will be taken and multiplied by all possible values of\n \"{{y}}\"\n // Note that this implies that `into.[*].[{{y}}]` should be a list of items\n }\n}\n\nExpansion will result in:\n{\n question: \"Is some X\",\n mappings: [{\"if=option 1\", then: \"...\"}, {\"if=option 2\", then: \"...\"}]\n}", "$ref": "#/definitions/Record" }, "renderings": { @@ -213,7 +214,7 @@ "type": "object", "properties": { "icon": { - "description": "question: What icon should be used?\ntype: icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", + "description": "question: What icon should be used?\ntype: icon\ntypes: Use a dynamic value ; icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" @@ -237,7 +238,7 @@ ] }, "color": { - "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color", + "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color\ntypes: Use a dynamic color ; icon", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" diff --git a/Docs/Schemas/RewritableConfigJsonJSC.ts b/Docs/Schemas/RewritableConfigJsonJSC.ts index a13d12292..5403d5f01 100644 --- a/Docs/Schemas/RewritableConfigJsonJSC.ts +++ b/Docs/Schemas/RewritableConfigJsonJSC.ts @@ -25,6 +25,7 @@ export default { ] }, "subexpand": { + "description": "Used to expand a sublist.\nE.g. a target `rendering` is:\n\ne.g.\n{\n rewrite: [\"{{x}}\", \"{{y}}\"],\n into:[\n [\"{{x}}\": \"some X\"],\n [\"{{y}}\", [\"option 1\", \"option 2\"]]\n ],\n renderings:[\n {\n \"question\":\"Is {{x}}\",\n \"mappings\": [\"if={{y}}\",then: \"...\"]\n }\n ]\n subExpand: {\n // The list with the key\n \"mappings\":\n // will be taken and multiplied by all possible values of\n \"{{y}}\"\n // Note that this implies that `into.[*].[{{y}}]` should be a list of items\n }\n}\n\nExpansion will result in:\n{\n question: \"Is some X\",\n mappings: [{\"if=option 1\", then: \"...\"}, {\"if=option 2\", then: \"...\"}]\n}", "$ref": "#/definitions/Record" }, "renderings": { @@ -207,7 +208,7 @@ export default { "type": "object", "properties": { "icon": { - "description": "question: What icon should be used?\ntype: icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", + "description": "question: What icon should be used?\ntype: icon\ntypes: Use a dynamic value ; icon\nsuggestions: return Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson" @@ -231,7 +232,7 @@ export default { ] }, "color": { - "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color", + "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntype: color\ntypes: Use a dynamic color ; icon", "anyOf": [ { "$ref": "#/definitions/MinimalTagRenderingConfigJson"