govuk_publishing_components 37.2.1 → 37.2.3

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: dd6a567dc9d2f526c099f1a5cffe3466e1198dd4e0dc0daa657fa1263ca747ee
4
- data.tar.gz: 9b371409800e9c9bf9d78b8587a07c625824bdda222feea5a8eb19136adbece6
3
+ metadata.gz: b2a0a4e155482dc364e89cbd2e7cadcbb47a03517188b2e10442369d3c0fe66e
4
+ data.tar.gz: ce994348af71283342f29d6ec33a8637c3a0297afb15b5ce80773b2d70008ef9
5
5
  SHA512:
6
- metadata.gz: d542c5aa0c5a03260cd4df7c2752bef05c9e556ec5b7dad4a2fc2267f841d3d5c346b8b892606738ca6162833c0e8183b1c30521aceb3421dca539ab80dfe896
7
- data.tar.gz: 938b1fca6df8b444cac7d2a0d5643c024d17b4c3bbe3488233457e970d5ab7c6a1bb5418bfa0790b45f04927695d48ba8b99344d4c29dd83eed843390fb8a302
6
+ metadata.gz: 18179699f08bed1942305e6e81f3a1c5c6a7e580a2cd81746725e7d5a8e150f9147ac976fa7952c2d93ed32ec30bd815870620d7f9cc4c06a4b4a2f6950a4ae1
7
+ data.tar.gz: e6076a4100b1d371b0701960cbf7c78a0ae6593cfd6ab8011d7e1494d07925a64083e93d01f7cae1c8aa074e2f72357a9fe80348cf5b4da3e79a9edf0b8d7d04
@@ -45,7 +45,7 @@ window.GOVUK.analyticsGa4.analyticsModules = window.GOVUK.analyticsGa4.analytics
45
45
  first_published_at: this.stripTimeFrom(this.getMetaContent('first-published-at')),
46
46
  updated_at: this.stripTimeFrom(this.getMetaContent('updated-at')),
47
47
  public_updated_at: this.stripTimeFrom(this.getMetaContent('public-updated-at')),
48
- publishing_government: this.getMetaContent('publishing-government') || this.getMetaContent('ga4-publishing-government'),
48
+ publishing_government: this.removeHyphensAndDowncase(this.getMetaContent('publishing-government') || this.getMetaContent('ga4-publishing-government')),
49
49
  political_status: this.getMetaContent('political-status') || this.getMetaContent('ga4-political-status'),
50
50
  primary_publishing_organisation: this.getMetaContent('primary-publishing-organisation'),
51
51
  organisations: this.getMetaContent('analytics:organisations'),
@@ -69,6 +69,12 @@ window.GOVUK.analyticsGa4.analyticsModules = window.GOVUK.analyticsGa4.analytics
69
69
  }
70
70
  },
71
71
 
72
+ removeHyphensAndDowncase: function (text) {
73
+ if (text) {
74
+ return text.replace(/-/g, ' ').toLowerCase()
75
+ }
76
+ },
77
+
72
78
  getLocation: function () {
73
79
  return this.PIIRemover.stripPIIWithOverride(this.stripGaParam(document.location.href), true, true)
74
80
  },
@@ -449,7 +449,7 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
449
449
 
450
450
  .gem-c-step-nav--large & + .gem-c-step-nav__list {
451
451
  @include govuk-media-query($from: tablet) {
452
- margin-top: -govuk-spacing(3);
452
+ margin-top: -(govuk-spacing(3));
453
453
  }
454
454
  }
455
455
  }
@@ -305,7 +305,7 @@ en:
305
305
  label: Search on GOV.UK
306
306
  search_button: Search
307
307
  share_links:
308
- all_opens_in_new_tab: Sharing will open the page in a new tab
308
+ all_opens_in_new_tab: The following links open in a new tab
309
309
  opens_in_new_tab: "(opens in new tab)"
310
310
  show_password:
311
311
  announce_hide: Your password is hidden
@@ -19,6 +19,7 @@ module GovukPublishingComponents
19
19
  "name" => page.title,
20
20
  "description" => page.description || page.body,
21
21
  }
22
+ .merge(govuk_logo)
22
23
  .merge(members)
23
24
  .merge(parent_organisations)
24
25
  .merge(sub_organisations)
@@ -83,6 +84,15 @@ module GovukPublishingComponents
83
84
  "#{website_root}#{minister['role_href']}"
84
85
  end
85
86
 
87
+ def govuk_logo
88
+ logo = page.local_assigns[:logo_url]
89
+ return {} unless logo
90
+
91
+ {
92
+ "logo" => logo,
93
+ }
94
+ end
95
+
86
96
  def website_root
87
97
  @website_root ||= Plek.new.website_root
88
98
  end
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "37.2.1".freeze
2
+ VERSION = "37.2.3".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: 37.2.1
4
+ version: 37.2.3
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-01-08 00:00:00.000000000 Z
11
+ date: 2024-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -521,7 +521,6 @@ files:
521
521
  - app/assets/javascripts/govuk_publishing_components/lib.js
522
522
  - app/assets/javascripts/govuk_publishing_components/lib/cookie-functions.js
523
523
  - app/assets/javascripts/govuk_publishing_components/lib/cookie-settings.js
524
- - app/assets/javascripts/govuk_publishing_components/lib/current-location.js
525
524
  - app/assets/javascripts/govuk_publishing_components/lib/extend-object.js
526
525
  - app/assets/javascripts/govuk_publishing_components/lib/govspeak/all.js
527
526
  - app/assets/javascripts/govuk_publishing_components/lib/govspeak/barchart-enhancement.js
@@ -1,10 +0,0 @@
1
- // used by the step by step navigation component
2
-
3
- (function (root) {
4
- 'use strict'
5
- window.GOVUK = window.GOVUK || {}
6
-
7
- window.GOVUK.getCurrentLocation = function () {
8
- return root.location
9
- }
10
- }(window))