ublo-lib 1.20.9 → 1.20.11

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.
@@ -27,6 +27,7 @@ function ContactForm({
27
27
  channel = "ESF",
28
28
  merchant,
29
29
  categories,
30
+ facet = "WINTER",
30
31
  integration = false,
31
32
  uat = false,
32
33
  onSubmit
@@ -31,7 +31,8 @@ export default function Sheet({
31
31
  uri
32
32
  } = instructor;
33
33
  const {
34
- lang
34
+ lang,
35
+ path
35
36
  } = useUbloContext();
36
37
  const [loading, setLoading] = React.useState(true);
37
38
  const [picture, setPicture] = React.useState(photo);
@@ -49,6 +50,7 @@ export default function Sheet({
49
50
  const classes = classNames(css.container, {
50
51
  [css.containerPopup]: popup
51
52
  });
53
+ const key = `${lang}-${path}${prenom}-${nom}`;
52
54
  return _jsxs("div", {
53
55
  className: classes,
54
56
  children: [_jsxs("div", {
@@ -71,8 +73,8 @@ export default function Sheet({
71
73
  alt: `${prenom} ${nom}`,
72
74
  onLoad: stopLoading,
73
75
  onError: setFallbackPicture,
74
- width: "190",
75
- height: "250"
76
+ width: "200",
77
+ height: "280"
76
78
  }, uri)]
77
79
  }) : _jsx("div", {
78
80
  className: css.imagePlaceholder,
@@ -167,5 +169,5 @@ export default function Sheet({
167
169
  customSend: formSendFunction(prenom, nom)
168
170
  })]
169
171
  })]
170
- });
172
+ }, key);
171
173
  }
@@ -38,8 +38,8 @@
38
38
 
39
39
  .imageContainer {
40
40
  position: relative;
41
- width: 130px;
42
- height: 180px;
41
+ width: 200px;
42
+ height: 280px;
43
43
  display: flex;
44
44
  align-items: center;
45
45
  justify-content: center;
@@ -4,7 +4,7 @@ import Button from "dt-design-system/es/button";
4
4
  import * as Icons from "dt-design-system/es/icons";
5
5
  import { message } from "./messages";
6
6
  import { loadWigetMseM, preview } from "./services/widgets";
7
- import * as Plausible from "ublo-lib/es/common/components/plausible";
7
+ import * as Plausible from "../../../common/components/plausible";
8
8
  import css from "./booking.module.css";
9
9
  import { jsx as _jsx } from "react/jsx-runtime";
10
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -60,9 +60,7 @@ const Booking = ({
60
60
  cartUrl,
61
61
  fullWidth: true,
62
62
  groundedTo: "#msem-magic-box",
63
- analytics: Plausible.callback,
64
- show: ["vel"],
65
- categoryCode: values.categories
63
+ analytics: Plausible.callback
66
64
  };
67
65
  const presets = {
68
66
  kind: "CP",
@@ -1 +1 @@
1
- {"version":3,"file":"magic-box.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/magic-box/magic-box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,KAAK,IAAI,GAAG;IACV,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,KAAK,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;;AAIF,wBAAoC;AAEpC,iBAAS,QAAQ,CAAC,EAChB,IAAI,EACJ,OAAO,EACP,OAAe,EACf,SAAS,EACT,YAAY,EACZ,aAAa,EACb,OAAW,EACX,OAAkB,EAClB,iBAAiB,EACjB,UAAU,EACV,QAAQ,GACT,EAAE,KAAK,2CAkJP"}
1
+ {"version":3,"file":"magic-box.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/magic-box/magic-box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,KAAK,IAAI,GAAG;IACV,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,KAAK,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;;AAIF,wBAAoC;AAEpC,iBAAS,QAAQ,CAAC,EAChB,IAAI,EACJ,OAAO,EACP,OAAe,EACf,SAAS,EACT,YAAY,EACZ,aAAa,EACb,OAAW,EACX,OAAkB,EAClB,iBAAiB,EACjB,UAAU,EACV,QAAQ,GACT,EAAE,KAAK,2CA0JP"}
@@ -82,8 +82,6 @@ function MagicBox({ stay, cartUrl, channel = "ESF", className, alignContent, max
82
82
  ? { ...newFilters, categories: formatedCategories }
83
83
  : newFilters;
84
84
  setFilters(allFilters);
85
- const defaultValues = getDefaultValues(allFilters);
86
- setValues(defaultValues);
87
85
  }
88
86
  }, [
89
87
  allowedActivities,
@@ -96,9 +94,17 @@ function MagicBox({ stay, cartUrl, channel = "ESF", className, alignContent, max
96
94
  resort,
97
95
  stay,
98
96
  ]);
97
+ const initValues = React.useCallback(() => {
98
+ if (!values) {
99
+ const defaultValues = getDefaultValues(filters);
100
+ setValues(defaultValues);
101
+ }
102
+ }, [filters, values]);
103
+ React.useEffect(() => {
104
+ initValues();
105
+ }, [initValues]);
99
106
  React.useEffect(() => {
100
107
  refreshFilters();
101
- setCurrentStep(0);
102
108
  }, [refreshFilters, stay]);
103
109
  const showFilter = stay && filters && values;
104
110
  const classes = classNames(css.root, className);
@@ -62,6 +62,7 @@ const Day = ({
62
62
  });
63
63
  };
64
64
  const Days = React.forwardRef(({
65
+ lang,
65
66
  fullStay,
66
67
  interval,
67
68
  onChange
@@ -98,6 +99,7 @@ const Days = React.forwardRef(({
98
99
  className: css.days,
99
100
  children: interval.map((day, i) => _jsx(Day, {
100
101
  index: i,
102
+ lang: lang,
101
103
  day: day,
102
104
  fullStay: fullStay,
103
105
  firstSelected: firstSelected,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.20.9",
3
+ "version": "1.20.11",
4
4
  "peerDependencies": {
5
5
  "dt-design-system": "^3.1.5",
6
6
  "leaflet": "^1.9.1",