@pagopa/selfcare-common-frontend 1.34.62 → 1.34.65
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 +23 -2
- package/build.info +2 -2
- package/lib/hooks/useFocus.d.ts +1 -0
- package/lib/hooks/useFocus.js +13 -0
- package/lib/hooks/useFocus.js.map +1 -0
- package/lib/hooks/useLiveAnnouncerWithRegion.d.ts +4 -0
- package/lib/hooks/useLiveAnnouncerWithRegion.js +34 -0
- package/lib/hooks/useLiveAnnouncerWithRegion.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -1
- package/lib/index.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.65](https://github.com/pagopa/selfcare-common-frontend/compare/v1.35.0...v1.34.65)
|
|
8
8
|
|
|
9
|
+
- [SELC-7518] feat: add useLiveAnnouncerWithRegion hook for live announcements [`#291`](https://github.com/pagopa/selfcare-common-frontend/pull/291)
|
|
10
|
+
- [SELC-7243] feat: added hook useFocus to handle focus for accessibility [`#289`](https://github.com/pagopa/selfcare-common-frontend/pull/289)
|
|
9
11
|
- handle status code 403 [`#288`](https://github.com/pagopa/selfcare-common-frontend/pull/288)
|
|
10
12
|
- [SELC-7070] feat: handle list of success codes [`#287`](https://github.com/pagopa/selfcare-common-frontend/pull/287)
|
|
11
13
|
- [SELC-6995] feat: make the content of the diaolog avaible to the screen reader [`#286`](https://github.com/pagopa/selfcare-common-frontend/pull/286)
|
|
@@ -44,6 +46,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
44
46
|
- SELC-2590 [`#186`](https://github.com/pagopa/selfcare-common-frontend/pull/186)
|
|
45
47
|
- SELC-2590 - update common [`#185`](https://github.com/pagopa/selfcare-common-frontend/pull/185)
|
|
46
48
|
- 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)
|
|
49
|
+
- [SELC-7518] feat: add useLiveAnnouncerWithRegion hook for live announcements (#291) [`#7518`](https://pagopa.atlassian.net/browse/7518)
|
|
50
|
+
- [SELC-7243] feat: added hook useFocus to handle focus for accessibility (#289) [`#7243`](https://pagopa.atlassian.net/browse/7243)
|
|
47
51
|
- [SELC-7070] feat: handle list of success codes (#287) [`#7070`](https://pagopa.atlassian.net/browse/7070)
|
|
48
52
|
- [SELC-6995] feat: make the content of the diaolog avaible to the screen reader (#286) [`#6995`](https://pagopa.atlassian.net/browse/6995)
|
|
49
53
|
- [SELC-6986] feat: and new action and update mui italia (#285) [`#6986`](https://pagopa.atlassian.net/browse/6986)
|
|
@@ -109,10 +113,27 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
109
113
|
- Bump validator and @types/validator [`bca7ef1`](https://github.com/pagopa/selfcare-common-frontend/commit/bca7ef12f16fa24b75d5acbe5a96e1509c479b9e)
|
|
110
114
|
- Bump react and @types/react [`12e0229`](https://github.com/pagopa/selfcare-common-frontend/commit/12e02297e407502c4d1c4e97b1396e5e5de1cd9f)
|
|
111
115
|
|
|
112
|
-
#### [v1.35.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.
|
|
116
|
+
#### [v1.35.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.64...v1.35.0)
|
|
113
117
|
|
|
114
118
|
> 20 July 2023
|
|
115
119
|
|
|
120
|
+
#### [v1.34.64](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.63...v1.34.64)
|
|
121
|
+
|
|
122
|
+
> 17 July 2025
|
|
123
|
+
|
|
124
|
+
#### [v1.34.63](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.62...v1.34.63)
|
|
125
|
+
|
|
126
|
+
> 10 July 2025
|
|
127
|
+
|
|
128
|
+
- [SELC-7243] feat: added hook useFocus to handle focus for accessibility [`#289`](https://github.com/pagopa/selfcare-common-frontend/pull/289)
|
|
129
|
+
- [SELC-7243] feat: added hook useFocus to handle focus for accessibility (#289) [`#7243`](https://pagopa.atlassian.net/browse/7243)
|
|
130
|
+
|
|
131
|
+
#### [v1.34.62](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.61...v1.34.62)
|
|
132
|
+
|
|
133
|
+
> 24 June 2025
|
|
134
|
+
|
|
135
|
+
- handle status code 403 [`#288`](https://github.com/pagopa/selfcare-common-frontend/pull/288)
|
|
136
|
+
|
|
116
137
|
#### [v1.34.61](https://github.com/pagopa/selfcare-common-frontend/compare/v1.34.60...v1.34.61)
|
|
117
138
|
|
|
118
139
|
> 19 June 2025
|
package/build.info
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
tags/v1.29.0~1^2
|
|
1
|
+
20250801.1 - selfcare-common-frontend.deploy(226365)
|
|
2
|
+
tags/v1.29.0~1^2 5daf6dcae5283d2ec5237f7d893efd08e801dedf
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useFocus: (elementRef: React.RefObject<any>, dependencies?: any) => void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useFocus = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const useFocus = (elementRef, dependencies = []) => {
|
|
6
|
+
(0, react_1.useEffect)(() => {
|
|
7
|
+
if (elementRef.current) {
|
|
8
|
+
elementRef.current.focus();
|
|
9
|
+
}
|
|
10
|
+
}, [dependencies]);
|
|
11
|
+
};
|
|
12
|
+
exports.useFocus = useFocus;
|
|
13
|
+
//# sourceMappingURL=useFocus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFocus.js","sourceRoot":"","sources":["../../../src/lib/hooks/useFocus.ts"],"names":[],"mappings":";;;AAAA,iCAAkC;AAE3B,MAAM,QAAQ,GAAG,CACtB,UAAgC,EAChC,eAAoB,EAAE,EAChB,EAAE;IACR,IAAA,iBAAS,EAAC,GAAG,EAAE;QACX,IAAI,UAAU,CAAC,OAAO,EAAE;YACtB,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;SAC5B;IACL,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;AACrB,CAAC,CAAC;AATW,QAAA,QAAQ,YASnB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useLiveAnnouncerWithRegion = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const useLiveAnnouncerWithRegion = () => {
|
|
7
|
+
const [message, setMessage] = (0, react_1.useState)('');
|
|
8
|
+
const timeoutRef = (0, react_1.useRef)(null);
|
|
9
|
+
const announce = (0, react_1.useCallback)((msg) => {
|
|
10
|
+
setMessage('');
|
|
11
|
+
if (timeoutRef.current) {
|
|
12
|
+
clearTimeout(timeoutRef.current);
|
|
13
|
+
}
|
|
14
|
+
// eslint-disable-next-line functional/immutable-data
|
|
15
|
+
timeoutRef.current = window.setTimeout(() => {
|
|
16
|
+
setMessage(msg);
|
|
17
|
+
}, 100);
|
|
18
|
+
}, []);
|
|
19
|
+
(0, react_1.useEffect)(() => () => {
|
|
20
|
+
if (timeoutRef.current) {
|
|
21
|
+
clearTimeout(timeoutRef.current);
|
|
22
|
+
}
|
|
23
|
+
}, []);
|
|
24
|
+
const LiveRegion = ((0, jsx_runtime_1.jsx)("div", { "aria-live": "polite", "aria-atomic": "true", "data-testid": "live-region-announcer", style: {
|
|
25
|
+
position: 'absolute',
|
|
26
|
+
left: '-9999px',
|
|
27
|
+
height: '1px',
|
|
28
|
+
width: '1px',
|
|
29
|
+
overflow: 'hidden',
|
|
30
|
+
}, children: message }));
|
|
31
|
+
return { announce, LiveRegion };
|
|
32
|
+
};
|
|
33
|
+
exports.useLiveAnnouncerWithRegion = useLiveAnnouncerWithRegion;
|
|
34
|
+
//# sourceMappingURL=useLiveAnnouncerWithRegion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLiveAnnouncerWithRegion.js","sourceRoot":"","sources":["../../../src/lib/hooks/useLiveAnnouncerWithRegion.tsx"],"names":[],"mappings":";;;;AAAA,iCAAiE;AAE1D,MAAM,0BAA0B,GAAG,GAAG,EAAE;IAC7C,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,CAAC,CAAC;IAC3C,MAAM,UAAU,GAAG,IAAA,cAAM,EAAgB,IAAI,CAAC,CAAC;IAE/C,MAAM,QAAQ,GAAG,IAAA,mBAAW,EAAC,CAAC,GAAW,EAAE,EAAE;QAC3C,UAAU,CAAC,EAAE,CAAC,CAAC;QACf,IAAI,UAAU,CAAC,OAAO,EAAE;YACtB,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;SAClC;QACD,qDAAqD;QACrD,UAAU,CAAC,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE;YAC1C,UAAU,CAAC,GAAG,CAAC,CAAC;QAClB,CAAC,EAAE,GAAG,CAAC,CAAC;IACV,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAA,iBAAS,EACP,GAAG,EAAE,CAAC,GAAG,EAAE;QACT,IAAI,UAAU,CAAC,OAAO,EAAE;YACtB,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;SAClC;IACH,CAAC,EACD,EAAE,CACH,CAAC;IAEF,MAAM,UAAU,GAAG,CACjB,6CACY,QAAQ,iBACN,MAAM,iBACN,uBAAuB,EACnC,KAAK,EAAE;YACL,QAAQ,EAAE,UAAU;YACpB,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,KAAK;YACZ,QAAQ,EAAE,QAAQ;SACnB,YAEA,OAAO,GACJ,CACP,CAAC;IAEF,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;AAClC,CAAC,CAAC;AA1CW,QAAA,0BAA0B,8BA0CrC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -32,4 +32,5 @@ export { default as withRetrievedValue } from './decorators/withRetrievedValue';
|
|
|
32
32
|
export { default as useReduxCachedValue } from './hooks/useReduxCachedValue';
|
|
33
33
|
export { default as CustomAlert } from './components/CustomAlert';
|
|
34
34
|
export { default as useFakePagination } from './hooks/useFakePagination';
|
|
35
|
+
export { useLiveAnnouncerWithRegion } from './hooks/useLiveAnnouncerWithRegion';
|
|
35
36
|
export { usePermissions } from './hooks/usePermissions';
|
package/lib/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.usePermissions = exports.useFakePagination = exports.CustomAlert = exports.useReduxCachedValue = exports.withRetrievedValue = exports.useLogin = exports.withLogin = exports.useUnloadEventOnExit = exports.useUnloadEventLogout = exports.useUnloadEventInterceptorAndActivate = exports.useUnloadEventInterceptor = exports.UnloadEventHandler = exports.useUserNotify = exports.UserNotifyHandle = exports.useLoading = exports.LoadingOverlay = exports.useErrorDispatcher = exports.ErrorBoundary = exports.PagoPaMiniIcon = exports.PagoPaIcon = exports.FaultIcon = exports.ErrorIconExclamation = exports.ErrorIcon = exports.ConfirmIcon = exports.CheckIllustrationIcon = exports.ToastWrapper = exports.Toast = exports.TitleBox = exports.SessionModal = exports.NavigationBar = exports.LoadingOverlayComponent = exports.Header = exports.Footer = exports.FilterModal = exports.EndingPage = exports.CustomPagination = exports.CustomAvatar = exports.BackComponent = void 0;
|
|
6
|
+
exports.usePermissions = exports.useLiveAnnouncerWithRegion = exports.useFakePagination = exports.CustomAlert = exports.useReduxCachedValue = exports.withRetrievedValue = exports.useLogin = exports.withLogin = exports.useUnloadEventOnExit = exports.useUnloadEventLogout = exports.useUnloadEventInterceptorAndActivate = exports.useUnloadEventInterceptor = exports.UnloadEventHandler = exports.useUserNotify = exports.UserNotifyHandle = exports.useLoading = exports.LoadingOverlay = exports.useErrorDispatcher = exports.ErrorBoundary = exports.PagoPaMiniIcon = exports.PagoPaIcon = exports.FaultIcon = exports.ErrorIconExclamation = exports.ErrorIcon = exports.ConfirmIcon = exports.CheckIllustrationIcon = exports.ToastWrapper = exports.Toast = exports.TitleBox = exports.SessionModal = exports.NavigationBar = exports.LoadingOverlayComponent = exports.Header = exports.Footer = exports.FilterModal = exports.EndingPage = exports.CustomPagination = exports.CustomAvatar = exports.BackComponent = void 0;
|
|
7
7
|
var BackComponent_1 = require("./components/BackComponent");
|
|
8
8
|
Object.defineProperty(exports, "BackComponent", { enumerable: true, get: function () { return __importDefault(BackComponent_1).default; } });
|
|
9
9
|
var CustomAvatar_1 = require("./components/CustomAvatar");
|
|
@@ -75,6 +75,8 @@ var CustomAlert_1 = require("./components/CustomAlert");
|
|
|
75
75
|
Object.defineProperty(exports, "CustomAlert", { enumerable: true, get: function () { return __importDefault(CustomAlert_1).default; } });
|
|
76
76
|
var useFakePagination_1 = require("./hooks/useFakePagination");
|
|
77
77
|
Object.defineProperty(exports, "useFakePagination", { enumerable: true, get: function () { return __importDefault(useFakePagination_1).default; } });
|
|
78
|
+
var useLiveAnnouncerWithRegion_1 = require("./hooks/useLiveAnnouncerWithRegion");
|
|
79
|
+
Object.defineProperty(exports, "useLiveAnnouncerWithRegion", { enumerable: true, get: function () { return useLiveAnnouncerWithRegion_1.useLiveAnnouncerWithRegion; } });
|
|
78
80
|
var usePermissions_1 = require("./hooks/usePermissions");
|
|
79
81
|
Object.defineProperty(exports, "usePermissions", { enumerable: true, get: function () { return usePermissions_1.usePermissions; } });
|
|
80
82
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":";;;;;;AAAA,4DAAsE;AAA7D,+HAAA,OAAO,OAAiB;AACjC,0DAAoE;AAA3D,6HAAA,OAAO,OAAgB;AAChC,kEAA4E;AAAnE,qIAAA,OAAO,OAAoB;AACpC,sDAAgE;AAAvD,yHAAA,OAAO,OAAc;AAC9B,wDAAkE;AAAzD,2HAAA,OAAO,OAAe;AAC/B,qDAA+D;AAAtD,iHAAA,OAAO,OAAU;AAC1B,qDAA+D;AAAtD,iHAAA,OAAO,OAAU;AAC1B,gFAA0F;AAAjF,mJAAA,OAAO,OAA2B;AAC3C,4DAAsE;AAA7D,+HAAA,OAAO,OAAiB;AACjC,0DAAoE;AAA3D,6HAAA,OAAO,OAAgB;AAChC,kDAA4D;AAAnD,qHAAA,OAAO,OAAY;AAC5B,4CAAsD;AAA7C,+GAAA,OAAO,OAAS;AACzB,0DAAoE;AAA3D,6HAAA,OAAO,OAAgB;AAEhC,kFAA4F;AAAnF,+IAAA,OAAO,OAAyB;AACzC,8DAAwE;AAA/D,2HAAA,OAAO,OAAe;AAC/B,0DAAoE;AAA3D,uHAAA,OAAO,OAAa;AAC7B,gFAA0F;AAAjF,6IAAA,OAAO,OAAwB;AACxC,0DAAoE;AAA3D,uHAAA,OAAO,OAAa;AAC7B,4DAAsE;AAA7D,yHAAA,OAAO,OAAc;AAC9B,oEAA8E;AAArE,iIAAA,OAAO,OAAkB;AAElC,0EAAoF;AAA3E,+HAAA,OAAO,OAAiB;AACjC,iEAA2E;AAAlE,yIAAA,OAAO,OAAsB;AAEtC,sEAAgF;AAAvE,iIAAA,OAAO,OAAkB;AAClC,iDAA2D;AAAlD,yHAAA,OAAO,OAAc;AAE9B,kEAA4E;AAAnE,qIAAA,OAA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AoB;AACpC,uDAAiE;AAAxD,+HAAA,OAAO,OAAiB;AAEjC,sEAAgF;AAAvE,yIAAA,OAAO,OAAsB;AACtC,+EAK2C;AAJzC,sIAAA,yBAAyB,OAAA;AACzB,iJAAA,oCAAoC,OAAA;AACpC,iIAAA,oBAAoB,OAAA;AACpB,iIAAA,oBAAoB,OAAA;AAGtB,oDAA8D;AAArD,uHAAA,OAAO,OAAa;AAC7B,6CAA4C;AAAnC,oGAAA,QAAQ,OAAA;AAEjB,sEAAgF;AAAvE,yIAAA,OAAO,OAAsB;AACtC,mEAA6E;AAApE,2IAAA,OAAO,OAAuB;AAEvC,wDAAkE;AAAzD,2HAAA,OAAO,OAAe;AAC/B,+DAAyE;AAAhE,uIAAA,OAAO,OAAqB;AACrC,iFAAgF;AAAvE,wIAAA,0BAA0B,OAAA;AACnC,yDAAwD;AAA/C,gHAAA,cAAc,OAAA"}
|
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.65",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/pagopa/selfcare-common-frontend",
|
|
7
7
|
"author": "https://www.pagopa.gov.it",
|