@govuk-one-login/frontend-ui 1.2.0 → 1.3.0
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.
- package/README.md +3 -3
- package/build/all.css +1 -1
- package/build/cjs/index-fe.cjs +102 -116
- package/build/cjs/index.cjs +6 -4
- package/build/cjs/index.d.ts +1 -37
- package/build/cjs/index.d.ts.map +1 -1
- package/build/cjs/typescript/spinner.d.ts +6 -0
- package/build/cjs/typescript/spinner.d.ts.map +1 -0
- package/build/cjs/utils/types.d.ts +51 -0
- package/build/cjs/utils/types.d.ts.map +1 -0
- package/build/components/bases/auth/auth-base.njk +1 -1
- package/build/components/bases/home/home-base.njk +1 -1
- package/build/components/bases/identity/identity-base-form.njk +1 -1
- package/build/components/bases/identity/identity-base-page.njk +10 -1
- package/build/components/bases/ipv-core/ipv-core-base.njk +1 -1
- package/build/components/bases/mobile/mobile-base.njk +1 -1
- package/build/components/cookie-banner/template.njk +12 -3
- package/build/components/footer/_index.scss +9 -0
- package/build/components/footer/template.njk +1 -1
- package/build/components/header/_index.scss +63 -34
- package/build/components/header/template.njk +4 -4
- package/build/components/phase-banner/_index.scss +6 -0
- package/build/components/phase-banner/template.njk +2 -1
- package/build/components/skip-link/template.njk +5 -1
- package/build/esm/index-fe.js +102 -116
- package/build/esm/index.d.ts +1 -37
- package/build/esm/index.d.ts.map +1 -1
- package/build/esm/index.js +6 -4
- package/build/esm/typescript/spinner.d.ts +6 -0
- package/build/esm/typescript/spinner.d.ts.map +1 -0
- package/build/esm/utils/types.d.ts +51 -0
- package/build/esm/utils/types.d.ts.map +1 -0
- package/package.json +11 -6
- package/build/cjs/__tests__/index.spec.d.ts +0 -2
- package/build/cjs/__tests__/index.spec.d.ts.map +0 -1
- package/build/cjs/__tests__/logger.spec.d.ts +0 -2
- package/build/cjs/__tests__/logger.spec.d.ts.map +0 -1
- package/build/components/spinner/javascript/spinner.js +0 -118
- package/build/esm/__tests__/index.spec.d.ts +0 -2
- package/build/esm/__tests__/index.spec.d.ts.map +0 -1
- package/build/esm/__tests__/logger.spec.d.ts +0 -2
- package/build/esm/__tests__/logger.spec.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -44,17 +44,17 @@ const frontendUi = require("@govuk-one-login/frontend-ui");
|
|
|
44
44
|
|
|
45
45
|
nunjucksEnv.addGlobal("addLanguageParam", frontendUi.addLanguageParam);
|
|
46
46
|
nunjucksEnv.addGlobal("contactUsUrl", frontendUi.contactUsUrl);
|
|
47
|
-
nunjucksEnv.addGlobal("
|
|
47
|
+
nunjucksEnv.addGlobal("MAY_2025_REBRAND_ENABLED", process.env.MAY_2025_REBRAND_ENABLED == "true");
|
|
48
48
|
```
|
|
49
49
|
Typescript:
|
|
50
50
|
```typescript
|
|
51
51
|
import {contactUsUrl, addLanguageParam } from "@govuk-one-login/frontend-ui";
|
|
52
52
|
nunjucksEnv.addGlobal("addLanguageParam", addLanguageParam);
|
|
53
53
|
nunjucksEnv.addGlobal("contactUsUrl", contactUsUrl);
|
|
54
|
-
nunjucksEnv.addGlobal("
|
|
54
|
+
nunjucksEnv.addGlobal("MAY_2025_REBRAND_ENABLED", process.env.MAY_2025_REBRAND_ENABLED == "true");
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
In order to use the `
|
|
57
|
+
In order to use the `MAY_2025_REBRAND_ENABLED` variable you will need to create or add to your `.env` file the following `MAY_2025_REBRAND_ENABLED=`[true/false]
|
|
58
58
|
|
|
59
59
|
### 4. Load Translations and Configure Middleware
|
|
60
60
|
|
package/build/all.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@media(max-width: 640px){.govuk-header__navigation-item{border-left:none !important}.govuk-template--rebranded .govuk-header__navigation-list{padding-bottom:0px !important}.govuk-header__navigation-item{padding-top:
|
|
1
|
+
@media(max-width: 640px){.govuk-header__navigation-item{border-left:none !important}.govuk-template--rebranded .govuk-header__navigation-list{padding-bottom:0px !important}.govuk-header__navigation-item{padding-top:8px !important}}.frontendUi_header_signOut-item{padding:5px 0px 5px 30px;border-left:1px solid #b1b4b6;margin-left:auto}.frontendUi_header_signOut-item--rebrand{border-left:none;padding:5px 0px 5px 0px;margin-left:auto;font-weight:700 !important}.frontendUi_header__signOut{display:flex;flex-wrap:wrap}.frontendUi-header__content{margin-left:auto}.govuk-header__navigation--signOut{padding:15px 0 15px !important}.govuk-template--rebranded .govuk-header__navigation{padding:15px 0 15px !important}@media(max-width: 640px){.govuk-header__navigation--signOut{padding:18px 0 8px !important}.govuk-template--rebranded .govuk-header__navigation{padding:18px 0 8px !important}}.govuk-template--rebranded .govuk-header__navigation-item a{font-weight:700 !important}.govuk-template--rebranded .govuk-header__navigation-item{padding-top:5px !important}@media(min-width: 20em)and (max-width: 48.0525em){.govuk-template--rebranded .govuk-header__navigation-list{padding-bottom:0px}}@media(max-width: 323px){.govuk-header__logo{padding-right:5px}.frontendUi_header_signOut-item{padding-left:0px}}@media(max-width: 261px){.frontendUi-header__content{margin-left:unset}.govuk-template--rebranded .govuk-header__navigation{padding:0px 0 8px !important}.govuk-header__logotype{max-width:100%;max-height:auto}.govuk-template--rebranded .govuk-header__logo{padding-top:5% !important;padding-bottom:5% !important}}.govuk-tag{font-family:"GDS Transport",arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1;display:inline-block;padding-top:5px;padding-right:8px;padding-bottom:4px;padding-left:8px;outline:2px solid rgba(0,0,0,0);outline-offset:-2px;color:#fff !important;background-color:#1d70b8 !important;letter-spacing:1px !important;text-decoration:none !important;text-transform:uppercase !important}/*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */@font-face{font-family:"GDS Transport";font-style:normal;font-weight:normal;src:url("/assets/fonts/light-94a07e06a1-v2.woff2") format("woff2"),url("/assets/fonts/light-f591b13f7d-v2.woff") format("woff");font-display:fallback}@font-face{font-family:"GDS Transport";font-style:normal;font-weight:bold;src:url("/assets/fonts/bold-b542beb274-v2.woff2") format("woff2"),url("/assets/fonts/bold-affa96571d-v2.woff") format("woff");font-display:fallback}@media print{.govuk-tag{font-family:sans-serif}}@media(min-width: 40.0625em){.govuk-tag{font-size:16px;font-size:1rem;line-height:1}}@media print{.govuk-tag{font-size:14pt;line-height:1}}@media(max-width: 256px){.govuk-phase-banner__content{display:block}}.language-select{margin:15px 0 15px 0}.language-select__list{margin-top:1em;text-align:right}.language-select__list-item{display:inline-block}.language-select__list-item:first-child::after{content:"";display:inline-block;position:relative;top:.1875em;height:1em;border-right:.09375em solid #000}.language-select__list-item a,.language-select__list-item [aria-current]{padding:.3125em}@media screen and (max-width: 641px){.language-select__list{float:none;text-align:left;padding-bottom:10px;border-bottom:1px solid #b1b4b6}}.spinner{width:80px;height:80px;border-radius:50%;border-width:12px;border-style:solid;border-color:#dee0e2;border-top-color:#005ea5;margin-bottom:govuk-spacing(3)}@media(forced-colors: active){.spinner{forced-color-adjust:none;border-top-color:rgba(0,0,0,0) !important}}@media not (prefers-reduced-motion){.spinner{-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite}}@media(prefers-reduced-motion){.spinner{transform:rotate(0.125turn)}}.spinner__ready{border-color:#005ea5;-webkit-animation:none;animation:none}#spinner-container__error .spinner,#spinner-container__error .spinner-state-text{display:none}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.centre{margin-left:auto;margin-right:auto;text-align:center;display:block}.govuk-footer__copyright-logo::before{background-image:url("../frontendUiAssets/images/govuk-crest.svg"),url("/frontendUiAssets/images/govuk-crest.svg") !important}.govuk-footer__copyright-logo{background-image:url("../frontendUiAssets/images/govuk-crest.svg"),url("/frontendUiAssets/images/govuk-crest.svg") !important}@media(max-width: 256px){.govuk-footer__crown{max-width:100%;max-height:auto}}
|
package/build/cjs/index-fe.cjs
CHANGED
|
@@ -1,122 +1,108 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const WaitInteractions = (() => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
init: () => {
|
|
107
|
-
timers.updateDomTimer = setInterval(updateDom, 2000);
|
|
108
|
-
|
|
109
|
-
timers.abortUnresponsiveRequest = setTimeout(() => {
|
|
110
|
-
reflectError();
|
|
111
|
-
}, 15000);
|
|
112
|
-
|
|
113
|
-
updateDom();
|
|
114
|
-
|
|
115
|
-
requestIDProcessingStatus().then(() => {
|
|
116
|
-
updateDom();
|
|
117
|
-
});
|
|
118
|
-
},
|
|
119
|
-
};
|
|
4
|
+
const content = {
|
|
5
|
+
initial: {
|
|
6
|
+
spinnerState: "pending",
|
|
7
|
+
},
|
|
8
|
+
complete: { spinnerState: "completed" },
|
|
9
|
+
};
|
|
10
|
+
const state = {
|
|
11
|
+
spinnerState: content.initial.spinnerState,
|
|
12
|
+
done: false,
|
|
13
|
+
virtualDom: [],
|
|
14
|
+
};
|
|
15
|
+
const timers = {};
|
|
16
|
+
const createVirtualDom = () => {
|
|
17
|
+
const initialState = [
|
|
18
|
+
{
|
|
19
|
+
nodeName: "div",
|
|
20
|
+
id: "spinner",
|
|
21
|
+
classes: ["spinner", "spinner__pending", "centre", state.spinnerState],
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
return initialState;
|
|
25
|
+
};
|
|
26
|
+
const vDomHasChanged = (currentVDom, nextVDom) => {
|
|
27
|
+
return JSON.stringify(currentVDom) !== JSON.stringify(nextVDom);
|
|
28
|
+
};
|
|
29
|
+
const updateDom = () => {
|
|
30
|
+
var _a;
|
|
31
|
+
const vDomChanged = vDomHasChanged(state.virtualDom, createVirtualDom());
|
|
32
|
+
const container = document.getElementById("spinner-container");
|
|
33
|
+
if (vDomChanged) {
|
|
34
|
+
state.virtualDom = createVirtualDom();
|
|
35
|
+
const elements = (_a = state === null || state === void 0 ? void 0 : state.virtualDom) === null || _a === void 0 ? void 0 : _a.map(convert);
|
|
36
|
+
container === null || container === void 0 ? void 0 : container.replaceChildren(...elements);
|
|
37
|
+
}
|
|
38
|
+
if (state.error) {
|
|
39
|
+
container === null || container === void 0 ? void 0 : container.classList.add("spinner-container__error");
|
|
40
|
+
}
|
|
41
|
+
if (state.done) {
|
|
42
|
+
clearInterval(timers.updateDomTimer);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
const reflectCompletion = () => {
|
|
46
|
+
state.spinnerState = "spinner__ready";
|
|
47
|
+
state.spinnerStateText = content.complete.spinnerState;
|
|
48
|
+
state.done = true;
|
|
49
|
+
};
|
|
50
|
+
const reflectError = () => {
|
|
51
|
+
state.spinnerState = "spinner__failed";
|
|
52
|
+
state.done = true;
|
|
53
|
+
state.error = true;
|
|
54
|
+
};
|
|
55
|
+
const convert = (node) => {
|
|
56
|
+
const el = document.createElement(node.nodeName);
|
|
57
|
+
if (node.text)
|
|
58
|
+
el.textContent = node.text;
|
|
59
|
+
if (node.innerHTML)
|
|
60
|
+
el.innerHTML = node.innerHTML;
|
|
61
|
+
if (node.id)
|
|
62
|
+
el.id = node.id;
|
|
63
|
+
if (node.classes)
|
|
64
|
+
el.classList.add(...node.classes);
|
|
65
|
+
return el;
|
|
66
|
+
};
|
|
67
|
+
const notInErrorOrDoneState = () => {
|
|
68
|
+
return !(state.done || state.error);
|
|
69
|
+
};
|
|
70
|
+
const requestIDProcessingStatus = async () => {
|
|
71
|
+
var _a;
|
|
72
|
+
const apiRoute = (_a = document === null || document === void 0 ? void 0 : document.getElementById("spinner-container")) === null || _a === void 0 ? void 0 : _a.dataset.apiRoute;
|
|
73
|
+
try {
|
|
74
|
+
const response = await fetch(apiRoute);
|
|
75
|
+
if (response.status !== 200) {
|
|
76
|
+
throw new Error(`Status code ${response.status} received`);
|
|
77
|
+
}
|
|
78
|
+
const data = await response.json();
|
|
79
|
+
if (data.status === "Clear to proceed") {
|
|
80
|
+
reflectCompletion();
|
|
81
|
+
}
|
|
82
|
+
else if (notInErrorOrDoneState()) {
|
|
83
|
+
setTimeout(async () => {
|
|
84
|
+
await requestIDProcessingStatus();
|
|
85
|
+
}, 1000);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
catch (e) {
|
|
89
|
+
console.log(e);
|
|
90
|
+
reflectError();
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
return {
|
|
94
|
+
state: state,
|
|
95
|
+
init: () => {
|
|
96
|
+
timers.updateDomTimer = setInterval(updateDom, 2000);
|
|
97
|
+
timers.abortUnresponsiveRequest = setTimeout(() => {
|
|
98
|
+
reflectError();
|
|
99
|
+
}, 15000);
|
|
100
|
+
updateDom();
|
|
101
|
+
requestIDProcessingStatus().then(() => {
|
|
102
|
+
updateDom();
|
|
103
|
+
});
|
|
104
|
+
},
|
|
105
|
+
};
|
|
120
106
|
})();
|
|
121
107
|
|
|
122
108
|
exports.WaitInteractions = WaitInteractions;
|
package/build/cjs/index.cjs
CHANGED
|
@@ -38,7 +38,7 @@ var footer$1 = {
|
|
|
38
38
|
text: "Telerau ac amodau"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
|
-
href: "https://
|
|
41
|
+
href: "https://www.gov.uk/government/publications/govuk-one-login-privacy-notice",
|
|
42
42
|
text: "Hysbysiad preifatrwydd"
|
|
43
43
|
},
|
|
44
44
|
{
|
|
@@ -68,7 +68,8 @@ var languageSelect$1 = {
|
|
|
68
68
|
var phaseBanner$1 = {
|
|
69
69
|
tag: "BETA",
|
|
70
70
|
text: "Mae hwn yn wasanaeth newydd. Helpwch ni i'w wella a ",
|
|
71
|
-
link: "rhoi eich adborth (agor mewn tab newydd)."
|
|
71
|
+
link: "rhoi eich adborth (agor mewn tab newydd).",
|
|
72
|
+
ariaLabel: "Rhyddhau Baner Cyfnod"
|
|
72
73
|
};
|
|
73
74
|
var skipLink$1 = {
|
|
74
75
|
title: "Neidio i'r prif gynnwys"
|
|
@@ -117,7 +118,7 @@ var footer = {
|
|
|
117
118
|
text: "Terms and conditions"
|
|
118
119
|
},
|
|
119
120
|
{
|
|
120
|
-
href: "https://
|
|
121
|
+
href: "https://www.gov.uk/government/publications/govuk-one-login-privacy-notice",
|
|
121
122
|
text: "Privacy notice"
|
|
122
123
|
},
|
|
123
124
|
{
|
|
@@ -147,7 +148,8 @@ var languageSelect = {
|
|
|
147
148
|
var phaseBanner = {
|
|
148
149
|
tag: "BETA",
|
|
149
150
|
text: "This is a new service. Help us improve it and ",
|
|
150
|
-
link: "give your feedback (opens in a new tab)."
|
|
151
|
+
link: "give your feedback (opens in a new tab).",
|
|
152
|
+
ariaLabel: "Release Phase Banner"
|
|
151
153
|
};
|
|
152
154
|
var skipLink = {
|
|
153
155
|
title: "Skip to main content"
|
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,38 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { NextFunction, Request, Response } from "express";
|
|
3
|
-
interface I18nData {
|
|
4
|
-
language: string;
|
|
5
|
-
store: {
|
|
6
|
-
data: {
|
|
7
|
-
[key: string]: unknown;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
interface ExpressRequest extends Request {
|
|
12
|
-
i18n: I18nData;
|
|
13
|
-
}
|
|
14
|
-
interface ExpressResponse extends Response {
|
|
15
|
-
locals: {
|
|
16
|
-
translations: unknown;
|
|
17
|
-
basePath?: string;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
interface PlainRequest {
|
|
21
|
-
i18n: I18nData;
|
|
22
|
-
}
|
|
23
|
-
interface PlainResponse {
|
|
24
|
-
locals: {
|
|
25
|
-
translations: unknown;
|
|
26
|
-
basePath?: string;
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
export declare function frontendUiMiddleware(req: ExpressRequest, res: ExpressResponse, next: NextFunction): void;
|
|
30
|
-
export declare function frontendUiMiddleware(req: PlainRequest, res: PlainResponse, next: NextFunction): void;
|
|
31
|
-
export declare const setFrontendUiTranslations: (instanceI18n: typeof i18next) => void;
|
|
32
|
-
export declare const frontendUiMiddlewareIdentityBypass: (req: ExpressRequest, res: ExpressResponse, next: NextFunction) => void;
|
|
33
|
-
export declare function addLanguageParam(language: string, url?: URL): string;
|
|
34
|
-
export declare function contactUsUrl(baseUrl: string, urlToAppend: string): string | null;
|
|
35
|
-
export declare const setBaseTranslations: (instanceI18n: typeof i18next, filePath?: string) => void;
|
|
36
|
-
export declare const getTranslationObject: (locale: string, filepath?: string) => Record<string, unknown>;
|
|
37
|
-
export {};
|
|
1
|
+
export { WaitInteractions } from "./typescript/spinner";
|
|
38
2
|
//# sourceMappingURL=index.d.ts.map
|
package/build/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../frontend-src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../frontend-src/typescript/spinner.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,EAEN,MAAM,gBAAgB,CAAC;AAExB,eAAO,MAAM,gBAAgB;;;CA2HzB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export interface virtualDom {
|
|
2
|
+
nodeName?: string;
|
|
3
|
+
id?: string;
|
|
4
|
+
classes?: string[];
|
|
5
|
+
}
|
|
6
|
+
export type error = {
|
|
7
|
+
spinnerState: string;
|
|
8
|
+
done: boolean;
|
|
9
|
+
virtualDom: never[];
|
|
10
|
+
state: {
|
|
11
|
+
error: boolean;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export type apiRoute = RequestInfo | URL;
|
|
15
|
+
export type content = {
|
|
16
|
+
initial: {
|
|
17
|
+
spinnerState: string | virtualDom;
|
|
18
|
+
};
|
|
19
|
+
complete: {
|
|
20
|
+
spinnerState: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export type timers = {
|
|
24
|
+
updateDomTimer?: unknown | number;
|
|
25
|
+
abortUnresponsiveRequest?: unknown | number;
|
|
26
|
+
};
|
|
27
|
+
export type state = {
|
|
28
|
+
error?: boolean | error;
|
|
29
|
+
spinnerState?: string;
|
|
30
|
+
done?: boolean;
|
|
31
|
+
virtualDom?: unknown[];
|
|
32
|
+
timers?: {
|
|
33
|
+
timers: timers;
|
|
34
|
+
};
|
|
35
|
+
spinnerStateText?: string;
|
|
36
|
+
};
|
|
37
|
+
export type node = {
|
|
38
|
+
text: object;
|
|
39
|
+
innerHTML: HTMLElement;
|
|
40
|
+
id: string;
|
|
41
|
+
classes: string[];
|
|
42
|
+
nodeName: keyof HTMLElementTagNameMap;
|
|
43
|
+
textContent: unknown | HTMLElement | string;
|
|
44
|
+
el: unknown | HTMLElement | string;
|
|
45
|
+
};
|
|
46
|
+
export type initialState = {
|
|
47
|
+
nodeName: string;
|
|
48
|
+
id: string;
|
|
49
|
+
classes: (string | undefined)[];
|
|
50
|
+
}[];
|
|
51
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../frontend-src/utils/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,MAAM,KAAK,GAAG;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,KAAK,EAAE,CAAC;IACpB,KAAK,EAAE;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG,GAAG,CAAC;AAEzC,MAAM,MAAM,OAAO,GAAG;IACpB,OAAO,EAAE;QACP,YAAY,EAAE,MAAM,GAAG,UAAU,CAAC;KACnC,CAAC;IACF,QAAQ,EAAE;QACR,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IACnB,cAAc,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAClC,wBAAwB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IAClB,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,IAAI,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,WAAW,CAAC;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,qBAAqB,CAAC;IACtC,WAAW,EAAE,OAAO,GAAG,WAAW,GAAG,MAAM,CAAC;IAC5C,EAAE,EAAE,OAAO,GAAG,WAAW,GAAG,MAAM,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC;CACjC,EAAE,CAAC"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
{% from "govuk/components/back-link/macro.njk" import govukBackLink %}
|
|
8
8
|
{% from "frontend-ui/build/components/language-select/macro.njk" import frontendUiLanguageSelect %}
|
|
9
9
|
|
|
10
|
-
{% if
|
|
10
|
+
{% if MAY_2025_REBRAND_ENABLED %}
|
|
11
11
|
{%set htmlClasses = 'govuk-template--rebranded'%}
|
|
12
12
|
{% endif %}
|
|
13
13
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
{% from "frontend-ui/build/components/language-select/macro.njk" import frontendUiLanguageSelect %}
|
|
7
7
|
{% from "frontend-ui/build/components/footer/macro.njk" import frontendUiFooter %}
|
|
8
8
|
|
|
9
|
-
{% if
|
|
9
|
+
{% if MAY_2025_REBRAND_ENABLED %}
|
|
10
10
|
{%set htmlClasses = 'govuk-template--rebranded'%}
|
|
11
11
|
{% endif %}
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
{% from "frontend-ui/build/components/footer/macro.njk" import frontendUiFooter %}
|
|
7
7
|
{% from "frontend-ui/build/components/language-select/macro.njk" import frontendUiLanguageSelect %}
|
|
8
8
|
|
|
9
|
-
{% if
|
|
9
|
+
{% if MAY_2025_REBRAND_ENABLED %}
|
|
10
10
|
{%set htmlClasses = 'govuk-template--rebranded'%}
|
|
11
11
|
{% endif %}
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
{% from "frontend-ui/build/components/footer/macro.njk" import frontendUiFooter %}
|
|
7
7
|
{% from "frontend-ui/build/components/language-select/macro.njk" import frontendUiLanguageSelect %}
|
|
8
8
|
|
|
9
|
-
{% if
|
|
9
|
+
{% if MAY_2025_REBRAND_ENABLED %}
|
|
10
10
|
{%set htmlClasses = 'govuk-template--rebranded'%}
|
|
11
11
|
{% endif %}
|
|
12
12
|
|
|
@@ -85,5 +85,14 @@
|
|
|
85
85
|
isDataSensitive:{{analyticsDataSensitive}}
|
|
86
86
|
});
|
|
87
87
|
</script>
|
|
88
|
+
|
|
89
|
+
{% if deviceIntelligenceEnabled %}
|
|
90
|
+
<script type="module" src="/public/javascripts/deviceIntelligence.js"></script>
|
|
91
|
+
<script type="module" {% if cspNonce %} nonce="{{ cspNonce }}"{% endif %}>
|
|
92
|
+
import { setFingerprintCookie } from "/public/javascripts/deviceIntelligence.js";
|
|
93
|
+
setFingerprintCookie("{{deviceIntelligenceDomain}}")
|
|
94
|
+
</script>
|
|
95
|
+
{% endif %}
|
|
96
|
+
|
|
88
97
|
{% endblock %}
|
|
89
98
|
{% endblock %}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
{% from basePath ~ "/views/shared/ga4/on-page-load-macro.njk" import ga4OnPageLoad %}
|
|
10
10
|
{% from "govuk/components/notification-banner/macro.njk" import govukNotificationBanner %}
|
|
11
11
|
|
|
12
|
-
{% if
|
|
12
|
+
{% if MAY_2025_REBRAND_ENABLED %}
|
|
13
13
|
{%set htmlClasses = 'govuk-template--rebranded'%}
|
|
14
14
|
{% endif %}
|
|
15
15
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
{% from "frontend-ui/build/components/language-select/macro.njk" import frontendUiLanguageSelect %}
|
|
8
8
|
{% from "ga4-opl/macro.njk" import ga4OnPageLoad %}
|
|
9
9
|
|
|
10
|
-
{% if
|
|
10
|
+
{% if MAY_2025_REBRAND_ENABLED %}
|
|
11
11
|
{%set htmlClasses = 'govuk-template--rebranded'%}
|
|
12
12
|
{% endif %}
|
|
13
13
|
|
|
@@ -43,17 +43,26 @@
|
|
|
43
43
|
text: cookieBanner.acceptAdditionalCookies,
|
|
44
44
|
type: "button",
|
|
45
45
|
name: "cookiesAccept",
|
|
46
|
-
value: "accept"
|
|
46
|
+
value: "accept",
|
|
47
|
+
attributes: {
|
|
48
|
+
"aria-label": cookieBanner.acceptAdditionalCookies
|
|
49
|
+
}
|
|
47
50
|
},
|
|
48
51
|
{
|
|
49
52
|
text: cookieBanner.rejectAdditionalCookies,
|
|
50
53
|
type: "button",
|
|
51
54
|
name: "cookiesReject",
|
|
52
|
-
value: "reject"
|
|
55
|
+
value: "reject",
|
|
56
|
+
attributes: {
|
|
57
|
+
"aria-label": cookieBanner.rejectAdditionalCookies
|
|
58
|
+
}
|
|
53
59
|
},
|
|
54
60
|
{
|
|
55
61
|
text: cookieBanner.viewCookies,
|
|
56
|
-
href: "https://signin.account.gov.uk/cookies"
|
|
62
|
+
href: "https://signin.account.gov.uk/cookies",
|
|
63
|
+
attributes: {
|
|
64
|
+
"aria-label": cookieBanner.viewCookies
|
|
65
|
+
}
|
|
57
66
|
}
|
|
58
67
|
]
|
|
59
68
|
},
|