govuk_publishing_components 66.0.0 → 66.1.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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-form-tracker.js +6 -6
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-link-tracker.js +13 -16
- data/app/assets/javascripts/govuk_publishing_components/lib/cookie-functions.js +0 -12
- data/app/assets/javascripts/govuk_publishing_components/lib/cookie-settings.js +0 -1
- data/app/assets/stylesheets/component_guide/application.scss +14 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_details.scss +5 -0
- data/app/controllers/govuk_publishing_components/applications_page_controller.rb +1 -1
- data/app/views/govuk_publishing_components/applications_page/show.html.erb +21 -18
- data/app/views/govuk_publishing_components/components/_accordion.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_devolved_nations.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_document_list.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_emergency_banner.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_metadata.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_phase_banner.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_step_by_step_nav.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_summary_banner.html.erb +0 -1
- data/lib/govuk_publishing_components/presenters/step_by_step_nav_helper.rb +2 -2
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/axe-core/axe.js +322 -248
- data/node_modules/axe-core/axe.min.js +2 -2
- data/node_modules/axe-core/locales/_template.json +7 -0
- data/node_modules/axe-core/package.json +1 -1
- data/node_modules/axe-core/sri-history.json +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a39e0c1d59ff325efc8299c1fc22cb9360558ec3e2d58c31a4fd429714252d80
|
|
4
|
+
data.tar.gz: d9e8ca8ec4e6f5c947392c2657875d3f3a4b865f3441b13da8f684eec3cf7296
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 88a1fecfcb9af9aebec91df7acf461e4f7e036710e25faaffb54203266f2f31ed0b893378815ff9b0075705531af1c715ab5ce682cb6db7d1d5b18056baef9c3
|
|
7
|
+
data.tar.gz: 1c2d941efc1618698c4928c7fa95ac96b6da9941cf5a58f21ace50783bc6efc7d570793b7a9b7a52070158f5827a0c7ed29a03ed59b1c7788bcddcc2554a7739
|
|
@@ -126,13 +126,13 @@
|
|
|
126
126
|
} else if (elem.checked) {
|
|
127
127
|
var fieldset = elem.closest('fieldset') || null
|
|
128
128
|
|
|
129
|
-
if (fieldset.dataset.ga4Redact && !elem.dataset.ga4RedactPermit) {
|
|
130
|
-
input.answer = '[REDACTED]'
|
|
131
|
-
} else {
|
|
132
|
-
input.answer = labelText
|
|
133
|
-
}
|
|
134
|
-
|
|
135
129
|
if (fieldset) {
|
|
130
|
+
if (fieldset.dataset.ga4Redact && !elem.dataset.ga4RedactPermit) {
|
|
131
|
+
input.answer = '[REDACTED]'
|
|
132
|
+
} else {
|
|
133
|
+
input.answer = labelText
|
|
134
|
+
}
|
|
135
|
+
|
|
136
136
|
var legend = fieldset.querySelector('legend')
|
|
137
137
|
|
|
138
138
|
if (legend) {
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
function Ga4LinkTracker (module) {
|
|
5
5
|
this.module = module
|
|
6
6
|
this.trackingTrigger = 'data-ga4-link' // elements with this attribute get tracked
|
|
7
|
-
this.trackLinksOnly = this.module.hasAttribute('data-ga4-track-links-only')
|
|
8
7
|
this.limitToElementClass = this.module.getAttribute('data-ga4-limit-to-element-class')
|
|
9
8
|
this.PIIRemover = new window.GOVUK.analyticsGa4.PIIRemover()
|
|
10
9
|
}
|
|
@@ -39,24 +38,22 @@
|
|
|
39
38
|
|
|
40
39
|
Ga4LinkTracker.prototype.handleClick = function (event) {
|
|
41
40
|
var target = event.target
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
for (var i = 0; i < classes.length; i++) {
|
|
51
|
-
if (target.closest('.' + classes[i].trim())) {
|
|
52
|
-
// Stops the link tracker firing twice if the link itself has data-ga4-link, and the parent element does as well.
|
|
53
|
-
if (target.closest('[data-ga4-link]') !== target.closest('[data-ga4-limit-to-element-class]')) {
|
|
54
|
-
return
|
|
55
|
-
}
|
|
56
|
-
this.trackClick(event)
|
|
41
|
+
|
|
42
|
+
if (this.limitToElementClass) {
|
|
43
|
+
var classes = this.limitToElementClass.split(',')
|
|
44
|
+
for (var i = 0; i < classes.length; i++) {
|
|
45
|
+
if (target.closest('.' + classes[i].trim())) {
|
|
46
|
+
// Stops the link tracker firing twice if the link itself has data-ga4-link, and the parent element does as well.
|
|
47
|
+
if (target.closest('[data-ga4-link]') !== target.closest('[data-ga4-limit-to-element-class]')) {
|
|
48
|
+
return
|
|
57
49
|
}
|
|
50
|
+
this.trackClick(event)
|
|
58
51
|
}
|
|
59
52
|
}
|
|
53
|
+
} else if (target.closest('a') || target.closest('button')) {
|
|
54
|
+
if (target.closest('[data-ga4-link]')) {
|
|
55
|
+
this.trackClick(event)
|
|
56
|
+
}
|
|
60
57
|
}
|
|
61
58
|
}
|
|
62
59
|
|
|
@@ -12,21 +12,14 @@
|
|
|
12
12
|
|
|
13
13
|
var COOKIE_CATEGORIES = {
|
|
14
14
|
cookies_policy: 'essential',
|
|
15
|
-
seen_cookie_message: 'essential',
|
|
16
|
-
cookie_preferences_set: 'essential',
|
|
17
15
|
cookies_preferences_set: 'essential',
|
|
18
16
|
'_email-alert-frontend_session': 'essential',
|
|
19
17
|
intervention_campaign: 'essential',
|
|
20
18
|
licensing_session: 'essential',
|
|
21
19
|
govuk_contact_referrer: 'essential',
|
|
22
|
-
multivariatetest_cohort_coronavirus_extremely_vulnerable_rate_limit: 'essential',
|
|
23
20
|
app_promo_banner: 'settings',
|
|
24
|
-
dgu_beta_banner_dismissed: 'settings',
|
|
25
21
|
global_banner_seen: 'settings',
|
|
26
|
-
user_nation: 'settings',
|
|
27
22
|
govuk_chat_onboarding_complete: 'settings', // cookie details page to be updated when this is in use
|
|
28
|
-
'JS-Detection': 'usage',
|
|
29
|
-
TLSversion: 'usage',
|
|
30
23
|
_ga_VBLT2V3FZR: 'usage', // gtag cookie used to persist the session state, integration
|
|
31
24
|
_ga_P1DGM6TVYF: 'usage', // staging
|
|
32
25
|
_ga_S5RQ7FTGVR: 'usage' // production
|
|
@@ -147,11 +140,6 @@
|
|
|
147
140
|
return true
|
|
148
141
|
}
|
|
149
142
|
|
|
150
|
-
// Survey cookies are dynamically generated, so we need to check for these separately
|
|
151
|
-
if (cookieName.match('^govuk_surveySeen') || cookieName.match('^govuk_taken')) {
|
|
152
|
-
return window.GOVUK.checkConsentCookieCategory(cookieName, 'settings')
|
|
153
|
-
}
|
|
154
|
-
|
|
155
143
|
if (COOKIE_CATEGORIES[cookieName]) {
|
|
156
144
|
var cookieCategory = COOKIE_CATEGORIES[cookieName]
|
|
157
145
|
|
|
@@ -482,6 +482,13 @@ $code-delete-bg: #fadddd;
|
|
|
482
482
|
container-name: page;
|
|
483
483
|
}
|
|
484
484
|
|
|
485
|
+
.table-wrapper {
|
|
486
|
+
.govuk-table {
|
|
487
|
+
display: block;
|
|
488
|
+
overflow-x: scroll;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
|
|
485
492
|
@container page (width > 1040px) {
|
|
486
493
|
$w: 960px;
|
|
487
494
|
|
|
@@ -493,6 +500,13 @@ $code-delete-bg: #fadddd;
|
|
|
493
500
|
margin-right: calc(((-100cqw + $w) / 2) - 1px);
|
|
494
501
|
background: #ffffff;
|
|
495
502
|
padding: 15px;
|
|
503
|
+
|
|
504
|
+
.govuk-table {
|
|
505
|
+
width: auto;
|
|
506
|
+
display: table;
|
|
507
|
+
margin-left: auto;
|
|
508
|
+
margin-right: auto;
|
|
509
|
+
}
|
|
496
510
|
}
|
|
497
511
|
}
|
|
498
512
|
|
|
@@ -4,7 +4,7 @@ module GovukPublishingComponents
|
|
|
4
4
|
applications = [
|
|
5
5
|
{
|
|
6
6
|
type: "public-facing",
|
|
7
|
-
apps: %w[collections email-alert-frontend feedback finder-frontend frontend smart-answers].sort,
|
|
7
|
+
apps: %w[collections email-alert-frontend feedback finder-frontend frontend govuk_publishing_components smart-answers].sort,
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
type: "publishing",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<% content_for :title, "Applications consistency" %>
|
|
2
|
+
<% content_for :body_classes, "table-container" %>
|
|
2
3
|
|
|
3
4
|
<%= render "govuk_publishing_components/components/back_link", {
|
|
4
5
|
href: "/component-guide",
|
|
@@ -16,22 +17,24 @@
|
|
|
16
17
|
<% end %>
|
|
17
18
|
|
|
18
19
|
<div data-module="filter-list">
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
20
|
+
<div class="table-wrapper">
|
|
21
|
+
<table class="govuk-table">
|
|
22
|
+
<thead class="govuk-table__head">
|
|
23
|
+
<tr class="govuk-table__row">
|
|
24
|
+
<th scope="col" class="govuk-table__header sticky-table-header">Application</th>
|
|
25
|
+
<th scope="col" class="govuk-table__header sticky-table-header">Type</th>
|
|
26
|
+
<th scope="col" class="govuk-table__header sticky-table-header">Source</th>
|
|
27
|
+
<th scope="col" class="govuk-table__header sticky-table-header">Gem version</th>
|
|
28
|
+
<th scope="col" class="govuk-table__header sticky-table-header">Sass version</th>
|
|
29
|
+
<th scope="col" class="govuk-table__header sticky-table-header">Ruby version</th>
|
|
30
|
+
<th scope="col" class="govuk-table__header sticky-table-header">Yarn version</th>
|
|
31
|
+
</tr>
|
|
32
|
+
</thead>
|
|
33
|
+
<tbody class="govuk-table__body">
|
|
34
|
+
<%= render "table-content", content: @applications_output.select { |a| a[:type] == "public-facing" }, type: "Public facing" %>
|
|
35
|
+
<%= render "table-content", content: @applications_output.select { |a| a[:type] == "publishing" }, type: "Publishing" %>
|
|
36
|
+
<%= render "table-content", content: @applications_output.select { |a| a[:type] == "utility" }, type: "Utility" %>
|
|
37
|
+
</tbody>
|
|
38
|
+
</table>
|
|
39
|
+
</div>
|
|
37
40
|
</div>
|
|
@@ -44,7 +44,6 @@
|
|
|
44
44
|
# object in order to keep them from colliding with GA4 event tracking attributes
|
|
45
45
|
ga4_link_data_attributes = {}
|
|
46
46
|
ga4_link_data_attributes[:module] = "ga4-link-tracker"
|
|
47
|
-
ga4_link_data_attributes[:ga4_track_links_only] = ""
|
|
48
47
|
ga4_link_data_attributes[:ga4_set_indexes] = ""
|
|
49
48
|
ga4_link_data_attributes[:ga4_link] = {
|
|
50
49
|
event_name: "navigation",
|
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
<% unless disable_ga4 %>
|
|
47
47
|
data-ga4-cookie-banner <%# GA4 pageview JS looks for data-ga4-cookie-banner %>
|
|
48
48
|
data-module="ga4-link-tracker"
|
|
49
|
-
data-ga4-track-links-only
|
|
50
49
|
data-ga4-set-indexes
|
|
51
50
|
data-ga4-link="<%= { event_name: "navigation", type: "cookie banner", section: t("components.cookie_banner.confirmation_message.accepted", locale: :en) }.to_json %>"
|
|
52
51
|
<% end %>><%= t("components.cookie_banner.confirmation_message.accepted") %>. <span class="gem-c-cookie-banner__confirmation-message"><%= confirmation_message %></span></p>
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
component_helper.add_data_attribute({
|
|
15
15
|
ga4_devolved_nations_banner: devolved_nations_helper.ga4_applicable_nations_title_text(true),
|
|
16
16
|
module: "ga4-link-tracker",
|
|
17
|
-
ga4_track_links_only: "",
|
|
18
17
|
ga4_set_indexes: "",
|
|
19
18
|
ga4_link: {
|
|
20
19
|
event_name: "navigation",
|
|
@@ -84,7 +84,6 @@
|
|
|
84
84
|
data-module="gem-toggle"
|
|
85
85
|
<% else %>
|
|
86
86
|
data-module="gem-toggle ga4-link-tracker"
|
|
87
|
-
data-ga4-track-links-only
|
|
88
87
|
data-ga4-link="<%= ga4_object %>"
|
|
89
88
|
<% end %>>
|
|
90
89
|
<%= render "govuk_publishing_components/components/metadata/sentence", items: definition, toggle_id: "#{index}-#{SecureRandom.hex(4)}" %>
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
component_helper.add_aria_attribute({ labelledby: title_id })
|
|
11
11
|
component_helper.set_lang("en")
|
|
12
12
|
component_helper.add_data_attribute({ module: "ga4-link-tracker" })
|
|
13
|
-
component_helper.add_data_attribute({ ga4_track_links_only: "" })
|
|
14
13
|
component_helper.add_data_attribute({ ga4_link: { event_name: "navigation", type: "callout" } })
|
|
15
14
|
%>
|
|
16
15
|
<% if title.present? && text.present? %>
|
|
@@ -107,8 +107,8 @@ module GovukPublishingComponents
|
|
|
107
107
|
return href if step_nav_content_id.blank?
|
|
108
108
|
|
|
109
109
|
uri = URI.parse(href)
|
|
110
|
-
|
|
111
|
-
new_query_params =
|
|
110
|
+
existing_query_params = uri.query.present? ? Hash[URI.decode_www_form(uri.query)] : {}
|
|
111
|
+
new_query_params = existing_query_params.merge("step-by-step-nav" => step_nav_content_id)
|
|
112
112
|
uri.query = new_query_params.to_query
|
|
113
113
|
uri.to_s
|
|
114
114
|
end
|