diff --git a/babel.config.json b/babel.config.json index 9ab5d30f2..3be60f4ab 100644 --- a/babel.config.json +++ b/babel.config.json @@ -1,7 +1,11 @@ { "presets": [ [ - "@babel/env" + "@babel/preset-env", { + "useBuiltIns": "usage", + "corejs": 3, + "modules": false + } ] ], "compact": false diff --git a/config/rollup.config.legacy.js b/config/rollup.config.legacy.js index 92c39fe78..8e9ad0df1 100644 --- a/config/rollup.config.legacy.js +++ b/config/rollup.config.legacy.js @@ -29,7 +29,9 @@ export default { commonjs(), json({ indent: '' }), babel({ - babelHelpers: 'bundled' + babelHelpers: 'bundled', + // avoid circular dependencies due to `useBuiltIns: usage` option + exclude: [/\/core-js\//] }) ] }; diff --git a/data/core.yaml b/data/core.yaml index f63a33bf7..d0313ecc9 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -73,7 +73,9 @@ en: cancel_draw: annotation: Canceled drawing. change_role: - annotation: Changed the role of a relation member. + annotation: + one: Changed the role of a relation member. + other: "Changed the roles of {n} relation members." change_tags: annotation: Changed tags. copy: @@ -242,9 +244,13 @@ en: single: This feature can't be downgraded because it has a Wikidata tag. multiple: These features can't be downgraded because some have Wikidata tags. add_member: - annotation: Added a member to a relation. + annotation: + one: Added a member to a relation. + other: "Added {n} members to a relation." delete_member: - annotation: Removed a member from a relation. + annotation: + one: Removed a member from a relation. + other: "Removed {n} members from a relation." reorder_members: annotation: Reordered a relation's members. connect: @@ -683,6 +689,7 @@ en: new_relation: New relation... choose_relation: Choose a parent relation role: Role + multiple_roles: Multiple Roles choose: Select feature type results: one: "{n} result for {search}" diff --git a/data/deprecated.json b/data/deprecated.json index bad0fa115..6d6161a77 100644 --- a/data/deprecated.json +++ b/data/deprecated.json @@ -1484,7 +1484,7 @@ }, { "old": {"type": "audio", "amenity": "studio"}, - "replace": {"studio": "audio"} + "replace": {"studio": "audio", "amenity": "studio"} }, { "old": {"type": "broad_leaved"}, @@ -1544,7 +1544,7 @@ }, { "old": {"type": "video", "amenity": "studio"}, - "replace": {"studio": "video"} + "replace": {"studio": "video", "amenity": "studio"} }, { "old": {"type": "water", "man_made": "pipeline"}, diff --git a/data/presets/README.md b/data/presets/README.md index b50e6dbbf..f30da8f2b 100644 --- a/data/presets/README.md +++ b/data/presets/README.md @@ -378,14 +378,18 @@ For combo fields, spaces are replaced with underscores in the tag value if `snak For combo fields, case-sensitive field values are allowed if `caseSensitive` is `true`. The default is `false`. -##### `min_value` +##### `minValue` For number fields, the lowest valid value. There is no default. -##### `max_value` +##### `maxValue` For number fields, the greatest valid value. There is no default. +##### `increment` + +For number fields, the amount the stepper control increases or decreases the value. The default is `1`. + ##### `prerequisiteTag` An object defining the tags the feature needs before this field will be displayed. It may have this property: diff --git a/data/presets/fields.json b/data/presets/fields.json index 83715134f..2e28d0f60 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -131,10 +131,10 @@ "diplomatic/services": {"key": "diplomatic:services:", "type": "multiCombo", "label": "Services"}, "direction_cardinal": {"key": "direction", "type": "combo", "label": "Direction", "strings": {"options": {"N": "North", "E": "East", "S": "South", "W": "West", "NE": "Northeast", "SE": "Southeast", "SW": "Southwest", "NW": "Northwest", "NNE": "North-northeast", "ENE": "East-northeast", "ESE": "East-southeast", "SSE": "South-southeast", "SSW": "South-southwest", "WSW": "West-southwest", "WNW": "West-northwest", "NNW": "North-northwest"}}}, "direction_clock": {"key": "direction", "type": "combo", "label": "Direction", "strings": {"options": {"clockwise": "Clockwise", "anticlockwise": "Counterclockwise"}}}, - "direction_point": {"key": "direction", "type": "number", "label": "Direction (Degrees Clockwise)", "placeholder": "45, 90, 180, 270", "geometry": ["point"]}, + "direction_point": {"key": "direction", "type": "number", "label": "Direction (Degrees Clockwise)", "placeholder": "45, 90, 180, 270", "increment": 5, "geometry": ["point"]}, "direction_vertex_dual": {"key": "direction", "type": "combo", "label": "Direction Affected", "strings": {"options": {"forward": "Forward", "backward": "Backward"}}}, "direction_vertex": {"key": "direction", "type": "combo", "label": "Direction Affected", "strings": {"options": {"forward": "Forward", "backward": "Backward", "both": "Both / All"}}}, - "direction": {"key": "direction", "type": "number", "label": "Direction (Degrees Clockwise)", "placeholder": "45, 90, 180, 270"}, + "direction": {"key": "direction", "type": "number", "label": "Direction (Degrees Clockwise)", "increment": 5, "placeholder": "45, 90, 180, 270"}, "dispensing": {"key": "dispensing", "type": "check", "label": "Dispenses Prescriptions", "default": "yes"}, "display": {"key": "display", "type": "combo", "label": "Display", "options": ["analog", "digital", "sundial", "unorthodox"]}, "distance": {"key": "distance", "type": "text", "label": "Distance", "terms": ["length", "mileage"]}, diff --git a/data/presets/fields/direction.json b/data/presets/fields/direction.json index c4324ce8e..968152344 100644 --- a/data/presets/fields/direction.json +++ b/data/presets/fields/direction.json @@ -2,5 +2,6 @@ "key": "direction", "type": "number", "label": "Direction (Degrees Clockwise)", + "increment": 5, "placeholder": "45, 90, 180, 270" } diff --git a/data/presets/fields/direction_point.json b/data/presets/fields/direction_point.json index 23100bb2d..ea291bfaf 100644 --- a/data/presets/fields/direction_point.json +++ b/data/presets/fields/direction_point.json @@ -3,6 +3,7 @@ "type": "number", "label": "Direction (Degrees Clockwise)", "placeholder": "45, 90, 180, 270", + "increment": 5, "geometry": [ "point" ] diff --git a/data/presets/presets.json b/data/presets/presets.json index b14ab1597..2cfe8de08 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -1348,7 +1348,7 @@ "waterway/sanitary_dump_station": {"icon": "temaki-waste", "fields": ["name", "operator", "access_simple", "fee", "payment_multi_fee", "charge_fee", "water_point"], "moreFields": ["opening_hours", "opening_hours/covid19", "seamark/type"], "geometry": ["point", "vertex", "area"], "terms": ["Boat", "Watercraft", "Sanitary", "Dump Station", "Pumpout", "Pump out", "Elsan", "CDP", "CTDP", "Chemical Toilet"], "tags": {"waterway": "sanitary_dump_station"}, "name": "Marine Toilet Disposal"}, "waterway/stream_intermittent": {"icon": "iD-waterway-stream", "fields": ["{waterway/stream}"], "moreFields": ["{waterway/stream}"], "geometry": ["line"], "terms": ["arroyo", "beck", "branch", "brook", "burn", "course", "creek", "drift", "flood", "flow", "gully", "run", "runnel", "rush", "spate", "spritz", "tributary", "wadi", "wash", "watercourse"], "tags": {"waterway": "stream", "intermittent": "yes"}, "reference": {"key": "waterway", "value": "stream"}, "name": "Intermittent Stream"}, "waterway/stream": {"icon": "iD-waterway-stream", "fields": ["name", "structure_waterway", "width", "intermittent"], "moreFields": ["covered", "fishing", "gnis/feature_id", "salt", "tidal"], "geometry": ["line"], "terms": ["beck", "branch", "brook", "burn", "course", "creek", "current", "drift", "flood", "flow", "freshet", "race", "rill", "rindle", "rivulet", "run", "runnel", "rush", "spate", "spritz", "surge", "tide", "torrent", "tributary", "watercourse"], "tags": {"waterway": "stream"}, "name": "Stream"}, - "waterway/tidal_channel": {"icon": "iD-waterway-stream", "fields": ["name", "structure_waterway", "width", "salt", "tidal", "intermittent"], "moreFields": ["covered", "fishing", "gnis/feature_id"], "geometry": ["line"], "terms": ["coastal", "pill", "intertidal", "mangroves", "marine", "salt marsh", "tidal creek", "tidal flat", "tidal inlet", "waterway"], "tags": {"waterway": "tidal_channel"}, "addTags": {"waterway": "tidal_channel", "tidal": "yes"}, "name": "Tidal Channel"}, + "waterway/tidal_channel": {"icon": "iD-waterway-stream", "fields": ["name", "structure_waterway", "width", "salt", "tidal", "intermittent"], "moreFields": ["covered", "fishing", "gnis/feature_id"], "geometry": ["line"], "terms": ["coastal", "pill", "intertidal", "mangroves", "marine", "salt marsh", "tidal creek", "tidal flat", "tidal inlet", "waterway"], "tags": {"waterway": "tidal_channel"}, "name": "Tidal Channel"}, "waterway/water_point": {"icon": "maki-drinking-water", "fields": ["{amenity/water_point}"], "moreFields": ["{amenity/water_point}"], "geometry": ["point", "vertex", "area"], "tags": {"waterway": "water_point"}, "terms": ["water faucet", "water point", "water tap", "water source", "water spigot"], "name": "Marine Drinking Water"}, "waterway/waterfall": {"icon": "maki-waterfall", "fields": ["name", "height", "width", "intermittent"], "moreFields": ["gnis/feature_id"], "geometry": ["vertex"], "terms": ["fall"], "tags": {"waterway": "waterfall"}, "name": "Waterfall"}, "waterway/weir": {"icon": "maki-dam", "fields": ["name", "operator", "height", "material"], "moreFields": ["gnis/feature_id", "seamark/type"], "geometry": ["vertex", "line"], "terms": ["low-head dam", "low-rise dam", "wier"], "tags": {"waterway": "weir"}, "name": "Weir"}, diff --git a/data/presets/presets/waterway/tidal_channel.json b/data/presets/presets/waterway/tidal_channel.json index 7582d93e9..f86987dec 100644 --- a/data/presets/presets/waterway/tidal_channel.json +++ b/data/presets/presets/waterway/tidal_channel.json @@ -31,9 +31,5 @@ "tags": { "waterway": "tidal_channel" }, - "addTags": { - "waterway": "tidal_channel", - "tidal": "yes" - }, "name": "Tidal Channel" } diff --git a/data/presets/schema/field.json b/data/presets/schema/field.json index ddd7c762c..ae62e0753 100644 --- a/data/presets/schema/field.json +++ b/data/presets/schema/field.json @@ -148,6 +148,11 @@ "description": "Maximum field value (number fields only)", "type": "integer" }, + "increment": { + "description": "The amount the stepper control should add or subtract (number fields only)", + "minimum": 1, + "type": "integer" + }, "prerequisiteTag": { "description": "Tagging constraint for showing this field in the editor", "type": { diff --git a/dist/locales/en.json b/dist/locales/en.json index c6fca795a..2cadfbedb 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -94,7 +94,10 @@ "annotation": "Canceled drawing." }, "change_role": { - "annotation": "Changed the role of a relation member." + "annotation": { + "one": "Changed the role of a relation member.", + "other": "Changed the roles of {n} relation members." + } }, "change_tags": { "annotation": "Changed tags." @@ -323,10 +326,16 @@ } }, "add_member": { - "annotation": "Added a member to a relation." + "annotation": { + "one": "Added a member to a relation.", + "other": "Added {n} members to a relation." + } }, "delete_member": { - "annotation": "Removed a member from a relation." + "annotation": { + "one": "Removed a member from a relation.", + "other": "Removed {n} members from a relation." + } }, "reorder_members": { "annotation": "Reordered a relation's members." @@ -882,6 +891,7 @@ "new_relation": "New relation...", "choose_relation": "Choose a parent relation", "role": "Role", + "multiple_roles": "Multiple Roles", "choose": "Select feature type", "results": { "one": "{n} result for {search}", diff --git a/docs/statistics.html b/docs/statistics.html index 07e457f8d..c928779e8 100644 --- a/docs/statistics.html +++ b/docs/statistics.html @@ -2639,7 +2639,7 @@ main {