govuk_publishing_components 34.12.0 → 34.14.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/config/govuk_publishing_components_manifest.js +75 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-auto-tracker.js +4 -1
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-core.js +31 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-event-tracker.js +1 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-link-tracker.js +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/_individual_component_support.scss +10 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_action-link.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_back-link.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_big-number.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_breadcrumbs.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_cards.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_character-count.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_checkboxes.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-guidance.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_cookie-banner.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_date-input.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_details.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_devolved-nations.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_emergency-banner.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_error-alert.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_error-message.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_error-summary.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_fieldset.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_file-upload.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_govspeak-html-publication.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_govspeak.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_heading.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_hint.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_inset-text.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_intervention.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_inverse-header.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_label.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-for-public.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_lead-paragraph.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_modal-dialogue.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_notice.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_organisation-logo.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_panel.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_phase-banner.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_print-link.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_radio.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_reorderable-list.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_select.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_show-password.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_signup-link.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_single-page-notification-button.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_skip-link.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_success-alert.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_summary-list.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_table.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_tabs.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_textarea.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_title.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_translation-nav.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_warning-text.scss +1 -0
- data/app/views/govuk_publishing_components/components/_accordion.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_action_link.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_attachment.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_attachment_link.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_back_link.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_big_number.html.erb +3 -1
- data/app/views/govuk_publishing_components/components/_breadcrumbs.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_button.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_cards.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_character_count.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_checkboxes.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_contents_list.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_contextual_breadcrumbs.html.erb +7 -4
- data/app/views/govuk_publishing_components/components/_contextual_guidance.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +5 -2
- data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_date_input.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_details.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_devolved_nations.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_document_list.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_emergency_banner.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_error_alert.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_error_message.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_error_summary.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_feedback.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_fieldset.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_file_upload.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_govspeak.html.erb +1 -0
- data/app/views/govuk_publishing_components/components/_govspeak_html_publication.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_heading.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_hint.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_image_card.html.erb +5 -3
- data/app/views/govuk_publishing_components/components/_input.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_inset_text.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_intervention.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_inverse_header.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_label.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_layout_for_admin.html.erb +5 -1
- data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_layout_header.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_lead_paragraph.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_metadata.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_modal_dialogue.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_notice.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_organisation_logo.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_panel.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_phase_banner.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb +6 -1
- data/app/views/govuk_publishing_components/components/_print_link.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_radio.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_related_navigation.html.erb +4 -0
- data/app/views/govuk_publishing_components/components/_reorderable_list.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_search.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_select.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_share_links.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_show_password.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_signup_link.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_single_page_notification_button.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_skip_link.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_step_by_step_nav.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb +12 -2
- data/app/views/govuk_publishing_components/components/_step_by_step_nav_related.html.erb +21 -8
- data/app/views/govuk_publishing_components/components/_subscription_links.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_success_alert.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_summary_list.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_table.html.erb +3 -1
- data/app/views/govuk_publishing_components/components/_tabs.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_textarea.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_title.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_translation_nav.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_warning_text.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/docs/contextual_breadcrumbs.yml +13 -0
- data/app/views/govuk_publishing_components/components/docs/contextual_sidebar.yml +11 -0
- data/app/views/govuk_publishing_components/components/docs/step_by_step_nav_header.yml +6 -0
- data/app/views/govuk_publishing_components/components/docs/step_by_step_nav_related.yml +10 -0
- data/lib/govuk_publishing_components/app_helpers/asset_helper.rb +86 -0
- data/lib/govuk_publishing_components/config.rb +3 -0
- data/lib/govuk_publishing_components/presenters/breadcrumb_selector.rb +3 -2
- data/lib/govuk_publishing_components/presenters/breadcrumbs.rb +3 -1
- data/lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb +2 -1
- data/lib/govuk_publishing_components/presenters/related_navigation_helper.rb +1 -1
- data/lib/govuk_publishing_components/railtie.rb +7 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/lib/govuk_publishing_components.rb +3 -0
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c4137db9fa2f61ba41157832c2d8a959756eb36e11837e4d58654b264d68a3f0
|
|
4
|
+
data.tar.gz: a3eb50516bf440839af9b74e1fc5ab44e9fc21ee0afb7910cdb742d10a6d3182
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3e780d3b9f9f2e72c471767c7be3bb611bae0eb7f2b211e19ae85b6fdae4338ae20d346c53b72c6d1b1d0e3d06447084eb389aeb64960df48b68d60bdaa4ed7e
|
|
7
|
+
data.tar.gz: 7cfd8703805c415ffad093fd18dc104d6d41c7e51305673c178b90778eb52bf3037b52ea2550cdb42c0ba4291d6e53c95c577800f2b8fe398ee503c1a3910b76
|
|
@@ -12,3 +12,78 @@
|
|
|
12
12
|
//= link govuk_publishing_components/vendor/lux/lux-reporter.js
|
|
13
13
|
//= link govuk_publishing_components/vendor/lux/lux-measurer.js
|
|
14
14
|
//= link component_guide/application.css
|
|
15
|
+
|
|
16
|
+
// components
|
|
17
|
+
//= link govuk_publishing_components/components/_accordion.css
|
|
18
|
+
//= link govuk_publishing_components/components/_action-link.css
|
|
19
|
+
//= link govuk_publishing_components/components/_attachment.css
|
|
20
|
+
//= link govuk_publishing_components/components/_attachment-link.css
|
|
21
|
+
//= link govuk_publishing_components/components/_back-link.css
|
|
22
|
+
//= link govuk_publishing_components/components/_big-number.css
|
|
23
|
+
//= link govuk_publishing_components/components/_breadcrumbs.css
|
|
24
|
+
//= link govuk_publishing_components/components/_button.css
|
|
25
|
+
//= link govuk_publishing_components/components/_cards.css
|
|
26
|
+
//= link govuk_publishing_components/components/_character-count.css
|
|
27
|
+
//= link govuk_publishing_components/components/_checkboxes.css
|
|
28
|
+
//= link govuk_publishing_components/components/_contents-list.css
|
|
29
|
+
//= link govuk_publishing_components/components/_contextual-guidance.css
|
|
30
|
+
//= link govuk_publishing_components/components/_contextual-sidebar.css
|
|
31
|
+
//= link govuk_publishing_components/components/_cookie-banner.css
|
|
32
|
+
//= link govuk_publishing_components/components/_copy-to-clipboard.css
|
|
33
|
+
//= link govuk_publishing_components/components/_date-input.css
|
|
34
|
+
//= link govuk_publishing_components/components/_details.css
|
|
35
|
+
//= link govuk_publishing_components/components/_devolved-nations.css
|
|
36
|
+
//= link govuk_publishing_components/components/_document-list.css
|
|
37
|
+
//= link govuk_publishing_components/components/_emergency-banner.css
|
|
38
|
+
//= link govuk_publishing_components/components/_error-alert.css
|
|
39
|
+
//= link govuk_publishing_components/components/_error-message.css
|
|
40
|
+
//= link govuk_publishing_components/components/_error-summary.css
|
|
41
|
+
//= link govuk_publishing_components/components/_feedback.css
|
|
42
|
+
//= link govuk_publishing_components/components/_fieldset.css
|
|
43
|
+
//= link govuk_publishing_components/components/_file-upload.css
|
|
44
|
+
//= link govuk_publishing_components/components/_govspeak-html-publication.css
|
|
45
|
+
//= link govuk_publishing_components/components/_govspeak.css
|
|
46
|
+
//= link govuk_publishing_components/components/_heading.css
|
|
47
|
+
//= link govuk_publishing_components/components/_hint.css
|
|
48
|
+
//= link govuk_publishing_components/components/_image-card.css
|
|
49
|
+
//= link govuk_publishing_components/components/_input.css
|
|
50
|
+
//= link govuk_publishing_components/components/_inset-text.css
|
|
51
|
+
//= link govuk_publishing_components/components/_intervention.css
|
|
52
|
+
//= link govuk_publishing_components/components/_inverse-header.css
|
|
53
|
+
//= link govuk_publishing_components/components/_label.css
|
|
54
|
+
//= link govuk_publishing_components/components/_layout-footer.css
|
|
55
|
+
//= link govuk_publishing_components/components/_layout-for-admin.css
|
|
56
|
+
//= link govuk_publishing_components/components/_layout-for-public.css
|
|
57
|
+
//= link govuk_publishing_components/components/_layout-header.css
|
|
58
|
+
//= link govuk_publishing_components/components/_layout-super-navigation-header.css
|
|
59
|
+
//= link govuk_publishing_components/components/_lead-paragraph.css
|
|
60
|
+
//= link govuk_publishing_components/components/_metadata.css
|
|
61
|
+
//= link govuk_publishing_components/components/_modal-dialogue.css
|
|
62
|
+
//= link govuk_publishing_components/components/_notice.css
|
|
63
|
+
//= link govuk_publishing_components/components/_organisation-logo.css
|
|
64
|
+
//= link govuk_publishing_components/components/_panel.css
|
|
65
|
+
//= link govuk_publishing_components/components/_phase-banner.css
|
|
66
|
+
//= link govuk_publishing_components/components/_previous-and-next-navigation.css
|
|
67
|
+
//= link govuk_publishing_components/components/_print-link.css
|
|
68
|
+
//= link govuk_publishing_components/components/_radio.css
|
|
69
|
+
//= link govuk_publishing_components/components/_related-navigation.css
|
|
70
|
+
//= link govuk_publishing_components/components/_reorderable-list.css
|
|
71
|
+
//= link govuk_publishing_components/components/_search.css
|
|
72
|
+
//= link govuk_publishing_components/components/_select.css
|
|
73
|
+
//= link govuk_publishing_components/components/_share-links.css
|
|
74
|
+
//= link govuk_publishing_components/components/_show-password.css
|
|
75
|
+
//= link govuk_publishing_components/components/_signup-link.css
|
|
76
|
+
//= link govuk_publishing_components/components/_single-page-notification-button.css
|
|
77
|
+
//= link govuk_publishing_components/components/_skip-link.css
|
|
78
|
+
//= link govuk_publishing_components/components/_step-by-step-nav-header.css
|
|
79
|
+
//= link govuk_publishing_components/components/_step-by-step-nav-related.css
|
|
80
|
+
//= link govuk_publishing_components/components/_step-by-step-nav.css
|
|
81
|
+
//= link govuk_publishing_components/components/_subscription-links.css
|
|
82
|
+
//= link govuk_publishing_components/components/_success-alert.css
|
|
83
|
+
//= link govuk_publishing_components/components/_summary-list.css
|
|
84
|
+
//= link govuk_publishing_components/components/_tabs.css
|
|
85
|
+
//= link govuk_publishing_components/components/_table.css
|
|
86
|
+
//= link govuk_publishing_components/components/_textarea.css
|
|
87
|
+
//= link govuk_publishing_components/components/_title.css
|
|
88
|
+
//= link govuk_publishing_components/components/_translation-nav.css
|
|
89
|
+
//= link govuk_publishing_components/components/_warning-text.css
|
|
@@ -28,13 +28,16 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
|
28
28
|
if (window.dataLayer) {
|
|
29
29
|
try {
|
|
30
30
|
var data = this.module.getAttribute(this.trackingTrigger)
|
|
31
|
-
data = JSON.parse(data)
|
|
31
|
+
data = JSON.parse(data) || {}
|
|
32
32
|
} catch (e) {
|
|
33
33
|
// if there's a problem with the config, don't start the tracker
|
|
34
34
|
console.error('GA4 configuration error: ' + e.message, window.location)
|
|
35
35
|
return
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
if (data.index) {
|
|
39
|
+
data.index = window.GOVUK.analyticsGa4.core.trackFunctions.createIndexObject(data.index)
|
|
40
|
+
}
|
|
38
41
|
var schemas = new window.GOVUK.analyticsGa4.Schemas()
|
|
39
42
|
var schema = schemas.mergeProperties(data, 'event_data')
|
|
40
43
|
|
|
@@ -237,6 +237,37 @@ window.GOVUK.analyticsGa4 = window.GOVUK.analyticsGa4 || {};
|
|
|
237
237
|
var ga4LinkData = JSON.parse(module.getAttribute('data-ga4-link'))
|
|
238
238
|
ga4LinkData.index_total = totalLinks
|
|
239
239
|
module.setAttribute('data-ga4-link', JSON.stringify(ga4LinkData))
|
|
240
|
+
},
|
|
241
|
+
|
|
242
|
+
// index is given as a string of the form 1.2.3 or 1.2
|
|
243
|
+
// split this into named sub-parameters
|
|
244
|
+
createIndexObject: function (index) {
|
|
245
|
+
if (typeof index === 'undefined') {
|
|
246
|
+
return undefined
|
|
247
|
+
}
|
|
248
|
+
if (typeof index === 'object') {
|
|
249
|
+
return index
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
index = index.toString().split('.')
|
|
253
|
+
// this will soon include 'index_section_count'
|
|
254
|
+
// number of sections overall in the thing being tracked (but not yet in use)
|
|
255
|
+
switch (index.length) {
|
|
256
|
+
case 1:
|
|
257
|
+
return {
|
|
258
|
+
index_section: parseInt(index[0])
|
|
259
|
+
}
|
|
260
|
+
case 2:
|
|
261
|
+
return {
|
|
262
|
+
index_section: parseInt(index[0]),
|
|
263
|
+
index_link: parseInt(index[1])
|
|
264
|
+
}
|
|
265
|
+
case 3:
|
|
266
|
+
return {
|
|
267
|
+
index_section: parseInt(index[1]),
|
|
268
|
+
index_link: parseInt(index[2])
|
|
269
|
+
}
|
|
270
|
+
}
|
|
240
271
|
}
|
|
241
272
|
},
|
|
242
273
|
|
|
@@ -42,6 +42,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
|
42
42
|
|
|
43
43
|
var text = data.text || event.target.textContent
|
|
44
44
|
data.text = window.GOVUK.analyticsGa4.core.trackFunctions.removeLinesAndExtraSpaces(text)
|
|
45
|
+
data.index = window.GOVUK.analyticsGa4.core.trackFunctions.createIndexObject(data.index)
|
|
45
46
|
|
|
46
47
|
var schemas = new window.GOVUK.analyticsGa4.Schemas()
|
|
47
48
|
var schema = schemas.mergeProperties(data, 'event_data')
|
|
@@ -87,6 +87,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
|
87
87
|
data.method = window.GOVUK.analyticsGa4.core.trackFunctions.getClickType(event)
|
|
88
88
|
data.external = window.GOVUK.analyticsGa4.core.trackFunctions.isExternalLink(data.url) ? 'true' : 'false'
|
|
89
89
|
data.index = event.target.getAttribute('data-ga4-index') ? parseInt(event.target.getAttribute('data-ga4-index')) : data.index || undefined
|
|
90
|
+
data.index = window.GOVUK.analyticsGa4.core.trackFunctions.createIndexObject(data.index)
|
|
90
91
|
|
|
91
92
|
var schemas = new window.GOVUK.analyticsGa4.Schemas()
|
|
92
93
|
var schema = schemas.mergeProperties(data, 'event_data')
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
$govuk-new-link-styles: true;
|
|
2
|
+
|
|
3
|
+
// This flag stops the font from being included in this components's
|
|
4
|
+
// stylesheet - the font is being served by Static across all of GOV.UK, so is
|
|
5
|
+
// not needed here.
|
|
6
|
+
$govuk-include-default-font-face: false;
|
|
7
|
+
|
|
8
|
+
// Each component needs access to the variables, functions, and mixins from
|
|
9
|
+
// GOVUK Frontend.
|
|
10
|
+
@import "govuk_frontend_support";
|