@pagopa/selfcare-common-frontend 2.1.1 → 2.2.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 CHANGED
@@ -4,8 +4,22 @@ 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.2.1](https://github.com/pagopa/selfcare-common-frontend/compare/v2.2.0...v2.2.1)
8
+
9
+ - feat: append origin=backstage query param to privacy policy and terms links [`#358`](https://github.com/pagopa/selfcare-common-frontend/pull/358)
10
+ - chore: release v2.2.0 [`#357`](https://github.com/pagopa/selfcare-common-frontend/pull/357)
11
+
12
+ #### [v2.2.0](https://github.com/pagopa/selfcare-common-frontend/compare/v2.1.1...v2.2.0)
13
+
14
+ > 30 July 2026
15
+
16
+ - chore: update @pagopa/mui-italia to 2.5.0, bump lodash, and remove @mui/utils [`#356`](https://github.com/pagopa/selfcare-common-frontend/pull/356)
17
+ - chore: release v2.1.1 [`#355`](https://github.com/pagopa/selfcare-common-frontend/pull/355)
18
+
7
19
  #### [v2.1.1](https://github.com/pagopa/selfcare-common-frontend/compare/v2.1.0...v2.1.1)
8
20
 
21
+ > 29 July 2026
22
+
9
23
  - [SELC-9128] feat: configuration OneTrust cookie consent [`#354`](https://github.com/pagopa/selfcare-common-frontend/pull/354)
10
24
  - chore: release v2.1.0 [`#353`](https://github.com/pagopa/selfcare-common-frontend/pull/353)
11
25
  - [SELC-9128] feat: configuration OneTrust cookie consent (#354) [`#9128`](https://pagopa.atlassian.net/browse/9128)
package/lib/config/env.js CHANGED
@@ -1,3 +1,13 @@
1
+ import { isPagoPaUser } from "../utils/storage";
2
+ const isFromBackstage = isPagoPaUser() || window.location.pathname.endsWith('/google');
3
+ /** Appends an `origin=backstage` query param to the given url when the current user/context is coming from Backstage, so that destination pages (e.g. Privacy Policy, Terms and Conditions) can detect it and render the appropriate content/script. */
4
+ const appendBackstageParam = (url) => {
5
+ if (!url || !isFromBackstage) {
6
+ return url;
7
+ }
8
+ const separator = url.includes('?') ? '&' : '?';
9
+ return `${url}${separator}origin=backstage`;
10
+ };
1
11
  export const CONFIG = {
2
12
  URL_FE: {
3
13
  LOGIN_GOOGLE: '/auth/google',
@@ -37,8 +47,8 @@ export const CONFIG = {
37
47
  FOOTER: {
38
48
  LINK: {
39
49
  PAGOPALINK: 'https://www.pagopa.it/',
40
- PRIVACYPOLICY: import.meta.env.VITE_URL_PRIVACY_DISCLAIMER || '',
41
- TERMSANDCONDITIONS: import.meta.env.VITE_URL_TERMS_AND_CONDITIONS || '',
50
+ PRIVACYPOLICY: appendBackstageParam(import.meta.env.VITE_URL_PRIVACY_DISCLAIMER || ''),
51
+ TERMSANDCONDITIONS: appendBackstageParam(import.meta.env.VITE_URL_TERMS_AND_CONDITIONS || ''),
42
52
  PROTECTIONOFPERSONALDATA: 'https://privacyportal-de.onetrust.com/webform/77f17844-04c3-4969-a11d-462ee77acbe1/9ab6533d-be4a-482e-929a-0d8d2ab29df8',
43
53
  ABOUTUS: 'https://www.pagopa.it/it/societa/chi-siamo/',
44
54
  MEDIA: 'https://www.pagopa.it/it/',
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.1.1",
4
+ "version": "2.2.1",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/pagopa/selfcare-common-frontend",
7
7
  "author": "https://www.pagopa.gov.it",
@@ -20,8 +20,7 @@
20
20
  "@mui/lab": "^5.0.0-alpha.137",
21
21
  "@mui/material": "^5.14.1",
22
22
  "@mui/system": "^5.14.1",
23
- "@mui/utils": "^7.3.9",
24
- "@pagopa/mui-italia": "^2.4.1",
23
+ "@pagopa/mui-italia": "2.5.0",
25
24
  "@pagopa/ts-commons": "^13.1.2",
26
25
  "@reduxjs/toolkit": "^2.9.0",
27
26
  "async": "3.2.4",
@@ -29,7 +28,7 @@
29
28
  "i18next": "^25.4.2",
30
29
  "i18next-browser-languagedetector": "^8.0.0",
31
30
  "io-ts": "^2.2.16",
32
- "lodash": "^4.17.21",
31
+ "lodash": "^4.18.1",
33
32
  "mixpanel-browser": "^2.74.0",
34
33
  "react": "^18.2.0",
35
34
  "react-dom": "^18.2.0",