@pagopa/selfcare-common-frontend 2.4.0 → 2.5.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.
- package/CHANGELOG.md +15 -0
- package/lib/components/Footer/Footer.js +4 -4
- package/lib/config/env.d.ts +1 -1
- package/lib/config/env.js +3 -22
- package/lib/locale/it.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,23 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
#### [v2.5.1](https://github.com/pagopa/selfcare-common-frontend/compare/v2.5.0...v2.5.1)
|
|
8
|
+
|
|
9
|
+
- chore: release v2.5.0 [`#364`](https://github.com/pagopa/selfcare-common-frontend/pull/364)
|
|
10
|
+
- [SELC-9321] feat: update legal information in footer text [`#365`](https://github.com/pagopa/selfcare-common-frontend/pull/365)
|
|
11
|
+
- [SELC-9321] feat: update legal information in footer text (#365) [`#9321`](https://pagopa.atlassian.net/browse/9321)
|
|
12
|
+
|
|
13
|
+
#### [v2.5.0](https://github.com/pagopa/selfcare-common-frontend/compare/v2.4.0...v2.5.0)
|
|
14
|
+
|
|
15
|
+
> 11 September 2026
|
|
16
|
+
|
|
17
|
+
- update link [`#363`](https://github.com/pagopa/selfcare-common-frontend/pull/363)
|
|
18
|
+
- chore: release v2.4.0 [`#361`](https://github.com/pagopa/selfcare-common-frontend/pull/361)
|
|
19
|
+
|
|
7
20
|
#### [v2.4.0](https://github.com/pagopa/selfcare-common-frontend/compare/v2.2.1...v2.4.0)
|
|
8
21
|
|
|
22
|
+
> 10 September 2026
|
|
23
|
+
|
|
9
24
|
- [SELC-9222] feat: update privacy policy handling and add tests for environment configurations [`#360`](https://github.com/pagopa/selfcare-common-frontend/pull/360)
|
|
10
25
|
- chore: release v2.2.1 [`#359`](https://github.com/pagopa/selfcare-common-frontend/pull/359)
|
|
11
26
|
- [SELC-9222] feat: update privacy policy handling and add tests for environment configurations (#360) [`#9222`](https://pagopa.atlassian.net/browse/9222)
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Footer as MuiItaliaFooter, } from '@pagopa/mui-italia';
|
|
3
3
|
import { useEffect } from 'react';
|
|
4
4
|
import { Trans, useTranslation } from 'react-i18next';
|
|
5
|
-
import { CONFIG } from '../../config/env';
|
|
5
|
+
import { CONFIG, showStaticPrivacyPolicy } from '../../config/env';
|
|
6
6
|
import i18n from '../../locale/locale-utils';
|
|
7
7
|
import { LANGUAGES, pagoPALink } from './FooterConfig';
|
|
8
8
|
// eslint-disable-next-line sonarjs/cognitive-complexity
|
|
@@ -56,7 +56,7 @@ export default function Footer({ loggedUser, productsJsonUrl, onExit = (exitActi
|
|
|
56
56
|
href: CONFIG.FOOTER.LINK.PRIVACYPOLICY,
|
|
57
57
|
ariaLabel: `${t('common.footer.preLoginLinks.resources.links.privacyPolicy')}: vai al link`,
|
|
58
58
|
linkType: 'external',
|
|
59
|
-
onClick:
|
|
59
|
+
onClick: showStaticPrivacyPolicy()
|
|
60
60
|
? () => window.open(CONFIG.FOOTER.LINK.PRIVACYPOLICY, '_blank', 'noopener,noreferrer')
|
|
61
61
|
: undefined,
|
|
62
62
|
},
|
|
@@ -155,7 +155,7 @@ export default function Footer({ loggedUser, productsJsonUrl, onExit = (exitActi
|
|
|
155
155
|
href: CONFIG.FOOTER.LINK.PRIVACYPOLICY,
|
|
156
156
|
ariaLabel: `${t('common.footer.postLoginLinks.privacyPolicy')}: vai al link`,
|
|
157
157
|
linkType: 'internal',
|
|
158
|
-
onClick:
|
|
158
|
+
onClick: showStaticPrivacyPolicy()
|
|
159
159
|
? () => window.open(CONFIG.FOOTER.LINK.PRIVACYPOLICY, '_blank', 'noopener,noreferrer')
|
|
160
160
|
: undefined,
|
|
161
161
|
},
|
|
@@ -178,7 +178,7 @@ export default function Footer({ loggedUser, productsJsonUrl, onExit = (exitActi
|
|
|
178
178
|
linkType: 'internal',
|
|
179
179
|
},
|
|
180
180
|
];
|
|
181
|
-
const companyLegalInfo = (_jsxs(Trans, { i18nKey: "common.footer.legalInfoText", children: [_jsx("strong", { children: "PagoPA S.p.A." }), " - Societ\u00E0 per azioni
|
|
181
|
+
const companyLegalInfo = (_jsxs(Trans, { i18nKey: "common.footer.legalInfoText", children: [_jsx("strong", { children: "PagoPA S.p.A." }), " - Societ\u00E0 per azioni - Capitale sociale di euro 1,000,000 interamente versato - Sede legale in Roma, Piazza Colonna 370, ", _jsx("br", {}), "CAP 00187 - N. di iscrizione a Registro Imprese di Roma, CF e P.IVA 15376371009"] }));
|
|
182
182
|
return (_jsx(MuiItaliaFooter, { companyLink: pagoPALink, postLoginLinks: postLoginLinks, preLoginLinks: preLoginLinks, legalInfo: companyLegalInfo, loggedUser: loggedUser, onExit: onExit, languages: LANGUAGES, onLanguageChanged: async (language) => {
|
|
183
183
|
await i18n.changeLanguage(language);
|
|
184
184
|
}, currentLangCode: lang, productsJsonUrl: productsJsonUrl }));
|
package/lib/config/env.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare const showStaticPrivacyPolicy: () => boolean;
|
|
1
2
|
export declare const CONFIG: {
|
|
2
3
|
URL_FE: {
|
|
3
4
|
LOGIN_GOOGLE: string;
|
|
@@ -38,7 +39,6 @@ export declare const CONFIG: {
|
|
|
38
39
|
LINK: {
|
|
39
40
|
PAGOPALINK: string;
|
|
40
41
|
PRIVACYPOLICY: string;
|
|
41
|
-
PRIVACYPOLICY_OPEN_IN_NEW_TAB: boolean;
|
|
42
42
|
TERMSANDCONDITIONS: string;
|
|
43
43
|
PROTECTIONOFPERSONALDATA: string;
|
|
44
44
|
ABOUTUS: string;
|
package/lib/config/env.js
CHANGED
|
@@ -10,26 +10,7 @@ const appendBackstageParam = (url) => {
|
|
|
10
10
|
};
|
|
11
11
|
const currentEnv = import.meta.env.VITE_ENV || '';
|
|
12
12
|
const isProd = currentEnv === 'PROD';
|
|
13
|
-
|
|
14
|
-
* Computes the Privacy Policy link shown in the footer.
|
|
15
|
-
* - Backstage context or PROD environment: legacy SPA route (OneTrust), with `origin=backstage` param when applicable.
|
|
16
|
-
* - Non-backstage, non-PROD (DEV/UAT/local/test): new static CDN page, bypassing the SPA route entirely.
|
|
17
|
-
* Falls back to the legacy SPA route (without backstage param) if the static URL env var is not configured.
|
|
18
|
-
*/
|
|
19
|
-
const privacyPolicyUrl = () => {
|
|
20
|
-
const legacyUrl = import.meta.env.VITE_URL_PRIVACY_DISCLAIMER || '';
|
|
21
|
-
if (isFromBackstage || isProd) {
|
|
22
|
-
return appendBackstageParam(legacyUrl);
|
|
23
|
-
}
|
|
24
|
-
const staticUrl = import.meta.env.VITE_URL_PRIVACY_POLICY_STATIC || '';
|
|
25
|
-
return staticUrl || legacyUrl;
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* `true` when the Privacy Policy link currently points to the static CDN page (i.e. non-backstage,
|
|
29
|
-
* non-PROD, with the static URL configured), so consumers can open it in a new tab instead of
|
|
30
|
-
* navigating away from the SPA. `false` for the legacy SPA route, to preserve the current behavior.
|
|
31
|
-
*/
|
|
32
|
-
const isStaticPrivacyPolicy = () => !isFromBackstage && !isProd && !!import.meta.env.VITE_URL_PRIVACY_POLICY_STATIC;
|
|
13
|
+
export const showStaticPrivacyPolicy = () => !isFromBackstage && !isProd;
|
|
33
14
|
export const CONFIG = {
|
|
34
15
|
URL_FE: {
|
|
35
16
|
LOGIN_GOOGLE: '/auth/google',
|
|
@@ -69,8 +50,8 @@ export const CONFIG = {
|
|
|
69
50
|
FOOTER: {
|
|
70
51
|
LINK: {
|
|
71
52
|
PAGOPALINK: 'https://www.pagopa.it/',
|
|
72
|
-
PRIVACYPOLICY:
|
|
73
|
-
|
|
53
|
+
PRIVACYPOLICY: showStaticPrivacyPolicy() ? import.meta.env.VITE_URL_PRIVACY_POLICY_STATIC || ''
|
|
54
|
+
: appendBackstageParam(import.meta.env.VITE_URL_PRIVACY_DISCLAIMER || ''),
|
|
74
55
|
TERMSANDCONDITIONS: appendBackstageParam(import.meta.env.VITE_URL_TERMS_AND_CONDITIONS || ''),
|
|
75
56
|
PROTECTIONOFPERSONALDATA: 'https://privacyportal-de.onetrust.com/webform/77f17844-04c3-4969-a11d-462ee77acbe1/9ab6533d-be4a-482e-929a-0d8d2ab29df8',
|
|
76
57
|
ABOUTUS: 'https://www.pagopa.it/it/societa/chi-siamo/',
|
package/lib/locale/it.js
CHANGED
|
@@ -12,7 +12,7 @@ export default {
|
|
|
12
12
|
buttonLabel: "Contatta l'assistenza",
|
|
13
13
|
},
|
|
14
14
|
footer: {
|
|
15
|
-
legalInfoText: `<0>PagoPA S.p.A.</0> - Società per azioni
|
|
15
|
+
legalInfoText: `<0>PagoPA S.p.A.</0> - Società per azioni - Capitale sociale di euro 1,000,000 interamente versato - Sede legale in Roma, Piazza Colonna 370, <2/> CAP 00187 - N. di iscrizione a Registro Imprese di Roma, CF e P.IVA 15376371009`,
|
|
16
16
|
privacyPolicyLink: 'Informativa Privacy',
|
|
17
17
|
termsAndConditionLink: 'Termini e condizioni d’uso del sito ',
|
|
18
18
|
informationSecurityLink: 'Sicurezza delle informazioni ',
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pagopa/selfcare-common-frontend",
|
|
3
3
|
"description": "Shared React components for the pagopa selfcare project",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.5.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/pagopa/selfcare-common-frontend",
|
|
7
7
|
"author": "https://www.pagopa.gov.it",
|