govuk_publishing_components 35.16.0 → 35.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/govuk_publishing_components/action-link-arrow--light.png +0 -0
  3. data/app/assets/images/govuk_publishing_components/action-link-arrow--light.svg +7 -0
  4. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-core.js +2 -5
  5. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-page-views.js +19 -15
  6. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-video-tracker.js +7 -1
  7. data/app/assets/javascripts/govuk_publishing_components/components/option-select.js +9 -9
  8. data/app/assets/stylesheets/component_guide/application.scss +6 -6
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_action-link.scss +33 -15
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_big-number.scss +3 -2
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_breadcrumbs.scss +3 -3
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +2 -2
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_cards.scss +5 -5
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +1 -1
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +1 -1
  16. data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +2 -2
  17. data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +5 -5
  18. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +40 -35
  19. data/app/assets/stylesheets/govuk_publishing_components/components/_option-select.scss +1 -1
  20. data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +24 -5
  21. data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +5 -0
  22. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +23 -19
  23. data/app/assets/stylesheets/govuk_publishing_components/components/_table.scss +6 -6
  24. data/app/assets/stylesheets/govuk_publishing_components/components/_tabs.scss +2 -1
  25. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_steps.scss +3 -1
  26. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_typography.scss +4 -4
  27. data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_media-down.scss +2 -2
  28. data/app/views/govuk_publishing_components/components/_action_link.html.erb +2 -0
  29. data/app/views/govuk_publishing_components/components/_attachment.html.erb +1 -1
  30. data/app/views/govuk_publishing_components/components/_contents_list.html.erb +20 -10
  31. data/app/views/govuk_publishing_components/components/_metadata.html.erb +1 -1
  32. data/app/views/govuk_publishing_components/components/_option_select.html.erb +3 -3
  33. data/app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb +6 -6
  34. data/app/views/govuk_publishing_components/components/_search.html.erb +3 -0
  35. data/app/views/govuk_publishing_components/components/_share_links.html.erb +9 -9
  36. data/app/views/govuk_publishing_components/components/docs/action_link.yml +5 -0
  37. data/app/views/govuk_publishing_components/components/docs/contents_list.yml +1 -0
  38. data/app/views/govuk_publishing_components/components/docs/search.yml +11 -0
  39. data/config/locales/ar.yml +1 -0
  40. data/config/locales/az.yml +1 -0
  41. data/config/locales/be.yml +1 -0
  42. data/config/locales/bg.yml +1 -0
  43. data/config/locales/bn.yml +1 -0
  44. data/config/locales/cs.yml +1 -0
  45. data/config/locales/cy.yml +1 -0
  46. data/config/locales/da.yml +1 -0
  47. data/config/locales/de.yml +1 -0
  48. data/config/locales/dr.yml +1 -0
  49. data/config/locales/el.yml +1 -0
  50. data/config/locales/en.yml +2 -1
  51. data/config/locales/es-419.yml +1 -0
  52. data/config/locales/es.yml +1 -0
  53. data/config/locales/et.yml +1 -0
  54. data/config/locales/fa.yml +1 -0
  55. data/config/locales/fi.yml +1 -0
  56. data/config/locales/fr.yml +1 -0
  57. data/config/locales/gd.yml +1 -0
  58. data/config/locales/gu.yml +1 -0
  59. data/config/locales/he.yml +1 -0
  60. data/config/locales/hi.yml +1 -0
  61. data/config/locales/hr.yml +1 -0
  62. data/config/locales/hu.yml +1 -0
  63. data/config/locales/hy.yml +1 -0
  64. data/config/locales/id.yml +1 -0
  65. data/config/locales/is.yml +1 -0
  66. data/config/locales/it.yml +1 -0
  67. data/config/locales/ja.yml +1 -0
  68. data/config/locales/ka.yml +1 -0
  69. data/config/locales/kk.yml +1 -0
  70. data/config/locales/ko.yml +1 -0
  71. data/config/locales/lt.yml +1 -0
  72. data/config/locales/lv.yml +1 -0
  73. data/config/locales/ms.yml +1 -0
  74. data/config/locales/mt.yml +1 -0
  75. data/config/locales/nl.yml +1 -0
  76. data/config/locales/no.yml +1 -0
  77. data/config/locales/pa-pk.yml +1 -0
  78. data/config/locales/pa.yml +1 -0
  79. data/config/locales/pl.yml +1 -0
  80. data/config/locales/ps.yml +1 -0
  81. data/config/locales/pt.yml +1 -0
  82. data/config/locales/ro.yml +1 -0
  83. data/config/locales/ru.yml +1 -0
  84. data/config/locales/si.yml +1 -0
  85. data/config/locales/sk.yml +1 -0
  86. data/config/locales/sl.yml +1 -0
  87. data/config/locales/so.yml +1 -0
  88. data/config/locales/sq.yml +1 -0
  89. data/config/locales/sr.yml +1 -0
  90. data/config/locales/sv.yml +1 -0
  91. data/config/locales/sw.yml +1 -0
  92. data/config/locales/ta.yml +1 -0
  93. data/config/locales/th.yml +1 -0
  94. data/config/locales/tk.yml +1 -0
  95. data/config/locales/tr.yml +1 -0
  96. data/config/locales/uk.yml +1 -0
  97. data/config/locales/ur.yml +1 -0
  98. data/config/locales/uz.yml +1 -0
  99. data/config/locales/vi.yml +1 -0
  100. data/config/locales/zh-hk.yml +1 -0
  101. data/config/locales/zh-tw.yml +1 -0
  102. data/config/locales/zh.yml +1 -0
  103. data/lib/govuk_publishing_components/presenters/contents_list_helper.rb +8 -0
  104. data/lib/govuk_publishing_components/presenters/meta_tags.rb +3 -0
  105. data/lib/govuk_publishing_components/version.rb +1 -1
  106. metadata +5 -3
@@ -19,6 +19,7 @@ pa:
19
19
  page:
20
20
  one: 1 ਪੰਨਾ
21
21
  other: "%{count} ਪੰਨੇ"
22
+ preview_aria_label:
22
23
  preview_link:
23
24
  reference: 'ਹਵਾਲਾ: %{reference}'
24
25
  request_format_cta: ਇੱਕ ਪਹੁੰਚਯੋਗ ਫਾਰਮੈਟ ਦੀ ਬੇਨਤੀ ਕਰੋ।
@@ -21,6 +21,7 @@ pl:
21
21
  many:
22
22
  one: 1 strona
23
23
  other: "%{count} strony"
24
+ preview_aria_label:
24
25
  preview_link:
25
26
  reference: 'Odnośnik: %{reference}'
26
27
  request_format_cta: Poproś o inny format.
@@ -19,6 +19,7 @@ ps:
19
19
  page:
20
20
  one: 1 پاڼه
21
21
  other: "%{count} پاڼې"
22
+ preview_aria_label:
22
23
  preview_link:
23
24
  reference: حواله:%{reference}
24
25
  request_format_cta: د لاسرسي وړ پاڼه غوښتنه وکړئ.
@@ -19,6 +19,7 @@ pt:
19
19
  page:
20
20
  one: 1 página
21
21
  other: "%{count} páginas"
22
+ preview_aria_label:
22
23
  preview_link:
23
24
  reference: 'Ref: %{reference}'
24
25
  request_format_cta: Solicitar um formato acessível.
@@ -20,6 +20,7 @@ ro:
20
20
  few:
21
21
  one: 1 pagină
22
22
  other: "%{count} pagini"
23
+ preview_aria_label:
23
24
  preview_link:
24
25
  reference: 'Referință: %{reference}'
25
26
  request_format_cta: Solicitați un format accesibil.
@@ -21,6 +21,7 @@ ru:
21
21
  many:
22
22
  one: 1 страница
23
23
  other: "%{count} страниц"
24
+ preview_aria_label:
24
25
  preview_link:
25
26
  reference: 'Ссылка: %{reference}'
26
27
  request_format_cta: Запросить в доступном формате.
@@ -19,6 +19,7 @@ si:
19
19
  page:
20
20
  one: පිටු 1ක්
21
21
  other: පිටු %{count}ක්
22
+ preview_aria_label:
22
23
  preview_link:
23
24
  reference: 'යොමුව: %{reference}'
24
25
  request_format_cta: පිවිසිය හැකි ආකෘතියක් ඉල්ලන්න.
@@ -20,6 +20,7 @@ sk:
20
20
  few:
21
21
  one: 1 strana
22
22
  other: "%{count} strán"
23
+ preview_aria_label:
23
24
  preview_link:
24
25
  reference: 'Odkaz: %{reference}'
25
26
  request_format_cta: Vyžiadajte si prístupný formát.
@@ -21,6 +21,7 @@ sl:
21
21
  one: 1 stran
22
22
  other: "%{count} strani"
23
23
  two:
24
+ preview_aria_label:
24
25
  preview_link:
25
26
  reference: 'Referenca: % (reference}'
26
27
  request_format_cta: Zahtevajte dostopen format.
@@ -19,6 +19,7 @@ so:
19
19
  page:
20
20
  one: 1 boga
21
21
  other: "%{count} bogaga"
22
+ preview_aria_label:
22
23
  preview_link:
23
24
  reference: 'Tixraac: %{reference}'
24
25
  request_format_cta: Codso nidaam la gali karo.
@@ -19,6 +19,7 @@ sq:
19
19
  page:
20
20
  one: 1 faqe
21
21
  other: "%{count} faqet"
22
+ preview_aria_label:
22
23
  preview_link:
23
24
  reference: 'Ref: %{reference}'
24
25
  request_format_cta: Kërkoni një format të arritshëm.
@@ -20,6 +20,7 @@ sr:
20
20
  few:
21
21
  one: 1 stranica
22
22
  other: "%{count} str."
23
+ preview_aria_label:
23
24
  preview_link:
24
25
  reference: 'Ref: %{reference}'
25
26
  request_format_cta: Zatražite format kom možete da pristupite.
@@ -19,6 +19,7 @@ sv:
19
19
  page:
20
20
  one: 1 sida
21
21
  other: "%{count} sidor"
22
+ preview_aria_label:
22
23
  preview_link:
23
24
  reference: 'Ref: %{reference}'
24
25
  request_format_cta: Begär ett tillgängligt format.
@@ -19,6 +19,7 @@ sw:
19
19
  page:
20
20
  one: Ukurasa mmoja (1)
21
21
  other: Kurasa %{count}
22
+ preview_aria_label:
22
23
  preview_link:
23
24
  reference: 'Marejeleo: %{reference}'
24
25
  request_format_cta: Omba muundo unaoweza kutumika.
@@ -19,6 +19,7 @@ ta:
19
19
  page:
20
20
  one: 1 பக்கம்
21
21
  other: "%{count} பக்கங்கள்"
22
+ preview_aria_label:
22
23
  preview_link:
23
24
  reference: 'பார்வை: %{reference}'
24
25
  request_format_cta: அணுகக்கூடிய வடிவத்தைக் கோருக.
@@ -18,6 +18,7 @@ th:
18
18
  order_a_copy: สั่งซื้อสำเนา
19
19
  page:
20
20
  other: "%{count} หน้า"
21
+ preview_aria_label:
21
22
  preview_link:
22
23
  reference: 'อ้างอิง: %{reference}'
23
24
  request_format_cta: ขอรูปแบบไฟล์ที่สามารถเข้าถึงได้
@@ -19,6 +19,7 @@ tk:
19
19
  page:
20
20
  one: 1 sahypa
21
21
  other: "%{count} sahypalar"
22
+ preview_aria_label:
22
23
  preview_link:
23
24
  reference: 'Salgylanma: %{reference}'
24
25
  request_format_cta: Elýeterli formaty talap etmek.
@@ -19,6 +19,7 @@ tr:
19
19
  page:
20
20
  one: 1 sayfa
21
21
  other: "%{count} sayfa"
22
+ preview_aria_label:
22
23
  preview_link:
23
24
  reference: 'İlgi: %{reference}'
24
25
  request_format_cta: Erişilebilir bir format talep edin.
@@ -21,6 +21,7 @@ uk:
21
21
  many:
22
22
  one: 1 сторінка
23
23
  other: "%{count} сторінок"
24
+ preview_aria_label:
24
25
  preview_link:
25
26
  reference: 'Посилання: %{reference}'
26
27
  request_format_cta: Надішліть запит на доступний формат.
@@ -19,6 +19,7 @@ ur:
19
19
  page:
20
20
  one: 1 صفحہ
21
21
  other: "%{count} صفحات"
22
+ preview_aria_label:
22
23
  preview_link:
23
24
  reference: 'حوالہ: %{reference}'
24
25
  request_format_cta: قابل رسائی فارمیٹ کی درخواست دیں۔
@@ -19,6 +19,7 @@ uz:
19
19
  page:
20
20
  one: 1 саҳифа
21
21
  other: "%{count} саҳифа"
22
+ preview_aria_label:
22
23
  preview_link:
23
24
  reference: 'Ҳавола: %{reference}'
24
25
  request_format_cta: Мақбул форматни олишга сўров.
@@ -18,6 +18,7 @@ vi:
18
18
  order_a_copy: Đặt hàng một bản sao
19
19
  page:
20
20
  other: "%{count} trang"
21
+ preview_aria_label:
21
22
  preview_link:
22
23
  reference: 'Tham khảo: %{reference}'
23
24
  request_format_cta: Yêu cầu một định dạng có thể truy cập.
@@ -18,6 +18,7 @@ zh-hk:
18
18
  order_a_copy: 索取副本
19
19
  page:
20
20
  other: "%{count} 頁"
21
+ preview_aria_label:
21
22
  preview_link:
22
23
  reference: 'Ref: %{reference}'
23
24
  request_format_cta: 索取可讀取之格式。
@@ -18,6 +18,7 @@ zh-tw:
18
18
  order_a_copy: 預定副本
19
19
  page:
20
20
  other: "%{count} 頁面"
21
+ preview_aria_label:
21
22
  preview_link:
22
23
  reference: 參考:%{reference}
23
24
  request_format_cta: 請求可參閱格式。
@@ -18,6 +18,7 @@ zh:
18
18
  order_a_copy: 订购副本
19
19
  page:
20
20
  other: "%{count} 页"
21
+ preview_aria_label:
21
22
  preview_link:
22
23
  reference: 参考号:%{reference}
23
24
  request_format_cta: 申请可访问格式。
@@ -40,6 +40,14 @@ module GovukPublishingComponents
40
40
  end
41
41
  end
42
42
 
43
+ def get_index_total
44
+ total = @contents.length
45
+ @contents.each do |parent|
46
+ total += parent[:items].length if parent[:items]
47
+ end
48
+ total
49
+ end
50
+
43
51
  private
44
52
 
45
53
  def parent_modifier
@@ -48,6 +48,9 @@ module GovukPublishingComponents
48
48
  primary_publisher = content_item.dig(:links, :primary_publishing_organisation)
49
49
  primary_publisher = primary_publisher.first[:title] unless primary_publisher.blank?
50
50
  meta_tags["govuk:primary-publishing-organisation"] = primary_publisher unless primary_publisher.blank?
51
+ ga4_browse_topic = content_item.dig(:links, :ordered_related_items, 0, :links, :mainstream_browse_pages, 0, :links, :parent, 0, :title)
52
+ ga4_browse_topic = ga4_browse_topic.downcase if ga4_browse_topic
53
+ meta_tags["govuk:ga4-browse-topic"] = ga4_browse_topic if ga4_browse_topic
51
54
 
52
55
  meta_tags
53
56
  end
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "35.16.0".freeze
2
+ VERSION = "35.17.0".freeze
3
3
  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: 35.16.0
4
+ version: 35.17.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: 2023-09-20 00:00:00.000000000 Z
11
+ date: 2023-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -349,6 +349,8 @@ files:
349
349
  - app/assets/images/govuk_publishing_components/action-link-arrow--brexit.svg
350
350
  - app/assets/images/govuk_publishing_components/action-link-arrow--dark.png
351
351
  - app/assets/images/govuk_publishing_components/action-link-arrow--dark.svg
352
+ - app/assets/images/govuk_publishing_components/action-link-arrow--light.png
353
+ - app/assets/images/govuk_publishing_components/action-link-arrow--light.svg
352
354
  - app/assets/images/govuk_publishing_components/action-link-arrow--simple-light.png
353
355
  - app/assets/images/govuk_publishing_components/action-link-arrow--simple-light.svg
354
356
  - app/assets/images/govuk_publishing_components/action-link-arrow--simple.png
@@ -1473,7 +1475,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1473
1475
  - !ruby/object:Gem::Version
1474
1476
  version: '0'
1475
1477
  requirements: []
1476
- rubygems_version: 3.4.19
1478
+ rubygems_version: 3.4.20
1477
1479
  signing_key:
1478
1480
  specification_version: 4
1479
1481
  summary: A gem to document components in GOV.UK frontend applications