govuk_publishing_components 33.0.0 → 34.0.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/config/govuk_publishing_components_manifest.js +0 -1
- data/app/assets/javascripts/component_guide/accessibility-test.js +0 -1
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-ecommerce-tracker.js +3 -3
- data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +22 -1
- data/app/assets/javascripts/govuk_publishing_components/vendor/lux/lux-reporter.js +58 -106
- data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +28 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +11 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_cards.scss +19 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +20 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_cookie-banner.scss +6 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_emergency-banner.scss +6 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_govspeak-html-publication.scss +8 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_govspeak.scss +83 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +6 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +15 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +6 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_textarea.scss +16 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_title.scss +10 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_contents-list-helper.scss +0 -1
- data/app/controllers/govuk_publishing_components/component_guide_controller.rb +6 -9
- data/app/views/govuk_publishing_components/component_guide/_application_stylesheet.html.erb +0 -3
- data/app/views/govuk_publishing_components/component_guide/index.html.erb +0 -7
- data/app/views/govuk_publishing_components/components/_layout_for_admin.html.erb +1 -2
- data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_step_by_step_nav.html.erb +4 -1
- data/app/views/govuk_publishing_components/components/docs/step_by_step_nav.yml +34 -0
- data/app/views/govuk_publishing_components/components/feedback/_problem_form.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/feedback/_survey_signup_form.html.erb +1 -1
- data/app/views/layouts/govuk_publishing_components/application.html.erb +1 -2
- data/config/locales/ar.yml +0 -7
- data/config/locales/az.yml +1 -7
- data/config/locales/be.yml +0 -7
- data/config/locales/bg.yml +0 -7
- data/config/locales/bn.yml +0 -7
- data/config/locales/cs.yml +0 -7
- data/config/locales/cy.yml +0 -7
- data/config/locales/da.yml +0 -7
- data/config/locales/de.yml +0 -7
- data/config/locales/dr.yml +0 -7
- data/config/locales/el.yml +0 -7
- data/config/locales/en.yml +0 -7
- data/config/locales/es-419.yml +0 -7
- data/config/locales/es.yml +0 -7
- data/config/locales/et.yml +0 -7
- data/config/locales/fa.yml +1 -7
- data/config/locales/fi.yml +0 -7
- data/config/locales/fr.yml +0 -7
- data/config/locales/gd.yml +0 -7
- data/config/locales/gu.yml +0 -7
- data/config/locales/he.yml +0 -7
- data/config/locales/hi.yml +0 -7
- data/config/locales/hr.yml +0 -7
- data/config/locales/hu.yml +0 -7
- data/config/locales/hy.yml +0 -7
- data/config/locales/id.yml +0 -7
- data/config/locales/is.yml +0 -7
- data/config/locales/it.yml +0 -7
- data/config/locales/ja.yml +0 -7
- data/config/locales/ka.yml +0 -7
- data/config/locales/kk.yml +0 -7
- data/config/locales/ko.yml +0 -7
- data/config/locales/lt.yml +0 -7
- data/config/locales/lv.yml +0 -7
- data/config/locales/ms.yml +0 -7
- data/config/locales/mt.yml +0 -7
- data/config/locales/nl.yml +0 -7
- data/config/locales/no.yml +0 -7
- data/config/locales/pa-pk.yml +0 -7
- data/config/locales/pa.yml +0 -7
- data/config/locales/pl.yml +0 -7
- data/config/locales/ps.yml +0 -7
- data/config/locales/pt.yml +0 -7
- data/config/locales/ro.yml +0 -7
- data/config/locales/ru.yml +0 -7
- data/config/locales/si.yml +0 -7
- data/config/locales/sk.yml +0 -7
- data/config/locales/sl.yml +0 -7
- data/config/locales/so.yml +0 -7
- data/config/locales/sq.yml +0 -7
- data/config/locales/sr.yml +0 -7
- data/config/locales/sv.yml +0 -7
- data/config/locales/sw.yml +0 -7
- data/config/locales/ta.yml +0 -7
- data/config/locales/th.yml +0 -7
- data/config/locales/tk.yml +0 -7
- data/config/locales/tr.yml +0 -7
- data/config/locales/uk.yml +0 -7
- data/config/locales/ur.yml +0 -7
- data/config/locales/uz.yml +0 -7
- data/config/locales/vi.yml +0 -7
- data/config/locales/zh-hk.yml +0 -7
- data/config/locales/zh-tw.yml +0 -7
- data/config/locales/zh.yml +0 -7
- data/lib/govuk_publishing_components/config.rb +0 -3
- data/lib/govuk_publishing_components/presenters/button_helper.rb +2 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +2 -17
- data/app/assets/stylesheets/component_guide/print.scss +0 -1
- data/app/assets/stylesheets/govuk_publishing_components/_all_components_print.scss +0 -18
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_accordion.scss +0 -28
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_button.scss +0 -8
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_cards.scss +0 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_contents-list.scss +0 -19
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_emergency-banner.scss +0 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_govspeak-html-publication.scss +0 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_govspeak.scss +0 -80
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_layout-super-navigation-header.scss +0 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_organisation-logo.scss +0 -7
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_step-by-step-nav-header.scss +0 -7
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_step-by-step-nav.scss +0 -116
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_textarea.scss +0 -13
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_title.scss +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d27a853451e7e5d792f6d4844c3192d325093a13bb352e726a7d5917186d9207
|
4
|
+
data.tar.gz: f564406c3fe69d492b3c1f86713b0d8e7fd4f9bba214e3056fa4de42cea452b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4323ecea03126f79bf1dc2e173a6c19504341b956a92bd8bcf85dd82bcd6003fe68dec8a835f3c35874044b4e7bd6542b029ad885976fc6efc18527ab6e707a
|
7
|
+
data.tar.gz: f5463262a5c4069311287fd9ba13f36191a4675bcc6c70e0c6b36d0a04f7c3a11d4229bc2f5caa9d194194dbda264264723d0d65846b85aa62b29c289892f716
|
data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-ecommerce-tracker.js
CHANGED
@@ -50,7 +50,7 @@
|
|
50
50
|
var schema = this.populateEcommerceSchema(searchResultsBlock, false, null)
|
51
51
|
|
52
52
|
this.clearPreviousEcommerceObject()
|
53
|
-
|
53
|
+
GOVUK.analyticsGa4.core.sendData(schema)
|
54
54
|
},
|
55
55
|
|
56
56
|
handleClick: function (event) {
|
@@ -62,7 +62,7 @@
|
|
62
62
|
var schema = this.populateEcommerceSchema(searchResultsBlock, true, searchResult)
|
63
63
|
|
64
64
|
this.clearPreviousEcommerceObject()
|
65
|
-
|
65
|
+
GOVUK.analyticsGa4.core.sendData(schema)
|
66
66
|
}
|
67
67
|
},
|
68
68
|
|
@@ -127,7 +127,7 @@
|
|
127
127
|
},
|
128
128
|
|
129
129
|
clearPreviousEcommerceObject: function () {
|
130
|
-
|
130
|
+
GOVUK.analyticsGa4.core.sendData({ search_results: { ecommerce: null } })
|
131
131
|
},
|
132
132
|
|
133
133
|
getResultsCount: function (searchResultsBlock) {
|
@@ -36,6 +36,9 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
36
36
|
|
37
37
|
this.$module.uniqueId = this.$module.getAttribute('data-id') || false
|
38
38
|
|
39
|
+
this.$module.dataModule = this.$module.getAttribute('data-module')
|
40
|
+
this.$module.isGa4Enabled = this.$module.dataModule ? this.$module.dataModule.indexOf('ga4-event-tracker') !== -1 : false
|
41
|
+
|
39
42
|
if (this.$module.uniqueId) {
|
40
43
|
this.$module.sessionStoreLink = this.$module.sessionStoreLink + '_' + this.$module.uniqueId
|
41
44
|
}
|
@@ -78,6 +81,12 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
78
81
|
|
79
82
|
this.$module.insertBefore(showAll, steps)
|
80
83
|
this.$module.showOrHideAllButton = this.$module.querySelectorAll('.js-step-controls-button')[0]
|
84
|
+
|
85
|
+
// if GA4 is enabled, set attributes on 'show all sections' for tracking using ga4-event-tracker
|
86
|
+
if (this.$module.isGa4Enabled) {
|
87
|
+
var showAllAttributesGa4 = { event_name: 'select_content', type: 'step by step', index: 0, index_total: this.$module.totalSteps }
|
88
|
+
this.$module.showOrHideAllButton.setAttribute('data-ga4-event', JSON.stringify(showAllAttributesGa4))
|
89
|
+
}
|
81
90
|
}
|
82
91
|
|
83
92
|
Gemstepnav.prototype.addShowHideToggle = function () {
|
@@ -169,12 +178,24 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
169
178
|
var title = thisel.querySelectorAll('.js-step-title')[0]
|
170
179
|
var contentId = thisel.querySelectorAll('.js-panel')[0].getAttribute('id')
|
171
180
|
var titleText = title.textContent || title.innerText // IE8 fallback
|
181
|
+
var ga4Data = ''
|
182
|
+
|
183
|
+
if (this.$module.isGa4Enabled) {
|
184
|
+
var ga4JSON = {
|
185
|
+
event_name: 'select_content',
|
186
|
+
type: 'step by step',
|
187
|
+
text: titleText.trim(),
|
188
|
+
index: i + 1,
|
189
|
+
index_total: this.$module.totalSteps
|
190
|
+
}
|
191
|
+
ga4Data = "data-ga4-event='" + JSON.stringify(ga4JSON) + "'" // Construct GA4 data-attributes for ga4-event-tracker.
|
192
|
+
}
|
172
193
|
|
173
194
|
title.outerHTML =
|
174
195
|
'<span class="js-step-title">' +
|
175
196
|
'<button ' +
|
176
197
|
'class="gem-c-step-nav__button gem-c-step-nav__button--title js-step-title-button" ' +
|
177
|
-
'aria-expanded="false" aria-controls="' + contentId + '">' +
|
198
|
+
'aria-expanded="false" aria-controls="' + contentId + '" ' + ga4Data + '>' +
|
178
199
|
'<span class="gem-c-step-nav____title-text-focus">' +
|
179
200
|
'<span class="gem-c-step-nav__title-text js-step-title-text">' + titleText + '</span>' +
|
180
201
|
'<span class="govuk-visually-hidden gem-c-step-nav__section-heading-divider">, </span>' +
|
@@ -38,6 +38,8 @@
|
|
38
38
|
errorBeaconUrl: getProperty(obj, "errorBeaconUrl", "https://lux.speedcurve.com/error/"),
|
39
39
|
jspagelabel: getProperty(obj, "jspagelabel", undefined),
|
40
40
|
label: getProperty(obj, "label", undefined),
|
41
|
+
maxBeaconUrlLength: getProperty(obj, "maxBeaconUrlLength", 8190),
|
42
|
+
maxBeaconUTEntries: getProperty(obj, "maxBeaconUTEntries", 20),
|
41
43
|
maxErrors: getProperty(obj, "maxErrors", 5),
|
42
44
|
maxMeasureTime: getProperty(obj, "maxMeasureTime", 60000),
|
43
45
|
measureUntil: getProperty(obj, "measureUntil", "onload"),
|
@@ -276,6 +278,23 @@
|
|
276
278
|
return Matching;
|
277
279
|
}());
|
278
280
|
|
281
|
+
/**
|
282
|
+
* Fit an array of user timing delimited strings into a URL and return both the entries that fit and
|
283
|
+
* the remaining entries that didn't fit.
|
284
|
+
*/
|
285
|
+
function fitUserTimingEntries(utValues, config, url) {
|
286
|
+
// Start with the maximum allowed UT entries per beacon
|
287
|
+
var beaconUtValues = utValues.slice(0, config.maxBeaconUTEntries);
|
288
|
+
var remainingUtValues = utValues.slice(config.maxBeaconUTEntries);
|
289
|
+
// Trim UT entries until they fit within the maximum URL length, ensuring at least one UT entry
|
290
|
+
// is included.
|
291
|
+
while ((url + "&UT=" + beaconUtValues.join(",")).length > config.maxBeaconUrlLength &&
|
292
|
+
beaconUtValues.length > 1) {
|
293
|
+
remainingUtValues.unshift(beaconUtValues.pop());
|
294
|
+
}
|
295
|
+
return [beaconUtValues, remainingUtValues];
|
296
|
+
}
|
297
|
+
|
279
298
|
var LUX = window.LUX || {};
|
280
299
|
var scriptEndTime = scriptStartTime;
|
281
300
|
LUX = (function () {
|
@@ -288,7 +307,7 @@
|
|
288
307
|
/// End
|
289
308
|
// -------------------------------------------------------------------------
|
290
309
|
|
291
|
-
var SCRIPT_VERSION = "
|
310
|
+
var SCRIPT_VERSION = "305";
|
292
311
|
var logger = new Logger();
|
293
312
|
var globalConfig = fromObject(LUX);
|
294
313
|
logger.logEvent(LogEvent.EvaluationStart, [SCRIPT_VERSION]);
|
@@ -382,7 +401,6 @@
|
|
382
401
|
var gUid = refreshUniqueId(gSyncId); // cookie for this session ("Unique ID")
|
383
402
|
var gCustomerDataTimeout; // setTimeout timer for sending a Customer Data beacon after onload
|
384
403
|
var gMaxMeasureTimeout; // setTimeout timer for sending the beacon after a maximum measurement time
|
385
|
-
var gMaxQuerystring = 8190; // split the beacon querystring if it gets longer than this
|
386
404
|
if (_sample()) {
|
387
405
|
logger.logEvent(LogEvent.SessionIsSampled, [globalConfig.samplerate]);
|
388
406
|
}
|
@@ -701,7 +719,7 @@
|
|
701
719
|
}
|
702
720
|
aUT.push(utParts.join("|"));
|
703
721
|
}
|
704
|
-
return aUT
|
722
|
+
return aUT;
|
705
723
|
}
|
706
724
|
// Return a string of Element Timing Metrics formatted for beacon querystring.
|
707
725
|
function elementTimingValues() {
|
@@ -1406,8 +1424,28 @@
|
|
1406
1424
|
clearTimeout(gMaxMeasureTimeout);
|
1407
1425
|
}
|
1408
1426
|
}
|
1427
|
+
function _getBeaconUrl() {
|
1428
|
+
var queryParams = [
|
1429
|
+
"v=" + SCRIPT_VERSION,
|
1430
|
+
"id=" + getCustomerId(),
|
1431
|
+
"sid=" + gSyncId,
|
1432
|
+
"uid=" + gUid,
|
1433
|
+
"l=" + encodeURIComponent(_getPageLabel()),
|
1434
|
+
"HN=" + encodeURIComponent(document.location.hostname),
|
1435
|
+
"PN=" + encodeURIComponent(document.location.pathname),
|
1436
|
+
];
|
1437
|
+
if (gFlags) {
|
1438
|
+
queryParams.push("fl=" + gFlags);
|
1439
|
+
}
|
1440
|
+
var customerData = customerDataValues();
|
1441
|
+
if (customerData) {
|
1442
|
+
queryParams.push("CD=" + customerData);
|
1443
|
+
}
|
1444
|
+
return globalConfig.beaconUrl + "?" + queryParams.join("&");
|
1445
|
+
}
|
1409
1446
|
// Beacon back the LUX data.
|
1410
1447
|
function _sendLux() {
|
1448
|
+
var _a;
|
1411
1449
|
clearMaxMeasureTimeout();
|
1412
1450
|
var customerid = getCustomerId();
|
1413
1451
|
if (!customerid ||
|
@@ -1425,9 +1463,7 @@
|
|
1425
1463
|
// with LUX.markLoadTime()
|
1426
1464
|
_markLoadTime();
|
1427
1465
|
}
|
1428
|
-
var sUT = userTimingValues(); // User Timing data
|
1429
1466
|
var sET = elementTimingValues(); // Element Timing data
|
1430
|
-
var sCustomerData = customerDataValues(); // customer data
|
1431
1467
|
var sIx = ""; // Interaction Metrics
|
1432
1468
|
if (!gbIxSent) {
|
1433
1469
|
// It is possible for the IX beacon to be sent BEFORE the "main" window.onload LUX beacon.
|
@@ -1442,21 +1478,10 @@
|
|
1442
1478
|
}
|
1443
1479
|
// We want ALL beacons to have ALL the data used for query filters (geo, pagelabel, browser, & customerdata).
|
1444
1480
|
// So we create a base URL that has all the necessary information:
|
1445
|
-
var baseUrl =
|
1446
|
-
"?v=" +
|
1447
|
-
SCRIPT_VERSION +
|
1448
|
-
"&id=" +
|
1449
|
-
customerid +
|
1450
|
-
"&sid=" +
|
1451
|
-
gSyncId +
|
1452
|
-
"&uid=" +
|
1453
|
-
gUid +
|
1454
|
-
(sCustomerData ? "&CD=" + sCustomerData : "") +
|
1455
|
-
"&l=" +
|
1456
|
-
encodeURIComponent(_getPageLabel());
|
1481
|
+
var baseUrl = _getBeaconUrl();
|
1457
1482
|
var is = inlineTagSize("script");
|
1458
1483
|
var ic = inlineTagSize("style");
|
1459
|
-
var
|
1484
|
+
var metricsQueryString =
|
1460
1485
|
// only send Nav Timing and lux.js metrics on initial pageload (not for SPA page views)
|
1461
1486
|
(gbNavSent ? "" : "&NT=" + getNavTiming()) +
|
1462
1487
|
(gbFirstPV ? "&LJS=" + sLuxjs : "") +
|
@@ -1497,31 +1522,15 @@
|
|
1497
1522
|
(sIx ? "&IX=" + sIx : "") +
|
1498
1523
|
(typeof gFirstInputDelay !== "undefined" ? "&FID=" + gFirstInputDelay : "") +
|
1499
1524
|
(sCPU ? "&CPU=" + sCPU : "") +
|
1500
|
-
(gFlags ? "&fl=" + gFlags : "") +
|
1501
1525
|
(sET ? "&ET=" + sET : "") + // element timing
|
1502
|
-
"&
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1506
|
-
encodeURIComponent(document.location.pathname);
|
1507
|
-
// User Timing marks & measures
|
1508
|
-
var sUT_remainder = "";
|
1509
|
-
if (sUT) {
|
1510
|
-
var curLen = baseUrl.length + querystring.length;
|
1511
|
-
if (curLen + sUT.length <= gMaxQuerystring) {
|
1512
|
-
// Add all User Timing
|
1513
|
-
querystring += "&UT=" + sUT;
|
1514
|
-
}
|
1515
|
-
else {
|
1516
|
-
// Only add a substring of User Timing
|
1517
|
-
var avail_1 = gMaxQuerystring - curLen; // how much room is left in the querystring
|
1518
|
-
var iComma = sUT.lastIndexOf(",", avail_1); // as many UT tuples as possible
|
1519
|
-
querystring += "&UT=" + sUT.substring(0, iComma);
|
1520
|
-
sUT_remainder = sUT.substring(iComma + 1);
|
1521
|
-
}
|
1522
|
-
}
|
1526
|
+
(DCLS !== false ? "&CLS=" + DCLS : "");
|
1527
|
+
// We add the user timing entries last so that we can split them to reduce the URL size if necessary.
|
1528
|
+
var utValues = userTimingValues();
|
1529
|
+
var _b = fitUserTimingEntries(utValues, globalConfig, baseUrl + metricsQueryString), beaconUtValues = _b[0], remainingUtValues = _b[1];
|
1523
1530
|
// Send the MAIN LUX beacon.
|
1524
|
-
var mainBeaconUrl = baseUrl +
|
1531
|
+
var mainBeaconUrl = baseUrl +
|
1532
|
+
metricsQueryString +
|
1533
|
+
(beaconUtValues.length > 0 ? "&UT=" + beaconUtValues.join(",") : "");
|
1525
1534
|
logger.logEvent(LogEvent.MainBeaconSent, [mainBeaconUrl]);
|
1526
1535
|
_sendBeacon(mainBeaconUrl);
|
1527
1536
|
// Set some states.
|
@@ -1529,34 +1538,9 @@
|
|
1529
1538
|
gbNavSent = 1;
|
1530
1539
|
gbIxSent = sIx ? 1 : 0;
|
1531
1540
|
// Send other beacons for JUST User Timing.
|
1532
|
-
|
1533
|
-
|
1534
|
-
var
|
1535
|
-
if (sUT_remainder.length <= avail) {
|
1536
|
-
// We can fit ALL the remaining UT params.
|
1537
|
-
sUT_cur = sUT_remainder;
|
1538
|
-
sUT_remainder = "";
|
1539
|
-
}
|
1540
|
-
else {
|
1541
|
-
// We have to take a subset of the remaining UT params.
|
1542
|
-
var iComma = sUT_remainder.lastIndexOf(",", avail); // as many UT tuples as possible
|
1543
|
-
if (-1 === iComma) {
|
1544
|
-
// Trouble: we have SO LITTLE available space we can not fit the first UT tuple.
|
1545
|
-
// Try it anyway but find it by searching from the front.
|
1546
|
-
iComma = sUT_remainder.indexOf(",");
|
1547
|
-
}
|
1548
|
-
if (-1 === iComma) {
|
1549
|
-
// The is only one UT tuple left, but it is bigger than the available space.
|
1550
|
-
// Take the whole tuple even tho it is too big.
|
1551
|
-
sUT_cur = sUT_remainder;
|
1552
|
-
sUT_remainder = "";
|
1553
|
-
}
|
1554
|
-
else {
|
1555
|
-
sUT_cur = sUT_remainder.substring(0, iComma);
|
1556
|
-
sUT_remainder = sUT_remainder.substring(iComma + 1);
|
1557
|
-
}
|
1558
|
-
}
|
1559
|
-
var utBeaconUrl = baseUrl + "&UT=" + sUT_cur;
|
1541
|
+
while (remainingUtValues.length) {
|
1542
|
+
_a = fitUserTimingEntries(remainingUtValues, globalConfig, baseUrl), beaconUtValues = _a[0], remainingUtValues = _a[1];
|
1543
|
+
var utBeaconUrl = baseUrl + "&UT=" + beaconUtValues.join(",");
|
1560
1544
|
logger.logEvent(LogEvent.UserTimingBeaconSent, [utBeaconUrl]);
|
1561
1545
|
_sendBeacon(utBeaconUrl);
|
1562
1546
|
}
|
@@ -1574,26 +1558,10 @@
|
|
1574
1558
|
}
|
1575
1559
|
var sIx = ixValues(); // Interaction Metrics
|
1576
1560
|
if (sIx) {
|
1577
|
-
var
|
1578
|
-
|
1579
|
-
|
1580
|
-
|
1581
|
-
customerid +
|
1582
|
-
"&sid=" +
|
1583
|
-
gSyncId +
|
1584
|
-
"&uid=" +
|
1585
|
-
gUid +
|
1586
|
-
(sCustomerData ? "&CD=" + sCustomerData : "") +
|
1587
|
-
"&l=" +
|
1588
|
-
encodeURIComponent(_getPageLabel()) +
|
1589
|
-
"&IX=" +
|
1590
|
-
sIx +
|
1591
|
-
(gFirstInputDelay ? "&FID=" + gFirstInputDelay : "") +
|
1592
|
-
"&HN=" +
|
1593
|
-
encodeURIComponent(document.location.hostname) +
|
1594
|
-
"&PN=" +
|
1595
|
-
encodeURIComponent(document.location.pathname);
|
1596
|
-
var beaconUrl = globalConfig.beaconUrl + querystring;
|
1561
|
+
var beaconUrl = _getBeaconUrl() +
|
1562
|
+
"&IX=" +
|
1563
|
+
sIx +
|
1564
|
+
(typeof gFirstInputDelay !== "undefined" ? "&FID=" + gFirstInputDelay : "");
|
1597
1565
|
logger.logEvent(LogEvent.InteractionBeaconSent, [beaconUrl]);
|
1598
1566
|
_sendBeacon(beaconUrl);
|
1599
1567
|
gbIxSent = 1;
|
@@ -1612,23 +1580,7 @@
|
|
1612
1580
|
}
|
1613
1581
|
var sCustomerData = customerDataValues(); // customer data
|
1614
1582
|
if (sCustomerData) {
|
1615
|
-
var
|
1616
|
-
SCRIPT_VERSION +
|
1617
|
-
"&id=" +
|
1618
|
-
customerid +
|
1619
|
-
"&sid=" +
|
1620
|
-
gSyncId +
|
1621
|
-
"&uid=" +
|
1622
|
-
gUid +
|
1623
|
-
"&CD=" +
|
1624
|
-
sCustomerData +
|
1625
|
-
"&l=" +
|
1626
|
-
encodeURIComponent(_getPageLabel()) +
|
1627
|
-
"&HN=" +
|
1628
|
-
encodeURIComponent(document.location.hostname) +
|
1629
|
-
"&PN=" +
|
1630
|
-
encodeURIComponent(document.location.pathname);
|
1631
|
-
var beaconUrl = globalConfig.beaconUrl + querystring;
|
1583
|
+
var beaconUrl = _getBeaconUrl();
|
1632
1584
|
logger.logEvent(LogEvent.CustomDataBeaconSent, [beaconUrl]);
|
1633
1585
|
_sendBeacon(beaconUrl);
|
1634
1586
|
}
|
@@ -5,3 +5,31 @@
|
|
5
5
|
.gem-c-accordion__show-all > * {
|
6
6
|
pointer-events: none;
|
7
7
|
}
|
8
|
+
|
9
|
+
// This is in place until a proper fix comes through from GOV.UK Frontend.
|
10
|
+
//
|
11
|
+
// TODO: Replace with the print styles that will come from GOV.UK Frontend.
|
12
|
+
|
13
|
+
@include govuk-media-query($media-type: print) {
|
14
|
+
// Open all of the accordion sections.
|
15
|
+
.govuk-accordion__section-content {
|
16
|
+
display: block !important; // stylelint-disable-line declaration-no-important
|
17
|
+
}
|
18
|
+
|
19
|
+
// Change the colour from the blue link colour to black.
|
20
|
+
.govuk-accordion__section-button {
|
21
|
+
color: govuk-colour("black") !important; // stylelint-disable-line declaration-no-important
|
22
|
+
}
|
23
|
+
|
24
|
+
// Change the summary subheading size.
|
25
|
+
.govuk-accordion__section-summary {
|
26
|
+
@include govuk-typography-common;
|
27
|
+
@include govuk-typography-responsive($size: 16, $important: true);
|
28
|
+
}
|
29
|
+
|
30
|
+
// Hide the unusable "Show all" and "Show" sections.
|
31
|
+
.govuk-accordion__show-all,
|
32
|
+
.govuk-accordion__section-toggle {
|
33
|
+
display: none !important; // stylelint-disable-line declaration-no-important
|
34
|
+
}
|
35
|
+
}
|
@@ -100,3 +100,14 @@
|
|
100
100
|
content: none;
|
101
101
|
}
|
102
102
|
}
|
103
|
+
|
104
|
+
@include govuk-media-query($media-type: print) {
|
105
|
+
.gem-c-button {
|
106
|
+
@include govuk-font(14);
|
107
|
+
display: inline-block;
|
108
|
+
padding: govuk-spacing(1);
|
109
|
+
border: solid 1px govuk-colour("black");
|
110
|
+
color: $govuk-text-colour;
|
111
|
+
text-decoration: none;
|
112
|
+
}
|
113
|
+
}
|
@@ -107,3 +107,22 @@
|
|
107
107
|
.gem-c-cards__description {
|
108
108
|
margin: 0 govuk-spacing(-6) 0 0;
|
109
109
|
}
|
110
|
+
|
111
|
+
@include govuk-media-query($media-type: print) {
|
112
|
+
.gem-c-cards__list {
|
113
|
+
display: block;
|
114
|
+
}
|
115
|
+
|
116
|
+
.gem-c-cards__list-item {
|
117
|
+
padding-bottom: 0;
|
118
|
+
}
|
119
|
+
|
120
|
+
.gem-c-cards__sub-heading {
|
121
|
+
margin-top: govuk-spacing(4);
|
122
|
+
margin-bottom: govuk-spacing(1);
|
123
|
+
}
|
124
|
+
|
125
|
+
.gem-c-cards__link:before {
|
126
|
+
display: none;
|
127
|
+
}
|
128
|
+
}
|
@@ -74,3 +74,23 @@
|
|
74
74
|
vertical-align: top;
|
75
75
|
}
|
76
76
|
}
|
77
|
+
|
78
|
+
@include govuk-media-query($media-type: print) {
|
79
|
+
// Override default browser indentation
|
80
|
+
.gem-c-contents-list__list,
|
81
|
+
.gem-c-contents-list__nested-list {
|
82
|
+
padding-left: 0;
|
83
|
+
margin-left: 0;
|
84
|
+
}
|
85
|
+
|
86
|
+
// Put indentation back where we use list style types
|
87
|
+
.gem-c-contents-list__list-item--dashed {
|
88
|
+
margin-left: govuk-spacing(3);
|
89
|
+
list-style-type: disc;
|
90
|
+
}
|
91
|
+
|
92
|
+
.gem-c-contents-list__list-item--numbered,
|
93
|
+
.gem-c-contents-list__list-item--parent {
|
94
|
+
list-style-type: none;
|
95
|
+
}
|
96
|
+
}
|
@@ -77,3 +77,9 @@ $govuk-cookie-banner-background: govuk-colour("light-grey", "grey-4");
|
|
77
77
|
margin-bottom: - govuk-spacing(2);
|
78
78
|
}
|
79
79
|
}
|
80
|
+
|
81
|
+
@include govuk-media-query($media-type: print) {
|
82
|
+
.gem-c-cookie-banner {
|
83
|
+
display: none !important; // stylelint-disable-line declaration-no-important
|
84
|
+
}
|
85
|
+
}
|
@@ -27,3 +27,86 @@
|
|
27
27
|
text-align: start;
|
28
28
|
}
|
29
29
|
}
|
30
|
+
|
31
|
+
@include govuk-media-query($media-type: print) {
|
32
|
+
// stylelint-disable max-nesting-depth
|
33
|
+
|
34
|
+
.gem-c-govspeak {
|
35
|
+
.media-player {
|
36
|
+
display: none;
|
37
|
+
}
|
38
|
+
|
39
|
+
.info-notice,
|
40
|
+
.help-notice,
|
41
|
+
.call-to-action {
|
42
|
+
margin: govuk-spacing(3) 0;
|
43
|
+
}
|
44
|
+
|
45
|
+
.call-to-action {
|
46
|
+
background: none;
|
47
|
+
border: 1pt solid $govuk-border-colour;
|
48
|
+
padding: govuk-spacing(3);
|
49
|
+
}
|
50
|
+
|
51
|
+
.help-notice p {
|
52
|
+
font-weight: 700;
|
53
|
+
}
|
54
|
+
|
55
|
+
.fraction {
|
56
|
+
img {
|
57
|
+
display: inline-block;
|
58
|
+
margin-bottom: -7px;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
.attachment {
|
63
|
+
margin: govuk-spacing(6) 0;
|
64
|
+
|
65
|
+
&:first-child {
|
66
|
+
margin-top: 0;
|
67
|
+
}
|
68
|
+
|
69
|
+
.attachment-thumb {
|
70
|
+
display: none;
|
71
|
+
}
|
72
|
+
|
73
|
+
.attachment-details {
|
74
|
+
.download {
|
75
|
+
display: block;
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
79
|
+
.accessibility-warning {
|
80
|
+
h2 {
|
81
|
+
@include govuk-font(14);
|
82
|
+
}
|
83
|
+
|
84
|
+
.toggler {
|
85
|
+
display: none;
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
89
|
+
|
90
|
+
.footnotes {
|
91
|
+
border-top: 1px solid $govuk-text-colour;
|
92
|
+
|
93
|
+
a[role="doc-backlink"] {
|
94
|
+
display: none;
|
95
|
+
}
|
96
|
+
}
|
97
|
+
|
98
|
+
.legislative-list {
|
99
|
+
padding-left: 0;
|
100
|
+
|
101
|
+
&,
|
102
|
+
ol {
|
103
|
+
list-style: none;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
107
|
+
.mc-toggle-button,
|
108
|
+
.mc-chart-container {
|
109
|
+
display: none;
|
110
|
+
}
|
111
|
+
}
|
112
|
+
}
|
data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss
CHANGED
@@ -17,3 +17,18 @@
|
|
17
17
|
@include govuk-font(19, $weight: bold);
|
18
18
|
display: block;
|
19
19
|
}
|
20
|
+
|
21
|
+
@include govuk-media-query($media-type: print) {
|
22
|
+
.gem-c-step-nav-header {
|
23
|
+
padding: 0 0 govuk-spacing(4) 0;
|
24
|
+
background: none;
|
25
|
+
}
|
26
|
+
|
27
|
+
.gem-c-step-nav-header__part-of {
|
28
|
+
display: block;
|
29
|
+
}
|
30
|
+
|
31
|
+
.gem-c-step-nav-header__title {
|
32
|
+
@include govuk-font(24, $weight: bold);
|
33
|
+
}
|
34
|
+
}
|
@@ -532,3 +532,9 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
|
|
532
532
|
content: " \2013\00a0"; // dash followed by
|
533
533
|
}
|
534
534
|
}
|
535
|
+
|
536
|
+
@include govuk-media-query($media-type: print) {
|
537
|
+
.gem-c-step-nav__panel {
|
538
|
+
display: block !important; // stylelint-disable-line declaration-no-important
|
539
|
+
}
|
540
|
+
}
|
@@ -9,3 +9,19 @@
|
|
9
9
|
}
|
10
10
|
}
|
11
11
|
}
|
12
|
+
|
13
|
+
@include govuk-media-query($media-type: print) {
|
14
|
+
.gem-c-textarea {
|
15
|
+
.gem-c-label,
|
16
|
+
.gem-c-error-message,
|
17
|
+
.govuk-hint,
|
18
|
+
.govuk-character-count__message {
|
19
|
+
display: block;
|
20
|
+
}
|
21
|
+
|
22
|
+
.govuk-textarea {
|
23
|
+
width: 400px;
|
24
|
+
height: 40px;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|