@movalib/movalib-commons 1.0.74 → 1.0.76
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 +4 -0
- package/devIndex.tsx +1 -0
- package/dist/devIndex.js +1 -0
- package/dist/src/MovaDialog.js +3 -3
- package/dist/src/QRCode.js +6 -3
- package/dist/src/models/Document.d.ts +1 -0
- package/dist/src/models/Document.js +9 -0
- package/package.json +1 -1
- package/src/MovaDialog.tsx +3 -3
- package/src/QRCode.tsx +6 -3
- package/src/models/Document.ts +10 -0
package/PV_README.md
CHANGED
|
@@ -21,3 +21,7 @@ Pour lier la librairie aux projets qui l'utilise, executer la commande suivnte
|
|
|
21
21
|
Les commandes exécutées (ci-dessous) permettent de contourner un problème de double référence vers react et react-dom lorsque les deux appli utilisent des Hook
|
|
22
22
|
|
|
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
|
+
|
|
25
|
+
|
|
26
|
+
gsutil setmeta -h "Cache-Control:no-cache, must-revalidate" gs://app.movalib.com/*
|
|
27
|
+
gsutil setmeta -h "Cache-Control:no-cache, must-revalidate" gs://pro.movalib.com/*
|
package/devIndex.tsx
CHANGED
|
@@ -67,6 +67,7 @@ const App = () => {
|
|
|
67
67
|
|
|
68
68
|
const getQRCodeData = ():string => {
|
|
69
69
|
// On renvoie les données pour le QR Code, l'url change selon l'environnement (variables d'environnement)
|
|
70
|
+
return 'https://www.instagram.com/delightnord/';
|
|
70
71
|
return `https://localhost:3001/#/garage/1?redirect=garage`;
|
|
71
72
|
}
|
|
72
73
|
|
package/dist/devIndex.js
CHANGED
|
@@ -93,6 +93,7 @@ var App = function () {
|
|
|
93
93
|
};
|
|
94
94
|
var getQRCodeData = function () {
|
|
95
95
|
// On renvoie les données pour le QR Code, l'url change selon l'environnement (variables d'environnement)
|
|
96
|
+
return 'https://www.instagram.com/delightnord/';
|
|
96
97
|
return "https://localhost:3001/#/garage/1?redirect=garage";
|
|
97
98
|
};
|
|
98
99
|
var handleScheduleChange = function (schedule) {
|
package/dist/src/MovaDialog.js
CHANGED
|
@@ -52,14 +52,14 @@ var MovaDialog = function (_a) {
|
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
return ((0, jsx_runtime_1.jsxs)(material_1.Dialog, __assign({ fullScreen: fullScreen, fullWidth: true, TransitionComponent: getTransition(), open: open, "aria-labelledby": "garage-dialog-title", "aria-describedby": "garage-dialog-description", onClose: handleOnClose, sx: { textAlign: 'center' } }, { children: [(0, jsx_runtime_1.jsx)("img", { src: getLeafImage(), style: {
|
|
55
|
-
position: '
|
|
55
|
+
position: 'absolute',
|
|
56
56
|
float: 'left',
|
|
57
57
|
width: '150px',
|
|
58
58
|
height: '350px',
|
|
59
|
-
top: '-
|
|
59
|
+
top: '-150px',
|
|
60
60
|
zIndex: 0,
|
|
61
61
|
left: 0,
|
|
62
62
|
opacity: '0.2'
|
|
63
|
-
}, alt: 'Feuille
|
|
63
|
+
}, alt: 'Feuille Movalib' }), (0, jsx_runtime_1.jsx)(material_1.DialogTitle, __assign({ id: "garage-dialog-title", sx: { textAlign: 'center', p: 0, pt: 1, mt: 0, mb: 0, zIndex: 10 } }, { children: (0, jsx_runtime_1.jsx)(material_1.AppBar, __assign({ sx: { position: 'relative' }, color: "transparent", elevation: 0 }, { children: (0, jsx_runtime_1.jsxs)(material_1.Toolbar, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, __assign({ edge: "start", color: "inherit", onClick: handleOnBack, "aria-label": "close" }, { children: (0, jsx_runtime_1.jsx)(ArrowBackIosNewRounded_1.default, {}) })), title && (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ sx: { textAlign: 'center', fontSize: 20, flexGrow: 1, pl: '20px', pr: '40px' }, style: titleStyle }, { children: title }))] }) })) })), (0, jsx_runtime_1.jsxs)(material_1.DialogContent, __assign({ sx: { zIndex: 20 } }, { children: [children, message && (0, jsx_runtime_1.jsx)(material_1.Alert, __assign({ severity: "error", sx: { mb: 2 } }, { children: message }))] })), (0, jsx_runtime_1.jsx)(material_1.DialogActions, __assign({ sx: { justifyContent: 'center' } }, { children: actions }))] })));
|
|
64
64
|
};
|
|
65
65
|
exports.default = MovaDialog;
|
package/dist/src/QRCode.js
CHANGED
|
@@ -53,7 +53,8 @@ var QRCode = function (_a) {
|
|
|
53
53
|
margin: 15
|
|
54
54
|
},
|
|
55
55
|
dotsOptions: {
|
|
56
|
-
color:
|
|
56
|
+
//color: 'black',
|
|
57
|
+
color: (0, material_1.darken)(theme.palette.primary.main, 0.4),
|
|
57
58
|
// gradient: {
|
|
58
59
|
// type: 'linear', // 'radial'
|
|
59
60
|
// rotation: 0,
|
|
@@ -70,7 +71,8 @@ var QRCode = function (_a) {
|
|
|
70
71
|
// },
|
|
71
72
|
},
|
|
72
73
|
cornersSquareOptions: {
|
|
73
|
-
color:
|
|
74
|
+
//color: '#de007dff',
|
|
75
|
+
color: (0, material_1.darken)(theme.palette.secondary.main, 0.2),
|
|
74
76
|
type: 'square',
|
|
75
77
|
// gradient: {
|
|
76
78
|
// type: 'linear', // 'radial'
|
|
@@ -79,7 +81,8 @@ var QRCode = function (_a) {
|
|
|
79
81
|
// },
|
|
80
82
|
},
|
|
81
83
|
cornersDotOptions: {
|
|
82
|
-
color:
|
|
84
|
+
//color: '#de007dff',
|
|
85
|
+
color: (0, material_1.darken)(theme.palette.secondary.main, 0.2),
|
|
83
86
|
type: 'square',
|
|
84
87
|
// gradient: {
|
|
85
88
|
// type: 'linear', // 'radial'
|
|
@@ -11,4 +11,5 @@ export default class Document {
|
|
|
11
11
|
updateDate?: Date;
|
|
12
12
|
reference?: string;
|
|
13
13
|
constructor(id: string, state: DocumentState, fileName: string, originalFileName: string, fileType: string, fileSignedUrl: string, name: string, type: DocumentType, creationDate: Date, updateDate?: Date, reference?: string);
|
|
14
|
+
static findByTypeAndReference(documents: Document[], type: DocumentType, reference: string): Document | undefined;
|
|
14
15
|
}
|
|
@@ -13,6 +13,15 @@ var Document = /** @class */ (function () {
|
|
|
13
13
|
this.updateDate = updateDate;
|
|
14
14
|
this.reference = reference;
|
|
15
15
|
}
|
|
16
|
+
Document.findByTypeAndReference = function (documents, type, reference) {
|
|
17
|
+
if (documents && type && reference) {
|
|
18
|
+
return documents.find(function (document) {
|
|
19
|
+
return document.type === type &&
|
|
20
|
+
document.reference === reference;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return undefined;
|
|
24
|
+
};
|
|
16
25
|
return Document;
|
|
17
26
|
}());
|
|
18
27
|
exports.default = Document;
|
package/package.json
CHANGED
package/src/MovaDialog.tsx
CHANGED
|
@@ -75,14 +75,14 @@ const MovaDialog: FC<MovaDialogProps> = ({fullScreen, open, onClose, closable =
|
|
|
75
75
|
sx={{ textAlign:'center'}}
|
|
76
76
|
>
|
|
77
77
|
<img src={getLeafImage()} style={{
|
|
78
|
-
position: '
|
|
78
|
+
position: 'absolute',
|
|
79
79
|
float:'left',
|
|
80
80
|
width: '150px',
|
|
81
81
|
height: '350px',
|
|
82
|
-
top: '-
|
|
82
|
+
top: '-150px',
|
|
83
83
|
zIndex: 0,
|
|
84
84
|
left: 0,
|
|
85
|
-
opacity: '0.2'}} alt='Feuille
|
|
85
|
+
opacity: '0.2'}} alt='Feuille Movalib'></img>
|
|
86
86
|
|
|
87
87
|
<DialogTitle id="garage-dialog-title" sx={{ textAlign:'center', p: 0, pt: 1, mt: 0, mb: 0, zIndex: 10 }} >
|
|
88
88
|
<AppBar sx={{ position: 'relative' }} color="transparent" elevation={0}>
|
package/src/QRCode.tsx
CHANGED
|
@@ -56,7 +56,8 @@ const QRCode: FC<QRCodeProps> = ({ data, showDownload=false }) => {
|
|
|
56
56
|
margin: 15
|
|
57
57
|
},
|
|
58
58
|
dotsOptions: {
|
|
59
|
-
color:
|
|
59
|
+
//color: 'black',
|
|
60
|
+
color: darken(theme.palette.primary.main, 0.4),
|
|
60
61
|
// gradient: {
|
|
61
62
|
// type: 'linear', // 'radial'
|
|
62
63
|
// rotation: 0,
|
|
@@ -73,7 +74,8 @@ const QRCode: FC<QRCodeProps> = ({ data, showDownload=false }) => {
|
|
|
73
74
|
// },
|
|
74
75
|
},
|
|
75
76
|
cornersSquareOptions: {
|
|
76
|
-
color:
|
|
77
|
+
//color: '#de007dff',
|
|
78
|
+
color: darken(theme.palette.secondary.main, 0.2),
|
|
77
79
|
type: 'square' as CornerSquareType,
|
|
78
80
|
// gradient: {
|
|
79
81
|
// type: 'linear', // 'radial'
|
|
@@ -82,7 +84,8 @@ const QRCode: FC<QRCodeProps> = ({ data, showDownload=false }) => {
|
|
|
82
84
|
// },
|
|
83
85
|
},
|
|
84
86
|
cornersDotOptions: {
|
|
85
|
-
color:
|
|
87
|
+
//color: '#de007dff',
|
|
88
|
+
color: darken(theme.palette.secondary.main, 0.2),
|
|
86
89
|
type: 'square' as CornerDotType,
|
|
87
90
|
// gradient: {
|
|
88
91
|
// type: 'linear', // 'radial'
|
package/src/models/Document.ts
CHANGED
|
@@ -38,4 +38,14 @@ export default class Document {
|
|
|
38
38
|
this.updateDate = updateDate;
|
|
39
39
|
this.reference = reference;
|
|
40
40
|
}
|
|
41
|
+
|
|
42
|
+
static findByTypeAndReference(documents:Document[], type:DocumentType, reference:string): Document | undefined {
|
|
43
|
+
if(documents && type && reference){
|
|
44
|
+
return documents.find(document =>
|
|
45
|
+
document.type === type &&
|
|
46
|
+
document.reference === reference
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
41
51
|
}
|