geoblacklight 6.0.0.pre.alpha.7 → 6.0.0.pre.beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +14 -3
  3. data/README.md +2 -2
  4. data/Rakefile +1 -17
  5. data/app/assets/images/geoblacklight/logo-dark.svg +31 -0
  6. data/app/assets/images/geoblacklight/logo.svg +10 -10
  7. data/app/assets/stylesheets/geoblacklight/global.css +44 -7
  8. data/app/assets/stylesheets/geoblacklight/index_maps.css +0 -7
  9. data/app/assets/stylesheets/geoblacklight/record.css +33 -9
  10. data/app/assets/stylesheets/geoblacklight/search.css +66 -17
  11. data/app/assets/stylesheets/geoblacklight/viewers.css +18 -111
  12. data/app/assets/stylesheets/geoblacklight.css +0 -5
  13. data/app/components/blacklight/icons/georeferenced_component.rb +23 -0
  14. data/app/components/geoblacklight/document/download_link_component.html.erb +1 -1
  15. data/app/components/geoblacklight/document/preview_component.html.erb +0 -2
  16. data/app/components/geoblacklight/document_component.html.erb +0 -4
  17. data/app/components/geoblacklight/facets/bbox_field_component.html.erb +2 -1
  18. data/app/components/geoblacklight/georeferenced_header_badge_component.rb +16 -0
  19. data/app/components/geoblacklight/header_badge_component.html.erb +4 -2
  20. data/app/components/geoblacklight/header_badge_component.rb +1 -1
  21. data/app/components/geoblacklight/header_badges_component.html.erb +5 -0
  22. data/app/components/geoblacklight/header_badges_component.rb +34 -0
  23. data/app/components/geoblacklight/iiif_drag_drop_component.html.erb +1 -1
  24. data/app/components/geoblacklight/item_map_viewer_component.html.erb +0 -58
  25. data/app/components/geoblacklight/item_map_viewer_component.rb +19 -70
  26. data/app/components/geoblacklight/locator_map_component.rb +31 -0
  27. data/app/components/geoblacklight/login_link_component.html.erb +1 -1
  28. data/app/components/geoblacklight/login_link_component.rb +17 -1
  29. data/app/components/geoblacklight/metadata_description_markdown_component.rb +3 -9
  30. data/app/components/geoblacklight/overview_map_component.html.erb +2 -0
  31. data/app/components/geoblacklight/overview_map_component.rb +86 -0
  32. data/app/components/geoblacklight/relations/relation_component.html.erb +12 -0
  33. data/app/components/geoblacklight/relations/relation_component.rb +30 -0
  34. data/app/components/geoblacklight/relations/relations_component.html.erb +15 -0
  35. data/app/components/geoblacklight/relations/relations_component.rb +59 -0
  36. data/app/components/geoblacklight/resource_header_badge_component.rb +1 -1
  37. data/app/components/geoblacklight/search_result_component.html.erb +14 -33
  38. data/app/components/geoblacklight/search_result_component.rb +2 -14
  39. data/app/components/geoblacklight/static_map_component.rb +3 -14
  40. data/app/components/geoblacklight/truncatable_metadata_field_layout_component.html.erb +7 -0
  41. data/app/components/geoblacklight/truncatable_metadata_field_layout_component.rb +45 -0
  42. data/app/controllers/{relation_controller.rb → relations_controller.rb} +4 -2
  43. data/app/controllers/viewer_record_controller.rb +28 -0
  44. data/app/helpers/geoblacklight_helper.rb +57 -6
  45. data/app/javascript/geoblacklight/controllers/overview_map_controller.js +143 -0
  46. data/app/javascript/geoblacklight/core.js +8 -10
  47. data/app/javascript/geoblacklight/index.js +9 -12
  48. data/app/javascript/geoblacklight/initializers/field_truncation.js +62 -0
  49. data/app/javascript/geoblacklight/initializers/metadata_download.js +3 -8
  50. data/app/javascript/geoblacklight/initializers/truncation.js +7 -3
  51. data/app/javascript/geoblacklight/initializers/viewer_requests.js +61 -0
  52. data/app/javascript/geoblacklight/initializers/viewer_theme.js +28 -0
  53. data/app/models/concerns/geoblacklight/solr_document/thumbnail.rb +38 -0
  54. data/app/models/concerns/geoblacklight/solr_document.rb +2 -0
  55. data/app/models/concerns/geoblacklight/suppressed_records_search_behavior.rb +1 -1
  56. data/app/views/catalog/_document_split.html.erb +10 -10
  57. data/app/views/catalog/_home_text.html.erb +1 -1
  58. data/app/views/catalog/metadata.html.erb +1 -1
  59. data/app/views/{relation → relations}/index.html.erb +1 -1
  60. data/app/views/relations/index.json.jbuilder +9 -0
  61. data/config/importmap.rb +8 -8
  62. data/config/locales/geoblacklight.en.yml +48 -99
  63. data/geoblacklight.gemspec +3 -3
  64. data/lib/generators/geoblacklight/assets_generator.rb +2 -2
  65. data/lib/generators/geoblacklight/install_generator.rb +3 -6
  66. data/lib/generators/geoblacklight/templates/assets/customizations.css +5 -1
  67. data/lib/generators/geoblacklight/templates/catalog_controller.rb +17 -27
  68. data/lib/generators/geoblacklight/templates/settings.yml +15 -95
  69. data/lib/geoblacklight/configuration/display_note_shown_config.rb +3 -0
  70. data/lib/geoblacklight/configuration/relationship_config.rb +7 -1
  71. data/lib/geoblacklight/configuration/relationships_config.rb +15 -15
  72. data/lib/geoblacklight/configuration/settings_attributes.rb +85 -0
  73. data/lib/geoblacklight/configuration/settings_builder.rb +3 -14
  74. data/lib/geoblacklight/configuration.rb +23 -62
  75. data/lib/geoblacklight/exceptions.rb +4 -0
  76. data/lib/geoblacklight/reference.rb +0 -2
  77. data/lib/geoblacklight/references.rb +17 -5
  78. data/lib/geoblacklight/relations/ancestors.rb +12 -0
  79. data/lib/geoblacklight/relations/descendants.rb +11 -0
  80. data/lib/geoblacklight/relations/query.rb +39 -0
  81. data/lib/geoblacklight/{relation → relations}/relation_response.rb +5 -4
  82. data/lib/geoblacklight/routes/exportable.rb +2 -1
  83. data/lib/geoblacklight/version.rb +1 -1
  84. data/lib/geoblacklight/viewer_record.rb +39 -0
  85. data/lib/geoblacklight.rb +1 -1
  86. data/lib/tasks/geoblacklight.rake +1 -17
  87. data/lib/tasks/solr.rb +37 -0
  88. data/schema/readme.md +1 -1
  89. data/script/wait-for-solr +36 -0
  90. data/solr/conf/solrconfig.xml +10 -16
  91. data/spec/components/geoblacklight/document/sidebar_component_spec.rb +3 -3
  92. data/spec/components/geoblacklight/document_component_spec.rb +8 -34
  93. data/spec/components/geoblacklight/{header_icons_component_spec.rb → header_badges_component_spec.rb} +20 -2
  94. data/spec/components/geoblacklight/item_map_viewer_component_spec.rb +65 -15
  95. data/spec/components/geoblacklight/locator_map_component_spec.rb +54 -0
  96. data/spec/components/geoblacklight/login_link_component_spec.rb +20 -12
  97. data/spec/components/geoblacklight/metadata_description_markdown_component_spec.rb +1 -6
  98. data/spec/components/geoblacklight/overview_map_component_spec.rb +136 -0
  99. data/spec/components/geoblacklight/relations/relation_component_spec.rb +98 -0
  100. data/spec/components/geoblacklight/relations/relations_component_spec.rb +146 -0
  101. data/spec/components/geoblacklight/search_result_component_spec.rb +66 -39
  102. data/spec/components/geoblacklight/static_map_component_spec.rb +8 -2
  103. data/spec/components/geoblacklight/truncatable_metadata_field_layout_component_spec.rb +83 -0
  104. data/spec/controllers/catalog_controller_spec.rb +22 -7
  105. data/spec/controllers/{relation_controller_spec.rb → relations_controller_spec.rb} +1 -1
  106. data/spec/factories/user.rb +6 -1
  107. data/spec/features/axe_spec.rb +5 -3
  108. data/spec/features/home_page_spec.rb +8 -7
  109. data/spec/features/index_view_spec.rb +6 -20
  110. data/spec/features/layer_preview_spec.rb +4 -11
  111. data/spec/features/locator_map_spec.rb +31 -0
  112. data/spec/features/relations_spec.rb +22 -11
  113. data/spec/features/restricted_viewer_spec.rb +14 -0
  114. data/spec/features/search_results_map_spec.rb +89 -13
  115. data/spec/features/search_spec.rb +6 -2
  116. data/spec/features/sign_in_spec.rb +26 -0
  117. data/spec/features/tilejson_spec.rb +1 -3
  118. data/spec/features/tms_spec.rb +2 -2
  119. data/spec/features/truncated_metadata_spec.rb +77 -0
  120. data/spec/features/viewer_requests_spec.rb +40 -0
  121. data/spec/features/viewer_theme_spec.rb +51 -0
  122. data/spec/features/wmts_spec.rb +6 -6
  123. data/spec/features/xyz_spec.rb +3 -3
  124. data/spec/fixtures/solr_documents/README.md +18 -14
  125. data/spec/fixtures/solr_documents/actual-polygon1.json +22 -18
  126. data/spec/fixtures/solr_documents/b1g_wabash_child_15.json +14 -15
  127. data/spec/fixtures/solr_documents/b1g_wabash_child_16.json +14 -15
  128. data/spec/fixtures/solr_documents/b1g_wabash_child_17.json +14 -15
  129. data/spec/fixtures/solr_documents/b1g_wabash_child_18.json +14 -15
  130. data/spec/fixtures/solr_documents/b1g_wabash_parent.json +14 -15
  131. data/spec/fixtures/solr_documents/esri-dynamic-layer-single-layer.json +2 -2
  132. data/spec/fixtures/solr_documents/esri-feature-layer.json +1 -1
  133. data/spec/fixtures/solr_documents/esri-image-map-layer.json +20 -20
  134. data/spec/fixtures/solr_documents/esri-wms-layer.json +22 -24
  135. data/spec/fixtures/solr_documents/index_map_point.json +3 -3
  136. data/spec/fixtures/solr_documents/public_polygon.json +28 -0
  137. data/spec/helpers/geoblacklight_helper_spec.rb +103 -25
  138. data/spec/lib/geoblacklight/bounding_box_spec.rb +16 -0
  139. data/spec/lib/geoblacklight/configuration/relationships_config_spec.rb +121 -0
  140. data/spec/lib/geoblacklight/configuration/settings_attributes_spec.rb +113 -0
  141. data/spec/lib/geoblacklight/configuration/settings_builder_spec.rb +33 -4
  142. data/spec/lib/geoblacklight/references_spec.rb +35 -0
  143. data/spec/lib/geoblacklight/{relation → relations}/ancestors_spec.rb +17 -6
  144. data/spec/lib/geoblacklight/{relation → relations}/descendants_spec.rb +14 -7
  145. data/spec/lib/geoblacklight/{relation → relations}/relation_response_spec.rb +31 -17
  146. data/spec/lib/geoblacklight/viewer_record_spec.rb +69 -0
  147. data/spec/models/concerns/geoblacklight/solr_document/thumbnail_spec.rb +149 -0
  148. data/spec/models/concerns/geoblacklight/solr_document_spec.rb +1 -1
  149. data/spec/requests/bookmarks_spec.rb +2 -1
  150. data/spec/requests/catalog_show_spec.rb +24 -2
  151. data/spec/requests/index_view_spec.rb +50 -2
  152. data/spec/requests/missing_metadata_spec.rb +1 -1
  153. data/spec/requests/relations_spec.rb +9 -2
  154. data/spec/requests/search_results_spec.rb +6 -6
  155. data/spec/requests/viewer_record_spec.rb +37 -0
  156. data/spec/requests/viewer_requests_spec.rb +52 -0
  157. data/spec/solr_config_spec.rb +41 -0
  158. data/spec/solr_fixtures_spec.rb +23 -0
  159. data/spec/spec_helper.rb +13 -3
  160. data/spec/support/authentication.rb +37 -0
  161. data/spec/support/features/map_helpers.rb +68 -0
  162. data/spec/support/features/session_helpers.rb +18 -13
  163. data/spec/support/features/viewer_helpers.rb +20 -0
  164. data/spec/support/features.rb +4 -0
  165. data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -1
  166. data/template.rb +1 -1
  167. metadata +72 -84
  168. data/app/components/geoblacklight/accordion_component.html.erb +0 -16
  169. data/app/components/geoblacklight/accordion_component.rb +0 -15
  170. data/app/components/geoblacklight/attribute_table_component.html.erb +0 -15
  171. data/app/components/geoblacklight/attribute_table_component.rb +0 -17
  172. data/app/components/geoblacklight/header_icons_component.html.erb +0 -3
  173. data/app/components/geoblacklight/header_icons_component.rb +0 -27
  174. data/app/components/geoblacklight/index_map_inspect_component.html.erb +0 -12
  175. data/app/components/geoblacklight/index_map_inspect_component.rb +0 -15
  176. data/app/components/geoblacklight/index_map_legend_component.html.erb +0 -14
  177. data/app/components/geoblacklight/index_map_legend_component.rb +0 -24
  178. data/app/components/geoblacklight/location_leaflet_map_component.rb +0 -68
  179. data/app/components/geoblacklight/relations_component.html.erb +0 -23
  180. data/app/components/geoblacklight/relations_component.rb +0 -25
  181. data/app/components/geoblacklight/viewer_help_text_component.html.erb +0 -1
  182. data/app/components/geoblacklight/viewer_help_text_component.rb +0 -46
  183. data/app/controllers/wms_controller.rb +0 -17
  184. data/app/javascript/geoblacklight/controllers/leaflet_viewer_controller.js +0 -240
  185. data/app/javascript/geoblacklight/controllers/openlayers_viewer_controller.js +0 -74
  186. data/app/javascript/geoblacklight/controllers/search_results_controller.js +0 -50
  187. data/app/javascript/geoblacklight/initializers/popovers.js +0 -11
  188. data/app/javascript/geoblacklight/initializers/tooltips.js +0 -51
  189. data/app/javascript/geoblacklight/leaflet/basemaps.js +0 -73
  190. data/app/javascript/geoblacklight/leaflet/constants.js +0 -18
  191. data/app/javascript/geoblacklight/leaflet/controls/geosearch.js +0 -168
  192. data/app/javascript/geoblacklight/leaflet/controls/layer_opacity.js +0 -121
  193. data/app/javascript/geoblacklight/leaflet/controls/sidebar.js +0 -49
  194. data/app/javascript/geoblacklight/leaflet/controls/sleep.js +0 -101
  195. data/app/javascript/geoblacklight/leaflet/inspection.js +0 -210
  196. data/app/javascript/geoblacklight/leaflet/layer_index_map.js +0 -128
  197. data/app/javascript/geoblacklight/leaflet/layer_wmts.js +0 -57
  198. data/app/javascript/geoblacklight/leaflet/layers.js +0 -146
  199. data/app/javascript/geoblacklight/leaflet/utils.js +0 -83
  200. data/app/javascript/geoblacklight/openlayers/basemaps.js +0 -55
  201. data/app/javascript/geoblacklight/openlayers/inspection.js +0 -42
  202. data/app/javascript/geoblacklight/openlayers/layers.js +0 -44
  203. data/app/views/relation/index.json.jbuilder +0 -8
  204. data/lib/geoblacklight/configuration/layer_config.rb +0 -28
  205. data/lib/geoblacklight/configuration/leaflet_config.rb +0 -73
  206. data/lib/geoblacklight/configuration/leaflet_layers_config.rb +0 -33
  207. data/lib/geoblacklight/configuration/leaflet_sleep_config.rb +0 -20
  208. data/lib/geoblacklight/relation/ancestors.rb +0 -31
  209. data/lib/geoblacklight/relation/descendants.rb +0 -31
  210. data/lib/geoblacklight/routes/wms.rb +0 -15
  211. data/lib/geoblacklight/wms_layer/feature_info_response.rb +0 -37
  212. data/lib/geoblacklight/wms_layer.rb +0 -34
  213. data/spec/components/geoblacklight/attribute_table_component_spec.rb +0 -36
  214. data/spec/components/geoblacklight/index_map_legend_component_spec.rb +0 -29
  215. data/spec/components/geoblacklight/viewer_help_text_component_spec.rb +0 -27
  216. data/spec/controllers/wms_controller_spec.rb +0 -34
  217. data/spec/features/configurable_basemap_spec.rb +0 -40
  218. data/spec/features/full_screen_control_spec.rb +0 -15
  219. data/spec/features/layer_inspection_spec.rb +0 -12
  220. data/spec/features/layer_opacity_spec.rb +0 -16
  221. data/spec/fixtures/solr_documents/harvard_raster.json +0 -39
  222. data/spec/fixtures/solr_documents/public_polygon_mit.json +0 -23
  223. data/spec/fixtures/solr_documents/uva_slug_colon.json +0 -29
  224. data/spec/javascripts/geoblacklight_spec.js +0 -11
  225. data/spec/lib/geoblacklight/configuration/layer_config_spec.rb +0 -71
  226. data/spec/lib/geoblacklight/configuration/leaflet_config_spec.rb +0 -129
  227. data/spec/lib/geoblacklight/configuration/leaflet_layers_config_spec.rb +0 -63
  228. data/spec/lib/geoblacklight/configuration_spec.rb +0 -48
  229. data/spec/lib/geoblacklight/wms_layer/feature_info_response_spec.rb +0 -54
  230. data/spec/lib/geoblacklight/wms_layer_spec.rb +0 -115
  231. /data/app/components/geoblacklight/{location_leaflet_map_component.html.erb → locator_map_component.html.erb} +0 -0
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Geoblacklight
4
+ module SolrDocument
5
+ # Derive a thumbnail for a document
6
+ module Thumbnail
7
+ IIIF_THUMBNAIL_WIDTH = 400
8
+
9
+ # The thumbnail URL if explicitly set; otherwise derived from IIIF URL
10
+ def thumbnail_url
11
+ return nil unless Geoblacklight.configuration.thumbnails_enabled
12
+
13
+ thumbnail_reference&.endpoint || iiif_thumbnail_url
14
+ end
15
+
16
+ private
17
+
18
+ def thumbnail_reference
19
+ references.find_by_uri(Geoblacklight.configuration.thumbnail_reference_key)
20
+ end
21
+
22
+ def iiif_image_reference
23
+ references.iiif
24
+ end
25
+
26
+ # Derives an image URL from a IIIF Image API info.json endpoint. Uses the
27
+ # sizeByW form (`w,`), which is Level 1 in both Image API v2 and v3 — unlike
28
+ # `full` (v2 only) and `max` (v3 only), so no version sniffing is needed.
29
+ def iiif_thumbnail_url
30
+ endpoint = iiif_image_reference&.endpoint
31
+ return nil unless endpoint&.end_with?("/info.json")
32
+
33
+ base = endpoint.delete_suffix("/info.json")
34
+ "#{base}/full/#{IIIF_THUMBNAIL_WIDTH},/0/default.jpg"
35
+ end
36
+ end
37
+ end
38
+ end
@@ -9,6 +9,7 @@ module Geoblacklight
9
9
  include Geoblacklight::SolrDocument::Inspection
10
10
  include Geoblacklight::SolrDocument::Arcgis
11
11
  include Geoblacklight::SolrDocument::Citation
12
+ include Geoblacklight::SolrDocument::Thumbnail
12
13
 
13
14
  delegate :viewer_protocol, to: :item_viewer
14
15
  delegate :viewer_endpoint, to: :item_viewer
@@ -16,6 +17,7 @@ module Geoblacklight
16
17
  included do
17
18
  field_config = Geoblacklight.configuration.fields
18
19
  attribute :display_note, :array, field_config.display_note
20
+ attribute :description, :array, field_config.description
19
21
  attribute :geom_field, :string, field_config.geometry
20
22
  attribute :wxs_identifier, :string, field_config.wxs_identifier
21
23
  attribute :file_format, :string, field_config.format
@@ -14,7 +14,7 @@ module Geoblacklight
14
14
  # @return [Blacklight::Solr::Request]
15
15
  def hide_suppressed_records(solr_params)
16
16
  # Show suppressed records when searching relationships
17
- return if blacklight_params.fetch(:f,
17
+ return if search_state.params.fetch(:f,
18
18
  {}).keys.any? do |field|
19
19
  Geoblacklight.configuration.relationships_shown.map do |_key, value|
20
20
  value.field
@@ -1,16 +1,16 @@
1
1
  <div class="row">
2
- <div
3
- id="documents"
4
- class="documents-list"
5
- data-controller="search-results"
6
- data-action="leaflet-viewer:loaded@window->search-results#fitResultBounds"
7
- data-search-results-leaflet-viewer-outlet=".leaflet-viewer"
8
- >
2
+ <% document_presenters = documents.map { |doc| document_presenter(doc) } -%>
3
+ <%
4
+ overview_results = document_presenters.each_with_index.map do |presenter, index|
5
+ document = presenter.document
6
+ {id: document.id, place: document_counter_with_offset(index), geometry: JSON.parse(document.geometry.geojson)}
7
+ end
8
+ -%>
9
+ <%= tag.div id: "documents", class: "documents-list", data: {overview_map_results: overview_results.to_json} do %>
9
10
  <div id="documents-container">
10
- <% document_presenters = documents.map { |doc| document_presenter(doc) } -%>
11
11
  <% document_presenters.each_with_index do |presenter, index| %>
12
- <%= render blacklight_config.index.document_component.new(document: presenter, document_counter: index) %>
12
+ <%= render blacklight_config.index.document_component.new(document: presenter, counter: document_counter_with_offset(index)) %>
13
13
  <% end %>
14
14
  </div>
15
- </div>
15
+ <% end %>
16
16
  </div>
@@ -23,7 +23,7 @@
23
23
  </div>
24
24
  <div class="col-sm">
25
25
  <%= content_tag :h3, t('geoblacklight.home.map_heading') %>
26
- <%= render(Geoblacklight::LocationLeafletMapComponent.new(page: 'home', geosearch: { dynamic: false })) %>
26
+ <%= render(Geoblacklight::OverviewMapComponent.new(geosearch: true)) %>
27
27
  </div>
28
28
  </div>
29
29
  </div>
@@ -8,7 +8,7 @@
8
8
  </div>
9
9
  <% end %>
10
10
  <% component.with_footer do %>
11
- <a href="#" target="_blank" rel="noopener noreferrer" id="btn-metadata-download" class="btn btn-primary"><%= t('geoblacklight.download.download') %></a>
11
+ <a href="#" target="_blank" rel="noopener noreferrer" id="btn-metadata-download" class="btn btn-primary" aria-label="<%= t('geoblacklight.download.download_metadata_new_tab') %>"><%= t('geoblacklight.download.download') %></a>
12
12
  <button type="button" class="btn btn-secondary" data-bl-dismiss="modal"><%= t('blacklight.modal.close') %></button>
13
13
  <% end %>
14
14
  <% end %>
@@ -1,5 +1,5 @@
1
1
  <%= turbo_frame_tag "relations" do %>
2
2
  <%- Geoblacklight.configuration.relationships_shown.each do |relationship_type, rel_type_info| %>
3
- <%= render Geoblacklight::RelationsComponent.new(relations: @relations, relationship_type:, rel_type_info:) %>
3
+ <%= render Geoblacklight::Relations::RelationsComponent.new(relations: @relations, relationship_type:, rel_type_info:) %>
4
4
  <% end %>
5
5
  <% end %>
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ json.current_doc @relations.link_id
4
+ json.relations do
5
+ Geoblacklight.configuration.relationships_shown.each do |key, _value|
6
+ results = @relations.public_send(key)
7
+ json.set! key.downcase.to_s, results unless results["numFound"].to_i.zero?
8
+ end
9
+ end
data/config/importmap.rb CHANGED
@@ -1,14 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # OpenLayers viewer
4
- pin "ol", to: "https://esm.sh/ol@8.1.0"
5
- pin "ol/", to: "https://esm.sh/ol@8.1.0/"
6
- pin "ol-pmtiles", to: "https://cdn.jsdelivr.net/npm/ol-pmtiles@0.3.0/+esm"
3
+ # OGM viewer components: the previewer, the map of where a set of records is, and the map of where
4
+ # one of them is
5
+ pin "ogm-viewer", to: "https://unpkg.com/ogm-viewer@1.4.0/dist/components/ogm-viewer.js"
6
+ pin "ogm-overview", to: "https://unpkg.com/ogm-viewer@1.4.0/dist/components/ogm-overview.js"
7
+ pin "ogm-locator", to: "https://unpkg.com/ogm-viewer@1.4.0/dist/components/ogm-locator.js"
7
8
 
8
- # Leaflet viewer
9
- pin "leaflet", to: "https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet-src.esm.js"
10
- pin "esri-leaflet", to: "https://cdn.jsdelivr.net/npm/esri-leaflet@3.0.19/+esm"
11
- pin "leaflet.fullscreen", to: "https://cdn.jsdelivr.net/npm/leaflet.fullscreen@5.3.0/+esm"
9
+ # OGM viewer library, used for constructing the location previewers handed to the results map.
10
+ # Not preloaded because only the pages with that map want it; loaded dynamically there.
11
+ pin "ogm-viewer/lib", to: "https://unpkg.com/ogm-viewer@1.4.0/dist/components/index.js", preload: false
12
12
 
13
13
  # Geoblacklight
14
14
  pin_all_from Geoblacklight::Engine.root.join("app", "javascript", "geoblacklight"), under: "geoblacklight"
@@ -2,6 +2,8 @@ en:
2
2
  geoblacklight:
3
3
  bbox_label: "Bounding Box"
4
4
  location: "Location"
5
+ badges:
6
+ georeferenced: "Georeferenced"
5
7
  clipboard:
6
8
  citation: Citation copied to clipboard
7
9
  web_service: Web service copied to clipboard
@@ -11,6 +13,7 @@ en:
11
13
  generated_link: "Generated %{download_format}"
12
14
  iiif_image_link: "Full-size image"
13
15
  iiif_manifest_link: "IIIF manifest"
16
+ download_metadata_new_tab: "Download metadata (opens in a new tab)"
14
17
  home:
15
18
  headline: "Explore and discover..."
16
19
  search_heading: "Find the maps and data you need"
@@ -38,8 +41,7 @@ en:
38
41
  map:
39
42
  label: "Zoomable map"
40
43
  geosearch:
41
- search_here: "Search here"
42
- search_when_moved: "Search when I move the map"
44
+ search_help: "Shift + drag to search an area"
43
45
  index:
44
46
  website_label: "Website:"
45
47
  download_label: "Download:"
@@ -83,20 +85,49 @@ en:
83
85
  pmtiles: "PMTiles Layer"
84
86
  cog: "COG Layer"
85
87
  relations:
86
- member_of_ancestors: "Belongs to collection..."
87
- member_of_descendants: "Collection records..."
88
- part_of_ancestors: "Is part of..."
89
- part_of_descendants: "Has part..."
90
- relation_ancestors: "Related records..."
91
- relation_descendants: "Related records..."
92
- replaces_ancestors: "Replaces..."
93
- replaces_descendants: "Is replaced by..."
94
- source_ancestors: "Source records..."
95
- source_descendants: "Derived records..."
96
- version_of_ancestors: "Is version of..."
97
- version_of_descendants: "Has version..."
98
- browse_all_no_count: "Browse all records..."
99
- browse_all: "Browse all %{count} records..."
88
+ member_of_ancestors:
89
+ one: "In collection"
90
+ other: "In %{count} collections"
91
+ member_of_descendants:
92
+ one: "Contains"
93
+ other: "Contains %{count} items"
94
+ part_of_ancestors:
95
+ one: "Part of"
96
+ other: "Part of %{count} items"
97
+ part_of_descendants:
98
+ one: "Has part"
99
+ other: "Has %{count} parts"
100
+ relation_ancestors:
101
+ one: "Related to"
102
+ other: "Related to %{count} items"
103
+ relation_descendants:
104
+ one: "Related to"
105
+ other: "Related to %{count} items"
106
+ replaces_ancestors:
107
+ one: "Replaces"
108
+ other: "Replaces %{count} items"
109
+ replaces_descendants:
110
+ one: "Replaced by"
111
+ other: "Replaced by %{count} items"
112
+ source_ancestors:
113
+ one: "Sourced from"
114
+ other: "Sourced from %{count} items"
115
+ source_descendants:
116
+ one: "Source of"
117
+ other: "Source of %{count} items"
118
+ version_of_ancestors:
119
+ one: "Version of"
120
+ other: "Version of %{count} items"
121
+ version_of_descendants:
122
+ one: "Has version"
123
+ other: "Has %{count} versions"
124
+ browse:
125
+ member_of: "Browse all %{count} items in this collection"
126
+ part_of: "Browse all %{count} parts of this item"
127
+ relation: "Browse all %{count} items related to this item"
128
+ replaces: "Browse all %{count} items that replace this item"
129
+ source: "Browse all %{count} items sourced from this item"
130
+ version_of: "Browse all %{count} versions of this item"
100
131
  modal:
101
132
  copy-citation: "Copy Citation"
102
133
  metadata:
@@ -104,12 +135,12 @@ en:
104
135
  metadata_error: The metadata view for selected schema is not available
105
136
  metadata_trace: Please select another metadata view. Alternately, try downloading the file or reaching out to the holding institution.
106
137
  more_details: More details at
107
- toggle_summary: Toggle summary
108
138
  transform_error: HTML view for selected schema is not available
109
139
  view_metadata: View Metadata
110
140
  truncate:
111
141
  read_more: "Read more"
112
142
  close: "Close"
143
+ button_label: "Show or hide the remaining values. Disabled because assistive technology has already been given all of them."
113
144
  show:
114
145
  attribute: "Attribute"
115
146
  value: "Value"
@@ -117,85 +148,3 @@ en:
117
148
  table_name: "Map data"
118
149
  inspecting: "Inspecting"
119
150
  not_found: "Could not find that feature"
120
- help_text:
121
- viewer_protocol:
122
- cog:
123
- title: COG Layer
124
- content: A Cloud Optimized GeoTIFF
125
- dynamic_map_layer:
126
- title: ArcGIS Dynamic Map Layer
127
- content: An ArcGIS Dynamic Map Layer represents vector data (points, lines, and polygons). Map image layers are dynamically rendered image tiles.
128
- feature_layer:
129
- title: ArcGIS Feature Layer
130
- content: An ArcGIS Feature Layer Service displays vector data (points, lines, and polygons) as individual or collected features.
131
- iiif:
132
- title: IIIF Service
133
- content: The International Image Interoperability Framework (IIIF) web service API displays an image from a server. This image can be panned and zoomed.
134
- iiif_manifest:
135
- title: IIIF Service
136
- content: The International Image Interoperability Framework (IIIF) web service API displays an image from a server. This image can be panned and zoomed.
137
- image_map_layer:
138
- title: ArcGIS Image Map Layer
139
- content: An ArcGIS Image Map Layer displays raster data (a grid of cells used to store imagery).
140
- index_map:
141
- title: Index Map
142
- content: Index maps are a "table of contents" that allow users to select a specific map or item within a larger set and navigate to it for viewing or downloading.
143
- oembed:
144
- title: Embedded Content
145
- content: This content is embedded through a third-party viewer.
146
- pmtiles:
147
- title: PMTiles Layer
148
- content: A PMTiles layer is a single-file archive format for tiled data.
149
- tiled_map_layer:
150
- title: ArcGIS Tiled Map Layer
151
- content: An ArcGIS Tiled Map Layer Service displays set of web-accessible tiles that reside on a server.
152
- tilejson:
153
- title: TileJSON
154
- content: A JSON format used for describing tilesets.
155
- tms:
156
- title: Tile Map Service (TMS)
157
- content: A Tile Map Service displays georeferenced map tiles as an image on a map.
158
- wms:
159
- title: Web Map Service (WMS)
160
- content: A Web Map Service displays a geospatial dataset as map images.
161
- wmts:
162
- title: Web Map Tile Service (WMTS)
163
- content: A Web Map Tile Service displays maps over the web using cached image tiles.
164
- xyz:
165
- title: XYZ Tiles
166
- content: Also known as slippy map tiles, is a method of expressing map tile mosaics, indexed by (x,y) offsets and zoom levels (z).
167
- blacklight:
168
- icon:
169
- american-geographical-society-library-uwm-libraries: American Geographical Society Library - UWM Libraries
170
- arizona: The University of Arizona
171
- arrow-circle-down: Arrow within a circle, pointing down
172
- baruch-cuny: Baruch College
173
- berkeley: University of California, Berkeley
174
- cd-rom: CD-Rom
175
- columbia: Columbia University
176
- cornell: Cornell University
177
- dvd-rom: DVD-Rom
178
- esri-globe: Esri Global
179
- george-mason: George Mason University
180
- harvard: Harvard University
181
- iiif-drag-drop: Drag icon to any IIIF viewer
182
- indiana: Indiana University
183
- lewis-clark: Lewis & Clark
184
- massgis: MassGIS
185
- mit: Massachusetts Institute of Technology
186
- multilinestring: Multi-line string
187
- multipoint: Multi-point
188
- multipolygon: Multi-polygon
189
- northwestern-university: Northwestern University
190
- nyu: New York University
191
- princeton: Princeton University
192
- public: Public content
193
- restricted: Restricted content
194
- rutgers: Rutgers University
195
- sms: SMS
196
- stanford: Stanford University
197
- texas: The University of Texas at Austin
198
- tufts: Tufts University
199
- triangle-exclamation-solid: Warning
200
- ucla: University of California, Los Angeles
201
- uva: University of Virginia
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.required_rubygems_version = ">= 2.5.2"
20
20
 
21
21
  spec.add_dependency "rails", ">= 8", "< 9"
22
- spec.add_dependency "blacklight", ">= 8.0", "< 10"
22
+ spec.add_dependency "blacklight", ">= 9.1", "< 10"
23
23
  spec.add_dependency "commonmarker", "~> 2.9"
24
24
  spec.add_dependency "config"
25
25
  spec.add_dependency "faraday", "~> 2.0"
@@ -34,11 +34,11 @@ Gem::Specification.new do |spec|
34
34
  spec.add_development_dependency "rspec-rails"
35
35
  spec.add_development_dependency "engine_cart", "~> 2.0"
36
36
  spec.add_development_dependency "capybara", ">= 2.5.0"
37
- spec.add_development_dependency "selenium-webdriver"
37
+ spec.add_development_dependency "selenium-webdriver", ">= 4.11"
38
38
  spec.add_development_dependency "factory_bot_rails"
39
39
  spec.add_development_dependency "simplecov", "~> 0.22"
40
40
  spec.add_development_dependency "foreman"
41
- spec.add_development_dependency "standardrb", "1.0.1"
41
+ spec.add_development_dependency "standard", "~> 1.56.0"
42
42
  spec.add_development_dependency "webmock", "~> 3.14"
43
43
  spec.add_development_dependency "database_cleaner"
44
44
  spec.add_development_dependency "axe-core-rspec"
@@ -14,8 +14,8 @@ module Geoblacklight
14
14
  ES modules via importmap, and their dependencies are pinned to versions
15
15
  delivered via CDN.
16
16
 
17
- CSS needed for Geoblacklight's dependencies (e.g. leaflet viewer) are
18
- imported via CDN in the app's main bootstrap stylesheet. Geoblacklight's own
17
+ CSS needed for Geoblacklight's dependencies (e.g. Bootstrap) is imported
18
+ via CDN in the app's main bootstrap stylesheet. Geoblacklight's own
19
19
  stylesheet is imported from the frontend asset package installed via yarn.
20
20
  DESCRIPTION
21
21
 
@@ -22,7 +22,8 @@ module Geoblacklight
22
22
 
23
23
  def raise_unpermitted_params
24
24
  inject_into_file "config/environments/test.rb",
25
- "config.action_controller.action_on_unpermitted_parameters = :raise\n", before: /^end/
25
+ "config.action_controller.action_on_unpermitted_parameters = :raise\n" \
26
+ "config.action_controller.always_permitted_parameters = %w[controller action commit]\n", before: /^end/
26
27
  end
27
28
 
28
29
  def mount_geoblacklight_engine
@@ -35,10 +36,6 @@ module Geoblacklight
35
36
  resources :solr_documents, only: [:show], path: '/catalog', controller: 'catalog' do
36
37
  concerns :gbl_exportable
37
38
  end
38
- concern :gbl_wms, Geoblacklight::Routes::Wms.new
39
- namespace :wms do
40
- concerns :gbl_wms
41
- end
42
39
  ROUTES
43
40
 
44
41
  inject_into_file "config/routes.rb", routes, before: /^end/
@@ -58,7 +55,7 @@ module Geoblacklight
58
55
  end
59
56
 
60
57
  def add_rsolr_gem
61
- gem "rsolr", ">= 1.0", "< 3"
58
+ gem "rsolr", ">= 1.0", "< 4"
62
59
  end
63
60
 
64
61
  def docker_compose
@@ -1,6 +1,10 @@
1
1
  /* Local Application Customizations */
2
2
 
3
+ /* Header Logo */
3
4
  :root {
4
- /* Header Logo */
5
5
  --bl-logo-image: url("geoblacklight/logo.svg");
6
6
  }
7
+
8
+ [data-bs-theme="dark"] {
9
+ --bl-logo-image: url("geoblacklight/logo-dark.svg");
10
+ }
@@ -39,6 +39,8 @@ class CatalogController < ApplicationController
39
39
  # config.index.show_link = 'title_display'
40
40
  # config.index.record_display_type = 'format'
41
41
  config.index.document_component = Geoblacklight::SearchResultComponent
42
+ config.index.thumbnail_method = :geoblacklight_thumbnail
43
+ config.index.default_thumbnail = :geoblacklight_default_thumbnail
42
44
  config.index.title_field = field_config.title
43
45
 
44
46
  # solr field configuration for document/show views
@@ -104,18 +106,18 @@ class CatalogController < ApplicationController
104
106
  label: "Bounding Box"
105
107
 
106
108
  # DEFAULT FACETS
107
- config.add_facet_field field_config.index_year, label: "Year", limit: 10
108
- config.add_facet_field field_config.spatial_coverage, label: "Place", limit: 8
109
- config.add_facet_field field_config.access_rights, label: "Access", limit: 8
110
- config.add_facet_field field_config.resource_class, label: "Resource Class", limit: 8
109
+ config.add_facet_field field_config.resource_class, label: "Resource Class"
111
110
  config.add_facet_field field_config.resource_type, label: "Resource Type", limit: 8
112
111
  config.add_facet_field field_config.format, label: "Format", limit: 8
113
- config.add_facet_field field_config.subject, label: "Subject", limit: 8
114
- config.add_facet_field field_config.theme, label: "Theme", limit: 8
115
- config.add_facet_field field_config.creator, label: "Creator", limit: 8
116
- config.add_facet_field field_config.publisher, label: "Publisher", limit: 8
112
+ config.add_facet_field field_config.temporal_coverage, label: "Temporal Coverage", limit: 8
113
+ config.add_facet_field field_config.spatial_coverage, label: "Spatial Coverage", limit: 8, index_range: "A".."Z"
114
+ config.add_facet_field field_config.subject, label: "Subject", limit: 8, index_range: "A".."Z"
115
+ config.add_facet_field field_config.theme, label: "Theme", limit: 8, index_range: "A".."Z"
116
+ config.add_facet_field field_config.creator, label: "Creator", limit: 8, index_range: "A".."Z"
117
+ config.add_facet_field field_config.publisher, label: "Publisher", limit: 8, index_range: "A".."Z"
117
118
  config.add_facet_field field_config.provider, label: "Provider", limit: 8
118
- config.add_facet_field field_config.georeferenced, label: "Georeferenced", limit: 3
119
+ config.add_facet_field field_config.access_rights, label: "Access"
120
+ config.add_facet_field field_config.georeferenced, label: "Georeferenced"
119
121
 
120
122
  # If you wish to add a date range filter, first run `bundle add blacklight_range_limit && bin/rails generate blacklight_range_limit:install`
121
123
  # Then uncomment the following line:
@@ -138,19 +140,6 @@ class CatalogController < ApplicationController
138
140
  # handler defaults, or have no facets.
139
141
  config.add_facet_fields_to_solr_request!
140
142
 
141
- # SEARCH RESULTS FIELDS
142
-
143
- # solr fields to be displayed in the index (search results) view
144
- # The ordering of the field names is the order of the display
145
- # config.add_index_field field_config.provider, :label => 'Institution:'
146
- # config.add_index_field field_config.rights, :label => 'Access:'
147
- # # config.add_index_field 'Area', :label => 'Area:'
148
- # config.add_index_field field_config.subject, :label => 'Keywords:'
149
- config.add_index_field field_config.index_year
150
- config.add_index_field field_config.creator
151
- config.add_index_field field_config.description, helper_method: :snippit
152
- config.add_index_field field_config.publisher
153
-
154
143
  # ITEM VIEW FIELDS
155
144
 
156
145
  # solr fields to be displayed in the show (single result) view
@@ -162,7 +151,7 @@ class CatalogController < ApplicationController
162
151
 
163
152
  # DEFAULT FIELDS
164
153
  # The following fields all feature string values. If there is a value present in the metadata, they fields will show up on the item show page.
165
- # The labels and order can be customed. Comment out fields to hide them.
154
+ # The labels and order can be customized. Comment out fields to hide them.
166
155
 
167
156
  config.add_show_field field_config.alternative_title, label: "Alternative Title",
168
157
  itemprop: "alt_title"
@@ -174,13 +163,14 @@ class CatalogController < ApplicationController
174
163
  config.add_show_field field_config.resource_class, label: "Resource Class", itemprop: "class"
175
164
  config.add_show_field field_config.resource_type, label: "Resource Type", itemprop: "type"
176
165
  config.add_show_field field_config.subject, label: "Subject", itemprop: "keywords",
177
- link_to_facet: true
178
- config.add_show_field field_config.theme, label: "Theme", itemprop: "theme"
166
+ link_to_facet: true, layout_component: Geoblacklight::TruncatableMetadataFieldLayoutComponent
167
+ config.add_show_field field_config.theme, label: "Theme", itemprop: "theme",
168
+ layout_component: Geoblacklight::TruncatableMetadataFieldLayoutComponent
179
169
  config.add_show_field field_config.temporal_coverage, label: "Temporal Coverage",
180
170
  itemprop: "temporal"
181
171
  config.add_show_field field_config.date_issued, label: "Date Issued", itemprop: "issued"
182
172
  config.add_show_field field_config.spatial_coverage, label: "Spatial Coverage", itemprop: "spatial",
183
- link_to_facet: true
173
+ link_to_facet: true, layout_component: Geoblacklight::TruncatableMetadataFieldLayoutComponent
184
174
  config.add_show_field field_config.rights, label: "Rights", itemprop: "rights"
185
175
  config.add_show_field field_config.rights_holder, label: "Rights Holder",
186
176
  itemprop: "rights_holder"
@@ -247,7 +237,7 @@ class CatalogController < ApplicationController
247
237
 
248
238
  config.add_search_field "all_fields", label: "All Fields"
249
239
  # config.add_search_field 'dct_title_ti', :label => 'Title'
250
- # config.add_search_field 'dct_description_ti', :label => 'Description'
240
+ # config.add_search_field 'dct_description_tmi', :label => 'Description'
251
241
 
252
242
  # Now we see how to over-ride Solr request handler defaults, in this
253
243
  # case for a BL "search field", which is really a dismax aggregate