@govuk-one-login/frontend-ui 1.3.10 → 1.3.12
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/build/cjs/backend/index.cjs +14 -6
- package/build/cjs/backend/index.d.cts +0 -2
- package/build/cjs/backend/index.d.ts +0 -2
- package/build/cjs/backend/index.d.ts.map +1 -1
- package/build/components/bases/mobile/mobile-base.njk +2 -1
- package/build/components/phase-banner/template.njk +2 -2
- package/build/esm/backend/index.d.ts +0 -2
- package/build/esm/backend/index.d.ts.map +1 -1
- package/build/esm/backend/index.js +14 -6
- package/package.json +1 -1
|
@@ -68,8 +68,7 @@ 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)."
|
|
72
|
-
ariaLabel: "Rhyddhau Baner Cyfnod"
|
|
71
|
+
link: "rhoi eich adborth (agor mewn tab newydd)."
|
|
73
72
|
};
|
|
74
73
|
var skipLink$1 = {
|
|
75
74
|
title: "Neidio i'r prif gynnwys"
|
|
@@ -148,8 +147,7 @@ var languageSelect = {
|
|
|
148
147
|
var phaseBanner = {
|
|
149
148
|
tag: "BETA",
|
|
150
149
|
text: "This is a new service. Help us improve it and ",
|
|
151
|
-
link: "give your feedback (opens in a new tab)."
|
|
152
|
-
ariaLabel: "Release Phase Banner"
|
|
150
|
+
link: "give your feedback (opens in a new tab)."
|
|
153
151
|
};
|
|
154
152
|
var skipLink = {
|
|
155
153
|
title: "Skip to main content"
|
|
@@ -195,8 +193,18 @@ function contactUsUrl(baseUrl, urlToAppend) {
|
|
|
195
193
|
if (!baseUrl) {
|
|
196
194
|
return null;
|
|
197
195
|
}
|
|
198
|
-
|
|
199
|
-
|
|
196
|
+
try {
|
|
197
|
+
const newUrl = new URL(urlToAppend); // Create a new URL object to modify
|
|
198
|
+
newUrl.search = ''; // Remove the query parameters
|
|
199
|
+
const encodedUrl = encodeURIComponent(newUrl.toString()); // Encode the entire URL
|
|
200
|
+
const searchParams = new URLSearchParams({ fromURL: encodedUrl });
|
|
201
|
+
return `${baseUrl}?${searchParams.toString()}`;
|
|
202
|
+
}
|
|
203
|
+
catch (_a) {
|
|
204
|
+
const encodedUrlToAppend = encodeURIComponent(urlToAppend);
|
|
205
|
+
const searchParams = new URLSearchParams({ fromURL: encodedUrlToAppend });
|
|
206
|
+
return `${baseUrl}?${searchParams.toString()}`;
|
|
207
|
+
}
|
|
200
208
|
}
|
|
201
209
|
const setBaseTranslations = (instanceI18n, filePath) => {
|
|
202
210
|
["cy", "en"].forEach((locale) => {
|
|
@@ -87,7 +87,6 @@ export declare const frontendUiTranslationEn: {
|
|
|
87
87
|
tag: string;
|
|
88
88
|
text: string;
|
|
89
89
|
link: string;
|
|
90
|
-
ariaLabel: string;
|
|
91
90
|
};
|
|
92
91
|
skipLink: {
|
|
93
92
|
title: string;
|
|
@@ -146,7 +145,6 @@ export declare const frontendUiTranslationCy: {
|
|
|
146
145
|
tag: string;
|
|
147
146
|
text: string;
|
|
148
147
|
link: string;
|
|
149
|
-
ariaLabel: string;
|
|
150
148
|
};
|
|
151
149
|
skipLink: {
|
|
152
150
|
title: string;
|
|
@@ -87,7 +87,6 @@ export declare const frontendUiTranslationEn: {
|
|
|
87
87
|
tag: string;
|
|
88
88
|
text: string;
|
|
89
89
|
link: string;
|
|
90
|
-
ariaLabel: string;
|
|
91
90
|
};
|
|
92
91
|
skipLink: {
|
|
93
92
|
title: string;
|
|
@@ -146,7 +145,6 @@ export declare const frontendUiTranslationCy: {
|
|
|
146
145
|
tag: string;
|
|
147
146
|
text: string;
|
|
148
147
|
link: string;
|
|
149
|
-
ariaLabel: string;
|
|
150
148
|
};
|
|
151
149
|
skipLink: {
|
|
152
150
|
title: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceR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AAW,EAAE,MAAM,iBAkBhE;AAED,eAAO,MAAM,mBAAmB,GAC9B,cAAc,OAAO,OAAO,EAC5B,WAAW,MAAM,SASlB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,MAAM,EACd,WAAW,MAAM,KAChB,MAAM,CAAC,MAAM,EAAE,OAAO,CAuBxB,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAgB,CAAC;AACrD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAgB,CAAC"}
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
{{ phaseBanner.text }}
|
|
17
17
|
{% endif %}
|
|
18
18
|
<a class="govuk-link"
|
|
19
|
-
aria-label= "{{ phaseBanner.ariaLabel }}"
|
|
20
19
|
rel="noopener"
|
|
21
20
|
target="_blank"
|
|
22
|
-
href="{{
|
|
21
|
+
{% if params.noAppend %} href="{{ params.contactUrl }}" {% endif %}
|
|
22
|
+
{% if params.noAppend != 'true' %} href="{{ contactUsUrl(params.contactUrl, params.url) or contactUsUrl('https://signin.account.gov.uk/contact-us', params.url) }}" {% endif %}>
|
|
23
23
|
{{ phaseBanner.link }}
|
|
24
24
|
</a>
|
|
25
25
|
</span>
|
|
@@ -87,7 +87,6 @@ export declare const frontendUiTranslationEn: {
|
|
|
87
87
|
tag: string;
|
|
88
88
|
text: string;
|
|
89
89
|
link: string;
|
|
90
|
-
ariaLabel: string;
|
|
91
90
|
};
|
|
92
91
|
skipLink: {
|
|
93
92
|
title: string;
|
|
@@ -146,7 +145,6 @@ export declare const frontendUiTranslationCy: {
|
|
|
146
145
|
tag: string;
|
|
147
146
|
text: string;
|
|
148
147
|
link: string;
|
|
149
|
-
ariaLabel: string;
|
|
150
148
|
};
|
|
151
149
|
skipLink: {
|
|
152
150
|
title: string;
|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UAU3D;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,iBAkBhE;AAED,eAAO,MAAM,mBAAmB,GAC9B,cAAc,OAAO,OAAO,EAC5B,WAAW,MAAM,SASlB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,MAAM,EACd,WAAW,MAAM,KAChB,MAAM,CAAC,MAAM,EAAE,OAAO,CAuBxB,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAgB,CAAC;AACrD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAgB,CAAC"}
|
|
@@ -66,8 +66,7 @@ var languageSelect$1 = {
|
|
|
66
66
|
var phaseBanner$1 = {
|
|
67
67
|
tag: "BETA",
|
|
68
68
|
text: "Mae hwn yn wasanaeth newydd. Helpwch ni i'w wella a ",
|
|
69
|
-
link: "rhoi eich adborth (agor mewn tab newydd)."
|
|
70
|
-
ariaLabel: "Rhyddhau Baner Cyfnod"
|
|
69
|
+
link: "rhoi eich adborth (agor mewn tab newydd)."
|
|
71
70
|
};
|
|
72
71
|
var skipLink$1 = {
|
|
73
72
|
title: "Neidio i'r prif gynnwys"
|
|
@@ -146,8 +145,7 @@ var languageSelect = {
|
|
|
146
145
|
var phaseBanner = {
|
|
147
146
|
tag: "BETA",
|
|
148
147
|
text: "This is a new service. Help us improve it and ",
|
|
149
|
-
link: "give your feedback (opens in a new tab)."
|
|
150
|
-
ariaLabel: "Release Phase Banner"
|
|
148
|
+
link: "give your feedback (opens in a new tab)."
|
|
151
149
|
};
|
|
152
150
|
var skipLink = {
|
|
153
151
|
title: "Skip to main content"
|
|
@@ -193,8 +191,18 @@ function contactUsUrl(baseUrl, urlToAppend) {
|
|
|
193
191
|
if (!baseUrl) {
|
|
194
192
|
return null;
|
|
195
193
|
}
|
|
196
|
-
|
|
197
|
-
|
|
194
|
+
try {
|
|
195
|
+
const newUrl = new URL(urlToAppend); // Create a new URL object to modify
|
|
196
|
+
newUrl.search = ''; // Remove the query parameters
|
|
197
|
+
const encodedUrl = encodeURIComponent(newUrl.toString()); // Encode the entire URL
|
|
198
|
+
const searchParams = new URLSearchParams({ fromURL: encodedUrl });
|
|
199
|
+
return `${baseUrl}?${searchParams.toString()}`;
|
|
200
|
+
}
|
|
201
|
+
catch (_a) {
|
|
202
|
+
const encodedUrlToAppend = encodeURIComponent(urlToAppend);
|
|
203
|
+
const searchParams = new URLSearchParams({ fromURL: encodedUrlToAppend });
|
|
204
|
+
return `${baseUrl}?${searchParams.toString()}`;
|
|
205
|
+
}
|
|
198
206
|
}
|
|
199
207
|
const setBaseTranslations = (instanceI18n, filePath) => {
|
|
200
208
|
["cy", "en"].forEach((locale) => {
|