@lystech/sections 0.5.0 → 0.6.0
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/README.md +20 -2
- package/dist/editeur/ChampsEnPlace.d.ts +15 -0
- package/dist/editeur/TexteEnPlace.d.ts +7 -4
- package/dist/editeur/styles.d.ts +2 -2
- package/dist/editeur.js +884 -588
- package/dist/index.d.ts +1 -1
- package/dist/index.js +91 -87
- package/dist/useSection.d.ts +21 -0
- package/package.json +1 -1
package/dist/editeur.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createRoot as
|
|
3
|
-
import { C as
|
|
4
|
-
import { useState as
|
|
5
|
-
function
|
|
6
|
-
jeton:
|
|
7
|
-
site:
|
|
8
|
-
apiBaseUrl:
|
|
9
|
-
surJetonRefuse:
|
|
1
|
+
import { jsx as t, jsxs as x, Fragment as ue } from "react/jsx-runtime";
|
|
2
|
+
import { createRoot as de } from "react-dom/client";
|
|
3
|
+
import { C as pe, s as fe } from "./morceaux/constantes-BPZxUYge.js";
|
|
4
|
+
import { useState as q, useRef as Q, useEffect as X, useCallback as Y, useMemo as se } from "react";
|
|
5
|
+
function Ce({
|
|
6
|
+
jeton: n,
|
|
7
|
+
site: e,
|
|
8
|
+
apiBaseUrl: o,
|
|
9
|
+
surJetonRefuse: s
|
|
10
10
|
}) {
|
|
11
|
-
const
|
|
11
|
+
const a = {
|
|
12
12
|
"Content-Type": "application/json",
|
|
13
|
-
Authorization: "Bearer " +
|
|
13
|
+
Authorization: "Bearer " + n
|
|
14
14
|
};
|
|
15
|
-
function
|
|
16
|
-
if (u && (
|
|
15
|
+
function c(r, u) {
|
|
16
|
+
if (u && (r.status === 401 || r.status === 403) && s(), !r.ok) throw new Error(String(r.status));
|
|
17
17
|
}
|
|
18
|
-
async function l(
|
|
19
|
-
const
|
|
20
|
-
headers: u ?
|
|
18
|
+
async function l(r, u = !0) {
|
|
19
|
+
const A = await fetch(o + r, {
|
|
20
|
+
headers: u ? a : void 0
|
|
21
21
|
});
|
|
22
|
-
return
|
|
22
|
+
return c(A, u), await A.json();
|
|
23
23
|
}
|
|
24
|
-
async function
|
|
25
|
-
const
|
|
24
|
+
async function y(r, u, A) {
|
|
25
|
+
const S = await fetch(o + r, {
|
|
26
26
|
method: u,
|
|
27
|
-
headers:
|
|
28
|
-
body:
|
|
27
|
+
headers: a,
|
|
28
|
+
body: A === void 0 ? void 0 : JSON.stringify(A)
|
|
29
29
|
});
|
|
30
|
-
return
|
|
30
|
+
return c(S, !0), await S.json();
|
|
31
31
|
}
|
|
32
32
|
return {
|
|
33
33
|
/** Les blocs que le site a déclaré savoir afficher. Route publique. */
|
|
34
|
-
schemas: () => l("/site-sections/public/" + encodeURIComponent(
|
|
34
|
+
schemas: () => l("/site-sections/public/" + encodeURIComponent(e) + "/schemas", !1),
|
|
35
35
|
/** Ce qui existe sur une page, brouillons compris. */
|
|
36
|
-
pourPage: (
|
|
37
|
-
creer: (
|
|
38
|
-
enregistrerBrouillon: (
|
|
39
|
-
publier: (
|
|
36
|
+
pourPage: (r) => l("/site-sections?page=" + encodeURIComponent(r)),
|
|
37
|
+
creer: (r, u, A) => y("/site-sections", "POST", { page: r, blockType: u, draft: A }),
|
|
38
|
+
enregistrerBrouillon: (r, u) => y("/site-sections/" + r + "/draft", "PUT", { draft: u }),
|
|
39
|
+
publier: (r) => y("/site-sections/" + r + "/publish", "POST"),
|
|
40
40
|
/** Ramène le brouillon à ce qui est en ligne. */
|
|
41
|
-
annuler: (
|
|
41
|
+
annuler: (r) => y("/site-sections/" + r + "/revert", "POST")
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
const
|
|
44
|
+
const we = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAW+UlEQVR42u17aZBc13Xed859r7tnATAASYALqBQlxZZBmaTNRREtagw5VEWyxZJcNVOKHNslRaJlu0I5UbSXaziRU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1zFEilAsawvNSFE8GX+wU7W5//bLw+EOzs+0BgVNMbJd/nreRk1LdsiCoqgsFSXXxwPDLh+r4eAb847td/NVjE2dcf24z4OgnJhzGp7KB++cF3+dLzoNwfp1f59f5dX6dX6/m+r8Cl0QchG1LcQAAAABJRU5ErkJggg==", Ee = {
|
|
45
45
|
apiKey: "AIzaSyCpAeHlt1wZvM5KtYg7X7MDVnWVJT86gvc",
|
|
46
46
|
authDomain: "lystech.firebaseapp.com",
|
|
47
47
|
projectId: "lystech",
|
|
@@ -49,22 +49,22 @@ const he = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAA
|
|
|
49
49
|
messagingSenderId: "237347321732",
|
|
50
50
|
appId: "1:237347321732:web:7f9586d48e488d73ddcfd1"
|
|
51
51
|
};
|
|
52
|
-
function
|
|
53
|
-
return /* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
/* @__PURE__ */
|
|
52
|
+
function Ne() {
|
|
53
|
+
return /* @__PURE__ */ x("span", { className: "marque", children: [
|
|
54
|
+
/* @__PURE__ */ t("img", { src: we, alt: "", width: 22, height: 22 }),
|
|
55
|
+
/* @__PURE__ */ t("span", { className: "marque__mot", children: "Lystech" })
|
|
56
56
|
] });
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
return /* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
/* @__PURE__ */
|
|
58
|
+
function Se() {
|
|
59
|
+
return /* @__PURE__ */ x("svg", { viewBox: "0 0 18 18", "aria-hidden": "true", focusable: "false", className: "logo", children: [
|
|
60
|
+
/* @__PURE__ */ t("path", { fill: "#4285F4", d: "M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.48h4.84a4.14 4.14 0 0 1-1.8 2.72v2.26h2.91c1.7-1.57 2.69-3.88 2.69-6.62z" }),
|
|
61
|
+
/* @__PURE__ */ t("path", { fill: "#34A853", d: "M9 18c2.43 0 4.47-.8 5.96-2.18l-2.91-2.26c-.81.54-1.84.86-3.05.86-2.34 0-4.33-1.58-5.04-3.71H.96v2.33A9 9 0 0 0 9 18z" }),
|
|
62
|
+
/* @__PURE__ */ t("path", { fill: "#FBBC05", d: "M3.96 10.71a5.41 5.41 0 0 1 0-3.42V4.96H.96a9 9 0 0 0 0 8.08l3-2.33z" }),
|
|
63
|
+
/* @__PURE__ */ t("path", { fill: "#EA4335", d: "M9 3.58c1.32 0 2.5.45 3.44 1.35l2.58-2.59C13.46.89 11.43 0 9 0A9 9 0 0 0 .96 4.96l3 2.33C4.67 5.16 6.66 3.58 9 3.58z" })
|
|
64
64
|
] });
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
return /* @__PURE__ */
|
|
66
|
+
function Le() {
|
|
67
|
+
return /* @__PURE__ */ t("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", className: "logo", children: /* @__PURE__ */ t(
|
|
68
68
|
"path",
|
|
69
69
|
{
|
|
70
70
|
fill: "#fff",
|
|
@@ -72,15 +72,15 @@ function ke() {
|
|
|
72
72
|
}
|
|
73
73
|
) });
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
site:
|
|
77
|
-
apiBaseUrl:
|
|
78
|
-
methodes:
|
|
79
|
-
surJeton:
|
|
80
|
-
surFermer:
|
|
75
|
+
function Te({
|
|
76
|
+
site: n,
|
|
77
|
+
apiBaseUrl: e,
|
|
78
|
+
methodes: o = ["google", "facebook"],
|
|
79
|
+
surJeton: s,
|
|
80
|
+
surFermer: a
|
|
81
81
|
}) {
|
|
82
|
-
const [
|
|
83
|
-
switch (
|
|
82
|
+
const [c, l] = q({ nom: "repos" }), y = (S) => {
|
|
83
|
+
switch (S) {
|
|
84
84
|
case "auth/popup-blocked":
|
|
85
85
|
return "Votre navigateur a bloqué la fenêtre de connexion. Autorisez les fenêtres pour ce site, puis réessayez.";
|
|
86
86
|
case "auth/popup-closed-by-user":
|
|
@@ -95,32 +95,32 @@ function Ce({
|
|
|
95
95
|
default:
|
|
96
96
|
return "La connexion a échoué. Réessayez dans un instant.";
|
|
97
97
|
}
|
|
98
|
-
},
|
|
99
|
-
const
|
|
98
|
+
}, r = async (S, N = !1) => {
|
|
99
|
+
const I = await fetch(e + "/site-sections/edit-login/third-party", {
|
|
100
100
|
method: "POST",
|
|
101
101
|
headers: { "Content-Type": "application/json" },
|
|
102
102
|
body: JSON.stringify({
|
|
103
|
-
site:
|
|
104
|
-
token:
|
|
103
|
+
site: n,
|
|
104
|
+
token: S,
|
|
105
105
|
tokenType: "firebase",
|
|
106
|
-
demanderAcces:
|
|
106
|
+
demanderAcces: N
|
|
107
107
|
})
|
|
108
108
|
});
|
|
109
|
-
if (
|
|
109
|
+
if (I.status === 429) {
|
|
110
110
|
l({
|
|
111
111
|
nom: "erreur",
|
|
112
112
|
texte: "Trop de tentatives. Réessayez dans quelques minutes."
|
|
113
113
|
});
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
|
-
const
|
|
117
|
-
if (
|
|
118
|
-
|
|
116
|
+
const L = await I.json().catch(() => null);
|
|
117
|
+
if (L?.ok && L?.token) {
|
|
118
|
+
s(L.token);
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
|
-
switch (
|
|
121
|
+
switch (L?.raison) {
|
|
122
122
|
case "sans_acces":
|
|
123
|
-
l({ nom: "sans-acces", jeton:
|
|
123
|
+
l({ nom: "sans-acces", jeton: S });
|
|
124
124
|
return;
|
|
125
125
|
case "demande_envoyee":
|
|
126
126
|
l({ nom: "demande-envoyee" });
|
|
@@ -146,85 +146,85 @@ function Ce({
|
|
|
146
146
|
texte: "La connexion a échoué. Réessayez dans un instant."
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
-
}, u = async (
|
|
150
|
-
l({ nom: "envoi", quoi:
|
|
149
|
+
}, u = async (S) => {
|
|
150
|
+
l({ nom: "envoi", quoi: S });
|
|
151
151
|
try {
|
|
152
|
-
const [{ initializeApp:
|
|
152
|
+
const [{ initializeApp: N, getApps: I }, L] = await Promise.all([
|
|
153
153
|
import("./morceaux/index.esm-B4AB50RA.js"),
|
|
154
154
|
import("./morceaux/index.esm-B4hL1FOE.js")
|
|
155
|
-
]),
|
|
156
|
-
await
|
|
157
|
-
} catch (
|
|
158
|
-
l({ nom: "erreur", texte:
|
|
155
|
+
]), b = I().find((g) => g.name === "lystech-edition") ?? N(Ee, "lystech-edition"), M = S === "google" ? new L.GoogleAuthProvider() : new L.FacebookAuthProvider(), B = await (await L.signInWithPopup(L.getAuth(b), M)).user.getIdToken();
|
|
156
|
+
await r(B);
|
|
157
|
+
} catch (N) {
|
|
158
|
+
l({ nom: "erreur", texte: y(String(N?.code ?? "")) });
|
|
159
159
|
}
|
|
160
|
-
},
|
|
161
|
-
return /* @__PURE__ */
|
|
162
|
-
/* @__PURE__ */
|
|
160
|
+
}, A = c.nom === "envoi";
|
|
161
|
+
return /* @__PURE__ */ t("div", { className: "voile", role: "dialog", "aria-modal": "true", "aria-label": "Modifier ce site", children: /* @__PURE__ */ x("div", { className: "fenetre", children: [
|
|
162
|
+
/* @__PURE__ */ t(
|
|
163
163
|
"button",
|
|
164
164
|
{
|
|
165
165
|
type: "button",
|
|
166
166
|
className: "fenetre__fermer",
|
|
167
|
-
onClick:
|
|
167
|
+
onClick: a,
|
|
168
168
|
"aria-label": "Fermer",
|
|
169
169
|
children: "✕"
|
|
170
170
|
}
|
|
171
171
|
),
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ x("div", { className: "fenetre__tete", children: [
|
|
173
|
+
/* @__PURE__ */ t(Ne, {}),
|
|
174
|
+
/* @__PURE__ */ t("h2", { className: "fenetre__titre", children: "Modifier ce site" }),
|
|
175
|
+
/* @__PURE__ */ t("p", { className: "fenetre__sous", children: "Vous vous connectez à Lystech. Cet accès ne sert qu'à modifier le contenu de ce site." })
|
|
176
176
|
] }),
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
177
|
+
/* @__PURE__ */ x("div", { className: "fenetre__corps", children: [
|
|
178
|
+
c.nom === "erreur" && /* @__PURE__ */ t("p", { className: "message message--erreur", children: c.texte }),
|
|
179
|
+
c.nom === "aucun-compte" && /* @__PURE__ */ t("p", { className: "message message--info", children: "Aucun compte Lystech ne correspond à cette adresse. Adressez-vous à la personne responsable du site." }),
|
|
180
|
+
c.nom === "sans-acces" && /* @__PURE__ */ t("p", { className: "message message--info", children: "Vous êtes bien reconnu, mais vous n'avez pas encore le droit de modifier ce site. Vous pouvez le demander : la personne responsable recevra un courriel." }),
|
|
181
|
+
c.nom === "demande-envoyee" && /* @__PURE__ */ t("p", { className: "message message--ok", children: "Demande envoyée. La personne responsable du site vous répondra." }),
|
|
182
|
+
c.nom === "sans-acces" ? /* @__PURE__ */ t(
|
|
183
183
|
"button",
|
|
184
184
|
{
|
|
185
185
|
type: "button",
|
|
186
186
|
className: "bouton bouton--principal bouton--large",
|
|
187
187
|
onClick: () => {
|
|
188
|
-
|
|
188
|
+
r(c.jeton, !0);
|
|
189
189
|
},
|
|
190
190
|
children: "Demander l'accès"
|
|
191
191
|
}
|
|
192
|
-
) :
|
|
192
|
+
) : c.nom === "demande-envoyee" || c.nom === "aucun-compte" ? /* @__PURE__ */ t(
|
|
193
193
|
"button",
|
|
194
194
|
{
|
|
195
195
|
type: "button",
|
|
196
196
|
className: "bouton bouton--large",
|
|
197
|
-
onClick:
|
|
197
|
+
onClick: a,
|
|
198
198
|
children: "Fermer"
|
|
199
199
|
}
|
|
200
|
-
) : /* @__PURE__ */
|
|
201
|
-
|
|
200
|
+
) : /* @__PURE__ */ x("div", { className: "fournisseurs", children: [
|
|
201
|
+
o.includes("google") && /* @__PURE__ */ x(
|
|
202
202
|
"button",
|
|
203
203
|
{
|
|
204
204
|
type: "button",
|
|
205
205
|
className: "fournisseur fournisseur--google",
|
|
206
|
-
disabled:
|
|
206
|
+
disabled: A,
|
|
207
207
|
onClick: () => {
|
|
208
208
|
u("google");
|
|
209
209
|
},
|
|
210
210
|
children: [
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ t(Se, {}),
|
|
212
|
+
/* @__PURE__ */ t("span", { children: c.nom === "envoi" && c.quoi === "google" ? "Connexion…" : "Continuer avec Google" })
|
|
213
213
|
]
|
|
214
214
|
}
|
|
215
215
|
),
|
|
216
|
-
|
|
216
|
+
o.includes("facebook") && /* @__PURE__ */ x(
|
|
217
217
|
"button",
|
|
218
218
|
{
|
|
219
219
|
type: "button",
|
|
220
220
|
className: "fournisseur fournisseur--facebook",
|
|
221
|
-
disabled:
|
|
221
|
+
disabled: A,
|
|
222
222
|
onClick: () => {
|
|
223
223
|
u("facebook");
|
|
224
224
|
},
|
|
225
225
|
children: [
|
|
226
|
-
/* @__PURE__ */
|
|
227
|
-
/* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ t(Le, {}),
|
|
227
|
+
/* @__PURE__ */ t("span", { children: c.nom === "envoi" && c.quoi === "facebook" ? "Connexion…" : "Continuer avec Facebook" })
|
|
228
228
|
]
|
|
229
229
|
}
|
|
230
230
|
)
|
|
@@ -232,12 +232,12 @@ function Ce({
|
|
|
232
232
|
] })
|
|
233
233
|
] }) });
|
|
234
234
|
}
|
|
235
|
-
function
|
|
236
|
-
const
|
|
237
|
-
return Array.from(/* @__PURE__ */ new Set([
|
|
235
|
+
function De(n, e) {
|
|
236
|
+
const o = n && typeof n == "object" && !Array.isArray(n) ? Object.keys(n).filter((a) => /^[a-z]{2}(-[A-Za-z]{2})?$/.test(a)) : [], s = e.slice(0, 2);
|
|
237
|
+
return Array.from(/* @__PURE__ */ new Set([s, ...o]));
|
|
238
238
|
}
|
|
239
|
-
function
|
|
240
|
-
switch (
|
|
239
|
+
function ze(n) {
|
|
240
|
+
switch (n.type) {
|
|
241
241
|
case "number":
|
|
242
242
|
return 0;
|
|
243
243
|
case "boolean":
|
|
@@ -248,322 +248,472 @@ function we(o) {
|
|
|
248
248
|
return "";
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
|
-
function
|
|
252
|
-
switch (
|
|
251
|
+
function ie({ champ: n, valeur: e, changer: o }) {
|
|
252
|
+
switch (n.type) {
|
|
253
253
|
case "richText":
|
|
254
|
-
return /* @__PURE__ */
|
|
254
|
+
return /* @__PURE__ */ t(
|
|
255
255
|
"textarea",
|
|
256
256
|
{
|
|
257
|
-
value: String(
|
|
258
|
-
onChange: (
|
|
257
|
+
value: String(e ?? ""),
|
|
258
|
+
onChange: (s) => o(s.target.value)
|
|
259
259
|
}
|
|
260
260
|
);
|
|
261
261
|
case "number":
|
|
262
|
-
return /* @__PURE__ */
|
|
262
|
+
return /* @__PURE__ */ t(
|
|
263
263
|
"input",
|
|
264
264
|
{
|
|
265
265
|
type: "number",
|
|
266
|
-
value:
|
|
267
|
-
onChange: (
|
|
266
|
+
value: e === "" || e == null ? "" : String(e),
|
|
267
|
+
onChange: (s) => o(s.target.value === "" ? "" : Number(s.target.value))
|
|
268
268
|
}
|
|
269
269
|
);
|
|
270
270
|
case "boolean":
|
|
271
|
-
return /* @__PURE__ */
|
|
272
|
-
/* @__PURE__ */
|
|
271
|
+
return /* @__PURE__ */ x("label", { className: "bascule", children: [
|
|
272
|
+
/* @__PURE__ */ t(
|
|
273
273
|
"input",
|
|
274
274
|
{
|
|
275
275
|
type: "checkbox",
|
|
276
|
-
checked:
|
|
277
|
-
onChange: (
|
|
276
|
+
checked: e === !0,
|
|
277
|
+
onChange: (s) => o(s.target.checked)
|
|
278
278
|
}
|
|
279
279
|
),
|
|
280
|
-
/* @__PURE__ */
|
|
280
|
+
/* @__PURE__ */ t("span", { children: e === !0 ? "Oui" : "Non" })
|
|
281
281
|
] });
|
|
282
282
|
case "date":
|
|
283
|
-
return /* @__PURE__ */
|
|
283
|
+
return /* @__PURE__ */ t(
|
|
284
284
|
"input",
|
|
285
285
|
{
|
|
286
286
|
type: "date",
|
|
287
|
-
value: String(
|
|
288
|
-
onChange: (
|
|
287
|
+
value: String(e ?? "").slice(0, 10),
|
|
288
|
+
onChange: (s) => o(s.target.value)
|
|
289
289
|
}
|
|
290
290
|
);
|
|
291
291
|
case "choice":
|
|
292
|
-
return /* @__PURE__ */
|
|
292
|
+
return /* @__PURE__ */ x(
|
|
293
293
|
"select",
|
|
294
294
|
{
|
|
295
|
-
value: String(
|
|
296
|
-
onChange: (
|
|
295
|
+
value: String(e ?? ""),
|
|
296
|
+
onChange: (s) => o(s.target.value),
|
|
297
297
|
children: [
|
|
298
|
-
/* @__PURE__ */
|
|
299
|
-
(
|
|
298
|
+
/* @__PURE__ */ t("option", { value: "", children: "—" }),
|
|
299
|
+
(n.options ?? []).map((s) => /* @__PURE__ */ t("option", { value: s, children: s }, s))
|
|
300
300
|
]
|
|
301
301
|
}
|
|
302
302
|
);
|
|
303
303
|
case "url":
|
|
304
|
-
return /* @__PURE__ */
|
|
304
|
+
return /* @__PURE__ */ t(
|
|
305
305
|
"input",
|
|
306
306
|
{
|
|
307
307
|
type: "url",
|
|
308
|
-
value: String(
|
|
309
|
-
onChange: (
|
|
308
|
+
value: String(e ?? ""),
|
|
309
|
+
onChange: (s) => o(s.target.value),
|
|
310
310
|
placeholder: "https://"
|
|
311
311
|
}
|
|
312
312
|
);
|
|
313
313
|
case "image":
|
|
314
|
-
return /* @__PURE__ */
|
|
315
|
-
/* @__PURE__ */
|
|
314
|
+
return /* @__PURE__ */ x(ue, { children: [
|
|
315
|
+
/* @__PURE__ */ t(
|
|
316
316
|
"input",
|
|
317
317
|
{
|
|
318
318
|
type: "url",
|
|
319
|
-
value: String(
|
|
320
|
-
onChange: (
|
|
319
|
+
value: String(e ?? ""),
|
|
320
|
+
onChange: (s) => o(s.target.value),
|
|
321
321
|
placeholder: "https://…"
|
|
322
322
|
}
|
|
323
323
|
),
|
|
324
|
-
String(
|
|
324
|
+
String(e ?? "").startsWith("http") && /* @__PURE__ */ t("img", { className: "vignette", src: String(e), alt: "" })
|
|
325
325
|
] });
|
|
326
326
|
default:
|
|
327
|
-
return /* @__PURE__ */
|
|
327
|
+
return /* @__PURE__ */ t(
|
|
328
328
|
"input",
|
|
329
329
|
{
|
|
330
330
|
type: "text",
|
|
331
|
-
value: String(
|
|
332
|
-
onChange: (
|
|
331
|
+
value: String(e ?? ""),
|
|
332
|
+
onChange: (s) => o(s.target.value)
|
|
333
333
|
}
|
|
334
334
|
);
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
|
-
function
|
|
338
|
-
if (
|
|
339
|
-
const
|
|
340
|
-
const
|
|
341
|
-
|
|
337
|
+
function me({ champ: n, valeur: e, changer: o, langue: s }) {
|
|
338
|
+
if (n.type === "list") {
|
|
339
|
+
const a = Array.isArray(e) ? e : [], c = n.of ?? [], l = (y, r, u) => {
|
|
340
|
+
const A = a.map((S, N) => N === y ? { ...S, [r]: u } : S);
|
|
341
|
+
o(A);
|
|
342
342
|
};
|
|
343
|
-
return /* @__PURE__ */
|
|
344
|
-
/* @__PURE__ */
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
/* @__PURE__ */
|
|
348
|
-
/* @__PURE__ */
|
|
349
|
-
/* @__PURE__ */
|
|
350
|
-
/* @__PURE__ */
|
|
343
|
+
return /* @__PURE__ */ x("div", { className: "champ", children: [
|
|
344
|
+
/* @__PURE__ */ t("span", { className: "champ__etiquette", children: n.label }),
|
|
345
|
+
n.help && /* @__PURE__ */ t("p", { className: "champ__aide", children: n.help }),
|
|
346
|
+
a.map((y, r) => /* @__PURE__ */ x("div", { className: "liste__item", children: [
|
|
347
|
+
/* @__PURE__ */ x("div", { className: "liste__tete", children: [
|
|
348
|
+
/* @__PURE__ */ t("span", { className: "liste__rang", children: r + 1 }),
|
|
349
|
+
/* @__PURE__ */ x("span", { style: { display: "flex", gap: 4 }, children: [
|
|
350
|
+
/* @__PURE__ */ t(
|
|
351
351
|
"button",
|
|
352
352
|
{
|
|
353
353
|
type: "button",
|
|
354
354
|
className: "bouton bouton--icone bouton--discret",
|
|
355
355
|
title: "Monter",
|
|
356
|
-
disabled:
|
|
356
|
+
disabled: r === 0,
|
|
357
357
|
onClick: () => {
|
|
358
|
-
const u = [...
|
|
359
|
-
[u[
|
|
358
|
+
const u = [...a];
|
|
359
|
+
[u[r - 1], u[r]] = [u[r], u[r - 1]], o(u);
|
|
360
360
|
},
|
|
361
361
|
children: "↑"
|
|
362
362
|
}
|
|
363
363
|
),
|
|
364
|
-
/* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ t(
|
|
365
365
|
"button",
|
|
366
366
|
{
|
|
367
367
|
type: "button",
|
|
368
368
|
className: "bouton bouton--icone bouton--discret",
|
|
369
369
|
title: "Descendre",
|
|
370
|
-
disabled:
|
|
370
|
+
disabled: r === a.length - 1,
|
|
371
371
|
onClick: () => {
|
|
372
|
-
const u = [...
|
|
373
|
-
[u[
|
|
372
|
+
const u = [...a];
|
|
373
|
+
[u[r], u[r + 1]] = [u[r + 1], u[r]], o(u);
|
|
374
374
|
},
|
|
375
375
|
children: "↓"
|
|
376
376
|
}
|
|
377
377
|
),
|
|
378
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ t(
|
|
379
379
|
"button",
|
|
380
380
|
{
|
|
381
381
|
type: "button",
|
|
382
382
|
className: "bouton bouton--icone bouton--discret",
|
|
383
383
|
title: "Retirer",
|
|
384
|
-
onClick: () => a
|
|
384
|
+
onClick: () => o(a.filter((u, A) => A !== r)),
|
|
385
385
|
children: "✕"
|
|
386
386
|
}
|
|
387
387
|
)
|
|
388
388
|
] })
|
|
389
389
|
] }),
|
|
390
|
-
|
|
391
|
-
|
|
390
|
+
c.map((u) => /* @__PURE__ */ t(
|
|
391
|
+
me,
|
|
392
392
|
{
|
|
393
393
|
champ: u,
|
|
394
|
-
langue:
|
|
395
|
-
valeur:
|
|
396
|
-
changer: (
|
|
394
|
+
langue: s,
|
|
395
|
+
valeur: y?.[u.key],
|
|
396
|
+
changer: (A) => l(r, u.key, A)
|
|
397
397
|
},
|
|
398
398
|
u.key
|
|
399
399
|
))
|
|
400
|
-
] },
|
|
401
|
-
/* @__PURE__ */
|
|
400
|
+
] }, r)),
|
|
401
|
+
/* @__PURE__ */ t(
|
|
402
402
|
"button",
|
|
403
403
|
{
|
|
404
404
|
type: "button",
|
|
405
405
|
className: "bouton",
|
|
406
|
-
onClick: () =>
|
|
407
|
-
...
|
|
408
|
-
Object.fromEntries(
|
|
406
|
+
onClick: () => o([
|
|
407
|
+
...a,
|
|
408
|
+
Object.fromEntries(c.map((y) => [y.key, ze(y)]))
|
|
409
409
|
]),
|
|
410
410
|
children: "+ Ajouter"
|
|
411
411
|
}
|
|
412
412
|
)
|
|
413
413
|
] });
|
|
414
414
|
}
|
|
415
|
-
if (
|
|
416
|
-
const
|
|
417
|
-
return /* @__PURE__ */
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
/* @__PURE__ */
|
|
422
|
-
/* @__PURE__ */
|
|
423
|
-
|
|
415
|
+
if (n.localized) {
|
|
416
|
+
const a = De(e, s), c = e && typeof e == "object" && !Array.isArray(e) ? e : {};
|
|
417
|
+
return /* @__PURE__ */ x("div", { className: "champ", children: [
|
|
418
|
+
/* @__PURE__ */ t("span", { className: "champ__etiquette", children: n.label }),
|
|
419
|
+
n.help && /* @__PURE__ */ t("p", { className: "champ__aide", children: n.help }),
|
|
420
|
+
a.map((l) => /* @__PURE__ */ x("div", { style: { marginBottom: 8 }, children: [
|
|
421
|
+
/* @__PURE__ */ t("span", { className: "champ__langue", children: l }),
|
|
422
|
+
/* @__PURE__ */ t(
|
|
423
|
+
ie,
|
|
424
424
|
{
|
|
425
|
-
champ:
|
|
426
|
-
valeur:
|
|
427
|
-
changer: (
|
|
425
|
+
champ: n,
|
|
426
|
+
valeur: c[l],
|
|
427
|
+
changer: (y) => o({ ...c, [l]: y })
|
|
428
428
|
}
|
|
429
429
|
)
|
|
430
430
|
] }, l))
|
|
431
431
|
] });
|
|
432
432
|
}
|
|
433
|
-
return /* @__PURE__ */
|
|
434
|
-
/* @__PURE__ */
|
|
435
|
-
/* @__PURE__ */
|
|
436
|
-
|
|
433
|
+
return /* @__PURE__ */ x("div", { className: "champ", children: [
|
|
434
|
+
/* @__PURE__ */ t("label", { className: "champ__etiquette", children: n.label }),
|
|
435
|
+
/* @__PURE__ */ t(ie, { champ: n, valeur: e, changer: o }),
|
|
436
|
+
n.help && /* @__PURE__ */ t("p", { className: "champ__aide", children: n.help })
|
|
437
437
|
] });
|
|
438
438
|
}
|
|
439
|
-
const
|
|
440
|
-
function
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
439
|
+
const be = "data-lystech-champ", _e = ["lystech-editeur-hote", "lystech-connexion-hote"], Oe = ["number", "text", "url", "date"], Pe = "outline:2px dashed rgba(59,165,141,.85);outline-offset:3px;border-radius:3px;cursor:text;";
|
|
440
|
+
function te(n) {
|
|
441
|
+
if (!(n instanceof Element)) return null;
|
|
442
|
+
const e = n.closest(`[${be}]`);
|
|
443
|
+
return !e || e.closest("." + pe) || _e.some((o) => e.closest("#" + o)) ? null : e;
|
|
444
|
+
}
|
|
445
|
+
function ce(n) {
|
|
446
|
+
const e = n.getAttribute(be) ?? "", o = e.lastIndexOf(":");
|
|
447
|
+
return o <= 0 || o === e.length - 1 ? null : { blockType: e.slice(0, o), champ: e.slice(o + 1) };
|
|
448
|
+
}
|
|
449
|
+
function ne(n) {
|
|
450
|
+
const e = n.dataset.lysStyleAvant;
|
|
451
|
+
e !== void 0 && (delete n.dataset.lysStyleAvant, e ? n.setAttribute("style", e) : n.removeAttribute("style"));
|
|
452
|
+
}
|
|
453
|
+
function Ie(n, e) {
|
|
454
|
+
if (n === "number") {
|
|
455
|
+
const o = e.replace(/\s/g, "").replace(",", "."), s = Number(o);
|
|
456
|
+
return o === "" || !Number.isFinite(s) ? { ok: !1, erreur: "Un nombre, en chiffres — par exemple 85 ou 85,50." } : { ok: !0, valeur: s };
|
|
457
|
+
}
|
|
458
|
+
return { ok: !0, valeur: e.trim() };
|
|
459
|
+
}
|
|
460
|
+
function Me({
|
|
461
|
+
actif: n,
|
|
462
|
+
lire: e,
|
|
463
|
+
enregistrer: o,
|
|
464
|
+
ouvrirPanneau: s
|
|
465
|
+
}) {
|
|
466
|
+
const [a, c] = q(null), l = Q(null), y = Q(1), r = Q(null), u = Q(null), A = Q({ lire: e, enregistrer: o, ouvrirPanneau: s });
|
|
467
|
+
A.current = { lire: e, enregistrer: o, ouvrirPanneau: s }, X(() => {
|
|
468
|
+
if (!n) {
|
|
469
|
+
c(null);
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
const b = /* @__PURE__ */ new Set(), M = (v) => {
|
|
473
|
+
const h = te(v.target);
|
|
474
|
+
if (!h) return;
|
|
475
|
+
const z = ce(h);
|
|
476
|
+
!z || !A.current.lire(z.blockType, z.champ) || (h.dataset.lysStyleAvant === void 0 && (h.dataset.lysStyleAvant = h.getAttribute("style") ?? ""), h.setAttribute("style", h.dataset.lysStyleAvant + Pe), b.add(h));
|
|
477
|
+
}, D = (v) => {
|
|
478
|
+
const h = te(v.target);
|
|
479
|
+
if (!h) return;
|
|
480
|
+
const z = v.relatedTarget;
|
|
481
|
+
z instanceof Node && h.contains(z) || (ne(h), b.delete(h));
|
|
482
|
+
}, B = (v) => {
|
|
483
|
+
const h = te(v.target);
|
|
484
|
+
if (!h) return;
|
|
485
|
+
const z = ce(h);
|
|
486
|
+
if (!z) return;
|
|
487
|
+
const R = A.current.lire(z.blockType, z.champ);
|
|
488
|
+
if (!R) return;
|
|
489
|
+
if (v.preventDefault(), v.stopPropagation(), ne(h), b.delete(h), !Oe.includes(R.type)) {
|
|
490
|
+
A.current.ouvrirPanneau(z.blockType);
|
|
491
|
+
return;
|
|
492
|
+
}
|
|
493
|
+
const d = getComputedStyle(h);
|
|
494
|
+
c({
|
|
495
|
+
jeton: y.current++,
|
|
496
|
+
...z,
|
|
497
|
+
info: R,
|
|
498
|
+
el: h,
|
|
499
|
+
rect: h.getBoundingClientRect(),
|
|
500
|
+
police: {
|
|
501
|
+
fontFamily: d.fontFamily,
|
|
502
|
+
fontSize: d.fontSize,
|
|
503
|
+
fontWeight: d.fontWeight,
|
|
504
|
+
letterSpacing: d.letterSpacing
|
|
505
|
+
},
|
|
506
|
+
texte: R.valeur == null ? "" : String(R.valeur),
|
|
507
|
+
erreur: null,
|
|
508
|
+
envoi: !1
|
|
509
|
+
});
|
|
510
|
+
}, g = () => c((v) => v && { ...v, rect: v.el.getBoundingClientRect() });
|
|
511
|
+
return document.addEventListener("mouseover", M, !0), document.addEventListener("mouseout", D, !0), document.addEventListener("click", B, !0), window.addEventListener("scroll", g, { capture: !0, passive: !0 }), window.addEventListener("resize", g), () => {
|
|
512
|
+
document.removeEventListener("mouseover", M, !0), document.removeEventListener("mouseout", D, !0), document.removeEventListener("click", B, !0), window.removeEventListener("scroll", g, { capture: !0 }), window.removeEventListener("resize", g);
|
|
513
|
+
for (const v of b) ne(v);
|
|
514
|
+
};
|
|
515
|
+
}, [n]);
|
|
516
|
+
const S = a?.jeton;
|
|
517
|
+
if (X(() => {
|
|
518
|
+
S != null && (l.current?.focus(), l.current?.select());
|
|
519
|
+
}, [S]), !a) return null;
|
|
520
|
+
const N = (b) => c((M) => M && M.jeton === b ? null : M);
|
|
521
|
+
async function I(b) {
|
|
522
|
+
if (r.current === b.jeton || u.current === b.jeton) return;
|
|
523
|
+
const M = b.info.valeur == null ? "" : String(b.info.valeur);
|
|
524
|
+
if (b.texte.trim() === M.trim()) {
|
|
525
|
+
N(b.jeton);
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
528
|
+
const D = Ie(b.info.type, b.texte);
|
|
529
|
+
if (!D.ok) {
|
|
530
|
+
c((g) => g && g.jeton === b.jeton ? { ...g, erreur: D.erreur } : g);
|
|
531
|
+
return;
|
|
532
|
+
}
|
|
533
|
+
c((g) => g && g.jeton === b.jeton ? { ...g, envoi: !0, erreur: null } : g), r.current = b.jeton;
|
|
534
|
+
let B = !1;
|
|
535
|
+
try {
|
|
536
|
+
B = await A.current.enregistrer(b.blockType, b.champ, D.valeur);
|
|
537
|
+
} finally {
|
|
538
|
+
r.current = null;
|
|
539
|
+
}
|
|
540
|
+
B ? N(b.jeton) : c(
|
|
541
|
+
(g) => g && g.jeton === b.jeton ? { ...g, envoi: !1, erreur: "Enregistrement impossible — la valeur en ligne n'a pas changé." } : g
|
|
542
|
+
);
|
|
543
|
+
}
|
|
544
|
+
const L = Math.max(a.rect.width + 40, 110);
|
|
545
|
+
return /* @__PURE__ */ x(
|
|
546
|
+
"form",
|
|
547
|
+
{
|
|
548
|
+
className: "saisie",
|
|
549
|
+
style: { top: a.rect.top - 28, left: a.rect.left - 8 },
|
|
550
|
+
onSubmit: (b) => {
|
|
551
|
+
b.preventDefault(), I(a);
|
|
552
|
+
},
|
|
553
|
+
children: [
|
|
554
|
+
/* @__PURE__ */ t("span", { className: "saisie__libelle", children: a.info.libelle }),
|
|
555
|
+
/* @__PURE__ */ t(
|
|
556
|
+
"input",
|
|
557
|
+
{
|
|
558
|
+
ref: l,
|
|
559
|
+
className: "saisie__champ",
|
|
560
|
+
style: { ...a.police, width: L },
|
|
561
|
+
value: a.texte,
|
|
562
|
+
inputMode: a.info.type === "number" ? "decimal" : void 0,
|
|
563
|
+
disabled: a.envoi,
|
|
564
|
+
"aria-label": a.info.libelle,
|
|
565
|
+
onChange: (b) => {
|
|
566
|
+
const M = b.target.value;
|
|
567
|
+
c((D) => D && { ...D, texte: M, erreur: null });
|
|
568
|
+
},
|
|
569
|
+
onKeyDown: (b) => {
|
|
570
|
+
if (b.key === "Enter") {
|
|
571
|
+
b.preventDefault(), I(a);
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
b.key === "Escape" && (b.preventDefault(), u.current = a.jeton, N(a.jeton));
|
|
575
|
+
},
|
|
576
|
+
onBlur: () => {
|
|
577
|
+
I(a);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
),
|
|
581
|
+
a.erreur ? /* @__PURE__ */ t("span", { className: "saisie__erreur", children: a.erreur }) : /* @__PURE__ */ t("span", { className: "saisie__aide", children: "Entrée pour enregistrer · Échap pour annuler" })
|
|
582
|
+
]
|
|
583
|
+
}
|
|
584
|
+
);
|
|
585
|
+
}
|
|
586
|
+
const Be = ["lystech-editeur-hote", "lystech-connexion-hote"];
|
|
587
|
+
function qe(n, e) {
|
|
588
|
+
const o = /* @__PURE__ */ new Map();
|
|
589
|
+
for (const [s, a] of Object.entries(n))
|
|
590
|
+
for (const [c, l] of Object.entries(a)) {
|
|
591
|
+
const y = String(l ?? "").trim();
|
|
592
|
+
if (y.length < 2 || y.includes("{{")) continue;
|
|
593
|
+
const r = e(s, c);
|
|
594
|
+
if (r <= 0) continue;
|
|
595
|
+
const u = o.get(y);
|
|
596
|
+
u ? u.push({ ns: s, chemin: c, rang: r }) : o.set(y, [{ ns: s, chemin: c, rang: r }]);
|
|
448
597
|
}
|
|
449
|
-
return
|
|
450
|
-
}
|
|
451
|
-
function
|
|
452
|
-
const
|
|
453
|
-
for (const
|
|
454
|
-
if (
|
|
455
|
-
const
|
|
456
|
-
if (
|
|
457
|
-
const
|
|
458
|
-
|
|
598
|
+
return o;
|
|
599
|
+
}
|
|
600
|
+
function Ue(n) {
|
|
601
|
+
const e = /* @__PURE__ */ new Map(), o = document.body.querySelectorAll("*");
|
|
602
|
+
for (const s of o) {
|
|
603
|
+
if (Be.some((l) => s.id === l || s.closest("#" + l)) || s.closest("." + pe) || s.closest("[data-lystech-champ]") || s.children.length > 0) continue;
|
|
604
|
+
const a = (s.textContent ?? "").trim();
|
|
605
|
+
if (a.length < 2) continue;
|
|
606
|
+
const c = n.get(a);
|
|
607
|
+
c && e.set(s, { valeur: a, candidats: c });
|
|
459
608
|
}
|
|
460
|
-
return
|
|
609
|
+
return e;
|
|
461
610
|
}
|
|
462
|
-
function
|
|
463
|
-
source:
|
|
464
|
-
actif:
|
|
465
|
-
|
|
466
|
-
surModification:
|
|
611
|
+
function je({
|
|
612
|
+
source: n,
|
|
613
|
+
actif: e,
|
|
614
|
+
pertinence: o,
|
|
615
|
+
surModification: s
|
|
467
616
|
}) {
|
|
468
|
-
const
|
|
469
|
-
|
|
470
|
-
const u =
|
|
471
|
-
u.current =
|
|
472
|
-
const
|
|
473
|
-
|
|
474
|
-
const
|
|
475
|
-
return
|
|
476
|
-
if (!
|
|
477
|
-
const
|
|
478
|
-
const
|
|
479
|
-
|
|
480
|
-
|
|
617
|
+
const a = Q(/* @__PURE__ */ new Map()), c = Q(null), [l, y] = q(null), r = Q(n);
|
|
618
|
+
r.current = n;
|
|
619
|
+
const u = Q(s);
|
|
620
|
+
u.current = s;
|
|
621
|
+
const A = Q(o);
|
|
622
|
+
A.current = o;
|
|
623
|
+
const S = Q(null);
|
|
624
|
+
return X(() => {
|
|
625
|
+
if (!e) return;
|
|
626
|
+
const N = () => {
|
|
627
|
+
const d = r.current, p = qe(
|
|
628
|
+
d.dictionnaire(d.langueCourante()),
|
|
629
|
+
A.current
|
|
481
630
|
);
|
|
482
|
-
|
|
631
|
+
a.current = Ue(p);
|
|
483
632
|
};
|
|
484
|
-
|
|
485
|
-
let
|
|
486
|
-
const
|
|
487
|
-
|
|
633
|
+
S.current = N, N();
|
|
634
|
+
let I;
|
|
635
|
+
const L = new MutationObserver(() => {
|
|
636
|
+
c.current || (clearTimeout(I), I = setTimeout(N, 250));
|
|
488
637
|
});
|
|
489
|
-
|
|
490
|
-
const
|
|
491
|
-
const
|
|
492
|
-
!(
|
|
638
|
+
L.observe(document.body, { childList: !0, subtree: !0 });
|
|
639
|
+
const b = "outline:2px dashed rgba(59,165,141,.85);outline-offset:3px;border-radius:3px;cursor:text;", M = (d) => {
|
|
640
|
+
const p = d.target;
|
|
641
|
+
!(p instanceof HTMLElement) || c.current || a.current.has(p) && (p.dataset.lysStyleAvant || (p.dataset.lysStyleAvant = p.getAttribute("style") ?? ""), p.setAttribute(
|
|
493
642
|
"style",
|
|
494
|
-
(
|
|
643
|
+
(p.dataset.lysStyleAvant ?? "") + b
|
|
495
644
|
));
|
|
496
|
-
},
|
|
497
|
-
const
|
|
498
|
-
if (!(
|
|
499
|
-
const
|
|
500
|
-
delete
|
|
501
|
-
},
|
|
502
|
-
const
|
|
503
|
-
|
|
504
|
-
el:
|
|
505
|
-
avant: (
|
|
506
|
-
ns:
|
|
507
|
-
chemin:
|
|
508
|
-
styleAvant:
|
|
509
|
-
},
|
|
645
|
+
}, D = (d) => {
|
|
646
|
+
const p = d.target;
|
|
647
|
+
if (!(p instanceof HTMLElement) || c.current?.el === p || p.dataset.lysStyleAvant === void 0) return;
|
|
648
|
+
const w = p.dataset.lysStyleAvant;
|
|
649
|
+
delete p.dataset.lysStyleAvant, w ? p.setAttribute("style", w) : p.removeAttribute("style");
|
|
650
|
+
}, B = (d, p) => {
|
|
651
|
+
const w = d.getAttribute("style") ?? "";
|
|
652
|
+
c.current = {
|
|
653
|
+
el: d,
|
|
654
|
+
avant: (d.textContent ?? "").trim(),
|
|
655
|
+
ns: p.ns,
|
|
656
|
+
chemin: p.chemin,
|
|
657
|
+
styleAvant: d.dataset.lysStyleAvant ?? w
|
|
658
|
+
}, d.setAttribute("contenteditable", "plaintext-only"), d.setAttribute(
|
|
510
659
|
"style",
|
|
511
|
-
(
|
|
512
|
-
),
|
|
513
|
-
const
|
|
514
|
-
|
|
515
|
-
},
|
|
516
|
-
const
|
|
517
|
-
if (!
|
|
518
|
-
|
|
519
|
-
const
|
|
520
|
-
|
|
521
|
-
const
|
|
522
|
-
if (delete
|
|
523
|
-
|
|
660
|
+
(d.dataset.lysStyleAvant ?? "") + "outline:2px solid #3ba58d;outline-offset:3px;border-radius:3px;"
|
|
661
|
+
), d.focus();
|
|
662
|
+
const F = window.getSelection(), U = document.createRange();
|
|
663
|
+
U.selectNodeContents(d), F?.removeAllRanges(), F?.addRange(U);
|
|
664
|
+
}, g = async (d) => {
|
|
665
|
+
const p = c.current;
|
|
666
|
+
if (!p) return;
|
|
667
|
+
c.current = null;
|
|
668
|
+
const w = (p.el.textContent ?? "").trim();
|
|
669
|
+
p.el.removeAttribute("contenteditable");
|
|
670
|
+
const F = p.el.dataset.lysStyleAvant;
|
|
671
|
+
if (delete p.el.dataset.lysStyleAvant, F ? p.el.setAttribute("style", F) : p.el.removeAttribute("style"), d || w === p.avant) {
|
|
672
|
+
d && (p.el.textContent = p.avant);
|
|
524
673
|
return;
|
|
525
674
|
}
|
|
526
|
-
const
|
|
527
|
-
|
|
528
|
-
},
|
|
529
|
-
const
|
|
530
|
-
if (!(
|
|
531
|
-
if (
|
|
532
|
-
if (
|
|
533
|
-
|
|
675
|
+
const U = r.current.langueCourante();
|
|
676
|
+
r.current.poser(U, p.ns, p.chemin, w), await u.current(p.ns, p.chemin, U, w);
|
|
677
|
+
}, v = (d) => {
|
|
678
|
+
const p = d.target;
|
|
679
|
+
if (!(p instanceof HTMLElement)) return;
|
|
680
|
+
if (c.current) {
|
|
681
|
+
if (c.current.el === p) return;
|
|
682
|
+
g(!1);
|
|
534
683
|
}
|
|
535
|
-
const
|
|
536
|
-
if (
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
el: i,
|
|
543
|
-
candidats: h.candidats,
|
|
544
|
-
x: p.clientX,
|
|
545
|
-
y: p.clientY
|
|
546
|
-
});
|
|
684
|
+
const w = a.current.get(p);
|
|
685
|
+
if (!w) return;
|
|
686
|
+
d.preventDefault(), d.stopPropagation();
|
|
687
|
+
const F = Math.max(...w.candidats.map((Z) => Z.rang)), U = w.candidats.filter((Z) => Z.rang === F);
|
|
688
|
+
if (U.length === 1) {
|
|
689
|
+
B(p, U[0]);
|
|
690
|
+
return;
|
|
547
691
|
}
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
692
|
+
y({
|
|
693
|
+
el: p,
|
|
694
|
+
candidats: U,
|
|
695
|
+
x: d.clientX,
|
|
696
|
+
y: d.clientY
|
|
697
|
+
});
|
|
698
|
+
}, h = (d) => {
|
|
699
|
+
c.current && (d.key === "Escape" ? (d.preventDefault(), g(!0)) : d.key === "Enter" && !d.shiftKey && (d.preventDefault(), g(!1)));
|
|
700
|
+
}, z = () => {
|
|
701
|
+
c.current && g(!1);
|
|
552
702
|
};
|
|
553
|
-
document.addEventListener("mouseover",
|
|
554
|
-
const
|
|
555
|
-
if (!
|
|
556
|
-
const
|
|
557
|
-
(
|
|
703
|
+
document.addEventListener("mouseover", M, !0), document.addEventListener("mouseout", D, !0), document.addEventListener("click", v, !0);
|
|
704
|
+
const R = (d) => {
|
|
705
|
+
if (!c.current) return;
|
|
706
|
+
const p = d.inputType;
|
|
707
|
+
(p === "insertParagraph" || p === "insertLineBreak") && (d.preventDefault(), g(!1));
|
|
558
708
|
};
|
|
559
|
-
return document.addEventListener("beforeinput",
|
|
560
|
-
|
|
709
|
+
return document.addEventListener("beforeinput", R, !0), document.addEventListener("keydown", h, !0), document.addEventListener("focusout", z, !0), window.__lysChoisir = (d, p) => {
|
|
710
|
+
y(null), B(p, d);
|
|
561
711
|
}, () => {
|
|
562
|
-
|
|
712
|
+
S.current = null, clearTimeout(I), L.disconnect(), document.removeEventListener("mouseover", M, !0), document.removeEventListener("mouseout", D, !0), document.removeEventListener("click", v, !0), document.removeEventListener("beforeinput", R, !0), document.removeEventListener("keydown", h, !0), document.removeEventListener("focusout", z, !0), c.current && g(!0), delete window.__lysChoisir;
|
|
563
713
|
};
|
|
564
|
-
}, [
|
|
565
|
-
|
|
566
|
-
}, [
|
|
714
|
+
}, [e]), X(() => {
|
|
715
|
+
c.current || S.current?.();
|
|
716
|
+
}, [o]), l ? /* @__PURE__ */ x(
|
|
567
717
|
"div",
|
|
568
718
|
{
|
|
569
719
|
className: "choix",
|
|
@@ -572,27 +722,27 @@ function ze({
|
|
|
572
722
|
left: Math.min(l.x, window.innerWidth - 280)
|
|
573
723
|
},
|
|
574
724
|
children: [
|
|
575
|
-
/* @__PURE__ */
|
|
576
|
-
/* @__PURE__ */
|
|
577
|
-
l.candidats.map((
|
|
725
|
+
/* @__PURE__ */ t("p", { className: "choix__titre", children: "Ce texte apparaît à plusieurs endroits." }),
|
|
726
|
+
/* @__PURE__ */ t("p", { className: "choix__aide", children: "Lequel corrigez-vous ?" }),
|
|
727
|
+
l.candidats.map((N) => /* @__PURE__ */ x(
|
|
578
728
|
"button",
|
|
579
729
|
{
|
|
580
730
|
type: "button",
|
|
581
731
|
className: "choix__option",
|
|
582
|
-
onClick: () => window.__lysChoisir?.(
|
|
732
|
+
onClick: () => window.__lysChoisir?.(N, l.el),
|
|
583
733
|
children: [
|
|
584
|
-
/* @__PURE__ */
|
|
585
|
-
/* @__PURE__ */
|
|
734
|
+
/* @__PURE__ */ t("span", { className: "choix__chemin", children: N.chemin }),
|
|
735
|
+
/* @__PURE__ */ t("span", { className: "choix__ns", children: N.ns })
|
|
586
736
|
]
|
|
587
737
|
},
|
|
588
|
-
|
|
738
|
+
N.ns + ":" + N.chemin
|
|
589
739
|
)),
|
|
590
|
-
/* @__PURE__ */
|
|
740
|
+
/* @__PURE__ */ t(
|
|
591
741
|
"button",
|
|
592
742
|
{
|
|
593
743
|
type: "button",
|
|
594
744
|
className: "bouton bouton--discret",
|
|
595
|
-
onClick: () =>
|
|
745
|
+
onClick: () => y(null),
|
|
596
746
|
children: "Annuler"
|
|
597
747
|
}
|
|
598
748
|
)
|
|
@@ -600,346 +750,406 @@ function ze({
|
|
|
600
750
|
}
|
|
601
751
|
) : null;
|
|
602
752
|
}
|
|
603
|
-
const H = /^i18n:([^:]+):(.*)$/,
|
|
604
|
-
function
|
|
605
|
-
return JSON.stringify(
|
|
753
|
+
const H = /^i18n:([^:]+):(.*)$/, re = "commun", oe = "lystech-edit-mode";
|
|
754
|
+
function le(n, e) {
|
|
755
|
+
return JSON.stringify(n ?? {}) === JSON.stringify(e ?? {});
|
|
606
756
|
}
|
|
607
|
-
function
|
|
608
|
-
const [
|
|
757
|
+
function Qe({ api: n, pont: e }) {
|
|
758
|
+
const [o, s] = q([]), [a, c] = q([]), [l, y] = q(e.page), [r, u] = q(null), [A, S] = q({}), [N, I] = q(!1), [L, b] = q(() => {
|
|
609
759
|
try {
|
|
610
|
-
return window.localStorage.getItem(
|
|
760
|
+
return window.localStorage.getItem(oe) === "circuler" ? "circuler" : "modifier";
|
|
611
761
|
} catch {
|
|
612
762
|
return "modifier";
|
|
613
763
|
}
|
|
614
|
-
}),
|
|
615
|
-
const f =
|
|
764
|
+
}), M = () => b((i) => {
|
|
765
|
+
const f = i === "modifier" ? "circuler" : "modifier";
|
|
616
766
|
try {
|
|
617
|
-
window.localStorage.setItem(
|
|
767
|
+
window.localStorage.setItem(oe, f);
|
|
618
768
|
} catch {
|
|
619
769
|
}
|
|
620
770
|
return f;
|
|
621
|
-
}), [
|
|
771
|
+
}), [D, B] = q(!1), [g, v] = q(
|
|
622
772
|
null
|
|
623
773
|
);
|
|
624
|
-
|
|
625
|
-
|
|
774
|
+
X(() => (e.surChangementDePage = (i) => {
|
|
775
|
+
y(i), u(null), I(!1);
|
|
626
776
|
}, () => {
|
|
627
|
-
|
|
628
|
-
}), [
|
|
629
|
-
const
|
|
777
|
+
e.surChangementDePage = void 0;
|
|
778
|
+
}), [e]);
|
|
779
|
+
const h = Y(async () => {
|
|
630
780
|
try {
|
|
631
|
-
const [
|
|
632
|
-
|
|
633
|
-
l ===
|
|
634
|
-
]),
|
|
635
|
-
return
|
|
781
|
+
const [i, f] = await Promise.all([
|
|
782
|
+
n.pourPage(l),
|
|
783
|
+
l === re ? Promise.resolve([]) : n.pourPage(re)
|
|
784
|
+
]), m = [...i, ...f];
|
|
785
|
+
return c(m), m;
|
|
636
786
|
} catch {
|
|
637
|
-
return
|
|
787
|
+
return v({
|
|
638
788
|
ton: "erreur",
|
|
639
789
|
texte: "Impossible de lire le contenu du site."
|
|
640
790
|
}), [];
|
|
641
791
|
}
|
|
642
|
-
}, [
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
}, [
|
|
646
|
-
|
|
647
|
-
}, [
|
|
648
|
-
const
|
|
649
|
-
(
|
|
650
|
-
let
|
|
651
|
-
for (const
|
|
652
|
-
const
|
|
653
|
-
if (!
|
|
654
|
-
const
|
|
655
|
-
(
|
|
792
|
+
}, [n, l]);
|
|
793
|
+
X(() => {
|
|
794
|
+
n.schemas().then(s).catch(() => s([]));
|
|
795
|
+
}, [n]), X(() => {
|
|
796
|
+
h();
|
|
797
|
+
}, [h]);
|
|
798
|
+
const z = Y(
|
|
799
|
+
(i, f) => {
|
|
800
|
+
let m = null, k = -1;
|
|
801
|
+
for (const O of o) {
|
|
802
|
+
const C = H.exec(O.blockType);
|
|
803
|
+
if (!C || C[1] !== i) continue;
|
|
804
|
+
const E = C[2];
|
|
805
|
+
(E === "" || f === E || f.startsWith(E + ".")) && E.length > k && (m = O, k = E.length);
|
|
656
806
|
}
|
|
657
|
-
if (!
|
|
658
|
-
const
|
|
659
|
-
return { bloc:
|
|
807
|
+
if (!m) return null;
|
|
808
|
+
const T = H.exec(m.blockType)?.[2] ?? "", _ = T ? f.slice(T.length + 1) : f;
|
|
809
|
+
return { bloc: m, champ: _ };
|
|
660
810
|
},
|
|
661
|
-
[
|
|
662
|
-
),
|
|
663
|
-
(
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
[
|
|
668
|
-
),
|
|
669
|
-
() =>
|
|
670
|
-
|
|
671
|
-
|
|
811
|
+
[o]
|
|
812
|
+
), R = Y(
|
|
813
|
+
(i, f) => {
|
|
814
|
+
const m = z(i, f);
|
|
815
|
+
return m ? (m.bloc.pages ?? []).includes(l) ? 2 : 1 : 0;
|
|
816
|
+
},
|
|
817
|
+
[z, l]
|
|
818
|
+
), d = Y(
|
|
819
|
+
(i) => o.find((f) => f.blockType === i),
|
|
820
|
+
[o]
|
|
821
|
+
), p = se(
|
|
822
|
+
() => o.filter((i) => {
|
|
823
|
+
const f = i.pages ?? [];
|
|
824
|
+
return f.includes(l) || f.includes(re);
|
|
672
825
|
}),
|
|
673
|
-
[
|
|
674
|
-
),
|
|
675
|
-
() =>
|
|
676
|
-
[
|
|
677
|
-
)
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
826
|
+
[o, l]
|
|
827
|
+
), w = se(
|
|
828
|
+
() => a.filter((i) => i.draft && !le(i.draft, i.data)),
|
|
829
|
+
[a]
|
|
830
|
+
);
|
|
831
|
+
X(() => {
|
|
832
|
+
if (w.length === 0) return;
|
|
833
|
+
for (const m of w)
|
|
834
|
+
H.test(m.blockType) || e.poserApercu(m.blockType, m.draft);
|
|
835
|
+
const i = w.filter((m) => H.test(m.blockType)), f = e.sourceTexte;
|
|
836
|
+
i.length && f && import("./morceaux/sourceTexte-BMPMpNg9.js").then(
|
|
837
|
+
({ appliquerAuxTextes: m }) => m(
|
|
838
|
+
i.map((k) => ({ blockType: k.blockType, data: k.draft })),
|
|
839
|
+
f
|
|
840
|
+
)
|
|
841
|
+
);
|
|
842
|
+
}, [w, e]);
|
|
843
|
+
const F = Y(
|
|
844
|
+
async (i, f, m, k) => {
|
|
845
|
+
const T = z(i, f);
|
|
846
|
+
if (!T) {
|
|
847
|
+
v({
|
|
682
848
|
ton: "erreur",
|
|
683
|
-
texte: `Ce texte (${
|
|
849
|
+
texte: `Ce texte (${i}:${f}) n'appartient à aucun bloc déclaré.`
|
|
684
850
|
});
|
|
685
851
|
return;
|
|
686
852
|
}
|
|
687
|
-
const
|
|
853
|
+
const _ = a.find((P) => P.blockType === T.bloc.blockType), O = _?.draft ?? _?.data ?? {}, C = O[T.champ], E = T.bloc.fields.find((P) => P.key === T.champ), j = (
|
|
688
854
|
/* `!declare.localized` et non `=== false` : un champ non traduit
|
|
689
855
|
OMET la cle plutot que de la mettre a faux. Tester l'egalite
|
|
690
856
|
stricte ne se declenchait donc jamais. */
|
|
691
|
-
|
|
692
|
-
),
|
|
857
|
+
E && !E.localized ? k : C && typeof C == "object" && !Array.isArray(C) ? { ...C, [m]: k } : { [m]: k }
|
|
858
|
+
), V = { ...O, [T.champ]: j };
|
|
693
859
|
try {
|
|
694
|
-
if (
|
|
695
|
-
await
|
|
860
|
+
if (_?.UID)
|
|
861
|
+
await n.enregistrerBrouillon(_.UID, V);
|
|
696
862
|
else {
|
|
697
|
-
const
|
|
698
|
-
await
|
|
863
|
+
const P = T.bloc.pages?.[0] ?? l;
|
|
864
|
+
await n.creer(P, T.bloc.blockType, V);
|
|
699
865
|
}
|
|
700
|
-
await
|
|
866
|
+
await h(), v(null);
|
|
701
867
|
} catch {
|
|
702
|
-
|
|
868
|
+
v({
|
|
703
869
|
ton: "erreur",
|
|
704
870
|
texte: "Enregistrement impossible. Votre texte est toujours à l'écran."
|
|
705
871
|
});
|
|
706
872
|
}
|
|
707
873
|
},
|
|
708
|
-
[
|
|
709
|
-
),
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
874
|
+
[n, z, l, h, a]
|
|
875
|
+
), U = Y(
|
|
876
|
+
(i, f) => {
|
|
877
|
+
const m = d(i), k = m?.fields.find((E) => E.key === f);
|
|
878
|
+
if (!m || !k) return null;
|
|
879
|
+
const T = a.find((E) => E.blockType === i);
|
|
880
|
+
let C = {
|
|
881
|
+
...e.replis?.[i] ?? {},
|
|
882
|
+
...T?.data ?? {},
|
|
883
|
+
...T?.draft ?? {}
|
|
884
|
+
}[f];
|
|
885
|
+
return k.localized && C && typeof C == "object" && !Array.isArray(C) && (C = C[e.langue]), { libelle: k.label, type: k.type, valeur: C };
|
|
886
|
+
},
|
|
887
|
+
[d, a, e]
|
|
888
|
+
), Z = Y(
|
|
889
|
+
async (i, f, m) => {
|
|
890
|
+
const k = d(i), T = k?.fields.find((P) => P.key === f);
|
|
891
|
+
if (!k || !T) return !1;
|
|
892
|
+
const _ = a.find((P) => P.blockType === i), C = {
|
|
893
|
+
...e.replis?.[i] ?? {},
|
|
894
|
+
..._?.data ?? {},
|
|
895
|
+
..._?.draft ?? {}
|
|
896
|
+
}, E = C[f], j = T.localized ? {
|
|
897
|
+
...E && typeof E == "object" && !Array.isArray(E) ? E : {},
|
|
898
|
+
[e.langue]: m
|
|
899
|
+
} : m, V = { ...C, [f]: j };
|
|
900
|
+
try {
|
|
901
|
+
return _?.UID ? await n.enregistrerBrouillon(_.UID, V) : await n.creer(k.pages?.[0] ?? l, i, V), await h(), e.poserApercu(i, V), v(null), !0;
|
|
902
|
+
} catch {
|
|
903
|
+
return v({
|
|
904
|
+
ton: "erreur",
|
|
905
|
+
texte: "Enregistrement impossible. La valeur en ligne n'a pas changé."
|
|
906
|
+
}), !1;
|
|
907
|
+
}
|
|
908
|
+
},
|
|
909
|
+
[n, l, e, h, d, a]
|
|
910
|
+
), xe = async () => {
|
|
911
|
+
if (!w.length) return;
|
|
912
|
+
B(!0), v(null);
|
|
913
|
+
const i = w.length;
|
|
713
914
|
try {
|
|
714
|
-
for (const f of
|
|
715
|
-
await
|
|
716
|
-
for (const f of
|
|
717
|
-
|
|
915
|
+
for (const f of w) await n.publier(f.UID);
|
|
916
|
+
await h();
|
|
917
|
+
for (const f of w) e.poserApercu(f.blockType, null);
|
|
918
|
+
e.recharger(), v({
|
|
718
919
|
ton: "ok",
|
|
719
|
-
texte:
|
|
920
|
+
texte: i === 1 ? "Publié. Vos visiteurs le voient maintenant." : `${i} modifications publiées.`
|
|
720
921
|
});
|
|
721
922
|
} catch {
|
|
722
|
-
|
|
923
|
+
v({
|
|
723
924
|
ton: "erreur",
|
|
724
925
|
texte: "La publication a échoué. Rien n'a été mis en ligne."
|
|
725
926
|
});
|
|
726
927
|
} finally {
|
|
727
|
-
|
|
928
|
+
B(!1);
|
|
728
929
|
}
|
|
729
|
-
},
|
|
730
|
-
|
|
930
|
+
}, ve = async () => {
|
|
931
|
+
B(!0);
|
|
731
932
|
try {
|
|
732
|
-
const
|
|
733
|
-
for (const
|
|
734
|
-
const f = await
|
|
735
|
-
for (const
|
|
736
|
-
if (
|
|
737
|
-
const { appliquerAuxTextes:
|
|
738
|
-
|
|
933
|
+
const i = w.map((m) => m.blockType);
|
|
934
|
+
for (const m of w) await n.annuler(m.UID);
|
|
935
|
+
const f = await h();
|
|
936
|
+
for (const m of i) e.poserApercu(m, null);
|
|
937
|
+
if (e.sourceTexte) {
|
|
938
|
+
const { appliquerAuxTextes: m } = await import("./morceaux/sourceTexte-BMPMpNg9.js");
|
|
939
|
+
m(
|
|
739
940
|
f.map((k) => ({ blockType: k.blockType, data: k.data })),
|
|
740
|
-
|
|
941
|
+
e.sourceTexte
|
|
741
942
|
);
|
|
742
943
|
}
|
|
743
|
-
|
|
944
|
+
v({
|
|
744
945
|
ton: "info",
|
|
745
946
|
texte: "Modifications abandonnées. On est revenu à ce qui est en ligne."
|
|
746
947
|
});
|
|
747
948
|
} finally {
|
|
748
|
-
|
|
949
|
+
B(!1);
|
|
749
950
|
}
|
|
750
|
-
},
|
|
751
|
-
const f =
|
|
752
|
-
if (!
|
|
753
|
-
const
|
|
754
|
-
|
|
951
|
+
}, ae = (i) => {
|
|
952
|
+
const f = a.find((O) => O.blockType === i), m = f?.draft ?? f?.data ?? {}, k = d(i), T = H.exec(i), _ = {};
|
|
953
|
+
if (!T) {
|
|
954
|
+
const O = e.replis?.[i];
|
|
955
|
+
O && typeof O == "object" && !Array.isArray(O) && Object.assign(_, O);
|
|
755
956
|
}
|
|
756
|
-
if (
|
|
757
|
-
const
|
|
758
|
-
for (const
|
|
759
|
-
|
|
760
|
-
const
|
|
761
|
-
for (const
|
|
762
|
-
const
|
|
763
|
-
if (!
|
|
764
|
-
const
|
|
765
|
-
typeof
|
|
957
|
+
if (T && k && e.sourceTexte) {
|
|
958
|
+
const O = T[1], C = T[2], E = e.sourceTexte.langues(), j = {};
|
|
959
|
+
for (const P of E)
|
|
960
|
+
j[P] = e.sourceTexte.dictionnaire(P)[O] ?? {};
|
|
961
|
+
const V = e.sourceTexte.langueCourante();
|
|
962
|
+
for (const P of k.fields) {
|
|
963
|
+
const $ = C ? C + "." + P.key : P.key;
|
|
964
|
+
if (!P.localized) {
|
|
965
|
+
const J = j[V]?.[$] ?? E.map((G) => j[G]?.[$]).find((G) => typeof G == "string");
|
|
966
|
+
typeof J == "string" && (_[P.key] = J);
|
|
766
967
|
continue;
|
|
767
968
|
}
|
|
768
|
-
const
|
|
769
|
-
for (const
|
|
770
|
-
const
|
|
771
|
-
typeof
|
|
969
|
+
const ee = {};
|
|
970
|
+
for (const J of E) {
|
|
971
|
+
const G = j[J]?.[$];
|
|
972
|
+
typeof G == "string" && (ee[J] = G);
|
|
772
973
|
}
|
|
773
|
-
Object.keys(
|
|
974
|
+
Object.keys(ee).length && (_[P.key] = ee);
|
|
774
975
|
}
|
|
775
976
|
}
|
|
776
|
-
for (const [
|
|
777
|
-
const
|
|
778
|
-
O
|
|
977
|
+
for (const [O, C] of Object.entries(m)) {
|
|
978
|
+
const E = _[O], j = C && typeof C == "object" && !Array.isArray(C) && E && typeof E == "object" && !Array.isArray(E);
|
|
979
|
+
_[O] = j ? { ...E, ...C } : C;
|
|
779
980
|
}
|
|
780
|
-
|
|
781
|
-
},
|
|
782
|
-
if (
|
|
783
|
-
|
|
981
|
+
S(_), u(i), I(!1), v(null);
|
|
982
|
+
}, ye = (i, f) => S((m) => ({ ...m, [i]: f })), Ae = async () => {
|
|
983
|
+
if (r) {
|
|
984
|
+
B(!0);
|
|
784
985
|
try {
|
|
785
|
-
const
|
|
786
|
-
if (
|
|
986
|
+
const i = a.find((m) => m.blockType === r);
|
|
987
|
+
if (i?.UID) await n.enregistrerBrouillon(i.UID, A);
|
|
787
988
|
else {
|
|
788
|
-
const
|
|
789
|
-
await
|
|
989
|
+
const m = d(r)?.pages?.[0] ?? l;
|
|
990
|
+
await n.creer(m, r, A);
|
|
790
991
|
}
|
|
791
|
-
const f = await
|
|
792
|
-
if (
|
|
793
|
-
const { appliquerAuxTextes:
|
|
794
|
-
|
|
992
|
+
const f = await h();
|
|
993
|
+
if (e.sourceTexte) {
|
|
994
|
+
const { appliquerAuxTextes: m } = await import("./morceaux/sourceTexte-BMPMpNg9.js");
|
|
995
|
+
m(
|
|
795
996
|
f.map((k) => ({ blockType: k.blockType, data: k.draft ?? k.data })),
|
|
796
|
-
|
|
997
|
+
e.sourceTexte
|
|
797
998
|
);
|
|
798
999
|
}
|
|
799
|
-
H.test(
|
|
1000
|
+
H.test(r) || e.poserApercu(r, A), v({
|
|
800
1001
|
ton: "ok",
|
|
801
1002
|
texte: "Enregistré. Rien n'a encore changé pour vos visiteurs."
|
|
802
1003
|
});
|
|
803
1004
|
} catch {
|
|
804
|
-
|
|
1005
|
+
v({ ton: "erreur", texte: "L'enregistrement a échoué." });
|
|
805
1006
|
} finally {
|
|
806
|
-
|
|
1007
|
+
B(!1);
|
|
807
1008
|
}
|
|
808
1009
|
}
|
|
809
|
-
},
|
|
1010
|
+
}, ke = () => {
|
|
810
1011
|
try {
|
|
811
|
-
window.localStorage.removeItem(
|
|
1012
|
+
window.localStorage.removeItem(oe);
|
|
812
1013
|
} catch {
|
|
813
1014
|
}
|
|
814
|
-
|
|
815
|
-
},
|
|
816
|
-
return /* @__PURE__ */
|
|
817
|
-
/* @__PURE__ */
|
|
1015
|
+
fe();
|
|
1016
|
+
}, W = r ? d(r) : void 0, K = !r && !N;
|
|
1017
|
+
return /* @__PURE__ */ x("div", { className: "calque", children: [
|
|
1018
|
+
/* @__PURE__ */ t(
|
|
818
1019
|
"div",
|
|
819
1020
|
{
|
|
820
|
-
className: "cadre-global" + (
|
|
1021
|
+
className: "cadre-global" + (L === "circuler" ? " cadre-global--circuler" : ""),
|
|
821
1022
|
"aria-hidden": "true"
|
|
822
1023
|
}
|
|
823
1024
|
),
|
|
824
|
-
|
|
825
|
-
|
|
1025
|
+
e.sourceTexte && /* @__PURE__ */ t(
|
|
1026
|
+
je,
|
|
1027
|
+
{
|
|
1028
|
+
source: e.sourceTexte,
|
|
1029
|
+
actif: K && !D && L === "modifier",
|
|
1030
|
+
pertinence: R,
|
|
1031
|
+
surModification: F
|
|
1032
|
+
}
|
|
1033
|
+
),
|
|
1034
|
+
/* @__PURE__ */ t(
|
|
1035
|
+
Me,
|
|
826
1036
|
{
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
1037
|
+
actif: K && !D && L === "modifier",
|
|
1038
|
+
lire: U,
|
|
1039
|
+
enregistrer: Z,
|
|
1040
|
+
ouvrirPanneau: ae
|
|
831
1041
|
}
|
|
832
1042
|
),
|
|
833
|
-
|
|
834
|
-
/* @__PURE__ */
|
|
835
|
-
/* @__PURE__ */
|
|
836
|
-
/* @__PURE__ */
|
|
1043
|
+
K && /* @__PURE__ */ x("div", { className: "barre", children: [
|
|
1044
|
+
/* @__PURE__ */ t("span", { className: "barre__point" }),
|
|
1045
|
+
/* @__PURE__ */ t("span", { className: "barre__texte", children: L === "modifier" ? "Cliquez un texte pour le corriger" : "Navigation libre — les clics ouvrent les liens" }),
|
|
1046
|
+
/* @__PURE__ */ t(
|
|
837
1047
|
"button",
|
|
838
1048
|
{
|
|
839
1049
|
type: "button",
|
|
840
|
-
className: "bouton " + (
|
|
841
|
-
onClick:
|
|
842
|
-
title:
|
|
843
|
-
children:
|
|
1050
|
+
className: "bouton " + (L === "circuler" ? "bouton--principal" : ""),
|
|
1051
|
+
onClick: M,
|
|
1052
|
+
title: L === "modifier" ? "Passer en navigation pour changer de page" : "Revenir a la modification des textes",
|
|
1053
|
+
children: L === "modifier" ? "Circuler" : "Modifier"
|
|
844
1054
|
}
|
|
845
1055
|
),
|
|
846
|
-
|
|
847
|
-
/* @__PURE__ */
|
|
848
|
-
/* @__PURE__ */
|
|
1056
|
+
w.length > 0 ? /* @__PURE__ */ x(ue, { children: [
|
|
1057
|
+
/* @__PURE__ */ t("span", { className: "barre__compte", children: w.length === 1 ? "1 modification non publiée" : `${w.length} modifications non publiées` }),
|
|
1058
|
+
/* @__PURE__ */ t(
|
|
849
1059
|
"button",
|
|
850
1060
|
{
|
|
851
1061
|
type: "button",
|
|
852
1062
|
className: "bouton bouton--principal",
|
|
853
|
-
onClick:
|
|
854
|
-
disabled:
|
|
1063
|
+
onClick: xe,
|
|
1064
|
+
disabled: D,
|
|
855
1065
|
children: "Publier"
|
|
856
1066
|
}
|
|
857
1067
|
),
|
|
858
|
-
/* @__PURE__ */
|
|
1068
|
+
/* @__PURE__ */ t(
|
|
859
1069
|
"button",
|
|
860
1070
|
{
|
|
861
1071
|
type: "button",
|
|
862
1072
|
className: "bouton bouton--discret",
|
|
863
|
-
onClick:
|
|
864
|
-
disabled:
|
|
1073
|
+
onClick: ve,
|
|
1074
|
+
disabled: D,
|
|
865
1075
|
children: "Abandonner"
|
|
866
1076
|
}
|
|
867
1077
|
)
|
|
868
|
-
] }) : /* @__PURE__ */
|
|
869
|
-
/* @__PURE__ */
|
|
1078
|
+
] }) : /* @__PURE__ */ t("span", { className: "barre__compte", children: "tout est publié" }),
|
|
1079
|
+
/* @__PURE__ */ t(
|
|
870
1080
|
"button",
|
|
871
1081
|
{
|
|
872
1082
|
type: "button",
|
|
873
1083
|
className: "bouton bouton--icone bouton--discret",
|
|
874
|
-
onClick: () =>
|
|
1084
|
+
onClick: () => I(!0),
|
|
875
1085
|
title: "Tous les contenus",
|
|
876
1086
|
"aria-label": "Tous les contenus",
|
|
877
1087
|
children: "⋮"
|
|
878
1088
|
}
|
|
879
1089
|
),
|
|
880
|
-
/* @__PURE__ */
|
|
1090
|
+
/* @__PURE__ */ t(
|
|
881
1091
|
"button",
|
|
882
1092
|
{
|
|
883
1093
|
type: "button",
|
|
884
1094
|
className: "bouton bouton--icone bouton--sortie",
|
|
885
|
-
onClick:
|
|
1095
|
+
onClick: ke,
|
|
886
1096
|
title: "Quitter le mode édition",
|
|
887
1097
|
"aria-label": "Quitter le mode édition",
|
|
888
1098
|
children: "✕"
|
|
889
1099
|
}
|
|
890
1100
|
)
|
|
891
1101
|
] }),
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
/* @__PURE__ */
|
|
895
|
-
/* @__PURE__ */
|
|
896
|
-
/* @__PURE__ */
|
|
897
|
-
/* @__PURE__ */
|
|
1102
|
+
g && K && /* @__PURE__ */ t("div", { className: "flottant", children: /* @__PURE__ */ t("p", { className: "message message--" + g.ton, children: g.texte }) }),
|
|
1103
|
+
N && /* @__PURE__ */ x("div", { className: "panneau", role: "dialog", "aria-label": "Tous les contenus", children: [
|
|
1104
|
+
/* @__PURE__ */ x("div", { className: "panneau__tete", children: [
|
|
1105
|
+
/* @__PURE__ */ x("div", { style: { flex: 1 }, children: [
|
|
1106
|
+
/* @__PURE__ */ t("h2", { className: "panneau__titre", children: "Tous les contenus" }),
|
|
1107
|
+
/* @__PURE__ */ t("p", { className: "panneau__sous", children: "Y compris ce qui ne s'affiche pas dans la page : titre de l'onglet, description dans les moteurs de recherche, textes contenant une valeur calculée." })
|
|
898
1108
|
] }),
|
|
899
|
-
/* @__PURE__ */
|
|
1109
|
+
/* @__PURE__ */ t(
|
|
900
1110
|
"button",
|
|
901
1111
|
{
|
|
902
1112
|
type: "button",
|
|
903
1113
|
className: "bouton bouton--icone bouton--discret",
|
|
904
|
-
onClick: () =>
|
|
1114
|
+
onClick: () => I(!1),
|
|
905
1115
|
"aria-label": "Fermer",
|
|
906
1116
|
children: "✕"
|
|
907
1117
|
}
|
|
908
1118
|
)
|
|
909
1119
|
] }),
|
|
910
|
-
/* @__PURE__ */
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
const f =
|
|
914
|
-
return /* @__PURE__ */
|
|
1120
|
+
/* @__PURE__ */ x("div", { className: "panneau__corps", children: [
|
|
1121
|
+
p.length === 0 && /* @__PURE__ */ t("p", { className: "message message--info", children: "Aucun contenu déclaré pour cette page." }),
|
|
1122
|
+
p.map((i) => {
|
|
1123
|
+
const f = a.find((k) => k.blockType === i.blockType), m = f?.draft && !le(f.draft, f.data);
|
|
1124
|
+
return /* @__PURE__ */ x(
|
|
915
1125
|
"button",
|
|
916
1126
|
{
|
|
917
1127
|
type: "button",
|
|
918
1128
|
className: "rangee",
|
|
919
|
-
onClick: () =>
|
|
1129
|
+
onClick: () => ae(i.blockType),
|
|
920
1130
|
children: [
|
|
921
|
-
/* @__PURE__ */
|
|
922
|
-
/* @__PURE__ */
|
|
1131
|
+
/* @__PURE__ */ t("span", { className: "rangee__nom", children: i.label }),
|
|
1132
|
+
/* @__PURE__ */ t("span", { className: "rangee__info", children: m ? "non publié" : `${i.fields.length} textes` })
|
|
923
1133
|
]
|
|
924
1134
|
},
|
|
925
|
-
|
|
1135
|
+
i.blockType
|
|
926
1136
|
);
|
|
927
1137
|
})
|
|
928
1138
|
] })
|
|
929
1139
|
] }),
|
|
930
|
-
|
|
1140
|
+
r && W && /* @__PURE__ */ x(
|
|
931
1141
|
"div",
|
|
932
1142
|
{
|
|
933
1143
|
className: "panneau",
|
|
934
1144
|
role: "dialog",
|
|
935
|
-
"aria-label": "Modifier " +
|
|
1145
|
+
"aria-label": "Modifier " + W.label,
|
|
936
1146
|
children: [
|
|
937
|
-
/* @__PURE__ */
|
|
938
|
-
/* @__PURE__ */
|
|
939
|
-
/* @__PURE__ */
|
|
940
|
-
|
|
1147
|
+
/* @__PURE__ */ x("div", { className: "panneau__tete", children: [
|
|
1148
|
+
/* @__PURE__ */ x("div", { style: { flex: 1 }, children: [
|
|
1149
|
+
/* @__PURE__ */ t("h2", { className: "panneau__titre", children: W.label }),
|
|
1150
|
+
W.description && /* @__PURE__ */ t("p", { className: "panneau__sous", children: W.description })
|
|
941
1151
|
] }),
|
|
942
|
-
/* @__PURE__ */
|
|
1152
|
+
/* @__PURE__ */ t(
|
|
943
1153
|
"button",
|
|
944
1154
|
{
|
|
945
1155
|
type: "button",
|
|
@@ -950,38 +1160,38 @@ function Te({ api: o, pont: t }) {
|
|
|
950
1160
|
}
|
|
951
1161
|
)
|
|
952
1162
|
] }),
|
|
953
|
-
/* @__PURE__ */
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
1163
|
+
/* @__PURE__ */ x("div", { className: "panneau__corps", children: [
|
|
1164
|
+
g && /* @__PURE__ */ t("p", { className: "message message--" + g.ton, children: g.texte }),
|
|
1165
|
+
W.fields.map((i) => /* @__PURE__ */ t(
|
|
1166
|
+
me,
|
|
957
1167
|
{
|
|
958
|
-
champ:
|
|
959
|
-
langue:
|
|
960
|
-
valeur:
|
|
961
|
-
changer: (f) =>
|
|
1168
|
+
champ: i,
|
|
1169
|
+
langue: e.langue,
|
|
1170
|
+
valeur: A[i.key],
|
|
1171
|
+
changer: (f) => ye(i.key, f)
|
|
962
1172
|
},
|
|
963
|
-
|
|
1173
|
+
i.key
|
|
964
1174
|
))
|
|
965
1175
|
] }),
|
|
966
|
-
/* @__PURE__ */
|
|
967
|
-
/* @__PURE__ */
|
|
1176
|
+
/* @__PURE__ */ x("div", { className: "panneau__pied", children: [
|
|
1177
|
+
/* @__PURE__ */ t(
|
|
968
1178
|
"button",
|
|
969
1179
|
{
|
|
970
1180
|
type: "button",
|
|
971
1181
|
className: "bouton bouton--discret",
|
|
972
1182
|
onClick: () => u(null),
|
|
973
|
-
disabled:
|
|
1183
|
+
disabled: D,
|
|
974
1184
|
children: "Fermer"
|
|
975
1185
|
}
|
|
976
1186
|
),
|
|
977
|
-
/* @__PURE__ */
|
|
978
|
-
/* @__PURE__ */
|
|
1187
|
+
/* @__PURE__ */ t("span", { className: "espace" }),
|
|
1188
|
+
/* @__PURE__ */ t(
|
|
979
1189
|
"button",
|
|
980
1190
|
{
|
|
981
1191
|
type: "button",
|
|
982
1192
|
className: "bouton bouton--principal",
|
|
983
|
-
onClick:
|
|
984
|
-
disabled:
|
|
1193
|
+
onClick: Ae,
|
|
1194
|
+
disabled: D,
|
|
985
1195
|
children: "Enregistrer"
|
|
986
1196
|
}
|
|
987
1197
|
)
|
|
@@ -991,7 +1201,7 @@ function Te({ api: o, pont: t }) {
|
|
|
991
1201
|
)
|
|
992
1202
|
] });
|
|
993
1203
|
}
|
|
994
|
-
const
|
|
1204
|
+
const Re = `
|
|
995
1205
|
:host {
|
|
996
1206
|
all: initial;
|
|
997
1207
|
--fond: #16181d;
|
|
@@ -1113,69 +1323,98 @@ const Oe = `
|
|
|
1113
1323
|
|
|
1114
1324
|
/* --------------------------------------------------- CONNEXION ---------- */
|
|
1115
1325
|
|
|
1116
|
-
/*
|
|
1117
|
-
|
|
1118
|
-
|
|
1326
|
+
/* LA CONNEXION EST CLAIRE, AUX COULEURS DE LYSTECH. L'éditeur reste un outil
|
|
1327
|
+
sombre qui s'efface derrière le travail ; la connexion, elle, est l'instant
|
|
1328
|
+
où quelqu'un décide de faire confiance. Il doit y reconnaître Lystech — la
|
|
1329
|
+
fleur, son pétrole et son turquoise, sur du blanc — et non une boîte noire
|
|
1330
|
+
posée sur son site.
|
|
1331
|
+
|
|
1332
|
+
Le thème se redéfinit ICI, sur le voile : les boutons, messages et champs
|
|
1333
|
+
partagés avec l'éditeur suivent ces variables sans une règle de plus, et
|
|
1334
|
+
l'éditeur garde les siennes. Clair quel que soit le thème du système :
|
|
1335
|
+
c'est un choix de marque. */
|
|
1119
1336
|
.voile {
|
|
1337
|
+
--fond: #ffffff;
|
|
1338
|
+
--fond-clair: #f4f7f8;
|
|
1339
|
+
--bord: #dfe6e9;
|
|
1340
|
+
--texte: #0b1f26;
|
|
1341
|
+
--texte-doux: #52666f;
|
|
1342
|
+
--petrole: #084050;
|
|
1343
|
+
--petrole-survol: #0b5468;
|
|
1344
|
+
--turquoise: #10b8b0;
|
|
1345
|
+
--focus: #0c8f89;
|
|
1346
|
+
|
|
1120
1347
|
position: fixed;
|
|
1121
1348
|
inset: 0;
|
|
1122
1349
|
display: flex;
|
|
1123
1350
|
align-items: center;
|
|
1124
1351
|
justify-content: center;
|
|
1125
1352
|
padding: 16px;
|
|
1126
|
-
|
|
1127
|
-
|
|
1353
|
+
/* Le voile PREND les clics, lui : une boîte de dialogue qui demande une
|
|
1354
|
+
identité ne doit pas laisser cliquer la page derrière elle. C'est
|
|
1355
|
+
l'exception à la règle du calque, et elle est volontaire. Teinté pétrole
|
|
1356
|
+
plutôt que noir : on assombrit le site sans l'éteindre. */
|
|
1357
|
+
background: rgba(8, 44, 56, 0.34);
|
|
1358
|
+
backdrop-filter: blur(4px) saturate(115%);
|
|
1359
|
+
color: var(--texte);
|
|
1128
1360
|
}
|
|
1129
1361
|
|
|
1130
1362
|
.fenetre {
|
|
1131
1363
|
position: relative;
|
|
1132
|
-
width: min(
|
|
1364
|
+
width: min(400px, 100%);
|
|
1133
1365
|
max-height: 92vh;
|
|
1134
1366
|
overflow-y: auto;
|
|
1135
|
-
padding: 30px
|
|
1136
|
-
border: 1px solid
|
|
1137
|
-
border-radius:
|
|
1138
|
-
/*
|
|
1139
|
-
degrade violet-bleu qu'on voit sur une page d'accueil sur deux. */
|
|
1367
|
+
padding: 34px 30px 26px;
|
|
1368
|
+
border: 1px solid rgba(8, 64, 80, 0.10);
|
|
1369
|
+
border-radius: 20px;
|
|
1370
|
+
/* La lueur turquoise de la fleur, à peine, en haut de la carte. */
|
|
1140
1371
|
background:
|
|
1141
|
-
radial-gradient(
|
|
1372
|
+
radial-gradient(90% 60% at 50% -12%, rgba(16, 184, 176, 0.13), transparent 70%),
|
|
1142
1373
|
var(--fond);
|
|
1143
|
-
box-shadow:
|
|
1374
|
+
box-shadow:
|
|
1375
|
+
0 1px 2px rgba(8, 64, 80, 0.06),
|
|
1376
|
+
0 28px 64px -18px rgba(8, 44, 56, 0.45);
|
|
1144
1377
|
text-align: center;
|
|
1145
1378
|
}
|
|
1146
1379
|
|
|
1147
1380
|
.fenetre__fermer {
|
|
1148
|
-
position: absolute; top:
|
|
1149
|
-
width:
|
|
1381
|
+
position: absolute; top: 14px; right: 14px;
|
|
1382
|
+
width: 32px; height: 32px;
|
|
1150
1383
|
display: inline-flex; align-items: center; justify-content: center;
|
|
1151
|
-
border: 0; border-radius:
|
|
1384
|
+
border: 0; border-radius: 9px;
|
|
1152
1385
|
background: transparent; color: var(--texte-doux);
|
|
1153
1386
|
font: inherit; font-size: 14px; cursor: pointer;
|
|
1154
1387
|
}
|
|
1155
1388
|
.fenetre__fermer:hover { background: var(--fond-clair); color: var(--texte); }
|
|
1389
|
+
.fenetre__fermer:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
|
|
1156
1390
|
|
|
1157
1391
|
/* ------------------------------------------------------------ MARQUE ---- */
|
|
1158
1392
|
|
|
1159
1393
|
.marque {
|
|
1160
|
-
display: inline-flex; align-items: center; gap: 8px;
|
|
1394
|
+
display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
|
|
1161
1395
|
margin-bottom: 18px;
|
|
1162
1396
|
}
|
|
1163
|
-
.marque img {
|
|
1397
|
+
.marque img {
|
|
1398
|
+
width: 44px; height: 44px; display: block;
|
|
1399
|
+
filter: drop-shadow(0 6px 14px rgba(16, 184, 176, 0.28));
|
|
1400
|
+
}
|
|
1164
1401
|
.marque__mot {
|
|
1165
|
-
font-size:
|
|
1166
|
-
letter-spacing: 0.
|
|
1167
|
-
color:
|
|
1402
|
+
font-size: 11.5px; font-weight: 700;
|
|
1403
|
+
letter-spacing: 0.24em; text-transform: uppercase;
|
|
1404
|
+
color: var(--petrole);
|
|
1168
1405
|
}
|
|
1169
1406
|
|
|
1170
1407
|
.fenetre__titre {
|
|
1171
|
-
margin: 0 0
|
|
1172
|
-
font-size:
|
|
1408
|
+
margin: 0 0 8px;
|
|
1409
|
+
font-size: 21px; font-weight: 700; letter-spacing: -0.015em;
|
|
1173
1410
|
color: var(--texte);
|
|
1411
|
+
text-wrap: balance;
|
|
1174
1412
|
}
|
|
1175
1413
|
.fenetre__sous {
|
|
1176
|
-
margin: 0 auto
|
|
1177
|
-
max-width:
|
|
1178
|
-
font-size:
|
|
1414
|
+
margin: 0 auto 24px;
|
|
1415
|
+
max-width: 36ch;
|
|
1416
|
+
font-size: 13.5px; line-height: 1.55; color: var(--texte-doux);
|
|
1417
|
+
text-wrap: balance;
|
|
1179
1418
|
}
|
|
1180
1419
|
.fenetre__corps { text-align: left; }
|
|
1181
1420
|
|
|
@@ -1185,27 +1424,46 @@ const Oe = `
|
|
|
1185
1424
|
|
|
1186
1425
|
.fournisseur {
|
|
1187
1426
|
display: flex; align-items: center; justify-content: center; gap: 10px;
|
|
1188
|
-
width: 100%; padding: 12px 16px;
|
|
1189
|
-
border: 1px solid transparent; border-radius:
|
|
1427
|
+
width: 100%; min-height: 46px; padding: 12px 16px;
|
|
1428
|
+
border: 1px solid transparent; border-radius: 12px;
|
|
1190
1429
|
font: inherit; font-size: 14px; font-weight: 600;
|
|
1191
1430
|
cursor: pointer;
|
|
1192
|
-
transition: transform 90ms ease,
|
|
1431
|
+
transition: transform 90ms ease, background-color 120ms ease, box-shadow 120ms ease;
|
|
1193
1432
|
}
|
|
1194
|
-
.fournisseur:hover { filter: brightness(1.06); }
|
|
1195
1433
|
.fournisseur:active { transform: translateY(1px); }
|
|
1196
|
-
.fournisseur:focus-visible { outline: 2px solid var(--
|
|
1197
|
-
.fournisseur[disabled] { opacity: 0.55; cursor: default; transform: none;
|
|
1434
|
+
.fournisseur:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
|
|
1435
|
+
.fournisseur[disabled] { opacity: 0.55; cursor: default; transform: none; }
|
|
1198
1436
|
.fournisseur .logo { width: 18px; height: 18px; flex: none; display: block; }
|
|
1199
1437
|
|
|
1200
1438
|
/* LES COULEURS DE CHAQUE MARQUE, telles qu'elles les publient. Un bouton
|
|
1201
1439
|
Google repeint aux couleurs du site devient moins reconnaissable — et un
|
|
1202
|
-
bouton de connexion qu'on ne
|
|
1203
|
-
|
|
1204
|
-
.fournisseur--google {
|
|
1440
|
+
bouton de connexion qu'on ne reconnaît pas est un bouton sur lequel on
|
|
1441
|
+
hésite à cliquer. */
|
|
1442
|
+
.fournisseur--google {
|
|
1443
|
+
background: #fff; color: #1f1f1f; border-color: #dadce0;
|
|
1444
|
+
box-shadow: 0 1px 2px rgba(8, 64, 80, 0.06);
|
|
1445
|
+
}
|
|
1446
|
+
.fournisseur--google:hover:not([disabled]) { background: #f6f9fa; border-color: #c9d3d8; }
|
|
1205
1447
|
.fournisseur--facebook { background: #1877f2; color: #fff; }
|
|
1448
|
+
.fournisseur--facebook:hover:not([disabled]) { background: #166fe5; }
|
|
1206
1449
|
|
|
1207
1450
|
.bouton--large { width: 100%; padding: 12px 16px; font-size: 14px; }
|
|
1208
1451
|
|
|
1452
|
+
/* Les boutons et messages PARTAGÉS avec l'éditeur, en version claire. */
|
|
1453
|
+
.voile .bouton {
|
|
1454
|
+
min-height: 44px; border-radius: 12px;
|
|
1455
|
+
background: #fff; color: var(--texte); border-color: #cfd9dd;
|
|
1456
|
+
}
|
|
1457
|
+
.voile .bouton:hover { background: var(--fond-clair); }
|
|
1458
|
+
.voile .bouton:focus-visible { outline-color: var(--focus); }
|
|
1459
|
+
.voile .bouton--principal { background: var(--petrole); border-color: var(--petrole); color: #fff; }
|
|
1460
|
+
.voile .bouton--principal:hover { background: var(--petrole-survol); }
|
|
1461
|
+
|
|
1462
|
+
.voile .message { font-size: 13px; line-height: 1.5; border-radius: 10px; }
|
|
1463
|
+
.voile .message--erreur { background: #fdf0ee; border-color: #f4c7bf; color: #a3321f; }
|
|
1464
|
+
.voile .message--ok { background: #e8f7f5; border-color: #a9e2dc; color: #0a5c57; }
|
|
1465
|
+
.voile .message--info { background: var(--fond-clair); border-color: var(--bord); color: #3a5159; }
|
|
1466
|
+
|
|
1209
1467
|
@media (prefers-reduced-motion: reduce) {
|
|
1210
1468
|
.fournisseur { transition: none; }
|
|
1211
1469
|
}
|
|
@@ -1293,7 +1551,45 @@ input:focus, select:focus, textarea:focus {
|
|
|
1293
1551
|
@media (prefers-reduced-motion: reduce) {
|
|
1294
1552
|
* { transition: none !important; animation: none !important; }
|
|
1295
1553
|
}
|
|
1296
|
-
`,
|
|
1554
|
+
`, Fe = `
|
|
1555
|
+
/* --------------------------------------------------------- SAISIE ------- */
|
|
1556
|
+
|
|
1557
|
+
/* Une valeur marquée par le site (un prix, un numéro) se corrige dans une
|
|
1558
|
+
saisie posée EXACTEMENT dessus, dans la police de la page : on écrit là où
|
|
1559
|
+
on lisait. Le libellé au-dessus dit quel champ on touche — « Séance
|
|
1560
|
+
d'acupuncture », pas « seance ». */
|
|
1561
|
+
.saisie {
|
|
1562
|
+
position: fixed;
|
|
1563
|
+
display: flex;
|
|
1564
|
+
flex-direction: column;
|
|
1565
|
+
align-items: flex-start;
|
|
1566
|
+
gap: 4px;
|
|
1567
|
+
}
|
|
1568
|
+
.saisie__libelle,
|
|
1569
|
+
.saisie__aide,
|
|
1570
|
+
.saisie__erreur {
|
|
1571
|
+
padding: 3px 8px;
|
|
1572
|
+
border-radius: 6px;
|
|
1573
|
+
font: 600 11px/1.35 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
1574
|
+
white-space: nowrap;
|
|
1575
|
+
}
|
|
1576
|
+
.saisie__libelle { background: var(--fond); color: var(--texte); }
|
|
1577
|
+
.saisie__aide { background: rgba(22, 24, 29, 0.82); color: var(--texte-doux); font-weight: 500; }
|
|
1578
|
+
.saisie__erreur { background: #b3261e; color: #fff; }
|
|
1579
|
+
.saisie__champ {
|
|
1580
|
+
min-width: 0;
|
|
1581
|
+
padding: 2px 8px;
|
|
1582
|
+
border: 2px solid var(--accent);
|
|
1583
|
+
border-radius: 6px;
|
|
1584
|
+
background: #fff;
|
|
1585
|
+
color: #111;
|
|
1586
|
+
line-height: 1.2;
|
|
1587
|
+
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
|
|
1588
|
+
outline: none;
|
|
1589
|
+
}
|
|
1590
|
+
.saisie__champ:focus { box-shadow: 0 0 0 3px rgba(59, 165, 141, 0.35), 0 10px 28px rgba(0, 0, 0, 0.28); }
|
|
1591
|
+
.saisie__champ:disabled { opacity: 0.7; }
|
|
1592
|
+
|
|
1297
1593
|
/* --------------------------------------------------------- CHOIX -------- */
|
|
1298
1594
|
|
|
1299
1595
|
/* Quand un meme texte vient de plusieurs cles, on demande laquelle plutot que
|
|
@@ -1343,7 +1639,7 @@ input:focus, select:focus, textarea:focus {
|
|
|
1343
1639
|
max-width: min(460px, calc(100vw - 24px));
|
|
1344
1640
|
}
|
|
1345
1641
|
.flottant .message { margin: 0; box-shadow: 0 8px 26px rgba(0,0,0,.4); }
|
|
1346
|
-
`,
|
|
1642
|
+
`, Ve = `
|
|
1347
1643
|
/* ON NE DOIT JAMAIS SE DEMANDER SI ON EST EN MODE EDITION. Une barre en bas
|
|
1348
1644
|
se confond avec un bandeau de temoins ; un lisere qui borde tout l'ecran,
|
|
1349
1645
|
present sur chaque page, ne se confond avec rien. Il ne prend aucun clic. */
|
|
@@ -1371,72 +1667,72 @@ input:focus, select:focus, textarea:focus {
|
|
|
1371
1667
|
discrete le reste du temps — c'est le geste qu'on fait une fois. */
|
|
1372
1668
|
.bouton--sortie { color: var(--texte-doux); background: transparent; border-color: transparent; }
|
|
1373
1669
|
.bouton--sortie:hover { background: rgba(217, 119, 106, 0.16); color: var(--danger); }
|
|
1374
|
-
`,
|
|
1375
|
-
function
|
|
1376
|
-
document.getElementById(
|
|
1377
|
-
const
|
|
1378
|
-
|
|
1379
|
-
const
|
|
1380
|
-
|
|
1381
|
-
const
|
|
1382
|
-
return
|
|
1383
|
-
}
|
|
1384
|
-
function
|
|
1385
|
-
let
|
|
1670
|
+
`, Xe = "lystech-editeur-hote", Ye = "lystech-connexion-hote";
|
|
1671
|
+
function ge(n) {
|
|
1672
|
+
document.getElementById(n)?.remove();
|
|
1673
|
+
const e = document.createElement("div");
|
|
1674
|
+
e.id = n, e.style.position = "relative", e.style.zIndex = "2147483000", document.body.appendChild(e);
|
|
1675
|
+
const o = e.attachShadow({ mode: "open" }), s = document.createElement("style");
|
|
1676
|
+
s.textContent = Re + Fe + Ve, o.appendChild(s);
|
|
1677
|
+
const a = document.createElement("div");
|
|
1678
|
+
return o.appendChild(a), { hote: e, point: a };
|
|
1679
|
+
}
|
|
1680
|
+
function he(n, e) {
|
|
1681
|
+
let o = n;
|
|
1386
1682
|
return () => {
|
|
1387
|
-
const
|
|
1388
|
-
|
|
1389
|
-
|
|
1683
|
+
const s = o;
|
|
1684
|
+
o = null, setTimeout(() => {
|
|
1685
|
+
s?.unmount(), e.remove();
|
|
1390
1686
|
}, 0);
|
|
1391
1687
|
};
|
|
1392
1688
|
}
|
|
1393
|
-
function
|
|
1394
|
-
site:
|
|
1395
|
-
apiBaseUrl:
|
|
1396
|
-
methodes:
|
|
1397
|
-
surJeton:
|
|
1689
|
+
function Je({
|
|
1690
|
+
site: n,
|
|
1691
|
+
apiBaseUrl: e,
|
|
1692
|
+
methodes: o,
|
|
1693
|
+
surJeton: s
|
|
1398
1694
|
}) {
|
|
1399
|
-
const { hote:
|
|
1695
|
+
const { hote: a, point: c } = ge(Ye), l = de(c), y = () => r();
|
|
1400
1696
|
l.render(
|
|
1401
|
-
/* @__PURE__ */
|
|
1402
|
-
|
|
1697
|
+
/* @__PURE__ */ t(
|
|
1698
|
+
Te,
|
|
1403
1699
|
{
|
|
1404
|
-
site:
|
|
1405
|
-
apiBaseUrl:
|
|
1406
|
-
...
|
|
1700
|
+
site: n,
|
|
1701
|
+
apiBaseUrl: e,
|
|
1702
|
+
...o ? { methodes: o } : {},
|
|
1407
1703
|
surJeton: (u) => {
|
|
1408
|
-
|
|
1704
|
+
r(), s(u);
|
|
1409
1705
|
},
|
|
1410
|
-
surFermer:
|
|
1706
|
+
surFermer: y
|
|
1411
1707
|
}
|
|
1412
1708
|
)
|
|
1413
1709
|
);
|
|
1414
|
-
const
|
|
1415
|
-
return
|
|
1416
|
-
}
|
|
1417
|
-
function
|
|
1418
|
-
jeton:
|
|
1419
|
-
site:
|
|
1420
|
-
apiBaseUrl:
|
|
1421
|
-
pont:
|
|
1710
|
+
const r = he(l, a);
|
|
1711
|
+
return r;
|
|
1712
|
+
}
|
|
1713
|
+
function Ke({
|
|
1714
|
+
jeton: n,
|
|
1715
|
+
site: e,
|
|
1716
|
+
apiBaseUrl: o,
|
|
1717
|
+
pont: s
|
|
1422
1718
|
}) {
|
|
1423
|
-
const { hote:
|
|
1719
|
+
const { hote: a, point: c } = ge(Xe), l = de(c);
|
|
1424
1720
|
return l.render(
|
|
1425
|
-
/* @__PURE__ */
|
|
1426
|
-
|
|
1721
|
+
/* @__PURE__ */ t(
|
|
1722
|
+
Qe,
|
|
1427
1723
|
{
|
|
1428
|
-
api:
|
|
1429
|
-
jeton:
|
|
1430
|
-
site:
|
|
1431
|
-
apiBaseUrl:
|
|
1432
|
-
surJetonRefuse:
|
|
1724
|
+
api: Ce({
|
|
1725
|
+
jeton: n,
|
|
1726
|
+
site: e,
|
|
1727
|
+
apiBaseUrl: o,
|
|
1728
|
+
surJetonRefuse: fe
|
|
1433
1729
|
}),
|
|
1434
|
-
pont:
|
|
1730
|
+
pont: s
|
|
1435
1731
|
}
|
|
1436
1732
|
)
|
|
1437
|
-
),
|
|
1733
|
+
), he(l, a);
|
|
1438
1734
|
}
|
|
1439
1735
|
export {
|
|
1440
|
-
|
|
1441
|
-
|
|
1736
|
+
Je as monterConnexion,
|
|
1737
|
+
Ke as monterEditeur
|
|
1442
1738
|
};
|