@pagopa/selfcare-common-frontend 2.2.1 → 2.5.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/CHANGELOG.md +15 -0
- package/lib/components/Footer/Footer.js +8 -2
- package/lib/config/env.d.ts +1 -0
- package/lib/config/env.js +5 -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.0](https://github.com/pagopa/selfcare-common-frontend/compare/v2.4.0...v2.5.0)
|
|
8
|
+
|
|
9
|
+
- update link [`#363`](https://github.com/pagopa/selfcare-common-frontend/pull/363)
|
|
10
|
+
- chore: release v2.4.0 [`#361`](https://github.com/pagopa/selfcare-common-frontend/pull/361)
|
|
11
|
+
|
|
12
|
+
#### [v2.4.0](https://github.com/pagopa/selfcare-common-frontend/compare/v2.2.1...v2.4.0)
|
|
13
|
+
|
|
14
|
+
> 10 September 2026
|
|
15
|
+
|
|
16
|
+
- [SELC-9222] feat: update privacy policy handling and add tests for environment configurations [`#360`](https://github.com/pagopa/selfcare-common-frontend/pull/360)
|
|
17
|
+
- chore: release v2.2.1 [`#359`](https://github.com/pagopa/selfcare-common-frontend/pull/359)
|
|
18
|
+
- [SELC-9222] feat: update privacy policy handling and add tests for environment configurations (#360) [`#9222`](https://pagopa.atlassian.net/browse/9222)
|
|
19
|
+
|
|
7
20
|
#### [v2.2.1](https://github.com/pagopa/selfcare-common-frontend/compare/v2.2.0...v2.2.1)
|
|
8
21
|
|
|
22
|
+
> 30 July 2026
|
|
23
|
+
|
|
9
24
|
- feat: append origin=backstage query param to privacy policy and terms links [`#358`](https://github.com/pagopa/selfcare-common-frontend/pull/358)
|
|
10
25
|
- chore: release v2.2.0 [`#357`](https://github.com/pagopa/selfcare-common-frontend/pull/357)
|
|
11
26
|
|
|
@@ -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
|
|
@@ -55,7 +55,10 @@ export default function Footer({ loggedUser, productsJsonUrl, onExit = (exitActi
|
|
|
55
55
|
label: t('common.footer.preLoginLinks.resources.links.privacyPolicy'),
|
|
56
56
|
href: CONFIG.FOOTER.LINK.PRIVACYPOLICY,
|
|
57
57
|
ariaLabel: `${t('common.footer.preLoginLinks.resources.links.privacyPolicy')}: vai al link`,
|
|
58
|
-
linkType: '
|
|
58
|
+
linkType: 'external',
|
|
59
|
+
onClick: showStaticPrivacyPolicy()
|
|
60
|
+
? () => window.open(CONFIG.FOOTER.LINK.PRIVACYPOLICY, '_blank', 'noopener,noreferrer')
|
|
61
|
+
: undefined,
|
|
59
62
|
},
|
|
60
63
|
{
|
|
61
64
|
label: t('common.footer.preLoginLinks.resources.links.certifications'),
|
|
@@ -152,6 +155,9 @@ export default function Footer({ loggedUser, productsJsonUrl, onExit = (exitActi
|
|
|
152
155
|
href: CONFIG.FOOTER.LINK.PRIVACYPOLICY,
|
|
153
156
|
ariaLabel: `${t('common.footer.postLoginLinks.privacyPolicy')}: vai al link`,
|
|
154
157
|
linkType: 'internal',
|
|
158
|
+
onClick: showStaticPrivacyPolicy()
|
|
159
|
+
? () => window.open(CONFIG.FOOTER.LINK.PRIVACYPOLICY, '_blank', 'noopener,noreferrer')
|
|
160
|
+
: undefined,
|
|
155
161
|
},
|
|
156
162
|
{
|
|
157
163
|
label: t('common.footer.postLoginLinks.protectionofpersonaldata'),
|
package/lib/config/env.d.ts
CHANGED
package/lib/config/env.js
CHANGED
|
@@ -8,6 +8,9 @@ const appendBackstageParam = (url) => {
|
|
|
8
8
|
const separator = url.includes('?') ? '&' : '?';
|
|
9
9
|
return `${url}${separator}origin=backstage`;
|
|
10
10
|
};
|
|
11
|
+
const currentEnv = import.meta.env.VITE_ENV || '';
|
|
12
|
+
const isProd = currentEnv === 'PROD';
|
|
13
|
+
export const showStaticPrivacyPolicy = () => !isFromBackstage && !isProd;
|
|
11
14
|
export const CONFIG = {
|
|
12
15
|
URL_FE: {
|
|
13
16
|
LOGIN_GOOGLE: '/auth/google',
|
|
@@ -47,7 +50,8 @@ export const CONFIG = {
|
|
|
47
50
|
FOOTER: {
|
|
48
51
|
LINK: {
|
|
49
52
|
PAGOPALINK: 'https://www.pagopa.it/',
|
|
50
|
-
PRIVACYPOLICY:
|
|
53
|
+
PRIVACYPOLICY: showStaticPrivacyPolicy() ? import.meta.env.VITE_URL_PRIVACY_POLICY_STATIC || ''
|
|
54
|
+
: appendBackstageParam(import.meta.env.VITE_URL_PRIVACY_DISCLAIMER || ''),
|
|
51
55
|
TERMSANDCONDITIONS: appendBackstageParam(import.meta.env.VITE_URL_TERMS_AND_CONDITIONS || ''),
|
|
52
56
|
PROTECTIONOFPERSONALDATA: 'https://privacyportal-de.onetrust.com/webform/77f17844-04c3-4969-a11d-462ee77acbe1/9ab6533d-be4a-482e-929a-0d8d2ab29df8',
|
|
53
57
|
ABOUTUS: 'https://www.pagopa.it/it/societa/chi-siamo/',
|
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.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/pagopa/selfcare-common-frontend",
|
|
7
7
|
"author": "https://www.pagopa.gov.it",
|