govuk_publishing_components 24.15.0 → 24.15.1

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: 729df29e097df884f79f01722e225592d37037055e6f13780b769dd7e34d5e85
4
- data.tar.gz: 2db0c1350634a48d1e12cc03c8c932b1a2832596b363a04fd7383ddc9c55b400
3
+ metadata.gz: c6904321e51846b4273128559fa2ae25c311eda4750e0bcff5c093a43dac9fb5
4
+ data.tar.gz: 489b5e4af1f5487de4694cc80335b48aaa61479e76ae1f3669de4403672752dc
5
5
  SHA512:
6
- metadata.gz: 9596ad426b063115f7b73752c3779f9cbbedd4d51d53a73a61ece55be54213fedba844ae969ff4b614b12e8bbbcc778b7e34325020566422903d4c0a99f6222b
7
- data.tar.gz: 5d595b291c1e8f9afc478369f29f84a9d5d373c3fa0757e61bd738aa7b4fd633e6ce44c96e6802653e049039fe0f925c7f02b3585ee16c523c5f12818f5659d5
6
+ metadata.gz: cb398f43c5ccaf87dcd6f2dfb4d82918eb7f65c16af20964ae7240c2a8355c63fb22df8e54969fe8adb1f546978c261b8d4ec5c426a8284a06612082801a7adb
7
+ data.tar.gz: ea37f75dcaf0250704d32daa1f4f110e47623f0f60b6f8a743b153ac6cef9520fcf6200c752d092dba1e10a5fb79d16e024518ce1ce0949e1f1f488f2141e21f
@@ -47,3 +47,23 @@
47
47
  }
48
48
  }
49
49
  }).call(this)
50
+
51
+ ;(function () {
52
+ var $menuToggleButtons = document.querySelectorAll('.govuk-js-header-toggle')
53
+
54
+ for (var j = 0; j < $menuToggleButtons.length; j++) {
55
+ var element = $menuToggleButtons[j]
56
+
57
+ element.addEventListener('click', function (event) {
58
+ var expanded = event.target.getAttribute('aria-expanded')
59
+
60
+ if (window.GOVUK.analytics && window.GOVUK.analytics.trackEvent) {
61
+ if (expanded === 'true') {
62
+ window.GOVUK.analytics.trackEvent('headerClicked', 'menuClosed', { label: 'none' })
63
+ } else {
64
+ window.GOVUK.analytics.trackEvent('headerClicked', 'menuOpened', { label: 'none' })
65
+ }
66
+ }
67
+ })
68
+ }
69
+ })()
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "24.15.0".freeze
2
+ VERSION = "24.15.1".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: 24.15.0
4
+ version: 24.15.1
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: 2021-06-17 00:00:00.000000000 Z
11
+ date: 2021-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config