blacklight 7.5.0 → 7.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/.docker/app/Dockerfile +26 -0
  3. data/.docker/app/entrypoint.sh +6 -0
  4. data/.env +5 -0
  5. data/.gitignore +0 -1
  6. data/.rubocop_todo.yml +26 -37
  7. data/.travis.yml +16 -24
  8. data/Gemfile +4 -1
  9. data/README.md +4 -0
  10. data/VERSION +1 -1
  11. data/app/assets/stylesheets/blacklight/_pagination.scss +4 -0
  12. data/app/components/blacklight/constraint_layout_component.html.erb +23 -0
  13. data/app/components/blacklight/constraint_layout_component.rb +16 -0
  14. data/app/components/blacklight/facet_field_component.html.erb +25 -0
  15. data/app/components/blacklight/facet_field_component.rb +11 -0
  16. data/app/components/blacklight/facet_field_list_component.html.erb +18 -0
  17. data/app/components/blacklight/facet_field_list_component.rb +22 -0
  18. data/app/components/blacklight/facet_field_no_layout_component.rb +13 -0
  19. data/app/components/blacklight/facet_item_component.rb +120 -0
  20. data/app/controllers/concerns/blacklight/catalog.rb +4 -1
  21. data/app/helpers/blacklight/blacklight_helper_behavior.rb +4 -2
  22. data/app/helpers/blacklight/catalog_helper_behavior.rb +2 -4
  23. data/app/helpers/blacklight/configuration_helper_behavior.rb +3 -2
  24. data/app/helpers/blacklight/facets_helper_behavior.rb +84 -48
  25. data/app/helpers/blacklight/render_constraints_helper_behavior.rb +64 -33
  26. data/app/javascript/blacklight/modal.js +1 -1
  27. data/app/models/blacklight/icon.rb +11 -5
  28. data/app/models/concerns/blacklight/document/extensions.rb +3 -0
  29. data/app/models/concerns/blacklight/document/semantic_fields.rb +0 -4
  30. data/app/presenters/blacklight/document_presenter.rb +27 -36
  31. data/app/presenters/blacklight/facet_field_presenter.rb +57 -0
  32. data/app/presenters/blacklight/facet_item_presenter.rb +81 -0
  33. data/app/presenters/blacklight/field_presenter.rb +31 -6
  34. data/app/presenters/blacklight/index_presenter.rb +2 -2
  35. data/app/presenters/blacklight/show_presenter.rb +3 -3
  36. data/app/views/catalog/_citation.html.erb +1 -1
  37. data/app/views/catalog/_constraints.html.erb +2 -2
  38. data/app/views/catalog/_constraints_element.html.erb +5 -24
  39. data/app/views/catalog/_email_form.html.erb +1 -1
  40. data/app/views/catalog/_facet_layout.html.erb +8 -17
  41. data/app/views/catalog/_facet_limit.html.erb +3 -12
  42. data/app/views/catalog/_facet_pagination.html.erb +2 -2
  43. data/app/views/catalog/_facet_pivot.html.erb +4 -4
  44. data/app/views/catalog/_field.json.jbuilder +2 -2
  45. data/app/views/catalog/_index.html.erb +3 -3
  46. data/app/views/catalog/_previous_next_doc.html.erb +5 -5
  47. data/app/views/catalog/_search_form.html.erb +1 -1
  48. data/app/views/catalog/_show.html.erb +3 -3
  49. data/app/views/catalog/_sms_form.html.erb +1 -1
  50. data/app/views/catalog/_sort_and_per_page.html.erb +1 -1
  51. data/app/views/catalog/_start_over.html.erb +1 -0
  52. data/app/views/catalog/_thumbnail.html.erb +1 -1
  53. data/app/views/catalog/index.json.jbuilder +2 -1
  54. data/app/views/catalog/show.html.erb +1 -1
  55. data/app/views/catalog/show.json.jbuilder +2 -1
  56. data/app/views/layouts/blacklight/base.html.erb +2 -2
  57. data/blacklight.gemspec +1 -0
  58. data/config/locales/blacklight.ar.yml +30 -24
  59. data/config/locales/blacklight.de.yml +2 -0
  60. data/config/locales/blacklight.en.yml +2 -0
  61. data/config/locales/blacklight.es.yml +2 -0
  62. data/config/locales/blacklight.fr.yml +2 -0
  63. data/config/locales/blacklight.hu.yml +2 -0
  64. data/config/locales/blacklight.it.yml +2 -0
  65. data/config/locales/blacklight.nl.yml +2 -0
  66. data/config/locales/blacklight.pt-BR.yml +2 -0
  67. data/config/locales/blacklight.sq.yml +2 -0
  68. data/config/locales/blacklight.zh.yml +2 -0
  69. data/docker-compose.yml +35 -0
  70. data/lib/blacklight/configuration/field.rb +5 -4
  71. data/lib/blacklight/engine.rb +2 -6
  72. data/lib/blacklight/nested_open_struct_with_hash_access.rb +1 -1
  73. data/lib/blacklight/search_state.rb +52 -0
  74. data/lib/blacklight/solr/response/facets.rb +2 -0
  75. data/lib/generators/blacklight/assets_generator.rb +10 -0
  76. data/package.json +1 -1
  77. data/spec/{views/catalog/_constraints_element.html.erb_spec.rb → components/blacklight/constraint_layout_component_spec.rb} +22 -12
  78. data/spec/components/blacklight/facet_field_list_component_spec.rb +108 -0
  79. data/spec/components/blacklight/facet_item_component_spec.rb +50 -0
  80. data/spec/controllers/catalog_controller_spec.rb +13 -1
  81. data/spec/features/facets_spec.rb +1 -1
  82. data/spec/helpers/blacklight/configuration_helper_behavior_spec.rb +3 -0
  83. data/spec/helpers/blacklight/facets_helper_behavior_spec.rb +24 -12
  84. data/spec/helpers/blacklight/render_constraints_helper_behavior_spec.rb +4 -23
  85. data/spec/helpers/blacklight_helper_spec.rb +17 -0
  86. data/spec/helpers/catalog_helper_spec.rb +0 -7
  87. data/spec/lib/blacklight/search_state_spec.rb +50 -0
  88. data/spec/models/blacklight/icon_spec.rb +15 -6
  89. data/spec/models/blacklight/solr/response/facets_spec.rb +30 -1
  90. data/spec/presenters/blacklight/document_presenter_spec.rb +22 -62
  91. data/spec/presenters/blacklight/facet_field_presenter_spec.rb +109 -0
  92. data/spec/presenters/blacklight/facet_item_presenter_spec.rb +92 -0
  93. data/spec/presenters/blacklight/field_presenter_spec.rb +268 -0
  94. data/spec/presenters/blacklight/index_presenter_spec.rb +0 -142
  95. data/spec/presenters/blacklight/show_presenter_spec.rb +0 -177
  96. data/spec/spec_helper.rb +2 -0
  97. data/spec/support/presenter_test_helpers.rb +11 -0
  98. data/spec/views/catalog/_facet_group.html.erb_spec.rb +1 -0
  99. data/spec/views/catalog/_previous_next_doc.html.erb_spec.rb +18 -0
  100. data/tasks/blacklight.rake +30 -23
  101. metadata +48 -7
  102. data/Vagrantfile +0 -79
  103. data/provision.sh +0 -30
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9494eb9f9c98dc35a06a369d93d30095cb05718427599f49c2179c3ab0d44456
4
- data.tar.gz: fafdd89b5d4bf169f303e2673a7369b32b14894dfb983405cb37f556dcab1a3b
3
+ metadata.gz: 797fccb08c32206cbf11ab04efa5b980456a8a1ff2f949940ce68b9b29843720
4
+ data.tar.gz: 26608839399a44a7f33f4313337a35c5a064578daa0819cc845a601c9d058d3c
5
5
  SHA512:
6
- metadata.gz: 5011b8be264ee25f7b701e77e0e099add0f382d7f95e85123e53a6f2b215fe867b4bc5fdbb0ff02845c125fe0d89674f83750bb044650acdad103d6eb4fcb1ac
7
- data.tar.gz: c772cdf8efef43a8c86c81b7ff445f5a7a6a7ab6ebdb8d6d2bac4654a558528522e6e76eec8e330996288f2e0d991fb531fb7852ded86c4bd8f0f69f0db53563
6
+ metadata.gz: 2066cfd8c17650d43b39707f8d73c39745307eff3795875833f0a1e0c794ba92a8aae1aa061db59e5a39154332e0e5addcb3a4d4463894ccc641eee57ed40b7e
7
+ data.tar.gz: 3403d40968957aadb62eba71caed870704c23bbebf93f98910bba9931ca136b80d79ba411cb1852a2a48bf227e3456fd1d91fc8ecd01b7b8aad852dbb3f4ab8e
@@ -0,0 +1,26 @@
1
+ ARG ALPINE_RUBY_VERSION
2
+
3
+ FROM ruby:${ALPINE_RUBY_VERSION}-alpine
4
+
5
+ RUN apk add --update --no-cache \
6
+ bash \
7
+ build-base \
8
+ git \
9
+ libxml2-dev \
10
+ libxslt-dev \
11
+ nodejs \
12
+ sqlite-dev \
13
+ tzdata
14
+
15
+ RUN mkdir /app
16
+ WORKDIR /app
17
+
18
+ RUN gem update --system && \
19
+ gem install bundler && \
20
+ bundle config build.nokogiri --use-system-libraries
21
+
22
+ COPY . .
23
+
24
+ EXPOSE 3000
25
+
26
+ CMD [".docker/app/entrypoint.sh"]
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env bash
2
+ set -e
3
+
4
+ rm -f /app/.internal_test_app/tmp/pids/server.pid
5
+ bundle install
6
+ exec bundle exec rake blacklight:server["-p 3000 -b 0.0.0.0"]
data/.env ADDED
@@ -0,0 +1,5 @@
1
+ ALPINE_RUBY_VERSION=2.6.5
2
+ RAILS_VERSION=5.2.4.1
3
+ SOLR_PORT=8983
4
+ SOLR_URL=http://solr:8983/solr/blacklight-core
5
+ SOLR_VERSION=latest
data/.gitignore CHANGED
@@ -14,6 +14,5 @@ log/*
14
14
  tmp/*
15
15
  pkg/*
16
16
  .internal_test_app
17
- .vagrant
18
17
  /spec/examples.txt
19
18
  node_modules/*
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2019-09-11 10:59:32 -0500 using RuboCop version 0.63.1.
3
+ # on 2020-03-30 10:03:33 -0700 using RuboCop version 0.63.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -36,17 +36,16 @@ Layout/ClosingParenthesisIndentation:
36
36
  Exclude:
37
37
  - 'app/views/catalog/index.atom.builder'
38
38
 
39
- # Offense count: 108
39
+ # Offense count: 109
40
40
  # Cop supports --auto-correct.
41
41
  Layout/EmptyLineAfterMagicComment:
42
42
  Enabled: false
43
43
 
44
- # Offense count: 8
44
+ # Offense count: 7
45
45
  # Cop supports --auto-correct.
46
46
  # Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
47
47
  Layout/ExtraSpacing:
48
48
  Exclude:
49
- - 'app/helpers/blacklight/catalog_helper_behavior.rb'
50
49
  - 'app/models/concerns/blacklight/document/dublin_core.rb'
51
50
  - 'app/models/record_mailer.rb'
52
51
  - 'app/views/catalog/index.atom.builder'
@@ -126,13 +125,6 @@ Layout/SpaceInsideParens:
126
125
  - 'app/views/catalog/_document.rss.builder'
127
126
  - 'app/views/catalog/index.atom.builder'
128
127
 
129
- # Offense count: 1
130
- # Cop supports --auto-correct.
131
- # Configuration parameters: AllowInHeredoc.
132
- Layout/TrailingWhitespace:
133
- Exclude:
134
- - 'app/views/catalog/_document.rss.builder'
135
-
136
128
  # Offense count: 1
137
129
  Lint/AmbiguousBlockAssociation:
138
130
  Exclude:
@@ -185,7 +177,7 @@ Lint/UselessComparison:
185
177
  Exclude:
186
178
  - 'spec/models/blacklight/document/active_model_shim_spec.rb'
187
179
 
188
- # Offense count: 58
180
+ # Offense count: 60
189
181
  Metrics/AbcSize:
190
182
  Max: 49
191
183
 
@@ -207,26 +199,26 @@ Metrics/ClassLength:
207
199
 
208
200
  # Offense count: 19
209
201
  Metrics/CyclomaticComplexity:
210
- Max: 12
202
+ Max: 11
211
203
 
212
- # Offense count: 48
204
+ # Offense count: 56
213
205
  # Configuration parameters: CountComments, ExcludedMethods.
214
206
  Metrics/MethodLength:
215
- Max: 35
207
+ Max: 30
216
208
 
217
209
  # Offense count: 8
218
210
  # Configuration parameters: CountComments.
219
211
  Metrics/ModuleLength:
220
- Max: 210
212
+ Max: 212
221
213
 
222
- # Offense count: 1
214
+ # Offense count: 5
223
215
  # Configuration parameters: CountKeywordArgs.
224
216
  Metrics/ParameterLists:
225
- Max: 6
217
+ Max: 7
226
218
 
227
219
  # Offense count: 16
228
220
  Metrics/PerceivedComplexity:
229
- Max: 14
221
+ Max: 13
230
222
 
231
223
  # Offense count: 4
232
224
  # Configuration parameters: EnforcedStyleForLeadingUnderscores.
@@ -253,12 +245,11 @@ Naming/UncommunicativeMethodParamName:
253
245
  - 'spec/features/search_context_spec.rb'
254
246
  - 'spec/features/search_results_spec.rb'
255
247
 
256
- # Offense count: 16
248
+ # Offense count: 14
257
249
  # Configuration parameters: EnforcedStyle.
258
250
  # SupportedStyles: snake_case, normalcase, non_integer
259
251
  Naming/VariableNumber:
260
252
  Exclude:
261
- - 'spec/views/catalog/_facets.html.erb_spec.rb'
262
253
  - 'spec/views/catalog/_index.html.erb_spec.rb'
263
254
  - 'spec/views/catalog/_show.html.erb_spec.rb'
264
255
 
@@ -290,13 +281,13 @@ RSpec/BeforeAfterAll:
290
281
  - 'spec/models/blacklight/document/sms_spec.rb'
291
282
  - 'spec/models/blacklight/solr/document_spec.rb'
292
283
 
293
- # Offense count: 71
284
+ # Offense count: 77
294
285
  # Configuration parameters: Prefixes.
295
286
  # Prefixes: when, with, without
296
287
  RSpec/ContextWording:
297
288
  Enabled: false
298
289
 
299
- # Offense count: 54
290
+ # Offense count: 56
300
291
  RSpec/DescribeClass:
301
292
  Enabled: false
302
293
 
@@ -306,7 +297,7 @@ RSpec/EmptyExampleGroup:
306
297
  Exclude:
307
298
  - 'spec/models/blacklight/solr/search_builder_spec.rb'
308
299
 
309
- # Offense count: 127
300
+ # Offense count: 130
310
301
  # Configuration parameters: Max.
311
302
  RSpec/ExampleLength:
312
303
  Enabled: false
@@ -330,7 +321,7 @@ RSpec/FilePath:
330
321
  - 'spec/presenters/pipeline_spec.rb'
331
322
  - 'spec/presenters/thumbnail_presenter_spec.rb'
332
323
 
333
- # Offense count: 196
324
+ # Offense count: 191
334
325
  # Configuration parameters: AssignmentOnly.
335
326
  RSpec/InstanceVariable:
336
327
  Enabled: false
@@ -358,10 +349,10 @@ RSpec/LeakyConstantDeclaration:
358
349
  RSpec/MessageChain:
359
350
  Exclude:
360
351
  - 'spec/controllers/bookmarks_controller_spec.rb'
361
- - 'spec/presenters/blacklight/show_presenter_spec.rb'
352
+ - 'spec/presenters/blacklight/field_presenter_spec.rb'
362
353
  - 'spec/views/shared/_user_util_links.html.erb_spec.rb'
363
354
 
364
- # Offense count: 67
355
+ # Offense count: 61
365
356
  # Configuration parameters: EnforcedStyle.
366
357
  # SupportedStyles: have_received, receive
367
358
  RSpec/MessageSpies:
@@ -377,16 +368,15 @@ RSpec/MessageSpies:
377
368
  - 'spec/lib/blacklight/configuration/facet_field_spec.rb'
378
369
  - 'spec/models/blacklight/search_builder_spec.rb'
379
370
  - 'spec/models/blacklight/suggest_search_spec.rb'
380
- - 'spec/presenters/blacklight/index_presenter_spec.rb'
381
- - 'spec/presenters/blacklight/show_presenter_spec.rb'
371
+ - 'spec/presenters/blacklight/field_presenter_spec.rb'
382
372
  - 'spec/presenters/thumbnail_presenter_spec.rb'
383
373
 
384
- # Offense count: 346
374
+ # Offense count: 343
385
375
  # Configuration parameters: AggregateFailuresByDefault.
386
376
  RSpec/MultipleExpectations:
387
377
  Max: 16
388
378
 
389
- # Offense count: 332
379
+ # Offense count: 341
390
380
  # Configuration parameters: IgnoreSharedExamples.
391
381
  RSpec/NamedSubject:
392
382
  Enabled: false
@@ -403,10 +393,9 @@ RSpec/RepeatedDescription:
403
393
  - 'spec/helpers/catalog_helper_spec.rb'
404
394
  - 'spec/models/blacklight/solr/search_builder_spec.rb'
405
395
 
406
- # Offense count: 4
396
+ # Offense count: 2
407
397
  RSpec/RepeatedExample:
408
398
  Exclude:
409
- - 'spec/features/search_filters_spec.rb'
410
399
  - 'spec/models/blacklight/solr/document_spec.rb'
411
400
 
412
401
  # Offense count: 4
@@ -423,7 +412,7 @@ RSpec/SubjectStub:
423
412
  - 'spec/models/blacklight/search_builder_spec.rb'
424
413
  - 'spec/services/blacklight/search_service_spec.rb'
425
414
 
426
- # Offense count: 119
415
+ # Offense count: 118
427
416
  # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
428
417
  RSpec/VerifiedDoubles:
429
418
  Enabled: false
@@ -508,7 +497,7 @@ Style/ConditionalAssignment:
508
497
  Exclude:
509
498
  - 'lib/blacklight/solr/response/spelling.rb'
510
499
 
511
- # Offense count: 94
500
+ # Offense count: 99
512
501
  Style/Documentation:
513
502
  Enabled: false
514
503
 
@@ -548,12 +537,12 @@ Style/GuardClause:
548
537
  - 'app/helpers/blacklight/catalog_helper_behavior.rb'
549
538
  - 'lib/blacklight/solr/search_builder_behavior.rb'
550
539
 
551
- # Offense count: 40
540
+ # Offense count: 39
552
541
  # Cop supports --auto-correct.
553
542
  Style/IfUnlessModifier:
554
543
  Enabled: false
555
544
 
556
- # Offense count: 124
545
+ # Offense count: 122
557
546
  # Cop supports --auto-correct.
558
547
  # Configuration parameters: EnforcedStyle.
559
548
  # SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline
@@ -1,50 +1,42 @@
1
1
  dist: bionic
2
+
2
3
  addons:
3
4
  chrome: stable
4
- language: ruby
5
5
 
6
- notifications:
7
- email: false
6
+ language: ruby
8
7
 
9
8
  matrix:
10
9
  include:
10
+ - rvm: 2.7.0
11
+ env: "RAILS_VERSION=6.0.2.2"
11
12
  - rvm: 2.6.5
12
- env: "RAILS_VERSION=6.0.0 ENGINE_CART_RAILS_OPTIONS=\"--skip-webpack-install\""
13
+ env: "RAILS_VERSION=6.0.2.2"
13
14
  - rvm: 2.6.5
14
- env: "RAILS_VERSION=5.2.3"
15
- - rvm: 2.5.7
16
- env: "RAILS_VERSION=5.1.7"
15
+ env: "RAILS_VERSION=5.2.4.2"
17
16
  - rvm: 2.5.7
18
- env: "RAILS_VERSION=5.2.3 BLACKLIGHT_API_TEST=true ENGINE_CART_RAILS_OPTIONS=\"--api --skip-git --skip-bundle --skip-listen --skip-spring --skip-yarn --skip-keeps --skip-action-cable --skip-coffee --skip-test\""
17
+ env: "RAILS_VERSION=5.2.4.2 BLACKLIGHT_API_TEST=true ENGINE_CART_RAILS_OPTIONS=\"--api --skip-git --skip-bundle --skip-listen --skip-spring --skip-yarn --skip-keeps --skip-action-cable --skip-coffee --skip-test\""
19
18
  - rvm: 2.4.9
20
- env: "RAILS_VERSION=5.1.7"
19
+ env: "RAILS_VERSION=5.2.4.2"
21
20
  - rvm: jruby-9.2.8.0
22
- env: "RAILS_VERSION=5.1.7 JRUBY_OPTS=\"-J-Xms512m -J-Xmx1024m\""
21
+ env: "RAILS_VERSION=5.2.4.2 JRUBY_OPTS=\"-J-Xms512m -J-Xmx1024m\""
23
22
  allow_failures:
24
23
  - rvm: jruby-9.2.8.0
25
24
  fast_finish: true
26
25
 
27
26
  before_install:
28
- - docker pull solr:7
29
- - docker run -d -p 8983:8983 -v $PWD/lib/generators/blacklight/templates/solr/conf:/myconfig solr:7 solr-create -c blacklight-core -d /myconfig
30
- - docker ps -a
31
27
  - google-chrome-stable --headless --disable-gpu --no-sandbox --remote-debugging-port=9222 http://localhost &
32
28
 
33
- notifications:
34
- irc: "irc.freenode.org#blacklight"
35
- email:
36
- - blacklight-commits@googlegroups.com
37
-
38
- global_env:
39
- - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
40
- - ENGINE_CART_RAILS_OPTIONS='--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test'
41
- - CC_TEST_REPORTER_ID=5042c7358c96b0b926088a4cda3e132fffe7a66ce8047cdb1dc6f0b4b6676b79
42
-
43
- jdk: openjdk11
29
+ env:
30
+ global:
31
+ - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
32
+ - ENGINE_CART_RAILS_OPTIONS='--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test'
33
+ - CC_TEST_REPORTER_ID=5042c7358c96b0b926088a4cda3e132fffe7a66ce8047cdb1dc6f0b4b6676b79
44
34
 
45
35
  before_script:
46
36
  - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
47
37
  - chmod +x ./cc-test-reporter
48
38
  - ./cc-test-reporter before-build
39
+
49
40
  after_script:
50
41
  - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
42
+ - docker-compose build app || travis_terminate 1 # validates application Dockerfile
data/Gemfile CHANGED
@@ -34,7 +34,10 @@ else
34
34
  end
35
35
 
36
36
  case ENV['RAILS_VERSION']
37
- when /^5.[12]/, /^6.0/
37
+ when /^6.0/
38
+ gem 'sass-rails', '>= 6'
39
+ gem 'webpacker', '~> 4.0'
40
+ when /^5.[12]/
38
41
  gem 'sass-rails', '~> 5.0'
39
42
  when /^4.2/
40
43
  gem 'responders', '~> 2.0'
data/README.md CHANGED
@@ -38,6 +38,10 @@ rails generate blacklight:install
38
38
  * Bundler
39
39
  * Rails 5.1+
40
40
 
41
+ ## Contributing Code
42
+
43
+ Code contributions are always welcome, instructions for contributing can be found at [CONTRIBUTING.md](https://github.com/projectblacklight/blacklight/blob/master/CONTRIBUTING.md).
44
+
41
45
  ## Configuring Apache Solr
42
46
  You'll also want some information about how Blacklight expects [Apache Solr](http://lucene.apache.org/solr ) to run, which you can find in [README_SOLR](https://github.com/projectblacklight/blacklight/wiki/README_SOLR)
43
47
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 7.5.0
1
+ 7.8.1
@@ -5,6 +5,10 @@
5
5
  padding-left: 0;
6
6
  }
7
7
 
8
+ .record-padding {
9
+ margin-top: $spacer / 2;
10
+ }
11
+
8
12
  .pagination {
9
13
  @media (max-width: breakpoint-max(sm)) {
10
14
  flex-wrap: wrap;
@@ -0,0 +1,23 @@
1
+ <span class="btn-group applied-filter constraint <%= @classes %>">
2
+ <span class="constraint-value btn btn-outline-secondary">
3
+ <% if @label.present? %>
4
+ <span class="filter-name"><%= @label %></span>
5
+ <% end %>
6
+ <% if @value.present? %>
7
+ <%= content_tag :span, @value, class: 'filter-value', title: strip_tags(@value) %>
8
+ <% end %>
9
+ </span>
10
+ <% if @remove_path.present? %>
11
+ <%= link_to(@remove_path, class: 'btn btn-outline-secondary remove') do %>
12
+ <span class="remove-icon">✖</span>
13
+ <span class="sr-only">
14
+ <%= if @label.blank?
15
+ t('blacklight.search.filters.remove.value', value: @value)
16
+ else
17
+ t('blacklight.search.filters.remove.label_value', label: @label, value: @value)
18
+ end
19
+ %>
20
+ </span>
21
+ <% end %>
22
+ <% end %>
23
+ </span>
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Blacklight
4
+ class ConstraintLayoutComponent < ::ViewComponent::Base
5
+ def initialize(value:, label: nil, remove_path: nil, classes: nil)
6
+ @value = value
7
+ @label = label
8
+ @remove_path = remove_path
9
+ @classes = Array(classes).join(' ')
10
+ end
11
+
12
+ def render?
13
+ @value.present?
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,25 @@
1
+ <div class="card facet-limit blacklight-<%= @facet_field.key %> <%= 'facet-limit-active' if @facet_field.active? %>">
2
+ <h3 class="card-header p-0 facet-field-heading" id="<%= @facet_field.html_id %>-header">
3
+ <button
4
+ class="btn btn-block p-2 text-left collapse-toggle <%= "collapsed" if @facet_field.collapsed? %>"
5
+ data-toggle="collapse"
6
+ data-target="#<%= @facet_field.html_id %>"
7
+ aria-expanded="<%= @facet_field.collapsed? ? 'false' : 'true' %>"
8
+ >
9
+ <%= label %>
10
+ </button>
11
+ </h3>
12
+ <div id="<%= @facet_field.html_id %>" aria-labelledby="<%= @facet_field.html_id %>-header" class="panel-collapse facet-content collapse <%= "show" unless @facet_field.collapsed? %>">
13
+ <div class="card-body">
14
+ <%= body %>
15
+
16
+ <% if @facet_field.modal_path %>
17
+ <div class="more_facets">
18
+ <%= link_to t("more_#{@facet_field.key}_html", scope: 'blacklight.search.facets', default: :more_html, field_name: @facet_field.label),
19
+ @facet_field.modal_path,
20
+ data: { blacklight_modal: 'trigger' } %>
21
+ </div>
22
+ <% end %>
23
+ </div>
24
+ </div>
25
+ </div>
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Blacklight
4
+ class FacetFieldComponent < ::ViewComponent::Base
5
+ with_content_areas :label, :body
6
+
7
+ def initialize(facet_field:)
8
+ @facet_field = facet_field
9
+ end
10
+ end
11
+ end