@pagopa/selfcare-common-frontend 0.0.7 → 0.1.3

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.
Files changed (82) hide show
  1. package/README.md +5 -3
  2. package/build.info +2 -2
  3. package/common-polyfill.d.ts +8 -0
  4. package/common-polyfill.js +11 -0
  5. package/common-polyfill.js.map +1 -0
  6. package/components/CustomAvatar.d.ts +8 -1
  7. package/components/CustomAvatar.js +11 -5
  8. package/components/CustomAvatar.js.map +1 -0
  9. package/components/CustomPagination.d.ts +4 -0
  10. package/components/CustomPagination.js +14 -7
  11. package/components/CustomPagination.js.map +1 -0
  12. package/components/ErrorBoundary/ErrorBoundary.js +31 -20
  13. package/components/ErrorBoundary/ErrorBoundary.js.map +1 -0
  14. package/components/ErrorBoundary/components/BlockingErrorPage.js +7 -5
  15. package/components/ErrorBoundary/components/BlockingErrorPage.js.map +1 -0
  16. package/components/FilterModal.d.ts +12 -1
  17. package/components/FilterModal.js +22 -16
  18. package/components/FilterModal.js.map +1 -0
  19. package/components/Footer/Footer.d.ts +2 -0
  20. package/components/Footer/Footer.js +15 -11
  21. package/components/Footer/Footer.js.map +1 -0
  22. package/components/Header/Header.d.ts +4 -0
  23. package/components/Header/Header.js +15 -10
  24. package/components/Header/Header.js.map +1 -0
  25. package/components/Header/subHeader/SubHeader.js +9 -5
  26. package/components/Header/subHeader/SubHeader.js.map +1 -0
  27. package/components/Loading/LoadingOverlay.d.ts +5 -0
  28. package/components/Loading/LoadingOverlay.js +21 -11
  29. package/components/Loading/LoadingOverlay.js.map +1 -0
  30. package/components/SessionModal.d.ts +12 -0
  31. package/components/SessionModal.js +16 -10
  32. package/components/SessionModal.js.map +1 -0
  33. package/components/TitleBox.d.ts +10 -2
  34. package/components/TitleBox.js +10 -5
  35. package/components/TitleBox.js.map +1 -0
  36. package/components/Toast.d.ts +13 -3
  37. package/components/Toast.js +26 -19
  38. package/components/Toast.js.map +1 -0
  39. package/config/env.d.ts +1 -1
  40. package/config/env.js +8 -2
  41. package/config/env.js.map +1 -0
  42. package/decorators/__mocks__/withLogin.js +17 -12
  43. package/decorators/__mocks__/withLogin.js.map +1 -0
  44. package/decorators/withLogin.d.ts +4 -0
  45. package/decorators/withLogin.js +22 -13
  46. package/decorators/withLogin.js.map +1 -0
  47. package/hooks/useErrorDispatcher.d.ts +1 -0
  48. package/hooks/useErrorDispatcher.js +10 -5
  49. package/hooks/useErrorDispatcher.js.map +1 -0
  50. package/hooks/useLoading.d.ts +1 -0
  51. package/hooks/useLoading.js +13 -8
  52. package/hooks/useLoading.js.map +1 -0
  53. package/hooks/useLogin.js +21 -15
  54. package/hooks/useLogin.js.map +1 -0
  55. package/index.js +35 -20
  56. package/index.js.map +1 -0
  57. package/model/Page.js +3 -1
  58. package/model/Page.js.map +1 -0
  59. package/model/PageRequest.js +3 -1
  60. package/model/PageRequest.js.map +1 -0
  61. package/model/PageResource.js +3 -1
  62. package/model/PageResource.js.map +1 -0
  63. package/model/Party.js +3 -1
  64. package/model/Party.js.map +1 -0
  65. package/model/User.js +3 -1
  66. package/model/User.js.map +1 -0
  67. package/package.json +1 -1
  68. package/redux/slices/appStateSlice.d.ts +9 -0
  69. package/redux/slices/appStateSlice.js +9 -5
  70. package/redux/slices/appStateSlice.js.map +1 -0
  71. package/redux/slices/userSlice.js +9 -5
  72. package/redux/slices/userSlice.js.map +1 -0
  73. package/services/errorService.js +6 -1
  74. package/services/errorService.js.map +1 -0
  75. package/utils/constants.js +8 -4
  76. package/utils/constants.js.map +1 -0
  77. package/utils/routes-utils.js +6 -1
  78. package/utils/routes-utils.js.map +1 -0
  79. package/utils/storage-utils.js +10 -3
  80. package/utils/storage-utils.js.map +1 -0
  81. package/utils/utils.js +6 -1
  82. package/utils/utils.js.map +1 -0
package/README.md CHANGED
@@ -53,7 +53,7 @@ FilterModalConfig fields:
53
53
  |-------|------|-----------|-------------|
54
54
  | data | Array<T> | Y | The list of values between to which choose |
55
55
  | getLabel | (e: T) => string | Y | A function that will select the label to show |
56
- | getValue | (e: T) => V | Y | A function that will select the value to return when selecting an item |
56
+ | getValue | (e: T) => string | Y | A function that will select the value to return when selecting an item |
57
57
  | onFilterChange | (v: V) => void | Y | The function invoked when selecting a value |
58
58
 
59
59
  ## SessionModal
@@ -80,8 +80,8 @@ Selfcare's page title
80
80
  |------|------|-----------|-------------|
81
81
  | title | string | Y | The title to show |
82
82
  | subTitle | string | N | The subtitle to show |
83
+ | mtTitle | number | N | The margin top of the title |
83
84
  | mbTitle | GridSize | N | The margin bottom of the title |
84
- | mtGrid | number | N | The margin top of the title |
85
85
  | mbSubTitle | number | N | The margin bottom of the subtitle |
86
86
  | variantTitle | Variant | N | The variant of the Typografy used for the title |
87
87
  | variantSubTitle | Variant | N | The variant of the Typografy used for the subtitle |
@@ -91,9 +91,11 @@ Selfcare's toast
91
91
 
92
92
  | Prop | Type | Mandatory | Description |
93
93
  |------|------|-----------|-------------|
94
+ | open | boolean | Y | If this component should be displayed or not |
95
+ | logo | React.ElementType | N | The logo to be rendered. As default a confirm logo will be used |
94
96
  | title | string | Y | The toast title |
95
97
  | message | React.ReactNode | Y | The toast body |
96
- | closeToast | React.MouseEventHandler<HTMLButtonElement> | Y | The function to be invoked when closing the toast |
98
+ | closeToast | ()=>void | Y | The function to be invoked when closing the toast |
97
99
 
98
100
  # Common decorators used in pagopa/selfcare react projects
99
101
  ## withLogin
package/build.info CHANGED
@@ -1,2 +1,2 @@
1
- 20220119.8 - selfcare-common-frontend.deploy(17197)
2
- tags/v0.0.7^0 f2fb321051680c54693c003d0bebf606ac1f7afd
1
+ 20220120.4 - selfcare-common-frontend.deploy(17341)
2
+ tags/v0.1.3^0 34408834fb6db338dbd1160a542d0b073b6b4ecc
@@ -0,0 +1,8 @@
1
+ import 'react-app-polyfill/ie11';
2
+ import 'core-js/es/object/entries';
3
+ import 'core-js/es/object/values';
4
+ import 'core-js/es/promise';
5
+ import 'core-js/es/array';
6
+ import 'core-js/stable/string';
7
+ import 'core-js/stable/number';
8
+ import 'core-js/stable/url-search-params';
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ require("react-app-polyfill/ie11");
4
+ require("core-js/es/object/entries");
5
+ require("core-js/es/object/values");
6
+ require("core-js/es/promise");
7
+ require("core-js/es/array");
8
+ require("core-js/stable/string");
9
+ require("core-js/stable/number");
10
+ require("core-js/stable/url-search-params");
11
+ //# sourceMappingURL=common-polyfill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common-polyfill.js","sourceRoot":"","sources":["../src/lib/common-polyfill.ts"],"names":[],"mappings":";;AAAA,mCAAiC;AACjC,qCAAmC;AACnC,oCAAkC;AAClC,8BAA4B;AAC5B,4BAA0B;AAC1B,iCAA+B;AAC/B,iCAA+B;AAC/B,4CAA0C"}
@@ -1,10 +1,17 @@
1
1
  declare type Props = {
2
+ /** The id attribute added to the element */
3
+ id?: string;
4
+ /** The logo src */
2
5
  customSrc?: string | undefined;
6
+ /** The alt text showed instead of the image */
3
7
  customAlt?: string | undefined;
8
+ /** Logo width */
4
9
  customWidth?: string | undefined;
10
+ /** Logo height */
5
11
  customHeight?: string | undefined;
12
+ /** If true it will not display the component */
6
13
  loading?: boolean;
7
- id?: string;
8
14
  };
15
+ /** Avatar to use to load Organization logo */
9
16
  export default function CustomAvatar({ customAlt, customSrc, customWidth, customHeight, id, loading, }: Props): JSX.Element;
10
17
  export {};
@@ -1,8 +1,12 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import React from 'react';
3
- import { Avatar } from '@mui/material';
4
- export default function CustomAvatar({ customAlt, customSrc, customWidth, customHeight, id, loading, }) {
5
- return (_jsx(React.Fragment, { children: _jsx(Avatar, { id: id, alt: customAlt, src: customSrc, sx: {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = (0, tslib_1.__importDefault)(require("react"));
6
+ const material_1 = require("@mui/material");
7
+ /** Avatar to use to load Organization logo */
8
+ function CustomAvatar({ customAlt, customSrc, customWidth, customHeight, id, loading, }) {
9
+ return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { id: id, alt: customAlt, src: customSrc, sx: {
6
10
  width: customWidth,
7
11
  height: customHeight,
8
12
  display: !loading ? undefined : 'none',
@@ -10,3 +14,5 @@ export default function CustomAvatar({ customAlt, customSrc, customWidth, custom
10
14
  backgroundColor: '#CCD4DC',
11
15
  } }, void 0) }, void 0));
12
16
  }
17
+ exports.default = CustomAvatar;
18
+ //# sourceMappingURL=CustomAvatar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomAvatar.js","sourceRoot":"","sources":["../../src/lib/components/CustomAvatar.tsx"],"names":[],"mappings":";;;;AAAA,+DAA0B;AAC1B,4CAAuC;AAiBvC,8CAA8C;AAC9C,SAAwB,YAAY,CAAC,EACnC,SAAS,EACT,SAAS,EACT,WAAW,EACX,YAAY,EACZ,EAAE,EACF,OAAO,GACD;IACN,OAAO,CACL,uBAAC,eAAK,CAAC,QAAQ,cACb,uBAAC,iBAAM,IACL,EAAE,EAAE,EAAE,EACN,GAAG,EAAE,SAAS,EACd,GAAG,EAAE,SAAS,EACd,EAAE,EAAE;gBACF,KAAK,EAAE,WAAW;gBAClB,MAAM,EAAE,YAAY;gBACpB,OAAO,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM;gBACtC,KAAK,EAAE,4BAA4B;gBACnC,eAAe,EAAE,SAAS;aAC3B,WACD,WACa,CAClB,CAAC;AACJ,CAAC;AAxBD,+BAwBC"}
@@ -1,9 +1,13 @@
1
1
  import { Page } from '../model/Page';
2
2
  import { PageRequest } from '../model/PageRequest';
3
3
  declare type Props = {
4
+ /** The actual page */
4
5
  page: Page;
6
+ /** The actual sort applied */
5
7
  sort?: string;
8
+ /** The function to be invoked if the user change page */
6
9
  onPageRequest: (r: PageRequest) => void;
7
10
  };
11
+ /** Selfcare custom table available pages component */
8
12
  export default function CustomPagination({ page, onPageRequest, sort }: Props): JSX.Element;
9
13
  export {};
@@ -1,7 +1,10 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Grid, Pagination } from '@mui/material';
3
- import PaginationItem from '@mui/material/PaginationItem';
4
- import React from 'react';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const material_1 = require("@mui/material");
6
+ const PaginationItem_1 = (0, tslib_1.__importDefault)(require("@mui/material/PaginationItem"));
7
+ const react_1 = (0, tslib_1.__importDefault)(require("react"));
5
8
  function defaultLabelDisplayedRows(from, to, count) {
6
9
  // eslint-disable-next-line sonarjs/no-nested-template-literals
7
10
  return `${from}-${to} di ${count !== -1 ? count : `più di ${to}`}`;
@@ -12,13 +15,17 @@ const getLabelDisplayedRowsTo = (count, page, size) => {
12
15
  }
13
16
  return size === -1 ? count : Math.min(count, (page + 1) * size);
14
17
  };
15
- export default function CustomPagination({ page, onPageRequest, sort }) {
18
+ /** Selfcare custom table available pages component */
19
+ function CustomPagination({ page, onPageRequest, sort }) {
16
20
  const count = page.totalElements;
17
21
  const from = count === 0 ? 0 : page.number * page.size + 1;
18
22
  const to = getLabelDisplayedRowsTo(count, page.number, page.size);
19
- return (_jsx(React.Fragment, { children: _jsxs(Grid, Object.assign({ container: true, sx: { padding: '0 10px' } }, { children: [_jsx(Grid, Object.assign({ item: true, xs: 6, display: "flex", justifyContent: "start", alignItems: 'center' }, { children: defaultLabelDisplayedRows(from, to, count) }), void 0), _jsx(Grid, Object.assign({ item: true, xs: 6, display: "flex", justifyContent: "end", alignItems: 'center' }, { children: page.totalElements > page.size && (_jsx(Pagination, { sx: { display: 'flex' }, color: "primary", variant: "outlined", shape: "rounded", page: page.number + 1, count: page.totalPages, renderItem: (props2) => _jsx(PaginationItem, Object.assign({}, props2, { sx: { border: 'none' } }), void 0), onChange: (_event, value) => (onPageRequest({
23
+ return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, sx: { padding: '0 10px' } }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 6, display: "flex", justifyContent: "start", alignItems: 'center' }, { children: defaultLabelDisplayedRows(from, to, count) }), void 0), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 6, display: "flex", justifyContent: "end", alignItems: 'center' }, { children: page.totalElements > page.size && ((0, jsx_runtime_1.jsx)(material_1.Pagination, { sx: { display: 'flex' }, color: "primary", variant: "outlined", shape: "rounded", page: page.number + 1, count: page.totalPages, renderItem: (props2) => (0, jsx_runtime_1.jsx)(PaginationItem_1.default, Object.assign({}, props2, { sx: { border: 'none' } }), void 0), onChange: (_event, value) => (onPageRequest({
20
24
  page: value - 1,
21
25
  size: page.size,
22
26
  sort,
23
- }), window.scrollTo(0, 0)) }, void 0)) }), void 0)] }), void 0) }, void 0));
27
+ }),
28
+ window.scrollTo(0, 0)) }, void 0)) }), void 0)] }), void 0) }, void 0));
24
29
  }
30
+ exports.default = CustomPagination;
31
+ //# sourceMappingURL=CustomPagination.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomPagination.js","sourceRoot":"","sources":["../../src/lib/components/CustomPagination.tsx"],"names":[],"mappings":";;;;AAAA,4CAAiD;AACjD,+FAA0D;AAC1D,+DAA0B;AAI1B,SAAS,yBAAyB,CAAC,IAAY,EAAE,EAAU,EAAE,KAAa;IACxE,+DAA+D;IAC/D,OAAO,GAAG,IAAI,IAAI,EAAE,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,EAAE,EAAE,EAAE,CAAC;AACrE,CAAC;AA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AI,CAAC,IAAI,IAAI,CACjC,uBAAC,qBAAU,IACT,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EACvB,KAAK,EAAC,SAAS,EACf,OAAO,EAAC,UAAU,EAClB,KAAK,EAAC,SAAS,EACf,IAAI,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,EACrB,KAAK,EAAE,IAAI,CAAC,UAAU,EACtB,UAAU,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,uBAAC,wBAAc,oBAAK,MAAM,IAAE,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,YAAI,EAC9E,QAAQ,EAAE,CAAC,MAAkC,EAAE,KAAa,EAAE,EAAE,CAAC,CAC/D,aAAa,CAAC;4BACZ,IAAI,EAAE,KAAK,GAAG,CAAC;4BACf,IAAI,EAAE,IAAI,CAAC,IAAI;4BACf,IAAI;yBACL,CAAC;4BACF,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CACtB,WACD,CACH,YACI,aACF,WACQ,CAClB,CAAC;AACJ,CAAC;AAnCD,mCAmCC"}
@@ -1,16 +1,25 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- import { uniqueId } from 'lodash';
3
- import { Component, Fragment } from 'react';
4
- import { connect } from 'react-redux';
5
- import { createSelector } from 'reselect';
6
- import { appStateActions, appStateSelectors } from '../../redux/slices/appStateSlice';
7
- import { handleErrors } from '../../services/errorService';
8
- import SessionModal from '../SessionModal';
9
- import BlockingErrorPage from './components/BlockingErrorPage';
10
- class ErrorBoundary extends Component {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const lodash_1 = require("lodash");
6
+ const react_1 = require("react");
7
+ const react_redux_1 = require("react-redux");
8
+ const reselect_1 = require("reselect");
9
+ const appStateSlice_1 = require("../../redux/slices/appStateSlice");
10
+ const errorService_1 = require("../../services/errorService");
11
+ const SessionModal_1 = (0, tslib_1.__importDefault)(require("../SessionModal"));
12
+ const BlockingErrorPage_1 = (0, tslib_1.__importDefault)(require("./components/BlockingErrorPage"));
13
+ /** This feature is based on react-redux library and require to register the reducer build in appStateSlice into the application's redux store.
14
+ It allows to dispatch errors in order to display a warning or the error page to the user.
15
+ Errors dispatched will be notified using errorService
16
+
17
+ To use this feature you have to put ErrorBOundary in your App as a child of a redux Provider component.
18
+ In order to dispatch an error you have to use the custom hook useErrorDispatcher which will return a fuction to be used to dispatch the error. */
19
+ class ErrorBoundary extends react_1.Component {
11
20
  componentDidCatch(error, errorInfo) {
12
21
  this.props.addError({
13
- id: uniqueId('uncaught-'),
22
+ id: (0, lodash_1.uniqueId)('uncaught-'),
14
23
  techDescription: 'Uncaught error',
15
24
  error,
16
25
  errorInfo,
@@ -23,17 +32,18 @@ class ErrorBoundary extends Component {
23
32
  const blockingErrors = this.props.errors.filter((e) => e.blocking);
24
33
  const hasBlockingError = blockingErrors.length > 0;
25
34
  if (hasError) {
26
- handleErrors(this.props.errors);
35
+ (0, errorService_1.handleErrors)(this.props.errors);
27
36
  }
28
37
  if (!hasBlockingError) {
29
- return (_jsxs(Fragment, { children: [this.props.children, hasError && this.buildErrorModal(this.props.errors[0])] }, void 0));
38
+ return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [this.props.children, hasError && this.buildErrorModal(this.props.errors[0])] }, void 0));
30
39
  }
31
40
  else {
32
- return (_jsx(BlockingErrorPage, { description: blockingErrors[0].displayableDescription, assistanceEmail: this.props.assistanceEmail }, void 0));
41
+ return ((0, jsx_runtime_1.jsx)(BlockingErrorPage_1.default, { description: blockingErrors[0].displayableDescription, assistanceEmail: this.props.assistanceEmail }, void 0));
33
42
  }
34
43
  }
35
44
  buildErrorModal(error) {
36
- return (_jsx(SessionModal, { open: true, title: error.displayableTitle ?? 'Errore', message: error.displayableDescription ?? 'Spiacenti, qualcosa è andato storto.', onConfirm: error.onRetry ? () => this.retryError(error) : undefined, handleClose: () => {
45
+ var _a, _b;
46
+ 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: () => {
37
47
  this.popError(error);
38
48
  if (error.onClose) {
39
49
  error.onClose();
@@ -50,13 +60,14 @@ class ErrorBoundary extends Component {
50
60
  this.props.removeError(error);
51
61
  }
52
62
  }
53
- const errorsSelector = createSelector(appStateSelectors.selectErrors, (errors) => errors);
63
+ const errorsSelector = (0, reselect_1.createSelector)(appStateSlice_1.appStateSelectors.selectErrors, (errors) => errors);
54
64
  function mapStateToProps(state) {
55
65
  return { errors: errorsSelector(state) };
56
66
  }
57
67
  const mapDispatchToProps = (dispatch) => ({
58
- addError: (error) => dispatch(appStateActions.addError(error)),
59
- removeError: (error) => dispatch(appStateActions.removeError(error)),
68
+ addError: (error) => dispatch(appStateSlice_1.appStateActions.addError(error)),
69
+ removeError: (error) => dispatch(appStateSlice_1.appStateActions.removeError(error)),
60
70
  });
61
- const ErrorBoundaryConnected = connect(mapStateToProps, mapDispatchToProps)(ErrorBoundary);
62
- export default ErrorBoundaryConnected;
71
+ const ErrorBoundaryConnected = (0, react_redux_1.connect)(mapStateToProps, mapDispatchToProps)(ErrorBoundary);
72
+ exports.default = ErrorBoundaryConnected;
73
+ //# sourceMappingURL=ErrorBoundary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../../src/lib/components/ErrorBoundary/ErrorBoundary.tsx"],"names":[],"mappings":";;;;AACA,mCAAkC;AAClC,iCAAgF;AAChF,6CAAsC;AACtC,uCAA0C;AAC1C,oEAAgG;AAChG,8DAA2D;AAC3D,gFAA2C;AAC3C,oGAA+D;AAa/D;;;;;iJAKiJ;AACjJ,MAAM,aA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aAAa,CAAC,CAAC;AACjB,kBAAe,sBAAsB,CAAC"}
@@ -1,5 +1,7 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Button, Grid, Typography, Box } from '@mui/material';
3
- import { ReactComponent as ErrorIllustration } from '../../../assets/error-illustration.svg';
4
- export default ({ description, assistanceEmail }) => (_jsx(Box, Object.assign({ sx: { minHeight: '100vh' }, display: "flex" }, { children: _jsxs(Grid, Object.assign({ container: true, direction: "column", style: { textAlign: 'center' }, margin: 'auto' }, { children: [_jsx(Grid, Object.assign({ container: true, item: true, justifyContent: "center", mb: 5 }, { children: _jsx(Grid, Object.assign({ item: true, xs: 6 }, { children: _jsx(ErrorIllustration, {}, void 0) }), void 0) }), void 0), _jsx(Grid, Object.assign({ container: true, item: true, justifyContent: "center" }, { children: _jsx(Grid, Object.assign({ item: true, xs: 6 }, { children: _jsx(Typography, Object.assign({ variant: "h2" }, { children: "Spiacenti, qualcosa \u00E8 andato storto." }), void 0) }), void 0) }), void 0), _jsx(Grid, Object.assign({ container: true, item: true, justifyContent: "center", mb: 7, mt: 1 }, { children: _jsx(Grid, Object.assign({ item: true, xs: 6 }, { children: _jsx(Typography, { children: description ??
5
- 'A causa di un errore del sistema non è possibile completare la procedura.' }, void 0) }), void 0) }), void 0), assistanceEmail && (_jsx(Grid, Object.assign({ container: true, item: true, justifyContent: "center" }, { children: _jsx(Grid, Object.assign({ item: true, xs: 4 }, { children: _jsx(Button, Object.assign({ variant: "contained", sx: { width: '200px', alignSelf: 'center' }, onClick: () => window.location.assign(`mailto:${assistanceEmail}`) }, { children: "Contatta l\"assistenza" }), void 0) }), void 0) }), void 0))] }), "0") }), void 0));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const material_1 = require("@mui/material");
5
+ const error_illustration_svg_1 = require("../../../assets/error-illustration.svg");
6
+ exports.default = ({ description, assistanceEmail }) => ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { minHeight: '100vh' }, display: "flex" }, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, direction: "column", style: { textAlign: 'center' }, margin: 'auto' }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, item: true, justifyContent: "center", mb: 5 }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 6 }, { children: (0, jsx_runtime_1.jsx)(error_illustration_svg_1.ReactComponent, {}, void 0) }), void 0) }), void 0), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, item: true, justifyContent: "center" }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h2" }, { children: "Spiacenti, qualcosa \u00E8 andato storto." }), void 0) }), void 0) }), void 0), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, item: true, justifyContent: "center", mb: 7, mt: 1 }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, { children: description !== null && description !== void 0 ? description : 'A causa di un errore del sistema non è possibile completare la procedura.' }, void 0) }), void 0) }), void 0), assistanceEmail && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, item: true, justifyContent: "center" }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 4 }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "contained", sx: { width: '200px', alignSelf: 'center' }, onClick: () => window.location.assign(`mailto:${assistanceEmail}`) }, { children: "Contatta l\"assistenza" }), void 0) }), void 0) }), void 0))] }), "0") }), void 0));
7
+ //# sourceMappingURL=BlockingErrorPage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockingErrorPage.js","sourceRoot":"","sources":["../../../../src/lib/components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AAK,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,EAC3C,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,eAAe,EAAE,CAAC,oDAG3D,YACJ,YACF,CACR,MA/BoC,GAAG,CAgCnC,YACH,CACP,CAAC"}
@@ -1,17 +1,28 @@
1
1
  import * as React from 'react';
2
2
  declare type Props = {
3
+ /** If the popup is to be displayed */
3
4
  open: boolean;
5
+ /** The function to be invoked when clicking on exit button or selecting a value */
4
6
  handleClose: React.MouseEventHandler<HTMLButtonElement>;
7
+ /** The popup title */
5
8
  title: string;
9
+ /** @see FilterModalConfig */
6
10
  filterModalConfig?: FilterModalConfig<any, any>;
11
+ /** The popup height */
7
12
  height?: string;
13
+ /** The popup minHeight */
8
14
  minHeight?: string;
9
15
  };
10
16
  export declare type FilterModalConfig<T, V> = {
17
+ /** The list of values between to which choose */
11
18
  data: Array<T>;
19
+ /** A function that will select the label to show */
12
20
  getLabel: (e: T) => string;
13
- getValue: (e: T) => V;
21
+ /** A function that will select the value to return when selecting an item */
22
+ getValue: (e: T) => string;
23
+ /** The function invoked when selecting a value */
14
24
  onFilterChange: (v: V) => void;
15
25
  };
26
+ /** Modal used to show a list of values from which to choose a single value */
16
27
  export default function FilterModal({ open, handleClose, title, filterModalConfig, height, minHeight, }: Props): JSX.Element;
17
28
  export {};
@@ -1,25 +1,31 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import { Typography, Box, Button, FormControlLabel, Grid, IconButton, Radio, RadioGroup, } from '@mui/material';
4
- import Dialog from '@mui/material/Dialog';
5
- import useMediaQuery from '@mui/material/useMediaQuery';
6
- import { useTheme } from '@mui/material/styles';
7
- import ClearOutlinedIcon from '@mui/icons-material/ClearOutlined';
8
- export default function FilterModal({ open, handleClose, title, filterModalConfig, height = '16em', minHeight = '16em', }) {
9
- const theme = useTheme();
10
- const fullScreen = useMediaQuery(theme.breakpoints.down('xs'));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const React = (0, tslib_1.__importStar)(require("react"));
6
+ const material_1 = require("@mui/material");
7
+ const Dialog_1 = (0, tslib_1.__importDefault)(require("@mui/material/Dialog"));
8
+ const useMediaQuery_1 = (0, tslib_1.__importDefault)(require("@mui/material/useMediaQuery"));
9
+ const styles_1 = require("@mui/material/styles");
10
+ const ClearOutlined_1 = (0, tslib_1.__importDefault)(require("@mui/icons-material/ClearOutlined"));
11
+ /** Modal used to show a list of values from which to choose a single value */
12
+ function FilterModal({ open, handleClose, title, filterModalConfig, height = '16em', minHeight = '16em', }) {
13
+ const theme = (0, styles_1.useTheme)();
14
+ const fullScreen = (0, useMediaQuery_1.default)(theme.breakpoints.down('xs'));
11
15
  const [valueRadio, setValueRadio] = React.useState('');
12
- const handleChange = (event) => {
13
- setValueRadio(event.target.value);
16
+ const handleChange = (_, value) => {
17
+ setValueRadio(value);
14
18
  };
15
19
  const submitFilter = (event) => {
16
20
  const i = data.filter((value) => value.id === valueRadio).map((x) => x)[0];
17
- filterModalConfig?.onFilterChange(i === undefined ? valueRadio : i);
21
+ filterModalConfig === null || filterModalConfig === void 0 ? void 0 : filterModalConfig.onFilterChange(i === undefined ? valueRadio : i);
18
22
  handleClose(event);
19
23
  };
20
- const data = filterModalConfig?.data !== undefined ? filterModalConfig?.data : [];
21
- return (_jsx(Dialog, Object.assign({ fullScreen: fullScreen, open: open, "aria-labelledby": "responsive-dialog-title" }, { children: _jsx(Grid, Object.assign({ container: true, direction: "column", sx: { height, minHeight, width: '21.9em' } }, { children: _jsxs(Box, Object.assign({ mx: 3, sx: { height: '100%' } }, { children: [_jsx(Grid, Object.assign({ container: true, item: true, mt: 4 }, { children: _jsxs(Grid, Object.assign({ item: true, xs: 10 }, { children: [_jsx(IconButton, Object.assign({ onClick: (e) => {
24
+ const data = (filterModalConfig === null || filterModalConfig === void 0 ? void 0 : filterModalConfig.data) !== undefined ? filterModalConfig === null || filterModalConfig === void 0 ? void 0 : filterModalConfig.data : [];
25
+ return ((0, jsx_runtime_1.jsx)(Dialog_1.default, Object.assign({ fullScreen: fullScreen, open: open, "aria-labelledby": "responsive-dialog-title" }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, direction: "column", sx: { height, minHeight, width: '21.9em' } }, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ mx: 3, sx: { height: '100%' } }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, item: true, mt: 4 }, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ item: true, xs: 10 }, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: (e) => {
22
26
  setValueRadio('');
23
27
  handleClose(e);
24
- }, style: { position: 'absolute', top: '20px', right: '16px', zIndex: 100 } }, { children: _jsx(ClearOutlinedIcon, {}, void 0) }), void 0), _jsx(Typography, Object.assign({ variant: "h5", sx: { fontSize: '18px', fontWeight: '600' } }, { children: `Filtra per ${title}` }), void 0)] }), void 0) }), void 0), _jsx(Grid, Object.assign({ container: true, item: true }, { children: _jsx(Grid, Object.assign({ item: true, xs: 12, my: 3 }, { children: _jsx(RadioGroup, Object.assign({ "aria-label": "gender", name: "controlled-radio-buttons-group", value: valueRadio, onChange: handleChange }, { children: data.map((value, index) => (_jsx(FormControlLabel, { value: filterModalConfig?.getValue(value), control: _jsx(Radio, {}, void 0), label: filterModalConfig?.getLabel(value) }, index))) }), void 0) }), void 0) }), void 0), _jsx(Grid, Object.assign({ item: true, xs: 12, mb: 2 }, { children: _jsx(Button, Object.assign({ sx: { width: '100%', marginBottom: '20px' }, color: "primary", variant: "contained", onClick: submitFilter }, { children: "Filtra" }), void 0) }), void 0)] }), void 0) }), void 0) }), void 0));
28
+ }, style: { position: 'absolute', top: '20px', right: '16px', zIndex: 100 } }, { children: (0, jsx_runtime_1.jsx)(ClearOutlined_1.default, {}, void 0) }), void 0), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h5", sx: { fontSize: '18px', fontWeight: '600' } }, { children: `Filtra per ${title}` }), void 0)] }), void 0) }), void 0), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, item: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, my: 3 }, { children: (0, jsx_runtime_1.jsx)(material_1.RadioGroup, Object.assign({ "aria-label": "gender", name: "controlled-radio-buttons-group", value: valueRadio, onChange: handleChange }, { children: data.map((value, index) => ((0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { value: filterModalConfig === null || filterModalConfig === void 0 ? void 0 : filterModalConfig.getValue(value), control: (0, jsx_runtime_1.jsx)(material_1.Radio, {}, void 0), label: filterModalConfig === null || filterModalConfig === void 0 ? void 0 : filterModalConfig.getLabel(value) }, index))) }), void 0) }), void 0) }), void 0), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, mb: 2 }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ sx: { width: '100%', marginBottom: '20px' }, color: "primary", variant: "contained", onClick: submitFilter }, { children: "Filtra" }), void 0) }), void 0)] }), void 0) }), void 0) }), void 0));
25
29
  }
30
+ exports.default = FilterModal;
31
+ //# sourceMappingURL=FilterModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilterModal.js","sourceRoot":"","sources":["../../src/lib/components/FilterModal.tsx"],"names":[],"mappings":";;;;AAAA,0DAA+B;AAC/B,4CASuB;AACvB,+EAA0C;AAC1C,6FAAwD;AACxD,iDAAgD;AAChD,mGAAkE;AA2BlE,8EAA8E;AAC9E,SAAwB,WAAW,CAAC,EAClC,IAAI,EACJ,WAAW,EACX,KAAK,EACL,iBAAiB,EACjB,MAAM,GAAG,MAAM,EACf,SAAS,GAAG,MAAM,GACZ;IAC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AAC,IACpC,KAAK,CACV,CACH,CAAC,YACS,YACR,YACF,EAEP,uBAAC,eAAI,kBAAC,IAAI,QAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,gBACtB,uBAAC,iBAAM,kBACL,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,EAC3C,KAAK,EAAC,SAAS,EACf,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,YAAY,oCAGd,YACJ,aACH,YACD,YACA,CACV,CAAC;AACJ,CAAC;AA/ED,8BA+EC"}
@@ -1,5 +1,7 @@
1
1
  declare type Props = {
2
+ /** The email to which the assistance button will ask to send an email */
2
3
  assistanceEmail?: string;
3
4
  };
5
+ /** SelfCare Footer component */
4
6
  declare const Footer: ({ assistanceEmail }: Props) => JSX.Element;
5
7
  export default Footer;
@@ -1,7 +1,10 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Box, Grid, Link, SvgIcon, Typography } from '@mui/material';
3
- import { ReactComponent as logo } from '../../assets/logo_pago_pa.svg';
4
- const Footer = ({ assistanceEmail }) => (_jsxs(Box, Object.assign({ component: "footer", sx: {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const material_1 = require("@mui/material");
5
+ const logo_pago_pa_svg_1 = require("../../assets/logo_pago_pa.svg");
6
+ /** SelfCare Footer component */
7
+ const Footer = ({ assistanceEmail }) => ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ component: "footer", sx: {
5
8
  pt: '32px',
6
9
  height: '156px',
7
10
  mt: 'auto',
@@ -9,34 +12,35 @@ const Footer = ({ assistanceEmail }) => (_jsxs(Box, Object.assign({ component: "
9
12
  alignItems: 'center',
10
13
  boxSizing: 'unset',
11
14
  position: 'relative',
12
- } }, { children: [_jsx(Grid, Object.assign({ container: true, justifyContent: 'center', alignItems: 'center' }, { children: _jsxs(Box, Object.assign({ sx: { width: '90%', display: 'flex' } }, { children: [_jsx(SvgIcon, { component: logo, viewBox: "0 0 140 33", sx: { width: '119px' } }, void 0), _jsx(Box, Object.assign({ sx: { textAlign: 'right', flexGrow: 1 }, pl: 8 }, { children: _jsxs(Typography, Object.assign({ component: "div", sx: {
15
+ } }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, justifyContent: 'center', alignItems: 'center' }, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: { width: '90%', display: 'flex' } }, { children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { component: logo_pago_pa_svg_1.ReactComponent, viewBox: "0 0 140 33", sx: { width: '119px' } }, void 0), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { textAlign: 'right', flexGrow: 1 }, pl: 8 }, { children: (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ component: "div", sx: {
13
16
  fontWeight: 'normal',
14
17
  fontSize: '15px',
15
18
  lineHeight: '22,82px',
16
19
  textAlign: 'left',
17
20
  color: 'background.default',
18
21
  paddingLeft: '0px',
19
- } }, { children: ["PagoPA S.p.A. - societ\u00E0 per azioni con socio unico - capitale sociale di euro 1,000,000 interamente versato - sede legale in Roma, Piazza Colonna 370, CAP 00187 -", _jsx("br", {}, void 0), "n. di iscrizione a Registro Imprese di Roma, CF e P.IVA 15376371009"] }), void 0) }), void 0)] }), void 0) }), void 0), _jsx(Grid, Object.assign({ container: true, alignItems: 'center', justifyContent: 'center', sx: { position: 'absolute', bottom: '48px' } }, { children: _jsx(Box, Object.assign({ sx: { width: '90%', display: 'flex' } }, { children: _jsxs(Typography, Object.assign({ sx: {
22
+ } }, { children: ["PagoPA S.p.A. - societ\u00E0 per azioni con socio unico - capitale sociale di euro 1,000,000 interamente versato - sede legale in Roma, Piazza Colonna 370, CAP 00187 -", (0, jsx_runtime_1.jsx)("br", {}, void 0), "n. di iscrizione a Registro Imprese di Roma, CF e P.IVA 15376371009"] }), void 0) }), void 0)] }), void 0) }), void 0), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, alignItems: 'center', justifyContent: 'center', sx: { position: 'absolute', bottom: '48px' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { width: '90%', display: 'flex' } }, { children: (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ sx: {
20
23
  fontWeight: 'normal',
21
24
  fontSize: '15px',
22
25
  lineHeight: '15px',
23
26
  textAlign: 'left',
24
27
  padding: '0px',
25
- }, component: "div" }, { children: [_jsx(Link, Object.assign({ href: "https://www.pagopa.it/it/privacy-policy/", underline: "none", sx: {
28
+ }, component: "div" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Link, Object.assign({ href: "https://www.pagopa.it/it/privacy-policy/", underline: "none", sx: {
26
29
  marginRight: '10px',
27
30
  color: '#9BB7CB !important',
28
31
  textDecoration: 'none !important',
29
- } }, { children: 'Privacy Policy ' }), void 0), _jsx(Link, Object.assign({ href: "https://www.pagopa.it/it/termini-e-condizioni-di-utilizzo-del-sito/", underline: "none", sx: {
32
+ } }, { children: 'Privacy Policy ' }), void 0), (0, jsx_runtime_1.jsx)(material_1.Link, Object.assign({ href: "https://www.pagopa.it/it/termini-e-condizioni-di-utilizzo-del-sito/", underline: "none", sx: {
30
33
  margin: '10px',
31
34
  color: '#9BB7CB !important',
32
35
  textDecoration: 'none !important',
33
- } }, { children: 'Termini e condizioni d’uso del sito ' }), void 0), _jsx(Link, Object.assign({ href: "https://www.pagopa.it/static/781646994f1f8ddad2d95af3aaedac3d/Sicurezza-delle-informazioni_PagoPA-S.p.A..pdft", underline: "none", sx: {
36
+ } }, { children: 'Termini e condizioni d’uso del sito ' }), void 0), (0, jsx_runtime_1.jsx)(material_1.Link, Object.assign({ href: "https://www.pagopa.it/static/781646994f1f8ddad2d95af3aaedac3d/Sicurezza-delle-informazioni_PagoPA-S.p.A..pdft", underline: "none", sx: {
34
37
  marginRight: '10px',
35
38
  color: '#9BB7CB !important',
36
39
  textDecoration: 'none !important',
37
- } }, { children: 'Sicurezza delle informazioni ' }), void 0), assistanceEmail && (_jsx(Link, Object.assign({ href: `mailto:${assistanceEmail}`, underline: "none", sx: {
40
+ } }, { children: 'Sicurezza delle informazioni ' }), void 0), assistanceEmail && ((0, jsx_runtime_1.jsx)(material_1.Link, Object.assign({ href: `mailto:${assistanceEmail}`, underline: "none", sx: {
38
41
  margin: '10px',
39
42
  color: '#9BB7CB !important',
40
43
  textDecoration: 'none !important',
41
44
  } }, { children: 'Assistenza ' }), void 0))] }), void 0) }), void 0) }), void 0)] }), void 0));
42
- export default Footer;
45
+ exports.default = Footer;
46
+ //# sourceMappingURL=Footer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Footer.js","sourceRoot":"","sources":["../../../src/lib/components/Footer/Footer.tsx"],"names":[],"mappings":";;;AAAA,4CAAqE;AACrE,oEAAuE;AAOvE,gCAAgC;AAChC,MAAM,MAAM,GAAG,CAAC,EAAE,eAAe,EAAS,EAAE,EAAE,CAAC,CAC7C,wBAAC,cAAG,kBACF,SAAS,EAAC,QAAQ,EAClB,EAAE,EAAE;QACF,EAAE,EAAE,MAAM;QACV,MAAM,EAAE,OAAO;QACf,EAAE,EAAE,MAAM;QACV,OAAO,EAAE,SAAS;QAClB,UAAU,EAAE,QAAQ;QACpB,SAAS,EAAE,OAAO;QAClB,QAAQ,EAAE,UAAU;KACrB,iBAED,uBAAC,eAAI,kBAAC,SAAS,QAAC,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,gBAC5D,wBAAC,cAAG,kBAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,iBACxC,uBAAC,kBAAO,IAAC,SAAS,EAAE,iCAAI,EAAE,OAAO,EAAC,YAAY,EAAC,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,WAAI,EACzE,uBAAC,cAAG,kBAAC,E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G,EACpH,SAAS,EAAC,MAAM,EAChB,EAAE,EAAE;gCACF,WAAW,EAAE,MAAM;gCACnB,KAAK,EAAE,oBAAoB;gCAC3B,cAAc,EAAE,iBAAiB;6BAClC,gBAEA,+BAA+B,YAC3B,EACN,eAAe,IAAI,CAClB,uBAAC,eAAI,kBACH,IAAI,EAAE,UAAU,eAAe,EAAE,EACjC,SAAS,EAAC,MAAM,EAChB,EAAE,EAAE;gCACF,MAAM,EAAE,MAAM;gCACd,KAAK,EAAE,oBAAoB;gCAC3B,cAAc,EAAE,iBAAiB;6BAClC,gBAEA,aAAa,YACT,CACR,aACU,YACT,YACD,aACH,CACP,CAAC;AAEF,kBAAe,MAAM,CAAC"}
@@ -1,8 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  declare type HeaderProps = {
3
+ /** if true, it will render an other toolbar under the Header */
3
4
  withSecondHeader: boolean;
5
+ /** The function to be invoked when pressing the rendered logout button, if not defined it will redirect to the logout page, if setted to null it will no render the logout button. It's possible to modify the logout path changing the value in CONFIG.logout inside the index.tsx file */
4
6
  onExitAction?: (() => void) | null;
7
+ /** If withSecondHeader is true, this component will be rendered at the end of the secondary toolbar */
5
8
  subHeaderChild?: React.ReactNode;
6
9
  };
10
+ /** SelfCare Header component */
7
11
  declare const Header: ({ withSecondHeader, onExitAction, subHeaderChild, }: HeaderProps) => JSX.Element;
8
12
  export default Header;
@@ -1,14 +1,19 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { AppBar, Button, SvgIcon, Toolbar } from '@mui/material';
3
- import { Box } from '@mui/system';
4
- import { Fragment } from 'react';
5
- import { ReactComponent as logo } from '../../assets/logo_pago_pa_mini.svg';
6
- import { CONFIG } from '../../config/env';
7
- import SubHeader from './subHeader/SubHeader';
8
- const Header = ({ withSecondHeader, onExitAction = () => window.location.assign(CONFIG.URL_FE.LOGOUT), subHeaderChild, }) => (_jsxs(Fragment, { children: [_jsx(AppBar, Object.assign({ position: "relative", sx: {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const material_1 = require("@mui/material");
6
+ const system_1 = require("@mui/system");
7
+ const react_1 = require("react");
8
+ const logo_pago_pa_mini_svg_1 = require("../../assets/logo_pago_pa_mini.svg");
9
+ const env_1 = require("../../config/env");
10
+ const SubHeader_1 = (0, tslib_1.__importDefault)(require("./subHeader/SubHeader"));
11
+ /** SelfCare Header component */
12
+ const Header = ({ withSecondHeader, onExitAction = () => window.location.assign(env_1.CONFIG.URL_FE.LOGOUT), subHeaderChild, }) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.AppBar, Object.assign({ position: "relative", sx: {
9
13
  alignItems: 'center',
10
14
  height: '48px',
11
15
  backgroundColor: 'primary.dark',
12
16
  boxShadow: 'none',
13
- } }, { children: _jsxs(Toolbar, Object.assign({ sx: { width: { xs: '100%', lg: '90%', minHeight: '48px !important' } } }, { children: [_jsx(SvgIcon, { component: logo, viewBox: "0 0 80 24", sx: { width: '80px' } }, void 0), onExitAction !== null ? (_jsx(Box, Object.assign({ sx: { flexGrow: 1, textAlign: 'right' } }, { children: _jsx(Button, Object.assign({ variant: "contained", sx: { width: '88px', backgroundColor: '#004C99', height: '32px' }, onClick: onExitAction }, { children: "Esci" }), void 0) }), void 0)) : ('')] }), void 0) }), void 0), withSecondHeader === true ? _jsx(SubHeader, { children: subHeaderChild }, void 0) : ''] }, void 0));
14
- export default Header;
17
+ } }, { children: (0, jsx_runtime_1.jsxs)(material_1.Toolbar, Object.assign({ sx: { width: { xs: '100%', lg: '90%', minHeight: '48px !important' } } }, { children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { component: logo_pago_pa_mini_svg_1.ReactComponent, viewBox: "0 0 80 24", sx: { width: '80px' } }, void 0), onExitAction !== null ? ((0, jsx_runtime_1.jsx)(system_1.Box, Object.assign({ sx: { flexGrow: 1, textAlign: 'right' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "contained", sx: { width: '88px', backgroundColor: '#004C99', height: '32px' }, onClick: onExitAction }, { children: "Esci" }), void 0) }), void 0)) : ('')] }), void 0) }), void 0), withSecondHeader === true ? (0, jsx_runtime_1.jsx)(SubHeader_1.default, { children: subHeaderChild }, void 0) : ''] }, void 0));
18
+ exports.default = Header;
19
+ //# sourceMappingURL=Header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../src/lib/components/Header/Header.tsx"],"names":[],"mappings":";;;;AAAA,4CAAiE;AACjE,wCAAkC;AAClC,iCAAiC;AACjC,8EAA4E;AAC5E,0CAA0C;AAC1C,mFAA8C;AAW9C,gCAAgC;AAChC,MAAM,MAAM,GAAG,CAAC,EACd,gBAAgB,EAChB,YAAY,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,YAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EACjE,cAAc,GACF,EAAE,EAAE,CAAC,CACjB,wBAAC,gBAAQ,eACP,uBAAC,iBAAM,kBACL,QAAQ,EAAC,UAAU,EACnB,EAAE,EAAE;gBACF,UAAU,EAAE,QAAQ;gBACpB,MAAM,EAAE,MAAM;gBACd,eAAe,EAAE,cAAc;gBAC/B,SAAS,EAAE,MAAM;aAClB,gBAED,wBAAC,kBAAO,kBAAC,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,EAAE,iBAC7E,uBAAC,kBAAO,IAAC,SAAS,EAAE,sCAAI,EAAE,OAAO,EAAC,WAAW,EAAC,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,WAAI,EACtE,YAAY,KAAK,IAAI,CAAC,CAAC,CAAC,CACvB,uBAAC,YAAG,kBAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,gBAC1C,uBAAC,iBAAM,kBACL,OAAO,EAAC,WAAW,EACnB,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,EACjE,OAAO,EAAE,YAAY,kCAGd,YACL,CACP,CAAC,CAAC,CAAC,CACF,EAAE,CACH,aACO,YACH,EACR,gBAAgB,KAAK,IAAI,CAAC,CAAC,CAAC,uBAAC,mBAAS,cAAE,cAAc,WAAa,CAAC,CAAC,CAAC,EAAE,YAChE,CACZ,CAAC;AAEF,kBAAe,MAAM,CAAC"}
@@ -1,13 +1,15 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { AppBar, Grid, Toolbar, Typography } from '@mui/material';
3
- export default function SubHeader({ children }) {
4
- return (_jsx(AppBar, Object.assign({ position: "relative", sx: { alignItems: 'center', height: '107px', backgroundColor: '#0066CC', boxShadow: 'none' } }, { children: _jsx(Toolbar, Object.assign({ sx: { width: { xs: '100%', lg: '90%' }, minHeight: '107px !important' } }, { children: _jsxs(Grid, Object.assign({ container: true }, { children: [_jsxs(Grid, Object.assign({ container: true, item: true, direction: "column", xs: 6 }, { children: [_jsx(Grid, Object.assign({ item: true }, { children: _jsx(Typography, Object.assign({ component: "div", sx: {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const material_1 = require("@mui/material");
5
+ function SubHeader({ children }) {
6
+ return ((0, jsx_runtime_1.jsx)(material_1.AppBar, Object.assign({ position: "relative", sx: { alignItems: 'center', height: '107px', backgroundColor: '#0066CC', boxShadow: 'none' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Toolbar, Object.assign({ sx: { width: { xs: '100%', lg: '90%' }, minHeight: '107px !important' } }, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, item: true, direction: "column", xs: 6 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", sx: {
5
7
  fontWeight: 'bold',
6
8
  fontSize: '24px',
7
9
  lineHeight: '36px',
8
10
  textAlign: 'left',
9
11
  color: 'background.default',
10
- } }, { children: "Self Care" }), void 0) }), void 0), _jsx(Grid, Object.assign({ item: true }, { children: _jsx(Typography, Object.assign({ component: "div", sx: {
12
+ } }, { children: "Self Care" }), void 0) }), void 0), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", sx: {
11
13
  fontWeight: 'normal',
12
14
  fontSize: '14px',
13
15
  lineHeight: '24px',
@@ -15,3 +17,5 @@ export default function SubHeader({ children }) {
15
17
  color: 'background.default',
16
18
  } }, { children: "Gestisci i tuoi prodotti e servizi PagoPA" }), void 0) }), void 0)] }), void 0), children] }), void 0) }), void 0) }), void 0));
17
19
  }
20
+ exports.default = SubHeader;
21
+ //# sourceMappingURL=SubHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubHeader.js","sourceRoot":"","sources":["../../../../src/lib/components/Header/subHeader/SubHeader.tsx"],"names":[],"mappings":";;;AACA,4CAAiE;AAMjE,SAAwB,SAAS,CAAC,EAAC,QAAQ,EAAQ;IACjD,OAAO,CACL,uBAAC,iBAAM,kBACP,QAAQ,EAAC,UAAU,EACnB,EAAE,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAC,MAAM,EAAE,gBAE3F,uBAAC,kBAAO,kBAAC,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,kBAAkB,EAAE,gBAC9E,wBAAC,eAAI,kBAAC,SAAS,uBACb,wBAAC,eAAI,kBAAC,SAAS,QAAC,IAAI,QAAC,SAAS,EAAC,QAAQ,EAAC,EAAE,EAAE,CAAC,iBAC3C,uBAAC,eAAI,kBAAC,IAAI,sBACR,uBAAC,qBAAU,kBACT,SAAS,EAAC,KAAK,EACf,EAAE,EAAE;wCACF,UAAU,EAAE,MAAM;wCAClB,QAAQ,EAAE,MAAM;wCAChB,UAAU,EAAE,MAAM;wCAClB,SAAS,EAAE,MAAM;wCACjB,KAAK,EAAE,oBAAoB;qCAC5B,uCAGU,YACR,EACP,uBAAC,eAAI,kBAAC,IAAI,sBACR,uBAAC,qBAAU,kBACT,SAAS,EAAC,KAAK,EACf,EAAE,EAAE;wCACF,UAAU,EAAE,QAAQ;wCACpB,QAAQ,EAAE,MAAM;wCAChB,UAAU,EAAE,MAAM;wCAClB,SAAS,EAAE,MAAM;wCACjB,KAAK,EAAE,oBAAoB;qCAC5B,uEAGU,YACR,aACF,EACN,QAAQ,aACJ,YACC,YACH,CACR,CAAC;AACJ,CAAC;AA3CD,4BA2CC"}
@@ -1 +1,6 @@
1
+ /** This feature is based on react-redux library and require to register the reducer build in appStateSlice into the application's redux store.
2
+ It allows to draw a loader when an async task to wait is running.
3
+
4
+ To use this feature you have to put LoadingOverlay in your App as a child of a redux Provider component.
5
+ In order to register the start of an async task you have to use the custom hook useLoading passing the id of the task to await, which will return a setter function used to start and end the loading behavior. */
1
6
  export default function LoadingOverlay(): JSX.Element;