blacklight 9.0.0.beta2 → 9.0.0.beta4
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/.rubocop.yml +11 -1
- data/.rubocop_todo.yml +24 -25
- data/VERSION +1 -1
- data/app/assets/builds/blacklight.css +8 -7
- data/app/assets/javascripts/blacklight/blacklight.esm.js +13 -5
- data/app/assets/javascripts/blacklight/blacklight.esm.js.map +1 -1
- data/app/assets/javascripts/blacklight/blacklight.js +13 -5
- 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/_facets.scss +10 -2
- 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/document/bookmark_component.html.erb +2 -2
- data/app/components/blacklight/document_component.html.erb +3 -3
- data/app/components/blacklight/document_component.rb +2 -2
- data/app/components/blacklight/document_title_component.rb +3 -0
- data/app/components/blacklight/facet_field_checkboxes_component.rb +6 -2
- data/app/components/blacklight/facet_field_component.rb +6 -2
- data/app/components/blacklight/facet_field_filter_component.rb +6 -2
- data/app/components/blacklight/facet_field_inclusive_constraint_component.rb +6 -4
- data/app/components/blacklight/facet_field_list_component.rb +6 -2
- data/app/components/blacklight/facet_field_no_layout_component.rb +6 -2
- data/app/components/blacklight/facet_item_component.rb +6 -2
- data/app/components/blacklight/facet_item_pivot_component.rb +1 -1
- data/app/components/blacklight/facets/filters_component.html.erb +2 -2
- data/app/components/blacklight/facets/filters_component.rb +14 -2
- data/app/components/blacklight/facets/list_component.html.erb +3 -3
- data/app/components/blacklight/facets/list_component.rb +4 -1
- data/app/components/blacklight/facets/pivot_list_component.rb +11 -0
- data/app/components/blacklight/icons/remove_component.rb +2 -2
- data/app/components/blacklight/response/facet_group_component.html.erb +2 -2
- data/app/components/blacklight/response/facet_group_component.rb +6 -2
- 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/controllers/concerns/blacklight/bookmarks.rb +10 -0
- data/app/controllers/concerns/blacklight/catalog.rb +6 -2
- data/app/helpers/blacklight/catalog_helper_behavior.rb +1 -1
- data/app/javascript/blacklight-frontend/bookmark_toggle.js +7 -2
- data/app/javascript/blacklight-frontend/checkbox_submit.js +5 -1
- data/app/javascript/blacklight-frontend/modal.js +2 -3
- data/app/presenters/blacklight/json_presenter.rb +7 -1
- data/app/views/blacklight/nav/_bookmark.html.erb +1 -1
- data/app/views/catalog/facet.html.erb +1 -1
- data/config/locales/blacklight.ar.yml +12 -11
- data/config/locales/blacklight.ca.yml +1 -0
- data/config/locales/blacklight.de.yml +13 -12
- data/config/locales/blacklight.en.yml +1 -0
- data/config/locales/blacklight.es.yml +11 -10
- data/config/locales/blacklight.fr.yml +12 -11
- data/config/locales/blacklight.hu.yml +13 -12
- data/config/locales/blacklight.it.yml +13 -12
- data/config/locales/blacklight.nl.yml +12 -11
- data/config/locales/blacklight.pt-BR.yml +13 -12
- data/config/locales/blacklight.sq.yml +12 -11
- data/config/locales/blacklight.zh.yml +9 -8
- data/lib/blacklight/configuration/facet_field.rb +1 -0
- data/lib/blacklight/configuration.rb +7 -1
- data/lib/blacklight/solr/repository.rb +4 -1
- data/lib/blacklight.rb +5 -3
- data/lib/generators/blacklight/templates/catalog_controller.rb +2 -2
- data/package.json +1 -1
- data/spec/components/blacklight/facets/list_component_spec.rb +5 -0
- data/spec/components/blacklight/facets/pivot_list_component_spec.rb +43 -0
- data/spec/features/modal_spec.rb +1 -1
- data/spec/models/blacklight/configuration_spec.rb +20 -0
- data/spec/presenters/blacklight/json_presenter_spec.rb +17 -0
- metadata +6 -5
- data/app/assets/stylesheets/blacklight/_icons.scss +0 -4
- data/app/views/catalog/_facet_pivot.html.erb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a2d7cd9a5ef9918ebac26a976eebec7b82095a99ebd9bd2fba4a7d56b332bc7
|
4
|
+
data.tar.gz: faf0efa7c4c362a8c4e72150cef96cace1fbb864e38dd5067357dd4951759c30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11d857e37e4248c8fcb1415c47f78e7d659c512df05d6c56ccf9f4ee5d92978123345c315f42d6edca1d52db632edaf1c7d7804461b32c2d0276786973b8f85f
|
7
|
+
data.tar.gz: e78b5a075698fe4b2453e324a041499f61983b67d462b44a17dffe0eff7c4019b541fcbcc98839bdb2339a95a5b8097d8274d93847788df0869a84e2300e1578
|
data/.rubocop.yml
CHANGED
@@ -75,7 +75,7 @@ Naming/MethodParameterName:
|
|
75
75
|
- of
|
76
76
|
- by
|
77
77
|
|
78
|
-
Naming/
|
78
|
+
Naming/PredicatePrefix:
|
79
79
|
ForbiddenPrefixes:
|
80
80
|
- is_
|
81
81
|
|
@@ -653,3 +653,13 @@ Capybara/NegationMatcherAfterVisit: # new in 2.22
|
|
653
653
|
Enabled: true
|
654
654
|
RSpec/IncludeExamples: # new in 3.6
|
655
655
|
Enabled: true
|
656
|
+
Lint/UselessDefaultValueArgument: # new in 1.76
|
657
|
+
Enabled: true
|
658
|
+
Lint/UselessOr: # new in 1.76
|
659
|
+
Enabled: true
|
660
|
+
Naming/PredicateMethod: # new in 1.76
|
661
|
+
Enabled: true
|
662
|
+
Style/EmptyStringInsideInterpolation: # new in 1.76
|
663
|
+
Enabled: true
|
664
|
+
Style/RedundantArrayFlatten: # new in 1.76
|
665
|
+
Enabled: true
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2025-
|
3
|
+
# on 2025-07-01 15:50:17 UTC using RuboCop version 1.77.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
@@ -84,7 +84,7 @@ Lint/EmptyBlock:
|
|
84
84
|
- 'app/controllers/concerns/blacklight/bookmarks.rb'
|
85
85
|
- 'lib/blacklight/solr/search_builder_behavior.rb'
|
86
86
|
|
87
|
-
# Offense count:
|
87
|
+
# Offense count: 52
|
88
88
|
# Configuration parameters: AllowedParentClasses.
|
89
89
|
Lint/MissingSuper:
|
90
90
|
Enabled: false
|
@@ -102,7 +102,7 @@ Lint/ParenthesesAsGroupedExpression:
|
|
102
102
|
# Offense count: 81
|
103
103
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
104
104
|
Metrics/AbcSize:
|
105
|
-
Max:
|
105
|
+
Max: 43
|
106
106
|
|
107
107
|
# Offense count: 1
|
108
108
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
|
@@ -110,12 +110,12 @@ Metrics/AbcSize:
|
|
110
110
|
Metrics/BlockLength:
|
111
111
|
Max: 26
|
112
112
|
|
113
|
-
# Offense count:
|
113
|
+
# Offense count: 37
|
114
114
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
115
115
|
Metrics/CyclomaticComplexity:
|
116
116
|
Max: 13
|
117
117
|
|
118
|
-
# Offense count:
|
118
|
+
# Offense count: 81
|
119
119
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
120
120
|
Metrics/MethodLength:
|
121
121
|
Max: 27
|
@@ -123,14 +123,14 @@ Metrics/MethodLength:
|
|
123
123
|
# Offense count: 3
|
124
124
|
# Configuration parameters: CountComments, CountAsOne.
|
125
125
|
Metrics/ModuleLength:
|
126
|
-
Max:
|
126
|
+
Max: 115
|
127
127
|
|
128
128
|
# Offense count: 7
|
129
129
|
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
|
130
130
|
Metrics/ParameterLists:
|
131
131
|
Max: 6
|
132
132
|
|
133
|
-
# Offense count:
|
133
|
+
# Offense count: 30
|
134
134
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
135
135
|
Metrics/PerceivedComplexity:
|
136
136
|
Max: 14
|
@@ -173,13 +173,13 @@ RSpec/BeforeAfterAll:
|
|
173
173
|
- 'spec/models/blacklight/document/dublin_core_spec.rb'
|
174
174
|
- 'spec/models/blacklight/solr/document_spec.rb'
|
175
175
|
|
176
|
-
# Offense count:
|
176
|
+
# Offense count: 107
|
177
177
|
# Configuration parameters: Prefixes, AllowedPatterns.
|
178
178
|
# Prefixes: when, with, without
|
179
179
|
RSpec/ContextWording:
|
180
180
|
Enabled: false
|
181
181
|
|
182
|
-
# Offense count:
|
182
|
+
# Offense count: 143
|
183
183
|
# Configuration parameters: CountAsOne.
|
184
184
|
RSpec/ExampleLength:
|
185
185
|
Max: 33
|
@@ -189,7 +189,7 @@ RSpec/ExpectInHook:
|
|
189
189
|
Exclude:
|
190
190
|
- 'spec/controllers/catalog_controller_spec.rb'
|
191
191
|
|
192
|
-
# Offense count:
|
192
|
+
# Offense count: 107
|
193
193
|
# Configuration parameters: AssignmentOnly.
|
194
194
|
RSpec/InstanceVariable:
|
195
195
|
Exclude:
|
@@ -203,7 +203,6 @@ RSpec/InstanceVariable:
|
|
203
203
|
- 'spec/models/blacklight/solr/document_spec.rb'
|
204
204
|
- 'spec/models/record_mailer_spec.rb'
|
205
205
|
- 'spec/services/blacklight/search_service_spec.rb'
|
206
|
-
- 'spec/views/catalog/index.atom.builder_spec.rb'
|
207
206
|
|
208
207
|
# Offense count: 4
|
209
208
|
RSpec/IteratedExpectation:
|
@@ -244,22 +243,22 @@ RSpec/MessageSpies:
|
|
244
243
|
- 'spec/models/blacklight/suggest_search_spec.rb'
|
245
244
|
- 'spec/presenters/blacklight/field_presenter_spec.rb'
|
246
245
|
|
247
|
-
# Offense count:
|
246
|
+
# Offense count: 400
|
248
247
|
RSpec/MultipleExpectations:
|
249
248
|
Max: 16
|
250
249
|
|
251
|
-
# Offense count:
|
250
|
+
# Offense count: 292
|
252
251
|
# Configuration parameters: AllowSubject.
|
253
252
|
RSpec/MultipleMemoizedHelpers:
|
254
253
|
Max: 14
|
255
254
|
|
256
|
-
# Offense count:
|
255
|
+
# Offense count: 429
|
257
256
|
# Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
|
258
257
|
# SupportedStyles: always, named_only
|
259
258
|
RSpec/NamedSubject:
|
260
259
|
Enabled: false
|
261
260
|
|
262
|
-
# Offense count:
|
261
|
+
# Offense count: 71
|
263
262
|
# Configuration parameters: AllowedGroups.
|
264
263
|
RSpec/NestedGroups:
|
265
264
|
Max: 5
|
@@ -313,7 +312,7 @@ RSpec/SubjectStub:
|
|
313
312
|
- 'spec/presenters/blacklight/document_presenter_spec.rb'
|
314
313
|
- 'spec/services/blacklight/search_service_spec.rb'
|
315
314
|
|
316
|
-
# Offense count:
|
315
|
+
# Offense count: 80
|
317
316
|
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
|
318
317
|
RSpec/VerifiedDoubles:
|
319
318
|
Enabled: false
|
@@ -328,7 +327,7 @@ Rails/Date:
|
|
328
327
|
|
329
328
|
# Offense count: 17
|
330
329
|
# Configuration parameters: Include.
|
331
|
-
# Include: app/helpers/**/*.rb
|
330
|
+
# Include: **/app/helpers/**/*.rb
|
332
331
|
Rails/HelperInstanceVariable:
|
333
332
|
Exclude:
|
334
333
|
- 'app/helpers/blacklight/catalog_helper_behavior.rb'
|
@@ -349,12 +348,12 @@ Rails/OutputSafety:
|
|
349
348
|
Exclude:
|
350
349
|
- 'app/presenters/blacklight/rendering/join.rb'
|
351
350
|
|
352
|
-
# Offense count:
|
351
|
+
# Offense count: 11
|
353
352
|
Security/Eval:
|
354
353
|
Exclude:
|
355
354
|
- 'spec/models/blacklight/solr/response_spec.rb'
|
356
355
|
|
357
|
-
# Offense count:
|
356
|
+
# Offense count: 7
|
358
357
|
# This cop supports safe autocorrection (--autocorrect).
|
359
358
|
# Configuration parameters: EnforcedStyle.
|
360
359
|
# SupportedStyles: prefer_alias, prefer_alias_method
|
@@ -379,12 +378,12 @@ Style/BlockDelimiters:
|
|
379
378
|
- 'app/views/catalog/index.rss.builder'
|
380
379
|
- 'app/views/catalog/opensearch.xml.builder'
|
381
380
|
|
382
|
-
# Offense count:
|
381
|
+
# Offense count: 57
|
383
382
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
384
383
|
# Configuration parameters: EnforcedStyle, EnforcedStyleForClasses, EnforcedStyleForModules.
|
385
384
|
# SupportedStyles: nested, compact
|
386
|
-
# SupportedStylesForClasses:
|
387
|
-
# SupportedStylesForModules:
|
385
|
+
# SupportedStylesForClasses: ~, nested, compact
|
386
|
+
# SupportedStylesForModules: ~, nested, compact
|
388
387
|
Style/ClassAndModuleChildren:
|
389
388
|
Enabled: false
|
390
389
|
|
@@ -409,7 +408,7 @@ Style/DocumentDynamicEvalDefinition:
|
|
409
408
|
- 'app/builders/blacklight/action_builder.rb'
|
410
409
|
- 'lib/blacklight/configuration/fields.rb'
|
411
410
|
|
412
|
-
# Offense count:
|
411
|
+
# Offense count: 144
|
413
412
|
# Configuration parameters: AllowedConstants.
|
414
413
|
Style/Documentation:
|
415
414
|
Enabled: false
|
@@ -447,7 +446,7 @@ Style/GuardClause:
|
|
447
446
|
- 'app/helpers/blacklight/catalog_helper_behavior.rb'
|
448
447
|
- 'lib/blacklight/solr/search_builder_behavior.rb'
|
449
448
|
|
450
|
-
# Offense count:
|
449
|
+
# Offense count: 32
|
451
450
|
# This cop supports safe autocorrection (--autocorrect).
|
452
451
|
Style/IfUnlessModifier:
|
453
452
|
Enabled: false
|
@@ -537,7 +536,7 @@ Style/SoleNestedConditional:
|
|
537
536
|
Exclude:
|
538
537
|
- 'app/controllers/concerns/blacklight/controller.rb'
|
539
538
|
|
540
|
-
# Offense count:
|
539
|
+
# Offense count: 32
|
541
540
|
# This cop supports safe autocorrection (--autocorrect).
|
542
541
|
# Configuration parameters: MinSize.
|
543
542
|
# SupportedStyles: percent, brackets
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
9.0.0.
|
1
|
+
9.0.0.beta4
|
@@ -255,6 +255,7 @@ main {
|
|
255
255
|
|
256
256
|
.sidenav {
|
257
257
|
--bl-facet-active-bg: var(--bs-success);
|
258
|
+
--bl-facet-active-color: var(--bs-white);
|
258
259
|
--bl-facet-active-item-color: var(--bs-success);
|
259
260
|
--bl-facet-remove-color: var(--bs-secondary-color);
|
260
261
|
--bl-facet-remove-hover-color: var(--bs-danger);
|
@@ -306,16 +307,21 @@ main {
|
|
306
307
|
|
307
308
|
.facet-limit {
|
308
309
|
--bs-accordion-btn-bg: var(--bs-gray-100);
|
309
|
-
--bs-btn-
|
310
|
+
--bs-btn-active-bg: var(--bs-accordion-btn-bg);
|
311
|
+
--bs-btn-hover-bg: var(--bs-accordion-btn-bg);
|
310
312
|
--bs-accordion-active-bg: var(--bs-accordion-btn-bg);
|
311
313
|
}
|
312
314
|
|
313
315
|
.facet-limit-active {
|
314
316
|
--bs-accordion-btn-bg: var(--bl-facet-active-bg);
|
315
317
|
--bs-btn-hover-bg: var(--bs-accordion-btn-bg);
|
316
|
-
--bs-
|
318
|
+
--bs-btn-active-bg: var(--bl-facet-active-bg);
|
319
|
+
--bs-btn-active-color: var(--bl-facet-active-color);
|
320
|
+
--bs-accordion-btn-color: var(--bl-facet-active-color);
|
317
321
|
--bs-btn-hover-color: var(--bs-accordion-btn-color);
|
318
322
|
--bs-accordion-active-color: var(--bs-accordion-btn-color);
|
323
|
+
--bs-accordion-btn-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round'><path d='m2 5 6 6 6-6'/></svg>");
|
324
|
+
--bs-accordion-btn-active-icon: var(--bs-accordion-btn-icon);
|
319
325
|
}
|
320
326
|
|
321
327
|
.facet-values {
|
@@ -445,8 +451,3 @@ main {
|
|
445
451
|
padding-top: 1rem;
|
446
452
|
margin-top: 1rem;
|
447
453
|
}
|
448
|
-
|
449
|
-
.remove .bi {
|
450
|
-
height: 1em;
|
451
|
-
width: 1em;
|
452
|
-
}
|
@@ -43,6 +43,9 @@ class CheckboxSubmit {
|
|
43
43
|
this.bookmarksCounter().forEach(counter => {
|
44
44
|
counter.innerHTML = json.bookmarks.count;
|
45
45
|
});
|
46
|
+
|
47
|
+
var e = new CustomEvent('bookmark.blacklight', { detail: { checked: this.checked } });
|
48
|
+
window.dispatchEvent(e);
|
46
49
|
}).catch((error) => {
|
47
50
|
this.handleError(error);
|
48
51
|
});
|
@@ -77,7 +80,8 @@ class CheckboxSubmit {
|
|
77
80
|
}
|
78
81
|
|
79
82
|
updateStateFor(state) {
|
80
|
-
this.checkboxTarget.checked
|
83
|
+
if (state) { this.checkboxTarget.setAttribute('checked', state); }
|
84
|
+
else { this.checkboxTarget.removeAttribute('checked'); }
|
81
85
|
|
82
86
|
if (state) {
|
83
87
|
this.labelTarget.classList.add('checked');
|
@@ -94,13 +98,18 @@ class CheckboxSubmit {
|
|
94
98
|
}
|
95
99
|
|
96
100
|
const BookmarkToggle = (e) => {
|
97
|
-
|
101
|
+
const elementType = e.target.getAttribute('data-checkboxsubmit-target');
|
102
|
+
if (elementType == 'checkbox' || elementType == 'label') {
|
98
103
|
const form = e.target.closest('form');
|
99
104
|
if (form) new CheckboxSubmit(form).clicked(e);
|
105
|
+
if (e.code == 'Space') e.preventDefault();
|
100
106
|
}
|
101
107
|
};
|
102
108
|
|
103
109
|
document.addEventListener('click', BookmarkToggle);
|
110
|
+
document.addEventListener('keydown', function (e) {
|
111
|
+
if (e.key === 'Enter' || e.code == 'Space') { BookmarkToggle(e); } }
|
112
|
+
);
|
104
113
|
|
105
114
|
const ButtonFocus = (e) => {
|
106
115
|
// Button clicks should change focus. As of 10/3/19, Firefox for Mac and
|
@@ -255,8 +264,7 @@ const Modal = (() => {
|
|
255
264
|
|
256
265
|
const contents = `<div class="modal-header">
|
257
266
|
<div class="modal-title">There was a problem with your request.</div>
|
258
|
-
<button type="button" class="blacklight-modal-close btn-close
|
259
|
-
<span aria-hidden="true" class="visually-hidden">×</span>
|
267
|
+
<button type="button" class="blacklight-modal-close btn-close" data-bl-dismiss="modal" aria-label="Close">
|
260
268
|
</button>
|
261
269
|
</div>
|
262
270
|
<div class="modal-body">
|
@@ -309,7 +317,7 @@ const Modal = (() => {
|
|
309
317
|
modal.modalAjaxLinkClick = function(e) {
|
310
318
|
e.preventDefault();
|
311
319
|
const href = e.target.closest('a').getAttribute('href');
|
312
|
-
fetch(href)
|
320
|
+
fetch(href, { headers: { 'X-Requested-With': 'XMLHttpRequest' }})
|
313
321
|
.then(response => {
|
314
322
|
if (!response.ok) {
|
315
323
|
throw new TypeError("Request failed");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"blacklight.esm.js","sources":["../../../javascript/blacklight-frontend/checkbox_submit.js","../../../javascript/blacklight-frontend/bookmark_toggle.js","../../../javascript/blacklight-frontend/button_focus.js","../../../javascript/blacklight-frontend/debounce.js","../../../javascript/blacklight-frontend/facet_suggest.js","../../../javascript/blacklight-frontend/modal.js","../../../javascript/blacklight-frontend/search_context.js","../../../javascript/blacklight-frontend/core.js","../../../javascript/blacklight-frontend/index.js"],"sourcesContent":["/* Converts a \"toggle\" form, with single submit button to add/remove\n something, like used for Bookmarks, into an AJAXy checkbox instead.\n Apply to a form. Does require certain assumption about the form:\n 1) The same form 'action' href must be used for both ADD and REMOVE\n actions, with the different being the hidden input name=\"_method\"\n being set to \"put\" or \"delete\" -- that's the Rails method to pretend\n to be doing a certain HTTP verb. So same URL, PUT to add, DELETE\n to remove. This plugin assumes that.\n Plus, the form this is applied to should provide a data-doc-id\n attribute (HTML5-style doc-*) that contains the id/primary key\n of the object in question -- used by plugin for a unique value for\n DOM id's.\n Uses HTML for a checkbox compatible with Bootstrap 4.\n new CheckboxSubmit(document.querySelector('form.something')).render()\n*/\nexport default class CheckboxSubmit {\n constructor(form) {\n this.form = form\n }\n\n clicked(evt) {\n this.spanTarget.innerHTML = this.form.getAttribute('data-inprogress')\n this.labelTarget.setAttribute('disabled', 'disabled');\n this.checkboxTarget.setAttribute('disabled', 'disabled');\n fetch(this.formTarget.getAttribute('action'), {\n body: new FormData(this.formTarget),\n method: this.formTarget.getAttribute('method').toUpperCase(),\n headers: {\n 'Accept': 'application/json',\n 'X-Requested-With': 'XMLHttpRequest',\n 'X-CSRF-Token': document.querySelector('meta[name=csrf-token]')?.content\n }\n }).then((response) => {\n if (response.ok) return response.json();\n return Promise.reject('response was not ok')\n }).then((json) => {\n this.labelTarget.removeAttribute('disabled')\n this.checkboxTarget.removeAttribute('disabled')\n // For accessibility return keyboard focus \n // back to the checkbox after form submission\n this.checkboxTarget.focus()\n this.updateStateFor(!this.checked)\n this.bookmarksCounter().forEach(counter => {\n counter.innerHTML = json.bookmarks.count;\n });\n }).catch((error) => {\n this.handleError(error)\n })\n }\n\n get checked() {\n return (this.form.querySelectorAll('input[name=_method][value=delete]').length != 0)\n }\n\n get formTarget() {\n return this.form\n }\n\n get labelTarget() {\n return this.form.querySelector('[data-checkboxsubmit-target=\"label\"]')\n }\n\n get checkboxTarget() {\n return this.form.querySelector('[data-checkboxsubmit-target=\"checkbox\"]')\n }\n\n get spanTarget() {\n return this.form.querySelector('[data-checkboxsubmit-target=\"span\"]')\n }\n\n bookmarksCounter() {\n return document.querySelectorAll('[data-role=\"bookmark-counter\"]')\n }\n\n handleError() {\n alert(\"Unable to save the bookmark at this time.\")\n }\n\n updateStateFor(state) {\n this.checkboxTarget.checked = state\n\n if (state) {\n this.labelTarget.classList.add('checked')\n //Set the Rails hidden field that fakes an HTTP verb\n //properly for current state action.\n this.formTarget.querySelector('input[name=_method]').value = 'delete'\n this.spanTarget.innerHTML = this.form.getAttribute('data-present')\n } else {\n this.labelTarget.classList.remove('checked')\n this.formTarget.querySelector('input[name=_method]').value = 'put'\n this.spanTarget.innerHTML = this.form.getAttribute('data-absent')\n }\n }\n}\n","import CheckboxSubmit from 'blacklight-frontend/checkbox_submit'\n\nconst BookmarkToggle = (e) => {\n if (e.target.matches('[data-checkboxsubmit-target=\"checkbox\"]')) {\n const form = e.target.closest('form')\n if (form) new CheckboxSubmit(form).clicked(e);\n }\n};\n\ndocument.addEventListener('click', BookmarkToggle);\n\nexport default BookmarkToggle\n","const ButtonFocus = (e) => {\n // Button clicks should change focus. As of 10/3/19, Firefox for Mac and\n // Safari both do not set focus to a button on button click.\n // See https://zellwk.com/blog/inconsistent-button-behavior/ for background information\n if (e.target.matches('[data-toggle=\"collapse\"]') || e.target.matches('[data-bs-toggle=\"collapse\"]')) {\n e.target.focus()\n }\n}\n\ndocument.addEventListener('click', ButtonFocus)\n\nexport default ButtonFocus\n","// Usage:\n// ```\n// const basicFunction = (entry) => console.log(entry)\n// const debounced = debounce(basicFunction(\"I should only be called once\"));\n//\n// debounced // does NOT print to the screen because it is invoked again less than 200 milliseconds later\n// debounced // does print to the screen\n// ```\nexport default function debounce(func, timeout = 200) {\n let timer;\n return (...args) => {\n clearTimeout(timer);\n timer = setTimeout(() => { func.apply(this, args); }, timeout);\n };\n}\n","import debounce from \"blacklight-frontend/debounce\";\n\nconst FacetSuggest = async (e) => {\n if (e.target.matches('.facet-suggest')) {\n const queryFragment = e.target.value?.trim();\n const facetField = e.target.dataset.facetField;\n const facetArea = document.querySelector('.facet-extended-list');\n const prevNextLinks = document.querySelectorAll('.prev_next_links');\n\n if (!facetField) { return; }\n\n // Get the search params from the current query so the facet suggestions\n // can retain that context.\n const facetSearchContext = e.target.dataset.facetSearchContext;\n const url = new URL(facetSearchContext, window.location.origin);\n\n // Drop facet.page so a filtered suggestion list will always start on page 1\n url.searchParams.delete('facet.page');\n const facetSearchParams = url.searchParams.toString();\n\n const urlToFetch = `/catalog/facet_suggest/${facetField}/${queryFragment}?${facetSearchParams}`;\n\n const response = await fetch(urlToFetch);\n if (response.ok) {\n const blob = await response.blob()\n const text = await blob.text()\n\n if (text && facetArea) {\n facetArea.innerHTML = text\n }\n }\n\n // Hide the prev/next links when a user enters text in the facet\n // suggestion input. They don't work with a filtered list.\n prevNextLinks.forEach(element => {\n element.classList.toggle('invisible', !!queryFragment);\n });\n\n // Add a class to distinguish suggested facet values vs. regular.\n facetArea.classList.toggle('facet-suggestions', !!queryFragment);\n }\n};\n\ndocument.addEventListener('input', debounce(FacetSuggest));\n\nexport default FacetSuggest\n","/*\n The blacklight modal plugin can display some interactions inside a Bootstrap\n modal window, including some multi-page interactions.\n\n It supports unobtrusive Javascript, where a link or form that would have caused\n a new page load is changed to display it's results inside a modal dialog,\n by this plugin. The plugin assumes there is a Bootstrap modal div\n on the page with id #blacklight-modal to use as the modal -- the standard Blacklight\n layout provides this.\n\n To make a link or form have their results display inside a modal, add\n `data-blacklight-modal=\"trigger\"` to the link or form. (Note, form itself not submit input)\n With Rails link_to helper, you'd do that like:\n\n link_to something, link, data: { blacklight_modal: \"trigger\" }\n\n The results of the link href or form submit will be displayed inside\n a modal -- they should include the proper HTML markup for a bootstrap modal's\n contents. Also, you ordinarily won't want the Rails template with wrapping\n navigational elements to be used. The Rails controller could suppress\n the layout when a JS AJAX request is detected, OR the response\n can include a `<div data-blacklight-modal=\"container\">` -- only the contents\n of the container will be placed inside the modal, the rest of the\n page will be ignored.\n\n Link or forms inside the modal will ordinarily cause page loads\n when they are triggered. However, if you'd like their results\n to stay within the modal, just add `data-blacklight-modal=\"preserve\"`\n to the link or form.\n\n Here's an example of what might be returned, demonstrating most of the devices available:\n\n <div data-blacklight-modal=\"container\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close\" data-bl-dismiss=\"modal\" aria-hidden=\"true\">×</button>\n <h3 class=\"modal-title\">Request Placed</h3>\n </div>\n\n <div class=\"modal-body\">\n <p>Some message</p>\n <%= link_to \"This result will still be within modal\", some_link, data: { blacklight_modal: \"preserve\" } %>\n </div>\n\n\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-bl-dismiss=\"modal\">Close</button>\n </div>\n </div>\n\n\n One additional feature. If the content returned from the AJAX form submission\n can be a turbo-stream that defines some HTML fragementsand where on the page to put them:\n https://turbo.hotwired.dev/handbook/streams\n*/\n\nconst Modal = (() => {\n const modal = {}\n\n // a Bootstrap modal div that should be already on the page hidden\n modal.modalSelector = '#blacklight-modal';\n\n // Trigger selectors identify forms or hyperlinks that should open\n // inside a modal dialog.\n modal.triggerLinkSelector = 'a[data-blacklight-modal~=trigger]';\n\n // preserve selectors identify forms or hyperlinks that, if activated already\n // inside a modal dialog, should have destinations remain inside the modal -- but\n // won't trigger a modal if not already in one.\n //\n // No need to repeat selectors from trigger selectors, those will already\n // be preserved. MUST be manually prefixed with the modal selector,\n // so they only apply to things inside a modal.\n modal.preserveLinkSelector = modal.modalSelector + ' a[data-blacklight-modal~=preserve]';\n\n modal.containerSelector = '[data-blacklight-modal~=container]';\n\n // Called on fatal failure of ajax load, function returns content\n // to show to user in modal. Right now called only for network errors.\n modal.onFailure = function (error) {\n console.error('Server error:', this.url, error);\n\n const contents = `<div class=\"modal-header\">\n <div class=\"modal-title\">There was a problem with your request.</div>\n <button type=\"button\" class=\"blacklight-modal-close btn-close close\" data-bl-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\" class=\"visually-hidden\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <p>Expected a successful response from the server, but got an error</p>\n <pre>${this.url}\\n${error}</pre>\n </div>`\n\n modal.target().querySelector('.modal-content').innerHTML = contents\n\n modal.show();\n }\n\n // Add the passed in contents to the modal and display it.\n // We have specific handling so that scripts returned from the ajax call are executed.\n // This enables adding a script like recaptcha to prevent bots from sending emails.\n modal.receiveAjax = function (contents) {\n const domparser = new DOMParser();\n const dom = domparser.parseFromString(contents, \"text/html\")\n // If there is a containerSelector on the document, use its children.\n let elements = dom.querySelectorAll(`${modal.containerSelector} > *`)\n const frag = document.createDocumentFragment()\n if (elements.length == 0) {\n // If the containerSelector wasn't found, use the whole document\n elements = dom.body.childNodes\n }\n elements.forEach((el) => frag.appendChild(el))\n modal.activateScripts(frag)\n\n modal.target().querySelector('.modal-content').replaceChildren(frag)\n\n // send custom event with the modal dialog div as the target\n var e = new CustomEvent('loaded.blacklight.blacklight-modal', { bubbles: true, cancelable: true });\n modal.target().dispatchEvent(e)\n\n // if they did preventDefault, don't show the dialog\n if (e.defaultPrevented) return;\n modal.show();\n };\n\n // DOMParser doesn't allow scripts to be executed. This fixes that.\n modal.activateScripts = function (frag) {\n frag.querySelectorAll('script').forEach((script) => {\n const fixedScript = document.createElement('script')\n fixedScript.src = script.src\n fixedScript.async = false\n script.parentNode.replaceChild(fixedScript, script)\n })\n }\n\n modal.modalAjaxLinkClick = function(e) {\n e.preventDefault();\n const href = e.target.closest('a').getAttribute('href')\n fetch(href)\n .then(response => {\n if (!response.ok) {\n throw new TypeError(\"Request failed\");\n }\n return response.text();\n })\n .then(data => modal.receiveAjax(data))\n .catch(error => modal.onFailure(error))\n };\n\n modal.setupModal = function() {\n // Register several click handlers in ONE event handler for efficiency\n //\n // * close button OR click on backdrop (modal.modalSelector) closes modal\n // * trigger and preserve link in modal functionality -- if somethign matches both trigger and\n // preserve, still only called once.\n document.addEventListener('click', (e) => {\n if (e.target.closest(`${modal.triggerLinkSelector}, ${modal.preserveLinkSelector}`))\n modal.modalAjaxLinkClick(e)\n else if (e.target.matches(`${modal.modalSelector}`) || e.target.closest('[data-bl-dismiss=\"modal\"]'))\n modal.hide()\n })\n };\n\n modal.hide = function (el) {\n const dom = modal.target();\n\n if (!dom.open) return\n\n var e = new CustomEvent('hide.blacklight.blacklight-modal', { bubbles: true, cancelable: true });\n dom.dispatchEvent(e)\n\n dom.close()\n\n // Turn body scrolling back to what it was\n document.body.style[\"overflow\"] = modal.originalBodyOverflow;\n document.body.style[\"padding-right\"] = modal.originalBodyPaddingRight;\n modal.originalBodyOverflow = undefined;\n modal.originalBodyPaddingRight = undefined;\n }\n\n modal.show = function(el) {\n const dom = modal.target();\n\n if (dom.open) return\n\n var e = new CustomEvent('show.blacklight.blacklight-modal', { bubbles: true, cancelable: true });\n dom.dispatchEvent(e)\n\n dom.showModal()\n\n // Turn off body scrolling\n modal.originalBodyOverflow = document.body.style['overflow'];\n modal.originalBodyPaddingRight = document.body.style['padding-right'];\n document.body.style[\"overflow\"] = \"hidden\"\n document.body.style[\"padding-right\"] = \"0px\"\n }\n\n modal.target = function() {\n return document.querySelector(modal.modalSelector);\n }\n\n modal.setupModal()\n\n return modal;\n})()\n\nexport default Modal\n","const SearchContext = (e) => {\n const contextLink = e.target.closest('[data-context-href]')\n if (contextLink) {\n SearchContext.handleSearchContextMethod.call(contextLink, e)\n }\n}\n\nSearchContext.csrfToken = () => document.querySelector('meta[name=csrf-token]')?.content\nSearchContext.csrfParam = () => document.querySelector('meta[name=csrf-param]')?.content\n\n// this is the Rails.handleMethod with a couple adjustments, described inline:\n// first, we're attaching this directly to the event handler, so we can check for meta-keys\nSearchContext.handleSearchContextMethod = function(event) {\n const link = this\n\n // instead of using the normal href, we need to use the context href instead\n let href = link.getAttribute('data-context-href')\n let target = link.getAttribute('target')\n let csrfToken = SearchContext.csrfToken()\n let csrfParam = SearchContext.csrfParam()\n let form = document.createElement('form')\n form.method = 'post'\n form.action = href\n\n\n let formContent = `<input name=\"_method\" value=\"post\" type=\"hidden\" />\n <input name=\"redirect\" value=\"${link.getAttribute('href')}\" type=\"hidden\" />`\n\n // check for meta keys.. if set, we should open in a new tab\n if(event.metaKey || event.ctrlKey) {\n form.dataset.turbo = \"false\";\n target = '_blank';\n }\n\n if (csrfParam !== undefined && csrfToken !== undefined) {\n formContent += `<input name=\"${csrfParam}\" value=\"${csrfToken}\" type=\"hidden\" />`\n }\n\n // Must trigger submit by click on a button, else \"submit\" event handler won't work!\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit\n formContent += '<input type=\"submit\" />'\n\n if (target) { form.setAttribute('target', target); }\n\n form.style.display = 'none'\n form.innerHTML = formContent\n document.body.appendChild(form)\n form.querySelector('[type=\"submit\"]').click()\n\n event.preventDefault()\n};\n\ndocument.addEventListener('click', SearchContext)\n\nexport default SearchContext\n","const Core = function() {\n const buffer = new Array;\n return {\n onLoad: function(func) {\n buffer.push(func);\n },\n\n activate: function() {\n for(let i = 0; i < buffer.length; i++) {\n buffer[i].call();\n }\n },\n\n listeners: function () {\n const listeners = [];\n if (typeof Turbo !== 'undefined') {\n listeners.push('turbo:load', 'turbo:frame-load');\n } else {\n listeners.push('DOMContentLoaded');\n }\n\n return listeners;\n }\n };\n}();\n\n// turbo triggers turbo:load events on page transition\n// If app isn't using turbo, this event will never be triggered, no prob.\nCore.listeners().forEach(function(listener) {\n document.addEventListener(listener, function() {\n Core.activate()\n })\n})\n\nCore.onLoad(function () {\n const elem = document.querySelector('.no-js');\n\n // The \"no-js\" class may already have been removed because this function is\n // run on every turbo:load event, in that case, it won't find an element.\n if (!elem) return;\n\n elem.classList.remove('no-js')\n elem.classList.add('js')\n})\n\n\nexport default Core\n","import BookmarkToggle from 'blacklight-frontend/bookmark_toggle'\nimport ButtonFocus from 'blacklight-frontend/button_focus'\nimport FacetSuggest from 'blacklight-frontend/facet_suggest'\nimport Modal from 'blacklight-frontend/modal'\nimport SearchContext from 'blacklight-frontend/search_context'\nimport Core from 'blacklight-frontend/core'\n\nexport default {\n BookmarkToggle,\n ButtonFocus,\n FacetSuggest,\n Modal,\n SearchContext,\n Core,\n onLoad: Core.onLoad\n}\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,MAAM,cAAc,CAAC;AACpC,EAAE,WAAW,CAAC,IAAI,EAAE;AACpB,IAAI,IAAI,CAAC,IAAI,GAAG,KAAI;AACpB,GAAG;AACH;AACA,EAAE,OAAO,CAAC,GAAG,EAAE;AACf,IAAI,IAAI,CAAC,UAAU,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,CAAC;AACzB,OAAO;AACP,KAAK;AACL;AACA,IAAI,SAAS,EAAE,YAAY;AAC3B,MAAM,MAAM,SAAS,GAAG,EAAE,CAAC;AAC3B,MAAM,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;AACxC,QAAQ,SAAS,CAAC,IAAI,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAAC;AACzD,OAAO,MAAM;AACb,QAAQ,SAAS,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;AAC3C,OAAO;AACP;AACA,MAAM,OAAO,SAAS,CAAC;AACvB,KAAK;AACL,GAAG,CAAC;AACJ,CAAC,EAAE,CAAC;AACJ;AACA;AACA;AACA,IAAI,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,SAAS,QAAQ,EAAE;AAC5C,EAAE,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,WAAW;AACjD,IAAI,IAAI,CAAC,QAAQ,GAAE;AACnB,GAAG,EAAC;AACJ,CAAC,EAAC;AACF;AACA,IAAI,CAAC,MAAM,CAAC,YAAY;AACxB,EAAE,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;AAChD;AACA;AACA;AACA,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO;AACpB;AACA,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,EAAC;AAChC,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAC;AAC1B,CAAC;;ACpCD,cAAe;AACf,EAAE,cAAc;AAChB,EAAE,WAAW;AACb,EAAE,YAAY;AACd,EAAE,KAAK;AACP,EAAE,aAAa;AACf,EAAE,IAAI;AACN,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM;AACrB;;;;"}
|
1
|
+
{"version":3,"file":"blacklight.esm.js","sources":["../../../javascript/blacklight-frontend/checkbox_submit.js","../../../javascript/blacklight-frontend/bookmark_toggle.js","../../../javascript/blacklight-frontend/button_focus.js","../../../javascript/blacklight-frontend/debounce.js","../../../javascript/blacklight-frontend/facet_suggest.js","../../../javascript/blacklight-frontend/modal.js","../../../javascript/blacklight-frontend/search_context.js","../../../javascript/blacklight-frontend/core.js","../../../javascript/blacklight-frontend/index.js"],"sourcesContent":["/* Converts a \"toggle\" form, with single submit button to add/remove\n something, like used for Bookmarks, into an AJAXy checkbox instead.\n Apply to a form. Does require certain assumption about the form:\n 1) The same form 'action' href must be used for both ADD and REMOVE\n actions, with the different being the hidden input name=\"_method\"\n being set to \"put\" or \"delete\" -- that's the Rails method to pretend\n to be doing a certain HTTP verb. So same URL, PUT to add, DELETE\n to remove. This plugin assumes that.\n Plus, the form this is applied to should provide a data-doc-id\n attribute (HTML5-style doc-*) that contains the id/primary key\n of the object in question -- used by plugin for a unique value for\n DOM id's.\n Uses HTML for a checkbox compatible with Bootstrap 4.\n new CheckboxSubmit(document.querySelector('form.something')).render()\n*/\nexport default class CheckboxSubmit {\n constructor(form) {\n this.form = form\n }\n\n clicked(evt) {\n this.spanTarget.innerHTML = this.form.getAttribute('data-inprogress')\n this.labelTarget.setAttribute('disabled', 'disabled');\n this.checkboxTarget.setAttribute('disabled', 'disabled');\n fetch(this.formTarget.getAttribute('action'), {\n body: new FormData(this.formTarget),\n method: this.formTarget.getAttribute('method').toUpperCase(),\n headers: {\n 'Accept': 'application/json',\n 'X-Requested-With': 'XMLHttpRequest',\n 'X-CSRF-Token': document.querySelector('meta[name=csrf-token]')?.content\n }\n }).then((response) => {\n if (response.ok) return response.json();\n return Promise.reject('response was not ok')\n }).then((json) => {\n this.labelTarget.removeAttribute('disabled')\n this.checkboxTarget.removeAttribute('disabled')\n // For accessibility return keyboard focus \n // back to the checkbox after form submission\n this.checkboxTarget.focus()\n this.updateStateFor(!this.checked)\n this.bookmarksCounter().forEach(counter => {\n counter.innerHTML = json.bookmarks.count;\n });\n\n var e = new CustomEvent('bookmark.blacklight', { detail: { checked: this.checked } });\n window.dispatchEvent(e)\n }).catch((error) => {\n this.handleError(error)\n })\n }\n\n get checked() {\n return (this.form.querySelectorAll('input[name=_method][value=delete]').length != 0)\n }\n\n get formTarget() {\n return this.form\n }\n\n get labelTarget() {\n return this.form.querySelector('[data-checkboxsubmit-target=\"label\"]')\n }\n\n get checkboxTarget() {\n return this.form.querySelector('[data-checkboxsubmit-target=\"checkbox\"]')\n }\n\n get spanTarget() {\n return this.form.querySelector('[data-checkboxsubmit-target=\"span\"]')\n }\n\n bookmarksCounter() {\n return document.querySelectorAll('[data-role=\"bookmark-counter\"]')\n }\n\n handleError() {\n alert(\"Unable to save the bookmark at this time.\")\n }\n\n updateStateFor(state) {\n if (state) { this.checkboxTarget.setAttribute('checked', state) }\n else { this.checkboxTarget.removeAttribute('checked') }\n\n if (state) {\n this.labelTarget.classList.add('checked')\n //Set the Rails hidden field that fakes an HTTP verb\n //properly for current state action.\n this.formTarget.querySelector('input[name=_method]').value = 'delete'\n this.spanTarget.innerHTML = this.form.getAttribute('data-present')\n } else {\n this.labelTarget.classList.remove('checked')\n this.formTarget.querySelector('input[name=_method]').value = 'put'\n this.spanTarget.innerHTML = this.form.getAttribute('data-absent')\n }\n }\n}\n","import CheckboxSubmit from 'blacklight-frontend/checkbox_submit'\n\nconst BookmarkToggle = (e) => {\n const elementType = e.target.getAttribute('data-checkboxsubmit-target');\n if (elementType == 'checkbox' || elementType == 'label') {\n const form = e.target.closest('form');\n if (form) new CheckboxSubmit(form).clicked(e);\n if (e.code == 'Space') e.preventDefault();\n }\n};\n\ndocument.addEventListener('click', BookmarkToggle);\ndocument.addEventListener('keydown', function (e) {\n if (e.key === 'Enter' || e.code == 'Space') { BookmarkToggle(e); } }\n);\n\nexport default BookmarkToggle\n","const ButtonFocus = (e) => {\n // Button clicks should change focus. As of 10/3/19, Firefox for Mac and\n // Safari both do not set focus to a button on button click.\n // See https://zellwk.com/blog/inconsistent-button-behavior/ for background information\n if (e.target.matches('[data-toggle=\"collapse\"]') || e.target.matches('[data-bs-toggle=\"collapse\"]')) {\n e.target.focus()\n }\n}\n\ndocument.addEventListener('click', ButtonFocus)\n\nexport default ButtonFocus\n","// Usage:\n// ```\n// const basicFunction = (entry) => console.log(entry)\n// const debounced = debounce(basicFunction(\"I should only be called once\"));\n//\n// debounced // does NOT print to the screen because it is invoked again less than 200 milliseconds later\n// debounced // does print to the screen\n// ```\nexport default function debounce(func, timeout = 200) {\n let timer;\n return (...args) => {\n clearTimeout(timer);\n timer = setTimeout(() => { func.apply(this, args); }, timeout);\n };\n}\n","import debounce from \"blacklight-frontend/debounce\";\n\nconst FacetSuggest = async (e) => {\n if (e.target.matches('.facet-suggest')) {\n const queryFragment = e.target.value?.trim();\n const facetField = e.target.dataset.facetField;\n const facetArea = document.querySelector('.facet-extended-list');\n const prevNextLinks = document.querySelectorAll('.prev_next_links');\n\n if (!facetField) { return; }\n\n // Get the search params from the current query so the facet suggestions\n // can retain that context.\n const facetSearchContext = e.target.dataset.facetSearchContext;\n const url = new URL(facetSearchContext, window.location.origin);\n\n // Drop facet.page so a filtered suggestion list will always start on page 1\n url.searchParams.delete('facet.page');\n const facetSearchParams = url.searchParams.toString();\n\n const urlToFetch = `/catalog/facet_suggest/${facetField}/${queryFragment}?${facetSearchParams}`;\n\n const response = await fetch(urlToFetch);\n if (response.ok) {\n const blob = await response.blob()\n const text = await blob.text()\n\n if (text && facetArea) {\n facetArea.innerHTML = text\n }\n }\n\n // Hide the prev/next links when a user enters text in the facet\n // suggestion input. They don't work with a filtered list.\n prevNextLinks.forEach(element => {\n element.classList.toggle('invisible', !!queryFragment);\n });\n\n // Add a class to distinguish suggested facet values vs. regular.\n facetArea.classList.toggle('facet-suggestions', !!queryFragment);\n }\n};\n\ndocument.addEventListener('input', debounce(FacetSuggest));\n\nexport default FacetSuggest\n","/*\n The blacklight modal plugin can display some interactions inside a Bootstrap\n modal window, including some multi-page interactions.\n\n It supports unobtrusive Javascript, where a link or form that would have caused\n a new page load is changed to display it's results inside a modal dialog,\n by this plugin. The plugin assumes there is a Bootstrap modal div\n on the page with id #blacklight-modal to use as the modal -- the standard Blacklight\n layout provides this.\n\n To make a link or form have their results display inside a modal, add\n `data-blacklight-modal=\"trigger\"` to the link or form. (Note, form itself not submit input)\n With Rails link_to helper, you'd do that like:\n\n link_to something, link, data: { blacklight_modal: \"trigger\" }\n\n The results of the link href or form submit will be displayed inside\n a modal -- they should include the proper HTML markup for a bootstrap modal's\n contents. Also, you ordinarily won't want the Rails template with wrapping\n navigational elements to be used. The Rails controller could suppress\n the layout when a JS AJAX request is detected, OR the response\n can include a `<div data-blacklight-modal=\"container\">` -- only the contents\n of the container will be placed inside the modal, the rest of the\n page will be ignored.\n\n Link or forms inside the modal will ordinarily cause page loads\n when they are triggered. However, if you'd like their results\n to stay within the modal, just add `data-blacklight-modal=\"preserve\"`\n to the link or form.\n\n Here's an example of what might be returned, demonstrating most of the devices available:\n\n <div data-blacklight-modal=\"container\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close\" data-bl-dismiss=\"modal\" aria-hidden=\"true\">×</button>\n <h3 class=\"modal-title\">Request Placed</h3>\n </div>\n\n <div class=\"modal-body\">\n <p>Some message</p>\n <%= link_to \"This result will still be within modal\", some_link, data: { blacklight_modal: \"preserve\" } %>\n </div>\n\n\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-bl-dismiss=\"modal\">Close</button>\n </div>\n </div>\n\n\n One additional feature. If the content returned from the AJAX form submission\n can be a turbo-stream that defines some HTML fragementsand where on the page to put them:\n https://turbo.hotwired.dev/handbook/streams\n*/\n\nconst Modal = (() => {\n const modal = {}\n\n // a Bootstrap modal div that should be already on the page hidden\n modal.modalSelector = '#blacklight-modal';\n\n // Trigger selectors identify forms or hyperlinks that should open\n // inside a modal dialog.\n modal.triggerLinkSelector = 'a[data-blacklight-modal~=trigger]';\n\n // preserve selectors identify forms or hyperlinks that, if activated already\n // inside a modal dialog, should have destinations remain inside the modal -- but\n // won't trigger a modal if not already in one.\n //\n // No need to repeat selectors from trigger selectors, those will already\n // be preserved. MUST be manually prefixed with the modal selector,\n // so they only apply to things inside a modal.\n modal.preserveLinkSelector = modal.modalSelector + ' a[data-blacklight-modal~=preserve]';\n\n modal.containerSelector = '[data-blacklight-modal~=container]';\n\n // Called on fatal failure of ajax load, function returns content\n // to show to user in modal. Right now called only for network errors.\n modal.onFailure = function (error) {\n console.error('Server error:', this.url, error);\n\n const contents = `<div class=\"modal-header\">\n <div class=\"modal-title\">There was a problem with your request.</div>\n <button type=\"button\" class=\"blacklight-modal-close btn-close\" data-bl-dismiss=\"modal\" aria-label=\"Close\">\n </button>\n </div>\n <div class=\"modal-body\">\n <p>Expected a successful response from the server, but got an error</p>\n <pre>${this.url}\\n${error}</pre>\n </div>`\n\n modal.target().querySelector('.modal-content').innerHTML = contents\n\n modal.show();\n }\n\n // Add the passed in contents to the modal and display it.\n // We have specific handling so that scripts returned from the ajax call are executed.\n // This enables adding a script like recaptcha to prevent bots from sending emails.\n modal.receiveAjax = function (contents) {\n const domparser = new DOMParser();\n const dom = domparser.parseFromString(contents, \"text/html\")\n // If there is a containerSelector on the document, use its children.\n let elements = dom.querySelectorAll(`${modal.containerSelector} > *`)\n const frag = document.createDocumentFragment()\n if (elements.length == 0) {\n // If the containerSelector wasn't found, use the whole document\n elements = dom.body.childNodes\n }\n elements.forEach((el) => frag.appendChild(el))\n modal.activateScripts(frag)\n\n modal.target().querySelector('.modal-content').replaceChildren(frag)\n\n // send custom event with the modal dialog div as the target\n var e = new CustomEvent('loaded.blacklight.blacklight-modal', { bubbles: true, cancelable: true });\n modal.target().dispatchEvent(e)\n\n // if they did preventDefault, don't show the dialog\n if (e.defaultPrevented) return;\n modal.show();\n };\n\n // DOMParser doesn't allow scripts to be executed. This fixes that.\n modal.activateScripts = function (frag) {\n frag.querySelectorAll('script').forEach((script) => {\n const fixedScript = document.createElement('script')\n fixedScript.src = script.src\n fixedScript.async = false\n script.parentNode.replaceChild(fixedScript, script)\n })\n }\n\n modal.modalAjaxLinkClick = function(e) {\n e.preventDefault();\n const href = e.target.closest('a').getAttribute('href')\n fetch(href, { headers: { 'X-Requested-With': 'XMLHttpRequest' }})\n .then(response => {\n if (!response.ok) {\n throw new TypeError(\"Request failed\");\n }\n return response.text();\n })\n .then(data => modal.receiveAjax(data))\n .catch(error => modal.onFailure(error))\n };\n\n modal.setupModal = function() {\n // Register several click handlers in ONE event handler for efficiency\n //\n // * close button OR click on backdrop (modal.modalSelector) closes modal\n // * trigger and preserve link in modal functionality -- if somethign matches both trigger and\n // preserve, still only called once.\n document.addEventListener('click', (e) => {\n if (e.target.closest(`${modal.triggerLinkSelector}, ${modal.preserveLinkSelector}`))\n modal.modalAjaxLinkClick(e)\n else if (e.target.matches(`${modal.modalSelector}`) || e.target.closest('[data-bl-dismiss=\"modal\"]'))\n modal.hide()\n })\n };\n\n modal.hide = function (el) {\n const dom = modal.target();\n\n if (!dom.open) return\n\n var e = new CustomEvent('hide.blacklight.blacklight-modal', { bubbles: true, cancelable: true });\n dom.dispatchEvent(e)\n\n dom.close()\n\n // Turn body scrolling back to what it was\n document.body.style[\"overflow\"] = modal.originalBodyOverflow;\n document.body.style[\"padding-right\"] = modal.originalBodyPaddingRight;\n modal.originalBodyOverflow = undefined;\n modal.originalBodyPaddingRight = undefined;\n }\n\n modal.show = function(el) {\n const dom = modal.target();\n\n if (dom.open) return\n\n var e = new CustomEvent('show.blacklight.blacklight-modal', { bubbles: true, cancelable: true });\n dom.dispatchEvent(e)\n\n dom.showModal()\n\n // Turn off body scrolling\n modal.originalBodyOverflow = document.body.style['overflow'];\n modal.originalBodyPaddingRight = document.body.style['padding-right'];\n document.body.style[\"overflow\"] = \"hidden\"\n document.body.style[\"padding-right\"] = \"0px\"\n }\n\n modal.target = function() {\n return document.querySelector(modal.modalSelector);\n }\n\n modal.setupModal()\n\n return modal;\n})()\n\nexport default Modal\n","const SearchContext = (e) => {\n const contextLink = e.target.closest('[data-context-href]')\n if (contextLink) {\n SearchContext.handleSearchContextMethod.call(contextLink, e)\n }\n}\n\nSearchContext.csrfToken = () => document.querySelector('meta[name=csrf-token]')?.content\nSearchContext.csrfParam = () => document.querySelector('meta[name=csrf-param]')?.content\n\n// this is the Rails.handleMethod with a couple adjustments, described inline:\n// first, we're attaching this directly to the event handler, so we can check for meta-keys\nSearchContext.handleSearchContextMethod = function(event) {\n const link = this\n\n // instead of using the normal href, we need to use the context href instead\n let href = link.getAttribute('data-context-href')\n let target = link.getAttribute('target')\n let csrfToken = SearchContext.csrfToken()\n let csrfParam = SearchContext.csrfParam()\n let form = document.createElement('form')\n form.method = 'post'\n form.action = href\n\n\n let formContent = `<input name=\"_method\" value=\"post\" type=\"hidden\" />\n <input name=\"redirect\" value=\"${link.getAttribute('href')}\" type=\"hidden\" />`\n\n // check for meta keys.. if set, we should open in a new tab\n if(event.metaKey || event.ctrlKey) {\n form.dataset.turbo = \"false\";\n target = '_blank';\n }\n\n if (csrfParam !== undefined && csrfToken !== undefined) {\n formContent += `<input name=\"${csrfParam}\" value=\"${csrfToken}\" type=\"hidden\" />`\n }\n\n // Must trigger submit by click on a button, else \"submit\" event handler won't work!\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit\n formContent += '<input type=\"submit\" />'\n\n if (target) { form.setAttribute('target', target); }\n\n form.style.display = 'none'\n form.innerHTML = formContent\n document.body.appendChild(form)\n form.querySelector('[type=\"submit\"]').click()\n\n event.preventDefault()\n};\n\ndocument.addEventListener('click', SearchContext)\n\nexport default SearchContext\n","const Core = function() {\n const buffer = new Array;\n return {\n onLoad: function(func) {\n buffer.push(func);\n },\n\n activate: function() {\n for(let i = 0; i < buffer.length; i++) {\n buffer[i].call();\n }\n },\n\n listeners: function () {\n const listeners = [];\n if (typeof Turbo !== 'undefined') {\n listeners.push('turbo:load', 'turbo:frame-load');\n } else {\n listeners.push('DOMContentLoaded');\n }\n\n return listeners;\n }\n };\n}();\n\n// turbo triggers turbo:load events on page transition\n// If app isn't using turbo, this event will never be triggered, no prob.\nCore.listeners().forEach(function(listener) {\n document.addEventListener(listener, function() {\n Core.activate()\n })\n})\n\nCore.onLoad(function () {\n const elem = document.querySelector('.no-js');\n\n // The \"no-js\" class may already have been removed because this function is\n // run on every turbo:load event, in that case, it won't find an element.\n if (!elem) return;\n\n elem.classList.remove('no-js')\n elem.classList.add('js')\n})\n\n\nexport default Core\n","import BookmarkToggle from 'blacklight-frontend/bookmark_toggle'\nimport ButtonFocus from 'blacklight-frontend/button_focus'\nimport FacetSuggest from 'blacklight-frontend/facet_suggest'\nimport Modal from 'blacklight-frontend/modal'\nimport SearchContext from 'blacklight-frontend/search_context'\nimport Core from 'blacklight-frontend/core'\n\nexport default {\n BookmarkToggle,\n ButtonFocus,\n FacetSuggest,\n Modal,\n SearchContext,\n Core,\n onLoad: Core.onLoad\n}\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,MAAM,cAAc,CAAC;AACpC,EAAE,WAAW,CAAC,IAAI,EAAE;AACpB,IAAI,IAAI,CAAC,IAAI,GAAG,KAAI;AACpB,GAAG;AACH;AACA,EAAE,OAAO,CAAC,GAAG,EAAE;AACf,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,iBAAiB,EAAC;AACzE,IAAI,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAC1D,IAAI,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAC7D,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE;AAClD,MAAM,IAAI,EAAE,IAAI,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC;AACzC,MAAM,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE;AAClE,MAAM,OAAO,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EAAE,cAAc;AAChB,EAAE,WAAW;AACb,EAAE,YAAY;AACd,EAAE,KAAK;AACP,EAAE,aAAa;AACf,EAAE,IAAI;AACN,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM;AACrB;;;;"}
|
@@ -49,6 +49,9 @@
|
|
49
49
|
this.bookmarksCounter().forEach(counter => {
|
50
50
|
counter.innerHTML = json.bookmarks.count;
|
51
51
|
});
|
52
|
+
|
53
|
+
var e = new CustomEvent('bookmark.blacklight', { detail: { checked: this.checked } });
|
54
|
+
window.dispatchEvent(e);
|
52
55
|
}).catch((error) => {
|
53
56
|
this.handleError(error);
|
54
57
|
});
|
@@ -83,7 +86,8 @@
|
|
83
86
|
}
|
84
87
|
|
85
88
|
updateStateFor(state) {
|
86
|
-
this.checkboxTarget.checked
|
89
|
+
if (state) { this.checkboxTarget.setAttribute('checked', state); }
|
90
|
+
else { this.checkboxTarget.removeAttribute('checked'); }
|
87
91
|
|
88
92
|
if (state) {
|
89
93
|
this.labelTarget.classList.add('checked');
|
@@ -100,13 +104,18 @@
|
|
100
104
|
}
|
101
105
|
|
102
106
|
const BookmarkToggle = (e) => {
|
103
|
-
|
107
|
+
const elementType = e.target.getAttribute('data-checkboxsubmit-target');
|
108
|
+
if (elementType == 'checkbox' || elementType == 'label') {
|
104
109
|
const form = e.target.closest('form');
|
105
110
|
if (form) new CheckboxSubmit(form).clicked(e);
|
111
|
+
if (e.code == 'Space') e.preventDefault();
|
106
112
|
}
|
107
113
|
};
|
108
114
|
|
109
115
|
document.addEventListener('click', BookmarkToggle);
|
116
|
+
document.addEventListener('keydown', function (e) {
|
117
|
+
if (e.key === 'Enter' || e.code == 'Space') { BookmarkToggle(e); } }
|
118
|
+
);
|
110
119
|
|
111
120
|
const ButtonFocus = (e) => {
|
112
121
|
// Button clicks should change focus. As of 10/3/19, Firefox for Mac and
|
@@ -261,8 +270,7 @@
|
|
261
270
|
|
262
271
|
const contents = `<div class="modal-header">
|
263
272
|
<div class="modal-title">There was a problem with your request.</div>
|
264
|
-
<button type="button" class="blacklight-modal-close btn-close
|
265
|
-
<span aria-hidden="true" class="visually-hidden">×</span>
|
273
|
+
<button type="button" class="blacklight-modal-close btn-close" data-bl-dismiss="modal" aria-label="Close">
|
266
274
|
</button>
|
267
275
|
</div>
|
268
276
|
<div class="modal-body">
|
@@ -315,7 +323,7 @@
|
|
315
323
|
modal.modalAjaxLinkClick = function(e) {
|
316
324
|
e.preventDefault();
|
317
325
|
const href = e.target.closest('a').getAttribute('href');
|
318
|
-
fetch(href)
|
326
|
+
fetch(href, { headers: { 'X-Requested-With': 'XMLHttpRequest' }})
|
319
327
|
.then(response => {
|
320
328
|
if (!response.ok) {
|
321
329
|
throw new TypeError("Request failed");
|