geoblacklight 5.0.2 → 5.1.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/ruby.yml +3 -3
- data/app/assets/stylesheets/geoblacklight/modules/item.scss +5 -1
- data/app/components/blacklight/icons/circle_info_solid_component.rb +1 -1
- data/app/components/blacklight/icons/fire_solid_component.rb +1 -1
- data/app/components/blacklight/icons/lightbulb_solid_component.rb +1 -1
- data/app/components/blacklight/icons/triangle_exclamation_solid_component.rb +1 -1
- data/app/components/geoblacklight/arcgis_component.html.erb +1 -1
- data/app/components/geoblacklight/arcgis_component.rb +1 -1
- data/app/components/geoblacklight/attribute_table_component.rb +1 -1
- data/app/components/geoblacklight/data_dictionary_download_component.rb +1 -1
- data/app/components/geoblacklight/display_note_component.rb +2 -2
- data/app/components/geoblacklight/document/sidebar_component.html.erb +5 -5
- data/app/components/geoblacklight/document/sidebar_component.rb +15 -0
- data/app/components/geoblacklight/download_links_component.rb +5 -1
- data/app/components/geoblacklight/header_icons_component.rb +4 -4
- data/app/components/geoblacklight/homepage_feature_facet_component.html.erb +1 -1
- data/app/components/geoblacklight/homepage_feature_facet_component.rb +1 -1
- data/app/components/geoblacklight/iiif_drag_drop_component.html.erb +2 -2
- data/app/components/geoblacklight/iiif_drag_drop_component.rb +1 -1
- data/app/components/geoblacklight/index_map_inspect_component.rb +1 -1
- data/app/components/geoblacklight/index_map_legend_component.rb +1 -1
- data/app/components/geoblacklight/item_map_viewer_component.html.erb +58 -0
- data/app/components/geoblacklight/item_map_viewer_component.rb +24 -13
- data/app/components/geoblacklight/location_leaflet_map_component.rb +1 -1
- data/app/components/geoblacklight/login_link_component.rb +1 -1
- data/app/components/geoblacklight/relations_component.html.erb +1 -1
- data/app/components/geoblacklight/relations_component.rb +1 -1
- data/app/components/geoblacklight/static_map_component.rb +1 -4
- data/app/components/geoblacklight/viewer_help_text_component.rb +2 -2
- data/app/components/geoblacklight/web_services_component.rb +1 -1
- data/app/components/geoblacklight/web_services_default_component.html.erb +1 -1
- data/app/components/geoblacklight/web_services_default_component.rb +1 -1
- data/app/components/geoblacklight/web_services_link_component.rb +1 -1
- data/app/components/geoblacklight/web_services_wfs_component.rb +1 -1
- data/app/components/geoblacklight/web_services_wms_component.rb +1 -1
- data/app/helpers/geoblacklight_helper.rb +0 -4
- data/app/javascript/geoblacklight/core.js +0 -2
- data/app/javascript/geoblacklight/index.js +0 -2
- data/config/locales/geoblacklight.en.yml +1 -0
- data/lib/geoblacklight/version.rb +1 -1
- data/package.json +2 -5
- data/spec/components/blacklight/icons/triangle_exclamation_solid_component_spec.rb +1 -1
- data/spec/components/geoblacklight/document_component_spec.rb +1 -1
- data/spec/components/geoblacklight/download_links_component_spec.rb +16 -0
- data/spec/components/geoblacklight/item_map_viewer_component_spec.rb +1 -1
- data/spec/features/configurable_basemap_spec.rb +7 -4
- data/spec/features/full_screen_control_spec.rb +2 -0
- data/spec/features/home_page_spec.rb +1 -6
- data/spec/features/index_view_spec.rb +21 -21
- data/spec/features/layer_inspection_spec.rb +1 -0
- data/spec/features/relations_spec.rb +9 -9
- data/spec/features/search_spec.rb +3 -3
- data/spec/features/tms_spec.rb +2 -2
- data/spec/features/xyz_spec.rb +2 -2
- data/spec/helpers/geoblacklight_helper_spec.rb +0 -17
- metadata +3 -5
- data/app/javascript/geoblacklight/controllers/clover_viewer_controller.js +0 -47
- data/spec/features/iiif_viewer_spec.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3a533a2028cc4a5d4edc6aba0c532812d5266ce7e94fc290208f0ea26216056
|
4
|
+
data.tar.gz: 4644a2f7c1cae18643207a99c2d7cdbde53a1b27c521a6a94a1e1ff6a7c37e15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 404ed2e84916e9505a22e08979e569b301fb1dbf620d72d1c015e0f49f106183bbc2757d649a7ab3392fe9bec8cdefbe735d0a3ec9ea8b96909b4e5b10267bd2
|
7
|
+
data.tar.gz: 82e33f34850832707b5259c9f356ca5858446474b44672357f05495b517c4bbdd539ff330c557ac143422baf0c7377c4e0ca6dc758be73cce8a7d4b939c2be72
|
data/.github/workflows/ruby.yml
CHANGED
@@ -10,7 +10,7 @@ jobs:
|
|
10
10
|
linter:
|
11
11
|
runs-on: ubuntu-latest
|
12
12
|
steps:
|
13
|
-
- uses: actions/checkout@
|
13
|
+
- uses: actions/checkout@v4
|
14
14
|
- name: Set up Ruby
|
15
15
|
uses: ruby/setup-ruby@v1
|
16
16
|
with:
|
@@ -23,7 +23,7 @@ jobs:
|
|
23
23
|
aardvark-fixture-linter:
|
24
24
|
runs-on: ubuntu-latest
|
25
25
|
steps:
|
26
|
-
- uses: actions/checkout@
|
26
|
+
- uses: actions/checkout@v4
|
27
27
|
- name: Set up Ruby
|
28
28
|
uses: ruby/setup-ruby@v1
|
29
29
|
with:
|
@@ -44,7 +44,7 @@ jobs:
|
|
44
44
|
|
45
45
|
name: test ruby ${{ matrix.ruby_version }} / rails ${{ matrix.rails_version }} / ${{ matrix.asset_pipeline }}
|
46
46
|
steps:
|
47
|
-
- uses: actions/checkout@
|
47
|
+
- uses: actions/checkout@v4
|
48
48
|
- name: Set up Ruby
|
49
49
|
uses: ruby/setup-ruby@v1
|
50
50
|
with:
|
@@ -12,7 +12,7 @@
|
|
12
12
|
width: 100%;
|
13
13
|
|
14
14
|
// Ensure embeds, openlayers viewer, and IIIF viewer fit their container
|
15
|
-
iframe, .ol-viewport, .
|
15
|
+
iframe, .ol-viewport, .openseadragon-container {
|
16
16
|
min-height: 27.5rem;
|
17
17
|
}
|
18
18
|
}
|
@@ -24,6 +24,10 @@
|
|
24
24
|
margin-bottom: 1rem;
|
25
25
|
}
|
26
26
|
|
27
|
+
#mirador {
|
28
|
+
position: relative;
|
29
|
+
}
|
30
|
+
|
27
31
|
.help-text {
|
28
32
|
cursor: pointer;
|
29
33
|
}
|
@@ -7,7 +7,7 @@ module Blacklight
|
|
7
7
|
|
8
8
|
def svg
|
9
9
|
<<~SVG
|
10
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome
|
10
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2023 Fonticons, Inc. -->
|
11
11
|
<title>#{title}</title>
|
12
12
|
<path fill="#6c757d" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"/>
|
13
13
|
</svg>
|
@@ -7,7 +7,7 @@ module Blacklight
|
|
7
7
|
|
8
8
|
def svg
|
9
9
|
<<~SVG
|
10
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome
|
10
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2023 Fonticons, Inc. -->
|
11
11
|
<title>#{title}</title>
|
12
12
|
<path fill="#6c757d" d="M159.3 5.4c7.8-7.3 19.9-7.2 27.7 .1c27.6 25.9 53.5 53.8 77.7 84c11-14.4 23.5-30.1 37-42.9c7.9-7.4 20.1-7.4 28 .1c34.6 33 63.9 76.6 84.5 118c20.3 40.8 33.8 82.5 33.8 111.9C448 404.2 348.2 512 224 512C98.4 512 0 404.1 0 276.5c0-38.4 17.8-85.3 45.4-131.7C73.3 97.7 112.7 48.6 159.3 5.4zM225.7 416c25.3 0 47.7-7 68.8-21c42.1-29.4 53.4-88.2 28.1-134.4c-4.5-9-16-9.6-22.5-2l-25.2 29.3c-6.6 7.6-18.5 7.4-24.7-.5c-16.5-21-46-58.5-62.8-79.8c-6.3-8-18.3-8.1-24.7-.1c-33.8 42.5-50.8 69.3-50.8 99.4C112 375.4 162.6 416 225.7 416z"/>
|
13
13
|
</svg>
|
@@ -7,7 +7,7 @@ module Blacklight
|
|
7
7
|
|
8
8
|
def svg
|
9
9
|
<<~SVG
|
10
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome
|
10
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2023 Fonticons, Inc. -->
|
11
11
|
<title>#{title}</title>
|
12
12
|
<path fill="#6c757d" d="M272 384c9.6-31.9 29.5-59.1 49.2-86.2l0 0c5.2-7.1 10.4-14.2 15.4-21.4c19.8-28.5 31.4-63 31.4-100.3C368 78.8 289.2 0 192 0S16 78.8 16 176c0 37.3 11.6 71.9 31.4 100.3c5 7.2 10.2 14.3 15.4 21.4l0 0c19.8 27.1 39.7 54.4 49.2 86.2H272zM192 512c44.2 0 80-35.8 80-80V416H112v16c0 44.2 35.8 80 80 80zM112 176c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-61.9 50.1-112 112-112c8.8 0 16 7.2 16 16s-7.2 16-16 16c-44.2 0-80 35.8-80 80z"/>
|
13
13
|
</svg>
|
@@ -8,7 +8,7 @@ module Blacklight
|
|
8
8
|
def svg
|
9
9
|
<<~SVG
|
10
10
|
<title>#{title}</title>
|
11
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome
|
11
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2023 Fonticons, Inc. -->
|
12
12
|
<path fill="#6c757d" d="M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"/>
|
13
13
|
</svg>
|
14
14
|
SVG
|
@@ -6,7 +6,7 @@ module Geoblacklight
|
|
6
6
|
|
7
7
|
def initialize(display_note:)
|
8
8
|
@display_note = display_note
|
9
|
-
super
|
9
|
+
super()
|
10
10
|
end
|
11
11
|
|
12
12
|
def before_render
|
@@ -24,7 +24,7 @@ module Geoblacklight
|
|
24
24
|
prefixed = true
|
25
25
|
@note = tag.div class: "gbl-display-note alert #{value.first}", role: "alert" do
|
26
26
|
capture do
|
27
|
-
"#{geoblacklight_icon(value.second)}
|
27
|
+
"#{helpers.geoblacklight_icon(value.second)}
|
28
28
|
#{@display_note}".html_safe
|
29
29
|
end
|
30
30
|
end
|
@@ -1,12 +1,12 @@
|
|
1
|
-
<%=
|
1
|
+
<%= render_static_map_component %>
|
2
2
|
<%= render_show_tools %>
|
3
3
|
|
4
4
|
<div class="sidebar-buttons">
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
<% sidebar_buttons.each do | sidebar_button | %>
|
6
|
+
<%= render sidebar_button %>
|
7
|
+
<% end %>
|
8
8
|
</div>
|
9
9
|
|
10
|
-
<%=
|
10
|
+
<%= render_more_like_this %>
|
11
11
|
|
12
12
|
<%= render "relations_container", document: document %>
|
@@ -3,6 +3,21 @@
|
|
3
3
|
module Geoblacklight
|
4
4
|
module Document
|
5
5
|
class SidebarComponent < Blacklight::Document::SidebarComponent
|
6
|
+
def render_static_map_component
|
7
|
+
render Geoblacklight::StaticMapComponent.new(document:)
|
8
|
+
end
|
9
|
+
|
10
|
+
def sidebar_buttons
|
11
|
+
[
|
12
|
+
Geoblacklight::WebServicesLinkComponent.new(document:),
|
13
|
+
Geoblacklight::DownloadLinksComponent.new(document:),
|
14
|
+
Geoblacklight::LoginLinkComponent.new(document:)
|
15
|
+
]
|
16
|
+
end
|
17
|
+
|
18
|
+
def render_more_like_this
|
19
|
+
render Blacklight::Document::MoreLikeThisComponent.new(document:)
|
20
|
+
end
|
6
21
|
end
|
7
22
|
end
|
8
23
|
end
|
@@ -7,7 +7,7 @@ module Geoblacklight
|
|
7
7
|
|
8
8
|
def initialize(document:)
|
9
9
|
@document = document
|
10
|
-
super
|
10
|
+
super()
|
11
11
|
end
|
12
12
|
|
13
13
|
def render?
|
@@ -76,5 +76,9 @@ module Geoblacklight
|
|
76
76
|
def proper_case_format(format)
|
77
77
|
t("geoblacklight.formats.#{format.to_s.parameterize(separator: "_")}")
|
78
78
|
end
|
79
|
+
|
80
|
+
def iiif_jpg_url
|
81
|
+
@document.references.iiif.endpoint.sub! "info.json", "full/full/0/default.jpg"
|
82
|
+
end
|
79
83
|
end
|
80
84
|
end
|
@@ -7,23 +7,23 @@ module Geoblacklight
|
|
7
7
|
def initialize(document:, fields: [Settings.FIELDS.RESOURCE_CLASS, Settings.FIELDS.PROVIDER, Settings.FIELDS.ACCESS_RIGHTS])
|
8
8
|
@document = document
|
9
9
|
@fields = fields
|
10
|
-
super
|
10
|
+
super()
|
11
11
|
end
|
12
12
|
|
13
13
|
def icon(field)
|
14
14
|
return resource_icon if field == Settings.FIELDS.RESOURCE_CLASS
|
15
15
|
|
16
|
-
geoblacklight_icon(@document[field], classes: "svg_tooltip")
|
16
|
+
helpers.geoblacklight_icon(@document[field], classes: "svg_tooltip")
|
17
17
|
end
|
18
18
|
|
19
19
|
# If the item has a resource type of "X data" where "X" is an existing icon, use that icon
|
20
20
|
# Otherwise just use the resource class icon
|
21
21
|
def resource_icon
|
22
22
|
dataset_type = @document.resource_type.find { |type| type.include?(" data") }&.gsub(" data", "")
|
23
|
-
resource_type_icon = geoblacklight_icon(dataset_type, classes: "svg_tooltip")
|
23
|
+
resource_type_icon = helpers.geoblacklight_icon(dataset_type, classes: "svg_tooltip")
|
24
24
|
return resource_type_icon unless resource_type_icon.include?("icon-missing")
|
25
25
|
|
26
|
-
geoblacklight_icon(@document.resource_class.first, classes: "svg_tooltip")
|
26
|
+
helpers.geoblacklight_icon(@document.resource_class.first, classes: "svg_tooltip")
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
@@ -1,3 +1,3 @@
|
|
1
1
|
<%= link_to @href_link, data: {manifest: @manifest}, class: 'float-end' do %>
|
2
|
-
<%= geoblacklight_icon('iiif-drag-drop', classes: 'svg_tooltip iiif-icon') %>
|
3
|
-
<% end %>
|
2
|
+
<%= helpers.geoblacklight_icon('iiif-drag-drop', classes: 'svg_tooltip iiif-icon') %>
|
3
|
+
<% end %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module Geoblacklight
|
4
4
|
class IiifDragDropComponent < ViewComponent::Base
|
5
5
|
def initialize(document:)
|
6
|
-
super
|
6
|
+
super()
|
7
7
|
manifest_ref = document.item_viewer&.iiif_manifest
|
8
8
|
@manifest = manifest_ref&.endpoint || ""
|
9
9
|
@href_link = Settings.IIIF_DRAG_DROP_LINK&.gsub("@manifest", @manifest)
|
@@ -1 +1,59 @@
|
|
1
1
|
<%= display_tag %>
|
2
|
+
<% content_for :head do %>
|
3
|
+
<!-- Include Mirador 3 for IIIF content -->
|
4
|
+
<script src="https://unpkg.com/mirador@^3/dist/mirador.min.js"></script>
|
5
|
+
<!-- Include OpenSeadragon for IIIF Image content -->
|
6
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/openseadragon/2.4.2/openseadragon.min.js"></script>
|
7
|
+
<% end %>
|
8
|
+
<% if iiif_manifest? %>
|
9
|
+
<!-- Initialize Mirador viewer -->
|
10
|
+
<script>
|
11
|
+
window.miradorTarget = document.getElementById("mirador");
|
12
|
+
if (window.miradorTarget) {
|
13
|
+
Mirador.viewer({
|
14
|
+
id: "mirador",
|
15
|
+
windows: [
|
16
|
+
{
|
17
|
+
id: "main",
|
18
|
+
loadedManifest: window.miradorTarget.dataset.manifestUrl,
|
19
|
+
},
|
20
|
+
],
|
21
|
+
window: {
|
22
|
+
allowClose: false,
|
23
|
+
allowFullscreen: true,
|
24
|
+
allowMaximize: false,
|
25
|
+
authNewWindowCenter: "screen",
|
26
|
+
hideWindowTitle: true,
|
27
|
+
sidebarPanel: "attribution",
|
28
|
+
views: [
|
29
|
+
{ key: "single", behaviors: [null, "individuals"] },
|
30
|
+
{ key: "book", behaviors: [null, "paged"] },
|
31
|
+
{ key: "scroll", behaviors: ["continuous"] },
|
32
|
+
{ key: "gallery" },
|
33
|
+
],
|
34
|
+
},
|
35
|
+
workspace: {
|
36
|
+
showZoomControls: true,
|
37
|
+
type: "single",
|
38
|
+
},
|
39
|
+
workspaceControlPanel: {
|
40
|
+
enabled: false,
|
41
|
+
},
|
42
|
+
});
|
43
|
+
}
|
44
|
+
</script>
|
45
|
+
<% elsif iiif_image? %>
|
46
|
+
<!-- Initialize OpenSeadragon viewer -->
|
47
|
+
<script>
|
48
|
+
window.osdTarget = document.getElementById("openseadragon");
|
49
|
+
if (window.osdTarget) {
|
50
|
+
OpenSeadragon({
|
51
|
+
id: "openseadragon",
|
52
|
+
tileSources: [window.osdTarget.dataset.imageUrl],
|
53
|
+
prefixUrl: "https://cdnjs.cloudflare.com/ajax/libs/openseadragon/2.4.2/images/",
|
54
|
+
preserveViewport: true,
|
55
|
+
visibilityRatio: 1,
|
56
|
+
});
|
57
|
+
}
|
58
|
+
</script>
|
59
|
+
<% end %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module Geoblacklight
|
4
4
|
class ItemMapViewerComponent < ViewComponent::Base
|
5
5
|
def initialize(document:)
|
6
|
-
super
|
6
|
+
super()
|
7
7
|
@document = document
|
8
8
|
end
|
9
9
|
|
@@ -12,8 +12,9 @@ module Geoblacklight
|
|
12
12
|
# Otherwise display the base viewer which will take into account if it is open layers
|
13
13
|
# or generic content.
|
14
14
|
def display_tag
|
15
|
-
return
|
16
|
-
return
|
15
|
+
return iiif_manifest_tag if iiif_manifest?
|
16
|
+
return iiif_image_tag if iiif_image?
|
17
|
+
return oembed_tag if protocol == "Oembed"
|
17
18
|
|
18
19
|
base_tag
|
19
20
|
end
|
@@ -32,23 +33,33 @@ module Geoblacklight
|
|
32
33
|
%w[Cog Pmtiles].include?(protocol)
|
33
34
|
end
|
34
35
|
|
35
|
-
def
|
36
|
-
|
36
|
+
def iiif_image?
|
37
|
+
protocol == "Iiif"
|
37
38
|
end
|
38
39
|
|
39
|
-
def
|
40
|
-
protocol == "
|
40
|
+
def iiif_manifest?
|
41
|
+
protocol == "IiifManifest"
|
41
42
|
end
|
42
43
|
|
43
|
-
#
|
44
|
-
|
44
|
+
# Use mirador as the IIIF manifest viewer due to bug in Clover; see:
|
45
|
+
# https://github.com/samvera-labs/clover-iiif/issues/294
|
46
|
+
def iiif_manifest_tag
|
45
47
|
tag.div(nil,
|
46
|
-
id: "
|
48
|
+
id: "mirador",
|
47
49
|
class: "viewer",
|
48
50
|
data: {
|
49
|
-
|
50
|
-
|
51
|
-
|
51
|
+
manifest_url: @document.viewer_endpoint
|
52
|
+
})
|
53
|
+
end
|
54
|
+
|
55
|
+
# Use openseadragon for IIIF image content due to bug in Clover; see:
|
56
|
+
# https://github.com/samvera-labs/clover-iiif/issues/294
|
57
|
+
def iiif_image_tag
|
58
|
+
tag.div(nil,
|
59
|
+
id: "openseadragon",
|
60
|
+
class: "viewer",
|
61
|
+
data: {
|
62
|
+
image_url: @document.viewer_endpoint
|
52
63
|
})
|
53
64
|
end
|
54
65
|
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<% relationship_type_results['docs'][0..2].map { |hash| SolrDocument.new(hash) }.each do |doc| %>
|
8
8
|
<li class="list-group-item border-bottom-0">
|
9
9
|
<%= link_to solr_document_path(doc) do %>
|
10
|
-
<%= relations_icon(doc, rel_type_info.icon) unless rel_type_info.icon.nil? %>
|
10
|
+
<%= helpers.relations_icon(doc, rel_type_info.icon) unless rel_type_info.icon.nil? %>
|
11
11
|
<%= doc.title %>
|
12
12
|
<% end %>
|
13
13
|
</li>
|
@@ -6,7 +6,7 @@ module Geoblacklight
|
|
6
6
|
|
7
7
|
def initialize(document:, **)
|
8
8
|
@document = document
|
9
|
-
super
|
9
|
+
super()
|
10
10
|
end
|
11
11
|
|
12
12
|
def render?
|
@@ -22,9 +22,6 @@ module Geoblacklight
|
|
22
22
|
leaflet_options.SLEEP.SLEEP = false
|
23
23
|
tag.div(nil,
|
24
24
|
id: "static-map",
|
25
|
-
aria: {
|
26
|
-
label: @label
|
27
|
-
},
|
28
25
|
data: {
|
29
26
|
"controller" => "leaflet-viewer",
|
30
27
|
"leaflet-viewer-basemap-value" => helpers.geoblacklight_basemap,
|
@@ -8,12 +8,12 @@ module Geoblacklight
|
|
8
8
|
def initialize(feature, key)
|
9
9
|
@feature = feature
|
10
10
|
@key = key
|
11
|
-
super
|
11
|
+
super()
|
12
12
|
end
|
13
13
|
|
14
14
|
# Retrieve i18n value
|
15
15
|
def help_text_exists?
|
16
|
-
I18n.exists?("geoblacklight.help_text.#{@feature}.#{@key}", locale)
|
16
|
+
I18n.exists?("geoblacklight.help_text.#{@feature}.#{@key}", helpers.locale)
|
17
17
|
end
|
18
18
|
|
19
19
|
def help_text_value
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class='mb-3 web-services-form'>
|
2
2
|
<label for='<%= reference.type%>_webservice'>
|
3
|
-
<%= "#{formatted_name_reference(reference.type)}" %>
|
3
|
+
<%= "#{helpers.formatted_name_reference(reference.type)}" %>
|
4
4
|
</label>
|
5
5
|
<div class='input-group'>
|
6
6
|
<input type='text' id='<%= reference.type%>_webservice' value='<%= reference.endpoint %>' class='form-control'>
|
@@ -5,10 +5,6 @@ module GeoblacklightHelper
|
|
5
5
|
document.public? || (document.same_institution? && user_signed_in?)
|
6
6
|
end
|
7
7
|
|
8
|
-
def iiif_jpg_url
|
9
|
-
@document.references.iiif.endpoint.sub! "info.json", "full/full/0/default.jpg"
|
10
|
-
end
|
11
|
-
|
12
8
|
##
|
13
9
|
# Blacklight catalog controller helper method to truncate field value to 150 chars
|
14
10
|
# @param [SolrDocument] args
|
@@ -7,7 +7,6 @@ import initializeMetadataDownload from "geoblacklight/initializers/metadata_down
|
|
7
7
|
|
8
8
|
// Stimulus controllers
|
9
9
|
import ClipboardController from "geoblacklight/controllers/clipboard_controller";
|
10
|
-
import CloverViewerController from "geoblacklight/controllers/clover_viewer_controller";
|
11
10
|
import DownloadsController from "geoblacklight/controllers/downloads_controller";
|
12
11
|
import LeafletViewerController from "geoblacklight/controllers/leaflet_viewer_controller";
|
13
12
|
import OembedViewerController from "geoblacklight/controllers/oembed_viewer_controller";
|
@@ -54,7 +53,6 @@ Geoblacklight.onLoad(initializeMetadataDownload);
|
|
54
53
|
// Register our Stimulus controllers
|
55
54
|
if (typeof Stimulus !== "undefined") {
|
56
55
|
Stimulus.register("openlayers-viewer", OpenlayersViewerController);
|
57
|
-
Stimulus.register("clover-viewer", CloverViewerController);
|
58
56
|
Stimulus.register("oembed-viewer", OembedViewerController);
|
59
57
|
Stimulus.register("leaflet-viewer", LeafletViewerController);
|
60
58
|
Stimulus.register("search-results", SearchResultsController);
|
@@ -1,6 +1,5 @@
|
|
1
1
|
// Stimulus controllers
|
2
2
|
import OpenlayersViewerController from "geoblacklight/controllers/openlayers_viewer_controller";
|
3
|
-
import CloverViewerController from "geoblacklight/controllers/clover_viewer_controller";
|
4
3
|
import OembedViewerController from "geoblacklight/controllers/oembed_viewer_controller";
|
5
4
|
import LeafletViewerController from "geoblacklight/controllers/leaflet_viewer_controller";
|
6
5
|
import SearchResultsController from "geoblacklight/controllers/search_results_controller";
|
@@ -16,7 +15,6 @@ import leafletBasemaps from "geoblacklight/leaflet/basemaps";
|
|
16
15
|
|
17
16
|
export default {
|
18
17
|
OpenlayersViewerController,
|
19
|
-
CloverViewerController,
|
20
18
|
OembedViewerController,
|
21
19
|
LeafletViewerController,
|
22
20
|
SearchResultsController,
|
data/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@geoblacklight/frontend",
|
3
3
|
"type": "module",
|
4
|
-
"version": "5.0
|
4
|
+
"version": "5.1.0",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"publishConfig": {
|
7
7
|
"access": "public"
|
@@ -22,7 +22,6 @@
|
|
22
22
|
"@github/auto-complete-element": "^3.6.2",
|
23
23
|
"@hotwired/stimulus": "^3.2.2",
|
24
24
|
"@popperjs/core": "^2.11.8",
|
25
|
-
"@samvera/clover-iiif": "^2.3.2",
|
26
25
|
"blacklight-frontend": "8",
|
27
26
|
"bootstrap": "^5.3.3",
|
28
27
|
"esri-leaflet": "^3.0.12",
|
@@ -30,9 +29,7 @@
|
|
30
29
|
"leaflet-iiif": "^3.0.0",
|
31
30
|
"leaflet-fullscreen": "^1.0.2",
|
32
31
|
"ol": "8.1.0",
|
33
|
-
"ol-pmtiles": "^0.3.0"
|
34
|
-
"react": "^18.2.0",
|
35
|
-
"react-dom": "^18.2.0"
|
32
|
+
"ol-pmtiles": "^0.3.0"
|
36
33
|
},
|
37
34
|
"devDependencies": {
|
38
35
|
"jsdom": "^24.1.0",
|
@@ -10,6 +10,6 @@ RSpec.describe Blacklight::Icons::TriangleExclamationSolidComponent, type: :comp
|
|
10
10
|
expect(rendered).to have_css("title")
|
11
11
|
expect(rendered).to have_css("svg")
|
12
12
|
expect(rendered).to have_css(".blacklight-icons")
|
13
|
-
expect(rendered.find("title").text).to eq "
|
13
|
+
expect(rendered.find("title").text).to eq "Warning"
|
14
14
|
end
|
15
15
|
end
|
@@ -82,6 +82,22 @@ RSpec.describe Geoblacklight::DownloadLinksComponent, type: :component do
|
|
82
82
|
end
|
83
83
|
end
|
84
84
|
|
85
|
+
describe "#iiif_jpg_url" do
|
86
|
+
let(:references_field) { Settings.FIELDS.REFERENCES }
|
87
|
+
let(:document_attributes) do
|
88
|
+
{
|
89
|
+
references_field => {
|
90
|
+
"http://iiif.io/api/image" => "https://example.edu/image/info.json"
|
91
|
+
}.to_json
|
92
|
+
}
|
93
|
+
end
|
94
|
+
let(:document) { SolrDocument.new(document_attributes) }
|
95
|
+
|
96
|
+
it "returns JPG download URL when given URL to a IIIF info.json" do
|
97
|
+
expect(component.iiif_jpg_url).to eq "https://example.edu/image/full/full/0/default.jpg"
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
85
101
|
describe "#download_link_generated" do
|
86
102
|
let(:download_type) { "SHAPEFILE" }
|
87
103
|
|
@@ -12,7 +12,7 @@ RSpec.describe Geoblacklight::ItemMapViewerComponent, type: :component do
|
|
12
12
|
let(:document) { SolrDocument.new(fixture) }
|
13
13
|
|
14
14
|
it "uses the IIIF tag" do
|
15
|
-
expect(rendered).to have_css("div#
|
15
|
+
expect(rendered).to have_css("div#mirador")
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
@@ -5,33 +5,36 @@ require "spec_helper"
|
|
5
5
|
feature "Configurable basemap", js: true do
|
6
6
|
scenario "defaults to positron" do
|
7
7
|
visit root_path
|
8
|
-
expect(page).to have_css "img[src*='carto']"
|
8
|
+
expect(page).to have_css "img[src*='carto']", visible: :all
|
9
9
|
end
|
10
|
+
|
10
11
|
feature "without provided basemap config" do
|
11
12
|
before do
|
12
13
|
CatalogController.blacklight_config.basemap_provider = nil
|
13
14
|
end
|
14
15
|
scenario "has Carto map" do
|
15
16
|
visit root_path
|
16
|
-
expect(page).to have_css "img[src*='carto']"
|
17
|
+
expect(page).to have_css "img[src*='carto']", visible: :all
|
17
18
|
end
|
18
19
|
end
|
20
|
+
|
19
21
|
feature "using darkMatter" do
|
20
22
|
before do
|
21
23
|
CatalogController.blacklight_config.basemap_provider = "darkMatter"
|
22
24
|
end
|
23
25
|
scenario "has darkMatter map" do
|
24
26
|
visit root_path
|
25
|
-
expect(page).to have_css "img[src*='dark_all']"
|
27
|
+
expect(page).to have_css "img[src*='dark_all']", visible: :all
|
26
28
|
end
|
27
29
|
end
|
30
|
+
|
28
31
|
feature "using openstreetmapHot" do
|
29
32
|
before do
|
30
33
|
CatalogController.blacklight_config.basemap_provider = "openstreetmapHot"
|
31
34
|
end
|
32
35
|
scenario "has openstreetmapHot map" do
|
33
36
|
visit root_path
|
34
|
-
expect(page).to have_css "img[src*='hot']"
|
37
|
+
expect(page).to have_css "img[src*='hot']", visible: :all
|
35
38
|
end
|
36
39
|
end
|
37
40
|
end
|
@@ -11,11 +11,13 @@ end
|
|
11
11
|
|
12
12
|
feature "Clover IIIF fullscreen control", js: true do
|
13
13
|
scenario "IIIF layer should have full screen control" do
|
14
|
+
skip "Clover is disabled" # see https://github.com/geoblacklight/geoblacklight/issues/1675
|
14
15
|
visit solr_document_path("princeton-sx61dn82p")
|
15
16
|
expect(page).to have_button("Toggle full page")
|
16
17
|
end
|
17
18
|
|
18
19
|
scenario "IIIF image should have full screen control" do
|
20
|
+
skip "Clover is disabled" # see https://github.com/geoblacklight/geoblacklight/issues/1675
|
19
21
|
visit solr_document_path("princeton-02870w62c")
|
20
22
|
expect(page).to have_css("[data-button='full-page']")
|
21
23
|
end
|
@@ -7,11 +7,6 @@ feature "Home page", js: true do # use js: true for tests which require js, but
|
|
7
7
|
visit root_path
|
8
8
|
end
|
9
9
|
|
10
|
-
scenario "navbar" do
|
11
|
-
expect(page).to have_css "#bookmarks_nav"
|
12
|
-
expect(page).to have_css "a", text: "History"
|
13
|
-
end
|
14
|
-
|
15
10
|
scenario "search bar" do
|
16
11
|
expect(page).not_to have_css "#search-navbar"
|
17
12
|
expect(page).to have_css "h1", text: "Explore and discover..."
|
@@ -31,7 +26,7 @@ feature "Home page", js: true do # use js: true for tests which require js, but
|
|
31
26
|
scenario "map should be visible" do
|
32
27
|
within "#main-container" do
|
33
28
|
expect(page).to have_css("#leaflet-viewer")
|
34
|
-
expect(page).to have_css("img.leaflet-tile",
|
29
|
+
expect(page).to have_css("img.leaflet-tile", visible: :all)
|
35
30
|
end
|
36
31
|
end
|
37
32
|
|
@@ -22,29 +22,29 @@ feature "Index view", js: true do
|
|
22
22
|
end
|
23
23
|
|
24
24
|
scenario "should have facets listed correctly" do
|
25
|
-
skip "
|
25
|
+
skip "Capybara thinks elements are not visible or interactable, but they are"
|
26
26
|
|
27
|
-
within "#facet-panel-collapse" do
|
28
|
-
expect(page).to have_css("div.card.facet-limit", text: "Year")
|
29
|
-
expect(page).to have_css("div.card.facet-limit", text: "Place")
|
30
|
-
expect(page).to have_css("div.card.facet-limit", text: "Access")
|
31
|
-
expect(page).to have_css("div.card.facet-limit", text: "Resource Class")
|
32
|
-
expect(page).to have_css("div.card.facet-limit", text: "Resource Type")
|
33
|
-
expect(page).to have_css("div.card.facet-limit", text: "Format")
|
34
|
-
expect(page).to have_css("div.card.facet-limit", text: "Subject")
|
35
|
-
expect(page).to have_css("div.card.facet-limit", text: "Theme")
|
36
|
-
expect(page).to have_css("div.card.facet-limit", text: "Creator")
|
37
|
-
expect(page).to have_css("div.card.facet-limit", text: "Publisher")
|
38
|
-
expect(page).to have_css("div.card.facet-limit", text: "Provider")
|
39
|
-
expect(page).to have_css("div.card.facet-limit", text: "Georeferenced")
|
27
|
+
within "#facet-panel-collapse", visible: :all do
|
28
|
+
expect(page).to have_css("div.card.facet-limit", text: "Year", visible: :all)
|
29
|
+
expect(page).to have_css("div.card.facet-limit", text: "Place", visible: :all)
|
30
|
+
expect(page).to have_css("div.card.facet-limit", text: "Access", visible: :all)
|
31
|
+
expect(page).to have_css("div.card.facet-limit", text: "Resource Class", visible: :all)
|
32
|
+
expect(page).to have_css("div.card.facet-limit", text: "Resource Type", visible: :all)
|
33
|
+
expect(page).to have_css("div.card.facet-limit", text: "Format", visible: :all)
|
34
|
+
expect(page).to have_css("div.card.facet-limit", text: "Subject", visible: :all)
|
35
|
+
expect(page).to have_css("div.card.facet-limit", text: "Theme", visible: :all)
|
36
|
+
expect(page).to have_css("div.card.facet-limit", text: "Creator", visible: :all)
|
37
|
+
expect(page).to have_css("div.card.facet-limit", text: "Publisher", visible: :all)
|
38
|
+
expect(page).to have_css("div.card.facet-limit", text: "Provider", visible: :all)
|
39
|
+
expect(page).to have_css("div.card.facet-limit", text: "Georeferenced", visible: :all)
|
40
40
|
end
|
41
41
|
|
42
|
-
click_button "Provider"
|
42
|
+
click_button "Provider", visible: :all
|
43
43
|
|
44
|
-
expect(page).to have_css("a.facet-select", text: "University of Minnesota", visible:
|
45
|
-
expect(page).to have_css("a.facet-select", text: "MIT", visible:
|
46
|
-
expect(page).to have_css("a.facet-select", text: "Stanford", visible:
|
47
|
-
expect(page).to have_css(".more_facets a", text: /more\sProvider\s»/, visible:
|
44
|
+
expect(page).to have_css("a.facet-select", text: "University of Minnesota", visible: :all)
|
45
|
+
expect(page).to have_css("a.facet-select", text: "MIT", visible: :all)
|
46
|
+
expect(page).to have_css("a.facet-select", text: "Stanford", visible: :all)
|
47
|
+
expect(page).to have_css(".more_facets a", text: /more\sProvider\s»/, visible: :all)
|
48
48
|
end
|
49
49
|
|
50
50
|
scenario "hover on record should produce bounding box on map" do
|
@@ -67,9 +67,10 @@ feature "Index view", js: true do
|
|
67
67
|
end
|
68
68
|
|
69
69
|
scenario "spatial search should reset to page one" do
|
70
|
+
skip "FIXME: Only works with a headful browser?"
|
70
71
|
visit "/?per_page=5&q=%2A&page=2"
|
71
72
|
find("#leaflet-viewer").double_click
|
72
|
-
expect(
|
73
|
+
expect(page).to have_css ".page-entries", text: /^1 - 5 of \d.*$/
|
73
74
|
end
|
74
75
|
|
75
76
|
scenario "clicking map search should retain current search parameters" do
|
@@ -77,7 +78,6 @@ feature "Index view", js: true do
|
|
77
78
|
find("#leaflet-viewer").double_click
|
78
79
|
within "#appliedParams" do
|
79
80
|
expect(page).to have_content("Subject Population")
|
80
|
-
expect(page).to have_css "span.filter-name", text: "Bounding Box"
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
@@ -12,6 +12,7 @@ feature "Layer inspection", js: true do
|
|
12
12
|
|
13
13
|
context "with a pmtiles layer" do
|
14
14
|
scenario "clicking map should trigger inspection" do
|
15
|
+
skip "FIXME: Only works with a headful browser?"
|
15
16
|
visit solr_document_path("princeton-t722hd30j")
|
16
17
|
expect(page).to have_css("th", text: "Attribute")
|
17
18
|
find("#openlayers-viewer").click
|
@@ -23,8 +23,8 @@ feature "Display related documents" do
|
|
23
23
|
|
24
24
|
scenario "Record with relations should render widget in catalog#show", js: true do
|
25
25
|
visit solr_document_path("nyu_2451_34635")
|
26
|
-
expect(page).to have_css(".card.relations")
|
27
|
-
expect(page).to have_css("div.card-header", text: "Derived records...")
|
26
|
+
expect(page).to have_css(".card.relations", visible: :all)
|
27
|
+
expect(page).to have_css("div.card-header", text: "Derived records...", visible: :all)
|
28
28
|
end
|
29
29
|
|
30
30
|
scenario "Record without relations should not render widget in catalog#show", js: true do
|
@@ -36,9 +36,9 @@ feature "Display related documents" do
|
|
36
36
|
# Wabash Topo parent record
|
37
37
|
visit solr_document_path("eee6150b-ce2f-4837-9d17-ce72a0c1c26f")
|
38
38
|
|
39
|
-
expect(page).to have_content("Has part...")
|
40
|
-
expect(page).to have_link("Browse all 4 records...")
|
41
|
-
click_link("Browse all 4 records...")
|
39
|
+
expect(page).to have_content(:all, "Has part...")
|
40
|
+
expect(page).to have_link("Browse all 4 records...", visible: :all)
|
41
|
+
click_link("Browse all 4 records...", visible: :all)
|
42
42
|
|
43
43
|
expect(page).not_to have_content("No results found for your search")
|
44
44
|
end
|
@@ -46,24 +46,24 @@ feature "Display related documents" do
|
|
46
46
|
scenario "Record with dct_isPartOf_sm value(s) should link to relations", js: true do
|
47
47
|
# All Relationships
|
48
48
|
visit solr_document_path("all-relationships")
|
49
|
-
expect(page).to have_content("Is part of...")
|
49
|
+
expect(page).to have_content(:all, "Is part of...")
|
50
50
|
end
|
51
51
|
|
52
52
|
scenario "Record pointed at by a parent with dct_isPartOf_sm value(s) should link back", js: true do
|
53
53
|
# The Related Record
|
54
54
|
visit solr_document_path("the-related-record")
|
55
|
-
expect(page).to have_content("Has part...")
|
55
|
+
expect(page).to have_content(:all, "Has part...")
|
56
56
|
end
|
57
57
|
|
58
58
|
scenario "Record with pcdm_memberOf_sm value(s) should link to relations", js: true do
|
59
59
|
# All Relationships
|
60
60
|
visit solr_document_path("all-relationships")
|
61
|
-
expect(page).to have_content("Belongs to collection...")
|
61
|
+
expect(page).to have_content(:all, "Belongs to collection...")
|
62
62
|
end
|
63
63
|
|
64
64
|
scenario "Record pointed at by a parent with pcdm_memberOf_sm value(s) should link back", js: true do
|
65
65
|
# The Related Record
|
66
66
|
visit solr_document_path("the-related-record")
|
67
|
-
expect(page).to have_content("Collection records...")
|
67
|
+
expect(page).to have_content(:all, "Collection records...")
|
68
68
|
end
|
69
69
|
end
|
@@ -11,11 +11,11 @@ feature "Search" do
|
|
11
11
|
scenario "When searching child records from a parent record, supressed records are not hidden", js: true do
|
12
12
|
visit "/catalog/princeton-1r66j405w"
|
13
13
|
|
14
|
-
within(".card.relations.relationship-source_descendants") do
|
15
|
-
expect(page).to have_link(href: /f%5Bdct_source_sm%5D
|
14
|
+
within(".card.relations.relationship-source_descendants", visible: :all) do
|
15
|
+
expect(page).to have_link(href: /f%5Bdct_source_sm%5D/, visible: :all)
|
16
16
|
end
|
17
17
|
|
18
|
-
click_link "Browse all 4 records..."
|
18
|
+
click_link "Browse all 4 records...", visible: :all
|
19
19
|
expect(page).to have_css ".document", count: 4
|
20
20
|
end
|
21
21
|
|
data/spec/features/tms_spec.rb
CHANGED
@@ -5,7 +5,7 @@ require "spec_helper"
|
|
5
5
|
feature "tms layer" do
|
6
6
|
scenario "displays tms layer", js: true do
|
7
7
|
visit solr_document_path("cugir-007957")
|
8
|
-
expect(page).to have_css ".leaflet-control-zoom"
|
9
|
-
expect(page).to have_css "img[src*='cugir.library.cornell.edu']"
|
8
|
+
expect(page).to have_css ".leaflet-control-zoom"
|
9
|
+
expect(page).to have_css "img[src*='cugir.library.cornell.edu']", visible: :all
|
10
10
|
end
|
11
11
|
end
|
data/spec/features/xyz_spec.rb
CHANGED
@@ -5,7 +5,7 @@ require "spec_helper"
|
|
5
5
|
feature "xyz layer" do
|
6
6
|
scenario "displays tms layer", js: true do
|
7
7
|
visit solr_document_path("6f47b103-9955-4bbe-a364-387039623106-xyz")
|
8
|
-
expect(page).to have_css ".leaflet-control-zoom"
|
9
|
-
expect(page).to have_css "img[src*='earthquake.usgs.gov']"
|
8
|
+
expect(page).to have_css ".leaflet-control-zoom"
|
9
|
+
expect(page).to have_css "img[src*='earthquake.usgs.gov']", visible: :all
|
10
10
|
end
|
11
11
|
end
|
@@ -41,23 +41,6 @@ describe GeoblacklightHelper, type: :helper do
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
-
describe "#iiif_jpg_url" do
|
45
|
-
let(:document) { SolrDocument.new(document_attributes) }
|
46
|
-
let(:references_field) { Settings.FIELDS.REFERENCES }
|
47
|
-
let(:document_attributes) do
|
48
|
-
{
|
49
|
-
references_field => {
|
50
|
-
"http://iiif.io/api/image" => "https://example.edu/image/info.json"
|
51
|
-
}.to_json
|
52
|
-
}
|
53
|
-
end
|
54
|
-
|
55
|
-
it "returns JPG download URL when given URL to a IIIF info.json" do
|
56
|
-
assign(:document, document)
|
57
|
-
expect(helper.iiif_jpg_url).to eq "https://example.edu/image/full/full/0/default.jpg"
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
44
|
describe "#snippit" do
|
62
45
|
let(:document) { SolrDocument.new(document_attributes) }
|
63
46
|
let(:references_field) { Settings.FIELDS.REFERENCES }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geoblacklight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0
|
4
|
+
version: 5.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Graves
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2025-
|
14
|
+
date: 2025-08-11 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -543,7 +543,6 @@ files:
|
|
543
543
|
- app/controllers/wms_controller.rb
|
544
544
|
- app/helpers/geoblacklight_helper.rb
|
545
545
|
- app/javascript/geoblacklight/controllers/clipboard_controller.js
|
546
|
-
- app/javascript/geoblacklight/controllers/clover_viewer_controller.js
|
547
546
|
- app/javascript/geoblacklight/controllers/downloads_controller.js
|
548
547
|
- app/javascript/geoblacklight/controllers/leaflet_viewer_controller.js
|
549
548
|
- app/javascript/geoblacklight/controllers/oembed_viewer_controller.js
|
@@ -785,7 +784,6 @@ files:
|
|
785
784
|
- spec/features/full_screen_control_spec.rb
|
786
785
|
- spec/features/help_text_spec.rb
|
787
786
|
- spec/features/home_page_spec.rb
|
788
|
-
- spec/features/iiif_viewer_spec.rb
|
789
787
|
- spec/features/index_map_spec.rb
|
790
788
|
- spec/features/index_view_spec.rb
|
791
789
|
- spec/features/layer_inspection_spec.rb
|
@@ -955,7 +953,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
955
953
|
- !ruby/object:Gem::Version
|
956
954
|
version: 2.5.2
|
957
955
|
requirements: []
|
958
|
-
rubygems_version: 3.5.
|
956
|
+
rubygems_version: 3.5.16
|
959
957
|
signing_key:
|
960
958
|
specification_version: 4
|
961
959
|
summary: A discovery platform for geospatial holdings
|
@@ -1,47 +0,0 @@
|
|
1
|
-
import { createElement } from "react";
|
2
|
-
import { createRoot } from "react-dom/client";
|
3
|
-
import Viewer from "@samvera/clover-iiif/viewer";
|
4
|
-
import Image from "@samvera/clover-iiif/image";
|
5
|
-
import { Controller } from "@hotwired/stimulus";
|
6
|
-
|
7
|
-
const viewerOptions = {
|
8
|
-
showTitle: false,
|
9
|
-
showIIIFBadge: false,
|
10
|
-
informationPanel: {
|
11
|
-
renderToggle: false,
|
12
|
-
renderAbout: false,
|
13
|
-
},
|
14
|
-
};
|
15
|
-
|
16
|
-
export default class CloverViewerController extends Controller {
|
17
|
-
static values = {
|
18
|
-
url: String,
|
19
|
-
protocol: String,
|
20
|
-
};
|
21
|
-
|
22
|
-
connect() {
|
23
|
-
const root = createRoot(this.element);
|
24
|
-
root.render(this.getViewer(this.protocolValue, this.urlValue));
|
25
|
-
}
|
26
|
-
|
27
|
-
getViewer(protocol, url) {
|
28
|
-
if (protocol == "Iiif") {
|
29
|
-
// Create a wrapper div with inline style, as recommended in the docs:
|
30
|
-
// https://samvera-labs.github.io/clover-iiif/docs/image#react
|
31
|
-
return createElement(
|
32
|
-
"div",
|
33
|
-
{ style: { height: 400 } },
|
34
|
-
createElement(Image, {
|
35
|
-
src: url.replace(/\/info\.json$/, ""),
|
36
|
-
isTiledImage: true,
|
37
|
-
})
|
38
|
-
);
|
39
|
-
}
|
40
|
-
if (protocol == "IiifManifest")
|
41
|
-
return createElement(Viewer, {
|
42
|
-
iiifContent: url,
|
43
|
-
options: viewerOptions,
|
44
|
-
});
|
45
|
-
console.error(`Unsupported protocol name: "${protocol}"`);
|
46
|
-
}
|
47
|
-
}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "spec_helper"
|
4
|
-
|
5
|
-
feature "iiif reference" do
|
6
|
-
scenario "displays leaflet viewer", js: true do
|
7
|
-
visit solr_document_path("princeton-02870w62c")
|
8
|
-
expect(page).to have_css '[data-button="zoom-in"]', visible: true
|
9
|
-
end
|
10
|
-
end
|