ublo-lib 1.39.16 → 1.39.18

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.
@@ -1,9 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
- import Button from "dt-design-system/es/button";
4
3
  import { useUbloContext } from "ublo/with-ublo";
5
4
  import Message, { message } from "./message";
6
- import { useContext } from "./context";
7
5
  import styles from "./connexion.module.css";
8
6
  export default function Connexion({ logo }) {
9
7
  const { lang } = useUbloContext();
@@ -11,15 +9,3 @@ export default function Connexion({ logo }) {
11
9
  __html: message(lang, "partner-space-login-message"),
12
10
  } })] })] }));
13
11
  }
14
- function setCookie(name, value, days) {
15
- let expires = "";
16
- if (days) {
17
- const date = new Date();
18
- date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
19
- expires = "; expires=" + date.toUTCString();
20
- }
21
- document.cookie = name + "=" + (value || "") + expires + "; path=/";
22
- }
23
- function eraseCookie(name) {
24
- document.cookie = name + "=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
25
- }
@@ -1 +1 @@
1
- {"version":3,"file":"tunnel.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/espace-prive/tunnel.js"],"names":[],"mappings":"AASA,0EAoCC"}
1
+ {"version":3,"file":"tunnel.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/espace-prive/tunnel.js"],"names":[],"mappings":"AAUA,0EAkCC"}
@@ -1,7 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
- import * as MseM from "ublo-lib/es/future/components/msem";
3
+ import * as MseM from "../../../future/components/msem";
4
4
  import { useUbloContext } from "ublo/with-ublo";
5
+ import Information from "dt-design-system/es/information";
5
6
  import Loader from "dt-design-system/es/loader";
6
7
  import Message from "./message";
7
8
  import ClientLinks from "./admin/client-links";
@@ -12,7 +13,7 @@ export default function Tunnel() {
12
13
  const { intermediary, error, partnerID } = useContext();
13
14
  const showLoader = !intermediary && !error;
14
15
  const showError = error && !intermediary;
15
- return (_jsxs("div", { children: [showLoader && _jsx(Loader, {}), showError && (_jsx("div", { style: { textAlign: "center", color: "var(--ds-red-300, #f26464)" }, children: _jsx(Message, { id: "intermediary-error" }) })), !showLoader && !showError && (_jsx(MseM.Esf, { options: {
16
+ return (_jsxs("div", { children: [showLoader && _jsx(Loader, {}), showError && (_jsx(Information, { type: "error", children: _jsx(Message, { id: "intermediary-error" }) })), !showLoader && !showError && (_jsx(MseM.Esf, { options: {
16
17
  lang,
17
18
  channel: "ESF",
18
19
  resort,
@@ -1 +1 @@
1
- {"version":3,"file":"ski-passes.d.ts","sourceRoot":"","sources":["../../../../../src/future/components/msem-preset-editor/editors/ski-passes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,KAAK,KAAK,GAAG;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACnC,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;IAC5E,mBAAmB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACnE,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IACxD,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AA4DF,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,eAAe,EACf,MAAM,EACN,SAAS,EACT,IAAI,EACJ,mBAAmB,EACnB,QAAQ,EACR,UAAU,EACV,WAAW,GACZ,EAAE,KAAK,2CAqSP"}
1
+ {"version":3,"file":"ski-passes.d.ts","sourceRoot":"","sources":["../../../../../src/future/components/msem-preset-editor/editors/ski-passes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,KAAK,KAAK,GAAG;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACnC,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;IAC5E,mBAAmB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACnE,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IACxD,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AA4DF,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,eAAe,EACf,MAAM,EACN,SAAS,EACT,IAAI,EACJ,mBAAmB,EACnB,QAAQ,EACR,UAAU,EACV,WAAW,GACZ,EAAE,KAAK,2CAsSP"}
@@ -116,7 +116,7 @@ export default function SkiPasses({ msemServicesUrl, preset, setPreset, stay, se
116
116
  updateField("domains")(value);
117
117
  };
118
118
  const updateSkiers = (code) => (value) => {
119
- const filteredSkiers = data.skiers.filter((skier) => Number(skier) !== Number(code));
119
+ const filteredSkiers = data.skiers.filter((skier) => skier !== code);
120
120
  const newSkiers = !value ? [] : new Array(Number(value)).fill(code);
121
121
  setData({ ...data, skiers: [...filteredSkiers, ...newSkiers] });
122
122
  };
@@ -187,7 +187,7 @@ export default function SkiPasses({ msemServicesUrl, preset, setPreset, stay, se
187
187
  const title = `${label} (de ${ageMin} à ${ageMax} ans)`;
188
188
  const value = data.skiers?.filter((skier) => skier === code)
189
189
  ?.length || 0;
190
- return (_jsx(NumberPicker, { label: title, min: 0, max: 20, value: value, disabled: false, onChange: updateSkiers(Number(code)), withInput: true }, code));
190
+ return (_jsx(NumberPicker, { label: title, min: 0, max: 20, value: value, disabled: false, onChange: updateSkiers(code), withInput: true }, code));
191
191
  })] })), _jsx("div", { className: css.label, children: "Filtres" }), (activities?.length > 0 || loading) && (_jsx(MutlipleSelect, { label: "Activit\u00E9s", placeholder: "Selectionnez une ou plusieurs options", options: activities, values: selectedActivities, onChange: updateField("activities"), loading: loading })), _jsxs("div", { className: css.row, children: [((filteredDomains && filteredDomains.length > 0) || loading) && (_jsx(MutlipleSelect, { label: "Domaines", placeholder: "Selectionnez une ou plusieurs options", options: filteredDomains || [], values: selectedDomains, onChange: updateDomains, loading: loading })), ((filteredDurations && filteredDurations?.length > 0) ||
192
192
  loading) && (_jsx(MutlipleSelect, { label: "Dur\u00E9es", placeholder: "Selectionnez une ou plusieurs options", options: filteredDurations || [], values: selectedDurations, onChange: updateField("durations"), disabled: data.domains?.length === 0, loading: loading }))] })] }))] }));
193
193
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.39.16",
3
+ "version": "1.39.18",
4
4
  "peerDependencies": {
5
5
  "dt-design-system": "^3.10.8",
6
6
  "leaflet": "^1.9.1",