blacklight 8.9.0 → 9.0.0.beta1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.env +3 -3
- data/.github/pull_request_template.md +7 -0
- data/.github/workflows/ruby.yml +1 -9
- data/.rubocop.yml +2 -2
- data/.rubocop_todo.yml +0 -9
- data/README.md +30 -8
- data/VERSION +1 -1
- data/app/assets/builds/blacklight.css +448 -0
- data/app/assets/javascripts/blacklight/blacklight.esm.js +5 -36
- data/app/assets/javascripts/blacklight/blacklight.esm.js.map +1 -1
- data/app/assets/javascripts/blacklight/blacklight.js +5 -36
- data/app/assets/javascripts/blacklight/blacklight.js.map +1 -1
- data/app/assets/stylesheets/blacklight/_balanced_list.scss +1 -4
- data/app/assets/stylesheets/blacklight/_blacklight_base.scss +1 -3
- data/app/assets/stylesheets/blacklight/_bookmark.scss +44 -41
- data/app/assets/stylesheets/blacklight/_bootstrap_overrides.scss +0 -29
- data/app/assets/stylesheets/blacklight/_constraints.scss +15 -24
- data/app/assets/stylesheets/blacklight/_controls.scss +2 -18
- data/app/assets/stylesheets/blacklight/_facets.scss +15 -82
- data/app/assets/stylesheets/blacklight/_group.scss +2 -5
- data/app/assets/stylesheets/blacklight/_header.scss +4 -11
- data/app/assets/stylesheets/blacklight/_icons.scss +0 -8
- data/app/assets/stylesheets/blacklight/_modal.scss +9 -10
- data/app/assets/stylesheets/blacklight/_pagination.scss +3 -5
- data/app/assets/stylesheets/blacklight/_search_form.scss +0 -1
- data/app/assets/stylesheets/blacklight/_search_history.scss +0 -4
- data/app/assets/stylesheets/blacklight/_search_results.scss +1 -15
- data/app/assets/stylesheets/blacklight/blacklight_defaults.scss +9 -17
- data/app/assets/stylesheets/blacklight/build.scss +4 -0
- data/app/components/blacklight/advanced_search_form_component.rb +1 -1
- data/app/components/blacklight/constraint_component.rb +1 -1
- data/app/components/blacklight/constraint_layout_component.html.erb +2 -2
- data/app/components/blacklight/constraints_component.html.erb +2 -2
- data/app/components/blacklight/constraints_component.rb +1 -1
- data/app/components/blacklight/document/action_component.rb +3 -1
- data/app/components/blacklight/document/bookmark_component.html.erb +3 -3
- data/app/components/blacklight/document/group_component.html.erb +1 -1
- data/app/components/blacklight/document/page_header_component.rb +1 -1
- data/app/components/blacklight/document/sidebar_component.rb +5 -5
- data/app/components/blacklight/document_component.rb +9 -13
- data/app/components/blacklight/document_title_component.rb +3 -2
- data/app/components/blacklight/facet_field_component.html.erb +5 -5
- data/app/components/blacklight/facet_field_list_component.rb +4 -22
- data/app/components/blacklight/facet_field_pagination_component.html.erb +2 -2
- data/app/components/blacklight/facet_item_component.rb +2 -2
- data/app/components/blacklight/facet_item_pivot_component.rb +2 -2
- data/app/components/blacklight/response/facet_group_component.html.erb +3 -18
- data/app/components/blacklight/response/facet_group_component.rb +7 -23
- data/app/components/blacklight/response/facet_toggle_button_component.html.erb +16 -0
- data/app/components/blacklight/response/facet_toggle_button_component.rb +14 -0
- data/app/components/blacklight/response/pagination_component.html.erb +1 -1
- data/app/components/blacklight/response/pagination_component.rb +2 -1
- data/app/components/blacklight/response/sort_component.rb +1 -0
- data/app/components/blacklight/response/view_type_button_component.html.erb +1 -1
- data/app/components/blacklight/response/view_type_component.html.erb +1 -1
- data/app/components/blacklight/search/facet_suggest_input.html.erb +7 -10
- data/app/components/blacklight/search/facet_suggest_input.rb +0 -4
- data/app/components/blacklight/search/per_page_component.html.erb +1 -1
- data/app/components/blacklight/search/per_page_component.rb +1 -0
- data/app/components/blacklight/search/sidebar_component.html.erb +1 -1
- data/app/components/blacklight/search/sidebar_component.rb +1 -1
- data/app/components/blacklight/search_bar_component.html.erb +3 -3
- data/app/components/blacklight/search_bar_component.rb +2 -2
- data/app/components/blacklight/search_button_component.rb +2 -2
- data/app/components/blacklight/search_context/server_applied_params_component.html.erb +2 -2
- data/app/components/blacklight/search_context/server_applied_params_component.rb +9 -0
- data/app/components/blacklight/skip_link_component.html.erb +1 -1
- data/app/components/blacklight/skip_link_component.rb +7 -3
- data/app/components/blacklight/skip_link_item_component.rb +18 -0
- data/app/components/blacklight/system/dropdown_component.html.erb +1 -1
- data/app/components/blacklight/system/dropdown_component.rb +1 -1
- data/app/components/blacklight/top_navbar_component.html.erb +1 -1
- data/app/controllers/concerns/blacklight/catalog.rb +3 -2
- data/app/controllers/concerns/blacklight/search_context.rb +0 -12
- data/app/helpers/blacklight/blacklight_helper_behavior.rb +0 -6
- data/app/helpers/blacklight/catalog_helper_behavior.rb +1 -11
- data/app/helpers/blacklight/configuration_helper_behavior.rb +0 -12
- data/app/helpers/blacklight/document_helper_behavior.rb +0 -26
- data/app/helpers/blacklight/icon_helper_behavior.rb +1 -9
- data/app/helpers/blacklight/layout_helper_behavior.rb +2 -2
- data/app/helpers/blacklight/render_partials_helper_behavior.rb +0 -14
- data/app/helpers/blacklight/url_helper_behavior.rb +1 -1
- data/app/javascript/{blacklight → blacklight-frontend}/bookmark_toggle.js +1 -1
- data/app/javascript/{blacklight → blacklight-frontend}/core.js +2 -10
- data/app/javascript/{blacklight → blacklight-frontend}/debounce.js +1 -1
- data/app/javascript/blacklight-frontend/facet_suggest.js +26 -0
- data/app/javascript/blacklight-frontend/index.js +18 -0
- data/app/javascript/{blacklight → blacklight-frontend}/modal.js +1 -2
- data/app/models/concerns/blacklight/document.rb +0 -11
- data/app/models/concerns/blacklight/user.rb +1 -1
- data/app/presenters/blacklight/facet_field_presenter.rb +2 -2
- data/app/presenters/blacklight/json_presenter.rb +3 -1
- data/app/services/blacklight/search_params_yaml_coder.rb +0 -2
- data/app/views/bookmarks/_clear_bookmarks_widget.html.erb +0 -2
- data/app/views/bookmarks/index.html.erb +1 -1
- data/app/views/catalog/_results_pagination.html.erb +2 -5
- data/app/views/catalog/_search_results.html.erb +4 -4
- data/app/views/catalog/_search_results_header.html.erb +1 -1
- data/app/views/catalog/_sort_and_per_page.html.erb +1 -1
- data/app/views/catalog/_sort_widget.html.erb +1 -0
- data/app/views/catalog/facet.html.erb +9 -9
- data/app/views/catalog/show.html.erb +2 -3
- data/app/views/kaminari/blacklight/_paginator.html.erb +1 -2
- data/app/views/layouts/blacklight/base.html.erb +3 -7
- data/app/views/search_history/index.html.erb +0 -2
- data/blacklight.gemspec +4 -4
- data/config/importmap.rb +1 -1
- data/config/locales/blacklight.ar.yml +4 -4
- data/config/locales/blacklight.ca.yml +124 -124
- data/config/locales/blacklight.de.yml +2 -2
- data/config/locales/blacklight.en.yml +14 -14
- data/config/locales/blacklight.es.yml +4 -4
- data/config/locales/blacklight.fr.yml +4 -4
- data/config/locales/blacklight.hu.yml +4 -4
- data/config/locales/blacklight.it.yml +3 -3
- data/config/locales/blacklight.nl.yml +3 -3
- data/config/locales/blacklight.pt-BR.yml +3 -3
- data/config/locales/blacklight.sq.yml +4 -4
- data/config/locales/blacklight.zh.yml +4 -4
- data/lib/blacklight/configuration/display_field.rb +1 -1
- data/lib/blacklight/configuration/fields.rb +3 -3
- data/lib/blacklight/configuration/view_config.rb +0 -2
- data/lib/blacklight/configuration.rb +7 -12
- data/lib/blacklight/engine.rb +0 -6
- data/lib/blacklight/open_struct_with_hash_access.rb +4 -4
- data/lib/blacklight/search_builder.rb +4 -4
- data/lib/blacklight/search_state/filter_field.rb +2 -2
- data/lib/blacklight/solr/request.rb +1 -7
- data/lib/blacklight/solr/response/group_response.rb +2 -2
- data/lib/blacklight.rb +1 -1
- data/lib/generators/blacklight/assets/importmap_generator.rb +8 -24
- data/lib/generators/blacklight/assets/propshaft_generator.rb +1 -1
- data/lib/generators/blacklight/assets_generator.rb +3 -3
- data/lib/generators/blacklight/controller_generator.rb +3 -3
- data/lib/generators/blacklight/user_generator.rb +9 -10
- data/package.json +14 -4
- data/rollup.config.js +1 -1
- data/spec/components/blacklight/document/action_component_spec.rb +1 -5
- data/spec/components/blacklight/document/sidebar_component_spec.rb +5 -20
- data/spec/components/blacklight/facet_field_checkboxes_component_spec.rb +2 -2
- data/spec/components/blacklight/facet_field_list_component_spec.rb +2 -2
- data/spec/components/blacklight/search/facet_suggest_input_spec.rb +3 -27
- data/spec/components/blacklight/search_bar_component_spec.rb +1 -1
- data/spec/controllers/catalog_controller_spec.rb +1 -1
- data/spec/features/axe_spec.rb +6 -11
- data/spec/features/bookmarks_spec.rb +48 -11
- data/spec/features/facets_spec.rb +22 -90
- data/spec/features/search_context_spec.rb +1 -2
- data/spec/features/search_filters_spec.rb +6 -6
- data/spec/helpers/blacklight/configuration_helper_behavior_spec.rb +0 -9
- data/spec/helpers/blacklight/render_partials_helper_behavior_spec.rb +1 -1
- data/spec/lib/blacklight/parameters_spec.rb +1 -12
- data/spec/lib/blacklight/search_state/filter_field_spec.rb +0 -18
- data/spec/models/blacklight/solr/request_spec.rb +7 -0
- data/spec/services/blacklight/search_service_spec.rb +1 -1
- data/spec/test_app_templates/Gemfile.extra +0 -1
- data/spec/views/catalog/_facet_layout.html.erb_spec.rb +3 -3
- data/spec/views/catalog/facet.html.erb_spec.rb +0 -8
- data/spec/views/catalog/index.html.erb_spec.rb +6 -3
- data/spec/views/catalog/show.html.erb_spec.rb +1 -0
- data/tasks/blacklight.rake +8 -5
- metadata +30 -59
- data/app/assets/stylesheets/blacklight/_autocomplete.scss +0 -25
- data/app/assets/stylesheets/blacklight/_mixins.scss +0 -20
- data/app/components/blacklight/icons/legacy_icon_component.rb +0 -30
- data/app/javascript/blacklight/facet_suggest.js +0 -48
- data/app/javascript/blacklight/index.js +0 -18
- data/app/views/catalog/_constraints.html.erb +0 -1
- data/app/views/catalog/_facets.html.erb +0 -5
- data/app/views/catalog/_search_form.html.erb +0 -7
- data/app/views/catalog/_search_header.html.erb +0 -1
- data/app/views/catalog/_show_sidebar.html.erb +0 -3
- data/app/views/catalog/_show_tools.html.erb +0 -2
- data/app/views/catalog/_start_over.html.erb +0 -1
- data/app/views/shared/_header_navbar.html.erb +0 -1
- data/lib/generators/blacklight/assets/sprockets_generator.rb +0 -68
- data/spec/components/blacklight/system/dropdown_component_spec.rb +0 -26
- data/spec/views/catalog/_search_header.erb_spec.rb +0 -14
- data/spec/views/catalog/_show_sidebar.erb_spec.rb +0 -24
- data/spec/views/catalog/_show_tools.html.erb_spec.rb +0 -37
- /data/app/javascript/{blacklight → blacklight-frontend}/button_focus.js +0 -0
- /data/app/javascript/{blacklight → blacklight-frontend}/checkbox_submit.js +0 -0
- /data/app/javascript/{blacklight → blacklight-frontend}/modalForm.js +0 -0
- /data/app/javascript/{blacklight → blacklight-frontend}/search_context.js +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4ffba1fbfab58e820f1953e4c0b1ff8d3bbcd57da645c10a44aa2f0a09f4a7a
|
4
|
+
data.tar.gz: 323b2afff4d4a8b308486ad81978b64f3a88aa8414e890ea5563bd3ae7820d0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d3bbad62d2d7ecfa2b19657d43dab0186e6a945dbd6093c120f2fa5ba833be91b78f75ccd73379008bfb20e199a44702ce49000ce5561203baae41029a5cd3f
|
7
|
+
data.tar.gz: 6a2837ca8deb3fd6650b947197d8dd5c5320631a339ac04a3e804aa1cc930050c50ed097f6fbff27ad3e50aab1c84b0bfe2817e91a466926dc0d0fd0202945b8
|
data/.env
CHANGED
data/.github/workflows/ruby.yml
CHANGED
@@ -57,18 +57,10 @@ jobs:
|
|
57
57
|
additional_name: "Solr 8.11.2"
|
58
58
|
- ruby: "3.1"
|
59
59
|
rails_version: "7.1.5.1"
|
60
|
-
- ruby: "3.
|
61
|
-
rails_version: "7.1.5.1"
|
62
|
-
view_component_version: "~> 2.74"
|
63
|
-
additional_name: "/ ViewComponent 2"
|
64
|
-
- ruby: "3.1"
|
60
|
+
- ruby: "3.3"
|
65
61
|
rails_version: "7.1.5.1"
|
66
62
|
additional_name: "/ Propshaft"
|
67
63
|
additional_engine_cart_rails_options: -a propshaft --css=bootstrap
|
68
|
-
- ruby: "3.1"
|
69
|
-
rails_version: "7.1.5.1"
|
70
|
-
bootstrap_version: "~> 4.0"
|
71
|
-
additional_name: "/ Bootstrap 4"
|
72
64
|
- ruby: "3.3"
|
73
65
|
rails_version: "7.1.5.1"
|
74
66
|
api: "true"
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -19,15 +19,6 @@ Capybara/VisibilityMatcher:
|
|
19
19
|
- 'spec/features/search_filters_spec.rb'
|
20
20
|
- 'spec/helpers/blacklight_helper_spec.rb'
|
21
21
|
|
22
|
-
# Offense count: 5
|
23
|
-
# This cop supports safe autocorrection (--autocorrect).
|
24
|
-
# Configuration parameters: EnforcedStyle.
|
25
|
-
# SupportedStyles: leading, trailing
|
26
|
-
Layout/LineContinuationLeadingSpace:
|
27
|
-
Exclude:
|
28
|
-
- 'lib/generators/blacklight/controller_generator.rb'
|
29
|
-
- 'lib/generators/blacklight/user_generator.rb'
|
30
|
-
|
31
22
|
# Offense count: 1
|
32
23
|
# This cop supports safe autocorrection (--autocorrect).
|
33
24
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
data/README.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|

|
4
4
|
|
5
|
+
## Branches
|
6
|
+
|
7
|
+
* The `main` branch is currently where we do new development for the upcoming 9.0 release.
|
8
|
+
* The `8.x` series is on the [release-8.x](https://github.com/projectblacklight/blacklight/tree/release-8.x) branch
|
9
|
+
* The `7.x` series is on the [release-7.x](https://github.com/projectblacklight/blacklight/tree/release-7.x) branch
|
10
|
+
* The `6.x` series is on the [release-6.x](https://github.com/projectblacklight/blacklight/tree/release-6.x) branch
|
11
|
+
|
12
|
+
## Description
|
5
13
|
|
6
14
|
Blacklight is an open source Solr user interface discovery platform.
|
7
15
|
You can use Blacklight to enable searching and browsing of your collections.
|
@@ -53,15 +61,29 @@ Code contributions are always welcome, instructions for contributing can be foun
|
|
53
61
|
You'll also want some information about how Blacklight expects [Apache Solr](http://lucene.apache.org/solr ) to run, which you can find in [Solr Configuration](https://github.com/projectblacklight/blacklight/wiki/Solr-Configuration#solr-configuration)
|
54
62
|
|
55
63
|
## Building the javascript
|
56
|
-
The javascript
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
64
|
+
The javascript includes some derivative combination files that are built at release time, that can be used by some javascript pipelines. The derivatives are placed at `app/assets/javascripts/blacklight`, and files there should not be edited by hand.
|
65
|
+
|
66
|
+
When any of the javascript components in the gem are changed, you may have to rebuild these derivative files.
|
67
|
+
|
68
|
+
|
61
69
|
1. [Install npm](https://www.npmjs.com/get-npm)
|
62
|
-
1. run `
|
63
|
-
|
64
|
-
|
70
|
+
1. run `bundle exec rake build:npm`
|
71
|
+
(just runs `npm install` to download dependencies and `npm run prepare` to build the bundle)
|
72
|
+
|
73
|
+
|
74
|
+
## Releasing versions
|
75
|
+
|
76
|
+
You always need to release both the rubygem and npm package simultaneously. For more information, see [wiki](https://github.com/projectblacklight/blacklight/wiki/How-to-release-a-version)
|
77
|
+
|
78
|
+
Summary of technical steps:
|
79
|
+
|
80
|
+
1. Make sure `./package.json` and `./VERSION` files have correct and matching versions.
|
81
|
+
1. Release ruby gem with `bundle exec rake release`
|
82
|
+
1. Release npm package
|
83
|
+
1. Build derivative products included in release with `bundle exec rake build:npm`
|
84
|
+
1. Publish with `npm publish`.
|
85
|
+
|
86
|
+
|
65
87
|
|
66
88
|
## Using the javascript
|
67
89
|
Blacklight ships with Javascript that can be compiled either by Webpacker or by
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
9.0.0.beta1
|
@@ -0,0 +1,448 @@
|
|
1
|
+
/* This is the default blacklight theme. */
|
2
|
+
/* This file is generated by Blacklight. You probably don't want to edit
|
3
|
+
this file directly, or you'll have to manually merge your changes if later
|
4
|
+
versions of Blacklight change this file. Instead, use your own CSS file
|
5
|
+
which over-rides things in this file. Or of course you can choose
|
6
|
+
not to use the Blacklight CSS file at all in your local app. */
|
7
|
+
:root {
|
8
|
+
--bl-logo-image: url("blacklight/logo.png");
|
9
|
+
--bl-logo-width: 150px;
|
10
|
+
--bl-logo-height: 50px;
|
11
|
+
--bs-secondary-color: rgba(
|
12
|
+
33,
|
13
|
+
37,
|
14
|
+
41,
|
15
|
+
0.75
|
16
|
+
); /* for compatability with BS < 5.3 */
|
17
|
+
--bl-main-padding-y: 0.5rem;
|
18
|
+
--bl-constraint-remove-hover-bg: #bb2d3b;
|
19
|
+
--bl-constraint-remove-hover-border-color: #bb2d3b;
|
20
|
+
--bl-field-name-color: var(--bs-secondary-color);
|
21
|
+
}
|
22
|
+
|
23
|
+
.page-link {
|
24
|
+
white-space: nowrap;
|
25
|
+
}
|
26
|
+
|
27
|
+
dialog.modal[open] {
|
28
|
+
display: block;
|
29
|
+
background: none;
|
30
|
+
border: none;
|
31
|
+
max-height: unset;
|
32
|
+
max-width: unset;
|
33
|
+
}
|
34
|
+
|
35
|
+
/* Generic layout stuff */
|
36
|
+
main {
|
37
|
+
padding-block: var(--bl-main-padding-y);
|
38
|
+
}
|
39
|
+
|
40
|
+
/*
|
41
|
+
Header bar at top (Bootstrap nav-bar)
|
42
|
+
*/
|
43
|
+
.navbar-logo {
|
44
|
+
/* The main logo image for the Blacklight instance */
|
45
|
+
background: transparent var(--bl-logo-image) no-repeat top left;
|
46
|
+
background-size: var(--bl-logo-width) var(--bl-logo-height);
|
47
|
+
height: var(--bl-logo-height);
|
48
|
+
overflow: hidden;
|
49
|
+
text-indent: 100%;
|
50
|
+
white-space: nowrap;
|
51
|
+
width: var(--bl-logo-width);
|
52
|
+
}
|
53
|
+
|
54
|
+
.navbar-search {
|
55
|
+
z-index: 1;
|
56
|
+
}
|
57
|
+
.navbar-search search {
|
58
|
+
display: contents;
|
59
|
+
}
|
60
|
+
.navbar-search .search-field {
|
61
|
+
min-width: 7em;
|
62
|
+
}
|
63
|
+
|
64
|
+
.constraints-container {
|
65
|
+
display: flex;
|
66
|
+
flex-wrap: wrap;
|
67
|
+
gap: 0.5rem 0.25rem;
|
68
|
+
}
|
69
|
+
|
70
|
+
.applied-filter {
|
71
|
+
--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");
|
72
|
+
}
|
73
|
+
.applied-filter .constraint-value {
|
74
|
+
cursor: default;
|
75
|
+
text-overflow: ellipsis;
|
76
|
+
overflow: hidden;
|
77
|
+
white-space: nowrap;
|
78
|
+
max-width: clamp(288px, 30vw, 500px);
|
79
|
+
}
|
80
|
+
.applied-filter .constraint-value .filter-name:after {
|
81
|
+
background-color: var(--bs-btn-color);
|
82
|
+
content: "";
|
83
|
+
mask: var(--separator-icon);
|
84
|
+
mask-repeat: no-repeat;
|
85
|
+
display: inline-block;
|
86
|
+
height: 1.1rem;
|
87
|
+
width: 1.25rem;
|
88
|
+
vertical-align: text-bottom;
|
89
|
+
margin-right: -0.2rem;
|
90
|
+
margin-left: 0.25rem;
|
91
|
+
transition: background-color 0.15s ease-in-out;
|
92
|
+
}
|
93
|
+
.applied-filter .remove {
|
94
|
+
--bs-btn-hover-bg: var(--bl-constraint-remove-hover-bg);
|
95
|
+
--bs-btn-hover-border-color: var(--bl-constraint-remove-hover-border-color);
|
96
|
+
--bs-btn-active-bg: var(--bl-constraint-remove-hover-bg);
|
97
|
+
--bs-btn-active-border-color: var(
|
98
|
+
--bl-constraint-remove-hover-border-color
|
99
|
+
);
|
100
|
+
}
|
101
|
+
|
102
|
+
.search-widgets {
|
103
|
+
display: flex;
|
104
|
+
}
|
105
|
+
|
106
|
+
.sort-pagination,
|
107
|
+
.pagination-search-widgets {
|
108
|
+
border-bottom: var(--bs-border-width) solid var(--bs-border-color);
|
109
|
+
}
|
110
|
+
|
111
|
+
.sort-pagination .dropdown-toggle {
|
112
|
+
cursor: pointer;
|
113
|
+
}
|
114
|
+
|
115
|
+
.no-js .btn-group:focus-within .dropdown-menu {
|
116
|
+
display: block; /* show menu when tabbing to it, without Javascript */
|
117
|
+
}
|
118
|
+
|
119
|
+
.view-type {
|
120
|
+
display: inline-block;
|
121
|
+
}
|
122
|
+
|
123
|
+
.modal_form {
|
124
|
+
margin-bottom: 0;
|
125
|
+
}
|
126
|
+
|
127
|
+
.input-group > .search-q {
|
128
|
+
flex-grow: 4;
|
129
|
+
}
|
130
|
+
|
131
|
+
.input-group > .search-autocomplete-wrapper {
|
132
|
+
display: inline-block;
|
133
|
+
flex-grow: 4;
|
134
|
+
padding: 0;
|
135
|
+
position: relative;
|
136
|
+
}
|
137
|
+
.input-group > .search-autocomplete-wrapper .search-q {
|
138
|
+
border: 0;
|
139
|
+
height: 100%;
|
140
|
+
width: 100%;
|
141
|
+
}
|
142
|
+
.input-group > .search-autocomplete-wrapper ul {
|
143
|
+
display: block;
|
144
|
+
}
|
145
|
+
|
146
|
+
.search-btn {
|
147
|
+
border-top-left-radius: 0;
|
148
|
+
border-bottom-left-radius: 0;
|
149
|
+
display: flex;
|
150
|
+
}
|
151
|
+
|
152
|
+
.search-field,
|
153
|
+
.search-q {
|
154
|
+
scroll-margin: 5rem;
|
155
|
+
}
|
156
|
+
|
157
|
+
.documents-list {
|
158
|
+
--bl-results-document-margin-top: 1rem;
|
159
|
+
--bl-results-document-padding-top: 1rem;
|
160
|
+
}
|
161
|
+
.documents-list .document {
|
162
|
+
display: flex;
|
163
|
+
border-bottom: 1px dotted var(--bs-border-color);
|
164
|
+
margin-top: var(--bl-results-document-margin-top);
|
165
|
+
padding-top: var(--bl-results-document-padding-top);
|
166
|
+
}
|
167
|
+
.documents-list .document .document-main-section {
|
168
|
+
flex-grow: 1;
|
169
|
+
}
|
170
|
+
.documents-list .document .document-thumbnail {
|
171
|
+
flex-grow: 0;
|
172
|
+
margin-bottom: 3rem;
|
173
|
+
padding-left: 3rem;
|
174
|
+
}
|
175
|
+
|
176
|
+
.page-links {
|
177
|
+
display: inline-block;
|
178
|
+
border: 1px solid transparent;
|
179
|
+
padding: 0.375rem 0.75rem;
|
180
|
+
padding-left: 0;
|
181
|
+
}
|
182
|
+
|
183
|
+
@media (max-width: 575.98px) {
|
184
|
+
.pagination {
|
185
|
+
flex-wrap: wrap;
|
186
|
+
}
|
187
|
+
}
|
188
|
+
|
189
|
+
.group-key {
|
190
|
+
--bl-border-color: var(--bs-gray-600);
|
191
|
+
border-bottom: 1px solid var(--bl-border-color);
|
192
|
+
clear: right;
|
193
|
+
}
|
194
|
+
|
195
|
+
.grouped-documents .document {
|
196
|
+
border-bottom: 0;
|
197
|
+
}
|
198
|
+
|
199
|
+
.bookmark-toggle {
|
200
|
+
--bl-icon-color: var(--bs-primary);
|
201
|
+
/* override for line 21.
|
202
|
+
Creates weird spacing in toolbar when min-width is set to 8rem */
|
203
|
+
}
|
204
|
+
.no-js .bookmark-toggle input[type=submit] {
|
205
|
+
display: inline;
|
206
|
+
}
|
207
|
+
.no-js .bookmark-toggle .toggle-bookmark {
|
208
|
+
display: none;
|
209
|
+
}
|
210
|
+
.bookmark-toggle input[type=submit] {
|
211
|
+
display: none;
|
212
|
+
}
|
213
|
+
.bookmark-toggle .toggle-bookmark {
|
214
|
+
cursor: pointer;
|
215
|
+
}
|
216
|
+
.bookmark-toggle .toggle-bookmark .toggle-bookmark-label {
|
217
|
+
font-weight: inherit;
|
218
|
+
min-width: 8.5em;
|
219
|
+
}
|
220
|
+
.bookmark-toggle .toggle-bookmark .toggle-bookmark-label .blacklight-icons svg {
|
221
|
+
height: 1.25rem;
|
222
|
+
width: 1.25rem;
|
223
|
+
overflow: visible;
|
224
|
+
fill: var(--bl-icon-color);
|
225
|
+
}
|
226
|
+
.bookmark-toggle .toggle-bookmark .toggle-bookmark-label .blacklight-icons svg.bookmark-checked {
|
227
|
+
display: none;
|
228
|
+
}
|
229
|
+
.bookmark-toggle .toggle-bookmark .toggle-bookmark-input:checked + span svg.bookmark-checked {
|
230
|
+
display: inherit;
|
231
|
+
}
|
232
|
+
.bookmark-toggle .toggle-bookmark .toggle-bookmark-input:checked + span svg.bookmark-unchecked {
|
233
|
+
display: none;
|
234
|
+
}
|
235
|
+
.bookmark-toggle .header-tools .toggle-bookmark-label {
|
236
|
+
min-width: 2rem;
|
237
|
+
}
|
238
|
+
|
239
|
+
.dl-invert dt {
|
240
|
+
font-weight: normal;
|
241
|
+
color: var(--bl-field-name-color);
|
242
|
+
}
|
243
|
+
@media (min-width: 768px) {
|
244
|
+
.dl-invert dt {
|
245
|
+
text-align: end;
|
246
|
+
}
|
247
|
+
}
|
248
|
+
|
249
|
+
.sidenav {
|
250
|
+
--bl-facet-active-bg: var(--bs-success);
|
251
|
+
--bl-facet-active-item-color: var(--bs-success);
|
252
|
+
--bl-facet-remove-color: var(--bs-secondary-color);
|
253
|
+
--bl-facet-remove-hover-color: var(--bs-danger);
|
254
|
+
--bl-facet-label-indent: -15px;
|
255
|
+
--bl-facet-label-padding-left: 15px;
|
256
|
+
--bl-facet-header-padding-y: 0.5rem;
|
257
|
+
}
|
258
|
+
.sidenav .facet-toggle-button [data-hide-label] {
|
259
|
+
display: inline;
|
260
|
+
}
|
261
|
+
.sidenav .facet-toggle-button [data-show-label] {
|
262
|
+
display: none;
|
263
|
+
}
|
264
|
+
.sidenav .facet-toggle-button[aria-expanded=false] [data-hide-label] {
|
265
|
+
display: none;
|
266
|
+
}
|
267
|
+
.sidenav .facet-toggle-button[aria-expanded=false] [data-show-label] {
|
268
|
+
display: inline;
|
269
|
+
}
|
270
|
+
|
271
|
+
@media (max-width: 991.98px) {
|
272
|
+
.no-js #sidebar {
|
273
|
+
order: 6 !important;
|
274
|
+
}
|
275
|
+
}
|
276
|
+
.no-js .facet-content.collapse {
|
277
|
+
display: block;
|
278
|
+
}
|
279
|
+
.no-js .facet-toggle-handle {
|
280
|
+
display: none;
|
281
|
+
}
|
282
|
+
.no-js .pivot-facet.collapse {
|
283
|
+
display: block;
|
284
|
+
}
|
285
|
+
.no-js .facets-collapse.collapse {
|
286
|
+
display: block;
|
287
|
+
}
|
288
|
+
|
289
|
+
.facets-header {
|
290
|
+
display: flex;
|
291
|
+
justify-content: space-between;
|
292
|
+
padding-block: var(--bl-facet-header-padding-y);
|
293
|
+
}
|
294
|
+
|
295
|
+
.facets-heading {
|
296
|
+
line-height: inherit;
|
297
|
+
}
|
298
|
+
|
299
|
+
.facet-limit {
|
300
|
+
--bs-accordion-btn-bg: var(--bs-gray-100);
|
301
|
+
--bs-btn-hover-bg: var(--bs-gray-200);
|
302
|
+
--bs-accordion-active-bg: var(--bs-accordion-btn-bg);
|
303
|
+
}
|
304
|
+
|
305
|
+
.facet-limit-active {
|
306
|
+
--bs-accordion-btn-bg: var(--bl-facet-active-bg);
|
307
|
+
--bs-btn-hover-bg: var(--bs-accordion-btn-bg);
|
308
|
+
--bs-accordion-btn-color: var(--bs-light);
|
309
|
+
--bs-btn-hover-color: var(--bs-accordion-btn-color);
|
310
|
+
--bs-accordion-active-color: var(--bs-accordion-btn-color);
|
311
|
+
}
|
312
|
+
|
313
|
+
.facet-values {
|
314
|
+
margin-bottom: 0;
|
315
|
+
}
|
316
|
+
.facet-values a {
|
317
|
+
text-decoration: none;
|
318
|
+
}
|
319
|
+
.facet-values li {
|
320
|
+
display: flex;
|
321
|
+
align-items: flex-start;
|
322
|
+
padding: 3px 0;
|
323
|
+
}
|
324
|
+
.facet-values li.treeitem {
|
325
|
+
display: block;
|
326
|
+
}
|
327
|
+
.facet-values li .selected {
|
328
|
+
color: var(--bl-facet-active-item-color);
|
329
|
+
}
|
330
|
+
.facet-values .remove {
|
331
|
+
color: var(--bl-facet-remove-color);
|
332
|
+
font-weight: bold;
|
333
|
+
padding-left: 0.5rem;
|
334
|
+
text-decoration: none;
|
335
|
+
}
|
336
|
+
.facet-values .remove:hover {
|
337
|
+
color: var(--bl-facet-remove-hover-color);
|
338
|
+
text-decoration: none;
|
339
|
+
}
|
340
|
+
.facet-values .facet-label {
|
341
|
+
hyphens: auto;
|
342
|
+
overflow-wrap: break-word;
|
343
|
+
padding-left: var(--bl-facet-label-padding-left);
|
344
|
+
padding-right: 1em;
|
345
|
+
text-indent: var(--bl-facet-label-indent);
|
346
|
+
}
|
347
|
+
.facet-values .facet-count {
|
348
|
+
margin-left: auto;
|
349
|
+
}
|
350
|
+
.facet-values .facet-checkbox {
|
351
|
+
width: 1.25rem;
|
352
|
+
}
|
353
|
+
|
354
|
+
.facet-extended-list .sort-options {
|
355
|
+
text-align: right;
|
356
|
+
}
|
357
|
+
.facet-extended-list .prev-next-links {
|
358
|
+
float: left;
|
359
|
+
}
|
360
|
+
|
361
|
+
.facet-field-heading {
|
362
|
+
/* This prevents the contained stretch link from covering the panel body */
|
363
|
+
position: relative;
|
364
|
+
}
|
365
|
+
.facet-field-heading a {
|
366
|
+
color: inherit;
|
367
|
+
}
|
368
|
+
|
369
|
+
/* Sidenav
|
370
|
+
-------------------------------------------------- */
|
371
|
+
.pivot-facet.show {
|
372
|
+
display: flex;
|
373
|
+
}
|
374
|
+
|
375
|
+
.facet-toggle-handle {
|
376
|
+
margin-block: 0;
|
377
|
+
padding-block: 0;
|
378
|
+
padding-inline: 0.5rem;
|
379
|
+
margin-inline-start: -0.75rem;
|
380
|
+
}
|
381
|
+
.pivot-facet .facet-toggle-handle {
|
382
|
+
margin-inline-start: -1.5rem;
|
383
|
+
}
|
384
|
+
.facet-toggle-handle.collapsed .show {
|
385
|
+
display: flex;
|
386
|
+
}
|
387
|
+
.facet-toggle-handle.collapsed .hide {
|
388
|
+
display: none;
|
389
|
+
}
|
390
|
+
.facet-toggle-handle .show {
|
391
|
+
display: none;
|
392
|
+
}
|
393
|
+
.facet-toggle-handle .hide {
|
394
|
+
display: flex;
|
395
|
+
}
|
396
|
+
.facet-toggle-handle .show .icon,
|
397
|
+
.facet-toggle-handle .hide .icon {
|
398
|
+
width: 1em;
|
399
|
+
height: 1em;
|
400
|
+
padding: 0.375rem 0.75rem;
|
401
|
+
}
|
402
|
+
.facet-toggle-handle .show .icon {
|
403
|
+
background: transparent url('data:image/svg+xml,%3csvg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-plus-square" viewBox="0 0 16 16"%3e%3cpath d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z" /%3e%3cpath d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z" /%3e%3c/svg%3e') center/1em auto no-repeat;
|
404
|
+
}
|
405
|
+
.facet-toggle-handle .hide .icon {
|
406
|
+
background: transparent url('data:image/svg+xml,%3csvg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-dash-square" viewBox="0 0 16 16"%3e%3cpath d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z" /%3e%3cpath d="M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z" /%3e%3c/svg%3e') center/1em auto no-repeat;
|
407
|
+
}
|
408
|
+
|
409
|
+
/* Search History */
|
410
|
+
.search-history {
|
411
|
+
--bl-history-filter-name-color: var(--bs-secondary-color);
|
412
|
+
}
|
413
|
+
.search-history td {
|
414
|
+
padding: 1rem;
|
415
|
+
}
|
416
|
+
.search-history .constraint {
|
417
|
+
padding-inline-end: 1rem;
|
418
|
+
display: block;
|
419
|
+
}
|
420
|
+
.search-history .filter-name {
|
421
|
+
color: var(--bl-history-filter-name-color);
|
422
|
+
}
|
423
|
+
|
424
|
+
.modal-dialog {
|
425
|
+
border-radius: 5px;
|
426
|
+
}
|
427
|
+
|
428
|
+
.modal-content .facet-pagination.top {
|
429
|
+
display: none; /* Doesn't display in a modal, but would display on a new page (e.g. without Javascript) */
|
430
|
+
}
|
431
|
+
.modal-content .page-sidebar {
|
432
|
+
display: none;
|
433
|
+
}
|
434
|
+
.modal-content .blacklight-modal-close {
|
435
|
+
display: block;
|
436
|
+
}
|
437
|
+
.modal-content .prev_next_links.btn-group .btn {
|
438
|
+
border: 0;
|
439
|
+
}
|
440
|
+
|
441
|
+
.blacklight-modal-close {
|
442
|
+
display: none;
|
443
|
+
}
|
444
|
+
|
445
|
+
.remove .bi {
|
446
|
+
height: 1em;
|
447
|
+
width: 1em;
|
448
|
+
}
|
@@ -115,7 +115,7 @@ document.addEventListener('click', ButtonFocus);
|
|
115
115
|
// const basicFunction = (entry) => console.log(entry)
|
116
116
|
// const debounced = debounce(basicFunction("I should only be called once"));
|
117
117
|
//
|
118
|
-
// debounced // does NOT print to the screen
|
118
|
+
// debounced // does NOT print to the screen becase it is invoked again less than 200 milliseconds later
|
119
119
|
// debounced // does print to the screen
|
120
120
|
// ```
|
121
121
|
function debounce(func, timeout = 200) {
|
@@ -130,22 +130,9 @@ const FacetSuggest = async (e) => {
|
|
130
130
|
if (e.target.matches('.facet-suggest')) {
|
131
131
|
const queryFragment = e.target.value?.trim();
|
132
132
|
const facetField = e.target.dataset.facetField;
|
133
|
-
const facetArea = document.querySelector('.facet-extended-list');
|
134
|
-
const prevNextLinks = document.querySelectorAll('.prev_next_links');
|
135
|
-
|
136
133
|
if (!facetField) { return; }
|
137
134
|
|
138
|
-
|
139
|
-
// can retain that context.
|
140
|
-
const facetSearchContext = e.target.dataset.facetSearchContext;
|
141
|
-
const url = new URL(facetSearchContext, window.location.origin);
|
142
|
-
|
143
|
-
// Drop facet.page so a filtered suggestion list will always start on page 1
|
144
|
-
url.searchParams.delete('facet.page');
|
145
|
-
const facetSearchParams = url.searchParams.toString();
|
146
|
-
|
147
|
-
const urlToFetch = `/catalog/facet_suggest/${facetField}/${queryFragment}?${facetSearchParams}`;
|
148
|
-
|
135
|
+
const urlToFetch = `/catalog/facet_suggest/${facetField}/${queryFragment}${window.location.search}`;
|
149
136
|
const response = await fetch(urlToFetch);
|
150
137
|
if (response.ok) {
|
151
138
|
const blob = await response.blob();
|
@@ -157,15 +144,6 @@ const FacetSuggest = async (e) => {
|
|
157
144
|
facetArea.innerHTML = text;
|
158
145
|
}
|
159
146
|
}
|
160
|
-
|
161
|
-
// Hide the prev/next links when a user enters text in the facet
|
162
|
-
// suggestion input. They don't work with a filtered list.
|
163
|
-
prevNextLinks.forEach(element => {
|
164
|
-
element.classList.toggle('invisible', !!queryFragment);
|
165
|
-
});
|
166
|
-
|
167
|
-
// Add a class to distinguish suggested facet values vs. regular.
|
168
|
-
facetArea.classList.toggle('facet-suggestions', !!queryFragment);
|
169
147
|
}
|
170
148
|
};
|
171
149
|
|
@@ -283,7 +261,7 @@ const Modal = (() => {
|
|
283
261
|
}
|
284
262
|
elements.forEach((el) => frag.appendChild(el));
|
285
263
|
modal.activateScripts(frag);
|
286
|
-
|
264
|
+
|
287
265
|
modal.target().querySelector('.modal-content').replaceChildren(frag);
|
288
266
|
|
289
267
|
// send custom event with the modal dialog div as the target
|
@@ -292,7 +270,6 @@ const Modal = (() => {
|
|
292
270
|
|
293
271
|
// if they did preventDefault, don't show the dialog
|
294
272
|
if (e.defaultPrevented) return;
|
295
|
-
|
296
273
|
modal.show();
|
297
274
|
};
|
298
275
|
|
@@ -508,14 +485,6 @@ const Core = function() {
|
|
508
485
|
const listeners = [];
|
509
486
|
if (typeof Turbo !== 'undefined') {
|
510
487
|
listeners.push('turbo:load', 'turbo:frame-load');
|
511
|
-
} else if (typeof Turbolinks !== 'undefined' && Turbolinks.supported) {
|
512
|
-
// Turbolinks 5
|
513
|
-
if (Turbolinks.BrowserAdapter) {
|
514
|
-
listeners.push('turbolinks:load');
|
515
|
-
} else {
|
516
|
-
// Turbolinks < 5
|
517
|
-
listeners.push('page:load', 'DOMContentLoaded');
|
518
|
-
}
|
519
488
|
} else {
|
520
489
|
listeners.push('DOMContentLoaded');
|
521
490
|
}
|
@@ -525,8 +494,8 @@ const Core = function() {
|
|
525
494
|
};
|
526
495
|
}();
|
527
496
|
|
528
|
-
//
|
529
|
-
// If app isn't using
|
497
|
+
// turbo triggers turbo:load events on page transition
|
498
|
+
// If app isn't using turbo, this event will never be triggered, no prob.
|
530
499
|
Core.listeners().forEach(function(listener) {
|
531
500
|
document.addEventListener(listener, function() {
|
532
501
|
Core.activate();
|