blacklight 8.8.3 → 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.
Files changed (179) hide show
  1. checksums.yaml +4 -4
  2. data/.env +3 -3
  3. data/.github/pull_request_template.md +7 -0
  4. data/.github/workflows/ruby.yml +1 -9
  5. data/.rubocop.yml +2 -2
  6. data/.rubocop_todo.yml +0 -9
  7. data/README.md +30 -8
  8. data/VERSION +1 -1
  9. data/app/assets/builds/blacklight.css +448 -0
  10. data/app/assets/javascripts/blacklight/blacklight.esm.js +18 -15
  11. data/app/assets/javascripts/blacklight/blacklight.esm.js.map +1 -1
  12. data/app/assets/javascripts/blacklight/blacklight.js +18 -15
  13. data/app/assets/javascripts/blacklight/blacklight.js.map +1 -1
  14. data/app/assets/stylesheets/blacklight/_balanced_list.scss +1 -4
  15. data/app/assets/stylesheets/blacklight/_blacklight_base.scss +1 -3
  16. data/app/assets/stylesheets/blacklight/_bookmark.scss +44 -41
  17. data/app/assets/stylesheets/blacklight/_bootstrap_overrides.scss +7 -26
  18. data/app/assets/stylesheets/blacklight/_constraints.scss +15 -24
  19. data/app/assets/stylesheets/blacklight/_controls.scss +2 -18
  20. data/app/assets/stylesheets/blacklight/_facets.scss +15 -82
  21. data/app/assets/stylesheets/blacklight/_group.scss +2 -5
  22. data/app/assets/stylesheets/blacklight/_header.scss +4 -11
  23. data/app/assets/stylesheets/blacklight/_icons.scss +0 -8
  24. data/app/assets/stylesheets/blacklight/_modal.scss +2 -2
  25. data/app/assets/stylesheets/blacklight/_pagination.scss +0 -4
  26. data/app/assets/stylesheets/blacklight/_search_form.scss +0 -1
  27. data/app/assets/stylesheets/blacklight/_search_history.scss +0 -4
  28. data/app/assets/stylesheets/blacklight/_search_results.scss +1 -15
  29. data/app/assets/stylesheets/blacklight/blacklight_defaults.scss +9 -14
  30. data/app/assets/stylesheets/blacklight/build.scss +4 -0
  31. data/app/components/blacklight/advanced_search_form_component.rb +1 -1
  32. data/app/components/blacklight/constraint_component.rb +1 -1
  33. data/app/components/blacklight/constraint_layout_component.html.erb +2 -2
  34. data/app/components/blacklight/constraints_component.html.erb +2 -2
  35. data/app/components/blacklight/constraints_component.rb +1 -1
  36. data/app/components/blacklight/document/action_component.rb +3 -1
  37. data/app/components/blacklight/document/bookmark_component.html.erb +3 -3
  38. data/app/components/blacklight/document/group_component.html.erb +1 -1
  39. data/app/components/blacklight/document/page_header_component.rb +1 -1
  40. data/app/components/blacklight/document/sidebar_component.rb +5 -5
  41. data/app/components/blacklight/document_component.rb +9 -13
  42. data/app/components/blacklight/document_title_component.rb +3 -2
  43. data/app/components/blacklight/facet_field_component.html.erb +5 -5
  44. data/app/components/blacklight/facet_field_list_component.rb +4 -22
  45. data/app/components/blacklight/facet_item_component.rb +2 -2
  46. data/app/components/blacklight/facet_item_pivot_component.rb +2 -2
  47. data/app/components/blacklight/response/facet_group_component.html.erb +3 -18
  48. data/app/components/blacklight/response/facet_group_component.rb +7 -23
  49. data/app/components/blacklight/response/facet_toggle_button_component.html.erb +16 -0
  50. data/app/components/blacklight/response/facet_toggle_button_component.rb +14 -0
  51. data/app/components/blacklight/response/pagination_component.html.erb +1 -1
  52. data/app/components/blacklight/response/pagination_component.rb +2 -1
  53. data/app/components/blacklight/response/sort_component.rb +1 -0
  54. data/app/components/blacklight/response/view_type_button_component.html.erb +1 -1
  55. data/app/components/blacklight/response/view_type_component.html.erb +1 -1
  56. data/app/components/blacklight/search/facet_suggest_input.html.erb +7 -7
  57. data/app/components/blacklight/search/facet_suggest_input.rb +0 -4
  58. data/app/components/blacklight/search/per_page_component.html.erb +1 -1
  59. data/app/components/blacklight/search/per_page_component.rb +1 -0
  60. data/app/components/blacklight/search/sidebar_component.html.erb +1 -1
  61. data/app/components/blacklight/search/sidebar_component.rb +1 -1
  62. data/app/components/blacklight/search_bar_component.html.erb +3 -3
  63. data/app/components/blacklight/search_bar_component.rb +2 -2
  64. data/app/components/blacklight/search_button_component.rb +2 -2
  65. data/app/components/blacklight/search_context/server_applied_params_component.html.erb +2 -2
  66. data/app/components/blacklight/search_context/server_applied_params_component.rb +9 -0
  67. data/app/components/blacklight/skip_link_component.html.erb +1 -1
  68. data/app/components/blacklight/skip_link_component.rb +7 -3
  69. data/app/components/blacklight/skip_link_item_component.rb +18 -0
  70. data/app/components/blacklight/top_navbar_component.html.erb +1 -1
  71. data/app/controllers/concerns/blacklight/catalog.rb +3 -2
  72. data/app/controllers/concerns/blacklight/search_context.rb +0 -12
  73. data/app/helpers/blacklight/blacklight_helper_behavior.rb +0 -6
  74. data/app/helpers/blacklight/catalog_helper_behavior.rb +1 -11
  75. data/app/helpers/blacklight/configuration_helper_behavior.rb +0 -12
  76. data/app/helpers/blacklight/document_helper_behavior.rb +0 -26
  77. data/app/helpers/blacklight/icon_helper_behavior.rb +1 -9
  78. data/app/helpers/blacklight/layout_helper_behavior.rb +2 -2
  79. data/app/helpers/blacklight/render_partials_helper_behavior.rb +0 -14
  80. data/app/helpers/blacklight/url_helper_behavior.rb +1 -1
  81. data/app/javascript/{blacklight → blacklight-frontend}/bookmark_toggle.js +1 -1
  82. data/app/javascript/{blacklight → blacklight-frontend}/core.js +2 -10
  83. data/app/javascript/{blacklight → blacklight-frontend}/debounce.js +1 -1
  84. data/app/javascript/{blacklight → blacklight-frontend}/facet_suggest.js +3 -3
  85. data/app/javascript/blacklight-frontend/index.js +18 -0
  86. data/app/javascript/{blacklight → blacklight-frontend}/modal.js +16 -2
  87. data/app/models/concerns/blacklight/document.rb +0 -11
  88. data/app/models/concerns/blacklight/user.rb +1 -1
  89. data/app/presenters/blacklight/facet_field_presenter.rb +2 -2
  90. data/app/presenters/blacklight/json_presenter.rb +3 -1
  91. data/app/services/blacklight/search_params_yaml_coder.rb +0 -2
  92. data/app/views/bookmarks/_clear_bookmarks_widget.html.erb +0 -2
  93. data/app/views/bookmarks/index.html.erb +1 -1
  94. data/app/views/catalog/_results_pagination.html.erb +2 -5
  95. data/app/views/catalog/_search_results.html.erb +4 -4
  96. data/app/views/catalog/_search_results_header.html.erb +1 -1
  97. data/app/views/catalog/_sort_and_per_page.html.erb +1 -1
  98. data/app/views/catalog/_sort_widget.html.erb +1 -0
  99. data/app/views/catalog/facet.html.erb +1 -1
  100. data/app/views/catalog/show.html.erb +2 -3
  101. data/app/views/kaminari/blacklight/_paginator.html.erb +1 -2
  102. data/app/views/layouts/blacklight/base.html.erb +3 -7
  103. data/app/views/search_history/index.html.erb +0 -2
  104. data/blacklight.gemspec +4 -4
  105. data/config/importmap.rb +1 -1
  106. data/config/locales/blacklight.ar.yml +4 -4
  107. data/config/locales/blacklight.ca.yml +124 -124
  108. data/config/locales/blacklight.de.yml +2 -2
  109. data/config/locales/blacklight.en.yml +14 -14
  110. data/config/locales/blacklight.es.yml +4 -4
  111. data/config/locales/blacklight.fr.yml +4 -4
  112. data/config/locales/blacklight.hu.yml +4 -4
  113. data/config/locales/blacklight.it.yml +3 -3
  114. data/config/locales/blacklight.nl.yml +3 -3
  115. data/config/locales/blacklight.pt-BR.yml +3 -3
  116. data/config/locales/blacklight.sq.yml +4 -4
  117. data/config/locales/blacklight.zh.yml +4 -4
  118. data/lib/blacklight/configuration/display_field.rb +1 -1
  119. data/lib/blacklight/configuration/fields.rb +3 -3
  120. data/lib/blacklight/configuration/view_config.rb +0 -2
  121. data/lib/blacklight/configuration.rb +7 -12
  122. data/lib/blacklight/engine.rb +0 -6
  123. data/lib/blacklight/open_struct_with_hash_access.rb +4 -4
  124. data/lib/blacklight/search_builder.rb +4 -4
  125. data/lib/blacklight/search_state/filter_field.rb +2 -2
  126. data/lib/blacklight/solr/request.rb +1 -7
  127. data/lib/blacklight/solr/response/group_response.rb +2 -2
  128. data/lib/blacklight.rb +1 -1
  129. data/lib/generators/blacklight/assets/importmap_generator.rb +8 -24
  130. data/lib/generators/blacklight/assets/propshaft_generator.rb +1 -1
  131. data/lib/generators/blacklight/assets_generator.rb +3 -3
  132. data/lib/generators/blacklight/controller_generator.rb +3 -3
  133. data/lib/generators/blacklight/user_generator.rb +9 -10
  134. data/package.json +14 -4
  135. data/rollup.config.js +1 -1
  136. data/spec/components/blacklight/document/action_component_spec.rb +1 -5
  137. data/spec/components/blacklight/document/sidebar_component_spec.rb +5 -20
  138. data/spec/components/blacklight/facet_field_checkboxes_component_spec.rb +2 -2
  139. data/spec/components/blacklight/facet_field_list_component_spec.rb +2 -2
  140. data/spec/components/blacklight/search/facet_suggest_input_spec.rb +2 -18
  141. data/spec/components/blacklight/search_bar_component_spec.rb +1 -1
  142. data/spec/controllers/catalog_controller_spec.rb +1 -1
  143. data/spec/features/axe_spec.rb +6 -11
  144. data/spec/features/bookmarks_spec.rb +48 -11
  145. data/spec/features/facets_spec.rb +21 -36
  146. data/spec/features/search_context_spec.rb +1 -2
  147. data/spec/features/search_filters_spec.rb +6 -6
  148. data/spec/helpers/blacklight/configuration_helper_behavior_spec.rb +0 -9
  149. data/spec/helpers/blacklight/render_partials_helper_behavior_spec.rb +1 -1
  150. data/spec/lib/blacklight/parameters_spec.rb +1 -12
  151. data/spec/lib/blacklight/search_state/filter_field_spec.rb +0 -18
  152. data/spec/models/blacklight/solr/request_spec.rb +7 -0
  153. data/spec/services/blacklight/search_service_spec.rb +1 -1
  154. data/spec/test_app_templates/Gemfile.extra +0 -1
  155. data/spec/views/catalog/_facet_layout.html.erb_spec.rb +3 -3
  156. data/spec/views/catalog/index.html.erb_spec.rb +6 -3
  157. data/spec/views/catalog/show.html.erb_spec.rb +1 -0
  158. data/tasks/blacklight.rake +8 -5
  159. metadata +30 -54
  160. data/app/assets/stylesheets/blacklight/_autocomplete.scss +0 -25
  161. data/app/assets/stylesheets/blacklight/_mixins.scss +0 -20
  162. data/app/components/blacklight/icons/legacy_icon_component.rb +0 -30
  163. data/app/javascript/blacklight/index.js +0 -18
  164. data/app/views/catalog/_constraints.html.erb +0 -1
  165. data/app/views/catalog/_facets.html.erb +0 -5
  166. data/app/views/catalog/_search_form.html.erb +0 -7
  167. data/app/views/catalog/_search_header.html.erb +0 -1
  168. data/app/views/catalog/_show_sidebar.html.erb +0 -3
  169. data/app/views/catalog/_show_tools.html.erb +0 -2
  170. data/app/views/catalog/_start_over.html.erb +0 -1
  171. data/app/views/shared/_header_navbar.html.erb +0 -1
  172. data/lib/generators/blacklight/assets/sprockets_generator.rb +0 -68
  173. data/spec/views/catalog/_search_header.erb_spec.rb +0 -14
  174. data/spec/views/catalog/_show_sidebar.erb_spec.rb +0 -24
  175. data/spec/views/catalog/_show_tools.html.erb_spec.rb +0 -37
  176. /data/app/javascript/{blacklight → blacklight-frontend}/button_focus.js +0 -0
  177. /data/app/javascript/{blacklight → blacklight-frontend}/checkbox_submit.js +0 -0
  178. /data/app/javascript/{blacklight → blacklight-frontend}/modalForm.js +0 -0
  179. /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: 8.8.3
4
+ version: 9.0.0.beta1
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: 2025-02-26 00:00:00.000000000 Z
19
+ date: 2025-02-06 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: '6.1'
27
+ version: '7.0'
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: '6.1'
37
+ version: '7.0'
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: '2.74'
118
- - - "<"
115
+ - - "~>"
119
116
  - !ruby/object:Gem::Version
120
- version: '4'
117
+ version: '3.9'
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: '2.74'
128
- - - "<"
122
+ - - "~>"
129
123
  - !ruby/object:Gem::Version
130
- version: '4'
124
+ version: '3.9'
131
125
  - !ruby/object:Gem::Dependency
132
126
  name: zeitwerk
133
127
  requirement: !ruby/object:Gem::Requirement
@@ -166,22 +160,16 @@ dependencies:
166
160
  name: rspec-rails
167
161
  requirement: !ruby/object:Gem::Requirement
168
162
  requirements:
169
- - - ">="
170
- - !ruby/object:Gem::Version
171
- version: '6.1'
172
- - - "<"
163
+ - - "~>"
173
164
  - !ruby/object:Gem::Version
174
- version: '8'
165
+ version: '7.0'
175
166
  type: :development
176
167
  prerelease: false
177
168
  version_requirements: !ruby/object:Gem::Requirement
178
169
  requirements:
179
- - - ">="
180
- - !ruby/object:Gem::Version
181
- version: '6.1'
182
- - - "<"
170
+ - - "~>"
183
171
  - !ruby/object:Gem::Version
184
- version: '8'
172
+ version: '7.0'
185
173
  - !ruby/object:Gem::Dependency
186
174
  name: rspec-collection_matchers
187
175
  requirement: !ruby/object:Gem::Requirement
@@ -421,6 +409,7 @@ files:
421
409
  - ".docker/app/entrypoint.sh"
422
410
  - ".dockerignore"
423
411
  - ".env"
412
+ - ".github/pull_request_template.md"
424
413
  - ".github/workflows/ruby.yml"
425
414
  - ".gitignore"
426
415
  - ".hound.yml"
@@ -436,6 +425,7 @@ files:
436
425
  - README.md
437
426
  - Rakefile
438
427
  - VERSION
428
+ - app/assets/builds/blacklight.css
439
429
  - app/assets/config/blacklight/manifest.js
440
430
  - app/assets/images/blacklight/logo.png
441
431
  - app/assets/images/favicon.ico
@@ -443,7 +433,6 @@ files:
443
433
  - app/assets/javascripts/blacklight/blacklight.esm.js.map
444
434
  - app/assets/javascripts/blacklight/blacklight.js
445
435
  - app/assets/javascripts/blacklight/blacklight.js.map
446
- - app/assets/stylesheets/blacklight/_autocomplete.scss
447
436
  - app/assets/stylesheets/blacklight/_balanced_list.scss
448
437
  - app/assets/stylesheets/blacklight/_blacklight_base.scss
449
438
  - app/assets/stylesheets/blacklight/_bookmark.scss
@@ -455,7 +444,6 @@ files:
455
444
  - app/assets/stylesheets/blacklight/_header.scss
456
445
  - app/assets/stylesheets/blacklight/_icons.scss
457
446
  - app/assets/stylesheets/blacklight/_layout.scss
458
- - app/assets/stylesheets/blacklight/_mixins.scss
459
447
  - app/assets/stylesheets/blacklight/_modal.scss
460
448
  - app/assets/stylesheets/blacklight/_pagination.scss
461
449
  - app/assets/stylesheets/blacklight/_search_form.scss
@@ -463,6 +451,7 @@ files:
463
451
  - app/assets/stylesheets/blacklight/_search_results.scss
464
452
  - app/assets/stylesheets/blacklight/blacklight.scss
465
453
  - app/assets/stylesheets/blacklight/blacklight_defaults.scss
454
+ - app/assets/stylesheets/blacklight/build.scss
466
455
  - app/builders/blacklight/action_builder.rb
467
456
  - app/components/blacklight/advanced_search_form_component.html.erb
468
457
  - app/components/blacklight/advanced_search_form_component.rb
@@ -519,7 +508,6 @@ files:
519
508
  - app/components/blacklight/hidden_search_state_component.rb
520
509
  - app/components/blacklight/icons/bookmark_icon_component.rb
521
510
  - app/components/blacklight/icons/icon_component.rb
522
- - app/components/blacklight/icons/legacy_icon_component.rb
523
511
  - app/components/blacklight/icons/list_component.rb
524
512
  - app/components/blacklight/icons/remove_component.rb
525
513
  - app/components/blacklight/icons/search_component.rb
@@ -530,6 +518,8 @@ files:
530
518
  - app/components/blacklight/metadata_field_plain_text_layout_component.rb
531
519
  - app/components/blacklight/response/facet_group_component.html.erb
532
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
533
523
  - app/components/blacklight/response/pagination_component.html.erb
534
524
  - app/components/blacklight/response/pagination_component.rb
535
525
  - app/components/blacklight/response/sort_component.html.erb
@@ -560,6 +550,7 @@ files:
560
550
  - app/components/blacklight/search_navbar_component.rb
561
551
  - app/components/blacklight/skip_link_component.html.erb
562
552
  - app/components/blacklight/skip_link_component.rb
553
+ - app/components/blacklight/skip_link_item_component.rb
563
554
  - app/components/blacklight/start_over_button_component.rb
564
555
  - app/components/blacklight/system/dropdown_button_component.rb
565
556
  - app/components/blacklight/system/dropdown_component.html.erb
@@ -592,16 +583,16 @@ files:
592
583
  - app/helpers/blacklight/url_helper_behavior.rb
593
584
  - app/helpers/blacklight_helper.rb
594
585
  - app/helpers/catalog_helper.rb
595
- - app/javascript/blacklight/bookmark_toggle.js
596
- - app/javascript/blacklight/button_focus.js
597
- - app/javascript/blacklight/checkbox_submit.js
598
- - app/javascript/blacklight/core.js
599
- - app/javascript/blacklight/debounce.js
600
- - app/javascript/blacklight/facet_suggest.js
601
- - app/javascript/blacklight/index.js
602
- - app/javascript/blacklight/modal.js
603
- - app/javascript/blacklight/modalForm.js
604
- - 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
605
596
  - app/models/blacklight/facet_paginator.rb
606
597
  - app/models/blacklight/icon.rb
607
598
  - app/models/blacklight/suggest_search.rb
@@ -658,7 +649,6 @@ files:
658
649
  - app/views/catalog/_advanced_search_help.html.erb
659
650
  - app/views/catalog/_bookmark_control.html.erb
660
651
  - app/views/catalog/_citation.html.erb
661
- - app/views/catalog/_constraints.html.erb
662
652
  - app/views/catalog/_did_you_mean.html.erb
663
653
  - app/views/catalog/_document.atom.builder
664
654
  - app/views/catalog/_document.html.erb
@@ -669,7 +659,6 @@ files:
669
659
  - app/views/catalog/_facet_layout.html.erb
670
660
  - app/views/catalog/_facet_pagination.html.erb
671
661
  - app/views/catalog/_facet_pivot.html.erb
672
- - app/views/catalog/_facets.html.erb
673
662
  - app/views/catalog/_field.json.jbuilder
674
663
  - app/views/catalog/_group.html.erb
675
664
  - app/views/catalog/_home.html.erb
@@ -678,19 +667,14 @@ files:
678
667
  - app/views/catalog/_paginate_compact.html.erb
679
668
  - app/views/catalog/_per_page_widget.html.erb
680
669
  - app/views/catalog/_results_pagination.html.erb
681
- - app/views/catalog/_search_form.html.erb
682
- - app/views/catalog/_search_header.html.erb
683
670
  - app/views/catalog/_search_results.html.erb
684
671
  - app/views/catalog/_search_results_header.html.erb
685
672
  - app/views/catalog/_search_sidebar.html.erb
686
673
  - app/views/catalog/_show_main_content.html.erb
687
674
  - app/views/catalog/_show_more_like_this.html.erb
688
- - app/views/catalog/_show_sidebar.html.erb
689
- - app/views/catalog/_show_tools.html.erb
690
675
  - app/views/catalog/_sms_form.html.erb
691
676
  - app/views/catalog/_sort_and_per_page.html.erb
692
677
  - app/views/catalog/_sort_widget.html.erb
693
- - app/views/catalog/_start_over.html.erb
694
678
  - app/views/catalog/_view_type_group.html.erb
695
679
  - app/views/catalog/_zero_results.html.erb
696
680
  - app/views/catalog/advanced_search.html.erb
@@ -731,7 +715,6 @@ files:
731
715
  - app/views/shared/_flash_messages.html.erb
732
716
  - app/views/shared/_flash_msg.html.erb
733
717
  - app/views/shared/_footer.html.erb
734
- - app/views/shared/_header_navbar.html.erb
735
718
  - app/views/shared/_modal.html.erb
736
719
  - app/views/shared/_sitelinks_search_box.html.erb
737
720
  - app/views/shared/_user_util_links.html.erb
@@ -804,7 +787,6 @@ files:
804
787
  - lib/blacklight/version.rb
805
788
  - lib/generators/blacklight/assets/importmap_generator.rb
806
789
  - lib/generators/blacklight/assets/propshaft_generator.rb
807
- - lib/generators/blacklight/assets/sprockets_generator.rb
808
790
  - lib/generators/blacklight/assets_generator.rb
809
791
  - lib/generators/blacklight/controller_generator.rb
810
792
  - lib/generators/blacklight/document_generator.rb
@@ -982,9 +964,6 @@ files:
982
964
  - spec/views/catalog/_facet_index_navigation.html.erb_spec.rb
983
965
  - spec/views/catalog/_facet_layout.html.erb_spec.rb
984
966
  - spec/views/catalog/_paginate_compact.html.erb_spec.rb
985
- - spec/views/catalog/_search_header.erb_spec.rb
986
- - spec/views/catalog/_show_sidebar.erb_spec.rb
987
- - spec/views/catalog/_show_tools.html.erb_spec.rb
988
967
  - spec/views/catalog/_sort_and_per_page.html.erb_spec.rb
989
968
  - spec/views/catalog/_sort_widget.html.erb_spec.rb
990
969
  - spec/views/catalog/_view_type_group.html.erb_spec.rb
@@ -1012,14 +991,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
1012
991
  requirements:
1013
992
  - - ">="
1014
993
  - !ruby/object:Gem::Version
1015
- version: '2.7'
994
+ version: '3.1'
1016
995
  required_rubygems_version: !ruby/object:Gem::Requirement
1017
996
  requirements:
1018
997
  - - ">="
1019
998
  - !ruby/object:Gem::Version
1020
999
  version: '0'
1021
1000
  requirements: []
1022
- rubygems_version: 3.6.3
1001
+ rubygems_version: 3.6.2
1023
1002
  specification_version: 4
1024
1003
  summary: Blacklight provides a discovery interface for any Solr (http://lucene.apache.org/solr)
1025
1004
  index.
@@ -1164,9 +1143,6 @@ test_files:
1164
1143
  - spec/views/catalog/_facet_index_navigation.html.erb_spec.rb
1165
1144
  - spec/views/catalog/_facet_layout.html.erb_spec.rb
1166
1145
  - spec/views/catalog/_paginate_compact.html.erb_spec.rb
1167
- - spec/views/catalog/_search_header.erb_spec.rb
1168
- - spec/views/catalog/_show_sidebar.erb_spec.rb
1169
- - spec/views/catalog/_show_tools.html.erb_spec.rb
1170
1146
  - spec/views/catalog/_sort_and_per_page.html.erb_spec.rb
1171
1147
  - spec/views/catalog/_sort_widget.html.erb_spec.rb
1172
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,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,5 +0,0 @@
1
- <% # this partial is deprecated. catalog/index now renders the component %>
2
- <% conf = blacklight_config.view_config(document_index_view_type) %>
3
- <%= render conf.sidebar_component.new(blacklight_config: blacklight_config,
4
- response: @response,
5
- view_config: conf) %>
@@ -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,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