@movalib/movalib-commons 1.1.1 → 1.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.
- package/PV_README.md +1 -1
- package/dist/src/AccountValidation.js +1 -1
- package/dist/src/MovaCopyright.d.ts +2 -1
- package/dist/src/MovaCopyright.js +2 -2
- package/dist/src/MovaLogin.js +2 -1
- package/package.json +1 -1
- package/src/AccountValidation.tsx +1 -1
- package/src/MovaCopyright.tsx +14 -10
- package/src/MovaLogin.tsx +3 -2
package/PV_README.md
CHANGED
|
@@ -23,5 +23,5 @@ Les commandes exécutées (ci-dessous) permettent de contourner un problème de
|
|
|
23
23
|
"link": "npm link --only=production && npm link \"/home/dimitri/Projets/5 - MOVALIB/02 - Développement/Front-End/movalib-user-app/node_modules/react\" && npm link \"/home/dimitri/Projets/5 - MOVALIB/02 - Développement/Front-End/movalib-user-app/node_modules/react-dom\"",
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
gsutil setmeta -h "Cache-Control:no-cache, must-revalidate" gs://app.movalib.com/*
|
|
27
27
|
gsutil setmeta -h "Cache-Control:no-cache, must-revalidate" gs://pro.movalib.com/*
|
|
@@ -114,7 +114,7 @@ var AccountValidation = function (_a) {
|
|
|
114
114
|
};
|
|
115
115
|
};
|
|
116
116
|
return ((0, jsx_runtime_1.jsxs)("div", { children: [emptyPwd &&
|
|
117
|
-
(0, jsx_runtime_1.jsx)(MovaDialog_1.default, __assign({ leafImageColor: 'pink', title: movaAppType === Enums_1.MovaAppType.GARAGE ? "
|
|
117
|
+
(0, jsx_runtime_1.jsx)(MovaDialog_1.default, __assign({ leafImageColor: 'pink', title: movaAppType === Enums_1.MovaAppType.GARAGE ? "Bienvenue sur Movalib PRO !" : "Bienvenue sur Movalib !", titleStyle: getTitleStyle(), fullScreen: isMobile, open: emptyPwd, closable: false, onClose: function () {
|
|
118
118
|
throw new Error('Function not implemented.');
|
|
119
119
|
}, actions: (0, jsx_runtime_1.jsx)(lab_1.LoadingButton, __assign({ type: "submit", onClick: handleValidateAccount, fullWidth: true, variant: "contained", sx: { mt: 4, mb: 0 } }, { children: (0, jsx_runtime_1.jsx)("span", { children: "Valider mon compte" }) })) }, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ container: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: 12 }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ sx: { mt: 2, mb: 2 } }, { children: movaAppType === Enums_1.MovaAppType.GARAGE ?
|
|
120
120
|
"Pour commencer, définis ton mot de passe et active ton compte 😉"
|
|
@@ -13,7 +13,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
15
15
|
var material_1 = require("@mui/material");
|
|
16
|
-
function MovaCopyright(props) {
|
|
17
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Typography, __assign({ variant: "body2", color: "text.secondary", align: "center" }, props, { children: ['Copyright © ', (0, jsx_runtime_1.jsx)(material_1.Link, __assign({ color: "inherit", href: "https://www.movalib.com", target: "_blank", rel: "noopener noreferrer" }, { children: "Movalib.com" })), ' ', new Date().getFullYear(), '.'] })));
|
|
16
|
+
function MovaCopyright(props, theme) {
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, __assign({ variant: "body2", color: "text.secondary", align: "center" }, props, { children: ['Copyright © ', (0, jsx_runtime_1.jsx)(material_1.Link, __assign({ color: "inherit", href: "https://www.movalib.com", target: "_blank", rel: "noopener noreferrer" }, { children: "Movalib.com" })), ' ', new Date().getFullYear(), '.'] })), process.env.REACT_APP_VERSION && (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ variant: 'body2', color: theme.palette.grey[200], sx: { textAlign: 'center' } }, { children: process.env.REACT_APP_VERSION }))] }));
|
|
18
18
|
}
|
|
19
19
|
exports.default = MovaCopyright;
|
package/dist/src/MovaLogin.js
CHANGED
|
@@ -86,6 +86,7 @@ var MovaLogin = function (_a) {
|
|
|
86
86
|
var loading = _a.loading, movaAppType = _a.movaAppType, onSubmit = _a.onSubmit, onSubmitForgotPassword = _a.onSubmitForgotPassword, alertMessage = _a.alertMessage, alertSeverity = _a.alertSeverity;
|
|
87
87
|
var _b = (0, react_1.useState)(initialFormState), form = _b[0], setForm = _b[1];
|
|
88
88
|
var _c = (0, react_1.useState)(""), message = _c[0], setMessage = _c[1];
|
|
89
|
+
var theme = (0, material_1.useTheme)();
|
|
89
90
|
var history = (0, react_router_dom_1.useHistory)();
|
|
90
91
|
var _d = (0, react_1.useState)(false), openForgotPassword = _d[0], setOpenForgotPassword = _d[1];
|
|
91
92
|
var _e = (0, react_1.useState)(false), showPassword = _e[0], setShowPassword = _e[1];
|
|
@@ -171,7 +172,7 @@ var MovaLogin = function (_a) {
|
|
|
171
172
|
alignItems: 'center',
|
|
172
173
|
} }, { children: [(0, jsx_runtime_1.jsx)("img", { src: getMovaLogo(), style: { width: '80%' } }), (0, jsx_runtime_1.jsx)("br", {})] })), (0, jsx_runtime_1.jsxs)(material_1.Box, __assign({ component: "form", onSubmit: handleSubmit, noValidate: true, sx: { mt: 1 } }, { children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { margin: "normal", required: true, fullWidth: true, id: "email", label: "Adresse email", name: "email", autoComplete: "email", autoFocus: true, onChange: function (e) { return handleInputChange(e); }, value: form.email.value, error: !form.email.isValid, helperText: form.email.error }), (0, jsx_runtime_1.jsx)(material_1.TextField, { margin: "normal", required: true, fullWidth: true, name: "password", label: "Mot de passe", type: showPassword ? 'text' : 'password', id: "password", autoComplete: "current-password", onChange: function (e) { return handleInputChange(e); }, value: form.password.value, error: !form.password.isValid, helperText: form.password.error, InputProps: {
|
|
173
174
|
endAdornment: ((0, jsx_runtime_1.jsx)(InputAdornment_1.default, __assign({ position: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, __assign({ edge: "end", onClick: handleClickShowPassword }, { children: showPassword ? (0, jsx_runtime_1.jsx)(VisibilityOff_1.default, {}) : (0, jsx_runtime_1.jsx)(Visibility_1.default, {}) })) }))),
|
|
174
|
-
} }), (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { value: "remember", color: "primary" }), label: "Se souvenir de moi" }), (0, jsx_runtime_1.jsx)(lab_1.LoadingButton, __assign({ loading: loading, type: "submit", fullWidth: true, variant: "contained", sx: { mt: 3, mb: 2 } }, { children: (0, jsx_runtime_1.jsx)("span", { children: "Se connecter" }) })), alertMessage && alertSeverity && (0, jsx_runtime_1.jsx)(material_1.Alert, __assign({ severity: alertSeverity, sx: { mb: 2 } }, { children: alertMessage })), (0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ container: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Link, __assign({ variant: "body2", color: "text.secondary", onClick: function (e) { return handleOnClickForgotPassword(e); }, sx: { cursor: 'pointer' } }, { children: "Mot de passe oubli\u00E9 ?" })) })), movaAppType === Enums_1.MovaAppType.INDIVIDUAL && (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Link, __assign({ variant: "body2", color: "text.secondary", onClick: function (e) { return handleOnClickSignUp(e); }, sx: { cursor: 'pointer' } }, { children: "Cr\u00E9er mon compte" })) }))] }))] })), (0, jsx_runtime_1.jsx)(MovaCopyright_1.default, { sx: { mt: 8, mb: 4 } }), openForgotPassword && dialogForgotPassword()] })), (0, jsx_runtime_1.jsx)("img", { src: leaf_pink_large_png_1.default, style: { position: 'fixed',
|
|
175
|
+
} }), (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { value: "remember", color: "primary" }), label: "Se souvenir de moi" }), (0, jsx_runtime_1.jsx)(lab_1.LoadingButton, __assign({ loading: loading, type: "submit", fullWidth: true, variant: "contained", sx: { mt: 3, mb: 2 } }, { children: (0, jsx_runtime_1.jsx)("span", { children: "Se connecter" }) })), alertMessage && alertSeverity && (0, jsx_runtime_1.jsx)(material_1.Alert, __assign({ severity: alertSeverity, sx: { mb: 2 } }, { children: alertMessage })), (0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ container: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Link, __assign({ variant: "body2", color: "text.secondary", onClick: function (e) { return handleOnClickForgotPassword(e); }, sx: { cursor: 'pointer' } }, { children: "Mot de passe oubli\u00E9 ?" })) })), movaAppType === Enums_1.MovaAppType.INDIVIDUAL && (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Link, __assign({ variant: "body2", color: "text.secondary", onClick: function (e) { return handleOnClickSignUp(e); }, sx: { cursor: 'pointer' } }, { children: "Cr\u00E9er mon compte" })) }))] }))] })), (0, jsx_runtime_1.jsx)(MovaCopyright_1.default, { sx: { mt: 8, mb: 4 }, theme: theme }), openForgotPassword && dialogForgotPassword()] })), (0, jsx_runtime_1.jsx)("img", { src: leaf_pink_large_png_1.default, style: { position: 'fixed',
|
|
175
176
|
float: 'right',
|
|
176
177
|
width: '250px',
|
|
177
178
|
height: '400px',
|
package/package.json
CHANGED
|
@@ -139,7 +139,7 @@ const AccountValidation: FunctionComponent<AccountValidationProps> = ({ movaAppT
|
|
|
139
139
|
{emptyPwd &&
|
|
140
140
|
<MovaDialog
|
|
141
141
|
leafImageColor='pink'
|
|
142
|
-
title={movaAppType === MovaAppType.GARAGE ? "
|
|
142
|
+
title={movaAppType === MovaAppType.GARAGE ? "Bienvenue sur Movalib PRO !" : "Bienvenue sur Movalib !" }
|
|
143
143
|
titleStyle={getTitleStyle()}
|
|
144
144
|
fullScreen={isMobile}
|
|
145
145
|
open={emptyPwd}
|
package/src/MovaCopyright.tsx
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import React, { FunctionComponent } from "react";
|
|
2
|
-
import { Link, Typography } from "@mui/material";
|
|
2
|
+
import { Link, Theme, Typography } from "@mui/material";
|
|
3
3
|
|
|
4
|
-
function MovaCopyright(props: any) {
|
|
4
|
+
function MovaCopyright(props: any, theme:Theme) {
|
|
5
5
|
return (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
<>
|
|
7
|
+
<Typography variant="body2" color="text.secondary" align="center" {...props}>
|
|
8
|
+
{'Copyright © '}
|
|
9
|
+
<Link color="inherit" href="https://www.movalib.com" target="_blank" rel="noopener noreferrer">
|
|
10
|
+
Movalib.com
|
|
11
|
+
</Link>{' '}
|
|
12
|
+
{new Date().getFullYear()}
|
|
13
|
+
{'.'}
|
|
14
|
+
</Typography>
|
|
15
|
+
{process.env.REACT_APP_VERSION && <Typography variant='body2' color={theme.palette.grey[200]} sx={{ textAlign: 'center'}}>
|
|
16
|
+
{process.env.REACT_APP_VERSION}</Typography>}
|
|
17
|
+
</>
|
|
14
18
|
);
|
|
15
19
|
}
|
|
16
20
|
|
package/src/MovaLogin.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import LogoProLarge from './assets/images/logo/logo_pro_large.png';
|
|
|
5
5
|
import GreenLeafImage from "./assets/images/leaf_green_large.png";
|
|
6
6
|
import PinkLeafImage from "./assets/images/leaf_pink_large.png";
|
|
7
7
|
import { Alert, AlertColor, Box, Button, Checkbox, Container, CssBaseline, Dialog, DialogActions, DialogContent, DialogContentText,
|
|
8
|
-
DialogTitle, FormControlLabel, Grid, IconButton, Link, TextField } from "@mui/material";
|
|
8
|
+
DialogTitle, FormControlLabel, Grid, IconButton, Link, TextField, useTheme } from "@mui/material";
|
|
9
9
|
import MovaCopyright from "./MovaCopyright";
|
|
10
10
|
import { MovaLoginForm, MovaFormField } from "./helpers/Types";
|
|
11
11
|
import { MovaAppType } from "./helpers/Enums";
|
|
@@ -55,6 +55,7 @@ const MovaLogin: FunctionComponent<MovaLoginProps> = ({ loading, movaAppType, on
|
|
|
55
55
|
|
|
56
56
|
const [form, setForm] = useState<MovaLoginForm>(initialFormState);
|
|
57
57
|
const [message, setMessage] = useState<string>("");
|
|
58
|
+
const theme = useTheme();
|
|
58
59
|
const history = useHistory();
|
|
59
60
|
const [openForgotPassword, setOpenForgotPassword] = useState(false);
|
|
60
61
|
const [showPassword, setShowPassword] = useState(false);
|
|
@@ -275,7 +276,7 @@ const MovaLogin: FunctionComponent<MovaLoginProps> = ({ loading, movaAppType, on
|
|
|
275
276
|
</Grid>
|
|
276
277
|
</Box>
|
|
277
278
|
|
|
278
|
-
<MovaCopyright sx={{ mt: 8, mb: 4 }} />
|
|
279
|
+
<MovaCopyright sx={{ mt: 8, mb: 4 }} theme={theme}/>
|
|
279
280
|
|
|
280
281
|
{openForgotPassword && dialogForgotPassword()}
|
|
281
282
|
|