blacklight-gallery 6.0.0 → 6.1.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.
- checksums.yaml +4 -4
- data/.env +2 -0
- data/.github/workflows/ruby.yml +10 -26
- data/Gemfile +5 -12
- data/README.md +3 -5
- data/Rakefile +53 -32
- data/app/assets/config/blacklight_gallery/manifest.js +0 -1
- data/app/assets/javascripts/blacklight_gallery/blacklight-gallery.esm.js +959 -484
- data/app/assets/javascripts/blacklight_gallery/blacklight-gallery.esm.js.map +1 -1
- data/app/assets/javascripts/blacklight_gallery/blacklight-gallery.js +959 -484
- data/app/assets/javascripts/blacklight_gallery/blacklight-gallery.js.map +1 -1
- data/app/assets/stylesheets/blacklight_gallery/masonry.css +9 -3
- data/app/assets/stylesheets/blacklight_gallery/slideshow.css +2 -13
- data/app/components/blacklight/gallery/document_component.html.erb +1 -5
- data/app/components/blacklight/gallery/document_component.rb +0 -4
- data/app/components/blacklight/gallery/openseadragon_embed_component.rb +4 -5
- data/app/components/blacklight/gallery/slideshow_component.html.erb +1 -1
- data/app/components/blacklight/gallery/slideshow_component.rb +3 -6
- data/app/{views/catalog/_slideshow_modal.html.erb → components/blacklight/gallery/slideshow_modal_component.html.erb} +2 -3
- data/app/components/blacklight/gallery/slideshow_modal_component.rb +6 -0
- data/app/components/blacklight/gallery/slideshow_presenter_component.html.erb +14 -0
- data/app/components/blacklight/gallery/slideshow_presenter_component.rb +17 -0
- data/app/components/blacklight/gallery/slideshow_preview_component.html.erb +1 -5
- data/app/components/blacklight/gallery/slideshow_preview_component.rb +0 -13
- data/app/javascript/blacklight-gallery/grid-lanes-polyfill.js +1067 -0
- data/app/javascript/blacklight-gallery/index.js +18 -4
- data/app/views/catalog/_document_gallery.html.erb +1 -1
- data/app/views/catalog/_document_masonry.html.erb +1 -1
- data/app/views/catalog/_document_slideshow.html.erb +5 -25
- data/app/views/catalog/_openseadragon_default.html.erb +1 -1
- data/blacklight-gallery.gemspec +19 -20
- data/compose.yaml +18 -0
- data/config/importmap.rb +0 -1
- data/config/locales/blacklight-gallery.ar.yml +0 -3
- data/config/locales/blacklight-gallery.de.yml +3 -0
- data/config/locales/blacklight-gallery.en.yml +0 -3
- data/config/locales/blacklight-gallery.es.yml +3 -3
- data/config/locales/blacklight-gallery.fr.yml +3 -3
- data/config/locales/blacklight-gallery.it.yml +3 -3
- data/config/locales/blacklight-gallery.pt-BR.yml +3 -3
- data/config/locales/blacklight-gallery.zh.yml +3 -3
- data/lib/blacklight/gallery/version.rb +1 -1
- data/lib/generators/blacklight_gallery/install_generator.rb +15 -29
- data/package.json +2 -4
- data/rollup.config.js +13 -16
- data/spec/components/blacklight/gallery/document_component_spec.rb +2 -10
- data/spec/components/blacklight/gallery/openseadragon_embed_component_spec.rb +1 -6
- data/spec/components/blacklight/gallery/slideshow_component_spec.rb +28 -25
- data/spec/components/blacklight/gallery/slideshow_preview_component_spec.rb +3 -12
- data/spec/features/slideshow_spec.rb +23 -1
- data/spec/views/catalog/_document_slideshow.html.erb_spec.rb +6 -10
- metadata +49 -53
- data/app/components/blacklight/gallery/icons/pause_slideshow_component.rb +0 -18
- data/app/components/blacklight/gallery/icons/start_slideshow_component.rb +0 -18
- data/app/javascript/blacklight-gallery/masonry.js +0 -12
- data/app/javascript/blacklight-gallery/slideshow.js +0 -122
- data/vendor/assets/javascripts/imagesloaded.pkgd.js +0 -441
- data/vendor/assets/javascripts/masonry.min.js +0 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e46d19afef2a73a0d960fc1ad28a8ae3d6e3a226dc574471be1c741511ae9d02
|
|
4
|
+
data.tar.gz: 06eacaef480be2254d90bb5eee685983428c650992ac7d05a2271f43f6bf05a0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d83f792de40711259077f22f486ca0d13abb06c2ca7ae6bdfdd7bf304087adc5dfbf1b317b471abd283eaa60222d26de2bb8ccd2c7d7765adeb0354a3513d942
|
|
7
|
+
data.tar.gz: '095c95d7bf7009a46d89561554ffde63cc2a65f47d08b2ba5118206ab028913cb9078ebcc6485a18592b2e4d9dec4d23b44e402083d35a16e5ef7af42c908195'
|
data/.github/workflows/ruby.yml
CHANGED
|
@@ -13,43 +13,27 @@ jobs:
|
|
|
13
13
|
name: test (ruby ${{ matrix.ruby }} / rails ${{ matrix.rails_version }} / blacklight ${{ matrix.blacklight_version }} ${{ matrix.additional_name }})
|
|
14
14
|
strategy:
|
|
15
15
|
matrix:
|
|
16
|
-
ruby: ["3.
|
|
17
|
-
rails_version: ["8.
|
|
18
|
-
blacklight_version: ["~> 9.0
|
|
16
|
+
ruby: ["3.3", "3.4", "4.0"]
|
|
17
|
+
rails_version: ["8.1.3"]
|
|
18
|
+
blacklight_version: ["~> 9.0"]
|
|
19
19
|
experimental: [false]
|
|
20
20
|
additional_engine_cart_rails_options: [""] # default: propshaft, bootstrap, importmaps
|
|
21
21
|
additional_name: [""]
|
|
22
22
|
include:
|
|
23
23
|
- ruby: "3.4"
|
|
24
|
-
rails_version: "7.2.
|
|
25
|
-
blacklight_version: "~> 9.0.0beta1"
|
|
24
|
+
rails_version: "7.2.3.1"
|
|
26
25
|
experimental: false
|
|
27
|
-
|
|
28
|
-
additional_name: ""
|
|
29
|
-
- ruby: "3.2"
|
|
30
|
-
rails_version: "7.1.5.1"
|
|
31
|
-
blacklight_version: "~> 9.0.0beta1"
|
|
32
|
-
experimental: false
|
|
33
|
-
additional_engine_cart_rails_options: ""
|
|
34
|
-
additional_name: ""
|
|
35
|
-
- ruby: "3.4"
|
|
36
|
-
rails_version: "7.2.2.1"
|
|
37
|
-
blacklight_version: "github"
|
|
38
|
-
experimental: true
|
|
39
|
-
additional_engine_cart_rails_options: ""
|
|
40
|
-
additional_name: "/ Blacklight main"
|
|
26
|
+
additional_name: "Rails 7.2"
|
|
41
27
|
- ruby: "3.4"
|
|
42
|
-
rails_version: "8.0.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
additional_engine_cart_rails_options: ""
|
|
46
|
-
additional_name: "/ Blacklight main"
|
|
28
|
+
rails_version: "8.0.5"
|
|
29
|
+
experimental: false
|
|
30
|
+
additional_name: "Rails 8.0"
|
|
47
31
|
env:
|
|
48
32
|
RAILS_VERSION: ${{ matrix.rails_version }}
|
|
49
33
|
BLACKLIGHT_VERSION: ${{ matrix.blacklight_version }}
|
|
50
|
-
ENGINE_CART_RAILS_OPTIONS: "--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test ${{ matrix.additional_engine_cart_rails_options }}"
|
|
34
|
+
ENGINE_CART_RAILS_OPTIONS: "--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-kamal --skip-solid --skip-thruster --skip-docker --skip-test ${{ matrix.additional_engine_cart_rails_options }}"
|
|
51
35
|
steps:
|
|
52
|
-
- uses: actions/checkout@
|
|
36
|
+
- uses: actions/checkout@v6
|
|
53
37
|
- name: Set up Ruby ${{ matrix.ruby }}
|
|
54
38
|
uses: ruby/setup-ruby@v1
|
|
55
39
|
with:
|
data/Gemfile
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
source 'https://rubygems.org'
|
|
2
2
|
|
|
3
3
|
# Specify your gem's dependencies in blacklight-gallery.gemspec
|
|
4
|
-
gemspec
|
|
5
|
-
|
|
6
|
-
git_source(:github) do |repo_name|
|
|
7
|
-
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?('/')
|
|
8
|
-
"https://github.com/#{repo_name}.git"
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
|
|
4
|
+
gemspec path: File.expand_path(__dir__)
|
|
12
5
|
|
|
13
6
|
# BEGIN ENGINE_CART BLOCK
|
|
14
7
|
# engine_cart: 2.5.0
|
|
15
8
|
# engine_cart stanza: 2.5.0
|
|
16
9
|
# the below comes from engine_cart, a gem used to test this Rails engine gem in the context of a Rails app.
|
|
17
|
-
file = File.expand_path('Gemfile',
|
|
10
|
+
file = File.expand_path('Gemfile',
|
|
11
|
+
ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path('.internal_test_app',
|
|
12
|
+
File.dirname(__FILE__)))
|
|
18
13
|
if File.exist?(file)
|
|
19
14
|
begin
|
|
20
15
|
eval_gemfile file
|
|
@@ -36,6 +31,4 @@ else
|
|
|
36
31
|
end
|
|
37
32
|
# END ENGINE_CART BLOCK
|
|
38
33
|
|
|
39
|
-
unless File.exist?(file)
|
|
40
|
-
eval_gemfile File.expand_path('spec/test_app_templates/Gemfile.extra', File.dirname(__FILE__))
|
|
41
|
-
end
|
|
34
|
+
eval_gemfile File.expand_path('spec/test_app_templates/Gemfile.extra', File.dirname(__FILE__)) unless File.exist?(file)
|
data/README.md
CHANGED
|
@@ -11,7 +11,7 @@ Add this line to your Blacklight application's Gemfile:
|
|
|
11
11
|
|
|
12
12
|
And then execute:
|
|
13
13
|
|
|
14
|
-
$ bundle
|
|
14
|
+
$ bundle install
|
|
15
15
|
|
|
16
16
|
Or install it yourself as:
|
|
17
17
|
|
|
@@ -29,11 +29,9 @@ $ rails g blacklight_gallery:install
|
|
|
29
29
|
|
|
30
30
|
### Installation for Node-based JS bundlers
|
|
31
31
|
|
|
32
|
-
For node-based bundlers add
|
|
32
|
+
For node-based bundlers add this to your entrypoint:
|
|
33
33
|
```js
|
|
34
|
-
import 'blacklight-gallery
|
|
35
|
-
import 'blacklight-gallery/app/javascript/blacklight-gallery/slideshow'
|
|
36
|
-
import 'blacklight-gallery/app/javascript/blacklight-gallery/masonry'
|
|
34
|
+
import 'blacklight-gallery'
|
|
37
35
|
```
|
|
38
36
|
|
|
39
37
|
## Manual Installation
|
data/Rakefile
CHANGED
|
@@ -1,13 +1,42 @@
|
|
|
1
|
-
require
|
|
1
|
+
require 'bundler/gem_tasks'
|
|
2
2
|
|
|
3
3
|
APP_ROOT = File.dirname(__FILE__)
|
|
4
4
|
|
|
5
5
|
require 'rspec/core/rake_task'
|
|
6
6
|
require 'engine_cart/rake_task'
|
|
7
|
+
require 'open3'
|
|
8
|
+
|
|
9
|
+
def system_with_error_handling(*args)
|
|
10
|
+
Open3.popen3(*args) do |_stdin, stdout, stderr, thread|
|
|
11
|
+
puts stdout.read
|
|
12
|
+
raise "Unable to run #{args.inspect}: #{stderr.read}" unless thread.value.success?
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def with_solr(&block)
|
|
17
|
+
# We're being invoked by the app entrypoint script and solr is already up via docker compose
|
|
18
|
+
if ENV['SOLR_ENV'] == 'docker-compose'
|
|
19
|
+
yield
|
|
20
|
+
elsif system('docker compose version')
|
|
21
|
+
# We're not running `docker compose up' but still want to use a docker instance of solr.
|
|
22
|
+
begin
|
|
23
|
+
puts 'Starting Solr'
|
|
24
|
+
system_with_error_handling 'docker compose up -d solr'
|
|
25
|
+
yield
|
|
26
|
+
ensure
|
|
27
|
+
puts 'Stopping Solr'
|
|
28
|
+
system_with_error_handling 'docker compose stop solr'
|
|
29
|
+
end
|
|
30
|
+
else
|
|
31
|
+
SolrWrapper.wrap do |solr|
|
|
32
|
+
solr.with_collection(&block)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
7
36
|
|
|
8
37
|
RSpec::Core::RakeTask.new(:spec)
|
|
9
38
|
|
|
10
|
-
task :
|
|
39
|
+
task default: :ci
|
|
11
40
|
|
|
12
41
|
# Build with our opinionated defaults if none are provided.
|
|
13
42
|
rails_options = ENV.fetch('ENGINE_CART_RAILS_OPTIONS', '')
|
|
@@ -15,45 +44,37 @@ rails_options = "#{rails_options} -a propshaft" unless rails_options.match?(/-a\
|
|
|
15
44
|
rails_options = "#{rails_options} -j importmap" unless rails_options.match?(/-j\s|--javascript/)
|
|
16
45
|
ENV['ENGINE_CART_RAILS_OPTIONS'] = rails_options
|
|
17
46
|
|
|
18
|
-
desc
|
|
19
|
-
task :
|
|
47
|
+
desc 'Load fixtures'
|
|
48
|
+
task fixtures: ['engine_cart:generate'] do
|
|
20
49
|
within_test_app do
|
|
21
|
-
|
|
22
|
-
|
|
50
|
+
system 'rake blacklight:index:seed RAILS_ENV=test'
|
|
51
|
+
abort 'Error running fixtures' unless $?.success?
|
|
23
52
|
end
|
|
24
53
|
end
|
|
25
54
|
|
|
26
|
-
desc
|
|
27
|
-
task :ci
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
`bin/rails spec:prepare`
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
Rake::Task['fixtures'].invoke
|
|
37
|
-
Rake::Task['spec'].invoke
|
|
55
|
+
desc 'Execute Continuous Integration build'
|
|
56
|
+
task :ci do
|
|
57
|
+
with_solr do
|
|
58
|
+
Rake::Task['fixtures'].invoke
|
|
59
|
+
within_test_app do
|
|
60
|
+
# Precompiles the assets
|
|
61
|
+
`bin/rails spec:prepare`
|
|
38
62
|
end
|
|
63
|
+
Rake::Task['spec'].invoke
|
|
39
64
|
end
|
|
40
65
|
end
|
|
41
66
|
|
|
42
|
-
desc
|
|
67
|
+
desc 'Run Solr and Blacklight for interactive development'
|
|
43
68
|
task :server do
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
system "yarn build:css"
|
|
55
|
-
system "bundle exec rails s"
|
|
56
|
-
end
|
|
69
|
+
with_solr do
|
|
70
|
+
within_test_app do
|
|
71
|
+
# Set `FILE` to the local fixture so we get thumbnails
|
|
72
|
+
ENV['FILE'] = File.join(__dir__, 'spec', 'fixtures', 'sample_solr_documents.yml')
|
|
73
|
+
system 'rake blacklight:index:seed'
|
|
74
|
+
ENV.delete('FILE')
|
|
75
|
+
|
|
76
|
+
system 'yarn build:css'
|
|
77
|
+
system 'bundle exec rails s'
|
|
57
78
|
end
|
|
58
79
|
end
|
|
59
80
|
end
|