@pagopa/selfcare-common-frontend 1.10.1 → 1.10.4
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 +21 -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/components/Header/subHeader/SubHeader.js +5 -14
- package/components/Header/subHeader/SubHeader.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,29 @@ 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.4](https://github.com/pagopa/selfcare-common-frontend/compare/v1.10.3...v1.10.4)
|
|
8
|
+
|
|
9
|
+
- SELC-896 [`#65`](https://github.com/pagopa/selfcare-common-frontend/pull/65)
|
|
10
|
+
- SELC-896 (#65) [`#896`](https://pagopa.atlassian.net/browse/896)
|
|
11
|
+
|
|
12
|
+
#### [v1.10.3](https://github.com/pagopa/selfcare-common-frontend/compare/v1.10.2...v1.10.3)
|
|
13
|
+
|
|
14
|
+
> 21 April 2022
|
|
15
|
+
|
|
16
|
+
- EndingPage - fixed button size [`#64`](https://github.com/pagopa/selfcare-common-frontend/pull/64)
|
|
17
|
+
|
|
18
|
+
#### [v1.10.2](https://github.com/pagopa/selfcare-common-frontend/compare/v1.10.1...v1.10.2)
|
|
19
|
+
|
|
20
|
+
> 21 April 2022
|
|
21
|
+
|
|
22
|
+
- EndingPage will accept the variant to use for the title [`#63`](https://github.com/pagopa/selfcare-common-frontend/pull/63)
|
|
23
|
+
- Bump urijs from 1.19.10 to 1.19.11 [`#62`](https://github.com/pagopa/selfcare-common-frontend/pull/62)
|
|
24
|
+
- fixed withLogin mock [`ef71d0c`](https://github.com/pagopa/selfcare-common-frontend/commit/ef71d0c3397bbad07a99022a43d645dfef9f6207)
|
|
25
|
+
|
|
7
26
|
#### [v1.10.1](https://github.com/pagopa/selfcare-common-frontend/compare/v1.10.0...v1.10.1)
|
|
8
27
|
|
|
28
|
+
> 12 April 2022
|
|
29
|
+
|
|
9
30
|
- white-theme [`#61`](https://github.com/pagopa/selfcare-common-frontend/pull/61)
|
|
10
31
|
- using new test-jwt [`#60`](https://github.com/pagopa/selfcare-common-frontend/pull/60)
|
|
11
32
|
- 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
|
+
20220422.1 - selfcare-common-frontend.deploy(28659)
|
|
2
|
+
remotes/origin/SELC-222 ad35176a3e123c6ad1b6bb7b78ce68d4f8ca1416
|
|
@@ -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:
|
|
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: 3, 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: 4, 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: { 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,KAA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C,GACH,CACP,CAAC"}
|
|
@@ -5,24 +5,15 @@ const material_1 = require("@mui/material");
|
|
|
5
5
|
function SubHeader({ children }) {
|
|
6
6
|
return ((0, jsx_runtime_1.jsx)(material_1.AppBar, { position: "relative", sx: {
|
|
7
7
|
alignItems: 'center',
|
|
8
|
-
height: '107px',
|
|
9
8
|
backgroundColor: 'white',
|
|
10
9
|
boxShadow: 'none',
|
|
11
10
|
borderTop: '1px solid #F2F2F2',
|
|
12
11
|
borderBottom: '1px solid #F2F2F2',
|
|
13
|
-
}, children: (0, jsx_runtime_1.jsx)(material_1.Toolbar, { sx: { width: { xs: '100%', lg: '90%' }, minHeight: '
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
color: '#17324D',
|
|
19
|
-
}, children: "Self Care" }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { component: "div", sx: {
|
|
20
|
-
fontWeight: 'normal',
|
|
21
|
-
fontSize: '14px !important',
|
|
22
|
-
lineHeight: '24px',
|
|
23
|
-
textAlign: 'left',
|
|
24
|
-
color: '#17324D',
|
|
25
|
-
}, children: "Gestisci i tuoi prodotti e servizi PagoPA" }) })] }), children] }) }) }));
|
|
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", variant: "h3", sx: {
|
|
13
|
+
lineHeight: '36px',
|
|
14
|
+
textAlign: 'left',
|
|
15
|
+
color: '#17324D',
|
|
16
|
+
}, children: "Area riservata" }) }) }), children] }) }) }));
|
|
26
17
|
}
|
|
27
18
|
exports.default = SubHeader;
|
|
28
19
|
//# sourceMappingURL=SubHeader.js.map
|
|
@@ -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,
|
|
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,OAAO,EAAC,IAAI,EACZ,EAAE,EAAE;oCACF,UAAU,EAAE,MAAM;oCAClB,SAAS,EAAE,MAAM;oCACjB,KAAK,EAAE,SAAS;iCACjB,+BAGU,GACR,GACF,EACN,QAAQ,IACJ,GACC,GACH,CACV,CAAC;AACJ,CAAC;AAlCD,4BAkCC"}
|
|
@@ -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,kBA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AC"}
|
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.4",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/pagopa/selfcare-common-frontend",
|
|
7
7
|
"author": "https://www.pagopa.gov.it",
|