govuk_publishing_components 17.2.0 → 17.3.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: 33f5dbdf1676f065363ebbc65af431eb4bd35498ee823d8b65897d1b0478bd8c
4
- data.tar.gz: 7f89b1060016427871d1716dfdf2b4e677d23b1331be55f22f77850c9483804d
3
+ metadata.gz: d8d0ab99194724645bf31d90bd97f382c7d96eb78ba3124212ef67841e26eaa9
4
+ data.tar.gz: 46acbcb1849d70d4d39435d895dad649c6f9fd2b2ed0b98d4f25cb3c590e98c0
5
5
  SHA512:
6
- metadata.gz: 2ee4fab8d517368ba42560bcbb2fabc3f5e67bdc2af25e18e131d41f2b10d5aeffe371c0d64a2a09eda2835c9eda0d89452ebd3de179099ca725f60e440f1fab
7
- data.tar.gz: e728271a0a22df07e877afa58892cda0f99f5a5e7f2078076f36574b20751cbe0360ed7d6e3e98047a04901fd77680db88101ffbacd118896004e66444abab82
6
+ metadata.gz: 3aff26f7fe04fe35df73df9035f803b0f4841fca31f4bfd278f10cdeadb171738e451ad650063affe6ec56b5876a74542b2409c795e025edf252b4dd795e24a9
7
+ data.tar.gz: 72aefb086c9c5f7de2168dc545ae3c14da0d36c90b34aa0d3540f32804e7ca23049108232c8708a1371b225e5d254fa010f46916edec10c6f16db0112613c0e5
@@ -46,7 +46,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
46
46
  // This involves resetting the seen_cookie_message cookie, which may be set to true if they've seen the old cookie banner
47
47
  if (!window.GOVUK.cookie('cookie_policy')) {
48
48
  if (window.GOVUK.cookie('seen_cookie_message') === 'true') {
49
- window.GOVUK.cookie('seen_cookie_message', false)
49
+ window.GOVUK.cookie('seen_cookie_message', false, { days: 365 })
50
50
  }
51
51
  }
52
52
 
@@ -95,7 +95,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
95
95
  CookieBanner.prototype.setCookieConsent = function () {
96
96
  window.GOVUK.approveAllCookieTypes()
97
97
  this.$module.showConfirmationMessage()
98
- window.GOVUK.setCookie('seen_cookie_message', 'true')
98
+ window.GOVUK.cookie('seen_cookie_message', 'true', { days: 365 })
99
99
  }
100
100
 
101
101
  CookieBanner.prototype.showConfirmationMessage = function () {
@@ -52,6 +52,10 @@
52
52
  if (value === false || value === null) {
53
53
  return window.GOVUK.setCookie(name, '', { days: -1 })
54
54
  } else {
55
+ // Default expiry date of 30 days
56
+ if (typeof options === 'undefined') {
57
+ options = { days: 30 }
58
+ }
55
59
  return window.GOVUK.setCookie(name, value, options)
56
60
  }
57
61
  } else {
@@ -60,7 +64,7 @@
60
64
  }
61
65
 
62
66
  window.GOVUK.setDefaultConsentCookie = function () {
63
- window.GOVUK.setCookie('cookie_policy', JSON.stringify(DEFAULT_COOKIE_CONSENT))
67
+ window.GOVUK.setCookie('cookie_policy', JSON.stringify(DEFAULT_COOKIE_CONSENT), { days: 365 })
64
68
  }
65
69
 
66
70
  window.GOVUK.approveAllCookieTypes = function () {
@@ -71,7 +75,7 @@
71
75
  'campaigns': true
72
76
  }
73
77
 
74
- window.GOVUK.setCookie('cookie_policy', JSON.stringify(approvedConsent))
78
+ window.GOVUK.setCookie('cookie_policy', JSON.stringify(approvedConsent), { days: 365 })
75
79
  }
76
80
 
77
81
  window.GOVUK.getConsentCookie = function () {
@@ -119,7 +123,7 @@
119
123
  }
120
124
  }
121
125
 
122
- window.GOVUK.setCookie('cookie_policy', JSON.stringify(cookieConsent))
126
+ window.GOVUK.setCookie('cookie_policy', JSON.stringify(cookieConsent), { days: 365 })
123
127
  }
124
128
 
125
129
  window.GOVUK.checkConsentCookieCategory = function (cookieName, cookieCategory) {
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '17.2.0'.freeze
2
+ VERSION = '17.3.0'.freeze
3
3
  end
@@ -49,7 +49,7 @@
49
49
  "/"
50
50
  ],
51
51
  "_resolved": "git://github.com/alphagov/accessible-autocomplete.git#3523dd9fffc70cbd9f6f555f75863c33a709f49e",
52
- "_shasum": "828d0b174da2c7779fb957d3c7240807bc93012a",
52
+ "_shasum": "bf260bba0f5f18e54c3836452236c44d88b9c40f",
53
53
  "_shrinkwrap": null,
54
54
  "_spec": "accessible-autocomplete@git://github.com/alphagov/accessible-autocomplete.git#add-multiselect-support",
55
55
  "_where": "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 17.2.0
4
+ version: 17.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev