From: Tom Hughes Date: Sun, 20 Aug 2023 10:04:28 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/pull/4169' X-Git-Tag: live~1613 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/2a1689f9621b7ec94e4935ea11fe64a45390ef7d?hp=ad164d384e6215aecb03cf679ca2df7faa38cfb5 Merge remote-tracking branch 'upstream/pull/4169' --- diff --git a/FAQ.md b/FAQ.md index 4ed5df7c4..d4ac1fc9f 100644 --- a/FAQ.md +++ b/FAQ.md @@ -15,7 +15,7 @@ drive. This is a great way to reach a lot of people! * Edit [`config/banners.yml`](https://github.com/openstreetmap/openstreetmap-website/blob/master/config/banners.yml) to contain an entry for the event banner. It should contain the following: * `id` - a unique identifier (e.g. `donate2017`) * `alt` - alt name for the image (e.g. `OpenStreetMap Funding Drive 2017`) - * `link` - URL for your event page (e.g. `https://donate.openstreetmap.org/`) + * `link` - URL for your event page (e.g. `https://supporting.openstreetmap.org/`) * `img` - the filename for the banner image (e.g. `banners/donate-2017.jpg`) * `enddate` - the final date that the banner will be shown (e.g. `2017-oct-31`) * (optional) Feel free to cleanup the old images from the `app/assets/images/banners/` folder and old entries in the `config/banners.yml` file. diff --git a/Gemfile.lock b/Gemfile.lock index c78172a41..774803788 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -372,7 +372,7 @@ GEM popper_js (2.11.8) progress (3.6.0) public_suffix (5.0.3) - puma (5.6.6) + puma (5.6.7) nio4r (~> 2.0) quad_tile (1.0.1) r2 (0.2.8) diff --git a/app/assets/javascripts/leaflet.map.js b/app/assets/javascripts/leaflet.map.js index 88d16bc8e..6e61100f2 100644 --- a/app/assets/javascripts/leaflet.map.js +++ b/app/assets/javascripts/leaflet.map.js @@ -22,7 +22,7 @@ L.OSM.Map = L.Map.extend({ var copyright = I18n.t("javascripts.map.copyright_text", { copyright_link: copyright_link }); var donate = $("", { - "href": "https://donate.openstreetmap.org", + "href": "https://supporting.openstreetmap.org", "class": "donate-attr", "text": I18n.t("javascripts.map.make_a_donation") }).prop("outerHTML"); diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 2386fed82..aa2c95a99 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -324,10 +324,6 @@ body.small-nav { .overlay-sidebar #sidebar #banner { display: none; } - - .leaflet-top.leaflet-right { - top: 10px !important; - } } /* Utility for styling notification numbers */ diff --git a/app/controllers/api/changesets_controller.rb b/app/controllers/api/changesets_controller.rb index 0a49a95f4..84f1ccdb5 100644 --- a/app/controllers/api/changesets_controller.rb +++ b/app/controllers/api/changesets_controller.rb @@ -157,6 +157,8 @@ module Api ## # query changesets by bounding box, time, user or open/closed status. def query + raise OSM::APIBadUserInput, "cannot use order=oldest with time" if params[:time] && params[:order] == "oldest" + # find any bounding box bbox = BoundingBox.from_bbox_params(params) if params["bbox"] @@ -166,15 +168,16 @@ module Api changesets = conditions_bbox(changesets, bbox) changesets = conditions_user(changesets, params["user"], params["display_name"]) changesets = conditions_time(changesets, params["time"]) + changesets = conditions_from_to(changesets, params["from"], params["to"]) changesets = conditions_open(changesets, params["open"]) changesets = conditions_closed(changesets, params["closed"]) changesets = conditions_ids(changesets, params["changesets"]) # sort the changesets changesets = if params[:order] == "oldest" - changesets.order(:closed_at => :asc) + changesets.order(:created_at => :asc) else - changesets.order(:closed_at => :desc) + changesets.order(:created_at => :desc) end # limit the result @@ -327,7 +330,7 @@ module Api end ## - # restrict changes to those closed during a particular time period + # restrict changesets to those during a particular time period def conditions_time(changesets, time) if time.nil? changesets @@ -351,6 +354,33 @@ module Api raise OSM::APIBadUserInput, e.message.to_s end + ## + # restrict changesets to those opened during a particular time period + # works similar to from..to of notes controller, including the requirement of 'from' when specifying 'to' + def conditions_from_to(changesets, from, to) + if from + begin + from = Time.parse(from).utc + rescue ArgumentError + raise OSM::APIBadUserInput, "Date #{from} is in a wrong format" + end + + begin + to = if to + Time.parse(to).utc + else + Time.now.utc + end + rescue ArgumentError + raise OSM::APIBadUserInput, "Date #{to} is in a wrong format" + end + + changesets.where(:created_at => from..to) + else + changesets + end + end + ## # return changesets which are open (haven't been closed yet) # we do this by seeing if the 'closed at' time is in the future. Also if we've diff --git a/app/controllers/api/notes_controller.rb b/app/controllers/api/notes_controller.rb index 5e24532e7..83024288d 100644 --- a/app/controllers/api/notes_controller.rb +++ b/app/controllers/api/notes_controller.rb @@ -345,13 +345,13 @@ module Api # Get the maximum number of results to return def result_limit if params[:limit] - if params[:limit].to_i.positive? && params[:limit].to_i <= 10000 + if params[:limit].to_i.positive? && params[:limit].to_i <= Settings.max_note_query_limit params[:limit].to_i else - raise OSM::APIBadUserInput, "Note limit must be between 1 and 10000" + raise OSM::APIBadUserInput, "Note limit must be between 1 and #{Settings.max_note_query_limit}" end else - 100 + Settings.default_note_query_limit end end diff --git a/app/controllers/api/versions_controller.rb b/app/controllers/api/versions_controller.rb index 7de335091..d5c9c5f87 100644 --- a/app/controllers/api/versions_controller.rb +++ b/app/controllers/api/versions_controller.rb @@ -2,6 +2,7 @@ module Api class VersionsController < ApiController authorize_resource :class => false + before_action :set_request_formats around_action :api_call_handle_error, :api_call_timeout # Show the list of available API versions. This will replace the global diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index c381119f0..88c7a46ac 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -14,7 +14,7 @@ class IssuesController < ApplicationController @title = t ".title" @issue_types = [] - @issue_types.push("Note") if current_user.moderator? + @issue_types.push("Note", "User") if current_user.moderator? @issue_types.push("DiaryEntry", "DiaryComment", "User") if current_user.administrator? @users = User.joins(:roles).where(:user_roles => { :role => current_user.roles.map(&:role) }).distinct diff --git a/app/views/api/capabilities/show.builder b/app/views/api/capabilities/show.builder index 1258601bb..bd90b2a6a 100644 --- a/app/views/api/capabilities/show.builder +++ b/app/views/api/capabilities/show.builder @@ -10,6 +10,8 @@ xml.osm(OSM::API.new.xml_root_attributes) do |osm| api.changesets(:maximum_elements => Changeset::MAX_ELEMENTS, :default_query_limit => Settings.default_changeset_query_limit, :maximum_query_limit => Settings.max_changeset_query_limit) + api.notes(:default_query_limit => Settings.default_note_query_limit, + :maximum_query_limit => Settings.max_note_query_limit) api.timeout(:seconds => Settings.api_timeout) api.status(:database => @database_status, :api => @api_status, diff --git a/app/views/api/capabilities/show.json.jbuilder b/app/views/api/capabilities/show.json.jbuilder index ceffa8b0e..b9e3a20c7 100644 --- a/app/views/api/capabilities/show.json.jbuilder +++ b/app/views/api/capabilities/show.json.jbuilder @@ -25,6 +25,10 @@ json.api do json.default_query_limit Settings.default_changeset_query_limit json.maximum_query_limit Settings.max_changeset_query_limit end + json.notes do + json.default_query_limit Settings.default_note_query_limit + json.maximum_query_limit Settings.max_note_query_limit + end json.timeout do json.seconds Settings.api_timeout end diff --git a/app/views/api/versions/show.json.jbuilder b/app/views/api/versions/show.json.jbuilder new file mode 100644 index 000000000..7336902bd --- /dev/null +++ b/app/views/api/versions/show.json.jbuilder @@ -0,0 +1,5 @@ +json.partial! "api/root_attributes" + +json.api do + json.versions @versions +end diff --git a/app/views/notes/index.html.erb b/app/views/notes/index.html.erb index dd0cb2608..ef6251634 100644 --- a/app/views/notes/index.html.erb +++ b/app/views/notes/index.html.erb @@ -1,6 +1,9 @@ <% content_for :heading do %>

<%= t ".heading", :user => @user.display_name %>

-

<%= t ".subheading_html", :user => link_to(@user.display_name, user_path(@user)) %>

+

<%= t ".subheading_html", + :user => link_to(@user.display_name, user_path(@user)), + :submitted => tag.span(t(".subheading_submitted"), :class => "px-2 py-1 bg-primary bg-opacity-25"), + :commented => tag.span(t(".subheading_commented"), :class => "px-2 py-1 bg-white") %>

<% end %> <% if @notes.empty? %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 8db646d23..7b415f6b7 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2878,7 +2878,9 @@ en: index: title: "Notes submitted or commented on by %{user}" heading: "%{user}'s Notes" - subheading_html: "Notes submitted or commented on by %{user}" + subheading_html: "Notes %{submitted} or %{commented} by %{user}" + subheading_submitted: "submitted" + subheading_commented: "commented on" no_notes: No notes id: "Id" creator: "Creator" diff --git a/config/settings.yml b/config/settings.yml index b54763af3..d9910ce28 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -39,6 +39,10 @@ max_number_of_way_nodes: 2000 max_number_of_relation_members: 32000 # The maximum area you're allowed to request notes from, in square degrees max_note_request_area: 25 +# Default limit on the number of notes returned by the note search api method +default_note_query_limit: 100 +# Maximum limit on the number of notes returned by the note search api method +max_note_query_limit: 10000 # Zoom level to use for postcode results from the geocoder postcode_zoom: 15 # Timeout for API calls in seconds diff --git a/test/controllers/api/capabilities_controller_test.rb b/test/controllers/api/capabilities_controller_test.rb index aa8e21938..46ebb6a37 100644 --- a/test/controllers/api/capabilities_controller_test.rb +++ b/test/controllers/api/capabilities_controller_test.rb @@ -32,8 +32,14 @@ module Api assert_select "area[maximum='#{Settings.max_request_area}']", :count => 1 assert_select "note_area[maximum='#{Settings.max_note_request_area}']", :count => 1 assert_select "tracepoints[per_page='#{Settings.tracepoints_per_page}']", :count => 1 - assert_select "changesets[maximum_elements='#{Changeset::MAX_ELEMENTS}']", :count => 1 + assert_select "changesets" \ + "[maximum_elements='#{Changeset::MAX_ELEMENTS}']" \ + "[default_query_limit='#{Settings.default_changeset_query_limit}']" \ + "[maximum_query_limit='#{Settings.max_changeset_query_limit}']", :count => 1 assert_select "relationmembers[maximum='#{Settings.max_number_of_relation_members}']", :count => 1 + assert_select "notes" \ + "[default_query_limit='#{Settings.default_note_query_limit}']" \ + "[maximum_query_limit='#{Settings.max_note_query_limit}']", :count => 1 assert_select "status[database='online']", :count => 1 assert_select "status[api='online']", :count => 1 assert_select "status[gpx='online']", :count => 1 @@ -58,6 +64,8 @@ module Api assert_equal Settings.default_changeset_query_limit, js["api"]["changesets"]["default_query_limit"] assert_equal Settings.max_changeset_query_limit, js["api"]["changesets"]["maximum_query_limit"] assert_equal Settings.max_number_of_relation_members, js["api"]["relationmembers"]["maximum"] + assert_equal Settings.default_note_query_limit, js["api"]["notes"]["default_query_limit"] + assert_equal Settings.max_note_query_limit, js["api"]["notes"]["maximum_query_limit"] assert_equal "online", js["api"]["status"]["database"] assert_equal "online", js["api"]["status"]["api"] assert_equal "online", js["api"]["status"]["gpx"] diff --git a/test/controllers/api/changesets_controller_test.rb b/test/controllers/api/changesets_controller_test.rb index 4f96e3ecb..fd1940d6b 100644 --- a/test/controllers/api/changesets_controller_test.rb +++ b/test/controllers/api/changesets_controller_test.rb @@ -1968,7 +1968,7 @@ module Api end ## - # test the query functionality of changesets with the order parameter + # test the query functionality of sequential changesets with order and time parameters def test_query_order user = create(:user) changeset1 = create(:changeset, :closed, :user => user, :created_at => Time.utc(2008, 1, 1, 0, 0, 0), :closed_at => Time.utc(2008, 1, 2, 0, 0, 0)) @@ -1976,30 +1976,77 @@ module Api changeset3 = create(:changeset, :closed, :user => user, :created_at => Time.utc(2008, 3, 1, 0, 0, 0), :closed_at => Time.utc(2008, 3, 2, 0, 0, 0)) changeset4 = create(:changeset, :closed, :user => user, :created_at => Time.utc(2008, 4, 1, 0, 0, 0), :closed_at => Time.utc(2008, 4, 2, 0, 0, 0)) changeset5 = create(:changeset, :closed, :user => user, :created_at => Time.utc(2008, 5, 1, 0, 0, 0), :closed_at => Time.utc(2008, 5, 2, 0, 0, 0)) + changeset6 = create(:changeset, :closed, :user => user, :created_at => Time.utc(2008, 6, 1, 0, 0, 0), :closed_at => Time.utc(2008, 6, 2, 0, 0, 0)) + + get changesets_path + assert_response :success + assert_changesets_in_order [changeset6, changeset5, changeset4, changeset3, changeset2, changeset1] get changesets_path(:order => "oldest") assert_response :success - assert_changesets_in_order [changeset1, changeset2, changeset3, changeset4, changeset5] + assert_changesets_in_order [changeset1, changeset2, changeset3, changeset4, changeset5, changeset6] + + [ + # lower time bound at the opening time of a changeset + ["2008-02-01T00:00:00Z", "2008-05-15T00:00:00Z", [changeset5, changeset4, changeset3, changeset2], [changeset5, changeset4, changeset3, changeset2]], + # lower time bound in the middle of a changeset + ["2008-02-01T12:00:00Z", "2008-05-15T00:00:00Z", [changeset5, changeset4, changeset3, changeset2], [changeset5, changeset4, changeset3]], + # lower time bound at the closing time of a changeset + ["2008-02-02T00:00:00Z", "2008-05-15T00:00:00Z", [changeset5, changeset4, changeset3, changeset2], [changeset5, changeset4, changeset3]], + # lower time bound after the closing time of a changeset + ["2008-02-02T00:00:01Z", "2008-05-15T00:00:00Z", [changeset5, changeset4, changeset3], [changeset5, changeset4, changeset3]], + # upper time bound in the middle of a changeset + ["2007-09-09T12:00:00Z", "2008-04-01T12:00:00Z", [changeset4, changeset3, changeset2, changeset1], [changeset4, changeset3, changeset2, changeset1]], + # empty range + ["2009-02-02T00:00:01Z", "2018-05-15T00:00:00Z", [], []] + ].each do |from, to, interval_changesets, point_changesets| + get changesets_path(:time => "#{from},#{to}") + assert_response :success + assert_changesets_in_order interval_changesets - get changesets_path(:order => "oldest", :time => "2008-01-01T00:00Z,2018-01-01T00:00Z") + get changesets_path(:from => from, :to => to) + assert_response :success + assert_changesets_in_order point_changesets + + get changesets_path(:from => from, :to => to, :order => "oldest") + assert_response :success + assert_changesets_in_order point_changesets.reverse + end + end + + ## + # test the query functionality of overlapping changesets with order and time parameters + def test_query_order_overlapping + user = create(:user) + changeset1 = create(:changeset, :closed, :user => user, :created_at => Time.utc(2015, 6, 4, 17, 0, 0), :closed_at => Time.utc(2015, 6, 4, 17, 0, 0)) + changeset2 = create(:changeset, :closed, :user => user, :created_at => Time.utc(2015, 6, 4, 16, 0, 0), :closed_at => Time.utc(2015, 6, 4, 18, 0, 0)) + changeset3 = create(:changeset, :closed, :user => user, :created_at => Time.utc(2015, 6, 4, 14, 0, 0), :closed_at => Time.utc(2015, 6, 4, 20, 0, 0)) + changeset4 = create(:changeset, :closed, :user => user, :created_at => Time.utc(2015, 6, 3, 23, 0, 0), :closed_at => Time.utc(2015, 6, 4, 23, 0, 0)) + create(:changeset, :closed, :user => user, :created_at => Time.utc(2015, 6, 2, 23, 0, 0), :closed_at => Time.utc(2015, 6, 3, 23, 0, 0)) + + get changesets_path(:time => "2015-06-04T00:00:00Z") assert_response :success - assert_changesets_in_order [changeset1, changeset2, changeset3, changeset4, changeset5] + assert_changesets_in_order [changeset1, changeset2, changeset3, changeset4] - get changesets_path(:order => "oldest", :time => "2008-01-02T00:00Z,2018-01-01T00:00Z") + get changesets_path(:from => "2015-06-04T00:00:00Z") assert_response :success - assert_changesets_in_order [changeset1, changeset2, changeset3, changeset4, changeset5] + assert_changesets_in_order [changeset1, changeset2, changeset3] - get changesets_path(:order => "oldest", :time => "2008-01-02T00:01Z,2018-01-01T00:00Z") + get changesets_path(:from => "2015-06-04T00:00:00Z", :order => "oldest") assert_response :success - assert_changesets_in_order [changeset2, changeset3, changeset4, changeset5] + assert_changesets_in_order [changeset3, changeset2, changeset1] - get changesets_path(:order => "oldest", :time => "2008-04-01T00:00Z,2018-01-01T00:00Z") + get changesets_path(:time => "2015-06-04T16:00:00Z,2015-06-04T17:30:00Z") assert_response :success - assert_changesets_in_order [changeset4, changeset5] + assert_changesets_in_order [changeset1, changeset2, changeset3, changeset4] - get changesets_path(:order => "oldest", :time => "2008-06-01T00:00Z,2018-01-01T00:00Z") + get changesets_path(:from => "2015-06-04T16:00:00Z", :to => "2015-06-04T17:30:00Z") assert_response :success - assert_changesets_in_order [] + assert_changesets_in_order [changeset1, changeset2] + + get changesets_path(:from => "2015-06-04T16:00:00Z", :to => "2015-06-04T17:30:00Z", :order => "oldest") + assert_response :success + assert_changesets_in_order [changeset2, changeset1] end ## @@ -2029,6 +2076,9 @@ module Api get changesets_path(:user => uid) assert_response :bad_request, "'#{uid}' isn't a valid user ID" end + + get changesets_path(:order => "oldest", :time => "2008-01-01T00:00Z,2018-01-01T00:00Z") + assert_response :bad_request, "cannot use order=oldest with time" end ## diff --git a/test/controllers/api/notes_controller_test.rb b/test/controllers/api/notes_controller_test.rb index da2478169..81e6b0ba1 100644 --- a/test/controllers/api/notes_controller_test.rb +++ b/test/controllers/api/notes_controller_test.rb @@ -695,6 +695,9 @@ module Api assert_select "gpx", :count => 1 do assert_select "wpt", :count => 1 end + + get api_notes_path(:bbox => "1,1,1.2,1.2", :limit => Settings.max_note_query_limit, :format => "rss") + assert_response :success end def test_index_empty_area @@ -804,7 +807,7 @@ module Api get api_notes_path(:bbox => "1,1,1.7,1.7", :limit => "0", :format => "json") assert_response :bad_request - get api_notes_path(:bbox => "1,1,1.7,1.7", :limit => "10001", :format => "json") + get api_notes_path(:bbox => "1,1,1.7,1.7", :limit => Settings.max_note_query_limit + 1, :format => "json") assert_response :bad_request end @@ -841,6 +844,9 @@ module Api assert_select "gpx", :count => 1 do assert_select "wpt", :count => 1 end + + get search_api_notes_path(:q => "note comment", :limit => Settings.max_note_query_limit, :format => "xml") + assert_response :success end def test_search_by_display_name_success @@ -995,7 +1001,7 @@ module Api get search_api_notes_path(:q => "no match", :limit => "0", :format => "json") assert_response :bad_request - get search_api_notes_path(:q => "no match", :limit => "10001", :format => "json") + get search_api_notes_path(:q => "no match", :limit => Settings.max_note_query_limit + 1, :format => "json") assert_response :bad_request get search_api_notes_path(:display_name => "non-existent") @@ -1037,6 +1043,9 @@ module Api assert_select "item", :count => 2 end end + + get feed_api_notes_path(:bbox => "1,1,1.2,1.2", :limit => Settings.max_note_query_limit, :format => "rss") + assert_response :success end def test_feed_fail @@ -1049,7 +1058,7 @@ module Api get feed_api_notes_path(:bbox => "1,1,1.2,1.2", :limit => "0", :format => "rss") assert_response :bad_request - get feed_api_notes_path(:bbox => "1,1,1.2,1.2", :limit => "10001", :format => "rss") + get feed_api_notes_path(:bbox => "1,1,1.2,1.2", :limit => Settings.max_note_query_limit + 1, :format => "rss") assert_response :bad_request end end diff --git a/test/controllers/api/versions_controller_test.rb b/test/controllers/api/versions_controller_test.rb index a1a616ad1..1c70831c9 100644 --- a/test/controllers/api/versions_controller_test.rb +++ b/test/controllers/api/versions_controller_test.rb @@ -9,10 +9,18 @@ module Api { :path => "/api/versions", :method => :get }, { :controller => "api/versions", :action => "show" } ) + assert_routing( + { :path => "/api/versions.json", :method => :get }, + { :controller => "api/versions", :action => "show", :format => "json" } + ) assert_recognizes( { :controller => "api/versions", :action => "show" }, { :path => "/api/versions", :method => :get } ) + assert_recognizes( + { :controller => "api/versions", :action => "show", :format => "json" }, + { :path => "/api/versions.json", :method => :get } + ) end def test_versions @@ -25,6 +33,14 @@ module Api end end + def test_versions_json + get api_versions_path, :params => { :format => "json" } + assert_response :success + js = ActiveSupport::JSON.decode(@response.body) + assert_not_nil js + assert_equal [Settings.api_version], js["api"]["versions"] + end + def test_no_version_in_root_element get api_versions_path assert_response :success diff --git a/vendor/assets/iD/iD.css.erb b/vendor/assets/iD/iD.css.erb index 851b8cf1c..b1a0176ee 100644 --- a/vendor/assets/iD/iD.css.erb +++ b/vendor/assets/iD/iD.css.erb @@ -2749,9 +2749,11 @@ background-position: center; background-repeat: no-repeat; } + .ideditor #ideditor-viewer-mapilio-simple-wrap { height: 100%; } + .ideditor #ideditor-viewer-mapilio-simple { width: 100%; height: 100%; @@ -2760,6 +2762,14 @@ transform-origin: 0 0; } +.ideditor #ideditor-viewer-mapilio-simple img { + width: 100%; + height: 100%; + -o-object-fit: cover; + object-fit: cover; + overflow: hidden +} + /* Streetside Viewer (pannellum) */ .ideditor .ms-wrapper .photo-attribution .image-link { display: block; diff --git a/vendor/assets/iD/iD.js b/vendor/assets/iD/iD.js index d89cd30da..0401484a0 100644 --- a/vendor/assets/iD/iD.js +++ b/vendor/assets/iD/iD.js @@ -22820,7 +22820,7 @@ // package.json var package_default = { name: "iD", - version: "2.27.0", + version: "2.27.1", description: "A friendly editor for OpenStreetMap", main: "dist/iD.min.js", repository: "github:openstreetmap/iD", @@ -22897,7 +22897,7 @@ "@fortawesome/free-regular-svg-icons": "~6.4.2", "@fortawesome/free-solid-svg-icons": "~6.4.2", "@mapbox/maki": "^8.0.1", - "@openstreetmap/id-tagging-schema": "^6.3.0", + "@openstreetmap/id-tagging-schema": "^6.4.1", "@rapideditor/temaki": "~5.4.0", "@transifex/api": "^5.4.0", autoprefixer: "^10.4.15", @@ -22931,7 +22931,7 @@ "node-fetch": "^2.6.12", "npm-run-all": "^4.0.0", "osm-community-index": "~5.5.4", - postcss: "^8.4.27", + postcss: "^8.4.28", "postcss-selector-prepend": "^0.5.0", shelljs: "^0.8.0", shx: "^0.3.0", @@ -25869,24 +25869,13 @@ } return value2 === null || value2 === void 0 ? valueNull : typeof value2 === "function" ? valueFunction : valueConstant; } - function stickyCursor(func) { - const supportedTypes = ["text", "search", "url", "tel", "password"]; - if (!supportedTypes.includes(selection2.node()?.type)) { - return func; - } - return function() { - const cursor = { start: this.selectionStart, end: this.selectionEnd }; - func.apply(this, arguments); - this.setSelectionRange(cursor.start, cursor.end); - }; - } if (arguments.length === 1) { return selection2.property("value"); } if (shouldUpdate === void 0) { shouldUpdate = (a2, b2) => a2 !== b2; } - return selection2.each(stickyCursor(setValue(value, shouldUpdate))); + return selection2.each(setValue(value, shouldUpdate)); } // modules/util/keybinding.js diff --git a/vendor/assets/iD/iD/img/fa-sprite.svg b/vendor/assets/iD/iD/img/fa-sprite.svg index 7b4442c91..941c5c649 100644 --- a/vendor/assets/iD/iD/img/fa-sprite.svg +++ b/vendor/assets/iD/iD/img/fa-sprite.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 5ff60cd30..6256a8aef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -568,9 +568,9 @@ optionator@^0.9.3: type-check "^0.4.0" osm-community-index@^5.2.0: - version "5.5.4" - resolved "https://registry.yarnpkg.com/osm-community-index/-/osm-community-index-5.5.4.tgz#8e5ed12eed07206b507bfee594e264500f2d7cd3" - integrity sha512-n53euxtwFlJHaTkMCyRxPK+OZJnqkI4zwp9rmEbuzIV57kgkci7qaLDDjt44tszLcXfi8eCTLhKtykU0xIRpVQ== + version "5.5.5" + resolved "https://registry.yarnpkg.com/osm-community-index/-/osm-community-index-5.5.5.tgz#dd7a4d333d01dc83ac1b5cf83c3f0f99f4339ec4" + integrity sha512-bGl9WqkfPhIsAkv62QW2erlTQolSjMODmiH0Dp7ld2k1bTUz1D3ZRKRyjGi7fFuUwlrkE1MrbP0mRFezmPbaww== dependencies: diacritics "^1.3.0"