blacklight-spotlight 5.3.1 → 6.0.0.rc1

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 (184) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +20 -4
  3. data/Rakefile +1 -2
  4. data/app/assets/javascripts/spotlight/spotlight.esm.js +2181 -4557
  5. data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
  6. data/app/assets/javascripts/spotlight/spotlight.js +2199 -4556
  7. data/app/assets/javascripts/spotlight/spotlight.js.map +1 -1
  8. data/app/assets/stylesheets/spotlight/_blacklight_overrides.scss +4 -0
  9. data/app/assets/stylesheets/spotlight/_browse.scss +0 -4
  10. data/app/assets/stylesheets/spotlight/{_collapse_toggle.scss → _collapse_toggle.css} +2 -2
  11. data/app/assets/stylesheets/spotlight/_exhibit_admin.scss +8 -0
  12. data/app/assets/stylesheets/spotlight/_exhibits_index.scss +2 -1
  13. data/app/assets/stylesheets/spotlight/_footer.scss +2 -2
  14. data/app/assets/stylesheets/spotlight/_header.scss +8 -8
  15. data/app/assets/stylesheets/spotlight/_multi_up_item_grid.scss +1 -10
  16. data/app/assets/stylesheets/spotlight/_nestable.scss +18 -1
  17. data/app/assets/stylesheets/spotlight/_pages.scss +4 -4
  18. data/app/assets/stylesheets/spotlight/_slideshow_block.scss +15 -0
  19. data/app/assets/stylesheets/spotlight/_spotlight.scss +1 -1
  20. data/app/assets/stylesheets/spotlight/_translations.scss +3 -3
  21. data/app/assets/stylesheets/spotlight/_uploaded_items_block.css +7 -0
  22. data/app/assets/stylesheets/spotlight/_variables.css +15 -0
  23. data/app/assets/stylesheets/spotlight/browse_group_categories_block.scss +0 -76
  24. data/app/components/blacklight/icons/pause_component.rb +15 -0
  25. data/app/components/blacklight/icons/play_arrow_component.rb +15 -0
  26. data/app/components/spotlight/analytics/dashboard_component.html.erb +1 -1
  27. data/app/components/spotlight/document_admin_table_component.html.erb +2 -2
  28. data/app/components/spotlight/masthead_component.html.erb +18 -0
  29. data/app/components/spotlight/masthead_component.rb +46 -0
  30. data/app/components/spotlight/save_search_component.html.erb +1 -1
  31. data/app/components/spotlight/solr_document_legacy_embed_component.html.erb +0 -4
  32. data/app/components/spotlight/solr_document_legacy_embed_component.rb +2 -2
  33. data/app/components/spotlight/tag_selector_component.html.erb +1 -1
  34. data/app/components/spotlight/tag_selector_component.rb +3 -2
  35. data/app/controllers/concerns/spotlight/controller.rb +15 -14
  36. data/app/controllers/concerns/spotlight/search_helper.rb +2 -5
  37. data/app/controllers/spotlight/browse_controller.rb +1 -2
  38. data/app/controllers/spotlight/catalog_controller.rb +1 -2
  39. data/app/controllers/spotlight/concerns/application_controller.rb +4 -6
  40. data/app/controllers/spotlight/exhibits_controller.rb +22 -10
  41. data/app/controllers/spotlight/lock_controller.rb +1 -1
  42. data/app/controllers/spotlight/pages_controller.rb +11 -11
  43. data/app/controllers/spotlight/resources_controller.rb +1 -1
  44. data/app/helpers/spotlight/application_helper.rb +14 -3
  45. data/app/helpers/spotlight/main_app_helpers.rb +2 -2
  46. data/app/javascript/spotlight/admin/add_another.js +37 -25
  47. data/app/javascript/spotlight/admin/add_image_selector.js +43 -26
  48. data/app/javascript/spotlight/admin/add_new_button.js +51 -36
  49. data/app/javascript/spotlight/admin/blacklight_configuration.js +76 -54
  50. data/app/javascript/spotlight/admin/block_mixins/autocompleteable.js +102 -101
  51. data/app/javascript/spotlight/admin/block_mixins/formable.js +91 -75
  52. data/app/javascript/spotlight/admin/block_mixins/plustextable.js +46 -48
  53. data/app/javascript/spotlight/admin/blocks/block.js +27 -28
  54. data/app/javascript/spotlight/admin/blocks/browse_block.js +14 -10
  55. data/app/javascript/spotlight/admin/blocks/browse_group_categories_block.js +14 -10
  56. data/app/javascript/spotlight/admin/blocks/pages_block.js +5 -4
  57. data/app/javascript/spotlight/admin/blocks/resources_block.js +61 -41
  58. data/app/javascript/spotlight/admin/blocks/search_result_block.js +24 -7
  59. data/app/javascript/spotlight/admin/blocks/solr_documents_base_block.js +103 -50
  60. data/app/javascript/spotlight/admin/blocks/solr_documents_carousel_block.js +50 -26
  61. data/app/javascript/spotlight/admin/blocks/solr_documents_features_block.js +47 -23
  62. data/app/javascript/spotlight/admin/blocks/uploaded_items_block.js +35 -19
  63. data/app/javascript/spotlight/admin/crop.js +146 -66
  64. data/app/javascript/spotlight/admin/croppable.js +5 -4
  65. data/app/javascript/spotlight/admin/croppable_modal.js +67 -32
  66. data/app/javascript/spotlight/admin/edit_in_place.js +69 -54
  67. data/app/javascript/spotlight/admin/exhibits.js +92 -45
  68. data/app/javascript/spotlight/admin/form_observer.js +92 -78
  69. data/app/javascript/spotlight/admin/multi_image_selector.js +201 -153
  70. data/app/javascript/spotlight/admin/pages.js +13 -7
  71. data/app/javascript/spotlight/admin/progress_monitor.js +65 -50
  72. data/app/javascript/spotlight/admin/readonly_checkbox.js +7 -3
  73. data/app/javascript/spotlight/admin/search_typeahead.js +20 -11
  74. data/app/javascript/spotlight/admin/select_related_input.js +23 -23
  75. data/app/javascript/spotlight/admin/serialize_json.js +120 -0
  76. data/app/javascript/spotlight/admin/sir-trevor/block_controls.js +24 -11
  77. data/app/javascript/spotlight/admin/sir-trevor/block_limits.js +9 -6
  78. data/app/javascript/spotlight/admin/sir-trevor/locales.js +2 -2
  79. data/app/javascript/spotlight/admin/spotlight_nestable.js +17 -7
  80. data/app/javascript/spotlight/admin/tabs.js +5 -2
  81. data/app/javascript/spotlight/admin/translation_progress.js +18 -13
  82. data/app/javascript/spotlight/admin/users.js +151 -64
  83. data/app/javascript/spotlight/user/carousel.js +104 -32
  84. data/app/javascript/spotlight/user/clear_form_button.js +24 -14
  85. data/app/javascript/spotlight/user/index.js +0 -2
  86. data/app/javascript/spotlight/user/zpr_links.js +99 -40
  87. data/app/jobs/concerns/spotlight/gather_documents.rb +1 -1
  88. data/app/jobs/spotlight/add_uploads_from_csv.rb +29 -8
  89. data/app/models/concerns/spotlight/access_controls_enforcement_search_builder.rb +13 -2
  90. data/app/models/concerns/spotlight/browse_category_search_builder.rb +3 -3
  91. data/app/models/concerns/spotlight/exhibit_documents.rb +2 -2
  92. data/app/models/concerns/spotlight/sitemap.rb +2 -2
  93. data/app/models/concerns/spotlight/solr_document/finder.rb +2 -2
  94. data/app/models/sir_trevor_rails/blocks/solr_documents_block.rb +2 -1
  95. data/app/models/spotlight/blacklight_configuration.rb +5 -3
  96. data/app/models/spotlight/contact_email.rb +2 -2
  97. data/app/models/spotlight/exhibit.rb +28 -0
  98. data/app/models/spotlight/featured_image.rb +1 -1
  99. data/app/models/spotlight/field_metadata.rb +10 -5
  100. data/app/models/spotlight/job_tracker.rb +2 -2
  101. data/app/models/spotlight/main_navigation.rb +2 -2
  102. data/app/models/spotlight/page.rb +3 -3
  103. data/app/models/spotlight/resources/iiif_harvester.rb +7 -4
  104. data/app/models/spotlight/resources/iiif_manifest_metadata.rb +1 -3
  105. data/app/models/spotlight/resources/iiif_service.rb +21 -6
  106. data/app/models/spotlight/search.rb +5 -5
  107. data/app/services/spotlight/bulk_updates_csv_template_service.rb +1 -1
  108. data/app/services/spotlight/etl/pipeline.rb +2 -2
  109. data/app/services/spotlight/etl/step.rb +2 -2
  110. data/app/views/catalog/_remove_tags.html.erb +2 -2
  111. data/app/views/layouts/spotlight/base.html.erb +3 -6
  112. data/app/views/layouts/spotlight/spotlight.html.erb +2 -2
  113. data/app/views/shared/_analytics.html.erb +4 -3
  114. data/app/views/shared/_masthead.html.erb +2 -18
  115. data/app/views/spotlight/about_pages/_empty.html.erb +1 -1
  116. data/app/views/spotlight/about_pages/_sidebar.html.erb +10 -8
  117. data/app/views/spotlight/browse/_search.html.erb +2 -2
  118. data/app/views/spotlight/browse/_search_box.html.erb +6 -14
  119. data/app/views/spotlight/browse/index.html.erb +1 -1
  120. data/app/views/spotlight/browse/show.html.erb +1 -1
  121. data/app/views/spotlight/catalog/_document_admin_table.html.erb +1 -1
  122. data/app/views/spotlight/catalog/edit.html.erb +1 -1
  123. data/app/views/spotlight/dashboards/_page.html.erb +1 -1
  124. data/app/views/spotlight/exhibits/_exhibit_card.html.erb +3 -1
  125. data/app/views/spotlight/exhibits/_export.html.erb +17 -1
  126. data/app/views/spotlight/exhibits/_form.html.erb +20 -4
  127. data/app/views/spotlight/exhibits/_missing_exhibits.html.erb +3 -3
  128. data/app/views/spotlight/exhibits/index.html.erb +21 -8
  129. data/app/views/spotlight/feature_pages/_empty.html.erb +1 -1
  130. data/app/views/spotlight/feature_pages/_sidebar.html.erb +17 -15
  131. data/app/views/spotlight/home_pages/_empty.html.erb +7 -7
  132. data/app/views/spotlight/pages/show.html.erb +1 -0
  133. data/app/views/spotlight/sir_trevor/blocks/_browse_group_categories_block.html.erb +5 -16
  134. data/app/views/spotlight/sir_trevor/blocks/_embedded_document.html.erb +3 -5
  135. data/app/views/spotlight/sir_trevor/blocks/_link_to_search_block.html.erb +1 -1
  136. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb +11 -2
  137. data/app/views/spotlight/sites/_exhibit.html.erb +1 -1
  138. data/config/locales/spotlight.ar.yml +1 -2
  139. data/config/locales/spotlight.de.yml +1 -2
  140. data/config/locales/spotlight.en.yml +39 -6
  141. data/config/locales/spotlight.es.yml +1 -2
  142. data/config/locales/spotlight.fr.yml +1 -2
  143. data/config/locales/spotlight.it.yml +1 -2
  144. data/config/locales/spotlight.ja.yml +39 -0
  145. data/config/locales/spotlight.zh.yml +1 -2
  146. data/db/migrate/20261007133748_add_discovery_enabled_to_spotlight_exhibits.rb +5 -0
  147. data/lib/generators/spotlight/assets/importmap_generator.rb +2 -10
  148. data/lib/generators/spotlight/assets/propshaft_generator.rb +5 -4
  149. data/lib/generators/spotlight/install_generator.rb +2 -4
  150. data/lib/generators/spotlight/templates/catalog_controller.rb +0 -1
  151. data/lib/generators/spotlight/templates/config/initializers/spotlight_initializer.rb +18 -4
  152. data/lib/generators/spotlight/templates/solr/conf/schema.xml +4 -3
  153. data/lib/generators/spotlight/templates/solr/conf/solrconfig.xml +3 -8
  154. data/lib/migration/page_language.rb +0 -2
  155. data/lib/spotlight/engine.rb +23 -7
  156. data/lib/spotlight/search_state.rb +7 -11
  157. data/lib/spotlight/version.rb +1 -1
  158. data/lib/spotlight.rb +1 -1
  159. data/spec/support/features/capybara_wait_metadata_helper.rb +3 -1
  160. data/spec/support/features/test_features_helpers.rb +55 -1
  161. data/spec/support/iiif_manifest_fixtures.rb +33 -0
  162. data/spec/support/stub_dns_resolution.rb +12 -0
  163. metadata +38 -58
  164. data/app/assets/stylesheets/spotlight/_uploaded_items_block.scss +0 -7
  165. data/app/assets/stylesheets/spotlight/_variables.scss +0 -13
  166. data/app/components/blacklight/icons/arrow_alt_circle_left_component.rb +0 -15
  167. data/app/components/blacklight/icons/arrow_alt_circle_right_component.rb +0 -15
  168. data/app/components/spotlight/icon_component.rb +0 -13
  169. data/app/javascript/spotlight/user/browse_group_categories.js +0 -54
  170. data/app/models/concerns/spotlight/resources/web.rb +0 -38
  171. data/app/services/spotlight/iiif_resource_resolver.rb +0 -78
  172. data/app/views/shared/_exhibit_navbar.html.erb +0 -2
  173. data/app/views/shared/_header_navbar.html.erb +0 -6
  174. data/app/views/spotlight/catalog/_admin_index_header_default.html.erb +0 -23
  175. data/app/views/spotlight/catalog/_admin_thumbnail_default.html.erb +0 -7
  176. data/app/views/spotlight/catalog/_document_row.html.erb +0 -2
  177. data/app/views/spotlight/catalog/_index_compact_default.html.erb +0 -21
  178. data/lib/generators/spotlight/templates/javascript/jquery-shim.js +0 -1
  179. data/vendor/assets/javascripts/tiny-slider.js +0 -3221
  180. data/vendor/assets/stylesheets/tiny-slider.css +0 -1
  181. /data/app/assets/stylesheets/spotlight/{_breadcrumbs.scss → _breadcrumbs.css} +0 -0
  182. /data/app/assets/stylesheets/spotlight/{_croppable.scss → _croppable.css} +0 -0
  183. /data/app/assets/stylesheets/spotlight/{_modals.scss → _modals.css} +0 -0
  184. /data/app/assets/stylesheets/spotlight/{_utilities.scss → _utilities.css} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63542249524bfb5d425f34738792bd6a39348c44ca2775cbfa616bfa07e3447b
4
- data.tar.gz: 595f004850b722dc40b80eec95c48b468919e8bf5e16dba3a9db67de34c71917
3
+ metadata.gz: 95ee8daf3a842b8230c41db5a322202457a2b6d5d6e59c86966d724915ef885d
4
+ data.tar.gz: fe5a12e8ecd14c9ee515d5c784e783ebc7861895ff1a07fe2c629e4c9ef1e989
5
5
  SHA512:
6
- metadata.gz: 15d0995ce4bf7f333ea22b83c11fea882cb506e16f148f515d50ed5381ae06cc089361374ec0e816a66cad99a0a9afed8f814714494c1d1d6d51db1602b80f0f
7
- data.tar.gz: 2e10d19b13ec49477ea5f8bab9c3dc805fba064a0d955c0986af869cbd62e37ca6d4e3a49c98cdf6eafd63c758444274531e8bd4d3cf21a94eebcbb77c9bd68c
6
+ metadata.gz: b2caff642a657a1f1d4c2cd2a3848325a11586840b8f2eda71dbf14b324710b5ae1d268f61c2ea4f23167ecffd5b72887e5c2c27e8d95ef287d3542b74bf9551
7
+ data.tar.gz: e1d5cbfc083e0f6c7f583cac20c64fb069076d4cd954c8a9d8c92cbfbb8baed7c527cad635e35aac9573871a31b22538111ee624509a244b45e1f9a85eac8a27
data/README.md CHANGED
@@ -11,7 +11,7 @@ If you have questions or are interested in contributing, please reach out to the
11
11
 
12
12
  ## Requirements
13
13
 
14
- - [Ruby](https://www.ruby-lang.org/) 3.2+
14
+ - [Ruby](https://www.ruby-lang.org/) 3.3+
15
15
  - [Ruby on Rails](https://rubyonrails.org/) 7.1+
16
16
  - Java (11 or greater) *for Solr*
17
17
  - [ImageMagick](http://www.imagemagick.org/script/index.php) if using riiif (current default for `config.iiif_service`)
@@ -107,7 +107,13 @@ You only need to update `package.json` and prepare/publish the JavaScript packag
107
107
  3. Run `npm i --package-lock-only` to update the version in `package-lock.json`
108
108
  4. Commit the changes e.g. `git commit -am "Bump version to X.X.X"`
109
109
  5. Push the release to rubygems and GitHub: `bundle exec rake release`
110
- 6. Run `npm publish` to push the JavaScript package to https://npmjs.org/package/spotlight-frontend
110
+ 6. Log in to npm: `npm login`
111
+ 7. You can test the release by running `npm publish --dry-run`. Check the console output to make sure the version number looks correct.
112
+ 8. Run `npm publish` to push the JavaScript package to https://npmjs.org/package/spotlight-frontend
113
+
114
+ For a prerelease (e.g. `6.0.0.rc1` in `version.rb` and `6.0.0-rc.1` in `package.json`), publish with `npm publish --tag next` so the `latest` tag stays on the current stable release.
115
+
116
+ For a release from a backport branch (e.g. `release-5.x`), publish with `npm publish --tag release-5.x` so it doesn't replace the `latest` tag.
111
117
 
112
118
  See [Updating the JavaScript bundle](#updating-the-javascript-bundle) above for more details.
113
119
 
@@ -115,7 +121,8 @@ See [Updating the JavaScript bundle](#updating-the-javascript-bundle) above for
115
121
 
116
122
  ### Branches
117
123
 
118
- * The `main` branch is for development of the 5.x series.
124
+ * The `main` branch is for development of the 6.x series.
125
+ * The `5.x` series is on the [release-5.x](https://github.com/projectblacklight/spotlight/tree/release-5.x) branch for backports of features and bug fixes.
119
126
  * The `4.x` series is on the [release-4.x](https://github.com/projectblacklight/spotlight/tree/release-4.x) branch for backports of features and bug fixes.
120
127
 
121
128
  ### Tooling
@@ -193,6 +200,15 @@ The `spec:prepare` task generates css assets for use by the tests. You can delet
193
200
 
194
201
  Once you are set up, you can also run `rubocop` to enforce consistent coding style.
195
202
 
203
+ #### External IIIF resources in JavaScript feature specs
204
+
205
+ JavaScript feature specs run in a real browser, so WebMock can't intercept the requests it makes. To keep these specs from depending on external IIIF servers:
206
+
207
+ * The test browser doesn't load images.
208
+ * IIIF manifests are served from fixtures. When a document has a fixture at `spec/fixtures/iiif_manifests/<document_id>.json`, its autocomplete response points at that fixture instead of the live manifest (see `spec/support/iiif_manifest_fixtures.rb`). If a JavaScript spec selects a document that loads its manifest, add a fixture by saving the manifest from the document's `iiif_manifest_url_ssi` URL.
209
+
210
+ IIIF image `info.json` requests, such as the ones the cropper makes, still go to the image server named in the manifest.
211
+
196
212
 
197
213
  ### Individual commands
198
214
 
@@ -263,7 +279,7 @@ A brief orientation to this codebase
263
279
  #### Frontend Asset Structure
264
280
  - **Source JavaScript:** Resides in `app/javascript/spotlight/` (e.g., admin widgets, custom field behaviors).
265
281
  - **Core Orchestration:** `app/javascript/spotlight/index.js` listens to page loads and instantiates class components (e.g., `new AddAnother().connect()`).
266
- - **Standard:** Spotlight prefers standard, modern JavaScript (ES6+) and is migrating away from jQuery dependencies.
282
+ - **Standard:** Spotlight prefers standard, modern JavaScript (ES6+) and does not depend on jQuery.
267
283
 
268
284
  ## Spotlight Community
269
285
 
data/Rakefile CHANGED
@@ -33,8 +33,6 @@ require 'spotlight/version'
33
33
 
34
34
  # Build with our opinionated defaults if none are provided.
35
35
  rails_options = ENV.fetch('ENGINE_CART_RAILS_OPTIONS', '')
36
- rails_options = "#{rails_options} -a propshaft" unless rails_options.match?(/-a\s|--asset-pipeline/)
37
- rails_options = "#{rails_options} -j importmap" unless rails_options.match?(/-j\s|--javascript/)
38
36
  rails_options = "#{rails_options} --css bootstrap" unless rails_options.match?(/--css/)
39
37
  ENV['ENGINE_CART_RAILS_OPTIONS'] = rails_options
40
38
 
@@ -73,6 +71,7 @@ task :ci do
73
71
  Rake::Task['spotlight:fixtures'].invoke
74
72
  within_test_app do
75
73
  system 'bin/rake spec:prepare'
74
+ abort 'Error running spec:prepare' unless $?.success?
76
75
  end
77
76
 
78
77
  # run the tests