blacklight 9.0.0.beta8 → 9.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/.env +3 -3
- data/.github/matrix.json +18 -34
- data/.github/workflows/lint.yml +1 -1
- data/.github/workflows/test.yml +4 -3
- data/.rubocop.yml +72 -7
- data/.rubocop_todo.yml +142 -268
- data/Gemfile +1 -1
- data/README.md +4 -11
- data/VERSION +1 -1
- data/app/assets/builds/blacklight.css +37 -23
- data/app/assets/images/blacklight/logo-dark.svg +184 -0
- data/app/assets/images/blacklight/logo.svg +184 -0
- data/app/assets/javascripts/blacklight/blacklight.esm.js +134 -48
- data/app/assets/javascripts/blacklight/blacklight.esm.js.map +1 -1
- data/app/assets/javascripts/blacklight/blacklight.js +134 -48
- data/app/assets/javascripts/blacklight/blacklight.js.map +1 -1
- data/app/assets/stylesheets/blacklight/_balanced_list.scss +1 -1
- data/app/assets/stylesheets/blacklight/_bootstrap_overrides.scss +17 -0
- data/app/assets/stylesheets/blacklight/_constraints.scss +2 -2
- data/app/assets/stylesheets/blacklight/_facets.scss +14 -10
- data/app/assets/stylesheets/blacklight/_header.scss +0 -4
- data/app/assets/stylesheets/blacklight/blacklight_defaults.scss +5 -9
- data/app/components/blacklight/facets/filters_component.rb +1 -1
- data/app/components/blacklight/facets/inclusive_constraint_component.html.erb +1 -1
- data/app/components/blacklight/facets/suggest_component.html.erb +17 -12
- data/app/components/blacklight/icons/checkmark_component.rb +16 -0
- data/app/components/blacklight/icons/circle_half_component.rb +16 -0
- data/app/components/blacklight/icons/moon_stars_component.rb +17 -0
- data/app/components/blacklight/icons/sun_component.rb +16 -0
- data/app/components/blacklight/metadata_field_component.rb +1 -1
- data/app/components/blacklight/search_navbar_component.html.erb +1 -1
- data/app/components/blacklight/theme_switcher_component.html.erb +31 -0
- data/app/components/blacklight/theme_switcher_component.rb +6 -0
- data/app/components/blacklight/top_navbar_component.html.erb +1 -1
- data/app/controllers/concerns/blacklight/bookmarks.rb +8 -14
- data/app/controllers/concerns/blacklight/catalog.rb +12 -14
- data/app/controllers/concerns/blacklight/controller.rb +54 -11
- data/app/controllers/concerns/blacklight/guest_user.rb +51 -0
- data/app/controllers/concerns/blacklight/search_context.rb +1 -1
- data/app/controllers/concerns/blacklight/search_history.rb +3 -1
- data/app/controllers/concerns/blacklight/searchable.rb +18 -0
- data/app/helpers/blacklight/layout_helper_behavior.rb +7 -0
- data/app/javascript/blacklight-frontend/checkbox_submit.js +2 -2
- data/app/javascript/blacklight-frontend/color_theme_switcher.js +85 -0
- data/app/javascript/blacklight-frontend/facet_suggest.js +4 -1
- data/app/javascript/blacklight-frontend/index.js +2 -0
- data/app/models/concerns/blacklight/document/dublin_core.rb +2 -2
- data/app/models/concerns/blacklight/document.rb +1 -1
- data/app/models/concerns/blacklight/user.rb +36 -0
- data/app/presenters/blacklight/field_presenter.rb +1 -1
- data/app/presenters/blacklight/rendering/microdata.rb +1 -0
- data/app/services/blacklight/bookmarks_search_builder.rb +4 -4
- data/app/services/blacklight/search_service.rb +50 -35
- data/app/values/blacklight/types.rb +1 -1
- data/app/views/catalog/_email_form.html.erb +3 -3
- data/app/views/catalog/_home_text.html.erb +1 -1
- data/app/views/catalog/_sms_form.html.erb +4 -4
- data/app/views/catalog/index.rss.builder +4 -4
- data/app/views/catalog/opensearch.json.jbuilder +3 -0
- data/app/views/catalog/opensearch.xml.builder +2 -2
- data/app/views/layouts/blacklight/base.html.erb +13 -1
- data/app/views/shared/_user_util_links.html.erb +18 -5
- data/blacklight.gemspec +3 -3
- data/config/locales/blacklight.ar.yml +5 -0
- data/config/locales/blacklight.ca.yml +5 -0
- data/config/locales/blacklight.de.yml +6 -2
- data/config/locales/blacklight.en.yml +5 -0
- data/config/locales/blacklight.es.yml +5 -0
- data/config/locales/blacklight.fr.yml +5 -0
- data/config/locales/blacklight.hu.yml +5 -0
- data/config/locales/blacklight.it.yml +6 -2
- data/config/locales/blacklight.nl.yml +5 -0
- data/config/locales/blacklight.pt-BR.yml +6 -2
- data/config/locales/blacklight.sq.yml +5 -0
- data/config/locales/blacklight.zh.yml +5 -0
- data/lib/blacklight/component.rb +1 -1
- data/lib/blacklight/configuration/action_config_map_entry.rb +31 -0
- data/lib/blacklight/configuration/display_field.rb +1 -0
- data/lib/blacklight/configuration/field.rb +6 -6
- data/lib/blacklight/configuration/fields.rb +1 -1
- data/lib/blacklight/configuration/sort_field.rb +2 -2
- data/lib/blacklight/configuration.rb +30 -23
- data/lib/blacklight/parameters.rb +1 -1
- data/lib/blacklight/routes/searchable.rb +1 -1
- data/lib/blacklight/search_builder.rb +208 -10
- data/lib/blacklight/search_state.rb +4 -0
- data/lib/blacklight/solr/request.rb +8 -1
- data/lib/blacklight/solr/response/group_response.rb +1 -1
- data/lib/blacklight/solr/response/spelling.rb +8 -8
- data/lib/blacklight/solr/response.rb +2 -21
- data/lib/blacklight/solr/search_builder_behavior.rb +59 -16
- data/lib/blacklight.rb +2 -2
- data/lib/generators/blacklight/assets/importmap_generator.rb +2 -2
- data/lib/generators/blacklight/assets_generator.rb +1 -1
- data/lib/generators/blacklight/controller_generator.rb +1 -1
- data/lib/generators/blacklight/document_generator.rb +1 -1
- data/lib/generators/blacklight/install_generator.rb +6 -4
- data/lib/generators/blacklight/models_generator.rb +1 -1
- data/lib/generators/blacklight/search_builder_generator.rb +1 -1
- data/lib/generators/blacklight/solr_generator.rb +1 -1
- data/lib/generators/blacklight/templates/catalog_controller.rb +21 -2
- data/lib/generators/blacklight/templates/solr/conf/schema.xml +264 -178
- data/lib/generators/blacklight/templates/solr/conf/solrconfig.xml +6 -14
- data/lib/generators/blacklight/test_support_generator.rb +1 -1
- data/lib/generators/blacklight/user_generator.rb +66 -5
- data/lib/railties/blacklight.rake +4 -4
- data/package.json +2 -2
- data/spec/components/blacklight/document/action_component_spec.rb +1 -1
- data/spec/components/blacklight/document/group_component_spec.rb +1 -1
- data/spec/components/blacklight/document_component_spec.rb +9 -9
- data/spec/components/blacklight/facet_component_spec.rb +2 -2
- data/spec/components/blacklight/facets/filters_component_spec.rb +1 -1
- data/spec/components/blacklight/facets/index_navigation_component_spec.rb +1 -2
- data/spec/components/blacklight/facets/list_component_spec.rb +1 -1
- data/spec/components/blacklight/facets/suggest_component_spec.rb +2 -3
- data/spec/components/blacklight/metadata_field_component_spec.rb +26 -0
- data/spec/components/blacklight/skip_link_component_spec.rb +2 -2
- data/spec/controllers/application_controller_spec.rb +71 -0
- data/spec/controllers/bookmarks_controller_spec.rb +18 -5
- data/spec/controllers/catalog_controller_spec.rb +7 -5
- data/spec/features/advanced_search_spec.rb +29 -16
- data/spec/features/alternate_controller_spec.rb +4 -4
- data/spec/features/axe_spec.rb +34 -22
- data/spec/features/bookmarks_spec.rb +13 -13
- data/spec/features/dark_mode_spec.rb +42 -0
- data/spec/features/did_you_mean_spec.rb +27 -27
- data/spec/features/facet_missing_spec.rb +3 -3
- data/spec/features/facets_spec.rb +9 -0
- data/spec/features/record_view_spec.rb +14 -14
- data/spec/features/search_context_spec.rb +8 -8
- data/spec/features/search_filters_spec.rb +16 -16
- data/spec/features/search_formats_spec.rb +2 -2
- data/spec/features/search_history_spec.rb +11 -11
- data/spec/features/search_pagination_spec.rb +17 -17
- data/spec/features/search_results_spec.rb +3 -3
- data/spec/features/search_sort_spec.rb +4 -4
- data/spec/features/search_spec.rb +20 -20
- data/spec/helpers/blacklight/url_helper_behavior_spec.rb +15 -15
- data/spec/helpers/blacklight_helper_spec.rb +1 -1
- data/spec/helpers/catalog_helper_spec.rb +7 -7
- data/spec/integration/generators/blacklight/user_generator_spec.rb +60 -0
- data/spec/lib/blacklight/search_state/pivot_filter_field_spec.rb +1 -1
- data/spec/models/blacklight/configurable_spec.rb +1 -1
- data/spec/models/blacklight/configuration_spec.rb +0 -19
- data/spec/models/blacklight/document/dublin_core_spec.rb +2 -2
- data/spec/models/blacklight/facet_paginator_spec.rb +1 -1
- data/spec/models/blacklight/search_builder_spec.rb +26 -4
- data/spec/models/blacklight/solr/repository_spec.rb +10 -2
- data/spec/models/blacklight/solr/search_builder_behavior_spec.rb +165 -7
- data/spec/models/blacklight/user_spec.rb +32 -5
- data/spec/models/bookmark_spec.rb +1 -1
- data/spec/models/record_mailer_spec.rb +8 -8
- data/spec/models/search_spec.rb +1 -1
- data/spec/models/solr_document_spec.rb +4 -0
- data/spec/presenters/blacklight/index_presenter_spec.rb +1 -0
- data/spec/presenters/blacklight/rendering/pipeline_spec.rb +1 -0
- data/spec/presenters/blacklight/show_presenter_spec.rb +1 -0
- data/spec/presenters/blacklight/thumbnail_presenter_spec.rb +1 -0
- data/spec/services/blacklight/search_service_spec.rb +7 -7
- data/spec/spec_helper.rb +3 -12
- data/spec/support/features/session_helpers.rb +13 -4
- data/spec/support/features/turbo_helpers.rb +13 -0
- data/spec/support/features.rb +2 -0
- data/spec/support/user_helpers.rb +24 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -1
- data/spec/views/catalog/_document.html.erb_spec.rb +4 -4
- data/spec/views/catalog/_paginate_compact.html.erb_spec.rb +2 -2
- data/spec/views/catalog/_sort_and_per_page.html.erb_spec.rb +5 -5
- data/spec/views/catalog/index.html.erb_spec.rb +2 -2
- data/spec/views/catalog/show.html.erb_spec.rb +3 -4
- data/spec/views/shared/_user_util_links.html.erb_spec.rb +56 -0
- data/template.demo.rb +2 -1
- metadata +30 -29
- data/.hound.yml +0 -4
- data/.jshintrc +0 -22
- data/app/assets/images/blacklight/logo.png +0 -0
- data/app/controllers/concerns/blacklight/facetable.rb +0 -34
- data/app/models/facet_search_builder.rb +0 -5
- data/app/services/blacklight/facet_search_service.rb +0 -44
- data/lib/blacklight/abstract_search_builder.rb +0 -154
- data/lib/blacklight/facet_search_builder.rb +0 -18
- data/lib/blacklight/solr/facet_search_builder_behavior.rb +0 -62
- data/spec/models/blacklight/facet_search_builder_spec.rb +0 -19
- data/spec/models/blacklight/solr/facet_search_builder_behavior_spec.rb +0 -929
|
@@ -17,9 +17,9 @@ RSpec.describe "catalog/_document" do
|
|
|
17
17
|
stub_template "catalog/_b_default.html.erb" => "b_partial"
|
|
18
18
|
stub_template "catalog/_c_default.html.erb" => "c_partial"
|
|
19
19
|
render partial: "catalog/document", locals: { document: document, document_counter: 1, view_config: blacklight_config.index }
|
|
20
|
-
expect(rendered).to
|
|
21
|
-
expect(rendered).to
|
|
22
|
-
expect(rendered).to
|
|
20
|
+
expect(rendered).to include('a_partial')
|
|
21
|
+
expect(rendered).to include('b_partial')
|
|
22
|
+
expect(rendered).to include('c_partial')
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
context 'with a configured document component' do
|
|
@@ -39,7 +39,7 @@ RSpec.describe "catalog/_document" do
|
|
|
39
39
|
|
|
40
40
|
it 'renders the document component' do
|
|
41
41
|
render partial: "catalog/document", locals: { document: document, document_counter: 1, view_config: blacklight_config.index }
|
|
42
|
-
expect(rendered).to
|
|
42
|
+
expect(rendered).to include('blah')
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
RSpec.describe "catalog/_paginate_compact.html.erb" do
|
|
4
|
-
let(:user) {
|
|
4
|
+
let(:user) { create_user }
|
|
5
5
|
let(:blacklight_config) { Blacklight::Configuration.new }
|
|
6
6
|
|
|
7
7
|
before do
|
|
@@ -16,7 +16,7 @@ RSpec.describe "catalog/_paginate_compact.html.erb" do
|
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
it "renders ActiveRecord collections" do
|
|
19
|
-
50.times {
|
|
19
|
+
50.times { Bookmark.create!(user: user) }
|
|
20
20
|
render partial: 'catalog/paginate_compact', object: Bookmark.page(1).per(25)
|
|
21
21
|
expect(rendered).to have_css ".page-entries"
|
|
22
22
|
expect(rendered).to have_css "a[@rel=next]"
|
|
@@ -17,10 +17,10 @@ RSpec.describe "catalog/_sort_and_per_page" do
|
|
|
17
17
|
stub_template "catalog/_per_page_widget.html.erb" => "per_page_widget"
|
|
18
18
|
stub_template "catalog/_view_type_group.html.erb" => "view_type_group"
|
|
19
19
|
render
|
|
20
|
-
expect(rendered).to
|
|
21
|
-
expect(rendered).to
|
|
22
|
-
expect(rendered).to
|
|
23
|
-
expect(rendered).to
|
|
20
|
+
expect(rendered).to include('paginate_compact')
|
|
21
|
+
expect(rendered).to include('sort_widget')
|
|
22
|
+
expect(rendered).to include('per_page_widget')
|
|
23
|
+
expect(rendered).to include('view_type_group')
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
it "does not render the pagination controls with bad limit values" do
|
|
@@ -30,6 +30,6 @@ RSpec.describe "catalog/_sort_and_per_page" do
|
|
|
30
30
|
stub_template "catalog/_per_page_widget.html.erb" => "per_page_widget"
|
|
31
31
|
stub_template "catalog/_view_type_group.html.erb" => "view_type_group"
|
|
32
32
|
render
|
|
33
|
-
expect(rendered).not_to
|
|
33
|
+
expect(rendered).not_to include('paginate_compact')
|
|
34
34
|
end
|
|
35
35
|
end
|
|
@@ -12,7 +12,7 @@ RSpec.describe "catalog/index.html.erb" do
|
|
|
12
12
|
it "renders the Search::SidebarComponent component" do
|
|
13
13
|
render
|
|
14
14
|
|
|
15
|
-
expect(sidebar).to
|
|
15
|
+
expect(sidebar).to include('Limit your search')
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -31,7 +31,7 @@ RSpec.describe "catalog/index.html.erb" do
|
|
|
31
31
|
|
|
32
32
|
it "renders the search_header partial" do
|
|
33
33
|
render
|
|
34
|
-
expect(rendered).to
|
|
34
|
+
expect(rendered).to include('sortAndPerPage')
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
end
|
|
@@ -9,7 +9,6 @@ RSpec.describe "catalog/show.html.erb" do
|
|
|
9
9
|
allow(presenter).to receive(:html_title).and_return('Heading')
|
|
10
10
|
allow(document).to receive(:more_like_this).and_return([])
|
|
11
11
|
allow(view).to receive_messages(has_user_authentication_provider?: false)
|
|
12
|
-
allow(view).to receive_messages(render_document_sidebar_partial: "Sidebar")
|
|
13
12
|
allow(view).to receive_messages(current_search_session: nil, search_session: {})
|
|
14
13
|
assign :document, document
|
|
15
14
|
allow(view).to receive_messages(document_presenter: presenter, action_name: 'show', blacklight_config: blacklight_config)
|
|
@@ -36,8 +35,8 @@ RSpec.describe "catalog/show.html.erb" do
|
|
|
36
35
|
stub_template "catalog/_b_default.html.erb" => "b_partial"
|
|
37
36
|
stub_template "catalog/_c_default.html.erb" => "c_partial"
|
|
38
37
|
render
|
|
39
|
-
expect(rendered).to
|
|
40
|
-
expect(rendered).to
|
|
41
|
-
expect(rendered).to
|
|
38
|
+
expect(rendered).to include('a_partial')
|
|
39
|
+
expect(rendered).to include('b_partial')
|
|
40
|
+
expect(rendered).to include('c_partial')
|
|
42
41
|
end
|
|
43
42
|
end
|
|
@@ -7,6 +7,10 @@ RSpec.describe "shared/_user_util_links" do
|
|
|
7
7
|
end
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
+
before do
|
|
11
|
+
allow(controller).to receive(:render_bookmarks_control?).and_return false
|
|
12
|
+
end
|
|
13
|
+
|
|
10
14
|
it "renders the correct bookmark count" do
|
|
11
15
|
count = rand(99)
|
|
12
16
|
allow(controller).to receive(:render_bookmarks_control?).and_return true
|
|
@@ -15,4 +19,56 @@ RSpec.describe "shared/_user_util_links" do
|
|
|
15
19
|
render "shared/user_util_links"
|
|
16
20
|
expect(rendered).to have_css('#bookmarks_nav span.badge[data-role=bookmark-counter]', text: count.to_s)
|
|
17
21
|
end
|
|
22
|
+
|
|
23
|
+
it "renders Rails authentication session links" do
|
|
24
|
+
user = instance_double(User, to_s: "xyz@example.com")
|
|
25
|
+
|
|
26
|
+
allow(view).to receive_messages(
|
|
27
|
+
blacklight_account_path: nil,
|
|
28
|
+
blacklight_config: blacklight_config,
|
|
29
|
+
blacklight_login_path: "/session/new",
|
|
30
|
+
blacklight_logout_link_options: { data: { turbo_method: :delete } },
|
|
31
|
+
blacklight_logout_path: "/session",
|
|
32
|
+
current_user: user,
|
|
33
|
+
has_user_authentication_provider?: true
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
render "shared/user_util_links"
|
|
37
|
+
|
|
38
|
+
expect(rendered).to have_link("Log Out", href: "/session")
|
|
39
|
+
expect(rendered).to have_css('a[data-turbo-method="delete"]', text: "Log Out")
|
|
40
|
+
expect(rendered).to have_no_link("xyz@example.com")
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
it "renders Devise-compatible session and registration links" do
|
|
44
|
+
user = instance_double(User, to_s: "xyz@example.com")
|
|
45
|
+
|
|
46
|
+
allow(view).to receive_messages(
|
|
47
|
+
blacklight_account_path: "/users/edit",
|
|
48
|
+
blacklight_config: blacklight_config,
|
|
49
|
+
blacklight_login_path: "/users/sign_in",
|
|
50
|
+
blacklight_logout_link_options: {},
|
|
51
|
+
blacklight_logout_path: "/users/sign_out",
|
|
52
|
+
current_user: user,
|
|
53
|
+
has_user_authentication_provider?: true
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
render "shared/user_util_links"
|
|
57
|
+
|
|
58
|
+
expect(rendered).to have_link("Log Out", href: "/users/sign_out")
|
|
59
|
+
expect(rendered).to have_link("xyz@example.com", href: "/users/edit")
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
it "renders a provider-neutral login link" do
|
|
63
|
+
allow(view).to receive_messages(
|
|
64
|
+
blacklight_config: blacklight_config,
|
|
65
|
+
blacklight_login_path: "/session/new",
|
|
66
|
+
current_user: nil,
|
|
67
|
+
has_user_authentication_provider?: true
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
render "shared/user_util_links"
|
|
71
|
+
|
|
72
|
+
expect(rendered).to have_link("Login", href: "/session/new")
|
|
73
|
+
end
|
|
18
74
|
end
|
data/template.demo.rb
CHANGED
|
@@ -4,7 +4,8 @@ gem 'blacklight', '>= 7.0'
|
|
|
4
4
|
|
|
5
5
|
after_bundle do
|
|
6
6
|
# run the blacklight install generator
|
|
7
|
-
|
|
7
|
+
default_authentication_option = Rails.gem_version >= Gem::Version.new('8.0.0') ? '--authentication' : '--devise'
|
|
8
|
+
options = ENV.fetch("BLACKLIGHT_INSTALL_OPTIONS", "#{default_authentication_option} --marc")
|
|
8
9
|
|
|
9
10
|
generate 'blacklight:install', options
|
|
10
11
|
|
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.
|
|
4
|
+
version: 9.1.0
|
|
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: 2026-09-04 00:00:00.000000000 Z
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|
|
22
22
|
name: rails
|
|
@@ -24,7 +24,7 @@ dependencies:
|
|
|
24
24
|
requirements:
|
|
25
25
|
- - ">="
|
|
26
26
|
- !ruby/object:Gem::Version
|
|
27
|
-
version: '7.
|
|
27
|
+
version: '7.2'
|
|
28
28
|
- - "<"
|
|
29
29
|
- !ruby/object:Gem::Version
|
|
30
30
|
version: '9'
|
|
@@ -34,7 +34,7 @@ dependencies:
|
|
|
34
34
|
requirements:
|
|
35
35
|
- - ">="
|
|
36
36
|
- !ruby/object:Gem::Version
|
|
37
|
-
version: '7.
|
|
37
|
+
version: '7.2'
|
|
38
38
|
- - "<"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '9'
|
|
@@ -112,22 +112,16 @@ dependencies:
|
|
|
112
112
|
name: view_component
|
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
|
114
114
|
requirements:
|
|
115
|
-
- - "
|
|
116
|
-
- !ruby/object:Gem::Version
|
|
117
|
-
version: '3.0'
|
|
118
|
-
- - "<"
|
|
115
|
+
- - "~>"
|
|
119
116
|
- !ruby/object:Gem::Version
|
|
120
|
-
version: '
|
|
117
|
+
version: '4.0'
|
|
121
118
|
type: :runtime
|
|
122
119
|
prerelease: false
|
|
123
120
|
version_requirements: !ruby/object:Gem::Requirement
|
|
124
121
|
requirements:
|
|
125
|
-
- - "
|
|
126
|
-
- !ruby/object:Gem::Version
|
|
127
|
-
version: '3.0'
|
|
128
|
-
- - "<"
|
|
122
|
+
- - "~>"
|
|
129
123
|
- !ruby/object:Gem::Version
|
|
130
|
-
version: '
|
|
124
|
+
version: '4.0'
|
|
131
125
|
- !ruby/object:Gem::Dependency
|
|
132
126
|
name: zeitwerk
|
|
133
127
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -424,8 +418,6 @@ files:
|
|
|
424
418
|
- ".github/workflows/release_8_x_scheduled.yml"
|
|
425
419
|
- ".github/workflows/test.yml"
|
|
426
420
|
- ".gitignore"
|
|
427
|
-
- ".hound.yml"
|
|
428
|
-
- ".jshintrc"
|
|
429
421
|
- ".rspec"
|
|
430
422
|
- ".rubocop.yml"
|
|
431
423
|
- ".rubocop_todo.yml"
|
|
@@ -439,7 +431,8 @@ files:
|
|
|
439
431
|
- VERSION
|
|
440
432
|
- app/assets/builds/blacklight.css
|
|
441
433
|
- app/assets/config/blacklight/manifest.js
|
|
442
|
-
- app/assets/images/blacklight/logo.
|
|
434
|
+
- app/assets/images/blacklight/logo-dark.svg
|
|
435
|
+
- app/assets/images/blacklight/logo.svg
|
|
443
436
|
- app/assets/images/favicon.ico
|
|
444
437
|
- app/assets/javascripts/blacklight/blacklight.esm.js
|
|
445
438
|
- app/assets/javascripts/blacklight/blacklight.esm.js.map
|
|
@@ -532,10 +525,14 @@ files:
|
|
|
532
525
|
- app/components/blacklight/header_component.rb
|
|
533
526
|
- app/components/blacklight/hidden_search_state_component.rb
|
|
534
527
|
- app/components/blacklight/icons/bookmark_icon_component.rb
|
|
528
|
+
- app/components/blacklight/icons/checkmark_component.rb
|
|
529
|
+
- app/components/blacklight/icons/circle_half_component.rb
|
|
535
530
|
- app/components/blacklight/icons/icon_component.rb
|
|
536
531
|
- app/components/blacklight/icons/list_component.rb
|
|
532
|
+
- app/components/blacklight/icons/moon_stars_component.rb
|
|
537
533
|
- app/components/blacklight/icons/remove_component.rb
|
|
538
534
|
- app/components/blacklight/icons/search_component.rb
|
|
535
|
+
- app/components/blacklight/icons/sun_component.rb
|
|
539
536
|
- app/components/blacklight/metadata_field_component.html.erb
|
|
540
537
|
- app/components/blacklight/metadata_field_component.rb
|
|
541
538
|
- app/components/blacklight/metadata_field_layout_component.html.erb
|
|
@@ -582,6 +579,8 @@ files:
|
|
|
582
579
|
- app/components/blacklight/system/flash_message_component.rb
|
|
583
580
|
- app/components/blacklight/system/modal_component.html.erb
|
|
584
581
|
- app/components/blacklight/system/modal_component.rb
|
|
582
|
+
- app/components/blacklight/theme_switcher_component.html.erb
|
|
583
|
+
- app/components/blacklight/theme_switcher_component.rb
|
|
585
584
|
- app/components/blacklight/top_navbar_component.html.erb
|
|
586
585
|
- app/components/blacklight/top_navbar_component.rb
|
|
587
586
|
- app/controllers/bookmarks_controller.rb
|
|
@@ -589,7 +588,7 @@ files:
|
|
|
589
588
|
- app/controllers/concerns/blacklight/bookmarks.rb
|
|
590
589
|
- app/controllers/concerns/blacklight/catalog.rb
|
|
591
590
|
- app/controllers/concerns/blacklight/controller.rb
|
|
592
|
-
- app/controllers/concerns/blacklight/
|
|
591
|
+
- app/controllers/concerns/blacklight/guest_user.rb
|
|
593
592
|
- app/controllers/concerns/blacklight/search_context.rb
|
|
594
593
|
- app/controllers/concerns/blacklight/search_history.rb
|
|
595
594
|
- app/controllers/concerns/blacklight/searchable.rb
|
|
@@ -610,6 +609,7 @@ files:
|
|
|
610
609
|
- app/javascript/blacklight-frontend/bookmark_toggle.js
|
|
611
610
|
- app/javascript/blacklight-frontend/button_focus.js
|
|
612
611
|
- app/javascript/blacklight-frontend/checkbox_submit.js
|
|
612
|
+
- app/javascript/blacklight-frontend/color_theme_switcher.js
|
|
613
613
|
- app/javascript/blacklight-frontend/core.js
|
|
614
614
|
- app/javascript/blacklight-frontend/debounce.js
|
|
615
615
|
- app/javascript/blacklight-frontend/facet_suggest.js
|
|
@@ -632,7 +632,6 @@ files:
|
|
|
632
632
|
- app/models/concerns/blacklight/document/semantic_fields.rb
|
|
633
633
|
- app/models/concerns/blacklight/suggest/response.rb
|
|
634
634
|
- app/models/concerns/blacklight/user.rb
|
|
635
|
-
- app/models/facet_search_builder.rb
|
|
636
635
|
- app/models/record_mailer.rb
|
|
637
636
|
- app/models/search.rb
|
|
638
637
|
- app/models/search_builder.rb
|
|
@@ -661,7 +660,6 @@ files:
|
|
|
661
660
|
- app/presenters/blacklight/thumbnail_presenter.rb
|
|
662
661
|
- app/services/blacklight/bookmarks_search_builder.rb
|
|
663
662
|
- app/services/blacklight/document_factory.rb
|
|
664
|
-
- app/services/blacklight/facet_search_service.rb
|
|
665
663
|
- app/services/blacklight/field_retriever.rb
|
|
666
664
|
- app/services/blacklight/search_params_yaml_coder.rb
|
|
667
665
|
- app/services/blacklight/search_service.rb
|
|
@@ -711,6 +709,7 @@ files:
|
|
|
711
709
|
- app/views/catalog/index.html.erb
|
|
712
710
|
- app/views/catalog/index.json.jbuilder
|
|
713
711
|
- app/views/catalog/index.rss.builder
|
|
712
|
+
- app/views/catalog/opensearch.json.jbuilder
|
|
714
713
|
- app/views/catalog/opensearch.xml.builder
|
|
715
714
|
- app/views/catalog/send_email_record.erb
|
|
716
715
|
- app/views/catalog/show.html.erb
|
|
@@ -761,9 +760,9 @@ files:
|
|
|
761
760
|
- db/migrate/20140320000000_add_polymorphic_type_to_bookmarks.rb
|
|
762
761
|
- lib/blacklight.rb
|
|
763
762
|
- lib/blacklight/abstract_repository.rb
|
|
764
|
-
- lib/blacklight/abstract_search_builder.rb
|
|
765
763
|
- lib/blacklight/component.rb
|
|
766
764
|
- lib/blacklight/configuration.rb
|
|
765
|
+
- lib/blacklight/configuration/action_config_map_entry.rb
|
|
767
766
|
- lib/blacklight/configuration/context.rb
|
|
768
767
|
- lib/blacklight/configuration/display_field.rb
|
|
769
768
|
- lib/blacklight/configuration/facet_field.rb
|
|
@@ -780,7 +779,6 @@ files:
|
|
|
780
779
|
- lib/blacklight/configuration/view_config.rb
|
|
781
780
|
- lib/blacklight/engine.rb
|
|
782
781
|
- lib/blacklight/exceptions.rb
|
|
783
|
-
- lib/blacklight/facet_search_builder.rb
|
|
784
782
|
- lib/blacklight/nested_open_struct_with_hash_access.rb
|
|
785
783
|
- lib/blacklight/open_struct_with_hash_access.rb
|
|
786
784
|
- lib/blacklight/parameters.rb
|
|
@@ -797,7 +795,6 @@ files:
|
|
|
797
795
|
- lib/blacklight/solr/default_filter_query_builder.rb
|
|
798
796
|
- lib/blacklight/solr/document.rb
|
|
799
797
|
- lib/blacklight/solr/facet_paginator.rb
|
|
800
|
-
- lib/blacklight/solr/facet_search_builder_behavior.rb
|
|
801
798
|
- lib/blacklight/solr/field_reflection_search_builder.rb
|
|
802
799
|
- lib/blacklight/solr/repository.rb
|
|
803
800
|
- lib/blacklight/solr/request.rb
|
|
@@ -898,6 +895,7 @@ files:
|
|
|
898
895
|
- spec/features/bookmarks_spec.rb
|
|
899
896
|
- spec/features/citation_spec.rb
|
|
900
897
|
- spec/features/component_template_override_spec.rb
|
|
898
|
+
- spec/features/dark_mode_spec.rb
|
|
901
899
|
- spec/features/did_you_mean_spec.rb
|
|
902
900
|
- spec/features/facet_missing_spec.rb
|
|
903
901
|
- spec/features/facets_spec.rb
|
|
@@ -924,6 +922,7 @@ files:
|
|
|
924
922
|
- spec/helpers/catalog_helper_spec.rb
|
|
925
923
|
- spec/i18n_spec.rb
|
|
926
924
|
- spec/integration/generators/blacklight/solr_generator_spec.rb
|
|
925
|
+
- spec/integration/generators/blacklight/user_generator_spec.rb
|
|
927
926
|
- spec/lib/blacklight/component_spec.rb
|
|
928
927
|
- spec/lib/blacklight/configuration/facet_field_spec.rb
|
|
929
928
|
- spec/lib/blacklight/configuration/field_spec.rb
|
|
@@ -945,13 +944,11 @@ files:
|
|
|
945
944
|
- spec/models/blacklight/document/dublin_core_spec.rb
|
|
946
945
|
- spec/models/blacklight/document_spec.rb
|
|
947
946
|
- spec/models/blacklight/facet_paginator_spec.rb
|
|
948
|
-
- spec/models/blacklight/facet_search_builder_spec.rb
|
|
949
947
|
- spec/models/blacklight/icon_spec.rb
|
|
950
948
|
- spec/models/blacklight/search_builder_spec.rb
|
|
951
949
|
- spec/models/blacklight/solr/default_filter_query_builder_spec.rb
|
|
952
950
|
- spec/models/blacklight/solr/document_spec.rb
|
|
953
951
|
- spec/models/blacklight/solr/facet_paginator_spec.rb
|
|
954
|
-
- spec/models/blacklight/solr/facet_search_builder_behavior_spec.rb
|
|
955
952
|
- spec/models/blacklight/solr/repository_spec.rb
|
|
956
953
|
- spec/models/blacklight/solr/request_spec.rb
|
|
957
954
|
- spec/models/blacklight/solr/response/facets_spec.rb
|
|
@@ -990,7 +987,9 @@ files:
|
|
|
990
987
|
- spec/support/features.rb
|
|
991
988
|
- spec/support/features/search_helpers.rb
|
|
992
989
|
- spec/support/features/session_helpers.rb
|
|
990
|
+
- spec/support/features/turbo_helpers.rb
|
|
993
991
|
- spec/support/presenter_test_helpers.rb
|
|
992
|
+
- spec/support/user_helpers.rb
|
|
994
993
|
- spec/support/view_component_test_helpers.rb
|
|
995
994
|
- spec/test_app_templates/Gemfile.extra
|
|
996
995
|
- spec/test_app_templates/lib/generators/test_app_generator.rb
|
|
@@ -1024,14 +1023,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
1024
1023
|
requirements:
|
|
1025
1024
|
- - ">="
|
|
1026
1025
|
- !ruby/object:Gem::Version
|
|
1027
|
-
version: '3.
|
|
1026
|
+
version: '3.3'
|
|
1028
1027
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1029
1028
|
requirements:
|
|
1030
1029
|
- - ">="
|
|
1031
1030
|
- !ruby/object:Gem::Version
|
|
1032
1031
|
version: '0'
|
|
1033
1032
|
requirements: []
|
|
1034
|
-
rubygems_version: 3.
|
|
1033
|
+
rubygems_version: 3.6.2
|
|
1035
1034
|
specification_version: 4
|
|
1036
1035
|
summary: Blacklight provides a discovery interface for any Solr (http://lucene.apache.org/solr)
|
|
1037
1036
|
index.
|
|
@@ -1082,6 +1081,7 @@ test_files:
|
|
|
1082
1081
|
- spec/features/bookmarks_spec.rb
|
|
1083
1082
|
- spec/features/citation_spec.rb
|
|
1084
1083
|
- spec/features/component_template_override_spec.rb
|
|
1084
|
+
- spec/features/dark_mode_spec.rb
|
|
1085
1085
|
- spec/features/did_you_mean_spec.rb
|
|
1086
1086
|
- spec/features/facet_missing_spec.rb
|
|
1087
1087
|
- spec/features/facets_spec.rb
|
|
@@ -1108,6 +1108,7 @@ test_files:
|
|
|
1108
1108
|
- spec/helpers/catalog_helper_spec.rb
|
|
1109
1109
|
- spec/i18n_spec.rb
|
|
1110
1110
|
- spec/integration/generators/blacklight/solr_generator_spec.rb
|
|
1111
|
+
- spec/integration/generators/blacklight/user_generator_spec.rb
|
|
1111
1112
|
- spec/lib/blacklight/component_spec.rb
|
|
1112
1113
|
- spec/lib/blacklight/configuration/facet_field_spec.rb
|
|
1113
1114
|
- spec/lib/blacklight/configuration/field_spec.rb
|
|
@@ -1129,13 +1130,11 @@ test_files:
|
|
|
1129
1130
|
- spec/models/blacklight/document/dublin_core_spec.rb
|
|
1130
1131
|
- spec/models/blacklight/document_spec.rb
|
|
1131
1132
|
- spec/models/blacklight/facet_paginator_spec.rb
|
|
1132
|
-
- spec/models/blacklight/facet_search_builder_spec.rb
|
|
1133
1133
|
- spec/models/blacklight/icon_spec.rb
|
|
1134
1134
|
- spec/models/blacklight/search_builder_spec.rb
|
|
1135
1135
|
- spec/models/blacklight/solr/default_filter_query_builder_spec.rb
|
|
1136
1136
|
- spec/models/blacklight/solr/document_spec.rb
|
|
1137
1137
|
- spec/models/blacklight/solr/facet_paginator_spec.rb
|
|
1138
|
-
- spec/models/blacklight/solr/facet_search_builder_behavior_spec.rb
|
|
1139
1138
|
- spec/models/blacklight/solr/repository_spec.rb
|
|
1140
1139
|
- spec/models/blacklight/solr/request_spec.rb
|
|
1141
1140
|
- spec/models/blacklight/solr/response/facets_spec.rb
|
|
@@ -1174,7 +1173,9 @@ test_files:
|
|
|
1174
1173
|
- spec/support/features.rb
|
|
1175
1174
|
- spec/support/features/search_helpers.rb
|
|
1176
1175
|
- spec/support/features/session_helpers.rb
|
|
1176
|
+
- spec/support/features/turbo_helpers.rb
|
|
1177
1177
|
- spec/support/presenter_test_helpers.rb
|
|
1178
|
+
- spec/support/user_helpers.rb
|
|
1178
1179
|
- spec/support/view_component_test_helpers.rb
|
|
1179
1180
|
- spec/test_app_templates/Gemfile.extra
|
|
1180
1181
|
- spec/test_app_templates/lib/generators/test_app_generator.rb
|
data/.hound.yml
DELETED
data/.jshintrc
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"asi": true,
|
|
3
|
-
"browser": true,
|
|
4
|
-
"jquery": true,
|
|
5
|
-
"node": true,
|
|
6
|
-
"esnext": true,
|
|
7
|
-
"camelcase": true,
|
|
8
|
-
"eqeqeq": true,
|
|
9
|
-
"indent": 2,
|
|
10
|
-
"latedef": true,
|
|
11
|
-
"maxlen": 80,
|
|
12
|
-
"newcap": true,
|
|
13
|
-
"quotmark": "single",
|
|
14
|
-
"strict": true,
|
|
15
|
-
"undef": true,
|
|
16
|
-
"unused": true,
|
|
17
|
-
"eqnull": true,
|
|
18
|
-
"predef": [
|
|
19
|
-
"Blacklight",
|
|
20
|
-
"Rails"
|
|
21
|
-
]
|
|
22
|
-
}
|
|
Binary file
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# The Facetable module can be included onto classes that need to initialize a FacetSearchService.
|
|
4
|
-
# There are two dependencies you must provide on the including class. Typically these
|
|
5
|
-
# would be provided by Blacklight::Controller
|
|
6
|
-
# 1. search_state
|
|
7
|
-
# 2. blacklight_config
|
|
8
|
-
#
|
|
9
|
-
# Additionally, the including class may override the facet_search_service_context method to provide
|
|
10
|
-
# further context to the SearchService. For example you could override this to provide the
|
|
11
|
-
# currently signed in user.
|
|
12
|
-
module Blacklight::Facetable
|
|
13
|
-
extend ActiveSupport::Concern
|
|
14
|
-
|
|
15
|
-
included do
|
|
16
|
-
# Which class to use for the search service. You can subclass SearchService if you
|
|
17
|
-
# want to override any of the methods (e.g. SearchService#fetch)
|
|
18
|
-
class_attribute :facet_search_service_class
|
|
19
|
-
self.facet_search_service_class = Blacklight::FacetSearchService
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
# @return [Blacklight::FacetSearchService]
|
|
23
|
-
def facet_search_service
|
|
24
|
-
facet_search_service_class.new(config: blacklight_config, search_state: search_state, user_params: search_state.to_h, **facet_search_service_context)
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
# Override this method on the class that includes Blacklight::Facetable to provide more context to the search service if necessary.
|
|
28
|
-
# For example, if your search builder needs to be aware of the current user, override this method to return a hash including the current user.
|
|
29
|
-
# Then the search builder could use some property about the current user to construct a constraint on the search.
|
|
30
|
-
# @return [Hash] a hash of context information to pass through to the search service
|
|
31
|
-
def facet_search_service_context
|
|
32
|
-
search_service_context
|
|
33
|
-
end
|
|
34
|
-
end
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# FacetSearchService returns a facet list from the repository. This is for drawing the "more facets" modal
|
|
4
|
-
module Blacklight
|
|
5
|
-
class FacetSearchService
|
|
6
|
-
def initialize(config:, search_state:, search_builder_class: config.facet_search_builder_class, **context)
|
|
7
|
-
@blacklight_config = config
|
|
8
|
-
@search_state = search_state
|
|
9
|
-
@user_params = @search_state.params
|
|
10
|
-
@search_builder_class = search_builder_class
|
|
11
|
-
@context = context
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
# The blacklight_config + controller are accessed by the search_builder
|
|
15
|
-
attr_reader :blacklight_config, :context
|
|
16
|
-
|
|
17
|
-
def search_builder
|
|
18
|
-
search_builder_class.new(self)
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
def search_state_class
|
|
22
|
-
@search_state.class
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
##
|
|
26
|
-
# Get the solr response when retrieving only a single facet field
|
|
27
|
-
# @return [Blacklight::Solr::Response] the solr response
|
|
28
|
-
def facet_field_response(facet_field, extra_controller_params = {})
|
|
29
|
-
query = search_builder.with(search_state).facet(facet_field)
|
|
30
|
-
repository.search(params: query.merge(extra_controller_params))
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
def facet_suggest_response(facet_field, facet_suggestion_query, extra_controller_params = {})
|
|
34
|
-
query = search_builder.with(search_state).facet(facet_field).facet_suggestion_query(facet_suggestion_query)
|
|
35
|
-
repository.search(params: query.merge(extra_controller_params))
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
private
|
|
39
|
-
|
|
40
|
-
attr_reader :search_builder_class, :search_state
|
|
41
|
-
|
|
42
|
-
delegate :repository, to: :blacklight_config
|
|
43
|
-
end
|
|
44
|
-
end
|