arclight 1.5.0 → 1.6.1

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: 7371056b2eb8d6241d7113f46f593ce352afe9029c16eb6cc404bee31ebcf511
4
- data.tar.gz: ccb5c2b72c6c67441d74c358568bef14d6e35117ba92be77fb01989e01a80875
3
+ metadata.gz: 0f13bc74d37d6281e90bf79c295f073e46aa4de947dc07f6da865d2e32e41254
4
+ data.tar.gz: 93cda2083eeda622d16386a9e4f638a8c4401429d31232da6c774cfb2e53d652
5
5
  SHA512:
6
- metadata.gz: 3bc505687178b9dbac2d809def95a1fb3fe0bb156f577bb266bc1221c651d9c188b5288a1254f1b2e054484090e2fff5225ee46fa3cbabbf8f0ce493003de7d0
7
- data.tar.gz: e16678a9073c7a1c845586b968659016f62cfd7b0b8c543552c0ef29c9e92fcb38daf4c3b6f542531e57041ff26b79d2f44e661d58129898652a260bbfe1ba7f
6
+ metadata.gz: 8e380ef67a9684f47038c0b71a309ecbb9969fd754e2fb03b47ffd3f5c44649a8629db2d92a6b84e9d82a733a5f4d1d326f1c02928a7bc281d1411edecd5b107
7
+ data.tar.gz: c7634c62d9b3c2de19f1d1a0e010fc80fd67c1cf873f392a5020ea97540910aee178b8e214e9f43627a7649a2f4c1cb584cc1000f96042175dc982af2ff73f44
@@ -12,12 +12,8 @@ module Arclight
12
12
  end
13
13
 
14
14
  def call
15
- breadcrumb_links = components.drop(@offset)
15
+ return unless breadcrumb_links.any?
16
16
 
17
- if @count && breadcrumb_links.length > @count
18
- breadcrumb_links = breadcrumb_links.first(@count)
19
- breadcrumb_links << tag.li('&hellip;'.html_safe, class: 'breadcrumb-item')
20
- end
21
17
  tag.ol class: 'breadcrumb' do
22
18
  safe_join(breadcrumb_links)
23
19
  end
@@ -36,5 +32,19 @@ module Arclight
36
32
  def build_repository_link
37
33
  render Arclight::RepositoryBreadcrumbComponent.new(document: @document)
38
34
  end
35
+
36
+ private
37
+
38
+ def breadcrumb_links
39
+ @breadcrumb_links ||= limit_breadcrumb_links(components.drop(@offset))
40
+ end
41
+
42
+ def limit_breadcrumb_links(links)
43
+ return links unless @count && links.length > @count
44
+
45
+ limited_links = links.first(@count)
46
+ limited_links << tag.li('&hellip;'.html_safe, class: 'breadcrumb-item')
47
+ limited_links
48
+ end
39
49
  end
40
50
  end
@@ -268,6 +268,7 @@ end
268
268
 
269
269
  NAME_ELEMENTS.map do |selector|
270
270
  to_field 'names_ssim', extract_xpath("./controlaccess/#{selector}"), unique
271
+ to_field 'names_ssim', extract_xpath(".//#{selector}"), unique
271
272
  to_field "#{selector}_ssim", extract_xpath(".//#{selector}")
272
273
  end
273
274
 
@@ -79,9 +79,10 @@ end
79
79
 
80
80
  to_field 'id' do |record, accumulator|
81
81
  id = record.at_xpath('/ead/eadheader/eadid')&.text
82
+ unitid = record.at_xpath('/ead/archdesc/did/unitid')&.text
82
83
  title = record.at_xpath('/ead/archdesc/did/unittitle')&.text
83
84
  repository = settings['repository']
84
- accumulator << settings['id_normalizer'].constantize.new(id, title: title, repository: repository).to_s
85
+ accumulator << settings['id_normalizer'].constantize.new(id, unitid: unitid, title: title, repository: repository).to_s
85
86
  end
86
87
 
87
88
  to_field 'title_filing_ssi', extract_xpath('/ead/eadheader/filedesc/titlestmt/titleproper[@type="filing"]')
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Arclight
4
- VERSION = '1.5.0'
4
+ VERSION = '1.6.1'
5
5
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arclight",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "The frontend for arclight",
5
5
  "main": "app/assets/javascript/arclight/arclight.js",
6
6
  "files": ["app/assets"],
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arclight
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darren Hardy
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2025-05-13 00:00:00.000000000 Z
14
+ date: 2025-08-04 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: blacklight