blacklight 8.12.1 → 8.12.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e7c5c3791e895034f3782f16728853d2cae3a3517579ab9def6f1a3f5018f00
4
- data.tar.gz: 2d9ab601664a1b7e674e797288178a729544797c8226993a97183cf1b915adae
3
+ metadata.gz: 6592c0578c2651658e7012e8aadef77cb583b97a69cc68a0ffe8749920f1a54e
4
+ data.tar.gz: 45565d8280de3f1f85da09bade7afb3db32ccad9f6c9681c27ff182abfd4c51f
5
5
  SHA512:
6
- metadata.gz: 3609874e5b4395ce2947cb4b9d596b3df32c2353d9127cd72e36a3b3a745f88c21d0d1669f6a65e5662e7aa839ff6f34bfb1b1e1dabfc46ccfe41b73ea781778
7
- data.tar.gz: 1d98c3c508e050b0f857a67f17e626bec9293ad28a0c901683e5d7fd9bdf2d1c923c8da0a728cebcd3b2a3f18647fbdffefa7f82d89483058f3283144c8cd045
6
+ metadata.gz: 86b5d7c753b1c5eccd3461fa33c8f28452c805ea7099616cfe245ea8956601a3d0dfcd3969c515d3316acbf5514912646f794ee5fc40a5fa243053b74869b495
7
+ data.tar.gz: fe202de6345e44ff87116b42738d187f1707827895bd7d0f63796653098623a3c4e0aff2d8ac1e73c18e46d4d95a365894335c14344510016708eeb5c0ab8733
data/VERSION CHANGED
@@ -1 +1 @@
1
- 8.12.1
1
+ 8.12.2
@@ -94,10 +94,11 @@ module Blacklight
94
94
  def initialize(document: nil, presenter: nil, partials: nil,
95
95
  id: nil, classes: [], component: :article, title_component: nil,
96
96
  counter: nil, document_counter: nil, counter_offset: 0,
97
- show: false)
97
+ show: false, **args)
98
98
  Blacklight.deprecation.warn('the `presenter` argument to DocumentComponent#initialize is deprecated; pass the `presenter` in as document instead') if presenter
99
99
 
100
- @presenter = presenter || document
100
+ # .collection_parameter only works in view_component3, and functionality removed in BL9
101
+ @presenter = presenter || document || (self.class.respond_to?(:collection_parameter) && args[self.class.collection_parameter])
101
102
  @document = @presenter.document
102
103
  @view_partials = partials || []
103
104
 
@@ -107,7 +108,8 @@ module Blacklight
107
108
  @classes = classes
108
109
 
109
110
  @counter = counter
110
- @document_counter = document_counter
111
+ # .collection_parameter only works in view_component3, and functionality removed in BL9
112
+ @document_counter = document_counter || (self.class.respond_to?(:collection_counter_parameter) && args.fetch(self.class.collection_counter_parameter, nil))
111
113
  @counter ||= @document_counter + COLLECTION_INDEX_OFFSET + counter_offset if @document_counter.present?
112
114
 
113
115
  @show = show
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blacklight-frontend",
3
- "version": "8.12.1",
3
+ "version": "8.12.2",
4
4
  "description": "The frontend code and styles for Blacklight",
5
5
  "main": "app/assets/javascripts/blacklight",
6
6
  "type": "module",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.12.1
4
+ version: 8.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Rochkind
@@ -17,7 +17,7 @@ authors:
17
17
  autorequire:
18
18
  bindir: exe
19
19
  cert_chain: []
20
- date: 2025-08-11 00:00:00.000000000 Z
20
+ date: 2025-08-18 00:00:00.000000000 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: rails