ublo-lib 1.38.43 → 1.38.44

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.
@@ -31,9 +31,6 @@
31
31
  gap: 8px;
32
32
  }
33
33
 
34
- .action {
35
- }
36
-
37
34
  .products {
38
35
  --ds-loader-spinner-size: 17px;
39
36
  --ds-loader-thickness: 2px;
@@ -47,6 +44,10 @@
47
44
  margin-right: auto;
48
45
  }
49
46
 
47
+ .loader {
48
+ flex: 0 0 auto;
49
+ }
50
+
50
51
  .popover {
51
52
  padding: 0;
52
53
  }
@@ -1,33 +1,15 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import Button from "dt-design-system/es/button";
4
- import Input from "dt-design-system/es/input";
5
4
  import { useUbloContext } from "ublo/with-ublo";
6
5
  import Message, { message } from "./message";
7
6
  import { useContext } from "./context";
8
7
  import styles from "./connexion.module.css";
9
8
  export default function Connexion({ logo }) {
10
9
  const { lang } = useUbloContext();
11
- const { partnerID } = useContext();
12
- const [error, setError] = React.useState("");
13
- const submitForm = async (e) => {
14
- e.preventDefault();
15
- const password = e.target[0].value;
16
- setCookie("password", password, 365);
17
- setError(undefined);
18
- window.location.href = `/espace-prive/${partnerID}/tunnel`;
19
- };
20
- React.useEffect(() => {
21
- const { searchParams } = new URL(window.location.href);
22
- const error = searchParams.get("error") === "1";
23
- if (error) {
24
- setError(message(lang, "partner-space-login-error"));
25
- eraseCookie("password");
26
- }
27
- }, [lang]);
28
10
  return (_jsxs("main", { className: styles.main, children: [_jsx("header", { className: styles.header, children: _jsx("div", { className: styles.logo, children: logo }) }), _jsxs("div", { className: styles.login, children: [_jsx("div", { className: styles.loginTitle, children: _jsx(Message, { id: "partner-space-login-title" }) }), _jsx("div", { className: styles.loginMessage, dangerouslySetInnerHTML: {
29
11
  __html: message(lang, "partner-space-login-message"),
30
- } }), _jsxs("form", { className: styles.loginForm, onSubmit: submitForm, children: [_jsx(Input, { className: styles.loginInput, type: "password" }), _jsx(Button, { type: "submit", className: styles.loginFormButton, children: _jsx(Message, { id: "partner-space-login-button" }) }), error && _jsx("div", { className: styles.loginFormError, children: error })] })] })] }));
12
+ } })] })] }));
31
13
  }
32
14
  function setCookie(name, value, days) {
33
15
  let expires = "";
@@ -1,8 +1,8 @@
1
1
  import { useUbloContext } from "ublo/with-ublo";
2
2
  const messages = {
3
3
  fr: {
4
- "partner-space-login-title": "Espace partenaire",
5
- "partner-space-login-message": "Connectez-vous avec le mot de passe qui vous a été fourni pour accéder aux informations de l'espace partenaire. Vous n'avez pas le mot de passe ? <a href='/contact'>Contactez-nous</a>.",
4
+ "partner-space-login-title": "Espace privé",
5
+ "partner-space-login-message": 'Votre offre partenaire a déjà été utilisée. En cas de besoin, merci de <a href="/contact">contacter votre esf</a>.',
6
6
  "partner-space-login-button": "Je me connecte",
7
7
  "partner-space-login-error": "Mot de passe incorrect",
8
8
  "go-to-cart": "Aller au panier",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.38.43",
3
+ "version": "1.38.44",
4
4
  "peerDependencies": {
5
5
  "dt-design-system": "^3.10.8",
6
6
  "leaflet": "^1.9.1",