@pagopa/selfcare-common-frontend 1.34.80 → 1.34.82
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 +17 -2
- package/build.info +2 -2
- package/lib/hooks/useLogin.js +3 -2
- package/lib/hooks/useLogin.js.map +1 -1
- package/lib/utils/api-utils.js +2 -2
- package/lib/utils/constants.d.ts +1 -0
- package/lib/utils/constants.js +2 -1
- package/lib/utils/constants.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,10 @@ 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
|
-
#### [v1.34.
|
|
7
|
+
#### [v1.34.82](https://github.com/pagopa/selfcare-common-frontend/compare/v1.35.0...v1.34.82)
|
|
8
8
|
|
|
9
|
+
- [SELC-7980] feat: add ALLOWED_PRODUCT_IDS constant for product filtering [`#318`](https://github.com/pagopa/selfcare-common-frontend/pull/318)
|
|
10
|
+
- fix: update logout URL logic to use consistent variable naming [`#317`](https://github.com/pagopa/selfcare-common-frontend/pull/317)
|
|
9
11
|
- feat: add admin Google login URL and update logout redirection logic [`#316`](https://github.com/pagopa/selfcare-common-frontend/pull/316)
|
|
10
12
|
- update product rendering logic in Header component based on user type [`#315`](https://github.com/pagopa/selfcare-common-frontend/pull/315)
|
|
11
13
|
- [SELC-7957] feat: add fixedParty prop to Header component and update product selection logic [`#314`](https://github.com/pagopa/selfcare-common-frontend/pull/314)
|
|
@@ -65,6 +67,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
65
67
|
- SELC-2590 [`#186`](https://github.com/pagopa/selfcare-common-frontend/pull/186)
|
|
66
68
|
- SELC-2590 - update common [`#185`](https://github.com/pagopa/selfcare-common-frontend/pull/185)
|
|
67
69
|
- Used a environment variable to manage correct links in the footer based to product and actual environment [`#184`](https://github.com/pagopa/selfcare-common-frontend/pull/184)
|
|
70
|
+
- [SELC-7980] feat: add ALLOWED_PRODUCT_IDS constant for product filtering (#318) [`#7980`](https://pagopa.atlassian.net/browse/7980)
|
|
68
71
|
- [SELC-7957] feat: add fixedParty prop to Header component and update product selection logic (#314) [`#7957`](https://pagopa.atlassian.net/browse/7957)
|
|
69
72
|
- [SELC-7939] feat: add isPagoPaUser utility and chip label (#313) [`#7939`](https://pagopa.atlassian.net/browse/7939)
|
|
70
73
|
- [SELC-7253] update contrast for breadcrumb (#312) [`#7253`](https://pagopa.atlassian.net/browse/7253)
|
|
@@ -137,10 +140,22 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
137
140
|
- Bump rimraf from 3.0.2 to 6.0.1 [`e6941b9`](https://github.com/pagopa/selfcare-common-frontend/commit/e6941b9e6b05c973d991e2470a851b5ca03926ce)
|
|
138
141
|
- Used a environment variable to manage correct links in the footer based to product and actual environment [`960e2fb`](https://github.com/pagopa/selfcare-common-frontend/commit/960e2fbaa8aa8f79061639b26dc1a27f28b8aae3)
|
|
139
142
|
|
|
140
|
-
#### [v1.35.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.
|
|
143
|
+
#### [v1.35.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.81...v1.35.0)
|
|
141
144
|
|
|
142
145
|
> 20 July 2023
|
|
143
146
|
|
|
147
|
+
#### [v1.34.81](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.80...v1.34.81)
|
|
148
|
+
|
|
149
|
+
> 19 November 2025
|
|
150
|
+
|
|
151
|
+
- fix: update logout URL logic to use consistent variable naming [`#317`](https://github.com/pagopa/selfcare-common-frontend/pull/317)
|
|
152
|
+
|
|
153
|
+
#### [v1.34.80](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.79...v1.34.80)
|
|
154
|
+
|
|
155
|
+
> 19 November 2025
|
|
156
|
+
|
|
157
|
+
- feat: add admin Google login URL and update logout redirection logic [`#316`](https://github.com/pagopa/selfcare-common-frontend/pull/316)
|
|
158
|
+
|
|
144
159
|
#### [v1.34.79](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.78...v1.34.79)
|
|
145
160
|
|
|
146
161
|
> 14 November 2025
|
package/build.info
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
tags/v1.29.0~1^2
|
|
1
|
+
20251125.1 - selfcare-common-frontend.deploy(246194)
|
|
2
|
+
tags/v1.29.0~1^2 4cfe5af2c7b0cf52d0a58c5b29d987f1f852a2b3
|
package/lib/hooks/useLogin.js
CHANGED
|
@@ -14,7 +14,7 @@ const mockedUser = {
|
|
|
14
14
|
name: 'loggedName',
|
|
15
15
|
surname: 'loggedSurname',
|
|
16
16
|
email: 'loggedEmail@aa.aa',
|
|
17
|
-
iss: 'SPID'
|
|
17
|
+
iss: 'SPID',
|
|
18
18
|
};
|
|
19
19
|
const useLogin = () => {
|
|
20
20
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
@@ -27,12 +27,13 @@ const useLogin = () => {
|
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
const sessionStorageUser = storage_1.storageUserOps.read();
|
|
30
|
+
const LOGIN_URL = storage_1.isPagoPaUser ? env_1.CONFIG.URL_FE.LOGIN_ADMIN_GOOGLE : env_1.CONFIG.URL_FE.LOGIN;
|
|
30
31
|
// If there are no credentials, it is impossible to get the user, so
|
|
31
32
|
if ((0, isEmpty_1.default)(sessionStorageUser)) {
|
|
32
33
|
// Remove any partial data that might have remained, just for safety
|
|
33
34
|
storage_1.storageUserOps.delete();
|
|
34
35
|
// Go to the login view
|
|
35
|
-
window.location.assign(
|
|
36
|
+
window.location.assign(LOGIN_URL);
|
|
36
37
|
// This return is necessary
|
|
37
38
|
return;
|
|
38
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLogin.js","sourceRoot":"","sources":["../../../src/lib/hooks/useLogin.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YAChC,oEAAoE;YACpE,wBAAc,CAAC,MAAM,EAAE,CAAC;YACxB,uBAAuB;YACvB,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAClC,2BAA2B;YAC3B,OAAO;QACT,CAAC;QAED,2DAA2D;QAC3D,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC9B,CAAC,CAAC;IAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAChC,CAAC,CAAC;AA9BW,QAAA,QAAQ,YA8BnB"}
|
package/lib/utils/api-utils.js
CHANGED
|
@@ -27,7 +27,7 @@ const buildFetchApi = (timeoutMs = 300000) => {
|
|
|
27
27
|
return fetchWithTimeout;
|
|
28
28
|
};
|
|
29
29
|
exports.buildFetchApi = buildFetchApi;
|
|
30
|
-
const
|
|
30
|
+
const LOGIN_URL = storage_1.isPagoPaUser ? env_1.CONFIG.URL_FE.LOGIN_ADMIN_GOOGLE : env_1.CONFIG.URL_FE.LOGOUT;
|
|
31
31
|
/** Extract the response of a @pagopa/openapi-codegen-ts generated client rest invocation having status code successHttpStatus.
|
|
32
32
|
If notValidTokenHttpStatus is not null and the returned status is equal to notValidTokenHttpStatus, it will call the onRedirectToLogin function and will schedule the redirect towards logout path.
|
|
33
33
|
If notAuthorizedTokenHttpStatus is not null and the returned status is equal to notAuthorizedTokenHttpStatus, it will throw an Error with message "Operation not allowed".
|
|
@@ -41,7 +41,7 @@ const extractResponse = async (response, successHttpStatus, onRedirectToLogin, n
|
|
|
41
41
|
}
|
|
42
42
|
else if (notValidTokenHttpStatus && response.right.status === notValidTokenHttpStatus) {
|
|
43
43
|
onRedirectToLogin();
|
|
44
|
-
window.setTimeout(() => window.location.assign(
|
|
44
|
+
window.setTimeout(() => window.location.assign(LOGIN_URL), 2000);
|
|
45
45
|
return new Promise(() => null);
|
|
46
46
|
}
|
|
47
47
|
else if (notAuthorizedTokenHttpStatus &&
|
package/lib/utils/constants.d.ts
CHANGED
package/lib/utils/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PRODUCT_IDS = exports.Actions = exports.pnpgRoleLabels = exports.roleLabels = exports.emailRegexp = exports.LOADING_TASK_RETRIEVE_CACHED_VALUES = exports.LOADING_TASK_LOGIN_CHECK = void 0;
|
|
3
|
+
exports.ALLOWED_PRODUCT_IDS = exports.PRODUCT_IDS = exports.Actions = exports.pnpgRoleLabels = exports.roleLabels = exports.emailRegexp = exports.LOADING_TASK_RETRIEVE_CACHED_VALUES = exports.LOADING_TASK_LOGIN_CHECK = void 0;
|
|
4
4
|
exports.LOADING_TASK_LOGIN_CHECK = 'LOGIN_CHECK';
|
|
5
5
|
exports.LOADING_TASK_RETRIEVE_CACHED_VALUES = 'RETRIEVE_CACHED_VALUES';
|
|
6
6
|
exports.emailRegexp = new RegExp('^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,6}$');
|
|
@@ -71,4 +71,5 @@ exports.PRODUCT_IDS = {
|
|
|
71
71
|
CGN: 'prod-cgn',
|
|
72
72
|
IDPAY_MERCHANT: 'prod-idpay-merchant',
|
|
73
73
|
};
|
|
74
|
+
exports.ALLOWED_PRODUCT_IDS = ['prod-interop'];
|
|
74
75
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/lib/utils/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,wBAAwB,GAAG,aAAa,CAAC;AACzC,QAAA,mCAAmC,GAAG,wBAAwB,CAAC;AAI/D,QAAA,WAAW,GAAG,IAAI,MAAM,CAAC,uCAAuC,CAAC,CAAC;AAE/E,MAAM,sBAAsB,GAAG;IAC7B,aAAa,EAAE,+BAA+B;IAC9C,YAAY,EAAE,8BAA8B;IAC5C,cAAc,EAAE,gCAAgC;CACjD,CAAC;AAEF,0EAA0E;AAC7D,QAAA,UAAU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D,mEAAwD,CAAA;IACxD,6EAAkE,CAAA;IAClE,yDAA8C,CAAA;IAC9C,+DAAoD,CAAA;IACpD,6DAAkD,CAAA;IAClD,2CAAgC,CAAA;IAChC,yCAA8B,CAAA;IAC9B,2DAAgD,CAAA;IAChD,6CAAkC,CAAA;AACpC,CAAC,EAnBW,OAAO,uBAAP,OAAO,QAmBlB;AAEY,QAAA,WAAW,GAAG;IACzB,MAAM,EAAE,aAAa;IACrB,EAAE,EAAE,SAAS;IACb,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,aAAa;IACvB,OAAO,EAAE,cAAc;IACvB,KAAK,EAAE,YAAY;IACnB,OAAO,EAAE,cAAc;IACvB,EAAE,EAAE,SAAS;IACb,YAAY,EAAE,mBAAmB;IACjC,aAAa,EAAE,oBAAoB;IACnC,UAAU,EAAE,iBAAiB;IAC7B,KAAK,EAAE,YAAY;IACnB,GAAG,EAAE,UAAU;IACf,cAAc,EAAE,qBAAqB;CACtC,CAAC;AAEW,QAAA,mBAAmB,GAAG,CAAC,cAAc,CAAC,CAAC"}
|
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": "1.34.
|
|
4
|
+
"version": "1.34.82",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/pagopa/selfcare-common-frontend",
|
|
7
7
|
"author": "https://www.pagopa.gov.it",
|