govuk_publishing_components 35.4.0 → 35.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6777fd07172bb10deb9d4087b7f6b94bcb82bd663cd2564c255ac045505d5fbf
4
- data.tar.gz: 810d01deb18dbc67502d07d713235aa85f1c957a986fd3f2d1eb52c12aeade34
3
+ metadata.gz: 83d143fc56ad285e250659a050cb73b185176316d43f40293199ea6cc673c120
4
+ data.tar.gz: b8b9d0b29c550c0abc91be533b38cf3c9b62bd42039c1d31d66ec06883ba9be1
5
5
  SHA512:
6
- metadata.gz: 7e5c31dd4a6e7e0a0ab01ba19c522a78ea71a734fc194c233d7f3a54d3085cc73280511674d6105b7c398357273ba14434d7eaced2caa852c6f731a2a10dd364
7
- data.tar.gz: 8d20c9fbf569404e1ce5fdda22509982efd598cdfaba95382f615715e7144f2eeb461b3cc9385eaaabe35c73e89cd95130589fe2c1d5a52e1f710fd0f64442f6
6
+ metadata.gz: 0ebadf89e85215996356032d2f1f1d8e9faaec6287048c61a729da84a28e29dee5f509f6ece7db95341f0ca8e19815172d6d4898a6a624329525c5b36713fefc
7
+ data.tar.gz: 1a13f99b6d61d29e6e1c7c62d89dce9b8b2ee7dbfd5f026e6f0d80502ccd8d90180c990d6f86525c97ccb0816083ea22facfdf84e582e0f8c0765da5e153d732
@@ -43,7 +43,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
43
43
 
44
44
  var formInputs = this.getFormInputs()
45
45
  var formData = this.getInputValues(formInputs)
46
- data.text = this.combineGivenAnswers(formData) || 'No answer given'
46
+ data.text = data.text || (this.combineGivenAnswers(formData) || 'No answer given')
47
47
 
48
48
  var schemas = new window.GOVUK.analyticsGa4.Schemas()
49
49
  var schema = schemas.mergeProperties(data, 'event_data')
@@ -82,6 +82,9 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
82
82
  var text = data.text || event.target.textContent
83
83
  data.text = window.GOVUK.analyticsGa4.core.trackFunctions.removeLinesAndExtraSpaces(text)
84
84
  data.text = this.PIIRemover.stripPIIWithOverride(data.text, true, true)
85
+ if (!data.text && (element.querySelector('img') || element.querySelector('svg'))) {
86
+ data.text = 'image'
87
+ }
85
88
  var url = data.url || this.findLink(event.target).getAttribute('href')
86
89
  data.url = window.GOVUK.analyticsGa4.core.trackFunctions.removeCrossDomainParams(this.PIIRemover.stripPIIWithOverride(url, true, true))
87
90
  data.link_domain = window.GOVUK.analyticsGa4.core.trackFunctions.populateLinkDomain(data.url)
@@ -77,6 +77,9 @@ window.GOVUK.analyticsGa4.analyticsModules = window.GOVUK.analyticsGa4.analytics
77
77
 
78
78
  data.text = window.GOVUK.analyticsGa4.core.trackFunctions.removeLinesAndExtraSpaces(element.textContent)
79
79
  data.text = mailToLink ? data.text : this.PIIRemover.stripPIIWithOverride(data.text, true, true)
80
+ if (!data.text && (element.querySelector('img') || element.querySelector('svg'))) {
81
+ data.text = 'image'
82
+ }
80
83
  data.method = window.GOVUK.analyticsGa4.core.trackFunctions.getClickType(event)
81
84
 
82
85
  var schemas = new window.GOVUK.analyticsGa4.Schemas()
@@ -52,8 +52,8 @@
52
52
  'socialTarget': link[:href]
53
53
  }
54
54
  ga4_link_data = {
55
- 'event_name': 'share',
56
- 'type': 'share this page',
55
+ 'event_name': 'navigation',
56
+ 'type': 'share page',
57
57
  'index': {
58
58
  'index_link': index + 1,
59
59
  },
@@ -85,7 +85,8 @@
85
85
  "event_name": "navigation",
86
86
  "type": "step by step",
87
87
  "index": {
88
- "index_section": step_index + 1
88
+ "index_section": step_index + 1,
89
+ "index_section_count": steps.length
89
90
  },
90
91
  "section": step[:title]
91
92
  }.to_json
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "35.4.0".freeze
2
+ VERSION = "35.5.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.4.0
4
+ version: 35.5.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-05-18 00:00:00.000000000 Z
11
+ date: 2023-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config