govuk_publishing_components 38.3.2 → 38.4.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: b4722ee8913bce56729719e8dde26b88d7958e23fd8c6177a12bcfb67b91a0c6
4
- data.tar.gz: 77afa0a3c76a84f04523dbd435d18dc92feb1615a106efe301e3e9e78f743c69
3
+ metadata.gz: 25dafad57ab7872e9ebdfff2bc1cd2a3a06b6ce9d089c628a022891f8e3ab4f7
4
+ data.tar.gz: 16c3a723cf5b3854fa5ae8c316c44426bceddeb07209c384c95269d21af68210
5
5
  SHA512:
6
- metadata.gz: 8861808afb26f285beb8cf3c8a91bd19a7cf076b44a784bf6da5167e24e10c643eb744bd5c0b87cbaf65c358d525a81441fd25d477e14c16b7233428b2fd7e61
7
- data.tar.gz: 4baa708a0bede0ac54705a63d0fc2bc2a8d957ccae3d4b59b35e2dd8fa75ce62db1e4a7b0c4f6bedbf3c3e1751878732112b0fef1beba648a2a5d4a3abf5287b
6
+ metadata.gz: 8ed0ac57827eef5c9d7eb086614e680acafbbc9c51662a20d0454b859a4ecc733a46e406e66b2f03969945bb8687934c94939edafb82e1b1d7d676491c6f9ad8
7
+ data.tar.gz: 6ab5be4ca473ce6316895b63d3a2ab1e32ca2093d8fa2580ae14dd6d560f57f06a0fc9935eec4d9332a10bdacab6a4b898e31c8326e5ed545e0761da45b3858f
@@ -36,15 +36,20 @@
36
36
  var moduleName = camelCaseAndCapitalise(moduleNames[j])
37
37
  var started = element.getAttribute('data-' + moduleNames[j] + '-module-started')
38
38
  if (typeof GOVUK.Modules[moduleName] === 'function' && !started) {
39
- // Vanilla JavaScript GOV.UK Modules and GOV.UK Frontend Modules
40
- if (GOVUK.Modules[moduleName].prototype.init) {
41
- try {
39
+ try {
40
+ if (GOVUK.Modules[moduleName].prototype.init) {
41
+ // Vanilla JavaScript GOV.UK Modules and GOV.UK Frontend V4 Modules
42
42
  new GOVUK.Modules[moduleName](element).init()
43
- element.setAttribute('data-' + moduleNames[j] + '-module-started', true)
44
- } catch (e) {
45
- // if there's a problem with the module, catch the error to allow other modules to start
46
- console.error('Error starting ' + moduleName + ' component JS: ', e, window.location)
43
+ } else {
44
+ // GOV.UK Frontend V5 Modules - removed component init() methods and initialise in constructor
45
+ // https://github.com/alphagov/govuk-design-system-architecture/blob/main/decision-records/010-remove-init-method.md
46
+ /* eslint-disable no-new */
47
+ new GOVUK.Modules[moduleName](element)
47
48
  }
49
+ element.setAttribute('data-' + moduleNames[j] + '-module-started', true)
50
+ } catch (e) {
51
+ // if there's a problem with the module, catch the error to allow other modules to start
52
+ console.error('Error starting ' + moduleName + ' component JS: ', e, window.location)
48
53
  }
49
54
  }
50
55
  }
@@ -60,7 +60,7 @@ cy:
60
60
  - Rydyn ni hefyd yn defnyddio cwcis sy'n cael eu gosod gan wefannau eraill i'n helpu i gyflwyno cynnwys o'u gwasanaethau nhw.
61
61
  title: Cwcis ar GOV.UK
62
62
  devolved_nations:
63
- applies_to:
63
+ applies_to: Yn berthnasol i
64
64
  connectors:
65
65
  last_word:
66
66
  two_words:
@@ -72,7 +72,7 @@ cy:
72
72
  detailed_guide:
73
73
  guidance:
74
74
  publication:
75
- wales:
75
+ wales: Gymru
76
76
  feedback:
77
77
  close: Cau
78
78
  dont_include_personal_info: Peidiwch â chynnwys gwybodaeth bersonol neu ariannol fel eich rhif Yswiriant Gwladol neu rif cerdyn credyd.
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "38.3.2".freeze
2
+ VERSION = "38.4.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: 38.3.2
4
+ version: 38.4.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: 2024-05-17 00:00:00.000000000 Z
11
+ date: 2024-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config