blacklight-spotlight 4.0.1 → 4.0.3

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.
@@ -30,8 +30,8 @@ SirTrevor.Blocks.Oembed = (function(){
30
30
  </div>
31
31
  <div class="row">
32
32
  <div class="form-group mb-3 col-md-8">
33
- <label for="${this.formId(id_key)}">${i18n.t("blocks:oembed:url")}</label>
34
- <input name="${id_key}" class="form-control col-md-6" type="text" id="${this.formId(id_key)}" />
33
+ <label for="${this.formId(this.id_key)}">${i18n.t("blocks:oembed:url")}</label>
34
+ <input name="${this.id_key}" class="form-control col-md-6" type="text" id="${this.formId(this.id_key)}" />
35
35
  </div>
36
36
  </div>
37
37
  ${this.text_area()}
@@ -12,8 +12,6 @@ SirTrevor.Blocks.SolrDocumentsCarousel = (function(){
12
12
  auto_play_images_interval_key: "auto-play-images-interval",
13
13
  max_height_key: "max-height",
14
14
 
15
- item_options: function() { return "" },
16
-
17
15
  carouselCycleTimesInSeconds: {
18
16
  values: [ 3, 5, 8, 12, 20 ],
19
17
  selected: 5
@@ -1,3 +1,5 @@
1
+ import { URLify } from 'parameterize';
2
+
1
3
  export default class {
2
4
  connect() {
3
5
  // auto-fill the exhibit slug on the new exhibit form
@@ -1,5 +1,5 @@
1
1
 
2
- (function($, undefined) {
2
+ (function($, _) {
3
3
  'use strict';
4
4
 
5
5
  /*
@@ -1,6 +1,5 @@
1
1
  // These scripts are in the vendor directory
2
2
  import 'nestable'
3
- import 'parameterize'
4
3
  import 'bootstrap-tagsinput'
5
4
  import 'jquery.serializejson'
6
5
  import 'leaflet-iiif'
@@ -66,7 +66,7 @@
66
66
  $('li', thumbList).each(function(){
67
67
  var thisThumb = $(this),
68
68
  image = $('img', thisThumb),
69
- totalWidth = width += thisThumb.width();
69
+ totalWidth = width += thisThumb.width(),
70
70
  position = (thumbList.position().left + totalWidth) - thisThumb.width();
71
71
 
72
72
  if(position >= 0 && position < viewportWidth) {
@@ -6,7 +6,7 @@ import { addImageSelector } from 'spotlight/admin/add_image_selector'
6
6
  addAutocompleteBehavior($(this));
7
7
  });
8
8
 
9
- function addAutocompleteBehavior( typeAheadInput, settings ) {
9
+ function addAutocompleteBehavior( typeAheadInput, _ ) {
10
10
  var settings = $.extend({
11
11
  displayKey: 'title',
12
12
  minLength: 0,
@@ -63,4 +63,4 @@ export function addAutocompletetoFeaturedImage(){
63
63
  $(this).attr('type', 'text');
64
64
  });
65
65
  }
66
- }
66
+ }
@@ -27,7 +27,7 @@ const Module = (function() {
27
27
  var children = data[i]['children'];
28
28
  for(var child in children){
29
29
  var id = children[child]['id']
30
- child_node = findNode(id, container);
30
+ var child_node = findNode(id, container);
31
31
  setWeight(child_node, weight++);
32
32
  setParent(child_node, parent_id);
33
33
  }
@@ -65,4 +65,4 @@ const Module = (function() {
65
65
  }
66
66
  })();
67
67
 
68
- export default Module
68
+ export default Module
@@ -100,24 +100,11 @@ module Spotlight
100
100
  # Ideally, we might create a join table to connect this model to where it is used, but 🤷‍♂️
101
101
  # Instead, we check each place this might be used and touch it
102
102
  def bust_containing_resource_caches
103
- if Rails.version > '6'
104
- Spotlight::Search.where(thumbnail: self).or(Spotlight::Search.where(masthead: self)).touch_all
105
- Spotlight::Page.where(thumbnail: self).touch_all
106
- Spotlight::Exhibit.where(thumbnail: self).or(Spotlight::Exhibit.where(masthead: self)).touch_all
107
- Spotlight::Contact.where(avatar: self).touch_all
108
- Spotlight::Resources::Upload.where(upload: self).touch_all
109
- else
110
- bust_containing_resource_caches_rails5
111
- end
112
- end
113
-
114
- # Rails 5 doesn't support touch_all.
115
- def bust_containing_resource_caches_rails5
116
- Spotlight::Search.where(thumbnail: self).or(Spotlight::Search.where(masthead: self)).find_each(&:touch)
117
- Spotlight::Page.where(thumbnail: self).find_each(&:touch)
118
- Spotlight::Exhibit.where(thumbnail: self).or(Spotlight::Exhibit.where(masthead: self)).find_each(&:touch)
119
- Spotlight::Contact.where(avatar: self).find_each(&:touch)
120
- Spotlight::Resources::Upload.where(upload: self).find_each(&:touch)
103
+ Spotlight::Search.where(thumbnail: self).or(Spotlight::Search.where(masthead: self)).touch_all
104
+ Spotlight::Page.where(thumbnail: self).touch_all
105
+ Spotlight::Exhibit.where(thumbnail: self).or(Spotlight::Exhibit.where(masthead: self)).touch_all
106
+ Spotlight::Contact.where(avatar: self).touch_all
107
+ Spotlight::Resources::Upload.where(upload: self).touch_all
121
108
  end
122
109
  end
123
110
  end
@@ -10,14 +10,6 @@ module Spotlight
10
10
  class_option :solr_update_class, type: :string, default: 'Spotlight::SolrDocument::AtomicUpdates'
11
11
  class_option :mailer_default_url_host, type: :string, default: '' # e.g. localhost:3000
12
12
 
13
- # we're not using webpacker, so we need to re-add sprockets functionality
14
- def add_js_rails6
15
- return unless Rails.version.to_i == 6
16
-
17
- # By default rails generates javascript_pack_tag, we'll change this to javascript_include_tag
18
- gsub_file 'app/views/layouts/application.html.erb', /pack/, 'include'
19
- end
20
-
21
13
  def add_manifest
22
14
  append_to_file 'app/assets/javascripts/application.js', "\n//= require_tree .\n"
23
15
  append_to_file 'app/assets/config/manifest.js', "\n//= link spotlight/manifest.js"
@@ -42,7 +34,7 @@ module Spotlight
42
34
 
43
35
  def riiif
44
36
  gem 'riiif'
45
- Bundler.with_clean_env { run 'bundle install' }
37
+ Bundler.with_unbundled_env { run 'bundle install' }
46
38
  route "mount Riiif::Engine => '/images', as: 'riiif'"
47
39
  copy_file 'config/initializers/riiif.rb'
48
40
  end
@@ -194,7 +186,7 @@ module Spotlight
194
186
 
195
187
  def bundle_install
196
188
  inside destination_root do
197
- Bundler.with_clean_env { run 'bundle install' }
189
+ Bundler.with_unbundled_env { run 'bundle install' }
198
190
  end
199
191
  end
200
192
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spotlight
4
- VERSION = '4.0.1'
4
+ VERSION = '4.0.3'
5
5
  end
@@ -135,3 +135,5 @@ function URLify(s, num_chars) {
135
135
  s = s.toLowerCase(); // convert to lowercase
136
136
  return s.substring(0, num_chars);// trim to first num_chars chars
137
137
  }
138
+
139
+ export { URLify };
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight-spotlight
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2024-09-10 00:00:00.000000000 Z
14
+ date: 2024-09-13 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activejob-status
@@ -459,7 +459,7 @@ dependencies:
459
459
  requirements:
460
460
  - - ">="
461
461
  - !ruby/object:Gem::Version
462
- version: '6.1'
462
+ version: '7.0'
463
463
  - - "<"
464
464
  - !ruby/object:Gem::Version
465
465
  version: '8'
@@ -469,7 +469,7 @@ dependencies:
469
469
  requirements:
470
470
  - - ">="
471
471
  - !ruby/object:Gem::Version
472
- version: '6.1'
472
+ version: '7.0'
473
473
  - - "<"
474
474
  - !ruby/object:Gem::Version
475
475
  version: '8'
@@ -1572,7 +1572,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1572
1572
  - !ruby/object:Gem::Version
1573
1573
  version: '0'
1574
1574
  requirements: []
1575
- rubygems_version: 3.5.9
1575
+ rubygems_version: 3.4.19
1576
1576
  signing_key:
1577
1577
  specification_version: 4
1578
1578
  summary: Enable librarians, curators, and others who are responsible for digital collections