@movalib/movalib-commons 1.59.18 → 1.59.20
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/dist/src/MovaDialog.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ interface MovaDialogProps {
|
|
|
11
11
|
message?: string;
|
|
12
12
|
transition?: "fade";
|
|
13
13
|
leafImageColor?: "green" | "yellow" | "pink";
|
|
14
|
-
title?: string;
|
|
14
|
+
title?: string | React.ReactNode;
|
|
15
15
|
titleStyle?: CSSProperties;
|
|
16
16
|
sx?: SxProps<Theme>;
|
|
17
17
|
maxWidth?: Breakpoint | false;
|
package/dist/src/MovaDialog.js
CHANGED
|
@@ -60,6 +60,6 @@ var MovaDialog = function (_a) {
|
|
|
60
60
|
zIndex: 0,
|
|
61
61
|
left: 0,
|
|
62
62
|
opacity: '0.2'
|
|
63
|
-
}, alt: 'Feuille Movalib' }), title && (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: [closable && (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, {}) })), (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ sx: { textAlign: 'center', fontSize: 20, flexGrow: 1, pl: closable ? '20px' : 'Opx', pr: closable ? '40px' : '0px' }, 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 }))] })), actions && (0, jsx_runtime_1.jsx)(material_1.DialogActions, __assign({ sx: { justifyContent: 'center' } }, { children: actions }))] })));
|
|
63
|
+
}, alt: 'Feuille Movalib' }), title && (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: [closable && (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, {}) })), typeof title === typeof 'poney' && (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ sx: { textAlign: 'center', fontSize: 20, flexGrow: 1, pl: closable ? '20px' : 'Opx', pr: closable ? '40px' : '0px' }, style: titleStyle }, { children: title })), typeof title !== typeof 'poney' && 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 }))] })), actions && (0, jsx_runtime_1.jsx)(material_1.DialogActions, __assign({ sx: { justifyContent: 'center' } }, { children: actions }))] })));
|
|
64
64
|
};
|
|
65
65
|
exports.default = MovaDialog;
|
|
@@ -51,5 +51,6 @@ export default class Garage {
|
|
|
51
51
|
loanerVehicleRequestActive?: boolean;
|
|
52
52
|
paymentAuthorizationActive?: boolean;
|
|
53
53
|
paymentAuthorizationMinDowntime?: number;
|
|
54
|
-
|
|
54
|
+
customStyle?: string;
|
|
55
|
+
constructor(id: string, adminId: string, name: string, address: Address, workforce: number, prestations: Prestation[], schedules: Schedule[], contactPhone: string, prestationCategories: CategoryPrestation[], vehicles?: VehicleGarage[], contactEmail?: string, logo?: string, suppliers?: Supplier[], documents?: Document[], subscriptions?: Subscription[], loanerVehicleActive?: boolean, loanerVehicleRequestActive?: boolean, customStyle?: string, subscription?: Subscription, partialWorkforce?: number);
|
|
55
56
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var Garage = /** @class */ (function () {
|
|
4
|
-
function Garage(id, adminId, name, address, workforce, prestations, schedules, contactPhone, prestationCategories, vehicles, contactEmail, logo, suppliers, documents, subscriptions, loanerVehicleActive, loanerVehicleRequestActive, subscription, partialWorkforce) {
|
|
4
|
+
function Garage(id, adminId, name, address, workforce, prestations, schedules, contactPhone, prestationCategories, vehicles, contactEmail, logo, suppliers, documents, subscriptions, loanerVehicleActive, loanerVehicleRequestActive, customStyle, subscription, partialWorkforce) {
|
|
5
5
|
this.id = id;
|
|
6
6
|
this.adminId = adminId;
|
|
7
7
|
this.name = name;
|
|
@@ -21,6 +21,7 @@ var Garage = /** @class */ (function () {
|
|
|
21
21
|
this.loanerVehicleRequestActive = loanerVehicleRequestActive;
|
|
22
22
|
this.subscription = subscription;
|
|
23
23
|
this.partialWorkforce = partialWorkforce;
|
|
24
|
+
this.customStyle = customStyle;
|
|
24
25
|
}
|
|
25
26
|
return Garage;
|
|
26
27
|
}());
|
package/package.json
CHANGED
package/src/MovaDialog.tsx
CHANGED
|
@@ -14,10 +14,10 @@ interface MovaDialogProps {
|
|
|
14
14
|
onClose: () => void,
|
|
15
15
|
closable?: boolean,
|
|
16
16
|
actions?: React.ReactNode,
|
|
17
|
-
message?:string,
|
|
17
|
+
message?: string,
|
|
18
18
|
transition?: "fade",
|
|
19
19
|
leafImageColor?: "green" | "yellow" | "pink",
|
|
20
|
-
title?: string,
|
|
20
|
+
title?: string | React.ReactNode,
|
|
21
21
|
titleStyle?: CSSProperties;
|
|
22
22
|
sx?: SxProps<Theme>;
|
|
23
23
|
maxWidth? : Breakpoint | false;
|
|
@@ -99,9 +99,10 @@ const MovaDialog: FC<MovaDialogProps> = ({fullScreen, open, onClose, closable =
|
|
|
99
99
|
>
|
|
100
100
|
<BackIcon />
|
|
101
101
|
</IconButton>}
|
|
102
|
-
<Typography sx={{ textAlign:'center', fontSize: 20, flexGrow: 1, pl: closable ? '20px' : 'Opx', pr: closable ? '40px' : '0px' }} style={titleStyle}>
|
|
102
|
+
{typeof title === typeof 'poney' && <Typography sx={{ textAlign:'center', fontSize: 20, flexGrow: 1, pl: closable ? '20px' : 'Opx', pr: closable ? '40px' : '0px' }} style={titleStyle}>
|
|
103
103
|
{title}
|
|
104
|
-
</Typography>
|
|
104
|
+
</Typography>}
|
|
105
|
+
{typeof title !== typeof 'poney' && title}
|
|
105
106
|
</Toolbar>
|
|
106
107
|
</AppBar>
|
|
107
108
|
</DialogTitle>
|
package/src/models/Garage.ts
CHANGED
|
@@ -53,6 +53,7 @@ export default class Garage {
|
|
|
53
53
|
loanerVehicleRequestActive?: boolean;
|
|
54
54
|
paymentAuthorizationActive?: boolean;
|
|
55
55
|
paymentAuthorizationMinDowntime?: number;
|
|
56
|
+
customStyle?: string;
|
|
56
57
|
|
|
57
58
|
constructor(
|
|
58
59
|
id:string,
|
|
@@ -72,6 +73,7 @@ export default class Garage {
|
|
|
72
73
|
subscriptions?: Subscription[],
|
|
73
74
|
loanerVehicleActive?: boolean,
|
|
74
75
|
loanerVehicleRequestActive?: boolean,
|
|
76
|
+
customStyle?: string,
|
|
75
77
|
subscription?: Subscription,
|
|
76
78
|
partialWorkforce?: number
|
|
77
79
|
) {
|
|
@@ -94,5 +96,6 @@ export default class Garage {
|
|
|
94
96
|
this.loanerVehicleRequestActive = loanerVehicleRequestActive;
|
|
95
97
|
this.subscription = subscription;
|
|
96
98
|
this.partialWorkforce = partialWorkforce;
|
|
99
|
+
this.customStyle = customStyle;
|
|
97
100
|
}
|
|
98
101
|
}
|