blacklight_heatmaps 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/components/blacklight_heatmaps/icons/heatmaps_component.rb +14 -0
- data/app/helpers/blacklight/maps_helper.rb +2 -1
- data/app/views/catalog/index.heatmaps.jbuilder +1 -1
- data/lib/blacklight_heatmaps/version.rb +1 -1
- data/lib/generators/blacklight_heatmaps/install_generator.rb +3 -1
- data/spec/examples.txt +29 -29
- data/spec/helpers/blacklight/maps_helper_spec.rb +1 -0
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24f086dfa95576ef614df42a0e330472852275e379efce3a10b018e22506c369
|
4
|
+
data.tar.gz: 3f17b5bf828fd918b39bc1fdcd2d41936b8d56083a25ca2d992d6bc75fa79e62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 469bce42ba24493fd508fd413598106923b0eb0dc15f1a7bf4c71272a3fe4bbef4853e88a5cfbfbb3d5d5d60f891a118c1cb57a65d5c3dc6a6fe081d513aaa0a
|
7
|
+
data.tar.gz: fcc61b79be207c9fac704e5ad1c3db497928dbd5e7acc15eccc7018c56407df9c1f44670c0898384ce14f381994cb945c23a588034847e0d0ba99bfc65ea1c8c
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BlacklightHeatmaps
|
4
|
+
module Icons
|
5
|
+
# This is the gallery icon for the view type button.
|
6
|
+
# You can override the default svg by setting:
|
7
|
+
# Blacklight::Gallery:Icons::SlideshowComponent.svg = '<svg>your SVG here</svg>'
|
8
|
+
class HeatmapsComponent < Blacklight::Icons::IconComponent
|
9
|
+
self.svg = <<~SVG
|
10
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M16 10h-2v2h2v-2zm0 4h-2v2h2v-2zm-8-4H6v2h2v-2zm4 0h-2v2h2v-2zm8-6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V6h16v12z"/></svg>
|
11
|
+
SVG
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -10,6 +10,7 @@ module Blacklight
|
|
10
10
|
class: 'blacklight-heatmaps-index-map',
|
11
11
|
id: 'index-map',
|
12
12
|
data: index_map_data_attributes,
|
13
|
+
role: 'region',
|
13
14
|
'aria-label': t('blacklight.heatmaps.aria-label')
|
14
15
|
)
|
15
16
|
end
|
@@ -24,7 +25,7 @@ module Blacklight
|
|
24
25
|
<div class='media'>
|
25
26
|
<div class='media-body'>
|
26
27
|
<h3 class='media-heading'>
|
27
|
-
<a href
|
28
|
+
<a href="{url}">
|
28
29
|
{title}
|
29
30
|
</a>
|
30
31
|
</h3>
|
@@ -3,7 +3,7 @@ presenter = Blacklight::JsonPresenter.new(@response, blacklight_config)
|
|
3
3
|
json.response do
|
4
4
|
json.docs(presenter.documents) do |document|
|
5
5
|
document_presenter = document_presenter(document)
|
6
|
-
json.url search_state.url_for_document(document)
|
6
|
+
json.url url_for(search_state.url_for_document(document))
|
7
7
|
json.title document_presenter.heading
|
8
8
|
end
|
9
9
|
|
@@ -24,7 +24,9 @@ module BlacklightHeatmaps
|
|
24
24
|
"\n config.basemap_provider = 'positron'" \
|
25
25
|
"\n config.show.partials.insert(1, :show_leaflet_map)" \
|
26
26
|
"\n config.index.respond_to.heatmaps = true" \
|
27
|
-
"\n config.view.heatmaps(partials: [],
|
27
|
+
"\n config.view.heatmaps(partials: []," \
|
28
|
+
"\n color_ramp: ['#ffffcc', '#a1dab4', '#41b6c4', '#2c7fb8', '#253494']," \
|
29
|
+
"\n icon: BlacklightHeatmaps::Icons::HeatmapsComponent)" \
|
28
30
|
"\n"
|
29
31
|
end
|
30
32
|
end
|
data/spec/examples.txt
CHANGED
@@ -1,31 +1,31 @@
|
|
1
1
|
example_id | status | run_time |
|
2
2
|
--------------------------------------------------------------------------------------- | ------ | --------------- |
|
3
|
-
./spec/features/configurable_basemap_spec.rb[1:1] |
|
4
|
-
./spec/features/configurable_basemap_spec.rb[1:2:1] |
|
5
|
-
./spec/features/configurable_basemap_spec.rb[1:3:1] |
|
6
|
-
./spec/features/index_page_map_spec.rb[1:1] |
|
7
|
-
./spec/features/show_page_map_spec.rb[1:1] |
|
8
|
-
./spec/features/show_page_map_spec.rb[1:2] |
|
9
|
-
./spec/helpers/blacklight/maps_helper_spec.rb[1:1:1] | passed | 0.
|
10
|
-
./spec/helpers/blacklight/maps_helper_spec.rb[1:2:1] | passed | 0.
|
11
|
-
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:1:1] | passed | 0.
|
12
|
-
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:2:1] | passed | 0.
|
13
|
-
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:3:1] | passed | 0.
|
14
|
-
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:4:1] | passed | 0.
|
15
|
-
./spec/models/concerns/blacklight_heatmaps/geometry_parser_spec.rb[1:1:1:1] | passed | 0.
|
16
|
-
./spec/models/concerns/blacklight_heatmaps/geometry_parser_spec.rb[1:1:2:1] | passed | 0.
|
17
|
-
./spec/models/concerns/blacklight_heatmaps/geometry_parser_spec.rb[1:1:3:1] | passed | 0.
|
18
|
-
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:1:1] | passed | 0.
|
19
|
-
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:2:1] | passed | 0.
|
20
|
-
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:3:1] | passed | 0.
|
21
|
-
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:4:1] | passed | 0.
|
22
|
-
./spec/models/concerns/blacklight_heatmaps/point_spec.rb[1:1:1] | passed | 0.
|
23
|
-
./spec/models/concerns/blacklight_heatmaps/point_spec.rb[1:2:1] | passed | 0.
|
24
|
-
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:1:1:1] | passed | 0.
|
25
|
-
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:1:2:1] | passed | 0.
|
26
|
-
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:2:1] | passed | 0.
|
27
|
-
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:3:1] | passed | 0.
|
28
|
-
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:4:1] | passed | 0.
|
29
|
-
./spec/views/catalog/_document_heatmaps.html.erb_spec.rb[1:1] | passed | 0.
|
30
|
-
./spec/views/catalog/_show_leaflet_map_default.html.erb_spec.rb[1:1:1] | passed | 0.
|
31
|
-
./spec/views/catalog/_show_leaflet_map_default.html.erb_spec.rb[1:2:1] | passed | 0.
|
3
|
+
./spec/features/configurable_basemap_spec.rb[1:1] | passed | 0.16395 seconds |
|
4
|
+
./spec/features/configurable_basemap_spec.rb[1:2:1] | passed | 0.13941 seconds |
|
5
|
+
./spec/features/configurable_basemap_spec.rb[1:3:1] | passed | 0.16693 seconds |
|
6
|
+
./spec/features/index_page_map_spec.rb[1:1] | passed | 10.89 seconds |
|
7
|
+
./spec/features/show_page_map_spec.rb[1:1] | passed | 0.1382 seconds |
|
8
|
+
./spec/features/show_page_map_spec.rb[1:2] | passed | 0.17365 seconds |
|
9
|
+
./spec/helpers/blacklight/maps_helper_spec.rb[1:1:1] | passed | 0.00406 seconds |
|
10
|
+
./spec/helpers/blacklight/maps_helper_spec.rb[1:2:1] | passed | 0.00331 seconds |
|
11
|
+
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:1:1] | passed | 0.00006 seconds |
|
12
|
+
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:2:1] | passed | 0.00006 seconds |
|
13
|
+
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:3:1] | passed | 0.00008 seconds |
|
14
|
+
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:4:1] | passed | 0.00006 seconds |
|
15
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_parser_spec.rb[1:1:1:1] | passed | 0.00012 seconds |
|
16
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_parser_spec.rb[1:1:2:1] | passed | 0.00077 seconds |
|
17
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_parser_spec.rb[1:1:3:1] | passed | 0.00193 seconds |
|
18
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:1:1] | passed | 0.0006 seconds |
|
19
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:2:1] | passed | 0.00008 seconds |
|
20
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:3:1] | passed | 0.00028 seconds |
|
21
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:4:1] | passed | 0.00014 seconds |
|
22
|
+
./spec/models/concerns/blacklight_heatmaps/point_spec.rb[1:1:1] | passed | 0.00008 seconds |
|
23
|
+
./spec/models/concerns/blacklight_heatmaps/point_spec.rb[1:2:1] | passed | 0.00007 seconds |
|
24
|
+
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:1:1:1] | passed | 0.00163 seconds |
|
25
|
+
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:1:2:1] | passed | 0.00427 seconds |
|
26
|
+
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:2:1] | passed | 0.05584 seconds |
|
27
|
+
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:3:1] | passed | 0.00206 seconds |
|
28
|
+
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:4:1] | passed | 0.00917 seconds |
|
29
|
+
./spec/views/catalog/_document_heatmaps.html.erb_spec.rb[1:1] | passed | 0.0042 seconds |
|
30
|
+
./spec/views/catalog/_show_leaflet_map_default.html.erb_spec.rb[1:1:1] | passed | 0.00266 seconds |
|
31
|
+
./spec/views/catalog/_show_leaflet_map_default.html.erb_spec.rb[1:2:1] | passed | 0.00446 seconds |
|
@@ -26,6 +26,7 @@ describe Blacklight::MapsHelper do
|
|
26
26
|
.to have_css '[data-basemap-provider="positron"]'
|
27
27
|
expect(helper.index_map_div).to have_css '[data-sidebar-template]'
|
28
28
|
expect(helper.index_map_div).to have_css '[data-color-ramp]'
|
29
|
+
expect(helper.index_map_div).to have_css '[role="region"]'
|
29
30
|
expect(helper.index_map_div).to have_css '[aria-label="heatmap"]'
|
30
31
|
end
|
31
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight_heatmaps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jack Reed
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -36,7 +36,7 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
39
|
+
version: 7.17.1
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '9'
|
@@ -46,7 +46,7 @@ dependencies:
|
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version:
|
49
|
+
version: 7.17.1
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '9'
|
@@ -180,6 +180,7 @@ files:
|
|
180
180
|
- app/assets/javascripts/blacklight_heatmaps/viewers/index.js
|
181
181
|
- app/assets/javascripts/blacklight_heatmaps/viewers/show.js
|
182
182
|
- app/assets/stylesheets/blacklight_heatmaps/default.scss
|
183
|
+
- app/components/blacklight_heatmaps/icons/heatmaps_component.rb
|
183
184
|
- app/controllers/blacklight_heatmaps/application_controller.rb
|
184
185
|
- app/helpers/blacklight/maps_helper.rb
|
185
186
|
- app/models/concerns/blacklight_heatmaps/bounding_box.rb
|
@@ -241,7 +242,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
241
242
|
- !ruby/object:Gem::Version
|
242
243
|
version: '0'
|
243
244
|
requirements: []
|
244
|
-
rubygems_version: 3.5.
|
245
|
+
rubygems_version: 3.5.23
|
245
246
|
signing_key:
|
246
247
|
specification_version: 4
|
247
248
|
summary: Search and view Blacklight resources on a map.
|