geoblacklight 4.4.2 → 5.0.0.pre.alpha.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (577) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build-demo-app.yml +153 -0
  3. data/.github/workflows/prune-containers.yml +19 -0
  4. data/.github/workflows/ruby.yml +54 -52
  5. data/.gitignore +2 -2
  6. data/CONTRIBUTING.md +62 -44
  7. data/Gemfile +3 -28
  8. data/Rakefile +42 -67
  9. data/app/assets/images/blacklight/logo.svg +31 -1
  10. data/app/assets/stylesheets/geoblacklight/geoblacklight.scss +1 -2
  11. data/app/assets/stylesheets/geoblacklight/modules/_base.scss +1 -1
  12. data/app/assets/stylesheets/geoblacklight/modules/_blacklight_overrides.scss +24 -26
  13. data/app/assets/stylesheets/geoblacklight/modules/downloads.scss +13 -0
  14. data/app/assets/stylesheets/geoblacklight/modules/home.scss +2 -17
  15. data/app/assets/stylesheets/geoblacklight/modules/icon-customization.scss +48 -23
  16. data/app/assets/stylesheets/geoblacklight/modules/index_maps.scss +1 -15
  17. data/app/assets/stylesheets/geoblacklight/modules/item.scss +13 -11
  18. data/app/assets/stylesheets/geoblacklight/modules/layer_opacity.scss +3 -3
  19. data/app/assets/stylesheets/geoblacklight/modules/leaflet.scss +4 -0
  20. data/app/assets/stylesheets/geoblacklight/modules/modal.scss +0 -15
  21. data/app/assets/stylesheets/geoblacklight/modules/results.scss +10 -19
  22. data/app/assets/stylesheets/geoblacklight/modules/sidebar.scss +2 -2
  23. data/app/components/blacklight/icons/american_geographical_society_library_uwm_libraries_component.rb +46 -0
  24. data/app/components/blacklight/icons/arizona_component.rb +24 -0
  25. data/app/components/blacklight/icons/arrow_circle_down_component.rb +23 -0
  26. data/app/components/blacklight/icons/baruch_cuny_component.rb +23 -0
  27. data/app/components/blacklight/icons/book_component.rb +23 -0
  28. data/app/components/blacklight/icons/bookmark_component.rb +23 -0
  29. data/app/components/blacklight/icons/cd_rom_component.rb +23 -0
  30. data/app/components/blacklight/icons/child_item_component.rb +23 -0
  31. data/app/components/blacklight/icons/circle_info_solid_component.rb +23 -0
  32. data/app/components/blacklight/icons/citation_component.rb +23 -0
  33. data/app/components/blacklight/icons/collection_component.rb +23 -0
  34. data/app/components/blacklight/icons/collections_component.rb +24 -0
  35. data/app/components/blacklight/icons/columbia_component.rb +23 -0
  36. data/app/components/blacklight/icons/cornell_component.rb +25 -0
  37. data/app/components/blacklight/icons/datasets_component.rb +27 -0
  38. data/app/components/blacklight/icons/dvd_rom_component.rb +23 -0
  39. data/app/components/blacklight/icons/email_component.rb +23 -0
  40. data/app/components/blacklight/icons/esri_globe_component.rb +51 -0
  41. data/app/components/blacklight/icons/fire_solid_component.rb +23 -0
  42. data/app/components/blacklight/icons/george_mason_component.rb +24 -0
  43. data/app/components/blacklight/icons/globe_component.rb +23 -0
  44. data/app/components/blacklight/icons/harvard_component.rb +23 -0
  45. data/app/components/blacklight/icons/home_component.rb +23 -0
  46. data/app/components/blacklight/icons/iiif_drag_drop_component.rb +31 -0
  47. data/app/components/blacklight/icons/image_component.rb +23 -0
  48. data/app/components/blacklight/icons/imagery_component.rb +24 -0
  49. data/app/components/blacklight/icons/indiana_component.rb +23 -0
  50. data/app/components/blacklight/icons/leaf_component.rb +23 -0
  51. data/app/components/blacklight/icons/lewis_clark_component.rb +25 -0
  52. data/app/components/blacklight/icons/lightbulb_solid_component.rb +23 -0
  53. data/app/components/blacklight/icons/line_component.rb +24 -0
  54. data/app/components/blacklight/icons/map_component.rb +23 -0
  55. data/app/components/blacklight/icons/map_marker_component.rb +23 -0
  56. data/app/components/blacklight/icons/maps_component.rb +24 -0
  57. data/app/components/blacklight/icons/massgis_component.rb +23 -0
  58. data/app/components/blacklight/icons/metadata_component.rb +23 -0
  59. data/app/components/blacklight/icons/michigan_state_university_component.rb +25 -0
  60. data/app/components/blacklight/icons/mit_component.rb +23 -0
  61. data/app/components/blacklight/icons/mixed_component.rb +25 -0
  62. data/app/components/blacklight/icons/multilinestring_component.rb +26 -0
  63. data/app/components/blacklight/icons/multipoint_component.rb +23 -0
  64. data/app/components/blacklight/icons/multipolygon_component.rb +26 -0
  65. data/app/components/blacklight/icons/northwestern_university_component.rb +24 -0
  66. data/app/components/blacklight/icons/nyu_component.rb +26 -0
  67. data/app/components/blacklight/icons/pagelines_brands_component.rb +23 -0
  68. data/app/components/blacklight/icons/paper_map_component.rb +23 -0
  69. data/app/components/blacklight/icons/parent_item_component.rb +23 -0
  70. data/app/components/blacklight/icons/pennsylvania_state_university_component.rb +25 -0
  71. data/app/components/blacklight/icons/point_component.rb +23 -0
  72. data/app/components/blacklight/icons/polygon_component.rb +24 -0
  73. data/app/components/blacklight/icons/polyline_component.rb +26 -0
  74. data/app/components/blacklight/icons/princeton_component.rb +23 -0
  75. data/app/components/blacklight/icons/public_component.rb +23 -0
  76. data/app/components/blacklight/icons/purdue_university_component.rb +25 -0
  77. data/app/components/blacklight/icons/raster_component.rb +23 -0
  78. data/app/components/blacklight/icons/restricted_component.rb +23 -0
  79. data/app/components/blacklight/icons/rutgers_component.rb +25 -0
  80. data/app/components/blacklight/icons/sms_component.rb +23 -0
  81. data/app/components/blacklight/icons/stanford_component.rb +23 -0
  82. data/app/components/blacklight/icons/table_component.rb +23 -0
  83. data/app/components/blacklight/icons/tags_component.rb +23 -0
  84. data/app/components/blacklight/icons/texas_component.rb +23 -0
  85. data/app/components/blacklight/icons/the_ohio_state_university_component.rb +26 -0
  86. data/app/components/blacklight/icons/triangle_exclamation_solid_component.rb +23 -0
  87. data/app/components/blacklight/icons/tufts_component.rb +23 -0
  88. data/app/components/blacklight/icons/ucla_component.rb +23 -0
  89. data/app/components/blacklight/icons/university_of_california_berkeley_component.rb +24 -0
  90. data/app/components/blacklight/icons/university_of_chicago_component.rb +25 -0
  91. data/app/components/blacklight/icons/university_of_colorado_boulder_component.rb +26 -0
  92. data/app/components/blacklight/icons/university_of_illinois_urbana_champaign_component.rb +25 -0
  93. data/app/components/blacklight/icons/university_of_iowa_component.rb +24 -0
  94. data/app/components/blacklight/icons/university_of_maryland_component.rb +24 -0
  95. data/app/components/blacklight/icons/university_of_michigan_component.rb +24 -0
  96. data/app/components/blacklight/icons/university_of_minnesota_component.rb +24 -0
  97. data/app/components/blacklight/icons/university_of_nebraska_lincoln_component.rb +27 -0
  98. data/app/components/blacklight/icons/university_of_wisconsin_madison_component.rb +24 -0
  99. data/app/components/blacklight/icons/uva_component.rb +23 -0
  100. data/app/components/blacklight/icons/web_services_component.rb +23 -0
  101. data/app/components/blacklight/icons/websites_component.rb +24 -0
  102. data/app/components/geoblacklight/arcgis_component.html.erb +3 -0
  103. data/app/components/geoblacklight/arcgis_component.rb +25 -0
  104. data/app/components/geoblacklight/attribute_table_component.html.erb +17 -0
  105. data/app/components/geoblacklight/attribute_table_component.rb +17 -0
  106. data/app/components/geoblacklight/data_dictionary_download_component.html.erb +3 -0
  107. data/app/components/geoblacklight/data_dictionary_download_component.rb +16 -0
  108. data/app/components/geoblacklight/display_note_component.rb +1 -1
  109. data/app/components/geoblacklight/document/citation_component.html.erb +1 -0
  110. data/app/components/geoblacklight/document/citation_component.rb +19 -0
  111. data/app/components/geoblacklight/document/sidebar_component.html.erb +12 -0
  112. data/app/components/geoblacklight/document/sidebar_component.rb +8 -0
  113. data/app/components/geoblacklight/document_component.html.erb +43 -0
  114. data/app/components/geoblacklight/document_component.rb +6 -0
  115. data/app/components/geoblacklight/download_links_component.html.erb +31 -0
  116. data/app/components/geoblacklight/download_links_component.rb +80 -0
  117. data/app/components/geoblacklight/header_component.html.erb +14 -0
  118. data/app/components/geoblacklight/header_component.rb +9 -0
  119. data/app/components/geoblacklight/header_icons_component.html.erb +3 -0
  120. data/app/components/geoblacklight/header_icons_component.rb +29 -0
  121. data/app/components/geoblacklight/iiif_drag_drop_component.html.erb +3 -0
  122. data/app/components/geoblacklight/iiif_drag_drop_component.rb +16 -0
  123. data/app/components/geoblacklight/index_map_inspect_component.rb +15 -0
  124. data/app/components/geoblacklight/index_map_legend_component.html.erb +14 -0
  125. data/app/components/geoblacklight/index_map_legend_component.rb +17 -0
  126. data/app/components/geoblacklight/item_map_viewer_component.html.erb +1 -0
  127. data/app/components/geoblacklight/item_map_viewer_component.rb +87 -0
  128. data/app/components/geoblacklight/location_leaflet_map_component.html.erb +1 -0
  129. data/app/components/geoblacklight/location_leaflet_map_component.rb +49 -0
  130. data/app/components/geoblacklight/login_link_component.html.erb +5 -0
  131. data/app/components/geoblacklight/login_link_component.rb +17 -0
  132. data/app/components/geoblacklight/relations_component.html.erb +23 -0
  133. data/app/components/geoblacklight/relations_component.rb +25 -0
  134. data/app/components/geoblacklight/search_result_component.html.erb +44 -0
  135. data/app/{presenters/geoblacklight/document_presenter.rb → components/geoblacklight/search_result_component.rb} +9 -6
  136. data/app/components/geoblacklight/static_map_component.html.erb +9 -0
  137. data/app/components/geoblacklight/static_map_component.rb +36 -0
  138. data/app/components/geoblacklight/viewer_help_text_component.html.erb +1 -0
  139. data/app/components/geoblacklight/viewer_help_text_component.rb +46 -0
  140. data/app/components/geoblacklight/web_services_component.html.erb +1 -0
  141. data/app/components/geoblacklight/web_services_component.rb +26 -0
  142. data/app/{views/catalog/_web_services_default.html.erb → components/geoblacklight/web_services_default_component.html.erb} +3 -5
  143. data/app/components/geoblacklight/web_services_default_component.rb +11 -0
  144. data/app/components/geoblacklight/web_services_link_component.html.erb +3 -0
  145. data/app/components/geoblacklight/web_services_link_component.rb +22 -0
  146. data/app/{views/catalog/_web_services_wfs.html.erb → components/geoblacklight/web_services_wfs_component.html.erb} +4 -7
  147. data/app/components/geoblacklight/web_services_wfs_component.rb +12 -0
  148. data/app/components/geoblacklight/web_services_wms_component.html.erb +10 -0
  149. data/app/components/geoblacklight/web_services_wms_component.rb +12 -0
  150. data/app/controllers/download_controller.rb +8 -24
  151. data/app/helpers/geoblacklight_helper.rb +10 -194
  152. data/app/javascript/geoblacklight/controllers/clipboard_controller.js +11 -0
  153. data/app/javascript/geoblacklight/controllers/clover_viewer_controller.js +47 -0
  154. data/app/javascript/geoblacklight/controllers/downloads_controller.js +56 -0
  155. data/app/javascript/geoblacklight/controllers/leaflet_viewer_controller.js +217 -0
  156. data/app/javascript/geoblacklight/controllers/oembed_viewer_controller.js +18 -0
  157. data/app/javascript/geoblacklight/controllers/openlayers_viewer_controller.js +63 -0
  158. data/app/javascript/geoblacklight/controllers/search_results_controller.js +50 -0
  159. data/app/javascript/geoblacklight/core.js +69 -0
  160. data/app/javascript/geoblacklight/index.js +29 -0
  161. data/app/javascript/geoblacklight/initializers/metadata_download.js +54 -0
  162. data/app/javascript/geoblacklight/initializers/popovers.js +11 -0
  163. data/app/javascript/geoblacklight/initializers/relations.js +40 -0
  164. data/app/javascript/geoblacklight/initializers/tooltips.js +55 -0
  165. data/app/javascript/geoblacklight/initializers/truncation.js +45 -0
  166. data/app/javascript/geoblacklight/leaflet/basemaps.js +74 -0
  167. data/app/javascript/geoblacklight/leaflet/constants.js +18 -0
  168. data/app/javascript/geoblacklight/leaflet/controls/geosearch.js +160 -0
  169. data/app/javascript/geoblacklight/leaflet/controls/layer_opacity.js +120 -0
  170. data/app/javascript/geoblacklight/leaflet/inspection.js +195 -0
  171. data/app/javascript/geoblacklight/leaflet/layer_index_map.js +120 -0
  172. data/app/javascript/geoblacklight/leaflet/layer_wmts.js +59 -0
  173. data/app/javascript/geoblacklight/leaflet/layers.js +153 -0
  174. data/app/javascript/geoblacklight/leaflet/utils.js +83 -0
  175. data/app/javascript/geoblacklight/openlayers/basemaps.js +47 -0
  176. data/app/javascript/geoblacklight/openlayers/layers.js +44 -0
  177. data/app/models/concerns/geoblacklight/solr_document/citation.rb +20 -8
  178. data/app/models/concerns/geoblacklight/solr_document.rb +22 -30
  179. data/app/presenters/geoblacklight/bbox_item_presenter.rb +1 -1
  180. data/app/views/catalog/_citation.html.erb +16 -33
  181. data/app/views/catalog/_document_split.html.erb +18 -3
  182. data/app/views/catalog/_home_text.html.erb +2 -2
  183. data/app/views/catalog/_metadata.html.erb +1 -1
  184. data/app/views/catalog/index.html.erb +8 -4
  185. data/app/views/catalog/metadata/_markup.html.erb +1 -1
  186. data/app/views/catalog/metadata.html.erb +14 -13
  187. data/app/views/catalog/web_services.html.erb +19 -28
  188. data/app/views/relation/index.html.erb +2 -12
  189. data/app/views/relation/index.json.jbuilder +1 -1
  190. data/compose.yml +14 -0
  191. data/config/importmap.rb +20 -0
  192. data/config/locales/geoblacklight.en.yml +15 -24
  193. data/geoblacklight.gemspec +7 -7
  194. data/lib/generators/geoblacklight/assets/importmap_generator.rb +87 -0
  195. data/lib/generators/geoblacklight/assets/vite_generator.rb +90 -0
  196. data/lib/generators/geoblacklight/assets_generator.rb +12 -37
  197. data/lib/generators/geoblacklight/install_generator.rb +11 -49
  198. data/lib/generators/geoblacklight/templates/assets/_customizations.scss +13 -19
  199. data/lib/generators/geoblacklight/templates/assets/application.js +17 -0
  200. data/lib/generators/geoblacklight/templates/assets/application.scss +9 -4
  201. data/lib/generators/geoblacklight/templates/assets/geoblacklight.scss +11 -0
  202. data/lib/generators/geoblacklight/templates/base.html.erb +9 -12
  203. data/lib/generators/geoblacklight/templates/catalog_controller.rb +7 -15
  204. data/lib/generators/geoblacklight/templates/demo-app/Dockerfile +31 -0
  205. data/lib/generators/geoblacklight/templates/demo-app/compose.yml +26 -0
  206. data/lib/generators/geoblacklight/templates/demo-app/start-server.sh +21 -0
  207. data/lib/generators/geoblacklight/templates/package.json +7 -1
  208. data/lib/generators/geoblacklight/templates/settings.yml +45 -40
  209. data/lib/generators/geoblacklight/templates/vite.config.ts +22 -7
  210. data/lib/geoblacklight/bounding_box.rb +16 -0
  211. data/lib/geoblacklight/constants.rb +0 -1
  212. data/lib/geoblacklight/download/csv_download.rb +22 -0
  213. data/lib/geoblacklight/download/geojson_download.rb +1 -1
  214. data/lib/geoblacklight/download/geotiff_download.rb +1 -1
  215. data/lib/geoblacklight/download/kmz_download.rb +1 -1
  216. data/lib/geoblacklight/download/shapefile_download.rb +1 -1
  217. data/lib/geoblacklight/download.rb +1 -1
  218. data/lib/geoblacklight/engine.rb +15 -6
  219. data/lib/geoblacklight/item_viewer.rb +1 -1
  220. data/lib/geoblacklight/metadata/base.rb +2 -1
  221. data/lib/geoblacklight/references.rb +27 -8
  222. data/lib/geoblacklight/routes/downloadable.rb +0 -1
  223. data/lib/geoblacklight/routes.rb +0 -3
  224. data/lib/geoblacklight/version.rb +1 -1
  225. data/lib/geoblacklight/wms_layer/feature_info_response.rb +9 -6
  226. data/lib/geoblacklight.rb +6 -30
  227. data/lib/tasks/geoblacklight.rake +24 -60
  228. data/package.json +24 -17
  229. data/solr/conf/schema.xml +15 -13
  230. data/solr/conf/solrconfig.xml +6 -4
  231. data/spec/components/blacklight/icons/american_geographical_society_library_uwm_libraries_component_spec.rb +15 -0
  232. data/spec/components/blacklight/icons/arizona_component_spec.rb +15 -0
  233. data/spec/components/blacklight/icons/arrow_circle_down_component_spec.rb +15 -0
  234. data/spec/components/blacklight/icons/baruch_cuny_component_spec.rb +15 -0
  235. data/spec/components/blacklight/icons/book_component_spec.rb +15 -0
  236. data/spec/components/blacklight/icons/bookmark_component_spec.rb +15 -0
  237. data/spec/components/blacklight/icons/cd_rom_component_spec.rb +15 -0
  238. data/spec/components/blacklight/icons/child_item_component_spec.rb +15 -0
  239. data/spec/components/blacklight/icons/circle_info_solid_component_spec.rb +15 -0
  240. data/spec/components/blacklight/icons/citation_component_spec.rb +15 -0
  241. data/spec/components/blacklight/icons/collection_component_spec.rb +15 -0
  242. data/spec/components/blacklight/icons/collections_component_spec.rb +15 -0
  243. data/spec/components/blacklight/icons/columbia_component_spec.rb +15 -0
  244. data/spec/components/blacklight/icons/cornell_component_spec.rb +15 -0
  245. data/spec/components/blacklight/icons/datasets_component_spec.rb +15 -0
  246. data/spec/components/blacklight/icons/dvd_rom_component_spec.rb +15 -0
  247. data/spec/components/blacklight/icons/email_component_spec.rb +15 -0
  248. data/spec/components/blacklight/icons/esri_globe_component_spec.rb +15 -0
  249. data/spec/components/blacklight/icons/fire_solid_component_spec.rb +15 -0
  250. data/spec/components/blacklight/icons/george_mason_component_spec.rb +15 -0
  251. data/spec/components/blacklight/icons/globe_component_spec.rb +15 -0
  252. data/spec/components/blacklight/icons/harvard_component_spec.rb +15 -0
  253. data/spec/components/blacklight/icons/home_component_spec.rb +15 -0
  254. data/spec/components/blacklight/icons/iiif_drag_drop_component_spec.rb +15 -0
  255. data/spec/components/blacklight/icons/image_component_spec.rb +15 -0
  256. data/spec/components/blacklight/icons/imagery_component_spec.rb +15 -0
  257. data/spec/components/blacklight/icons/indiana_component_spec.rb +15 -0
  258. data/spec/components/blacklight/icons/leaf_component_spec.rb +15 -0
  259. data/spec/components/blacklight/icons/lewis_clark_component_spec.rb +15 -0
  260. data/spec/components/blacklight/icons/lightbulb_solid_component_spec.rb +15 -0
  261. data/spec/components/blacklight/icons/line_component_spec.rb +15 -0
  262. data/spec/components/blacklight/icons/map_component_spec.rb +15 -0
  263. data/spec/components/blacklight/icons/map_marker_component_spec.rb +15 -0
  264. data/spec/components/blacklight/icons/maps_component_spec.rb +15 -0
  265. data/spec/components/blacklight/icons/massgis_component_spec.rb +15 -0
  266. data/spec/components/blacklight/icons/metadata_component_spec.rb +15 -0
  267. data/spec/components/blacklight/icons/michigan_state_university_component_spec.rb +15 -0
  268. data/spec/components/blacklight/icons/mit_component_spec.rb +15 -0
  269. data/spec/components/blacklight/icons/mixed_component_spec.rb +15 -0
  270. data/spec/components/blacklight/icons/multilinestring_component_spec.rb +15 -0
  271. data/spec/components/blacklight/icons/multipoint_component_spec.rb +15 -0
  272. data/spec/components/blacklight/icons/multipolygon_component_spec.rb +15 -0
  273. data/spec/components/blacklight/icons/northwestern_university_component_spec.rb +15 -0
  274. data/spec/components/blacklight/icons/nyu_component_spec.rb +15 -0
  275. data/spec/components/blacklight/icons/pagelines_brands_component_spec.rb +15 -0
  276. data/spec/components/blacklight/icons/paper_map_component_spec.rb +15 -0
  277. data/spec/components/blacklight/icons/parent_item_component_spec.rb +15 -0
  278. data/spec/components/blacklight/icons/pennsylvania_state_university_component_spec.rb +15 -0
  279. data/spec/components/blacklight/icons/point_component_spec.rb +15 -0
  280. data/spec/components/blacklight/icons/polygon_component_spec.rb +15 -0
  281. data/spec/components/blacklight/icons/polyline_component_spec.rb +15 -0
  282. data/spec/components/blacklight/icons/princeton_component_spec.rb +15 -0
  283. data/spec/components/blacklight/icons/public_component_spec.rb +15 -0
  284. data/spec/components/blacklight/icons/purdue_university_component_spec.rb +15 -0
  285. data/spec/components/blacklight/icons/raster_component_spec.rb +15 -0
  286. data/spec/components/blacklight/icons/restricted_component_spec.rb +15 -0
  287. data/spec/components/blacklight/icons/rutgers_component_spec.rb +15 -0
  288. data/spec/components/blacklight/icons/sms_component_spec.rb +15 -0
  289. data/spec/components/blacklight/icons/stanford_component_spec.rb +15 -0
  290. data/spec/components/blacklight/icons/table_component_spec.rb +15 -0
  291. data/spec/components/blacklight/icons/tags_component_spec.rb +15 -0
  292. data/spec/components/blacklight/icons/texas_component_spec.rb +15 -0
  293. data/spec/components/blacklight/icons/the_ohio_state_university_component_spec.rb +15 -0
  294. data/spec/components/blacklight/icons/triangle_exclamation_solid_component_spec.rb +15 -0
  295. data/spec/components/blacklight/icons/tufts_component_spec.rb +15 -0
  296. data/spec/components/blacklight/icons/ucla_component_spec.rb +15 -0
  297. data/spec/components/blacklight/icons/university_of_california_berkeley_component_spec.rb +15 -0
  298. data/spec/components/blacklight/icons/university_of_chicago_component_spec.rb +15 -0
  299. data/spec/components/blacklight/icons/university_of_colorado_boulder_component_spec.rb +15 -0
  300. data/spec/components/blacklight/icons/university_of_illinois_urbana_champaign_component_spec.rb +15 -0
  301. data/spec/components/blacklight/icons/university_of_iowa_component_spec.rb +15 -0
  302. data/spec/components/blacklight/icons/university_of_maryland_component_spec.rb +15 -0
  303. data/spec/components/blacklight/icons/university_of_michigan_component_spec.rb +15 -0
  304. data/spec/components/blacklight/icons/university_of_minnesota_component_spec.rb +15 -0
  305. data/spec/components/blacklight/icons/university_of_nebraska_lincoln_component_spec.rb +15 -0
  306. data/spec/components/blacklight/icons/university_of_wisconsin_madison_component_spec.rb +15 -0
  307. data/spec/components/blacklight/icons/uva_component_spec.rb +15 -0
  308. data/spec/components/blacklight/icons/web_services_component_spec.rb +15 -0
  309. data/spec/components/blacklight/icons/websites_component_spec.rb +15 -0
  310. data/spec/components/geoblacklight/arcgis_component_spec.rb +31 -0
  311. data/spec/components/geoblacklight/attribute_table_component_spec.rb +37 -0
  312. data/spec/components/geoblacklight/citation_component_spec.rb +37 -0
  313. data/spec/components/geoblacklight/document_component_spec.rb +92 -0
  314. data/spec/components/geoblacklight/download_links_component_spec.rb +102 -0
  315. data/spec/components/geoblacklight/header_icons_component_spec.rb +56 -0
  316. data/spec/components/geoblacklight/iiif_drag_drop_component_spec.rb +30 -0
  317. data/spec/components/geoblacklight/index_map_legend_component_spec.rb +42 -0
  318. data/spec/components/geoblacklight/item_map_viewer_component_spec.rb +36 -0
  319. data/spec/components/geoblacklight/login_link_component_spec.rb +33 -0
  320. data/spec/{lib/geoblacklight/document_presenter_spec.rb → components/geoblacklight/search_result_component_spec.rb} +19 -11
  321. data/spec/components/geoblacklight/static_map_component_spec.rb +22 -0
  322. data/spec/components/geoblacklight/viewer_help_text_component_spec.rb +28 -0
  323. data/spec/components/geoblacklight/web_services_component_spec.rb +45 -0
  324. data/spec/controllers/download_controller_spec.rb +12 -35
  325. data/spec/features/axe_spec.rb +66 -0
  326. data/spec/features/bookmarks_spec.rb +1 -1
  327. data/spec/features/citations_spec.rb +7 -3
  328. data/spec/features/download_layer_spec.rb +24 -39
  329. data/spec/features/esri_viewer_spec.rb +1 -1
  330. data/spec/features/exports_spec.rb +0 -15
  331. data/spec/features/{full_screen_controll_spec.rb → full_screen_control_spec.rb} +6 -6
  332. data/spec/features/home_page_spec.rb +12 -7
  333. data/spec/features/iiif_viewer_spec.rb +1 -1
  334. data/spec/features/index_map_spec.rb +16 -9
  335. data/spec/features/{split_view.html.erb_spec.rb → index_view_spec.rb} +15 -13
  336. data/spec/features/layer_inspection_spec.rb +2 -2
  337. data/spec/features/layer_preview_spec.rb +1 -1
  338. data/spec/features/missing_metadata_spec.rb +5 -5
  339. data/spec/features/oembed_spec.rb +2 -2
  340. data/spec/features/saved_searches_spec.rb +4 -1
  341. data/spec/features/search_results_complex_geometry_spec.rb +2 -2
  342. data/spec/features/search_results_icons_spec.rb +3 -3
  343. data/spec/features/search_results_map_spec.rb +4 -36
  344. data/spec/features/search_results_overlap_ratio_spec.rb +1 -1
  345. data/spec/features/show_page_download_spec.rb +0 -8
  346. data/spec/features/tilejson_spec.rb +2 -2
  347. data/spec/features/web_services_modal_spec.rb +57 -39
  348. data/spec/features/wmts_spec.rb +4 -4
  349. data/spec/fixtures/solr_documents/README.md +2 -1
  350. data/spec/fixtures/solr_documents/complex-geom.json +61 -0
  351. data/spec/fixtures/solr_documents/esri-tiled_map_layer.json +45 -24
  352. data/spec/fixtures/solr_documents/harvard_raster.json +1 -1
  353. data/spec/fixtures/solr_documents/multiple-downloads.json +1 -0
  354. data/spec/helpers/geoblacklight_helper_spec.rb +8 -173
  355. data/spec/lib/geoblacklight/download/csv_download_spec.rb +21 -0
  356. data/spec/lib/geoblacklight/reference_spec.rb +17 -19
  357. data/spec/lib/geoblacklight/references_spec.rb +31 -17
  358. data/spec/lib/geoblacklight/wms_layer/feature_info_response_spec.rb +8 -6
  359. data/spec/lib/geoblacklight/wms_layer_spec.rb +14 -0
  360. data/spec/models/concerns/geoblacklight/solr_document/citation_spec.rb +1 -1
  361. data/spec/models/concerns/geoblacklight/solr_document_spec.rb +1 -21
  362. data/spec/spec_helper.rb +2 -28
  363. data/spec/test_app_templates/lib/generators/test_app_generator.rb +4 -12
  364. data/template.rb +13 -11
  365. data/test/leaflet/layers.test.js +17 -0
  366. data/vite.config.ts +34 -23
  367. metadata +304 -256
  368. data/.hound.yml +0 -8
  369. data/.jshintignore +0 -2
  370. data/.jshintrc +0 -67
  371. data/.solr_wrapper +0 -6
  372. data/app/assets/images/blacklight/american-geographical-society-library-uwm-libraries.svg +0 -26
  373. data/app/assets/images/blacklight/arizona.svg +0 -4
  374. data/app/assets/images/blacklight/arrow-circle-down.svg +0 -3
  375. data/app/assets/images/blacklight/baruch-cuny.svg +0 -3
  376. data/app/assets/images/blacklight/book.svg +0 -3
  377. data/app/assets/images/blacklight/bookmark.svg +0 -3
  378. data/app/assets/images/blacklight/cd-rom.svg +0 -3
  379. data/app/assets/images/blacklight/chicago.svg +0 -4
  380. data/app/assets/images/blacklight/child-item.svg +0 -3
  381. data/app/assets/images/blacklight/circle-info-solid.svg +0 -1
  382. data/app/assets/images/blacklight/citation.svg +0 -3
  383. data/app/assets/images/blacklight/collection.svg +0 -3
  384. data/app/assets/images/blacklight/collections.svg +0 -4
  385. data/app/assets/images/blacklight/columbia.svg +0 -3
  386. data/app/assets/images/blacklight/cornell.svg +0 -5
  387. data/app/assets/images/blacklight/datasets.svg +0 -7
  388. data/app/assets/images/blacklight/dvd-rom.svg +0 -3
  389. data/app/assets/images/blacklight/email.svg +0 -3
  390. data/app/assets/images/blacklight/esri-globe.svg +0 -31
  391. data/app/assets/images/blacklight/fire-solid.svg +0 -1
  392. data/app/assets/images/blacklight/geoblacklight-icons.json +0 -3312
  393. data/app/assets/images/blacklight/george-mason.svg +0 -4
  394. data/app/assets/images/blacklight/globe.svg +0 -3
  395. data/app/assets/images/blacklight/harvard.svg +0 -3
  396. data/app/assets/images/blacklight/home.svg +0 -3
  397. data/app/assets/images/blacklight/illinois.svg +0 -4
  398. data/app/assets/images/blacklight/image.svg +0 -3
  399. data/app/assets/images/blacklight/imagery.svg +0 -4
  400. data/app/assets/images/blacklight/indiana.svg +0 -3
  401. data/app/assets/images/blacklight/iowa.svg +0 -3
  402. data/app/assets/images/blacklight/leaf.svg +0 -3
  403. data/app/assets/images/blacklight/lewis-clark.svg +0 -5
  404. data/app/assets/images/blacklight/lightbulb-solid.svg +0 -1
  405. data/app/assets/images/blacklight/line.svg +0 -4
  406. data/app/assets/images/blacklight/map-marker.svg +0 -3
  407. data/app/assets/images/blacklight/map.svg +0 -3
  408. data/app/assets/images/blacklight/maps.svg +0 -4
  409. data/app/assets/images/blacklight/maryland.svg +0 -3
  410. data/app/assets/images/blacklight/massgis.svg +0 -3
  411. data/app/assets/images/blacklight/metadata.svg +0 -3
  412. data/app/assets/images/blacklight/michigan-state-university.svg +0 -5
  413. data/app/assets/images/blacklight/michigan-state.svg +0 -4
  414. data/app/assets/images/blacklight/michigan.svg +0 -3
  415. data/app/assets/images/blacklight/minnesota.svg +0 -3
  416. data/app/assets/images/blacklight/mit.svg +0 -3
  417. data/app/assets/images/blacklight/mixed.svg +0 -5
  418. data/app/assets/images/blacklight/multilinestring.svg +0 -6
  419. data/app/assets/images/blacklight/multipoint.svg +0 -3
  420. data/app/assets/images/blacklight/multipolygon.svg +0 -6
  421. data/app/assets/images/blacklight/nebraska.svg +0 -4
  422. data/app/assets/images/blacklight/northwestern-university.svg +0 -5
  423. data/app/assets/images/blacklight/nyu.svg +0 -6
  424. data/app/assets/images/blacklight/ohio-state.svg +0 -5
  425. data/app/assets/images/blacklight/pagelines-brands.svg +0 -3
  426. data/app/assets/images/blacklight/paper-map.svg +0 -3
  427. data/app/assets/images/blacklight/parent-item.svg +0 -3
  428. data/app/assets/images/blacklight/penn-state.svg +0 -4
  429. data/app/assets/images/blacklight/pennsylvania-state-university.svg +0 -5
  430. data/app/assets/images/blacklight/point.svg +0 -3
  431. data/app/assets/images/blacklight/polygon.svg +0 -4
  432. data/app/assets/images/blacklight/polyline.svg +0 -6
  433. data/app/assets/images/blacklight/princeton.svg +0 -3
  434. data/app/assets/images/blacklight/public.svg +0 -3
  435. data/app/assets/images/blacklight/purdue-university.svg +0 -5
  436. data/app/assets/images/blacklight/purdue.svg +0 -4
  437. data/app/assets/images/blacklight/raster.svg +0 -3
  438. data/app/assets/images/blacklight/restricted.svg +0 -3
  439. data/app/assets/images/blacklight/rutgers.svg +0 -5
  440. data/app/assets/images/blacklight/sms.svg +0 -3
  441. data/app/assets/images/blacklight/stanford.svg +0 -3
  442. data/app/assets/images/blacklight/table.svg +0 -3
  443. data/app/assets/images/blacklight/tags.svg +0 -3
  444. data/app/assets/images/blacklight/texas.svg +0 -3
  445. data/app/assets/images/blacklight/the-ohio-state-university.svg +0 -6
  446. data/app/assets/images/blacklight/triangle-exclamation-solid.svg +0 -1
  447. data/app/assets/images/blacklight/tufts.svg +0 -3
  448. data/app/assets/images/blacklight/ucla.svg +0 -3
  449. data/app/assets/images/blacklight/university-of-california-berkeley.svg +0 -4
  450. data/app/assets/images/blacklight/university-of-chicago.svg +0 -5
  451. data/app/assets/images/blacklight/university-of-colorado-boulder.svg +0 -6
  452. data/app/assets/images/blacklight/university-of-illinois-urbana-champaign.svg +0 -5
  453. data/app/assets/images/blacklight/university-of-iowa.svg +0 -4
  454. data/app/assets/images/blacklight/university-of-maryland.svg +0 -4
  455. data/app/assets/images/blacklight/university-of-michigan.svg +0 -4
  456. data/app/assets/images/blacklight/university-of-minnesota.svg +0 -4
  457. data/app/assets/images/blacklight/university-of-nebraska-lincoln.svg +0 -7
  458. data/app/assets/images/blacklight/university-of-wisconsin-madison.svg +0 -4
  459. data/app/assets/images/blacklight/uva.svg +0 -3
  460. data/app/assets/images/blacklight/web_services.svg +0 -3
  461. data/app/assets/images/blacklight/websites.svg +0 -4
  462. data/app/assets/images/blacklight/wisconsin.svg +0 -3
  463. data/app/assets/javascripts/geoblacklight/basemaps.js +0 -85
  464. data/app/assets/javascripts/geoblacklight/controls/fullscreen.js +0 -8
  465. data/app/assets/javascripts/geoblacklight/controls/opacity.js +0 -6
  466. data/app/assets/javascripts/geoblacklight/controls.js +0 -1
  467. data/app/assets/javascripts/geoblacklight/downloaders/downloader.js +0 -61
  468. data/app/assets/javascripts/geoblacklight/downloaders/hgl_downloader.js +0 -32
  469. data/app/assets/javascripts/geoblacklight/downloaders.js +0 -1
  470. data/app/assets/javascripts/geoblacklight/geoblacklight.js +0 -60
  471. data/app/assets/javascripts/geoblacklight/modules/bookmarks.js +0 -43
  472. data/app/assets/javascripts/geoblacklight/modules/download.js +0 -11
  473. data/app/assets/javascripts/geoblacklight/modules/geosearch.js +0 -133
  474. data/app/assets/javascripts/geoblacklight/modules/help_text.js +0 -7
  475. data/app/assets/javascripts/geoblacklight/modules/home.js +0 -16
  476. data/app/assets/javascripts/geoblacklight/modules/item.js +0 -32
  477. data/app/assets/javascripts/geoblacklight/modules/layer_opacity.js +0 -68
  478. data/app/assets/javascripts/geoblacklight/modules/metadata.js +0 -15
  479. data/app/assets/javascripts/geoblacklight/modules/metadata_download_button.js +0 -58
  480. data/app/assets/javascripts/geoblacklight/modules/relations.js +0 -14
  481. data/app/assets/javascripts/geoblacklight/modules/results.js +0 -81
  482. data/app/assets/javascripts/geoblacklight/modules/svg_tooltips.js +0 -31
  483. data/app/assets/javascripts/geoblacklight/modules/util.js +0 -48
  484. data/app/assets/javascripts/geoblacklight/modules.js +0 -1
  485. data/app/assets/javascripts/geoblacklight/templates/index_map_download.hbs +0 -19
  486. data/app/assets/javascripts/geoblacklight/templates/index_map_info.hbs +0 -61
  487. data/app/assets/javascripts/geoblacklight/viewers/cog.js +0 -5
  488. data/app/assets/javascripts/geoblacklight/viewers/esri/dynamic_map_layer.js +0 -85
  489. data/app/assets/javascripts/geoblacklight/viewers/esri/feature_layer.js +0 -76
  490. data/app/assets/javascripts/geoblacklight/viewers/esri/image_map_layer.js +0 -14
  491. data/app/assets/javascripts/geoblacklight/viewers/esri/tiled_map_layer.js +0 -50
  492. data/app/assets/javascripts/geoblacklight/viewers/esri.js +0 -78
  493. data/app/assets/javascripts/geoblacklight/viewers/iiif.js +0 -25
  494. data/app/assets/javascripts/geoblacklight/viewers/index_map.js +0 -71
  495. data/app/assets/javascripts/geoblacklight/viewers/map.js +0 -77
  496. data/app/assets/javascripts/geoblacklight/viewers/oembed.js +0 -13
  497. data/app/assets/javascripts/geoblacklight/viewers/pmtiles.js +0 -5
  498. data/app/assets/javascripts/geoblacklight/viewers/tilejson.js +0 -33
  499. data/app/assets/javascripts/geoblacklight/viewers/tms.js +0 -10
  500. data/app/assets/javascripts/geoblacklight/viewers/viewer.js +0 -68
  501. data/app/assets/javascripts/geoblacklight/viewers/wms.js +0 -74
  502. data/app/assets/javascripts/geoblacklight/viewers/wmts.js +0 -85
  503. data/app/assets/javascripts/geoblacklight/viewers/xyz.js +0 -10
  504. data/app/assets/javascripts/geoblacklight/viewers.js +0 -1
  505. data/app/assets/stylesheets/geoblacklight/modules/mixins.scss +0 -5
  506. data/app/helpers/arcgis_helper.rb +0 -14
  507. data/app/helpers/blacklight_helper.rb +0 -11
  508. data/app/helpers/carto_helper.rb +0 -31
  509. data/app/helpers/geoblacklight/geoblacklight_helper_behavior.rb +0 -18
  510. data/app/javascript/clover/clover_initializer.js +0 -29
  511. data/app/javascript/index.js +0 -7
  512. data/app/javascript/openlayers/basemaps.js +0 -47
  513. data/app/javascript/openlayers/ol_initializer.js +0 -106
  514. data/app/javascript/stylesheets/openlayers.css +0 -1
  515. data/app/models/concerns/geoblacklight/solr_document/carto.rb +0 -17
  516. data/app/views/catalog/_arcgis.html.erb +0 -4
  517. data/app/views/catalog/_carto.html.erb +0 -4
  518. data/app/views/catalog/_data_dictionary.html.erb +0 -5
  519. data/app/views/catalog/_downloads_collapse.html.erb +0 -27
  520. data/app/views/catalog/_header_icons.html.erb +0 -3
  521. data/app/views/catalog/_index_split_default.html.erb +0 -30
  522. data/app/views/catalog/_results_pagination.html.erb +0 -12
  523. data/app/views/catalog/_show_default_attribute_table.html.erb +0 -19
  524. data/app/views/catalog/_show_default_display_note.html.erb +0 -7
  525. data/app/views/catalog/_show_default_viewer_container.html.erb +0 -28
  526. data/app/views/catalog/_show_downloads.html.erb +0 -23
  527. data/app/views/catalog/_show_header_default.html.erb +0 -4
  528. data/app/views/catalog/_show_sidebar.html.erb +0 -16
  529. data/app/views/catalog/_show_sidebar_static_map.html.erb +0 -10
  530. data/app/views/catalog/_show_web_services.html.erb +0 -11
  531. data/app/views/catalog/_web_services.html.erb +0 -9
  532. data/app/views/catalog/_web_services_wms.html.erb +0 -13
  533. data/app/views/download/hgl.html.erb +0 -27
  534. data/app/views/relation/_relations.html.erb +0 -15
  535. data/app/views/shared/_header_navbar.html.erb +0 -46
  536. data/babel.config.json +0 -4
  537. data/jest.config.js +0 -25
  538. data/lib/generators/geoblacklight/templates/assets/_blacklight.scss +0 -1
  539. data/lib/generators/geoblacklight/templates/assets/_geoblacklight.scss +0 -1
  540. data/lib/generators/geoblacklight/templates/assets/geoblacklight.js +0 -9
  541. data/lib/generators/geoblacklight/templates/clover.js +0 -5
  542. data/lib/generators/geoblacklight/templates/ol.js +0 -6
  543. data/lib/generators/geoblacklight/templates/package-test.json +0 -10
  544. data/lib/generators/geoblacklight/templates/settings.gbl_v1.yml +0 -195
  545. data/lib/geoblacklight/download/hgl_download.rb +0 -20
  546. data/lib/geoblacklight/view_helper_override.rb +0 -16
  547. data/setupJest.js +0 -14
  548. data/spec/helpers/arcgis_helper_spec.rb +0 -16
  549. data/spec/helpers/carto_helper_spec.rb +0 -13
  550. data/spec/helpers/geoblacklight/geoblacklight_helper_behavior_spec.rb +0 -27
  551. data/spec/javascripts/util_spec.js +0 -10
  552. data/spec/lib/geoblacklight/download/hgl_download_spec.rb +0 -62
  553. data/spec/lib/geoblacklight/view_helper_override_spec.rb +0 -29
  554. data/spec/models/concerns/geoblacklight/solr_document/carto_spec.rb +0 -43
  555. data/spec/test_app_templates/Gemfile.extra +0 -2
  556. data/spec/views/catalog/_document_split.html.erb_spec.rb +0 -7
  557. data/spec/views/catalog/_index_split.html.erb_spec.rb +0 -7
  558. data/spec/views/catalog/_results_pagination.html.erb_spec.rb +0 -11
  559. data/spec/views/catalog/_show_downloads.html.erb_spec.rb +0 -43
  560. data/spec/views/catalog/_show_tools.html.erb_spec.rb +0 -38
  561. data/vendor/assets/images/fullscreen.png +0 -0
  562. data/vendor/assets/images/fullscreen@2x.png +0 -0
  563. data/vendor/assets/images/layers-2x.png +0 -0
  564. data/vendor/assets/images/layers.png +0 -0
  565. data/vendor/assets/images/marker-icon-2x.png +0 -0
  566. data/vendor/assets/images/marker-icon.png +0 -0
  567. data/vendor/assets/images/marker-shadow.png +0 -0
  568. data/vendor/assets/javascripts/Leaflet.fullscreen.js +0 -152
  569. data/vendor/assets/javascripts/esri-leaflet.js +0 -12
  570. data/vendor/assets/javascripts/esri-leaflet.js.map +0 -1
  571. data/vendor/assets/javascripts/leaflet-iiif.js +0 -323
  572. data/vendor/assets/javascripts/leaflet-src.js.erb +0 -14126
  573. data/vendor/assets/javascripts/leaflet-src.js.map +0 -1
  574. data/vendor/assets/javascripts/native.history.js +0 -1
  575. data/vendor/assets/stylesheets/leaflet.css +0 -640
  576. data/vendor/assets/stylesheets/leaflet.fullscreen.css +0 -40
  577. /data/app/{views/catalog/_show_default_viewer_information.html.erb → components/geoblacklight/index_map_inspect_component.html.erb} +0 -0
@@ -1,78 +0,0 @@
1
- //= require geoblacklight/viewers/map
2
-
3
- GeoBlacklight.Viewer.Esri = GeoBlacklight.Viewer.Map.extend({
4
- layerInfo: {},
5
-
6
- load: function() {
7
- this.options.bbox = L.geoJSONToBounds(this.data.mapGeom);
8
- this.map = L.map(this.element).fitBounds(this.options.bbox);
9
- this.map.addLayer(this.selectBasemap());
10
- this.map.addLayer(this.overlay);
11
- if (this.data.available) {
12
- this.getEsriLayer();
13
- } else {
14
- this.addBoundsOverlay(this.options.bbox);
15
- }
16
- },
17
-
18
- getEsriLayer: function() {
19
- var _this = this;
20
-
21
- // remove any trailing slash from endpoint url
22
- _this.data.url = _this.data.url.replace(/\/$/, '');
23
-
24
- L.esri.get(_this.data.url, {}, function(error, response){
25
- if(!error) {
26
- _this.layerInfo = response;
27
-
28
- // get layer as defined in submodules (e.g. esri/mapservice)
29
- var layer = _this.getPreviewLayer();
30
-
31
- // add layer to map
32
- if (_this.addPreviewLayer(layer)) {
33
- // add controls if layer is added
34
- _this.loadControls();
35
- }
36
- }
37
- });
38
- },
39
-
40
- addPreviewLayer: function(layer) {
41
-
42
- // if not null, add layer to map
43
- if (layer) {
44
-
45
- this.overlay.addLayer(layer);
46
- return true;
47
- }
48
- },
49
-
50
- // clear attribute table and setup spinner icon
51
- appendLoadingMessage: function() {
52
- var spinner = '<tbody class="attribute-table-body"><tr><td colspan="2">' +
53
- '<span id="attribute-table">' +
54
- '<div class="spinner-border" role="status"><span class="sr-only">Inspecting</span></div>' +
55
- '</span>' +
56
- '</td></tr></tbody>';
57
-
58
- $('.attribute-table-body').html(spinner);
59
- },
60
-
61
- // appends error message to attribute table
62
- appendErrorMessage: function() {
63
- $('.attribute-table-body').html('<tbody class="attribute-table-body">'+
64
- '<tr><td colspan="2">Could not find that feature</td></tr></tbody>');
65
- },
66
-
67
- // populates attribute table with feature properties
68
- populateAttributeTable: function(feature) {
69
- var html = $('<tbody class="attribute-table-body"></tbody>');
70
-
71
- // step through properties and append to table
72
- for (var property in feature.properties) {
73
- html.append('<tr><td>' + property + '</td>'+
74
- '<td>' + GeoBlacklight.Util.linkify(feature.properties[property]) + '</tr>');
75
- }
76
- $('.attribute-table-body').replaceWith(html);
77
- }
78
- });
@@ -1,25 +0,0 @@
1
- //= require geoblacklight/viewers/viewer
2
-
3
- GeoBlacklight.Viewer.Iiif = GeoBlacklight.Viewer.extend({
4
- load: function() {
5
- this.adjustLayout();
6
-
7
- this.map = L.map(this.element, {
8
- center: [0, 0],
9
- crs: L.CRS.Simple,
10
- zoom: 0
11
- });
12
- this.loadControls();
13
- this.iiifLayer = L.tileLayer.iiif(this.data.url)
14
- .addTo(this.map);
15
- },
16
-
17
- adjustLayout: function() {
18
-
19
- // hide attribute table
20
- $('#table-container').hide();
21
-
22
- // expand viewer element
23
- $(this.element).parent().attr('class', 'col-md-12');
24
- }
25
- });
@@ -1,71 +0,0 @@
1
- //= require geoblacklight/viewers/map
2
-
3
- GeoBlacklight.Viewer.IndexMap = GeoBlacklight.Viewer.Map.extend({
4
- load: function() {
5
- this.map = L.map(this.element).fitBounds(this.options.bbox);
6
- this.map.addLayer(this.selectBasemap());
7
-
8
- if (this.data.available) {
9
- this.addPreviewLayer();
10
- this.loadControls();
11
- } else {
12
- this.addBoundsOverlay(this.options.bbox);
13
- }
14
- },
15
- availabilityStyle: function(availability) {
16
- var style = {};
17
- var options = this.data.leafletOptions;
18
-
19
- // Style the colors based on availability
20
- if (availability || typeof(availability) === 'undefined') {
21
- style = options.LAYERS.INDEX.DEFAULT;
22
- } else {
23
- style = options.LAYERS.INDEX.UNAVAILABLE;
24
- }
25
- return style
26
- },
27
- addPreviewLayer: function() {
28
- var _this = this;
29
- var geoJSONLayer;
30
- var prevLayer = null;
31
- var options = this.data.leafletOptions;
32
- $.getJSON(this.data.url, function(data) {
33
- geoJSONLayer = L.geoJson(data,
34
- {
35
- style: function(feature) {
36
- return _this.availabilityStyle(feature.properties.available);
37
- },
38
- onEachFeature: function(feature, layer) {
39
- // Add a hover label for the label property
40
- if (feature.properties.label !== null) {
41
- layer.bindTooltip(feature.properties.label);
42
- }
43
- // If it is available add clickable info
44
- if (feature.properties.available !== null) {
45
- layer.on('click', function(e) {
46
- // Change currently selected layer color
47
- layer.setStyle(options.LAYERS.INDEX.SELECTED);
48
- // Change previously selected layer color to original color
49
- if (prevLayer !== null) {
50
- geoJSONLayer.resetStyle(prevLayer);
51
- }
52
- prevLayer = layer;
53
- GeoBlacklight.Util.indexMapTemplate(feature.properties, function(html) {
54
- $('.viewer-information').html(html);
55
- });
56
- GeoBlacklight.Util.indexMapDownloadTemplate(feature.properties, function(html) {
57
- $('.js-index-map-feature').remove();
58
- $('.js-download-list').append(html);
59
- });
60
- });
61
- }
62
- },
63
- // For point index maps, use circle markers
64
- pointToLayer: function (feature, latlng) {
65
- return L.circleMarker(latlng);
66
- }
67
- }).addTo(_this.map);
68
- _this.map.fitBounds(geoJSONLayer.getBounds());
69
- });
70
- }
71
- });
@@ -1,77 +0,0 @@
1
- //= require geoblacklight/viewers/viewer
2
-
3
- GeoBlacklight.Viewer.Map = GeoBlacklight.Viewer.extend({
4
-
5
- options: {
6
- /**
7
- * Initial bounds of map
8
- * @type {L.LatLngBounds}
9
- */
10
- bbox: [[-82, -144], [77, 161]],
11
- opacity: 0.75
12
- },
13
-
14
- overlay: L.layerGroup(),
15
-
16
- load: function() {
17
- if (this.data.mapGeom) {
18
- this.options.bbox = L.geoJSONToBounds(this.data.mapGeom);
19
- }
20
- this.map = L.map(this.element).fitBounds(this.options.bbox);
21
-
22
- // Add initial bbox to map element for easier testing
23
- if (this.map.getBounds().isValid()) {
24
- this.element.setAttribute('data-js-map-render-bbox', this.map.getBounds().toBBoxString());
25
- }
26
-
27
- this.map.addLayer(this.selectBasemap());
28
- this.map.addLayer(this.overlay);
29
- if (this.data.map !== 'index') {
30
- this.addBoundsOverlay(this.options.bbox);
31
- }
32
- },
33
-
34
- /**
35
- * Add a bounding box overlay to map.
36
- * @param {L.LatLngBounds} bounds Leaflet LatLngBounds
37
- */
38
- addBoundsOverlay: function(bounds) {
39
- if (bounds instanceof L.LatLngBounds) {
40
- this.overlay.addLayer(L.polygon([
41
- bounds.getSouthWest(),
42
- bounds.getSouthEast(),
43
- bounds.getNorthEast(),
44
- bounds.getNorthWest()
45
- ]));
46
- }
47
- },
48
-
49
- /**
50
- * Remove bounding box overlay from map.
51
- */
52
- removeBoundsOverlay: function() {
53
- this.overlay.clearLayers();
54
- },
55
-
56
- /**
57
- * Add a GeoJSON overlay to map.
58
- * @param {string} geojson GeoJSON string
59
- */
60
- addGeoJsonOverlay: function(geojson) {
61
- var layer = L.geoJSON();
62
- layer.addData(geojson);
63
- this.overlay.addLayer(layer);
64
- },
65
-
66
- /**
67
- * Selects basemap if specified in data options, if not return positron.
68
- */
69
- selectBasemap: function() {
70
- var _this = this;
71
- if (_this.data.basemap) {
72
- return GeoBlacklight.Basemaps[_this.data.basemap];
73
- } else {
74
- return GeoBlacklight.Basemaps.positron;
75
- }
76
- }
77
- });
@@ -1,13 +0,0 @@
1
- //= require geoblacklight/viewers/viewer
2
-
3
- GeoBlacklight.Viewer.Oembed = GeoBlacklight.Viewer.extend({
4
- load: function() {
5
- var $el = $(this.element);
6
- $.getJSON(this.data.url, function(data){
7
- if (data === null){
8
- return;
9
- }
10
- $el.html(data.html);
11
- });
12
- },
13
- });
@@ -1,5 +0,0 @@
1
- //= require geoblacklight/viewers/viewer
2
-
3
- GeoBlacklight.Viewer.Pmtiles = GeoBlacklight.Viewer.extend({
4
- load: function() {}
5
- });
@@ -1,33 +0,0 @@
1
- //= require geoblacklight/viewers/wms
2
-
3
- GeoBlacklight.Viewer.Tilejson = GeoBlacklight.Viewer.Wms.extend({
4
-
5
- addPreviewLayer: function() {
6
- var _this = this;
7
- fetch(this.data.url).then(function(response) {
8
- if (!response.ok) {
9
- throw new Error("Unable to fetch tile.json document");
10
- }
11
- return response.json();
12
- }).then(function(tilejson) {
13
- var bounds = _this.getBounds(tilejson),
14
- options = bounds ? { bounds: bounds } : {},
15
- url = tilejson.tiles[0],
16
- tileJsonLayer = L.tileLayer(url, options);
17
- _this.overlay.addLayer(tileJsonLayer);
18
- }).catch(function(error) {
19
- console.debug(error);
20
- });
21
- },
22
-
23
- getBounds: function(doc) {
24
- // Get the bounds from the document, if they exist, and
25
- // convert to a Leaflet latlngBounds object
26
- var bounds = doc.bounds;
27
- if(bounds) {
28
- var corner1 = L.latLng(bounds[1], bounds[0]),
29
- corner2 = L.latLng(bounds[3], bounds[2]);
30
- return L.latLngBounds(corner1, corner2);
31
- }
32
- }
33
- });
@@ -1,10 +0,0 @@
1
- //= require geoblacklight/viewers/wms
2
-
3
- GeoBlacklight.Viewer.Tms = GeoBlacklight.Viewer.Wms.extend({
4
-
5
- addPreviewLayer: function() {
6
- var _this = this;
7
- var tmsLayer = L.tileLayer(this.data.url, { tms: true });
8
- this.overlay.addLayer(tmsLayer);
9
- }
10
- });
@@ -1,68 +0,0 @@
1
- /*global GeoBlacklight */
2
-
3
- // base viewer
4
- GeoBlacklight.Viewer = L.Class.extend({
5
- options: {},
6
-
7
- initialize: function(el, options) {
8
- this.element = el;
9
- this.data = $(el).data();
10
-
11
- L.Util.setOptions(this, options);
12
-
13
- // Sets leaflet icon paths to ex. /assets/marker-icon-2x-rails-fingerprint
14
- L.Icon.Default.imagePath = '..';
15
-
16
- // trigger viewer load functions
17
- this.load();
18
- },
19
-
20
- /**
21
- * Loads leaflet controls from controls directory.
22
- **/
23
- loadControls: function() {
24
- var _this = this;
25
- var protocol = this.data.protocol.toUpperCase();
26
- var options = this.data.leafletOptions;
27
-
28
- if (!options.VIEWERS) {
29
- return;
30
- }
31
-
32
- var viewer = options.VIEWERS[protocol];
33
- var controls = viewer && viewer.CONTROLS;
34
-
35
- _this.controlPreload();
36
-
37
- /**
38
- * Loop though the GeoBlacklight.Controls hash, and for each control,
39
- * check to see if it is included in the controls list for the current
40
- * viewer. If it is, then pass in the viewer object and run the function
41
- * that adds it to the map.
42
- **/
43
- $.each(GeoBlacklight.Controls, function(name, func) {
44
- if (controls && controls.indexOf(name) > -1) {
45
- func.call(_this);
46
- }
47
- });
48
- },
49
-
50
- /**
51
- * Work to do before the controls are loaded.
52
- **/
53
- controlPreload: function() {
54
- return;
55
- },
56
-
57
- /**
58
- * Gets the value of detect retina from application settings.
59
- **/
60
- detectRetina: function() {
61
- var options = this.data.leafletOptions;
62
- if (options && options.LAYERS) {
63
- return options.LAYERS.DETECT_RETINA ? options.LAYERS.DETECT_RETINA : false;
64
- } else {
65
- return false;
66
- }
67
- }
68
- });
@@ -1,74 +0,0 @@
1
- //= require geoblacklight/viewers/map
2
-
3
- GeoBlacklight.Viewer.Wms = GeoBlacklight.Viewer.Map.extend({
4
-
5
- load: function() {
6
- this.options.bbox = L.geoJSONToBounds(this.data.mapGeom);
7
- this.map = L.map(this.element).fitBounds(this.options.bbox);
8
- this.map.addLayer(this.selectBasemap());
9
- this.map.addLayer(this.overlay);
10
-
11
- if (this.data.available) {
12
- this.addPreviewLayer();
13
- this.loadControls();
14
- } else {
15
- this.addBoundsOverlay(this.options.bbox);
16
- }
17
- },
18
-
19
- addPreviewLayer: function() {
20
- var _this = this;
21
- var wmsLayer = L.tileLayer.wms(this.data.url, {
22
- layers: this.data.layerId,
23
- format: 'image/png',
24
- transparent: true,
25
- tiled: true,
26
- CRS: 'EPSG:3857',
27
- opacity: this.options.opacity,
28
- detectRetina: _this.detectRetina()
29
- });
30
- this.overlay.addLayer(wmsLayer);
31
- this.setupInspection();
32
- },
33
-
34
- setupInspection: function() {
35
- var _this = this;
36
- this.map.on('click', function(e) {
37
- spinner = '<tbody class="attribute-table-body"><tr><td colspan="2"><span id="attribute-table"><div class="spinner-border" role="status"><span class="sr-only">Inspecting</span></div></span></td></tr></tbody>';
38
- $('.attribute-table-body').replaceWith(spinner);
39
- var wmsoptions = {
40
- URL: _this.data.url,
41
- LAYERS: _this.data.layerId,
42
- BBOX: _this.map.getBounds().toBBoxString(),
43
- WIDTH: Math.round($('#map').width()),
44
- HEIGHT: Math.round($('#map').height()),
45
- QUERY_LAYERS: _this.data.layerId,
46
- X: Math.round(e.containerPoint.x),
47
- Y: Math.round(e.containerPoint.y)
48
- };
49
-
50
- $.ajax({
51
- type: 'POST',
52
- url: '/wms/handle',
53
- beforeSend: function(xhr) {
54
- xhr.setRequestHeader('X-CSRF-Token', Rails.csrfToken());
55
- },
56
- data: wmsoptions,
57
- success: function(data) {
58
- if (data.hasOwnProperty('error') || data.values.length === 0) {
59
- $('.attribute-table-body').html('<tbody class="attribute-table-body"><tr><td colspan="2">Could not find that feature</td></tr></tbody>');
60
- return;
61
- }
62
- var html = $('<tbody class="attribute-table-body"></tbody>');
63
- $.each(data.values, function(i, val) {
64
- html.append('<tr><td>' + val[0] + '</td><td>' + GeoBlacklight.Util.linkify(val[1]) + '</tr>');
65
- });
66
- $('.attribute-table-body').replaceWith(html);
67
- },
68
- fail: function(error) {
69
- console.log(error);
70
- }
71
- });
72
- });
73
- }
74
- });
@@ -1,85 +0,0 @@
1
- //= require geoblacklight/viewers/wms
2
-
3
- GeoBlacklight.Viewer.Wmts = GeoBlacklight.Viewer.Wms.extend({
4
-
5
- addPreviewLayer: function() {
6
- var _this = this;
7
- fetch(this.data.url).then(function(response) {
8
- if (!response.ok) {
9
- throw new Error("Unable to fetch WMTSCapabilities document");
10
- }
11
- return response.text();
12
- }).then(function(wmtsCapabilities) {
13
- var tileInfo = _this.parseCapabilities(wmtsCapabilities),
14
- options = tileInfo.bounds ? { bounds: tileInfo.bounds } : {},
15
- tileLayer = L.tileLayer(tileInfo.url, options);
16
- _this.overlay.addLayer(tileLayer);
17
- }).catch(function(error) {
18
- console.debug(error);
19
- });
20
- },
21
-
22
- parseCapabilities: function(wmtsCapabilities) {
23
- var parser = new DOMParser(),
24
- doc = parser.parseFromString(wmtsCapabilities, "application/xml"),
25
- layers = doc.getElementsByTagName("Layer"),
26
- selectedLayer = this.findLayer(layers),
27
- resourceElement = selectedLayer.getElementsByTagName("ResourceURL")[0];
28
-
29
- // Generate URL with Leaflet.TileLayer URL template formatting
30
- var tileURL = resourceElement.getAttribute("template")
31
- .replace("{Style}", this.getStyle(selectedLayer))
32
- .replace("{TileMatrixSet}", this.getTileMatrixSet(selectedLayer))
33
- .replace("TileMatrix", "z")
34
- .replace("TileCol","x")
35
- .replace("TileRow","y");
36
-
37
- return { url: tileURL, bounds: this.getBounds(selectedLayer) };
38
- },
39
-
40
- findLayer: function(layers) {
41
- if (layers.length === 1) {
42
- // If there is only one layer in the document, return it
43
- return layers[0];
44
- } else {
45
- // Search each layer for an identifier that matches the
46
- // layerId and return it
47
- for (i = 0; i < layers.length; i++) {
48
- var ids = layers[i].getElementsByTagName("ows:Identifier");
49
- for(x = 0; x < ids.length; x++) {
50
- if (ids[x].textContent === this.data.layerId) {
51
- return layers[i];
52
- }
53
- }
54
- }
55
- }
56
- },
57
-
58
- getStyle: function(layer) {
59
- var styleElement = layer.getElementsByTagName("Style")[0];
60
- if(styleElement) {
61
- return styleElement.getElementsByTagName("ows:Identifier")[0].textContent;
62
- }
63
- },
64
-
65
- getTileMatrixSet: function(layer) {
66
- var tileMatrixElement = layer.getElementsByTagName("TileMatrixSet")[0];
67
- if(tileMatrixElement) {
68
- return tileMatrixElement.textContent;
69
- }
70
- },
71
-
72
- getBounds: function(layer) {
73
- // Get the layer's lower corner and upper corner values,
74
- // if they exist, and convert to a Leaflet latlngBounds object
75
- var lcElement = layer.getElementsByTagName("ows:LowerCorner")[0],
76
- ucElement = layer.getElementsByTagName("ows:UpperCorner")[0];
77
- if(lcElement && ucElement) {
78
- var lc = lcElement.textContent.split(" "),
79
- uc = ucElement.textContent.split(" "),
80
- corner1 = L.latLng(lc[1], lc[0]),
81
- corner2 = L.latLng(uc[1], uc[0]);
82
- return L.latLngBounds(corner1, corner2);
83
- }
84
- }
85
- });
@@ -1,10 +0,0 @@
1
- //= require geoblacklight/viewers/wms
2
-
3
- GeoBlacklight.Viewer.Xyz = GeoBlacklight.Viewer.Wms.extend({
4
-
5
- addPreviewLayer: function() {
6
- var _this = this;
7
- var xyzLayer = L.tileLayer(this.data.url);
8
- this.overlay.addLayer(xyzLayer);
9
- }
10
- });
@@ -1 +0,0 @@
1
- //= require_tree ./viewers
@@ -1,5 +0,0 @@
1
- // Leaflet control box-shadow
2
- @mixin map-control-shadow {
3
-
4
- box-shadow: 0 1px 5px rgba(0,0,0,0.65);
5
- }
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module ArcgisHelper
4
- ##
5
- # Generates an ArcGIS.com viewer url with params that can open content
6
- # directly
7
- # See: https://doc.arcgis.com/en/arcgis-online/reference/use-url-parameters.htm
8
- def arcgis_link(arcgis_urls)
9
- params = URI.encode_www_form(
10
- urls: arcgis_urls
11
- )
12
- Settings.ARCGIS_BASE_URL + "?" + params
13
- end
14
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module BlacklightHelper
4
- include Blacklight::BlacklightHelperBehavior
5
- include Geoblacklight::GeoblacklightHelperBehavior
6
- include Blacklight::CatalogHelperBehavior
7
-
8
- def render_document_sidebar_partial(document = @document)
9
- super + (render "relations_container", document: document)
10
- end
11
- end
@@ -1,31 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module CartoHelper
4
- ##
5
- # Creates a Carto OneClick link, using the configuration link
6
- # @param [String] file_link
7
- # @return [String]
8
- def carto_link(file_link)
9
- params = URI.encode_www_form(
10
- file: file_link,
11
- provider: carto_provider,
12
- logo: Settings.APPLICATION_LOGO_URL
13
- )
14
- carto_oneclick_host + "?" + params
15
- end
16
-
17
- ##
18
- # Removes blank space from provider to accomodate Carto OneClick
19
- #
20
- def carto_provider
21
- application_name.delete(" ")
22
- end
23
-
24
- private
25
-
26
- ##
27
- # Method used to access setting and provide deprecation warnings to migrate
28
- def carto_oneclick_host
29
- Settings.CARTO_ONECLICK_LINK
30
- end
31
- end
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- ##
4
- # Adds helper behavior logic for GeoBlacklight, to used alongside
5
- # BlacklightHelperBehavior
6
- module Geoblacklight
7
- module GeoblacklightHelperBehavior
8
- include Blacklight::BlacklightHelperBehavior
9
-
10
- ##
11
- # Calls the presenter on the requested method
12
- # @param [Symbol, String] presenting_method
13
- # @return [String]
14
- def geoblacklight_present(presenting_method, document = @document)
15
- document_presenter(document).try(presenting_method.to_sym) || ""
16
- end
17
- end
18
- end
@@ -1,29 +0,0 @@
1
- import { createElement } from 'react'
2
- import { createRoot } from 'react-dom/client'
3
- import Viewer from '@samvera/clover-iiif/viewer'
4
-
5
- export default class CloverInitializer {
6
- constructor () {
7
- this.element = document.getElementById('clover-viewer')
8
- if (this.element) {
9
- this.iiif_content = this.element.attributes['iiif_content'].value
10
- }
11
- }
12
-
13
- run () {
14
- if (!this.iiif_content) return false
15
- const root = createRoot(document.getElementById('clover-viewer'))
16
- root.render(createElement(Viewer, { id: this.iiif_content, options: this.config }))
17
- }
18
-
19
- get config () {
20
- return {
21
- showTitle: false,
22
- showIIIFBadge: false,
23
- informationPanel: {
24
- renderToggle: false,
25
- renderAbout: false
26
- }
27
- }
28
- }
29
- }
@@ -1,7 +0,0 @@
1
- import OlInitializer from './openlayers/ol_initializer'
2
- import CloverInitializer from './clover/clover_initializer'
3
-
4
- export {
5
- OlInitializer,
6
- CloverInitializer
7
- }