govuk_publishing_components 63.3.1 → 64.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-form-tracker.js +2 -0
  3. data/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js +8 -34
  4. data/app/assets/javascripts/govuk_publishing_components/dependencies.js +1 -1
  5. data/app/assets/javascripts/govuk_publishing_components/domain-config.js +5 -10
  6. data/app/assets/javascripts/govuk_publishing_components/lib/cookie-settings.js +4 -15
  7. data/app/controllers/govuk_publishing_components/application_controller.rb +0 -5
  8. data/app/models/govuk_publishing_components/audit_applications.rb +0 -4
  9. data/app/models/govuk_publishing_components/audit_comparer.rb +1 -4
  10. data/app/views/govuk_publishing_components/applications_page/show.html.erb +0 -1
  11. data/app/views/govuk_publishing_components/audit/_applications.html.erb +0 -8
  12. data/app/views/govuk_publishing_components/audit/show.html.erb +1 -6
  13. data/app/views/govuk_publishing_components/component_guide/example.html.erb +1 -1
  14. data/app/views/govuk_publishing_components/component_guide/preview.html.erb +1 -1
  15. data/app/views/govuk_publishing_components/component_guide/show.html.erb +1 -1
  16. data/app/views/govuk_publishing_components/components/_accordion.html.erb +0 -2
  17. data/app/views/govuk_publishing_components/components/_action_link.html.erb +0 -2
  18. data/app/views/govuk_publishing_components/components/_add_another.html.erb +0 -1
  19. data/app/views/govuk_publishing_components/components/_app_promo_banner.html.erb +0 -2
  20. data/app/views/govuk_publishing_components/components/_attachment.html.erb +0 -2
  21. data/app/views/govuk_publishing_components/components/_attachment_link.html.erb +0 -2
  22. data/app/views/govuk_publishing_components/components/_back_link.html.erb +0 -2
  23. data/app/views/govuk_publishing_components/components/_back_to_top_link.html.erb +0 -2
  24. data/app/views/govuk_publishing_components/components/_big_number.html.erb +0 -2
  25. data/app/views/govuk_publishing_components/components/_breadcrumbs.html.erb +0 -2
  26. data/app/views/govuk_publishing_components/components/_button.html.erb +0 -1
  27. data/app/views/govuk_publishing_components/components/_cards.html.erb +0 -1
  28. data/app/views/govuk_publishing_components/components/_character_count.html.erb +0 -3
  29. data/app/views/govuk_publishing_components/components/_checkboxes.html.erb +0 -1
  30. data/app/views/govuk_publishing_components/components/_contents_list.html.erb +0 -2
  31. data/app/views/govuk_publishing_components/components/_contents_list_with_body.html.erb +0 -1
  32. data/app/views/govuk_publishing_components/components/_contextual_guidance.html.erb +0 -2
  33. data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +0 -2
  34. data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +0 -2
  35. data/app/views/govuk_publishing_components/components/_cross_service_header.html.erb +0 -2
  36. data/app/views/govuk_publishing_components/components/_date_input.html.erb +0 -2
  37. data/app/views/govuk_publishing_components/components/_details.html.erb +0 -2
  38. data/app/views/govuk_publishing_components/components/_devolved_nations.html.erb +0 -2
  39. data/app/views/govuk_publishing_components/components/_document_list.html.erb +0 -2
  40. data/app/views/govuk_publishing_components/components/_emergency_banner.html.erb +0 -2
  41. data/app/views/govuk_publishing_components/components/_error_alert.html.erb +0 -2
  42. data/app/views/govuk_publishing_components/components/_error_message.html.erb +0 -2
  43. data/app/views/govuk_publishing_components/components/_error_summary.html.erb +0 -2
  44. data/app/views/govuk_publishing_components/components/_feedback.html.erb +0 -3
  45. data/app/views/govuk_publishing_components/components/_fieldset.html.erb +0 -2
  46. data/app/views/govuk_publishing_components/components/_figure.html.erb +0 -1
  47. data/app/views/govuk_publishing_components/components/_file_upload.html.erb +0 -3
  48. data/app/views/govuk_publishing_components/components/_glance_metric.html.erb +0 -2
  49. data/app/views/govuk_publishing_components/components/_global_banner.html.erb +0 -2
  50. data/app/views/govuk_publishing_components/components/_govspeak.html.erb +0 -5
  51. data/app/views/govuk_publishing_components/components/_govspeak_html_publication.html.erb +0 -2
  52. data/app/views/govuk_publishing_components/components/_heading.html.erb +0 -2
  53. data/app/views/govuk_publishing_components/components/_hint.html.erb +0 -2
  54. data/app/views/govuk_publishing_components/components/_image_card.html.erb +0 -2
  55. data/app/views/govuk_publishing_components/components/_input.html.erb +0 -2
  56. data/app/views/govuk_publishing_components/components/_inset_text.html.erb +0 -2
  57. data/app/views/govuk_publishing_components/components/_intervention.html.erb +0 -2
  58. data/app/views/govuk_publishing_components/components/_inverse_header.html.erb +0 -2
  59. data/app/views/govuk_publishing_components/components/_label.html.erb +0 -2
  60. data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +0 -2
  61. data/app/views/govuk_publishing_components/components/_layout_for_admin.html.erb +0 -1
  62. data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +0 -2
  63. data/app/views/govuk_publishing_components/components/_layout_header.html.erb +0 -2
  64. data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +0 -2
  65. data/app/views/govuk_publishing_components/components/_lead_paragraph.html.erb +0 -2
  66. data/app/views/govuk_publishing_components/components/_metadata.html.erb +0 -2
  67. data/app/views/govuk_publishing_components/components/_modal_dialogue.html.erb +0 -2
  68. data/app/views/govuk_publishing_components/components/_notice.html.erb +0 -2
  69. data/app/views/govuk_publishing_components/components/_option_select.html.erb +0 -3
  70. data/app/views/govuk_publishing_components/components/_organisation_logo.html.erb +0 -2
  71. data/app/views/govuk_publishing_components/components/_pagination.html.erb +0 -1
  72. data/app/views/govuk_publishing_components/components/_panel.html.erb +0 -2
  73. data/app/views/govuk_publishing_components/components/_password_input.html.erb +0 -2
  74. data/app/views/govuk_publishing_components/components/_phase_banner.html.erb +0 -2
  75. data/app/views/govuk_publishing_components/components/_print_link.html.erb +0 -2
  76. data/app/views/govuk_publishing_components/components/_published_dates.html.erb +0 -2
  77. data/app/views/govuk_publishing_components/components/_radio.html.erb +0 -3
  78. data/app/views/govuk_publishing_components/components/_related_navigation.html.erb +0 -2
  79. data/app/views/govuk_publishing_components/components/_reorderable_list.html.erb +0 -2
  80. data/app/views/govuk_publishing_components/components/_search.html.erb +0 -3
  81. data/app/views/govuk_publishing_components/components/_search_with_autocomplete.html.erb +0 -2
  82. data/app/views/govuk_publishing_components/components/_secondary_navigation.html.erb +0 -2
  83. data/app/views/govuk_publishing_components/components/_select.html.erb +0 -2
  84. data/app/views/govuk_publishing_components/components/_select_with_search.html.erb +0 -2
  85. data/app/views/govuk_publishing_components/components/_service_navigation.html.erb +0 -2
  86. data/app/views/govuk_publishing_components/components/_share_links.html.erb +0 -2
  87. data/app/views/govuk_publishing_components/components/_signup_link.html.erb +0 -2
  88. data/app/views/govuk_publishing_components/components/_single_page_notification_button.html.erb +0 -2
  89. data/app/views/govuk_publishing_components/components/_skip_link.html.erb +0 -2
  90. data/app/views/govuk_publishing_components/components/_step_by_step_nav.html.erb +0 -2
  91. data/app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb +0 -2
  92. data/app/views/govuk_publishing_components/components/_step_by_step_nav_related.html.erb +0 -1
  93. data/app/views/govuk_publishing_components/components/_subscription_links.html.erb +0 -2
  94. data/app/views/govuk_publishing_components/components/_success_alert.html.erb +0 -2
  95. data/app/views/govuk_publishing_components/components/_summary_banner.html.erb +0 -2
  96. data/app/views/govuk_publishing_components/components/_summary_card.html.erb +0 -2
  97. data/app/views/govuk_publishing_components/components/_summary_list.html.erb +0 -2
  98. data/app/views/govuk_publishing_components/components/_table.html.erb +0 -2
  99. data/app/views/govuk_publishing_components/components/_tabs.html.erb +0 -2
  100. data/app/views/govuk_publishing_components/components/_tag.html.erb +0 -2
  101. data/app/views/govuk_publishing_components/components/_textarea.html.erb +0 -2
  102. data/app/views/govuk_publishing_components/components/_translation_nav.html.erb +0 -2
  103. data/app/views/govuk_publishing_components/components/_warning_text.html.erb +0 -2
  104. data/app/views/govuk_publishing_components/components/docs/govspeak_html_publication.yml +0 -2
  105. data/app/views/govuk_publishing_components/components/docs/organisation_logo.yml +4 -7
  106. data/lib/govuk_publishing_components/config.rb +0 -6
  107. data/lib/govuk_publishing_components/presenters/meta_tags.rb +0 -2
  108. data/lib/govuk_publishing_components/presenters/organisation_logo_helper.rb +11 -13
  109. data/lib/govuk_publishing_components/version.rb +1 -1
  110. data/lib/govuk_publishing_components.rb +0 -5
  111. metadata +1 -9
  112. data/app/assets/javascripts/govuk_publishing_components/single-consent-functions.js +0 -59
  113. data/lib/govuk_publishing_components/app_helpers/asset_helper.rb +0 -78
  114. data/node_modules/govuk-single-consent/README.md +0 -157
  115. data/node_modules/govuk-single-consent/dist/singleconsent.cjs.js +0 -419
  116. data/node_modules/govuk-single-consent/dist/singleconsent.esm.js +0 -417
  117. data/node_modules/govuk-single-consent/dist/singleconsent.iife.js +0 -431
  118. data/node_modules/govuk-single-consent/dist/singleconsent.iife.min.js +0 -1
  119. data/node_modules/govuk-single-consent/package.json +0 -56
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6accce7654a1f778de97ed1e1c305ea2b61ba6e1cd65c18003179d298075dd1f
4
- data.tar.gz: 17f5ec5d9b2ce4f0dac0f16cf3de381b575bd8c24ce5a1d295dc264e14203829
3
+ metadata.gz: 16c3c262e09722b90a73a068ab44323e447d40e7c833b0ef9e060bf113f776f2
4
+ data.tar.gz: 38303d6dd5e90633a3b7a75126f0b1fcfc51c522417f9efc4f365992cc878171
5
5
  SHA512:
6
- metadata.gz: f747916bfc169df32c1c8bf40630a8c03855c7666b467072cb1a21cd413d1f5ffacb8117b1c051f98402ad90f8ae8c205a2cacfeeded10d52a5dab37031810de
7
- data.tar.gz: a16291d0bf67efc71960cc73c18d721b7f9d629b72ba23e35dcd3a42e9b84165aa64bb2a5e0817de2826b7175cb5e9adb514bdc7c998201be951226eb51be891
6
+ metadata.gz: b590dce6cb9e0f0d0b53a0921579325699c0f6911c0bc3aa619293fedaa455bce9b41769c1fb95a662c7210ecb059faff660f50a0f0ac3620124f6151e4fcc7b
7
+ data.tar.gz: 0b1fbb803c88a2147aa091c46453d44c51ed35612a76f1d7815544a8858fd3f15bf432240ed7766d8831e2111e85597635b51d0157961aaba79eaedefd15ddbb
@@ -159,6 +159,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
159
159
  this.redacted = true
160
160
  }
161
161
  }
162
+ } else if (inputType === 'file') {
163
+ input.answer = elem.files.length + ' files chosen'
162
164
  } else {
163
165
  // remove the input from those gathered as it has no value
164
166
  inputs.splice(i, 1)
@@ -15,12 +15,6 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
15
15
  this.$module.setCookieConsent = this.setCookieConsent.bind(this)
16
16
  this.$module.rejectCookieConsent = this.rejectCookieConsent.bind(this)
17
17
  this.setupCookieMessage()
18
-
19
- if (window.GOVUK.useSingleConsentApi) {
20
- window.addEventListener('hide-cookie-banner', this.$module.hideCookieMessage)
21
- window.addEventListener('show-cookie-banner', this.$module.showCookieMessage)
22
- window.GOVUK.singleConsent.init()
23
- }
24
18
  }
25
19
 
26
20
  CookieBanner.prototype.setupCookieMessage = function () {
@@ -41,13 +35,10 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
41
35
  this.$rejectCookiesButton.addEventListener('click', this.$module.rejectCookieConsent)
42
36
  }
43
37
 
44
- if (!window.GOVUK.useSingleConsentApi) {
45
- this.showCookieMessage()
46
- }
38
+ this.showCookieMessage()
47
39
  }
48
40
 
49
41
  CookieBanner.prototype.showCookieMessage = function () {
50
- window.removeEventListener('show-cookie-banner', this.$module.showCookieMessage)
51
42
  // Show the cookie banner if not in the cookie settings page or in an iframe
52
43
  if (!this.isInCookiesPage() && !this.isInIframe()) {
53
44
  var shouldHaveCookieMessage = (this.$module && window.GOVUK.cookie('cookies_preferences_set') !== 'true')
@@ -57,9 +48,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
57
48
 
58
49
  // Set the default consent cookie if it isn't already present
59
50
  if (!window.GOVUK.cookie('cookies_policy')) {
60
- if (!window.GOVUK.useSingleConsentApi) {
61
- window.GOVUK.setDefaultConsentCookie()
62
- }
51
+ window.GOVUK.setDefaultConsentCookie()
63
52
  }
64
53
 
65
54
  window.GOVUK.deleteUnconsentedCookies()
@@ -68,12 +57,9 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
68
57
  }
69
58
 
70
59
  CookieBanner.prototype.hideCookieMessage = function (event) {
71
- window.removeEventListener('hide-cookie-banner', this.$module.hideCookieMessage)
72
60
  if (this.$module) {
73
61
  this.$module.hidden = true
74
- if (!window.GOVUK.useSingleConsentApi) {
75
- window.GOVUK.cookie('cookies_preferences_set', 'true', { days: 365 })
76
- }
62
+ window.GOVUK.cookie('cookies_preferences_set', 'true', { days: 365 })
77
63
  }
78
64
 
79
65
  if (event.target) {
@@ -85,31 +71,19 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
85
71
  if (this.$acceptCookiesButton.getAttribute('data-cookie-types') === 'all') {
86
72
  this.$module.querySelector('.gem-c-cookie-banner__confirmation-message--accepted').hidden = false
87
73
  }
88
- if (window.GOVUK.useSingleConsentApi) {
89
- window.GOVUK.singleConsent.setPreferences('accept')
90
- } else {
91
- window.GOVUK.approveAllCookieTypes()
92
- window.GOVUK.cookie('cookies_preferences_set', 'true', { days: 365 })
93
- }
94
-
74
+ window.GOVUK.approveAllCookieTypes()
75
+ window.GOVUK.cookie('cookies_preferences_set', 'true', { days: 365 })
95
76
  this.$module.showConfirmationMessage()
96
77
  this.$module.cookieBannerConfirmationMessage.focus()
97
-
98
- if (!window.GOVUK.useSingleConsentApi) {
99
- window.GOVUK.triggerEvent(window, 'cookie-consent')
100
- }
78
+ window.GOVUK.triggerEvent(window, 'cookie-consent')
101
79
  }
102
80
 
103
81
  CookieBanner.prototype.rejectCookieConsent = function () {
104
82
  this.$module.querySelector('.gem-c-cookie-banner__confirmation-message--rejected').hidden = false
105
83
  this.$module.showConfirmationMessage()
106
84
  this.$module.cookieBannerConfirmationMessage.focus()
107
- if (window.GOVUK.useSingleConsentApi) {
108
- window.GOVUK.singleConsent.setPreferences('reject')
109
- } else {
110
- window.GOVUK.setDefaultConsentCookie()
111
- window.GOVUK.cookie('cookies_preferences_set', 'true', { days: 365 })
112
- }
85
+ window.GOVUK.setDefaultConsentCookie()
86
+ window.GOVUK.cookie('cookies_preferences_set', 'true', { days: 365 })
113
87
  }
114
88
 
115
89
  CookieBanner.prototype.showConfirmationMessage = function () {
@@ -1,7 +1,7 @@
1
1
  /* eslint-env */
2
2
 
3
3
  // This adds in javascript that initialises components and dependencies
4
- // that are provided by Slimmer in public frontend applications.
4
+ // in public frontend applications.
5
5
  // = require ./modules.js
6
6
 
7
7
  document.addEventListener('DOMContentLoaded', function () {
@@ -13,8 +13,7 @@ window.GOVUK.vars.domains = [
13
13
  initialiseGA4: true,
14
14
  id: 'GTM-MG7HG5W',
15
15
  auth: 'bRiZ-jiEHtw6hHpGd6dF9w',
16
- preview: 'env-3',
17
- consentApiUrl: 'staging'
16
+ preview: 'env-3'
18
17
  },
19
18
  {
20
19
  name: 'production',
@@ -24,8 +23,7 @@ window.GOVUK.vars.domains = [
24
23
  'assets.publishing.service.gov.uk'
25
24
  ],
26
25
  initialiseGA4: true,
27
- id: 'GTM-MG7HG5W',
28
- consentApiUrl: 'production'
26
+ id: 'GTM-MG7HG5W'
29
27
  },
30
28
  {
31
29
  name: 'staging',
@@ -37,8 +35,7 @@ window.GOVUK.vars.domains = [
37
35
  initialiseGA4: true,
38
36
  id: 'GTM-MG7HG5W',
39
37
  auth: 'oJWs562CxSIjZKn_GlB5Bw',
40
- preview: 'env-5',
41
- consentApiUrl: 'staging'
38
+ preview: 'env-5'
42
39
  },
43
40
  {
44
41
  name: 'integration',
@@ -50,8 +47,7 @@ window.GOVUK.vars.domains = [
50
47
  initialiseGA4: true,
51
48
  id: 'GTM-MG7HG5W',
52
49
  auth: 'C7iYdcsOlYgGmiUJjZKrHQ',
53
- preview: 'env-4',
54
- consentApiUrl: 'staging'
50
+ preview: 'env-4'
55
51
  },
56
52
  {
57
53
  name: 'devdocs',
@@ -59,7 +55,6 @@ window.GOVUK.vars.domains = [
59
55
  'docs.publishing.service.gov.uk'
60
56
  ],
61
57
  initialiseGA4: true,
62
- id: 'GTM-TNKCK97',
63
- consentApiUrl: 'production'
58
+ id: 'GTM-TNKCK97'
64
59
  }
65
60
  ]
@@ -12,18 +12,12 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
12
12
  document.querySelector('form[data-module=cookie-settings]')
13
13
  .addEventListener('submit', this.$module.submitSettingsForm)
14
14
 
15
- if (window.GOVUK.useSingleConsentApi) {
16
- window.GOVUK.singleConsent.init(this.setInitialFormValues.bind(this))
17
- } else {
18
- this.setInitialFormValues()
19
- }
15
+ this.setInitialFormValues()
20
16
  }
21
17
 
22
18
  CookieSettings.prototype.setInitialFormValues = function () {
23
19
  if (!window.GOVUK.cookie('cookies_policy')) {
24
- if (!window.GOVUK.useSingleConsentApi) {
25
- window.GOVUK.setDefaultConsentCookie()
26
- }
20
+ window.GOVUK.setDefaultConsentCookie()
27
21
  }
28
22
 
29
23
  var currentConsentCookie = window.GOVUK.cookie('cookies_policy')
@@ -68,13 +62,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
68
62
  }
69
63
  }
70
64
 
71
- if (window.GOVUK.useSingleConsentApi) {
72
- window.GOVUK.singleConsent.setPreferences(null, options)
73
- } else {
74
- window.GOVUK.setConsentCookie(options)
75
- window.GOVUK.setCookie('cookies_preferences_set', true, { days: 365 })
76
- }
77
-
65
+ window.GOVUK.setConsentCookie(options)
66
+ window.GOVUK.setCookie('cookies_preferences_set', true, { days: 365 })
78
67
  this.showConfirmationMessage()
79
68
  return false
80
69
  }
@@ -3,16 +3,11 @@ module GovukPublishingComponents
3
3
  helper ::Rails.application.helpers
4
4
  protect_from_forgery with: :exception
5
5
  before_action :set_x_frame_options_header
6
- before_action :set_disable_slimmer_header
7
6
 
8
7
  private
9
8
 
10
9
  def set_x_frame_options_header
11
10
  response.headers["X-Frame-Options"] = "ALLOWALL"
12
11
  end
13
-
14
- def set_disable_slimmer_header
15
- response.headers["X-Slimmer-Skip"] = "true"
16
- end
17
12
  end
18
13
  end
@@ -19,8 +19,6 @@ module GovukPublishingComponents
19
19
  find_components = /(?<=govuk_publishing_components\/components\/)[a-zA-Z_-]+(?=['"])/
20
20
 
21
21
  @find_all_stylesheets = /@import ["']{1}govuk_publishing_components\/all_components/ # if using the all stylesheets option
22
- @find_individual_asset_model = /render_component_stylesheets/ # if using per page component asset loading
23
- @uses_individual_asset_model = false
24
22
  find_stylesheets = /(?<=@import ["']{1}govuk_publishing_components\/components\/)(?!print\/)+[a-zA-Z_-]+(?=['"])/
25
23
 
26
24
  @find_all_javascripts = /\/\/ *= require govuk_publishing_components\/all_components/
@@ -80,7 +78,6 @@ module GovukPublishingComponents
80
78
  jquery_references: @jquery_references.flatten.uniq.sort,
81
79
  component_locations: @component_locations,
82
80
  helper_references: @helper_references,
83
- uses_individual_asset_model: @uses_individual_asset_model,
84
81
  application_components: application_components || [],
85
82
  }
86
83
  end
@@ -144,7 +141,6 @@ module GovukPublishingComponents
144
141
  return %w[all] if src.match(@find_all_stylesheets) && type == "stylesheet"
145
142
  return %w[all] if src.match(@find_all_javascripts) && type == "javascript"
146
143
 
147
- @uses_individual_asset_model = true if src.match(@find_individual_asset_model) && type == "template"
148
144
  matches = src.scan(find)
149
145
  return [] unless matches.any?
150
146
 
@@ -23,7 +23,6 @@ module GovukPublishingComponents
23
23
 
24
24
  results.each do |result|
25
25
  if result[:application_found]
26
- @current_uses_individual_asset_model = result[:uses_individual_asset_model]
27
26
  templates = result[:components_found].find { |c| c[:location] == "template" }
28
27
  stylesheets = result[:components_found].find { |c| c[:location] == "stylesheet" }
29
28
  javascripts = result[:components_found].find { |c| c[:location] == "javascript" }
@@ -69,7 +68,6 @@ module GovukPublishingComponents
69
68
  jquery_references: result[:jquery_references],
70
69
  component_locations: result[:component_locations],
71
70
  helper_references: result[:helper_references],
72
- uses_individual_asset_model: result[:uses_individual_asset_model],
73
71
  application_components: result[:application_components],
74
72
  }
75
73
  else
@@ -127,8 +125,7 @@ module GovukPublishingComponents
127
125
  asset_in_gem = false
128
126
  end
129
127
 
130
- suppress_warning = @current_uses_individual_asset_model && second_location == "stylesheet"
131
- raise_warning = asset_in_gem && !suppress_warning
128
+ raise_warning = asset_in_gem
132
129
 
133
130
  # this raises a warning if the asset exists and isn't included in the application
134
131
  warnings << create_warning(component, "Included in #{first_location} but not #{second_location}") if raise_warning
@@ -1,5 +1,4 @@
1
1
  <% content_for :title, "Applications consistency" %>
2
- <% add_gem_component_stylesheet("table") %>
3
2
 
4
3
  <%= render "govuk_publishing_components/components/back_link", {
5
4
  href: "/component-guide",
@@ -37,12 +37,6 @@
37
37
  <% github_link = "https://github.com/alphagov/" + application[:dir] + "/blob/main/" %>
38
38
 
39
39
  <% if @other_applications %>
40
- <% if application[:uses_individual_asset_model] %>
41
- <%= render "govuk_publishing_components/components/warning_text", {
42
- text: raw("This application uses <a class=\"govuk-link\" href=\"https://github.com/alphagov/govuk_publishing_components/blob/main/docs/set-up-individual-component-css-loading.md\">per page asset loading</a> for components. Warnings about missing stylesheets have been suppressed."),
43
- } %>
44
- <% end %>
45
-
46
40
  <% application[:warnings].each do |warning| %>
47
41
  <p class="govuk-body">
48
42
  <strong class="govuk-tag">Warn</strong>
@@ -67,8 +61,6 @@
67
61
  <% content = capture do %>
68
62
  <% if item[:value].length > 0 %>
69
63
  <%= item[:value].join(", ") %>
70
- <% elsif application[:uses_individual_asset_model] && item[:name] == "In stylesheets" %>
71
- Uses per page component asset loading
72
64
  <% else %>
73
65
  None
74
66
  <% end %>
@@ -1,9 +1,4 @@
1
- <%
2
- add_gem_component_stylesheet("table")
3
- add_gem_component_stylesheet("select")
4
- add_gem_component_stylesheet("summary-list")
5
- content_for :title, "Component audit"
6
- %>
1
+ <% content_for :title, "Component audit" %>
7
2
 
8
3
  <%= render "govuk_publishing_components/components/back_link", {
9
4
  href: "/component-guide",
@@ -1,6 +1,6 @@
1
1
  <% content_for :title, "#{@component_example.name} example - #{@component_doc.name} component" %>
2
2
  <% content_for :application_stylesheet do %>
3
- <% if @component_doc.source == "application" && application_stylesheet_in_use? %>
3
+ <% if @component_doc.source == "application" %>
4
4
  <%= render "application_stylesheet" %>
5
5
  <% end %>
6
6
  <% end %>
@@ -1,5 +1,5 @@
1
1
  <% content_for :application_stylesheet do %>
2
- <% if @component_doc.source == "application" && application_stylesheet_in_use? %>
2
+ <% if @component_doc.source == "application" %>
3
3
  <%= render "application_stylesheet" %>
4
4
  <% end %>
5
5
  <% end %>
@@ -1,6 +1,6 @@
1
1
  <% content_for :title, "#{@component_doc.name} component" %>
2
2
  <% content_for :application_stylesheet do %>
3
- <% if @component_doc.source == "application" && application_stylesheet_in_use? %>
3
+ <% if @component_doc.source == "application" %>
4
4
  <%= render "application_stylesheet" %>
5
5
  <% end %>
6
6
  <% end %>
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("accordion")
3
-
4
2
  local_assigns[:margin_bottom] ||= 6
5
3
  shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
6
4
  accordion_helper = GovukPublishingComponents::Presenters::AccordionHelper.new()
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("action-link")
3
-
4
2
  local_assigns[:margin_bottom] ||= 0
5
3
  text ||= false
6
4
  href ||= false
@@ -1,5 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("add-another")
3
2
  items ||= []
4
3
  empty ||= ""
5
4
  fieldset_legend ||= ""
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("app_promo_banner")
3
-
4
2
  disable_ga4 ||= false
5
3
 
6
4
  component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("attachment")
3
-
4
2
  attachment = GovukPublishingComponents::Presenters::AttachmentHelper.new(attachment)
5
3
  target ||= "_self"
6
4
  hide_opendocument_metadata ||= false
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("attachment-link")
3
-
4
2
  attachment = GovukPublishingComponents::Presenters::AttachmentHelper.new(attachment)
5
3
  target ||= nil
6
4
  url_data_attributes ||= {}
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("back-link")
3
-
4
2
  text ||= t("components.back_link.back")
5
3
  data_attributes ||= {}
6
4
  disable_ga4 ||= false
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("back-to-top-link")
3
-
4
2
  text ||= t("components.back_to_top_link.contents", default: "Contents")
5
3
 
6
4
  if href.blank? || text.blank?
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("big-number")
3
-
4
2
  big_number_helper = GovukPublishingComponents::Presenters::BigNumberHelper.new(local_assigns)
5
3
 
6
4
  number ||= false
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("breadcrumbs")
3
-
4
2
  border ||= false
5
3
  breadcrumbs ||= []
6
4
  collapse_on_mobile ||= false
@@ -1,5 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("button")
3
2
  disable_ga4 ||= false
4
3
 
5
4
  # button_helper.css_classes generates "gem-c-button"
@@ -1,5 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("cards")
3
2
  heading ||= nil
4
3
  items ||= nil
5
4
  sub_heading_level ||= 3
@@ -1,7 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("error-message")
3
- add_gem_component_stylesheet("character-count")
4
-
5
2
  id ||= "character-count-#{SecureRandom.hex(4)}"
6
3
  maxlength ||= nil
7
4
  maxwords ||= nil
@@ -1,5 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("checkboxes")
3
2
  cb_helper = GovukPublishingComponents::Presenters::CheckboxesHelper.new(local_assigns)
4
3
  id = cb_helper.id
5
4
  component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("contents-list")
3
-
4
2
  underline_links ||= false
5
3
  format_numbers ||= false
6
4
  alternative_line_style ||= false
@@ -1,4 +1,3 @@
1
- <% add_gem_component_stylesheet("contents-list-with-body") %>
2
1
  <% block = yield %>
3
2
  <% unless block.empty? %>
4
3
  <%
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("contextual-guidance")
3
-
4
2
  id ||= nil
5
3
  title ||= nil
6
4
  content ||= nil
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("contextual-sidebar")
3
-
4
2
  disable_ga4 ||= false
5
3
  request.query_parameters[:disable_ga4] = disable_ga4
6
4
  navigation = GovukPublishingComponents::Presenters::ContextualNavigation.new(content_item, request)
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("cookie-banner")
3
-
4
2
  id ||= "global-cookie-message"
5
3
  title ||= t("components.cookie_banner.title")
6
4
  text ||= t("components.cookie_banner.text")
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("cross-service-header")
3
-
4
2
  service_name ||= nil
5
3
  one_login_navigation_items ||= []
6
4
  service_navigation_items ||= []
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("date-input")
3
-
4
2
  id ||= "input-#{SecureRandom.hex(4)}"
5
3
  name ||= nil
6
4
  items ||= [
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("details")
3
-
4
2
  open ||= nil
5
3
  disable_ga4 ||= false
6
4
  @ga4 ||= OpenStruct.new(index_section: 0) unless disable_ga4
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("devolved-nations")
3
-
4
2
  shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
5
3
  devolved_nations_helper = GovukPublishingComponents::Presenters::DevolvedNationsHelper.new(local_assigns)
6
4
 
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("document-list")
3
-
4
2
  local_assigns[:margin_bottom] ||= 5
5
3
  items ||= []
6
4
 
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("emergency-banner")
3
-
4
2
  heading ||= ""
5
3
  short_description ||= nil
6
4
  link ||= nil
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("error-alert")
3
-
4
2
  id ||= nil
5
3
  description ||= nil
6
4
  data_attributes ||= {}
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("error-message")
3
-
4
2
  id ||= "error-message-#{SecureRandom.hex(4)}"
5
3
  items ||= []
6
4
  right_to_left ||= false
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("error-summary")
3
-
4
2
  id ||= "error-summary-#{SecureRandom.hex(4)}"
5
3
  title ||= false
6
4
  description ||= false
@@ -1,7 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("button")
3
- add_gem_component_stylesheet("feedback")
4
-
5
2
  email_regex = /[^\s=\/?&]+(?:@|%40)[^\s=\/?&]+/
6
3
  url_without_pii = request.original_url.gsub(email_regex, "[email]").encode
7
4
  path_without_pii = request.fullpath.gsub(email_regex, "[email]").encode
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("fieldset")
3
-
4
2
  shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
5
3
 
6
4
  text = text || yield
@@ -1,5 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("figure")
3
2
  alt ||= ""
4
3
  caption ||= ""
5
4
  credit ||= ""
@@ -1,7 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("button")
3
- add_gem_component_stylesheet("file-upload")
4
-
5
2
  shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
6
3
 
7
4
  id ||= "file-upload-#{SecureRandom.hex(4)}"
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("glance-metric")
3
-
4
2
  name ||= false
5
3
  figure ||= nil
6
4
  context ||= ""
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("global-banner")
3
-
4
2
  title ||= nil
5
3
  title_href ||= nil
6
4
  text ||= nil
@@ -1,9 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("govspeak")
3
- add_gem_component_stylesheet("attachment-link")
4
- add_gem_component_stylesheet("attachment")
5
- add_gem_component_stylesheet("details")
6
-
7
2
  inverse ||= false
8
3
  local_assigns[:margin_bottom] ||= 0
9
4
  direction_class = "gem-c-govspeak--direction-#{direction}" if local_assigns.include?(:direction)
@@ -1,6 +1,4 @@
1
1
  <%
2
- add_gem_component_stylesheet("govspeak-html-publication")
3
-
4
2
  govspeak_locals = {}
5
3
  govspeak_locals[:content] = local_assigns.fetch(:content) if local_assigns.include?(:content)
6
4
  govspeak_locals[:direction] = local_assigns.fetch(:direction) if local_assigns.include?(:direction)