blacklight 9.0.0.beta6 → 9.0.0.beta7
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/matrix.json +8 -1
- data/.solr_wrapper.yml +1 -1
- data/VERSION +1 -1
- data/app/assets/javascripts/blacklight/blacklight.esm.js +2 -1
- data/app/assets/javascripts/blacklight/blacklight.esm.js.map +1 -1
- data/app/assets/javascripts/blacklight/blacklight.js +2 -1
- data/app/assets/javascripts/blacklight/blacklight.js.map +1 -1
- data/app/components/blacklight/constraints_component.html.erb +3 -8
- data/app/components/blacklight/constraints_component.rb +57 -14
- data/app/components/blacklight/document/bookmark_component.rb +1 -1
- data/app/components/blacklight/document/page_header_component.rb +1 -1
- data/app/components/blacklight/document_component.rb +15 -16
- data/app/components/blacklight/facet_item_pivot_component.rb +4 -0
- data/app/components/blacklight/facets/item_component.rb +3 -0
- data/app/components/blacklight/facets/selected_value_component.rb +1 -1
- data/app/components/blacklight/header_component.rb +2 -2
- data/app/controllers/concerns/blacklight/catalog.rb +8 -4
- data/app/javascript/blacklight-frontend/facet_suggest.js +2 -1
- data/app/presenters/blacklight/constraint_presenter.rb +22 -0
- data/app/presenters/blacklight/facet_item_pivot_presenter.rb +1 -5
- data/app/presenters/blacklight/facet_item_presenter.rb +0 -18
- data/app/views/catalog/_document.atom.builder +1 -1
- data/app/views/catalog/_document.html.erb +1 -1
- data/app/views/catalog/_show_main_content.html.erb +1 -1
- data/blacklight.gemspec +1 -1
- data/config/locales/blacklight.ar.yml +1 -2
- data/config/locales/blacklight.ca.yml +1 -2
- data/config/locales/blacklight.de.yml +1 -2
- data/config/locales/blacklight.en.yml +1 -2
- data/config/locales/blacklight.es.yml +1 -2
- data/config/locales/blacklight.fr.yml +1 -2
- data/config/locales/blacklight.hu.yml +1 -2
- data/config/locales/blacklight.it.yml +1 -2
- data/config/locales/blacklight.nl.yml +1 -2
- data/config/locales/blacklight.pt-BR.yml +1 -2
- data/config/locales/blacklight.sq.yml +1 -2
- data/config/locales/blacklight.zh.yml +1 -2
- data/lib/blacklight/component.rb +5 -1
- data/lib/blacklight/configuration/facet_field.rb +2 -0
- data/lib/blacklight/configuration.rb +2 -0
- data/lib/generators/blacklight/templates/.solr_wrapper.yml +1 -1
- data/package.json +1 -1
- data/spec/components/blacklight/constraints_component_spec.rb +2 -2
- data/spec/components/blacklight/document_component_spec.rb +9 -9
- data/spec/components/blacklight/facets/index_navigation_component_spec.rb +2 -1
- data/spec/components/blacklight/facets/suggest_component_spec.rb +2 -1
- data/spec/features/search_filters_spec.rb +3 -3
- data/spec/features/search_spec.rb +3 -3
- data/spec/presenters/blacklight/constraint_presenter_spec.rb +32 -0
- data/spec/presenters/blacklight/facet_item_presenter_spec.rb +0 -7
- data/spec/support/presenter_test_helpers.rb +1 -1
- data/spec/views/catalog/index.atom.builder_spec.rb +2 -0
- metadata +16 -7
@@ -53,7 +53,7 @@ RSpec.describe "Facets" do
|
|
53
53
|
expect(page).to have_css("span.facet-count.selected", text: "2")
|
54
54
|
end
|
55
55
|
within "#appliedParams" do
|
56
|
-
expect(page).to have_content "
|
56
|
+
expect(page).to have_content "Your selections:"
|
57
57
|
expect(page).to have_content "history"
|
58
58
|
end
|
59
59
|
|
@@ -140,7 +140,7 @@ RSpec.describe "Facets" do
|
|
140
140
|
expect(page).to have_css("span.facet-count.selected", text: "2")
|
141
141
|
end
|
142
142
|
within "#appliedParams" do
|
143
|
-
expect(page).to have_content "
|
143
|
+
expect(page).to have_content "Your selections:"
|
144
144
|
expect(page).to have_content "history"
|
145
145
|
end
|
146
146
|
end
|
@@ -164,7 +164,7 @@ RSpec.describe "Facets" do
|
|
164
164
|
expect(page).to have_css("span.facet-count.selected", text: "2")
|
165
165
|
end
|
166
166
|
within "#appliedParams" do
|
167
|
-
expect(page).to have_content "
|
167
|
+
expect(page).to have_content "Your selections:"
|
168
168
|
expect(page).to have_content "history"
|
169
169
|
end
|
170
170
|
end
|
@@ -44,7 +44,7 @@ RSpec.describe "Search Page" do
|
|
44
44
|
Capybara.ignore_hidden_elements = tmp_value
|
45
45
|
|
46
46
|
within "#appliedParams" do
|
47
|
-
expect(page).to have_content "
|
47
|
+
expect(page).to have_content "Your selections:"
|
48
48
|
expect(page).to have_content "history"
|
49
49
|
end
|
50
50
|
|
@@ -74,7 +74,7 @@ RSpec.describe "Search Page" do
|
|
74
74
|
click_on 'search'
|
75
75
|
|
76
76
|
within "#appliedParams" do
|
77
|
-
expect(page).to have_content "
|
77
|
+
expect(page).to have_content "Your selections:"
|
78
78
|
expect(page).to have_content "Title"
|
79
79
|
expect(page).to have_content "inmul"
|
80
80
|
end
|
@@ -104,7 +104,7 @@ RSpec.describe "Search Page" do
|
|
104
104
|
fill_in "q", with: 'history'
|
105
105
|
click_on 'search'
|
106
106
|
within "#appliedParams" do
|
107
|
-
expect(page).to have_content "
|
107
|
+
expect(page).to have_content "Your selections:"
|
108
108
|
expect(page).to have_content "history"
|
109
109
|
end
|
110
110
|
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
RSpec.describe Blacklight::ConstraintPresenter, type: :presenter do
|
6
|
+
subject(:presenter) do
|
7
|
+
described_class.new(facet_item_presenter: facet_item_presenter, field_label: field_label)
|
8
|
+
end
|
9
|
+
|
10
|
+
let(:facet_item_presenter) do
|
11
|
+
instance_double(Blacklight::FacetItemPresenter, label: 'item 1', remove_href: '/catalog')
|
12
|
+
end
|
13
|
+
let(:field_label) { 'field 1' }
|
14
|
+
|
15
|
+
describe '#constraint_label' do
|
16
|
+
subject { presenter.constraint_label }
|
17
|
+
|
18
|
+
it { is_expected.to eq 'item 1' }
|
19
|
+
end
|
20
|
+
|
21
|
+
describe '#field_label' do
|
22
|
+
subject { presenter.field_label }
|
23
|
+
|
24
|
+
it { is_expected.to eq 'field 1' }
|
25
|
+
end
|
26
|
+
|
27
|
+
describe '#remove_href' do
|
28
|
+
subject { presenter.remove_href }
|
29
|
+
|
30
|
+
it { is_expected.to eq '/catalog' }
|
31
|
+
end
|
32
|
+
end
|
@@ -56,13 +56,6 @@ RSpec.describe Blacklight::FacetItemPresenter, type: :presenter do
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
-
describe '#constraint_label' do
|
60
|
-
it 'provides the label for the constraint' do
|
61
|
-
allow(facet_config).to receive_messages(query: nil, date: nil, helper_method: nil, url_method: nil)
|
62
|
-
expect(presenter.constraint_label).to eq presenter.label
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
59
|
describe '#href' do
|
67
60
|
let(:filter_field) { instance_double(Blacklight::SearchState::FilterField, include?: false) }
|
68
61
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module PresenterTestHelpers
|
4
4
|
def controller
|
5
|
-
@controller ||=
|
5
|
+
@controller ||= ApplicationController.new.tap { |c| c.request = request }.extend(Rails.application.routes.url_helpers)
|
6
6
|
end
|
7
7
|
|
8
8
|
def request
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.0.0.
|
4
|
+
version: 9.0.0.beta7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Rochkind
|
@@ -16,7 +16,7 @@ authors:
|
|
16
16
|
- Justin Coyne
|
17
17
|
bindir: exe
|
18
18
|
cert_chain: []
|
19
|
-
date:
|
19
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: rails
|
@@ -112,16 +112,22 @@ dependencies:
|
|
112
112
|
name: view_component
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '3.0'
|
118
|
+
- - "<"
|
116
119
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
120
|
+
version: '5.0'
|
118
121
|
type: :runtime
|
119
122
|
prerelease: false
|
120
123
|
version_requirements: !ruby/object:Gem::Requirement
|
121
124
|
requirements:
|
122
|
-
- - "
|
125
|
+
- - ">="
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '3.0'
|
128
|
+
- - "<"
|
123
129
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
130
|
+
version: '5.0'
|
125
131
|
- !ruby/object:Gem::Dependency
|
126
132
|
name: zeitwerk
|
127
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -632,6 +638,7 @@ files:
|
|
632
638
|
- app/models/search_builder.rb
|
633
639
|
- app/models/solr_document.rb
|
634
640
|
- app/presenters/blacklight/clause_presenter.rb
|
641
|
+
- app/presenters/blacklight/constraint_presenter.rb
|
635
642
|
- app/presenters/blacklight/document_presenter.rb
|
636
643
|
- app/presenters/blacklight/facet_checkbox_item_presenter.rb
|
637
644
|
- app/presenters/blacklight/facet_field_presenter.rb
|
@@ -960,6 +967,7 @@ files:
|
|
960
967
|
- spec/models/search_spec.rb
|
961
968
|
- spec/models/solr_document_spec.rb
|
962
969
|
- spec/presenters/blacklight/clause_presenter_spec.rb
|
970
|
+
- spec/presenters/blacklight/constraint_presenter_spec.rb
|
963
971
|
- spec/presenters/blacklight/document_presenter_spec.rb
|
964
972
|
- spec/presenters/blacklight/facet_checkbox_item_presenter_spec.rb
|
965
973
|
- spec/presenters/blacklight/facet_field_presenter_spec.rb
|
@@ -1023,7 +1031,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1023
1031
|
- !ruby/object:Gem::Version
|
1024
1032
|
version: '0'
|
1025
1033
|
requirements: []
|
1026
|
-
rubygems_version: 3.6.
|
1034
|
+
rubygems_version: 3.6.9
|
1027
1035
|
specification_version: 4
|
1028
1036
|
summary: Blacklight provides a discovery interface for any Solr (http://lucene.apache.org/solr)
|
1029
1037
|
index.
|
@@ -1144,6 +1152,7 @@ test_files:
|
|
1144
1152
|
- spec/models/search_spec.rb
|
1145
1153
|
- spec/models/solr_document_spec.rb
|
1146
1154
|
- spec/presenters/blacklight/clause_presenter_spec.rb
|
1155
|
+
- spec/presenters/blacklight/constraint_presenter_spec.rb
|
1147
1156
|
- spec/presenters/blacklight/document_presenter_spec.rb
|
1148
1157
|
- spec/presenters/blacklight/facet_checkbox_item_presenter_spec.rb
|
1149
1158
|
- spec/presenters/blacklight/facet_field_presenter_spec.rb
|