@pagopa/selfcare-common-frontend 1.13.5 → 1.13.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 +13 -0
- package/build.info +2 -2
- package/components/EndingPage.d.ts +3 -1
- package/components/EndingPage.js +1 -1
- package/components/EndingPage.js.map +1 -1
- package/components/ErrorBoundary/ErrorBoundary.d.ts +1 -0
- package/components/ErrorBoundary/ErrorBoundary.js +1 -1
- package/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/components/ErrorBoundary/components/BlockingErrorPage.d.ts +2 -1
- package/components/ErrorBoundary/components/BlockingErrorPage.js +2 -2
- package/components/ErrorBoundary/components/BlockingErrorPage.js.map +1 -1
- package/components/SessionModal.d.ts +2 -0
- package/components/SessionModal.js +2 -2
- package/components/SessionModal.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,21 @@ 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.13.7](https://github.com/pagopa/selfcare-common-frontend/compare/v1.13.6...v1.13.7)
|
|
8
|
+
|
|
9
|
+
- SELC-1739 Introduced a feature to SessionModal, in order to optionally show the closeButton [`#135`](https://github.com/pagopa/selfcare-common-frontend/pull/135)
|
|
10
|
+
- SELC-1739 Introduced a feature to SessionModal, in order to optionally show the closeButton (#135) [`#1739`](https://pagopa.atlassian.net/browse/1739)
|
|
11
|
+
|
|
12
|
+
#### [v1.13.6](https://github.com/pagopa/selfcare-common-frontend/compare/v1.13.5...v1.13.6)
|
|
13
|
+
|
|
14
|
+
> 6 December 2022
|
|
15
|
+
|
|
16
|
+
- Setting a dynamic minHeight in order to have correct height for blockingPage and ending pages [`14c870f`](https://github.com/pagopa/selfcare-common-frontend/commit/14c870f6230042fda240e78f374690d5cc37a132)
|
|
17
|
+
|
|
7
18
|
#### [v1.13.5](https://github.com/pagopa/selfcare-common-frontend/compare/v1.13.4...v1.13.5)
|
|
8
19
|
|
|
20
|
+
> 5 December 2022
|
|
21
|
+
|
|
9
22
|
- add another type to icon prop in order to support svg's [`369c852`](https://github.com/pagopa/selfcare-common-frontend/commit/369c852858cc51f1585403e82532f4d64071ce55)
|
|
10
23
|
|
|
11
24
|
#### [v1.13.4](https://github.com/pagopa/selfcare-common-frontend/compare/v1.13.3...v1.13.4)
|
package/build.info
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
remotes/origin/SELC-1407_usingEnableAssistanceProp
|
|
1
|
+
20230110.1 - selfcare-common-frontend.deploy(66367)
|
|
2
|
+
remotes/origin/SELC-1407_usingEnableAssistanceProp b613bb821e956c7de8992091f978308e1576ec0d
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { SvgIconProps } from '@mui/material';
|
|
2
2
|
import { FunctionComponent, SVGProps } from 'react';
|
|
3
3
|
declare type Props = {
|
|
4
|
+
/** The minHeight of the component, can be 52vh for the pages and 100vh for the blocking page */
|
|
5
|
+
minHeight?: '52vh' | '100vh';
|
|
4
6
|
/** The ending page icon */
|
|
5
7
|
icon?: React.ReactElement<SvgIconProps> | FunctionComponent<SVGProps<SVGSVGElement>> | string;
|
|
6
8
|
/** The ending page title */
|
|
@@ -16,6 +18,6 @@ declare type Props = {
|
|
|
16
18
|
/** Set the variant of the description */
|
|
17
19
|
variantDescription?: 'button' | 'caption' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'inherit' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'overline' | undefined;
|
|
18
20
|
};
|
|
19
|
-
declare const _default: ({ description, onButtonClick, icon, title, buttonLabel, variantTitle, variantDescription, }: Props) => JSX.Element;
|
|
21
|
+
declare const _default: ({ minHeight, description, onButtonClick, icon, title, buttonLabel, variantTitle, variantDescription, }: Props) => JSX.Element;
|
|
20
22
|
/** Selfcare's Ending Page */
|
|
21
23
|
export default _default;
|
package/components/EndingPage.js
CHANGED
|
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
4
|
const material_1 = require("@mui/material");
|
|
5
5
|
/** Selfcare's Ending Page */
|
|
6
|
-
exports.default = ({ description, onButtonClick, icon, title, buttonLabel, variantTitle, variantDescription, }) => ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { minHeight
|
|
6
|
+
exports.default = ({ minHeight, description, onButtonClick, icon, title, buttonLabel, variantTitle, variantDescription, }) => ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { minHeight, position: 'static' }, 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") }));
|
|
7
7
|
//# sourceMappingURL=EndingPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EndingPage.js","sourceRoot":"","sources":["../../src/lib/components/EndingPage.tsx"],"names":[],"mappings":";;;AAAA,4CAA4E;
|
|
1
|
+
{"version":3,"file":"EndingPage.js","sourceRoot":"","sources":["../../src/lib/components/EndingPage.tsx"],"names":[],"mappings":";;;AAAA,4CAA4E;AAoD5E,6BAA6B;AAC7B,kBAAe,CAAC,EACd,SAAS,EACT,WAAW,EACX,aAAa,EACb,IAAI,EACJ,KAAK,EACL,WAAW,EACX,YAAY,EACZ,kBAAkB,GACZ,EAAE,EAAE,CAAC,CACX,uBAAC,cAAG,IAAC,EAAE,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAC,MAAM,EAAC,QAAQ,EAAE,CAAC,YACpE,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,IAAC,OAAO,EAAC,WAAW,EAAC,EAAE,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,aAAa,YAC5E,WAAW,GACL,GACJ,GACF,CACR,KAxBoC,GAAG,CAyBnC,GACH,CACP,CAAC"}
|
|
@@ -50,7 +50,7 @@ class ErrorBoundary extends react_1.Component {
|
|
|
50
50
|
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [this.props.children, hasError && this.buildNotBlockingError(this.props.errors)] }));
|
|
51
51
|
}
|
|
52
52
|
else {
|
|
53
|
-
return ((0, jsx_runtime_1.jsx)(BlockingErrorPage_1.default, { description: blockingErrors[0].displayableDescription, assistanceEmail: this.props.assistanceEmail }));
|
|
53
|
+
return ((0, jsx_runtime_1.jsx)(BlockingErrorPage_1.default, { description: blockingErrors[0].displayableDescription, assistanceEmail: this.props.assistanceEmail, minHeight: this.props.minHeight }));
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
buildNotBlockingError(errors) {
|
|
@@ -1 +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,iDAA2D;AAC3D,4GAAgF;AAChF,oEAAgG;AAChG,8DAA2D;AAC3D,2EAA2C;AAC3C,6DAA6B;AAC7B,+FAA+D;
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../../src/lib/components/ErrorBoundary/ErrorBoundary.tsx"],"names":[],"mappings":";;;;AACA,mCAAkC;AACl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AED,WAAW,CAAC,KAAe;QACzB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACrB,IAAI,KAAK,CAAC,OAAO,EAAE;YACjB,KAAK,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,IAAA,+BAAe,GAAE,CAAC,sBAAsB,CAAC,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
declare type Props = {
|
|
3
3
|
description?: React.ReactNode;
|
|
4
4
|
assistanceEmail?: string;
|
|
5
|
+
minHeight?: '52vh' | '100vh';
|
|
5
6
|
};
|
|
6
|
-
declare const _default: ({ description, assistanceEmail }: Props) => JSX.Element;
|
|
7
|
+
declare const _default: ({ description, assistanceEmail, minHeight }: Props) => JSX.Element;
|
|
7
8
|
export default _default;
|
|
@@ -6,9 +6,9 @@ const react_i18next_1 = require("react-i18next");
|
|
|
6
6
|
const assistanceService_1 = require("../../../services/assistanceService");
|
|
7
7
|
const EndingPage_1 = tslib_1.__importDefault(require("../../EndingPage"));
|
|
8
8
|
const ErrorIcon_1 = tslib_1.__importDefault(require("../../icons/ErrorIcon"));
|
|
9
|
-
exports.default = ({ description, assistanceEmail }) => {
|
|
9
|
+
exports.default = ({ description, assistanceEmail, minHeight = '100vh' }) => {
|
|
10
10
|
const { t } = (0, react_i18next_1.useTranslation)();
|
|
11
|
-
return ((0, jsx_runtime_1.jsx)(EndingPage_1.default, { icon: (0, jsx_runtime_1.jsx)(ErrorIcon_1.default, {}), title: t('common.blockingErrorPage.title'), description: description !== null && description !== void 0 ? description : t('common.blockingErrorPage.description'), onButtonClick: assistanceEmail
|
|
11
|
+
return ((0, jsx_runtime_1.jsx)(EndingPage_1.default, { minHeight: minHeight, icon: (0, jsx_runtime_1.jsx)(ErrorIcon_1.default, {}), title: t('common.blockingErrorPage.title'), description: description !== null && description !== void 0 ? description : t('common.blockingErrorPage.description'), onButtonClick: assistanceEmail
|
|
12
12
|
? () => window.location.assign((0, assistanceService_1.buildAssistanceURI)(assistanceEmail))
|
|
13
13
|
: undefined, buttonLabel: t('common.blockingErrorPage.buttonLabel') }));
|
|
14
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockingErrorPage.js","sourceRoot":"","sources":["../../../../src/lib/components/ErrorBoundary/components/BlockingErrorPage.tsx"],"names":[],"mappings":";;;;AAAA,iDAA+C;AAC/C,2EAAyE;AACzE,0EAA0C;AAC1C,8EAA8C;
|
|
1
|
+
{"version":3,"file":"BlockingErrorPage.js","sourceRoot":"","sources":["../../../../src/lib/components/ErrorBoundary/components/BlockingErrorPage.tsx"],"names":[],"mappings":";;;;AAAA,iDAA+C;AAC/C,2EAAyE;AACzE,0EAA0C;AAC1C,8EAA8C;AAO9C,kBAAe,CAAC,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,GAAG,OAAO,EAAS,EAAE,EAAE;IAC9E,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,8BAAc,GAAE,CAAC;IAC/B,OAAO,CACL,uBAAC,oBAAU,IACT,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,uBAAC,mBAAS,KAAG,EACnB,KAAK,EAAE,CAAC,CAAC,gCAAgC,CAAC,EAC1C,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,CAAC,CAAC,sCAAsC,CAAC,EACrE,aAAa,EACX,eAAe;YACb,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAA,sCAAkB,EAAC,eAAe,CAAC,CAAC;YACnE,CAAC,CAAC,SAAS,EAEf,WAAW,EAAE,CAAC,CAAC,sCAAsC,CAAC,GACtD,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -33,6 +33,8 @@ declare type Props = {
|
|
|
33
33
|
t: TFunction<'translation', undefined>;
|
|
34
34
|
/** If true show modal close icon */
|
|
35
35
|
showCloseIcon?: boolean;
|
|
36
|
+
/** If false not show the close button, default true */
|
|
37
|
+
showCloseButton?: boolean;
|
|
36
38
|
};
|
|
37
39
|
declare const _default: React.ComponentType<Omit<import("react-i18next").Subtract<Props, import("react-i18next").WithTranslationProps>, keyof import("react-i18next").WithTranslation<N>> & import("react-i18next").WithTranslationProps>;
|
|
38
40
|
export default _default;
|
|
@@ -9,10 +9,10 @@ const styles_1 = require("@mui/material/styles");
|
|
|
9
9
|
const ClearOutlined_1 = tslib_1.__importDefault(require("@mui/icons-material/ClearOutlined"));
|
|
10
10
|
const react_i18next_1 = require("react-i18next");
|
|
11
11
|
/** Selfcare's popup */
|
|
12
|
-
function SessionModal({ t, open, title, message, onConfirm, onConfirmEnabled = true, onConfirmLabel = t('common.sessionModal.confirmButton'), productEnvironments, handleClose, handleExit = handleClose, onCloseLabel = t('common.sessionModal.closeButton'), height, minHeight, width = '33.3em', showCloseIcon = false, }) {
|
|
12
|
+
function SessionModal({ t, open, title, message, onConfirm, onConfirmEnabled = true, onConfirmLabel = t('common.sessionModal.confirmButton'), productEnvironments, handleClose, handleExit = handleClose, onCloseLabel = t('common.sessionModal.closeButton'), height, minHeight, width = '33.3em', showCloseIcon = false, showCloseButton = true, }) {
|
|
13
13
|
const theme = (0, styles_1.useTheme)();
|
|
14
14
|
const fullScreen = (0, useMediaQuery_1.default)(theme.breakpoints.down('xs'));
|
|
15
|
-
return ((0, jsx_runtime_1.jsx)(Dialog_1.default, { fullScreen: fullScreen, open: open, onClose: handleClose, "aria-labelledby": "responsive-dialog-title", children: (0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, sx: { height, minHeight, width }, px: 4, children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, { item: true, xs: 12, mt: 4, children: [showCloseIcon && ((0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: handleExit, style: { position: 'absolute', top: '20px', right: '16px', zIndex: 100 }, children: (0, jsx_runtime_1.jsx)(ClearOutlined_1.default, {}) })), (0, jsx_runtime_1.jsx)(material_1.Typography, { sx: { fontSize: '24px', fontWeight: '600' }, children: title })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { width: "100%", children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 12, my: 3, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { sx: { fontSize: '18px', fontWeight: '400' }, children: message }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 12, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: productEnvironments ? 'space-between' : 'flex-end', children: [(0, jsx_runtime_1.jsx)(material_1.Box, { mb: 3, mt: 0, children: (0, jsx_runtime_1.jsx)(material_1.Button, { onClick: handleClose, color: "primary", variant: "outlined", children: onCloseLabel }) }), onConfirm && ((0, jsx_runtime_1.jsxs)(material_1.Box, { mb: 3, display: "flex", flexDirection: "row-reverse", children: [(0, jsx_runtime_1.jsx)(material_1.Button, { sx: { marginLeft: 2 }, color: "primary", variant: "contained", onClick: onConfirm, disabled: !onConfirmEnabled, children: onConfirmLabel }), productEnvironments &&
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(Dialog_1.default, { fullScreen: fullScreen, open: open, onClose: handleClose, "aria-labelledby": "responsive-dialog-title", children: (0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, sx: { height, minHeight, width }, px: 4, children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, { item: true, xs: 12, mt: 4, children: [showCloseIcon && ((0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: handleExit, style: { position: 'absolute', top: '20px', right: '16px', zIndex: 100 }, children: (0, jsx_runtime_1.jsx)(ClearOutlined_1.default, {}) })), (0, jsx_runtime_1.jsx)(material_1.Typography, { sx: { fontSize: '24px', fontWeight: '600' }, children: title })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { width: "100%", children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 12, my: 3, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { sx: { fontSize: '18px', fontWeight: '400' }, children: message }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 12, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: productEnvironments ? 'space-between' : 'flex-end', children: [showCloseButton && ((0, jsx_runtime_1.jsx)(material_1.Box, { mb: 3, mt: 0, children: (0, jsx_runtime_1.jsx)(material_1.Button, { onClick: handleClose, color: "primary", variant: "outlined", children: onCloseLabel }) })), onConfirm && ((0, jsx_runtime_1.jsxs)(material_1.Box, { mb: 3, display: "flex", flexDirection: "row-reverse", children: [(0, jsx_runtime_1.jsx)(material_1.Button, { sx: { marginLeft: 2 }, color: "primary", variant: "contained", onClick: onConfirm, disabled: !onConfirmEnabled, children: onConfirmLabel }), productEnvironments &&
|
|
16
16
|
productEnvironments.map((p) => ((0, jsx_runtime_1.jsx)(material_1.Box, { ml: 2, children: (0, jsx_runtime_1.jsx)(material_1.Button, { value: p.environment, color: "primary", variant: "contained", onClick: onConfirm, children: p.environment
|
|
17
17
|
.toLowerCase()
|
|
18
18
|
.replace(/\b[a-z]/g, p.environment.charAt(0).toUpperCase()) }) }, p.environment)))] }))] }) })] })] }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionModal.js","sourceRoot":"","sources":["../../src/lib/components/SessionModal.tsx"],"names":[],"mappings":";;;;AACA,4CAA0E;AAC1E,0EAA0C;AAC1C,wFAAwD;AACxD,iDAAgD;AAChD,8FAAkE;AAClE,iDAA2D;
|
|
1
|
+
{"version":3,"file":"SessionModal.js","sourceRoot":"","sources":["../../src/lib/components/SessionModal.tsx"],"names":[],"mappings":";;;;AACA,4CAA0E;AAC1E,0EAA0C;AAC1C,wFAAwD;AACxD,iDAAgD;AAChD,8FAAkE;AAClE,iDAA2D;AAuC3D,uBAAuB;AACvB,SAAS,YAAY,CAAC,EACpB,CAAC,EACD,IAAI,EACJ,KAAK,EACL,OAAO,EACP,SAAS,EACT,gBAAgB,GAAG,IAAI,EACvB,cAAc,GAAG,CAAC,CAAC,mCAAmC,CAAC,EACvD,mBAAmB,EACnB,WAAW,EACX,UAAU,GAAG,WAAW,EACxB,YAAY,GAAG,CAAC,CAAC,iCAAiC,CAAC,EACnD,MAAM,EACN,SAAS,EACT,KAAK,GAAG,QAAQ,EAChB,aAAa,GAAG,KAAK,EACrB,eAAe,GAAG,IAAI,GAChB;IACN,MAAM,KAAK,GAAG,IAAA,iBAAQ,GAAE,CAAC;IACzB,MAAM,UAAU,GAAG,IAAA,uBAAa,EAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAE/D,OAAO,CACL,uBAAC,gBAAM,IACL,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,WAAW,qBACJ,yBAAyB,YAEzC,wBAAC,eAAI,IAAC,SAAS,QAAC,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,aACrD,wBAAC,eAAI,IA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,EACnB,OAAO,EAAE,SAAS,EAClB,QAAQ,EAAE,CAAC,gBAAgB,YAE1B,cAAc,GACR,EACR,mBAAmB;gDAClB,mBAAmB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAC7B,uBAAC,cAAG,IAAC,EAAE,EAAE,CAAC,YACR,uBAAC,iBAAM,IACL,KAAK,EAAE,CAAC,CAAC,WAAW,EACpB,KAAK,EAAC,SAAS,EACf,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,SAAS,YAEjB,CAAC,CAAC,WAAW;6DACX,WAAW,EAAE;6DACb,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,GACtD,IAVM,CAAC,CAAC,WAAW,CAWxB,CACP,CAAC,IACA,CACP,IACG,GACD,IACH,IACD,GACA,CACV,CAAC;AACJ,CAAC;AACD,kBAAe,IAAA,+BAAe,GAAE,CAAC,YAAY,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.13.
|
|
4
|
+
"version": "1.13.7",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/pagopa/selfcare-common-frontend",
|
|
7
7
|
"author": "https://www.pagopa.gov.it",
|