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.
- checksums.yaml +4 -4
- data/.env +3 -3
- data/.github/pull_request_template.md +7 -0
- data/.github/workflows/ruby.yml +1 -9
- data/.rubocop.yml +2 -2
- data/.rubocop_todo.yml +0 -9
- data/README.md +30 -8
- data/VERSION +1 -1
- data/app/assets/builds/blacklight.css +448 -0
- data/app/assets/javascripts/blacklight/blacklight.esm.js +18 -15
- data/app/assets/javascripts/blacklight/blacklight.esm.js.map +1 -1
- data/app/assets/javascripts/blacklight/blacklight.js +18 -15
- data/app/assets/javascripts/blacklight/blacklight.js.map +1 -1
- data/app/assets/stylesheets/blacklight/_balanced_list.scss +1 -4
- data/app/assets/stylesheets/blacklight/_blacklight_base.scss +1 -3
- data/app/assets/stylesheets/blacklight/_bookmark.scss +44 -41
- data/app/assets/stylesheets/blacklight/_bootstrap_overrides.scss +7 -26
- data/app/assets/stylesheets/blacklight/_constraints.scss +15 -24
- data/app/assets/stylesheets/blacklight/_controls.scss +2 -18
- data/app/assets/stylesheets/blacklight/_facets.scss +15 -82
- data/app/assets/stylesheets/blacklight/_group.scss +2 -5
- data/app/assets/stylesheets/blacklight/_header.scss +4 -11
- data/app/assets/stylesheets/blacklight/_icons.scss +0 -8
- data/app/assets/stylesheets/blacklight/_modal.scss +2 -2
- data/app/assets/stylesheets/blacklight/_pagination.scss +0 -4
- data/app/assets/stylesheets/blacklight/_search_form.scss +0 -1
- data/app/assets/stylesheets/blacklight/_search_history.scss +0 -4
- data/app/assets/stylesheets/blacklight/_search_results.scss +1 -15
- data/app/assets/stylesheets/blacklight/blacklight_defaults.scss +9 -14
- data/app/assets/stylesheets/blacklight/build.scss +4 -0
- data/app/components/blacklight/advanced_search_form_component.rb +1 -1
- data/app/components/blacklight/constraint_component.rb +1 -1
- data/app/components/blacklight/constraint_layout_component.html.erb +2 -2
- data/app/components/blacklight/constraints_component.html.erb +2 -2
- data/app/components/blacklight/constraints_component.rb +1 -1
- data/app/components/blacklight/document/action_component.rb +3 -1
- data/app/components/blacklight/document/bookmark_component.html.erb +3 -3
- data/app/components/blacklight/document/group_component.html.erb +1 -1
- data/app/components/blacklight/document/page_header_component.rb +1 -1
- data/app/components/blacklight/document/sidebar_component.rb +5 -5
- data/app/components/blacklight/document_component.rb +9 -13
- data/app/components/blacklight/document_title_component.rb +3 -2
- data/app/components/blacklight/facet_field_component.html.erb +5 -5
- data/app/components/blacklight/facet_field_list_component.rb +4 -22
- data/app/components/blacklight/facet_item_component.rb +2 -2
- data/app/components/blacklight/facet_item_pivot_component.rb +2 -2
- data/app/components/blacklight/response/facet_group_component.html.erb +3 -18
- data/app/components/blacklight/response/facet_group_component.rb +7 -23
- data/app/components/blacklight/response/facet_toggle_button_component.html.erb +16 -0
- data/app/components/blacklight/response/facet_toggle_button_component.rb +14 -0
- data/app/components/blacklight/response/pagination_component.html.erb +1 -1
- data/app/components/blacklight/response/pagination_component.rb +2 -1
- data/app/components/blacklight/response/sort_component.rb +1 -0
- data/app/components/blacklight/response/view_type_button_component.html.erb +1 -1
- data/app/components/blacklight/response/view_type_component.html.erb +1 -1
- data/app/components/blacklight/search/facet_suggest_input.html.erb +7 -7
- data/app/components/blacklight/search/facet_suggest_input.rb +0 -4
- data/app/components/blacklight/search/per_page_component.html.erb +1 -1
- data/app/components/blacklight/search/per_page_component.rb +1 -0
- data/app/components/blacklight/search/sidebar_component.html.erb +1 -1
- data/app/components/blacklight/search/sidebar_component.rb +1 -1
- data/app/components/blacklight/search_bar_component.html.erb +3 -3
- data/app/components/blacklight/search_bar_component.rb +2 -2
- data/app/components/blacklight/search_button_component.rb +2 -2
- data/app/components/blacklight/search_context/server_applied_params_component.html.erb +2 -2
- data/app/components/blacklight/search_context/server_applied_params_component.rb +9 -0
- data/app/components/blacklight/skip_link_component.html.erb +1 -1
- data/app/components/blacklight/skip_link_component.rb +7 -3
- data/app/components/blacklight/skip_link_item_component.rb +18 -0
- data/app/components/blacklight/top_navbar_component.html.erb +1 -1
- data/app/controllers/concerns/blacklight/catalog.rb +3 -2
- data/app/controllers/concerns/blacklight/search_context.rb +0 -12
- data/app/helpers/blacklight/blacklight_helper_behavior.rb +0 -6
- data/app/helpers/blacklight/catalog_helper_behavior.rb +1 -11
- data/app/helpers/blacklight/configuration_helper_behavior.rb +0 -12
- data/app/helpers/blacklight/document_helper_behavior.rb +0 -26
- data/app/helpers/blacklight/icon_helper_behavior.rb +1 -9
- data/app/helpers/blacklight/layout_helper_behavior.rb +2 -2
- data/app/helpers/blacklight/render_partials_helper_behavior.rb +0 -14
- data/app/helpers/blacklight/url_helper_behavior.rb +1 -1
- data/app/javascript/{blacklight → blacklight-frontend}/bookmark_toggle.js +1 -1
- data/app/javascript/{blacklight → blacklight-frontend}/core.js +2 -10
- data/app/javascript/{blacklight → blacklight-frontend}/debounce.js +1 -1
- data/app/javascript/{blacklight → blacklight-frontend}/facet_suggest.js +3 -3
- data/app/javascript/blacklight-frontend/index.js +18 -0
- data/app/javascript/{blacklight → blacklight-frontend}/modal.js +16 -2
- data/app/models/concerns/blacklight/document.rb +0 -11
- data/app/models/concerns/blacklight/user.rb +1 -1
- data/app/presenters/blacklight/facet_field_presenter.rb +2 -2
- data/app/presenters/blacklight/json_presenter.rb +3 -1
- data/app/services/blacklight/search_params_yaml_coder.rb +0 -2
- data/app/views/bookmarks/_clear_bookmarks_widget.html.erb +0 -2
- data/app/views/bookmarks/index.html.erb +1 -1
- data/app/views/catalog/_results_pagination.html.erb +2 -5
- data/app/views/catalog/_search_results.html.erb +4 -4
- data/app/views/catalog/_search_results_header.html.erb +1 -1
- data/app/views/catalog/_sort_and_per_page.html.erb +1 -1
- data/app/views/catalog/_sort_widget.html.erb +1 -0
- data/app/views/catalog/facet.html.erb +1 -1
- data/app/views/catalog/show.html.erb +2 -3
- data/app/views/kaminari/blacklight/_paginator.html.erb +1 -2
- data/app/views/layouts/blacklight/base.html.erb +3 -7
- data/app/views/search_history/index.html.erb +0 -2
- data/blacklight.gemspec +4 -4
- data/config/importmap.rb +1 -1
- data/config/locales/blacklight.ar.yml +4 -4
- data/config/locales/blacklight.ca.yml +124 -124
- data/config/locales/blacklight.de.yml +2 -2
- data/config/locales/blacklight.en.yml +14 -14
- data/config/locales/blacklight.es.yml +4 -4
- data/config/locales/blacklight.fr.yml +4 -4
- data/config/locales/blacklight.hu.yml +4 -4
- data/config/locales/blacklight.it.yml +3 -3
- data/config/locales/blacklight.nl.yml +3 -3
- data/config/locales/blacklight.pt-BR.yml +3 -3
- data/config/locales/blacklight.sq.yml +4 -4
- data/config/locales/blacklight.zh.yml +4 -4
- data/lib/blacklight/configuration/display_field.rb +1 -1
- data/lib/blacklight/configuration/fields.rb +3 -3
- data/lib/blacklight/configuration/view_config.rb +0 -2
- data/lib/blacklight/configuration.rb +7 -12
- data/lib/blacklight/engine.rb +0 -6
- data/lib/blacklight/open_struct_with_hash_access.rb +4 -4
- data/lib/blacklight/search_builder.rb +4 -4
- data/lib/blacklight/search_state/filter_field.rb +2 -2
- data/lib/blacklight/solr/request.rb +1 -7
- data/lib/blacklight/solr/response/group_response.rb +2 -2
- data/lib/blacklight.rb +1 -1
- data/lib/generators/blacklight/assets/importmap_generator.rb +8 -24
- data/lib/generators/blacklight/assets/propshaft_generator.rb +1 -1
- data/lib/generators/blacklight/assets_generator.rb +3 -3
- data/lib/generators/blacklight/controller_generator.rb +3 -3
- data/lib/generators/blacklight/user_generator.rb +9 -10
- data/package.json +14 -4
- data/rollup.config.js +1 -1
- data/spec/components/blacklight/document/action_component_spec.rb +1 -5
- data/spec/components/blacklight/document/sidebar_component_spec.rb +5 -20
- data/spec/components/blacklight/facet_field_checkboxes_component_spec.rb +2 -2
- data/spec/components/blacklight/facet_field_list_component_spec.rb +2 -2
- data/spec/components/blacklight/search/facet_suggest_input_spec.rb +2 -18
- data/spec/components/blacklight/search_bar_component_spec.rb +1 -1
- data/spec/controllers/catalog_controller_spec.rb +1 -1
- data/spec/features/axe_spec.rb +6 -11
- data/spec/features/bookmarks_spec.rb +48 -11
- data/spec/features/facets_spec.rb +21 -36
- data/spec/features/search_context_spec.rb +1 -2
- data/spec/features/search_filters_spec.rb +6 -6
- data/spec/helpers/blacklight/configuration_helper_behavior_spec.rb +0 -9
- data/spec/helpers/blacklight/render_partials_helper_behavior_spec.rb +1 -1
- data/spec/lib/blacklight/parameters_spec.rb +1 -12
- data/spec/lib/blacklight/search_state/filter_field_spec.rb +0 -18
- data/spec/models/blacklight/solr/request_spec.rb +7 -0
- data/spec/services/blacklight/search_service_spec.rb +1 -1
- data/spec/test_app_templates/Gemfile.extra +0 -1
- data/spec/views/catalog/_facet_layout.html.erb_spec.rb +3 -3
- data/spec/views/catalog/index.html.erb_spec.rb +6 -3
- data/spec/views/catalog/show.html.erb_spec.rb +1 -0
- data/tasks/blacklight.rake +8 -5
- metadata +30 -54
- data/app/assets/stylesheets/blacklight/_autocomplete.scss +0 -25
- data/app/assets/stylesheets/blacklight/_mixins.scss +0 -20
- data/app/components/blacklight/icons/legacy_icon_component.rb +0 -30
- data/app/javascript/blacklight/index.js +0 -18
- data/app/views/catalog/_constraints.html.erb +0 -1
- data/app/views/catalog/_facets.html.erb +0 -5
- data/app/views/catalog/_search_form.html.erb +0 -7
- data/app/views/catalog/_search_header.html.erb +0 -1
- data/app/views/catalog/_show_sidebar.html.erb +0 -3
- data/app/views/catalog/_show_tools.html.erb +0 -2
- data/app/views/catalog/_start_over.html.erb +0 -1
- data/app/views/shared/_header_navbar.html.erb +0 -1
- data/lib/generators/blacklight/assets/sprockets_generator.rb +0 -68
- data/spec/views/catalog/_search_header.erb_spec.rb +0 -14
- data/spec/views/catalog/_show_sidebar.erb_spec.rb +0 -24
- data/spec/views/catalog/_show_tools.html.erb_spec.rb +0 -37
- /data/app/javascript/{blacklight → blacklight-frontend}/button_focus.js +0 -0
- /data/app/javascript/{blacklight → blacklight-frontend}/checkbox_submit.js +0 -0
- /data/app/javascript/{blacklight → blacklight-frontend}/modalForm.js +0 -0
- /data/app/javascript/{blacklight → blacklight-frontend}/search_context.js +0 -0
@@ -1,41 +1,32 @@
|
|
1
1
|
.constraints-container {
|
2
|
-
@extend .mb-2;
|
3
2
|
display: flex;
|
4
3
|
flex-wrap: wrap;
|
5
4
|
gap: 0.5rem 0.25rem;
|
6
5
|
}
|
7
6
|
|
8
7
|
.applied-filter {
|
9
|
-
|
8
|
+
--separator-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='currentColor'%3e%3cpath fill-rule='evenodd' d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e");
|
10
9
|
|
11
10
|
.constraint-value {
|
12
11
|
cursor: default;
|
13
12
|
text-overflow: ellipsis;
|
14
13
|
overflow: hidden;
|
15
14
|
white-space: nowrap;
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
15
|
+
max-width: clamp(288px, calc(30vw), 500px);
|
16
|
+
|
17
|
+
.filter-name:after {
|
18
|
+
background-color: var(--bs-btn-color);
|
19
|
+
content: "";
|
20
|
+
mask: var(--separator-icon);
|
21
|
+
mask-repeat: no-repeat;
|
22
|
+
display: inline-block;
|
23
|
+
height: 1.1rem;
|
24
|
+
width: 1.25rem;
|
25
|
+
vertical-align: text-bottom;
|
26
|
+
margin-right: -0.2rem;
|
27
|
+
margin-left: 0.25rem;
|
28
|
+
transition: background-color 0.15s ease-in-out;
|
27
29
|
}
|
28
|
-
|
29
|
-
@media (min-width: breakpoint-min(lg)) {
|
30
|
-
max-width: breakpoint-min(lg) * 0.5;
|
31
|
-
}
|
32
|
-
}
|
33
|
-
|
34
|
-
.filter-name:after {
|
35
|
-
color: $gray-500;
|
36
|
-
content: "❯";
|
37
|
-
font-size: 90%;
|
38
|
-
padding-left: $caret-width;
|
39
30
|
}
|
40
31
|
|
41
32
|
.remove {
|
@@ -1,21 +1,10 @@
|
|
1
1
|
.search-widgets {
|
2
2
|
display: flex;
|
3
|
-
|
4
|
-
> * {
|
5
|
-
@extend .mx-1;
|
6
|
-
}
|
7
3
|
}
|
8
4
|
|
9
5
|
.sort-pagination,
|
10
6
|
.pagination-search-widgets {
|
11
|
-
border-bottom:
|
12
|
-
margin-bottom: 1em;
|
13
|
-
padding-bottom: 1em;
|
14
|
-
}
|
15
|
-
|
16
|
-
.pagination-search-widgets {
|
17
|
-
padding-top: 1px;
|
18
|
-
padding-bottom: $spacer;
|
7
|
+
border-bottom: var(--bs-border-width) solid var(--bs-border-color);
|
19
8
|
}
|
20
9
|
|
21
10
|
.sort-pagination .dropdown-toggle {
|
@@ -25,18 +14,13 @@
|
|
25
14
|
.no-js {
|
26
15
|
.btn-group:focus-within {
|
27
16
|
.dropdown-menu {
|
28
|
-
|
17
|
+
display: block; /* show menu when tabbing to it, without Javascript */
|
29
18
|
}
|
30
19
|
}
|
31
20
|
}
|
32
21
|
|
33
22
|
.view-type {
|
34
23
|
display: inline-block;
|
35
|
-
|
36
|
-
.caption {
|
37
|
-
@extend .sr-only !optional;
|
38
|
-
@extend .visually-hidden !optional;
|
39
|
-
}
|
40
24
|
}
|
41
25
|
|
42
26
|
.modal_form {
|
@@ -1,18 +1,11 @@
|
|
1
1
|
.sidenav {
|
2
|
-
--bl-facet-active-bg:
|
3
|
-
--bl-facet-active-item-color:
|
4
|
-
--bl-facet-margin-bottom: #{$spacer};
|
2
|
+
--bl-facet-active-bg: var(--bs-success);
|
3
|
+
--bl-facet-active-item-color: var(--bs-success);
|
5
4
|
--bl-facet-remove-color: var(--bs-secondary-color);
|
5
|
+
--bl-facet-remove-hover-color: var(--bs-danger);
|
6
6
|
--bl-facet-label-indent: -15px;
|
7
7
|
--bl-facet-label-padding-left: 15px;
|
8
|
-
|
9
|
-
--bl-facet-limit-body-padding: #{$spacer};
|
10
|
-
|
11
|
-
--bl-facets-smallish-padding: 0.25rem;
|
12
|
-
--bl-facets-smallish-border: var(--bs-border-width) solid
|
13
|
-
var(--bs-border-color);
|
14
|
-
--bl-facets-smallish-margin-bottom: #{$spacer};
|
15
|
-
--bl-facets-smallish-border-radius: #{$border-radius};
|
8
|
+
--bl-facet-header-padding-y: 0.5rem;
|
16
9
|
|
17
10
|
.facet-toggle-button {
|
18
11
|
[data-hide-label] {
|
@@ -33,34 +26,6 @@
|
|
33
26
|
}
|
34
27
|
}
|
35
28
|
|
36
|
-
.facets-toggleable {
|
37
|
-
@each $breakpoint in map-keys($grid-breakpoints) {
|
38
|
-
$next: breakpoint-next($breakpoint, $grid-breakpoints);
|
39
|
-
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
40
|
-
|
41
|
-
&#{$infix} {
|
42
|
-
@include media-breakpoint-down($next) {
|
43
|
-
border: var(--bl-facets-smallish-border);
|
44
|
-
padding: var(--bl-facets-smallish-padding);
|
45
|
-
margin-bottom: var(--bl-facets-smallish-margin-bottom);
|
46
|
-
border-radius: var(--bl-facets-smallish-border-radius);
|
47
|
-
}
|
48
|
-
@include media-breakpoint-up($next) {
|
49
|
-
// scss-lint:disable ImportantRule
|
50
|
-
.facets-collapse {
|
51
|
-
display: block !important;
|
52
|
-
width: 100%;
|
53
|
-
}
|
54
|
-
// scss-lint:enable ImportantRule
|
55
|
-
|
56
|
-
.navbar-toggler {
|
57
|
-
display: none;
|
58
|
-
}
|
59
|
-
}
|
60
|
-
}
|
61
|
-
}
|
62
|
-
}
|
63
|
-
|
64
29
|
.no-js {
|
65
30
|
@include media-breakpoint-down(lg) {
|
66
31
|
#sidebar {
|
@@ -88,49 +53,25 @@
|
|
88
53
|
.facets-header {
|
89
54
|
display: flex;
|
90
55
|
justify-content: space-between;
|
91
|
-
padding-
|
92
|
-
padding-top: 0.5rem;
|
56
|
+
padding-block: var(--bl-facet-header-padding-y);
|
93
57
|
}
|
94
58
|
|
95
59
|
.facets-heading {
|
96
|
-
@extend .h4;
|
97
60
|
line-height: inherit;
|
98
61
|
}
|
99
62
|
|
100
63
|
.facet-limit {
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
padding: var(--bl-facet-limit-body-padding);
|
105
|
-
}
|
106
|
-
|
107
|
-
/* Provide a focus ring on the expand/collapse button */
|
108
|
-
.btn {
|
109
|
-
--bs-btn-focus-shadow-rgb: 50, 50, 50;
|
110
|
-
&:focus-visible {
|
111
|
-
border-color: var(--bs-btn-hover-border-color);
|
112
|
-
outline: 0;
|
113
|
-
box-shadow: var(--bs-btn-focus-box-shadow);
|
114
|
-
}
|
115
|
-
}
|
64
|
+
--bs-accordion-btn-bg: var(--bs-gray-100);
|
65
|
+
--bs-btn-hover-bg: var(--bs-gray-200);
|
66
|
+
--bs-accordion-active-bg: var(--bs-accordion-btn-bg);
|
116
67
|
}
|
117
68
|
|
118
69
|
.facet-limit-active {
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
.btn {
|
125
|
-
@if function-exists(color-contrast) {
|
126
|
-
color: color-contrast($facet-active-bg);
|
127
|
-
}
|
128
|
-
|
129
|
-
@if function-exists(color-yiq) {
|
130
|
-
color: color-yiq($facet-active-bg);
|
131
|
-
}
|
132
|
-
}
|
133
|
-
}
|
70
|
+
--bs-accordion-btn-bg: var(--bl-facet-active-bg);
|
71
|
+
--bs-btn-hover-bg: var(--bs-accordion-btn-bg);
|
72
|
+
--bs-accordion-btn-color: var(--bs-light);
|
73
|
+
--bs-btn-hover-color: var(--bs-accordion-btn-color);
|
74
|
+
--bs-accordion-active-color: var(--bs-accordion-btn-color);
|
134
75
|
}
|
135
76
|
|
136
77
|
.facet-values {
|
@@ -145,7 +86,7 @@
|
|
145
86
|
align-items: flex-start;
|
146
87
|
padding: 3px 0;
|
147
88
|
|
148
|
-
|
89
|
+
&.treeitem {
|
149
90
|
display: block;
|
150
91
|
}
|
151
92
|
|
@@ -161,7 +102,7 @@
|
|
161
102
|
text-decoration: none;
|
162
103
|
|
163
104
|
&:hover {
|
164
|
-
color:
|
105
|
+
color: var(--bl-facet-remove-hover-color);
|
165
106
|
text-decoration: none;
|
166
107
|
}
|
167
108
|
}
|
@@ -194,8 +135,6 @@
|
|
194
135
|
}
|
195
136
|
|
196
137
|
.facet-field-heading {
|
197
|
-
@extend .h6;
|
198
|
-
|
199
138
|
a {
|
200
139
|
color: inherit;
|
201
140
|
}
|
@@ -207,12 +146,6 @@
|
|
207
146
|
/* Sidenav
|
208
147
|
-------------------------------------------------- */
|
209
148
|
|
210
|
-
.facet-pagination {
|
211
|
-
&.top {
|
212
|
-
padding: $modal-inner-padding;
|
213
|
-
}
|
214
|
-
}
|
215
|
-
|
216
149
|
.pivot-facet {
|
217
150
|
&.show {
|
218
151
|
display: flex;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
.group-key {
|
2
|
-
border-
|
2
|
+
--bl-border-color: var(--bs-gray-600);
|
3
|
+
border-bottom: 1px solid var(--bl-border-color);
|
3
4
|
clear: right;
|
4
5
|
}
|
5
6
|
|
@@ -8,7 +9,3 @@
|
|
8
9
|
border-bottom: 0;
|
9
10
|
}
|
10
11
|
}
|
11
|
-
|
12
|
-
.more-in-group {
|
13
|
-
float: right;
|
14
|
-
}
|
@@ -4,15 +4,13 @@
|
|
4
4
|
|
5
5
|
.navbar-logo {
|
6
6
|
/* The main logo image for the Blacklight instance */
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
}
|
11
|
-
height: $logo-height;
|
7
|
+
background: transparent var(--bl-logo-image) no-repeat top left;
|
8
|
+
background-size: var(--bl-logo-width) var(--bl-logo-height);
|
9
|
+
height: var(--bl-logo-height);
|
12
10
|
overflow: hidden;
|
13
11
|
text-indent: 100%;
|
14
12
|
white-space: nowrap;
|
15
|
-
width:
|
13
|
+
width: var(--bl-logo-width);
|
16
14
|
}
|
17
15
|
|
18
16
|
.navbar-search {
|
@@ -26,9 +24,4 @@
|
|
26
24
|
// This prevents the widget from being squished so the text overflows
|
27
25
|
min-width: 7em;
|
28
26
|
}
|
29
|
-
|
30
|
-
.search-query-form {
|
31
|
-
@extend .col-md-12;
|
32
|
-
@extend .col-lg-8;
|
33
|
-
}
|
34
27
|
}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
.modal-content {
|
6
6
|
.facet-pagination.top {
|
7
|
-
|
7
|
+
display: none; /* Doesn't display in a modal, but would display on a new page (e.g. without Javascript) */
|
8
8
|
}
|
9
9
|
|
10
10
|
.page-sidebar {
|
@@ -23,5 +23,5 @@
|
|
23
23
|
// app/views/catalog/facet.html.erb may be rendered as a modal or a whole page.
|
24
24
|
// When it's a whole page, don't show the close button.
|
25
25
|
.blacklight-modal-close {
|
26
|
-
|
26
|
+
display: none;
|
27
27
|
}
|
@@ -5,28 +5,14 @@
|
|
5
5
|
|
6
6
|
.document {
|
7
7
|
display: flex;
|
8
|
-
border-bottom: 1px dotted
|
8
|
+
border-bottom: 1px dotted var(--bs-border-color);
|
9
9
|
margin-top: var(--bl-results-document-margin-top);
|
10
10
|
padding-top: var(--bl-results-document-padding-top);
|
11
11
|
|
12
|
-
.document-title-heading {
|
13
|
-
@extend h5;
|
14
|
-
}
|
15
|
-
|
16
12
|
.document-main-section {
|
17
13
|
flex-grow: 1;
|
18
14
|
}
|
19
15
|
|
20
|
-
// bookmarks checkbox on index, give it some
|
21
|
-
// lower margin when it collapses
|
22
|
-
.index-document-functions {
|
23
|
-
margin-bottom: ($spacer * 1.5);
|
24
|
-
|
25
|
-
@media (min-width: breakpoint-min(sm)) {
|
26
|
-
margin-bottom: 0;
|
27
|
-
}
|
28
|
-
}
|
29
|
-
|
30
16
|
.document-thumbnail {
|
31
17
|
flex-grow: 0;
|
32
18
|
margin-bottom: ($spacer * 3);
|
@@ -1,18 +1,13 @@
|
|
1
|
-
/* Warning! If you want to change these, just copy them into your own theme css. But you want to remove the !default, which only will set them if not already set. */
|
2
|
-
|
3
|
-
$logo-image: image_url("blacklight/logo.png") !default;
|
4
|
-
$logo-width: 150px !default;
|
5
|
-
$logo-height: 50px !default;
|
6
|
-
|
7
|
-
$facet-active-border: $success !default;
|
8
|
-
$facet-active-bg: $success !default;
|
9
|
-
$facet-active-item-color: $success !default;
|
10
|
-
|
11
|
-
/* for compatability with BS < 5.3 */
|
12
|
-
$body-secondary-color: rgba($body-color, 0.75) !default;
|
13
|
-
|
14
1
|
:root {
|
15
|
-
--
|
2
|
+
--bl-logo-image: url("blacklight/logo.png");
|
3
|
+
--bl-logo-width: 150px;
|
4
|
+
--bl-logo-height: 50px;
|
5
|
+
--bs-secondary-color: rgba(
|
6
|
+
33,
|
7
|
+
37,
|
8
|
+
41,
|
9
|
+
0.75
|
10
|
+
); /* for compatability with BS < 5.3 */
|
16
11
|
|
17
12
|
--bl-main-padding-y: 0.5rem;
|
18
13
|
|
@@ -24,7 +24,7 @@ module Blacklight
|
|
24
24
|
|
25
25
|
def default_operator_menu
|
26
26
|
options_with_labels = [:must, :should].index_by { |op| t(op, scope: 'blacklight.advanced_search.op') }
|
27
|
-
label_tag(:op, t('blacklight.advanced_search.op.label'), class: '
|
27
|
+
label_tag(:op, t('blacklight.advanced_search.op.label'), class: 'visually-hidden') + select_tag(:op, options_for_select(options_with_labels, params[:op]), class: 'input-small')
|
28
28
|
end
|
29
29
|
|
30
30
|
def sort_fields_select
|
@@ -4,7 +4,7 @@ module Blacklight
|
|
4
4
|
class ConstraintComponent < Blacklight::Component
|
5
5
|
with_collection_parameter :facet_item_presenter
|
6
6
|
|
7
|
-
def initialize(facet_item_presenter:, classes:
|
7
|
+
def initialize(facet_item_presenter:, classes: %w[filter mx-1], layout: Blacklight::ConstraintLayoutComponent)
|
8
8
|
@facet_item_presenter = facet_item_presenter
|
9
9
|
@classes = classes
|
10
10
|
@layout = layout
|
@@ -9,8 +9,8 @@
|
|
9
9
|
</span>
|
10
10
|
<% if @remove_path.present? %>
|
11
11
|
<%= link_to(@remove_path, class: 'btn btn-outline-secondary remove') do %>
|
12
|
-
<%= render Blacklight::Icons::RemoveComponent.new %>
|
13
|
-
<span class="
|
12
|
+
<%= render Blacklight::Icons::RemoveComponent.new(aria_hidden: true) %>
|
13
|
+
<span class="visually-hidden"><%= remove_aria_label %></span>
|
14
14
|
<% end %>
|
15
15
|
<% end %>
|
16
16
|
</span>
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<%= content_tag @tag || :div, id: @id, class: @classes do %>
|
2
2
|
<% if @render_headers %>
|
3
|
-
<h2 class="
|
3
|
+
<h2 class="visually-hidden"><%= t('blacklight.search.search_constraints_header') %></h2>
|
4
4
|
<% end %>
|
5
5
|
|
6
6
|
<%= render @start_over_component.new if @start_over_component %>
|
7
7
|
|
8
8
|
<% if @render_headers %>
|
9
|
-
<span class="constraints-label
|
9
|
+
<span class="constraints-label visually-hidden"><%= t('blacklight.search.filters.title') %></span>
|
10
10
|
<% end %>
|
11
11
|
<% if query_constraints_area.present? %>
|
12
12
|
<% query_constraints_area.each do |constraint| %>
|
@@ -20,7 +20,7 @@ module Blacklight
|
|
20
20
|
def initialize(search_state:,
|
21
21
|
tag: :div,
|
22
22
|
render_headers: true,
|
23
|
-
id: 'appliedParams', classes: 'clearfix constraints-container',
|
23
|
+
id: 'appliedParams', classes: 'clearfix constraints-container mb-2',
|
24
24
|
query_constraint_component: Blacklight::ConstraintLayoutComponent,
|
25
25
|
query_constraint_component_options: {},
|
26
26
|
facet_constraint_component: Blacklight::ConstraintComponent,
|
@@ -8,9 +8,9 @@
|
|
8
8
|
absent: t('blacklight.search.bookmarks.absent'),
|
9
9
|
inprogress: t('blacklight.search.bookmarks.inprogress')
|
10
10
|
}) do %>
|
11
|
-
<div class="
|
12
|
-
<label class="toggle-bookmark" data-checkboxsubmit-target="label">
|
13
|
-
<input type="checkbox" class="toggle-bookmark <%= bookmark_icon ? 'd-none' : '' %>" data-checkboxsubmit-target="checkbox" <%= 'checked="checked"' if bookmarked? %>>
|
11
|
+
<div class="toggle-bookmark">
|
12
|
+
<label class="toggle-bookmark-label" data-checkboxsubmit-target="label">
|
13
|
+
<input type="checkbox" class="toggle-bookmark-input <%= bookmark_icon ? 'd-none' : '' %>" data-checkboxsubmit-target="checkbox" <%= 'checked="checked"' if bookmarked? %>>
|
14
14
|
<%= bookmark_icon %>
|
15
15
|
<span data-checkboxsubmit-target="span"><%= bookmarked? ? t('blacklight.search.bookmarks.present') : t('blacklight.search.bookmarks.absent') %></span>
|
16
16
|
</label>
|
@@ -4,6 +4,6 @@
|
|
4
4
|
<%= grouped_documents %>
|
5
5
|
</div>
|
6
6
|
<%- if @group_limit > 0 && @group.total > @group_limit %>
|
7
|
-
<%= helpers.link_to t('blacklight.search.group.more'), add_group_facet_params_and_redirect(@group), class: 'more-in-group' %>
|
7
|
+
<%= helpers.link_to t('blacklight.search.group.more'), add_group_facet_params_and_redirect(@group), class: 'more-in-group float-right' %>
|
8
8
|
<%- end %>
|
9
9
|
</div>
|
@@ -40,7 +40,7 @@ module Blacklight
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def header_container_classes
|
43
|
-
has_header_tools? ? 'row pagination-search-widgets pb-
|
43
|
+
has_header_tools? ? 'row pagination-search-widgets pb-3' : 'pagination-search-widgets pb-3'
|
44
44
|
end
|
45
45
|
|
46
46
|
def header_actions
|
@@ -16,12 +16,12 @@ module Blacklight
|
|
16
16
|
|
17
17
|
private
|
18
18
|
|
19
|
-
def
|
20
|
-
blacklight_config.view_config(:show).show_tools_component
|
21
|
-
|
22
|
-
end
|
19
|
+
def show_tools_component_class
|
20
|
+
blacklight_config.view_config(:show).show_tools_component
|
21
|
+
end
|
23
22
|
|
24
|
-
|
23
|
+
def render_show_tools
|
24
|
+
render show_tools_component_class.new(document: document)
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
@@ -22,9 +22,6 @@ module Blacklight
|
|
22
22
|
class DocumentComponent < Blacklight::Component
|
23
23
|
with_collection_parameter :document
|
24
24
|
|
25
|
-
# ViewComponent 3 changes iteration counters to begin at 0 rather than 1
|
26
|
-
COLLECTION_INDEX_OFFSET = ViewComponent::VERSION::MAJOR < 3 ? 0 : 1
|
27
|
-
|
28
25
|
# Content appearing before the document
|
29
26
|
renders_one :header
|
30
27
|
|
@@ -37,7 +34,7 @@ module Blacklight
|
|
37
34
|
|
38
35
|
# The document title with some reasonable default behavior
|
39
36
|
renders_one :title, (lambda do |*args, component: nil, **kwargs|
|
40
|
-
component ||=
|
37
|
+
component ||= view_config.title_component || Blacklight::DocumentTitleComponent
|
41
38
|
|
42
39
|
component.new(*args, counter: @counter, document: @document, presenter: @presenter, as: @title_component, actions: !@show, link_to_document: !@show, document_component: self, **kwargs)
|
43
40
|
end)
|
@@ -45,7 +42,7 @@ module Blacklight
|
|
45
42
|
renders_one :embed, (lambda do |static_content = nil, *args, component: nil, **kwargs|
|
46
43
|
next static_content if static_content.present?
|
47
44
|
|
48
|
-
component ||=
|
45
|
+
component ||= view_config.embed_component
|
49
46
|
|
50
47
|
next unless component
|
51
48
|
|
@@ -56,7 +53,7 @@ module Blacklight
|
|
56
53
|
renders_one :metadata, (lambda do |static_content = nil, *args, component: nil, fields: nil, **kwargs|
|
57
54
|
next static_content if static_content.present?
|
58
55
|
|
59
|
-
component ||=
|
56
|
+
component ||= view_config.metadata_component || Blacklight::DocumentMetadataComponent
|
60
57
|
|
61
58
|
component.new(*args, fields: fields || @presenter&.field_presenters || [], **kwargs)
|
62
59
|
end)
|
@@ -67,7 +64,7 @@ module Blacklight
|
|
67
64
|
renders_one :thumbnail, (lambda do |image_options_or_static_content = {}, *args, component: nil, **kwargs|
|
68
65
|
next image_options_or_static_content if image_options_or_static_content.is_a? String
|
69
66
|
|
70
|
-
component ||=
|
67
|
+
component ||= view_config.thumbnail_component || Blacklight::Document::ThumbnailComponent
|
71
68
|
|
72
69
|
component.new(*args, document: @document, presenter: @presenter, counter: @counter, image_options: image_options_or_static_content, **kwargs)
|
73
70
|
end)
|
@@ -81,7 +78,6 @@ module Blacklight
|
|
81
78
|
|
82
79
|
# rubocop:disable Metrics/ParameterLists
|
83
80
|
# @param document [Blacklight::DocumentPresenter]
|
84
|
-
# @param presenter [Blacklight::DocumentPresenter] alias for document
|
85
81
|
# @param partials [Array, nil] view partial names that should be used to provide content for the `partials` slot
|
86
82
|
# @param id [String] HTML id for the root element
|
87
83
|
# @param classes [Array, String] additional HTML classes for the root element
|
@@ -91,13 +87,11 @@ module Blacklight
|
|
91
87
|
# @param document_counter [Number, nil] provided by ViewComponent collection iteration
|
92
88
|
# @param counter_offset [Number] the offset of the start of the collection counter parameter for the component to the overall result set
|
93
89
|
# @param show [Boolean] are we showing only a single document (vs a list of search results); used for backwards-compatibility
|
94
|
-
def initialize(document: nil,
|
90
|
+
def initialize(document: nil, partials: nil,
|
95
91
|
id: nil, classes: [], component: :article, title_component: nil,
|
96
92
|
counter: nil, document_counter: nil, counter_offset: 0,
|
97
93
|
show: false, **args)
|
98
|
-
|
99
|
-
|
100
|
-
@presenter = presenter || document || args[self.class.collection_parameter]
|
94
|
+
@presenter = document || args[self.class.collection_parameter]
|
101
95
|
@document = @presenter.document
|
102
96
|
@view_partials = partials || []
|
103
97
|
|
@@ -108,7 +102,7 @@ module Blacklight
|
|
108
102
|
|
109
103
|
@counter = counter
|
110
104
|
@document_counter = document_counter || args.fetch(self.class.collection_counter_parameter, nil)
|
111
|
-
@counter ||=
|
105
|
+
@counter ||= 1 + @document_counter + counter_offset if @document_counter.present?
|
112
106
|
|
113
107
|
@show = show
|
114
108
|
end
|
@@ -139,6 +133,8 @@ module Blacklight
|
|
139
133
|
|
140
134
|
private
|
141
135
|
|
136
|
+
delegate :view_config, to: :@presenter
|
137
|
+
|
142
138
|
attr_reader :document_counter, :presenter, :view_partials
|
143
139
|
|
144
140
|
def show?
|
@@ -7,7 +7,8 @@ module Blacklight
|
|
7
7
|
renders_many :actions
|
8
8
|
|
9
9
|
# rubocop:disable Metrics/ParameterLists
|
10
|
-
def initialize(title = nil, document: nil, presenter: nil, as: :h3, counter: nil, classes: 'index_title document-title-heading col', link_to_document: true, document_component: nil,
|
10
|
+
def initialize(title = nil, document: nil, presenter: nil, as: :h3, counter: nil, classes: 'index_title document-title-heading col h5', link_to_document: true, document_component: nil,
|
11
|
+
actions: true)
|
11
12
|
raise ArgumentError, 'missing keyword: :document or :presenter' if presenter.nil? && document.nil?
|
12
13
|
|
13
14
|
@title = title
|
@@ -42,7 +43,7 @@ module Blacklight
|
|
42
43
|
|
43
44
|
(@has_actions_slot && get_slot(:actions)) ||
|
44
45
|
([@document_component&.actions] if @document_component&.actions.present?) ||
|
45
|
-
[helpers.render_index_doc_actions(presenter.document, wrapping_class: 'index-document-functions col-sm-3 col-lg-2')]
|
46
|
+
[helpers.render_index_doc_actions(presenter.document, wrapping_class: 'index-document-functions col-sm-3 col-lg-2 mb-4 mb-sm-0')]
|
46
47
|
end
|
47
48
|
|
48
49
|
def counter
|