ublo-lib 1.31.43 → 1.31.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.
Files changed (798) hide show
  1. package/es/common/components/admin-links/admin-links.d.ts +11 -0
  2. package/es/common/components/admin-links/admin-links.jsx +65 -0
  3. package/es/common/components/admin-links/{index.js → index.d.ts} +1 -1
  4. package/es/common/components/admin-links/index.jsx +2 -0
  5. package/es/common/components/analytics.d.ts +5 -0
  6. package/es/common/components/analytics.js +36 -34
  7. package/es/common/components/breadcrumb.d.ts +16 -0
  8. package/es/common/components/breadcrumb.jsx +32 -0
  9. package/es/common/components/carousel-zone.d.ts +7 -0
  10. package/es/common/components/carousel-zone.js +36 -55
  11. package/es/common/components/carousel.d.ts +14 -0
  12. package/es/common/components/carousel.js +288 -343
  13. package/es/common/components/cart-preview/api.d.ts +1 -0
  14. package/es/common/components/cart-preview/api.js +23 -19
  15. package/es/common/components/cart-preview/cart-pill.d.ts +5 -0
  16. package/es/common/components/cart-preview/cart-pill.js +5 -10
  17. package/es/common/components/cart-preview/cart-preview.d.ts +6 -0
  18. package/es/common/components/cart-preview/cart-preview.js +73 -102
  19. package/es/common/components/cart-preview/index.d.ts +2 -0
  20. package/es/common/components/cart-preview/index.js +1 -1
  21. package/es/common/components/cart-preview/utils.d.ts +2 -0
  22. package/es/common/components/cart-preview/utils.js +23 -13
  23. package/es/common/components/collapsible/collapsible.d.ts +9 -0
  24. package/es/common/components/collapsible/collapsible.jsx +51 -0
  25. package/es/common/components/collapsible/{index.js → index.d.ts} +1 -1
  26. package/es/common/components/collapsible/index.jsx +2 -0
  27. package/es/common/components/cookie-consent/cookie-consent.d.ts +7 -0
  28. package/es/common/components/cookie-consent/cookie-consent.js +99 -112
  29. package/es/common/components/cookie-consent/index.d.ts +4 -0
  30. package/es/common/components/cookie-consent/index.js +1 -1
  31. package/es/common/components/cookie-consent/messages.d.ts +1 -0
  32. package/es/common/components/cookie-consent/messages.js +27 -27
  33. package/es/common/components/cookie-consent/utils.d.ts +1 -0
  34. package/es/common/components/cookie-consent/utils.js +30 -21
  35. package/es/common/components/cross-selling-editor/cross-selling-editor.d.ts +18 -0
  36. package/es/common/components/cross-selling-editor/cross-selling-editor.jsx +35 -0
  37. package/es/common/components/cross-selling-editor/editor.d.ts +8 -0
  38. package/es/common/components/cross-selling-editor/editor.jsx +89 -0
  39. package/es/common/components/cross-selling-editor/hooks/use-custom-offers.d.ts +6 -0
  40. package/es/common/components/cross-selling-editor/hooks/use-custom-offers.js +56 -51
  41. package/es/common/components/cross-selling-editor/hooks/use-tunnel-offers.d.ts +1 -0
  42. package/es/common/components/cross-selling-editor/hooks/use-tunnel-offers.js +39 -31
  43. package/es/common/components/cross-selling-editor/{index.js → index.d.ts} +1 -1
  44. package/es/common/components/cross-selling-editor/index.jsx +2 -0
  45. package/es/common/components/cross-selling-editor/override-trigger-form.d.ts +10 -0
  46. package/es/common/components/cross-selling-editor/override-trigger-form.jsx +68 -0
  47. package/es/common/components/cross-selling-editor/override.d.ts +16 -0
  48. package/es/common/components/cross-selling-editor/override.jsx +102 -0
  49. package/es/common/components/cross-selling-editor/overrides-list.d.ts +13 -0
  50. package/es/common/components/cross-selling-editor/overrides-list.jsx +74 -0
  51. package/es/common/components/cross-selling-editor/rule.d.ts +13 -0
  52. package/es/common/components/cross-selling-editor/rule.jsx +55 -0
  53. package/es/common/components/cross-selling-editor/rules.d.ts +11 -0
  54. package/es/common/components/cross-selling-editor/rules.jsx +53 -0
  55. package/es/common/components/cross-selling-editor/services/api.d.ts +2 -0
  56. package/es/common/components/cross-selling-editor/services/api.js +27 -27
  57. package/es/common/components/cross-selling-editor/services/utils.d.ts +61 -0
  58. package/es/common/components/cross-selling-editor/services/utils.js +177 -175
  59. package/es/common/components/cross-selling-editor/tester-tunnel-offer.d.ts +13 -0
  60. package/es/common/components/cross-selling-editor/tester-tunnel-offer.jsx +26 -0
  61. package/es/common/components/cross-selling-editor/tester.d.ts +10 -0
  62. package/es/common/components/cross-selling-editor/tester.jsx +134 -0
  63. package/es/common/components/cross-selling-editor/types.d.ts +29 -0
  64. package/es/common/components/cross-selling-editor/types.js +1 -1
  65. package/es/common/components/custom-contact-form/attachment.d.ts +9 -0
  66. package/es/common/components/custom-contact-form/attachment.js +131 -201
  67. package/es/common/components/custom-contact-form/custom-contact-form.d.ts +24 -0
  68. package/es/common/components/custom-contact-form/custom-contact-form.jsx +121 -0
  69. package/es/common/components/custom-contact-form/field.d.ts +10 -0
  70. package/es/common/components/custom-contact-form/field.js +115 -218
  71. package/es/common/components/custom-contact-form/icons.d.ts +5 -0
  72. package/es/common/components/custom-contact-form/icons.js +35 -50
  73. package/es/common/components/custom-contact-form/index.d.ts +2 -0
  74. package/es/common/components/custom-contact-form/index.js +1 -1
  75. package/es/common/components/custom-contact-form/messages.d.ts +1 -0
  76. package/es/common/components/custom-contact-form/messages.js +78 -77
  77. package/es/common/components/custom-contact-form/utils.d.ts +29 -0
  78. package/es/common/components/custom-contact-form/utils.js +101 -124
  79. package/es/common/components/date-picker/calendar.d.ts +14 -0
  80. package/es/common/components/date-picker/calendar.js +172 -250
  81. package/es/common/components/date-picker/data.d.ts +86 -0
  82. package/es/common/components/date-picker/data.js +72 -78
  83. package/es/common/components/date-picker/date-item.d.ts +21 -0
  84. package/es/common/components/date-picker/date-item.js +123 -117
  85. package/es/common/components/date-picker/date-picker.d.ts +16 -0
  86. package/es/common/components/date-picker/date-picker.js +28 -56
  87. package/es/common/components/date-picker/helper.d.ts +9 -0
  88. package/es/common/components/date-picker/helper.js +37 -51
  89. package/es/common/components/date-picker/index.d.ts +3 -0
  90. package/es/common/components/date-picker/index.js +1 -1
  91. package/es/common/components/date-picker/messages.d.ts +1 -0
  92. package/es/common/components/date-picker/messages.js +47 -46
  93. package/es/common/components/date-picker/month.d.ts +20 -0
  94. package/es/common/components/date-picker/month.js +27 -72
  95. package/es/common/components/date-picker/utils.d.ts +24 -0
  96. package/es/common/components/date-picker/utils.js +104 -88
  97. package/es/common/components/editable-calendar/calendar-caption.d.ts +5 -0
  98. package/es/common/components/editable-calendar/calendar-caption.js +93 -144
  99. package/es/common/components/editable-calendar/calendar-date.d.ts +12 -0
  100. package/es/common/components/editable-calendar/calendar-date.js +64 -79
  101. package/es/common/components/editable-calendar/calendar-editor.d.ts +7 -0
  102. package/es/common/components/editable-calendar/calendar-editor.js +49 -83
  103. package/es/common/components/editable-calendar/calendar-header.d.ts +8 -0
  104. package/es/common/components/editable-calendar/calendar-header.js +13 -26
  105. package/es/common/components/editable-calendar/calendar.d.ts +6 -0
  106. package/es/common/components/editable-calendar/calendar.js +81 -115
  107. package/es/common/components/editable-calendar/data.d.ts +131 -0
  108. package/es/common/components/editable-calendar/data.js +95 -101
  109. package/es/common/components/editable-calendar/index.d.ts +1 -0
  110. package/es/common/components/editable-calendar/index.js +37 -49
  111. package/es/common/components/editable-calendar/utils.d.ts +18 -0
  112. package/es/common/components/editable-calendar/utils.js +58 -52
  113. package/es/common/components/editable-map/cluster.d.ts +4 -0
  114. package/es/common/components/editable-map/cluster.js +7 -12
  115. package/es/common/components/editable-map/edit-form.d.ts +7 -0
  116. package/es/common/components/editable-map/edit-form.js +43 -97
  117. package/es/common/components/editable-map/editable-map.d.ts +6 -0
  118. package/es/common/components/editable-map/editable-map.js +56 -111
  119. package/es/common/components/editable-map/full-screen-button.d.ts +6 -0
  120. package/es/common/components/editable-map/full-screen-button.js +61 -59
  121. package/es/common/components/editable-map/helper.d.ts +2 -0
  122. package/es/common/components/editable-map/helper.js +22 -23
  123. package/es/common/components/editable-map/icon-picker.d.ts +6 -0
  124. package/es/common/components/editable-map/icon-picker.js +41 -63
  125. package/es/common/components/editable-map/icons/esf-pralognan.d.ts +51 -0
  126. package/es/common/components/editable-map/icons/esf-pralognan.js +372 -1088
  127. package/es/common/components/editable-map/icons/esf.d.ts +39 -0
  128. package/es/common/components/editable-map/icons/esf.js +266 -758
  129. package/es/common/components/editable-map/icons/index.d.ts +6 -0
  130. package/es/common/components/editable-map/icons/index.js +1 -1
  131. package/es/common/components/editable-map/icons/lavovelo.d.ts +5 -0
  132. package/es/common/components/editable-map/icons/lavovelo.js +43 -84
  133. package/es/common/components/editable-map/icons/sata-huez.d.ts +29 -0
  134. package/es/common/components/editable-map/icons/sata-huez.js +169 -468
  135. package/es/common/components/editable-map/icons/sedev-vars.d.ts +29 -0
  136. package/es/common/components/editable-map/icons/sedev-vars.js +169 -468
  137. package/es/common/components/editable-map/icons/viarmonia.d.ts +3 -0
  138. package/es/common/components/editable-map/icons/viarmonia.js +26 -40
  139. package/es/common/components/editable-map/index.d.ts +4 -0
  140. package/es/common/components/editable-map/index.js +66 -74
  141. package/es/common/components/editable-map/map-events.d.ts +9 -0
  142. package/es/common/components/editable-map/map-events.js +33 -40
  143. package/es/common/components/editable-map/marker-list.d.ts +7 -0
  144. package/es/common/components/editable-map/marker-list.js +64 -87
  145. package/es/common/components/editable-map/markers.d.ts +6 -0
  146. package/es/common/components/editable-map/markers.js +39 -88
  147. package/es/common/components/editable-map/popup-data.d.ts +4 -0
  148. package/es/common/components/editable-map/popup-data.js +14 -35
  149. package/es/common/components/editable-map/slopes-toggle.d.ts +5 -0
  150. package/es/common/components/editable-map/slopes-toggle.js +9 -18
  151. package/es/common/components/error-404/error-404.d.ts +6 -0
  152. package/es/common/components/error-404/error-404.js +22 -42
  153. package/es/common/components/error-404/index.d.ts +2 -0
  154. package/es/common/components/error-404/index.js +1 -1
  155. package/es/common/components/error-404/messages.d.ts +1 -0
  156. package/es/common/components/error-404/messages.js +14 -13
  157. package/es/common/components/faq.d.ts +6 -0
  158. package/es/common/components/faq.js +45 -49
  159. package/es/common/components/gesco-contact-form/gesco-contact-form.d.ts +18 -0
  160. package/es/common/components/gesco-contact-form/gesco-contact-form.jsx +152 -0
  161. package/es/common/components/gesco-contact-form/hooks/use-params.d.ts +14 -0
  162. package/es/common/components/gesco-contact-form/hooks/use-params.js +30 -36
  163. package/es/common/components/gesco-contact-form/index.d.ts +2 -0
  164. package/es/common/components/gesco-contact-form/index.js +1 -1
  165. package/es/common/components/gesco-contact-form/phone-code-select.d.ts +7 -0
  166. package/es/common/components/gesco-contact-form/phone-code-select.jsx +61 -0
  167. package/es/common/components/gesco-contact-form/services/api.d.ts +29 -0
  168. package/es/common/components/gesco-contact-form/services/api.js +23 -9
  169. package/es/common/components/gesco-contact-form/services/form.d.ts +30 -0
  170. package/es/common/components/gesco-contact-form/services/form.js +25 -39
  171. package/es/common/components/gesco-contact-form/services/messages.d.ts +33 -0
  172. package/es/common/components/gesco-contact-form/services/messages.js +65 -68
  173. package/es/common/components/gesco-contact-form/services/plausible.d.ts +2 -0
  174. package/es/common/components/gesco-contact-form/services/plausible.js +10 -8
  175. package/es/common/components/gesco-contact-form/types.d.ts +33 -0
  176. package/es/common/components/gesco-contact-form/types.js +1 -1
  177. package/es/common/components/info-buttons.d.ts +7 -0
  178. package/es/common/components/info-buttons.js +91 -95
  179. package/es/common/components/information/index.d.ts +2 -0
  180. package/es/common/components/information/index.js +1 -1
  181. package/es/common/components/information/information.d.ts +6 -0
  182. package/es/common/components/information/information.jsx +49 -0
  183. package/es/common/components/instant-search/hooks/use-constant.d.ts +1 -0
  184. package/es/common/components/instant-search/hooks/use-constant.js +6 -8
  185. package/es/common/components/instant-search/hooks/use-debounced-search.d.ts +6 -0
  186. package/es/common/components/instant-search/hooks/use-debounced-search.js +14 -14
  187. package/es/common/components/instant-search/hooks/use-search.d.ts +15 -0
  188. package/es/common/components/instant-search/hooks/use-search.js +15 -10
  189. package/es/common/components/instant-search/{index.js → index.d.ts} +1 -1
  190. package/es/common/components/instant-search/index.jsx +2 -0
  191. package/es/common/components/instant-search/input.d.ts +15 -0
  192. package/es/common/components/instant-search/input.jsx +64 -0
  193. package/es/common/components/instant-search/instant-search.d.ts +19 -0
  194. package/es/common/components/instant-search/instant-search.jsx +98 -0
  195. package/es/common/components/instant-search/links.d.ts +12 -0
  196. package/es/common/components/instant-search/links.jsx +45 -0
  197. package/es/common/components/instant-search/no-product.d.ts +6 -0
  198. package/es/common/components/instant-search/no-product.jsx +19 -0
  199. package/es/common/components/instant-search/products.d.ts +13 -0
  200. package/es/common/components/instant-search/products.jsx +67 -0
  201. package/es/common/components/instant-search/results.d.ts +76 -0
  202. package/es/common/components/instant-search/results.jsx +68 -0
  203. package/es/common/components/instant-search/services/api.d.ts +1 -0
  204. package/es/common/components/instant-search/services/api.js +10 -12
  205. package/es/common/components/instant-search/services/dates.d.ts +1 -0
  206. package/es/common/components/instant-search/services/dates.js +41 -36
  207. package/es/common/components/instant-search/services/messages.d.ts +1 -0
  208. package/es/common/components/instant-search/services/messages.js +3 -3
  209. package/es/common/components/instant-search/services/utils.d.ts +3 -0
  210. package/es/common/components/instant-search/services/utils.js +35 -34
  211. package/es/common/components/msem-preset-editor/components/facet-selector.d.ts +6 -0
  212. package/es/common/components/msem-preset-editor/components/facet-selector.jsx +20 -0
  213. package/es/common/components/msem-preset-editor/components/form.d.ts +8 -0
  214. package/es/common/components/msem-preset-editor/components/form.jsx +28 -0
  215. package/es/common/components/msem-preset-editor/components/stay-picker.d.ts +14 -0
  216. package/es/common/components/msem-preset-editor/components/stay-picker.jsx +38 -0
  217. package/es/common/components/msem-preset-editor/components/widget-list-item.d.ts +11 -0
  218. package/es/common/components/msem-preset-editor/components/widget-list-item.jsx +97 -0
  219. package/es/common/components/msem-preset-editor/components/widget-list.d.ts +16 -0
  220. package/es/common/components/msem-preset-editor/components/widget-list.jsx +46 -0
  221. package/es/common/components/msem-preset-editor/editor-dialog.d.ts +29 -0
  222. package/es/common/components/msem-preset-editor/editor-dialog.jsx +45 -0
  223. package/es/common/components/msem-preset-editor/editors/elloha.d.ts +14 -0
  224. package/es/common/components/msem-preset-editor/editors/elloha.jsx +95 -0
  225. package/es/common/components/msem-preset-editor/editors/index.d.ts +15 -0
  226. package/es/common/components/msem-preset-editor/editors/{index.js → index.jsx} +7 -7
  227. package/es/common/components/msem-preset-editor/editors/lodgings.d.ts +16 -0
  228. package/es/common/components/msem-preset-editor/editors/lodgings.jsx +235 -0
  229. package/es/common/components/msem-preset-editor/editors/ski-passes-jb.d.ts +15 -0
  230. package/es/common/components/msem-preset-editor/editors/ski-passes-jb.jsx +89 -0
  231. package/es/common/components/msem-preset-editor/editors/ski-passes.d.ts +15 -0
  232. package/es/common/components/msem-preset-editor/editors/ski-passes.jsx +215 -0
  233. package/es/common/components/msem-preset-editor/editors/standard-products.d.ts +15 -0
  234. package/es/common/components/msem-preset-editor/editors/standard-products.jsx +70 -0
  235. package/es/common/components/msem-preset-editor/editors/vakario.d.ts +14 -0
  236. package/es/common/components/msem-preset-editor/editors/vakario.jsx +177 -0
  237. package/es/common/components/msem-preset-editor/index.d.ts +2 -0
  238. package/es/common/components/msem-preset-editor/index.js +1 -1
  239. package/es/common/components/msem-preset-editor/msem-preset-editor.d.ts +27 -0
  240. package/es/common/components/msem-preset-editor/msem-preset-editor.jsx +176 -0
  241. package/es/common/components/msem-preset-editor/services/api.d.ts +14 -0
  242. package/es/common/components/msem-preset-editor/services/api.js +90 -82
  243. package/es/common/components/msem-preset-editor/services/offers.d.ts +22 -0
  244. package/es/common/components/msem-preset-editor/services/offers.js +68 -77
  245. package/es/common/components/msem-preset-editor/services/preset.d.ts +31 -0
  246. package/es/common/components/msem-preset-editor/services/preset.js +18 -26
  247. package/es/common/components/msem-preset-editor/services/url-params.d.ts +2 -0
  248. package/es/common/components/msem-preset-editor/services/url-params.js +24 -24
  249. package/es/common/components/msem-preset-linker/components/actions.d.ts +11 -0
  250. package/es/common/components/msem-preset-linker/components/actions.jsx +60 -0
  251. package/es/common/components/msem-preset-linker/components/overlays.d.ts +8 -0
  252. package/es/common/components/msem-preset-linker/components/overlays.jsx +59 -0
  253. package/es/common/components/msem-preset-linker/components/resort-selector.d.ts +6 -0
  254. package/es/common/components/msem-preset-linker/components/resort-selector.jsx +12 -0
  255. package/es/common/components/msem-preset-linker/hooks/use-msem-presets.d.ts +4 -0
  256. package/es/common/components/msem-preset-linker/hooks/use-msem-presets.js +32 -48
  257. package/es/common/components/msem-preset-linker/{index.js → index.d.ts} +1 -1
  258. package/es/common/components/msem-preset-linker/index.jsx +2 -0
  259. package/es/common/components/msem-preset-linker/msem-preset-linker.d.ts +29 -0
  260. package/es/common/components/msem-preset-linker/msem-preset-linker.jsx +56 -0
  261. package/es/common/components/msem-preset-linker/services/url-params.d.ts +1 -0
  262. package/es/common/components/msem-preset-linker/services/url-params.js +13 -10
  263. package/es/common/components/packages-selector/index.d.ts +7 -0
  264. package/es/common/components/packages-selector/index.js +41 -49
  265. package/es/common/components/plausible/hooks/use-plausible.d.ts +11 -0
  266. package/es/common/components/plausible/hooks/use-plausible.js +18 -22
  267. package/es/common/components/plausible/index.d.ts +7 -0
  268. package/es/common/components/plausible/index.js +1 -1
  269. package/es/common/components/plausible/plausible.d.ts +7 -0
  270. package/es/common/components/plausible/plausible.jsx +17 -0
  271. package/es/common/components/plausible/services/callback.d.ts +23 -0
  272. package/es/common/components/plausible/services/callback.js +123 -186
  273. package/es/common/components/plausible/services/load.d.ts +1 -0
  274. package/es/common/components/plausible/services/load.js +6 -4
  275. package/es/common/components/plausible/services/send-goal.d.ts +6 -0
  276. package/es/common/components/plausible/services/send-goal.js +3 -6
  277. package/es/common/components/popup.d.ts +6 -0
  278. package/es/common/components/popup.js +51 -80
  279. package/es/common/components/scroll-spy.d.ts +13 -0
  280. package/es/common/components/scroll-spy.jsx +56 -0
  281. package/es/common/components/scrolling-carousel/{index.js → index.d.ts} +1 -1
  282. package/es/common/components/scrolling-carousel/index.jsx +2 -0
  283. package/es/common/components/scrolling-carousel/scrolling-carousel.d.ts +7 -0
  284. package/es/common/components/scrolling-carousel/scrolling-carousel.jsx +78 -0
  285. package/es/common/components/search-bar/hooks/use-constant.d.ts +1 -0
  286. package/es/common/components/search-bar/hooks/use-constant.js +6 -8
  287. package/es/common/components/search-bar/hooks/use-debounced-search.d.ts +6 -0
  288. package/es/common/components/search-bar/hooks/use-debounced-search.js +14 -14
  289. package/es/common/components/search-bar/hooks/use-search.d.ts +11 -0
  290. package/es/common/components/search-bar/hooks/use-search.js +14 -11
  291. package/es/common/components/search-bar/index.d.ts +2 -0
  292. package/es/common/components/search-bar/index.js +1 -1
  293. package/es/common/components/search-bar/messages.d.ts +14 -0
  294. package/es/common/components/search-bar/messages.js +16 -16
  295. package/es/common/components/search-bar/search-bar.d.ts +12 -0
  296. package/es/common/components/search-bar/search-bar.js +147 -204
  297. package/es/common/components/search-bar/utils/fetcher.d.ts +1 -0
  298. package/es/common/components/search-bar/utils/fetcher.js +16 -13
  299. package/es/common/components/search-bar/utils/keyboard-keys.d.ts +5 -0
  300. package/es/common/components/search-bar/utils/keyboard-keys.js +1 -1
  301. package/es/common/components/search-bar/utils/params.d.ts +1 -0
  302. package/es/common/components/search-bar/utils/params.js +11 -8
  303. package/es/common/components/tabbed-zones.d.ts +12 -0
  304. package/es/common/components/tabbed-zones.jsx +68 -0
  305. package/es/common/components/video-player/controls.d.ts +16 -0
  306. package/es/common/components/video-player/controls.js +71 -114
  307. package/es/common/components/video-player/icons.d.ts +7 -0
  308. package/es/common/components/video-player/icons.js +35 -48
  309. package/es/common/components/video-player/index.d.ts +1 -0
  310. package/es/common/components/video-player/index.js +1 -1
  311. package/es/common/components/video-player/utils.d.ts +4 -0
  312. package/es/common/components/video-player/utils.js +42 -34
  313. package/es/common/components/video-player/video-player.d.ts +9 -0
  314. package/es/common/components/video-player/video-player.js +77 -101
  315. package/es/common/hooks/use-account.d.ts +6 -0
  316. package/es/common/hooks/use-account.js +33 -25
  317. package/es/common/hooks/use-faq.d.ts +2 -0
  318. package/es/common/hooks/use-faq.js +36 -37
  319. package/es/common/hooks/use-in-view.d.ts +4 -0
  320. package/es/common/hooks/use-in-view.js +74 -74
  321. package/es/common/hooks/use-injected-cms-markup.d.ts +2 -0
  322. package/es/common/hooks/use-injected-cms-markup.js +46 -39
  323. package/es/common/hooks/use-packages.d.ts +2 -0
  324. package/es/common/hooks/use-packages.js +98 -97
  325. package/es/common/hooks/use-scroll-direction.d.ts +10 -0
  326. package/es/common/hooks/use-scroll-direction.js +32 -37
  327. package/es/common/hooks/use-stay.d.ts +3 -0
  328. package/es/common/hooks/use-stay.js +13 -16
  329. package/es/common/hooks/use-sticky.d.ts +3 -0
  330. package/es/common/hooks/use-sticky.js +35 -35
  331. package/es/common/hooks/use-tunnel.d.ts +10 -0
  332. package/es/common/hooks/use-tunnel.js +56 -51
  333. package/es/common/hooks/use-update-effect.d.ts +1 -0
  334. package/es/common/hooks/use-update-effect.js +9 -9
  335. package/es/common/hooks/use-window-sizes.d.ts +6 -0
  336. package/es/common/hooks/use-window-sizes.js +28 -29
  337. package/es/common/hooks/use-youtube-popup.d.ts +2 -0
  338. package/es/common/hooks/use-youtube-popup.js +46 -53
  339. package/es/common/hooks/use-zone-sync.d.ts +2 -0
  340. package/es/common/hooks/use-zone-sync.js +54 -52
  341. package/es/common/utils/cms.d.ts +3 -0
  342. package/es/common/utils/cms.js +32 -17
  343. package/es/common/utils/cookies.d.ts +1 -0
  344. package/es/common/utils/cookies.js +11 -10
  345. package/es/common/utils/copy.d.ts +1 -0
  346. package/es/common/utils/copy.js +11 -11
  347. package/es/common/utils/dates.d.ts +1 -0
  348. package/es/common/utils/dates.js +10 -8
  349. package/es/common/utils/elements.d.ts +4 -0
  350. package/es/common/utils/elements.js +16 -14
  351. package/es/common/utils/events.d.ts +3 -0
  352. package/es/common/utils/events.js +19 -4
  353. package/es/common/utils/fetcher.d.ts +4 -0
  354. package/es/common/utils/fetcher.js +48 -28
  355. package/es/common/utils/file-manager.d.ts +12 -0
  356. package/es/common/utils/file-manager.js +20 -13
  357. package/es/common/utils/load-js.d.ts +2 -0
  358. package/es/common/utils/load-js.js +11 -10
  359. package/es/common/utils/msem-widget.d.ts +16 -0
  360. package/es/common/utils/msem-widget.jsx +49 -0
  361. package/es/common/utils/scrollbar-size.d.ts +1 -0
  362. package/es/common/utils/scrollbar-size.js +1 -1
  363. package/es/common/utils/touch-device.d.ts +1 -0
  364. package/es/common/utils/touch-device.js +3 -1
  365. package/es/common/utils/url-parameters.d.ts +1 -0
  366. package/es/common/utils/url-parameters.js +7 -11
  367. package/es/esf/components/account-button/account-button.d.ts +14 -0
  368. package/es/esf/components/account-button/account-button.jsx +16 -0
  369. package/es/esf/components/account-button/index.d.ts +2 -0
  370. package/es/esf/components/account-button/index.js +1 -1
  371. package/es/esf/components/booking-form/booking-form.d.ts +3 -0
  372. package/es/esf/components/booking-form/booking-form.js +31 -65
  373. package/es/esf/components/booking-form/data.d.ts +334 -0
  374. package/es/esf/components/booking-form/data.js +212 -206
  375. package/es/esf/components/booking-form/field.d.ts +10 -0
  376. package/es/esf/components/booking-form/field.js +79 -102
  377. package/es/esf/components/booking-form/hooks/use-custom-fields.d.ts +2 -0
  378. package/es/esf/components/booking-form/hooks/use-custom-fields.js +17 -23
  379. package/es/esf/components/booking-form/hooks/use-stay.d.ts +2 -0
  380. package/es/esf/components/booking-form/hooks/use-stay.js +9 -9
  381. package/es/esf/components/booking-form/index.d.ts +2 -0
  382. package/es/esf/components/booking-form/index.js +1 -1
  383. package/es/esf/components/booking-form/lesson.d.ts +9 -0
  384. package/es/esf/components/booking-form/lesson.js +31 -48
  385. package/es/esf/components/booking-form/lessons.d.ts +12 -0
  386. package/es/esf/components/booking-form/lessons.js +51 -77
  387. package/es/esf/components/booking-form/messages.d.ts +1 -0
  388. package/es/esf/components/booking-form/messages.js +51 -50
  389. package/es/esf/components/booking-form/personal-data.d.ts +10 -0
  390. package/es/esf/components/booking-form/personal-data.js +31 -55
  391. package/es/esf/components/booking-form/progress-bar.d.ts +6 -0
  392. package/es/esf/components/booking-form/progress-bar.js +16 -29
  393. package/es/esf/components/booking-form/steps.d.ts +14 -0
  394. package/es/esf/components/booking-form/steps.js +38 -70
  395. package/es/esf/components/booking-form/summary.d.ts +11 -0
  396. package/es/esf/components/booking-form/summary.js +101 -131
  397. package/es/esf/components/booking-form/utils.d.ts +5 -0
  398. package/es/esf/components/booking-form/utils.js +53 -58
  399. package/es/esf/components/covid-link/index.d.ts +2 -0
  400. package/es/esf/components/covid-link/index.js +133 -2
  401. package/es/esf/components/covid-link/mask-icon.d.ts +3 -0
  402. package/es/esf/components/covid-link/mask-icon.js +5 -15
  403. package/es/esf/components/covid-link/vax-pass-icon.d.ts +3 -0
  404. package/es/esf/components/covid-link/vax-pass-icon.js +13 -32
  405. package/es/esf/components/cp-form.d.ts +14 -0
  406. package/es/esf/components/cp-form.js +58 -57
  407. package/es/esf/components/instructors-book/api.d.ts +3 -0
  408. package/es/esf/components/instructors-book/api.js +66 -57
  409. package/es/esf/components/instructors-book/book.d.ts +5 -0
  410. package/es/esf/components/instructors-book/book.js +66 -75
  411. package/es/esf/components/instructors-book/filters.d.ts +9 -0
  412. package/es/esf/components/instructors-book/filters.js +23 -56
  413. package/es/esf/components/instructors-book/flags.d.ts +34 -0
  414. package/es/esf/components/instructors-book/flags.js +108 -246
  415. package/es/esf/components/instructors-book/index.d.ts +6 -0
  416. package/es/esf/components/instructors-book/index.js +1 -1
  417. package/es/esf/components/instructors-book/instructor.d.ts +8 -0
  418. package/es/esf/components/instructors-book/instructor.js +64 -103
  419. package/es/esf/components/instructors-book/list.d.ts +10 -0
  420. package/es/esf/components/instructors-book/list.js +21 -40
  421. package/es/esf/components/instructors-book/messages.d.ts +1 -0
  422. package/es/esf/components/instructors-book/messages.js +38 -38
  423. package/es/esf/components/instructors-book/prefixes.d.ts +5 -0
  424. package/es/esf/components/instructors-book/prefixes.js +3 -3
  425. package/es/esf/components/instructors-book/sheet.d.ts +8 -0
  426. package/es/esf/components/instructors-book/sheet.js +93 -159
  427. package/es/esf/components/instructors-book/suggestions.d.ts +7 -0
  428. package/es/esf/components/instructors-book/suggestions.js +43 -51
  429. package/es/esf/components/instructors-book/utils.d.ts +13 -0
  430. package/es/esf/components/instructors-book/utils.js +42 -39
  431. package/es/esf/components/levels/detail.d.ts +5 -0
  432. package/es/esf/components/levels/detail.js +14 -34
  433. package/es/esf/components/levels/index.d.ts +2 -0
  434. package/es/esf/components/levels/index.js +1 -1
  435. package/es/esf/components/levels/levels.d.ts +5 -0
  436. package/es/esf/components/levels/levels.js +239 -325
  437. package/es/esf/components/loyal-customers/api.d.ts +4 -0
  438. package/es/esf/components/loyal-customers/api.js +25 -20
  439. package/es/esf/components/loyal-customers/components/bin-icon.d.ts +3 -0
  440. package/es/esf/components/loyal-customers/components/bin-icon.js +9 -25
  441. package/es/esf/components/loyal-customers/components/customer-form.d.ts +18 -0
  442. package/es/esf/components/loyal-customers/components/customer-form.js +54 -89
  443. package/es/esf/components/loyal-customers/components/field.d.ts +9 -0
  444. package/es/esf/components/loyal-customers/components/field.js +67 -91
  445. package/es/esf/components/loyal-customers/components/row.d.ts +10 -0
  446. package/es/esf/components/loyal-customers/components/row.js +31 -66
  447. package/es/esf/components/loyal-customers/components/rows.d.ts +9 -0
  448. package/es/esf/components/loyal-customers/components/rows.js +14 -30
  449. package/es/esf/components/loyal-customers/components/stay.d.ts +5 -0
  450. package/es/esf/components/loyal-customers/components/stay.js +24 -30
  451. package/es/esf/components/loyal-customers/components/student-form.d.ts +10 -0
  452. package/es/esf/components/loyal-customers/components/student-form.js +59 -106
  453. package/es/esf/components/loyal-customers/components/voucher.d.ts +7 -0
  454. package/es/esf/components/loyal-customers/components/voucher.js +5 -19
  455. package/es/esf/components/loyal-customers/content.d.ts +17 -0
  456. package/es/esf/components/loyal-customers/content.js +43 -46
  457. package/es/esf/components/loyal-customers/data.d.ts +166 -0
  458. package/es/esf/components/loyal-customers/data.js +62 -113
  459. package/es/esf/components/loyal-customers/hooks/use-stored-rows.d.ts +3 -0
  460. package/es/esf/components/loyal-customers/hooks/use-stored-rows.js +9 -8
  461. package/es/esf/components/loyal-customers/index.d.ts +2 -0
  462. package/es/esf/components/loyal-customers/index.js +1 -1
  463. package/es/esf/components/loyal-customers/loyal-customers.d.ts +17 -0
  464. package/es/esf/components/loyal-customers/loyal-customers.js +62 -120
  465. package/es/esf/components/loyal-customers/messages.d.ts +1 -0
  466. package/es/esf/components/loyal-customers/messages.js +57 -56
  467. package/es/esf/components/loyal-customers/utils.d.ts +20 -0
  468. package/es/esf/components/loyal-customers/utils.js +42 -67
  469. package/es/esf/components/magic-box/booking.d.ts +11 -0
  470. package/es/esf/components/magic-box/booking.js +97 -90
  471. package/es/esf/components/magic-box/filter.d.ts +8 -0
  472. package/es/esf/components/magic-box/filter.js +16 -38
  473. package/es/esf/components/magic-box/filters.d.ts +7 -0
  474. package/es/esf/components/magic-box/filters.js +7 -18
  475. package/es/esf/components/magic-box/index.d.ts +2 -0
  476. package/es/esf/components/magic-box/index.js +1 -1
  477. package/es/esf/components/magic-box/magic-box.d.ts +27 -0
  478. package/es/esf/components/magic-box/magic-box.jsx +142 -0
  479. package/es/esf/components/magic-box/messages.d.ts +1 -0
  480. package/es/esf/components/magic-box/messages.js +27 -26
  481. package/es/esf/components/magic-box/services/api.d.ts +18 -0
  482. package/es/esf/components/magic-box/services/api.js +39 -48
  483. package/es/esf/components/magic-box/services/widgets.d.ts +1 -0
  484. package/es/esf/components/magic-box/services/widgets.js +15 -3
  485. package/es/esf/components/parcours-esf/index.d.ts +2 -0
  486. package/es/esf/components/parcours-esf/index.js +1 -1
  487. package/es/esf/components/parcours-esf/parcours-esf.d.ts +14 -0
  488. package/es/esf/components/parcours-esf/parcours-esf.jsx +42 -0
  489. package/es/esf/components/period-picker/controls.d.ts +5 -0
  490. package/es/esf/components/period-picker/controls.js +22 -38
  491. package/es/esf/components/period-picker/date-display.d.ts +4 -0
  492. package/es/esf/components/period-picker/date-display.js +40 -59
  493. package/es/esf/components/period-picker/days.d.ts +3 -0
  494. package/es/esf/components/period-picker/days.js +68 -102
  495. package/es/esf/components/period-picker/extended-stay-picker.d.ts +12 -0
  496. package/es/esf/components/period-picker/extended-stay-picker.js +23 -48
  497. package/es/esf/components/period-picker/index.d.ts +2 -0
  498. package/es/esf/components/period-picker/index.js +1 -1
  499. package/es/esf/components/period-picker/messages.d.ts +1 -0
  500. package/es/esf/components/period-picker/messages.js +87 -87
  501. package/es/esf/components/period-picker/period-picker.d.ts +8 -0
  502. package/es/esf/components/period-picker/period-picker.js +125 -183
  503. package/es/esf/components/period-picker/popup.d.ts +7 -0
  504. package/es/esf/components/period-picker/popup.js +16 -33
  505. package/es/esf/components/period-picker/services/dates.d.ts +15 -0
  506. package/es/esf/components/period-picker/services/dates.js +70 -68
  507. package/es/esf/components/period-picker/services/events.d.ts +1 -0
  508. package/es/esf/components/period-picker/services/events.js +3 -6
  509. package/es/esf/components/period-picker/services/motions.d.ts +50 -0
  510. package/es/esf/components/period-picker/services/motions.js +8 -33
  511. package/es/esf/components/period-picker/services/sections.d.ts +2 -0
  512. package/es/esf/components/period-picker/services/sections.js +39 -31
  513. package/es/esf/components/period-picker/services/stay.d.ts +2 -0
  514. package/es/esf/components/period-picker/services/stay.js +20 -21
  515. package/es/esf/components/period-picker/title.d.ts +5 -0
  516. package/es/esf/components/period-picker/title.js +9 -22
  517. package/es/esf/components/period-picker/warning.d.ts +8 -0
  518. package/es/esf/components/period-picker/warning.js +24 -43
  519. package/es/esf/components/period-picker/weeks.d.ts +3 -0
  520. package/es/esf/components/period-picker/weeks.js +98 -137
  521. package/es/esf/components/reviews.d.ts +7 -0
  522. package/es/esf/components/reviews.js +27 -25
  523. package/es/esf/components/village-maps/icons.d.ts +6 -0
  524. package/es/esf/components/village-maps/icons.js +32 -38
  525. package/es/esf/components/village-maps/index.d.ts +8 -0
  526. package/es/esf/components/village-maps/index.js +100 -193
  527. package/es/esf/components/village-maps/messages.d.ts +2 -0
  528. package/es/esf/components/village-maps/messages.js +13 -13
  529. package/es/esf/components/village-maps/utils.d.ts +4 -0
  530. package/es/esf/components/village-maps/utils.js +20 -19
  531. package/es/esf/components/week-picker/index.d.ts +14 -0
  532. package/es/esf/components/week-picker/index.js +182 -222
  533. package/es/esf/components/week-picker/messages.d.ts +27 -0
  534. package/es/esf/components/week-picker/messages.js +31 -30
  535. package/es/esf/components/week-picker/utils.d.ts +5 -0
  536. package/es/esf/components/week-picker/utils.js +52 -47
  537. package/es/esf/components/week-picker/week.d.ts +10 -0
  538. package/es/esf/components/week-picker/week.js +31 -46
  539. package/es/esf/components/week-picker-2/index.d.ts +14 -0
  540. package/es/esf/components/week-picker-2/index.js +207 -259
  541. package/es/esf/components/week-picker-2/messages.d.ts +31 -0
  542. package/es/esf/components/week-picker-2/messages.js +29 -29
  543. package/es/esf/components/week-picker-2/utils.d.ts +5 -0
  544. package/es/esf/components/week-picker-2/utils.js +52 -47
  545. package/es/esf/components/week-picker-2/week.d.ts +10 -0
  546. package/es/esf/components/week-picker-2/week.js +32 -49
  547. package/es/esf/hooks/use-affiliation.d.ts +1 -0
  548. package/es/esf/hooks/use-affiliation.js +12 -16
  549. package/es/esf/hooks/use-booking-links.d.ts +1 -0
  550. package/es/esf/hooks/use-booking-links.js +52 -34
  551. package/es/esf/hooks/use-reviews.d.ts +2 -0
  552. package/es/esf/hooks/use-reviews.js +27 -22
  553. package/es/esf/hooks/use-season-products.d.ts +1 -0
  554. package/es/esf/hooks/use-season-products.js +83 -79
  555. package/es/future/components/msem/index.d.ts +3 -0
  556. package/es/future/components/msem/index.js +1 -1
  557. package/es/future/components/msem/script.d.ts +6 -0
  558. package/es/future/components/msem/script.jsx +7 -0
  559. package/es/future/components/msem/tunnel.d.ts +41 -0
  560. package/es/future/components/msem/tunnel.jsx +18 -0
  561. package/es/future/components/msem/types.d.ts +15 -0
  562. package/es/future/components/msem/types.js +1 -1
  563. package/es/future/components/msem/utils.d.ts +3 -0
  564. package/es/future/components/msem/utils.js +19 -16
  565. package/es/future/components/plausible/hooks/use-plausible.d.ts +11 -0
  566. package/es/future/components/plausible/hooks/use-plausible.js +18 -22
  567. package/es/future/components/plausible/index.d.ts +7 -0
  568. package/es/future/components/plausible/index.js +1 -1
  569. package/es/future/components/plausible/plausible.d.ts +7 -0
  570. package/es/future/components/plausible/plausible.jsx +17 -0
  571. package/es/future/components/plausible/services/callback.d.ts +23 -0
  572. package/es/future/components/plausible/services/callback.js +123 -186
  573. package/es/future/components/plausible/services/load.d.ts +1 -0
  574. package/es/future/components/plausible/services/load.js +6 -4
  575. package/es/future/components/plausible/services/send-goal.d.ts +6 -0
  576. package/es/future/components/plausible/services/send-goal.js +3 -6
  577. package/es/lbm/components/lumiplan/api.d.ts +8 -0
  578. package/es/lbm/components/lumiplan/api.js +60 -54
  579. package/es/lbm/components/lumiplan/domain.d.ts +7 -0
  580. package/es/lbm/components/lumiplan/domain.jsx +74 -0
  581. package/es/lbm/components/lumiplan/header.d.ts +8 -0
  582. package/es/lbm/components/lumiplan/header.jsx +25 -0
  583. package/es/lbm/components/lumiplan/i18n/translations.d.ts +7 -0
  584. package/es/lbm/components/lumiplan/i18n/translations.jsx +20 -0
  585. package/es/lbm/components/lumiplan/icons/alert.d.ts +6 -0
  586. package/es/lbm/components/lumiplan/icons/alert.js +6 -21
  587. package/es/lbm/components/lumiplan/icons/avalanche-risk.d.ts +6 -0
  588. package/es/lbm/components/lumiplan/icons/avalanche-risk.js +5 -14
  589. package/es/lbm/components/lumiplan/icons/cabin.d.ts +6 -0
  590. package/es/lbm/components/lumiplan/icons/cabin.js +5 -14
  591. package/es/lbm/components/lumiplan/icons/check.d.ts +6 -0
  592. package/es/lbm/components/lumiplan/icons/check.js +5 -16
  593. package/es/lbm/components/lumiplan/icons/close.d.ts +6 -0
  594. package/es/lbm/components/lumiplan/icons/close.js +6 -21
  595. package/es/lbm/components/lumiplan/icons/cloud.d.ts +6 -0
  596. package/es/lbm/components/lumiplan/icons/cloud.js +6 -20
  597. package/es/lbm/components/lumiplan/icons/dawn.d.ts +6 -0
  598. package/es/lbm/components/lumiplan/icons/dawn.js +6 -19
  599. package/es/lbm/components/lumiplan/icons/fog.d.ts +6 -0
  600. package/es/lbm/components/lumiplan/icons/fog.js +7 -23
  601. package/es/lbm/components/lumiplan/icons/heavy-snow.d.ts +6 -0
  602. package/es/lbm/components/lumiplan/icons/heavy-snow.js +10 -32
  603. package/es/lbm/components/lumiplan/icons/information.d.ts +6 -0
  604. package/es/lbm/components/lumiplan/icons/information.js +6 -21
  605. package/es/lbm/components/lumiplan/icons/isothermal.d.ts +6 -0
  606. package/es/lbm/components/lumiplan/icons/isothermal.js +10 -25
  607. package/es/lbm/components/lumiplan/icons/lifts/index.d.ts +5 -0
  608. package/es/lbm/components/lumiplan/icons/lifts/index.js +1 -1
  609. package/es/lbm/components/lumiplan/icons/lifts/tapis-roulant.d.ts +6 -0
  610. package/es/lbm/components/lumiplan/icons/lifts/tapis-roulant.js +5 -16
  611. package/es/lbm/components/lumiplan/icons/lifts/telecabine.d.ts +6 -0
  612. package/es/lbm/components/lumiplan/icons/lifts/telecabine.js +5 -16
  613. package/es/lbm/components/lumiplan/icons/lifts/telesiege-debrayable.d.ts +6 -0
  614. package/es/lbm/components/lumiplan/icons/lifts/telesiege-debrayable.js +8 -27
  615. package/es/lbm/components/lumiplan/icons/lifts/telesiege.d.ts +6 -0
  616. package/es/lbm/components/lumiplan/icons/lifts/telesiege.js +5 -16
  617. package/es/lbm/components/lumiplan/icons/lifts/teleski.d.ts +6 -0
  618. package/es/lbm/components/lumiplan/icons/lifts/teleski.js +5 -16
  619. package/es/lbm/components/lumiplan/icons/link.d.ts +6 -0
  620. package/es/lbm/components/lumiplan/icons/link.js +6 -17
  621. package/es/lbm/components/lumiplan/icons/night.d.ts +6 -0
  622. package/es/lbm/components/lumiplan/icons/night.js +5 -14
  623. package/es/lbm/components/lumiplan/icons/rain.d.ts +6 -0
  624. package/es/lbm/components/lumiplan/icons/rain.js +10 -24
  625. package/es/lbm/components/lumiplan/icons/rainy-rainy.d.ts +6 -0
  626. package/es/lbm/components/lumiplan/icons/rainy-rainy.js +6 -20
  627. package/es/lbm/components/lumiplan/icons/rainy.d.ts +6 -0
  628. package/es/lbm/components/lumiplan/icons/rainy.js +6 -20
  629. package/es/lbm/components/lumiplan/icons/reload.d.ts +6 -0
  630. package/es/lbm/components/lumiplan/icons/reload.js +13 -30
  631. package/es/lbm/components/lumiplan/icons/road-condition.d.ts +7 -0
  632. package/es/lbm/components/lumiplan/icons/road-condition.js +10 -28
  633. package/es/lbm/components/lumiplan/icons/slopes.d.ts +6 -0
  634. package/es/lbm/components/lumiplan/icons/slopes.js +5 -14
  635. package/es/lbm/components/lumiplan/icons/snow-cover.d.ts +7 -0
  636. package/es/lbm/components/lumiplan/icons/snow-cover.js +5 -16
  637. package/es/lbm/components/lumiplan/icons/snow.d.ts +6 -0
  638. package/es/lbm/components/lumiplan/icons/snow.js +8 -26
  639. package/es/lbm/components/lumiplan/icons/storm.d.ts +6 -0
  640. package/es/lbm/components/lumiplan/icons/storm.js +5 -15
  641. package/es/lbm/components/lumiplan/icons/sun.d.ts +6 -0
  642. package/es/lbm/components/lumiplan/icons/sun.js +5 -16
  643. package/es/lbm/components/lumiplan/icons/sunny.d.ts +6 -0
  644. package/es/lbm/components/lumiplan/icons/sunny.js +7 -23
  645. package/es/lbm/components/lumiplan/icons/time.d.ts +6 -0
  646. package/es/lbm/components/lumiplan/icons/time.js +6 -21
  647. package/es/lbm/components/lumiplan/icons/trails/accrobranche.d.ts +5 -0
  648. package/es/lbm/components/lumiplan/icons/trails/accrobranche.js +6 -17
  649. package/es/lbm/components/lumiplan/icons/trails/boarder-cross.d.ts +5 -0
  650. package/es/lbm/components/lumiplan/icons/trails/boarder-cross.js +7 -21
  651. package/es/lbm/components/lumiplan/icons/trails/champ-de-bosse.d.ts +5 -0
  652. package/es/lbm/components/lumiplan/icons/trails/champ-de-bosse.js +6 -19
  653. package/es/lbm/components/lumiplan/icons/trails/freeride.d.ts +5 -0
  654. package/es/lbm/components/lumiplan/icons/trails/freeride.js +5 -16
  655. package/es/lbm/components/lumiplan/icons/trails/index.d.ts +16 -0
  656. package/es/lbm/components/lumiplan/icons/trails/index.js +1 -1
  657. package/es/lbm/components/lumiplan/icons/trails/luge-sur-rail.d.ts +5 -0
  658. package/es/lbm/components/lumiplan/icons/trails/luge-sur-rail.js +6 -19
  659. package/es/lbm/components/lumiplan/icons/trails/luge.d.ts +5 -0
  660. package/es/lbm/components/lumiplan/icons/trails/luge.js +5 -16
  661. package/es/lbm/components/lumiplan/icons/trails/pieton.d.ts +5 -0
  662. package/es/lbm/components/lumiplan/icons/trails/pieton.js +5 -16
  663. package/es/lbm/components/lumiplan/icons/trails/piste-eclairee.d.ts +5 -0
  664. package/es/lbm/components/lumiplan/icons/trails/piste-eclairee.js +6 -19
  665. package/es/lbm/components/lumiplan/icons/trails/raquette.d.ts +5 -0
  666. package/es/lbm/components/lumiplan/icons/trails/raquette.js +17 -65
  667. package/es/lbm/components/lumiplan/icons/trails/ski-alpin.d.ts +5 -0
  668. package/es/lbm/components/lumiplan/icons/trails/ski-alpin.js +5 -16
  669. package/es/lbm/components/lumiplan/icons/trails/ski-fond.d.ts +5 -0
  670. package/es/lbm/components/lumiplan/icons/trails/ski-fond.js +5 -16
  671. package/es/lbm/components/lumiplan/icons/trails/snowpark.d.ts +5 -0
  672. package/es/lbm/components/lumiplan/icons/trails/snowpark.js +5 -16
  673. package/es/lbm/components/lumiplan/icons/trails/snowtubing.d.ts +5 -0
  674. package/es/lbm/components/lumiplan/icons/trails/snowtubing.js +7 -23
  675. package/es/lbm/components/lumiplan/icons/trails/tyrolienne.d.ts +5 -0
  676. package/es/lbm/components/lumiplan/icons/trails/tyrolienne.js +5 -16
  677. package/es/lbm/components/lumiplan/icons/trails/vtt.d.ts +5 -0
  678. package/es/lbm/components/lumiplan/icons/trails/vtt.js +6 -19
  679. package/es/lbm/components/lumiplan/icons/trails/zone-freeride.d.ts +5 -0
  680. package/es/lbm/components/lumiplan/icons/trails/zone-freeride.js +5 -16
  681. package/es/lbm/components/lumiplan/icons/variable-snow.d.ts +6 -0
  682. package/es/lbm/components/lumiplan/icons/variable-snow.js +9 -29
  683. package/es/lbm/components/lumiplan/icons/variable-storm.d.ts +6 -0
  684. package/es/lbm/components/lumiplan/icons/variable-storm.js +6 -22
  685. package/es/lbm/components/lumiplan/icons/variable.d.ts +6 -0
  686. package/es/lbm/components/lumiplan/icons/variable.js +6 -20
  687. package/es/lbm/components/lumiplan/icons/warning.d.ts +6 -0
  688. package/es/lbm/components/lumiplan/icons/warning.js +6 -21
  689. package/es/lbm/components/lumiplan/icons/wind.d.ts +7 -0
  690. package/es/lbm/components/lumiplan/icons/wind.js +13 -26
  691. package/es/lbm/components/lumiplan/index.d.ts +2 -0
  692. package/es/lbm/components/lumiplan/index.js +1 -1
  693. package/es/lbm/components/lumiplan/lumiplan.d.ts +2 -0
  694. package/es/lbm/components/lumiplan/lumiplan.jsx +179 -0
  695. package/es/lbm/components/lumiplan/opening.d.ts +8 -0
  696. package/es/lbm/components/lumiplan/opening.jsx +108 -0
  697. package/es/lbm/components/lumiplan/pois.d.ts +7 -0
  698. package/es/lbm/components/lumiplan/pois.jsx +233 -0
  699. package/es/lbm/components/lumiplan/print-button.d.ts +9 -0
  700. package/es/lbm/components/lumiplan/print-button.jsx +27 -0
  701. package/es/lbm/components/lumiplan/resort-selector.d.ts +12 -0
  702. package/es/lbm/components/lumiplan/resort-selector.jsx +47 -0
  703. package/es/lbm/components/lumiplan/road-condition.d.ts +7 -0
  704. package/es/lbm/components/lumiplan/road-condition.jsx +59 -0
  705. package/es/lbm/components/lumiplan/signature.d.ts +7 -0
  706. package/es/lbm/components/lumiplan/signature.jsx +12 -0
  707. package/es/lbm/components/lumiplan/todays-tips.d.ts +7 -0
  708. package/es/lbm/components/lumiplan/todays-tips.jsx +28 -0
  709. package/es/lbm/components/lumiplan/toolbar.d.ts +7 -0
  710. package/es/lbm/components/lumiplan/toolbar.jsx +15 -0
  711. package/es/lbm/components/lumiplan/types.d.ts +291 -0
  712. package/es/lbm/components/lumiplan/types.js +1 -1
  713. package/es/lbm/components/lumiplan/weather/avalanche-risk.d.ts +4 -0
  714. package/es/lbm/components/lumiplan/weather/avalanche-risk.jsx +22 -0
  715. package/es/lbm/components/lumiplan/weather/index.d.ts +2 -0
  716. package/es/lbm/components/lumiplan/weather/index.js +1 -1
  717. package/es/lbm/components/lumiplan/weather/snow-data.d.ts +8 -0
  718. package/es/lbm/components/lumiplan/weather/snow-data.jsx +44 -0
  719. package/es/lbm/components/lumiplan/weather/weather-data.d.ts +9 -0
  720. package/es/lbm/components/lumiplan/weather/weather-data.jsx +85 -0
  721. package/es/lbm/components/lumiplan/weather/weather-days.d.ts +7 -0
  722. package/es/lbm/components/lumiplan/weather/weather-days.jsx +60 -0
  723. package/es/lbm/components/lumiplan/weather/weather-icon.d.ts +68 -0
  724. package/es/lbm/components/lumiplan/weather/weather-icon.jsx +34 -0
  725. package/es/lbm/components/lumiplan/weather/weather-zones.d.ts +6 -0
  726. package/es/lbm/components/lumiplan/weather/weather-zones.jsx +56 -0
  727. package/es/lbm/components/lumiplan/weather/weather.d.ts +7 -0
  728. package/es/lbm/components/lumiplan/weather/weather.jsx +80 -0
  729. package/package.json +4 -13
  730. package/es/common/components/admin-links/admin-links.js +0 -102
  731. package/es/common/components/breadcrumb.js +0 -82
  732. package/es/common/components/collapsible/collapsible.js +0 -69
  733. package/es/common/components/cross-selling-editor/cross-selling-editor.js +0 -60
  734. package/es/common/components/cross-selling-editor/editor.js +0 -109
  735. package/es/common/components/cross-selling-editor/override-trigger-form.js +0 -166
  736. package/es/common/components/cross-selling-editor/override.js +0 -167
  737. package/es/common/components/cross-selling-editor/overrides-list.js +0 -131
  738. package/es/common/components/cross-selling-editor/rule.js +0 -105
  739. package/es/common/components/cross-selling-editor/rules.js +0 -86
  740. package/es/common/components/cross-selling-editor/tester-tunnel-offer.js +0 -65
  741. package/es/common/components/cross-selling-editor/tester.js +0 -197
  742. package/es/common/components/custom-contact-form/custom-contact-form.js +0 -164
  743. package/es/common/components/gesco-contact-form/gesco-contact-form.js +0 -262
  744. package/es/common/components/gesco-contact-form/phone-code-select.js +0 -81
  745. package/es/common/components/information/information.js +0 -58
  746. package/es/common/components/instant-search/input.js +0 -86
  747. package/es/common/components/instant-search/instant-search.js +0 -138
  748. package/es/common/components/instant-search/links.js +0 -81
  749. package/es/common/components/instant-search/no-product.js +0 -81
  750. package/es/common/components/instant-search/products.js +0 -129
  751. package/es/common/components/instant-search/results.js +0 -130
  752. package/es/common/components/msem-preset-editor/components/facet-selector.js +0 -40
  753. package/es/common/components/msem-preset-editor/components/form.js +0 -58
  754. package/es/common/components/msem-preset-editor/components/stay-picker.js +0 -74
  755. package/es/common/components/msem-preset-editor/components/widget-list-item.js +0 -137
  756. package/es/common/components/msem-preset-editor/components/widget-list.js +0 -59
  757. package/es/common/components/msem-preset-editor/editor-dialog.js +0 -74
  758. package/es/common/components/msem-preset-editor/editors/elloha.js +0 -113
  759. package/es/common/components/msem-preset-editor/editors/lodgings.js +0 -333
  760. package/es/common/components/msem-preset-editor/editors/ski-passes-jb.js +0 -130
  761. package/es/common/components/msem-preset-editor/editors/ski-passes.js +0 -285
  762. package/es/common/components/msem-preset-editor/editors/standard-products.js +0 -94
  763. package/es/common/components/msem-preset-editor/editors/vakario.js +0 -252
  764. package/es/common/components/msem-preset-editor/msem-preset-editor.js +0 -251
  765. package/es/common/components/msem-preset-linker/components/actions.js +0 -57
  766. package/es/common/components/msem-preset-linker/components/overlays.js +0 -68
  767. package/es/common/components/msem-preset-linker/components/resort-selector.js +0 -22
  768. package/es/common/components/msem-preset-linker/msem-preset-linker.js +0 -84
  769. package/es/common/components/plausible/plausible.js +0 -26
  770. package/es/common/components/scroll-spy.js +0 -59
  771. package/es/common/components/scrolling-carousel/scrolling-carousel.js +0 -105
  772. package/es/common/components/tabbed-zones.js +0 -103
  773. package/es/common/utils/msem-widget.js +0 -45
  774. package/es/esf/components/account-button/account-button.js +0 -40
  775. package/es/esf/components/magic-box/magic-box.js +0 -186
  776. package/es/esf/components/parcours-esf/parcours-esf.js +0 -52
  777. package/es/future/components/msem/script.js +0 -14
  778. package/es/future/components/msem/tunnel.js +0 -34
  779. package/es/future/components/plausible/plausible.js +0 -26
  780. package/es/lbm/components/lumiplan/domain.js +0 -118
  781. package/es/lbm/components/lumiplan/header.js +0 -39
  782. package/es/lbm/components/lumiplan/i18n/translations.js +0 -29
  783. package/es/lbm/components/lumiplan/lumiplan.js +0 -189
  784. package/es/lbm/components/lumiplan/opening.js +0 -147
  785. package/es/lbm/components/lumiplan/pois.js +0 -299
  786. package/es/lbm/components/lumiplan/print-button.js +0 -29
  787. package/es/lbm/components/lumiplan/resort-selector.js +0 -64
  788. package/es/lbm/components/lumiplan/road-condition.js +0 -108
  789. package/es/lbm/components/lumiplan/signature.js +0 -24
  790. package/es/lbm/components/lumiplan/todays-tips.js +0 -52
  791. package/es/lbm/components/lumiplan/toolbar.js +0 -31
  792. package/es/lbm/components/lumiplan/weather/avalanche-risk.js +0 -37
  793. package/es/lbm/components/lumiplan/weather/snow-data.js +0 -74
  794. package/es/lbm/components/lumiplan/weather/weather-data.js +0 -131
  795. package/es/lbm/components/lumiplan/weather/weather-days.js +0 -82
  796. package/es/lbm/components/lumiplan/weather/weather-icon.js +0 -37
  797. package/es/lbm/components/lumiplan/weather/weather-zones.js +0 -77
  798. package/es/lbm/components/lumiplan/weather/weather.js +0 -139
@@ -1,50 +1,35 @@
1
1
  import * as React from "react";
2
2
  import classNames from "classnames";
3
3
  import { weekToDate, formatShortDate } from "./utils";
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- import { jsxs as _jsxs } from "react/jsx-runtime";
6
- const Week = ({
7
- week,
8
- beginWeek,
9
- endWeek,
10
- selected,
11
- onClick,
12
- forceSeasonSwitch
13
- }) => {
14
- const now = new Date();
15
- const prevDate = weekToDate(week - 1, endWeek, forceSeasonSwitch);
16
- const currDate = weekToDate(week, endWeek, forceSeasonSwitch);
17
- const nextDate = weekToDate(week + 1, endWeek, forceSeasonSwitch);
18
- const prevYear = prevDate.getFullYear();
19
- const currYear = currDate.getFullYear();
20
- const isPast = now.getTime() > nextDate.getTime();
21
- const isFirst = week === beginWeek;
22
- const isLast = week === endWeek;
23
- const hasYearChanged = prevYear !== currYear;
24
- const showYear = isFirst || hasYearChanged;
25
- const weekClasses = classNames("week-picker__item", {
26
- "week-picker__item--selected": selected === week,
27
- "week-picker__item--past": isPast
28
- });
29
- const yearClasses = classNames("week-picker__year", {
30
- "week-picker__year--changed": hasYearChanged
31
- });
32
- return _jsx("div", {
33
- className: weekClasses,
34
- onClick: onClick,
35
- children: _jsxs("div", {
36
- className: "week-picker__date",
37
- children: [showYear && _jsx("span", {
38
- className: yearClasses,
39
- children: currYear
40
- }), _jsx("span", {
41
- className: "week-picker__item-from",
42
- children: formatShortDate(currDate)
43
- }), isLast && _jsx("span", {
44
- className: "week-picker__item-to",
45
- children: formatShortDate(nextDate)
46
- })]
47
- })
48
- });
4
+ const Week = ({ week, beginWeek, endWeek, selected, onClick, forceSeasonSwitch, }) => {
5
+ const now = new Date();
6
+ const prevDate = weekToDate(week - 1, endWeek, forceSeasonSwitch);
7
+ const currDate = weekToDate(week, endWeek, forceSeasonSwitch);
8
+ const nextDate = weekToDate(week + 1, endWeek, forceSeasonSwitch);
9
+ const prevYear = prevDate.getFullYear();
10
+ const currYear = currDate.getFullYear();
11
+ const isPast = now.getTime() > nextDate.getTime();
12
+ const isFirst = week === beginWeek;
13
+ const isLast = week === endWeek;
14
+ const hasYearChanged = prevYear !== currYear;
15
+ const showYear = isFirst || hasYearChanged;
16
+ const weekClasses = classNames("week-picker__item", {
17
+ "week-picker__item--selected": selected === week,
18
+ "week-picker__item--past": isPast,
19
+ });
20
+ const yearClasses = classNames("week-picker__year", {
21
+ "week-picker__year--changed": hasYearChanged,
22
+ });
23
+ return (<div className={weekClasses} onClick={onClick}>
24
+ <div className="week-picker__date">
25
+ {showYear && <span className={yearClasses}>{currYear}</span>}
26
+ <span className="week-picker__item-from">
27
+ {formatShortDate(currDate)}
28
+ </span>
29
+ {isLast && (<span className="week-picker__item-to">
30
+ {formatShortDate(nextDate)}
31
+ </span>)}
32
+ </div>
33
+ </div>);
49
34
  };
50
- export default Week;
35
+ export default Week;
@@ -0,0 +1,14 @@
1
+ declare const _default: React.MemoExoticComponent<({ lang, start, end, setClosed, cmsMode, customMessages, noRoughValidation, force, forceSeasonSwitch, onChange, }: {
2
+ lang: any;
3
+ start: any;
4
+ end: any;
5
+ setClosed: any;
6
+ cmsMode: any;
7
+ customMessages: any;
8
+ noRoughValidation?: boolean;
9
+ force?: boolean;
10
+ forceSeasonSwitch?: boolean;
11
+ onChange: any;
12
+ }) => React.JSX.Element>;
13
+ export default _default;
14
+ import * as React from "react";
@@ -1,277 +1,225 @@
1
1
  import * as React from "react";
2
- import { memo, useState, useEffect, useCallback, useRef, createRef } from "react";
2
+ import { memo, useState, useEffect, useCallback, useRef, createRef, } from "react";
3
3
  import classNames from "classnames";
4
4
  import Week from "./week";
5
5
  import { weekToLongDate, weekToDate, formatDate } from "./utils";
6
6
  import messages from "./messages";
7
7
  import { useUbloContext } from "ublo/with-ublo";
8
- import { jsx as _jsx } from "react/jsx-runtime";
9
- import { jsxs as _jsxs } from "react/jsx-runtime";
10
- import { Fragment as _Fragment } from "react/jsx-runtime";
11
8
  const WEEK_STORAGE = "stayWeek";
12
9
  const LEFT = 0;
13
10
  const RIGHT = 1;
14
11
  const buildWeeks = (start, end) => {
15
- const length = end - start;
16
- const array = [];
17
- for (let i = 0; i < length; i++) {
18
- array.push(start + i);
19
- }
20
- return array;
12
+ const length = end - start;
13
+ const array = [];
14
+ for (let i = 0; i < length; i++) {
15
+ array.push(start + i);
16
+ }
17
+ return array;
21
18
  };
22
19
  const getFiltrableSections = () => Array.from(document.querySelectorAll("section[data-weeks]"));
23
20
  const removeSectionFilters = () => {
24
- const filtrables = getFiltrableSections();
25
- filtrables.forEach(section => {
26
- if (section.originalDisplayStyle !== undefined && section.originalDisplayStyle !== "none") {
27
- section.style.display = section.originalDisplayStyle;
28
- } else {
29
- section.style.removeProperty("display");
30
- }
31
- section.removeAttribute("data-full");
32
- });
33
- };
34
- const filterSections = week => {
35
- const search = String(week);
36
- const filtrables = getFiltrableSections();
37
- filtrables.forEach(section => {
38
- const weeks = section.dataset.weeks.split(",").filter(week => week !== "");
39
- const hasFullWeeks = section.hasAttribute("data-full-weeks");
40
- const visible = weeks.length === 0 || weeks.includes(search);
41
- if (section.originalDisplayStyle === undefined) {
42
- section.originalDisplayStyle = section.style.display;
43
- }
44
- if (hasFullWeeks && visible) {
45
- const fullWeeks = section.dataset.fullWeeks.split(",").filter(week => week !== "");
46
- const isFull = fullWeeks.includes(search) && fullWeeks.every(week => weeks.includes(week));
47
- if (isFull) {
48
- section.setAttribute("data-full", "true");
49
- } else {
21
+ const filtrables = getFiltrableSections();
22
+ filtrables.forEach((section) => {
23
+ if (section.originalDisplayStyle !== undefined &&
24
+ section.originalDisplayStyle !== "none") {
25
+ section.style.display = section.originalDisplayStyle;
26
+ }
27
+ else {
28
+ section.style.removeProperty("display");
29
+ }
50
30
  section.removeAttribute("data-full");
51
- }
52
- }
53
- section.style.display = visible ? section.originalDisplayStyle : "none";
54
- });
31
+ });
55
32
  };
56
- const WeekPicker = ({
57
- lang,
58
- start,
59
- end,
60
- setClosed,
61
- cmsMode,
62
- customMessages,
63
- noRoughValidation = false,
64
- force = false,
65
- forceSeasonSwitch = false,
66
- onChange
67
- }) => {
68
- const {
69
- path
70
- } = useUbloContext();
71
- const [isBrowser, setBrowser] = useState(false);
72
- const [warn, setWarn] = useState(-1);
73
- const [opened, setOpened] = useState(true);
74
- const [selected, setSelected] = useState();
75
- const previous = createRef();
76
- const ref = useRef();
77
- const mustFilterSections = cmsMode === undefined;
78
- const texts = messages(lang, customMessages);
79
- const weekPickerTitle = texts["week-picker-title"];
80
- const weekPickedSelectedTitle = texts["week-picker-selected-title"];
81
- const weekPickerWarn = texts["week-picker-warn"];
82
- const weekPickerOk = texts["week-picker-ok"];
83
- const weekPickerCancel = texts["week-picker-cancel"];
84
- const weeks = buildWeeks(start, end);
85
- const endWeek = weeks[weeks.length - 1];
86
- const beginWeek = weeks[0];
87
- const showDialog = force && selected === null;
88
- const pickerClasses = classNames("week-picker", {
89
- "week-picker--dialog-opened": showDialog && mustFilterSections,
90
- "week-picker--inline": force,
91
- "week-picker--editing": !mustFilterSections
92
- });
93
- const selectWeek = useCallback((week, force = false) => {
94
- const hasCart = window.sessionStorage.cartId !== undefined;
95
- if (force || !hasCart) {
96
- if (previous.current !== undefined && previous.current !== null && previous.current !== week) {
97
- window.sessionStorage.removeItem("cartId");
98
- }
99
- setWarn(-1);
100
- setSelected(week);
101
- previous.current = week;
102
- if (mustFilterSections && week !== null && week !== undefined) {
103
- filterSections(week, mustFilterSections);
104
- } else {
105
- removeSectionFilters();
106
- }
107
- } else {
108
- setWarn(week);
109
- }
110
- }, [mustFilterSections]);
111
- useEffect(() => {
112
- if (!mustFilterSections) {
113
- removeSectionFilters();
114
- }
115
- }, [mustFilterSections]);
116
- useEffect(() => {
117
- const stored = window.sessionStorage.getItem(WEEK_STORAGE);
118
- selectWeek(stored !== null ? Number(stored) : null, true);
119
- setBrowser(true);
120
- }, [selectWeek, lang, path]);
121
- useEffect(() => {
122
- if (selected !== null && selected !== undefined) {
123
- const stored = window.sessionStorage.getItem(WEEK_STORAGE);
124
- const storedSelected = stored !== null ? Number(stored) : null;
125
- if (storedSelected !== selected) {
126
- window.sessionStorage.setItem(WEEK_STORAGE, selected);
127
- const startDate = weekToDate(selected, endWeek, forceSeasonSwitch);
128
- const endDate = weekToDate(selected + 1, endWeek, forceSeasonSwitch);
129
- const range = {
130
- from: formatDate(startDate),
131
- to: formatDate(endDate)
132
- };
133
- window.sessionStorage.stay = JSON.stringify(range);
134
- window.sessionStorage.Stay = JSON.stringify(range);
135
- if (typeof onChange === "function") {
136
- onChange(range);
33
+ const filterSections = (week) => {
34
+ const search = String(week);
35
+ const filtrables = getFiltrableSections();
36
+ filtrables.forEach((section) => {
37
+ const weeks = section.dataset.weeks
38
+ .split(",")
39
+ .filter((week) => week !== "");
40
+ const hasFullWeeks = section.hasAttribute("data-full-weeks");
41
+ const visible = weeks.length === 0 || weeks.includes(search);
42
+ if (section.originalDisplayStyle === undefined) {
43
+ section.originalDisplayStyle = section.style.display;
137
44
  }
138
- if (!noRoughValidation) {
139
- window.sessionStorage.roughStay = true;
45
+ if (hasFullWeeks && visible) {
46
+ const fullWeeks = section.dataset.fullWeeks
47
+ .split(",")
48
+ .filter((week) => week !== "");
49
+ const isFull = fullWeeks.includes(search) &&
50
+ fullWeeks.every((week) => weeks.includes(week));
51
+ if (isFull) {
52
+ section.setAttribute("data-full", "true");
53
+ }
54
+ else {
55
+ section.removeAttribute("data-full");
56
+ }
140
57
  }
141
- }
142
- }
143
- }, [selected, endWeek, noRoughValidation, forceSeasonSwitch, onChange]);
144
- useEffect(() => {
145
- const bar = ref.current;
146
- if (selected === undefined || !bar) return;
147
- const selectedItem = bar.querySelector(".week-picker__item--selected");
148
- if (!selectedItem) return;
149
- const {
150
- clientWidth,
151
- offsetLeft
152
- } = selectedItem;
153
- bar.scrollLeft = offsetLeft - clientWidth;
154
- }, [selected]);
155
- const scrollTo = direction => {
156
- const bar = ref.current;
157
- if (!bar) return;
158
- const currentScroll = bar.scrollLeft;
159
- if (direction === LEFT) {
160
- bar.scrollLeft = currentScroll - 200;
161
- }
162
- if (direction === RIGHT) {
163
- bar.scrollLeft = currentScroll + 200;
164
- }
165
- };
166
- const select = week => () => {
167
- selectWeek(week);
168
- if (setClosed !== undefined) {
169
- setClosed(week);
170
- }
171
- };
172
- const selectAndClose = week => {
173
- selectWeek(week);
174
- setOpened(false);
175
- };
176
- return _jsxs(_Fragment, {
177
- children: [_jsx("div", {
178
- className: pickerClasses,
179
- children: isBrowser && _jsxs(_Fragment, {
180
- children: [_jsx("div", {
181
- className: "week-picker__top",
182
- children: _jsxs("div", {
183
- className: "week-picker__text",
184
- children: [_jsxs("div", {
185
- className: "week-picker__controls",
186
- children: [_jsx("button", {
187
- className: "week-picker__control",
188
- onClick: () => scrollTo(LEFT),
189
- "aria-label": "Previous",
190
- children: _jsx("svg", {
191
- viewBox: "0 0 24 24",
192
- width: "24",
193
- height: "24",
194
- children: _jsx("path", {
195
- d: "M20 3l-3-3L5 12l12 12 3-3-9-9 9-9z"
196
- })
197
- })
198
- }), _jsx("button", {
199
- className: "week-picker__control",
200
- onClick: () => scrollTo(RIGHT),
201
- "aria-label": "Next",
202
- children: _jsx("svg", {
203
- viewBox: "0 0 24 24",
204
- width: "24",
205
- height: "24",
206
- children: _jsx("path", {
207
- d: "M5 3l3-3 12 12L8 24l-3-3 9-9-9-9z"
208
- })
209
- })
210
- })]
211
- }), selected === null && _jsx("div", {
212
- className: "week-picker__title",
213
- dangerouslySetInnerHTML: {
214
- __html: weekPickerTitle
215
- }
216
- }), selected !== undefined && selected !== null && _jsx("div", {
217
- className: "week-picker__title",
218
- dangerouslySetInnerHTML: {
219
- __html: `${weekPickedSelectedTitle} <span>${weekToLongDate(selected, endWeek, forceSeasonSwitch)}</span>`
220
- }
221
- })]
222
- })
223
- }), _jsxs("div", {
224
- className: "week-picker__bottom",
225
- children: [_jsx("div", {
226
- ref: ref,
227
- className: "week-picker__bar",
228
- children: weeks.map(week => _jsx(Week, {
229
- week: week,
230
- beginWeek: beginWeek,
231
- endWeek: endWeek,
232
- selected: selected,
233
- onClick: select(week),
234
- forceSeasonSwitch: forceSeasonSwitch
235
- }, week))
236
- }), warn !== -1 && _jsx("div", {
237
- className: "week-picker__warn",
238
- children: _jsxs("div", {
239
- className: "week-picker__warn-inner",
240
- children: [_jsx("div", {
241
- className: "week-picker__warn-text",
242
- children: weekPickerWarn
243
- }), _jsxs("div", {
244
- className: "week-picker__warn-buttons",
245
- children: [_jsx("button", {
246
- className: "week-picker__warn-button",
247
- onClick: () => setWarn(-1),
248
- children: weekPickerCancel
249
- }), _jsx("button", {
250
- className: "week-picker__warn-button",
251
- onClick: () => selectWeek(warn, true),
252
- children: weekPickerOk
253
- })]
254
- })]
255
- })
256
- })]
257
- })]
258
- })
259
- }), mustFilterSections && isBrowser && showDialog && opened && _jsx("div", {
260
- className: "week-picker-popup",
261
- children: _jsx("div", {
262
- className: "week-picker-popup__inner",
263
- children: _jsx("div", {
264
- className: "week-picker-popup__content",
265
- children: _jsx(WeekPicker, {
266
- lang: lang,
267
- start: start,
268
- end: end,
269
- setClosed: selectAndClose,
270
- forceSeasonSwitch: forceSeasonSwitch
271
- })
272
- })
273
- })
274
- })]
275
- });
58
+ section.style.display = visible ? section.originalDisplayStyle : "none";
59
+ });
60
+ };
61
+ const WeekPicker = ({ lang, start, end, setClosed, cmsMode, customMessages, noRoughValidation = false, force = false, forceSeasonSwitch = false, onChange, }) => {
62
+ const { path } = useUbloContext();
63
+ const [isBrowser, setBrowser] = useState(false);
64
+ const [warn, setWarn] = useState(-1);
65
+ const [opened, setOpened] = useState(true);
66
+ const [selected, setSelected] = useState();
67
+ const previous = createRef();
68
+ const ref = useRef();
69
+ const mustFilterSections = cmsMode === undefined;
70
+ const texts = messages(lang, customMessages);
71
+ const weekPickerTitle = texts["week-picker-title"];
72
+ const weekPickedSelectedTitle = texts["week-picker-selected-title"];
73
+ const weekPickerWarn = texts["week-picker-warn"];
74
+ const weekPickerOk = texts["week-picker-ok"];
75
+ const weekPickerCancel = texts["week-picker-cancel"];
76
+ const weeks = buildWeeks(start, end);
77
+ const endWeek = weeks[weeks.length - 1];
78
+ const beginWeek = weeks[0];
79
+ const showDialog = force && selected === null;
80
+ const pickerClasses = classNames("week-picker", {
81
+ "week-picker--dialog-opened": showDialog && mustFilterSections,
82
+ "week-picker--inline": force,
83
+ "week-picker--editing": !mustFilterSections,
84
+ });
85
+ const selectWeek = useCallback((week, force = false) => {
86
+ const hasCart = window.sessionStorage.cartId !== undefined;
87
+ if (force || !hasCart) {
88
+ if (previous.current !== undefined &&
89
+ previous.current !== null &&
90
+ previous.current !== week) {
91
+ window.sessionStorage.removeItem("cartId");
92
+ }
93
+ setWarn(-1);
94
+ setSelected(week);
95
+ previous.current = week;
96
+ if (mustFilterSections && week !== null && week !== undefined) {
97
+ filterSections(week, mustFilterSections);
98
+ }
99
+ else {
100
+ removeSectionFilters();
101
+ }
102
+ }
103
+ else {
104
+ setWarn(week);
105
+ }
106
+ },
107
+ // eslint-disable-next-line react-hooks/exhaustive-deps
108
+ [mustFilterSections]);
109
+ useEffect(() => {
110
+ if (!mustFilterSections) {
111
+ removeSectionFilters();
112
+ }
113
+ }, [mustFilterSections]);
114
+ useEffect(() => {
115
+ const stored = window.sessionStorage.getItem(WEEK_STORAGE);
116
+ selectWeek(stored !== null ? Number(stored) : null, true);
117
+ setBrowser(true);
118
+ }, [selectWeek, lang, path]);
119
+ useEffect(() => {
120
+ if (selected !== null && selected !== undefined) {
121
+ const stored = window.sessionStorage.getItem(WEEK_STORAGE);
122
+ const storedSelected = stored !== null ? Number(stored) : null;
123
+ if (storedSelected !== selected) {
124
+ window.sessionStorage.setItem(WEEK_STORAGE, selected);
125
+ const startDate = weekToDate(selected, endWeek, forceSeasonSwitch);
126
+ const endDate = weekToDate(selected + 1, endWeek, forceSeasonSwitch);
127
+ const range = { from: formatDate(startDate), to: formatDate(endDate) };
128
+ window.sessionStorage.stay = JSON.stringify(range);
129
+ window.sessionStorage.Stay = JSON.stringify(range);
130
+ if (typeof onChange === "function") {
131
+ onChange(range);
132
+ }
133
+ if (!noRoughValidation) {
134
+ window.sessionStorage.roughStay = true;
135
+ }
136
+ }
137
+ }
138
+ }, [selected, endWeek, noRoughValidation, forceSeasonSwitch, onChange]);
139
+ useEffect(() => {
140
+ const bar = ref.current;
141
+ if (selected === undefined || !bar)
142
+ return;
143
+ const selectedItem = bar.querySelector(".week-picker__item--selected");
144
+ if (!selectedItem)
145
+ return;
146
+ const { clientWidth, offsetLeft } = selectedItem;
147
+ bar.scrollLeft = offsetLeft - clientWidth;
148
+ }, [selected]);
149
+ const scrollTo = (direction) => {
150
+ const bar = ref.current;
151
+ if (!bar)
152
+ return;
153
+ const currentScroll = bar.scrollLeft;
154
+ if (direction === LEFT) {
155
+ bar.scrollLeft = currentScroll - 200;
156
+ }
157
+ if (direction === RIGHT) {
158
+ bar.scrollLeft = currentScroll + 200;
159
+ }
160
+ };
161
+ const select = (week) => () => {
162
+ selectWeek(week);
163
+ if (setClosed !== undefined) {
164
+ setClosed(week);
165
+ }
166
+ };
167
+ const selectAndClose = (week) => {
168
+ selectWeek(week);
169
+ setOpened(false);
170
+ };
171
+ return (<>
172
+ <div className={pickerClasses}>
173
+ {isBrowser && (<>
174
+ <div className="week-picker__top">
175
+ <div className="week-picker__text">
176
+ <div className="week-picker__controls">
177
+ <button className="week-picker__control" onClick={() => scrollTo(LEFT)} aria-label="Previous">
178
+ <svg viewBox="0 0 24 24" width="24" height="24">
179
+ <path d="M20 3l-3-3L5 12l12 12 3-3-9-9 9-9z"/>
180
+ </svg>
181
+ </button>
182
+ <button className="week-picker__control" onClick={() => scrollTo(RIGHT)} aria-label="Next">
183
+ <svg viewBox="0 0 24 24" width="24" height="24">
184
+ <path d="M5 3l3-3 12 12L8 24l-3-3 9-9-9-9z"/>
185
+ </svg>
186
+ </button>
187
+ </div>
188
+ {selected === null && (<div className="week-picker__title" dangerouslySetInnerHTML={{ __html: weekPickerTitle }}/>)}
189
+ {selected !== undefined && selected !== null && (<div className="week-picker__title" dangerouslySetInnerHTML={{
190
+ __html: `${weekPickedSelectedTitle} <span>${weekToLongDate(selected, endWeek, forceSeasonSwitch)}</span>`,
191
+ }}/>)}
192
+ </div>
193
+ </div>
194
+ <div className="week-picker__bottom">
195
+ <div ref={ref} className="week-picker__bar">
196
+ {weeks.map((week) => (<Week key={week} week={week} beginWeek={beginWeek} endWeek={endWeek} selected={selected} onClick={select(week)} forceSeasonSwitch={forceSeasonSwitch}/>))}
197
+ </div>
198
+ {warn !== -1 && (<div className="week-picker__warn">
199
+ <div className="week-picker__warn-inner">
200
+ <div className="week-picker__warn-text">
201
+ {weekPickerWarn}
202
+ </div>
203
+ <div className="week-picker__warn-buttons">
204
+ <button className="week-picker__warn-button" onClick={() => setWarn(-1)}>
205
+ {weekPickerCancel}
206
+ </button>
207
+ <button className="week-picker__warn-button" onClick={() => selectWeek(warn, true)}>
208
+ {weekPickerOk}
209
+ </button>
210
+ </div>
211
+ </div>
212
+ </div>)}
213
+ </div>
214
+ </>)}
215
+ </div>
216
+ {mustFilterSections && isBrowser && showDialog && opened && (<div className="week-picker-popup">
217
+ <div className="week-picker-popup__inner">
218
+ <div className="week-picker-popup__content">
219
+ <WeekPicker lang={lang} start={start} end={end} setClosed={selectAndClose} forceSeasonSwitch={forceSeasonSwitch}/>
220
+ </div>
221
+ </div>
222
+ </div>)}
223
+ </>);
276
224
  };
277
- export default memo(WeekPicker);
225
+ export default memo(WeekPicker);
@@ -0,0 +1,31 @@
1
+ export default getMessage;
2
+ declare function getMessage(lang: any, messages?: {
3
+ fr: {
4
+ "week-picker-title": string;
5
+ "week-picker-selected-title": string;
6
+ "week-picker-warn": string;
7
+ "week-picker-ok": string;
8
+ "week-picker-cancel": string;
9
+ };
10
+ en: {
11
+ "week-picker-title": string;
12
+ "week-picker-selected-title": string;
13
+ "week-picker-warn": string;
14
+ "week-picker-ok": string;
15
+ "week-picker-cancel": string;
16
+ };
17
+ es: {
18
+ "week-picker-title": string;
19
+ "week-picker-selected-title": string;
20
+ "week-picker-warn": string;
21
+ "week-picker-ok": string;
22
+ "week-picker-cancel": string;
23
+ };
24
+ nl: {
25
+ "week-picker-title": string;
26
+ "week-picker-selected-title": string;
27
+ "week-picker-warn": string;
28
+ "week-picker-ok": string;
29
+ "week-picker-cancel": string;
30
+ };
31
+ }): any;