ccs-frontend_helpers 0.1.0.rc.3 → 0.1.0.rc.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 675c60c51c25d5cd22e26b1e92a579053d1340200bc4a33e9a4e36e65b6790ca
4
- data.tar.gz: b90658aa1deadfa04ee5dd2d12be7f8a62b83656017a0fc557812fced67a789f
3
+ metadata.gz: 1771993ecf89c88ed73db635304b30f1b138ddfb3d113256f4ea6e37a31410e3
4
+ data.tar.gz: 9cbef221d21d7643742d3ae965d6de8a644ed069ca81639f128de03913eb51e0
5
5
  SHA512:
6
- metadata.gz: d5ec2d542ec51558264bfd069546b59969ff401fc1c49c0b332ea547ce7504e477d8dd01ae50f16a7b322d1e80b3d5e584d540259c398090b5aba10af240cd33
7
- data.tar.gz: 93ed922f0db520239e8d27bf422ebf9badaad94cd014f7af431e6009d5d1ba4b9ffb96cfca565e7e7ff1ed2d4912a2f7189d03c9ec4f4a8f1dfe2650a4cc7b1b
6
+ metadata.gz: 766cc075836af76d3562f8b0c9dd4193d64df77bd29218503c9bbfae2c2c6bd4a07264ac0254fc49d23fb3b4c6de0c584f6d7b1b51f4d825abe844cdcfc68f2d
7
+ data.tar.gz: 3e0b8e149adfc22d5816adb7748deb8d51b586445c3f0ab7dbc9d3de994eadf2e38094804c82fc7add6ddf2fce3f8d8e18a713feae286603332ace892c991c48
data/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- ## [0.1.0.rc.3] - 2023-04-05
1
+ ## [0.1.0] - 2023-02-22
2
2
 
3
3
  Initial release of CCS Frontend Helpers.
4
4
  This release contains view helpers that are used to create GOV.UK and CCS components.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ccs-frontend_helpers (0.1.0.rc.3)
4
+ ccs-frontend_helpers (0.1.0.rc.4)
5
5
  rails (>= 6.0)
6
6
 
7
7
  GEM
@@ -36,11 +36,13 @@ module CCS
36
36
  def initialize(any_row_has_actions:, key:, value:, actions: nil, **options)
37
37
  super(**options)
38
38
 
39
- @options[:attributes][:class] << ' govuk-summary-list__row--no-actions' if any_row_has_actions && !actions
39
+ actions_present = actions && actions[:items].present?
40
+
41
+ @options[:attributes][:class] << ' govuk-summary-list__row--no-actions' if any_row_has_actions && !actions_present
40
42
 
41
43
  @key = Key.new(context: @context, **key)
42
44
  @value = Value.new(context: @context, **value)
43
- @actions = Actions.new(context: @context, **actions) if actions
45
+ @actions = Actions.new(context: @context, **actions) if actions_present
44
46
  end
45
47
 
46
48
  # Generates the HTML for the GOV.UK Summary list row
@@ -33,7 +33,7 @@ module CCS
33
33
  def initialize(summary_list_items:, card: nil, **options)
34
34
  super(**options)
35
35
 
36
- any_row_has_actions = summary_list_items.any? { |summary_list_item| summary_list_item[:actions].present? }
36
+ any_row_has_actions = summary_list_items.any? { |summary_list_item| summary_list_item.dig(:actions, :items).present? }
37
37
 
38
38
  @summary_list_rows = summary_list_items.map { |summary_list_item| Row.new(any_row_has_actions: any_row_has_actions, context: @context, **summary_list_item) }
39
39
  @card = Card.new(context: @context, **card) if card
@@ -2,6 +2,6 @@
2
2
 
3
3
  module CCS
4
4
  module FrontendHelpers
5
- VERSION = '0.1.0.rc.3'
5
+ VERSION = '0.1.0.rc.4'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ccs-frontend_helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.rc.3
4
+ version: 0.1.0.rc.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - tim-s-ccs
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-05 00:00:00.000000000 Z
11
+ date: 2023-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails