geoblacklight 4.4.2 → 5.0.0
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.
- checksums.yaml +4 -4
- data/.github/workflows/build-demo-app.yml +156 -0
- data/.github/workflows/prune-containers.yml +19 -0
- data/.github/workflows/ruby.yml +51 -52
- data/.gitignore +2 -2
- data/CONTRIBUTING.md +62 -44
- data/Gemfile +3 -28
- data/Rakefile +50 -67
- data/app/assets/images/blacklight/logo.svg +31 -1
- data/app/assets/stylesheets/geoblacklight/geoblacklight.scss +1 -2
- data/app/assets/stylesheets/geoblacklight/modules/_base.scss +1 -2
- data/app/assets/stylesheets/geoblacklight/modules/_blacklight_overrides.scss +24 -26
- data/app/assets/stylesheets/geoblacklight/modules/downloads.scss +13 -0
- data/app/assets/stylesheets/geoblacklight/modules/home.scss +2 -17
- data/app/assets/stylesheets/geoblacklight/modules/icon-customization.scss +48 -23
- data/app/assets/stylesheets/geoblacklight/modules/index_maps.scss +1 -15
- data/app/assets/stylesheets/geoblacklight/modules/item.scss +13 -11
- data/app/assets/stylesheets/geoblacklight/modules/layer_opacity.scss +3 -3
- data/app/assets/stylesheets/geoblacklight/modules/leaflet.scss +4 -0
- data/app/assets/stylesheets/geoblacklight/modules/modal.scss +0 -15
- data/app/assets/stylesheets/geoblacklight/modules/results.scss +14 -19
- data/app/assets/stylesheets/geoblacklight/modules/sidebar.scss +2 -2
- data/app/components/blacklight/icons/american_geographical_society_library_uwm_libraries_component.rb +46 -0
- data/app/components/blacklight/icons/arizona_component.rb +24 -0
- data/app/components/blacklight/icons/arrow_circle_down_component.rb +23 -0
- data/app/components/blacklight/icons/baruch_cuny_component.rb +23 -0
- data/app/components/blacklight/icons/book_component.rb +23 -0
- data/app/components/blacklight/icons/bookmark_component.rb +23 -0
- data/app/components/blacklight/icons/cd_rom_component.rb +23 -0
- data/app/components/blacklight/icons/child_item_component.rb +23 -0
- data/app/components/blacklight/icons/circle_info_solid_component.rb +23 -0
- data/app/components/blacklight/icons/citation_component.rb +23 -0
- data/app/components/blacklight/icons/collection_component.rb +23 -0
- data/app/components/blacklight/icons/collections_component.rb +24 -0
- data/app/components/blacklight/icons/columbia_component.rb +23 -0
- data/app/components/blacklight/icons/cornell_component.rb +25 -0
- data/app/components/blacklight/icons/datasets_component.rb +27 -0
- data/app/components/blacklight/icons/dvd_rom_component.rb +23 -0
- data/app/components/blacklight/icons/email_component.rb +23 -0
- data/app/components/blacklight/icons/esri_globe_component.rb +51 -0
- data/app/components/blacklight/icons/fire_solid_component.rb +23 -0
- data/app/components/blacklight/icons/george_mason_component.rb +24 -0
- data/app/components/blacklight/icons/globe_component.rb +23 -0
- data/app/components/blacklight/icons/harvard_component.rb +23 -0
- data/app/components/blacklight/icons/home_component.rb +23 -0
- data/app/components/blacklight/icons/iiif_drag_drop_component.rb +31 -0
- data/app/components/blacklight/icons/image_component.rb +23 -0
- data/app/components/blacklight/icons/imagery_component.rb +24 -0
- data/app/components/blacklight/icons/indiana_component.rb +23 -0
- data/app/components/blacklight/icons/leaf_component.rb +23 -0
- data/app/components/blacklight/icons/lewis_clark_component.rb +25 -0
- data/app/components/blacklight/icons/lightbulb_solid_component.rb +23 -0
- data/app/components/blacklight/icons/line_component.rb +24 -0
- data/app/components/blacklight/icons/map_component.rb +23 -0
- data/app/components/blacklight/icons/map_marker_component.rb +23 -0
- data/app/components/blacklight/icons/maps_component.rb +24 -0
- data/app/components/blacklight/icons/massgis_component.rb +23 -0
- data/app/components/blacklight/icons/metadata_component.rb +23 -0
- data/app/components/blacklight/icons/michigan_state_university_component.rb +25 -0
- data/app/components/blacklight/icons/mit_component.rb +23 -0
- data/app/components/blacklight/icons/mixed_component.rb +25 -0
- data/app/components/blacklight/icons/multilinestring_component.rb +26 -0
- data/app/components/blacklight/icons/multipoint_component.rb +23 -0
- data/app/components/blacklight/icons/multipolygon_component.rb +26 -0
- data/app/components/blacklight/icons/northwestern_university_component.rb +24 -0
- data/app/components/blacklight/icons/nyu_component.rb +26 -0
- data/app/components/blacklight/icons/pagelines_brands_component.rb +23 -0
- data/app/components/blacklight/icons/paper_map_component.rb +23 -0
- data/app/components/blacklight/icons/parent_item_component.rb +23 -0
- data/app/components/blacklight/icons/pennsylvania_state_university_component.rb +25 -0
- data/app/components/blacklight/icons/point_component.rb +23 -0
- data/app/components/blacklight/icons/polygon_component.rb +24 -0
- data/app/components/blacklight/icons/polyline_component.rb +26 -0
- data/app/components/blacklight/icons/princeton_component.rb +23 -0
- data/app/components/blacklight/icons/public_component.rb +23 -0
- data/app/components/blacklight/icons/purdue_university_component.rb +25 -0
- data/app/components/blacklight/icons/raster_component.rb +23 -0
- data/app/components/blacklight/icons/restricted_component.rb +23 -0
- data/app/components/blacklight/icons/rutgers_component.rb +25 -0
- data/app/components/blacklight/icons/sms_component.rb +23 -0
- data/app/components/blacklight/icons/stanford_component.rb +23 -0
- data/app/components/blacklight/icons/table_component.rb +23 -0
- data/app/components/blacklight/icons/tags_component.rb +23 -0
- data/app/components/blacklight/icons/texas_component.rb +23 -0
- data/app/components/blacklight/icons/the_ohio_state_university_component.rb +26 -0
- data/app/components/blacklight/icons/triangle_exclamation_solid_component.rb +23 -0
- data/app/components/blacklight/icons/tufts_component.rb +23 -0
- data/app/components/blacklight/icons/ucla_component.rb +23 -0
- data/app/components/blacklight/icons/university_of_california_berkeley_component.rb +24 -0
- data/app/components/blacklight/icons/university_of_chicago_component.rb +25 -0
- data/app/components/blacklight/icons/university_of_colorado_boulder_component.rb +26 -0
- data/app/components/blacklight/icons/university_of_illinois_urbana_champaign_component.rb +25 -0
- data/app/components/blacklight/icons/university_of_iowa_component.rb +24 -0
- data/app/components/blacklight/icons/university_of_maryland_component.rb +24 -0
- data/app/components/blacklight/icons/university_of_michigan_component.rb +24 -0
- data/app/components/blacklight/icons/university_of_minnesota_component.rb +24 -0
- data/app/components/blacklight/icons/university_of_nebraska_lincoln_component.rb +27 -0
- data/app/components/blacklight/icons/university_of_wisconsin_madison_component.rb +24 -0
- data/app/components/blacklight/icons/uva_component.rb +23 -0
- data/app/components/blacklight/icons/web_services_component.rb +23 -0
- data/app/components/blacklight/icons/websites_component.rb +24 -0
- data/app/components/geoblacklight/arcgis_component.html.erb +3 -0
- data/app/components/geoblacklight/arcgis_component.rb +25 -0
- data/app/components/geoblacklight/attribute_table_component.html.erb +17 -0
- data/app/components/geoblacklight/attribute_table_component.rb +17 -0
- data/app/components/geoblacklight/data_dictionary_download_component.html.erb +3 -0
- data/app/components/geoblacklight/data_dictionary_download_component.rb +16 -0
- data/app/components/geoblacklight/display_note_component.rb +1 -1
- data/app/components/geoblacklight/document/citation_component.html.erb +1 -0
- data/app/components/geoblacklight/document/citation_component.rb +19 -0
- data/app/components/geoblacklight/document/sidebar_component.html.erb +12 -0
- data/app/components/geoblacklight/document/sidebar_component.rb +8 -0
- data/app/components/geoblacklight/document_component.html.erb +43 -0
- data/app/components/geoblacklight/document_component.rb +6 -0
- data/app/components/geoblacklight/download_links_component.html.erb +31 -0
- data/app/components/geoblacklight/download_links_component.rb +80 -0
- data/app/components/geoblacklight/header_component.html.erb +14 -0
- data/app/components/geoblacklight/header_component.rb +9 -0
- data/app/components/geoblacklight/header_icons_component.html.erb +3 -0
- data/app/components/geoblacklight/header_icons_component.rb +29 -0
- data/app/components/geoblacklight/iiif_drag_drop_component.html.erb +3 -0
- data/app/components/geoblacklight/iiif_drag_drop_component.rb +16 -0
- data/app/components/geoblacklight/index_map_inspect_component.rb +15 -0
- data/app/components/geoblacklight/index_map_legend_component.html.erb +14 -0
- data/app/components/geoblacklight/index_map_legend_component.rb +17 -0
- data/app/components/geoblacklight/item_map_viewer_component.html.erb +1 -0
- data/app/components/geoblacklight/item_map_viewer_component.rb +87 -0
- data/app/components/geoblacklight/location_leaflet_map_component.html.erb +1 -0
- data/app/components/geoblacklight/location_leaflet_map_component.rb +49 -0
- data/app/components/geoblacklight/login_link_component.html.erb +5 -0
- data/app/components/geoblacklight/login_link_component.rb +17 -0
- data/app/components/geoblacklight/relations_component.html.erb +23 -0
- data/app/components/geoblacklight/relations_component.rb +25 -0
- data/app/components/geoblacklight/search_result_component.html.erb +44 -0
- data/app/{presenters/geoblacklight/document_presenter.rb → components/geoblacklight/search_result_component.rb} +9 -6
- data/app/components/geoblacklight/static_map_component.html.erb +9 -0
- data/app/components/geoblacklight/static_map_component.rb +38 -0
- data/app/components/geoblacklight/viewer_help_text_component.html.erb +1 -0
- data/app/components/geoblacklight/viewer_help_text_component.rb +46 -0
- data/app/components/geoblacklight/web_services_component.html.erb +1 -0
- data/app/components/geoblacklight/web_services_component.rb +26 -0
- data/app/{views/catalog/_web_services_default.html.erb → components/geoblacklight/web_services_default_component.html.erb} +3 -5
- data/app/components/geoblacklight/web_services_default_component.rb +11 -0
- data/app/components/geoblacklight/web_services_link_component.html.erb +3 -0
- data/app/components/geoblacklight/web_services_link_component.rb +22 -0
- data/app/{views/catalog/_web_services_wfs.html.erb → components/geoblacklight/web_services_wfs_component.html.erb} +4 -7
- data/app/components/geoblacklight/web_services_wfs_component.rb +12 -0
- data/app/components/geoblacklight/web_services_wms_component.html.erb +10 -0
- data/app/components/geoblacklight/web_services_wms_component.rb +12 -0
- data/app/controllers/download_controller.rb +8 -24
- data/app/helpers/geoblacklight_helper.rb +10 -194
- data/app/javascript/geoblacklight/controllers/clipboard_controller.js +11 -0
- data/app/javascript/geoblacklight/controllers/clover_viewer_controller.js +47 -0
- data/app/javascript/geoblacklight/controllers/downloads_controller.js +56 -0
- data/app/javascript/geoblacklight/controllers/leaflet_viewer_controller.js +220 -0
- data/app/javascript/geoblacklight/controllers/oembed_viewer_controller.js +18 -0
- data/app/javascript/geoblacklight/controllers/openlayers_viewer_controller.js +63 -0
- data/app/javascript/geoblacklight/controllers/search_results_controller.js +50 -0
- data/app/javascript/geoblacklight/core.js +69 -0
- data/app/javascript/geoblacklight/index.js +29 -0
- data/app/javascript/geoblacklight/initializers/metadata_download.js +54 -0
- data/app/javascript/geoblacklight/initializers/popovers.js +11 -0
- data/app/javascript/geoblacklight/initializers/relations.js +40 -0
- data/app/javascript/geoblacklight/initializers/tooltips.js +55 -0
- data/app/javascript/geoblacklight/initializers/truncation.js +45 -0
- data/app/javascript/geoblacklight/leaflet/basemaps.js +74 -0
- data/app/javascript/geoblacklight/leaflet/constants.js +18 -0
- data/app/javascript/geoblacklight/leaflet/controls/geosearch.js +160 -0
- data/app/javascript/geoblacklight/leaflet/controls/layer_opacity.js +120 -0
- data/app/javascript/geoblacklight/leaflet/controls/sleep.js +100 -0
- data/app/javascript/geoblacklight/leaflet/inspection.js +195 -0
- data/app/javascript/geoblacklight/leaflet/layer_index_map.js +120 -0
- data/app/javascript/geoblacklight/leaflet/layer_wmts.js +59 -0
- data/app/javascript/geoblacklight/leaflet/layers.js +153 -0
- data/app/javascript/geoblacklight/leaflet/utils.js +83 -0
- data/app/javascript/geoblacklight/openlayers/basemaps.js +47 -0
- data/app/javascript/geoblacklight/openlayers/layers.js +44 -0
- data/app/models/concerns/geoblacklight/solr_document/citation.rb +20 -8
- data/app/models/concerns/geoblacklight/solr_document.rb +22 -30
- data/app/presenters/geoblacklight/bbox_item_presenter.rb +1 -1
- data/app/views/catalog/_citation.html.erb +16 -33
- data/app/views/catalog/_document_split.html.erb +18 -3
- data/app/views/catalog/_home_text.html.erb +2 -2
- data/app/views/catalog/_metadata.html.erb +1 -1
- data/app/views/catalog/index.html.erb +8 -4
- data/app/views/catalog/metadata/_markup.html.erb +1 -1
- data/app/views/catalog/metadata.html.erb +14 -13
- data/app/views/catalog/web_services.html.erb +19 -28
- data/app/views/relation/index.html.erb +2 -12
- data/app/views/relation/index.json.jbuilder +1 -1
- data/compose.yml +14 -0
- data/config/importmap.rb +20 -0
- data/config/locales/geoblacklight.en.yml +15 -24
- data/geoblacklight.gemspec +8 -7
- data/lib/generators/geoblacklight/assets/importmap_generator.rb +82 -0
- data/lib/generators/geoblacklight/assets/vite_generator.rb +92 -0
- data/lib/generators/geoblacklight/assets_generator.rb +12 -37
- data/lib/generators/geoblacklight/install_generator.rb +11 -49
- data/lib/generators/geoblacklight/templates/assets/_customizations.scss +13 -19
- data/lib/generators/geoblacklight/templates/assets/application.js +17 -0
- data/lib/generators/geoblacklight/templates/assets/application.scss +9 -4
- data/lib/generators/geoblacklight/templates/assets/geoblacklight.scss +11 -0
- data/lib/generators/geoblacklight/templates/base.html.erb +6 -12
- data/lib/generators/geoblacklight/templates/catalog_controller.rb +7 -15
- data/lib/generators/geoblacklight/templates/demo-app/Dockerfile +31 -0
- data/lib/generators/geoblacklight/templates/demo-app/compose.yml +26 -0
- data/lib/generators/geoblacklight/templates/demo-app/start-server.sh +21 -0
- data/lib/generators/geoblacklight/templates/settings.yml +53 -40
- data/lib/generators/geoblacklight/templates/vite.config.ts +22 -7
- data/lib/geoblacklight/bounding_box.rb +16 -0
- data/lib/geoblacklight/constants.rb +0 -1
- data/lib/geoblacklight/download/csv_download.rb +22 -0
- data/lib/geoblacklight/download/geojson_download.rb +1 -1
- data/lib/geoblacklight/download/geotiff_download.rb +1 -1
- data/lib/geoblacklight/download/kmz_download.rb +1 -1
- data/lib/geoblacklight/download/shapefile_download.rb +1 -1
- data/lib/geoblacklight/download.rb +1 -1
- data/lib/geoblacklight/engine.rb +15 -6
- data/lib/geoblacklight/item_viewer.rb +1 -1
- data/lib/geoblacklight/metadata/base.rb +2 -1
- data/lib/geoblacklight/references.rb +27 -8
- data/lib/geoblacklight/routes/downloadable.rb +0 -1
- data/lib/geoblacklight/routes.rb +0 -3
- data/lib/geoblacklight/version.rb +1 -1
- data/lib/geoblacklight/wms_layer/feature_info_response.rb +9 -6
- data/lib/geoblacklight.rb +6 -30
- data/lib/tasks/geoblacklight.rake +24 -60
- data/package.json +24 -17
- data/solr/conf/schema.xml +15 -13
- data/solr/conf/solrconfig.xml +6 -4
- data/spec/components/blacklight/icons/american_geographical_society_library_uwm_libraries_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/arizona_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/arrow_circle_down_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/baruch_cuny_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/book_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/bookmark_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/cd_rom_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/child_item_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/circle_info_solid_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/citation_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/collection_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/collections_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/columbia_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/cornell_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/datasets_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/dvd_rom_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/email_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/esri_globe_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/fire_solid_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/george_mason_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/globe_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/harvard_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/home_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/iiif_drag_drop_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/image_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/imagery_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/indiana_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/leaf_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/lewis_clark_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/lightbulb_solid_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/line_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/map_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/map_marker_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/maps_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/massgis_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/metadata_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/michigan_state_university_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/mit_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/mixed_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/multilinestring_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/multipoint_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/multipolygon_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/northwestern_university_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/nyu_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/pagelines_brands_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/paper_map_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/parent_item_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/pennsylvania_state_university_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/point_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/polygon_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/polyline_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/princeton_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/public_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/purdue_university_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/raster_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/restricted_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/rutgers_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/sms_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/stanford_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/table_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/tags_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/texas_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/the_ohio_state_university_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/triangle_exclamation_solid_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/tufts_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/ucla_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/university_of_california_berkeley_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/university_of_chicago_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/university_of_colorado_boulder_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/university_of_illinois_urbana_champaign_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/university_of_iowa_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/university_of_maryland_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/university_of_michigan_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/university_of_minnesota_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/university_of_nebraska_lincoln_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/university_of_wisconsin_madison_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/uva_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/web_services_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/websites_component_spec.rb +15 -0
- data/spec/components/geoblacklight/arcgis_component_spec.rb +31 -0
- data/spec/components/geoblacklight/attribute_table_component_spec.rb +37 -0
- data/spec/components/geoblacklight/citation_component_spec.rb +37 -0
- data/spec/components/geoblacklight/document_component_spec.rb +92 -0
- data/spec/components/geoblacklight/download_links_component_spec.rb +102 -0
- data/spec/components/geoblacklight/header_icons_component_spec.rb +56 -0
- data/spec/components/geoblacklight/iiif_drag_drop_component_spec.rb +30 -0
- data/spec/components/geoblacklight/index_map_legend_component_spec.rb +42 -0
- data/spec/components/geoblacklight/item_map_viewer_component_spec.rb +36 -0
- data/spec/components/geoblacklight/login_link_component_spec.rb +33 -0
- data/spec/{lib/geoblacklight/document_presenter_spec.rb → components/geoblacklight/search_result_component_spec.rb} +19 -11
- data/spec/components/geoblacklight/static_map_component_spec.rb +22 -0
- data/spec/components/geoblacklight/viewer_help_text_component_spec.rb +28 -0
- data/spec/components/geoblacklight/web_services_component_spec.rb +45 -0
- data/spec/controllers/download_controller_spec.rb +12 -35
- data/spec/features/axe_spec.rb +66 -0
- data/spec/features/bookmarks_spec.rb +1 -1
- data/spec/features/citations_spec.rb +7 -3
- data/spec/features/download_layer_spec.rb +24 -39
- data/spec/features/esri_viewer_spec.rb +1 -1
- data/spec/features/exports_spec.rb +0 -15
- data/spec/features/{full_screen_controll_spec.rb → full_screen_control_spec.rb} +6 -6
- data/spec/features/home_page_spec.rb +12 -7
- data/spec/features/iiif_viewer_spec.rb +1 -1
- data/spec/features/index_map_spec.rb +16 -9
- data/spec/features/{split_view.html.erb_spec.rb → index_view_spec.rb} +15 -13
- data/spec/features/layer_inspection_spec.rb +2 -2
- data/spec/features/layer_preview_spec.rb +1 -1
- data/spec/features/missing_metadata_spec.rb +5 -5
- data/spec/features/oembed_spec.rb +2 -2
- data/spec/features/saved_searches_spec.rb +4 -1
- data/spec/features/search_results_complex_geometry_spec.rb +2 -2
- data/spec/features/search_results_icons_spec.rb +3 -3
- data/spec/features/search_results_map_spec.rb +4 -36
- data/spec/features/search_results_overlap_ratio_spec.rb +1 -1
- data/spec/features/show_page_download_spec.rb +0 -8
- data/spec/features/tilejson_spec.rb +2 -2
- data/spec/features/web_services_modal_spec.rb +57 -39
- data/spec/features/wmts_spec.rb +4 -4
- data/spec/fixtures/solr_documents/README.md +2 -1
- data/spec/fixtures/solr_documents/complex-geom.json +61 -0
- data/spec/fixtures/solr_documents/esri-tiled_map_layer.json +45 -24
- data/spec/fixtures/solr_documents/harvard_raster.json +1 -1
- data/spec/fixtures/solr_documents/multiple-downloads.json +1 -0
- data/spec/helpers/geoblacklight_helper_spec.rb +8 -173
- data/spec/lib/geoblacklight/download/csv_download_spec.rb +21 -0
- data/spec/lib/geoblacklight/reference_spec.rb +17 -19
- data/spec/lib/geoblacklight/references_spec.rb +31 -17
- data/spec/lib/geoblacklight/wms_layer/feature_info_response_spec.rb +8 -6
- data/spec/lib/geoblacklight/wms_layer_spec.rb +14 -0
- data/spec/models/concerns/geoblacklight/solr_document/citation_spec.rb +1 -1
- data/spec/models/concerns/geoblacklight/solr_document_spec.rb +1 -21
- data/spec/spec_helper.rb +3 -28
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +2 -20
- data/template.rb +20 -11
- data/test/leaflet/layers.test.js +17 -0
- data/vite.config.ts +34 -23
- metadata +306 -259
- data/.hound.yml +0 -8
- data/.jshintignore +0 -2
- data/.jshintrc +0 -67
- data/.solr_wrapper +0 -6
- data/app/assets/images/blacklight/american-geographical-society-library-uwm-libraries.svg +0 -26
- data/app/assets/images/blacklight/arizona.svg +0 -4
- data/app/assets/images/blacklight/arrow-circle-down.svg +0 -3
- data/app/assets/images/blacklight/baruch-cuny.svg +0 -3
- data/app/assets/images/blacklight/book.svg +0 -3
- data/app/assets/images/blacklight/bookmark.svg +0 -3
- data/app/assets/images/blacklight/cd-rom.svg +0 -3
- data/app/assets/images/blacklight/chicago.svg +0 -4
- data/app/assets/images/blacklight/child-item.svg +0 -3
- data/app/assets/images/blacklight/circle-info-solid.svg +0 -1
- data/app/assets/images/blacklight/citation.svg +0 -3
- data/app/assets/images/blacklight/collection.svg +0 -3
- data/app/assets/images/blacklight/collections.svg +0 -4
- data/app/assets/images/blacklight/columbia.svg +0 -3
- data/app/assets/images/blacklight/cornell.svg +0 -5
- data/app/assets/images/blacklight/datasets.svg +0 -7
- data/app/assets/images/blacklight/dvd-rom.svg +0 -3
- data/app/assets/images/blacklight/email.svg +0 -3
- data/app/assets/images/blacklight/esri-globe.svg +0 -31
- data/app/assets/images/blacklight/fire-solid.svg +0 -1
- data/app/assets/images/blacklight/geoblacklight-icons.json +0 -3312
- data/app/assets/images/blacklight/george-mason.svg +0 -4
- data/app/assets/images/blacklight/globe.svg +0 -3
- data/app/assets/images/blacklight/harvard.svg +0 -3
- data/app/assets/images/blacklight/home.svg +0 -3
- data/app/assets/images/blacklight/illinois.svg +0 -4
- data/app/assets/images/blacklight/image.svg +0 -3
- data/app/assets/images/blacklight/imagery.svg +0 -4
- data/app/assets/images/blacklight/indiana.svg +0 -3
- data/app/assets/images/blacklight/iowa.svg +0 -3
- data/app/assets/images/blacklight/leaf.svg +0 -3
- data/app/assets/images/blacklight/lewis-clark.svg +0 -5
- data/app/assets/images/blacklight/lightbulb-solid.svg +0 -1
- data/app/assets/images/blacklight/line.svg +0 -4
- data/app/assets/images/blacklight/map-marker.svg +0 -3
- data/app/assets/images/blacklight/map.svg +0 -3
- data/app/assets/images/blacklight/maps.svg +0 -4
- data/app/assets/images/blacklight/maryland.svg +0 -3
- data/app/assets/images/blacklight/massgis.svg +0 -3
- data/app/assets/images/blacklight/metadata.svg +0 -3
- data/app/assets/images/blacklight/michigan-state-university.svg +0 -5
- data/app/assets/images/blacklight/michigan-state.svg +0 -4
- data/app/assets/images/blacklight/michigan.svg +0 -3
- data/app/assets/images/blacklight/minnesota.svg +0 -3
- data/app/assets/images/blacklight/mit.svg +0 -3
- data/app/assets/images/blacklight/mixed.svg +0 -5
- data/app/assets/images/blacklight/multilinestring.svg +0 -6
- data/app/assets/images/blacklight/multipoint.svg +0 -3
- data/app/assets/images/blacklight/multipolygon.svg +0 -6
- data/app/assets/images/blacklight/nebraska.svg +0 -4
- data/app/assets/images/blacklight/northwestern-university.svg +0 -5
- data/app/assets/images/blacklight/nyu.svg +0 -6
- data/app/assets/images/blacklight/ohio-state.svg +0 -5
- data/app/assets/images/blacklight/pagelines-brands.svg +0 -3
- data/app/assets/images/blacklight/paper-map.svg +0 -3
- data/app/assets/images/blacklight/parent-item.svg +0 -3
- data/app/assets/images/blacklight/penn-state.svg +0 -4
- data/app/assets/images/blacklight/pennsylvania-state-university.svg +0 -5
- data/app/assets/images/blacklight/point.svg +0 -3
- data/app/assets/images/blacklight/polygon.svg +0 -4
- data/app/assets/images/blacklight/polyline.svg +0 -6
- data/app/assets/images/blacklight/princeton.svg +0 -3
- data/app/assets/images/blacklight/public.svg +0 -3
- data/app/assets/images/blacklight/purdue-university.svg +0 -5
- data/app/assets/images/blacklight/purdue.svg +0 -4
- data/app/assets/images/blacklight/raster.svg +0 -3
- data/app/assets/images/blacklight/restricted.svg +0 -3
- data/app/assets/images/blacklight/rutgers.svg +0 -5
- data/app/assets/images/blacklight/sms.svg +0 -3
- data/app/assets/images/blacklight/stanford.svg +0 -3
- data/app/assets/images/blacklight/table.svg +0 -3
- data/app/assets/images/blacklight/tags.svg +0 -3
- data/app/assets/images/blacklight/texas.svg +0 -3
- data/app/assets/images/blacklight/the-ohio-state-university.svg +0 -6
- data/app/assets/images/blacklight/triangle-exclamation-solid.svg +0 -1
- data/app/assets/images/blacklight/tufts.svg +0 -3
- data/app/assets/images/blacklight/ucla.svg +0 -3
- data/app/assets/images/blacklight/university-of-california-berkeley.svg +0 -4
- data/app/assets/images/blacklight/university-of-chicago.svg +0 -5
- data/app/assets/images/blacklight/university-of-colorado-boulder.svg +0 -6
- data/app/assets/images/blacklight/university-of-illinois-urbana-champaign.svg +0 -5
- data/app/assets/images/blacklight/university-of-iowa.svg +0 -4
- data/app/assets/images/blacklight/university-of-maryland.svg +0 -4
- data/app/assets/images/blacklight/university-of-michigan.svg +0 -4
- data/app/assets/images/blacklight/university-of-minnesota.svg +0 -4
- data/app/assets/images/blacklight/university-of-nebraska-lincoln.svg +0 -7
- data/app/assets/images/blacklight/university-of-wisconsin-madison.svg +0 -4
- data/app/assets/images/blacklight/uva.svg +0 -3
- data/app/assets/images/blacklight/web_services.svg +0 -3
- data/app/assets/images/blacklight/websites.svg +0 -4
- data/app/assets/images/blacklight/wisconsin.svg +0 -3
- data/app/assets/javascripts/geoblacklight/basemaps.js +0 -85
- data/app/assets/javascripts/geoblacklight/controls/fullscreen.js +0 -8
- data/app/assets/javascripts/geoblacklight/controls/opacity.js +0 -6
- data/app/assets/javascripts/geoblacklight/controls.js +0 -1
- data/app/assets/javascripts/geoblacklight/downloaders/downloader.js +0 -61
- data/app/assets/javascripts/geoblacklight/downloaders/hgl_downloader.js +0 -32
- data/app/assets/javascripts/geoblacklight/downloaders.js +0 -1
- data/app/assets/javascripts/geoblacklight/geoblacklight.js +0 -60
- data/app/assets/javascripts/geoblacklight/modules/bookmarks.js +0 -43
- data/app/assets/javascripts/geoblacklight/modules/download.js +0 -11
- data/app/assets/javascripts/geoblacklight/modules/geosearch.js +0 -133
- data/app/assets/javascripts/geoblacklight/modules/help_text.js +0 -7
- data/app/assets/javascripts/geoblacklight/modules/home.js +0 -16
- data/app/assets/javascripts/geoblacklight/modules/item.js +0 -32
- data/app/assets/javascripts/geoblacklight/modules/layer_opacity.js +0 -68
- data/app/assets/javascripts/geoblacklight/modules/metadata.js +0 -15
- data/app/assets/javascripts/geoblacklight/modules/metadata_download_button.js +0 -58
- data/app/assets/javascripts/geoblacklight/modules/relations.js +0 -14
- data/app/assets/javascripts/geoblacklight/modules/results.js +0 -81
- data/app/assets/javascripts/geoblacklight/modules/svg_tooltips.js +0 -31
- data/app/assets/javascripts/geoblacklight/modules/util.js +0 -48
- data/app/assets/javascripts/geoblacklight/modules.js +0 -1
- data/app/assets/javascripts/geoblacklight/templates/index_map_download.hbs +0 -19
- data/app/assets/javascripts/geoblacklight/templates/index_map_info.hbs +0 -61
- data/app/assets/javascripts/geoblacklight/viewers/cog.js +0 -5
- data/app/assets/javascripts/geoblacklight/viewers/esri/dynamic_map_layer.js +0 -85
- data/app/assets/javascripts/geoblacklight/viewers/esri/feature_layer.js +0 -76
- data/app/assets/javascripts/geoblacklight/viewers/esri/image_map_layer.js +0 -14
- data/app/assets/javascripts/geoblacklight/viewers/esri/tiled_map_layer.js +0 -50
- data/app/assets/javascripts/geoblacklight/viewers/esri.js +0 -78
- data/app/assets/javascripts/geoblacklight/viewers/iiif.js +0 -25
- data/app/assets/javascripts/geoblacklight/viewers/index_map.js +0 -71
- data/app/assets/javascripts/geoblacklight/viewers/map.js +0 -77
- data/app/assets/javascripts/geoblacklight/viewers/oembed.js +0 -13
- data/app/assets/javascripts/geoblacklight/viewers/pmtiles.js +0 -5
- data/app/assets/javascripts/geoblacklight/viewers/tilejson.js +0 -33
- data/app/assets/javascripts/geoblacklight/viewers/tms.js +0 -10
- data/app/assets/javascripts/geoblacklight/viewers/viewer.js +0 -68
- data/app/assets/javascripts/geoblacklight/viewers/wms.js +0 -74
- data/app/assets/javascripts/geoblacklight/viewers/wmts.js +0 -85
- data/app/assets/javascripts/geoblacklight/viewers/xyz.js +0 -10
- data/app/assets/javascripts/geoblacklight/viewers.js +0 -1
- data/app/assets/stylesheets/geoblacklight/modules/facets.scss +0 -5
- data/app/assets/stylesheets/geoblacklight/modules/mixins.scss +0 -5
- data/app/helpers/arcgis_helper.rb +0 -14
- data/app/helpers/blacklight_helper.rb +0 -11
- data/app/helpers/carto_helper.rb +0 -31
- data/app/helpers/geoblacklight/geoblacklight_helper_behavior.rb +0 -18
- data/app/javascript/clover/clover_initializer.js +0 -29
- data/app/javascript/index.js +0 -7
- data/app/javascript/openlayers/basemaps.js +0 -47
- data/app/javascript/openlayers/ol_initializer.js +0 -106
- data/app/javascript/stylesheets/openlayers.css +0 -1
- data/app/models/concerns/geoblacklight/solr_document/carto.rb +0 -17
- data/app/views/catalog/_arcgis.html.erb +0 -4
- data/app/views/catalog/_carto.html.erb +0 -4
- data/app/views/catalog/_data_dictionary.html.erb +0 -5
- data/app/views/catalog/_downloads_collapse.html.erb +0 -27
- data/app/views/catalog/_header_icons.html.erb +0 -3
- data/app/views/catalog/_index_split_default.html.erb +0 -30
- data/app/views/catalog/_results_pagination.html.erb +0 -12
- data/app/views/catalog/_show_default_attribute_table.html.erb +0 -19
- data/app/views/catalog/_show_default_display_note.html.erb +0 -7
- data/app/views/catalog/_show_default_viewer_container.html.erb +0 -28
- data/app/views/catalog/_show_downloads.html.erb +0 -23
- data/app/views/catalog/_show_header_default.html.erb +0 -4
- data/app/views/catalog/_show_sidebar.html.erb +0 -16
- data/app/views/catalog/_show_sidebar_static_map.html.erb +0 -10
- data/app/views/catalog/_show_web_services.html.erb +0 -11
- data/app/views/catalog/_web_services.html.erb +0 -9
- data/app/views/catalog/_web_services_wms.html.erb +0 -13
- data/app/views/download/hgl.html.erb +0 -27
- data/app/views/relation/_relations.html.erb +0 -15
- data/app/views/shared/_header_navbar.html.erb +0 -46
- data/babel.config.json +0 -4
- data/jest.config.js +0 -25
- data/lib/generators/geoblacklight/templates/assets/_blacklight.scss +0 -1
- data/lib/generators/geoblacklight/templates/assets/_geoblacklight.scss +0 -1
- data/lib/generators/geoblacklight/templates/assets/geoblacklight.js +0 -9
- data/lib/generators/geoblacklight/templates/clover.js +0 -5
- data/lib/generators/geoblacklight/templates/ol.js +0 -6
- data/lib/generators/geoblacklight/templates/package-test.json +0 -10
- data/lib/generators/geoblacklight/templates/package.json +0 -10
- data/lib/generators/geoblacklight/templates/settings.gbl_v1.yml +0 -195
- data/lib/geoblacklight/download/hgl_download.rb +0 -20
- data/lib/geoblacklight/view_helper_override.rb +0 -16
- data/setupJest.js +0 -14
- data/spec/helpers/arcgis_helper_spec.rb +0 -16
- data/spec/helpers/carto_helper_spec.rb +0 -13
- data/spec/helpers/geoblacklight/geoblacklight_helper_behavior_spec.rb +0 -27
- data/spec/javascripts/util_spec.js +0 -10
- data/spec/lib/geoblacklight/download/hgl_download_spec.rb +0 -62
- data/spec/lib/geoblacklight/view_helper_override_spec.rb +0 -29
- data/spec/models/concerns/geoblacklight/solr_document/carto_spec.rb +0 -43
- data/spec/test_app_templates/Gemfile.extra +0 -2
- data/spec/views/catalog/_document_split.html.erb_spec.rb +0 -7
- data/spec/views/catalog/_index_split.html.erb_spec.rb +0 -7
- data/spec/views/catalog/_results_pagination.html.erb_spec.rb +0 -11
- data/spec/views/catalog/_show_downloads.html.erb_spec.rb +0 -43
- data/spec/views/catalog/_show_tools.html.erb_spec.rb +0 -38
- data/vendor/assets/images/fullscreen.png +0 -0
- data/vendor/assets/images/fullscreen@2x.png +0 -0
- data/vendor/assets/images/layers-2x.png +0 -0
- data/vendor/assets/images/layers.png +0 -0
- data/vendor/assets/images/marker-icon-2x.png +0 -0
- data/vendor/assets/images/marker-icon.png +0 -0
- data/vendor/assets/images/marker-shadow.png +0 -0
- data/vendor/assets/javascripts/Leaflet.fullscreen.js +0 -152
- data/vendor/assets/javascripts/esri-leaflet.js +0 -12
- data/vendor/assets/javascripts/esri-leaflet.js.map +0 -1
- data/vendor/assets/javascripts/leaflet-iiif.js +0 -323
- data/vendor/assets/javascripts/leaflet-src.js.erb +0 -14126
- data/vendor/assets/javascripts/leaflet-src.js.map +0 -1
- data/vendor/assets/javascripts/native.history.js +0 -1
- data/vendor/assets/stylesheets/leaflet.css +0 -640
- data/vendor/assets/stylesheets/leaflet.fullscreen.css +0 -40
- /data/app/{views/catalog/_show_default_viewer_information.html.erb → components/geoblacklight/index_map_inspect_component.html.erb} +0 -0
@@ -0,0 +1,50 @@
|
|
1
|
+
import { Controller } from "@hotwired/stimulus";
|
2
|
+
import { geoJSONToBounds } from "geoblacklight/leaflet/utils";
|
3
|
+
import { DEFAULT_BOUNDS } from "geoblacklight/leaflet/constants";
|
4
|
+
|
5
|
+
export default class SearchResultsController extends Controller {
|
6
|
+
static targets = ["result"];
|
7
|
+
static outlets = ["leaflet-viewer"];
|
8
|
+
|
9
|
+
// Fit the map to the combined bounding box of all search results
|
10
|
+
// If a bounding box query is already active, do not override it
|
11
|
+
fitResultBounds() {
|
12
|
+
if (new URL(window.location).searchParams.get("bbox")) return;
|
13
|
+
this.leafletViewerOutlet.fitBounds(this.getMaximalBounds());
|
14
|
+
}
|
15
|
+
|
16
|
+
// Get the bounding box of a search result from its data attributes
|
17
|
+
getResultBounds(resultElement) {
|
18
|
+
const geomElement = resultElement.querySelector("[data-geom]");
|
19
|
+
if (geomElement && geomElement.dataset.geom) {
|
20
|
+
return geoJSONToBounds(JSON.parse(geomElement.dataset.geom));
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
// Find the combined bounding box of all search results
|
25
|
+
getMaximalBounds() {
|
26
|
+
const bounds = this.resultTargets.map(this.getResultBounds);
|
27
|
+
const nonNullBounds = bounds.filter((b) => b);
|
28
|
+
|
29
|
+
if (nonNullBounds.length > 0) {
|
30
|
+
return nonNullBounds.reduce((max, b) => max.extend(b));
|
31
|
+
}
|
32
|
+
|
33
|
+
return DEFAULT_BOUNDS;
|
34
|
+
}
|
35
|
+
|
36
|
+
// Preview the selected search result's bounding box on the map
|
37
|
+
previewResultOnMap(event) {
|
38
|
+
const geomElement = event.target.querySelector("[data-geom]");
|
39
|
+
if (geomElement && geomElement.dataset.geom !== "") {
|
40
|
+
const geom = JSON.parse(geomElement.dataset.geom);
|
41
|
+
const bbox = geoJSONToBounds(geom);
|
42
|
+
this.leafletViewerOutlet.addBoundsOverlay(bbox);
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
// Remove the previewed bounding box
|
47
|
+
clearPreview() {
|
48
|
+
this.leafletViewerOutlet.removeBoundsOverlay();
|
49
|
+
}
|
50
|
+
}
|
@@ -0,0 +1,69 @@
|
|
1
|
+
// Initializers
|
2
|
+
import initializePopovers from "geoblacklight/initializers/popovers";
|
3
|
+
import initializeRelations from "geoblacklight/initializers/relations";
|
4
|
+
import initializeTooltips from "geoblacklight/initializers/tooltips";
|
5
|
+
import initializeTruncation from "geoblacklight/initializers/truncation";
|
6
|
+
import initializeMetadataDownload from "geoblacklight/initializers/metadata_download";
|
7
|
+
|
8
|
+
// Stimulus controllers
|
9
|
+
import ClipboardController from "geoblacklight/controllers/clipboard_controller";
|
10
|
+
import CloverViewerController from "geoblacklight/controllers/clover_viewer_controller";
|
11
|
+
import DownloadsController from "geoblacklight/controllers/downloads_controller";
|
12
|
+
import LeafletViewerController from "geoblacklight/controllers/leaflet_viewer_controller";
|
13
|
+
import OembedViewerController from "geoblacklight/controllers/oembed_viewer_controller";
|
14
|
+
import OpenlayersViewerController from "geoblacklight/controllers/openlayers_viewer_controller";
|
15
|
+
import SearchResultsController from "geoblacklight/controllers/search_results_controller";
|
16
|
+
|
17
|
+
// Inspired by Blacklight's javascript/blacklight/core.js
|
18
|
+
const Geoblacklight = (function () {
|
19
|
+
const callbacks = [];
|
20
|
+
return {
|
21
|
+
// Hook: pass a callback to add it to the activation stack
|
22
|
+
onLoad: function (callback) {
|
23
|
+
callbacks.push(callback);
|
24
|
+
},
|
25
|
+
|
26
|
+
// Activate all stored callbacks
|
27
|
+
activate: function (event) {
|
28
|
+
callbacks.forEach((callback) => {
|
29
|
+
callback(event);
|
30
|
+
});
|
31
|
+
},
|
32
|
+
|
33
|
+
// Define hooks that will trigger the activation of the Geoblacklight JS
|
34
|
+
listeners: function () {
|
35
|
+
if (typeof Turbo !== "undefined")
|
36
|
+
return ["turbo:load", "turbo:frame-load"];
|
37
|
+
else return ["DOMContentLoaded"];
|
38
|
+
},
|
39
|
+
};
|
40
|
+
})();
|
41
|
+
|
42
|
+
// Add event listeners that call activate() for each event type
|
43
|
+
Geoblacklight.listeners().forEach((listener) =>
|
44
|
+
document.addEventListener(listener, (event) => Geoblacklight.activate(event))
|
45
|
+
);
|
46
|
+
|
47
|
+
// Register our initializers
|
48
|
+
Geoblacklight.onLoad(initializePopovers);
|
49
|
+
Geoblacklight.onLoad(initializeRelations);
|
50
|
+
Geoblacklight.onLoad(initializeTooltips);
|
51
|
+
Geoblacklight.onLoad(initializeTruncation);
|
52
|
+
Geoblacklight.onLoad(initializeMetadataDownload);
|
53
|
+
|
54
|
+
// Register our Stimulus controllers
|
55
|
+
if (typeof Stimulus !== "undefined") {
|
56
|
+
Stimulus.register("openlayers-viewer", OpenlayersViewerController);
|
57
|
+
Stimulus.register("clover-viewer", CloverViewerController);
|
58
|
+
Stimulus.register("oembed-viewer", OembedViewerController);
|
59
|
+
Stimulus.register("leaflet-viewer", LeafletViewerController);
|
60
|
+
Stimulus.register("search-results", SearchResultsController);
|
61
|
+
Stimulus.register("downloads", DownloadsController);
|
62
|
+
Stimulus.register("clipboard", ClipboardController);
|
63
|
+
} else {
|
64
|
+
console.error(
|
65
|
+
"Couldn't find Stimulus. Check installation instructions at https://github.com/hotwired/stimulus-rails."
|
66
|
+
);
|
67
|
+
}
|
68
|
+
|
69
|
+
export default Geoblacklight;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
// Stimulus controllers
|
2
|
+
import OpenlayersViewerController from "geoblacklight/controllers/openlayers_viewer_controller";
|
3
|
+
import CloverViewerController from "geoblacklight/controllers/clover_viewer_controller";
|
4
|
+
import OembedViewerController from "geoblacklight/controllers/oembed_viewer_controller";
|
5
|
+
import LeafletViewerController from "geoblacklight/controllers/leaflet_viewer_controller";
|
6
|
+
import SearchResultsController from "geoblacklight/controllers/search_results_controller";
|
7
|
+
import DownloadsController from "geoblacklight/controllers/downloads_controller";
|
8
|
+
import ClipboardController from "geoblacklight/controllers/clipboard_controller";
|
9
|
+
|
10
|
+
// GBL core
|
11
|
+
import Core from "geoblacklight/core";
|
12
|
+
|
13
|
+
// Other modules
|
14
|
+
import openLayersBasemaps from "geoblacklight/openlayers/basemaps";
|
15
|
+
import leafletBasemaps from "geoblacklight/leaflet/basemaps";
|
16
|
+
|
17
|
+
export default {
|
18
|
+
OpenlayersViewerController,
|
19
|
+
CloverViewerController,
|
20
|
+
OembedViewerController,
|
21
|
+
LeafletViewerController,
|
22
|
+
SearchResultsController,
|
23
|
+
DownloadsController,
|
24
|
+
ClipboardController,
|
25
|
+
openLayersBasemaps,
|
26
|
+
leafletBasemaps,
|
27
|
+
Core,
|
28
|
+
onLoad: Core.onLoad,
|
29
|
+
};
|
@@ -0,0 +1,54 @@
|
|
1
|
+
export class GeoBlacklightMetadataDownloadButton {
|
2
|
+
constructor(el, i, options = {}) {
|
3
|
+
this.options = options;
|
4
|
+
this.el = typeof el === "string" ? document.querySelector(el) : el;
|
5
|
+
this.download = document.querySelector(
|
6
|
+
this.options.target || this.el.getAttribute("data-ref-download")
|
7
|
+
);
|
8
|
+
// On initialization only do this for the first one.
|
9
|
+
if (i === 0) {
|
10
|
+
this.setRefUrl();
|
11
|
+
}
|
12
|
+
this.configureHandler();
|
13
|
+
}
|
14
|
+
|
15
|
+
configureHandler() {
|
16
|
+
this.el.addEventListener("click", () => this.setRefUrl());
|
17
|
+
}
|
18
|
+
|
19
|
+
setRefUrl() {
|
20
|
+
const refUrl = this.el.getAttribute("data-ref-endpoint");
|
21
|
+
if (!refUrl) {
|
22
|
+
this.download.style.display = "none";
|
23
|
+
} else {
|
24
|
+
this.download.style.display = "";
|
25
|
+
this.download.setAttribute("href", refUrl);
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
export default function initializeMetadataDownload() {
|
31
|
+
const modal = document.getElementById("blacklight-modal");
|
32
|
+
|
33
|
+
modal.addEventListener("focus", (e) => {
|
34
|
+
if (!Array.from(e.target.classList).includes('show')){
|
35
|
+
return;
|
36
|
+
}
|
37
|
+
e.target.querySelectorAll(".metadata-body").forEach((el) => {
|
38
|
+
el.closest(".modal-content").classList.add("metadata-modal");
|
39
|
+
});
|
40
|
+
|
41
|
+
e.target.querySelectorAll(".pill-metadata").forEach((element, i) => {
|
42
|
+
new GeoBlacklightMetadataDownloadButton(element, i);
|
43
|
+
});
|
44
|
+
});
|
45
|
+
|
46
|
+
modal.addEventListener("blur", (e) => {
|
47
|
+
if (Array.from(e.target.classList).includes('show')){
|
48
|
+
return;
|
49
|
+
}
|
50
|
+
e.target.querySelectorAll(".metadata-body").forEach((el) => {
|
51
|
+
el.closest(".modal-content").classList.remove("metadata-modal");
|
52
|
+
});
|
53
|
+
});
|
54
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { Popover } from 'bootstrap';
|
2
|
+
|
3
|
+
// Initialize popovers
|
4
|
+
export default function initializePopovers() {
|
5
|
+
const popoverElements = document.querySelectorAll('[data-bs-toggle="popover"]'); // Bootstrap 5 uses 'data-bs-toggle'
|
6
|
+
popoverElements.forEach((element) => {
|
7
|
+
const popover = new Popover(element, {
|
8
|
+
trigger: "hover",
|
9
|
+
});
|
10
|
+
});
|
11
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
const fadeIn = (element, duration) => {
|
2
|
+
element.style.opacity = 0;
|
3
|
+
element.style.display = "block";
|
4
|
+
|
5
|
+
let start = null;
|
6
|
+
function step(timestamp) {
|
7
|
+
if (!start) start = timestamp;
|
8
|
+
const progress = timestamp - start;
|
9
|
+
element.style.opacity = Math.min(progress / duration, 1);
|
10
|
+
if (progress < duration) {
|
11
|
+
window.requestAnimationFrame(step);
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
window.requestAnimationFrame(step);
|
16
|
+
};
|
17
|
+
|
18
|
+
// Set up the relations widgets by querying the relations endpoint
|
19
|
+
export default function initializeRelations() {
|
20
|
+
document.querySelectorAll('[data-relations="true"]').forEach((element) => {
|
21
|
+
const attributes = element.dataset;
|
22
|
+
const relationUrl = `${attributes.url}/relations`;
|
23
|
+
|
24
|
+
fetch(relationUrl, { headers: { "X-Requested-With": "XMLHttpRequest" } })
|
25
|
+
.then((response) => {
|
26
|
+
if (!response.ok) {
|
27
|
+
throw new Error("Network response was not ok");
|
28
|
+
}
|
29
|
+
return response.text();
|
30
|
+
})
|
31
|
+
.then((data) => {
|
32
|
+
const div = document.createElement("div");
|
33
|
+
div.innerHTML = data;
|
34
|
+
element.appendChild(div);
|
35
|
+
div.style.display = "none";
|
36
|
+
fadeIn(div, 200);
|
37
|
+
})
|
38
|
+
.catch((error) => console.error("Error:", error));
|
39
|
+
});
|
40
|
+
}
|
@@ -0,0 +1,55 @@
|
|
1
|
+
import { Tooltip } from "bootstrap";
|
2
|
+
|
3
|
+
export default function initializeTooltips() {
|
4
|
+
document.body.addEventListener(
|
5
|
+
"mouseenter",
|
6
|
+
(event) => {
|
7
|
+
if (event.target.closest(".blacklight-icons.svg_tooltip svg")) {
|
8
|
+
const svgElement = event.target.closest(
|
9
|
+
".blacklight-icons.svg_tooltip svg"
|
10
|
+
);
|
11
|
+
const svgTitleElement = svgElement.querySelector("title");
|
12
|
+
const titleText = svgTitleElement ? svgTitleElement.textContent : "";
|
13
|
+
|
14
|
+
if (titleText !== undefined && titleText !== "") {
|
15
|
+
// Initialize Bootstrap tooltip with native JavaScript
|
16
|
+
const tooltip = new Tooltip(svgElement, {
|
17
|
+
placement: "bottom",
|
18
|
+
title: titleText,
|
19
|
+
});
|
20
|
+
tooltip.show();
|
21
|
+
|
22
|
+
// Store the original title in the data-original-title attribute
|
23
|
+
// and remove the title element to prevent it from interfering with Bootstrap's tooltip.
|
24
|
+
svgElement.setAttribute("data-original-title", titleText);
|
25
|
+
svgTitleElement.remove();
|
26
|
+
}
|
27
|
+
}
|
28
|
+
},
|
29
|
+
true
|
30
|
+
); // Use capture to ensure the event is caught as it bubbles up
|
31
|
+
|
32
|
+
document.body.addEventListener(
|
33
|
+
"mouseleave",
|
34
|
+
(event) => {
|
35
|
+
if (event.target.closest(".blacklight-icons.svg_tooltip svg")) {
|
36
|
+
const svgElement = event.target.closest(
|
37
|
+
".blacklight-icons.svg_tooltip svg"
|
38
|
+
);
|
39
|
+
const originalTitle = svgElement.getAttribute("data-original-title");
|
40
|
+
|
41
|
+
if (originalTitle !== undefined && originalTitle !== "") {
|
42
|
+
// Restore the SVG title element from data-original-title
|
43
|
+
const newTitleElement = document.createElement("title");
|
44
|
+
newTitleElement.textContent = originalTitle;
|
45
|
+
svgElement.prepend(newTitleElement);
|
46
|
+
svgElement.setAttribute("data-original-title", "");
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
// Remove tooltips
|
51
|
+
document.querySelectorAll(".tooltip").forEach((elem) => elem.remove());
|
52
|
+
},
|
53
|
+
true
|
54
|
+
); // Use capture to ensure the event is caught as it bubbles up
|
55
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
// Truncate and expand/collapse abstracts (descriptions) on show page
|
2
|
+
|
3
|
+
// Class that handles adding a button to expand/collapse a description
|
4
|
+
// Uses bootstrap's built-in collapse functionality; CSS is used to do the truncation
|
5
|
+
class Truncator {
|
6
|
+
constructor(element, { lines, id }) {
|
7
|
+
// if the element is already small enough, don't truncate it
|
8
|
+
const minHeight = lines * parseFloat(window.getComputedStyle(element).fontSize);
|
9
|
+
if (element.getBoundingClientRect().height < minHeight) return;
|
10
|
+
|
11
|
+
// set a unique ID for the element if it doesn't have one
|
12
|
+
this.element = element;
|
13
|
+
this.element.id ||= id;
|
14
|
+
|
15
|
+
// add the button
|
16
|
+
this.button = document.createElement("button");
|
17
|
+
this.button.classList.add("btn", "btn-link", "p-0", "border-0");
|
18
|
+
this.button.dataset.bsToggle = "collapse";
|
19
|
+
this.button.dataset.bsTarget = `#${this.element.id}`;
|
20
|
+
this.button.setAttribute("aria-expanded", "false");
|
21
|
+
this.button.setAttribute("aria-controls", this.element.id);
|
22
|
+
this.button.textContent = "Read more";
|
23
|
+
this.button.addEventListener("click", this.toggle.bind(this));
|
24
|
+
element.parentNode.insertBefore(this.button, element.nextSibling);
|
25
|
+
|
26
|
+
// start collapsed
|
27
|
+
this.element.classList.add("collapse");
|
28
|
+
}
|
29
|
+
|
30
|
+
toggle() {
|
31
|
+
if (this.button.textContent == "Read more") this.button.textContent = "Close";
|
32
|
+
else this.button.textContent = "Read more";
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
// Initialize truncation for all elements with class "truncate-abstract"
|
37
|
+
// Ensure they have unique IDs because bootstrap requires this
|
38
|
+
export default function initializeTruncation() {
|
39
|
+
document.querySelectorAll(".truncate-abstract").forEach((element, i) => {
|
40
|
+
new Truncator(element, {
|
41
|
+
lines: 12,
|
42
|
+
id: `truncate-${i}`,
|
43
|
+
});
|
44
|
+
});
|
45
|
+
}
|
@@ -0,0 +1,74 @@
|
|
1
|
+
export default {
|
2
|
+
darkMatter: {
|
3
|
+
url: "https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{retina}.png",
|
4
|
+
attribution:
|
5
|
+
'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://carto.com/attributions">Carto</a>',
|
6
|
+
maxZoom: 18,
|
7
|
+
worldCopyJump: true,
|
8
|
+
retina: "@2x",
|
9
|
+
},
|
10
|
+
positron: {
|
11
|
+
url: "https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{retina}.png",
|
12
|
+
attribution:
|
13
|
+
'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://carto.com/attributions">Carto</a>',
|
14
|
+
maxZoom: 18,
|
15
|
+
worldCopyJump: true,
|
16
|
+
retina: "@2x",
|
17
|
+
},
|
18
|
+
positronLite: {
|
19
|
+
url: "https://{s}.basemaps.cartocdn.com/light_nolabels/{z}/{x}/{y}{retina}.png",
|
20
|
+
attribution:
|
21
|
+
'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://carto.com/attributions">Carto</a>',
|
22
|
+
maxZoom: 18,
|
23
|
+
worldCopyJump: true,
|
24
|
+
retina: "@2x",
|
25
|
+
},
|
26
|
+
worldAntique: {
|
27
|
+
url: "https://cartocdn_{s}.global.ssl.fastly.net/base-antique/{z}/{x}/{y}{retina}.png",
|
28
|
+
attribution:
|
29
|
+
'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://carto.com/attributions">Carto</a>',
|
30
|
+
maxZoom: 18,
|
31
|
+
worldCopyJump: true,
|
32
|
+
retina: "@2x",
|
33
|
+
},
|
34
|
+
worldEco: {
|
35
|
+
url: "https://cartocdn_{s}.global.ssl.fastly.net/base-eco/{z}/{x}/{y}{retina}.png",
|
36
|
+
attribution:
|
37
|
+
'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://carto.com/attributions">Carto</a>',
|
38
|
+
maxZoom: 18,
|
39
|
+
worldCopyJump: true,
|
40
|
+
retina: "@2x",
|
41
|
+
},
|
42
|
+
flatBlue: {
|
43
|
+
url: "https://cartocdn_{s}.global.ssl.fastly.net/base-flatblue/{z}/{x}/{y}{retina}.png",
|
44
|
+
attribution:
|
45
|
+
'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://carto.com/attributions">Carto</a>',
|
46
|
+
maxZoom: 18,
|
47
|
+
worldCopyJump: true,
|
48
|
+
retina: "@2x",
|
49
|
+
},
|
50
|
+
midnightCommander: {
|
51
|
+
url: "https://cartocdn_{s}.global.ssl.fastly.net/base-midnight/{z}/{x}/{y}{retina}.png",
|
52
|
+
attribution:
|
53
|
+
'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://carto.com/attributions">Carto</a>',
|
54
|
+
maxZoom: 18,
|
55
|
+
worldCopyJump: true,
|
56
|
+
retina: "@2x",
|
57
|
+
},
|
58
|
+
openstreetmapHot: {
|
59
|
+
url: "https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png",
|
60
|
+
attribution:
|
61
|
+
'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>, Tiles courtesy of <a href="http://hot.openstreetmap.org/" target="_blank">Humanitarian OpenStreetMap Team</a>',
|
62
|
+
maxZoom: 19,
|
63
|
+
worldCopyJump: true,
|
64
|
+
retina: "@2x",
|
65
|
+
},
|
66
|
+
openstreetmapStandard: {
|
67
|
+
url: "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
|
68
|
+
attribution:
|
69
|
+
'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
70
|
+
maxZoom: 19,
|
71
|
+
worldCopyJump: true,
|
72
|
+
retina: "@2x",
|
73
|
+
},
|
74
|
+
};
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { LatLngBounds } from "leaflet";
|
2
|
+
|
3
|
+
export const DEFAULT_BOUNDS = new LatLngBounds([
|
4
|
+
[-30, -100],
|
5
|
+
[30, 100],
|
6
|
+
]);
|
7
|
+
|
8
|
+
export const DEFAULT_OPACITY = 0.75;
|
9
|
+
|
10
|
+
export const DEFAULT_BASEMAP = "positron";
|
11
|
+
|
12
|
+
export const DEFAULT_GEOM_OVERLAY_OPTIONS = {
|
13
|
+
color: '#3388ff',
|
14
|
+
dashArray: "5 5",
|
15
|
+
weight: 2,
|
16
|
+
opacity: 1,
|
17
|
+
fillOpacity: 0
|
18
|
+
}
|
@@ -0,0 +1,160 @@
|
|
1
|
+
import { DomUtil, Control, Handler, setOptions } from "leaflet";
|
2
|
+
import { debounce, boundsToBbox } from "geoblacklight/leaflet/utils";
|
3
|
+
|
4
|
+
export const geosearchDefaultOptions = {
|
5
|
+
dynamic: true,
|
6
|
+
delay: 800,
|
7
|
+
};
|
8
|
+
|
9
|
+
export default class GeoSearchControl extends Control {
|
10
|
+
constructor(options) {
|
11
|
+
const _options = { ...geosearchDefaultOptions, ...options };
|
12
|
+
super(_options);
|
13
|
+
setOptions(this, _options);
|
14
|
+
}
|
15
|
+
|
16
|
+
onAdd(map) {
|
17
|
+
this.map = map;
|
18
|
+
this.map.options.geoSearchControl = this;
|
19
|
+
|
20
|
+
// Create the buttons
|
21
|
+
this.staticButton = this.createStaticButton();
|
22
|
+
this.dynamicButton = this.createDynamicButton();
|
23
|
+
|
24
|
+
// Add the buttons to the viewer
|
25
|
+
const container = DomUtil.create("div");
|
26
|
+
container.className = "leaflet-control search-control";
|
27
|
+
container.appendChild(this.staticButton);
|
28
|
+
container.appendChild(this.dynamicButton);
|
29
|
+
|
30
|
+
// Show the appropriate button
|
31
|
+
if (this.options.dynamic) this.dynamicButton.style.display = "block";
|
32
|
+
else this.staticButton.style.display = "block";
|
33
|
+
|
34
|
+
// Set up the dynamic search function with debounce
|
35
|
+
this.dynamicSearcher = debounce(() => {
|
36
|
+
if (this.options.dynamic) {
|
37
|
+
this.applySearch();
|
38
|
+
}
|
39
|
+
}, this.options.delay);
|
40
|
+
|
41
|
+
// Add the event handler
|
42
|
+
this.map.addHandler("geosearch", GeoSearchHandler);
|
43
|
+
|
44
|
+
return container;
|
45
|
+
}
|
46
|
+
|
47
|
+
// Button to search when clicked; contains an icon
|
48
|
+
createStaticButton() {
|
49
|
+
const staticButtonNode = DomUtil.create("a");
|
50
|
+
staticButtonNode.setAttribute("id", "gbl-static-button");
|
51
|
+
staticButtonNode.setAttribute("href", "#");
|
52
|
+
staticButtonNode.setAttribute("style", "display:none;");
|
53
|
+
staticButtonNode.className = "btn btn-primary";
|
54
|
+
staticButtonNode.textContent = "Search here";
|
55
|
+
staticButtonNode.addEventListener("click", this.staticSearch.bind(this));
|
56
|
+
return staticButtonNode;
|
57
|
+
}
|
58
|
+
|
59
|
+
// Button to search when the map is moved; contains a checkbox
|
60
|
+
createDynamicButton() {
|
61
|
+
const dynamicButtonNode = DomUtil.create("label");
|
62
|
+
dynamicButtonNode.setAttribute("id", "gbl-dynamic-button");
|
63
|
+
dynamicButtonNode.textContent = " Search when I move the map";
|
64
|
+
dynamicButtonNode.setAttribute("style", "display:none;");
|
65
|
+
const input = DomUtil.create("input");
|
66
|
+
input.setAttribute("type", "checkbox");
|
67
|
+
input.checked = true;
|
68
|
+
dynamicButtonNode.insertBefore(input, dynamicButtonNode.firstChild);
|
69
|
+
dynamicButtonNode.addEventListener(
|
70
|
+
"input",
|
71
|
+
this.toggleDynamicSearch.bind(this)
|
72
|
+
);
|
73
|
+
return dynamicButtonNode;
|
74
|
+
}
|
75
|
+
|
76
|
+
// Hide the static button, show the dynamic button, and apply the search
|
77
|
+
staticSearch() {
|
78
|
+
this.staticButton.style.display = "none";
|
79
|
+
if (this.options.dynamic) {
|
80
|
+
this.dynamicButton.style.display = "block";
|
81
|
+
}
|
82
|
+
// Do full page reload for staticSearch button
|
83
|
+
this.applySearch({ turbo: false });
|
84
|
+
}
|
85
|
+
|
86
|
+
// Update the URL with the current bounding box and go back to page 1
|
87
|
+
applySearch(opts={turbo: true}) {
|
88
|
+
// Delete any existing page and bbox parameters
|
89
|
+
const params = new URL(window.location).searchParams;
|
90
|
+
params.delete("page");
|
91
|
+
params.delete("bbox");
|
92
|
+
|
93
|
+
// Calculate the bounding box from the current map bounds
|
94
|
+
const bbox = boundsToBbox(this._map.getBounds());
|
95
|
+
params.set("bbox", bbox.join(" "));
|
96
|
+
|
97
|
+
// Make the new target URL using the configured base URL
|
98
|
+
const newUrl = new URL(this.options.baseUrl)
|
99
|
+
newUrl.search = params.toString()
|
100
|
+
|
101
|
+
// If Turbo Drive is active, do the new page navigation without a full page reload
|
102
|
+
if (window.Turbo && opts.turbo) window.Turbo.visit(newUrl);
|
103
|
+
|
104
|
+
// Otherwise fall back to the traditional full page reload
|
105
|
+
else window.location.href = newUrl;
|
106
|
+
}
|
107
|
+
|
108
|
+
// Toggle the dynamic search option
|
109
|
+
toggleDynamicSearch() {
|
110
|
+
this.options.dynamic = !this.options.dynamic;
|
111
|
+
}
|
112
|
+
|
113
|
+
// Hide the dynamic button and show the static button
|
114
|
+
hideDynamicButton() {
|
115
|
+
this.dynamicButton.style.display = "none";
|
116
|
+
this.staticButton.style.display = "block";
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
120
|
+
class GeoSearchHandler extends Handler {
|
121
|
+
constructor(map) {
|
122
|
+
super(map);
|
123
|
+
this.map = map;
|
124
|
+
this.control = map.options.geoSearchControl;
|
125
|
+
this.wasResized = false;
|
126
|
+
}
|
127
|
+
|
128
|
+
// Bind event handlers to the map
|
129
|
+
addHooks() {
|
130
|
+
this.map.on("resize", this.handleResize.bind(this));
|
131
|
+
this.map.on("dragend", this.handleDragEnd.bind(this));
|
132
|
+
this.map.on("dragstart", this.handleDragStart.bind(this));
|
133
|
+
this.map.on("zoomstart", this.handleDragEnd.bind(this));
|
134
|
+
this.map.on("zoomend", this.handleDragStart.bind(this));
|
135
|
+
}
|
136
|
+
|
137
|
+
// Remove event handlers from the map
|
138
|
+
removeHooks() {
|
139
|
+
this.map.off("resize");
|
140
|
+
this.map.off("dragend");
|
141
|
+
this.map.off("dragstart");
|
142
|
+
this.map.off("zoomend");
|
143
|
+
this.map.off("zoomstart");
|
144
|
+
}
|
145
|
+
|
146
|
+
handleResize() {
|
147
|
+
this.wasResized = true;
|
148
|
+
}
|
149
|
+
|
150
|
+
handleDragEnd() {
|
151
|
+
if (this.wasResized) this.wasResized = false;
|
152
|
+
else this.control.dynamicSearcher.apply(this.control);
|
153
|
+
}
|
154
|
+
|
155
|
+
handleDragStart() {
|
156
|
+
if (!this.control.options.dynamic) {
|
157
|
+
this.control.hideDynamicButton();
|
158
|
+
}
|
159
|
+
}
|
160
|
+
}
|