ublo-lib 1.39.37 → 1.39.38
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/es/esf/components/espace-prive/contact.d.ts +4 -0
- package/es/esf/components/espace-prive/contact.d.ts.map +1 -0
- package/es/esf/components/espace-prive/contact.js +41 -0
- package/es/esf/components/espace-prive/contact.module.css +83 -0
- package/es/esf/components/espace-prive/partenaire.d.ts.map +1 -1
- package/es/esf/components/espace-prive/partenaire.js +4 -0
- package/es/esf/components/espace-prive/utils/path-includes-key.d.ts +1 -1
- package/es/esf/components/espace-prive/utils/path-includes-key.d.ts.map +1 -1
- package/es/esf/components/espace-prive/utils/path-includes-key.js +3 -2
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/espace-prive/contact.js"],"names":[],"mappings":"AAsCA;;4CA+BC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Zone from "ublo/zone";
|
|
3
|
+
import CustomContactForm from "ublo-lib/es/common/components/custom-contact-form";
|
|
4
|
+
import styles from "./contact.module.css";
|
|
5
|
+
import { useUbloContext } from "ublo/with-ublo";
|
|
6
|
+
const fields = {
|
|
7
|
+
subject: {
|
|
8
|
+
type: "select",
|
|
9
|
+
label: "",
|
|
10
|
+
required: true,
|
|
11
|
+
hidden: true,
|
|
12
|
+
},
|
|
13
|
+
lastName: {
|
|
14
|
+
type: "text",
|
|
15
|
+
label: "Nom",
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
firstName: {
|
|
19
|
+
type: "text",
|
|
20
|
+
label: "Prénom",
|
|
21
|
+
required: true,
|
|
22
|
+
},
|
|
23
|
+
email: {
|
|
24
|
+
type: "email",
|
|
25
|
+
label: "Email",
|
|
26
|
+
required: true,
|
|
27
|
+
},
|
|
28
|
+
phone: {
|
|
29
|
+
type: "phone",
|
|
30
|
+
label: "Téléphone",
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
attachment: {
|
|
34
|
+
type: "attachment",
|
|
35
|
+
label: "Pièces justificatives (contrat, bon de réservation, ...)",
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
export default function Contact({ logo }) {
|
|
39
|
+
const { site } = useUbloContext();
|
|
40
|
+
return (_jsxs("div", { className: styles.contact, children: [_jsxs("header", { className: styles.header, children: [_jsx("div", { className: styles.logo, children: logo }), _jsx(Zone, { id: "hero", className: styles.heroZone, maxSections: 1, tooltip: "Zone d'\u00E9dition : Banni\u00E8re", fixed: true })] }), _jsx(Zone, { id: "introduction", className: styles.introductionZone, tooltip: "Zone d'\u00E9dition : Texte de pr\u00E9sentation" }), _jsx("main", { className: styles.main, children: _jsx(CustomContactForm, { fields: fields, kind: site, subject: { prefix: "Contact" }, className: styles.form, innerClassName: styles.inner, site: "espace-prive" }) })] }));
|
|
41
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
.contact {
|
|
2
|
+
--content-width: 1080px;
|
|
3
|
+
|
|
4
|
+
position: relative;
|
|
5
|
+
height: 100%;
|
|
6
|
+
width: 100%;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
gap: 40px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@media (min-width: 720px) {
|
|
13
|
+
.contact {
|
|
14
|
+
gap: 70px;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.header {
|
|
19
|
+
position: relative;
|
|
20
|
+
height: 350px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.logo {
|
|
24
|
+
position: relative;
|
|
25
|
+
width: fit-content;
|
|
26
|
+
padding: 10px;
|
|
27
|
+
pointer-events: none;
|
|
28
|
+
z-index: 2;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:global(.cms--editing) .logo {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.heroZone {
|
|
36
|
+
position: absolute;
|
|
37
|
+
height: 100%;
|
|
38
|
+
width: 100%;
|
|
39
|
+
top: 0;
|
|
40
|
+
left: 0;
|
|
41
|
+
z-index: 1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.heroZone > * {
|
|
45
|
+
height: 100%;
|
|
46
|
+
max-height: 100%;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.nav {
|
|
50
|
+
width: fit-content;
|
|
51
|
+
margin-left: auto;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.main {
|
|
55
|
+
width: 100%;
|
|
56
|
+
height: 100%;
|
|
57
|
+
max-width: var(--content-width);
|
|
58
|
+
margin: 0 auto;
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
gap: 50px;
|
|
62
|
+
padding: 0 10px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@media (min-width: 992px) {
|
|
66
|
+
.main {
|
|
67
|
+
padding: 0;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.form {
|
|
72
|
+
max-width: 800px;
|
|
73
|
+
margin: 0 auto;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.form input,
|
|
77
|
+
.form div[class^="attachment_input"] {
|
|
78
|
+
background-color: var(--ds-grey-000, #fff);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.form div[class^="attachment_helper"] {
|
|
82
|
+
font-size: 10px;
|
|
83
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partenaire.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/espace-prive/partenaire.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"partenaire.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/espace-prive/partenaire.js"],"names":[],"mappings":";AAaA;;;4CAyCC"}
|
|
@@ -5,6 +5,7 @@ import Zone from "ublo/zone";
|
|
|
5
5
|
import { useUbloContext } from "ublo/with-ublo";
|
|
6
6
|
import CartLink from "./cart-link";
|
|
7
7
|
import Connexion from "./connexion";
|
|
8
|
+
import Contact from "./contact";
|
|
8
9
|
import Tunnel from "./tunnel";
|
|
9
10
|
import Panier from "./panier";
|
|
10
11
|
import Tools from "./tools";
|
|
@@ -14,10 +15,13 @@ const Partenaire = ({ logo, tools }) => {
|
|
|
14
15
|
const { menuPath } = useUbloContext();
|
|
15
16
|
const { menu } = menuPath;
|
|
16
17
|
const isConnexion = pathIncludesKey(menu, "connexion");
|
|
18
|
+
const isContact = pathIncludesKey(menu, "contact", true);
|
|
17
19
|
const isTunnel = pathIncludesKey(menu, "tunnel");
|
|
18
20
|
const isCart = pathIncludesKey(menu, "panier");
|
|
19
21
|
if (isConnexion)
|
|
20
22
|
return _jsx(Connexion, { logo: logo });
|
|
23
|
+
if (isContact)
|
|
24
|
+
return _jsx(Contact, { logo: logo });
|
|
21
25
|
return (_jsxs("div", { className: styles.partenaire, children: [_jsxs("header", { className: styles.header, children: [_jsx("div", { className: styles.logo, children: logo }), _jsx(Zone, { id: "hero", className: styles.heroZone, maxSections: 1, tooltip: "Zone d'\u00E9dition : Banni\u00E8re", fixed: true })] }), _jsxs("main", { className: styles.main, children: [_jsx("nav", { className: styles.nav, children: _jsx(CartLink, {}) }), _jsx(Zone, { id: "introduction", className: styles.introductionZone, tooltip: "Zone d'\u00E9dition : Texte de pr\u00E9sentation" }), isTunnel && _jsx(Tunnel, {}), isCart && _jsx(Panier, {})] }), _jsx("footer", { className: styles.footer, children: _jsx(Tools, { tools: tools }) }), _jsx(Login, {})] }));
|
|
22
26
|
};
|
|
23
27
|
export default Partenaire;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function pathIncludesKey(path: any, key: any): boolean;
|
|
1
|
+
export function pathIncludesKey(path: any, key: any, global?: boolean): boolean;
|
|
2
2
|
//# sourceMappingURL=path-includes-key.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-includes-key.d.ts","sourceRoot":"","sources":["../../../../../src/esf/components/espace-prive/utils/path-includes-key.js"],"names":[],"mappings":"AAAO,
|
|
1
|
+
{"version":3,"file":"path-includes-key.d.ts","sourceRoot":"","sources":["../../../../../src/esf/components/espace-prive/utils/path-includes-key.js"],"names":[],"mappings":"AAAO,gFAIN"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export const pathIncludesKey = (path, key) => {
|
|
2
|
-
const
|
|
1
|
+
export const pathIncludesKey = (path, key, global = false) => {
|
|
2
|
+
const exp = global ? `^/espace-prive/${key}$` : `^/espace-prive/.*/${key}$`;
|
|
3
|
+
const regex = new RegExp(exp);
|
|
3
4
|
return regex.test(path);
|
|
4
5
|
};
|