govuk_publishing_components 27.20.0 → 28.3.0
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/auto-scroll-tracker.js +2 -1
- data/app/assets/javascripts/govuk_publishing_components/analytics/auto-track-event.js +22 -22
- data/app/assets/javascripts/govuk_publishing_components/analytics/custom-dimensions.js +2 -20
- data/app/assets/javascripts/govuk_publishing_components/analytics/download-link-tracker.js +21 -16
- data/app/assets/javascripts/govuk_publishing_components/analytics/external-link-tracker.js +46 -32
- data/app/assets/javascripts/govuk_publishing_components/analytics/google-analytics-universal-tracker.js +20 -7
- data/app/assets/javascripts/govuk_publishing_components/analytics/mailto-link-tracker.js +22 -17
- data/app/assets/javascripts/govuk_publishing_components/analytics/pii.js +9 -5
- data/app/assets/javascripts/govuk_publishing_components/analytics/static-analytics.js +4 -4
- data/app/assets/javascripts/govuk_publishing_components/analytics/track-click.js +4 -3
- data/app/assets/javascripts/govuk_publishing_components/analytics.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/components/checkboxes.js +0 -1
- data/app/assets/javascripts/govuk_publishing_components/components/details.js +2 -3
- data/app/assets/javascripts/govuk_publishing_components/components/feedback.js +18 -18
- data/app/assets/javascripts/govuk_publishing_components/components/metadata.js +27 -0
- data/app/assets/javascripts/govuk_publishing_components/lib/extend-object.js +22 -0
- data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/barchart-enhancement.js +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +0 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_big-number.scss +5 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss +8 -37
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +67 -21
- data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_markdown-typography.scss +6 -0
- data/app/views/govuk_publishing_components/components/_big_number.html.erb +19 -9
- data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +22 -18
- data/app/views/govuk_publishing_components/components/_metadata.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_share_links.html.erb +25 -22
- data/app/views/govuk_publishing_components/components/docs/accordion.yml +31 -25
- data/app/views/govuk_publishing_components/components/docs/big_number.yml +6 -0
- data/app/views/govuk_publishing_components/components/docs/feedback.yml +5 -0
- data/app/views/govuk_publishing_components/components/docs/input.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/success_alert.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/tabs.yml +2 -2
- data/app/views/govuk_publishing_components/components/feedback/_problem_form.html.erb +35 -6
- data/app/views/govuk_publishing_components/components/feedback/_survey_signup_form.html.erb +4 -3
- data/app/views/govuk_publishing_components/components/feedback/_yes_no_banner.html.erb +19 -11
- data/config/locales/ar.yml +0 -8
- data/config/locales/az.yml +0 -8
- data/config/locales/be.yml +0 -8
- data/config/locales/bg.yml +0 -8
- data/config/locales/bn.yml +0 -8
- data/config/locales/cs.yml +0 -8
- data/config/locales/cy.yml +0 -8
- data/config/locales/da.yml +0 -8
- data/config/locales/de.yml +0 -8
- data/config/locales/dr.yml +0 -8
- data/config/locales/el.yml +0 -8
- data/config/locales/en.yml +0 -10
- data/config/locales/es-419.yml +0 -8
- data/config/locales/es.yml +0 -8
- data/config/locales/et.yml +0 -8
- data/config/locales/fa.yml +0 -8
- data/config/locales/fi.yml +0 -8
- data/config/locales/fr.yml +0 -8
- data/config/locales/gd.yml +0 -8
- data/config/locales/gu.yml +0 -8
- data/config/locales/he.yml +0 -8
- data/config/locales/hi.yml +0 -8
- data/config/locales/hr.yml +0 -8
- data/config/locales/hu.yml +0 -8
- data/config/locales/hy.yml +0 -8
- data/config/locales/id.yml +0 -8
- data/config/locales/is.yml +0 -8
- data/config/locales/it.yml +0 -8
- data/config/locales/ja.yml +0 -8
- data/config/locales/ka.yml +0 -8
- data/config/locales/kk.yml +0 -8
- data/config/locales/ko.yml +0 -8
- data/config/locales/lt.yml +0 -8
- data/config/locales/lv.yml +0 -8
- data/config/locales/ms.yml +0 -8
- data/config/locales/mt.yml +0 -8
- data/config/locales/nl.yml +0 -8
- data/config/locales/no.yml +0 -8
- data/config/locales/pa-pk.yml +0 -8
- data/config/locales/pa.yml +0 -8
- data/config/locales/pl.yml +0 -8
- data/config/locales/ps.yml +0 -8
- data/config/locales/pt.yml +0 -8
- data/config/locales/ro.yml +0 -8
- data/config/locales/ru.yml +0 -8
- data/config/locales/si.yml +0 -8
- data/config/locales/sk.yml +0 -8
- data/config/locales/sl.yml +0 -8
- data/config/locales/so.yml +0 -8
- data/config/locales/sq.yml +0 -8
- data/config/locales/sr.yml +0 -8
- data/config/locales/sv.yml +0 -8
- data/config/locales/sw.yml +0 -8
- data/config/locales/ta.yml +0 -8
- data/config/locales/th.yml +0 -8
- data/config/locales/tk.yml +0 -8
- data/config/locales/tr.yml +0 -8
- data/config/locales/uk.yml +0 -8
- data/config/locales/ur.yml +0 -8
- data/config/locales/uz.yml +0 -8
- data/config/locales/vi.yml +0 -8
- data/config/locales/zh-hk.yml +0 -8
- data/config/locales/zh-tw.yml +0 -8
- data/config/locales/zh.yml +0 -8
- data/lib/govuk_publishing_components/presenters/big_number_helper.rb +30 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/lib/govuk_publishing_components.rb +1 -2
- metadata +5 -15
- data/app/assets/javascripts/govuk_publishing_components/analytics/scroll-tracker.js +0 -237
- data/app/assets/stylesheets/govuk_publishing_components/components/_highlight-boxes.scss +0 -84
- data/app/assets/stylesheets/govuk_publishing_components/components/_taxonomy-list.scss +0 -21
- data/app/views/govuk_publishing_components/components/_admin_analytics.html.erb +0 -20
- data/app/views/govuk_publishing_components/components/_government_navigation.html.erb +0 -86
- data/app/views/govuk_publishing_components/components/_highlight_boxes.html.erb +0 -47
- data/app/views/govuk_publishing_components/components/_taxonomy_list.html.erb +0 -30
- data/app/views/govuk_publishing_components/components/docs/admin_analytics.yml +0 -10
- data/app/views/govuk_publishing_components/components/docs/government_navigation.yml +0 -20
- data/app/views/govuk_publishing_components/components/docs/highlight_boxes.yml +0 -171
- data/app/views/govuk_publishing_components/components/docs/taxonomy_list.yml +0 -112
- data/lib/govuk_publishing_components/presenters/highlight_boxes_helper.rb +0 -13
- data/lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb +0 -23
data/config/locales/ta.yml
CHANGED
@@ -80,14 +80,6 @@ ta:
|
|
80
80
|
what_doing: நீங்கள் என்ன செய்து கொண்டிருந்தீர்கள்?
|
81
81
|
what_wrong: என்ன தவறு நடந்தது?
|
82
82
|
'yes': ஆம்
|
83
|
-
government_navigation:
|
84
|
-
consultations: கலந்தாய்வுகள்
|
85
|
-
departments: துறைகள்
|
86
|
-
get-involved: ஈடுபடுங்கள்
|
87
|
-
how-government-works: அரசு எவ்வாறு இயங்குகிறது
|
88
|
-
news_and_communications: செய்தி மற்றும் செய்தித் தொடர்பு
|
89
|
-
statistics: புள்ளியியல்
|
90
|
-
worldwide: உலகம் முழுவதும்
|
91
83
|
layout_footer:
|
92
84
|
copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown காப்புரிமை</a>
|
93
85
|
licence_html: வேறுவகையில் குறிப்பிடப்படாதவரை அனைத்து உள்ளடக்கமும் <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>-ன்கீழ் கிடைக்கிறது.
|
data/config/locales/th.yml
CHANGED
@@ -78,14 +78,6 @@ th:
|
|
78
78
|
what_doing: คุณทำอะไรอยู่ในขณะนั้น
|
79
79
|
what_wrong: มีสิ่งใดผิดปกติ
|
80
80
|
'yes': ใช่
|
81
|
-
government_navigation:
|
82
|
-
consultations: การให้คำปรึกษา
|
83
|
-
departments: หน่วยงานราชการ
|
84
|
-
get-involved: เข้ามีส่วนร่วม
|
85
|
-
how-government-works: รัฐบาลทำงานอย่างไร
|
86
|
-
news_and_communications: ข่าวสารและการสื่อสาร
|
87
|
-
statistics: สถิติ
|
88
|
-
worldwide: ทั่วโลก
|
89
81
|
layout_footer:
|
90
82
|
copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">ลิขสิทธิ์ © Crown</a>
|
91
83
|
licence_html: เนื้อหาทั้งหมดอยู่ภายใต้สัญญาอนุญาต <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government License v3.0</a> ยกเว้นจะระบุไว้เป็นอย่างอื่น
|
data/config/locales/tk.yml
CHANGED
@@ -80,14 +80,6 @@ tk:
|
|
80
80
|
what_doing: Näme edýärdiňiz?
|
81
81
|
what_wrong: Näme nädogry boldy?
|
82
82
|
'yes': Hawa
|
83
|
-
government_navigation:
|
84
|
-
consultations: Maslahatlar
|
85
|
-
departments: Bölümler
|
86
|
-
get-involved: Goşulyş
|
87
|
-
how-government-works: Hökümet nähili işleýär
|
88
|
-
news_and_communications: Habarlar we aragatnaşyk
|
89
|
-
statistics: Statistika
|
90
|
-
worldwide: Bütin dünýä
|
91
83
|
layout_footer:
|
92
84
|
copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown awtorlyk hukugy</a>
|
93
85
|
licence_html: Ähli mazmun <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Açyk hökümet ygtyýarnamasy v3.0-da görkezilen</a>, eger başgaça bellenilmedik bolsa
|
data/config/locales/tr.yml
CHANGED
@@ -80,14 +80,6 @@ tr:
|
|
80
80
|
what_doing: Ne yapmaktaydınız?
|
81
81
|
what_wrong: Nasıl bir sorun oldu?
|
82
82
|
'yes': Evet
|
83
|
-
government_navigation:
|
84
|
-
consultations: Danışmalar
|
85
|
-
departments: Müdürlükler
|
86
|
-
get-involved: Katılım sağlayın
|
87
|
-
how-government-works: Devlet nasıl çalışır
|
88
|
-
news_and_communications: Haber ve iletiler
|
89
|
-
statistics: İstatistikler
|
90
|
-
worldwide: Dünya geneli
|
91
83
|
layout_footer:
|
92
84
|
copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown copyright</a>
|
93
85
|
licence_html: Aksi ifade edilmedikçe tüm içeriğe <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a> adresinden erişilebilir
|
data/config/locales/uk.yml
CHANGED
@@ -86,14 +86,6 @@ uk:
|
|
86
86
|
what_doing: Що ви робили?
|
87
87
|
what_wrong: Що пішло не так?
|
88
88
|
'yes': Так
|
89
|
-
government_navigation:
|
90
|
-
consultations: Консультації
|
91
|
-
departments: Відділи
|
92
|
-
get-involved: Взяти участь
|
93
|
-
how-government-works: Як працює уряд
|
94
|
-
news_and_communications: Новини та комунікації
|
95
|
-
statistics: Статистика
|
96
|
-
worldwide: Світова
|
97
89
|
layout_footer:
|
98
90
|
copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown copyright</a>
|
99
91
|
licence_html: Весь вміст доступний за <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Відкритою державною ліцензією v3.0</a>, якщо не зазначено інше
|
data/config/locales/ur.yml
CHANGED
@@ -76,14 +76,6 @@ ur:
|
|
76
76
|
what_doing: آپ کیا کر رہے تھے؟
|
77
77
|
what_wrong: کیا غلط ہوا؟
|
78
78
|
'yes': جی ہاں
|
79
|
-
government_navigation:
|
80
|
-
consultations: مشاورتیں
|
81
|
-
departments: محکمے
|
82
|
-
get-involved: شامل ہوں
|
83
|
-
how-government-works: حکومت کیسے کام کرتی ہے
|
84
|
-
news_and_communications: خبریں اور مواصلات
|
85
|
-
statistics: شماریات
|
86
|
-
worldwide: دنیا بھر میں
|
87
79
|
layout_footer:
|
88
80
|
copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown کاپی رائٹ</a>
|
89
81
|
licence_html: سوائے ان کے جنہیں بصورت دیگر بیان کیا گیا ہے، <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a> کے تحت تمام مواد دستیاب ہے
|
data/config/locales/uz.yml
CHANGED
@@ -81,14 +81,6 @@ uz:
|
|
81
81
|
what_doing: Сиз нима қилаётган эдингиз?
|
82
82
|
what_wrong: Қандай хатолик бўлди?
|
83
83
|
'yes': Ҳа
|
84
|
-
government_navigation:
|
85
|
-
consultations: Маслаҳатлар
|
86
|
-
departments: Бўлимлар
|
87
|
-
get-involved: Иштирок этмоқдаман
|
88
|
-
how-government-works: Ҳукумат қандай ишлайди
|
89
|
-
news_and_communications: Янгиликлар ва хабарлар
|
90
|
-
statistics: Статистик маълумотлар
|
91
|
-
worldwide: Бутун дунё бўйлаб
|
92
84
|
layout_footer:
|
93
85
|
copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Британия миллатлар ҳамдўстлигининг муаллифлик ҳуқуқи</a>
|
94
86
|
licence_html: Бутун таркиб <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">“Очиқ давлат лицензияси, версия 3.0” дастурида эришимли</a>, агар бошқаси кўрсатилмаган бўлса
|
data/config/locales/vi.yml
CHANGED
@@ -79,14 +79,6 @@ vi:
|
|
79
79
|
what_doing: Bạn đang làm gì?
|
80
80
|
what_wrong: Sự cố gì đã xảy ra?
|
81
81
|
'yes': Có
|
82
|
-
government_navigation:
|
83
|
-
consultations: Tham vấn
|
84
|
-
departments: Phòng ban
|
85
|
-
get-involved: Tham gia
|
86
|
-
how-government-works: Cách hoạt động của chính phủ
|
87
|
-
news_and_communications: Tin tức và thông tin liên lạc
|
88
|
-
statistics: Thống kê
|
89
|
-
worldwide: Trên toàn thế giới
|
90
82
|
layout_footer:
|
91
83
|
copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Bản quyền Crown</a>
|
92
84
|
licence_html: Tất cả nội dung đều có sẵn theo <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Giấy phép Chính phủ Mở pb3.0</a>, trừ khi có quy định khác
|
data/config/locales/zh-hk.yml
CHANGED
@@ -78,14 +78,6 @@ zh-hk:
|
|
78
78
|
what_doing: 您剛才在做什麼?
|
79
79
|
what_wrong: 出現什麼錯誤?
|
80
80
|
'yes': 是
|
81
|
-
government_navigation:
|
82
|
-
consultations: 諮詢
|
83
|
-
departments: 部門
|
84
|
-
get-involved: 參與其中
|
85
|
-
how-government-works: 政府如何運作
|
86
|
-
news_and_communications: 新聞及通訊
|
87
|
-
statistics: 統計數據
|
88
|
-
worldwide: 全球範圍
|
89
81
|
layout_footer:
|
90
82
|
copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown 版權所有</a>
|
91
83
|
licence_html: 除另有說明者外,所有內容均可在 <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>獲取。
|
data/config/locales/zh-tw.yml
CHANGED
@@ -78,14 +78,6 @@ zh-tw:
|
|
78
78
|
what_doing: 你做了什麼?
|
79
79
|
what_wrong: 哪出錯了?
|
80
80
|
'yes': 是的
|
81
|
-
government_navigation:
|
82
|
-
consultations: 諮詢
|
83
|
-
departments: 部會
|
84
|
-
get-involved: 參與其中
|
85
|
-
how-government-works: 政府如何運作
|
86
|
-
news_and_communications: 新聞和通訊
|
87
|
-
statistics: 統計數據
|
88
|
-
worldwide: 全世界
|
89
81
|
layout_footer:
|
90
82
|
copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown copyright</a>
|
91
83
|
licence_html: 所有內容都具 <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">英國政府開放授權v3.0</a>,除非另有說明
|
data/config/locales/zh.yml
CHANGED
@@ -78,14 +78,6 @@ zh:
|
|
78
78
|
what_doing: 您在干什么?
|
79
79
|
what_wrong: 发生了哪些错误?
|
80
80
|
'yes': 是
|
81
|
-
government_navigation:
|
82
|
-
consultations: 咨询
|
83
|
-
departments: 部门
|
84
|
-
get-involved: 参与
|
85
|
-
how-government-works: 政府如何运营
|
86
|
-
news_and_communications: 新闻和通讯
|
87
|
-
statistics: 统计数据
|
88
|
-
worldwide: 全世界
|
89
81
|
layout_footer:
|
90
82
|
copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown版权所有</a>
|
91
83
|
licence_html: 除另有说明外,所有内容均可在 <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">开放政府许可证第3.0版</a>获取
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module GovukPublishingComponents
|
2
|
+
module Presenters
|
3
|
+
class BigNumberHelper
|
4
|
+
def initialize(local_assigns)
|
5
|
+
@label = local_assigns[:label]
|
6
|
+
@href = local_assigns[:href]
|
7
|
+
@number = local_assigns[:number] || nil
|
8
|
+
end
|
9
|
+
|
10
|
+
def value_classes
|
11
|
+
class_list = ["gem-c-big-number__value"]
|
12
|
+
|
13
|
+
if @label.nil? && @href
|
14
|
+
class_list << "gem-c-big-number__value--decorated"
|
15
|
+
end
|
16
|
+
|
17
|
+
class_list
|
18
|
+
end
|
19
|
+
|
20
|
+
# This function is to check for small symbols which alter how the number is rendered lightly
|
21
|
+
# We do this to account for small symbols awkwardly sitting above the baseline in our typeface and adjust them to sit at the baseline for the purpose of visual harmony
|
22
|
+
# Currently the only small symbol used with big numbers are pluses so they are specifically targetted in the below code
|
23
|
+
def number_has_plus_suffix?
|
24
|
+
if @number.is_a? String
|
25
|
+
@number.ends_with?("+")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -6,6 +6,7 @@ require "govuk_publishing_components/config"
|
|
6
6
|
require "govuk_publishing_components/engine"
|
7
7
|
require "govuk_publishing_components/presenters/shared_helper"
|
8
8
|
require "govuk_publishing_components/presenters/attachment"
|
9
|
+
require "govuk_publishing_components/presenters/big_number_helper"
|
9
10
|
require "govuk_publishing_components/presenters/breadcrumbs"
|
10
11
|
require "govuk_publishing_components/presenters/breadcrumb_selector"
|
11
12
|
require "govuk_publishing_components/presenters/button_helper"
|
@@ -31,8 +32,6 @@ require "govuk_publishing_components/presenters/contents_list_helper"
|
|
31
32
|
require "govuk_publishing_components/presenters/image_card_helper"
|
32
33
|
require "govuk_publishing_components/presenters/intervention_helper"
|
33
34
|
require "govuk_publishing_components/presenters/organisation_logo_helper"
|
34
|
-
require "govuk_publishing_components/presenters/highlight_boxes_helper"
|
35
|
-
require "govuk_publishing_components/presenters/taxonomy_list_helper"
|
36
35
|
require "govuk_publishing_components/presenters/single_page_notification_button_helper"
|
37
36
|
|
38
37
|
require "govuk_publishing_components/app_helpers/taxon_breadcrumbs"
|
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:
|
4
|
+
version: 28.3.0
|
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:
|
11
|
+
date: 2022-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_app_config
|
@@ -483,7 +483,6 @@ files:
|
|
483
483
|
- app/assets/javascripts/govuk_publishing_components/analytics/page-content.js
|
484
484
|
- app/assets/javascripts/govuk_publishing_components/analytics/pii.js
|
485
485
|
- app/assets/javascripts/govuk_publishing_components/analytics/print-intent.js
|
486
|
-
- app/assets/javascripts/govuk_publishing_components/analytics/scroll-tracker.js
|
487
486
|
- app/assets/javascripts/govuk_publishing_components/analytics/static-analytics.js
|
488
487
|
- app/assets/javascripts/govuk_publishing_components/analytics/track-click.js
|
489
488
|
- app/assets/javascripts/govuk_publishing_components/analytics/track-select-change.js
|
@@ -501,6 +500,7 @@ files:
|
|
501
500
|
- app/assets/javascripts/govuk_publishing_components/components/intervention.js
|
502
501
|
- app/assets/javascripts/govuk_publishing_components/components/layout-header.js
|
503
502
|
- app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js
|
503
|
+
- app/assets/javascripts/govuk_publishing_components/components/metadata.js
|
504
504
|
- app/assets/javascripts/govuk_publishing_components/components/modal-dialogue.js
|
505
505
|
- app/assets/javascripts/govuk_publishing_components/components/print-link.js
|
506
506
|
- app/assets/javascripts/govuk_publishing_components/components/radio.js
|
@@ -514,6 +514,7 @@ files:
|
|
514
514
|
- app/assets/javascripts/govuk_publishing_components/lib.js
|
515
515
|
- app/assets/javascripts/govuk_publishing_components/lib/cookie-functions.js
|
516
516
|
- app/assets/javascripts/govuk_publishing_components/lib/current-location.js
|
517
|
+
- app/assets/javascripts/govuk_publishing_components/lib/extend-object.js
|
517
518
|
- app/assets/javascripts/govuk_publishing_components/lib/govspeak/all.js
|
518
519
|
- app/assets/javascripts/govuk_publishing_components/lib/govspeak/barchart-enhancement.js
|
519
520
|
- app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js
|
@@ -568,7 +569,6 @@ files:
|
|
568
569
|
- app/assets/stylesheets/govuk_publishing_components/components/_govspeak-html-publication.scss
|
569
570
|
- app/assets/stylesheets/govuk_publishing_components/components/_govspeak.scss
|
570
571
|
- app/assets/stylesheets/govuk_publishing_components/components/_heading.scss
|
571
|
-
- app/assets/stylesheets/govuk_publishing_components/components/_highlight-boxes.scss
|
572
572
|
- app/assets/stylesheets/govuk_publishing_components/components/_hint.scss
|
573
573
|
- app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss
|
574
574
|
- app/assets/stylesheets/govuk_publishing_components/components/_input.scss
|
@@ -608,7 +608,6 @@ files:
|
|
608
608
|
- app/assets/stylesheets/govuk_publishing_components/components/_summary-list.scss
|
609
609
|
- app/assets/stylesheets/govuk_publishing_components/components/_table.scss
|
610
610
|
- app/assets/stylesheets/govuk_publishing_components/components/_tabs.scss
|
611
|
-
- app/assets/stylesheets/govuk_publishing_components/components/_taxonomy-list.scss
|
612
611
|
- app/assets/stylesheets/govuk_publishing_components/components/_textarea.scss
|
613
612
|
- app/assets/stylesheets/govuk_publishing_components/components/_title.scss
|
614
613
|
- app/assets/stylesheets/govuk_publishing_components/components/_translation-nav.scss
|
@@ -682,7 +681,6 @@ files:
|
|
682
681
|
- app/views/govuk_publishing_components/component_guide/show.html.erb
|
683
682
|
- app/views/govuk_publishing_components/components/_accordion.html.erb
|
684
683
|
- app/views/govuk_publishing_components/components/_action_link.html.erb
|
685
|
-
- app/views/govuk_publishing_components/components/_admin_analytics.html.erb
|
686
684
|
- app/views/govuk_publishing_components/components/_attachment.html.erb
|
687
685
|
- app/views/govuk_publishing_components/components/_attachment_link.html.erb
|
688
686
|
- app/views/govuk_publishing_components/components/_back_link.html.erb
|
@@ -709,11 +707,9 @@ files:
|
|
709
707
|
- app/views/govuk_publishing_components/components/_fieldset.html.erb
|
710
708
|
- app/views/govuk_publishing_components/components/_file_upload.html.erb
|
711
709
|
- app/views/govuk_publishing_components/components/_google_tag_manager_script.html.erb
|
712
|
-
- app/views/govuk_publishing_components/components/_government_navigation.html.erb
|
713
710
|
- app/views/govuk_publishing_components/components/_govspeak.html.erb
|
714
711
|
- app/views/govuk_publishing_components/components/_govspeak_html_publication.html.erb
|
715
712
|
- app/views/govuk_publishing_components/components/_heading.html.erb
|
716
|
-
- app/views/govuk_publishing_components/components/_highlight_boxes.html.erb
|
717
713
|
- app/views/govuk_publishing_components/components/_hint.html.erb
|
718
714
|
- app/views/govuk_publishing_components/components/_image_card.html.erb
|
719
715
|
- app/views/govuk_publishing_components/components/_input.html.erb
|
@@ -756,7 +752,6 @@ files:
|
|
756
752
|
- app/views/govuk_publishing_components/components/_summary_list.html.erb
|
757
753
|
- app/views/govuk_publishing_components/components/_table.html.erb
|
758
754
|
- app/views/govuk_publishing_components/components/_tabs.html.erb
|
759
|
-
- app/views/govuk_publishing_components/components/_taxonomy_list.html.erb
|
760
755
|
- app/views/govuk_publishing_components/components/_textarea.html.erb
|
761
756
|
- app/views/govuk_publishing_components/components/_title.html.erb
|
762
757
|
- app/views/govuk_publishing_components/components/_translation_nav.html.erb
|
@@ -768,7 +763,6 @@ files:
|
|
768
763
|
- app/views/govuk_publishing_components/components/contextual_sidebar/_covid_cta.html.erb
|
769
764
|
- app/views/govuk_publishing_components/components/docs/accordion.yml
|
770
765
|
- app/views/govuk_publishing_components/components/docs/action_link.yml
|
771
|
-
- app/views/govuk_publishing_components/components/docs/admin_analytics.yml
|
772
766
|
- app/views/govuk_publishing_components/components/docs/attachment.yml
|
773
767
|
- app/views/govuk_publishing_components/components/docs/attachment_link.yml
|
774
768
|
- app/views/govuk_publishing_components/components/docs/back_link.yml
|
@@ -795,11 +789,9 @@ files:
|
|
795
789
|
- app/views/govuk_publishing_components/components/docs/fieldset.yml
|
796
790
|
- app/views/govuk_publishing_components/components/docs/file_upload.yml
|
797
791
|
- app/views/govuk_publishing_components/components/docs/google_tag_manager_script.yml
|
798
|
-
- app/views/govuk_publishing_components/components/docs/government_navigation.yml
|
799
792
|
- app/views/govuk_publishing_components/components/docs/govspeak.yml
|
800
793
|
- app/views/govuk_publishing_components/components/docs/govspeak_html_publication.yml
|
801
794
|
- app/views/govuk_publishing_components/components/docs/heading.yml
|
802
|
-
- app/views/govuk_publishing_components/components/docs/highlight_boxes.yml
|
803
795
|
- app/views/govuk_publishing_components/components/docs/hint.yml
|
804
796
|
- app/views/govuk_publishing_components/components/docs/image_card.yml
|
805
797
|
- app/views/govuk_publishing_components/components/docs/input.yml
|
@@ -842,7 +834,6 @@ files:
|
|
842
834
|
- app/views/govuk_publishing_components/components/docs/summary_list.yml
|
843
835
|
- app/views/govuk_publishing_components/components/docs/table.yml
|
844
836
|
- app/views/govuk_publishing_components/components/docs/tabs.yml
|
845
|
-
- app/views/govuk_publishing_components/components/docs/taxonomy_list.yml
|
846
837
|
- app/views/govuk_publishing_components/components/docs/textarea.yml
|
847
838
|
- app/views/govuk_publishing_components/components/docs/title.yml
|
848
839
|
- app/views/govuk_publishing_components/components/docs/translation_nav.yml
|
@@ -940,6 +931,7 @@ files:
|
|
940
931
|
- lib/govuk_publishing_components/engine.rb
|
941
932
|
- lib/govuk_publishing_components/minitest/component_guide_test.rb
|
942
933
|
- lib/govuk_publishing_components/presenters/attachment.rb
|
934
|
+
- lib/govuk_publishing_components/presenters/big_number_helper.rb
|
943
935
|
- lib/govuk_publishing_components/presenters/breadcrumb_selector.rb
|
944
936
|
- lib/govuk_publishing_components/presenters/breadcrumbs.rb
|
945
937
|
- lib/govuk_publishing_components/presenters/button_helper.rb
|
@@ -954,7 +946,6 @@ files:
|
|
954
946
|
- lib/govuk_publishing_components/presenters/curated_taxonomy_sidebar_links.rb
|
955
947
|
- lib/govuk_publishing_components/presenters/devolved_nations_helper.rb
|
956
948
|
- lib/govuk_publishing_components/presenters/heading_helper.rb
|
957
|
-
- lib/govuk_publishing_components/presenters/highlight_boxes_helper.rb
|
958
949
|
- lib/govuk_publishing_components/presenters/image_card_helper.rb
|
959
950
|
- lib/govuk_publishing_components/presenters/intervention_helper.rb
|
960
951
|
- lib/govuk_publishing_components/presenters/machine_readable/article_schema.rb
|
@@ -982,7 +973,6 @@ files:
|
|
982
973
|
- lib/govuk_publishing_components/presenters/single_page_notification_button_helper.rb
|
983
974
|
- lib/govuk_publishing_components/presenters/step_by_step_nav_helper.rb
|
984
975
|
- lib/govuk_publishing_components/presenters/subscription_links_helper.rb
|
985
|
-
- lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb
|
986
976
|
- lib/govuk_publishing_components/presenters/translation_nav_helper.rb
|
987
977
|
- lib/govuk_publishing_components/version.rb
|
988
978
|
- lib/tasks/govuk_publishing_components_tasks.rake
|
@@ -1,237 +0,0 @@
|
|
1
|
-
/* global GOVUK, $ */
|
2
|
-
|
3
|
-
(function () {
|
4
|
-
'use strict'
|
5
|
-
|
6
|
-
window.GOVUK = window.GOVUK || {}
|
7
|
-
|
8
|
-
var percentages = [
|
9
|
-
['Percent', 20],
|
10
|
-
['Percent', 40],
|
11
|
-
['Percent', 60],
|
12
|
-
['Percent', 80],
|
13
|
-
['Percent', 100]
|
14
|
-
]
|
15
|
-
|
16
|
-
var CONFIG = {
|
17
|
-
'/brexit': percentages,
|
18
|
-
'/government/publications/the-essential-trustee-what-you-need-to-know-cc3/the-essential-trustee-what-you-need-to-know-what-you-need-to-do': [
|
19
|
-
['Heading', '1. About this guidance'],
|
20
|
-
['Heading', '2. Trustees’ duties at a glance'],
|
21
|
-
['Heading', '3. Who can be a trustee and how trustees are appointed'],
|
22
|
-
['Heading', '4. Ensure your charity is carrying out its purposes for the public benefit'],
|
23
|
-
['Heading', '5. Comply with your charity’s governing document and the law'],
|
24
|
-
['Heading', '6. Act in your charity’s best interests'],
|
25
|
-
['Heading', '7. Manage your charity’s resources responsibly'],
|
26
|
-
['Heading', '8. Act with reasonable care and skill'],
|
27
|
-
['Heading', '9. Ensure your charity is accountable'],
|
28
|
-
['Heading', '10. Reduce the risk of liability'],
|
29
|
-
['Heading', '11. Your charity’s legal structure and what it means'],
|
30
|
-
['Heading', '12. Charity officers - the chair and treasurer'],
|
31
|
-
['Heading', '13. Technical terms used in this guidance']
|
32
|
-
],
|
33
|
-
'/guidance/universal-credit-how-it-helps-you-into-work': [
|
34
|
-
['Heading', 'Support from your work coach'],
|
35
|
-
['Heading', 'Help available for parents'],
|
36
|
-
['Heading', 'When you can claim Universal Credit'],
|
37
|
-
['Heading', 'More detailed advice']
|
38
|
-
],
|
39
|
-
'/government/publications/spring-budget-2017-documents/spring-budget-2017': [
|
40
|
-
['Heading', '1. Executive summary'],
|
41
|
-
['Heading', '2. Economic context and public finances'],
|
42
|
-
['Heading', '3. Policy decisions'],
|
43
|
-
['Heading', '4. Tax'],
|
44
|
-
['Heading', '5. Productivity'],
|
45
|
-
['Heading', '6. Public services and markets'],
|
46
|
-
['Heading', '7. Annex A: Financing'],
|
47
|
-
['Heading', '8. Annex B: Office for Budget Responsibility\'s Economic and fiscal outlook']
|
48
|
-
],
|
49
|
-
'/settled-status-eu-citizens-families': [
|
50
|
-
['Heading', 'When you can apply']
|
51
|
-
],
|
52
|
-
'/guidance/returning-to-the-uk': [
|
53
|
-
['Heading', 'Ending your time living abroad']
|
54
|
-
],
|
55
|
-
'/council-housing': [
|
56
|
-
['Heading', 'Choice-based lettings']
|
57
|
-
],
|
58
|
-
'/guidance/foreign-travel-insurance': [
|
59
|
-
['Heading', 'What your travel insurance policy should cover']
|
60
|
-
],
|
61
|
-
'/guidance/living-in-france': [
|
62
|
-
['Heading', 'Passports and travel']
|
63
|
-
],
|
64
|
-
'/family-permit': [
|
65
|
-
['Heading', 'EEA family permit']
|
66
|
-
],
|
67
|
-
'/guidance/healthcare-for-eu-and-efta-citizens-visiting-the-uk': [
|
68
|
-
['Heading', 'Travel insurance']
|
69
|
-
],
|
70
|
-
'/driving-abroad': [
|
71
|
-
['Heading', 'Check your insurance if you’re taking your own vehicle']
|
72
|
-
],
|
73
|
-
'/get-a-passport-urgently': [
|
74
|
-
['Heading', 'Ways to apply']
|
75
|
-
],
|
76
|
-
'/driving-abroad/international-driving-permit': [
|
77
|
-
['Heading', 'Check which IDP you need']
|
78
|
-
],
|
79
|
-
'/guidance/guidance-for-suppliers-of-cattle-sheep-and-goat-ear-tags': [
|
80
|
-
['Heading', 'Tagging information for livestock keepers']
|
81
|
-
],
|
82
|
-
'/guidance/how-to-move-goods-between-or-through-common-transit-countries-including-the-eu': [
|
83
|
-
['Heading', 'Start moving your goods']
|
84
|
-
],
|
85
|
-
'/guidance/ecmt-international-road-haulage-permits': [
|
86
|
-
['Heading', 'Apply for permits']
|
87
|
-
],
|
88
|
-
'/taking-goods-out-uk-temporarily/get-an-ata-carnet': [
|
89
|
-
['Heading', 'Using an ATA Carnet']
|
90
|
-
],
|
91
|
-
'/wood-packaging-import-export': [
|
92
|
-
['Heading', 'Export solid wood packaging']
|
93
|
-
],
|
94
|
-
'/coronavirus': percentages,
|
95
|
-
'/coronavirus/education-and-childcare': percentages,
|
96
|
-
'/coronavirus/worker-support': percentages,
|
97
|
-
'/coronavirus/business-support': percentages,
|
98
|
-
'/get-coronavirus-test': percentages,
|
99
|
-
'/next-steps-for-your-business/results': [
|
100
|
-
['Heading', 'Things you need to do next'],
|
101
|
-
['Heading', 'Rules to follow'],
|
102
|
-
['Heading', 'Good to know'],
|
103
|
-
['Heading', 'Change your answers']
|
104
|
-
],
|
105
|
-
'/guidance/brexit-guidance-for-businesses': percentages,
|
106
|
-
'/guidance/brexit-guidance-for-businesses.cy': percentages,
|
107
|
-
'/guidance/brexit-guidance-for-individuals-and-families': percentages,
|
108
|
-
'/guidance/brexit-guidance-for-individuals-and-families.cy': percentages,
|
109
|
-
'/guidance/import-and-export-goods-using-preference-agreements': percentages,
|
110
|
-
'/guidance/travel-abroad-from-england-during-coronavirus-covid-19': [
|
111
|
-
['Heading', 'Before you travel abroad'],
|
112
|
-
['Heading', '1. Check the rules for the country you’re going to'],
|
113
|
-
['Heading', '2. Find out what you need to do when you return'],
|
114
|
-
['Heading', '3. Book any COVID-19 tests or quarantine hotel packages you need for your return'],
|
115
|
-
['Heading', 'Before you return'],
|
116
|
-
['Heading', 'After you return'],
|
117
|
-
['Heading', 'Travelling with children'],
|
118
|
-
['Heading', 'Ireland, the UK, the Channel Islands and the Isle of Man'],
|
119
|
-
['Heading', 'Exemptions for work, medical or compassionate reasons']
|
120
|
-
],
|
121
|
-
'/guidance/travel-to-england-from-another-country-during-coronavirus-covid-19': [
|
122
|
-
['Heading', 'Before you travel'],
|
123
|
-
['Heading', '1. Check the rules for the country you’re coming from or have travelled through'],
|
124
|
-
['Heading', '2. Book any COVID-19 tests or quarantine hotel packages you need for your arrival'],
|
125
|
-
['Heading', '3. Get tested and complete documents'],
|
126
|
-
['Heading', 'When you arrive in England'],
|
127
|
-
['Heading', 'Leaving England'],
|
128
|
-
['Heading', 'Travelling with children'],
|
129
|
-
['Heading', 'Ireland, the UK, the Channel Islands and the Isle of Man'],
|
130
|
-
['Heading', 'Exemptions for work, medical or compassionate reasons']
|
131
|
-
],
|
132
|
-
'/find-travel-test-provider': percentages
|
133
|
-
}
|
134
|
-
|
135
|
-
function ScrollTracker (sitewideConfig) {
|
136
|
-
this.config = this.getConfigForCurrentPath(sitewideConfig)
|
137
|
-
this.SCROLL_TIMEOUT_DELAY = 10
|
138
|
-
|
139
|
-
if (!this.config) {
|
140
|
-
this.enabled = false
|
141
|
-
return
|
142
|
-
}
|
143
|
-
this.enabled = true
|
144
|
-
|
145
|
-
this.trackedNodes = this.buildNodes(this.config)
|
146
|
-
|
147
|
-
$(window).scroll($.proxy(this.onScroll, this))
|
148
|
-
this.trackVisibleNodes()
|
149
|
-
};
|
150
|
-
|
151
|
-
ScrollTracker.prototype.getConfigForCurrentPath = function (sitewideConfig) {
|
152
|
-
for (var path in sitewideConfig) {
|
153
|
-
if (this.normalisePath(window.location.pathname) === this.normalisePath(path)) {
|
154
|
-
return sitewideConfig[path]
|
155
|
-
}
|
156
|
-
}
|
157
|
-
}
|
158
|
-
|
159
|
-
ScrollTracker.prototype.buildNodes = function (config) {
|
160
|
-
var nodes = []
|
161
|
-
var NodeConstructor, nodeData
|
162
|
-
|
163
|
-
for (var i = 0; i < config.length; i++) {
|
164
|
-
NodeConstructor = ScrollTracker[config[i][0] + 'Node']
|
165
|
-
nodeData = config[i][1]
|
166
|
-
nodes.push(new NodeConstructor(nodeData))
|
167
|
-
}
|
168
|
-
|
169
|
-
return nodes
|
170
|
-
}
|
171
|
-
|
172
|
-
ScrollTracker.prototype.normalisePath = function (path) {
|
173
|
-
return path.split('/').join('')
|
174
|
-
}
|
175
|
-
|
176
|
-
ScrollTracker.prototype.onScroll = function () {
|
177
|
-
clearTimeout(this.scrollTimeout)
|
178
|
-
this.scrollTimeout = setTimeout($.proxy(this.trackVisibleNodes, this), this.SCROLL_TIMEOUT_DELAY)
|
179
|
-
}
|
180
|
-
|
181
|
-
ScrollTracker.prototype.trackVisibleNodes = function () {
|
182
|
-
for (var i = 0; i < this.trackedNodes.length; i++) {
|
183
|
-
if (this.trackedNodes[i].isVisible() && !this.trackedNodes[i].alreadySeen) {
|
184
|
-
this.trackedNodes[i].alreadySeen = true
|
185
|
-
|
186
|
-
var action = this.trackedNodes[i].eventData.action
|
187
|
-
var label = this.trackedNodes[i].eventData.label
|
188
|
-
|
189
|
-
GOVUK.analytics.trackEvent('ScrollTo', action, { label: label, nonInteraction: true })
|
190
|
-
}
|
191
|
-
}
|
192
|
-
}
|
193
|
-
|
194
|
-
ScrollTracker.PercentNode = function (percentage) {
|
195
|
-
this.percentage = percentage
|
196
|
-
this.eventData = { action: 'Percent', label: String(percentage) }
|
197
|
-
}
|
198
|
-
|
199
|
-
ScrollTracker.PercentNode.prototype.isVisible = function () {
|
200
|
-
return this.currentScrollPercent() >= this.percentage
|
201
|
-
}
|
202
|
-
|
203
|
-
ScrollTracker.PercentNode.prototype.currentScrollPercent = function () {
|
204
|
-
var $document = $(document)
|
205
|
-
var $window = $(window)
|
206
|
-
return (($window.scrollTop() / ($document.height() - $window.height())) * 100.0)
|
207
|
-
}
|
208
|
-
|
209
|
-
ScrollTracker.HeadingNode = function (headingText) {
|
210
|
-
this.$element = getHeadingElement(headingText)
|
211
|
-
this.eventData = { action: 'Heading', label: headingText }
|
212
|
-
|
213
|
-
function getHeadingElement (headingText) {
|
214
|
-
var $headings = $('h1, h2, h3, h4, h5, h6')
|
215
|
-
for (var i = 0; i < $headings.length; i++) {
|
216
|
-
if ($.trim($headings.eq(i).text()).replace(/\s/g, ' ') === headingText) return $headings.eq(i)
|
217
|
-
}
|
218
|
-
}
|
219
|
-
}
|
220
|
-
|
221
|
-
ScrollTracker.HeadingNode.prototype.isVisible = function () {
|
222
|
-
if (!this.$element) return false
|
223
|
-
return this.elementIsVisible(this.$element)
|
224
|
-
}
|
225
|
-
|
226
|
-
ScrollTracker.HeadingNode.prototype.elementIsVisible = function ($element) {
|
227
|
-
var $window = $(window)
|
228
|
-
var positionTop = $element.offset().top
|
229
|
-
return (positionTop > $window.scrollTop() && positionTop < ($window.scrollTop() + $window.height()))
|
230
|
-
}
|
231
|
-
|
232
|
-
$().ready(function () {
|
233
|
-
window.GOVUK.scrollTracker = new ScrollTracker(CONFIG)
|
234
|
-
})
|
235
|
-
|
236
|
-
window.GOVUK.ScrollTracker = ScrollTracker
|
237
|
-
}())
|