ublo-lib 1.36.0 → 1.36.2
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.
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
div.popup {
|
|
2
|
+
z-index: 5;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.datePicker {
|
|
6
|
+
position: relative;
|
|
7
|
+
width: min-content;
|
|
8
|
+
max-width: 100%;
|
|
9
|
+
display: grid;
|
|
10
|
+
grid-template-columns: repeat(3, 1fr);
|
|
11
|
+
background-color: var(--ds-grey-000, #fff);
|
|
12
|
+
border-radius: inherit;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.datePickerPopup {
|
|
16
|
+
position: fixed;
|
|
17
|
+
top: 50%;
|
|
18
|
+
left: 50%;
|
|
19
|
+
transform: translate(-50%, -50%);
|
|
20
|
+
z-index: 4;
|
|
21
|
+
border-radius: var(--ds-radius-400, 20px);
|
|
22
|
+
box-shadow: var(--ds-shadow-300, 0 8px 30px rgba(0, 0, 0, 0.12));
|
|
23
|
+
animation: date-picker-appearance 160ms
|
|
24
|
+
var(--ds-transition-easing, cubic-bezier(0.4, 0, 0.2, 1));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.backdrop {
|
|
28
|
+
position: fixed;
|
|
29
|
+
top: 0;
|
|
30
|
+
left: 0;
|
|
31
|
+
width: 100%;
|
|
32
|
+
height: 100%;
|
|
33
|
+
background-color: rgba(255, 255, 255, 0.4);
|
|
34
|
+
backdrop-filter: blur(var(--ds-blur, 8px));
|
|
35
|
+
z-index: 3;
|
|
36
|
+
animation: date-picker-appearance 160ms
|
|
37
|
+
var(--ds-transition-easing, cubic-bezier(0.4, 0, 0.2, 1));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@keyframes date-picker-appearance {
|
|
41
|
+
0% {
|
|
42
|
+
opacity: 0;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-msem-presets.d.ts","sourceRoot":"","sources":["../../../../../src/common/components/msem-preset-linker/hooks/use-msem-presets.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE;;;CAAA,
|
|
1
|
+
{"version":3,"file":"use-msem-presets.d.ts","sourceRoot":"","sources":["../../../../../src/common/components/msem-preset-linker/hooks/use-msem-presets.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE;;;CAAA,QA0C9D"}
|
|
@@ -5,6 +5,7 @@ import * as UrlParams from "../services/url-params";
|
|
|
5
5
|
import * as MseM from "../../../utils/msem-widget";
|
|
6
6
|
export default function useMsemPresets({ mode, defaultOptions }) {
|
|
7
7
|
const { lang, cmsMode, path } = useUbloContext();
|
|
8
|
+
const widgetLang = lang === "fr" ? "fr" : "en";
|
|
8
9
|
const isEnabled = cmsMode !== "editing" && cmsMode !== "info" && mode !== MODES.EDITING;
|
|
9
10
|
const handleSectionClick = React.useCallback((e) => {
|
|
10
11
|
const target = e.target;
|
|
@@ -13,7 +14,7 @@ export default function useMsemPresets({ mode, defaultOptions }) {
|
|
|
13
14
|
if (!preset)
|
|
14
15
|
return;
|
|
15
16
|
const { widget, options = {}, presets, url } = JSON.parse(preset);
|
|
16
|
-
const allOptions = { ...defaultOptions, ...options };
|
|
17
|
+
const allOptions = { ...defaultOptions, ...options, lang: widgetLang };
|
|
17
18
|
e.preventDefault();
|
|
18
19
|
e.stopPropagation();
|
|
19
20
|
if (url) {
|
|
@@ -23,7 +24,7 @@ export default function useMsemPresets({ mode, defaultOptions }) {
|
|
|
23
24
|
return;
|
|
24
25
|
}
|
|
25
26
|
MseM.loadWidget(widget, allOptions, presets);
|
|
26
|
-
}, [defaultOptions]);
|
|
27
|
+
}, [defaultOptions, widgetLang]);
|
|
27
28
|
React.useEffect(() => {
|
|
28
29
|
const container = document.getElementById("__next");
|
|
29
30
|
if (isEnabled && container) {
|