blacklight 8.9.0 → 9.0.0.beta1
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/pull_request_template.md +7 -0
- data/.github/workflows/ruby.yml +1 -9
- data/.rubocop.yml +2 -2
- data/.rubocop_todo.yml +0 -9
- data/README.md +30 -8
- data/VERSION +1 -1
- data/app/assets/builds/blacklight.css +448 -0
- data/app/assets/javascripts/blacklight/blacklight.esm.js +5 -36
- data/app/assets/javascripts/blacklight/blacklight.esm.js.map +1 -1
- data/app/assets/javascripts/blacklight/blacklight.js +5 -36
- data/app/assets/javascripts/blacklight/blacklight.js.map +1 -1
- data/app/assets/stylesheets/blacklight/_balanced_list.scss +1 -4
- data/app/assets/stylesheets/blacklight/_blacklight_base.scss +1 -3
- data/app/assets/stylesheets/blacklight/_bookmark.scss +44 -41
- data/app/assets/stylesheets/blacklight/_bootstrap_overrides.scss +0 -29
- data/app/assets/stylesheets/blacklight/_constraints.scss +15 -24
- data/app/assets/stylesheets/blacklight/_controls.scss +2 -18
- data/app/assets/stylesheets/blacklight/_facets.scss +15 -82
- data/app/assets/stylesheets/blacklight/_group.scss +2 -5
- data/app/assets/stylesheets/blacklight/_header.scss +4 -11
- data/app/assets/stylesheets/blacklight/_icons.scss +0 -8
- data/app/assets/stylesheets/blacklight/_modal.scss +9 -10
- data/app/assets/stylesheets/blacklight/_pagination.scss +3 -5
- data/app/assets/stylesheets/blacklight/_search_form.scss +0 -1
- data/app/assets/stylesheets/blacklight/_search_history.scss +0 -4
- data/app/assets/stylesheets/blacklight/_search_results.scss +1 -15
- data/app/assets/stylesheets/blacklight/blacklight_defaults.scss +9 -17
- data/app/assets/stylesheets/blacklight/build.scss +4 -0
- data/app/components/blacklight/advanced_search_form_component.rb +1 -1
- data/app/components/blacklight/constraint_component.rb +1 -1
- data/app/components/blacklight/constraint_layout_component.html.erb +2 -2
- data/app/components/blacklight/constraints_component.html.erb +2 -2
- data/app/components/blacklight/constraints_component.rb +1 -1
- data/app/components/blacklight/document/action_component.rb +3 -1
- data/app/components/blacklight/document/bookmark_component.html.erb +3 -3
- data/app/components/blacklight/document/group_component.html.erb +1 -1
- data/app/components/blacklight/document/page_header_component.rb +1 -1
- data/app/components/blacklight/document/sidebar_component.rb +5 -5
- data/app/components/blacklight/document_component.rb +9 -13
- data/app/components/blacklight/document_title_component.rb +3 -2
- data/app/components/blacklight/facet_field_component.html.erb +5 -5
- data/app/components/blacklight/facet_field_list_component.rb +4 -22
- data/app/components/blacklight/facet_field_pagination_component.html.erb +2 -2
- data/app/components/blacklight/facet_item_component.rb +2 -2
- data/app/components/blacklight/facet_item_pivot_component.rb +2 -2
- data/app/components/blacklight/response/facet_group_component.html.erb +3 -18
- data/app/components/blacklight/response/facet_group_component.rb +7 -23
- data/app/components/blacklight/response/facet_toggle_button_component.html.erb +16 -0
- data/app/components/blacklight/response/facet_toggle_button_component.rb +14 -0
- data/app/components/blacklight/response/pagination_component.html.erb +1 -1
- data/app/components/blacklight/response/pagination_component.rb +2 -1
- data/app/components/blacklight/response/sort_component.rb +1 -0
- data/app/components/blacklight/response/view_type_button_component.html.erb +1 -1
- data/app/components/blacklight/response/view_type_component.html.erb +1 -1
- data/app/components/blacklight/search/facet_suggest_input.html.erb +7 -10
- data/app/components/blacklight/search/facet_suggest_input.rb +0 -4
- data/app/components/blacklight/search/per_page_component.html.erb +1 -1
- data/app/components/blacklight/search/per_page_component.rb +1 -0
- data/app/components/blacklight/search/sidebar_component.html.erb +1 -1
- data/app/components/blacklight/search/sidebar_component.rb +1 -1
- data/app/components/blacklight/search_bar_component.html.erb +3 -3
- data/app/components/blacklight/search_bar_component.rb +2 -2
- data/app/components/blacklight/search_button_component.rb +2 -2
- data/app/components/blacklight/search_context/server_applied_params_component.html.erb +2 -2
- data/app/components/blacklight/search_context/server_applied_params_component.rb +9 -0
- data/app/components/blacklight/skip_link_component.html.erb +1 -1
- data/app/components/blacklight/skip_link_component.rb +7 -3
- data/app/components/blacklight/skip_link_item_component.rb +18 -0
- data/app/components/blacklight/system/dropdown_component.html.erb +1 -1
- data/app/components/blacklight/system/dropdown_component.rb +1 -1
- data/app/components/blacklight/top_navbar_component.html.erb +1 -1
- data/app/controllers/concerns/blacklight/catalog.rb +3 -2
- data/app/controllers/concerns/blacklight/search_context.rb +0 -12
- data/app/helpers/blacklight/blacklight_helper_behavior.rb +0 -6
- data/app/helpers/blacklight/catalog_helper_behavior.rb +1 -11
- data/app/helpers/blacklight/configuration_helper_behavior.rb +0 -12
- data/app/helpers/blacklight/document_helper_behavior.rb +0 -26
- data/app/helpers/blacklight/icon_helper_behavior.rb +1 -9
- data/app/helpers/blacklight/layout_helper_behavior.rb +2 -2
- data/app/helpers/blacklight/render_partials_helper_behavior.rb +0 -14
- data/app/helpers/blacklight/url_helper_behavior.rb +1 -1
- data/app/javascript/{blacklight → blacklight-frontend}/bookmark_toggle.js +1 -1
- data/app/javascript/{blacklight → blacklight-frontend}/core.js +2 -10
- data/app/javascript/{blacklight → blacklight-frontend}/debounce.js +1 -1
- data/app/javascript/blacklight-frontend/facet_suggest.js +26 -0
- data/app/javascript/blacklight-frontend/index.js +18 -0
- data/app/javascript/{blacklight → blacklight-frontend}/modal.js +1 -2
- data/app/models/concerns/blacklight/document.rb +0 -11
- data/app/models/concerns/blacklight/user.rb +1 -1
- data/app/presenters/blacklight/facet_field_presenter.rb +2 -2
- data/app/presenters/blacklight/json_presenter.rb +3 -1
- data/app/services/blacklight/search_params_yaml_coder.rb +0 -2
- data/app/views/bookmarks/_clear_bookmarks_widget.html.erb +0 -2
- data/app/views/bookmarks/index.html.erb +1 -1
- data/app/views/catalog/_results_pagination.html.erb +2 -5
- data/app/views/catalog/_search_results.html.erb +4 -4
- data/app/views/catalog/_search_results_header.html.erb +1 -1
- data/app/views/catalog/_sort_and_per_page.html.erb +1 -1
- data/app/views/catalog/_sort_widget.html.erb +1 -0
- data/app/views/catalog/facet.html.erb +9 -9
- data/app/views/catalog/show.html.erb +2 -3
- data/app/views/kaminari/blacklight/_paginator.html.erb +1 -2
- data/app/views/layouts/blacklight/base.html.erb +3 -7
- data/app/views/search_history/index.html.erb +0 -2
- data/blacklight.gemspec +4 -4
- data/config/importmap.rb +1 -1
- data/config/locales/blacklight.ar.yml +4 -4
- data/config/locales/blacklight.ca.yml +124 -124
- data/config/locales/blacklight.de.yml +2 -2
- data/config/locales/blacklight.en.yml +14 -14
- data/config/locales/blacklight.es.yml +4 -4
- data/config/locales/blacklight.fr.yml +4 -4
- data/config/locales/blacklight.hu.yml +4 -4
- data/config/locales/blacklight.it.yml +3 -3
- data/config/locales/blacklight.nl.yml +3 -3
- data/config/locales/blacklight.pt-BR.yml +3 -3
- data/config/locales/blacklight.sq.yml +4 -4
- data/config/locales/blacklight.zh.yml +4 -4
- data/lib/blacklight/configuration/display_field.rb +1 -1
- data/lib/blacklight/configuration/fields.rb +3 -3
- data/lib/blacklight/configuration/view_config.rb +0 -2
- data/lib/blacklight/configuration.rb +7 -12
- data/lib/blacklight/engine.rb +0 -6
- data/lib/blacklight/open_struct_with_hash_access.rb +4 -4
- data/lib/blacklight/search_builder.rb +4 -4
- data/lib/blacklight/search_state/filter_field.rb +2 -2
- data/lib/blacklight/solr/request.rb +1 -7
- data/lib/blacklight/solr/response/group_response.rb +2 -2
- data/lib/blacklight.rb +1 -1
- data/lib/generators/blacklight/assets/importmap_generator.rb +8 -24
- data/lib/generators/blacklight/assets/propshaft_generator.rb +1 -1
- data/lib/generators/blacklight/assets_generator.rb +3 -3
- data/lib/generators/blacklight/controller_generator.rb +3 -3
- data/lib/generators/blacklight/user_generator.rb +9 -10
- data/package.json +14 -4
- data/rollup.config.js +1 -1
- data/spec/components/blacklight/document/action_component_spec.rb +1 -5
- data/spec/components/blacklight/document/sidebar_component_spec.rb +5 -20
- data/spec/components/blacklight/facet_field_checkboxes_component_spec.rb +2 -2
- data/spec/components/blacklight/facet_field_list_component_spec.rb +2 -2
- data/spec/components/blacklight/search/facet_suggest_input_spec.rb +3 -27
- data/spec/components/blacklight/search_bar_component_spec.rb +1 -1
- data/spec/controllers/catalog_controller_spec.rb +1 -1
- data/spec/features/axe_spec.rb +6 -11
- data/spec/features/bookmarks_spec.rb +48 -11
- data/spec/features/facets_spec.rb +22 -90
- data/spec/features/search_context_spec.rb +1 -2
- data/spec/features/search_filters_spec.rb +6 -6
- data/spec/helpers/blacklight/configuration_helper_behavior_spec.rb +0 -9
- data/spec/helpers/blacklight/render_partials_helper_behavior_spec.rb +1 -1
- data/spec/lib/blacklight/parameters_spec.rb +1 -12
- data/spec/lib/blacklight/search_state/filter_field_spec.rb +0 -18
- data/spec/models/blacklight/solr/request_spec.rb +7 -0
- data/spec/services/blacklight/search_service_spec.rb +1 -1
- data/spec/test_app_templates/Gemfile.extra +0 -1
- data/spec/views/catalog/_facet_layout.html.erb_spec.rb +3 -3
- data/spec/views/catalog/facet.html.erb_spec.rb +0 -8
- data/spec/views/catalog/index.html.erb_spec.rb +6 -3
- data/spec/views/catalog/show.html.erb_spec.rb +1 -0
- data/tasks/blacklight.rake +8 -5
- metadata +30 -59
- data/app/assets/stylesheets/blacklight/_autocomplete.scss +0 -25
- data/app/assets/stylesheets/blacklight/_mixins.scss +0 -20
- data/app/components/blacklight/icons/legacy_icon_component.rb +0 -30
- data/app/javascript/blacklight/facet_suggest.js +0 -48
- data/app/javascript/blacklight/index.js +0 -18
- data/app/views/catalog/_constraints.html.erb +0 -1
- data/app/views/catalog/_facets.html.erb +0 -5
- data/app/views/catalog/_search_form.html.erb +0 -7
- data/app/views/catalog/_search_header.html.erb +0 -1
- data/app/views/catalog/_show_sidebar.html.erb +0 -3
- data/app/views/catalog/_show_tools.html.erb +0 -2
- data/app/views/catalog/_start_over.html.erb +0 -1
- data/app/views/shared/_header_navbar.html.erb +0 -1
- data/lib/generators/blacklight/assets/sprockets_generator.rb +0 -68
- data/spec/components/blacklight/system/dropdown_component_spec.rb +0 -26
- data/spec/views/catalog/_search_header.erb_spec.rb +0 -14
- data/spec/views/catalog/_show_sidebar.erb_spec.rb +0 -24
- data/spec/views/catalog/_show_tools.html.erb_spec.rb +0 -37
- /data/app/javascript/{blacklight → blacklight-frontend}/button_focus.js +0 -0
- /data/app/javascript/{blacklight → blacklight-frontend}/checkbox_submit.js +0 -0
- /data/app/javascript/{blacklight → blacklight-frontend}/modalForm.js +0 -0
- /data/app/javascript/{blacklight → blacklight-frontend}/search_context.js +0 -0
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:
|
4
|
+
version: 9.0.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Rochkind
|
@@ -14,10 +14,9 @@ authors:
|
|
14
14
|
- Dan Funk
|
15
15
|
- Naomi Dushay
|
16
16
|
- Justin Coyne
|
17
|
-
autorequire:
|
18
17
|
bindir: exe
|
19
18
|
cert_chain: []
|
20
|
-
date: 2025-
|
19
|
+
date: 2025-02-06 00:00:00.000000000 Z
|
21
20
|
dependencies:
|
22
21
|
- !ruby/object:Gem::Dependency
|
23
22
|
name: rails
|
@@ -25,7 +24,7 @@ dependencies:
|
|
25
24
|
requirements:
|
26
25
|
- - ">="
|
27
26
|
- !ruby/object:Gem::Version
|
28
|
-
version: '
|
27
|
+
version: '7.0'
|
29
28
|
- - "<"
|
30
29
|
- !ruby/object:Gem::Version
|
31
30
|
version: '9'
|
@@ -35,7 +34,7 @@ dependencies:
|
|
35
34
|
requirements:
|
36
35
|
- - ">="
|
37
36
|
- !ruby/object:Gem::Version
|
38
|
-
version: '
|
37
|
+
version: '7.0'
|
39
38
|
- - "<"
|
40
39
|
- !ruby/object:Gem::Version
|
41
40
|
version: '9'
|
@@ -113,22 +112,16 @@ dependencies:
|
|
113
112
|
name: view_component
|
114
113
|
requirement: !ruby/object:Gem::Requirement
|
115
114
|
requirements:
|
116
|
-
- - "
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
version: '2.74'
|
119
|
-
- - "<"
|
115
|
+
- - "~>"
|
120
116
|
- !ruby/object:Gem::Version
|
121
|
-
version: '
|
117
|
+
version: '3.9'
|
122
118
|
type: :runtime
|
123
119
|
prerelease: false
|
124
120
|
version_requirements: !ruby/object:Gem::Requirement
|
125
121
|
requirements:
|
126
|
-
- - "
|
127
|
-
- !ruby/object:Gem::Version
|
128
|
-
version: '2.74'
|
129
|
-
- - "<"
|
122
|
+
- - "~>"
|
130
123
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
124
|
+
version: '3.9'
|
132
125
|
- !ruby/object:Gem::Dependency
|
133
126
|
name: zeitwerk
|
134
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -167,22 +160,16 @@ dependencies:
|
|
167
160
|
name: rspec-rails
|
168
161
|
requirement: !ruby/object:Gem::Requirement
|
169
162
|
requirements:
|
170
|
-
- - "
|
171
|
-
- !ruby/object:Gem::Version
|
172
|
-
version: '6.1'
|
173
|
-
- - "<"
|
163
|
+
- - "~>"
|
174
164
|
- !ruby/object:Gem::Version
|
175
|
-
version: '
|
165
|
+
version: '7.0'
|
176
166
|
type: :development
|
177
167
|
prerelease: false
|
178
168
|
version_requirements: !ruby/object:Gem::Requirement
|
179
169
|
requirements:
|
180
|
-
- - "
|
181
|
-
- !ruby/object:Gem::Version
|
182
|
-
version: '6.1'
|
183
|
-
- - "<"
|
170
|
+
- - "~>"
|
184
171
|
- !ruby/object:Gem::Version
|
185
|
-
version: '
|
172
|
+
version: '7.0'
|
186
173
|
- !ruby/object:Gem::Dependency
|
187
174
|
name: rspec-collection_matchers
|
188
175
|
requirement: !ruby/object:Gem::Requirement
|
@@ -422,6 +409,7 @@ files:
|
|
422
409
|
- ".docker/app/entrypoint.sh"
|
423
410
|
- ".dockerignore"
|
424
411
|
- ".env"
|
412
|
+
- ".github/pull_request_template.md"
|
425
413
|
- ".github/workflows/ruby.yml"
|
426
414
|
- ".gitignore"
|
427
415
|
- ".hound.yml"
|
@@ -437,6 +425,7 @@ files:
|
|
437
425
|
- README.md
|
438
426
|
- Rakefile
|
439
427
|
- VERSION
|
428
|
+
- app/assets/builds/blacklight.css
|
440
429
|
- app/assets/config/blacklight/manifest.js
|
441
430
|
- app/assets/images/blacklight/logo.png
|
442
431
|
- app/assets/images/favicon.ico
|
@@ -444,7 +433,6 @@ files:
|
|
444
433
|
- app/assets/javascripts/blacklight/blacklight.esm.js.map
|
445
434
|
- app/assets/javascripts/blacklight/blacklight.js
|
446
435
|
- app/assets/javascripts/blacklight/blacklight.js.map
|
447
|
-
- app/assets/stylesheets/blacklight/_autocomplete.scss
|
448
436
|
- app/assets/stylesheets/blacklight/_balanced_list.scss
|
449
437
|
- app/assets/stylesheets/blacklight/_blacklight_base.scss
|
450
438
|
- app/assets/stylesheets/blacklight/_bookmark.scss
|
@@ -456,7 +444,6 @@ files:
|
|
456
444
|
- app/assets/stylesheets/blacklight/_header.scss
|
457
445
|
- app/assets/stylesheets/blacklight/_icons.scss
|
458
446
|
- app/assets/stylesheets/blacklight/_layout.scss
|
459
|
-
- app/assets/stylesheets/blacklight/_mixins.scss
|
460
447
|
- app/assets/stylesheets/blacklight/_modal.scss
|
461
448
|
- app/assets/stylesheets/blacklight/_pagination.scss
|
462
449
|
- app/assets/stylesheets/blacklight/_search_form.scss
|
@@ -464,6 +451,7 @@ files:
|
|
464
451
|
- app/assets/stylesheets/blacklight/_search_results.scss
|
465
452
|
- app/assets/stylesheets/blacklight/blacklight.scss
|
466
453
|
- app/assets/stylesheets/blacklight/blacklight_defaults.scss
|
454
|
+
- app/assets/stylesheets/blacklight/build.scss
|
467
455
|
- app/builders/blacklight/action_builder.rb
|
468
456
|
- app/components/blacklight/advanced_search_form_component.html.erb
|
469
457
|
- app/components/blacklight/advanced_search_form_component.rb
|
@@ -520,7 +508,6 @@ files:
|
|
520
508
|
- app/components/blacklight/hidden_search_state_component.rb
|
521
509
|
- app/components/blacklight/icons/bookmark_icon_component.rb
|
522
510
|
- app/components/blacklight/icons/icon_component.rb
|
523
|
-
- app/components/blacklight/icons/legacy_icon_component.rb
|
524
511
|
- app/components/blacklight/icons/list_component.rb
|
525
512
|
- app/components/blacklight/icons/remove_component.rb
|
526
513
|
- app/components/blacklight/icons/search_component.rb
|
@@ -531,6 +518,8 @@ files:
|
|
531
518
|
- app/components/blacklight/metadata_field_plain_text_layout_component.rb
|
532
519
|
- app/components/blacklight/response/facet_group_component.html.erb
|
533
520
|
- app/components/blacklight/response/facet_group_component.rb
|
521
|
+
- app/components/blacklight/response/facet_toggle_button_component.html.erb
|
522
|
+
- app/components/blacklight/response/facet_toggle_button_component.rb
|
534
523
|
- app/components/blacklight/response/pagination_component.html.erb
|
535
524
|
- app/components/blacklight/response/pagination_component.rb
|
536
525
|
- app/components/blacklight/response/sort_component.html.erb
|
@@ -561,6 +550,7 @@ files:
|
|
561
550
|
- app/components/blacklight/search_navbar_component.rb
|
562
551
|
- app/components/blacklight/skip_link_component.html.erb
|
563
552
|
- app/components/blacklight/skip_link_component.rb
|
553
|
+
- app/components/blacklight/skip_link_item_component.rb
|
564
554
|
- app/components/blacklight/start_over_button_component.rb
|
565
555
|
- app/components/blacklight/system/dropdown_button_component.rb
|
566
556
|
- app/components/blacklight/system/dropdown_component.html.erb
|
@@ -593,16 +583,16 @@ files:
|
|
593
583
|
- app/helpers/blacklight/url_helper_behavior.rb
|
594
584
|
- app/helpers/blacklight_helper.rb
|
595
585
|
- app/helpers/catalog_helper.rb
|
596
|
-
- app/javascript/blacklight/bookmark_toggle.js
|
597
|
-
- app/javascript/blacklight/button_focus.js
|
598
|
-
- app/javascript/blacklight/checkbox_submit.js
|
599
|
-
- app/javascript/blacklight/core.js
|
600
|
-
- app/javascript/blacklight/debounce.js
|
601
|
-
- app/javascript/blacklight/facet_suggest.js
|
602
|
-
- app/javascript/blacklight/index.js
|
603
|
-
- app/javascript/blacklight/modal.js
|
604
|
-
- app/javascript/blacklight/modalForm.js
|
605
|
-
- app/javascript/blacklight/search_context.js
|
586
|
+
- app/javascript/blacklight-frontend/bookmark_toggle.js
|
587
|
+
- app/javascript/blacklight-frontend/button_focus.js
|
588
|
+
- app/javascript/blacklight-frontend/checkbox_submit.js
|
589
|
+
- app/javascript/blacklight-frontend/core.js
|
590
|
+
- app/javascript/blacklight-frontend/debounce.js
|
591
|
+
- app/javascript/blacklight-frontend/facet_suggest.js
|
592
|
+
- app/javascript/blacklight-frontend/index.js
|
593
|
+
- app/javascript/blacklight-frontend/modal.js
|
594
|
+
- app/javascript/blacklight-frontend/modalForm.js
|
595
|
+
- app/javascript/blacklight-frontend/search_context.js
|
606
596
|
- app/models/blacklight/facet_paginator.rb
|
607
597
|
- app/models/blacklight/icon.rb
|
608
598
|
- app/models/blacklight/suggest_search.rb
|
@@ -659,7 +649,6 @@ files:
|
|
659
649
|
- app/views/catalog/_advanced_search_help.html.erb
|
660
650
|
- app/views/catalog/_bookmark_control.html.erb
|
661
651
|
- app/views/catalog/_citation.html.erb
|
662
|
-
- app/views/catalog/_constraints.html.erb
|
663
652
|
- app/views/catalog/_did_you_mean.html.erb
|
664
653
|
- app/views/catalog/_document.atom.builder
|
665
654
|
- app/views/catalog/_document.html.erb
|
@@ -670,7 +659,6 @@ files:
|
|
670
659
|
- app/views/catalog/_facet_layout.html.erb
|
671
660
|
- app/views/catalog/_facet_pagination.html.erb
|
672
661
|
- app/views/catalog/_facet_pivot.html.erb
|
673
|
-
- app/views/catalog/_facets.html.erb
|
674
662
|
- app/views/catalog/_field.json.jbuilder
|
675
663
|
- app/views/catalog/_group.html.erb
|
676
664
|
- app/views/catalog/_home.html.erb
|
@@ -679,19 +667,14 @@ files:
|
|
679
667
|
- app/views/catalog/_paginate_compact.html.erb
|
680
668
|
- app/views/catalog/_per_page_widget.html.erb
|
681
669
|
- app/views/catalog/_results_pagination.html.erb
|
682
|
-
- app/views/catalog/_search_form.html.erb
|
683
|
-
- app/views/catalog/_search_header.html.erb
|
684
670
|
- app/views/catalog/_search_results.html.erb
|
685
671
|
- app/views/catalog/_search_results_header.html.erb
|
686
672
|
- app/views/catalog/_search_sidebar.html.erb
|
687
673
|
- app/views/catalog/_show_main_content.html.erb
|
688
674
|
- app/views/catalog/_show_more_like_this.html.erb
|
689
|
-
- app/views/catalog/_show_sidebar.html.erb
|
690
|
-
- app/views/catalog/_show_tools.html.erb
|
691
675
|
- app/views/catalog/_sms_form.html.erb
|
692
676
|
- app/views/catalog/_sort_and_per_page.html.erb
|
693
677
|
- app/views/catalog/_sort_widget.html.erb
|
694
|
-
- app/views/catalog/_start_over.html.erb
|
695
678
|
- app/views/catalog/_view_type_group.html.erb
|
696
679
|
- app/views/catalog/_zero_results.html.erb
|
697
680
|
- app/views/catalog/advanced_search.html.erb
|
@@ -732,7 +715,6 @@ files:
|
|
732
715
|
- app/views/shared/_flash_messages.html.erb
|
733
716
|
- app/views/shared/_flash_msg.html.erb
|
734
717
|
- app/views/shared/_footer.html.erb
|
735
|
-
- app/views/shared/_header_navbar.html.erb
|
736
718
|
- app/views/shared/_modal.html.erb
|
737
719
|
- app/views/shared/_sitelinks_search_box.html.erb
|
738
720
|
- app/views/shared/_user_util_links.html.erb
|
@@ -805,7 +787,6 @@ files:
|
|
805
787
|
- lib/blacklight/version.rb
|
806
788
|
- lib/generators/blacklight/assets/importmap_generator.rb
|
807
789
|
- lib/generators/blacklight/assets/propshaft_generator.rb
|
808
|
-
- lib/generators/blacklight/assets/sprockets_generator.rb
|
809
790
|
- lib/generators/blacklight/assets_generator.rb
|
810
791
|
- lib/generators/blacklight/controller_generator.rb
|
811
792
|
- lib/generators/blacklight/document_generator.rb
|
@@ -870,7 +851,6 @@ files:
|
|
870
851
|
- spec/components/blacklight/search_context/server_item_pagination_component_spec.rb
|
871
852
|
- spec/components/blacklight/skip_link_component_spec.rb
|
872
853
|
- spec/components/blacklight/start_over_button_component_spec.rb
|
873
|
-
- spec/components/blacklight/system/dropdown_component_spec.rb
|
874
854
|
- spec/components/blacklight/system/flash_message_component_spec.rb
|
875
855
|
- spec/controllers/alternate_controller_spec.rb
|
876
856
|
- spec/controllers/application_controller_spec.rb
|
@@ -984,9 +964,6 @@ files:
|
|
984
964
|
- spec/views/catalog/_facet_index_navigation.html.erb_spec.rb
|
985
965
|
- spec/views/catalog/_facet_layout.html.erb_spec.rb
|
986
966
|
- spec/views/catalog/_paginate_compact.html.erb_spec.rb
|
987
|
-
- spec/views/catalog/_search_header.erb_spec.rb
|
988
|
-
- spec/views/catalog/_show_sidebar.erb_spec.rb
|
989
|
-
- spec/views/catalog/_show_tools.html.erb_spec.rb
|
990
967
|
- spec/views/catalog/_sort_and_per_page.html.erb_spec.rb
|
991
968
|
- spec/views/catalog/_sort_widget.html.erb_spec.rb
|
992
969
|
- spec/views/catalog/_view_type_group.html.erb_spec.rb
|
@@ -1007,7 +984,6 @@ homepage: http://projectblacklight.org/
|
|
1007
984
|
licenses:
|
1008
985
|
- Apache 2.0
|
1009
986
|
metadata: {}
|
1010
|
-
post_install_message:
|
1011
987
|
rdoc_options: []
|
1012
988
|
require_paths:
|
1013
989
|
- lib
|
@@ -1015,15 +991,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1015
991
|
requirements:
|
1016
992
|
- - ">="
|
1017
993
|
- !ruby/object:Gem::Version
|
1018
|
-
version: '
|
994
|
+
version: '3.1'
|
1019
995
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1020
996
|
requirements:
|
1021
997
|
- - ">="
|
1022
998
|
- !ruby/object:Gem::Version
|
1023
999
|
version: '0'
|
1024
1000
|
requirements: []
|
1025
|
-
rubygems_version: 3.
|
1026
|
-
signing_key:
|
1001
|
+
rubygems_version: 3.6.2
|
1027
1002
|
specification_version: 4
|
1028
1003
|
summary: Blacklight provides a discovery interface for any Solr (http://lucene.apache.org/solr)
|
1029
1004
|
index.
|
@@ -1055,7 +1030,6 @@ test_files:
|
|
1055
1030
|
- spec/components/blacklight/search_context/server_item_pagination_component_spec.rb
|
1056
1031
|
- spec/components/blacklight/skip_link_component_spec.rb
|
1057
1032
|
- spec/components/blacklight/start_over_button_component_spec.rb
|
1058
|
-
- spec/components/blacklight/system/dropdown_component_spec.rb
|
1059
1033
|
- spec/components/blacklight/system/flash_message_component_spec.rb
|
1060
1034
|
- spec/controllers/alternate_controller_spec.rb
|
1061
1035
|
- spec/controllers/application_controller_spec.rb
|
@@ -1169,9 +1143,6 @@ test_files:
|
|
1169
1143
|
- spec/views/catalog/_facet_index_navigation.html.erb_spec.rb
|
1170
1144
|
- spec/views/catalog/_facet_layout.html.erb_spec.rb
|
1171
1145
|
- spec/views/catalog/_paginate_compact.html.erb_spec.rb
|
1172
|
-
- spec/views/catalog/_search_header.erb_spec.rb
|
1173
|
-
- spec/views/catalog/_show_sidebar.erb_spec.rb
|
1174
|
-
- spec/views/catalog/_show_tools.html.erb_spec.rb
|
1175
1146
|
- spec/views/catalog/_sort_and_per_page.html.erb_spec.rb
|
1176
1147
|
- spec/views/catalog/_sort_widget.html.erb_spec.rb
|
1177
1148
|
- spec/views/catalog/_view_type_group.html.erb_spec.rb
|
@@ -1,25 +0,0 @@
|
|
1
|
-
auto-complete [aria-selected="true"],
|
2
|
-
auto-complete [role="option"]:hover {
|
3
|
-
background-color: $dropdown-link-hover-bg;
|
4
|
-
}
|
5
|
-
auto-complete {
|
6
|
-
position: relative;
|
7
|
-
flex-grow: 3;
|
8
|
-
|
9
|
-
ul {
|
10
|
-
list-style-type: none;
|
11
|
-
position: absolute;
|
12
|
-
background-color: $dropdown-bg;
|
13
|
-
padding-left: 0;
|
14
|
-
border: 1px solid $dropdown-border-color;
|
15
|
-
border-radius: $dropdown-border-radius;
|
16
|
-
}
|
17
|
-
|
18
|
-
[role="option"]{
|
19
|
-
padding: 0.25rem 1.5rem;
|
20
|
-
}
|
21
|
-
}
|
22
|
-
|
23
|
-
.no-js #autocomplete-popup {
|
24
|
-
display: none;
|
25
|
-
}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
// define a visually-hidden class that applies to a given breakpoint and below
|
2
|
-
// https://getbootstrap.com/docs/5.3/helpers/visually-hidden/
|
3
|
-
@if mixin-exists(visually-hidden) {
|
4
|
-
@each $breakpoint in map-keys($grid-breakpoints) {
|
5
|
-
.visually-hidden-#{$breakpoint} {
|
6
|
-
@include media-breakpoint-down($breakpoint) {
|
7
|
-
@include visually-hidden;
|
8
|
-
}
|
9
|
-
}
|
10
|
-
}
|
11
|
-
} @else if mixin-exists(sr-only) {
|
12
|
-
// Bootstrap 4 version
|
13
|
-
@each $breakpoint in map-keys($grid-breakpoints) {
|
14
|
-
.visually-hidden-#{$breakpoint} {
|
15
|
-
@include media-breakpoint-down($breakpoint) {
|
16
|
-
@include sr-only;
|
17
|
-
}
|
18
|
-
}
|
19
|
-
}
|
20
|
-
}
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Blacklight
|
4
|
-
module Icons
|
5
|
-
class LegacyIconComponent < ::ViewComponent::Base
|
6
|
-
def initialize(name:, classes: '', aria_hidden: false, label: true, role: 'img', additional_options: {})
|
7
|
-
@name = name
|
8
|
-
@classes = classes
|
9
|
-
@aria_hidden = aria_hidden
|
10
|
-
@icon = Blacklight::Icon.new(name, classes: classes, label: label, role: role, additional_options: additional_options)
|
11
|
-
end
|
12
|
-
|
13
|
-
def call
|
14
|
-
tag.span(svg&.html_safe || default_icon, # rubocop:disable Rails/OutputSafety
|
15
|
-
class: "blacklight-icons blacklight-icon-#{@name} #{@classes}".strip,
|
16
|
-
'aria-hidden': (true if @aria_hidden))
|
17
|
-
end
|
18
|
-
|
19
|
-
def svg
|
20
|
-
Rails.cache.fetch([:blacklight_icon_svg, @name]) do
|
21
|
-
@icon.svg if @icon.present?
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
def default_icon
|
26
|
-
@icon.icon_label
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,48 +0,0 @@
|
|
1
|
-
import debounce from "blacklight/debounce";
|
2
|
-
|
3
|
-
const FacetSuggest = async (e) => {
|
4
|
-
if (e.target.matches('.facet-suggest')) {
|
5
|
-
const queryFragment = e.target.value?.trim();
|
6
|
-
const facetField = e.target.dataset.facetField;
|
7
|
-
const facetArea = document.querySelector('.facet-extended-list');
|
8
|
-
const prevNextLinks = document.querySelectorAll('.prev_next_links');
|
9
|
-
|
10
|
-
if (!facetField) { return; }
|
11
|
-
|
12
|
-
// Get the search params from the current query so the facet suggestions
|
13
|
-
// can retain that context.
|
14
|
-
const facetSearchContext = e.target.dataset.facetSearchContext;
|
15
|
-
const url = new URL(facetSearchContext, window.location.origin);
|
16
|
-
|
17
|
-
// Drop facet.page so a filtered suggestion list will always start on page 1
|
18
|
-
url.searchParams.delete('facet.page');
|
19
|
-
const facetSearchParams = url.searchParams.toString();
|
20
|
-
|
21
|
-
const urlToFetch = `/catalog/facet_suggest/${facetField}/${queryFragment}?${facetSearchParams}`;
|
22
|
-
|
23
|
-
const response = await fetch(urlToFetch);
|
24
|
-
if (response.ok) {
|
25
|
-
const blob = await response.blob()
|
26
|
-
const text = await blob.text()
|
27
|
-
|
28
|
-
const facetArea = document.querySelector('.facet-extended-list');
|
29
|
-
|
30
|
-
if (text && facetArea) {
|
31
|
-
facetArea.innerHTML = text
|
32
|
-
}
|
33
|
-
}
|
34
|
-
|
35
|
-
// Hide the prev/next links when a user enters text in the facet
|
36
|
-
// suggestion input. They don't work with a filtered list.
|
37
|
-
prevNextLinks.forEach(element => {
|
38
|
-
element.classList.toggle('invisible', !!queryFragment);
|
39
|
-
});
|
40
|
-
|
41
|
-
// Add a class to distinguish suggested facet values vs. regular.
|
42
|
-
facetArea.classList.toggle('facet-suggestions', !!queryFragment);
|
43
|
-
}
|
44
|
-
};
|
45
|
-
|
46
|
-
document.addEventListener('input', debounce(FacetSuggest));
|
47
|
-
|
48
|
-
export default FacetSuggest
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import BookmarkToggle from 'blacklight/bookmark_toggle'
|
2
|
-
import ButtonFocus from 'blacklight/button_focus'
|
3
|
-
import FacetSuggest from 'blacklight/facet_suggest'
|
4
|
-
import Modal from 'blacklight/modal'
|
5
|
-
import ModalForm from 'blacklight/modalForm'
|
6
|
-
import SearchContext from 'blacklight/search_context'
|
7
|
-
import Core from 'blacklight/core'
|
8
|
-
|
9
|
-
export default {
|
10
|
-
BookmarkToggle,
|
11
|
-
ButtonFocus,
|
12
|
-
FacetSuggest,
|
13
|
-
Modal,
|
14
|
-
ModalForm,
|
15
|
-
SearchContext,
|
16
|
-
Core,
|
17
|
-
onLoad: Core.onLoad
|
18
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= render (blacklight_config&.view_config(document_index_view_type)&.constraints_component || Blacklight::ConstraintsComponent).new(search_state: search_state) %>
|
@@ -1,7 +0,0 @@
|
|
1
|
-
<%= warn "#{__file__} is a deprecated partial." %>
|
2
|
-
<%= render((blacklight_config&.view_config(document_index_view_type)&.search_bar_component || Blacklight::SearchBarComponent).new(
|
3
|
-
url: search_action_url,
|
4
|
-
advanced_search_url: search_action_url(action: 'advanced_search'),
|
5
|
-
params: search_state.params_for_search.except(:qt),
|
6
|
-
presenter: presenter,
|
7
|
-
autocomplete_path: suggest_index_catalog_path)) %>
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= render blacklight_config.view_config(document_index_view_type).search_header_component.new %>
|
@@ -1,3 +0,0 @@
|
|
1
|
-
<% Blacklight.deprecation.warn('The partial catalog/_show_sidebar.html.erb will be removed in Blacklight 9.0. Configure blacklight_config.show.sidebar_component instead (default Blacklight::Search::SidebarComponent).') unless local_assigns[:silence_deprecation] %>
|
2
|
-
<% presenter = document_presenter(document) %>
|
3
|
-
<%= render presenter.view_config.sidebar_component.new(presenter: presenter) %>
|
@@ -1,2 +0,0 @@
|
|
1
|
-
<% Blacklight.deprecation.warn('The partial _show_tools.html.erb will be removed in Blacklight 9.0. Configure blacklight_config.show.show_tools_component instead (default Blacklight::Document::ShowToolsComponent).') unless local_assigns[:silence_deprecation] %>
|
2
|
-
<%= render Blacklight::Document::ShowToolsComponent.new(document: document) %>
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= render Blacklight::StartOverButtonComponent.new %>
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= render blacklight_config.header_component.new(blacklight_config: blacklight_config) %>
|
@@ -1,68 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Blacklight
|
4
|
-
module Assets
|
5
|
-
class SprocketsGenerator < Rails::Generators::Base
|
6
|
-
class_option :'bootstrap-version', type: :string, default: ENV.fetch('BOOTSTRAP_VERSION', '~> 5.3'), desc: "Set the generated app's bootstrap version"
|
7
|
-
|
8
|
-
# This could be skipped if you want to use webpacker
|
9
|
-
def add_javascript_dependencies
|
10
|
-
gem 'bootstrap', options[:'bootstrap-version'].presence
|
11
|
-
gem 'jquery-rails' if bootstrap_4? # Bootstrap 4 has a dependency on jquery
|
12
|
-
end
|
13
|
-
|
14
|
-
##
|
15
|
-
# Remove the empty generated app/assets/images directory. Without doing this,
|
16
|
-
# the default Sprockets 4 manifest will raise an exception.
|
17
|
-
def appease_sprockets4
|
18
|
-
return if Rails.version > '7' || Sprockets::VERSION < '4'
|
19
|
-
|
20
|
-
append_to_file 'app/assets/config/manifest.js', "\n//= link application.js"
|
21
|
-
append_to_file 'app/assets/config/manifest.js', "\n//= link blacklight/manifest.js"
|
22
|
-
empty_directory 'app/assets/images'
|
23
|
-
end
|
24
|
-
|
25
|
-
def assets
|
26
|
-
create_file 'app/assets/stylesheets/blacklight.scss' do
|
27
|
-
<<~CONTENT
|
28
|
-
@import 'bootstrap';
|
29
|
-
@import 'blacklight/blacklight';
|
30
|
-
CONTENT
|
31
|
-
end
|
32
|
-
|
33
|
-
gem "sassc-rails", "~> 2.1" if Rails.version > '7'
|
34
|
-
|
35
|
-
# Ensure this method is idempotent
|
36
|
-
return if has_blacklight_assets?
|
37
|
-
|
38
|
-
create_file 'app/assets/javascripts/application.js' do
|
39
|
-
<<~CONTENT
|
40
|
-
//= require rails-ujs
|
41
|
-
#{'//= require jquery3' if bootstrap_4?}
|
42
|
-
|
43
|
-
// Required by Blacklight
|
44
|
-
//= require popper
|
45
|
-
//= require bootstrap
|
46
|
-
//= require blacklight/blacklight
|
47
|
-
CONTENT
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
private
|
52
|
-
|
53
|
-
def bootstrap_4?
|
54
|
-
options[:'bootstrap-version'].match?(/\A[^0-9]*4\./)
|
55
|
-
end
|
56
|
-
|
57
|
-
def has_blacklight_assets?
|
58
|
-
application_js.include?('blacklight/blacklight')
|
59
|
-
end
|
60
|
-
|
61
|
-
def application_js
|
62
|
-
path = File.expand_path("app/assets/javascripts/application.js", destination_root)
|
63
|
-
|
64
|
-
File.exist?(path) ? File.read(path) : ''
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
RSpec.describe Blacklight::System::DropdownComponent, type: :component do
|
6
|
-
it 'includes a link for each choice' do
|
7
|
-
search_state = double(Blacklight::SearchState)
|
8
|
-
allow(search_state).to receive(:params_for_search).and_return('http://example.com')
|
9
|
-
rendered = render_inline(described_class.new(
|
10
|
-
param: :per_page,
|
11
|
-
choices: [
|
12
|
-
['10 per page', 10],
|
13
|
-
['20 per page', 20]
|
14
|
-
],
|
15
|
-
search_state: search_state,
|
16
|
-
selected: 20,
|
17
|
-
interpolation: :count
|
18
|
-
))
|
19
|
-
|
20
|
-
expect(rendered.css('a').length).to eq 2
|
21
|
-
expect(rendered.css('a')[0].text).to eq '10 per page'
|
22
|
-
expect(rendered.css('a')[0].attributes).not_to have_key 'aria-current'
|
23
|
-
expect(rendered.css('a')[1].text).to eq '20 per page'
|
24
|
-
expect(rendered.css('a')[1].attributes).to have_key 'aria-current'
|
25
|
-
end
|
26
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# spec for sidebar partial in catalog show view
|
4
|
-
|
5
|
-
RSpec.describe "/catalog/_search_header.html.erb" do
|
6
|
-
it "renders the default search header partials" do
|
7
|
-
stub_template "_did_you_mean.html.erb" => "did_you_mean"
|
8
|
-
stub_template "_sort_and_per_page.html.erb" => "sort_and_per_page"
|
9
|
-
allow(view).to receive(:blacklight_config).and_return(CatalogController.blacklight_config)
|
10
|
-
render
|
11
|
-
expect(rendered).to match /did_you_mean/
|
12
|
-
expect(rendered).to match /sort_and_per_page/
|
13
|
-
end
|
14
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# spec for sidebar partial in catalog show view
|
4
|
-
|
5
|
-
RSpec.describe "catalog/_show_sidebar.html.erb" do
|
6
|
-
let(:blacklight_config) do
|
7
|
-
Blacklight::Configuration.new do |config|
|
8
|
-
config.index.title_field = 'title_tsim'
|
9
|
-
config.index.sidebar_component = Blacklight::Document::SidebarComponent
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
before do
|
14
|
-
allow(view).to receive_messages(blacklight_config: blacklight_config, has_user_authentication_provider?: false, document_actions: [], session_tracking_params: {})
|
15
|
-
end
|
16
|
-
|
17
|
-
it "shows more-like-this titles in the sidebar" do
|
18
|
-
document = SolrDocument.new id: 1, title_s: 'abc', format: 'default'
|
19
|
-
allow(document).to receive(:more_like_this).and_return([SolrDocument.new('id' => '2', 'title_tsim' => 'Title of MLT Document')])
|
20
|
-
render 'catalog/show_sidebar', document: document
|
21
|
-
expect(rendered).to include("More Like This")
|
22
|
-
expect(rendered).to include("Title of MLT Document")
|
23
|
-
end
|
24
|
-
end
|
@@ -1,37 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
RSpec.describe "catalog/_show_tools.html.erb" do
|
4
|
-
let(:document) { SolrDocument.new id: 'xyz', format: 'a' }
|
5
|
-
let(:blacklight_config) { Blacklight::Configuration.new }
|
6
|
-
let(:component) { instance_double(Blacklight::Document::ShowToolsComponent) }
|
7
|
-
|
8
|
-
before do
|
9
|
-
allow(Blacklight::Document::ShowToolsComponent).to receive(:new).and_return(component)
|
10
|
-
allow(view).to receive(:render).with(component)
|
11
|
-
allow(view).to receive(:render).with('catalog/show_tools', { document: document }).and_call_original
|
12
|
-
allow(view).to receive_messages(blacklight_config: blacklight_config, has_user_authentication_provider?: false)
|
13
|
-
end
|
14
|
-
|
15
|
-
describe "document actions" do
|
16
|
-
let(:document_actions) { blacklight_config.show.document_actions }
|
17
|
-
|
18
|
-
it "renders a document action" do
|
19
|
-
allow(view).to receive(:some_action_solr_document_path).with(document, any_args).and_return 'x'
|
20
|
-
document_actions[:some_action] = Blacklight::Configuration::ToolConfig.new key: :some_action, name: :some_action, partial: 'document_action'
|
21
|
-
render 'catalog/show_tools', document: document
|
22
|
-
expect(view).to have_received(:render).with(component)
|
23
|
-
end
|
24
|
-
|
25
|
-
context 'without any document actions defined' do
|
26
|
-
before do
|
27
|
-
document_actions.clear
|
28
|
-
end
|
29
|
-
|
30
|
-
it 'does not display the tools' do
|
31
|
-
render 'catalog/show_tools', document: document
|
32
|
-
|
33
|
-
expect(rendered).to be_blank
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|