@pagopa/selfcare-common-frontend 1.10.1 → 1.10.2
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 +8 -0
- package/README.md +2 -0
- package/build.info +2 -2
- package/components/EndingPage.d.ts +5 -1
- package/components/EndingPage.js +1 -1
- package/components/EndingPage.js.map +1 -1
- package/decorators/__mocks__/withLogin.d.ts +1 -1
- package/decorators/__mocks__/withLogin.js +2 -2
- package/decorators/__mocks__/withLogin.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,16 @@ 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.2](https://github.com/pagopa/selfcare-common-frontend/compare/v1.10.1...v1.10.2)
|
|
8
|
+
|
|
9
|
+
- EndingPage will accept the variant to use for the title [`#63`](https://github.com/pagopa/selfcare-common-frontend/pull/63)
|
|
10
|
+
- Bump urijs from 1.19.10 to 1.19.11 [`#62`](https://github.com/pagopa/selfcare-common-frontend/pull/62)
|
|
11
|
+
- fixed withLogin mock [`ef71d0c`](https://github.com/pagopa/selfcare-common-frontend/commit/ef71d0c3397bbad07a99022a43d645dfef9f6207)
|
|
12
|
+
|
|
7
13
|
#### [v1.10.1](https://github.com/pagopa/selfcare-common-frontend/compare/v1.10.0...v1.10.1)
|
|
8
14
|
|
|
15
|
+
> 12 April 2022
|
|
16
|
+
|
|
9
17
|
- white-theme [`#61`](https://github.com/pagopa/selfcare-common-frontend/pull/61)
|
|
10
18
|
- using new test-jwt [`#60`](https://github.com/pagopa/selfcare-common-frontend/pull/60)
|
|
11
19
|
- using a token without expire for DEV [`5ca0085`](https://github.com/pagopa/selfcare-common-frontend/commit/5ca0085c00c97c2bf1a8bc0e066abf639d7cee88)
|
package/README.md
CHANGED
|
@@ -146,6 +146,8 @@ Selfcare's ending page
|
|
|
146
146
|
| description | React.ReactNode | Y | The ending page description |
|
|
147
147
|
| buttonLabel | string | N | The ending page button label if any |
|
|
148
148
|
| onButtonClick | () => void | N | if defined it will show a button that will performe this action on click |
|
|
149
|
+
| variantTitle | (| 'button'| 'caption'| 'h1'| 'h2'| 'h3'| 'h4'| 'h5'| 'h6'| 'inherit'| 'subtitle1'| 'subtitle2'| 'body1'| 'body2'| 'overline'| undefined;) | N | Set the variant of the title |
|
|
150
|
+
| variantDescription | (| 'button'| 'caption'| 'h1'| 'h2'| 'h3'| 'h4'| 'h5'| 'h6'| 'inherit'| 'subtitle1'| 'subtitle2'| 'body1'| 'body2'| 'overline'| undefined;) | N | Set the variant of the description |
|
|
149
151
|
|
|
150
152
|
## NavigationBar
|
|
151
153
|
Selfcare's navigation bar
|
package/build.info
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
remotes/origin/SELC-222
|
|
1
|
+
20220421.1 - selfcare-common-frontend.deploy(28373)
|
|
2
|
+
remotes/origin/SELC-222 81fb7223648361193da51f69950777acddcb25f2
|
|
@@ -11,7 +11,11 @@ declare type Props = {
|
|
|
11
11
|
buttonLabel?: string;
|
|
12
12
|
/** if defined it will show a button that will performe this action on click */
|
|
13
13
|
onButtonClick?: () => void;
|
|
14
|
+
/** Set the variant of the title */
|
|
15
|
+
variantTitle?: 'button' | 'caption' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'inherit' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'overline' | undefined;
|
|
16
|
+
/** Set the variant of the description */
|
|
17
|
+
variantDescription?: 'button' | 'caption' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'inherit' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'overline' | undefined;
|
|
14
18
|
};
|
|
15
|
-
declare const _default: ({ description, onButtonClick, icon, title, buttonLabel, }: Props) => JSX.Element;
|
|
19
|
+
declare const _default: ({ description, onButtonClick, icon, title, buttonLabel, variantTitle, variantDescription, }: Props) => JSX.Element;
|
|
16
20
|
/** Selfcare's Ending Page */
|
|
17
21
|
export default _default;
|
package/components/EndingPage.js
CHANGED
|
@@ -5,5 +5,5 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const material_1 = require("@mui/material");
|
|
6
6
|
const CheckIllustrationIcon_1 = tslib_1.__importDefault(require("./icons/CheckIllustrationIcon"));
|
|
7
7
|
/** Selfcare's Ending Page */
|
|
8
|
-
exports.default = ({ description, onButtonClick, icon = (0, jsx_runtime_1.jsx)(CheckIllustrationIcon_1.default, {}), title, buttonLabel, }) => ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { minHeight: '100vh' }, display: "flex", flexGrow: 1, children: (0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, direction: "column", style: { textAlign: 'center' }, margin: 'auto', children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, item: true, justifyContent: "center", mb: 5, children: (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, children: icon }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, item: true, justifyContent: "center", children: (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant:
|
|
8
|
+
exports.default = ({ description, onButtonClick, icon = (0, jsx_runtime_1.jsx)(CheckIllustrationIcon_1.default, {}), title, buttonLabel, variantTitle, variantDescription, }) => ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { minHeight: '100vh' }, display: "flex", flexGrow: 1, children: (0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, direction: "column", style: { textAlign: 'center' }, margin: 'auto', children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, item: true, justifyContent: "center", mb: 5, children: (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, children: icon }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, item: true, justifyContent: "center", children: (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: variantTitle, children: title }) }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, item: true, justifyContent: "center", mb: 7, mt: 1, children: (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: variantDescription, children: description }) }) }), onButtonClick && ((0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, item: true, justifyContent: "center", children: (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 4, children: (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", sx: { width: '200px', alignSelf: 'center' }, onClick: onButtonClick, children: buttonLabel }) }) }))] }, "0") }));
|
|
9
9
|
//# sourceMappingURL=EndingPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EndingPage.js","sourceRoot":"","sources":["../../src/lib/components/EndingPage.tsx"],"names":[],"mappings":";;;;AAAA,4CAA4E;AAC5E,kGAAkE;
|
|
1
|
+
{"version":3,"file":"EndingPage.js","sourceRoot":"","sources":["../../src/lib/components/EndingPage.tsx"],"names":[],"mappings":";;;;AAAA,4CAA4E;AAC5E,kGAAkE;AAiDlE,6BAA6B;AAC7B,kBAAe,CAAC,EACd,WAAW,EACX,aAAa,EACb,IAAI,GAAG,uBAAC,+BAAqB,KAAG,EAChC,KAAK,EACL,WAAW,EACX,YAAY,EACZ,kBAAkB,GACZ,EAAE,EAAE,CAAC,CACX,uBAAC,cAAG,IAAC,EAAE,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,OAAO,EAAC,MAAM,EAAC,QAAQ,EAAE,CAAC,YACzD,wBAAC,eAAI,IAAC,SAAS,QAAC,SAAS,EAAC,QAAQ,EAAS,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,MAAM,aACvF,uBAAC,eAAI,IAAC,SAAS,QAAC,IAAI,QAAC,cAAc,EAAC,QAAQ,EAAC,EAAE,EAAE,CAAC,YAChD,uBAAC,eAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC,YACb,IAAI,GACA,GACF,EACP,uBAAC,eAAI,IAAC,SAAS,QAAC,IAAI,QAAC,cAAc,EAAC,QAAQ,YAC1C,uBAAC,eAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC,YACd,uBAAC,qBAAU,IAAC,OAAO,EAAE,YAAY,YAAG,KAAK,GAAc,GAClD,GACF,EACP,uBAAC,eAAI,IAAC,SAAS,QAAC,IAAI,QAAC,cAAc,EAAC,QAAQ,EAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,YACvD,uBAAC,eAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC,YACd,uBAAC,qBAAU,IAAC,OAAO,EAAE,kBAAkB,YAAG,WAAW,GAAc,GAC9D,GACF,EACN,aAAa,IAAI,CAChB,uBAAC,eAAI,IAAC,SAAS,QAAC,IAAI,QAAC,cAAc,EAAC,QAAQ,YAC1C,uBAAC,eAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC,YACd,uBAAC,iBAAM,IACL,OAAO,EAAC,WAAW,EACnB,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,EAC3C,OAAO,EAAE,aAAa,YAErB,WAAW,GACL,GACJ,GACF,CACR,KA5BoC,GAAG,CA6BnC,GACH,CACP,CAAC"}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
import { User } from '../../model/User';
|
|
3
3
|
export declare const mockedUser: User;
|
|
4
4
|
export declare const verifyMockExecution: (state: any) => void;
|
|
5
|
-
declare const _default: (WrappedComponent: React.ComponentType<any>) => () => JSX.Element;
|
|
5
|
+
declare const _default: (WrappedComponent: React.ComponentType<any>) => (props: any) => JSX.Element;
|
|
6
6
|
export default _default;
|
|
@@ -16,12 +16,12 @@ const verifyMockExecution = (state) => {
|
|
|
16
16
|
expect(state.user.logged).toMatchObject(exports.mockedUser);
|
|
17
17
|
};
|
|
18
18
|
exports.verifyMockExecution = verifyMockExecution;
|
|
19
|
-
exports.default = (WrappedComponent) => () => {
|
|
19
|
+
exports.default = (WrappedComponent) => (props) => {
|
|
20
20
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
21
21
|
const loggedUser = (0, react_redux_1.useSelector)(userSlice_1.userSelectors.selectLoggedUser);
|
|
22
22
|
(0, react_1.useEffect)(() => {
|
|
23
23
|
dispatch(userSlice_1.userActions.setLoggedUser(exports.mockedUser));
|
|
24
24
|
}, []);
|
|
25
|
-
return loggedUser ? (0, jsx_runtime_1.jsx)(WrappedComponent, {}) : (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
25
|
+
return loggedUser ? (0, jsx_runtime_1.jsx)(WrappedComponent, { ...props }) : (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
26
26
|
};
|
|
27
27
|
//# sourceMappingURL=withLogin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withLogin.js","sourceRoot":"","sources":["../../../src/lib/decorators/__mocks__/withLogin.tsx"],"names":[],"mappings":";;;;AAAA,iCAAkC;AAClC,6CAAuD;AAEvD,4DAA0E;AAE7D,QAAA,UAAU,GAAS;IAC9B,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,kBAAkB;IAC3B,KAAK,EAAE,QAAQ;CAChB,CAAC;AAEK,MAAM,mBAAmB,GAAG,CAAC,KAAU,EAAE,EAAE;IAChD,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,kBAAU,CAAC,CAAC;AACtD,CAAC,CAAC;AAFW,QAAA,mBAAmB,uBAE9B;AAEF,kBAAe,CAAC,gBAA0C,EAAE,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"withLogin.js","sourceRoot":"","sources":["../../../src/lib/decorators/__mocks__/withLogin.tsx"],"names":[],"mappings":";;;;AAAA,iCAAkC;AAClC,6CAAuD;AAEvD,4DAA0E;AAE7D,QAAA,UAAU,GAAS;IAC9B,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,kBAAkB;IAC3B,KAAK,EAAE,QAAQ;CAChB,CAAC;AAEK,MAAM,mBAAmB,GAAG,CAAC,KAAU,EAAE,EAAE;IAChD,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,kBAAU,CAAC,CAAC;AACtD,CAAC,CAAC;AAFW,QAAA,mBAAmB,uBAE9B;AAEF,kBAAe,CAAC,gBAA0C,EAAE,EAAE,CAAC,CAAC,KAAU,EAAE,EAAE;IAC5E,MAAM,QAAQ,GAAG,IAAA,yBAAW,GAAE,CAAC;IAC/B,MAAM,UAAU,GAAG,IAAA,yBAAW,EAAC,yBAAa,CAAC,gBAAgB,CAAC,CAAC;IAC/D,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,QAAQ,CAAC,uBAAW,CAAC,aAAa,CAAC,kBAAU,CAAC,CAAC,CAAC;IAClD,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,UAAU,CAAC,CAAC,CAAC,uBAAC,gBAAgB,OAAK,KAAK,GAAI,CAAC,CAAC,CAAC,kDAAK,CAAC;AAC9D,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.10.
|
|
4
|
+
"version": "1.10.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/pagopa/selfcare-common-frontend",
|
|
7
7
|
"author": "https://www.pagopa.gov.it",
|