blacklight-spotlight 5.2.2 → 5.2.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.
@@ -138,7 +138,7 @@ $image-overlay-max-height: 300px;
138
138
  width: 100%;
139
139
 
140
140
  .col-form-label {
141
- text-align: right;
141
+ text-align: end;
142
142
  }
143
143
 
144
144
  .browse-search-form {
@@ -3,12 +3,12 @@
3
3
  .btn.collapse-toggle {
4
4
  & + .collapse-chevron {
5
5
  display: inline-block;
6
- text-align: right;
6
+ text-align: end;
7
7
  transform: rotate(90deg);
8
8
  width: 16px;
9
9
  }
10
10
  &.collapsed + .collapse-chevron {
11
- text-align: left;
11
+ text-align: start;
12
12
  transform: none;
13
13
  }
14
14
  }
@@ -27,7 +27,7 @@
27
27
  display: none;
28
28
  }
29
29
  [data-expanded-add-button] {
30
- text-align: left;
30
+ text-align: start;
31
31
  }
32
32
  }
33
33
 
@@ -80,28 +80,6 @@
80
80
  }
81
81
  }
82
82
 
83
-
84
- .card.page-admin {
85
- &:hover {
86
- @include panel-hover-highlighting;
87
- }
88
- .card-title {
89
- @extend .mb-0;
90
- @extend .py-2;
91
- }
92
-
93
- .page-links, .contact-links {
94
- text-align: right;
95
- a {
96
- padding: 0 2px;
97
- }
98
- }
99
- .main {
100
- width: 99%;
101
- vertical-align: text-top;
102
- }
103
- }
104
-
105
83
  .contacts_admin .card-header.page .main {
106
84
  width: 95%;
107
85
  }
@@ -180,7 +158,7 @@ h1,h2,h3,h4,h5,h6 {
180
158
  .facet-metadata {
181
159
  @extend .text-muted;
182
160
  font-size: $font-size-base;
183
- text-align: right;
161
+ text-align: end;
184
162
  }
185
163
 
186
164
  table#exhibit-specific-fields {
@@ -210,7 +188,7 @@ table.users {
210
188
 
211
189
  table.tags {
212
190
  td:nth-child(2), th:nth-child(2) {
213
- text-align: right;
191
+ text-align: end;
214
192
  }
215
193
  td:nth-child(3), th:nth-child(3) {
216
194
  text-align: center;
@@ -34,10 +34,6 @@
34
34
  margin-bottom: 0;
35
35
  }
36
36
  }
37
-
38
- .navbar-form {
39
- text-align: right;
40
- }
41
37
  }
42
38
 
43
39
  .resource-masthead {
@@ -81,9 +81,6 @@ tr.dd-item {
81
81
  min-height: 3rem;
82
82
  }
83
83
  }
84
- .dd3-content.page-admin {
85
- position: relative;
86
- }
87
84
 
88
85
  .dd3-item > button { margin-left: 30px; }
89
86
 
@@ -8,6 +8,6 @@
8
8
 
9
9
  @include media-breakpoint-up(sm) {
10
10
  #new_contact_form .col-form-label {
11
- text-align: right;
11
+ text-align: end;
12
12
  }
13
13
  }
@@ -57,6 +57,10 @@
57
57
  display: block !important;
58
58
  }
59
59
 
60
+ .st-block-addition-top {
61
+ text-align: start;
62
+ }
63
+
60
64
  .st-block-controls {
61
65
  display: none !important;
62
66
  }
@@ -56,7 +56,7 @@
56
56
  left: initial;
57
57
  margin-left: 0;
58
58
  margin-right: 0;
59
- text-align: left;
59
+ text-align: start;
60
60
 
61
61
  &.col-sm-6 {
62
62
  @extend .col-sm-6;
@@ -44,7 +44,7 @@ module Spotlight
44
44
  views = @blacklight_configuration.default_blacklight_config.view.keys | [:show]
45
45
 
46
46
  @blacklight_configuration.blacklight_config.index_fields.keys.index_with do |_element|
47
- (%i[enabled label weight] | views)
47
+ %i[enabled label weight] | views
48
48
  end
49
49
  end
50
50
  end
@@ -55,7 +55,7 @@ module Spotlight
55
55
 
56
56
  def resource_params
57
57
  params.require(:resource).tap { |x| x['type'] ||= resource_class.name }
58
- .permit(:url, :type, *resource_class.stored_attributes[:data], data: params[:resource][:data].try(:keys))
58
+ .permit(:url, :type, *resource_class.stored_attributes[:data], data: params[:resource][:data].try(:keys))
59
59
  end
60
60
  end
61
61
  end
@@ -5,6 +5,7 @@ module Spotlight
5
5
  # General spotlight application helpers
6
6
  module ApplicationHelper
7
7
  include CrudLinkHelpers
8
+ include ExhibitThemeHelper
8
9
  include TitleHelper
9
10
  include MetaHelper
10
11
  include CropHelper
@@ -151,19 +152,6 @@ module Spotlight
151
152
  current_exhibit.blacklight_configuration.default_blacklight_config.view.to_h.reject { |_k, v| v.if == false }
152
153
  end
153
154
 
154
- def exhibit_stylesheet_link_tag(tag)
155
- if current_exhibit_theme && current_exhibit.theme != 'default'
156
- stylesheet_link_tag "#{tag}_#{current_exhibit_theme}"
157
- else
158
- Rails.logger.warn "Exhibit theme '#{current_exhibit_theme}' not in the list of available themes: #{current_exhibit.themes}"
159
- stylesheet_link_tag(tag)
160
- end
161
- end
162
-
163
- def current_exhibit_theme
164
- current_exhibit.theme if current_exhibit && current_exhibit.theme.present? && current_exhibit.themes.include?(current_exhibit.theme)
165
- end
166
-
167
155
  def render_search_bar
168
156
  return super if defined?(super)
169
157
 
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Spotlight
4
+ ##
5
+ # Exhibit theme/stylesheet helper
6
+ module ExhibitThemeHelper
7
+ def exhibit_stylesheet_link_tag(tag)
8
+ if current_exhibit_theme && current_exhibit&.theme != 'default'
9
+ stylesheet_link_tag "#{tag}_#{current_exhibit_theme}"
10
+ else
11
+ Rails.logger.debug { "Exhibit theme '#{current_exhibit_theme}' not in the list of available themes: #{current_exhibit&.themes}" }
12
+ stylesheet_link_tag(tag)
13
+ end
14
+ end
15
+
16
+ def current_exhibit_theme
17
+ current_exhibit.theme if current_exhibit && current_exhibit.theme.present? && current_exhibit.themes.include?(current_exhibit.theme)
18
+ end
19
+ end
20
+ end
@@ -5,6 +5,7 @@ module Spotlight
5
5
  # Helpers that are injected into the main application (because they used in layouts)
6
6
  module MainAppHelpers
7
7
  include Blacklight::DocumentHelperBehavior
8
+ include Spotlight::ExhibitThemeHelper
8
9
  include Spotlight::NavbarHelper
9
10
  include Spotlight::MastheadHelper
10
11
 
@@ -37,18 +38,5 @@ module Spotlight
37
38
  blacklight_config.view_config(action_name: :show).document_presenter_class
38
39
  end
39
40
  end
40
-
41
- def exhibit_stylesheet_link_tag(tag)
42
- if current_exhibit_theme && current_exhibit&.theme != 'default'
43
- stylesheet_link_tag "#{tag}_#{current_exhibit_theme}"
44
- else
45
- Rails.logger.debug { "Exhibit theme '#{current_exhibit_theme}' not in the list of available themes: #{current_exhibit&.themes}" }
46
- stylesheet_link_tag(tag)
47
- end
48
- end
49
-
50
- def current_exhibit_theme
51
- current_exhibit.theme if current_exhibit && current_exhibit.theme.present? && current_exhibit.themes.include?(current_exhibit.theme)
52
- end
53
41
  end
54
42
  end
@@ -24,13 +24,6 @@ module Spotlight
24
24
  Spotlight::TemporaryImage.find(upload_id).delete if upload_id.present?
25
25
  end
26
26
 
27
- after_save do
28
- if image.present?
29
- image.cache! unless image.cached?
30
- image.store!
31
- end
32
- end
33
-
34
27
  after_save :bust_containing_resource_caches
35
28
 
36
29
  attr_accessor :upload_id
@@ -7,11 +7,13 @@ module Spotlight
7
7
  class_attribute :indexing_pipeline, default: (Spotlight::Etl::Pipeline.new do |pipeline|
8
8
  pipeline.sources = [Spotlight::Etl::Sources::IdentitySource]
9
9
  pipeline.transforms = [
10
- reject_blank: Spotlight::Etl::Transforms::RejectBlank,
11
- reject_missing: Spotlight::Etl::Transforms::RejectMissingUniqueId,
12
- apply_exhibit_metadata: Spotlight::Etl::Transforms::ApplyExhibitMetadata,
13
- apply_application_metadata: Spotlight::Etl::Transforms::ApplyApplicationMetadata,
14
- apply_pipeline_metadata: Spotlight::Etl::Transforms::ApplyPipelineMetadata
10
+ {
11
+ reject_blank: Spotlight::Etl::Transforms::RejectBlank,
12
+ reject_missing: Spotlight::Etl::Transforms::RejectMissingUniqueId,
13
+ apply_exhibit_metadata: Spotlight::Etl::Transforms::ApplyExhibitMetadata,
14
+ apply_application_metadata: Spotlight::Etl::Transforms::ApplyApplicationMetadata,
15
+ apply_pipeline_metadata: Spotlight::Etl::Transforms::ApplyPipelineMetadata
16
+ }
15
17
  ]
16
18
  pipeline.loaders = [Spotlight::Etl::SolrLoader]
17
19
  end)
@@ -28,8 +28,8 @@ module Spotlight
28
28
  @resources ||=
29
29
  canvases
30
30
  .flat_map(&:items).select { |item| item.type == 'AnnotationPage' }
31
- .flat_map(&:items).select { |item| item.motivation == 'painting' }
32
- .flat_map(&:body)
31
+ .flat_map(&:items).select { |item| item.motivation == 'painting' }
32
+ .flat_map(&:body)
33
33
  .flat_map(&:service)
34
34
  end
35
35
 
data/config/importmap.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  pin_all_from File.expand_path('../app/javascript/spotlight', __dir__), under: 'spotlight'
4
4
  pin_all_from File.expand_path('../vendor/assets/javascripts', __dir__)
5
5
 
6
- pin 'clipboard', to: 'https://cdn.skypack.dev/clipboard@2.0.10'
7
- pin 'sir-trevor', to: 'https://cdn.skypack.dev/sir-trevor@0.8.2'
8
- pin 'sortablejs', to: 'https://cdn.skypack.dev/sortablejs@^1.15.3'
9
- pin '@github/auto-complete-element', to: 'https://cdn.skypack.dev/@github/auto-complete-element'
6
+ pin 'clipboard', to: 'https://cdn.jsdelivr.net/npm/clipboard@2.0.11/+esm'
7
+ pin 'sir-trevor', to: 'https://cdn.jsdelivr.net/npm/sir-trevor@0.8.2/+esm'
8
+ pin 'sortablejs', to: 'https://cdn.jsdelivr.net/npm/sortablejs@^1.15.3/+esm'
9
+ pin '@github/auto-complete-element', to: 'https://cdn.jsdelivr.net/npm/@github/auto-complete-element@3.8.0/+esm'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spotlight
4
- VERSION = '5.2.2'
4
+ VERSION = '5.2.3'
5
5
  end
@@ -12,6 +12,7 @@ module Spotlight
12
12
  view.send(:extend, Spotlight::TitleHelper)
13
13
  view.send(:extend, Spotlight::NavbarHelper)
14
14
  view.send(:extend, Spotlight::CropHelper)
15
+ view.send(:extend, Spotlight::ExhibitThemeHelper)
15
16
  view.send(:extend, Spotlight::PagesHelper)
16
17
  view.send(:extend, Blacklight::ComponentHelperBehavior)
17
18
  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.2.2
4
+ version: 5.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
@@ -129,7 +129,7 @@ dependencies:
129
129
  version: 2.2.1
130
130
  - - "<"
131
131
  - !ruby/object:Gem::Version
132
- version: '3'
132
+ version: '4'
133
133
  type: :runtime
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
@@ -139,7 +139,7 @@ dependencies:
139
139
  version: 2.2.1
140
140
  - - "<"
141
141
  - !ruby/object:Gem::Version
142
- version: '3'
142
+ version: '4'
143
143
  - !ruby/object:Gem::Dependency
144
144
  name: csv
145
145
  requirement: !ruby/object:Gem::Requirement
@@ -960,6 +960,7 @@ files:
960
960
  - app/helpers/spotlight/browse_helper.rb
961
961
  - app/helpers/spotlight/crop_helper.rb
962
962
  - app/helpers/spotlight/crud_link_helpers.rb
963
+ - app/helpers/spotlight/exhibit_theme_helper.rb
963
964
  - app/helpers/spotlight/job_trackers_helper.rb
964
965
  - app/helpers/spotlight/languages_helper.rb
965
966
  - app/helpers/spotlight/main_app_helpers.rb
@@ -1021,7 +1022,6 @@ files:
1021
1022
  - app/javascript/spotlight/admin/translation_progress.js
1022
1023
  - app/javascript/spotlight/admin/users.js
1023
1024
  - app/javascript/spotlight/admin/visibility_toggle.js
1024
- - app/javascript/spotlight/controllers/clipboard_controller.js~
1025
1025
  - app/javascript/spotlight/controllers/index.js
1026
1026
  - app/javascript/spotlight/controllers/tag_selector_controller.js
1027
1027
  - app/javascript/spotlight/core.js
@@ -1561,7 +1561,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1561
1561
  - !ruby/object:Gem::Version
1562
1562
  version: '0'
1563
1563
  requirements: []
1564
- rubygems_version: 3.6.7
1564
+ rubygems_version: 3.6.9
1565
1565
  specification_version: 4
1566
1566
  summary: Enable librarians, curators, and others who are responsible for digital collections
1567
1567
  to create attractive, feature-rich websites that feature these collections.
@@ -1,6 +0,0 @@
1
- import { Controller } from '@hotwired/stimulus'
2
-
3
- // Connects to data-controller="clipboard"
4
- export default class extends Controller {
5
-
6
- }