arclight 1.0.0 → 1.6.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.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +22 -15
  3. data/.gitignore +1 -0
  4. data/.rubocop.yml +185 -26
  5. data/.solr_wrapper +2 -1
  6. data/README.md +4 -8
  7. data/app/assets/stylesheets/arclight/application.scss +1 -0
  8. data/app/assets/stylesheets/arclight/build.scss +4 -0
  9. data/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss +22 -18
  10. data/app/assets/stylesheets/arclight/modules/icons.scss +9 -4
  11. data/app/assets/stylesheets/arclight/modules/layout.scss +23 -14
  12. data/app/assets/stylesheets/arclight/modules/mastheads.scss +14 -45
  13. data/app/assets/stylesheets/arclight/modules/search_form.scss +9 -0
  14. data/app/assets/stylesheets/arclight/modules/search_results.scss +15 -16
  15. data/app/assets/stylesheets/arclight/modules/truncator.scss +2 -0
  16. data/app/components/arclight/access_component.rb +1 -1
  17. data/app/components/arclight/bookmark_component.html.erb +1 -1
  18. data/app/components/arclight/breadcrumb_component.rb +17 -7
  19. data/app/components/arclight/breadcrumbs_hierarchy_component.html.erb +2 -2
  20. data/app/components/arclight/breadcrumbs_hierarchy_component.rb +1 -1
  21. data/app/components/arclight/collection_context_component.rb +1 -1
  22. data/app/components/arclight/collection_info_component.rb +1 -1
  23. data/app/components/arclight/collection_sidebar_component.rb +2 -4
  24. data/app/components/arclight/document_collection_hierarchy_component.html.erb +8 -4
  25. data/app/components/arclight/document_component.html.erb +1 -1
  26. data/app/components/arclight/document_components_hierarchy_component.html.erb +5 -17
  27. data/app/components/arclight/document_components_hierarchy_component.rb +7 -1
  28. data/app/components/arclight/document_download_component.rb +1 -1
  29. data/app/components/arclight/embed_component.rb +2 -2
  30. data/app/components/arclight/expand_hierarchy_button_component.html.erb +5 -0
  31. data/app/components/arclight/expand_hierarchy_button_component.rb +16 -0
  32. data/app/components/arclight/group_component.html.erb +6 -2
  33. data/app/components/arclight/group_component.rb +1 -1
  34. data/app/components/arclight/index_metadata_field_component.html.erb +1 -2
  35. data/app/components/arclight/masthead_component.html.erb +8 -6
  36. data/app/components/arclight/metadata_section_component.rb +1 -1
  37. data/app/components/arclight/oembed_viewer_component.rb +1 -1
  38. data/app/components/arclight/online_content_filter_component.html.erb +1 -1
  39. data/app/components/arclight/online_content_filter_component.rb +2 -4
  40. data/app/components/arclight/online_status_indicator_component.rb +1 -1
  41. data/app/components/arclight/repository_breadcrumb_component.html.erb +1 -1
  42. data/app/components/arclight/repository_breadcrumb_component.rb +1 -1
  43. data/app/components/arclight/repository_location_component.html.erb +2 -2
  44. data/app/components/arclight/search_bar_component.html.erb +3 -1
  45. data/app/components/arclight/search_bar_component.rb +1 -1
  46. data/app/components/arclight/search_result_breadcrumbs_component.html.erb +6 -3
  47. data/app/components/arclight/search_result_title_component.html.erb +5 -3
  48. data/app/helpers/arclight/ead_format_helpers.rb +87 -0
  49. data/app/helpers/arclight_helper.rb +11 -0
  50. data/app/models/arclight/document_downloads.rb +1 -1
  51. data/app/models/arclight/parent.rb +3 -10
  52. data/app/models/arclight/parents.rb +6 -4
  53. data/app/models/concerns/arclight/solr_document.rb +14 -4
  54. data/app/views/catalog/_document_list.html.erb +8 -0
  55. data/app/views/catalog/_group.html.erb +1 -1
  56. data/app/views/shared/_main_menu_links.html.erb +1 -1
  57. data/arclight.gemspec +1 -2
  58. data/lib/arclight/normalized_date.rb +5 -10
  59. data/lib/arclight/normalized_id.rb +4 -2
  60. data/lib/arclight/repository.rb +1 -1
  61. data/lib/arclight/traject/ead2_component_config.rb +57 -14
  62. data/lib/arclight/traject/ead2_config.rb +57 -15
  63. data/lib/arclight/version.rb +1 -1
  64. data/lib/generators/arclight/install_generator.rb +41 -4
  65. data/lib/generators/arclight/templates/arclight.scss +6 -5
  66. data/lib/generators/arclight/templates/catalog_controller.rb +48 -5
  67. data/lib/generators/arclight/templates/config/locales/arclight.en.yml +8 -0
  68. data/lib/generators/arclight/templates/config/repositories.yml +2 -2
  69. data/package.json +6 -5
  70. data/solr/conf/schema.xml +13 -7
  71. data/solr/conf/solrconfig.xml +61 -44
  72. data/tasks/arclight.rake +9 -2
  73. data/template.rb +5 -5
  74. metadata +18 -21
@@ -5,9 +5,11 @@ require 'rails/generators'
5
5
  module Arclight
6
6
  ##
7
7
  # Arclight install generator
8
- class Install < Rails::Generators::Base
8
+ class Install < Rails::Generators::Base # rubocop:disable Metrics/ClassLength
9
9
  source_root File.expand_path('templates', __dir__)
10
10
 
11
+ class_option :test, type: :boolean, default: false, aliases: '-t', desc: 'Indicates that app will be installed in a test environment'
12
+
11
13
  def create_blacklight_catalog
12
14
  remove_file 'app/controllers/catalog_controller.rb'
13
15
  copy_file 'catalog_controller.rb', 'app/controllers/catalog_controller.rb'
@@ -22,7 +24,7 @@ module Arclight
22
24
  def install_blacklight_locale_picker
23
25
  gem 'blacklight-locale_picker'
24
26
 
25
- Bundler.with_clean_env do
27
+ Bundler.with_unbundled_env do
26
28
  run 'bundle install'
27
29
  end
28
30
 
@@ -41,9 +43,31 @@ module Arclight
41
43
  gsub_file 'config/routes.rb', 'root to: "catalog#index"', 'root to: "arclight/repositories#index"'
42
44
  end
43
45
 
44
- def copy_styles
46
+ def add_frontend
47
+ if ENV['CI']
48
+ run "yarn add file:#{Arclight::Engine.root}"
49
+ elsif options[:test]
50
+ run 'yarn link arclight'
51
+
52
+ # If a branch was specified (e.g. you are running a template.rb build
53
+ # against a test branch), use the latest version available on npm
54
+ elsif ENV['BRANCH']
55
+ run 'yarn add arclight@latest'
56
+
57
+ # Otherwise, pick the version from npm that matches the Arclight
58
+ # gem version
59
+ else
60
+ run "yarn add arclight@#{arclight_yarn_version}"
61
+ end
62
+ end
63
+
64
+ def add_stylesheets
45
65
  copy_file 'arclight.scss', 'app/assets/stylesheets/arclight.scss'
46
- remove_file 'app/assets/stylesheets/blacklight.scss' # Avoid two copies of bootstrap
66
+ append_to_file 'app/assets/stylesheets/application.bootstrap.scss' do
67
+ <<~CONTENT
68
+ @import "arclight";
69
+ CONTENT
70
+ end
47
71
  end
48
72
 
49
73
  def add_arclight_search_behavior
@@ -122,5 +146,18 @@ module Arclight
122
146
  def import_arclight_javascript
123
147
  append_to_file 'app/javascript/application.js', "\nimport \"arclight\""
124
148
  end
149
+
150
+ def package_yarn_version(package_name, requested_version)
151
+ versions = JSON.parse(`yarn info #{package_name} versions --json`)['data']
152
+ exact_match = versions.find { |v| v == requested_version }
153
+ return exact_match if exact_match
154
+
155
+ major_version = Gem::Version.new(requested_version).segments.first
156
+ "^#{major_version}"
157
+ end
158
+
159
+ def arclight_yarn_version
160
+ package_yarn_version('arclight', Arclight::VERSION)
161
+ end
125
162
  end
126
163
  end
@@ -1,5 +1,6 @@
1
- $breadcrumb-divider: quote("»");
2
- $logo-image: image_url('arclight/logo.png') !default;
3
- @import 'bootstrap';
4
- @import 'blacklight/blacklight';
5
- @import 'arclight/application';
1
+ :root {
2
+ --bs-breadcrumb-divider: "»";
3
+ }
4
+
5
+ // Arclight, imported from arclight frontend package
6
+ @import 'arclight/app/assets/stylesheets/arclight/application';
@@ -78,6 +78,7 @@ class CatalogController < ApplicationController
78
78
  config.show.embed_component = Arclight::EmbedComponent
79
79
  config.show.access_component = Arclight::AccessComponent
80
80
  config.show.online_status_component = Arclight::OnlineStatusIndicatorComponent
81
+ config.show.expand_hierarchy_component = Arclight::ExpandHierarchyButtonComponent
81
82
  config.show.display_type_field = 'level_ssm'
82
83
  # config.show.thumbnail_field = 'thumbnail_path_ss'
83
84
  config.show.document_presenter_class = Arclight::ShowPresenter
@@ -139,13 +140,13 @@ class CatalogController < ApplicationController
139
140
  # (note: It is case sensitive when searching values)
140
141
 
141
142
  config.add_facet_field 'collection', field: 'collection_ssim', limit: 10
142
- config.add_facet_field 'creator', field: 'creator_ssim', limit: 10
143
- config.add_facet_field 'date_range', field: 'date_range_ssim', range: true
143
+ config.add_facet_field 'creators', field: 'creator_ssim', limit: 10
144
+ config.add_facet_field 'date_range', field: 'date_range_isim', range: true
144
145
  config.add_facet_field 'level', field: 'level_ssim', limit: 10
145
146
  config.add_facet_field 'names', field: 'names_ssim', limit: 10
146
147
  config.add_facet_field 'repository', field: 'repository_ssim', limit: 10
147
- config.add_facet_field 'place', field: 'geogname_ssim', limit: 10
148
- config.add_facet_field 'subject', field: 'access_subjects_ssim', limit: 10
148
+ config.add_facet_field 'places', field: 'geogname_ssim', limit: 10
149
+ config.add_facet_field 'access_subjects', field: 'access_subjects_ssim', limit: 10
149
150
 
150
151
  # Have BL send all facet field names to Solr, which has been the default
151
152
  # previously. Simply remove these lines if you'd rather use Solr request
@@ -231,6 +232,20 @@ class CatalogController < ApplicationController
231
232
  pf: '${pf_title}'
232
233
  }
233
234
  end
235
+ config.add_search_field 'container', label: 'Container' do |field|
236
+ field.qt = 'search'
237
+ field.solr_parameters = {
238
+ qf: '${qf_container}',
239
+ pf: '${pf_container}'
240
+ }
241
+ end
242
+ config.add_search_field 'identifier', label: 'Identifier' do |field|
243
+ field.qt = 'search'
244
+ field.solr_parameters = {
245
+ qf: '${qf_identifier}',
246
+ pf: '${pf_identifier}'
247
+ }
248
+ end
234
249
 
235
250
  # These are the parameters passed through in search_state.params_for_search
236
251
  config.search_state_fields += %i[id group hierarchy_context original_document]
@@ -262,7 +277,7 @@ class CatalogController < ApplicationController
262
277
  # ===========================
263
278
 
264
279
  # Collection Show Page - Summary Section
265
- config.add_summary_field 'creators', field: 'creators_ssim', link_to_facet: true
280
+ config.add_summary_field 'creators', field: 'creator_ssim', link_to_facet: true
266
281
  config.add_summary_field 'abstract', field: 'abstract_html_tesm', helper_method: :render_html_tags
267
282
  config.add_summary_field 'extent', field: 'extent_ssm'
268
283
  config.add_summary_field 'language', field: 'language_ssim'
@@ -279,7 +294,13 @@ class CatalogController < ApplicationController
279
294
  config.add_background_field 'accruals', field: 'accruals_html_tesm', helper_method: :render_html_tags
280
295
  config.add_background_field 'phystech', field: 'phystech_html_tesm', helper_method: :render_html_tags
281
296
  config.add_background_field 'physloc', field: 'physloc_html_tesm', helper_method: :render_html_tags
297
+ config.add_background_field 'physdesc', field: 'physdesc_tesim', helper_method: :render_html_tags
298
+ config.add_background_field 'physfacet', field: 'physfacet_tesim', helper_method: :render_html_tags
299
+ config.add_background_field 'dimensions', field: 'dimensions_tesim', helper_method: :render_html_tags
300
+ config.add_background_field 'materialspec', field: 'materialspec_html_tesm', helper_method: :render_html_tags
301
+ config.add_background_field 'fileplan', field: 'fileplan_html_tesm', helper_method: :render_html_tags
282
302
  config.add_background_field 'descrules', field: 'descrules_ssm', helper_method: :render_html_tags
303
+ config.add_background_field 'note', field: 'note_html_tesm', helper_method: :render_html_tags
283
304
 
284
305
  # Collection Show Page - Related Section
285
306
  config.add_related_field 'relatedmaterial', field: 'relatedmaterial_html_tesm', helper_method: :render_html_tags
@@ -287,6 +308,7 @@ class CatalogController < ApplicationController
287
308
  config.add_related_field 'otherfindaid', field: 'otherfindaid_html_tesm', helper_method: :render_html_tags
288
309
  config.add_related_field 'altformavail', field: 'altformavail_html_tesm', helper_method: :render_html_tags
289
310
  config.add_related_field 'originalsloc', field: 'originalsloc_html_tesm', helper_method: :render_html_tags
311
+ config.add_related_field 'odd', field: 'odd_html_tesm', helper_method: :render_html_tags
290
312
 
291
313
  # Collection Show Page - Indexed Terms Section
292
314
  config.add_indexed_terms_field 'access_subjects', field: 'access_subjects_ssim', link_to_facet: true, separator_options: {
@@ -307,6 +329,9 @@ class CatalogController < ApplicationController
307
329
  last_word_connector: '<br/>'
308
330
  }
309
331
 
332
+ config.add_indexed_terms_field 'indexes', field: 'indexes_html_tesm',
333
+ helper_method: :render_html_tags
334
+
310
335
  # ==========================
311
336
  # COMPONENT SHOW PAGE FIELDS
312
337
  # ==========================
@@ -319,17 +344,32 @@ class CatalogController < ApplicationController
319
344
  }, if: lambda { |_context, _field_config, document|
320
345
  document.containers.present?
321
346
  }
347
+ config.add_component_field 'creators', field: 'creator_ssim', link_to_facet: true
322
348
  config.add_component_field 'abstract', field: 'abstract_html_tesm', helper_method: :render_html_tags
323
349
  config.add_component_field 'extent', field: 'extent_ssm'
324
350
  config.add_component_field 'scopecontent', field: 'scopecontent_html_tesm', helper_method: :render_html_tags
351
+ config.add_component_field 'language', field: 'language_ssim'
325
352
  config.add_component_field 'acqinfo', field: 'acqinfo_ssim', helper_method: :render_html_tags
353
+ config.add_component_field 'bioghist', field: 'bioghist_html_tesm', helper_method: :render_html_tags
326
354
  config.add_component_field 'appraisal', field: 'appraisal_html_tesm', helper_method: :render_html_tags
327
355
  config.add_component_field 'custodhist', field: 'custodhist_html_tesm', helper_method: :render_html_tags
328
356
  config.add_component_field 'processinfo', field: 'processinfo_html_tesm', helper_method: :render_html_tags
329
357
  config.add_component_field 'arrangement', field: 'arrangement_html_tesm', helper_method: :render_html_tags
330
358
  config.add_component_field 'accruals', field: 'accruals_html_tesm', helper_method: :render_html_tags
331
359
  config.add_component_field 'phystech', field: 'phystech_html_tesm', helper_method: :render_html_tags
360
+ config.add_component_field 'materialspec', field: 'materialspec_html_tesm', helper_method: :render_html_tags
332
361
  config.add_component_field 'physloc', field: 'physloc_html_tesm', helper_method: :render_html_tags
362
+ config.add_component_field 'physdesc', field: 'physdesc_tesim', helper_method: :render_html_tags
363
+ config.add_component_field 'physfacet', field: 'physfacet_tesim', helper_method: :render_html_tags
364
+ config.add_component_field 'dimensions', field: 'dimensions_tesim', helper_method: :render_html_tags
365
+ config.add_component_field 'fileplan', field: 'fileplan_html_tesm', helper_method: :render_html_tags
366
+ config.add_component_field 'altformavail', field: 'altformavail_html_tesm', helper_method: :render_html_tags
367
+ config.add_component_field 'otherfindaid', field: 'otherfindaid_html_tesm', helper_method: :render_html_tags
368
+ config.add_component_field 'odd', field: 'odd_html_tesm', helper_method: :render_html_tags
369
+ config.add_component_field 'relatedmaterial', field: 'relatedmaterial_html_tesm', helper_method: :render_html_tags
370
+ config.add_component_field 'separatedmaterial', field: 'separatedmaterial_html_tesm', helper_method: :render_html_tags
371
+ config.add_component_field 'originalsloc', field: 'originalsloc_html_tesm', helper_method: :render_html_tags
372
+ config.add_component_field 'note', field: 'note_html_tesm', helper_method: :render_html_tags
333
373
 
334
374
  # Component Show Page - Indexed Terms Section
335
375
  config.add_component_indexed_terms_field 'access_subjects', field: 'access_subjects_ssim', link_to_facet: true, separator_options: {
@@ -350,6 +390,9 @@ class CatalogController < ApplicationController
350
390
  last_word_connector: '<br/>'
351
391
  }
352
392
 
393
+ config.add_component_indexed_terms_field 'indexes', field: 'indexes_html_tesm',
394
+ helper_method: :render_html_tags
395
+
353
396
  # =================
354
397
  # ACCESS TAB FIELDS
355
398
  # =================
@@ -18,6 +18,10 @@ en:
18
18
  accruals: Accruals
19
19
  phystech: Physical / technical requirements
20
20
  physloc: Physical location
21
+ physdesc: Physical description
22
+ physfacet: Physical facet
23
+ dimensions: Dimensions
24
+ indexes: Indexes
21
25
  descrules: Rules or conventions
22
26
 
23
27
  relatedmaterial: Related material
@@ -25,6 +29,10 @@ en:
25
29
  otherfindaid: Other finding aids
26
30
  altformavail: Alternative form available
27
31
  originalsloc: Location of originals
32
+ materialspec: Material specific details
33
+ fileplan: File plan
34
+ odd: Other descriptive data
35
+ note: Note
28
36
 
29
37
  access_subjects: Subjects
30
38
  names_coll: Names
@@ -7,7 +7,7 @@ nlm:
7
7
  <div class="al-repository-street-address-building">Building 38, Room 1E-21</div>
8
8
  <div class="al-repository-street-address-address1">8600 Rockville Pike</div>
9
9
  <div class="al-repository-street-address-city_state_zip_country">Bethesda, MD 20894, USA</div>
10
- thumbnail_url: "https://collections.nlm.nih.gov/pageturnerserver/ajaxp?theurl=http://localhost:8080/fedora/get/nlm:nlmuid-101421040-img/THUMB"
10
+ thumbnail_url: "https://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/United_States_National_Library_of_Medicine_1999.jpg/500px-United_States_National_Library_of_Medicine_1999.jpg"
11
11
  request_types:
12
12
  google_form:
13
13
  request_url: 'https://docs.google.com/a/stanford.edu/forms/d/e/1FAIpQLSeOamhY_IcFw4sPnz0ddwWWkrPaHbM5wp7JVbOLOL_mIusEyw/viewform'
@@ -24,7 +24,7 @@ sul-spec:
24
24
  <div class="al-repository-street-address-building">Green Library</div>
25
25
  <div class="al-repository-street-address-address1">557 Escondido Mall</div>
26
26
  <div class="al-repository-street-address-city_state_zip_country">Stanford, CA 94305, USA</div>
27
- thumbnail_url: 'https://library.stanford.edu/sites/default/files/styles/150x150/public/collection/image/Collections-Super-Enlight.jpg'
27
+ thumbnail_url: 'https://upload.wikimedia.org/wikipedia/commons/thumb/2/2b/Stanford_University_Green_Library_Bing_Wing.jpg/500px-Stanford_University_Green_Library_Bing_Wing.jpg'
28
28
  request_types:
29
29
  aeon_web_ead:
30
30
  request_url: 'https://sample.request.com'
data/package.json CHANGED
@@ -1,17 +1,18 @@
1
1
  {
2
2
  "name": "arclight",
3
- "version": "1.0.0",
3
+ "version": "1.6.0",
4
4
  "description": "The frontend for arclight",
5
5
  "main": "app/assets/javascript/arclight/arclight.js",
6
- "files": [
7
- "app/assets"
8
- ],
6
+ "files": ["app/assets"],
9
7
  "devDependencies": {
10
8
  "eslint": "^8.26.0",
11
9
  "eslint-config-airbnb-base": "^15.0.0",
12
- "eslint-plugin-import": "^2.2.0"
10
+ "eslint-plugin-import": "^2.2.0",
11
+ "sass": "^1.59.3",
12
+ "bootstrap": "^5.2.0"
13
13
  },
14
14
  "scripts": {
15
+ "build": "sass ./app/assets/stylesheets/arclight/build.scss:./app/assets/builds/arclight.css --no-source-map --load-path=node_modules",
15
16
  "lint": "eslint './app/assets/javascripts/**/*.{js,es6}'",
16
17
  "lint:fix": "eslint --fix './app/assets/javascripts/**/*.{js,es6}'",
17
18
  "test": "echo \"Error: no test specified\" && exit 1"
data/solr/conf/schema.xml CHANGED
@@ -338,6 +338,7 @@
338
338
  <copyField source="places_ssim" dest="place_teim"/>
339
339
  <copyField source="names_ssim" dest="name_teim"/>
340
340
  <copyField source="access_subjects_ssim" dest="subject_teim"/>
341
+ <copyField source="containers_ssim" dest="container_teim" />
341
342
 
342
343
  <!-- The catch all `text` field -->
343
344
  <!-- grab the fielded searches -->
@@ -345,9 +346,10 @@
345
346
  <copyField source="places_ssim" dest="text" />
346
347
  <copyField source="names_ssim" dest="text" />
347
348
  <copyField source="access_subjects_ssim" dest="text" />
348
- <!-- grab the searchable notes -->
349
- <copyField source="abstract_tesim" dest="text" />
350
- <copyField source="accessrestricct_tesim" dest="text" />
349
+ <copyField source="containers_ssim" dest="text" />
350
+
351
+ <!-- grab the searchable notes (SEARCHABLE_NOTES_FIELDS) -->
352
+ <copyField source="accessrestrict_tesim" dest="text" />
351
353
  <copyField source="accruals_tesim" dest="text" />
352
354
  <copyField source="acqinfo_tesim" dest="text" />
353
355
  <copyField source="altformavail_tesim" dest="text" />
@@ -356,20 +358,24 @@
356
358
  <copyField source="bibliography_tesim" dest="text" />
357
359
  <copyField source="bioghist_tesim" dest="text" />
358
360
  <copyField source="custodhist_tesim" dest="text" />
359
- <copyField source="did_note_tesim" dest="text" />
360
361
  <copyField source="fileplan_tesim" dest="text" />
361
- <copyField source="materialspec_tesim" dest="text" />
362
- <copyField source="note_tesim" dest="text" />
362
+ <copyField source="indexes_tesim" dest="text" />
363
+ <copyField source="language_ssim" dest="text" />
363
364
  <copyField source="odd_tesim" dest="text" />
364
365
  <copyField source="originalsloc_tesim" dest="text" />
366
+ <copyField source="parent_unittitles_tesim" dest="text" />
365
367
  <copyField source="physdesc_tesim" dest="text" />
366
- <copyField source="physloc_tesim" dest="text" />
367
368
  <copyField source="phystech_tesim" dest="text" />
368
369
  <copyField source="processinfo_tesim" dest="text" />
369
370
  <copyField source="relatedmaterial_tesim" dest="text" />
370
371
  <copyField source="scopecontent_tesim" dest="text" />
371
372
  <copyField source="separatedmaterial_tesim" dest="text" />
372
373
  <copyField source="userestrict_tesim" dest="text" />
374
+ <!-- did searchable notes (DID_SEARCHABLE_NOTES_FIELDS) -->
375
+ <copyField source="abstract_tesim" dest="text" />
376
+ <copyField source="materialspec_tesim" dest="text" />
377
+ <copyField source="physloc_tesim" dest="text" />
378
+ <copyField source="note_tesim" dest="text" />
373
379
  <!-- grab structured data that's important -->
374
380
  <copyField source="unitid_ssm" dest="text" />
375
381
  <copyField source="unitid_ssm" dest="unitid_identifier_match" />
@@ -75,7 +75,15 @@
75
75
  <int name="rows">10</int>
76
76
 
77
77
  <str name="q.alt">*:*</str>
78
- <str name="mm">2&lt;-1 5&lt;-2 6&lt;90%</str>
78
+
79
+ <!-- Minimum Should Match parameter (mm) -->
80
+ <str name="mm">4&lt;90%</str>
81
+ <!-- 1-4 term query, all must match
82
+ 5+ term query, 90% must match; rounded down, so e.g.:
83
+ * 5-10 term query, all but one must match
84
+ * 11-20 term query, all but two must match
85
+ * 21-29 term query, all but three must match, etc.
86
+ -->
79
87
 
80
88
  <!-- this qf and pf are used by default, if not otherwise specified by
81
89
  client. The default blacklight_config will use these for the
@@ -85,6 +93,11 @@
85
93
  http://wiki.apache.org/solr/LocalParams
86
94
  -->
87
95
 
96
+ <!-- In general, matches using the pf parameter should be boosted higher
97
+ than qf, so the proximity of multiple search terms in the matching
98
+ documents is significant in relevance scoring. See:
99
+ https://solr.apache.org/guide/solr/latest/query-guide/dismax-query-parser.html#pf-phrase-fields-parameter
100
+ -->
88
101
  <str name="qf">
89
102
  collection_title_tesim^150
90
103
  title_tesim^100
@@ -93,84 +106,88 @@
93
106
  name_teim^10
94
107
  place_teim^10
95
108
  subject_teim^2
109
+ id
110
+ ead_ssi
111
+ ref_ssm
112
+ unitid_ssm
113
+ container_teim
114
+ parent_unittitles_tesim
96
115
  text
97
116
  </str>
98
117
  <str name="pf">
99
- collection_title_tesim^150
100
- title_tesim^100
101
- normalized_title_teim^100
102
- unitid_identifier_match^40
103
- name_teim^10
104
- place_teim^10
105
- subject_teim^2
106
- text
118
+ collection_title_tesim^300
119
+ title_tesim^200
120
+ normalized_title_teim^200
121
+ unitid_identifier_match^80
122
+ name_teim^20
123
+ place_teim^20
124
+ subject_teim^5
125
+ id^2
126
+ ead_ssi^2
127
+ ref_ssm^2
128
+ unitid_ssm^2
129
+ container_teim^2
130
+ parent_unittitles_tesim^2
131
+ text^2
107
132
  </str>
108
133
 
134
+ <str name="qf_container">
135
+ container_teim
136
+ </str>
137
+ <str name="pf_container">
138
+ container_teim^2
139
+ </str>
140
+ <str name="qf_identifier">
141
+ id
142
+ ead_ssi
143
+ ref_ssm
144
+ unitid_ssm
145
+ unitid_identifier_match
146
+ </str>
147
+ <str name="pf_identifier">
148
+ id^2
149
+ ead_ssi^2
150
+ ref_ssm^2
151
+ unitid_ssm^2
152
+ unitid_identifier_match^2
153
+ </str>
109
154
  <str name="qf_name">
110
155
  name_teim
111
156
  </str>
112
157
  <str name="pf_name">
113
- name_teim
158
+ name_teim^2
114
159
  </str>
115
160
  <str name="qf_place">
116
161
  place_teim
117
162
  </str>
118
163
  <str name="pf_place">
119
- place_teim
164
+ place_teim^2
120
165
  </str>
121
166
  <str name="qf_subject">
122
167
  subject_teim
123
168
  </str>
124
169
  <str name="pf_subject">
125
- subject_teim
170
+ subject_teim^2
126
171
  </str>
127
172
  <str name="qf_title">
128
173
  title_tesim
129
174
  normalized_title_teim
130
175
  </str>
131
176
  <str name="pf_title">
132
- title_tesim
133
- normalized_title_teim
177
+ title_tesim^2
178
+ normalized_title_teim^2
134
179
  </str>
135
180
 
136
181
  <int name="ps">3</int>
137
182
  <float name="tie">0.01</float>
138
183
 
139
- <str name="fl">
140
- id,
141
- score,
142
- abstract_html_tesm,
143
- accessrestrict_html_tesm,
144
- child_component_count_isi,
145
- containers_ssim,
146
- creator_ssm,
147
- extent_ssm,
148
- geogname_ssm,
149
- has_online_content_ssim,
150
- language_ssim,
151
- level_ssm,
152
- repository_ssm,
153
- scopecontent_html_tesm,
154
- title_ssm,
155
- normalized_title_ssm,
156
- normalized_date_ssm,
157
- unitid_ssm,
158
- parent_ssim,
159
- parent_unittitles_ssm,
160
- ead_ssi,
161
- ref_ssm,
162
- component_level_isim,
163
- parent_access_restrict_tesm,
164
- parent_access_terms_tesm,
165
- names_coll_ssim
166
- places_ssim
167
- </str>
184
+ <str name="fl">*</str>
168
185
 
169
186
  <str name="facet">true</str>
170
187
  <str name="facet.mincount">1</str>
171
188
  <str name="facet.field">level_ssim</str>
172
189
  <str name="facet.field">creator_ssim</str>
173
- <str name="facet.field">date_range_ssim</str>
190
+ <str name="facet.field">date_range_isim</str>
174
191
  <str name="facet.field">names_ssim</str>
175
192
  <str name="facet.field">geogname_ssim</str>
176
193
  <str name="facet.field">access_subjects_ssim</str>
data/tasks/arclight.rake CHANGED
@@ -7,13 +7,20 @@ require 'arclight'
7
7
 
8
8
  class DependencyNotInstalled < StandardError; end
9
9
 
10
+ # Build with our opinionated defaults if none are provided.
11
+ rails_options = ENV.fetch('ENGINE_CART_RAILS_OPTIONS', '')
12
+ rails_options = "#{rails_options} -a propshaft" unless rails_options.match?(/-a\s|--asset-pipeline/)
13
+ rails_options = "#{rails_options} -j importmap" unless rails_options.match?(/-j\s|--javascript/)
14
+ rails_options = "#{rails_options} --css bootstrap" unless rails_options.match?(/--css/)
15
+ ENV['ENGINE_CART_RAILS_OPTIONS'] = rails_options
16
+
10
17
  desc 'Run test suite'
11
18
  task ci: %w[arclight:generate] do
12
19
  SolrWrapper.wrap do |solr|
13
20
  solr.with_collection do
14
21
  Rake::Task['arclight:seed'].invoke
15
22
  within_test_app do
16
- ## Do stuff inside arclight app here
23
+ system 'bin/rake spec:prepare'
17
24
  end
18
25
  Rake::Task['spec'].invoke
19
26
  end
@@ -47,7 +54,7 @@ namespace :arclight do
47
54
  solr.with_collection do
48
55
  Rake::Task['arclight:seed'].invoke
49
56
  within_test_app do
50
- system "bundle exec rails s #{args[:rails_server_args]}"
57
+ system "bin/dev #{args[:rails_server_args]}"
51
58
  end
52
59
  end
53
60
  end
data/template.rb CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  gem 'arclight'
4
4
 
5
- run 'bundle install'
5
+ after_bundle do
6
+ generate 'blacklight:install', '--devise'
7
+ generate 'arclight:install', '-f'
6
8
 
7
- generate 'blacklight:install', '--devise'
8
- generate 'arclight:install', '-f'
9
-
10
- rake 'db:migrate'
9
+ rake 'db:migrate'
10
+ end
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.0.0
4
+ version: 1.6.2
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: 2023-04-06 00:00:00.000000000 Z
14
+ date: 2025-08-11 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: blacklight
@@ -51,16 +51,22 @@ dependencies:
51
51
  name: rails
52
52
  requirement: !ruby/object:Gem::Requirement
53
53
  requirements:
54
- - - "~>"
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: '7.1'
57
+ - - "<"
55
58
  - !ruby/object:Gem::Version
56
- version: '7.0'
59
+ version: '9'
57
60
  type: :runtime
58
61
  prerelease: false
59
62
  version_requirements: !ruby/object:Gem::Requirement
60
63
  requirements:
61
- - - "~>"
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: '7.1'
67
+ - - "<"
62
68
  - !ruby/object:Gem::Version
63
- version: '7.0'
69
+ version: '9'
64
70
  - !ruby/object:Gem::Dependency
65
71
  name: traject
66
72
  requirement: !ruby/object:Gem::Requirement
@@ -271,20 +277,6 @@ dependencies:
271
277
  - - ">="
272
278
  - !ruby/object:Gem::Version
273
279
  version: '0'
274
- - !ruby/object:Gem::Dependency
275
- name: webdrivers
276
- requirement: !ruby/object:Gem::Requirement
277
- requirements:
278
- - - ">="
279
- - !ruby/object:Gem::Version
280
- version: '0'
281
- type: :development
282
- prerelease: false
283
- version_requirements: !ruby/object:Gem::Requirement
284
- requirements:
285
- - - ">="
286
- - !ruby/object:Gem::Version
287
- version: '0'
288
280
  description: ''
289
281
  email:
290
282
  - drh@stanford.edu
@@ -328,6 +320,7 @@ files:
328
320
  - app/assets/javascripts/arclight/oembed_controller.js
329
321
  - app/assets/javascripts/arclight/truncate_controller.js
330
322
  - app/assets/stylesheets/arclight/application.scss
323
+ - app/assets/stylesheets/arclight/build.scss
331
324
  - app/assets/stylesheets/arclight/modules/collection_search.scss
332
325
  - app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss
333
326
  - app/assets/stylesheets/arclight/modules/highlights.scss
@@ -336,6 +329,7 @@ files:
336
329
  - app/assets/stylesheets/arclight/modules/mastheads.scss
337
330
  - app/assets/stylesheets/arclight/modules/repositories.scss
338
331
  - app/assets/stylesheets/arclight/modules/repository_card.scss
332
+ - app/assets/stylesheets/arclight/modules/search_form.scss
339
333
  - app/assets/stylesheets/arclight/modules/search_results.scss
340
334
  - app/assets/stylesheets/arclight/modules/show_collection.scss
341
335
  - app/assets/stylesheets/arclight/modules/truncator.scss
@@ -368,6 +362,8 @@ files:
368
362
  - app/components/arclight/document_download_component.rb
369
363
  - app/components/arclight/embed_component.html.erb
370
364
  - app/components/arclight/embed_component.rb
365
+ - app/components/arclight/expand_hierarchy_button_component.html.erb
366
+ - app/components/arclight/expand_hierarchy_button_component.rb
371
367
  - app/components/arclight/group_component.html.erb
372
368
  - app/components/arclight/group_component.rb
373
369
  - app/components/arclight/header_component.html.erb
@@ -431,6 +427,7 @@ files:
431
427
  - app/views/arclight/requests/_aeon_external_request_endpoint.html.erb
432
428
  - app/views/arclight/requests/_aeon_web_ead.html.erb
433
429
  - app/views/arclight/requests/_google_form.html.erb
430
+ - app/views/catalog/_document_list.html.erb
434
431
  - app/views/catalog/_group.html.erb
435
432
  - app/views/catalog/_group_toggle.html.erb
436
433
  - app/views/catalog/_search_results_header.html.erb
@@ -513,7 +510,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
513
510
  - !ruby/object:Gem::Version
514
511
  version: '0'
515
512
  requirements: []
516
- rubygems_version: 3.3.26
513
+ rubygems_version: 3.4.19
517
514
  signing_key:
518
515
  specification_version: 4
519
516
  summary: A Blacklight-based environment to support discovery and delivery for archives