blacklight 8.0.0.beta5 → 8.0.0.beta6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/Gemfile +0 -4
  4. data/README.md +1 -1
  5. data/Rakefile +18 -0
  6. data/VERSION +1 -1
  7. data/app/assets/config/blacklight/manifest.js +3 -0
  8. data/app/assets/stylesheets/blacklight/_facets.scss +32 -5
  9. data/app/assets/stylesheets/blacklight/blacklight_defaults.scss +1 -1
  10. data/app/components/blacklight/document_component.rb +21 -2
  11. data/app/components/blacklight/response/facet_group_component.html.erb +2 -1
  12. data/app/helpers/blacklight/blacklight_helper_behavior.rb +0 -5
  13. data/app/javascript/blacklight/bookmark_toggle.js +8 -15
  14. data/app/javascript/blacklight/button_focus.js +10 -10
  15. data/app/javascript/blacklight/index.js +5 -5
  16. data/app/javascript/blacklight/modal.js +6 -11
  17. data/app/javascript/blacklight/search_context.js +51 -57
  18. data/app/models/concerns/blacklight/document.rb +11 -0
  19. data/app/views/catalog/_document.html.erb +2 -2
  20. data/app/views/layouts/blacklight/base.html.erb +4 -4
  21. data/blacklight.gemspec +1 -1
  22. data/config/importmap.rb +1 -1
  23. data/config/locales/blacklight.ar.yml +209 -226
  24. data/config/locales/blacklight.de.yml +197 -209
  25. data/config/locales/blacklight.en.yml +2 -0
  26. data/config/locales/blacklight.es.yml +196 -209
  27. data/config/locales/blacklight.fr.yml +196 -213
  28. data/config/locales/blacklight.hu.yml +193 -206
  29. data/config/locales/blacklight.it.yml +197 -209
  30. data/config/locales/blacklight.nl.yml +193 -206
  31. data/config/locales/blacklight.pt-BR.yml +195 -209
  32. data/config/locales/blacklight.sq.yml +193 -206
  33. data/config/locales/blacklight.zh.yml +194 -207
  34. data/lib/blacklight/configuration/view_config.rb +0 -4
  35. data/lib/blacklight/engine.rb +6 -7
  36. data/lib/generators/blacklight/assets/importmap_generator.rb +9 -2
  37. data/lib/generators/blacklight/assets/propshaft_generator.rb +11 -2
  38. data/lib/generators/blacklight/assets/sprockets_generator.rb +2 -0
  39. data/package.json +7 -4
  40. data/rollup.config.js +11 -1
  41. data/spec/features/sitelinks_search_box_spec.rb +13 -0
  42. data/spec/models/blacklight/icon_spec.rb +0 -2
  43. data/spec/spec_helper.rb +1 -1
  44. data/spec/support/view_component_test_helpers.rb +21 -0
  45. data/spec/test_app_templates/Gemfile.extra +4 -0
  46. data/spec/views/catalog/_document.html.erb_spec.rb +21 -0
  47. data/tasks/blacklight.rake +1 -1
  48. metadata +7 -10
  49. data/app/assets/javascripts/blacklight/blacklight.esm.js +0 -390
  50. data/app/assets/javascripts/blacklight/blacklight.esm.js.map +0 -1
  51. data/app/assets/javascripts/blacklight/blacklight.js +0 -398
  52. data/app/assets/javascripts/blacklight/blacklight.js.map +0 -1
  53. data/spec/features/sitelinks_search_box.rb +0 -13
  54. data/spec/support/view_component_capybara_test_helpers.rb +0 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e3c3bcd542b381b1d7e4c00c653ad1556d4bd2119e1372a3c8545acef980cff
4
- data.tar.gz: 285b2f3e0cb5909d696ef91d110b8afcb6e62ca28c0c887cded18df16398c645
3
+ metadata.gz: ccd45650da142937ce72464e061e05ed63793c553e0d0676d139010dd218cb44
4
+ data.tar.gz: 5221c9746cf8c4168444c57ca18062be9a6cb95743a58ea53040056ccf8bdee9
5
5
  SHA512:
6
- metadata.gz: 795eca6d0f26f1e9441d84f1ce7ced56f2f8b459f3ef41a5c34f5c293aab47c43c57e0147b8c57a4051f6be9f1442aea7696c586c4ab41f6b7aa70a0495a5de0
7
- data.tar.gz: 00efe72d6d5fdeaf914d667cdd6ac2e278e7083ae6dc4cdaaf3db60a3f7df606617f2df2615fbc28840746404a94f072b1ff20df0c82095246e5869fa9b2abf9
6
+ metadata.gz: 6dc2e36331089bcd0404a3a34c3a8bf71d6fa103c19a65f7e94620e14ac41a5f8ccfe8c1b750a305bbb7db051c323a7410b693a137579073f776e65debd76c5b
7
+ data.tar.gz: fb238384ea2c98c6e442b6706c473766118e83e860d3d4509e45b4cd50e993e22da8f67b29d61b4f4a40e6a9502cb8b07f822129ff9f3348f6c5c40cd210ee66
data/.gitignore CHANGED
@@ -17,3 +17,4 @@ pkg/*
17
17
  /spec/examples.txt
18
18
  node_modules/*
19
19
  package-lock.json
20
+ /app/assets/javascripts/blacklight
data/Gemfile CHANGED
@@ -32,10 +32,6 @@ else
32
32
  end
33
33
  end
34
34
 
35
- unless ENV['VIEW_COMPONENT_VERSION'].to_s == ""
36
- gem 'view_component', ENV.fetch('VIEW_COMPONENT_VERSION')
37
- end
38
-
39
35
  case ENV['RAILS_VERSION'].to_s
40
36
  when /^(~> ?)?6\.0/
41
37
  gem 'sass-rails', '>= 6'
data/README.md CHANGED
@@ -60,7 +60,7 @@ components in the gem are changed, this bundle should be rebuild with the
60
60
  following steps:
61
61
  1. [Install npm](https://www.npmjs.com/get-npm)
62
62
  1. run `npm install` to download dependencies
63
- 1. run `npm run js-compile-bundle` to build the bundle
63
+ 1. run `npm run prepare` to build the bundle
64
64
  1. run `npm publish` to push the javascript package to https://npmjs.org/package/blacklight-frontend
65
65
 
66
66
  ## Using the javascript
data/Rakefile CHANGED
@@ -10,6 +10,24 @@ end
10
10
 
11
11
  Bundler::GemHelper.install_tasks
12
12
 
13
+ # Hook up our NPM tasks to the standard uild and release tasks
14
+ Rake::Task['build'].enhance(['build:npm'])
15
+ Rake::Task['release'].enhance(['release:npm'])
16
+
17
+ # rubocop:disable Rails/RakeEnvironment
18
+ desc 'build javascript assets'
19
+ task 'build:npm' do
20
+ sh 'npm install'
21
+ sh 'npm run prepare'
22
+ end
23
+
24
+ desc "Publish javascript assets to npm\n" \
25
+ "To prevent publishing in NPM use e.g. `npm_push=no rake release`"
26
+ task 'release:npm' do
27
+ sh 'npm publish' unless %w[n no nil false off 0].include?(ENV["npm_push"].to_s.downcase)
28
+ end
29
+ # rubocop:enable Rails/RakeEnvironment
30
+
13
31
  load "tasks/blacklight.rake"
14
32
  load "lib/railties/blacklight.rake"
15
33
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 8.0.0.beta5
1
+ 8.0.0.beta6
@@ -0,0 +1,3 @@
1
+ //= link_tree ../../images
2
+ //= link_directory ../../stylesheets .css
3
+ //= link_tree ../../../javascript .js
@@ -1,16 +1,36 @@
1
1
  .sidenav {
2
+ --bl-facets-smallish-padding: .25rem;
3
+ --bl-facets-smallish-border: var(--bs-border-width) solid var(--bs-border-color);
4
+ --bl-facets-smallish-margin-bottom: #{$spacer};
5
+ --bl-facets-smallish-border-radius: #{$border-radius};
6
+
2
7
  .navbar-toggler {
3
- border-color: $navbar-light-toggler-border-color;
8
+ --bs-navbar-toggler-padding-x: #{$navbar-toggler-padding-x};
9
+ --bs-navbar-toggler-padding-y: #{$navbar-toggler-padding-y};
10
+ --bs-navbar-toggler-border-color: #{$navbar-light-toggler-border-color};
11
+ --bs-navbar-toggler-border-radius: #{$navbar-toggler-border-radius};
4
12
  color: $navbar-light-active-color;
5
13
 
6
14
  &:hover,
7
15
  &:focus {
8
16
  color: $navbar-light-active-color;
9
17
  }
10
- }
11
18
 
12
- .navbar-toggler-icon {
13
- background-image: $navbar-light-toggler-icon-bg;
19
+ [data-hide-label] {
20
+ display: inline;
21
+ }
22
+ [data-show-label] {
23
+ display: none;
24
+ }
25
+
26
+ &[aria-expanded="false"] {
27
+ [data-hide-label] {
28
+ display: none;
29
+ }
30
+ [data-show-label] {
31
+ display: inline;
32
+ }
33
+ }
14
34
  }
15
35
  }
16
36
 
@@ -19,9 +39,16 @@
19
39
  $next: breakpoint-next($breakpoint, $grid-breakpoints);
20
40
  $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
21
41
 
42
+
22
43
  &#{$infix} {
23
- @include media-breakpoint-up($next) {
44
+ @include media-breakpoint-down($next) {
45
+ border: var(--bl-facets-smallish-border);
46
+ padding: var(--bl-facets-smallish-padding);
47
+ margin-bottom: var(--bl-facets-smallish-margin-bottom);
48
+ border-radius: var(--bl-facets-smallish-border-radius);
24
49
 
50
+ }
51
+ @include media-breakpoint-up($next) {
25
52
  // scss-lint:disable ImportantRule
26
53
  .facets-collapse {
27
54
  display: block !important;
@@ -14,4 +14,4 @@ $remove-icon-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helveti
14
14
 
15
15
  $facet-active-border: $success !default;
16
16
  $facet-active-bg: $success !default;
17
- $facet-active-item-color: $success !default;
17
+ $facet-active-item-color: $success !default;
@@ -3,7 +3,23 @@
3
3
  require 'view_component/version'
4
4
 
5
5
  module Blacklight
6
+ ##
7
+ # A component for rendering a single document
8
+ #
9
+ # @note when subclassing this component, you must explicitly specify the collection parameter
10
+ # as `document` and handle the `document` parameter in your initializer.
11
+ #
12
+ # @example
13
+ # class MyDocumentComponent < Blacklight::DocumentComponent
14
+ # with_collection_parameter :document
15
+ #
16
+ # def initialize(document:, **kwargs)
17
+ # super(document: document, **kwargs)
18
+ # end
19
+ # end
6
20
  class DocumentComponent < Blacklight::Component
21
+ with_collection_parameter :document
22
+
7
23
  # ViewComponent 3 changes iteration counters to begin at 0 rather than 1
8
24
  COLLECTION_INDEX_OFFSET = ViewComponent::VERSION::MAJOR < 3 ? 0 : 1
9
25
 
@@ -63,6 +79,7 @@ module Blacklight
63
79
 
64
80
  # rubocop:disable Metrics/ParameterLists
65
81
  # @param document [Blacklight::DocumentPresenter]
82
+ # @param presenter [Blacklight::DocumentPresenter] alias for document
66
83
  # @param partials [Array, nil] view partial names that should be used to provide content for the `partials` slot
67
84
  # @param id [String] HTML id for the root element
68
85
  # @param classes [Array, String] additional HTML classes for the root element
@@ -72,11 +89,13 @@ module Blacklight
72
89
  # @param document_counter [Number, nil] provided by ViewComponent collection iteration
73
90
  # @param counter_offset [Number] the offset of the start of the collection counter parameter for the component to the overall result set
74
91
  # @param show [Boolean] are we showing only a single document (vs a list of search results); used for backwards-compatibility
75
- def initialize(document: nil, partials: nil,
92
+ def initialize(document: nil, presenter: nil, partials: nil,
76
93
  id: nil, classes: [], component: :article, title_component: nil,
77
94
  counter: nil, document_counter: nil, counter_offset: 0,
78
95
  show: false, **args)
79
- @presenter = document || args[self.class.collection_parameter]
96
+ Blacklight.deprecation.warn('the `presenter` argument to DocumentComponent#initialize is deprecated; pass the `presenter` in as document instead') if presenter
97
+
98
+ @presenter = presenter || document || args[self.class.collection_parameter]
80
99
  @document = @presenter.document
81
100
  @view_partials = partials || []
82
101
 
@@ -17,7 +17,8 @@
17
17
  expanded: 'false',
18
18
  label: t('blacklight.search.facets.group.toggle'),
19
19
  } do %>
20
- <span class="navbar-toggler-icon"></span>
20
+ <span data-show-label><%= t('blacklight.search.facets.group.open') %></span>
21
+ <span data-hide-label><%= t('blacklight.search.facets.group.close') %></span>
21
22
  <% end %>
22
23
  </div>
23
24
 
@@ -37,9 +37,4 @@ module Blacklight::BlacklightHelperBehavior
37
37
  self.formats = old_formats
38
38
  nil
39
39
  end
40
-
41
- # @return [Class]
42
- def search_bar_presenter_class
43
- blacklight_config.view_config(action_name: :index).search_bar_presenter_class
44
- end
45
40
  end
@@ -1,19 +1,12 @@
1
- import Blacklight from './core'
2
- import CheckboxSubmit from './checkbox_submit'
1
+ import CheckboxSubmit from 'blacklight/checkbox_submit'
3
2
 
4
- const BookmarkToggle = (() => {
5
- // change form submit toggle to checkbox
6
- Blacklight.doBookmarkToggleBehavior = function() {
7
- document.addEventListener('click', (e) => {
8
- if (e.target.matches('[data-checkboxsubmit-target="checkbox"]')) {
9
- const form = e.target.closest('form')
10
- if (form) new CheckboxSubmit(form).clicked(e);
11
- }
12
- });
13
- };
14
- Blacklight.doBookmarkToggleBehavior.selector = 'form.bookmark-toggle';
3
+ const BookmarkToggle = (e) => {
4
+ if (e.target.matches('[data-checkboxsubmit-target="checkbox"]')) {
5
+ const form = e.target.closest('form')
6
+ if (form) new CheckboxSubmit(form).clicked(e);
7
+ }
8
+ };
15
9
 
16
- Blacklight.doBookmarkToggleBehavior();
17
- })()
10
+ document.addEventListener('click', BookmarkToggle);
18
11
 
19
12
  export default BookmarkToggle
@@ -1,12 +1,12 @@
1
- const ButtonFocus = (() => {
2
- document.addEventListener('click', (e) => {
3
- // Button clicks should change focus. As of 10/3/19, Firefox for Mac and
4
- // Safari both do not set focus to a button on button click.
5
- // See https://zellwk.com/blog/inconsistent-button-behavior/ for background information
6
- if (e.target.matches('[data-toggle="collapse"]') || e.target.matches('[data-bs-toggle="collapse"]')) {
7
- e.target.focus()
8
- }
9
- })
10
- })()
1
+ const ButtonFocus = (e) => {
2
+ // Button clicks should change focus. As of 10/3/19, Firefox for Mac and
3
+ // Safari both do not set focus to a button on button click.
4
+ // See https://zellwk.com/blog/inconsistent-button-behavior/ for background information
5
+ if (e.target.matches('[data-toggle="collapse"]') || e.target.matches('[data-bs-toggle="collapse"]')) {
6
+ e.target.focus()
7
+ }
8
+ }
9
+
10
+ document.addEventListener('click', ButtonFocus)
11
11
 
12
12
  export default ButtonFocus
@@ -1,8 +1,8 @@
1
- import BookmarkToggle from './bookmark_toggle'
2
- import ButtonFocus from './button_focus'
3
- import Modal from './modal'
4
- import SearchContext from './search_context'
5
- import Core from './core'
1
+ import BookmarkToggle from 'blacklight/bookmark_toggle'
2
+ import ButtonFocus from 'blacklight/button_focus'
3
+ import Modal from 'blacklight/modal'
4
+ import SearchContext from 'blacklight/search_context'
5
+ import Core from 'blacklight/core'
6
6
 
7
7
  export default {
8
8
  BookmarkToggle,
@@ -52,17 +52,10 @@
52
52
  can be a turbo-stream that defines some HTML fragementsand where on the page to put them:
53
53
  https://turbo.hotwired.dev/handbook/streams
54
54
  */
55
- import Blacklight from './core'
56
- import ModalForm from './modalForm'
55
+ import ModalForm from 'blacklight/modalForm'
57
56
 
58
57
  const Modal = (() => {
59
- // We keep all our data in Blacklight.modal object.
60
- // Create lazily if someone else created first.
61
- if (Blacklight.modal === undefined) {
62
- Blacklight.modal = {};
63
- }
64
-
65
- const modal = Blacklight.modal
58
+ const modal = {}
66
59
 
67
60
  // a Bootstrap modal div that should be already on the page hidden
68
61
  modal.modalSelector = '#blacklight-modal';
@@ -147,20 +140,22 @@ const Modal = (() => {
147
140
  };
148
141
 
149
142
  modal.hide = function (el) {
150
- const dom = document.querySelector(Blacklight.modal.modalSelector)
143
+ const dom = document.querySelector(modal.modalSelector)
151
144
 
152
145
  if (!dom.open) return
153
146
  dom.close()
154
147
  }
155
148
 
156
149
  modal.show = function(el) {
157
- const dom = document.querySelector(Blacklight.modal.modalSelector)
150
+ const dom = document.querySelector(modal.modalSelector)
158
151
 
159
152
  if (dom.open) return
160
153
  dom.showModal()
161
154
  }
162
155
 
163
156
  modal.setupModal()
157
+
158
+ return modal;
164
159
  })()
165
160
 
166
161
  export default Modal
@@ -1,59 +1,53 @@
1
- import Blacklight from './core'
2
-
3
- const SearchContext = (() => {
4
- Blacklight.doSearchContextBehavior = function() {
5
- document.addEventListener('click', (e) => {
6
- if (e.target.matches('[data-context-href]')) {
7
- Blacklight.handleSearchContextMethod.call(e.target, e)
8
- }
9
- })
10
- };
11
-
12
- Blacklight.csrfToken = () => document.querySelector('meta[name=csrf-token]')?.content
13
- Blacklight.csrfParam = () => document.querySelector('meta[name=csrf-param]')?.content
14
-
15
- // this is the Rails.handleMethod with a couple adjustments, described inline:
16
- // first, we're attaching this directly to the event handler, so we can check for meta-keys
17
- Blacklight.handleSearchContextMethod = function(event) {
18
- const link = this
19
-
20
- // instead of using the normal href, we need to use the context href instead
21
- let href = link.getAttribute('data-context-href')
22
- let target = link.getAttribute('target')
23
- let csrfToken = Blacklight.csrfToken()
24
- let csrfParam = Blacklight.csrfParam()
25
- let form = document.createElement('form')
26
- form.method = 'post'
27
- form.action = href
28
-
29
-
30
- let formContent = `<input name="_method" value="post" type="hidden" />
31
- <input name="redirect" value="${link.getAttribute('href')}" type="hidden" />`
32
-
33
- // check for meta keys.. if set, we should open in a new tab
34
- if(event.metaKey || event.ctrlKey) {
35
- target = '_blank';
36
- }
37
-
38
- if (csrfParam !== undefined && csrfToken !== undefined) {
39
- formContent += `<input name="${csrfParam}" value="${csrfToken}" type="hidden" />`
40
- }
41
-
42
- // Must trigger submit by click on a button, else "submit" event handler won't work!
43
- // https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit
44
- formContent += '<input type="submit" />'
45
-
46
- if (target) { form.setAttribute('target', target); }
47
-
48
- form.style.display = 'none'
49
- form.innerHTML = formContent
50
- document.body.appendChild(form)
51
- form.querySelector('[type="submit"]').click()
52
-
53
- event.preventDefault()
54
- };
55
-
56
- Blacklight.doSearchContextBehavior();
57
- })()
1
+ const SearchContext = (e) => {
2
+ if (e.target.matches('[data-context-href]')) {
3
+ SearchContext.handleSearchContextMethod.call(e.target, e)
4
+ }
5
+ }
6
+
7
+ SearchContext.csrfToken = () => document.querySelector('meta[name=csrf-token]')?.content
8
+ SearchContext.csrfParam = () => document.querySelector('meta[name=csrf-param]')?.content
9
+
10
+ // this is the Rails.handleMethod with a couple adjustments, described inline:
11
+ // first, we're attaching this directly to the event handler, so we can check for meta-keys
12
+ SearchContext.handleSearchContextMethod = function(event) {
13
+ const link = this
14
+
15
+ // instead of using the normal href, we need to use the context href instead
16
+ let href = link.getAttribute('data-context-href')
17
+ let target = link.getAttribute('target')
18
+ let csrfToken = SearchContext.csrfToken()
19
+ let csrfParam = SearchContext.csrfParam()
20
+ let form = document.createElement('form')
21
+ form.method = 'post'
22
+ form.action = href
23
+
24
+
25
+ let formContent = `<input name="_method" value="post" type="hidden" />
26
+ <input name="redirect" value="${link.getAttribute('href')}" type="hidden" />`
27
+
28
+ // check for meta keys.. if set, we should open in a new tab
29
+ if(event.metaKey || event.ctrlKey) {
30
+ target = '_blank';
31
+ }
32
+
33
+ if (csrfParam !== undefined && csrfToken !== undefined) {
34
+ formContent += `<input name="${csrfParam}" value="${csrfToken}" type="hidden" />`
35
+ }
36
+
37
+ // Must trigger submit by click on a button, else "submit" event handler won't work!
38
+ // https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit
39
+ formContent += '<input type="submit" />'
40
+
41
+ if (target) { form.setAttribute('target', target); }
42
+
43
+ form.style.display = 'none'
44
+ form.innerHTML = formContent
45
+ document.body.appendChild(form)
46
+ form.querySelector('[type="submit"]').click()
47
+
48
+ event.preventDefault()
49
+ };
50
+
51
+ document.addEventListener('click', SearchContext)
58
52
 
59
53
  export default SearchContext
@@ -31,6 +31,17 @@ module Blacklight::Document
31
31
  class_attribute :inspector_fields, default: [:_source]
32
32
  end
33
33
 
34
+ Email = Module.new do
35
+ def self.included(mod)
36
+ Blacklight.deprecation.warn("Blacklight::Document::Email is deprecated and will be removed (included in #{mod}).")
37
+ end
38
+ end
39
+ Sms = Module.new do
40
+ def self.included(mod)
41
+ Blacklight.deprecation.warn("Blacklight::Document::Sms is deprecated and will be removed (included in #{mod}).")
42
+ end
43
+ end
44
+
34
45
  attr_reader :response, :_source
35
46
  alias_method :solr_response, :response
36
47
 
@@ -1,4 +1,4 @@
1
1
  <% # container for a single doc -%>
2
- <% view_config = local_assigns[:view_config] || blacklight_config.view_config(document_index_view_type) %>
3
- <% document_component = blacklight_config.view_config(:show).document_component -%>
2
+ <% view_config = local_assigns[:view_config] || blacklight_config.view_config(document_index_view_type, action_name: action_name) %>
3
+ <% document_component = view_config.document_component -%>
4
4
  <%= render document_component.new(document_component.collection_parameter => document_presenter(document), counter: document_counter_with_offset(document_counter), partials: view_config&.partials) %>
@@ -19,16 +19,16 @@
19
19
  <%= javascript_importmap_tags %>
20
20
  <% elsif defined? Propshaft %>
21
21
  <%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %>
22
- <% else %>
22
+ <% else %>
23
23
  <%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %>
24
24
  <%= javascript_include_tag "blacklight/blacklight", type: 'module' %>
25
+ <script type="module">
26
+ import githubAutoCompleteElement from 'https://cdn.skypack.dev/@github/auto-complete-element';
27
+ </script>
25
28
  <% end %>
26
29
 
27
30
  <%= csrf_meta_tags %>
28
31
  <%= content_for(:head) %>
29
- <script type="module">
30
- import githubAutoCompleteElement from 'https://cdn.skypack.dev/@github/auto-complete-element';
31
- </script>
32
32
  </head>
33
33
  <body class="<%= render_body_class %>">
34
34
  <nav id="skip-link" role="navigation" aria-label="<%= t('blacklight.skip_links.label') %>">
data/blacklight.gemspec CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  full text and/or metadata.)
18
18
  s.license = "Apache 2.0"
19
19
 
20
- s.files = `git ls-files -z`.split("\x0")
20
+ s.files = `git ls-files -z`.split("\x0") + Dir.glob("app/assets/javascript/blacklight/**/*")
21
21
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
22
22
  s.bindir = 'exe'
23
23
  s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
data/config/importmap.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- pin_all_from File.expand_path("../app/javascript/blacklight", __dir__)
3
+ pin_all_from File.expand_path("../app/javascript/blacklight", __dir__), under: "blacklight"