govuk_publishing_components 28.8.1 → 28.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/analytics/cross-domain-tracking.js +55 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics.js +3 -0
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/_all_components_print.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss +2 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_cards.scss +102 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +1 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +2 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_warning-callout.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_cards.scss +4 -0
- data/app/views/govuk_publishing_components/components/_cards.html.erb +46 -0
- data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_input.html.erb +3 -0
- data/app/views/govuk_publishing_components/components/_lead_paragraph.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_summary_list.html.erb +27 -22
- data/app/views/govuk_publishing_components/components/contextual_sidebar/{_brexit_cta.html.erb → _ukraine_cta.html.erb} +6 -6
- data/app/views/govuk_publishing_components/components/docs/attachment.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/cards.yml +145 -0
- data/app/views/govuk_publishing_components/components/docs/contextual_sidebar.yml +12 -21
- data/app/views/govuk_publishing_components/components/docs/input.yml +16 -13
- data/app/views/govuk_publishing_components/components/docs/list.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/summary_list.yml +2 -7
- data/config/locales/ar.yml +4 -0
- data/config/locales/az.yml +4 -0
- data/config/locales/be.yml +4 -0
- data/config/locales/bg.yml +4 -0
- data/config/locales/bn.yml +4 -0
- data/config/locales/cs.yml +4 -0
- data/config/locales/cy.yml +4 -0
- data/config/locales/da.yml +4 -0
- data/config/locales/de.yml +4 -0
- data/config/locales/dr.yml +4 -0
- data/config/locales/el.yml +4 -0
- data/config/locales/en.yml +6 -2
- data/config/locales/es-419.yml +4 -0
- data/config/locales/es.yml +4 -0
- data/config/locales/et.yml +4 -0
- data/config/locales/fa.yml +4 -0
- data/config/locales/fi.yml +4 -0
- data/config/locales/fr.yml +4 -0
- data/config/locales/gd.yml +4 -0
- data/config/locales/gu.yml +4 -0
- data/config/locales/he.yml +4 -0
- data/config/locales/hi.yml +4 -0
- data/config/locales/hr.yml +4 -0
- data/config/locales/hu.yml +4 -0
- data/config/locales/hy.yml +4 -0
- data/config/locales/id.yml +4 -0
- data/config/locales/is.yml +4 -0
- data/config/locales/it.yml +4 -0
- data/config/locales/ja.yml +4 -0
- data/config/locales/ka.yml +4 -0
- data/config/locales/kk.yml +4 -0
- data/config/locales/ko.yml +4 -0
- data/config/locales/lt.yml +4 -0
- data/config/locales/lv.yml +4 -0
- data/config/locales/ms.yml +4 -0
- data/config/locales/mt.yml +4 -0
- data/config/locales/nl.yml +4 -0
- data/config/locales/no.yml +4 -0
- data/config/locales/pa-pk.yml +4 -0
- data/config/locales/pa.yml +4 -0
- data/config/locales/pl.yml +4 -0
- data/config/locales/ps.yml +4 -0
- data/config/locales/pt.yml +4 -0
- data/config/locales/ro.yml +4 -0
- data/config/locales/ru.yml +4 -0
- data/config/locales/si.yml +4 -0
- data/config/locales/sk.yml +4 -0
- data/config/locales/sl.yml +4 -0
- data/config/locales/so.yml +4 -0
- data/config/locales/sq.yml +4 -0
- data/config/locales/sr.yml +4 -0
- data/config/locales/sv.yml +4 -0
- data/config/locales/sw.yml +4 -0
- data/config/locales/ta.yml +4 -0
- data/config/locales/th.yml +4 -0
- data/config/locales/tk.yml +4 -0
- data/config/locales/tr.yml +4 -0
- data/config/locales/uk.yml +4 -0
- data/config/locales/ur.yml +4 -0
- data/config/locales/uz.yml +4 -0
- data/config/locales/vi.yml +4 -0
- data/config/locales/zh-hk.yml +4 -0
- data/config/locales/zh-tw.yml +4 -0
- data/config/locales/zh.yml +4 -0
- data/lib/govuk_publishing_components/presenters/attachment.rb +3 -7
- data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +16 -45
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +11 -6
data/config/locales/pl.yml
CHANGED
data/config/locales/ps.yml
CHANGED
data/config/locales/pt.yml
CHANGED
data/config/locales/ro.yml
CHANGED
data/config/locales/ru.yml
CHANGED
data/config/locales/si.yml
CHANGED
data/config/locales/sk.yml
CHANGED
data/config/locales/sl.yml
CHANGED
data/config/locales/so.yml
CHANGED
@@ -160,6 +160,10 @@ so:
|
|
160
160
|
link_path: "/brexit"
|
161
161
|
link_text: Hubi waxaad u baahantahay inaad qabato
|
162
162
|
title: Ka bixitaanka Ingiriiska
|
163
|
+
ukraine:
|
164
|
+
link_path:
|
165
|
+
link_text:
|
166
|
+
title:
|
163
167
|
world_locations: Goobaha Dunida
|
164
168
|
search_box:
|
165
169
|
input_title: Baadh
|
data/config/locales/sq.yml
CHANGED
data/config/locales/sr.yml
CHANGED
data/config/locales/sv.yml
CHANGED
data/config/locales/sw.yml
CHANGED
data/config/locales/ta.yml
CHANGED
data/config/locales/th.yml
CHANGED
data/config/locales/tk.yml
CHANGED
data/config/locales/tr.yml
CHANGED
data/config/locales/uk.yml
CHANGED
data/config/locales/ur.yml
CHANGED
data/config/locales/uz.yml
CHANGED
data/config/locales/vi.yml
CHANGED
data/config/locales/zh-hk.yml
CHANGED
data/config/locales/zh-tw.yml
CHANGED
data/config/locales/zh.yml
CHANGED
@@ -1,15 +1,11 @@
|
|
1
1
|
module GovukPublishingComponents
|
2
2
|
module Presenters
|
3
3
|
class Attachment
|
4
|
-
#
|
4
|
+
# Various departments are taking part in a pilot to use a form
|
5
5
|
# rather than direct email for users to request accessible formats. When the pilot
|
6
6
|
# scheme is rolled out further this can be removed.
|
7
|
-
|
8
|
-
|
9
|
-
publications@dhsc.gov.uk
|
10
|
-
different.format@hmrc.gov.uk
|
11
|
-
gov.uk.publishing@dvsa.gov.uk
|
12
|
-
publications@phe.gov.uk].freeze
|
7
|
+
# Currently the pilot is paused so there are no participants.
|
8
|
+
EMAILS_IN_ACCESSIBLE_FORMAT_REQUEST_PILOT = %w[govuk_publishing_components@example.com].freeze
|
13
9
|
|
14
10
|
delegate :opendocument?, :document?, :spreadsheet?, to: :content_type
|
15
11
|
|
@@ -108,51 +108,6 @@ module GovukPublishingComponents
|
|
108
108
|
false
|
109
109
|
end
|
110
110
|
|
111
|
-
def brexit_cta_taxon_allow_list
|
112
|
-
# Overseas businesses: exporting to the UK
|
113
|
-
# Exporting goods and services
|
114
|
-
# Exporting
|
115
|
-
# Manufacturing, wholesaling, importing and exporting medicines
|
116
|
-
# Importing goods and services
|
117
|
-
# Importing
|
118
|
-
# Manufacturing, wholesaling, importing and exporting medicines
|
119
|
-
%w[
|
120
|
-
2f8b848d-23c8-4f42-a41a-df1f81c64d0f
|
121
|
-
8af13fba-d969-4d87-a02e-2e71783d47be
|
122
|
-
efa9782b-a3d0-4ca0-9c92-3b89748175b7
|
123
|
-
f441e630-2bba-4bbd-8c1b-22ae61cc00c2
|
124
|
-
4788b4b8-2642-47ca-bfc2-bd7e8705a1da
|
125
|
-
d74faafc-781d-4087-8e0c-be4216180059
|
126
|
-
f441e630-2bba-4bbd-8c1b-22ae61cc00c2
|
127
|
-
]
|
128
|
-
end
|
129
|
-
|
130
|
-
def brexit_cta_taxon_allow_list?
|
131
|
-
taxons = content_item.dig("links", "taxons").to_a
|
132
|
-
taxons.each do |taxon|
|
133
|
-
if brexit_cta_taxon_allow_list.include?(taxon["content_id"]) || parent_taxon_include?(taxon, brexit_cta_taxon_allow_list)
|
134
|
-
return true
|
135
|
-
end
|
136
|
-
end
|
137
|
-
false
|
138
|
-
end
|
139
|
-
|
140
|
-
def parent_taxon_include?(taxon, taxon_list)
|
141
|
-
if taxon.present?
|
142
|
-
if taxon.dig("links", "parent_taxons").to_a.any? { |taxon_item| taxon_list.include?(taxon_item["content_id"]) }
|
143
|
-
return true
|
144
|
-
end
|
145
|
-
|
146
|
-
taxon.dig("links", "parent_taxons").to_a.any? { |taxon_item| parent_taxon_include?(taxon_item, taxon_list) }
|
147
|
-
else
|
148
|
-
false
|
149
|
-
end
|
150
|
-
end
|
151
|
-
|
152
|
-
def show_brexit_cta?
|
153
|
-
brexit_cta_taxon_allow_list?
|
154
|
-
end
|
155
|
-
|
156
111
|
def content_tagged_to_current_step_by_step?
|
157
112
|
# TODO: remove indirection here
|
158
113
|
step_nav_helper.show_header?
|
@@ -166,6 +121,22 @@ module GovukPublishingComponents
|
|
166
121
|
step_nav_helper.show_also_part_of_step_nav?
|
167
122
|
end
|
168
123
|
|
124
|
+
def content_tagged_to_ukraine_topical_event?
|
125
|
+
ukraine_topical_event_id = "bfa79635-ffda-4b5d-8266-a9cd3a03649c"
|
126
|
+
topical_events = content_item.dig("links", "topical_events").to_a
|
127
|
+
topical_events.each do |topical_event|
|
128
|
+
if topical_event["content_id"].eql?(ukraine_topical_event_id)
|
129
|
+
return true
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
false
|
134
|
+
end
|
135
|
+
|
136
|
+
def show_ukraine_cta?
|
137
|
+
content_tagged_to_ukraine_topical_event?
|
138
|
+
end
|
139
|
+
|
169
140
|
def breadcrumbs_based_on_ancestors
|
170
141
|
ContentBreadcrumbsBasedOnAncestors.call(content_item)
|
171
142
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_publishing_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 28.
|
4
|
+
version: 28.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_app_config
|
@@ -170,14 +170,14 @@ dependencies:
|
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: '
|
173
|
+
version: '3'
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: '
|
180
|
+
version: '3'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: i18n-coverage
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -437,6 +437,7 @@ files:
|
|
437
437
|
- app/assets/javascripts/govuk_publishing_components/analytics/analytics.js
|
438
438
|
- app/assets/javascripts/govuk_publishing_components/analytics/auto-scroll-tracker.js
|
439
439
|
- app/assets/javascripts/govuk_publishing_components/analytics/auto-track-event.js
|
440
|
+
- app/assets/javascripts/govuk_publishing_components/analytics/cross-domain-tracking.js
|
440
441
|
- app/assets/javascripts/govuk_publishing_components/analytics/custom-dimensions.js
|
441
442
|
- app/assets/javascripts/govuk_publishing_components/analytics/download-link-tracker.js
|
442
443
|
- app/assets/javascripts/govuk_publishing_components/analytics/ecommerce.js
|
@@ -515,6 +516,7 @@ files:
|
|
515
516
|
- app/assets/stylesheets/govuk_publishing_components/components/_big-number.scss
|
516
517
|
- app/assets/stylesheets/govuk_publishing_components/components/_breadcrumbs.scss
|
517
518
|
- app/assets/stylesheets/govuk_publishing_components/components/_button.scss
|
519
|
+
- app/assets/stylesheets/govuk_publishing_components/components/_cards.scss
|
518
520
|
- app/assets/stylesheets/govuk_publishing_components/components/_character-count.scss
|
519
521
|
- app/assets/stylesheets/govuk_publishing_components/components/_checkboxes.scss
|
520
522
|
- app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
|
@@ -612,6 +614,7 @@ files:
|
|
612
614
|
- app/assets/stylesheets/govuk_publishing_components/components/mixins/_prefixed-transform.scss
|
613
615
|
- app/assets/stylesheets/govuk_publishing_components/components/print/_accordion.scss
|
614
616
|
- app/assets/stylesheets/govuk_publishing_components/components/print/_button.scss
|
617
|
+
- app/assets/stylesheets/govuk_publishing_components/components/print/_cards.scss
|
615
618
|
- app/assets/stylesheets/govuk_publishing_components/components/print/_contents-list.scss
|
616
619
|
- app/assets/stylesheets/govuk_publishing_components/components/print/_govspeak-html-publication.scss
|
617
620
|
- app/assets/stylesheets/govuk_publishing_components/components/print/_govspeak.scss
|
@@ -653,6 +656,7 @@ files:
|
|
653
656
|
- app/views/govuk_publishing_components/components/_big_number.html.erb
|
654
657
|
- app/views/govuk_publishing_components/components/_breadcrumbs.html.erb
|
655
658
|
- app/views/govuk_publishing_components/components/_button.html.erb
|
659
|
+
- app/views/govuk_publishing_components/components/_cards.html.erb
|
656
660
|
- app/views/govuk_publishing_components/components/_character_count.html.erb
|
657
661
|
- app/views/govuk_publishing_components/components/_checkboxes.html.erb
|
658
662
|
- app/views/govuk_publishing_components/components/_contents_list.html.erb
|
@@ -725,7 +729,7 @@ files:
|
|
725
729
|
- app/views/govuk_publishing_components/components/attachment/_thumbnail_document.html.erb
|
726
730
|
- app/views/govuk_publishing_components/components/attachment/_thumbnail_generic.html.erb
|
727
731
|
- app/views/govuk_publishing_components/components/attachment/_thumbnail_spreadsheet.html.erb
|
728
|
-
- app/views/govuk_publishing_components/components/contextual_sidebar/
|
732
|
+
- app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
|
729
733
|
- app/views/govuk_publishing_components/components/docs/accordion.yml
|
730
734
|
- app/views/govuk_publishing_components/components/docs/action_link.yml
|
731
735
|
- app/views/govuk_publishing_components/components/docs/attachment.yml
|
@@ -734,6 +738,7 @@ files:
|
|
734
738
|
- app/views/govuk_publishing_components/components/docs/big_number.yml
|
735
739
|
- app/views/govuk_publishing_components/components/docs/breadcrumbs.yml
|
736
740
|
- app/views/govuk_publishing_components/components/docs/button.yml
|
741
|
+
- app/views/govuk_publishing_components/components/docs/cards.yml
|
737
742
|
- app/views/govuk_publishing_components/components/docs/character_count.yml
|
738
743
|
- app/views/govuk_publishing_components/components/docs/checkboxes.yml
|
739
744
|
- app/views/govuk_publishing_components/components/docs/contents_list.yml
|
@@ -1994,7 +1999,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1994
1999
|
- !ruby/object:Gem::Version
|
1995
2000
|
version: '0'
|
1996
2001
|
requirements: []
|
1997
|
-
rubygems_version: 3.3.
|
2002
|
+
rubygems_version: 3.3.9
|
1998
2003
|
signing_key:
|
1999
2004
|
specification_version: 4
|
2000
2005
|
summary: A gem to document components in GOV.UK frontend applications
|