blacklight 8.3.0 → 8.5.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.
Files changed (142) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +10 -6
  3. data/.rubocop.yml +3 -0
  4. data/.rubocop_todo.yml +22 -55
  5. data/Gemfile +2 -10
  6. data/README.md +2 -2
  7. data/VERSION +1 -1
  8. data/app/assets/javascripts/blacklight/blacklight.esm.js +13 -7
  9. data/app/assets/javascripts/blacklight/blacklight.esm.js.map +1 -1
  10. data/app/assets/javascripts/blacklight/blacklight.js +13 -7
  11. data/app/assets/javascripts/blacklight/blacklight.js.map +1 -1
  12. data/app/assets/stylesheets/blacklight/_balanced_list.scss +1 -1
  13. data/app/assets/stylesheets/blacklight/_bookmark.scss +30 -0
  14. data/app/assets/stylesheets/blacklight/_bootstrap_overrides.scss +0 -4
  15. data/app/assets/stylesheets/blacklight/_constraints.scss +15 -9
  16. data/app/assets/stylesheets/blacklight/_controls.scss +0 -1
  17. data/app/assets/stylesheets/blacklight/_facets.scss +33 -37
  18. data/app/assets/stylesheets/blacklight/_header.scss +2 -35
  19. data/app/assets/stylesheets/blacklight/_icons.scss +3 -2
  20. data/app/assets/stylesheets/blacklight/_layout.scss +3 -0
  21. data/app/assets/stylesheets/blacklight/_mixins.scss +4 -4
  22. data/app/assets/stylesheets/blacklight/_search_form.scss +3 -8
  23. data/app/assets/stylesheets/blacklight/_search_history.scss +5 -5
  24. data/app/assets/stylesheets/blacklight/_search_results.scss +5 -2
  25. data/app/assets/stylesheets/blacklight/blacklight_defaults.scss +16 -10
  26. data/app/components/blacklight/advanced_search_form_component.html.erb +1 -1
  27. data/app/components/blacklight/advanced_search_form_component.rb +6 -0
  28. data/app/components/blacklight/constraint_layout_component.html.erb +2 -9
  29. data/app/components/blacklight/constraint_layout_component.rb +8 -0
  30. data/app/components/blacklight/constraints_component.rb +3 -3
  31. data/app/components/blacklight/document/action_component.rb +2 -1
  32. data/app/components/blacklight/document/bookmark_component.html.erb +2 -1
  33. data/app/components/blacklight/document/bookmark_component.rb +6 -0
  34. data/app/components/blacklight/document/page_header_component.html.erb +7 -0
  35. data/app/components/blacklight/document/page_header_component.rb +85 -0
  36. data/app/components/blacklight/document_component.rb +1 -1
  37. data/app/components/blacklight/facet_component.rb +1 -1
  38. data/app/components/blacklight/facet_field_checkboxes_component.html.erb +1 -1
  39. data/app/components/blacklight/facet_field_checkboxes_component.rb +1 -1
  40. data/app/components/blacklight/facet_field_inclusive_constraint_component.html.erb +1 -1
  41. data/app/components/blacklight/facet_field_list_component.html.erb +1 -1
  42. data/app/components/blacklight/facet_item_component.rb +1 -1
  43. data/app/components/blacklight/icons/bookmark_icon_component.rb +17 -0
  44. data/app/components/blacklight/icons/icon_component.rb +9 -4
  45. data/app/components/blacklight/icons/remove_component.rb +16 -0
  46. data/app/components/blacklight/metadata_field_component.html.erb +1 -1
  47. data/app/components/blacklight/metadata_field_component.rb +5 -0
  48. data/app/components/blacklight/response/facet_group_component.rb +1 -1
  49. data/app/components/blacklight/response/pagination_component.html.erb +1 -1
  50. data/app/components/blacklight/response/sort_component.html.erb +1 -6
  51. data/app/components/blacklight/response/sort_component.rb +15 -0
  52. data/app/components/blacklight/search/per_page_component.html.erb +2 -0
  53. data/app/components/blacklight/search/per_page_component.rb +50 -0
  54. data/app/components/blacklight/search_bar_component.html.erb +1 -1
  55. data/app/components/blacklight/search_context/server_item_pagination_component.html.erb +5 -4
  56. data/app/components/blacklight/search_context/server_item_pagination_component.rb +1 -1
  57. data/app/components/blacklight/skip_link_component.html.erb +7 -0
  58. data/app/components/blacklight/skip_link_component.rb +17 -0
  59. data/app/components/blacklight/system/dropdown_button_component.rb +18 -0
  60. data/app/components/blacklight/system/dropdown_component.rb +3 -6
  61. data/app/components/blacklight/system/flash_message_component.html.erb +1 -1
  62. data/app/components/blacklight/top_navbar_component.html.erb +2 -2
  63. data/app/components/blacklight/top_navbar_component.rb +4 -0
  64. data/app/helpers/blacklight/catalog_helper_behavior.rb +2 -0
  65. data/app/helpers/blacklight/component_helper_behavior.rb +4 -4
  66. data/app/helpers/blacklight/configuration_helper_behavior.rb +2 -0
  67. data/app/helpers/blacklight/document_helper_behavior.rb +14 -0
  68. data/app/javascript/blacklight/checkbox_submit.js +7 -1
  69. data/app/javascript/blacklight/core.js +5 -5
  70. data/app/models/concerns/blacklight/document/semantic_fields.rb +1 -1
  71. data/app/presenters/blacklight/facet_checkbox_item_presenter.rb +11 -0
  72. data/app/presenters/blacklight/facet_field_presenter.rb +9 -1
  73. data/app/services/blacklight/search_service.rb +9 -1
  74. data/app/views/catalog/_per_page_widget.html.erb +1 -10
  75. data/app/views/catalog/_search_results.html.erb +1 -1
  76. data/app/views/catalog/_show_main_content.html.erb +1 -1
  77. data/app/views/catalog/_show_sidebar.html.erb +1 -0
  78. data/app/views/catalog/show.html.erb +3 -3
  79. data/app/views/catalog/suggest.html.erb +1 -1
  80. data/app/views/kaminari/blacklight/_page.html.erb +14 -8
  81. data/app/views/kaminari/blacklight/_paginator.html.erb +2 -1
  82. data/app/views/layouts/blacklight/base.html.erb +3 -5
  83. data/blacklight.gemspec +6 -2
  84. data/{docker-compose.yml → compose.yaml} +1 -1
  85. data/config/locales/blacklight.ar.yml +3 -0
  86. data/config/locales/blacklight.de.yml +3 -0
  87. data/config/locales/blacklight.en.yml +216 -229
  88. data/config/locales/blacklight.es.yml +3 -0
  89. data/config/locales/blacklight.fr.yml +3 -0
  90. data/config/locales/blacklight.hu.yml +3 -0
  91. data/config/locales/blacklight.it.yml +3 -0
  92. data/config/locales/blacklight.nl.yml +3 -0
  93. data/config/locales/blacklight.pt-BR.yml +3 -0
  94. data/config/locales/blacklight.sq.yml +3 -0
  95. data/config/locales/blacklight.zh.yml +3 -0
  96. data/lib/blacklight/abstract_repository.rb +6 -0
  97. data/lib/blacklight/component.rb +10 -47
  98. data/lib/blacklight/configuration.rb +32 -19
  99. data/lib/blacklight/engine.rb +6 -0
  100. data/lib/blacklight/parameters.rb +1 -1
  101. data/lib/blacklight/solr/repository.rb +11 -4
  102. data/lib/blacklight/solr/response/params.rb +1 -1
  103. data/lib/blacklight/solr/response.rb +0 -12
  104. data/lib/blacklight/solr/search_builder_behavior.rb +1 -1
  105. data/lib/blacklight/solr.rb +0 -6
  106. data/lib/blacklight.rb +4 -14
  107. data/lib/generators/blacklight/assets/propshaft_generator.rb +2 -2
  108. data/lib/generators/blacklight/models_generator.rb +1 -1
  109. data/lib/generators/blacklight/user_generator.rb +2 -0
  110. data/package.json +3 -2
  111. data/rollup.config.js +6 -12
  112. data/spec/components/blacklight/document/action_component_spec.rb +1 -1
  113. data/spec/components/blacklight/document/page_header_component_spec.rb +92 -0
  114. data/spec/components/blacklight/document_component_spec.rb +20 -0
  115. data/spec/components/blacklight/icons/icon_component_spec.rb +42 -0
  116. data/spec/components/blacklight/search_context/server_item_pagination_component_spec.rb +13 -2
  117. data/spec/controllers/blacklight/catalog_spec.rb +1 -1
  118. data/spec/controllers/catalog_controller_spec.rb +5 -5
  119. data/spec/features/advanced_search_spec.rb +16 -2
  120. data/spec/features/bookmarks_spec.rb +15 -0
  121. data/spec/features/search_context_spec.rb +2 -1
  122. data/spec/helpers/blacklight/facets_helper_behavior_spec.rb +2 -2
  123. data/spec/lib/blacklight/component_spec.rb +32 -27
  124. data/spec/lib/blacklight/nested_open_struct_with_hash_access_spec.rb +1 -1
  125. data/spec/lib/blacklight/open_struct_with_hash_access_spec.rb +1 -1
  126. data/spec/models/blacklight/configuration_spec.rb +12 -12
  127. data/spec/models/blacklight/solr/document_spec.rb +2 -2
  128. data/spec/models/blacklight/solr/repository_spec.rb +31 -13
  129. data/spec/models/blacklight/solr/response/facets_spec.rb +2 -2
  130. data/spec/models/blacklight/solr/response/group_spec.rb +1 -1
  131. data/spec/models/blacklight/solr/response_spec.rb +2 -2
  132. data/spec/models/blacklight/solr/search_builder_behavior_spec.rb +1 -1
  133. data/spec/models/bookmark_spec.rb +1 -1
  134. data/spec/presenters/blacklight/document_presenter_spec.rb +2 -2
  135. data/spec/presenters/blacklight/facet_checkbox_item_presenter_spec.rb +42 -0
  136. data/spec/presenters/blacklight/facet_field_presenter_spec.rb +14 -0
  137. data/spec/requests/load_suggestions_spec.rb +5 -5
  138. data/spec/services/blacklight/search_service_spec.rb +2 -2
  139. data/spec/spec_helper.rb +5 -2
  140. data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -1
  141. data/tasks/blacklight.rake +6 -6
  142. metadata +86 -8
@@ -1,257 +1,244 @@
1
+ ---
1
2
  en:
2
- views:
3
- pagination:
4
- first: '« First'
5
- last: 'Last »'
6
- previous: '« Previous'
7
- next: 'Next »'
8
- truncate: '…'
9
- aria:
10
- container_label: 'pagination links'
11
- current_page: 'Current Page, Page %{page}'
12
- go_to_page: 'Go to page %{page}'
13
- go_to_previous_page: 'Go to previous page'
14
- go_to_next_page: 'Go to next page'
15
- go_to_first_page: 'Go to first page'
16
- go_to_last_page: 'Go to last page'
17
-
18
- pagination_compact:
19
- previous: '« Previous'
20
- next: 'Next »'
21
-
22
3
  blacklight:
23
- application_name: 'Blacklight'
24
- skip_links:
25
- label: 'Skip links'
26
- main_content: 'Skip to main content'
27
- search_field: 'Skip to search'
28
- first_result: 'Skip to first result'
29
- header_links:
30
- login: 'Login'
31
- logout: 'Log Out'
32
- bookmarks: 'Bookmarks'
33
- search_history: 'History'
34
-
35
- welcome: 'Welcome!'
36
- and: 'and'
37
- or: 'or'
38
-
39
- modal:
40
- close: "Close"
41
-
4
+ advanced_search:
5
+ any_of: 'Any of:'
6
+ form:
7
+ limit_criteria_heading_html: "<strong>AND</strong> have these attributes"
8
+ query_criteria_heading_html: Match %{select_menu} of the fields below
9
+ search_btn_html: Search
10
+ search_context: Within search
11
+ sort_label: Sort results by
12
+ start_over_html: Start over
13
+ title: Advanced search
14
+ more_options: More options
15
+ op:
16
+ label: search operator
17
+ must: all
18
+ should: any
19
+ or_html: " OR "
20
+ page_title: Advanced search - %{application_name}
21
+ and: and
22
+ application_name: Blacklight
23
+ back_to_bookmarks: Back to Bookmarks
24
+ back_to_search: Back to Search
42
25
  bookmarks:
43
- title: 'Bookmarks'
44
- page_title: 'Bookmarks - %{application_name}'
45
- no_bookmarks: 'You have no bookmarks'
46
26
  add:
47
- button: 'Bookmark'
27
+ button: Bookmark
28
+ failure: Sorry, there was a problem saving the bookmarks.
48
29
  success:
49
- one: 'Successfully added bookmark.'
50
- other: 'Successfully added bookmarks.'
51
- failure: 'Sorry, there was a problem saving the bookmarks.'
52
- remove:
53
- button: 'Remove bookmark'
54
- success: 'Successfully removed bookmark.'
55
- failure: 'Sorry, there was a problem removing the bookmarks.'
56
- action_confirm: 'Remove this bookmark?'
57
- clear:
58
- action_title: 'Clear Bookmarks'
59
- action_confirm: 'Clear your bookmarks?'
60
- success: 'Cleared your bookmarks.'
61
- failure: 'Sorry, there was a problem clearing your bookmarks.'
62
- need_login: 'Please log in to manage and view your bookmarks.'
63
- list_title: 'Your Bookmarks'
64
- delete: 'Remove'
65
-
66
- search_history:
30
+ one: Successfully added bookmark.
31
+ other: Successfully added bookmarks.
67
32
  clear:
68
- action_title: 'Clear Search History'
69
- action_confirm: 'Clear your search history?'
70
- success: 'Cleared your search history.'
71
- failure: 'There was a problem clearing your search history.'
72
- title: 'Search History'
73
- page_title: 'Search History - %{application_name}'
74
- no_history: 'You have no search history'
75
- recent: 'Your recent searches'
76
- forget: 'forget'
77
- save: 'save'
78
-
79
- tools:
80
- title: 'Tools'
81
- citation: 'Cite'
82
- email: 'Email'
83
- sms: 'SMS This'
84
- clear: 'Clear'
85
-
33
+ action_confirm: Clear your bookmarks?
34
+ action_title: Clear Bookmarks
35
+ failure: Sorry, there was a problem clearing your bookmarks.
36
+ success: Cleared your bookmarks.
37
+ delete: Remove
38
+ list_title: Your Bookmarks
39
+ need_login: Please log in to manage and view your bookmarks.
40
+ no_bookmarks: You have no bookmarks
41
+ page_title: Bookmarks - %{application_name}
42
+ remove:
43
+ action_confirm: Remove this bookmark?
44
+ button: Remove bookmark
45
+ failure: Sorry, there was a problem removing the bookmarks.
46
+ success: Successfully removed bookmark.
47
+ title: Bookmarks
86
48
  citation:
87
- mla: 'MLA'
88
- apa: 'APA'
89
- chicago: 'Chicago'
90
-
49
+ apa: APA
50
+ chicago: Chicago
51
+ mla: MLA
52
+ did_you_mean: 'Did you mean to type: %{options}?'
91
53
  email:
54
+ errors:
55
+ to:
56
+ blank: You must enter a recipient in order to send this message
57
+ invalid: You must enter a valid email address
92
58
  form:
93
- title: 'Email This'
94
- to: 'Email:'
95
59
  message: 'Message:'
96
- submit: 'Send'
60
+ submit: Send
61
+ title: Email This
62
+ to: 'Email:'
63
+ success: Email Sent
97
64
  text:
98
- default_title: 'N/A'
65
+ default_title: N/A
66
+ message: 'Message: %{message}'
99
67
  subject:
100
68
  one: 'Item Record: %{title}'
101
- other: 'Item records'
69
+ other: Item records
102
70
  url: 'URL: %{url}'
103
- message: 'Message: %{message}'
104
-
105
- success: "Email Sent"
106
-
107
- errors:
108
- to:
109
- invalid: 'You must enter a valid email address'
110
- blank: 'You must enter a recipient in order to send this message'
111
- sms:
112
- form:
113
- title: 'SMS This'
114
- to: 'Phone Number:'
115
- carrier: 'Carrier'
116
- carrier_prompt: 'Please select your carrier'
117
- submit: 'Send'
118
- text:
119
- url: 'Link: %{url}'
120
- success: "SMS Sent"
121
- errors:
122
- to:
123
- invalid: 'You must enter a valid 10 digit phone number'
124
- blank: "You must enter a recipient's phone number in order to send this message"
125
- carrier:
126
- blank: 'You must select a carrier'
127
- invalid: "You must enter a valid carrier"
128
-
129
- back_to_search: 'Back to Search'
130
- back_to_bookmarks: 'Back to Bookmarks'
131
-
71
+ entry_name:
72
+ default:
73
+ one: entry
74
+ other: entries
75
+ grouped:
76
+ default:
77
+ one: grouped result
78
+ other: grouped results
79
+ header_links:
80
+ bookmarks: Bookmarks
81
+ login: Login
82
+ logout: Log Out
83
+ search_history: History
84
+ main:
85
+ aria:
86
+ main_container: Main content
87
+ modal:
88
+ close: Close
89
+ or: or
132
90
  search:
133
- page_title:
134
- title: '%{constraints} - %{application_name} Search Results'
135
- constraint: '%{label}: %{value}'
136
- many_constraint_values: '%{values} selected'
137
- header: 'Search'
138
- search_constraints_header: 'Search Constraints'
139
- search_results: 'Search Results'
140
- errors:
141
- invalid_solr_id: "Sorry, you have requested a record that doesn't exist."
142
- per_page:
143
- label: '%{count}<span class="sr-only visually-hidden"> per page</span>'
144
- button_label: '%{count} per page' # TODO: Remove during major release
145
- button_label_html: '%{count}<span class="d-none d-sm-inline"> per page</span>'
146
- title: 'Number of results to display per page'
147
- submit: 'Update'
148
- aria_label: 'Results navigation'
149
- sort:
150
- label: 'Sort by %{field}' # TODO: Remove during major release
151
- label_html: 'Sort<span class="d-none d-sm-inline"> by %{field}</span>'
152
- submit: 'sort results'
153
- form:
154
- search_field:
155
- label: 'Search in'
156
- title: 'Targeted search options'
157
- post_label: 'for'
158
- search:
159
- label: 'search for'
160
- placeholder: 'Search...'
161
- submit: 'Search'
162
- pagination:
163
- title: 'Results navigation'
164
- pagination_info:
165
- no_items_found: 'No %{entry_name} found'
166
- single_item_found: '<strong>1</strong> %{entry_name} found'
167
- pages:
168
- one: '<strong>%{start_num}</strong> - <strong>%{end_num}</strong> of <strong>%{total_num}</strong>'
169
- other: '<strong>%{start_num}</strong> - <strong>%{end_num}</strong> of <strong>%{total_num}</strong>'
170
- entry_pagination_info:
171
- one: '<strong>1 of 1</strong>'
172
- other: '<strong>%{current}</strong> of <strong>%{total}</strong>'
91
+ atom_feed: Atom for results
92
+ bookmarks:
93
+ absent: Bookmark
94
+ inprogress: Saving...
95
+ present: In Bookmarks
173
96
  documents:
174
97
  aria:
175
- search_results: 'search results'
176
- limit_search: 'limit your search'
177
- counter: '%{counter}. '
98
+ limit_search: limit your search
99
+ search_results: search results
100
+ counter: "%{counter}. "
101
+ entry_pagination_info:
102
+ one: "<strong>1 of 1</strong>"
103
+ other: "<strong>%{current}</strong> of <strong>%{total}</strong>"
104
+ errors:
105
+ invalid_solr_id: Sorry, you have requested a record that doesn't exist.
178
106
  facets:
179
- title: 'Limit your search'
180
- clear: 'Clear Filter'
181
- sort:
182
- count: 'Numerical Sort'
183
- index: 'A-Z Sort'
184
- count: '%{number}'
185
- more_html: 'more <span class="sr-only visually-hidden">%{field_name}</span> »'
186
- selected:
187
- remove: '[remove]'
188
- missing: "[Missing]"
189
107
  all: All
190
- pivot:
191
- show: Show
192
- hide: Hide
108
+ clear: Clear Filter
109
+ count: "%{number}"
193
110
  group:
194
- open: Show facets
195
111
  close: Hide facets
196
- group:
197
- more: 'more »'
112
+ open: Show facets
113
+ missing: "[Missing]"
114
+ more_html: more <span class="sr-only visually-hidden">%{field_name}</span> »
115
+ pivot:
116
+ hide: Hide
117
+ show: Show
118
+ selected:
119
+ remove: "[remove]"
120
+ sort:
121
+ count: Numerical Sort
122
+ index: A-Z Sort
123
+ title: Limit your search
198
124
  filters:
199
- title: 'You searched for:'
200
- label: '%{label}:'
125
+ label: "%{label}:"
201
126
  remove:
202
- value: 'Remove constraint %{value}'
203
127
  label_value: 'Remove constraint %{label}: %{value}'
204
- start_over: 'Start Over'
128
+ value: Remove constraint %{value}
129
+ title: 'You searched for:'
130
+ form:
131
+ search:
132
+ label: search for
133
+ placeholder: Search...
134
+ search_field:
135
+ label: Search in
136
+ post_label: for
137
+ title: Targeted search options
138
+ submit: Search
139
+ group:
140
+ more: more »
141
+ header: Search
205
142
  index:
206
- label: '%{label}:'
143
+ label: "%{label}:"
144
+ page_title:
145
+ constraint: "%{label}: %{value}"
146
+ many_constraint_values: "%{values} selected"
147
+ title: "%{constraints} - %{application_name} Search Results"
148
+ pagination:
149
+ title: Results navigation
150
+ pagination_info:
151
+ no_items_found: No %{entry_name} found
152
+ pages:
153
+ one: "<strong>%{start_num}</strong> - <strong>%{end_num}</strong> of <strong>%{total_num}</strong>"
154
+ other: "<strong>%{start_num}</strong> - <strong>%{end_num}</strong> of <strong>%{total_num}</strong>"
155
+ single_item_found: "<strong>1</strong> %{entry_name} found"
156
+ per_page:
157
+ aria_label: Results navigation
158
+ button_label: "%{count} per page"
159
+ button_label_html: '%{count}<span class="d-none d-sm-inline"> per page</span>'
160
+ label: '%{count}<span class="sr-only visually-hidden"> per page</span>'
161
+ submit: Update
162
+ title: Number of results to display per page
163
+ rss_feed: RSS for results
164
+ search_constraints_header: Search Constraints
165
+ search_results: Search Results
207
166
  show:
208
- title: '%{document_title} - %{application_name}'
209
- label: '%{label}:'
210
- rss_feed: 'RSS for results'
211
- atom_feed: 'Atom for results'
212
- bookmarks:
213
- present: "In Bookmarks"
214
- absent: "Bookmark"
215
- inprogress: "Saving..."
216
- zero_results:
217
- title: "No results found for your search"
218
- modify_search: "Try modifying your search"
219
- use_fewer_keywords: "Use fewer keywords to start, then refine your search using the links on the left."
220
- search_fields: "you searched by %{search_fields}"
221
- search_everything: "try searching everything"
222
- view_title: "View results as: "
167
+ label: "%{label}:"
168
+ title: "%{document_title} - %{application_name}"
169
+ sort:
170
+ label: Sort by %{field}
171
+ label_html: Sort<span class="d-none d-sm-inline"> by %{field}</span>
172
+ submit: sort results
173
+ start_over: Start Over
223
174
  view:
224
- list: "List"
225
-
226
- entry_name:
227
- default:
228
- one: 'entry'
229
- other: 'entries'
230
- grouped:
231
- default:
232
- one: 'grouped result'
233
- other: 'grouped results'
234
-
235
- did_you_mean: 'Did you mean to type: %{options}?'
236
-
237
- main:
238
- aria:
239
- main_container: 'Main content'
240
-
241
- advanced_search:
242
- or_html: ' OR '
243
- more_options: More options
244
- any_of: 'Any of:'
245
- op:
246
- label: search operator
247
- must: all
248
- should: any
249
- page_title: Advanced search - %{application_name}
175
+ list: List
176
+ view_title: 'View results as: '
177
+ zero_results:
178
+ modify_search: Try modifying your search
179
+ search_everything: try searching everything
180
+ search_fields: you searched by %{search_fields}
181
+ title: No results found for your search
182
+ use_fewer_keywords: Use fewer keywords to start, then refine your search using the links on the left.
183
+ search_history:
184
+ clear:
185
+ action_confirm: Clear your search history?
186
+ action_title: Clear Search History
187
+ failure: There was a problem clearing your search history.
188
+ success: Cleared your search history.
189
+ forget: forget
190
+ no_history: You have no search history
191
+ page_title: Search History - %{application_name}
192
+ recent: Your recent searches
193
+ save: save
194
+ title: Search History
195
+ skip_links:
196
+ first_result: Skip to first result
197
+ label: Skip links
198
+ main_content: Skip to main content
199
+ search_field: Skip to search
200
+ sms:
201
+ errors:
202
+ carrier:
203
+ blank: You must select a carrier
204
+ invalid: You must enter a valid carrier
205
+ to:
206
+ blank: You must enter a recipient's phone number in order to send this message
207
+ invalid: You must enter a valid 10 digit phone number
250
208
  form:
251
- title: Advanced search
252
- search_context: Within search
253
- limit_criteria_heading_html: "<strong>AND</strong> have these attributes"
254
- query_criteria_heading_html: "Match %{select_menu} of the fields below"
255
- sort_label: "Sort results by"
256
- start_over_html: "Start over"
257
- search_btn_html: 'Search'
209
+ carrier: Carrier
210
+ carrier_prompt: Please select your carrier
211
+ submit: Send
212
+ title: SMS This
213
+ to: 'Phone Number:'
214
+ success: SMS Sent
215
+ text:
216
+ url: 'Link: %{url}'
217
+ tools:
218
+ citation: Cite
219
+ clear: Clear
220
+ email: Email
221
+ sms: SMS This
222
+ title: Tools
223
+ top_navbar:
224
+ aria:
225
+ container_label: Main navigation
226
+ welcome: Welcome!
227
+ views:
228
+ pagination:
229
+ aria:
230
+ container_label: pagination links
231
+ current_page: Current Page, Page %{page}
232
+ go_to_first_page: Go to first page
233
+ go_to_last_page: Go to last page
234
+ go_to_next_page: Go to next page
235
+ go_to_page: Go to page %{page}
236
+ go_to_previous_page: Go to previous page
237
+ first: "&laquo; First"
238
+ last: Last &raquo;
239
+ next: Next &raquo;
240
+ previous: "&laquo; Previous"
241
+ truncate: "…"
242
+ pagination_compact:
243
+ next: Next &raquo;
244
+ previous: "&laquo; Previous"
@@ -201,6 +201,9 @@ es:
201
201
  email: Correo electrónico
202
202
  sms: Enviar SMS
203
203
  title: Herramientas
204
+ top_navbar:
205
+ aria:
206
+ container_label: Navegación principal
204
207
  welcome: "¡Bienvenido!"
205
208
  views:
206
209
  pagination:
@@ -201,6 +201,9 @@ fr:
201
201
  email: Envoyer
202
202
  sms: SMS
203
203
  title: Outils
204
+ top_navbar:
205
+ aria:
206
+ container_label: Navigation principale
204
207
  welcome: Welcome!
205
208
  views:
206
209
  pagination:
@@ -199,6 +199,9 @@ hu:
199
199
  email: Email
200
200
  sms: Küldés SMS-ben
201
201
  title: Eszközök
202
+ top_navbar:
203
+ aria:
204
+ container_label: Fő navigáció
202
205
  welcome: Üdvözöljük!
203
206
  views:
204
207
  pagination:
@@ -202,6 +202,9 @@ it:
202
202
  email: Invia per e-mail
203
203
  sms: Invia per SMS
204
204
  title: Strumenti
205
+ top_navbar:
206
+ aria:
207
+ container_label: Navigazione principale
205
208
  welcome: Benvenuti!
206
209
  views:
207
210
  pagination:
@@ -199,6 +199,9 @@ nl:
199
199
  email: Email
200
200
  sms: SMS dit
201
201
  title: Hulpmiddelen
202
+ top_navbar:
203
+ aria:
204
+ container_label: Hoofdnavigatie
202
205
  welcome: Welkom!
203
206
  views:
204
207
  pagination:
@@ -200,6 +200,9 @@ pt-BR:
200
200
  email: Email
201
201
  sms: SMS
202
202
  title: Ferramentas
203
+ top_navbar:
204
+ aria:
205
+ container_label: Navegação principal
203
206
  welcome: Bem-Vindo!
204
207
  views:
205
208
  pagination:
@@ -199,6 +199,9 @@ sq:
199
199
  email: Email
200
200
  sms: Dërgo SMS
201
201
  title: Veglat
202
+ top_navbar:
203
+ aria:
204
+ container_label: Lundrimi kryesor
202
205
  welcome: Mirësevini!
203
206
  views:
204
207
  pagination:
@@ -199,6 +199,9 @@ zh:
199
199
  email: 电子邮件
200
200
  sms: 发送短信
201
201
  title: 工具
202
+ top_navbar:
203
+ aria:
204
+ container_label: 主导航
202
205
  welcome: 欢迎!
203
206
  views:
204
207
  pagination:
@@ -35,6 +35,12 @@ module Blacklight
35
35
  raise NotImplementedError
36
36
  end
37
37
 
38
+ # Find multiple documents by their ids
39
+ # @param [Hash] _params query parameters
40
+ def find_many(params, **kwargs)
41
+ search(params, **kwargs)
42
+ end
43
+
38
44
  ##
39
45
  # Execute a search query against a search index
40
46
  # @param [Hash] _params query parameters
@@ -3,57 +3,20 @@
3
3
  module Blacklight
4
4
  class Component < ViewComponent::Base
5
5
  class << self
6
- # Workaround for https://github.com/ViewComponent/view_component/issues/1565
7
- def config
8
- @config ||= ViewComponent::Config.defaults.merge(ViewComponent::Base.config)
9
- end
6
+ alias upstream_sidecar_files sidecar_files
10
7
 
11
- # rubocop:disable Naming/MemoizedInstanceVariableName
12
- def compiler
13
- @__vc_compiler ||= EngineCompiler.new(self)
8
+ def reset_compiler!
9
+ @__vc_compiler = nil
14
10
  end
15
- # rubocop:enable Naming/MemoizedInstanceVariableName
16
-
17
- alias sidecar_files _sidecar_files unless ViewComponent::Base.respond_to? :sidecar_files
18
- end
19
-
20
- EXCLUDE_VARIABLES = [
21
- :@lookup_context, :@view_renderer, :@view_flow, :@view_context,
22
- :@tag_builder, :@current_template,
23
- :@__vc_set_slots, :@__vc_original_view_context,
24
- :@__vc_variant, :@__vc_content_evaluated,
25
- :@__vc_render_in_block, :@__vc_content, :@__vc_helpers
26
- ].freeze
27
-
28
- def inspect
29
- # Exclude variables added by render_in
30
- render_variables = instance_variables - EXCLUDE_VARIABLES
31
- fields = render_variables.map { |ivar| "#{ivar}:#{instance_variable_get(ivar).inspect}" }.join(', ')
32
- "#<#{self.class.name}:#{object_id} #{fields}>"
33
- end
34
-
35
- class EngineCompiler < ::ViewComponent::Compiler
36
- # ViewComponent::Compiler locates and caches templates from sidecar files to the component source file.
37
- # While this is sensible in a Rails application, it prevents component templates defined in an Engine
38
- # from being overridden by an installing application without subclassing the component, which may also
39
- # require modifying any partials rendering the component. This subclass of compiler overrides the template
40
- # location algorithm to take the sidecar file names from the Engine, but look to see if a file of the
41
- # same name existing in the installing application (ie, under Rails.root). If the latter exists, this
42
- # compiler will cache that template instead of the engine-defined file; if not, the compiler will fall
43
- # back to the engine-defined file.
44
- def templates
45
- @templates ||= begin
46
- extensions = ActionView::Template.template_handler_extensions
47
11
 
48
- component_class.sidecar_files(extensions).each_with_object([]) do |path, memo|
49
- pieces = File.basename(path).split(".")
50
- app_path = Rails.root.join(path.slice(path.index(component_class.view_component_path)..-1).to_s).to_s
12
+ def sidecar_files(*args, **kwargs)
13
+ upstream_sidecar_files(*args, **kwargs).map do |path|
14
+ app_path = Rails.root.join(path.slice(path.index(view_component_path)..-1).to_s).to_s
51
15
 
52
- memo << {
53
- path: File.exist?(app_path) ? app_path : path,
54
- variant: pieces.second.split("+").second&.to_sym,
55
- handler: pieces.last
56
- }
16
+ if File.exist?(app_path)
17
+ app_path
18
+ else
19
+ path
57
20
  end
58
21
  end
59
22
  end