blacklight 9.0.0.beta5 → 9.0.0.beta6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 12c096c92dc90c0d2f3dc295c6939f7c3f35917f65e2d839a59bfa59ac968cf8
4
- data.tar.gz: c4c166756b77c8dfa539ac49350a0954291a66af4afacced7f1d24f3246e3921
3
+ metadata.gz: baebdbc097aba78d430f028c3875afebf2d6e8a63bce13a277eca15a65d3dc4c
4
+ data.tar.gz: 6351e5f68e6006791d4a1756b247972f75f883eca58b1caf11f2503776fba2a9
5
5
  SHA512:
6
- metadata.gz: ff215f20d5976b002d3a995369c2f55715d81d224df51e55eb94ec641d9517099584b0203891faa52bfce691f14567170b77ef0aa0332c9ecae4f763f2719ffa
7
- data.tar.gz: 7311e108958e4b83d5d3be4676be2e23151acb1838b0899ae86d08af1f4e1029e516828a9bd7de9226e63bc8d2a3a2bf952b122c3c1465d39b154042220e4397
6
+ metadata.gz: ab448aa816f33662d1b2c69cbc34ab4a67d0cc9b95840c569cd4c6ead9b9ad765f7ee8a8c93f15dca0f0146e145cb76cf0acefa108b9d0ed569f1667f1fb9c30
7
+ data.tar.gz: c607a5ff0b99656220b653e7fa6eccf8609006540570ab2cabe7aa984b9708e2d4540d83d2d101caa9a665b4659c28165963e1462dbe5b5606b242fd98a9c405
data/VERSION CHANGED
@@ -1 +1 @@
1
- 9.0.0.beta5
1
+ 9.0.0.beta6
@@ -44,8 +44,8 @@ class CheckboxSubmit {
44
44
  counter.innerHTML = json.bookmarks.count;
45
45
  });
46
46
 
47
- var e = new CustomEvent('bookmark.blacklight', { detail: { checked: this.checked } });
48
- window.dispatchEvent(e);
47
+ var e = new CustomEvent('bookmark.blacklight', { detail: { checked: this.checked }, bubbles: true });
48
+ this.formTarget.dispatchEvent(e);
49
49
  }).catch((error) => {
50
50
  this.handleError(error);
51
51
  });
@@ -340,6 +340,14 @@ const Modal = (() => {
340
340
  else if (e.target.matches(`${modal.modalSelector}`) || e.target.closest('[data-bl-dismiss="modal"]'))
341
341
  modal.hide();
342
342
  });
343
+
344
+ // Make sure user-agent dismissal of html 'dialog', etc `esc` key, triggers
345
+ // our hide logic, including events and scroll restoration.
346
+ modal.target().addEventListener('cancel', (e) => {
347
+ e.preventDefault(); // 'hide' will close the modal unless cancelled
348
+
349
+ modal.hide();
350
+ });
343
351
  };
344
352
 
345
353
  modal.hide = function (el) {
@@ -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\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-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=\"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\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,IAA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AI,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 }, 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","// 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=\"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 modal.target().addEventListener('cancel', (e) => {\n e.preventDefault(); // 'hide' will close the modal unless cancelled\n\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 Fac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ookmark.blacklight', { detail: { checked: this.checked } });
54
- window.dispatchEvent(e);
53
+ var e = new CustomEvent('bookmark.blacklight', { detail: { checked: this.checked }, bubbles: true });
54
+ this.formTarget.dispatchEvent(e);
55
55
  }).catch((error) => {
56
56
  this.handleError(error);
57
57
  });
@@ -346,6 +346,14 @@
346
346
  else if (e.target.matches(`${modal.modalSelector}`) || e.target.closest('[data-bl-dismiss="modal"]'))
347
347
  modal.hide();
348
348
  });
349
+
350
+ // Make sure user-agent dismissal of html 'dialog', etc `esc` key, triggers
351
+ // our hide logic, including events and scroll restoration.
352
+ modal.target().addEventListener('cancel', (e) => {
353
+ e.preventDefault(); // 'hide' will close the modal unless cancelled
354
+
355
+ modal.hide();
356
+ });
349
357
  };
350
358
 
351
359
  modal.hide = function (el) {
@@ -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/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-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=\"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\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":";;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACe,MAAM,cAAc,CAAC;EACpC,EAAE,WAAW,CAAC,IAAI,EAAE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,CAAC;AACJ;EACA;EACA;EACA,IAAI,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,SAAS,QAAQ,EAAE;EAC5C,EAAE,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,WAAW;EACjD,IAAI,IAAI,CAAC,QAAQ,GAAE;EACnB,GAAG,EAAC;EACJ,CAAC,EAAC;AACF;EACA,IAAI,CAAC,MAAM,CAAC,YAAY;EACxB,EAAE,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;AAChD;EACA;EACA;EACA,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO;AACpB;EACA,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,EAAC;EAChC,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAC;EAC1B,CAAC;;ACpCD,gBAAe;EACf,EAAE,cAAc;EAChB,EAAE,WAAW;EACb,EAAE,YAAY;EACd,EAAE,KAAK;EACP,EAAE,aAAa;EACf,EAAE,IAAI;EACN,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM;EACrB;;;;;;;;"}
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/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 }, 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","// 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=\"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 modal.target().addEventListener('cancel', (e) => {\n e.preventDefault(); // 'hide' will close the modal unless cancelled\n\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":";;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACe,MAAM,cAAc,CAAC;EACpC,EAAE,WAAW,CAAC,IAAI,EAAE;EACpB,IAAI,IAAI,CAAC,IAAI,GAAG,KAAI;EACpB,GAAG;AACH;EACA,EAAE,OAAO,CAAC,GAAG,EAAE;EACf,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,iBAAiB,EAAC;EACzE,IAAI,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;EAC1D,IAAI,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;EAC7D,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE;EAClD,MAAM,IAAI,EAAE,IAAI,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC;EACzC,MAAM,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE;EAClE,MAAM,OAAO,EAAE;EACf,QAAQ,QAAQ,EAAE,kBAAkB;EACpC,QAAQ,kBAAkB,EAAE,gBAAgB;EAC5C,QAAQ,cAAc,EAAE,QAAQ,CAAC,aAAa,CAAC,uBAAuB,CAAC,EAAE,OAAO;EAChF,OAAO;EACP,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAK;EAC1B,MAAM,IAAI,QAAQ,CAAC,EAAE,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,EAAE,aAAa;EACf,EAAE,IAAI;EACN,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM;EACrB;;;;;;;;"}
@@ -1,5 +1 @@
1
- <%= render(@layout.new(
2
- classes: (Array(@classes) + ["filter-#{@facet_item_presenter.key.parameterize}"]).join(' '),
3
- label: @facet_item_presenter.field_label,
4
- value: @facet_item_presenter.constraint_label,
5
- remove_path: @facet_item_presenter.remove_href)) %>
1
+ <%= render @layout.new(classes: classes, label: field_label, value: constraint_label, remove_path: remove_href) %>
@@ -4,10 +4,21 @@ module Blacklight
4
4
  class ConstraintComponent < Blacklight::Component
5
5
  with_collection_parameter :facet_item_presenter
6
6
 
7
+ # @param [Blacklight::FacetItemPresenter] facet_item_presenter
8
+ # @param [Array<String>] classes
9
+ # @param [Blacklight::ConstraintLayoutComponent] layout
7
10
  def initialize(facet_item_presenter:, classes: %w[filter mx-1], layout: Blacklight::ConstraintLayoutComponent)
8
11
  @facet_item_presenter = facet_item_presenter
9
12
  @classes = classes
10
13
  @layout = layout
11
14
  end
15
+
16
+ attr_accessor :facet_item_presenter
17
+
18
+ delegate :field_label, :constraint_label, :remove_href, to: :facet_item_presenter
19
+
20
+ def classes
21
+ @classes + ["filter-#{facet_item_presenter.key.parameterize}"]
22
+ end
12
23
  end
13
24
  end
@@ -85,7 +85,7 @@ module Blacklight
85
85
  if val.is_a?(Array)
86
86
  yield inclusive_facet_item_presenter(facet.config, val, facet.key) if val.any?(&:present?)
87
87
  else
88
- yield facet_item_presenter(facet.config, val, facet.key)
88
+ yield facet_item_presenter(facet.config, val)
89
89
  end
90
90
  end
91
91
  end
@@ -100,8 +100,10 @@ module Blacklight
100
100
  end
101
101
  end
102
102
 
103
- def facet_item_presenter(facet_config, facet_item, facet_field)
104
- facet_config.item_presenter.new(facet_item, facet_config, helpers, facet_field)
103
+ # @params [Blacklight::Configuration::FacetField] facet_config
104
+ # @params [String] facet_item the value of the facet item
105
+ def facet_item_presenter(facet_config, facet_item)
106
+ helpers.facet_field_presenter(facet_config, {}).item_presenter(facet_item)
105
107
  end
106
108
 
107
109
  def inclusive_facet_item_presenter(facet_config, facet_item, facet_field)
@@ -3,6 +3,7 @@
3
3
  module Blacklight
4
4
  module Facets
5
5
  class ListComponent < Blacklight::Component
6
+ # @param [Blacklight::FacetFieldPresenter] facet_field
6
7
  def initialize(facet_field:,
7
8
  classes: %w[facet-values list-unstyled],
8
9
  role: nil,
@@ -30,7 +31,7 @@ module Blacklight
30
31
  end
31
32
 
32
33
  def facet_item_presenter(facet_item)
33
- facet_config.item_presenter.new(facet_item, facet_config, helpers, @facet_field.key)
34
+ @facet_field.item_presenter(facet_item)
34
35
  end
35
36
 
36
37
  def facet_item_component_class
@@ -130,10 +130,12 @@ module Blacklight::CatalogHelperBehavior
130
130
  # @return [String]
131
131
  def render_search_to_page_title_filter(facet, values)
132
132
  facet_config = facet_configuration_for_field(facet)
133
- filter_label = facet_field_label(facet_config.key)
133
+ facet_presenter = facet_field_presenter(facet_config, {})
134
+ filter_label = facet_presenter.label
134
135
  filter_value = if values.size < 3
135
136
  values.map do |value|
136
- label = facet_item_presenter(facet_config, value, facet).label
137
+ item_presenter = facet_presenter.item_presenter(value)
138
+ label = item_presenter.label
137
139
  label = strip_tags(label) if label.html_safe?
138
140
  label
139
141
  end.to_sentence
@@ -15,18 +15,4 @@ module Blacklight::FacetsHelperBehavior
15
15
  .except(:page)
16
16
  url_for opts
17
17
  end
18
-
19
- private
20
-
21
- def facet_value_for_facet_item item
22
- if item.respond_to? :value
23
- item.value
24
- else
25
- item
26
- end
27
- end
28
-
29
- def facet_item_presenter(facet_config, facet_item, facet_field)
30
- facet_config.item_presenter.new(facet_item, facet_config, self, facet_field)
31
- end
32
18
  end
@@ -44,8 +44,8 @@ export default class CheckboxSubmit {
44
44
  counter.innerHTML = json.bookmarks.count;
45
45
  });
46
46
 
47
- var e = new CustomEvent('bookmark.blacklight', { detail: { checked: this.checked } });
48
- window.dispatchEvent(e)
47
+ var e = new CustomEvent('bookmark.blacklight', { detail: { checked: this.checked }, bubbles: true });
48
+ this.formTarget.dispatchEvent(e)
49
49
  }).catch((error) => {
50
50
  this.handleError(error)
51
51
  })
@@ -157,6 +157,14 @@ const Modal = (() => {
157
157
  else if (e.target.matches(`${modal.modalSelector}`) || e.target.closest('[data-bl-dismiss="modal"]'))
158
158
  modal.hide()
159
159
  })
160
+
161
+ // Make sure user-agent dismissal of html 'dialog', etc `esc` key, triggers
162
+ // our hide logic, including events and scroll restoration.
163
+ modal.target().addEventListener('cancel', (e) => {
164
+ e.preventDefault(); // 'hide' will close the modal unless cancelled
165
+
166
+ modal.hide();
167
+ });
160
168
  };
161
169
 
162
170
  modal.hide = function (el) {
@@ -7,6 +7,10 @@ module Blacklight
7
7
  delegate :key, :suggest, to: :facet_field
8
8
  delegate :field_name, to: :display_facet
9
9
 
10
+ # @param [Blacklight::Configuration::FacetField] facet_field
11
+ # @param [Blacklight::Solr::Response::Facets::FacetField] display_facet
12
+ # @param [#search_action_path,#facet_field_presenter] view_context
13
+ # @param [Blacklight::SearchState] search_state
10
14
  def initialize(facet_field, display_facet, view_context, search_state = view_context.search_state)
11
15
  @facet_field = facet_field
12
16
  @display_facet = display_facet
@@ -14,6 +18,11 @@ module Blacklight
14
18
  @search_state = search_state
15
19
  end
16
20
 
21
+ # @param [Blacklight::Solr::Response::Facets::FacetItem, String] facet_item
22
+ def item_presenter(facet_item)
23
+ facet_field.item_presenter.new(facet_item, facet_field, view_context, key, search_state)
24
+ end
25
+
17
26
  def collapsed?
18
27
  !active? && facet_field.collapse
19
28
  end
@@ -6,6 +6,12 @@ module Blacklight
6
6
 
7
7
  delegate :key, to: :facet_config
8
8
 
9
+ # @param [Array<String>] group
10
+ # @param [String] facet_item
11
+ # @param [Blacklight::Configuration::FacetField] facet_config
12
+ # @param [#search_action_path] view_context
13
+ # @param [String] facet_field
14
+ # @param [Blacklight::SearchState] search_state
9
15
  def initialize(group, facet_item, facet_config, view_context, facet_field, search_state = view_context.search_state)
10
16
  super(facet_item, facet_config, view_context, facet_field, search_state)
11
17
  @group = group
@@ -25,7 +25,7 @@ module Blacklight
25
25
  end
26
26
 
27
27
  def facet_item_presenter(facet_item)
28
- facet_config.item_presenter.new(facet_item, facet_config, view_context, facet_field, search_state)
28
+ facet_field_presenter.item_presenter(facet_item)
29
29
  end
30
30
 
31
31
  ##
@@ -6,6 +6,11 @@ module Blacklight
6
6
 
7
7
  delegate :key, to: :facet_config
8
8
 
9
+ # @param [Blacklight::Solr::Response::Facets::FacetItem, String] facet_item
10
+ # @param [Blacklight::Configuration::FacetField] facet_config
11
+ # @param [#search_action_path,#facet_field_presenter] view_context
12
+ # @param [String] facet_field the name of the facet field. Same as facet_config.key
13
+ # @param [Blacklight::SearchState] search_state
9
14
  def initialize(facet_item, facet_config, view_context, facet_field, search_state = view_context.search_state)
10
15
  @facet_item = facet_item
11
16
  @facet_config = facet_config
@@ -42,9 +42,11 @@ json.included do
42
42
  json.id facet.name
43
43
  json.attributes do
44
44
  facet_config = facet_configuration_for_field(facet.name)
45
- json.label facet_field_label(facet_config.key)
45
+ facet_presenter = facet_field_presenter(facet_config, facet)
46
+ json.label facet_presenter.label
46
47
  json.items do
47
48
  json.array! facet.items do |item|
49
+ item_presenter = facet_presenter.item_presenter(item)
48
50
  json.id
49
51
  json.attributes do
50
52
  json.label item.label
@@ -52,10 +54,10 @@ json.included do
52
54
  json.hits item.hits
53
55
  end
54
56
  json.links do
55
- if search_state.filter(facet_config).include?(facet_value_for_facet_item(item.value))
57
+ if search_state.filter(facet_config).include?(item.value)
56
58
  json.remove search_action_path(search_state.filter(facet.name).remove(item.value))
57
59
  else
58
- json.self facet_item_presenter(facet_config, item.value, facet.name).href(only_path: false)
60
+ json.self item_presenter.href(only_path: false)
59
61
  end
60
62
  end
61
63
  end
@@ -4,9 +4,15 @@ require 'spec_helper'
4
4
 
5
5
  RSpec.describe Blacklight::Facets::ListComponent, type: :component do
6
6
  before do
7
+ allow(facet_field).to receive(:item_presenter).and_return(item_presenter)
8
+
7
9
  render_inline(described_class.new(facet_field: facet_field))
8
10
  end
9
11
 
12
+ let(:item_presenter) do
13
+ facet_config.item_presenter.new('stuff', facet_config, vc_test_controller.view_context, facet_field.key)
14
+ end
15
+
10
16
  let(:facet_field) do
11
17
  instance_double(
12
18
  Blacklight::FacetFieldPresenter,
@@ -4,9 +4,15 @@ require 'spec_helper'
4
4
 
5
5
  RSpec.describe Blacklight::Facets::PivotListComponent, type: :component do
6
6
  before do
7
+ allow(facet_field).to receive(:item_presenter).and_return(item_presenter)
8
+
7
9
  render_inline(described_class.new(facet_field: facet_field))
8
10
  end
9
11
 
12
+ let(:item_presenter) do
13
+ facet_config.item_presenter.new('stuff', facet_config, vc_test_controller.view_context, facet_field.key)
14
+ end
15
+
10
16
  let(:facet_field) do
11
17
  instance_double(
12
18
  Blacklight::FacetFieldPresenter,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.0.beta5
4
+ version: 9.0.0.beta6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Rochkind
@@ -16,7 +16,7 @@ authors:
16
16
  - Justin Coyne
17
17
  bindir: exe
18
18
  cert_chain: []
19
- date: 1980-01-02 00:00:00.000000000 Z
19
+ date: 2025-07-23 00:00:00.000000000 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: rails
@@ -1023,7 +1023,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1023
1023
  - !ruby/object:Gem::Version
1024
1024
  version: '0'
1025
1025
  requirements: []
1026
- rubygems_version: 3.6.9
1026
+ rubygems_version: 3.6.3
1027
1027
  specification_version: 4
1028
1028
  summary: Blacklight provides a discovery interface for any Solr (http://lucene.apache.org/solr)
1029
1029
  index.