@pagopa/selfcare-common-frontend 1.5.8 → 1.5.9
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 +7 -0
- package/README.md +3 -0
- package/build.info +2 -2
- package/components/ErrorBoundary/ErrorBoundary.js +2 -2
- package/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/components/Toast.d.ts +3 -1
- package/components/Toast.js +2 -2
- package/components/Toast.js.map +1 -1
- package/components/UserNotifyHandle.js +1 -1
- package/components/UserNotifyHandle.js.map +1 -1
- package/model/AppError.d.ts +2 -0
- package/model/UserNotify.d.ts +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,15 @@ 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.5.9](https://github.com/pagopa/selfcare-common-frontend/compare/v1.5.8...v1.5.9)
|
|
8
|
+
|
|
9
|
+
- added 'width' to toast and modal in notifyHandler and errorBoundary [`#35`](https://github.com/pagopa/selfcare-common-frontend/pull/35)
|
|
10
|
+
- Bump url-parse from 1.5.3 to 1.5.7 [`#34`](https://github.com/pagopa/selfcare-common-frontend/pull/34)
|
|
11
|
+
|
|
7
12
|
#### [v1.5.8](https://github.com/pagopa/selfcare-common-frontend/compare/v1.5.7...v1.5.8)
|
|
8
13
|
|
|
14
|
+
> 17 February 2022
|
|
15
|
+
|
|
9
16
|
- fixed UserNotifyHandler default component rendered [`#33`](https://github.com/pagopa/selfcare-common-frontend/pull/33)
|
|
10
17
|
|
|
11
18
|
#### [v1.5.7](https://github.com/pagopa/selfcare-common-frontend/compare/v1.5.6...v1.5.7)
|
package/README.md
CHANGED
|
@@ -112,6 +112,7 @@ Selfcare's toast
|
|
|
112
112
|
| title | string | Y | The toast title |
|
|
113
113
|
| message | React.ReactNode | Y | The toast body |
|
|
114
114
|
| onCloseToast | ()=>void | Y | The function to be invoked when closing the toast |
|
|
115
|
+
| width | string | N | The toast width |
|
|
115
116
|
|
|
116
117
|
## Ending Page
|
|
117
118
|
Selfcare's ending page
|
|
@@ -267,6 +268,7 @@ The error to be submitted has type AppError which has the following fields:
|
|
|
267
268
|
| component | string | N | Can render a SessionModal or Toast component |
|
|
268
269
|
| autoclosable | string | N | If component === 'Toast'. The notify will be autoclosed using this configuration, as default timer. If none, it will not be closed automatically. If timer, it will be closed after autocloseMilliseconds milliseconds |
|
|
269
270
|
| autocloseMilliseconds | boolean | N | If component === 'Toast' and autoclosable === 'timer'. The millisecond after which close the notify. As default 2000 |
|
|
271
|
+
| width | string | N | The SessionModal or Toast width |
|
|
270
272
|
|
|
271
273
|
The error will be notified as a GENERIC_ERROR through the [analytcs feature](#analytics)
|
|
272
274
|
|
|
@@ -293,6 +295,7 @@ The user notify to be submitted has type UserNotify which has the following fiel
|
|
|
293
295
|
| component | string | N | Can render a SessionModal or Toast component |
|
|
294
296
|
| autoclosable | string | N | If component === 'Toast'. The notify will be autoclosed using this configuration, as default timer. If none, it will not be closed automatically. If timer, it will be closed after autocloseMilliseconds milliseconds |
|
|
295
297
|
| autocloseMilliseconds | boolean | N | If component === 'Toast' and autoclosable === 'timer'. The millisecond after which close the notify. As default 2000 |
|
|
298
|
+
| width | string | N | The SessionModal or Toast width |
|
|
296
299
|
|
|
297
300
|
## UnloadEventHandler
|
|
298
301
|
This feature is based on react-redux library and require to register the reducer build in appStateSlice into the application's redux store.
|
package/build.info
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
20220218.1 - selfcare-common-frontend.deploy(20904)
|
|
2
|
+
tags/v1.5.9^0 52dc9bd76b5e9965f7debae9fd3872656f20a93e
|
|
@@ -62,11 +62,11 @@ class ErrorBoundary extends react_1.Component {
|
|
|
62
62
|
if (error.autoclosable === 'timer') {
|
|
63
63
|
setTimeout(() => this.handleClose(error), error.autocloseMilliseconds);
|
|
64
64
|
}
|
|
65
|
-
return ((0, jsx_runtime_1.jsx)(Toast_1.default, { open: true, title: (_a = error.displayableTitle) !== null && _a !== void 0 ? _a : 'ERRORE', message: (_b = error.displayableDescription) !== null && _b !== void 0 ? _b : 'Spiacenti, qualcosa è andato storto.', logo: FaultIcon_1.default, leftBorderColor: "#C02927", onCloseToast: () => this.handleClose(error) }, void 0));
|
|
65
|
+
return ((0, jsx_runtime_1.jsx)(Toast_1.default, { open: true, title: (_a = error.displayableTitle) !== null && _a !== void 0 ? _a : 'ERRORE', message: (_b = error.displayableDescription) !== null && _b !== void 0 ? _b : 'Spiacenti, qualcosa è andato storto.', logo: FaultIcon_1.default, leftBorderColor: "#C02927", onCloseToast: () => this.handleClose(error), width: error.width }, void 0));
|
|
66
66
|
}
|
|
67
67
|
buildErrorModal(error) {
|
|
68
68
|
var _a, _b;
|
|
69
|
-
return ((0, jsx_runtime_1.jsx)(SessionModal_1.default, { open: true, title: (_a = error.displayableTitle) !== null && _a !== void 0 ? _a : 'Errore', message: (_b = error.displayableDescription) !== null && _b !== void 0 ? _b : 'Spiacenti, qualcosa è andato storto.', onConfirm: error.onRetry ? () => this.retryError(error) : undefined, handleClose: () => this.handleClose(error) }, void 0));
|
|
69
|
+
return ((0, jsx_runtime_1.jsx)(SessionModal_1.default, { open: true, title: (_a = error.displayableTitle) !== null && _a !== void 0 ? _a : 'Errore', message: (_b = error.displayableDescription) !== null && _b !== void 0 ? _b : 'Spiacenti, qualcosa è andato storto.', onConfirm: error.onRetry ? () => this.retryError(error) : undefined, handleClose: () => this.handleClose(error), width: error.width }, void 0));
|
|
70
70
|
}
|
|
71
71
|
retryError(error) {
|
|
72
72
|
this.popError(error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../../src/lib/components/ErrorBoundary/ErrorBoundary.tsx"],"names":[],"mappings":";;;;AACA,mCAAkC;AAClC,iCAAgF;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CAAC,OAAO,EAAE,CAAC;SACjB;IACH,CAAC;CACF;AACD,MAAM,cAAc,GAAG,IAAA,yBAAc,EAAC,iCAAiB,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;AAE1F,SAAS,eAAe,CAAC,KAAU;IACjC,OAAO,EAAE,MAAM,EAAE,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;AAC3C,CAAC;AAED,MAAM,kBAAkB,GAAG,CAAC,QAA0B,EAAE,EAAE,CAAC,CAAC;IAC1D,QAAQ,EAAE,CAAC,KAAe,EAAE,EAAE,CAAC,QAAQ,CAAC,+BAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxE,WAAW,EAAE,CAAC,KAAe,EAAE,EAAE,CAAC,QAAQ,CAAC,+BAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;CAC/E,CAAC,CAAC;AAEH,MAAM,sBAAsB,GAA0C,IAAA,qBAAO,EAC3E,eAAe,EACf,kBAAkB,CACnB,CAAC,aAAa,CAAC,CAAC;AACjB,kBAAe,sBAAsB,CAAC"}
|
package/components/Toast.d.ts
CHANGED
|
@@ -12,7 +12,9 @@ declare type Props = {
|
|
|
12
12
|
message: React.ReactNode;
|
|
13
13
|
/** The function to be invoked when closing the toast */
|
|
14
14
|
onCloseToast: () => void;
|
|
15
|
+
/** The toast width */
|
|
16
|
+
width?: string | undefined;
|
|
15
17
|
};
|
|
16
18
|
/** Selfcare's toast */
|
|
17
|
-
export default function Toast({ open, title, message, onCloseToast, logo, leftBorderColor, }: Props): JSX.Element;
|
|
19
|
+
export default function Toast({ open, title, message, onCloseToast, logo, leftBorderColor, width, }: Props): JSX.Element;
|
|
18
20
|
export {};
|
package/components/Toast.js
CHANGED
|
@@ -11,13 +11,13 @@ const CustomAlert = (0, system_1.styled)(material_1.Alert)({
|
|
|
11
11
|
'.MuiAlert-icon': { display: 'none' },
|
|
12
12
|
});
|
|
13
13
|
/** Selfcare's toast */
|
|
14
|
-
function Toast({ open, title, message, onCloseToast, logo = ConfirmIcon_1.default, leftBorderColor = '#00CF86', }) {
|
|
14
|
+
function Toast({ open, title, message, onCloseToast, logo = ConfirmIcon_1.default, leftBorderColor = '#00CF86', width = '376px', }) {
|
|
15
15
|
return ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: open && ((0, jsx_runtime_1.jsx)(CustomAlert, Object.assign({ className: "userToast", variant: "outlined", sx: {
|
|
16
16
|
position: 'fixed',
|
|
17
17
|
bottom: '64px',
|
|
18
18
|
right: '64px',
|
|
19
19
|
zIndex: 100,
|
|
20
|
-
width:
|
|
20
|
+
width: { width },
|
|
21
21
|
backgroundColor: 'white',
|
|
22
22
|
borderLeft: `4px solid ${leftBorderColor} !important`,
|
|
23
23
|
borderRadius: '5px',
|
package/components/Toast.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.js","sourceRoot":"","sources":["../../src/lib/components/Toast.tsx"],"names":[],"mappings":";;;;AAAA,iCAAwC;AACxC,4CAA6E;AAC7E,wCAAqC;AACrC,mFAAkD;AAClD,mFAA8C;
|
|
1
|
+
{"version":3,"file":"Toast.js","sourceRoot":"","sources":["../../src/lib/components/Toast.tsx"],"names":[],"mappings":";;;;AAAA,iCAAwC;AACxC,4CAA6E;AAC7E,wCAAqC;AACrC,mFAAkD;AAClD,mFAA8C;AAmB9C,MAAM,WAAW,GAAG,IAAA,eAAM,EAAC,gBAAK,CAAC,CAAC;IAChC,gBAAgB,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;CACtC,CAAC,CAAC;AAEH,uBAAuB;AACvB,SAAwB,KAAK,CAAC,EAC5B,IAAI,EACJ,KAAK,EACL,OAAO,EACP,YAAY,EACZ,IAAI,GAAG,qBAAW,EAClB,eAAe,GAAG,SAAS,EAC3B,KAAK,GAAG,OAAO,GACT;IACN,OAAO,CACL,uBAAC,gBAAQ,cACN,IAAI,IAAI,CACP,uBAAC,WAAW,kBACV,SAAS,EAAC,WAAW,EACrB,OAAO,EAAC,UAAU,EAClB,EAAE,EAAE;gBACF,QAAQ,EAAE,OAAO;gBACjB,MAAM,EAAE,MAAM;gBACd,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,GAAG;gBACX,KAAK,EAAE,EAAE,KAAK,EAAE;gBAChB,eAAe,EAAE,OAAO;gBACxB,UAAU,EAAE,aAAa,eAAe,aAAa;gBACrD,YAAY,EAAE,KAAK;gBACnB,SAAS,EAAE,kCAAkC;gBAC7C,MAAM,EAAE,MAAM;aACf,gBAED,wBAAC,eAAI,kBAAC,SAAS,uBACb,uBAAC,eAAI,kBAAC,IAAI,QAAC,EAAE,EAAE,CAAC,gBACd,uBAAC,kBAAO,IACN,SAAS,EAAE,IAAI,EACf,OAAO,EAAC,WAAW,EACnB,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,WACzD,YACG,EACP,wBAAC,eAAI,kBAAC,IAAI,QAAC,EAAE,EAAE,CAAC,iBACd,uBAAC,qBAAU,kBAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,gBAClE,KAAK,YACK,EACb,uBAAC,qBAAU,cAAE,OAAO,WAAc,aAC7B,EACP,uBAAC,eAAI,kBAAC,IAAI,QAAC,EAAE,EAAE,CAAC,gBACd,uBAAC,qBAAU,kBAAC,OAAO,EAAE,YAAY,gBAC/B,uBAAC,eAAS,aAAG,YACF,YACR,aACF,YACK,CACf,WACQ,CACZ,CAAC;AACJ,CAAC;AApDD,wBAoDC"}
|
|
@@ -31,7 +31,7 @@ function UserNotifyHandle() {
|
|
|
31
31
|
const { openModal, openToast } = updateCurrents(lastNotifyModal, lastNotifyToast, notifies, onClose);
|
|
32
32
|
const notifyModal = lastNotifyModal.current;
|
|
33
33
|
const notifyToast = lastNotifyToast.current;
|
|
34
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(__1.Toast, { open: openToast, title: (_a = notifyToast === null || notifyToast === void 0 ? void 0 : notifyToast.title) !== null && _a !== void 0 ? _a : 'Notify Title', message: notifyToast === null || notifyToast === void 0 ? void 0 : notifyToast.message, logo: notifyToast === null || notifyToast === void 0 ? void 0 : notifyToast.logo, leftBorderColor: notifyToast === null || notifyToast === void 0 ? void 0 : notifyToast.leftBorderColor, onCloseToast: () => onClose(notifyToast) }, void 0), (0, jsx_runtime_1.jsx)(__1.SessionModal, { open: openModal, title: (_b = notifyModal === null || notifyModal === void 0 ? void 0 : notifyModal.title) !== null && _b !== void 0 ? _b : 'Notify Title', message: notifyModal === null || notifyModal === void 0 ? void 0 : notifyModal.message, onConfirm: () => onConfirm(notifyModal), onConfirmLabel: notifyModal === null || notifyModal === void 0 ? void 0 : notifyModal.confirmLabel, handleClose: () => onClose(notifyModal), onCloseLabel: notifyModal === null || notifyModal === void 0 ? void 0 : notifyModal.closeLabel }, void 0)] }, void 0));
|
|
34
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(__1.Toast, { open: openToast, title: (_a = notifyToast === null || notifyToast === void 0 ? void 0 : notifyToast.title) !== null && _a !== void 0 ? _a : 'Notify Title', message: notifyToast === null || notifyToast === void 0 ? void 0 : notifyToast.message, logo: notifyToast === null || notifyToast === void 0 ? void 0 : notifyToast.logo, leftBorderColor: notifyToast === null || notifyToast === void 0 ? void 0 : notifyToast.leftBorderColor, onCloseToast: () => onClose(notifyToast), width: notifyToast === null || notifyToast === void 0 ? void 0 : notifyToast.width }, void 0), (0, jsx_runtime_1.jsx)(__1.SessionModal, { open: openModal, title: (_b = notifyModal === null || notifyModal === void 0 ? void 0 : notifyModal.title) !== null && _b !== void 0 ? _b : 'Notify Title', message: notifyModal === null || notifyModal === void 0 ? void 0 : notifyModal.message, onConfirm: () => onConfirm(notifyModal), 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 }, void 0)] }, void 0));
|
|
35
35
|
}
|
|
36
36
|
exports.default = UserNotifyHandle;
|
|
37
37
|
function updateCurrents(lastNotifyModalRef, lastNotifyToastRef, notifies, onClose) {
|
|
@@ -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;AAEnF;;;;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,eAAe,GAAG,IAAA,cAAM,GAAc,CAAC;IAC7C,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,CAAC;IACF,MAAM,SAAS,GAAG,CAAC,MAAkB,EAAE,EAAE;QACvC,QAAQ,CAAC,+BAAe,CAAC,YAAY,CAAC,MAAoB,CAAC,CAAC,CAAC;QAC7D,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,EAAE;YACrB,MAAM,CAAC,SAAS,EAAE,C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;QACT,SAAS;KACV,CAAC;AACJ,CAAC"}
|
package/model/AppError.d.ts
CHANGED
|
@@ -28,4 +28,6 @@ export declare type AppError = {
|
|
|
28
28
|
autoclosable?: 'none' | 'timer';
|
|
29
29
|
/** If component === 'Toast' and autoclosable === 'timer'. The millisecond after which close the notify. As default 2000 */
|
|
30
30
|
autocloseMilliseconds?: number;
|
|
31
|
+
/** The SessionModal or Toast width */
|
|
32
|
+
width?: string | undefined;
|
|
31
33
|
};
|
package/model/UserNotify.d.ts
CHANGED
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.5.
|
|
4
|
+
"version": "1.5.9",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/pagopa/selfcare-common-frontend",
|
|
7
7
|
"author": "https://www.pagopa.gov.it",
|