govuk_publishing_components 21.53.0 → 21.54.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb +28 -8
- data/app/views/govuk_publishing_components/components/docs/step_by_step_nav_header.yml +23 -0
- data/lib/govuk_publishing_components/presenters/breadcrumb_selector.rb +4 -2
- data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_priority.rb +8 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/axe-core/CHANGELOG.md +6 -0
- data/node_modules/axe-core/axe.js +19 -3
- data/node_modules/axe-core/axe.min.js +2 -2
- data/node_modules/axe-core/bower.json +1 -1
- data/node_modules/axe-core/lib/commons/dom/get-element-stack.js +27 -1
- data/node_modules/axe-core/package.json +21 -21
- 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: f56d2e2736866df3cdbc9707a0add0da3bf84b188b3f4fdfeb1f1c7b522e5585
|
4
|
+
data.tar.gz: 6a03e5093606f297e742415fa87adad884d4529d15ad91296ba7651934415b1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c463802fc7d7cf753bcae4d7501547af06be56fe0b1104587399834b439102da473a8b484d48b2e9a6d4c7baeed71ecf168118e30076ec9cc26f24fa51251b9
|
7
|
+
data.tar.gz: ff4eaaa5ffd4e7b8e9fd071ac61b6aec2e0b316b17c3352372e44cba06fb58f740602bb6e0e56bbe031f6c21a80ff1db302ef0911abc130810904355d7698e0f
|
@@ -1,29 +1,49 @@
|
|
1
1
|
<%
|
2
2
|
title ||= false
|
3
3
|
path ||= false
|
4
|
-
tracking_id ||= false
|
5
4
|
breadcrumbs = [
|
6
5
|
{ title: "Home", url: "/" },
|
7
6
|
{ title: title, url: path }
|
8
7
|
]
|
9
8
|
breadcrumb_presenter = GovukPublishingComponents::Presenters::Breadcrumbs.new(breadcrumbs)
|
9
|
+
|
10
|
+
tracking_id ||= false
|
11
|
+
tracking_category ||= "stepNavHeaderClicked"
|
12
|
+
tracking_action ||= "top"
|
13
|
+
tracking_label ||= path
|
14
|
+
tracking_dimension_enabled = tracking_dimension_enabled != false
|
15
|
+
tracking_dimension ||= title
|
16
|
+
tracking_dimension_index ||= 29
|
17
|
+
|
18
|
+
if tracking_id
|
19
|
+
tracking_options ||= ({ dimension96: tracking_id }).to_json
|
20
|
+
end
|
21
|
+
|
22
|
+
local_assigns[:margin_bottom] ||= 0
|
23
|
+
shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
|
24
|
+
classes = "gem-c-step-nav-header #{shared_helper.get_margin_bottom}"
|
10
25
|
%>
|
11
26
|
<% if title %>
|
12
27
|
<script type="application/ld+json">
|
13
28
|
<%= raw breadcrumb_presenter.structured_data.to_json %>
|
14
29
|
</script>
|
15
30
|
|
16
|
-
<div class="
|
31
|
+
<div class="<%= classes %>" data-module="track-click">
|
17
32
|
<span class="gem-c-step-nav-header__part-of">Part of</span>
|
18
33
|
<% if path %>
|
19
34
|
<a href="<%= path %>"
|
20
35
|
class="gem-c-step-nav-header__title"
|
21
|
-
data-track-category="
|
22
|
-
data-track-action="
|
23
|
-
data-track-label="<%=
|
24
|
-
|
25
|
-
|
26
|
-
|
36
|
+
data-track-category="<%= tracking_category %>"
|
37
|
+
data-track-action="<%= tracking_action %>"
|
38
|
+
data-track-label="<%= tracking_label %>"
|
39
|
+
<% if tracking_dimension_enabled %>
|
40
|
+
data-track-dimension="<%= tracking_dimension %>"
|
41
|
+
data-track-dimension-index="<%= tracking_dimension_index %>"
|
42
|
+
<% end %>
|
43
|
+
<% if tracking_id %>
|
44
|
+
data-track-options='<%= tracking_options %>'
|
45
|
+
<% end %>
|
46
|
+
>
|
27
47
|
<%= title %>
|
28
48
|
</a>
|
29
49
|
<% else %>
|
@@ -20,9 +20,32 @@ examples:
|
|
20
20
|
data:
|
21
21
|
title: 'Coronavirus: businesses and self-employed people'
|
22
22
|
path: /childcare-parenting/pregnancy-and-birth
|
23
|
+
with_margin_bottom:
|
24
|
+
description: |
|
25
|
+
The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having a margin bottom of 30px.
|
26
|
+
data:
|
27
|
+
title: 'Learn to practice flexible spacing: step by step'
|
28
|
+
margin_bottom: 9
|
23
29
|
with_unique_tracking:
|
24
30
|
description: In order to identify the step by step navigation the component is part of, we need to track a unique ID of the navigation in Google Analytics. This ID should be the same across all pages that are linked from and are part of that navigation. Its value is included in any tracking events, specifically in dimension96. It refers to the ID of the step nav that the component links to.
|
25
31
|
data:
|
26
32
|
title: 'With a tracking id'
|
27
33
|
path: '#'
|
28
34
|
tracking_id: 'this-is-the-tracking-id'
|
35
|
+
with_custom_tracking:
|
36
|
+
data:
|
37
|
+
title: 'With a custom tracking'
|
38
|
+
path: '#'
|
39
|
+
tracking_category: "customTrackingCategoryClicked"
|
40
|
+
tracking_action: "customTrackingAction"
|
41
|
+
tracking_label: "customTrackingLabel"
|
42
|
+
tracking_dimension: "customTrackingDimension"
|
43
|
+
tracking_dimension_index: "23"
|
44
|
+
without_custom_dimension:
|
45
|
+
data:
|
46
|
+
title: 'Without custom dimensions'
|
47
|
+
path: '#'
|
48
|
+
tracking_category: "customTrackingCategoryClicked"
|
49
|
+
tracking_action: "customTrackingAction"
|
50
|
+
tracking_label: "customTrackingLabel"
|
51
|
+
tracking_dimension_enabled: false
|
@@ -49,9 +49,11 @@ module GovukPublishingComponents
|
|
49
49
|
return content_item_options unless content_item_navigation.html_document_with_parent?
|
50
50
|
return parent_item_options if parent_item_navigation.priority_breadcrumbs
|
51
51
|
|
52
|
+
step_by_step_header = parent_item_options[:step_by_step]
|
53
|
+
|
52
54
|
{
|
53
|
-
step_by_step:
|
54
|
-
breadcrumbs: parent_breadcrumbs,
|
55
|
+
step_by_step: step_by_step_header,
|
56
|
+
breadcrumbs: step_by_step_header ? parent_breadcrumbs.first : parent_breadcrumbs,
|
55
57
|
}
|
56
58
|
end
|
57
59
|
|
@@ -25,7 +25,14 @@ module GovukPublishingComponents
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def breadcrumbs
|
28
|
-
taxon && {
|
28
|
+
taxon && {
|
29
|
+
title: taxon["title"],
|
30
|
+
path: taxon["base_path"],
|
31
|
+
tracking_category: "breadcrumbClicked",
|
32
|
+
tracking_action: "superBreadcrumb",
|
33
|
+
tracking_label: content_item["base_path"],
|
34
|
+
tracking_dimension_enabled: false,
|
35
|
+
}
|
29
36
|
end
|
30
37
|
|
31
38
|
private
|
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
4
4
|
|
5
|
+
### [3.5.4](https://github.com/dequelabs/axe-core/compare/v3.5.3...v3.5.4) (2020-05-22)
|
6
|
+
|
7
|
+
### Bug Fixes
|
8
|
+
|
9
|
+
- **get-element-stack:** properly calculate position of children of floated elements ([28a8c58](https://github.com/dequelabs/axe-core/commit/28a8c58b409461600da07eac164e5b0ca4744502))
|
10
|
+
|
5
11
|
### [3.5.3](https://github.com/dequelabs/axe-core/compare/v3.5.2...v3.5.3) (2020-03-31)
|
6
12
|
|
7
13
|
### Bug Fixes
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! axe v3.5.
|
1
|
+
/*! axe v3.5.4
|
2
2
|
* Copyright (c) 2020 Deque Systems, Inc.
|
3
3
|
*
|
4
4
|
* Your use of this Source Code Form is subject to the terms of the Mozilla Public
|
@@ -27,7 +27,7 @@
|
|
27
27
|
return _typeof(obj);
|
28
28
|
}
|
29
29
|
var axe = axe || {};
|
30
|
-
axe.version = '3.5.
|
30
|
+
axe.version = '3.5.4';
|
31
31
|
if (typeof define === 'function' && define.amd) {
|
32
32
|
define('axe-core', [], function() {
|
33
33
|
'use strict';
|
@@ -21533,12 +21533,28 @@
|
|
21533
21533
|
}
|
21534
21534
|
return false;
|
21535
21535
|
}
|
21536
|
+
function isFloated(vNode) {
|
21537
|
+
if (!vNode) {
|
21538
|
+
return false;
|
21539
|
+
}
|
21540
|
+
if (vNode._isFloated !== undefined) {
|
21541
|
+
return vNode._isFloated;
|
21542
|
+
}
|
21543
|
+
var floatStyle = vNode.getComputedStylePropertyValue('float');
|
21544
|
+
if (floatStyle !== 'none') {
|
21545
|
+
vNode._isFloated = true;
|
21546
|
+
return true;
|
21547
|
+
}
|
21548
|
+
var floated = isFloated(vNode.parent);
|
21549
|
+
vNode._isFloated = floated;
|
21550
|
+
return floated;
|
21551
|
+
}
|
21536
21552
|
function getPositionOrder(vNode) {
|
21537
21553
|
if (vNode.getComputedStylePropertyValue('position') === 'static') {
|
21538
21554
|
if (vNode.getComputedStylePropertyValue('display').indexOf('inline') !== -1) {
|
21539
21555
|
return 2;
|
21540
21556
|
}
|
21541
|
-
if (vNode
|
21557
|
+
if (isFloated(vNode)) {
|
21542
21558
|
return 1;
|
21543
21559
|
}
|
21544
21560
|
return 0;
|