ublo-lib 1.47.8 → 1.47.9-1.rc0
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/es/common/components/admin-links/admin-links.d.ts +7 -1
- package/es/common/components/admin-links/admin-links.d.ts.map +1 -1
- package/es/common/components/admin-links/admin-links.js +14 -8
- package/es/common/components/cart-dialog/cart-dialog-inner.d.ts +2 -1
- package/es/common/components/cart-dialog/cart-dialog-inner.d.ts.map +1 -1
- package/es/common/components/cart-dialog/cart-dialog-inner.js +13 -2
- package/es/common/components/cart-dialog/cart-dialog.d.ts +2 -1
- package/es/common/components/cart-dialog/cart-dialog.d.ts.map +1 -1
- package/es/common/components/cart-dialog/cart-dialog.js +2 -2
- package/es/common/components/cart-dialog/default.d.ts +2 -1
- package/es/common/components/cart-dialog/default.d.ts.map +1 -1
- package/es/common/components/cart-dialog/default.js +2 -2
- package/es/common/components/cart-dialog/esf-custom.d.ts +2 -1
- package/es/common/components/cart-dialog/esf-custom.d.ts.map +1 -1
- package/es/common/components/cart-dialog/esf-custom.js +2 -2
- package/es/common/components/cart-dialog/esf.d.ts +2 -1
- package/es/common/components/cart-dialog/esf.d.ts.map +1 -1
- package/es/common/components/cart-dialog/esf.js +2 -2
- package/es/common/components/cart-dialog/lodging.d.ts +2 -1
- package/es/common/components/cart-dialog/lodging.d.ts.map +1 -1
- package/es/common/components/cart-dialog/lodging.js +2 -2
- package/es/common/components/cart-dialog/ski-passes.d.ts +2 -1
- package/es/common/components/cart-dialog/ski-passes.d.ts.map +1 -1
- package/es/common/components/cart-dialog/ski-passes.js +2 -2
- package/es/common/components/cart-dialog/ski-rental.d.ts +2 -1
- package/es/common/components/cart-dialog/ski-rental.d.ts.map +1 -1
- package/es/common/components/cart-dialog/ski-rental.js +2 -2
- package/es/common/components/cart-dialog/vakario.d.ts +2 -1
- package/es/common/components/cart-dialog/vakario.d.ts.map +1 -1
- package/es/common/components/cart-dialog/vakario.js +2 -2
- package/es/common/components/cart-preview/cart-pill.d.ts +3 -1
- package/es/common/components/cart-preview/cart-pill.d.ts.map +1 -1
- package/es/common/components/cart-preview/cart-pill.js +5 -3
- package/es/common/components/cart-preview/cart-preview.d.ts +4 -1
- package/es/common/components/cart-preview/cart-preview.d.ts.map +1 -1
- package/es/common/components/cart-preview/cart-preview.js +19 -6
- package/es/common/components/cart-preview/utils.d.ts.map +1 -1
- package/es/common/components/cart-preview/utils.js +8 -1
- package/es/common/components/cookie-consent/cookie-consent.d.ts.map +1 -1
- package/es/common/components/cookie-consent/cookie-consent.js +10 -1
- package/es/common/components/cross-selling-editor/services/utils.d.ts.map +1 -1
- package/es/common/components/cross-selling-editor/services/utils.js +6 -5
- package/es/common/components/custom-contact-form/attachment.js +2 -2
- package/es/common/components/custom-contact-form/custom-contact-form.js +8 -3
- package/es/common/components/date-picker/calendar.d.ts +2 -1
- package/es/common/components/date-picker/calendar.d.ts.map +1 -1
- package/es/common/components/date-picker/calendar.js +2 -4
- package/es/common/components/date-picker/context-lang.d.ts +6 -0
- package/es/common/components/date-picker/context-lang.d.ts.map +1 -0
- package/es/common/components/date-picker/context-lang.js +9 -0
- package/es/common/components/date-picker/date-item.d.ts +2 -1
- package/es/common/components/date-picker/date-item.d.ts.map +1 -1
- package/es/common/components/date-picker/date-item.js +1 -3
- package/es/common/components/date-picker/date-item.module.css +1 -1
- package/es/common/components/date-picker/date-picker.d.ts +2 -1
- package/es/common/components/date-picker/date-picker.d.ts.map +1 -1
- package/es/common/components/date-picker/date-picker.js +6 -3
- package/es/common/components/date-picker/month.d.ts +2 -1
- package/es/common/components/date-picker/month.d.ts.map +1 -1
- package/es/common/components/date-picker/month.js +2 -4
- package/es/common/components/gesco-contact-form/services/messages.js +1 -1
- package/es/common/components/infinite-carousel/index.d.ts +3 -0
- package/es/common/components/infinite-carousel/index.d.ts.map +1 -0
- package/es/common/components/infinite-carousel/index.js +2 -0
- package/es/common/components/infinite-carousel/infinite-carousel.d.ts +20 -0
- package/es/common/components/infinite-carousel/infinite-carousel.d.ts.map +1 -0
- package/es/common/components/infinite-carousel/infinite-carousel.js +196 -0
- package/es/common/components/infinite-carousel/infinite-carousel.module.css +175 -0
- package/es/common/components/information/i18n.json +6 -0
- package/es/common/components/information/information.d.ts.map +1 -1
- package/es/common/components/information/information.js +4 -2
- package/es/common/components/information/information.module.css +1 -2
- package/es/common/components/information/use-season-choice.d.ts +2 -0
- package/es/common/components/information/use-season-choice.d.ts.map +1 -0
- package/es/common/components/information/use-season-choice.js +47 -0
- package/es/common/components/search-bar/search-bar.d.ts +2 -1
- package/es/common/components/search-bar/search-bar.d.ts.map +1 -1
- package/es/common/components/search-bar/search-bar.js +19 -6
- package/es/common/components/season-switch/index.d.ts +6 -0
- package/es/common/components/season-switch/index.d.ts.map +1 -0
- package/es/common/components/season-switch/index.js +42 -0
- package/es/common/components/season-switch/index.module.css +24 -0
- package/es/common/components/season-switch/use-choose-winter.d.ts +2 -0
- package/es/common/components/season-switch/use-choose-winter.d.ts.map +1 -0
- package/es/common/components/season-switch/use-choose-winter.js +47 -0
- package/es/common/components/week-selector/services/weeks.d.ts +1 -1
- package/es/common/components/week-selector/services/weeks.d.ts.map +1 -1
- package/es/common/components/week-selector/services/weeks.js +4 -2
- package/es/common/components/week-selector/week-selector.d.ts +1 -1
- package/es/common/components/week-selector/week-selector.d.ts.map +1 -1
- package/es/common/components/week-selector/week-selector.js +6 -2
- package/es/common/hooks/use-packages.js +1 -1
- package/es/esf/components/espace-prive/index.d.ts +2 -1
- package/es/esf/components/espace-prive/index.d.ts.map +1 -1
- package/es/esf/components/espace-prive/index.js +2 -2
- package/es/esf/components/espace-prive/partenaire.d.ts +2 -1
- package/es/esf/components/espace-prive/partenaire.d.ts.map +1 -1
- package/es/esf/components/espace-prive/partenaire.js +2 -2
- package/es/esf/components/espace-prive/tunnel.d.ts +3 -1
- package/es/esf/components/espace-prive/tunnel.d.ts.map +1 -1
- package/es/esf/components/espace-prive/tunnel.js +2 -2
- package/es/esf/components/instant-search/hooks/use-search.d.ts.map +1 -1
- package/es/esf/components/instant-search/hooks/use-search.js +8 -1
- package/es/esf/components/instant-search/instant-search.d.ts.map +1 -1
- package/es/esf/components/instant-search/instant-search.js +16 -1
- package/es/esf/components/instant-search/links.d.ts +1 -1
- package/es/esf/components/instant-search/links.d.ts.map +1 -1
- package/es/esf/components/instant-search/links.js +1 -1
- package/es/esf/components/instant-search/products.d.ts +1 -1
- package/es/esf/components/instant-search/products.d.ts.map +1 -1
- package/es/esf/components/instant-search/products.js +1 -1
- package/es/esf/components/instant-search/results.d.ts +1 -1
- package/es/esf/components/instant-search/results.d.ts.map +1 -1
- package/es/esf/components/instant-search/results.js +2 -2
- package/es/esf/components/instructors-book/sheet.d.ts.map +1 -1
- package/es/esf/components/instructors-book/sheet.js +16 -1
- package/es/esf/components/levels/levels.d.ts +3 -1
- package/es/esf/components/levels/levels.d.ts.map +1 -1
- package/es/esf/components/levels/levels.js +24 -3
- package/es/esf/components/magic-box/booking.d.ts +3 -1
- package/es/esf/components/magic-box/booking.d.ts.map +1 -1
- package/es/esf/components/magic-box/booking.js +12 -3
- package/es/esf/components/magic-box/filter.d.ts.map +1 -1
- package/es/esf/components/magic-box/filter.js +8 -8
- package/es/esf/components/magic-box/magic-box.d.ts +2 -1
- package/es/esf/components/magic-box/magic-box.d.ts.map +1 -1
- package/es/esf/components/magic-box/magic-box.js +7 -9
- package/es/esf/components/magic-box/services/api.d.ts.map +1 -1
- package/es/esf/components/magic-box/services/api.js +1 -0
- package/es/esf/components/period-picker/period-picker.d.ts.map +1 -1
- package/es/esf/components/period-picker/period-picker.js +1 -1
- package/es/esf/components/period-picker/weeks.module.css +8 -5
- package/es/esf/hooks/use-booking-links.d.ts.map +1 -1
- package/es/esf/hooks/use-booking-links.js +11 -7
- package/es/esf/hooks/use-gesco-referral.d.ts +2 -0
- package/es/esf/hooks/use-gesco-referral.d.ts.map +1 -0
- package/es/esf/hooks/use-gesco-referral.js +18 -0
- package/es/future/components/event-analytics/instant-search.d.ts +10 -0
- package/es/future/components/event-analytics/instant-search.d.ts.map +1 -0
- package/es/future/components/event-analytics/instant-search.js +41 -0
- package/es/future/components/msem/index.d.ts +2 -1
- package/es/future/components/msem/index.d.ts.map +1 -1
- package/es/future/components/msem/index.js +2 -1
- package/es/future/components/msem/tunnel-new.d.ts +32 -0
- package/es/future/components/msem/tunnel-new.d.ts.map +1 -0
- package/es/future/components/msem/tunnel-new.js +27 -0
- package/es/future/components/msem/tunnel.d.ts +1 -1
- package/es/future/components/msem/tunnel.d.ts.map +1 -1
- package/es/future/components/msem/tunnel.js +8 -0
- package/es/future/components/msem/types.d.ts +1 -0
- package/es/future/components/msem/types.d.ts.map +1 -1
- package/es/future/components/msem/utils.d.ts +1 -1
- package/es/future/components/msem/utils.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/components/widget-list-item.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/components/widget-list-item.js +1 -2
- package/es/future/components/msem-preset-editor/editors/lodgings.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/editors/lodgings.js +48 -48
- package/es/future/components/msem-preset-editor/editors/lodgings.module.css +24 -0
- package/es/future/components/msem-preset-editor/editors/ski-passes.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/editors/ski-passes.js +23 -24
- package/es/future/components/msem-preset-editor/editors/ski-rental.d.ts +1 -1
- package/es/future/components/msem-preset-editor/editors/ski-rental.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/editors/ski-rental.js +161 -17
- package/es/future/components/msem-preset-editor/msem-preset-editor.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/msem-preset-editor.js +3 -1
- package/es/future/components/msem-preset-editor/services/api.d.ts +2 -0
- package/es/future/components/msem-preset-editor/services/api.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/services/api.js +8 -0
- package/es/future/components/plausible/services/callback.d.ts +2 -1
- package/es/future/components/plausible/services/callback.d.ts.map +1 -1
- package/es/future/components/plausible/services/callback.js +102 -6
- package/es/lbm/components/instant-search/faqs.d.ts +1 -1
- package/es/lbm/components/instant-search/faqs.d.ts.map +1 -1
- package/es/lbm/components/instant-search/faqs.js +1 -1
- package/es/lbm/components/instant-search/google-results.d.ts +1 -1
- package/es/lbm/components/instant-search/google-results.d.ts.map +1 -1
- package/es/lbm/components/instant-search/links.d.ts +1 -1
- package/es/lbm/components/instant-search/links.d.ts.map +1 -1
- package/es/lbm/components/instant-search/links.js +1 -1
- package/es/lbm/components/instant-search/products.d.ts +1 -1
- package/es/lbm/components/instant-search/products.d.ts.map +1 -1
- package/es/lbm/components/instant-search/products.js +1 -1
- package/es/lbm/components/instant-search/results.d.ts +1 -1
- package/es/lbm/components/instant-search/results.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/access.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/access.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/activity.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/activity.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/components/card.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/components/card.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/components/card.js +1 -1
- package/es/lbm/components/instant-search/widgets/dawn-nights-openings.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/dawn-nights-openings.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/lift.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/lift.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/lifts.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/lifts.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/msem-widget.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/msem-widget.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/openings.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/openings.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/slope.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/slope.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/slopes.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/slopes.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/snow.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/snow.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/weather.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/weather.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets/webcam.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets/webcam.d.ts.map +1 -1
- package/es/lbm/components/instant-search/widgets.d.ts +1 -1
- package/es/lbm/components/instant-search/widgets.d.ts.map +1 -1
- package/es/lbm/components/lumiplan/pois.d.ts.map +1 -1
- package/es/lbm/components/lumiplan/pois.js +6 -2
- package/es/market-place/components/instant-search/google-results.d.ts +1 -1
- package/es/market-place/components/instant-search/google-results.d.ts.map +1 -1
- package/es/market-place/components/instant-search/links.d.ts +1 -1
- package/es/market-place/components/instant-search/links.d.ts.map +1 -1
- package/es/market-place/components/instant-search/links.js +1 -1
- package/es/market-place/components/instant-search/products.d.ts +1 -1
- package/es/market-place/components/instant-search/products.d.ts.map +1 -1
- package/es/market-place/components/instant-search/products.js +1 -1
- package/es/market-place/components/instant-search/results.d.ts +1 -1
- package/es/market-place/components/instant-search/results.d.ts.map +1 -1
- package/package.json +2 -2
- package/es/common/utils/file-manager.d.ts +0 -8
- package/es/common/utils/file-manager.d.ts.map +0 -1
- package/es/common/utils/file-manager.js +0 -12
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
.carousel {
|
|
2
|
+
/* Variables avec valeurs par défaut (fallback) */
|
|
3
|
+
position: relative;
|
|
4
|
+
display: flex;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
/* 2px viennent des pseudo-elements after des boutons de control */
|
|
7
|
+
width: calc(100vw - var(--scrollbar-size) - 2px);
|
|
8
|
+
max-width: var(--carousel-width, var(--content-width));
|
|
9
|
+
margin: 0 auto;
|
|
10
|
+
padding-top: var(--carousel-padding-top, 60px);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.carousel--wheel {
|
|
14
|
+
--carousel-height: var(
|
|
15
|
+
--carousel-wheel-height,
|
|
16
|
+
calc(var(--carousel-item-height, 300px) + 150px)
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.carousel--scale {
|
|
21
|
+
--carousel-height: var(
|
|
22
|
+
--carousel-scale-height,
|
|
23
|
+
calc(var(--carousel-item-height, 300px) + 100px)
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* ----- FALLBACK : Cas où il n'y a pas de logique de carousel ----- */
|
|
28
|
+
|
|
29
|
+
.inner {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: 10px;
|
|
33
|
+
max-width: var(--content-width);
|
|
34
|
+
overflow-x: auto;
|
|
35
|
+
}
|
|
36
|
+
/* ---------- */
|
|
37
|
+
|
|
38
|
+
.controls {
|
|
39
|
+
position: absolute;
|
|
40
|
+
top: var(--carousel-item-height, 300px);
|
|
41
|
+
left: 0;
|
|
42
|
+
width: 100%;
|
|
43
|
+
margin: 0 auto;
|
|
44
|
+
display: flex;
|
|
45
|
+
justify-content: space-between;
|
|
46
|
+
align-items: center;
|
|
47
|
+
pointer-events: none;
|
|
48
|
+
z-index: 2;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.carousel--wheel .controls {
|
|
52
|
+
/* boutons au milieu de l'item central (item height / 2 - paddingtop carousel) */
|
|
53
|
+
top: calc(
|
|
54
|
+
(var(--carousel-item-height, 300px) + var(--carousel-padding-top, 60px)) / 2
|
|
55
|
+
);
|
|
56
|
+
left: auto;
|
|
57
|
+
/* largeur de la taille de l'item + des boutons + petit écart */
|
|
58
|
+
width: calc(
|
|
59
|
+
var(--carousel-item-width, 400px) + (var(--carousel-button-width, 48px) * 2) +
|
|
60
|
+
20px
|
|
61
|
+
);
|
|
62
|
+
transform: none;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.control {
|
|
66
|
+
--ds-button-background: var(--carousel-button-background, hsl(0, 0%, 100%));
|
|
67
|
+
--ds-button-hover-background: var(
|
|
68
|
+
--carousel-button-hover-background,
|
|
69
|
+
hsl(0, 0%, 100%)
|
|
70
|
+
);
|
|
71
|
+
--ds-button-radius: var(--carousel-button-radius, 50%);
|
|
72
|
+
--ds-button-border: var(--carousel-button-border);
|
|
73
|
+
--ds-button-shadow: var(
|
|
74
|
+
--carousel-button-shadow,
|
|
75
|
+
0 2px 8px rgba(0, 0, 0, 0.15)
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
pointer-events: auto;
|
|
79
|
+
width: var(--carousel-button-width, 48px);
|
|
80
|
+
height: var(--carousel-button-width, 48px);
|
|
81
|
+
display: flex;
|
|
82
|
+
align-items: center;
|
|
83
|
+
justify-content: center;
|
|
84
|
+
transition: background-color 240ms var(--transition-easing);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.control::after {
|
|
88
|
+
content: "";
|
|
89
|
+
position: absolute;
|
|
90
|
+
top: 1px;
|
|
91
|
+
left: -1px;
|
|
92
|
+
height: 100%;
|
|
93
|
+
width: 100%;
|
|
94
|
+
background-image: var(--carousel-left-button-glow, transparent);
|
|
95
|
+
border-radius: var(--carousel-button-radius, 50%);
|
|
96
|
+
z-index: -1;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.control + .control::after {
|
|
100
|
+
left: auto;
|
|
101
|
+
right: -1px;
|
|
102
|
+
background-image: var(--carousel-right-button-glow, transparent);
|
|
103
|
+
z-index: -1;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.controlIcon {
|
|
107
|
+
--size: var(--carousel-button-icon-size, 16px);
|
|
108
|
+
|
|
109
|
+
fill: var(--carousel-button-icon-color, #081527);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.viewport {
|
|
113
|
+
position: relative;
|
|
114
|
+
min-width: calc(100vw - var(--scrollbar-size));
|
|
115
|
+
height: 100%;
|
|
116
|
+
min-height: var(--carousel-height);
|
|
117
|
+
overflow: hidden;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.carousel--scale .viewport::before {
|
|
121
|
+
content: "";
|
|
122
|
+
position: absolute;
|
|
123
|
+
top: 0;
|
|
124
|
+
left: 0;
|
|
125
|
+
height: 100%;
|
|
126
|
+
width: var(--carousel-item-width, 400px);
|
|
127
|
+
background: var(--carousel-before-background, transparent);
|
|
128
|
+
z-index: 1;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.carousel--scale .viewport::after {
|
|
132
|
+
content: "";
|
|
133
|
+
position: absolute;
|
|
134
|
+
top: 0;
|
|
135
|
+
right: 0;
|
|
136
|
+
height: 100%;
|
|
137
|
+
width: var(--carousel-item-width, 400px);
|
|
138
|
+
background: var(--carousel-after-background, transparent);
|
|
139
|
+
z-index: 1;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.track {
|
|
143
|
+
position: relative;
|
|
144
|
+
width: 100%;
|
|
145
|
+
height: 100%;
|
|
146
|
+
display: flex;
|
|
147
|
+
align-items: center;
|
|
148
|
+
justify-content: center;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.item {
|
|
152
|
+
position: absolute;
|
|
153
|
+
top: 50%;
|
|
154
|
+
transform: translate(-50%, -50%);
|
|
155
|
+
will-change: transform, opacity;
|
|
156
|
+
pointer-events: auto;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.carousel--wheel .item {
|
|
160
|
+
max-width: 90vw;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.carousel--scale .item {
|
|
164
|
+
max-width: 85vw;
|
|
165
|
+
transform-origin: top center;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* CMS */
|
|
169
|
+
[data-cms-mode="true"] .carousel {
|
|
170
|
+
pointer-events: none;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
[data-cms-mode="true"] .controls {
|
|
174
|
+
display: none;
|
|
175
|
+
}
|
|
@@ -34,5 +34,11 @@
|
|
|
34
34
|
"minimize": "Riduci testo",
|
|
35
35
|
"close": "Chiudi",
|
|
36
36
|
"showInformation": "Informazioni importanti"
|
|
37
|
+
},
|
|
38
|
+
"ru": {
|
|
39
|
+
"maximize": "Увеличить текст",
|
|
40
|
+
"minimize": "Уменьшить текст",
|
|
41
|
+
"close": "Закрыть",
|
|
42
|
+
"showInformation": "Важная информация"
|
|
37
43
|
}
|
|
38
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"information.d.ts","sourceRoot":"","sources":["../../../../src/common/components/information/information.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"information.d.ts","sourceRoot":"","sources":["../../../../src/common/components/information/information.tsx"],"names":[],"mappings":"AAmBA,KAAK,KAAK,GAAG;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,MAAiB,EACjB,IAAgB,EAChB,cAAc,EACd,IAAc,EACd,SAAS,EACT,eAAe,GAChB,EAAE,KAAK,2CA0KP"}
|
|
@@ -14,6 +14,7 @@ import ArrowUpIcon from "dt-design-system/es/icons/arrow-up";
|
|
|
14
14
|
import CrossIcon from "dt-design-system/es/icons/cross";
|
|
15
15
|
import i18n from "./i18n.json";
|
|
16
16
|
import styles from "./information.module.css";
|
|
17
|
+
import useSeasonChoice from "./use-season-choice";
|
|
17
18
|
const STORAGE_KEY = "information_viewed";
|
|
18
19
|
export default function Information({ source = "/popup", zone = "content", preventOpening, mode = "popup", className, buttonClassName, }) {
|
|
19
20
|
const ref = React.useRef(null);
|
|
@@ -26,6 +27,7 @@ export default function Information({ source = "/popup", zone = "content", preve
|
|
|
26
27
|
const { ubloApi, site } = config;
|
|
27
28
|
const isPopin = mode === "popin";
|
|
28
29
|
const isOpened = isPopin ? !minimized && Boolean(content) : Boolean(content);
|
|
30
|
+
useSeasonChoice(close, content, isPopin);
|
|
29
31
|
const maximize = () => {
|
|
30
32
|
sessionStorage.setItem(STORAGE_KEY, "true");
|
|
31
33
|
setMaximized(true);
|
|
@@ -45,10 +47,10 @@ export default function Information({ source = "/popup", zone = "content", preve
|
|
|
45
47
|
setMaximized(false);
|
|
46
48
|
checkOverflow();
|
|
47
49
|
};
|
|
48
|
-
|
|
50
|
+
function close() {
|
|
49
51
|
sessionStorage.setItem(STORAGE_KEY, "true");
|
|
50
52
|
setContent(undefined);
|
|
51
|
-
}
|
|
53
|
+
}
|
|
52
54
|
const checkOverflow = React.useCallback(() => {
|
|
53
55
|
window.requestAnimationFrame(() => {
|
|
54
56
|
const inner = document.querySelector(`.${styles.inner}`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-season-choice.d.ts","sourceRoot":"","sources":["../../../../src/common/components/information/use-season-choice.js"],"names":[],"mappings":"AAOA,yFA2DC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const SELECTOR = ".season-choice__block--winter";
|
|
3
|
+
export default function useSeasonChoice(callback, content, isPopin) {
|
|
4
|
+
React.useEffect(() => {
|
|
5
|
+
if (isPopin || !content)
|
|
6
|
+
return;
|
|
7
|
+
let winterElement = null;
|
|
8
|
+
let observer = null;
|
|
9
|
+
const attachListener = () => {
|
|
10
|
+
if (winterElement)
|
|
11
|
+
return true;
|
|
12
|
+
const winter = document.querySelector(SELECTOR);
|
|
13
|
+
if (winter) {
|
|
14
|
+
winterElement = winter;
|
|
15
|
+
winter.addEventListener("click", callback);
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
return false;
|
|
19
|
+
};
|
|
20
|
+
if (attachListener()) {
|
|
21
|
+
return () => {
|
|
22
|
+
if (winterElement) {
|
|
23
|
+
winterElement.removeEventListener("click", callback);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
observer = new MutationObserver((mutations) => {
|
|
28
|
+
const hasRelevantChanges = mutations.some((mutation) => mutation.type === "childList" && mutation.addedNodes.length > 0);
|
|
29
|
+
if (hasRelevantChanges && attachListener()) {
|
|
30
|
+
observer.disconnect();
|
|
31
|
+
observer = null;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
observer.observe(document.body, {
|
|
35
|
+
childList: true,
|
|
36
|
+
subtree: true,
|
|
37
|
+
});
|
|
38
|
+
return () => {
|
|
39
|
+
if (observer) {
|
|
40
|
+
observer.disconnect();
|
|
41
|
+
}
|
|
42
|
+
if (winterElement) {
|
|
43
|
+
winterElement.removeEventListener("click", callback);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}, [content, callback, isPopin]);
|
|
47
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: React.MemoExoticComponent<({ lang, resultFormatter, backdrop, OverrideIcons, messages, seo, exclude, autofocus, }: {
|
|
1
|
+
declare const _default: React.MemoExoticComponent<({ lang, resultFormatter, backdrop, OverrideIcons, messages, seo, exclude, autofocus, additionalResults, }: {
|
|
2
2
|
lang: any;
|
|
3
3
|
resultFormatter: any;
|
|
4
4
|
backdrop: any;
|
|
@@ -7,6 +7,7 @@ declare const _default: React.MemoExoticComponent<({ lang, resultFormatter, back
|
|
|
7
7
|
seo: any;
|
|
8
8
|
exclude: any;
|
|
9
9
|
autofocus: any;
|
|
10
|
+
additionalResults?: any[];
|
|
10
11
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
11
12
|
export default _default;
|
|
12
13
|
import * as React from "react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-bar.d.ts","sourceRoot":"","sources":["../../../../src/common/components/search-bar/search-bar.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"search-bar.d.ts","sourceRoot":"","sources":["../../../../src/common/components/search-bar/search-bar.js"],"names":[],"mappings":";;;;;;;;;;;;uBAAuB,OAAO"}
|
|
@@ -13,9 +13,9 @@ import * as KeyboardKeys from "./utils/keyboard-keys";
|
|
|
13
13
|
import { message } from "./messages";
|
|
14
14
|
const { publicRuntimeConfig } = getConfig();
|
|
15
15
|
const { ubloApi, site } = publicRuntimeConfig;
|
|
16
|
-
const SearchBar = ({ lang, resultFormatter, backdrop, OverrideIcons = {}, messages, seo, exclude, autofocus, }) => {
|
|
16
|
+
const SearchBar = ({ lang, resultFormatter, backdrop, OverrideIcons = {}, messages, seo, exclude, autofocus, additionalResults = [], }) => {
|
|
17
17
|
const input = React.useRef();
|
|
18
|
-
const
|
|
18
|
+
const resultsContainer = React.useRef();
|
|
19
19
|
const [state, setState] = React.useState({ active: 0, selected: undefined });
|
|
20
20
|
const { lang: ubloLang = lang } = useUbloContext();
|
|
21
21
|
const { text, setText, search } = useSearch({
|
|
@@ -55,7 +55,7 @@ const SearchBar = ({ lang, resultFormatter, backdrop, OverrideIcons = {}, messag
|
|
|
55
55
|
close();
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
|
-
const container =
|
|
58
|
+
const container = resultsContainer.current;
|
|
59
59
|
const firstResult = container?.querySelector(".search-bar__result");
|
|
60
60
|
const allResults = Array.from(container?.querySelectorAll(".search-bar__result"));
|
|
61
61
|
const lastResult = allResults[allResults.length - 1];
|
|
@@ -118,11 +118,17 @@ const SearchBar = ({ lang, resultFormatter, backdrop, OverrideIcons = {}, messag
|
|
|
118
118
|
};
|
|
119
119
|
}, [autofocus, handleKeyPresses]);
|
|
120
120
|
const Icon = search?.loading ? Icons.LoadIcon : Icons.SearchIcon;
|
|
121
|
+
const matchingAdditionalResults = additionalResults.filter((result) => {
|
|
122
|
+
const normalizedResult = normalize(result.title.toLowerCase());
|
|
123
|
+
const normalizedText = normalize(text.toLowerCase());
|
|
124
|
+
return text && normalizedResult.includes(normalizedText);
|
|
125
|
+
});
|
|
126
|
+
const results = [...(search?.result || []), ...matchingAdditionalResults];
|
|
121
127
|
const classes = classNames("search-bar", {
|
|
122
|
-
"search-bar--opened":
|
|
128
|
+
"search-bar--opened": results.length > 0,
|
|
123
129
|
"search-bar--loading": search?.loading,
|
|
124
130
|
});
|
|
125
|
-
return (_jsxs("div", { className: classes, children: [backdrop && _jsx("div", { className: "search-bar__backdrop", onClick: close }), _jsxs("div", { className: "search-bar__input-container", children: [_jsx("input", { ref: input, type: "text", value: text, onChange: updateSearch, onKeyDown: handleKeyDown, className: "search-bar__input", placeholder: message(ubloLang, "what-are-you-looking-for", messages), onBlur: handleBlur }), _jsx(Icon, { className: "search-bar__icon" }), _jsxs("div", { ref:
|
|
131
|
+
return (_jsxs("div", { className: classes, children: [backdrop && _jsx("div", { className: "search-bar__backdrop", onClick: close }), _jsxs("div", { className: "search-bar__input-container", children: [_jsx("input", { ref: input, type: "text", value: text, onChange: updateSearch, onKeyDown: handleKeyDown, className: "search-bar__input", placeholder: message(ubloLang, "what-are-you-looking-for", messages), onBlur: handleBlur }), _jsx(Icon, { className: "search-bar__icon" }), _jsxs("div", { ref: resultsContainer, className: "search-bar__results", children: [results?.map((result, i) => {
|
|
126
132
|
const { name, title, page, path } = result;
|
|
127
133
|
const externalLink = page === undefined;
|
|
128
134
|
const Tag = externalLink ? "a" : Link;
|
|
@@ -152,6 +158,13 @@ const SearchBar = ({ lang, resultFormatter, backdrop, OverrideIcons = {}, messag
|
|
|
152
158
|
"search-bar__result--active": i === state.active,
|
|
153
159
|
});
|
|
154
160
|
return (_jsx(Tag, { className: classes, ...props, onClick: onClick }, `${name}-${i}`));
|
|
155
|
-
}),
|
|
161
|
+
}), text && results?.length === 0 && (_jsx("div", { className: "search-bar__no-result", children: message(ubloLang, "no-results", messages) }))] })] })] }));
|
|
156
162
|
};
|
|
157
163
|
export default React.memo(SearchBar);
|
|
164
|
+
function normalize(text) {
|
|
165
|
+
if ("normalize" in String.prototype &&
|
|
166
|
+
String.prototype.normalize.length === 0) {
|
|
167
|
+
return text.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
|
168
|
+
}
|
|
169
|
+
return text;
|
|
170
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/components/season-switch/index.tsx"],"names":[],"mappings":"AAcA,KAAK,KAAK,GAAG;IACX,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,cAAc,EAAE,EAAE,KAAK,2CAqD7D"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import Router from "next/router";
|
|
4
|
+
import { useUbloContext } from "ublo/with-ublo";
|
|
5
|
+
import { fetchZone } from "ublo/fetcher";
|
|
6
|
+
import Dialog from "dt-design-system/es/dialog";
|
|
7
|
+
import useChooseWinter from "./use-choose-winter";
|
|
8
|
+
import styles from "./index.module.css";
|
|
9
|
+
const SOURCE = {
|
|
10
|
+
fr: "/choix-saison",
|
|
11
|
+
en: "/season-switch",
|
|
12
|
+
};
|
|
13
|
+
const STORAGE_KEY = "season-switch_viewed";
|
|
14
|
+
export default function SeasonSwitch({ preventOpening }) {
|
|
15
|
+
const [content, setContent] = React.useState();
|
|
16
|
+
const { config, lang } = useUbloContext();
|
|
17
|
+
const { ubloApi, site } = config;
|
|
18
|
+
const close = () => {
|
|
19
|
+
sessionStorage.setItem(STORAGE_KEY, "true");
|
|
20
|
+
setContent(undefined);
|
|
21
|
+
};
|
|
22
|
+
useChooseWinter(close, content);
|
|
23
|
+
const getContent = async () => {
|
|
24
|
+
const content = await fetchZone(ubloApi, site, lang, SOURCE[lang], "season-switch");
|
|
25
|
+
if (!content)
|
|
26
|
+
return;
|
|
27
|
+
setContent(content);
|
|
28
|
+
};
|
|
29
|
+
React.useEffect(() => {
|
|
30
|
+
const alreadySeen = sessionStorage.getItem(STORAGE_KEY) ||
|
|
31
|
+
sessionStorage.getItem("cms_token");
|
|
32
|
+
if (!preventOpening && !alreadySeen) {
|
|
33
|
+
getContent();
|
|
34
|
+
}
|
|
35
|
+
}, [preventOpening]);
|
|
36
|
+
Router.ready(() => {
|
|
37
|
+
Router.events.on("routeChangeComplete", () => {
|
|
38
|
+
close();
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
return (_jsx(Dialog, { className: styles.seasonswitch, close: close, isOpened: !!content, showCloseButton: false, children: _jsx("div", { className: styles.inner, dangerouslySetInnerHTML: { __html: content }, "data-season-switch": "" }) }));
|
|
42
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.seasonswitch {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
max-width: 100%;
|
|
5
|
+
min-height: 100%;
|
|
6
|
+
z-index: 1000;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.seasonswitch button[class*="dialog_closeButton"] {
|
|
10
|
+
background-color: transparent;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.seasonswitch button[class*="dialog_closeButton"] svg {
|
|
14
|
+
--size: 24px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.inner {
|
|
18
|
+
height: 100%;
|
|
19
|
+
width: 100%;
|
|
20
|
+
background-color: var(--season-switch);
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-choose-winter.d.ts","sourceRoot":"","sources":["../../../../src/common/components/season-switch/use-choose-winter.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,QAAQ,EAAE,MAAM,IAAI,EAAE,OAAO,EAAE,MAAM,QA2D5E"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const SELECTOR = ".season-switch div[data-season='winter']";
|
|
3
|
+
export default function useChooseWinter(callback, content) {
|
|
4
|
+
React.useEffect(() => {
|
|
5
|
+
if (!content)
|
|
6
|
+
return;
|
|
7
|
+
let winterElement = null;
|
|
8
|
+
let observer = null;
|
|
9
|
+
const attachListener = () => {
|
|
10
|
+
if (winterElement)
|
|
11
|
+
return true;
|
|
12
|
+
const winter = document.querySelector(SELECTOR);
|
|
13
|
+
if (winter) {
|
|
14
|
+
winterElement = winter;
|
|
15
|
+
winter.addEventListener("click", callback);
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
return false;
|
|
19
|
+
};
|
|
20
|
+
if (attachListener()) {
|
|
21
|
+
return () => {
|
|
22
|
+
if (winterElement) {
|
|
23
|
+
winterElement.removeEventListener("click", callback);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
observer = new MutationObserver((mutations) => {
|
|
28
|
+
const hasRelevantChanges = mutations.some((mutation) => mutation.type === "childList" && mutation.addedNodes.length > 0);
|
|
29
|
+
if (hasRelevantChanges && attachListener()) {
|
|
30
|
+
observer.disconnect();
|
|
31
|
+
observer = null;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
observer.observe(document.body, {
|
|
35
|
+
childList: true,
|
|
36
|
+
subtree: true,
|
|
37
|
+
});
|
|
38
|
+
return () => {
|
|
39
|
+
if (observer) {
|
|
40
|
+
observer.disconnect();
|
|
41
|
+
}
|
|
42
|
+
if (winterElement) {
|
|
43
|
+
winterElement.removeEventListener("click", callback);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}, [content, callback]);
|
|
47
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare function createDate(...args: number[]): Date;
|
|
2
2
|
export declare function getChristmasWeek(endWeek: any, yearOffset?: number): Date;
|
|
3
|
-
export declare function dateToWeek(date: any, christmasWeek: any): number;
|
|
3
|
+
export declare function dateToWeek(date: any, christmasWeek: any, yearOffset?: number): number;
|
|
4
4
|
export declare function removeFilter(): void;
|
|
5
5
|
export declare function filter(week: number): void;
|
|
6
6
|
export declare function weekToDate(week: any, endWeek: any, yearOffset?: number): Date;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"weeks.d.ts","sourceRoot":"","sources":["../../../../../src/common/components/week-selector/services/weeks.ts"],"names":[],"mappings":"AAYA,wBAAgB,UAAU,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,QAO3C;AAoBD,wBAAgB,gBAAgB,CAAC,OAAO,KAAA,EAAE,UAAU,SAAI,QAWvD;AAED,wBAAgB,UAAU,CAAC,IAAI,KAAA,EAAE,aAAa,KAAA,
|
|
1
|
+
{"version":3,"file":"weeks.d.ts","sourceRoot":"","sources":["../../../../../src/common/components/week-selector/services/weeks.ts"],"names":[],"mappings":"AAYA,wBAAgB,UAAU,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,QAO3C;AAoBD,wBAAgB,gBAAgB,CAAC,OAAO,KAAA,EAAE,UAAU,SAAI,QAWvD;AAED,wBAAgB,UAAU,CAAC,IAAI,KAAA,EAAE,aAAa,KAAA,EAAE,UAAU,SAAI,UAoB7D;AAMD,wBAAgB,YAAY,SAY3B;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,QAwBlC;AAED,wBAAgB,UAAU,CAAC,IAAI,KAAA,EAAE,OAAO,KAAA,EAAE,UAAU,SAAI,QAEvD;AAED,wBAAgB,WAAW,CAAC,IAAI,KAAA,UAG/B"}
|
|
@@ -37,8 +37,10 @@ export function getChristmasWeek(endWeek, yearOffset = 0) {
|
|
|
37
37
|
const dateSeasonEnd = addDays(getPrevSaturday(lastChristmas), endWeek * 7);
|
|
38
38
|
return getPrevSaturday(now <= dateSeasonEnd ? lastChristmas : nextChristmas);
|
|
39
39
|
}
|
|
40
|
-
export function dateToWeek(date, christmasWeek) {
|
|
41
|
-
const diff = date.getTime()
|
|
40
|
+
export function dateToWeek(date, christmasWeek, yearOffset = 0) {
|
|
41
|
+
const diff = date.getTime() +
|
|
42
|
+
yearOffset * 365 * 24 * 60 * 60 * 1000 -
|
|
43
|
+
christmasWeek.getTime();
|
|
42
44
|
const days = Math.floor(diff / (1000 * 60 * 60 * 24));
|
|
43
45
|
const startYear = christmasWeek.getFullYear();
|
|
44
46
|
const endYear = date.getFullYear();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
type Props = {
|
|
2
2
|
displayDate: number;
|
|
3
|
-
setDisplayDate: (date: number) => void;
|
|
3
|
+
setDisplayDate: (date: number | undefined, offset: number) => void;
|
|
4
4
|
cmsMode: "connected" | "editing" | "info";
|
|
5
5
|
};
|
|
6
6
|
export default function WeekSelector({ displayDate, setDisplayDate, cmsMode, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"week-selector.d.ts","sourceRoot":"","sources":["../../../../src/common/components/week-selector/week-selector.tsx"],"names":[],"mappings":"AAeA,KAAK,KAAK,GAAG;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"week-selector.d.ts","sourceRoot":"","sources":["../../../../src/common/components/week-selector/week-selector.tsx"],"names":[],"mappings":"AAeA,KAAK,KAAK,GAAG;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACnE,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC;CAC3C,CAAC;AAOF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,WAAW,EACX,cAAc,EACd,OAAO,GACR,EAAE,KAAK,2CAyPP"}
|
|
@@ -108,7 +108,11 @@ export default function WeekSelector({ displayDate, setDisplayDate, cmsMode, })
|
|
|
108
108
|
day: "2-digit",
|
|
109
109
|
month: "2-digit",
|
|
110
110
|
year: "numeric",
|
|
111
|
-
}) }), _jsx(Select, { className: styles.seasonSelect, label: "Saison", options: seasons, value: yearOffset, onValueChange: (value) =>
|
|
111
|
+
}) }), _jsx(Select, { className: styles.seasonSelect, label: "Saison", options: seasons, value: yearOffset, onValueChange: (value) => {
|
|
112
|
+
const newOffset = Number(value);
|
|
113
|
+
setYearOffset(newOffset);
|
|
114
|
+
setDisplayDate(undefined, newOffset);
|
|
115
|
+
}, compact: true }), _jsx(Tooltip, { content: "R\u00E9duire", children: _jsx(Button, { variant: "transparent", onClick: minimize, children: _jsx(MinusSquareIcon, {}) }) })] }), _jsxs("div", { className: styles.inner, children: [_jsx("div", { ref: scrollingAreaRef, className: styles.items, children: weeks.map((week) => {
|
|
112
116
|
const prevDate = Weeks.weekToDate(week - 1, end, yearOffset);
|
|
113
117
|
const currDate = Weeks.weekToDate(week, end, yearOffset);
|
|
114
118
|
const nextDate = Weeks.weekToDate(week + 1, end, yearOffset);
|
|
@@ -131,7 +135,7 @@ export default function WeekSelector({ displayDate, setDisplayDate, cmsMode, })
|
|
|
131
135
|
[styles.selected]: isSelected,
|
|
132
136
|
});
|
|
133
137
|
const selectWeek = () => {
|
|
134
|
-
setDisplayDate(week);
|
|
138
|
+
setDisplayDate(week, yearOffset);
|
|
135
139
|
};
|
|
136
140
|
return (_jsxs("div", { className: weekClasses, children: [_jsx(Button, { className: styles.itemButton, onClick: selectWeek }), _jsxs("div", { className: styles.itemDate, children: [_jsx("div", { className: styles.itemDateFrom, children: Weeks.formatShort(currDate) }), isLast && (_jsx("div", { className: styles.itemDateTo, children: Weeks.formatShort(nextDate) }))] }), showMonth && (_jsxs("span", { className: styles.itemMonth, children: [formattedMonth, " ", showYear && (_jsx("b", { className: styles.itemYear, children: currYear }))] }))] }, week));
|
|
137
141
|
}) }), _jsxs("div", { className: styles.controls, children: [_jsx(Button, { className: styles.control, variant: "secondary", "data-direction": "prev", onClick: scrollLeft, children: _jsx(ChevronsLeftIcon, {}) }), _jsx(Button, { className: styles.control, variant: "secondary", "data-direction": "next", onClick: scrollRight, children: _jsx(ChevronsRightIcon, {}) })] })] })] }) }));
|
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import { useUbloContext } from "ublo/with-ublo";
|
|
4
4
|
import PackagesSelector from "../components/packages-selector";
|
|
5
5
|
import { openMseM } from "../utils/msem-widget";
|
|
6
|
-
import * as Plausible from "
|
|
6
|
+
import * as Plausible from "../../future/components/plausible";
|
|
7
7
|
const preview = typeof window !== "undefined" &&
|
|
8
8
|
window.location.search.indexOf("preview") !== -1;
|
|
9
9
|
const buttonStyles = `
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/espace-prive/index.js"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/espace-prive/index.js"],"names":[],"mappings":"AAGA;;;;4CAMC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import Partenaire from "./partenaire";
|
|
3
3
|
import ContextProvider from "./context";
|
|
4
|
-
export default function Index({ logo, tools }) {
|
|
5
|
-
return (_jsx(ContextProvider, { children: _jsx(Partenaire, { logo: logo, tools: tools }) }));
|
|
4
|
+
export default function Index({ logo, tools, presets }) {
|
|
5
|
+
return (_jsx(ContextProvider, { children: _jsx(Partenaire, { logo: logo, tools: tools, presets: presets }) }));
|
|
6
6
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export default Partenaire;
|
|
2
|
-
declare function Partenaire({ logo, tools }: {
|
|
2
|
+
declare function Partenaire({ logo, tools, presets }: {
|
|
3
3
|
logo: any;
|
|
4
4
|
tools: any;
|
|
5
|
+
presets: any;
|
|
5
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
//# sourceMappingURL=partenaire.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partenaire.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/espace-prive/partenaire.js"],"names":[],"mappings":";AAaA
|
|
1
|
+
{"version":3,"file":"partenaire.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/espace-prive/partenaire.js"],"names":[],"mappings":";AAaA;;;;4CAyCC"}
|
|
@@ -11,7 +11,7 @@ import Panier from "./panier";
|
|
|
11
11
|
import Tools from "./tools";
|
|
12
12
|
import { pathIncludesKey } from "./utils/path-includes-key";
|
|
13
13
|
import styles from "./partenaire.module.css";
|
|
14
|
-
const Partenaire = ({ logo, tools }) => {
|
|
14
|
+
const Partenaire = ({ logo, tools, presets }) => {
|
|
15
15
|
const { menuPath } = useUbloContext();
|
|
16
16
|
const { menu } = menuPath;
|
|
17
17
|
const isConnexion = pathIncludesKey(menu, "connexion");
|
|
@@ -22,6 +22,6 @@ const Partenaire = ({ logo, tools }) => {
|
|
|
22
22
|
return _jsx(Connexion, { logo: logo });
|
|
23
23
|
if (isContact)
|
|
24
24
|
return _jsx(Contact, { logo: logo });
|
|
25
|
-
return (_jsxs("div", { className: styles.partenaire, children: [_jsxs("header", { className: styles.header, children: [_jsx("div", { className: styles.logo, children: logo }), _jsx(Zone, { id: "hero", className: styles.heroZone, maxSections: 1, tooltip: "Zone d'\u00E9dition : Banni\u00E8re", fixed: true })] }), _jsxs("main", { className: styles.main, children: [_jsx("nav", { className: styles.nav, children: _jsx(CartLink, {}) }), _jsx(Zone, { id: "introduction", className: styles.introductionZone, tooltip: "Zone d'\u00E9dition : Texte de pr\u00E9sentation" }), isTunnel && _jsx(Tunnel, {}), isCart && _jsx(Panier, {})] }), _jsx("footer", { className: styles.footer, children: _jsx(Tools, { tools: tools }) }), _jsx(Login, {})] }));
|
|
25
|
+
return (_jsxs("div", { className: styles.partenaire, children: [_jsxs("header", { className: styles.header, children: [_jsx("div", { className: styles.logo, children: logo }), _jsx(Zone, { id: "hero", className: styles.heroZone, maxSections: 1, tooltip: "Zone d'\u00E9dition : Banni\u00E8re", fixed: true })] }), _jsxs("main", { className: styles.main, children: [_jsx("nav", { className: styles.nav, children: _jsx(CartLink, {}) }), _jsx(Zone, { id: "introduction", className: styles.introductionZone, tooltip: "Zone d'\u00E9dition : Texte de pr\u00E9sentation" }), isTunnel && _jsx(Tunnel, { presets: presets }), isCart && _jsx(Panier, {})] }), _jsx("footer", { className: styles.footer, children: _jsx(Tools, { tools: tools }) }), _jsx(Login, {})] }));
|
|
26
26
|
};
|
|
27
27
|
export default Partenaire;
|