blacklight 9.2.1 → 9.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/.github/matrix.json +4 -4
  3. data/.github/workflows/build.yml +3 -0
  4. data/.github/workflows/lint.yml +17 -2
  5. data/.github/workflows/main.yml +3 -0
  6. data/.github/workflows/release_7_x_scheduled.yml +3 -0
  7. data/.github/workflows/release_8_x_scheduled.yml +3 -0
  8. data/.github/workflows/test.yml +3 -2
  9. data/.gitignore +0 -1
  10. data/.prettierignore +5 -0
  11. data/.prettierrc.json +4 -0
  12. data/.rubocop.yml +4 -0
  13. data/.rubocop_todo.yml +0 -143
  14. data/VERSION +1 -1
  15. data/app/assets/builds/blacklight.css +39 -9
  16. data/app/assets/javascripts/blacklight/blacklight.esm.js +207 -125
  17. data/app/assets/javascripts/blacklight/blacklight.esm.js.map +1 -1
  18. data/app/assets/javascripts/blacklight/blacklight.js +207 -125
  19. data/app/assets/javascripts/blacklight/blacklight.js.map +1 -1
  20. data/app/assets/stylesheets/blacklight/_search_results.scss +24 -0
  21. data/app/assets/stylesheets/blacklight/blacklight_defaults.scss +18 -3
  22. data/app/components/blacklight/constraints_component.rb +2 -1
  23. data/app/components/blacklight/facet_field_component.rb +1 -1
  24. data/app/components/blacklight/open_graph_metadata_component.rb +33 -0
  25. data/app/components/blacklight/search/sidebar_component.html.erb +2 -2
  26. data/app/components/blacklight/search/sidebar_component.rb +3 -2
  27. data/app/controllers/concerns/blacklight/catalog.rb +3 -5
  28. data/app/controllers/concerns/blacklight/controller.rb +2 -6
  29. data/app/controllers/concerns/blacklight/search_context.rb +2 -7
  30. data/app/controllers/concerns/blacklight/token_based_user.rb +2 -6
  31. data/app/helpers/blacklight/catalog_helper_behavior.rb +9 -9
  32. data/app/helpers/blacklight/url_helper_behavior.rb +2 -7
  33. data/app/javascript/blacklight-frontend/bookmark_toggle.js +10 -8
  34. data/app/javascript/blacklight-frontend/checkbox_submit.js +42 -33
  35. data/app/javascript/blacklight-frontend/color_theme_switcher.js +47 -16
  36. data/app/javascript/blacklight-frontend/core.js +18 -19
  37. data/app/javascript/blacklight-frontend/debounce.js +7 -5
  38. data/app/javascript/blacklight-frontend/facet_suggest.js +27 -25
  39. data/app/javascript/blacklight-frontend/index.js +1 -1
  40. data/app/javascript/blacklight-frontend/modal.js +69 -52
  41. data/app/javascript/blacklight-frontend/search_context.js +36 -17
  42. data/app/models/blacklight/facet_paginator.rb +1 -3
  43. data/app/presenters/blacklight/document_presenter.rb +10 -1
  44. data/app/presenters/blacklight/facet_grouped_item_presenter.rb +1 -3
  45. data/app/presenters/blacklight/facet_item_pivot_presenter.rb +0 -8
  46. data/app/presenters/blacklight/json_presenter.rb +1 -3
  47. data/app/presenters/blacklight/open_graph_presenter.rb +34 -0
  48. data/app/presenters/blacklight/thumbnail_presenter.rb +24 -1
  49. data/app/services/blacklight/field_retriever.rb +1 -3
  50. data/app/services/blacklight/search_service.rb +1 -1
  51. data/app/views/catalog/_document.atom.builder +3 -5
  52. data/app/views/catalog/_show_main_content.html.erb +1 -0
  53. data/app/views/catalog/index.atom.builder +8 -4
  54. data/app/views/layouts/blacklight/base.html.erb +7 -1
  55. data/config/i18n-tasks.yml +1 -1
  56. data/config/locales/blacklight.ja.yml +256 -0
  57. data/lib/blacklight/configuration/context.rb +1 -1
  58. data/lib/blacklight/configuration/fields.rb +3 -9
  59. data/lib/blacklight/configuration/view_config.rb +16 -0
  60. data/lib/blacklight/configuration.rb +6 -2
  61. data/lib/blacklight/engine.rb +2 -4
  62. data/lib/blacklight/search_builder.rb +4 -4
  63. data/lib/blacklight/search_state/filter_field.rb +0 -1
  64. data/lib/blacklight/search_state.rb +2 -6
  65. data/lib/blacklight/solr/facet_paginator.rb +1 -1
  66. data/lib/blacklight/solr/repository.rb +1 -3
  67. data/lib/blacklight/solr/response/facets.rb +11 -9
  68. data/lib/blacklight/solr/response/spelling.rb +51 -47
  69. data/lib/blacklight/solr/search_builder_behavior.rb +14 -15
  70. data/lib/blacklight.rb +3 -9
  71. data/lib/generators/blacklight/assets/importmap_generator.rb +3 -3
  72. data/lib/generators/blacklight/assets_generator.rb +1 -1
  73. data/lib/railties/blacklight.rake +3 -5
  74. data/package-lock.json +1054 -0
  75. data/package.json +7 -4
  76. data/rollup.config.js +5 -7
  77. data/spec/components/blacklight/constraints_component_spec.rb +23 -1
  78. data/spec/components/blacklight/document/page_header_component_spec.rb +4 -4
  79. data/spec/components/blacklight/document_component_spec.rb +16 -3
  80. data/spec/components/blacklight/metadata_field_component_spec.rb +2 -2
  81. data/spec/components/blacklight/response/spellcheck_component_spec.rb +2 -2
  82. data/spec/components/blacklight/search_bar_component_spec.rb +1 -1
  83. data/spec/components/blacklight/search_context/server_item_pagination_component_spec.rb +1 -1
  84. data/spec/components/blacklight/system/dropdown_component_spec.rb +1 -2
  85. data/spec/controllers/bookmarks_controller_spec.rb +3 -9
  86. data/spec/controllers/catalog_controller_spec.rb +56 -26
  87. data/spec/features/dark_mode_spec.rb +30 -0
  88. data/spec/features/did_you_mean_spec.rb +1 -1
  89. data/spec/features/facet_missing_spec.rb +3 -3
  90. data/spec/features/modal_spec.rb +2 -2
  91. data/spec/features/open_graph_spec.rb +43 -0
  92. data/spec/features/search_context_spec.rb +1 -1
  93. data/spec/fixtures/sample_solr_documents.yml +6 -0
  94. data/spec/helpers/blacklight/configuration_helper_behavior_spec.rb +11 -8
  95. data/spec/helpers/blacklight/render_partials_helper_behavior_spec.rb +1 -1
  96. data/spec/helpers/blacklight/url_helper_behavior_spec.rb +5 -5
  97. data/spec/helpers/blacklight_helper_spec.rb +6 -4
  98. data/spec/helpers/catalog_helper_spec.rb +34 -8
  99. data/spec/lib/blacklight/configuration/session_tracking_config_spec.rb +2 -2
  100. data/spec/lib/blacklight/nested_open_struct_with_hash_access_spec.rb +2 -2
  101. data/spec/lib/blacklight/search_state/filter_field_spec.rb +1 -1
  102. data/spec/lib/blacklight/search_state/pivot_filter_field_spec.rb +1 -1
  103. data/spec/lib/blacklight/search_state_spec.rb +14 -19
  104. data/spec/lib/blacklight_spec.rb +5 -5
  105. data/spec/models/blacklight/configuration_spec.rb +1 -1
  106. data/spec/models/blacklight/document/cache_key_spec.rb +32 -12
  107. data/spec/models/blacklight/facet_paginator_spec.rb +5 -5
  108. data/spec/models/blacklight/icon_spec.rb +3 -3
  109. data/spec/models/blacklight/search_builder_spec.rb +21 -16
  110. data/spec/models/blacklight/solr/default_filter_query_builder_spec.rb +1 -1
  111. data/spec/models/blacklight/solr/document_spec.rb +8 -8
  112. data/spec/models/blacklight/solr/response/facets_spec.rb +5 -5
  113. data/spec/models/blacklight/solr/response/group_response_spec.rb +1 -1
  114. data/spec/models/blacklight/solr/response/group_spec.rb +1 -1
  115. data/spec/models/blacklight/solr/response_spec.rb +18 -3
  116. data/spec/models/blacklight/solr/search_builder_behavior_spec.rb +46 -7
  117. data/spec/models/blacklight/suggest_search_spec.rb +1 -1
  118. data/spec/models/record_mailer_spec.rb +2 -2
  119. data/spec/models/search_spec.rb +7 -7
  120. data/spec/presenters/blacklight/document_presenter_spec.rb +19 -6
  121. data/spec/presenters/blacklight/facet_field_presenter_spec.rb +4 -4
  122. data/spec/presenters/blacklight/field_presenter_spec.rb +12 -9
  123. data/spec/presenters/blacklight/open_graph_presenter_spec.rb +56 -0
  124. data/spec/presenters/blacklight/rendering/pipeline_spec.rb +3 -3
  125. data/spec/presenters/blacklight/thumbnail_presenter_spec.rb +129 -13
  126. data/spec/routing/catalog_routing_spec.rb +1 -1
  127. data/spec/services/blacklight/field_retriever_spec.rb +1 -1
  128. data/spec/services/blacklight/search_service_spec.rb +8 -8
  129. data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -3
  130. data/spec/views/catalog/_document_list.html.erb_spec.rb +1 -2
  131. data/spec/views/catalog/index.atom.builder_spec.rb +16 -20
  132. data/spec/views/shared/_user_util_links.html.erb_spec.rb +1 -1
  133. metadata +12 -2
@@ -1 +1 @@
1
- {"version":3,"file":"blacklight.js","sources":["../../../javascript/blacklight-frontend/checkbox_submit.js","../../../javascript/blacklight-frontend/bookmark_toggle.js","../../../javascript/blacklight-frontend/button_focus.js","../../../javascript/blacklight-frontend/core.js","../../../javascript/blacklight-frontend/color_theme_switcher.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/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.\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 }, bubbles: true });\n this.formTarget.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-bs-toggle=\"collapse\"]')) {\n e.target.focus()\n }\n}\n\ndocument.addEventListener('click', ButtonFocus)\n\nexport default ButtonFocus\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","/*!\n * Color mode toggler for Blacklight\n * Based on Bootstrap's color mode toggler (https://getbootstrap.com/docs/5.3/customize/color-modes/#javascript)\n */\n\nimport Core from 'blacklight-frontend/core'\n\nconst ColorThemeSwitcher = (() => {\n 'use strict'\n\n const getStoredTheme = () => localStorage.getItem('theme')\n const setStoredTheme = theme => localStorage.setItem('theme', theme)\n\n const getPreferredTheme = () => {\n const storedTheme = getStoredTheme()\n if (storedTheme) {\n return storedTheme\n }\n return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'\n }\n\n const setTheme = theme => {\n if (theme === 'auto') {\n document.documentElement.setAttribute('data-bs-theme', window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light')\n } else {\n document.documentElement.setAttribute('data-bs-theme', theme)\n }\n }\n\n const showActiveTheme = (theme, focus = false) => {\n const themeSwitcher = document.querySelector('#bl-theme-switcher')\n if (!themeSwitcher) return\n\n // Reset all dropdown items\n document.querySelectorAll('[data-bs-theme-value]').forEach(element => {\n element.classList.remove('active')\n element.setAttribute('aria-pressed', 'false')\n const check = element.querySelector('.bl-theme-check')\n if (check) check.classList.add('d-none')\n })\n\n // Activate the selected item\n const btnToActive = document.querySelector(`[data-bs-theme-value=\"${theme}\"]`)\n if (btnToActive) {\n btnToActive.classList.add('active')\n btnToActive.setAttribute('aria-pressed', 'true')\n const check = btnToActive.querySelector('.bl-theme-check')\n if (check) check.classList.remove('d-none')\n }\n\n // Swap the toggle button icon\n themeSwitcher.querySelectorAll('.bl-theme-icon').forEach(icon => icon.classList.add('d-none'))\n const activeIcon = themeSwitcher.querySelector(`.bl-theme-icon[data-bl-theme-icon=\"${theme}\"]`)\n if (activeIcon) activeIcon.classList.remove('d-none')\n\n themeSwitcher.setAttribute('aria-label', `Toggle theme (${theme})`)\n\n if (focus) {\n themeSwitcher.focus()\n }\n }\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {\n const storedTheme = getStoredTheme()\n if (storedTheme !== 'light' && storedTheme !== 'dark') {\n setTheme(getPreferredTheme())\n }\n })\n\n document.addEventListener('click', e => {\n const btn = e.target.closest('[data-bs-theme-value]')\n if (!btn) return\n\n const theme = btn.getAttribute('data-bs-theme-value')\n setStoredTheme(theme)\n setTheme(theme)\n showActiveTheme(theme, true)\n })\n\n Core.onLoad(() => showActiveTheme(getPreferredTheme()))\n\n return { setTheme, getPreferredTheme, showActiveTheme }\n})()\n\nexport default ColorThemeSwitcher\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 // add our queryFragment for facet filtering\n url.searchParams.append('query_fragment', queryFragment);\n\n const facetSearchParams = url.searchParams.toString();\n const basePathComponent = url.pathname.split('/')[1];\n\n const urlToFetch = `/${basePathComponent}/facet_suggest/${facetField}?${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=\"btn-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 // Make sure user-agent dismissal of html 'dialog', etc `esc` key, triggers\n // our hide logic, including events and scroll restoration.\n const modalDom = modal.target();\n if (modalDom) {\n modal.target().addEventListener('cancel', (e) => {\n e.preventDefault(); // 'hide' will close the modal unless cancelled\n\n modal.hide();\n });\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","import BookmarkToggle from 'blacklight-frontend/bookmark_toggle'\nimport ButtonFocus from 'blacklight-frontend/button_focus'\nimport ColorThemeSwitcher from 'blacklight-frontend/color_theme_switcher'\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 ColorThemeSwitcher,\n FacetSuggest,\n Modal,\n SearchContext,\n Core,\n onLoad: Core.onLoad\n}\n"],"names":[],"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AE;;EAEF,EAAE,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,SAAS,EAAE;EAC1D,IAAI,WAAW,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC,kBAAkB;EACpF,EAAE;;EAEF;EACA;EACA,EAAE,WAAW,IAAI;;EAEjB,EAAE,IAAI,MAAM,EAAE,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;;EAErD,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG;EACvB,EAAE,IAAI,CAAC,SAAS,GAAG;EACnB,EAAE,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI;EAChC,EAAE,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC,KAAK;;EAE7C,EAAE,KAAK,CAAC,cAAc;EACtB,CAAC;;EAED,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,aAAa;;AC5ChD,gBAAe;EACf,EAAE,cAAc;EAChB,EAAE,WAAW;EACb,EAAE,kBAAkB;EACpB,EAAE,YAAY;EACd,EAAE,KAAK;EACP,EAAE,aAAa;EACf,EAAE,IAAI;EACN,EAAE,MAAM,EAAE,IAAI,CAAC;EACf;;;;"}
1
+ {"version":3,"file":"blacklight.js","sources":["../../../javascript/blacklight-frontend/checkbox_submit.js","../../../javascript/blacklight-frontend/bookmark_toggle.js","../../../javascript/blacklight-frontend/button_focus.js","../../../javascript/blacklight-frontend/core.js","../../../javascript/blacklight-frontend/color_theme_switcher.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/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 Uses HTML for a checkbox compatible with Bootstrap.\n new CheckboxSubmit(document.querySelector('form.something')).clicked()\n*/\nexport default class CheckboxSubmit {\n constructor(form) {\n this.form = form\n }\n\n clicked() {\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]')\n ?.content,\n },\n })\n .then((response) => {\n if (response.ok) return response.json()\n return Promise.reject('response was not ok')\n })\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', {\n detail: { checked: this.checked },\n bubbles: true,\n })\n this.formTarget.dispatchEvent(e)\n })\n .catch((error) => {\n this.handleError(error)\n })\n }\n\n get checked() {\n return (\n this.form.querySelectorAll('input[name=_method][value=delete]').length !=\n 0\n )\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) {\n this.checkboxTarget.setAttribute('checked', state)\n } else {\n this.checkboxTarget.removeAttribute('checked')\n }\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()\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') {\n BookmarkToggle(e)\n }\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-bs-toggle=\"collapse\"]')) {\n e.target.focus()\n }\n}\n\ndocument.addEventListener('click', ButtonFocus)\n\nexport default ButtonFocus\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\nexport default Core\n","/*!\n * Color mode toggler for Blacklight\n * Based on Bootstrap's color mode toggler (https://getbootstrap.com/docs/5.3/customize/color-modes/#javascript)\n */\n\nimport Core from 'blacklight-frontend/core'\n\nconst ColorThemeSwitcher = (() => {\n 'use strict'\n\n // Accessing localStorage can throw (e.g. NS_ERROR_FAILURE in Firefox when the\n // profile's storage is corrupt, or SecurityError when storage is disabled),\n // so treat any failure as \"no stored theme\" rather than breaking page load.\n const getStoredTheme = () => {\n try {\n return localStorage.getItem('theme')\n } catch {\n return null\n }\n }\n\n const setStoredTheme = (theme) => {\n try {\n localStorage.setItem('theme', theme)\n } catch {\n // Storage is unavailable; the theme still applies for this page view.\n }\n }\n\n const getPreferredTheme = () => {\n const storedTheme = getStoredTheme()\n if (storedTheme) {\n return storedTheme\n }\n return window.matchMedia('(prefers-color-scheme: dark)').matches\n ? 'dark'\n : 'light'\n }\n\n const setTheme = (theme) => {\n if (theme === 'auto') {\n document.documentElement.setAttribute(\n 'data-bs-theme',\n window.matchMedia('(prefers-color-scheme: dark)').matches\n ? 'dark'\n : 'light',\n )\n } else {\n document.documentElement.setAttribute('data-bs-theme', theme)\n }\n }\n\n const showActiveTheme = (theme, focus = false) => {\n const themeSwitcher = document.querySelector('#bl-theme-switcher')\n if (!themeSwitcher) return\n\n // Reset all dropdown items\n document.querySelectorAll('[data-bs-theme-value]').forEach((element) => {\n element.classList.remove('active')\n element.setAttribute('aria-pressed', 'false')\n const check = element.querySelector('.bl-theme-check')\n if (check) check.classList.add('d-none')\n })\n\n // Activate the selected item\n const btnToActive = document.querySelector(\n `[data-bs-theme-value=\"${theme}\"]`,\n )\n if (btnToActive) {\n btnToActive.classList.add('active')\n btnToActive.setAttribute('aria-pressed', 'true')\n const check = btnToActive.querySelector('.bl-theme-check')\n if (check) check.classList.remove('d-none')\n }\n\n // Swap the toggle button icon\n themeSwitcher\n .querySelectorAll('.bl-theme-icon')\n .forEach((icon) => icon.classList.add('d-none'))\n const activeIcon = themeSwitcher.querySelector(\n `.bl-theme-icon[data-bl-theme-icon=\"${theme}\"]`,\n )\n if (activeIcon) activeIcon.classList.remove('d-none')\n\n themeSwitcher.setAttribute('aria-label', `Toggle theme (${theme})`)\n\n if (focus) {\n themeSwitcher.focus()\n }\n }\n\n window\n .matchMedia('(prefers-color-scheme: dark)')\n .addEventListener('change', () => {\n const storedTheme = getStoredTheme()\n if (storedTheme !== 'light' && storedTheme !== 'dark') {\n setTheme(getPreferredTheme())\n }\n })\n\n document.addEventListener('click', (e) => {\n const btn = e.target.closest('[data-bs-theme-value]')\n if (!btn) return\n\n const theme = btn.getAttribute('data-bs-theme-value')\n setStoredTheme(theme)\n setTheme(theme)\n showActiveTheme(theme, true)\n })\n\n Core.onLoad(() => showActiveTheme(getPreferredTheme()))\n\n return { setTheme, getPreferredTheme, showActiveTheme }\n})()\n\nexport default ColorThemeSwitcher\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(() => {\n func.apply(this, args)\n }, 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) {\n return\n }\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 // add our queryFragment for facet filtering\n url.searchParams.append('query_fragment', queryFragment)\n\n const facetSearchParams = url.searchParams.toString()\n const basePathComponent = url.pathname.split('/')[1]\n\n const urlToFetch = `/${basePathComponent}/facet_suggest/${facetField}?${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=\"btn-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 =\n 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', {\n bubbles: true,\n cancelable: true,\n })\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 (\n e.target.closest(\n `${modal.triggerLinkSelector}, ${modal.preserveLinkSelector}`,\n )\n )\n modal.modalAjaxLinkClick(e)\n else if (\n e.target.matches(`${modal.modalSelector}`) ||\n e.target.closest('[data-bl-dismiss=\"modal\"]')\n )\n modal.hide()\n })\n\n // Make sure user-agent dismissal of html 'dialog', etc `esc` key, triggers\n // our hide logic, including events and scroll restoration.\n const modalDom = modal.target()\n if (modalDom) {\n modal.target().addEventListener('cancel', (e) => {\n e.preventDefault() // 'hide' will close the modal unless cancelled\n\n modal.hide()\n })\n }\n }\n\n modal.hide = function () {\n const dom = modal.target()\n\n if (!dom.open) return\n\n var e = new CustomEvent('hide.blacklight.blacklight-modal', {\n bubbles: true,\n cancelable: true,\n })\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 () {\n const dom = modal.target()\n\n if (dom.open) return\n\n var e = new CustomEvent('show.blacklight.blacklight-modal', {\n bubbles: true,\n cancelable: true,\n })\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 = () =>\n document.querySelector('meta[name=csrf-token]')?.content\nSearchContext.csrfParam = () =>\n 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 // Only post to same-origin URLs, which also rules out javascript: URLs;\n // otherwise fall through to the link's default behavior.\n const contextUrl = new URL(\n link.getAttribute('data-context-href'),\n window.location.href,\n )\n if (contextUrl.origin !== window.location.origin) return\n\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 = contextUrl.href\n\n const appendHiddenInput = (name, value) => {\n const input = document.createElement('input')\n input.type = 'hidden'\n input.name = name\n input.value = value\n form.appendChild(input)\n }\n\n appendHiddenInput('_method', 'post')\n appendHiddenInput('redirect', link.getAttribute('href'))\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 appendHiddenInput(csrfParam, csrfToken)\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 const submit = document.createElement('input')\n submit.type = 'submit'\n form.appendChild(submit)\n\n if (target) {\n form.setAttribute('target', target)\n }\n\n form.style.display = 'none'\n document.body.appendChild(form)\n submit.click()\n\n event.preventDefault()\n}\n\ndocument.addEventListener('click', SearchContext)\n\nexport default SearchContext\n","import BookmarkToggle from 'blacklight-frontend/bookmark_toggle'\nimport ButtonFocus from 'blacklight-frontend/button_focus'\nimport ColorThemeSwitcher from 'blacklight-frontend/color_theme_switcher'\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 ColorThemeSwitcher,\n FacetSuggest,\n Modal,\n SearchContext,\n Core,\n onLoad: Core.onLoad,\n}\n"],"names":[],"mappings":";;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACe,MAAM,cAAc,CAAC;EACpC,EAAE,WAAW,CAA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,IAAI,CAAC,WAAW,CAAC,KAAK;EAC1B,EAAE;;EAEF,EAAE,iBAAiB,CAAC,SAAS,EAAE,MAAM;EACrC,EAAE,iBAAiB,CAAC,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC;;EAEzD;EACA,EAAE,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,EAAE;EACtC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG;EACzB,IAAI,MAAM,GAAG;EACb,EAAE;;EAEF,EAAE,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,SAAS,EAAE;EAC1D,IAAI,iBAAiB,CAAC,SAAS,EAAE,SAAS;EAC1C,EAAE;;EAEF;EACA;EACA,EAAE,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO;EAC/C,EAAE,MAAM,CAAC,IAAI,GAAG;EAChB,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM;;EAEzB,EAAE,IAAI,MAAM,EAAE;EACd,IAAI,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM;EACtC,EAAE;;EAEF,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG;EACvB,EAAE,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI;EAChC,EAAE,MAAM,CAAC,KAAK;;EAEd,EAAE,KAAK,CAAC,cAAc;EACtB;;EAEA,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,aAAa;;AC/DhD,gBAAe;EACf,EAAE,cAAc;EAChB,EAAE,WAAW;EACb,EAAE,kBAAkB;EACpB,EAAE,YAAY;EACd,EAAE,KAAK;EACP,EAAE,aAAa;EACf,EAAE,IAAI;EACN,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM;EACrB;;;;"}
@@ -20,3 +20,27 @@
20
20
  }
21
21
  }
22
22
  }
23
+
24
+ // A document's thumbnail stacked over the default thumbnail; when the real
25
+ // thumbnail loads it covers the default, at the default's width
26
+ .thumbnail-stack {
27
+ display: inline-grid;
28
+
29
+ > * {
30
+ grid-area: 1 / 1;
31
+ }
32
+
33
+ .thumbnail-fallback {
34
+ place-self: center;
35
+ }
36
+
37
+ // max-width: 0 stops the image adding to the stack's width, so the default
38
+ // sets it, and min-width: 100% then fills that width. Without it, Firefox
39
+ // and Chrome size the stack differently.
40
+ > img {
41
+ place-self: stretch;
42
+ min-width: 100%;
43
+ max-width: 0;
44
+ object-fit: cover;
45
+ }
46
+ }
@@ -1,5 +1,6 @@
1
1
  :root {
2
- --bl-logo-image: url("blacklight/logo.svg");
2
+ --bl-logo-image-light: url("blacklight/logo.svg");
3
+ --bl-logo-image-dark: url("blacklight/logo-dark.svg");
3
4
  --bl-logo-width: 150px;
4
5
  --bl-logo-height: 50px;
5
6
 
@@ -12,6 +13,20 @@
12
13
  --bl-modal-backdrop-bg: rgba(0, 0, 0, 0.5);
13
14
  }
14
15
 
15
- [data-bs-theme="dark"] {
16
- --bl-logo-image: url("blacklight/logo-dark.svg");
16
+ /* Browsers that support light-dark() with images pick the logo from color-scheme */
17
+ @supports (background-image: light-dark(linear-gradient(#fff, #fff), linear-gradient(#000, #000))) {
18
+ :root {
19
+ --bl-logo-image: light-dark(var(--bl-logo-image-light), var(--bl-logo-image-dark));
20
+ }
21
+ }
22
+
23
+ /* Fallback for browsers without light-dark() image support (e.g. Safari 26) */
24
+ @supports not (background-image: light-dark(linear-gradient(#fff, #fff), linear-gradient(#000, #000))) {
25
+ :root {
26
+ --bl-logo-image: var(--bl-logo-image-light);
27
+ }
28
+
29
+ [data-bs-theme="dark"] {
30
+ --bl-logo-image: var(--bl-logo-image-dark);
31
+ }
17
32
  }
@@ -113,7 +113,8 @@ module Blacklight
113
113
 
114
114
  @search_state.clause_params.each do |key, clause|
115
115
  field_config = helpers.blacklight_config.search_fields[clause[:field]]
116
- yield Blacklight::ClausePresenter.new(key, clause, field_config, helpers)
116
+ # The search builder ignores clauses for unconfigured fields, so don't show them as constraints
117
+ yield Blacklight::ClausePresenter.new(key, clause, field_config, helpers) if field_config
117
118
  end
118
119
  end
119
120
 
@@ -3,7 +3,7 @@
3
3
  module Blacklight
4
4
  class FacetFieldComponent < Facets::FieldComponent
5
5
  def initialize(...)
6
- Rails.logger.warn("Blacklight::FacetFieldComponent is deprecated. Use Blacklight::Facets::FacetFieldComponent instead.")
6
+ Rails.logger.warn("Blacklight::FacetFieldComponent is deprecated. Use Blacklight::Facets::FieldComponent instead.")
7
7
  super
8
8
  end
9
9
  end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Blacklight
4
+ # Renders <meta> tags in the <head> with Open Graph metadata
5
+ class OpenGraphMetadataComponent < Blacklight::Component
6
+ attr_reader :presenter
7
+
8
+ # @param presenter [#properties, nil] page-specific Open Graph properties
9
+ def initialize(presenter: nil)
10
+ @presenter = presenter
11
+ end
12
+
13
+ # Hash of property:content pairs that will become <meta> tags
14
+ def properties
15
+ default_properties.merge((presenter&.properties || {}).transform_keys(&:to_s)).compact_blank
16
+ end
17
+
18
+ # Base set of properties that will be rendered on every page
19
+ def default_properties
20
+ {
21
+ 'og:type' => 'website',
22
+ 'og:site_name' => helpers.application_name,
23
+ 'og:title' => helpers.render_page_title,
24
+ 'og:url' => request.original_url
25
+ }
26
+ end
27
+
28
+ # Render all entries in properties as <meta> tags
29
+ def call
30
+ safe_join(properties.map { |property, content| tag.meta(property:, content: helpers.strip_tags(content)) }, "\n")
31
+ end
32
+ end
33
+ end
@@ -1,4 +1,4 @@
1
- <search>
1
+ <%= content_tag :search, class: classes do %>
2
2
  <% facet_group_names.each do |groupname| %>
3
3
  <% fields = facet_fields_in_group(groupname) %>
4
4
  <%= render group_component_class.new(id: groupname) do |component| %>
@@ -7,4 +7,4 @@
7
7
  <% end %>
8
8
  <% end %>
9
9
  <% end %>
10
- </search>
10
+ <% end %>
@@ -3,13 +3,14 @@
3
3
  module Blacklight
4
4
  module Search
5
5
  class SidebarComponent < Blacklight::Component
6
- def initialize(blacklight_config:, response:, view_config:)
6
+ def initialize(blacklight_config:, response:, view_config:, classes: nil)
7
7
  @blacklight_config = blacklight_config
8
8
  @response = response
9
9
  @group_component_class = view_config.facet_group_component
10
+ @classes = classes
10
11
  end
11
12
 
12
- attr_reader :group_component_class, :response
13
+ attr_reader :classes, :group_component_class, :response
13
14
 
14
15
  delegate :facet_group_names, :facet_fields_in_group, to: :@blacklight_config
15
16
  end
@@ -15,9 +15,7 @@ module Blacklight::Catalog
15
15
  included do
16
16
  allow_unauthenticated_access raise: false if respond_to?(:allow_unauthenticated_access)
17
17
 
18
- if respond_to? :helper_method
19
- helper_method :sms_mappings, :has_search_parameters?
20
- end
18
+ helper_method :sms_mappings, :has_search_parameters? if respond_to? :helper_method
21
19
 
22
20
  record_search_parameters
23
21
  end
@@ -28,8 +26,8 @@ module Blacklight::Catalog
28
26
 
29
27
  respond_to do |format|
30
28
  format.html { store_preferred_view }
31
- format.rss { render layout: false }
32
- format.atom { render layout: false }
29
+ format.rss { render layout: false } if blacklight_config.view.key?(:rss)
30
+ format.atom { render layout: false } if blacklight_config.view.key?(:atom)
33
31
  format.json { @presenter = json_presenter(@response) }
34
32
  additional_response_formats(format)
35
33
  document_export_formats(format)
@@ -23,14 +23,13 @@ module Blacklight::Controller
23
23
 
24
24
  # extra head content
25
25
  helper_method :has_user_authentication_provider?
26
- helper_method :blacklight_config, :blacklight_configuration_context # move to Catalog
26
+ helper_method :blacklight_config, :blacklight_configuration_context
27
27
  helper_method :search_action_url, :search_action_path
28
28
  helper_method :search_state
29
29
  end
30
30
 
31
31
  # Which class to use for the search state. You can subclass SearchState if you
32
32
  # want to override any of the methods (e.g. SearchState#url_for_document)
33
- # TODO: move to Searchable
34
33
  class_attribute :search_state_class, default: Blacklight::SearchState
35
34
  end
36
35
 
@@ -45,7 +44,6 @@ module Blacklight::Controller
45
44
 
46
45
  ##
47
46
  # Context in which to evaluate blacklight configuration conditionals
48
- # TODO: move to catalog?
49
47
  def blacklight_configuration_context
50
48
  @blacklight_configuration_context ||= Blacklight::Configuration::Context.new(self)
51
49
  end
@@ -73,9 +71,7 @@ module Blacklight::Controller
73
71
  end
74
72
 
75
73
  def search_action_path *args
76
- if args.first.is_a?(Hash) && args.first[:only_path].nil?
77
- args.first[:only_path] = true
78
- end
74
+ args.first[:only_path] = true if args.first.is_a?(Hash) && args.first[:only_path].nil?
79
75
 
80
76
  search_action_url(*args)
81
77
  end
@@ -6,9 +6,7 @@ module Blacklight::SearchContext
6
6
  # The following code is executed when someone includes Blacklight::Catalog::SearchSession in their
7
7
  # own controller.
8
8
  included do
9
- if respond_to? :helper_method
10
- helper_method :current_search_session, :search_session
11
- end
9
+ helper_method :current_search_session, :search_session if respond_to? :helper_method
12
10
  end
13
11
 
14
12
  class_methods do
@@ -72,7 +70,6 @@ module Blacklight::SearchContext
72
70
  find_or_initialize_search_session_from_params JSON.parse(params[:search_context])
73
71
  elsif params[:search_id].present?
74
72
  begin
75
- # TODO: check the search id signature.
76
73
  searches_from_history.find(params[:search_id])
77
74
  rescue ActiveRecord::RecordNotFound
78
75
  nil
@@ -126,9 +123,7 @@ module Blacklight::SearchContext
126
123
 
127
124
  session[:history].unshift(search.id)
128
125
 
129
- if session[:history].length > blacklight_config.search_history_window
130
- session[:history] = session[:history].slice(0, blacklight_config.search_history_window)
131
- end
126
+ session[:history] = session[:history].slice(0, blacklight_config.search_history_window) if session[:history].length > blacklight_config.search_history_window
132
127
  end
133
128
 
134
129
  # A list of query parameters that should not be persisted for a search
@@ -6,9 +6,7 @@ module Blacklight::TokenBasedUser
6
6
  extend ActiveSupport::Concern
7
7
 
8
8
  included do
9
- if respond_to? :helper_method
10
- helper_method :encrypt_user_id
11
- end
9
+ helper_method :encrypt_user_id if respond_to? :helper_method
12
10
 
13
11
  rescue_from Blacklight::Exceptions::ExpiredSessionToken do
14
12
  head :unauthorized
@@ -32,9 +30,7 @@ module Blacklight::TokenBasedUser
32
30
  def decrypt_user_id(encrypted_user_id)
33
31
  user_id, timestamp = message_encryptor.decrypt_and_verify(encrypted_user_id)
34
32
 
35
- if timestamp < 1.hour.ago
36
- raise Blacklight::Exceptions::ExpiredSessionToken
37
- end
33
+ raise Blacklight::Exceptions::ExpiredSessionToken if timestamp < 1.hour.ago
38
34
 
39
35
  user_id
40
36
  end
@@ -10,15 +10,19 @@ module Blacklight::CatalogHelperBehavior
10
10
 
11
11
  # @param [Hash] options
12
12
  # @option options :route_set the route scope to use when constructing the link
13
- # @return [String]
13
+ # @return [String, nil] nil if the rss view has been removed from the configuration
14
14
  def rss_feed_link_tag(options = {})
15
+ return unless blacklight_config.view.key?(:rss)
16
+
15
17
  auto_discovery_link_tag(:rss, feed_link_url('rss', options), title: t('blacklight.search.rss_feed'))
16
18
  end
17
19
 
18
20
  # @param [Hash] options
19
21
  # @option options :route_set the route scope to use when constructing the link
20
- # @return [String]
22
+ # @return [String, nil] nil if the atom view has been removed from the configuration
21
23
  def atom_feed_link_tag(options = {})
24
+ return unless blacklight_config.view.key?(:atom)
25
+
22
26
  auto_discovery_link_tag(:atom, feed_link_url('atom', options), title: t('blacklight.search.atom_feed'))
23
27
  end
24
28
 
@@ -81,9 +85,7 @@ module Blacklight::CatalogHelperBehavior
81
85
  offset ||= @response.start if @response
82
86
  offset ||= 0
83
87
 
84
- unless render_grouped_response?
85
- idx + 1 + offset
86
- end
88
+ idx + 1 + offset unless render_grouped_response?
87
89
  end
88
90
 
89
91
  ##
@@ -119,7 +121,7 @@ module Blacklight::CatalogHelperBehavior
119
121
  # @return [Boolean]
120
122
  def show_pagination? response = nil
121
123
  response ||= @response
122
- response.limit_value > 0
124
+ response.limit_value.positive?
123
125
  end
124
126
 
125
127
  # Render an html <title> appropriate string for a selected facet field and values
@@ -167,9 +169,7 @@ module Blacklight::CatalogHelperBehavior
167
169
  end
168
170
  end
169
171
 
170
- if search_state.filters.any?
171
- constraints += search_state.filters.collect { |filter| render_search_to_page_title_filter(filter.key, filter.values) }
172
- end
172
+ constraints += search_state.filters.collect { |filter| render_search_to_page_title_filter(filter.key, filter.values) } if search_state.filters.any?
173
173
 
174
174
  constraints.join(t('blacklight.search.page_title.joiner'))
175
175
  end
@@ -6,7 +6,6 @@ module Blacklight::UrlHelperBehavior
6
6
  # Uses the catalog_path route to create a link to the show page for an item.
7
7
  # catalog_path accepts a hash. The solr query params are stored in the session,
8
8
  # so we only need the +counter+ param here. We also need to know if we are viewing to document as part of search results.
9
- # TODO: move this to the IndexPresenter
10
9
  # @param doc [SolrDocument] the document
11
10
  # @param field_or_opts [Hash, String] either a string to render as the link text or options
12
11
  # @param opts [Hash] the options to create the link with
@@ -61,9 +60,7 @@ module Blacklight::UrlHelperBehavior
61
60
  def session_tracking_path document, params = {}
62
61
  return if document.nil? || !blacklight_config.track_search_session.storage
63
62
 
64
- if main_app.respond_to?(controller_tracking_method)
65
- return main_app.public_send(controller_tracking_method, params.merge(id: document))
66
- end
63
+ return main_app.public_send(controller_tracking_method, params.merge(id: document)) if main_app.respond_to?(controller_tracking_method)
67
64
 
68
65
  raise "Unable to find #{controller_tracking_method} route helper. " \
69
66
  "Did you add `concerns :searchable` routing mixin to your `config/routes.rb`?"
@@ -102,9 +99,7 @@ module Blacklight::UrlHelperBehavior
102
99
  end
103
100
  label = opts.delete(:label)
104
101
 
105
- if link_url =~ /bookmarks/
106
- label ||= t('blacklight.back_to_bookmarks')
107
- end
102
+ label ||= t('blacklight.back_to_bookmarks') if link_url =~ /bookmarks/
108
103
 
109
104
  label ||= t('blacklight.back_to_search')
110
105
 
@@ -1,17 +1,19 @@
1
1
  import CheckboxSubmit from 'blacklight-frontend/checkbox_submit'
2
2
 
3
3
  const BookmarkToggle = (e) => {
4
- const elementType = e.target.getAttribute('data-checkboxsubmit-target');
4
+ const elementType = e.target.getAttribute('data-checkboxsubmit-target')
5
5
  if (elementType == 'checkbox' || elementType == 'label') {
6
- const form = e.target.closest('form');
7
- if (form) new CheckboxSubmit(form).clicked(e);
8
- if (e.code == 'Space') e.preventDefault();
6
+ const form = e.target.closest('form')
7
+ if (form) new CheckboxSubmit(form).clicked()
8
+ if (e.code == 'Space') e.preventDefault()
9
9
  }
10
- };
10
+ }
11
11
 
12
- document.addEventListener('click', BookmarkToggle);
12
+ document.addEventListener('click', BookmarkToggle)
13
13
  document.addEventListener('keydown', function (e) {
14
- if (e.key === 'Enter' || e.code == 'Space') { BookmarkToggle(e); } }
15
- );
14
+ if (e.key === 'Enter' || e.code == 'Space') {
15
+ BookmarkToggle(e)
16
+ }
17
+ })
16
18
 
17
19
  export default BookmarkToggle