govuk_publishing_components 31.0.0 → 31.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-ecommerce-tracker.js +2 -0
- data/app/views/govuk_publishing_components/components/_emergency_banner.html.erb +2 -2
- data/lib/govuk_publishing_components/presenters/machine_readable/creative_work_schema.rb +1 -1
- data/lib/govuk_publishing_components/presenters/machine_readable/page.rb +1 -1
- data/lib/govuk_publishing_components/presenters/machine_readable/potential_search_action_schema.rb +1 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23492ecba6eaaa3ed895868bf827524702313449a11c8ca79eed1e0d25565122
|
4
|
+
data.tar.gz: fddbfc77800da9f9999b164930528661bffaed54e70849e14d6ef9e1b1ab549d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f40277a05d20137b4695853f5c2a80bfab0ee90fb01ccf73d961e4e4c3e59a3c31c917022ed048c5e8ceff38bc1cc5a8fd9d62ceb5c5b7eef57893c30a3d4257
|
7
|
+
data.tar.gz: 0dc8abb57df600b8309abf46571ccb864a41b82f3f7b4cf6a2e3dcab4124777719d017719a87f51dde41855472b9d15b9920040a94a267acdf56d8222b51a472
|
data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-ecommerce-tracker.js
CHANGED
@@ -11,6 +11,8 @@
|
|
11
11
|
|
12
12
|
init: function (isNewPageLoad) {
|
13
13
|
if (window.dataLayer) {
|
14
|
+
/* The data-ga4-ecommerce attribute may be present on several DOM elements e.g. search results and spelling
|
15
|
+
suggestions, hence why document.querySelectorAll is required */
|
14
16
|
this.searchResultsBlocks = document.querySelectorAll('[data-ga4-ecommerce]')
|
15
17
|
this.isNewPageLoad = isNewPageLoad
|
16
18
|
|
@@ -28,11 +28,11 @@
|
|
28
28
|
|
29
29
|
%>
|
30
30
|
|
31
|
-
<%= content_tag('
|
31
|
+
<%= content_tag('section', class: banner_classes, "aria-labelledby": "emergency-banner-heading", "data-nosnippet": true ) do %>
|
32
32
|
<div class="govuk-width-container">
|
33
33
|
<div class="govuk-grid-row">
|
34
34
|
<div class="govuk-grid-column-two-thirds">
|
35
|
-
<%= content_tag('h2', class: heading_classes) do %>
|
35
|
+
<%= content_tag('h2', id: "emergency-banner-heading", class: heading_classes) do %>
|
36
36
|
<%= heading %>
|
37
37
|
<% end %>
|
38
38
|
<% if short_description %>
|
@@ -50,7 +50,7 @@ module GovukPublishingComponents
|
|
50
50
|
"author" => {
|
51
51
|
"@type" => "Organization",
|
52
52
|
"name" => publishing_organisation["title"],
|
53
|
-
"url" => Plek.
|
53
|
+
"url" => Plek.new.website_root + publishing_organisation["base_path"],
|
54
54
|
},
|
55
55
|
}
|
56
56
|
end
|
@@ -12,7 +12,7 @@ module GovukPublishingComponents
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def canonical_url
|
15
|
-
local_assigns[:canonical_url] || (Plek.
|
15
|
+
local_assigns[:canonical_url] || (Plek.new.website_root + content_item["base_path"])
|
16
16
|
end
|
17
17
|
|
18
18
|
def body
|
data/lib/govuk_publishing_components/presenters/machine_readable/potential_search_action_schema.rb
CHANGED
@@ -5,7 +5,7 @@ module GovukPublishingComponents
|
|
5
5
|
class PotentialSearchActionSchema
|
6
6
|
attr_reader :facet_params, :description
|
7
7
|
|
8
|
-
BASE_SEARCH_URL = "#{Plek.
|
8
|
+
BASE_SEARCH_URL = "#{Plek.new.website_root}/search/all?keywords={query}&order=relevance".freeze
|
9
9
|
|
10
10
|
def initialize(facet_params, description)
|
11
11
|
@facet_params = facet_params
|
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: 31.
|
4
|
+
version: 31.1.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-
|
11
|
+
date: 2022-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_app_config
|
@@ -1361,7 +1361,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1361
1361
|
- !ruby/object:Gem::Version
|
1362
1362
|
version: '0'
|
1363
1363
|
requirements: []
|
1364
|
-
rubygems_version: 3.3.
|
1364
|
+
rubygems_version: 3.3.23
|
1365
1365
|
signing_key:
|
1366
1366
|
specification_version: 4
|
1367
1367
|
summary: A gem to document components in GOV.UK frontend applications
|