govuk_publishing_components 51.2.0 → 51.2.1
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 +4 -4
- data/app/assets/javascripts/govuk_publishing_components/components/feedback.js +29 -34
- data/app/assets/javascripts/govuk_publishing_components/vendor/lux/lux-reporter.js +7 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_markdown-typography.scss +1 -2
- data/app/views/govuk_publishing_components/components/docs/feedback.yml +1 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c50d14be7610561ed91341a0824caa29b9c767d839acb2c6f7c65b5f58514ac4
|
4
|
+
data.tar.gz: d8bd8854736387adecda29ca77c0f31af6b7e5f0d8123c30c4b9fa5223e2530e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a3fd0fbac03888e39e3aecd3adcc1c69dd9c1f3b179f8eeb853c14cb3edbea20df8593a00126fc3d23fa3b550af45746f6b42679a145287abf31b92e20886a1
|
7
|
+
data.tar.gz: e26f92b617d944bee8ffaee93c200eef6bf1b8596c946092e5646f4862d9043a7c4ba26e9d784ce4f0445cda143ef57f27003c94275b2c2423e8117a743553de
|
@@ -69,40 +69,35 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
69
69
|
}.bind(this), 1000)
|
70
70
|
}.bind(this))
|
71
71
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
this.disableSubmitFormButton($form)
|
103
|
-
xhr.send(params)
|
104
|
-
}.bind(this))
|
105
|
-
}
|
72
|
+
for (var f = 0; f < this.forms.length; f++) {
|
73
|
+
this.forms[f].addEventListener('submit', function (e) {
|
74
|
+
e.preventDefault()
|
75
|
+
var $form = e.target
|
76
|
+
var xhr = new XMLHttpRequest()
|
77
|
+
var url = $form.getAttribute('action')
|
78
|
+
var params = new FormData($form)
|
79
|
+
params = new URLSearchParams(params).toString()
|
80
|
+
|
81
|
+
this.done = function () {
|
82
|
+
if (xhr.status === 200) {
|
83
|
+
this.showFormSuccess(xhr.message)
|
84
|
+
this.revealInitialPrompt()
|
85
|
+
this.setInitialAriaAttributes()
|
86
|
+
this.activeForm.hidden = true
|
87
|
+
clearInterval(this.timerInterval)
|
88
|
+
} else {
|
89
|
+
this.showError(xhr)
|
90
|
+
this.enableSubmitFormButton($form)
|
91
|
+
}
|
92
|
+
}.bind(this)
|
93
|
+
|
94
|
+
xhr.addEventListener('loadend', this.done)
|
95
|
+
xhr.open('POST', url, true)
|
96
|
+
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded')
|
97
|
+
|
98
|
+
this.disableSubmitFormButton($form)
|
99
|
+
xhr.send(params)
|
100
|
+
}.bind(this))
|
106
101
|
}
|
107
102
|
}
|
108
103
|
|
@@ -336,7 +336,7 @@
|
|
336
336
|
return str;
|
337
337
|
}
|
338
338
|
|
339
|
-
var VERSION = "4.0.
|
339
|
+
var VERSION = "4.0.30";
|
340
340
|
/**
|
341
341
|
* Returns the version of the script as a float to be stored in legacy systems that do not support
|
342
342
|
* string versions.
|
@@ -622,6 +622,10 @@
|
|
622
622
|
}
|
623
623
|
var MAX_SELECTOR_LENGTH = 100;
|
624
624
|
function getNodeSelector(node, selector) {
|
625
|
+
if (selector === void 0) { selector = ""; }
|
626
|
+
return _getNodeSelector(node, selector).slice(0, MAX_SELECTOR_LENGTH);
|
627
|
+
}
|
628
|
+
function _getNodeSelector(node, selector) {
|
625
629
|
if (selector === void 0) { selector = ""; }
|
626
630
|
try {
|
627
631
|
if (selector &&
|
@@ -668,6 +672,7 @@
|
|
668
672
|
var sessionAttributions = [];
|
669
673
|
var largestEntry;
|
670
674
|
var maximumSessionValue = 0;
|
675
|
+
var MAX_CLS_SOURCES = 50;
|
671
676
|
function processEntry$2(entry) {
|
672
677
|
if (!entry.hadRecentInput) {
|
673
678
|
var firstEntry = sessionEntries[0];
|
@@ -717,7 +722,7 @@
|
|
717
722
|
startTime: processTimeMetric(largestEntry.startTime),
|
718
723
|
}
|
719
724
|
: null,
|
720
|
-
sources: sessionAttributions.length ? sessionAttributions : null,
|
725
|
+
sources: sessionAttributions.length ? sessionAttributions.slice(0, MAX_CLS_SOURCES) : null,
|
721
726
|
};
|
722
727
|
}
|
723
728
|
|
data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_markdown-typography.scss
CHANGED
@@ -31,12 +31,11 @@
|
|
31
31
|
|
32
32
|
h2 {
|
33
33
|
margin-top: $govuk-gutter;
|
34
|
-
margin-bottom:
|
34
|
+
margin-bottom: govuk-spacing(4);
|
35
35
|
@include govuk-font($size: 27, $weight: bold);
|
36
36
|
|
37
37
|
@include govuk-media-query($from: desktop) {
|
38
38
|
margin-top: $govuk-gutter * 1.5;
|
39
|
-
margin-bottom: 0;
|
40
39
|
}
|
41
40
|
}
|
42
41
|
|
@@ -3,7 +3,7 @@ description: Invites user feedback on the current page.
|
|
3
3
|
body: |
|
4
4
|
This component is designed to sit at the bottom of pages on GOV.UK to allow users to submit feedback on that page.
|
5
5
|
|
6
|
-
This component uses JavaScript for expanding and collapsing and also for submitting form responses.
|
6
|
+
This component uses JavaScript for expanding and collapsing and also for submitting form responses. Users without JavaScript will fall back to a normal form submission.
|
7
7
|
uses_component_wrapper_helper: true
|
8
8
|
accessibility_criteria: |
|
9
9
|
The form must:
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_publishing_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 51.2.
|
4
|
+
version: 51.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-02-
|
10
|
+
date: 2025-02-11 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: govuk_app_config
|