@pagopa/selfcare-common-frontend 1.10.4 → 1.10.7
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 +19 -0
- package/build.info +2 -2
- package/components/Header/subHeader/SubHeader.js +3 -1
- package/components/Header/subHeader/SubHeader.js.map +1 -1
- package/components/Toast.js +1 -1
- package/components/ToastWrapper.js +1 -1
- package/components/UserNotifyHandle.js +8 -3
- package/components/UserNotifyHandle.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,27 @@ 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.10.7](https://github.com/pagopa/selfcare-common-frontend/compare/v1.10.6...v1.10.7)
|
|
8
|
+
|
|
9
|
+
- modified z-index [`#69`](https://github.com/pagopa/selfcare-common-frontend/pull/69)
|
|
10
|
+
|
|
11
|
+
#### [v1.10.6](https://github.com/pagopa/selfcare-common-frontend/compare/v1.10.5...v1.10.6)
|
|
12
|
+
|
|
13
|
+
> 26 April 2022
|
|
14
|
+
|
|
15
|
+
- fixed userNotify timers configured once per notify [`#68`](https://github.com/pagopa/selfcare-common-frontend/pull/68)
|
|
16
|
+
- modified toast z-index [`#67`](https://github.com/pagopa/selfcare-common-frontend/pull/67)
|
|
17
|
+
|
|
18
|
+
#### [v1.10.5](https://github.com/pagopa/selfcare-common-frontend/compare/v1.10.4...v1.10.5)
|
|
19
|
+
|
|
20
|
+
> 26 April 2022
|
|
21
|
+
|
|
22
|
+
- modified subHeader fontSize [`#66`](https://github.com/pagopa/selfcare-common-frontend/pull/66)
|
|
23
|
+
|
|
7
24
|
#### [v1.10.4](https://github.com/pagopa/selfcare-common-frontend/compare/v1.10.3...v1.10.4)
|
|
8
25
|
|
|
26
|
+
> 22 April 2022
|
|
27
|
+
|
|
9
28
|
- SELC-896 [`#65`](https://github.com/pagopa/selfcare-common-frontend/pull/65)
|
|
10
29
|
- SELC-896 (#65) [`#896`](https://pagopa.atlassian.net/browse/896)
|
|
11
30
|
|
package/build.info
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
remotes/origin/SELC-222
|
|
1
|
+
20220426.3 - selfcare-common-frontend.deploy(29030)
|
|
2
|
+
remotes/origin/SELC-222 867b1006a3f8e2d356a7d31f1a37ddee3c50173b
|
|
@@ -9,7 +9,9 @@ function SubHeader({ children }) {
|
|
|
9
9
|
boxShadow: 'none',
|
|
10
10
|
borderTop: '1px solid #F2F2F2',
|
|
11
11
|
borderBottom: '1px solid #F2F2F2',
|
|
12
|
-
}, children: (0, jsx_runtime_1.jsx)(material_1.Toolbar, { sx: { width: { xs: '100%', lg: '90%' }, minHeight: '80px !important' }, children: (0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, item: true, direction: "column", xs: 6, children: (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { component: "div",
|
|
12
|
+
}, children: (0, jsx_runtime_1.jsx)(material_1.Toolbar, { sx: { width: { xs: '100%', lg: '90%' }, minHeight: '80px !important' }, children: (0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, item: true, direction: "column", xs: 6, children: (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { component: "div", sx: {
|
|
13
|
+
fontSize: '28px !important',
|
|
14
|
+
fontWeight: '700 !important',
|
|
13
15
|
lineHeight: '36px',
|
|
14
16
|
textAlign: 'left',
|
|
15
17
|
color: '#17324D',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubHeader.js","sourceRoot":"","sources":["../../../../src/lib/components/Header/subHeader/SubHeader.tsx"],"names":[],"mappings":";;;AACA,4CAAkE;AAMlE,SAAwB,SAAS,CAAC,EAAE,QAAQ,EAAS;IACnD,OAAO,CACL,uBAAC,iBAAM,IACL,QAAQ,EAAC,UAAU,EACnB,EAAE,EAAE;YACF,UAAU,EAAE,QAAQ;YACpB,eAAe,EAAE,OAAO;YACxB,SAAS,EAAE,MAAM;YACjB,SAAS,EAAE,mBAAmB;YAC9B,YAAY,EAAE,mBAAmB;SAClC,YAED,uBAAC,kBAAO,IAAC,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAE,YAC7E,wBAAC,eAAI,IAAC,SAAS,mBACb,uBAAC,eAAI,IAAC,SAAS,QAAC,IAAI,QAAC,SAAS,EAAC,QAAQ,EAAC,EAAE,EAAE,CAAC,YAC3C,uBAAC,eAAI,IAAC,IAAI,kBACR,uBAAC,qBAAU,IACT,SAAS,EAAC,KAAK,EACf,
|
|
1
|
+
{"version":3,"file":"SubHeader.js","sourceRoot":"","sources":["../../../../src/lib/components/Header/subHeader/SubHeader.tsx"],"names":[],"mappings":";;;AACA,4CAAkE;AAMlE,SAAwB,SAAS,CAAC,EAAE,QAAQ,EAAS;IACnD,OAAO,CACL,uBAAC,iBAAM,IACL,QAAQ,EAAC,UAAU,EACnB,EAAE,EAAE;YACF,UAAU,EAAE,QAAQ;YACpB,eAAe,EAAE,OAAO;YACxB,SAAS,EAAE,MAAM;YACjB,SAAS,EAAE,mBAAmB;YAC9B,YAAY,EAAE,mBAAmB;SAClC,YAED,uBAAC,kBAAO,IAAC,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAE,YAC7E,wBAAC,eAAI,IAAC,SAAS,mBACb,uBAAC,eAAI,IAAC,SAAS,QAAC,IAAI,QAAC,SAAS,EAAC,QAAQ,EAAC,EAAE,EAAE,CAAC,YAC3C,uBAAC,eAAI,IAAC,IAAI,kBACR,uBAAC,qBAAU,IACT,SAAS,EAAC,KAAK,EACf,EAAE,EAAE;oCACF,QAAQ,EAAE,iBAAiB;oCAC3B,UAAU,EAAE,gBAAgB;oCAC5B,UAAU,EAAE,MAAM;oCAClB,SAAS,EAAE,MAAM;oCACjB,KAAK,EAAE,SAAS;iCACjB,+BAGU,GACR,GACF,EACN,QAAQ,IACJ,GACC,GACH,CACV,CAAC;AACJ,CAAC;AAnCD,4BAmCC"}
|
package/components/Toast.js
CHANGED
|
@@ -13,7 +13,7 @@ const CustomAlert = (0, system_1.styled)(material_1.Alert)({
|
|
|
13
13
|
/** Selfcare's toast */
|
|
14
14
|
function Toast({ open, title, message, onCloseToast, logo = ConfirmIcon_1.default, leftBorderColor = '#00CF86', width = '376px', wrapped = false, bottom = '64px', right = '64px', }) {
|
|
15
15
|
const positionStyle = !wrapped
|
|
16
|
-
? { position: 'fixed', bottom, right, zIndex:
|
|
16
|
+
? { position: 'fixed', bottom, right, zIndex: 500 }
|
|
17
17
|
: { marginTop: 2 };
|
|
18
18
|
return ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: open && ((0, jsx_runtime_1.jsx)(CustomAlert, { className: "userToast", variant: "outlined", sx: {
|
|
19
19
|
...positionStyle,
|
|
@@ -18,8 +18,11 @@ function UserNotifyHandle() {
|
|
|
18
18
|
const notifies = (0, react_redux_1.useSelector)(appStateSlice_1.appStateSelectors.selectNotifies);
|
|
19
19
|
const lastNotifiesToast = (0, react_1.useRef)([]);
|
|
20
20
|
const lastNotifyModal = (0, react_1.useRef)();
|
|
21
|
+
const timers = (0, react_1.useRef)({});
|
|
21
22
|
const onClose = (notify) => {
|
|
22
23
|
dispatch(appStateSlice_1.appStateActions.removeNotify(notify));
|
|
24
|
+
// eslint-disable-next-line functional/immutable-data
|
|
25
|
+
delete timers.current[notify.id];
|
|
23
26
|
if (notify === null || notify === void 0 ? void 0 : notify.onClose) {
|
|
24
27
|
notify.onClose();
|
|
25
28
|
}
|
|
@@ -30,13 +33,13 @@ function UserNotifyHandle() {
|
|
|
30
33
|
notify.onConfirm();
|
|
31
34
|
}
|
|
32
35
|
};
|
|
33
|
-
const { openModal, openToast } = updateCurrents(lastNotifyModal, lastNotifiesToast, notifies, onClose);
|
|
36
|
+
const { openModal, openToast } = updateCurrents(lastNotifyModal, lastNotifiesToast, notifies, onClose, timers.current);
|
|
34
37
|
const notifyModal = lastNotifyModal.current;
|
|
35
38
|
const notifiesToast = lastNotifiesToast.current;
|
|
36
39
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ToastWrapper_1.default, { children: notifiesToast.map((n) => ((0, jsx_runtime_1.jsx)(__1.Toast, { wrapped: true, open: openToast, title: n.title, message: n.message, logo: n.logo, leftBorderColor: n.leftBorderColor, onCloseToast: () => onClose(n), width: n.width }, n.id))) }), (0, jsx_runtime_1.jsx)(__1.SessionModal, { open: openModal, title: (_a = notifyModal === null || notifyModal === void 0 ? void 0 : notifyModal.title) !== null && _a !== void 0 ? _a : 'Notify Title', message: notifyModal === null || notifyModal === void 0 ? void 0 : notifyModal.message, onConfirm: (notifyModal === null || notifyModal === void 0 ? void 0 : notifyModal.onConfirm) ? () => onConfirm(notifyModal) : undefined, onConfirmLabel: notifyModal === null || notifyModal === void 0 ? void 0 : notifyModal.confirmLabel, handleClose: () => onClose(notifyModal), onCloseLabel: notifyModal === null || notifyModal === void 0 ? void 0 : notifyModal.closeLabel, width: notifyModal === null || notifyModal === void 0 ? void 0 : notifyModal.width })] }));
|
|
37
40
|
}
|
|
38
41
|
exports.default = UserNotifyHandle;
|
|
39
|
-
function updateCurrents(lastNotifyModalRef, lastNotifiesToastRef, notifies, onClose) {
|
|
42
|
+
function updateCurrents(lastNotifyModalRef, lastNotifiesToastRef, notifies, onClose, timers) {
|
|
40
43
|
const lastNotifiesToast = notifies.filter((e) => e.component === 'Toast');
|
|
41
44
|
const lastNotifySessionModal = notifies.find((e) => e.component === 'SessionModal');
|
|
42
45
|
const openToast = lastNotifiesToast.length > 0;
|
|
@@ -49,8 +52,10 @@ function updateCurrents(lastNotifyModalRef, lastNotifiesToastRef, notifies, onCl
|
|
|
49
52
|
// eslint-disable-next-line functional/immutable-data
|
|
50
53
|
lastNotifiesToastRef.current = lastNotifiesToast;
|
|
51
54
|
lastNotifiesToast.forEach((n) => {
|
|
52
|
-
if (n.autoclosable === 'timer') {
|
|
55
|
+
if (n.autoclosable === 'timer' && !timers[n.id]) {
|
|
53
56
|
setTimeout(() => onClose(n), n.autocloseMilliseconds);
|
|
57
|
+
// eslint-disable-next-line functional/immutable-data
|
|
58
|
+
timers[n.id] = true;
|
|
54
59
|
}
|
|
55
60
|
});
|
|
56
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserNotifyHandle.js","sourceRoot":"","sources":["../../src/lib/components/UserNotifyHandle.tsx"],"names":[],"mappings":";;;;AAAA,iCAAiD;AACjD,6CAAuD;AACvD,0BAAyC;AAEzC,iEAAmF;AACnF,0EAA0C;AAE1C;;;;wJAIwJ;AACxJ,SAAS,gBAAgB;;IACvB,MAAM,QAAQ,GAAG,IAAA,yBAAW,GAAE,CAAC;IAC/B,MAAM,QAAQ,GAAG,IAAA,yBAAW,EAAC,iCAAiB,CAAC,cAAc,CAAC,CAAC;IAC/D,MAAM,iBAAiB,GAAG,IAAA,cAAM,EAAoB,EAAE,CAAC,CAAC;IACxD,MAAM,eAAe,GAAG,IAAA,cAAM,GAAc,CAAC;IAE7C,MAAM,OAAO,GAAG,CAAC,MAAkB,EAAE,EAAE;QACrC,QAAQ,CAAC,+BAAe,CAAC,YAAY,CAAC,MAAoB,CAAC,CAAC,CAAC;QAC7D,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,EAAE;YACnB,MAAM,CAAC,OAAO,EAAE,CAAC;SAClB;IACH,CAAC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,CAAC,CAAC,qBAAqB,CAAC,CAAC;gBACtD,qDAAqD;gBACrD,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;aACrB;QACH,CAAC,CAAC,CAAC;KACJ;IACD,OAAO;QACL,SAAS;QACT,SAAS;KACV,CAAC;AACJ,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.10.
|
|
4
|
+
"version": "1.10.7",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/pagopa/selfcare-common-frontend",
|
|
7
7
|
"author": "https://www.pagopa.gov.it",
|