govuk_publishing_components 29.1.0 → 29.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b8ea9dce00e2fc90b3a88d941fa237f4d276295be027676233cf31cbf904bec0
4
- data.tar.gz: c3ff5045ff3c0f0be4df536e1ea165c896d01e1b680c4f98f838bc213f4d3931
3
+ metadata.gz: 831296f6233744d3d669b023b5f8243ee118f51ce7b1ba3b8c5f510346b87b9c
4
+ data.tar.gz: 7d01de1a9e86110a92c486394cf5a1ee509ca3421037cac5b6281b5ecb209690
5
5
  SHA512:
6
- metadata.gz: 1fe533fa65e9d6d6e97e94d388e1176031f4bdf9eb896867b7f81ba56deb790fc630383060aab98f3e7f09f5f6b8547db2c27d19519631a97fbdd135f6314759
7
- data.tar.gz: 3c7659b2fd425a674de931fee53307329f12586aced6775dde5ae21b982661205a1eaab6aacbdf714bbd81e31e7f095184582bf25ca00b323d57410c45d790b4
6
+ metadata.gz: a0cf8c3cebef33691aab437ff16219573f6d7b0132b266cc28178ae8a06c8e3034ed04275611876cccff7e63418ab38bf7564e17cb1ba98bc2fa877b8743f32c
7
+ data.tar.gz: 86bb5adec0ebb031efc467ec4bc566f790a1e466fdd454edf4fdca1e94946db467d660d9413943146a720271f34ef97e35d0fda6801d0de01559b832111b73bb
@@ -3,7 +3,7 @@
3
3
 
4
4
  var GOVUK = global.GOVUK || {}
5
5
  // For usage and initialisation see:
6
- // https://github.com/alphagov/govuk_frontend_toolkit/blob/master/docs/analytics.md#create-an-analytics-tracker
6
+ // https://github.com/alphagov/govuk_publishing_components/blob/main/docs/analytics/analytics.md
7
7
 
8
8
  var Analytics = function (config) {
9
9
  this.pii = new GOVUK.Pii()
@@ -57,6 +57,7 @@
57
57
  'rendering-application': { dimension: 20 },
58
58
  'search-autocomplete-status': { dimension: 21 },
59
59
  'navigation-legacy': { dimension: 30, defaultValue: 'none' },
60
+ 'navigation-list-type': { dimension: 31, defaultValue: 'none' },
60
61
  'navigation-page-type': { dimension: 32, defaultValue: 'none' },
61
62
  'taxon-slug': { dimension: 56, defaultValue: 'other' },
62
63
  'taxon-id': { dimension: 57, defaultValue: 'other' },
@@ -13,6 +13,8 @@
13
13
  return document.querySelectorAll('[data-track-count="accordionSection"]').length
14
14
  case isDocumentCollectionPage():
15
15
  return document.querySelectorAll('.document-collection .group-title').length
16
+ case isNewBrowsePage():
17
+ return document.querySelectorAll('[data-track-count="cardList"]').length
16
18
  case isMainstreamBrowsePage():
17
19
  return countVisible(document.querySelectorAll('#subsection ul')) || document.querySelectorAll('#section ul').length || document.querySelectorAll('#root ul').length
18
20
  case isTopicPage():
@@ -44,6 +46,8 @@
44
46
  return document.querySelectorAll('a[data-track-category="navAccordionLinkClicked"]').length
45
47
  case isDocumentCollectionPage():
46
48
  return document.querySelectorAll('.document-collection .group-document-list li a').length
49
+ case isNewBrowsePage():
50
+ return document.querySelectorAll('[data-track-count="cardLink"]').length
47
51
  case isMainstreamBrowsePage():
48
52
  return countVisible(document.querySelectorAll('#subsection ul a')) || document.querySelectorAll('#section ul a').length || document.querySelectorAll('#root ul a').length
49
53
  case isTopicPage():
@@ -67,6 +71,7 @@
67
71
  var metaApplicationSelector = 'meta[name="govuk:rendering-application"]'
68
72
  var metaFormatSelector = 'meta[name="govuk:format"]'
69
73
  var metaNavigationTypeSelector = 'meta[name="govuk:navigation-page-type"]'
74
+ var metaSectionSelector = 'meta[name="govuk:section"]'
70
75
 
71
76
  function getMetaAttribute (selector) {
72
77
  var element = document.querySelector(selector)
@@ -93,6 +98,12 @@
93
98
  getMetaAttribute(metaNavigationTypeSelector) === 'leaf'
94
99
  }
95
100
 
101
+ function isNewBrowsePage () {
102
+ return getMetaAttribute(metaApplicationSelector) === 'collections' &&
103
+ getMetaAttribute(metaSectionSelector) === 'new_browse_page' &&
104
+ getMetaAttribute(metaFormatSelector) === 'mainstream_browse_page'
105
+ }
106
+
96
107
  function isMainstreamBrowsePage () {
97
108
  return getMetaAttribute(metaApplicationSelector) === 'collections' &&
98
109
  getMetaAttribute(metaFormatSelector) === 'mainstream_browse_page'
@@ -13,6 +13,9 @@ window.GOVUK.Modules.GovukAccordion = window.GOVUKFrontend.Accordion;
13
13
  this.sectionClassExpanded = 'govuk-accordion__section--expanded'
14
14
  this.sectionHeaderClass = 'govuk-accordion__section-header'
15
15
  this.sectionInnerContent = 'govuk-accordion__section-content'
16
+ this.showAllControls = 'govuk-accordion__show-all'
17
+ this.sectionButton = 'govuk-accordion__section-button'
18
+ this.headingText = 'govuk-accordion__section-heading-text'
16
19
 
17
20
  // Translated component content and language attribute pulled from data attributes
18
21
  this.$module.actions = {}
@@ -27,12 +30,21 @@ window.GOVUK.Modules.GovukAccordion = window.GOVUKFrontend.Accordion;
27
30
  GemAccordion.prototype.init = function () {
28
31
  // Indicate that JavaScript has worked
29
32
  this.$module.classList.add('gem-c-accordion--active')
33
+ this.$module.querySelector('.' + this.showAllControls).classList.add('gem-c-accordion__show-all')
30
34
 
31
35
  // Feature flag for anchor tag navigation used on manuals
32
36
  if (this.$module.getAttribute('data-anchor-navigation') === 'true') {
33
37
  this.openByAnchorOnLoad()
34
38
  this.addEventListenersForAnchors()
35
39
  }
40
+ // Feature flag for "Show all sections" GA click event tracking
41
+ if (this.$module.getAttribute('data-track-show-all-clicks') === 'true') {
42
+ this.addAccordionOpenAllTracking()
43
+ }
44
+ // Feature flag for each section GA click event tracking
45
+ if (this.$module.getAttribute('data-track-sections') === 'true') {
46
+ this.addEventListenerSections()
47
+ }
36
48
  }
37
49
 
38
50
  // Navigate to and open accordions with anchored content on page load if a hash is present
@@ -90,5 +102,38 @@ window.GOVUK.Modules.GovukAccordion = window.GOVUKFrontend.Accordion;
90
102
  }
91
103
  }
92
104
 
105
+ // To track the Accordion's "Show all sections" / "Hide all sections" button click events and pass them to the GA event tracking
106
+ GemAccordion.prototype.addAccordionOpenAllTracking = function () {
107
+ this.$module.querySelector('.' + this.showAllControls).addEventListener('click', function (event) {
108
+ var expanded = event.target.getAttribute('aria-expanded') === 'true'
109
+ var label = expanded ? 'Show all sections' : 'Hide all sections'
110
+ var action = expanded ? 'accordionOpened' : 'accordionClosed'
111
+ var options = { transport: 'beacon', label: label }
112
+ if (window.GOVUK.analytics && window.GOVUK.analytics.trackEvent) {
113
+ window.GOVUK.analytics.trackEvent('pageElementInteraction', action, options)
114
+ }
115
+ })
116
+ }
117
+
118
+ GemAccordion.prototype.addEventListenerSections = function () {
119
+ var sections = this.$module.querySelectorAll('.' + this.sectionButton)
120
+ nodeListForEach(sections, function (section) {
121
+ section.addEventListener('click', this.addAccordionSectionTracking.bind(this, section))
122
+ }.bind(this))
123
+ }
124
+
125
+ // If the Accordion's sections are opened on click, then pass them to the GA event tracking
126
+ GemAccordion.prototype.addAccordionSectionTracking = function (section) {
127
+ var expanded = section.getAttribute('aria-expanded') === 'false'
128
+ var label = section.querySelector('.' + this.headingText).textContent
129
+ var action = expanded ? 'accordionOpened' : 'accordionClosed'
130
+ var options = { transport: 'beacon', label: label }
131
+
132
+ if (window.GOVUK.analytics && window.GOVUK.analytics.trackEvent) {
133
+ window.GOVUK.analytics.trackEvent('pageElementInteraction', action, options)
134
+ console.log('pageElementInteraction', action, options)
135
+ }
136
+ }
137
+
93
138
  Modules.GemAccordion = GemAccordion
94
139
  })(window.GOVUK.Modules)
@@ -1,2 +1,7 @@
1
1
  @import "mixins/prefixed-transform";
2
2
  @import "govuk/components/accordion/accordion";
3
+
4
+ // Prevent elements inside the button from receiving click events
5
+ .gem-c-accordion__show-all > * {
6
+ pointer-events: none;
7
+ }
@@ -5,6 +5,8 @@
5
5
  id ||= "default-id-#{SecureRandom.hex(4)}"
6
6
  items ||= []
7
7
  anchor_navigation ||= false
8
+ track_show_all_clicks ||= false
9
+ track_sections ||= false
8
10
 
9
11
  accordion_classes = %w(gem-c-accordion govuk-accordion)
10
12
  accordion_classes << (shared_helper.get_margin_bottom)
@@ -22,6 +24,8 @@
22
24
  data_attributes ||= {}
23
25
  data_attributes[:module] = 'govuk-accordion gem-accordion'
24
26
  data_attributes[:anchor_navigation] = anchor_navigation
27
+ data_attributes[:track_show_all_clicks] = track_show_all_clicks
28
+ data_attributes[:track_sections] = track_sections
25
29
 
26
30
  translations.each do |key, translation|
27
31
  locales[key] = shared_helper.t_locale(translation)
@@ -18,8 +18,10 @@
18
18
  <%= heading %>
19
19
  <% end %>
20
20
  <% end %>
21
-
22
- <%= content_tag('ul', class: ul_classes) do %>
21
+ <%# data-track-count is used for analytics purposes in
22
+ https://github.com/alphagov/govuk_publishing_components/blob/main/app/assets/javascripts/govuk_publishing_components/analytics/page-content.js
23
+ %>
24
+ <%= content_tag('ul', class: ul_classes, "data-track-count": "cardList" ) do %>
23
25
  <%
24
26
  items.each do |item|
25
27
  link = item[:link]
@@ -33,7 +35,8 @@
33
35
  <%=
34
36
  link_to link[:text], link[:path],
35
37
  class: "govuk-link gem-c-cards__link",
36
- data: link[:data_attributes]
38
+ data: link[:data_attributes],
39
+ "data-track-count": "cardLink"
37
40
  %>
38
41
  <% end %>
39
42
  <% if item[:description] %>
@@ -6,9 +6,7 @@
6
6
  hide ||= false
7
7
  new_tab ||= false
8
8
 
9
-
10
9
  data_attributes ||= {}
11
- data_attributes[:module] = 'intervention'
12
10
  suggestion_data_attributes ||= {}
13
11
  dismiss_data_attributes ||= {}
14
12
 
@@ -309,3 +309,37 @@ examples:
309
309
  text: How people read
310
310
  content:
311
311
  html: <p class="govuk-body">This is the content for How people read.</p>
312
+ with_track_show_all_clicks:
313
+ description: |
314
+ To switch on Google Analytics for the "Show all sections" button on click, pass `track_show_all_clicks: true` the values passed on open will be
315
+ `Event Action: accordionOpened` `Event Category: pageElementInteraction` `Event Label: Show all sections`
316
+ data:
317
+ track_show_all_clicks: true
318
+ items:
319
+ - heading:
320
+ text: Writing well for the web
321
+ id: writing-well-for-the-web
322
+ content:
323
+ html: <p class="govuk-body">This is content for accordion 1 of 2</p><p class="govuk-body">This content contains a <a href="#anchor-nav-test" class="govuk-link">link</a></p>
324
+ - heading:
325
+ text: Writing well for specialists
326
+ content:
327
+ html: <p class="govuk-body" id="anchor-nav-test">This is content for accordion 2 of 2</p>
328
+ with_track_sections:
329
+ description: |
330
+ To switch on Google Analytics for each section, on click, pass `track_sections: true` the values passed on open will be
331
+ `Event Action: accordionOpened` / `accordionClosed` `Event Category: pageElementInteraction` and the `Event Label` being the heading text.
332
+
333
+ (`track_show_all_clicks: true` can be added to track the "Show all sections" button as well, if required)
334
+ data:
335
+ track_sections: true
336
+ items:
337
+ - heading:
338
+ text: Writing well for the web
339
+ id: writing-well-for-the-web
340
+ content:
341
+ html: <p class="govuk-body">This is content for accordion 1 of 2</p><p class="govuk-body">This content contains a <a href="#anchor-nav-test" class="govuk-link">link</a></p>
342
+ - heading:
343
+ text: Writing well for specialists
344
+ content:
345
+ html: <p class="govuk-body" id="anchor-nav-test">This is content for accordion 2 of 2</p>
@@ -177,8 +177,8 @@ en:
177
177
  navigation_search_heading: Search and popular pages
178
178
  navigation_search_subheading: Search
179
179
  popular_links:
180
- - label: 'Invasion of Ukraine'
181
- href: "/government/topical-events/russian-invasion-of-ukraine-uk-government-response"
180
+ - label: 'Moving to the UK from Ukraine'
181
+ href: "/guidance/move-to-the-uk-if-youre-from-ukraine"
182
182
  - label: 'Coronavirus (COVID-19)'
183
183
  href: "/coronavirus"
184
184
  - label: Find a job
@@ -5,8 +5,7 @@ module GovukPublishingComponents
5
5
  # rather than direct email for users to request accessible formats. When the pilot
6
6
  # scheme is rolled out further this can be removed.
7
7
  # Currently the HMRC are participating in the pilot.
8
- EMAILS_IN_ACCESSIBLE_FORMAT_REQUEST_PILOT = %w[govuk_publishing_components@example.com
9
- different.format@hmrc.gov.uk].freeze
8
+ EMAILS_IN_ACCESSIBLE_FORMAT_REQUEST_PILOT = %w[govuk_publishing_components@example.com].freeze
10
9
 
11
10
  delegate :opendocument?, :document?, :spreadsheet?, to: :content_type
12
11
 
@@ -1,6 +1,8 @@
1
1
  module GovukPublishingComponents
2
2
  module Presenters
3
3
  class MetaTags
4
+ FORMATS_THAT_MIGHT_INCLUDE_POSTCODES = %w[smart_answer finder local_transaction place special_route transaction].freeze
5
+
4
6
  attr_reader :content_item, :details, :links, :local_assigns, :request
5
7
 
6
8
  def initialize(content_item, local_assigns, request)
@@ -31,6 +33,7 @@ module GovukPublishingComponents
31
33
  meta_tags["govuk:schema-name"] = content_item[:schema_name] if content_item[:schema_name]
32
34
  meta_tags["govuk:content-id"] = content_item[:content_id] if content_item[:content_id]
33
35
  meta_tags["govuk:navigation-page-type"] = content_item[:navigation_page_type] if content_item[:navigation_page_type]
36
+ meta_tags["govuk:navigation-list-type"] = content_item[:navigation_list_type] if content_item[:navigation_list_type]
34
37
  meta_tags["govuk:section"] = content_item[:section] if content_item[:section]
35
38
  meta_tags["govuk:withdrawn"] = "withdrawn" if content_item[:withdrawn_notice].present?
36
39
  meta_tags["govuk:content-has-history"] = "true" if has_content_history?
@@ -148,8 +151,7 @@ module GovukPublishingComponents
148
151
  # document_type
149
152
  return local_assigns[:strip_postcode_pii] if local_assigns.key?(:strip_postcode_pii)
150
153
 
151
- formats_that_might_include_postcodes = %w[smart_answer finder]
152
- formats_that_might_include_postcodes.include?(content_item[:document_type])
154
+ FORMATS_THAT_MIGHT_INCLUDE_POSTCODES.include?(content_item[:document_type])
153
155
  end
154
156
  end
155
157
  end
@@ -2,40 +2,6 @@ module GovukPublishingComponents
2
2
  module Presenters
3
3
  class PublicLayoutHelper
4
4
  FOOTER_NAV = [
5
- {
6
- title: "Coronavirus (COVID-19)",
7
- columns: 2,
8
- items: [
9
- {
10
- href: "/coronavirus",
11
- text: "Coronavirus (COVID-19): guidance and support",
12
- attributes: {
13
- data: {
14
- track_category: "footerClicked",
15
- track_action: "coronavirusLinks",
16
- track_label: "Coronavirus (COVID-19): guidance and support",
17
- },
18
- },
19
- },
20
- ],
21
- },
22
- {
23
- title: "Brexit",
24
- columns: 1,
25
- items: [
26
- {
27
- href: "/brexit",
28
- text: "Check what you need to do",
29
- attributes: {
30
- data: {
31
- track_category: "footerClicked",
32
- track_action: "transitionLinks",
33
- track_label: "Check what you need to do",
34
- },
35
- },
36
- },
37
- ],
38
- },
39
5
  {
40
6
  title: "Services and information",
41
7
  columns: 2,
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "29.1.0".freeze
2
+ VERSION = "29.4.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: 29.1.0
4
+ version: 29.4.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: 2022-03-28 00:00:00.000000000 Z
11
+ date: 2022-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -112,30 +112,30 @@ dependencies:
112
112
  name: capybara
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: '3.25'
117
+ version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - "~>"
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: '3.25'
124
+ version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: faker
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - ">="
130
130
  - !ruby/object:Gem::Version
131
- version: '2.11'
131
+ version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
- version: '2.11'
138
+ version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: gds-api-adapters
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -154,30 +154,30 @@ dependencies:
154
154
  name: govuk_schemas
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - "~>"
157
+ - - ">="
158
158
  - !ruby/object:Gem::Version
159
- version: '4.0'
159
+ version: '0'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - "~>"
164
+ - - ">="
165
165
  - !ruby/object:Gem::Version
166
- version: '4.0'
166
+ version: '0'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: govuk_test
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - "~>"
171
+ - - ">="
172
172
  - !ruby/object:Gem::Version
173
- version: '3'
173
+ version: '0'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - "~>"
178
+ - - ">="
179
179
  - !ruby/object:Gem::Version
180
- version: '3'
180
+ version: '0'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: i18n-coverage
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -196,16 +196,16 @@ dependencies:
196
196
  name: percy-capybara
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - "~>"
199
+ - - ">="
200
200
  - !ruby/object:Gem::Version
201
- version: 5.0.0
201
+ version: '0'
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - "~>"
206
+ - - ">="
207
207
  - !ruby/object:Gem::Version
208
- version: 5.0.0
208
+ version: '0'
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: pry-byebug
211
211
  requirement: !ruby/object:Gem::Requirement
@@ -226,14 +226,14 @@ dependencies:
226
226
  requirements:
227
227
  - - ">="
228
228
  - !ruby/object:Gem::Version
229
- version: '1.5'
229
+ version: '0'
230
230
  type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
234
  - - ">="
235
235
  - !ruby/object:Gem::Version
236
- version: '1.5'
236
+ version: '0'
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: rake
239
239
  requirement: !ruby/object:Gem::Requirement
@@ -252,16 +252,16 @@ dependencies:
252
252
  name: rspec-rails
253
253
  requirement: !ruby/object:Gem::Requirement
254
254
  requirements:
255
- - - "~>"
255
+ - - ">="
256
256
  - !ruby/object:Gem::Version
257
- version: '5.0'
257
+ version: '0'
258
258
  type: :development
259
259
  prerelease: false
260
260
  version_requirements: !ruby/object:Gem::Requirement
261
261
  requirements:
262
- - - "~>"
262
+ - - ">="
263
263
  - !ruby/object:Gem::Version
264
- version: '5.0'
264
+ version: '0'
265
265
  - !ruby/object:Gem::Dependency
266
266
  name: rubocop-govuk
267
267
  requirement: !ruby/object:Gem::Requirement
@@ -280,44 +280,44 @@ dependencies:
280
280
  name: sassc-rails
281
281
  requirement: !ruby/object:Gem::Requirement
282
282
  requirements:
283
- - - "~>"
283
+ - - ">="
284
284
  - !ruby/object:Gem::Version
285
- version: '2'
285
+ version: '0'
286
286
  type: :development
287
287
  prerelease: false
288
288
  version_requirements: !ruby/object:Gem::Requirement
289
289
  requirements:
290
- - - "~>"
290
+ - - ">="
291
291
  - !ruby/object:Gem::Version
292
- version: '2'
292
+ version: '0'
293
293
  - !ruby/object:Gem::Dependency
294
294
  name: uglifier
295
295
  requirement: !ruby/object:Gem::Requirement
296
296
  requirements:
297
297
  - - ">="
298
298
  - !ruby/object:Gem::Version
299
- version: 4.1.0
299
+ version: '0'
300
300
  type: :development
301
301
  prerelease: false
302
302
  version_requirements: !ruby/object:Gem::Requirement
303
303
  requirements:
304
304
  - - ">="
305
305
  - !ruby/object:Gem::Version
306
- version: 4.1.0
306
+ version: '0'
307
307
  - !ruby/object:Gem::Dependency
308
308
  name: webmock
309
309
  requirement: !ruby/object:Gem::Requirement
310
310
  requirements:
311
- - - "~>"
311
+ - - ">="
312
312
  - !ruby/object:Gem::Version
313
- version: 3.8.3
313
+ version: '0'
314
314
  type: :development
315
315
  prerelease: false
316
316
  version_requirements: !ruby/object:Gem::Requirement
317
317
  requirements:
318
- - - "~>"
318
+ - - ">="
319
319
  - !ruby/object:Gem::Version
320
- version: 3.8.3
320
+ version: '0'
321
321
  - !ruby/object:Gem::Dependency
322
322
  name: yard
323
323
  requirement: !ruby/object:Gem::Requirement
@@ -464,7 +464,6 @@ files:
464
464
  - app/assets/javascripts/govuk_publishing_components/components/error-summary.js
465
465
  - app/assets/javascripts/govuk_publishing_components/components/feedback.js
466
466
  - app/assets/javascripts/govuk_publishing_components/components/govspeak.js
467
- - app/assets/javascripts/govuk_publishing_components/components/intervention.js
468
467
  - app/assets/javascripts/govuk_publishing_components/components/layout-header.js
469
468
  - app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js
470
469
  - app/assets/javascripts/govuk_publishing_components/components/metadata.js
@@ -1891,7 +1890,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1891
1890
  - !ruby/object:Gem::Version
1892
1891
  version: '0'
1893
1892
  requirements: []
1894
- rubygems_version: 3.3.10
1893
+ rubygems_version: 3.3.11
1895
1894
  signing_key:
1896
1895
  specification_version: 4
1897
1896
  summary: A gem to document components in GOV.UK frontend applications
@@ -1,17 +0,0 @@
1
- window.GOVUK = window.GOVUK || {}
2
- window.GOVUK.Modules = window.GOVUK.Modules || {};
3
-
4
- (function (Modules) {
5
- function Intervention ($module) {
6
- this.$module = $module
7
- }
8
-
9
- Intervention.prototype.init = function () {
10
- if (window.GOVUK.analytics && window.GOVUK.analytics.trackEvent) {
11
- // Send a tracking event when this component is shown
12
- window.GOVUK.analytics.trackEvent('interventionBanner', 'interventionShown')
13
- }
14
- }
15
-
16
- Modules.Intervention = Intervention
17
- })(window.GOVUK.Modules)