blacklight_heatmaps 1.2.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d17c7141af8d62f449bd775e630d6025aaf0bac17246624d69a2f7670362c32f
4
- data.tar.gz: 005c68a070804d833652823aacfa4c0e132a5dcf58c6b59acba858ce7a21691d
3
+ metadata.gz: e5f792dd3439c90b1cc83ab1795075b47fa180e3ded27fad4f48105d967633e0
4
+ data.tar.gz: ff7a0845972e091916328f5eb3d3fb48fdb0517a5529adabc98509a83940c93b
5
5
  SHA512:
6
- metadata.gz: 5a5699ecdf0aa29be155b2d2f958782788956941504b2bbf1b3fe4040984c37256298c544064f2e730bc2b600e3b553824f62b311000271e4d5bed36e788ac16
7
- data.tar.gz: db83dfacd91ab4030ad762d9cefdd863b01c78103082d175b09f4c0cfe6cfaf2d4369003222b4aa15837a25d8f074fb62ab0aae11e2117a5cd60189b95929e7b
6
+ metadata.gz: d80757994c735f385cff5ba8cddca36b7c32915bfffed7dd702ffcbc5e8faddf76f5feca22bd3bc1fc9a1feff35d16a751ed2b78daaafa48ea849d27e5d46ad3
7
+ data.tar.gz: 727bd1fd654f14b78b963154fbf1ef4ea83575a2bbeb59fc504af6dd0fab53958184d6a0561a493bb3a3bdc250155574053c277ecd902ace3302bb0bb9dd3fdb
@@ -0,0 +1,8 @@
1
+ //= require leaflet
2
+ //= require L.Control.Sidebar
3
+ import 'blacklight-heatmaps/vendor/assets/javascripts/leaflet_solr_heatmap'
4
+ import 'blacklight_heatmaps'
5
+ import 'basemaps'
6
+ import 'icons'
7
+ import 'viewers/index'
8
+ import 'viewers/show'
@@ -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" fill="currentColor" 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=\"{url}\"}>
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
 
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ pin_all_from File.expand_path('../app/assets/javascripts/blacklight_heatmaps', __dir__), under: 'blacklight_heatmaps'
4
+ pin_all_from File.expand_path('../vendor/assets/javascripts', __dir__)
@@ -14,5 +14,9 @@ module BlacklightHeatmaps
14
14
  end
15
15
  end
16
16
  end
17
+
18
+ initializer "blacklight_heatmaps.importmap", before: "importmap" do |app|
19
+ app.config.importmap.paths << Engine.root.join("config/importmap.rb") if app.config.respond_to?(:importmap)
20
+ end
17
21
  end
18
22
  end
@@ -1,3 +1,3 @@
1
1
  module BlacklightHeatmaps
2
- VERSION = "1.2.0"
2
+ VERSION = '1.3.1'
3
3
  end
@@ -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: [], color_ramp: ['#ffffcc', '#a1dab4', '#41b6c4', '#2c7fb8', '#253494'])" \
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
@@ -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.2.0
4
+ version: 1.3.1
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-10-24 00:00:00.000000000 Z
11
+ date: 2024-12-17 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: '7.16'
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: '7.16'
49
+ version: 7.17.1
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
52
  version: '9'
@@ -176,10 +176,12 @@ files:
176
176
  - app/assets/javascripts/blacklight_heatmaps/basemaps.js
177
177
  - app/assets/javascripts/blacklight_heatmaps/blacklight_heatmaps.js
178
178
  - app/assets/javascripts/blacklight_heatmaps/default.js
179
- - app/assets/javascripts/blacklight_heatmaps/icons.js.erb
179
+ - app/assets/javascripts/blacklight_heatmaps/icons.js
180
180
  - app/assets/javascripts/blacklight_heatmaps/viewers/index.js
181
181
  - app/assets/javascripts/blacklight_heatmaps/viewers/show.js
182
+ - app/assets/javascripts/index.js
182
183
  - app/assets/stylesheets/blacklight_heatmaps/default.scss
184
+ - app/components/blacklight_heatmaps/icons/heatmaps_component.rb
183
185
  - app/controllers/blacklight_heatmaps/application_controller.rb
184
186
  - app/helpers/blacklight/maps_helper.rb
185
187
  - app/models/concerns/blacklight_heatmaps/bounding_box.rb
@@ -192,6 +194,7 @@ files:
192
194
  - app/views/catalog/_show_leaflet_map_default.html.erb
193
195
  - app/views/catalog/index.heatmaps.jbuilder
194
196
  - app/views/layouts/blacklight_heatmaps/application.html.erb
197
+ - config/importmap.rb
195
198
  - config/locales/blacklight-heatmaps.en.yml
196
199
  - config/locales/blacklight-heatmaps.es.yml
197
200
  - config/locales/blacklight-heatmaps.pt-BR.yml
@@ -203,7 +206,6 @@ files:
203
206
  - lib/generators/blacklight_heatmaps/templates/blacklight_heatmaps.js
204
207
  - lib/generators/blacklight_heatmaps/templates/blacklight_heatmaps.scss
205
208
  - lib/tasks/blacklight_heatmaps_tasks.rake
206
- - spec/examples.txt
207
209
  - spec/features/configurable_basemap_spec.rb
208
210
  - spec/features/index_page_map_spec.rb
209
211
  - spec/features/show_page_map_spec.rb
@@ -241,12 +243,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
241
243
  - !ruby/object:Gem::Version
242
244
  version: '0'
243
245
  requirements: []
244
- rubygems_version: 3.5.9
246
+ rubygems_version: 3.4.19
245
247
  signing_key:
246
248
  specification_version: 4
247
249
  summary: Search and view Blacklight resources on a map.
248
250
  test_files:
249
- - spec/examples.txt
250
251
  - spec/features/configurable_basemap_spec.rb
251
252
  - spec/features/index_page_map_spec.rb
252
253
  - spec/features/show_page_map_spec.rb
data/spec/examples.txt DELETED
@@ -1,31 +0,0 @@
1
- example_id | status | run_time |
2
- --------------------------------------------------------------------------------------- | ------ | --------------- |
3
- ./spec/features/configurable_basemap_spec.rb[1:1] | failed | 2.14 seconds |
4
- ./spec/features/configurable_basemap_spec.rb[1:2:1] | failed | 2.14 seconds |
5
- ./spec/features/configurable_basemap_spec.rb[1:3:1] | failed | 2.17 seconds |
6
- ./spec/features/index_page_map_spec.rb[1:1] | failed | 2.33 seconds |
7
- ./spec/features/show_page_map_spec.rb[1:1] | failed | 2.15 seconds |
8
- ./spec/features/show_page_map_spec.rb[1:2] | failed | 13.26 seconds |
9
- ./spec/helpers/blacklight/maps_helper_spec.rb[1:1:1] | passed | 0.0061 seconds |
10
- ./spec/helpers/blacklight/maps_helper_spec.rb[1:2:1] | passed | 0.00302 seconds |
11
- ./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:1:1] | passed | 0.00009 seconds |
12
- ./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:2:1] | passed | 0.00028 seconds |
13
- ./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:3:1] | passed | 0.0001 seconds |
14
- ./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:4:1] | passed | 0.00018 seconds |
15
- ./spec/models/concerns/blacklight_heatmaps/geometry_parser_spec.rb[1:1:1:1] | passed | 0.00016 seconds |
16
- ./spec/models/concerns/blacklight_heatmaps/geometry_parser_spec.rb[1:1:2:1] | passed | 0.00236 seconds |
17
- ./spec/models/concerns/blacklight_heatmaps/geometry_parser_spec.rb[1:1:3:1] | passed | 0.00194 seconds |
18
- ./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:1:1] | passed | 0.00093 seconds |
19
- ./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:2:1] | passed | 0.00011 seconds |
20
- ./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:3:1] | passed | 0.00107 seconds |
21
- ./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:4:1] | passed | 0.00033 seconds |
22
- ./spec/models/concerns/blacklight_heatmaps/point_spec.rb[1:1:1] | passed | 0.00006 seconds |
23
- ./spec/models/concerns/blacklight_heatmaps/point_spec.rb[1:2:1] | passed | 0.0004 seconds |
24
- ./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:1:1:1] | passed | 0.00184 seconds |
25
- ./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:1:2:1] | passed | 0.01369 seconds |
26
- ./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:2:1] | passed | 0.00369 seconds |
27
- ./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:3:1] | passed | 0.00426 seconds |
28
- ./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:4:1] | passed | 0.00213 seconds |
29
- ./spec/views/catalog/_document_heatmaps.html.erb_spec.rb[1:1] | passed | 0.01306 seconds |
30
- ./spec/views/catalog/_show_leaflet_map_default.html.erb_spec.rb[1:1:1] | passed | 0.00263 seconds |
31
- ./spec/views/catalog/_show_leaflet_map_default.html.erb_spec.rb[1:2:1] | passed | 0.00492 seconds |