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.
- checksums.yaml +4 -4
- data/README.md +20 -4
- data/Rakefile +1 -2
- data/app/assets/javascripts/spotlight/spotlight.esm.js +2181 -4557
- data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
- data/app/assets/javascripts/spotlight/spotlight.js +2199 -4556
- data/app/assets/javascripts/spotlight/spotlight.js.map +1 -1
- data/app/assets/stylesheets/spotlight/_blacklight_overrides.scss +4 -0
- data/app/assets/stylesheets/spotlight/_browse.scss +0 -4
- data/app/assets/stylesheets/spotlight/{_collapse_toggle.scss → _collapse_toggle.css} +2 -2
- data/app/assets/stylesheets/spotlight/_exhibit_admin.scss +8 -0
- data/app/assets/stylesheets/spotlight/_exhibits_index.scss +2 -1
- data/app/assets/stylesheets/spotlight/_footer.scss +2 -2
- data/app/assets/stylesheets/spotlight/_header.scss +8 -8
- data/app/assets/stylesheets/spotlight/_multi_up_item_grid.scss +1 -10
- data/app/assets/stylesheets/spotlight/_nestable.scss +18 -1
- data/app/assets/stylesheets/spotlight/_pages.scss +4 -4
- data/app/assets/stylesheets/spotlight/_slideshow_block.scss +15 -0
- data/app/assets/stylesheets/spotlight/_spotlight.scss +1 -1
- data/app/assets/stylesheets/spotlight/_translations.scss +3 -3
- data/app/assets/stylesheets/spotlight/_uploaded_items_block.css +7 -0
- data/app/assets/stylesheets/spotlight/_variables.css +15 -0
- data/app/assets/stylesheets/spotlight/browse_group_categories_block.scss +0 -76
- data/app/components/blacklight/icons/pause_component.rb +15 -0
- data/app/components/blacklight/icons/play_arrow_component.rb +15 -0
- data/app/components/spotlight/analytics/dashboard_component.html.erb +1 -1
- data/app/components/spotlight/document_admin_table_component.html.erb +2 -2
- data/app/components/spotlight/masthead_component.html.erb +18 -0
- data/app/components/spotlight/masthead_component.rb +46 -0
- data/app/components/spotlight/save_search_component.html.erb +1 -1
- data/app/components/spotlight/solr_document_legacy_embed_component.html.erb +0 -4
- data/app/components/spotlight/solr_document_legacy_embed_component.rb +2 -2
- data/app/components/spotlight/tag_selector_component.html.erb +1 -1
- data/app/components/spotlight/tag_selector_component.rb +3 -2
- data/app/controllers/concerns/spotlight/controller.rb +15 -14
- data/app/controllers/concerns/spotlight/search_helper.rb +2 -5
- data/app/controllers/spotlight/browse_controller.rb +1 -2
- data/app/controllers/spotlight/catalog_controller.rb +1 -2
- data/app/controllers/spotlight/concerns/application_controller.rb +4 -6
- data/app/controllers/spotlight/exhibits_controller.rb +22 -10
- data/app/controllers/spotlight/lock_controller.rb +1 -1
- data/app/controllers/spotlight/pages_controller.rb +11 -11
- data/app/controllers/spotlight/resources_controller.rb +1 -1
- data/app/helpers/spotlight/application_helper.rb +14 -3
- data/app/helpers/spotlight/main_app_helpers.rb +2 -2
- data/app/javascript/spotlight/admin/add_another.js +37 -25
- data/app/javascript/spotlight/admin/add_image_selector.js +43 -26
- data/app/javascript/spotlight/admin/add_new_button.js +51 -36
- data/app/javascript/spotlight/admin/blacklight_configuration.js +76 -54
- data/app/javascript/spotlight/admin/block_mixins/autocompleteable.js +102 -101
- data/app/javascript/spotlight/admin/block_mixins/formable.js +91 -75
- data/app/javascript/spotlight/admin/block_mixins/plustextable.js +46 -48
- data/app/javascript/spotlight/admin/blocks/block.js +27 -28
- data/app/javascript/spotlight/admin/blocks/browse_block.js +14 -10
- data/app/javascript/spotlight/admin/blocks/browse_group_categories_block.js +14 -10
- data/app/javascript/spotlight/admin/blocks/pages_block.js +5 -4
- data/app/javascript/spotlight/admin/blocks/resources_block.js +61 -41
- data/app/javascript/spotlight/admin/blocks/search_result_block.js +24 -7
- data/app/javascript/spotlight/admin/blocks/solr_documents_base_block.js +103 -50
- data/app/javascript/spotlight/admin/blocks/solr_documents_carousel_block.js +50 -26
- data/app/javascript/spotlight/admin/blocks/solr_documents_features_block.js +47 -23
- data/app/javascript/spotlight/admin/blocks/uploaded_items_block.js +35 -19
- data/app/javascript/spotlight/admin/crop.js +146 -66
- data/app/javascript/spotlight/admin/croppable.js +5 -4
- data/app/javascript/spotlight/admin/croppable_modal.js +67 -32
- data/app/javascript/spotlight/admin/edit_in_place.js +69 -54
- data/app/javascript/spotlight/admin/exhibits.js +92 -45
- data/app/javascript/spotlight/admin/form_observer.js +92 -78
- data/app/javascript/spotlight/admin/multi_image_selector.js +201 -153
- data/app/javascript/spotlight/admin/pages.js +13 -7
- data/app/javascript/spotlight/admin/progress_monitor.js +65 -50
- data/app/javascript/spotlight/admin/readonly_checkbox.js +7 -3
- data/app/javascript/spotlight/admin/search_typeahead.js +20 -11
- data/app/javascript/spotlight/admin/select_related_input.js +23 -23
- data/app/javascript/spotlight/admin/serialize_json.js +120 -0
- data/app/javascript/spotlight/admin/sir-trevor/block_controls.js +24 -11
- data/app/javascript/spotlight/admin/sir-trevor/block_limits.js +9 -6
- data/app/javascript/spotlight/admin/sir-trevor/locales.js +2 -2
- data/app/javascript/spotlight/admin/spotlight_nestable.js +17 -7
- data/app/javascript/spotlight/admin/tabs.js +5 -2
- data/app/javascript/spotlight/admin/translation_progress.js +18 -13
- data/app/javascript/spotlight/admin/users.js +151 -64
- data/app/javascript/spotlight/user/carousel.js +104 -32
- data/app/javascript/spotlight/user/clear_form_button.js +24 -14
- data/app/javascript/spotlight/user/index.js +0 -2
- data/app/javascript/spotlight/user/zpr_links.js +99 -40
- data/app/jobs/concerns/spotlight/gather_documents.rb +1 -1
- data/app/jobs/spotlight/add_uploads_from_csv.rb +29 -8
- data/app/models/concerns/spotlight/access_controls_enforcement_search_builder.rb +13 -2
- data/app/models/concerns/spotlight/browse_category_search_builder.rb +3 -3
- data/app/models/concerns/spotlight/exhibit_documents.rb +2 -2
- data/app/models/concerns/spotlight/sitemap.rb +2 -2
- data/app/models/concerns/spotlight/solr_document/finder.rb +2 -2
- data/app/models/sir_trevor_rails/blocks/solr_documents_block.rb +2 -1
- data/app/models/spotlight/blacklight_configuration.rb +5 -3
- data/app/models/spotlight/contact_email.rb +2 -2
- data/app/models/spotlight/exhibit.rb +28 -0
- data/app/models/spotlight/featured_image.rb +1 -1
- data/app/models/spotlight/field_metadata.rb +10 -5
- data/app/models/spotlight/job_tracker.rb +2 -2
- data/app/models/spotlight/main_navigation.rb +2 -2
- data/app/models/spotlight/page.rb +3 -3
- data/app/models/spotlight/resources/iiif_harvester.rb +7 -4
- data/app/models/spotlight/resources/iiif_manifest_metadata.rb +1 -3
- data/app/models/spotlight/resources/iiif_service.rb +21 -6
- data/app/models/spotlight/search.rb +5 -5
- data/app/services/spotlight/bulk_updates_csv_template_service.rb +1 -1
- data/app/services/spotlight/etl/pipeline.rb +2 -2
- data/app/services/spotlight/etl/step.rb +2 -2
- data/app/views/catalog/_remove_tags.html.erb +2 -2
- data/app/views/layouts/spotlight/base.html.erb +3 -6
- data/app/views/layouts/spotlight/spotlight.html.erb +2 -2
- data/app/views/shared/_analytics.html.erb +4 -3
- data/app/views/shared/_masthead.html.erb +2 -18
- data/app/views/spotlight/about_pages/_empty.html.erb +1 -1
- data/app/views/spotlight/about_pages/_sidebar.html.erb +10 -8
- data/app/views/spotlight/browse/_search.html.erb +2 -2
- data/app/views/spotlight/browse/_search_box.html.erb +6 -14
- data/app/views/spotlight/browse/index.html.erb +1 -1
- data/app/views/spotlight/browse/show.html.erb +1 -1
- data/app/views/spotlight/catalog/_document_admin_table.html.erb +1 -1
- data/app/views/spotlight/catalog/edit.html.erb +1 -1
- data/app/views/spotlight/dashboards/_page.html.erb +1 -1
- data/app/views/spotlight/exhibits/_exhibit_card.html.erb +3 -1
- data/app/views/spotlight/exhibits/_export.html.erb +17 -1
- data/app/views/spotlight/exhibits/_form.html.erb +20 -4
- data/app/views/spotlight/exhibits/_missing_exhibits.html.erb +3 -3
- data/app/views/spotlight/exhibits/index.html.erb +21 -8
- data/app/views/spotlight/feature_pages/_empty.html.erb +1 -1
- data/app/views/spotlight/feature_pages/_sidebar.html.erb +17 -15
- data/app/views/spotlight/home_pages/_empty.html.erb +7 -7
- data/app/views/spotlight/pages/show.html.erb +1 -0
- data/app/views/spotlight/sir_trevor/blocks/_browse_group_categories_block.html.erb +5 -16
- data/app/views/spotlight/sir_trevor/blocks/_embedded_document.html.erb +3 -5
- data/app/views/spotlight/sir_trevor/blocks/_link_to_search_block.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb +11 -2
- data/app/views/spotlight/sites/_exhibit.html.erb +1 -1
- data/config/locales/spotlight.ar.yml +1 -2
- data/config/locales/spotlight.de.yml +1 -2
- data/config/locales/spotlight.en.yml +39 -6
- data/config/locales/spotlight.es.yml +1 -2
- data/config/locales/spotlight.fr.yml +1 -2
- data/config/locales/spotlight.it.yml +1 -2
- data/config/locales/spotlight.ja.yml +39 -0
- data/config/locales/spotlight.zh.yml +1 -2
- data/db/migrate/20261007133748_add_discovery_enabled_to_spotlight_exhibits.rb +5 -0
- data/lib/generators/spotlight/assets/importmap_generator.rb +2 -10
- data/lib/generators/spotlight/assets/propshaft_generator.rb +5 -4
- data/lib/generators/spotlight/install_generator.rb +2 -4
- data/lib/generators/spotlight/templates/catalog_controller.rb +0 -1
- data/lib/generators/spotlight/templates/config/initializers/spotlight_initializer.rb +18 -4
- data/lib/generators/spotlight/templates/solr/conf/schema.xml +4 -3
- data/lib/generators/spotlight/templates/solr/conf/solrconfig.xml +3 -8
- data/lib/migration/page_language.rb +0 -2
- data/lib/spotlight/engine.rb +23 -7
- data/lib/spotlight/search_state.rb +7 -11
- data/lib/spotlight/version.rb +1 -1
- data/lib/spotlight.rb +1 -1
- data/spec/support/features/capybara_wait_metadata_helper.rb +3 -1
- data/spec/support/features/test_features_helpers.rb +55 -1
- data/spec/support/iiif_manifest_fixtures.rb +33 -0
- data/spec/support/stub_dns_resolution.rb +12 -0
- metadata +38 -58
- data/app/assets/stylesheets/spotlight/_uploaded_items_block.scss +0 -7
- data/app/assets/stylesheets/spotlight/_variables.scss +0 -13
- data/app/components/blacklight/icons/arrow_alt_circle_left_component.rb +0 -15
- data/app/components/blacklight/icons/arrow_alt_circle_right_component.rb +0 -15
- data/app/components/spotlight/icon_component.rb +0 -13
- data/app/javascript/spotlight/user/browse_group_categories.js +0 -54
- data/app/models/concerns/spotlight/resources/web.rb +0 -38
- data/app/services/spotlight/iiif_resource_resolver.rb +0 -78
- data/app/views/shared/_exhibit_navbar.html.erb +0 -2
- data/app/views/shared/_header_navbar.html.erb +0 -6
- data/app/views/spotlight/catalog/_admin_index_header_default.html.erb +0 -23
- data/app/views/spotlight/catalog/_admin_thumbnail_default.html.erb +0 -7
- data/app/views/spotlight/catalog/_document_row.html.erb +0 -2
- data/app/views/spotlight/catalog/_index_compact_default.html.erb +0 -21
- data/lib/generators/spotlight/templates/javascript/jquery-shim.js +0 -1
- data/vendor/assets/javascripts/tiny-slider.js +0 -3221
- data/vendor/assets/stylesheets/tiny-slider.css +0 -1
- /data/app/assets/stylesheets/spotlight/{_breadcrumbs.scss → _breadcrumbs.css} +0 -0
- /data/app/assets/stylesheets/spotlight/{_croppable.scss → _croppable.css} +0 -0
- /data/app/assets/stylesheets/spotlight/{_modals.scss → _modals.css} +0 -0
- /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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 95ee8daf3a842b8230c41db5a322202457a2b6d5d6e59c86966d724915ef885d
|
|
4
|
+
data.tar.gz: fe5a12e8ecd14c9ee515d5c784e783ebc7861895ff1a07fe2c629e4c9ef1e989
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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.
|
|
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
|
|
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
|
|
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
|