blacklight-gallery 4.4.0 → 4.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2a0883ccc5d8a704089cb412b638f5c23e8a4c99c17f975ed9783e5bf2e0f73
4
- data.tar.gz: a1535e02691bfcc2c282b5e4df8eb95d87f0f1a646b8c4d8aace0e5cba231b39
3
+ metadata.gz: 7744bdfee07565681b5a97da2ce04211bd23fc72aafcb57b1578a185fde775fe
4
+ data.tar.gz: dbda74765d58efa3dc60e8b06b184102c53a5bd53bfb4e83daf67df14dd6a85b
5
5
  SHA512:
6
- metadata.gz: 5e897d9dd4f500ca90f25ce99375ffd01b23627e1c1c3782c760c8d5393dd34164c3a77febf0adcab25efcee3e7d215d73fe79a0e1dd79241a593d8c0ab0ec64
7
- data.tar.gz: 2c2d9760850e5718537c471737d74719f3555f702df073c243438d93cfc09ddf6488abb4f2bc99fe8d5ed84b83cc57e9d1c79234e1aad97caabd5b0110f96eae
6
+ metadata.gz: b545ffac529924cd4844c3b88848fea59ec5d4dae3c3c9e36734e3aa2d4742b4298a7679d1475f7e1579f4c9ec849def3c4abf28b341741bac7946da2e968db2
7
+ data.tar.gz: b030ffa84501c52300ef27a736f457f29dc106b1a89e2242acc95323484cbfb316c932d45a41cc13c5edfdc9e4192dfba2ab5d541bef9bda43accde55cc4db72
@@ -43,7 +43,7 @@ jobs:
43
43
  BLACKLIGHT_VERSION: ${{ matrix.blacklight_version }}
44
44
  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 }}"
45
45
  steps:
46
- - uses: actions/checkout@v2
46
+ - uses: actions/checkout@v4
47
47
  - name: Set up Ruby ${{ matrix.ruby }}
48
48
  uses: ruby/setup-ruby@v1
49
49
  with:
@@ -84,10 +84,12 @@
84
84
  _this.play();
85
85
  });
86
86
 
87
- $(document).on('click', '[data-slide], [data-slide-to]', function(e) {
87
+ $(document).on('click', '[data-slide], [data-bs-slide], [data-slide-to], [data-bs-slide-to]', function(e) {
88
88
  e.preventDefault();
89
89
 
90
- pos = parseInt($(this).attr('data-slide-to'), 10) || $(this).attr('data-slide');
90
+ pos = parseInt($(this).attr('data-slide-to') || $(this).attr('data-bs-slide-to'), 10) ||
91
+ $(this).attr('data-slide') ||
92
+ $(this).attr('data-bs-slide');
91
93
 
92
94
  if (pos === 'next' || pos === 'prev') _this.pause();
93
95
  _this.to(pos);
@@ -4,6 +4,8 @@
4
4
  %>
5
5
  <%= render(component) do |component| %>
6
6
  <% component.with_body do %>
7
- <%= @view_context.link_to_document(@document, thumbnail, class: 'thumbnail', data: { 'context-href': nil, 'slide-to': @document_counter, toggle: "modal", target: "#slideshow-modal" }) %>
7
+ <%= @view_context.link_to_document(@document, thumbnail, class: 'thumbnail',
8
+ data: { 'context-href': nil, 'slide-to': @document_counter, 'bs-slide-to': @document_counter,
9
+ toggle: "modal", 'bs-toggle': "modal", target: "#slideshow-modal", 'bs-target': "#slideshow-modal" }) %>
8
10
  <% end %>
9
11
  <% end %>
@@ -14,10 +14,10 @@
14
14
  </div>
15
15
 
16
16
  <!-- Controls -->
17
- <a class="left carousel-control prev" href="#slideshow" data-slide="prev">
17
+ <a class="left carousel-control prev" href="#slideshow" data-slide="prev" data-bs-slide="prev">
18
18
  <%= render Blacklight::Gallery::Icons::ChevronLeftComponent.new additional_options: { label_context: 'previous_image' } %>
19
19
  </a>
20
- <a class="right carousel-control next" href="#slideshow" data-slide="next">
20
+ <a class="right carousel-control next" href="#slideshow" data-slide="next" data-bs-slide="next">
21
21
  <%= render Blacklight::Gallery::Icons::ChevronRightComponent.new additional_options: { label_context: 'next_image' } %>
22
22
  </a>
23
23
 
@@ -3,8 +3,8 @@
3
3
  <div class="modal-dialog modal-xl">
4
4
  <div class="modal-content">
5
5
  <div class="modal-header">
6
- <button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
7
- <span aria-hidden="true">&times;</span>
6
+ <button type="button" class="blacklight-modal-close btn-close close btn-close-white" data-dismiss="modal" data-bs-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
7
+ <span aria-hidden="true" class="visually-hidden">&times;</span>
8
8
  </button>
9
9
  </div>
10
10
  <div class="modal-body">
@@ -1,5 +1,5 @@
1
1
  module Blacklight
2
2
  module Gallery
3
- VERSION = "4.4.0"
3
+ VERSION = "4.5.0"
4
4
  end
5
5
  end
@@ -29,7 +29,7 @@ module BlacklightGallery
29
29
 
30
30
  def assets
31
31
  copy_file "blacklight_gallery.css.scss", "app/assets/stylesheets/blacklight_gallery.css.scss"
32
- append_to_file 'app/assets/config/manifest.js', "\n//= link blacklight_gallery/manifest.js"
32
+ append_to_file 'app/assets/config/manifest.js', "\n//= link blacklight_gallery/manifest.js\n"
33
33
  copy_file "blacklight_gallery.js", "app/assets/javascripts/blacklight_gallery.js"
34
34
 
35
35
  insert_into_file "app/assets/javascripts/application.js", after: '//= require blacklight/blacklight' do
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blacklight-gallery",
3
- "version": "4.3.0",
3
+ "version": "4.5.0",
4
4
  "description": "Gallery views for Blacklight search results",
5
5
  "main": "app/assets/javascripts/blacklight_gallery/default.js",
6
6
  "files": [
@@ -1,15 +1,15 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe "Slideshow", :js, :type => :feature do
3
+ RSpec.describe 'Slideshow', default_max_wait_time: 10, js: true do
4
4
 
5
- it "should open when one of the grid panes are clicked" do
6
- visit search_catalog_path( :q => 'medicine', :view => 'slideshow' )
7
- expect(page).to have_content "You searched for:"
8
- within ".view-type" do
9
- click_link "Slideshow"
5
+ it 'opens when one of the grid panes is clicked' do
6
+ visit search_catalog_path( q: 'medicine', view: 'slideshow' )
7
+ expect(page).to have_content 'You searched for:'
8
+ within '.view-type' do
9
+ click_link 'Slideshow'
10
10
  end
11
11
 
12
- find('.grid [data-slide-to="0"]').click
12
+ find('.grid [data-slide-to="0"], .grid [data-bs-slide-to="0"]').click
13
+ expect(page).to have_css('.slideshow-inner .item')
13
14
  end
14
-
15
15
  end
@@ -30,8 +30,9 @@ RSpec.describe "catalog/_document_slideshow", :type => :view do
30
30
  it 'has a modal' do
31
31
  render 'catalog/document_slideshow', view_config: view_config
32
32
  expect(rendered).to have_selector '#slideshow-modal'
33
- expect(rendered).to have_selector '[data-slide="prev"]'
34
- expect(rendered).to have_selector '[data-slide="next"]'
35
- expect(rendered).to have_selector '[data-slide-to="0"][data-toggle="modal"][data-target="#slideshow-modal"]'
33
+ expect(rendered).to have_selector '[data-slide="prev"][data-bs-slide="prev"]'
34
+ expect(rendered).to have_selector '[data-slide="next"][data-bs-slide="next"]'
35
+ expect(rendered).to have_selector '[data-slide-to="0"][data-bs-slide-to="0"][data-toggle="modal"]' \
36
+ '[data-bs-toggle="modal"][data-target="#slideshow-modal"]'
36
37
  end
37
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight-gallery
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.0
4
+ version: 4.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-09 00:00:00.000000000 Z
11
+ date: 2024-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -318,7 +318,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
318
318
  - !ruby/object:Gem::Version
319
319
  version: '0'
320
320
  requirements: []
321
- rubygems_version: 3.4.20
321
+ rubygems_version: 3.4.19
322
322
  signing_key:
323
323
  specification_version: 4
324
324
  summary: Gallery display for Blacklight