blacklight_range_limit 8.2.3 → 8.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +6 -5
- data/Gemfile +19 -6
- data/README.md +5 -14
- data/VERSION +1 -1
- data/app/assets/javascripts/blacklight_range_limit/range_limit_distro_facets.js +5 -2
- data/app/assets/javascripts/blacklight_range_limit/range_limit_shared.js +58 -73
- data/app/assets/javascripts/blacklight_range_limit/range_limit_slider.js +6 -3
- data/app/components/blacklight_range_limit/range_facet_component.html.erb +3 -3
- data/app/components/blacklight_range_limit/range_facet_component.rb +1 -1
- data/app/components/blacklight_range_limit/range_form_component.rb +1 -1
- data/app/components/blacklight_range_limit/range_segments_component.rb +1 -1
- data/blacklight_range_limit.gemspec +2 -2
- data/lib/blacklight_range_limit/engine.rb +0 -8
- data/package.json +29 -0
- data/spec/components/range_facet_component_spec.rb +3 -2
- data/spec/components/range_form_component_spec.rb +3 -2
- data/spec/spec_helper.rb +0 -1
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +0 -7
- metadata +43 -36
- /data/app/assets/stylesheets/{blacklight_range_limit.css.scss → blacklight_range_limit.css} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 510a2e212fd11cacd9e7a83be02dec8ddec4f5e3e551fb64187f022825ae2661
|
4
|
+
data.tar.gz: c7505814e1172ff021da4ecd65fc7085639771138cf557cf6343707cad9ad577
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c6ef8dd3df728ab8790ddb050ab05f4ff1d72053410af3a138891160f9cb00d287d341586463e6e91081ea271f6c2afaa08773420177d3d455f966fa366b789
|
7
|
+
data.tar.gz: 8c91836e3eaa68af79f7192d18a81a1c0d57f3d6f8d49d0a1fa278ffc657dc597bfe01294e12e87f7954972c3a9f47ac1cd8a479a9279292b81d20cb637de791
|
data/.github/workflows/ruby.yml
CHANGED
@@ -20,16 +20,17 @@ jobs:
|
|
20
20
|
strategy:
|
21
21
|
matrix:
|
22
22
|
ruby: [2.7, '3.0']
|
23
|
-
rails_version: ['6.1.
|
23
|
+
rails_version: ['6.1.7.1', '7.0.4.1']
|
24
24
|
additional_engine_cart_rails_options: ['']
|
25
25
|
include:
|
26
|
-
- ruby: '2
|
27
|
-
rails_version: '
|
26
|
+
- ruby: '3.2'
|
27
|
+
rails_version: '7.0.4.1'
|
28
28
|
- ruby: '3.1'
|
29
|
-
rails_version: '7.0.
|
29
|
+
rails_version: '7.0.4.1'
|
30
30
|
- ruby: '3.0'
|
31
|
-
rails_version: '7.0.
|
31
|
+
rails_version: '7.0.4.1'
|
32
32
|
env:
|
33
|
+
BLACKLIGHT_VERSION: "~> 7.0" # only test on BL 7 for now
|
33
34
|
RAILS_VERSION: ${{ matrix.rails_version }}
|
34
35
|
ENGINE_CART_RAILS_OPTIONS: "--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test ${{ matrix.engine_cart_rails_options }}"
|
35
36
|
steps:
|
data/Gemfile
CHANGED
@@ -9,9 +9,17 @@ group :test do
|
|
9
9
|
gem 'activerecord-jdbcsqlite3-adapter', platform: :jruby
|
10
10
|
end
|
11
11
|
|
12
|
+
# While gemspec allows BL8 and some people are using BL8... the build
|
13
|
+
# has never actually passed on BL8 yet. We may choose to run tests on
|
14
|
+
# a blacklight version other than the latest allowed by gemspec, to get
|
15
|
+
# tests to pass, or to test on older BL still supported here.
|
16
|
+
if ENV['BLACKLIGHT_VERSION']
|
17
|
+
gem "blacklight", ENV['BLACKLIGHT_VERSION']
|
18
|
+
end
|
19
|
+
|
12
20
|
# BEGIN ENGINE_CART BLOCK
|
13
|
-
# engine_cart:
|
14
|
-
# engine_cart stanza:
|
21
|
+
# engine_cart: 2.5.0
|
22
|
+
# engine_cart stanza: 2.5.0
|
15
23
|
# the below comes from engine_cart, a gem used to test this Rails engine gem in the context of a Rails app.
|
16
24
|
file = File.expand_path('Gemfile', ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path('.internal_test_app', File.dirname(__FILE__)))
|
17
25
|
if File.exist?(file)
|
@@ -31,11 +39,16 @@ else
|
|
31
39
|
else
|
32
40
|
gem 'rails', ENV['RAILS_VERSION']
|
33
41
|
end
|
34
|
-
end
|
35
42
|
|
36
|
-
|
37
|
-
|
38
|
-
|
43
|
+
case ENV['RAILS_VERSION']
|
44
|
+
when /^6.0/
|
45
|
+
gem 'sass-rails', '>= 6'
|
46
|
+
gem 'webpacker', '~> 4.0'
|
47
|
+
when /^5.[12]/
|
48
|
+
gem 'sass-rails', '~> 5.0'
|
49
|
+
gem 'sprockets', '~> 3.7'
|
50
|
+
gem 'thor', '~> 0.20'
|
51
|
+
end
|
39
52
|
end
|
40
53
|
end
|
41
54
|
# END ENGINE_CART BLOCK
|
data/README.md
CHANGED
@@ -102,7 +102,7 @@ config.add_facet_field 'pub_date', label: 'Publication Year',
|
|
102
102
|
|
103
103
|
## Javascript dependencies
|
104
104
|
|
105
|
-
The selectable histograms/barcharts are done with Javascript, using [Flot](http://code.google.com/p/flot/). Flot requires JQuery, as well as support for the HTML5 canvas element.
|
105
|
+
The selectable histograms/barcharts are done with Javascript, using [Flot](http://code.google.com/p/flot/). Flot requires JQuery, as well as support for the HTML5 canvas element. For the slider, [bootstrap-slider](http://www.eyecon.ro/bootstrap-slider/) is used (bootstrap-slider is actually third party, not officially bootstrap). Flot and bootstrap-slider are both directly included in blacklight_range_limit in vendor, rather than referenced as dependencies.
|
106
106
|
|
107
107
|
The blacklight_range_limit installer will add `require 'blacklight_range_limit'` to your `application.js` sprockets manifest. This will include flot, bootstrap-slider, and the blacklight_range_limit glue JS.
|
108
108
|
|
@@ -110,19 +110,6 @@ Both flot and blacklight_range_limit's own JS depend on JQuery; the host app is
|
|
110
110
|
|
111
111
|
If you don't want any of this gem's JS, you can simply remove the `require 'blacklight_range_limit'` line from your application.js, and hack something else together yourself.
|
112
112
|
|
113
|
-
## IE8, excanvas
|
114
|
-
|
115
|
-
IE8 and below do not support the 'canvas' element, needed for flot to render the chart.
|
116
|
-
Without canvas, view will cleanly degrade to an ordinary textual listing of range segments
|
117
|
-
as facets.
|
118
|
-
|
119
|
-
Or, you can use excanvas.js to add canvas support to IE. `blacklight_range_limit` includes
|
120
|
-
the `excanvas.js` file, but you'll have to manually add a reference to it to your Rails layout
|
121
|
-
template -- if you were previously using the stock Blacklight layout, you'll have to add a
|
122
|
-
local custom layout instead. Then add this to the html `<head>` section:
|
123
|
-
|
124
|
-
<!--[if lte IE 8]><%= javascript_include_tag 'flot/excanvas.min' %><![endif]-->
|
125
|
-
|
126
113
|
## Touch?
|
127
114
|
|
128
115
|
For touch screens, one wants the UI to work well. The slider used is
|
@@ -182,6 +169,10 @@ bundle exec rspec spec/features/blacklight_range_limit_spec.rb
|
|
182
169
|
|
183
170
|
Once you are done iterating on your test you will need to stop the application server with `Ctrl-C`.
|
184
171
|
|
172
|
+
# Publishing Javascript
|
173
|
+
|
174
|
+
run `npm publish` to push the javascript package to https://npmjs.org/package/blacklight-range-limit
|
175
|
+
|
185
176
|
# Possible future To Do
|
186
177
|
|
187
178
|
* StatsComponent replacement. We use StatsComponent to get min/max of result set, as well as missing count. StatsComponent is included on every non-drilldown request, so ranges and slider can be displayed. However, StatsComponent really can slow down the solr response with a large result set. So replace StatsComponent with other strategies. No ideal ones, we can use facet.missing to get missing count instead, but RSolr makes it harder than it should be to grab this info. We can use seperate solr queries to get min/max (sort on our field, asc and desc), but this is more complicated, more solr queries, and possibly requires redesign of AJAXy stuff, so even a lone slider can have min/max.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
8.
|
1
|
+
8.4.0
|
@@ -31,8 +31,11 @@ Blacklight.onLoad(function() {
|
|
31
31
|
}
|
32
32
|
});
|
33
33
|
|
34
|
+
// Support for Blacklight 7 and 8:
|
35
|
+
const modalSelector = Blacklight.modal?.modalSelector || Blacklight.Modal.modalSelector
|
36
|
+
|
34
37
|
// When loaded in a modal
|
35
|
-
$(
|
38
|
+
$(modalSelector).on('shown.bs.modal', function() {
|
36
39
|
$(this).find(".range_limit .profile .distribution.chart_js ul").each(function() {
|
37
40
|
BlacklightRangeLimit.turnIntoPlot($(this).parent());
|
38
41
|
});
|
@@ -51,7 +54,7 @@ Blacklight.onLoad(function() {
|
|
51
54
|
// be triggered. The function will be called after it stops being called for
|
52
55
|
// N milliseconds. If `immediate` is passed, trigger the function on the
|
53
56
|
// leading edge, instead of the trailing.
|
54
|
-
debounce = function(func, wait, immediate) {
|
57
|
+
const debounce = function(func, wait, immediate) {
|
55
58
|
var timeout;
|
56
59
|
return function() {
|
57
60
|
var context = this, args = arguments;
|
@@ -1,88 +1,73 @@
|
|
1
1
|
/**
|
2
|
-
*
|
2
|
+
* BlacklightRangeLimit module setup.
|
3
3
|
*/
|
4
|
-
|
5
|
-
'use strict';
|
4
|
+
'use strict';
|
6
5
|
|
7
|
-
|
6
|
+
const BlacklightRangeLimit = function (options) {
|
7
|
+
this.options = options || {};
|
8
|
+
}
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
/* A custom event "plotDrawn.blacklight.rangeLimit" will be sent when flot plot
|
15
|
-
is (re-)drawn on screen possibly with a new size. target of event will be the DOM element
|
16
|
-
containing the plot. Used to resize slider to match. */
|
17
|
-
BlacklightRangeLimit.redrawnEvent = "plotDrawn.blacklight.rangeLimit";
|
18
|
-
|
19
|
-
// takes a string and parses into an integer, but throws away commas first, to avoid truncation when there is a comma
|
20
|
-
// use in place of javascript's native parseInt
|
21
|
-
BlacklightRangeLimit.parseNum = function parseNum(str) {
|
22
|
-
str = String(str).replace(/[^0-9-]/g, '');
|
23
|
-
return parseInt(str, 10);
|
24
|
-
};
|
10
|
+
BlacklightRangeLimit.display_ratio = 1/(1.618 * 2); // half a golden rectangle, why not
|
11
|
+
/* A custom event "plotDrawn.blacklight.rangeLimit" will be sent when flot plot
|
12
|
+
is (re-)drawn on screen possibly with a new size. target of event will be the DOM element
|
13
|
+
containing the plot. Used to resize slider to match. */
|
14
|
+
BlacklightRangeLimit.redrawnEvent = "plotDrawn.blacklight.rangeLimit";
|
25
15
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
if (isNaN(end_val) || end_val > max) {
|
33
|
-
end_val = max;
|
34
|
-
}
|
16
|
+
// takes a string and parses into an integer, but throws away commas first, to avoid truncation when there is a comma
|
17
|
+
// use in place of javascript's native parseInt
|
18
|
+
BlacklightRangeLimit.parseNum = function parseNum(str) {
|
19
|
+
str = String(str).replace(/[^0-9-]/g, '');
|
20
|
+
return parseInt(str, 10);
|
21
|
+
};
|
35
22
|
|
36
|
-
|
23
|
+
BlacklightRangeLimit.form_selection = function form_selection(form, min, max) {
|
24
|
+
var begin_val = BlacklightRangeLimit.parseNum($(form).find("input.range_begin").val());
|
25
|
+
if (isNaN(begin_val) || begin_val < min) {
|
26
|
+
begin_val = min;
|
37
27
|
}
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
$(".range_limit .profile .distribution a.load_distribution").each(function() {
|
42
|
-
var container = $(this).parent('div.distribution');
|
43
|
-
|
44
|
-
$(container).load($(this).attr('href'), function(response, status) {
|
45
|
-
if ($(container).hasClass("chart_js") && status == "success" ) {
|
46
|
-
BlacklightRangeLimit.turnIntoPlot(container);
|
47
|
-
}
|
48
|
-
});
|
49
|
-
});
|
28
|
+
var end_val = BlacklightRangeLimit.parseNum($(form).find("input.range_end").val());
|
29
|
+
if (isNaN(end_val) || end_val > max) {
|
30
|
+
end_val = max;
|
50
31
|
}
|
51
32
|
|
52
|
-
BlacklightRangeLimit.
|
53
|
-
|
54
|
-
for (var i = pointer_lookup_arr.length-1 ; i >= 0 ; i--) {
|
55
|
-
var hash = pointer_lookup_arr[i];
|
56
|
-
if (x_coord >= hash.from)
|
57
|
-
return hash;
|
58
|
-
}
|
59
|
-
return pointer_lookup_arr[0];
|
60
|
-
};
|
61
|
-
}
|
33
|
+
return BlacklightRangeLimit.normalized_selection(begin_val, end_val);
|
34
|
+
}
|
62
35
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
BlacklightRangeLimit.normalized_selection = function normalized_selection(min, max) {
|
68
|
-
max += 0.99999;
|
36
|
+
// Add AJAX fetched range facets if needed, and add a chart to em
|
37
|
+
BlacklightRangeLimit.checkForNeededFacetsToFetch = function checkForNeededFacetsToFetch() {
|
38
|
+
$(".range_limit .profile .distribution a.load_distribution").each(function() {
|
39
|
+
var container = $(this).parent('div.distribution');
|
69
40
|
|
70
|
-
|
71
|
-
|
41
|
+
$(container).load($(this).attr('href'), function(response, status) {
|
42
|
+
if ($(container).hasClass("chart_js") && status == "success" ) {
|
43
|
+
BlacklightRangeLimit.turnIntoPlot(container);
|
44
|
+
}
|
45
|
+
});
|
46
|
+
});
|
47
|
+
}
|
72
48
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
49
|
+
BlacklightRangeLimit.function_for_find_segment = function function_for_find_segment(pointer_lookup_arr) {
|
50
|
+
return function(x_coord) {
|
51
|
+
for (var i = pointer_lookup_arr.length-1 ; i >= 0 ; i--) {
|
52
|
+
var hash = pointer_lookup_arr[i];
|
53
|
+
if (x_coord >= hash.from)
|
54
|
+
return hash;
|
55
|
+
}
|
56
|
+
return pointer_lookup_arr[0];
|
57
|
+
};
|
58
|
+
}
|
78
59
|
|
79
|
-
|
80
|
-
|
60
|
+
// Send endpoint to endpoint+0.99999 to have display
|
61
|
+
// more closely approximate limiting behavior esp
|
62
|
+
// at small resolutions. (Since we search on whole numbers,
|
63
|
+
// inclusive, but flot chart is decimal.)
|
64
|
+
BlacklightRangeLimit.normalized_selection = function normalized_selection(min, max) {
|
65
|
+
max += 0.99999;
|
81
66
|
|
82
|
-
|
83
|
-
|
84
|
-
return BlacklightRangeLimit;
|
85
|
-
};
|
67
|
+
return {xaxis: { 'from':min, 'to':max}}
|
68
|
+
}
|
86
69
|
|
87
|
-
|
88
|
-
|
70
|
+
// Check if Flot is loaded
|
71
|
+
BlacklightRangeLimit.domDependenciesMet = function domDependenciesMet() {
|
72
|
+
return typeof $.plot != "undefined"
|
73
|
+
}
|
@@ -6,7 +6,10 @@ Blacklight.onLoad(function() {
|
|
6
6
|
BlacklightRangeLimit.buildSlider(this);
|
7
7
|
});
|
8
8
|
|
9
|
-
|
9
|
+
// Support for Blacklight 7 and 8:
|
10
|
+
const modalSelector = Blacklight.modal?.modalSelector || Blacklight.Modal.modalSelector
|
11
|
+
|
12
|
+
$(modalSelector).on('shown.bs.modal', function() {
|
10
13
|
$(this).find(".range_limit .profile .range.slider_js").each(function() {
|
11
14
|
BlacklightRangeLimit.buildSlider(this);
|
12
15
|
});
|
@@ -31,8 +34,8 @@ Blacklight.onLoad(function() {
|
|
31
34
|
// Will return NaN as min or max in case of error or other weirdness.
|
32
35
|
BlacklightRangeLimit.min_max = function min_max(range_element) {
|
33
36
|
var current_limit = $(range_element).closest(".limit_content.range_limit").find(".current")
|
34
|
-
|
35
|
-
|
37
|
+
let min, max
|
38
|
+
min = max = BlacklightRangeLimit.parseNum(current_limit.find(".single").data('blrlSingle'))
|
36
39
|
if ( isNaN(min)) {
|
37
40
|
min = BlacklightRangeLimit.parseNum(current_limit.find(".from").first().data('blrlBegin'));
|
38
41
|
max = BlacklightRangeLimit.parseNum(current_limit.find(".to").first().data('blrlEnd'));
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<%= render(@layout.new(facet_field: @facet_field)) do |component| %>
|
2
|
-
<% component.
|
2
|
+
<% component.with_label do %>
|
3
3
|
<%= @facet_field.label %>
|
4
4
|
<% end %>
|
5
5
|
|
6
|
-
<% component.
|
6
|
+
<% component.with_body do %>
|
7
7
|
<div class="limit_content range_limit <%= @facet_field.key %>-config blrl-plot-config">
|
8
8
|
<% if @facet_field.selected_range_facet_item %>
|
9
9
|
<%= render BlacklightRangeLimit::RangeSegmentsComponent.new(facet_field: @facet_field, facet_items: [@facet_field.selected_range_facet_item], classes: ['current']) %>
|
@@ -37,7 +37,7 @@
|
|
37
37
|
|
38
38
|
<%= render BlacklightRangeLimit::RangeFormComponent.new(facet_field: @facet_field, classes: @classes) %>
|
39
39
|
|
40
|
-
<%=
|
40
|
+
<%= with_more_link(key: @facet_field.key, label: @facet_field.label) unless @facet_field.in_modal? %>
|
41
41
|
|
42
42
|
<% if @facet_field.missing_facet_item && !request.xhr? %>
|
43
43
|
<%= render BlacklightRangeLimit::RangeSegmentsComponent.new(facet_field: @facet_field, facet_items: [@facet_field.missing_facet_item], classes: ['missing', 'subsection']) %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module BlacklightRangeLimit
|
4
|
-
class RangeFacetComponent < ::
|
4
|
+
class RangeFacetComponent < Blacklight::Component
|
5
5
|
renders_one :more_link, ->(key:, label:) do
|
6
6
|
tag.div class: 'more_facets' do
|
7
7
|
link_to t('blacklight.range_limit.view_larger', field_name: label),
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module BlacklightRangeLimit
|
4
|
-
class RangeFormComponent < ::
|
4
|
+
class RangeFormComponent < Blacklight::Component
|
5
5
|
delegate :search_action_path, to: :helpers
|
6
6
|
|
7
7
|
def initialize(facet_field:, classes: BlacklightRangeLimit.classes)
|
@@ -18,6 +18,8 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.license = 'Apache 2.0'
|
19
19
|
|
20
20
|
s.add_dependency 'blacklight', '>= 7.25.2', '< 9'
|
21
|
+
s.add_dependency 'view_component', ">= 2.54", "< 4"
|
22
|
+
s.add_dependency 'deprecation'
|
21
23
|
|
22
24
|
s.add_development_dependency 'rspec', '~> 3.0'
|
23
25
|
s.add_development_dependency 'rspec-rails'
|
@@ -27,6 +29,4 @@ Gem::Specification.new do |s|
|
|
27
29
|
s.add_development_dependency 'solr_wrapper'
|
28
30
|
s.add_development_dependency 'engine_cart', '~> 2.1'
|
29
31
|
s.add_development_dependency 'selenium-webdriver', '>= 3.13.1'
|
30
|
-
s.add_development_dependency 'webdrivers', '~>3.0'
|
31
|
-
s.add_development_dependency 'rexml' # pending https://github.com/SeleniumHQ/selenium/issues/9001
|
32
32
|
end
|
@@ -4,14 +4,6 @@ require 'rails'
|
|
4
4
|
|
5
5
|
module BlacklightRangeLimit
|
6
6
|
class Engine < Rails::Engine
|
7
|
-
# Need to tell asset pipeline to precompile the excanvas
|
8
|
-
# we use for IE.
|
9
|
-
initializer "blacklight_range_limit.assets", :after => "assets" do
|
10
|
-
if defined? Sprockets
|
11
|
-
Rails.application.config.assets.precompile += %w( flot/excanvas.min.js )
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
7
|
config.action_dispatch.rescue_responses.merge!(
|
16
8
|
"BlacklightRangeLimit::InvalidRange" => :not_acceptable
|
17
9
|
)
|
data/package.json
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"name": "blacklight-range-limit",
|
3
|
+
"version": "8.3.0",
|
4
|
+
"description": "A range facet UI component plugin for blacklight",
|
5
|
+
"main": "app/assets/javascripts/blacklight_range_limit",
|
6
|
+
"scripts": {
|
7
|
+
},
|
8
|
+
"repository": {
|
9
|
+
"type": "git",
|
10
|
+
"url": "git+https://github.com/projectblacklight/blacklight_range_limit.git"
|
11
|
+
},
|
12
|
+
"files": [
|
13
|
+
"app/assets", "vendor/assets"
|
14
|
+
],
|
15
|
+
"author": "",
|
16
|
+
"license": "Apache-2.0",
|
17
|
+
"bugs": {
|
18
|
+
"url": "https://github.com/projectblacklight/blacklight_range_limit/issues"
|
19
|
+
},
|
20
|
+
"homepage": "https://github.com/projectblacklight/blacklight_range_limit#readme",
|
21
|
+
"devDependencies": {
|
22
|
+
},
|
23
|
+
"browserslist": [
|
24
|
+
"defaults",
|
25
|
+
"not IE 11"
|
26
|
+
],
|
27
|
+
"dependencies": {
|
28
|
+
}
|
29
|
+
}
|
@@ -15,7 +15,6 @@ RSpec.describe BlacklightRangeLimit::RangeFacetComponent, type: :component do
|
|
15
15
|
instance_double(
|
16
16
|
BlacklightRangeLimit::FacetFieldPresenter,
|
17
17
|
key: 'key',
|
18
|
-
html_id: 'id',
|
19
18
|
active?: false,
|
20
19
|
collapsed?: false,
|
21
20
|
in_modal?: false,
|
@@ -30,7 +29,8 @@ RSpec.describe BlacklightRangeLimit::RangeFacetComponent, type: :component do
|
|
30
29
|
range_config: {},
|
31
30
|
modal_path: nil,
|
32
31
|
facet_field: facet_config,
|
33
|
-
**facet_field_params
|
32
|
+
**facet_field_params,
|
33
|
+
**extra_facet_field_params
|
34
34
|
)
|
35
35
|
end
|
36
36
|
|
@@ -39,6 +39,7 @@ RSpec.describe BlacklightRangeLimit::RangeFacetComponent, type: :component do
|
|
39
39
|
end
|
40
40
|
|
41
41
|
let(:facet_field_params) { {} }
|
42
|
+
let(:extra_facet_field_params) { Blacklight::VERSION > '8' ? {} : { html_id: 'id' } }
|
42
43
|
|
43
44
|
before do
|
44
45
|
allow(component).to receive(:search_facet_path).and_return('/range/key')
|
@@ -12,6 +12,7 @@ RSpec.describe BlacklightRangeLimit::RangeFormComponent, type: :component do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
let(:facet_field_params) { {} }
|
15
|
+
let(:extra_facet_field_params) { Blacklight::VERSION > '8' ? {} : { html_id: 'id' } }
|
15
16
|
let(:selected_range) { nil }
|
16
17
|
let(:search_params) { { another_field: 'another_value' } }
|
17
18
|
|
@@ -19,7 +20,6 @@ RSpec.describe BlacklightRangeLimit::RangeFormComponent, type: :component do
|
|
19
20
|
instance_double(
|
20
21
|
BlacklightRangeLimit::FacetFieldPresenter,
|
21
22
|
key: 'key',
|
22
|
-
html_id: 'id',
|
23
23
|
active?: false,
|
24
24
|
collapsed?: false,
|
25
25
|
in_modal?: false,
|
@@ -34,7 +34,8 @@ RSpec.describe BlacklightRangeLimit::RangeFormComponent, type: :component do
|
|
34
34
|
range_config: {},
|
35
35
|
modal_path: nil,
|
36
36
|
facet_field: facet_config,
|
37
|
-
**facet_field_params
|
37
|
+
**facet_field_params,
|
38
|
+
**extra_facet_field_params
|
38
39
|
)
|
39
40
|
end
|
40
41
|
|
data/spec/spec_helper.rb
CHANGED
@@ -30,11 +30,4 @@ class TestAppGenerator < Rails::Generators::Base
|
|
30
30
|
"\n config.add_facet_field 'pub_date_si', label: 'Publication Date Sort', **default_range_config"
|
31
31
|
end
|
32
32
|
end
|
33
|
-
|
34
|
-
def assets
|
35
|
-
return if !defined?(Sprockets::VERSION) || Sprockets::VERSION < '4'
|
36
|
-
|
37
|
-
append_to_file 'app/assets/config/manifest.js', "\n//= link application.js"
|
38
|
-
empty_directory 'app/assets/images'
|
39
|
-
end
|
40
33
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight_range_limit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.
|
4
|
+
version: 8.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Rochkind
|
8
8
|
- Chris Beer
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-11-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: blacklight
|
@@ -31,6 +31,40 @@ dependencies:
|
|
31
31
|
- - "<"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '9'
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: view_component
|
36
|
+
requirement: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.54'
|
41
|
+
- - "<"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '4'
|
44
|
+
type: :runtime
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '2.54'
|
51
|
+
- - "<"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '4'
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: deprecation
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
type: :runtime
|
62
|
+
prerelease: false
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
34
68
|
- !ruby/object:Gem::Dependency
|
35
69
|
name: rspec
|
36
70
|
requirement: !ruby/object:Gem::Requirement
|
@@ -143,35 +177,7 @@ dependencies:
|
|
143
177
|
- - ">="
|
144
178
|
- !ruby/object:Gem::Version
|
145
179
|
version: 3.13.1
|
146
|
-
|
147
|
-
name: webdrivers
|
148
|
-
requirement: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - "~>"
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '3.0'
|
153
|
-
type: :development
|
154
|
-
prerelease: false
|
155
|
-
version_requirements: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - "~>"
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '3.0'
|
160
|
-
- !ruby/object:Gem::Dependency
|
161
|
-
name: rexml
|
162
|
-
requirement: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - ">="
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: '0'
|
167
|
-
type: :development
|
168
|
-
prerelease: false
|
169
|
-
version_requirements: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - ">="
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: '0'
|
174
|
-
description:
|
180
|
+
description:
|
175
181
|
email:
|
176
182
|
- blacklight-development@googlegroups.com
|
177
183
|
executables: []
|
@@ -192,7 +198,7 @@ files:
|
|
192
198
|
- app/assets/javascripts/blacklight_range_limit/range_limit_plotting.js
|
193
199
|
- app/assets/javascripts/blacklight_range_limit/range_limit_shared.js
|
194
200
|
- app/assets/javascripts/blacklight_range_limit/range_limit_slider.js
|
195
|
-
- app/assets/stylesheets/blacklight_range_limit.css
|
201
|
+
- app/assets/stylesheets/blacklight_range_limit.css
|
196
202
|
- app/assets/stylesheets/blacklight_range_limit/blacklight_range_limit.css
|
197
203
|
- app/components/blacklight_range_limit/range_facet_component.html.erb
|
198
204
|
- app/components/blacklight_range_limit/range_facet_component.rb
|
@@ -229,6 +235,7 @@ files:
|
|
229
235
|
- lib/generators/blacklight_range_limit/assets_generator.rb
|
230
236
|
- lib/generators/blacklight_range_limit/install_generator.rb
|
231
237
|
- lib/tasks/blacklight_range_limit.rake
|
238
|
+
- package.json
|
232
239
|
- solr/conf/_rest_managed.json
|
233
240
|
- solr/conf/admin-extra.html
|
234
241
|
- solr/conf/elevate.xml
|
@@ -277,7 +284,7 @@ homepage: https://github.com/projectblacklight/blacklight_range_limit
|
|
277
284
|
licenses:
|
278
285
|
- Apache 2.0
|
279
286
|
metadata: {}
|
280
|
-
post_install_message:
|
287
|
+
post_install_message:
|
281
288
|
rdoc_options: []
|
282
289
|
require_paths:
|
283
290
|
- lib
|
@@ -292,8 +299,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
292
299
|
- !ruby/object:Gem::Version
|
293
300
|
version: '0'
|
294
301
|
requirements: []
|
295
|
-
rubygems_version: 3.
|
296
|
-
signing_key:
|
302
|
+
rubygems_version: 3.4.21
|
303
|
+
signing_key:
|
297
304
|
specification_version: 4
|
298
305
|
summary: Blacklight Range Limit plugin
|
299
306
|
test_files:
|
File without changes
|