blacklight-spotlight 5.0.0.pre.alpha3 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -53,10 +53,10 @@ SirTrevor.Blocks.SolrDocumentsBase = (function(){
53
53
  var iiifFields = [
54
54
  '<input type="hidden" name="item[' + index + '][thumbnail_image_url]" value="' + (autocomplete_data.thumbnail_image_url || autocomplete_data.thumbnail || "") + '"/>',
55
55
  '<input type="hidden" name="item[' + index + '][full_image_url]" value="' + (autocomplete_data.full_image_url || autocomplete_data.thumbnail_image_url || autocomplete_data.thumbnail || "") + '"/>',
56
- '<input type="hidden" name="item[' + index + '][iiif_tilesource]" value="' + (autocomplete_data.iiif_tilesource) + '"/>',
57
- '<input type="hidden" name="item[' + index + '][iiif_manifest_url]" value="' + (autocomplete_data.iiif_manifest_url) + '"/>',
58
- '<input type="hidden" name="item[' + index + '][iiif_canvas_id]" value="' + (autocomplete_data.iiif_canvas_id) + '"/>',
59
- '<input type="hidden" name="item[' + index + '][iiif_image_id]" value="' + (autocomplete_data.iiif_image_id) + '"/>',
56
+ '<input type="hidden" name="item[' + index + '][iiif_tilesource]" value="' + (autocomplete_data.iiif_tilesource || "") + '"/>',
57
+ '<input type="hidden" name="item[' + index + '][iiif_manifest_url]" value="' + (autocomplete_data.iiif_manifest_url || "") + '"/>',
58
+ '<input type="hidden" name="item[' + index + '][iiif_canvas_id]" value="' + (autocomplete_data.iiif_canvas_id || "") + '"/>',
59
+ '<input type="hidden" name="item[' + index + '][iiif_image_id]" value="' + (autocomplete_data.iiif_image_id || "") + '"/>',
60
60
  ];
61
61
 
62
62
  // The region input is required for widgets that enable image cropping but not otherwise
@@ -34,10 +34,11 @@ export default class Iiif {
34
34
  it[Symbol.iterator] = function*() {
35
35
  for (let canvas of context.canvases()) {
36
36
  for (let image of canvas.images) {
37
- var iiifService = image.resource.service['@id'];
37
+ var iiifService = image.resource?.service || image.resource?.default?.service;
38
+ var iiifServiceId = iiifService['@id'];
38
39
  yield {
39
- 'thumb': iiifService + '/full/!100,100/0/default.jpg',
40
- 'tilesource': iiifService + '/info.json',
40
+ 'thumb': iiifServiceId + '/full/!100,100/0/default.jpg',
41
+ 'tilesource': iiifServiceId + '/info.json',
41
42
  'manifest': context.manifestUrl,
42
43
  'canvasId': canvas['@id'],
43
44
  'imageId': image['@id']
@@ -9,7 +9,7 @@ module Spotlight
9
9
 
10
10
  belongs_to :on, polymorphic: true
11
11
  belongs_to :resource, polymorphic: true
12
- belongs_to :user, optional: true, class_name: Spotlight::Engine.config.user_class # rubocop:disable Rails/ReflectionClassName
12
+ belongs_to :user, optional: true, class_name: Spotlight::Engine.config.user_class
13
13
  has_many :events, as: :resource, dependent: :delete_all
14
14
  has_many :job_trackers, as: :on, dependent: Rails.version > '6.1' ? :destroy_async : :destroy
15
15
  has_many :subevents, through: :job_trackers, source: :events
@@ -1 +1 @@
1
- <h2><%= sir_trevor_markdown heading_block.text %></h2>
1
+ <%= sir_trevor_markdown "## #{heading_block.text}" %>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spotlight
4
- VERSION = '5.0.0-alpha3'
4
+ VERSION = '5.0.0'
5
5
  end
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: 5.0.0.pre.alpha3
4
+ version: 5.0.0
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: 2025-02-26 00:00:00.000000000 Z
14
+ date: 2025-03-24 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activejob-status