blacklight 9.0.0.beta1 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.docker/app/Dockerfile +2 -1
- data/.github/matrix.json +55 -0
- data/.github/workflows/build.yml +16 -0
- data/.github/workflows/lint.yml +25 -0
- data/.github/workflows/main.yml +22 -0
- data/.github/workflows/release_7_x_scheduled.yml +39 -0
- data/.github/workflows/release_8_x_scheduled.yml +39 -0
- data/.github/workflows/test.yml +53 -0
- data/.rubocop.yml +81 -3
- data/.rubocop_todo.yml +46 -71
- data/.solr_wrapper.yml +3 -1
- data/README.md +2 -2
- data/VERSION +1 -1
- data/app/assets/builds/blacklight.css +51 -38
- data/app/assets/javascripts/blacklight/blacklight.esm.js +62 -77
- data/app/assets/javascripts/blacklight/blacklight.esm.js.map +1 -1
- data/app/assets/javascripts/blacklight/blacklight.js +62 -77
- data/app/assets/javascripts/blacklight/blacklight.js.map +1 -1
- data/app/assets/stylesheets/blacklight/_blacklight_base.scss +0 -1
- data/app/assets/stylesheets/blacklight/_bootstrap_overrides.scss +4 -0
- data/app/assets/stylesheets/blacklight/_facets.scss +37 -29
- data/app/assets/stylesheets/blacklight/_header.scss +4 -0
- data/app/assets/stylesheets/blacklight/_modal.scss +9 -8
- data/app/assets/stylesheets/blacklight/_pagination.scss +1 -3
- data/app/assets/stylesheets/blacklight/_search_history.scss +0 -4
- data/app/assets/stylesheets/blacklight/blacklight_defaults.scss +3 -0
- data/app/components/blacklight/advanced_search_form_component.html.erb +4 -4
- data/app/components/blacklight/advanced_search_form_component.rb +6 -5
- data/app/components/blacklight/constraint_component.html.erb +1 -5
- data/app/components/blacklight/constraint_component.rb +11 -0
- data/app/components/blacklight/constraint_layout_component.html.erb +1 -6
- data/app/components/blacklight/constraint_layout_component.rb +9 -0
- data/app/components/blacklight/constraints_component.html.erb +3 -8
- data/app/components/blacklight/constraints_component.rb +59 -14
- data/app/components/blacklight/document/action_component.rb +1 -3
- data/app/components/blacklight/document/bookmark_component.html.erb +3 -3
- data/app/components/blacklight/document/bookmark_component.rb +10 -4
- data/app/components/blacklight/document/group_component.html.erb +1 -1
- data/app/components/blacklight/document/more_like_this_component.rb +2 -2
- data/app/components/blacklight/document/page_header_component.rb +3 -3
- data/app/components/blacklight/document/thumbnail_component.html.erb +3 -7
- data/app/components/blacklight/document/thumbnail_component.rb +7 -6
- data/app/components/blacklight/document_component.html.erb +3 -3
- data/app/components/blacklight/document_component.rb +22 -26
- data/app/components/blacklight/document_title_component.rb +6 -10
- data/app/components/blacklight/facet_field_checkboxes_component.rb +4 -18
- data/app/components/blacklight/facet_field_component.rb +4 -15
- data/app/components/blacklight/facet_field_filter_component.rb +4 -19
- data/app/components/blacklight/facet_field_inclusive_constraint_component.rb +4 -23
- data/app/components/blacklight/facet_field_list_component.rb +4 -30
- data/app/components/blacklight/facet_field_no_layout_component.rb +4 -8
- data/app/components/blacklight/facet_field_pagination_component.html.erb +2 -2
- data/app/components/blacklight/facet_item_component.rb +4 -72
- data/app/components/blacklight/facet_item_pivot_component.rb +8 -4
- data/app/components/blacklight/{facet_field_checkboxes_component.html.erb → facets/checkboxes_component.html.erb} +4 -4
- data/app/components/blacklight/facets/checkboxes_component.rb +26 -0
- data/app/components/blacklight/facets/count_component.rb +23 -0
- data/app/components/blacklight/{facet_field_component.html.erb → facets/field_component.html.erb} +1 -3
- data/app/components/blacklight/facets/field_component.rb +23 -0
- data/app/components/blacklight/facets/filters_component.html.erb +4 -0
- data/app/components/blacklight/facets/filters_component.rb +39 -0
- data/app/components/blacklight/{facet_field_inclusive_constraint_component.html.erb → facets/inclusive_constraint_component.html.erb} +1 -1
- data/app/components/blacklight/facets/inclusive_constraint_component.rb +31 -0
- data/app/components/blacklight/{facet_field_filter_component.html.erb → facets/index_navigation_component.html.erb} +1 -1
- data/app/components/blacklight/facets/index_navigation_component.rb +32 -0
- data/app/components/blacklight/facets/item_component.rb +76 -0
- data/app/components/blacklight/facets/list_component.html.erb +11 -0
- data/app/components/blacklight/facets/list_component.rb +46 -0
- data/app/components/blacklight/facets/no_layout_component.rb +16 -0
- data/app/components/blacklight/facets/pivot_list_component.rb +14 -0
- data/app/components/blacklight/facets/selected_value_component.rb +29 -0
- data/app/components/blacklight/facets/suggest_component.html.erb +17 -0
- data/app/components/blacklight/facets/suggest_component.rb +21 -0
- data/app/components/blacklight/header_component.rb +2 -2
- data/app/components/blacklight/icons/remove_component.rb +2 -2
- data/app/components/blacklight/metadata_field_component.html.erb +2 -2
- data/app/components/blacklight/metadata_field_component.rb +2 -1
- data/app/components/blacklight/metadata_field_layout_component.rb +9 -4
- data/app/components/blacklight/metadata_field_plain_text_layout_component.rb +2 -2
- data/app/components/blacklight/response/facet_group_component.html.erb +3 -3
- data/app/components/blacklight/response/facet_group_component.rb +9 -1
- data/app/components/blacklight/search_bar_component.html.erb +2 -2
- 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/system/flash_message_component.html.erb +1 -1
- data/app/components/blacklight/system/flash_message_component.rb +0 -9
- data/app/components/blacklight/system/modal_component.html.erb +1 -2
- data/app/components/blacklight/top_navbar_component.html.erb +2 -2
- data/app/controllers/concerns/blacklight/bookmarks.rb +13 -3
- data/app/controllers/concerns/blacklight/catalog.rb +27 -30
- data/app/controllers/concerns/blacklight/controller.rb +1 -1
- data/app/controllers/concerns/blacklight/search_context.rb +1 -1
- data/app/controllers/concerns/blacklight/searchable.rb +1 -1
- data/app/helpers/blacklight/catalog_helper_behavior.rb +5 -3
- data/app/helpers/blacklight/configuration_helper_behavior.rb +2 -2
- data/app/helpers/blacklight/document_helper_behavior.rb +3 -1
- data/app/helpers/blacklight/facets_helper_behavior.rb +7 -12
- data/app/helpers/blacklight/icon_helper_behavior.rb +2 -2
- data/app/javascript/blacklight-frontend/bookmark_toggle.js +7 -2
- data/app/javascript/blacklight-frontend/button_focus.js +1 -1
- data/app/javascript/blacklight-frontend/checkbox_submit.js +9 -2
- data/app/javascript/blacklight-frontend/debounce.js +1 -1
- data/app/javascript/blacklight-frontend/facet_suggest.js +27 -3
- data/app/javascript/blacklight-frontend/index.js +0 -2
- data/app/javascript/blacklight-frontend/modal.js +15 -8
- data/app/javascript/blacklight-frontend/search_context.js +3 -2
- data/app/presenters/blacklight/constraint_presenter.rb +22 -0
- data/app/presenters/blacklight/document_presenter.rb +6 -5
- data/app/presenters/blacklight/facet_field_presenter.rb +18 -2
- data/app/presenters/blacklight/facet_grouped_item_presenter.rb +6 -0
- data/app/presenters/blacklight/facet_item_pivot_presenter.rb +1 -5
- data/app/presenters/blacklight/facet_item_presenter.rb +5 -18
- data/app/presenters/blacklight/field_presenter.rb +4 -2
- data/app/presenters/blacklight/json_presenter.rb +8 -4
- data/app/presenters/blacklight/rendering/abstract_step.rb +7 -1
- data/app/presenters/blacklight/rendering/helper_method.rb +4 -4
- data/app/presenters/blacklight/rendering/join.rb +11 -7
- data/app/presenters/blacklight/rendering/terminator.rb +1 -1
- data/app/services/blacklight/field_retriever.rb +1 -1
- data/app/services/blacklight/search_service.rb +10 -8
- data/app/values/blacklight/types.rb +2 -2
- data/app/views/blacklight/nav/_bookmark.html.erb +1 -1
- data/app/views/catalog/_document.atom.builder +1 -1
- data/app/views/catalog/_document.html.erb +1 -1
- data/app/views/catalog/_email_form.html.erb +4 -4
- data/app/views/catalog/_home_text.html.erb +2 -2
- data/app/views/catalog/_show_main_content.html.erb +9 -5
- data/app/views/catalog/_sms_form.html.erb +4 -4
- data/app/views/catalog/_sort_and_per_page.html.erb +1 -1
- data/app/views/catalog/advanced_search.html.erb +1 -1
- data/app/views/catalog/facet.html.erb +8 -10
- data/app/views/catalog/index.html.erb +0 -1
- data/app/views/catalog/index.json.jbuilder +5 -3
- data/app/views/catalog/show.html.erb +2 -2
- data/app/views/layouts/blacklight/base.html.erb +1 -1
- data/blacklight.gemspec +1 -1
- data/config/locales/blacklight.ar.yml +14 -14
- data/config/locales/blacklight.ca.yml +2 -2
- data/config/locales/blacklight.de.yml +13 -13
- data/config/locales/blacklight.en.yml +3 -3
- data/config/locales/blacklight.es.yml +13 -13
- data/config/locales/blacklight.fr.yml +14 -14
- data/config/locales/blacklight.hu.yml +15 -15
- data/config/locales/blacklight.it.yml +16 -16
- data/config/locales/blacklight.nl.yml +13 -13
- data/config/locales/blacklight.pt-BR.yml +15 -15
- data/config/locales/blacklight.sq.yml +14 -14
- data/config/locales/blacklight.zh.yml +12 -12
- data/lib/blacklight/abstract_repository.rb +2 -2
- data/lib/blacklight/component.rb +7 -1
- data/lib/blacklight/configuration/context.rb +3 -3
- data/lib/blacklight/configuration/facet_field.rb +11 -6
- data/lib/blacklight/configuration/field.rb +4 -4
- data/lib/blacklight/configuration/fields.rb +0 -1
- data/lib/blacklight/configuration/search_field.rb +1 -1
- data/lib/blacklight/configuration/view_config.rb +32 -18
- data/lib/blacklight/configuration.rb +64 -10
- data/lib/blacklight/nested_open_struct_with_hash_access.rb +1 -1
- data/lib/blacklight/open_struct_with_hash_access.rb +2 -2
- data/lib/blacklight/routes/searchable.rb +1 -1
- data/lib/blacklight/search_builder.rb +2 -1
- data/lib/blacklight/search_state/filter_field.rb +4 -4
- data/lib/blacklight/search_state/pivot_filter_field.rb +5 -5
- data/lib/blacklight/search_state.rb +2 -0
- data/lib/blacklight/solr/abstract_filter_query_builder.rb +77 -0
- data/lib/blacklight/solr/default_filter_query_builder.rb +20 -0
- data/lib/blacklight/solr/field_reflection_search_builder.rb +11 -0
- data/lib/blacklight/solr/repository.rb +17 -15
- data/lib/blacklight/solr/response/facets.rb +2 -2
- data/lib/blacklight/solr/response/params.rb +0 -4
- data/lib/blacklight/solr/response.rb +5 -1
- data/lib/blacklight/solr/search_builder_behavior.rb +48 -97
- data/lib/blacklight/solr/single_doc_search_builder.rb +25 -0
- data/lib/blacklight.rb +6 -4
- data/lib/generators/blacklight/assets/importmap_generator.rb +3 -5
- data/lib/generators/blacklight/assets_generator.rb +1 -1
- data/lib/generators/blacklight/search_builder_generator.rb +1 -1
- data/lib/generators/blacklight/templates/.solr_wrapper.yml +3 -1
- data/lib/generators/blacklight/templates/catalog_controller.rb +34 -8
- data/lib/generators/blacklight/templates/solr/conf/solrconfig.xml +0 -71
- data/package.json +3 -3
- data/spec/components/blacklight/advanced_search_form_component_spec.rb +18 -22
- data/spec/components/blacklight/constraint_layout_component_spec.rb +8 -8
- data/spec/components/blacklight/constraints_component_spec.rb +11 -11
- data/spec/components/blacklight/document/action_component_spec.rb +23 -15
- data/spec/components/blacklight/document/group_component_spec.rb +10 -15
- data/spec/components/blacklight/document/page_header_component_spec.rb +35 -28
- data/spec/components/blacklight/document/sidebar_component_spec.rb +5 -11
- data/spec/components/blacklight/document_component_spec.rb +105 -79
- data/spec/components/blacklight/facet_component_spec.rb +12 -8
- data/spec/components/blacklight/facet_item_pivot_component_spec.rb +12 -12
- data/spec/components/blacklight/{facet_field_checkboxes_component_spec.rb → facets/checkboxes_component_spec.rb} +13 -13
- data/spec/components/blacklight/facets/filters_component_spec.rb +36 -0
- data/spec/components/blacklight/facets/index_navigation_component_spec.rb +41 -0
- data/spec/components/blacklight/{facet_item_component_spec.rb → facets/item_component_spec.rb} +10 -10
- data/spec/components/blacklight/{facet_field_list_component_spec.rb → facets/list_component_spec.rb} +34 -23
- data/spec/components/blacklight/facets/pivot_list_component_spec.rb +53 -0
- data/spec/components/blacklight/facets/suggest_component_spec.rb +82 -0
- data/spec/components/blacklight/header_component_spec.rb +2 -4
- data/spec/components/blacklight/hidden_search_state_component_spec.rb +7 -7
- data/spec/components/blacklight/metadata_field_component_spec.rb +17 -15
- data/spec/components/blacklight/response/facet_group_component_spec.rb +37 -0
- data/spec/components/blacklight/response/pagination_component_spec.rb +1 -1
- data/spec/components/blacklight/response/spellcheck_component_spec.rb +1 -1
- data/spec/components/blacklight/search_bar_component_spec.rb +28 -5
- data/spec/components/blacklight/search_context/server_applied_params_component_spec.rb +2 -2
- data/spec/components/blacklight/search_context/server_item_pagination_component_spec.rb +3 -5
- data/spec/components/blacklight/skip_link_component_spec.rb +8 -11
- data/spec/components/blacklight/start_over_button_component_spec.rb +4 -4
- data/spec/components/blacklight/system/dropdown_component_spec.rb +26 -0
- data/spec/components/blacklight/system/flash_message_component_spec.rb +7 -11
- data/spec/controllers/blacklight/catalog_spec.rb +1 -1
- data/spec/controllers/catalog_controller_spec.rb +12 -20
- data/spec/features/advanced_search_spec.rb +42 -21
- data/spec/features/facets_spec.rb +84 -12
- data/spec/features/modal_spec.rb +1 -1
- data/spec/features/search_filters_spec.rb +6 -4
- data/spec/features/search_spec.rb +3 -3
- data/spec/helpers/blacklight/facets_helper_behavior_spec.rb +10 -0
- data/spec/lib/blacklight/configuration/facet_field_spec.rb +2 -2
- data/spec/lib/blacklight/parameters_spec.rb +12 -1
- data/spec/lib/blacklight/search_state/filter_field_spec.rb +18 -0
- data/spec/models/blacklight/configuration_spec.rb +178 -28
- data/spec/models/blacklight/solr/default_filter_query_builder_spec.rb +72 -0
- data/spec/models/blacklight/solr/document_spec.rb +0 -4
- data/spec/models/blacklight/solr/repository_spec.rb +37 -29
- data/spec/models/blacklight/solr/response/facets_spec.rb +86 -40
- data/spec/models/blacklight/solr/response/group_response_spec.rb +8 -5
- data/spec/models/blacklight/solr/response/group_spec.rb +9 -5
- data/spec/models/blacklight/solr/response_spec.rb +96 -64
- data/spec/models/blacklight/solr/search_builder_behavior_spec.rb +38 -57
- data/spec/models/solr_document_spec.rb +5 -1
- data/spec/presenters/blacklight/constraint_presenter_spec.rb +32 -0
- data/spec/presenters/blacklight/document_presenter_spec.rb +3 -3
- data/spec/presenters/blacklight/facet_item_presenter_spec.rb +0 -7
- data/spec/presenters/blacklight/field_presenter_spec.rb +103 -22
- data/spec/presenters/blacklight/json_presenter_spec.rb +17 -0
- data/spec/presenters/blacklight/rendering/pipeline_spec.rb +130 -14
- data/spec/services/blacklight/search_service_spec.rb +6 -27
- data/spec/spec_helper.rb +0 -1
- data/spec/support/presenter_test_helpers.rb +1 -1
- data/spec/support/view_component_test_helpers.rb +0 -18
- data/spec/views/catalog/facet.html.erb_spec.rb +10 -3
- data/spec/views/catalog/index.atom.builder_spec.rb +8 -3
- data/spec/views/catalog/index.html.erb_spec.rb +3 -1
- metadata +69 -38
- data/.github/workflows/ruby.yml +0 -98
- data/app/assets/stylesheets/blacklight/_icons.scss +0 -4
- data/app/components/blacklight/facet_field_list_component.html.erb +0 -19
- data/app/components/blacklight/search/facet_suggest_input.html.erb +0 -9
- data/app/components/blacklight/search/facet_suggest_input.rb +0 -16
- data/app/javascript/blacklight-frontend/modalForm.js +0 -60
- data/app/views/catalog/_facet_index_navigation.html.erb +0 -1
- data/app/views/catalog/_facet_layout.html.erb +0 -8
- data/app/views/catalog/_facet_pagination.html.erb +0 -1
- data/app/views/catalog/_facet_pivot.html.erb +0 -3
- data/app/views/shared/_sitelinks_search_box.html.erb +0 -12
- data/spec/components/blacklight/document_metadata_component_spec.rb +0 -0
- data/spec/components/blacklight/search/facet_suggest_input_spec.rb +0 -33
- data/spec/features/sitelinks_search_box_spec.rb +0 -13
- data/spec/views/catalog/_facet_index_navigation.html.erb_spec.rb +0 -43
- data/spec/views/catalog/_facet_layout.html.erb_spec.rb +0 -41
|
@@ -32,25 +32,25 @@ it:
|
|
|
32
32
|
apa: APA
|
|
33
33
|
chicago: Chicago
|
|
34
34
|
mla: MLA
|
|
35
|
-
did_you_mean:
|
|
35
|
+
did_you_mean: "Intendevi digitare: %{options}?"
|
|
36
36
|
email:
|
|
37
37
|
errors:
|
|
38
38
|
to:
|
|
39
39
|
blank: Inserisci un destinatario per inviare il messaggio
|
|
40
40
|
invalid: L'indirizzo e-mail inserito non è valido
|
|
41
41
|
form:
|
|
42
|
-
message:
|
|
42
|
+
message: "Messaggio:"
|
|
43
43
|
submit: Invia
|
|
44
44
|
title: Invia per e-mail
|
|
45
|
-
to:
|
|
45
|
+
to: "E-mail:"
|
|
46
46
|
success: Messaggio inviato
|
|
47
47
|
text:
|
|
48
48
|
default_title: N/A
|
|
49
|
-
message:
|
|
49
|
+
message: "Messaggio: %{message}"
|
|
50
50
|
subject:
|
|
51
|
-
one:
|
|
51
|
+
one: "Numero di scheda: %{title}"
|
|
52
52
|
other: Numeri di scheda
|
|
53
|
-
url:
|
|
53
|
+
url: "URL: %{url}"
|
|
54
54
|
entry_name:
|
|
55
55
|
default:
|
|
56
56
|
one: termine di ricerca
|
|
@@ -92,8 +92,8 @@ it:
|
|
|
92
92
|
close: Nascondi sfaccettature
|
|
93
93
|
open: Mostra sfaccettature
|
|
94
94
|
missing:
|
|
95
|
-
|
|
96
|
-
more_html: altri <span class="
|
|
95
|
+
- Mancante
|
|
96
|
+
more_html: altri <span class="visually-hidden">%{field_name}</span> »
|
|
97
97
|
pivot:
|
|
98
98
|
hide: Chiudi
|
|
99
99
|
show: Apri
|
|
@@ -103,15 +103,15 @@ it:
|
|
|
103
103
|
count: Ordina per numero
|
|
104
104
|
index: Ordina A-Z
|
|
105
105
|
suggest:
|
|
106
|
-
label:
|
|
107
|
-
placeholder:
|
|
106
|
+
label: Filtro %{field_label}
|
|
107
|
+
placeholder: Filtro...
|
|
108
108
|
title: Affina la ricerca
|
|
109
109
|
filters:
|
|
110
110
|
label: "%{label}:"
|
|
111
111
|
remove:
|
|
112
|
-
label_value:
|
|
112
|
+
label_value: "Cancella il filtro %{label}: %{value}"
|
|
113
113
|
value: Cancella il filtro %{value}
|
|
114
|
-
title:
|
|
114
|
+
title: "Le tue selezioni:"
|
|
115
115
|
form:
|
|
116
116
|
search:
|
|
117
117
|
label: cerca per
|
|
@@ -130,6 +130,7 @@ it:
|
|
|
130
130
|
constraint: "%{label}: %{value}"
|
|
131
131
|
many_constraint_values: "%{values} selezionato"
|
|
132
132
|
title: "%{constraints} - %{application_name} Risultati della ricerca"
|
|
133
|
+
joiner: " / "
|
|
133
134
|
pagination:
|
|
134
135
|
title: Navigazione nei risultati
|
|
135
136
|
pagination_info:
|
|
@@ -146,7 +147,6 @@ it:
|
|
|
146
147
|
submit: Aggiorna
|
|
147
148
|
title: Risultati per pagina
|
|
148
149
|
rss_feed: RSS per i risultati
|
|
149
|
-
search_constraints_header: Ricerca
|
|
150
150
|
search_results: Risultati della ricerca
|
|
151
151
|
show:
|
|
152
152
|
label: "%{label}:"
|
|
@@ -158,7 +158,7 @@ it:
|
|
|
158
158
|
start_over: Nuova ricerca
|
|
159
159
|
view:
|
|
160
160
|
list: Lista
|
|
161
|
-
view_title:
|
|
161
|
+
view_title: "Visualizza i risultati come: "
|
|
162
162
|
zero_results:
|
|
163
163
|
modify_search: Modifica la ricerca
|
|
164
164
|
search_everything: prova a cercare in tutti i campi
|
|
@@ -195,10 +195,10 @@ it:
|
|
|
195
195
|
carrier_prompt: Indicare l'operatore
|
|
196
196
|
submit: Inviare
|
|
197
197
|
title: Invia per SMS
|
|
198
|
-
to:
|
|
198
|
+
to: "Numero di telefono:"
|
|
199
199
|
success: SMS inviato
|
|
200
200
|
text:
|
|
201
|
-
url:
|
|
201
|
+
url: "Link: %{url}"
|
|
202
202
|
tools:
|
|
203
203
|
citation: Cita
|
|
204
204
|
clear: Cancella
|
|
@@ -32,25 +32,25 @@ nl:
|
|
|
32
32
|
apa: APA
|
|
33
33
|
chicago: Chicago
|
|
34
34
|
mla: MLA
|
|
35
|
-
did_you_mean:
|
|
35
|
+
did_you_mean: "Bedoelde u: %{options}?"
|
|
36
36
|
email:
|
|
37
37
|
errors:
|
|
38
38
|
to:
|
|
39
39
|
blank: U dient een ontvanger voor dit bericht op te geven.
|
|
40
40
|
invalid: U dient een geldig e-mailadres op te geven.
|
|
41
41
|
form:
|
|
42
|
-
message:
|
|
42
|
+
message: "Boodschap:"
|
|
43
43
|
submit: Verzenden
|
|
44
44
|
title: Email dit
|
|
45
|
-
to:
|
|
45
|
+
to: "Email:"
|
|
46
46
|
success: Email Verzonden
|
|
47
47
|
text:
|
|
48
48
|
default_title: N/A
|
|
49
|
-
message:
|
|
49
|
+
message: "Boodschap: %{message}"
|
|
50
50
|
subject:
|
|
51
|
-
one:
|
|
51
|
+
one: "Item Record: %{title}"
|
|
52
52
|
other: Item records
|
|
53
|
-
url:
|
|
53
|
+
url: "URL: %{url}"
|
|
54
54
|
entry_name:
|
|
55
55
|
default: ingang
|
|
56
56
|
grouped:
|
|
@@ -100,15 +100,15 @@ nl:
|
|
|
100
100
|
count: Numeriek sorteren
|
|
101
101
|
index: A-Z Sorteren
|
|
102
102
|
suggest:
|
|
103
|
-
label:
|
|
103
|
+
label: Filteren %{field_label}
|
|
104
104
|
placeholder: Filter...
|
|
105
105
|
title: Verfijn uw zoekopdracht
|
|
106
106
|
filters:
|
|
107
107
|
label: "%{label}:"
|
|
108
108
|
remove:
|
|
109
|
-
label_value:
|
|
109
|
+
label_value: "Verwijder zoekfilter %{label}: %{value}"
|
|
110
110
|
value: Verwijder zoekfilter %{value}
|
|
111
|
-
title:
|
|
111
|
+
title: "Uw selecties:"
|
|
112
112
|
form:
|
|
113
113
|
search:
|
|
114
114
|
label: zoeken op
|
|
@@ -127,6 +127,7 @@ nl:
|
|
|
127
127
|
constraint: "%{label}: %{value}"
|
|
128
128
|
many_constraint_values: "%{values} geselecteerd"
|
|
129
129
|
title: "%{constraints} - %{application_name} Zoek resultaten"
|
|
130
|
+
joiner: " / "
|
|
130
131
|
pagination:
|
|
131
132
|
title: Zoeken navigatie
|
|
132
133
|
pagination_info:
|
|
@@ -143,7 +144,6 @@ nl:
|
|
|
143
144
|
submit: Update
|
|
144
145
|
title: Toon aantal zoekresultaten per pagina
|
|
145
146
|
rss_feed: RSS voor zoekresultaten
|
|
146
|
-
search_constraints_header: Zoek filters
|
|
147
147
|
search_results: Zoek resultaten
|
|
148
148
|
show:
|
|
149
149
|
label: "%{label}:"
|
|
@@ -155,7 +155,7 @@ nl:
|
|
|
155
155
|
start_over: Start Opnieuw
|
|
156
156
|
view:
|
|
157
157
|
list: Lijst
|
|
158
|
-
view_title:
|
|
158
|
+
view_title: "Bekijk resultaten als: "
|
|
159
159
|
zero_results:
|
|
160
160
|
modify_search: Probeer uw zoekopdracht aan te passen
|
|
161
161
|
search_everything: probeer door alles te zoeken
|
|
@@ -192,10 +192,10 @@ nl:
|
|
|
192
192
|
carrier_prompt: Gelieve uw carrier op te geven.
|
|
193
193
|
submit: Verzenden
|
|
194
194
|
title: SMS dit
|
|
195
|
-
to:
|
|
195
|
+
to: "Telefoonnummer:"
|
|
196
196
|
success: SMS Verzonden
|
|
197
197
|
text:
|
|
198
|
-
url:
|
|
198
|
+
url: "Link: %{url}"
|
|
199
199
|
tools:
|
|
200
200
|
citation: Citeer
|
|
201
201
|
clear: Leeg maken
|
|
@@ -32,25 +32,25 @@ pt-BR:
|
|
|
32
32
|
apa: APA
|
|
33
33
|
chicago: Chicago
|
|
34
34
|
mla: MLA
|
|
35
|
-
did_you_mean:
|
|
35
|
+
did_you_mean: "Você quis dizer: %{options}?"
|
|
36
36
|
email:
|
|
37
37
|
errors:
|
|
38
38
|
to:
|
|
39
39
|
blank: Você precisa especificar um destinaário para enviar esta mensagem
|
|
40
40
|
invalid: Verifique seu endereço de email
|
|
41
41
|
form:
|
|
42
|
-
message:
|
|
42
|
+
message: "Mensagem:"
|
|
43
43
|
submit: Enviar
|
|
44
44
|
title: Enviar por Email
|
|
45
|
-
to:
|
|
45
|
+
to: "Email:"
|
|
46
46
|
success: Email Enviado
|
|
47
47
|
text:
|
|
48
48
|
default_title: N/A
|
|
49
|
-
message:
|
|
49
|
+
message: "Mensagem: %{message}"
|
|
50
50
|
subject:
|
|
51
|
-
one:
|
|
51
|
+
one: "Item: %{title}"
|
|
52
52
|
other: Itens
|
|
53
|
-
url:
|
|
53
|
+
url: "URL: %{url}"
|
|
54
54
|
entry_name:
|
|
55
55
|
default: registro
|
|
56
56
|
grouped:
|
|
@@ -90,7 +90,7 @@ pt-BR:
|
|
|
90
90
|
close: Ocultar facetas
|
|
91
91
|
open: Mostrar facetas
|
|
92
92
|
missing:
|
|
93
|
-
|
|
93
|
+
- Ausência
|
|
94
94
|
more_html: mais <span class="visually-hidden">%{field_name}</span> »
|
|
95
95
|
pivot:
|
|
96
96
|
hide: Fechar
|
|
@@ -101,15 +101,15 @@ pt-BR:
|
|
|
101
101
|
count: Ordenar por Número
|
|
102
102
|
index: Ordem Alfabética A-Z
|
|
103
103
|
suggest:
|
|
104
|
-
label:
|
|
105
|
-
placeholder:
|
|
104
|
+
label: Filtro %{field_label}
|
|
105
|
+
placeholder: Filtro...
|
|
106
106
|
title: Filtre sua busca
|
|
107
107
|
filters:
|
|
108
108
|
label: "%{label}:"
|
|
109
109
|
remove:
|
|
110
|
-
label_value:
|
|
110
|
+
label_value: "Remover %{label}: %{value}"
|
|
111
111
|
value: Remover filtro %{value}
|
|
112
|
-
title:
|
|
112
|
+
title: "Suas seleções:"
|
|
113
113
|
form:
|
|
114
114
|
search:
|
|
115
115
|
label: busca
|
|
@@ -128,6 +128,7 @@ pt-BR:
|
|
|
128
128
|
constraint: "%{label}: %{value}"
|
|
129
129
|
many_constraint_values: "%{values} selecionado"
|
|
130
130
|
title: "%{constraints} - %{application_name} Resultado da Busca"
|
|
131
|
+
joiner: " / "
|
|
131
132
|
pagination:
|
|
132
133
|
title: Navegação nos Resultados
|
|
133
134
|
pagination_info:
|
|
@@ -144,7 +145,6 @@ pt-BR:
|
|
|
144
145
|
submit: Atualizar
|
|
145
146
|
title: Número de resultados para mostrar por página
|
|
146
147
|
rss_feed: RSS para resultadoss
|
|
147
|
-
search_constraints_header: Busca
|
|
148
148
|
search_results: Resultados da Busca
|
|
149
149
|
show:
|
|
150
150
|
label: "%{label}:"
|
|
@@ -156,7 +156,7 @@ pt-BR:
|
|
|
156
156
|
start_over: refazer busca
|
|
157
157
|
view:
|
|
158
158
|
list: Lista
|
|
159
|
-
view_title:
|
|
159
|
+
view_title: "Ver resultados como: "
|
|
160
160
|
zero_results:
|
|
161
161
|
modify_search: Tente modificar sua busca
|
|
162
162
|
search_everything: tente buscar em tudo
|
|
@@ -193,10 +193,10 @@ pt-BR:
|
|
|
193
193
|
carrier_prompt: Selecione a Operadora
|
|
194
194
|
submit: Enviar
|
|
195
195
|
title: Enviar por SMS
|
|
196
|
-
to:
|
|
196
|
+
to: "Celular:"
|
|
197
197
|
success: SMS Enviado
|
|
198
198
|
text:
|
|
199
|
-
url:
|
|
199
|
+
url: "Link: %{url}"
|
|
200
200
|
tools:
|
|
201
201
|
citation: Citar
|
|
202
202
|
clear: Limpar
|
|
@@ -32,25 +32,25 @@ sq:
|
|
|
32
32
|
apa: APA
|
|
33
33
|
chicago: Chicago
|
|
34
34
|
mla: MLA
|
|
35
|
-
did_you_mean:
|
|
35
|
+
did_you_mean: "A keni menduar: %{options}?"
|
|
36
36
|
email:
|
|
37
37
|
errors:
|
|
38
38
|
to:
|
|
39
39
|
blank: Duhet të shkruash një pranues për të dëguar mesazh
|
|
40
40
|
invalid: Duhet të shkruash një email adresë valide
|
|
41
41
|
form:
|
|
42
|
-
message:
|
|
42
|
+
message: "Mesazhi:"
|
|
43
43
|
submit: Dërgo
|
|
44
44
|
title: Dërgo Email
|
|
45
|
-
to:
|
|
45
|
+
to: "Email:"
|
|
46
46
|
success: Emaili u dëgua
|
|
47
47
|
text:
|
|
48
48
|
default_title: N/A
|
|
49
|
-
message:
|
|
49
|
+
message: "Mesazhi: %{message}"
|
|
50
50
|
subject:
|
|
51
|
-
one:
|
|
51
|
+
one: "Item Record: %{title}"
|
|
52
52
|
other: Item records
|
|
53
|
-
url:
|
|
53
|
+
url: "URL: %{url}"
|
|
54
54
|
entry_name:
|
|
55
55
|
default: entry
|
|
56
56
|
grouped:
|
|
@@ -100,15 +100,15 @@ sq:
|
|
|
100
100
|
count: Renditja numerike
|
|
101
101
|
index: A-Z Renditja
|
|
102
102
|
suggest:
|
|
103
|
-
label:
|
|
104
|
-
placeholder:
|
|
103
|
+
label: Filtri %{field_label}
|
|
104
|
+
placeholder: Filtro...
|
|
105
105
|
title: Kufizo këkimin
|
|
106
106
|
filters:
|
|
107
107
|
label: "%{label}:"
|
|
108
108
|
remove:
|
|
109
|
-
label_value:
|
|
109
|
+
label_value: "Fshij kufizimin %{label}: %{value}"
|
|
110
110
|
value: Fshij kufizimin %{value}
|
|
111
|
-
title:
|
|
111
|
+
title: "Zgjedhjet tuaja:"
|
|
112
112
|
form:
|
|
113
113
|
search:
|
|
114
114
|
label: kërko për
|
|
@@ -127,6 +127,7 @@ sq:
|
|
|
127
127
|
constraint: "%{label}: %{value}"
|
|
128
128
|
many_constraint_values: "%{values} zgjedhura"
|
|
129
129
|
title: "%{constraints} - %{application_name} Rezultatet e kërkimit"
|
|
130
|
+
joiner: " / "
|
|
130
131
|
pagination:
|
|
131
132
|
title: Navigimi i rezultateteve
|
|
132
133
|
pagination_info:
|
|
@@ -143,7 +144,6 @@ sq:
|
|
|
143
144
|
submit: Përditëso
|
|
144
145
|
title: Numri i rezultateve që do të shfaqen për faqe
|
|
145
146
|
rss_feed: RSS për rezultatet
|
|
146
|
-
search_constraints_header: Kufizimet e kërkimit
|
|
147
147
|
search_results: Rezultatet e kërkimit
|
|
148
148
|
show:
|
|
149
149
|
label: "%{label}:"
|
|
@@ -155,7 +155,7 @@ sq:
|
|
|
155
155
|
start_over: Fillo nga e para
|
|
156
156
|
view:
|
|
157
157
|
list: List
|
|
158
|
-
view_title:
|
|
158
|
+
view_title: "Shiko rezultatin si: "
|
|
159
159
|
zero_results:
|
|
160
160
|
modify_search: Provo të ndryshosh kërkimin
|
|
161
161
|
search_everything: provo të kërkosh çdo gjë
|
|
@@ -192,10 +192,10 @@ sq:
|
|
|
192
192
|
carrier_prompt: Ju lutemi zgjedheni operatorin
|
|
193
193
|
submit: Dërgo
|
|
194
194
|
title: SMS
|
|
195
|
-
to:
|
|
195
|
+
to: "Numri i telefonit:"
|
|
196
196
|
success: SMS-i u dëgua
|
|
197
197
|
text:
|
|
198
|
-
url:
|
|
198
|
+
url: "Link: %{url}"
|
|
199
199
|
tools:
|
|
200
200
|
citation: Citati
|
|
201
201
|
clear: Fshij
|
|
@@ -48,9 +48,9 @@ zh:
|
|
|
48
48
|
default_title: 无
|
|
49
49
|
message: 正文: %{message}
|
|
50
50
|
subject:
|
|
51
|
-
one:
|
|
51
|
+
one: "记录: %{title}"
|
|
52
52
|
other: 记录
|
|
53
|
-
url:
|
|
53
|
+
url: "网址: %{url}"
|
|
54
54
|
entry_name:
|
|
55
55
|
default: 条目
|
|
56
56
|
grouped:
|
|
@@ -100,15 +100,15 @@ zh:
|
|
|
100
100
|
count: 按数量排序
|
|
101
101
|
index: 按字母排序
|
|
102
102
|
suggest:
|
|
103
|
-
label:
|
|
104
|
-
placeholder:
|
|
103
|
+
label: 过滤器 %{field_label}
|
|
104
|
+
placeholder: 筛选...
|
|
105
105
|
title: 限定搜索
|
|
106
106
|
filters:
|
|
107
107
|
label: "%{label}:"
|
|
108
108
|
remove:
|
|
109
|
-
label_value:
|
|
109
|
+
label_value: "删除限定条件 %{label}: %{value}"
|
|
110
110
|
value: 删除限定条件 %{value}
|
|
111
|
-
title:
|
|
111
|
+
title: 您的选择:
|
|
112
112
|
form:
|
|
113
113
|
search:
|
|
114
114
|
label: 搜索
|
|
@@ -127,10 +127,11 @@ zh:
|
|
|
127
127
|
constraint: "%{label}: %{value}"
|
|
128
128
|
many_constraint_values: "%{values} 已选"
|
|
129
129
|
title: "%{constraints} - %{application_name} 搜索结果"
|
|
130
|
+
joiner: " / "
|
|
130
131
|
pagination:
|
|
131
132
|
title: 搜索结果导航
|
|
132
133
|
pagination_info:
|
|
133
|
-
no_items_found:
|
|
134
|
+
no_items_found: "没有找到 %{entry_name} "
|
|
134
135
|
pages:
|
|
135
136
|
one: "<strong>%{start_num}</strong> - <strong>%{end_num}</strong> 共 <strong>%{total_num}</strong>"
|
|
136
137
|
other: "<strong>%{start_num}</strong> - <strong>%{end_num}</strong> 共 <strong>%{total_num}</strong>"
|
|
@@ -143,7 +144,6 @@ zh:
|
|
|
143
144
|
submit: 更新
|
|
144
145
|
title: 每页显示结果数
|
|
145
146
|
rss_feed: 搜索结果RSS
|
|
146
|
-
search_constraints_header: 搜索条件
|
|
147
147
|
search_results: 搜索结果
|
|
148
148
|
show:
|
|
149
149
|
label: "%{label}:"
|
|
@@ -155,7 +155,7 @@ zh:
|
|
|
155
155
|
start_over: 重新开始
|
|
156
156
|
view:
|
|
157
157
|
list: 列表
|
|
158
|
-
view_title:
|
|
158
|
+
view_title: "以如下方式察看搜索结果: "
|
|
159
159
|
zero_results:
|
|
160
160
|
modify_search: 请更改你的搜索条件
|
|
161
161
|
search_everything: 试一试搜索所有记录
|
|
@@ -173,7 +173,7 @@ zh:
|
|
|
173
173
|
page_title: 搜索历史 - %{application_name}
|
|
174
174
|
recent: 你最近搜索历史
|
|
175
175
|
save: 保存
|
|
176
|
-
title:
|
|
176
|
+
title: ""
|
|
177
177
|
skip_links:
|
|
178
178
|
first_result: 转到第一个搜索结果
|
|
179
179
|
label: 跳过链接
|
|
@@ -192,10 +192,10 @@ zh:
|
|
|
192
192
|
carrier_prompt: 请选择运营商
|
|
193
193
|
submit: 发送
|
|
194
194
|
title: 通过短信发送
|
|
195
|
-
to:
|
|
195
|
+
to: "电话号码:"
|
|
196
196
|
success: 已发送短信
|
|
197
197
|
text:
|
|
198
|
-
url:
|
|
198
|
+
url: "链接: %{url}"
|
|
199
199
|
tools:
|
|
200
200
|
citation: 引用
|
|
201
201
|
clear: 清除
|
data/lib/blacklight/component.rb
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require 'view_component/version'
|
|
4
|
+
|
|
3
5
|
module Blacklight
|
|
4
6
|
class Component < ViewComponent::Base
|
|
5
7
|
class << self
|
|
@@ -9,9 +11,13 @@ module Blacklight
|
|
|
9
11
|
@__vc_compiler = nil
|
|
10
12
|
end
|
|
11
13
|
|
|
14
|
+
# This allows the host application to provide erb templates that override the templates
|
|
15
|
+
# provided by Blacklight.
|
|
12
16
|
def sidecar_files(*args, **kwargs)
|
|
13
17
|
upstream_sidecar_files(*args, **kwargs).map do |path|
|
|
14
|
-
|
|
18
|
+
components_path = ViewComponent::VERSION::MAJOR == 3 ? view_component_path : config.generate.path
|
|
19
|
+
|
|
20
|
+
app_path = Rails.root.join(path.slice(path.index(components_path)..-1).to_s).to_s
|
|
15
21
|
|
|
16
22
|
if File.exist?(app_path)
|
|
17
23
|
app_path
|
|
@@ -24,16 +24,16 @@ module Blacklight
|
|
|
24
24
|
#
|
|
25
25
|
# @param [#if,#unless] config an object that responds to if/unless
|
|
26
26
|
# @return [Boolean]
|
|
27
|
-
def evaluate_if_unless_configuration(config, *
|
|
27
|
+
def evaluate_if_unless_configuration(config, *)
|
|
28
28
|
return config if config == true || config == false
|
|
29
29
|
|
|
30
30
|
if_value = !config.respond_to?(:if) ||
|
|
31
31
|
config.if.nil? ||
|
|
32
|
-
evaluate_configuration_conditional(config.if, config, *
|
|
32
|
+
evaluate_configuration_conditional(config.if, config, *)
|
|
33
33
|
|
|
34
34
|
unless_value = !config.respond_to?(:unless) ||
|
|
35
35
|
config.unless.nil? ||
|
|
36
|
-
!evaluate_configuration_conditional(config.unless, config, *
|
|
36
|
+
!evaluate_configuration_conditional(config.unless, config, *)
|
|
37
37
|
|
|
38
38
|
if_value && unless_value
|
|
39
39
|
end
|
|
@@ -16,6 +16,8 @@ module Blacklight
|
|
|
16
16
|
# @return [Boolean] whether to show the facet to the user or not (very similar to the more generic if/unless)
|
|
17
17
|
# @!attribute index_range
|
|
18
18
|
# @return [Enumerable] a list of facet prefixes (default: A-Z) to allow users to 'jump' to particular values
|
|
19
|
+
# @!attribute suggest
|
|
20
|
+
# @return [Boolean] whether to display a suggest/autocomplete on the detailed facet view that allows users to filter facet values
|
|
19
21
|
# @!attribute date
|
|
20
22
|
# @return [Symbol|Hash] the i18n localization option for a date or time value; used as the second parameter for the I18n.l method
|
|
21
23
|
# @!attribute link_to_facet
|
|
@@ -59,15 +61,15 @@ module Blacklight
|
|
|
59
61
|
# @!attribute item_presenter
|
|
60
62
|
# @return [Blacklight::FacetItemPresenter]
|
|
61
63
|
# @!attribute component
|
|
62
|
-
# @return [Blacklight::
|
|
64
|
+
# @return [Blacklight::Facets::ListComponent]
|
|
63
65
|
# @!attribute item_component
|
|
64
|
-
# @return [Blacklight::
|
|
66
|
+
# @return [Blacklight::Facets::ItemComponent]
|
|
65
67
|
# @!attribute partial
|
|
66
68
|
# @return [String] Rails view partial used to render the facet field
|
|
67
69
|
|
|
68
70
|
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
|
69
71
|
def normalize! blacklight_config = nil
|
|
70
|
-
query
|
|
72
|
+
query&.stringify_keys!
|
|
71
73
|
|
|
72
74
|
normalize_pivot_config! if pivot
|
|
73
75
|
self.collapse = true if collapse.nil?
|
|
@@ -76,9 +78,11 @@ module Blacklight
|
|
|
76
78
|
self.index_range = 'A'..'Z' if index_range == true
|
|
77
79
|
self.presenter ||= Blacklight::FacetFieldPresenter
|
|
78
80
|
self.item_presenter ||= Blacklight::FacetItemPresenter
|
|
79
|
-
self.
|
|
80
|
-
|
|
81
|
-
self.
|
|
81
|
+
self.constraint_presenter ||= Blacklight::ConstraintPresenter
|
|
82
|
+
|
|
83
|
+
self.component = Blacklight::Facets::ListComponent if component.nil? || component == true
|
|
84
|
+
self.advanced_search_component ||= Blacklight::Facets::CheckboxesComponent
|
|
85
|
+
self.item_component ||= Blacklight::Facets::ItemComponent
|
|
82
86
|
super
|
|
83
87
|
|
|
84
88
|
if single && tag.blank? && ex.blank?
|
|
@@ -95,6 +99,7 @@ module Blacklight
|
|
|
95
99
|
def normalize_pivot_config!
|
|
96
100
|
self.item_presenter ||= Blacklight::FacetItemPivotPresenter
|
|
97
101
|
self.item_component ||= Blacklight::FacetItemPivotComponent
|
|
102
|
+
self.component ||= Blacklight::Facets::PivotListComponent
|
|
98
103
|
self.filter_class ||= Blacklight::SearchState::PivotFilterField
|
|
99
104
|
self.filter_query_builder ||= Blacklight::SearchState::PivotFilterField::QueryBuilder
|
|
100
105
|
end
|
|
@@ -33,13 +33,13 @@ module Blacklight
|
|
|
33
33
|
raise ArgumentError, "Must supply a field name" if self.field.nil?
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
-
def display_label(context = nil, **
|
|
36
|
+
def display_label(context = nil, **)
|
|
37
37
|
field_label(
|
|
38
38
|
(:"blacklight.search.fields.#{context}.#{key}" if context),
|
|
39
39
|
:"blacklight.search.fields.#{key}",
|
|
40
40
|
label,
|
|
41
41
|
default_label,
|
|
42
|
-
**
|
|
42
|
+
**
|
|
43
43
|
)
|
|
44
44
|
end
|
|
45
45
|
|
|
@@ -65,10 +65,10 @@ module Blacklight
|
|
|
65
65
|
# before falling back to the label
|
|
66
66
|
# @param [Symbol] any number of additional keys
|
|
67
67
|
# @param [Symbol] ...
|
|
68
|
-
def field_label
|
|
68
|
+
def field_label(*i18n_keys, **)
|
|
69
69
|
first, *rest = i18n_keys.compact
|
|
70
70
|
|
|
71
|
-
I18n.t(first, default: rest, **
|
|
71
|
+
I18n.t(first, default: rest, **)
|
|
72
72
|
end
|
|
73
73
|
end
|
|
74
74
|
end
|
|
@@ -145,7 +145,6 @@ module Blacklight
|
|
|
145
145
|
end
|
|
146
146
|
|
|
147
147
|
@table[:reflected_fields] ||= Rails.cache.fetch("blacklight_configuration/admin/reflected_fields", expires_in: 1.hour) do
|
|
148
|
-
repository = repository_class.new(self)
|
|
149
148
|
repository.reflect_fields
|
|
150
149
|
rescue => e
|
|
151
150
|
Blacklight.logger&.warn "Error retrieving field metadata: #{e}"
|
|
@@ -14,7 +14,7 @@ module Blacklight
|
|
|
14
14
|
self.if = include_in_simple_select if self.if.nil?
|
|
15
15
|
|
|
16
16
|
super
|
|
17
|
-
self.qt ||= blacklight_config.default_solr_params[:qt] if blacklight_config
|
|
17
|
+
self.qt ||= blacklight_config.default_solr_params[:qt] if blacklight_config&.default_solr_params
|
|
18
18
|
|
|
19
19
|
self
|
|
20
20
|
end
|