arclight 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss +2 -2
- data/app/components/arclight/collection_sidebar_component.rb +1 -3
- data/app/models/arclight/parents.rb +1 -1
- data/app/models/concerns/arclight/solr_document.rb +2 -0
- data/lib/arclight/normalized_id.rb +4 -2
- data/lib/arclight/traject/ead2_config.rb +9 -1
- data/lib/arclight/version.rb +1 -1
- data/package.json +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdbe09a3fa39235bc0ad186308ec24b786c984e4abbcbabafb87e07ad2ebb8e3
|
4
|
+
data.tar.gz: fca899fbe2740f3f1220b59129297991b1975aa10a24ed1033c0e4b59bd870da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a6c9812f1e88a5150e3bb645e00092633ff8d67ba4075dc6654bad4baebd21abea209ae917a9c6babaa01387beffaabc8a45e3b37ac2fd83da1142f25fc0650
|
7
|
+
data.tar.gz: 6436d64454bd0ea806806265e333ca5c588875640f812773f4b41d7ae4495ff3baf5f4797bd86991e8ba262818756ea71f8f7851740c479be562638988fe9e2c
|
@@ -46,8 +46,8 @@ $hierarchy-view-collapse-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3
|
|
46
46
|
display: none;
|
47
47
|
}
|
48
48
|
|
49
|
-
turbo-frame[
|
50
|
-
&::
|
49
|
+
turbo-frame[busy] {
|
50
|
+
&::before {
|
51
51
|
@extend .placeholder !optional;
|
52
52
|
animation: placeholder-glow 2s ease-in-out infinite;
|
53
53
|
content: 'Loading...';
|
@@ -29,13 +29,11 @@ module Arclight
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def document_path
|
32
|
-
@document_path ||= solr_document_path(
|
32
|
+
@document_path ||= solr_document_path(document.collection_id)
|
33
33
|
end
|
34
34
|
|
35
35
|
def section_anchor(section)
|
36
36
|
"##{t("arclight.views.show.sections.#{section}").parameterize}"
|
37
37
|
end
|
38
|
-
|
39
|
-
delegate :normalized_eadid, to: :document
|
40
38
|
end
|
41
39
|
end
|
@@ -29,7 +29,7 @@ module Arclight
|
|
29
29
|
# @param [SolrDocument] document
|
30
30
|
def self.from_solr_document(document)
|
31
31
|
ids = document.parent_ids
|
32
|
-
legacy_ids = document.legacy_parent_ids.map { |legacy_id| document.
|
32
|
+
legacy_ids = document.legacy_parent_ids.map { |legacy_id| document.collection_id == legacy_id ? legacy_id : "#{document.collection_id}#{legacy_id}" }
|
33
33
|
labels = document.parent_labels
|
34
34
|
eadid = document.eadid
|
35
35
|
levels = document.parent_levels
|
@@ -7,6 +7,7 @@ module Arclight
|
|
7
7
|
extend ActiveSupport::Concern
|
8
8
|
|
9
9
|
included do
|
10
|
+
attribute :collection_id, :string, '_root_'
|
10
11
|
attribute :parent_ids, :array, 'parent_ids_ssim'
|
11
12
|
attribute :legacy_parent_ids, :array, 'parent_ssim'
|
12
13
|
Arclight.deprecation.deprecate_methods(self, legacy_parent_ids: 'Use `parent_ids` instead')
|
@@ -50,6 +51,7 @@ module Arclight
|
|
50
51
|
def normalized_eadid
|
51
52
|
Arclight::NormalizedId.new(eadid).to_s
|
52
53
|
end
|
54
|
+
Arclight.deprecation.deprecate_methods(self, normalized_eadid: 'Use `collection_id` instead')
|
53
55
|
|
54
56
|
def repository
|
55
57
|
first('repository_ssm') || collection&.first('repository_ssm')
|
@@ -5,9 +5,11 @@ require 'arclight/exceptions'
|
|
5
5
|
module Arclight
|
6
6
|
##
|
7
7
|
# A simple utility class to normalize identifiers
|
8
|
-
# to be used around the application for linking
|
9
8
|
class NormalizedId
|
10
|
-
|
9
|
+
# Accepts unused kwargs from the ead2_config.rb id to_field directive
|
10
|
+
# (:title and :repository) so that applications can provide a custom
|
11
|
+
# id_normalizer class to traject to form the collection id from these attributes.
|
12
|
+
def initialize(id, **_kwargs)
|
11
13
|
@id = id
|
12
14
|
end
|
13
15
|
|
@@ -6,6 +6,7 @@ require 'traject/nokogiri_reader'
|
|
6
6
|
require 'traject_plus'
|
7
7
|
require 'traject_plus/macros'
|
8
8
|
require 'arclight/level_label'
|
9
|
+
require 'arclight/normalized_id'
|
9
10
|
require 'arclight/normalized_date'
|
10
11
|
require 'arclight/normalized_title'
|
11
12
|
require 'active_model/conversion' ## Needed for Arclight::Repository
|
@@ -53,6 +54,7 @@ DID_SEARCHABLE_NOTES_FIELDS = %w[
|
|
53
54
|
|
54
55
|
settings do
|
55
56
|
provide 'component_traject_config', File.join(__dir__, 'ead2_component_config.rb')
|
57
|
+
provide 'id_normalizer', 'Arclight::NormalizedId'
|
56
58
|
provide 'date_normalizer', 'Arclight::NormalizedDate'
|
57
59
|
provide 'title_normalizer', 'Arclight::NormalizedTitle'
|
58
60
|
provide 'reader_class_name', 'Arclight::Traject::NokogiriNamespacelessReader'
|
@@ -75,7 +77,13 @@ end
|
|
75
77
|
# NOTE: All fields should be stored in Solr
|
76
78
|
# ==================
|
77
79
|
|
78
|
-
to_field 'id'
|
80
|
+
to_field 'id' do |record, accumulator|
|
81
|
+
id = record.at_xpath('/ead/eadheader/eadid')&.text
|
82
|
+
title = record.at_xpath('/ead/archdesc/did/unittitle')&.text
|
83
|
+
repository = settings['repository']
|
84
|
+
accumulator << settings['id_normalizer'].constantize.new(id, title: title, repository: repository).to_s
|
85
|
+
end
|
86
|
+
|
79
87
|
to_field 'title_filing_ssi', extract_xpath('/ead/eadheader/filedesc/titlestmt/titleproper[@type="filing"]')
|
80
88
|
to_field 'title_ssm', extract_xpath('/ead/archdesc/did/unittitle')
|
81
89
|
to_field 'title_tesim', extract_xpath('/ead/archdesc/did/unittitle')
|
data/lib/arclight/version.rb
CHANGED
data/package.json
CHANGED
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.1.
|
4
|
+
version: 1.1.4
|
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: 2024-
|
14
|
+
date: 2024-05-13 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: blacklight
|
@@ -501,7 +501,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
501
501
|
- !ruby/object:Gem::Version
|
502
502
|
version: '0'
|
503
503
|
requirements: []
|
504
|
-
rubygems_version: 3.
|
504
|
+
rubygems_version: 3.5.10
|
505
505
|
signing_key:
|
506
506
|
specification_version: 4
|
507
507
|
summary: A Blacklight-based environment to support discovery and delivery for archives
|