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
@@ -2,364 +2,309 @@ import * as React from "react";
2
2
  import classNames from "classnames";
3
3
  import { useUbloContext } from "ublo/with-ublo";
4
4
  import * as Icons from "dt-design-system/es/icons";
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
- import { jsxs as _jsxs } from "react/jsx-runtime";
7
5
  const TARGETS = "section[data-class]";
8
6
  const UNDRAGGABLE_TAGS = "img, a, button";
9
7
  export default React.memo(Carousel);
10
- function Carousel({
11
- delay = 4000,
12
- fade = false,
13
- controls,
14
- dots,
15
- thumbnails,
16
- alwaysShowControls,
17
- allowDragOnDesktop,
18
- children,
19
- onChange
20
- }) {
21
- const carouselRef = React.useRef();
22
- const {
23
- cmsMode,
24
- lang,
25
- path
26
- } = useUbloContext();
27
- const [sections, setSections] = React.useState([]);
28
- const [current, setCurrent] = React.useState(0);
29
- const [touchStartPosition, setTouchStartPosition] = React.useState();
30
- const [dragging, setDragging] = React.useState(0);
31
- const editing = cmsMode === "editing";
32
- const draggingAllowed = !editing && allowDragOnDesktop;
33
- const count = sections.length;
34
- const showNextArrow = current < count - 1;
35
- const showPrevArrow = current !== 0;
36
- const next = React.useCallback(e => {
37
- e?.stopPropagation();
38
- setCurrent(euclideanModulo(current + 1, count));
39
- }, [current, count]);
40
- const prev = React.useCallback(e => {
41
- e?.stopPropagation();
42
- setCurrent(euclideanModulo(current - 1, count));
43
- }, [current, count]);
44
- const onTouchStart = e => {
45
- if (fade) return;
46
- const {
47
- type
48
- } = e;
49
- const mousedown = type === "mousedown";
50
- const cancel = !draggingAllowed && mousedown;
51
- if (cancel || touchStartPosition || !mousedown && !e.targetTouches?.length) {
52
- const carousel = carouselRef.current;
53
- const inner = carousel.firstElementChild;
54
- inner.style.transform = `translateX(${-current * 100}%)`;
55
- inner.style.removeProperty("transition");
56
- setDragging(undefined);
57
- setTouchStartPosition(undefined);
58
- return;
59
- }
60
- const {
61
- clientX: startX,
62
- clientY: startY
63
- } = mousedown ? e : e.targetTouches[0];
64
- setTouchStartPosition({
65
- startX,
66
- startY
67
- });
68
- };
69
- const onTouchMove = e => {
70
- if (fade) return;
71
- const {
72
- type
73
- } = e;
74
- const mousemove = type === "mousemove";
75
- const cancel = !draggingAllowed && mousemove;
76
- if (!touchStartPosition || cancel || !mousemove && !e.targetTouches?.length) {
77
- setTouchStartPosition(undefined);
78
- return;
79
- }
80
- const {
81
- startX
82
- } = touchStartPosition;
83
- const {
84
- clientX: endX
85
- } = mousemove ? e : e.targetTouches[0];
86
- const deltaX = startX - endX;
87
- const operator = deltaX > 0 ? "-" : "+";
88
- const carousel = carouselRef.current;
89
- const inner = carousel.firstElementChild;
90
- const transform = `translateX(calc(${-current * 100}% ${operator} ${Math.abs(deltaX)}px))`;
91
- Object.assign(inner.style, {
92
- transform,
93
- transition: "none"
94
- });
95
- setDragging(deltaX);
96
- };
97
- const onTouchEnd = e => {
98
- if (fade) return;
99
- const {
100
- type
101
- } = e;
102
- const mouseup = type === "mouseup";
103
- const cancel = !draggingAllowed && mouseup;
104
- setDragging(undefined);
105
- const carousel = carouselRef.current;
106
- const inner = carousel.firstElementChild;
107
- if (!touchStartPosition || cancel || !mouseup && !e.changedTouches?.length) {
108
- inner.style.transform = `translateX(${-current * 100}%)`;
109
- inner.style.removeProperty("transition");
110
- setTouchStartPosition(undefined);
111
- return;
112
- }
113
- inner.style.transform = `translateX(${-current * 100}%)`;
114
- inner.style.removeProperty("transition");
115
- const {
116
- startX,
117
- startY
118
- } = touchStartPosition;
119
- const {
120
- clientX: endX,
121
- clientY: endY
122
- } = mouseup ? e : e.changedTouches[0];
123
- const deltaX = Math.abs(startX - endX);
124
- const deltaY = Math.abs(startY - endY);
125
- if (deltaX < 80 && deltaX < deltaY) {
126
- inner.style.transform = `translateX(${-current * 100}%)`;
127
- inner.style.removeProperty("transition");
128
- setTouchStartPosition(undefined);
129
- return;
130
- }
131
- if (startX < endX && current > 0) prev();
132
- if (startX > endX && current < count - 1) next();
133
- setTouchStartPosition(undefined);
134
- };
135
- const getSections = React.useCallback(() => {
136
- const carousel = carouselRef.current;
137
- const sections = carousel.querySelectorAll(TARGETS);
138
- const visibleSections = Array.from(sections).filter(section => {
139
- return window.getComputedStyle(section).display !== "none";
140
- });
141
- return visibleSections;
142
- }, []);
143
- const updateSections = React.useCallback(() => {
144
- const sections = getSections();
145
- setSections(sections);
146
- }, [getSections]);
147
- React.useEffect(() => {
148
- const zone = carouselRef.current?.querySelector(".cms");
149
- if (zone) {
150
- zone.addEventListener("ublo-section-created", updateSections);
151
- zone.addEventListener("ublo-section-pasted", updateSections);
152
- zone.addEventListener("ublo-section-removed", updateSections);
153
- return () => {
154
- zone.removeEventListener("ublo-section-removed", updateSections);
155
- zone.removeEventListener("ublo-section-pasted", updateSections);
156
- zone.removeEventListener("ublo-section-created", updateSections);
157
- };
158
- }
159
- }, [updateSections]);
160
- React.useEffect(() => {
161
- const carousel = carouselRef.current;
162
- const inner = carousel.firstElementChild;
163
- const sections = getSections();
164
- const undraggableElements = Array.from(carousel.querySelectorAll(UNDRAGGABLE_TAGS));
165
- setSections(sections);
166
- if (!editing) {
167
- sections.forEach((section, index) => {
168
- const anchors = Array.from(section.querySelectorAll("a"));
169
- anchors.forEach(anchor => {
170
- anchor.setAttribute("tabindex", current === index ? "0" : "-1");
8
+ function Carousel({ delay = 4000, fade = false, controls, dots, thumbnails, alwaysShowControls, allowDragOnDesktop, children, onChange, }) {
9
+ const carouselRef = React.useRef();
10
+ const { cmsMode, lang, path } = useUbloContext();
11
+ const [sections, setSections] = React.useState([]);
12
+ const [current, setCurrent] = React.useState(0);
13
+ const [touchStartPosition, setTouchStartPosition] = React.useState();
14
+ const [dragging, setDragging] = React.useState(0);
15
+ const editing = cmsMode === "editing";
16
+ const draggingAllowed = !editing && allowDragOnDesktop;
17
+ const count = sections.length;
18
+ const showNextArrow = current < count - 1;
19
+ const showPrevArrow = current !== 0;
20
+ const next = React.useCallback((e) => {
21
+ e === null || e === void 0 ? void 0 : e.stopPropagation();
22
+ setCurrent(euclideanModulo(current + 1, count));
23
+ }, [current, count]);
24
+ const prev = React.useCallback((e) => {
25
+ e === null || e === void 0 ? void 0 : e.stopPropagation();
26
+ setCurrent(euclideanModulo(current - 1, count));
27
+ }, [current, count]);
28
+ const onTouchStart = (e) => {
29
+ var _a;
30
+ if (fade)
31
+ return;
32
+ const { type } = e;
33
+ const mousedown = type === "mousedown";
34
+ const cancel = !draggingAllowed && mousedown;
35
+ if (cancel ||
36
+ touchStartPosition ||
37
+ (!mousedown && !((_a = e.targetTouches) === null || _a === void 0 ? void 0 : _a.length))) {
38
+ const carousel = carouselRef.current;
39
+ const inner = carousel.firstElementChild;
40
+ inner.style.transform = `translateX(${-current * 100}%)`;
41
+ inner.style.removeProperty("transition");
42
+ setDragging(undefined);
43
+ setTouchStartPosition(undefined);
44
+ return;
45
+ }
46
+ const { clientX: startX, clientY: startY } = mousedown
47
+ ? e
48
+ : e.targetTouches[0];
49
+ setTouchStartPosition({ startX, startY });
50
+ };
51
+ const onTouchMove = (e) => {
52
+ var _a;
53
+ if (fade)
54
+ return;
55
+ const { type } = e;
56
+ const mousemove = type === "mousemove";
57
+ const cancel = !draggingAllowed && mousemove;
58
+ if (!touchStartPosition ||
59
+ cancel ||
60
+ (!mousemove && !((_a = e.targetTouches) === null || _a === void 0 ? void 0 : _a.length))) {
61
+ setTouchStartPosition(undefined);
62
+ return;
63
+ }
64
+ const { startX } = touchStartPosition;
65
+ const { clientX: endX } = mousemove ? e : e.targetTouches[0];
66
+ const deltaX = startX - endX;
67
+ const operator = deltaX > 0 ? "-" : "+";
68
+ const carousel = carouselRef.current;
69
+ const inner = carousel.firstElementChild;
70
+ const transform = `translateX(calc(${-current * 100}% ${operator} ${Math.abs(deltaX)}px))`;
71
+ Object.assign(inner.style, {
72
+ transform,
73
+ transition: "none",
171
74
  });
172
- });
173
- undraggableElements.forEach(preventDrag);
174
- }
175
- if (!fade || editing) {
176
- sections.forEach((section, index) => {
177
- show(section);
178
- if (!editing && current === index) {
179
- section.setAttribute("data-current", "");
180
- } else {
181
- section.removeAttribute("data-current");
75
+ setDragging(deltaX);
76
+ };
77
+ const onTouchEnd = (e) => {
78
+ var _a;
79
+ if (fade)
80
+ return;
81
+ const { type } = e;
82
+ const mouseup = type === "mouseup";
83
+ const cancel = !draggingAllowed && mouseup;
84
+ setDragging(undefined);
85
+ const carousel = carouselRef.current;
86
+ const inner = carousel.firstElementChild;
87
+ if (!touchStartPosition ||
88
+ cancel ||
89
+ (!mouseup && !((_a = e.changedTouches) === null || _a === void 0 ? void 0 : _a.length))) {
90
+ inner.style.transform = `translateX(${-current * 100}%)`;
91
+ inner.style.removeProperty("transition");
92
+ setTouchStartPosition(undefined);
93
+ return;
182
94
  }
183
- });
184
- inner.style.transform = `translateX(${-current * 100}%)`;
185
- inner.style.removeProperty("transition");
186
- } else {
187
- undraggableElements.forEach(enableDrag);
188
- sections.forEach((section, index) => {
189
- if (current === index) {
190
- show(section);
191
- section.setAttribute("data-current", "");
192
- } else {
193
- section.removeAttribute("data-current");
194
- Object.assign(section.style, {
195
- opacity: 0,
196
- pointerEvents: "none",
197
- touchAction: "none"
198
- });
95
+ inner.style.transform = `translateX(${-current * 100}%)`;
96
+ inner.style.removeProperty("transition");
97
+ const { startX, startY } = touchStartPosition;
98
+ const { clientX: endX, clientY: endY } = mouseup ? e : e.changedTouches[0];
99
+ const deltaX = Math.abs(startX - endX);
100
+ const deltaY = Math.abs(startY - endY);
101
+ if (deltaX < 80 && deltaX < deltaY) {
102
+ inner.style.transform = `translateX(${-current * 100}%)`;
103
+ inner.style.removeProperty("transition");
104
+ setTouchStartPosition(undefined);
105
+ return;
199
106
  }
200
- });
201
- if (fade) inner.style.removeProperty("transform");
202
- }
203
- }, [current, editing, fade, getSections, lang, path]);
204
- const onUndraggableElementClick = React.useCallback(e => {
205
- e.preventDefault();
206
- e.stopPropagation();
207
- }, []);
208
- React.useEffect(() => {
209
- if (typeof onChange === "function") {
210
- onChange(current);
211
- }
212
- }, [current, onChange]);
213
- React.useEffect(() => {
214
- const carousel = carouselRef.current;
215
- const inner = carousel.firstElementChild;
216
- const undraggableElements = Array.from(inner.querySelectorAll(UNDRAGGABLE_TAGS));
217
- if (dragging) {
218
- undraggableElements.forEach(element => element.addEventListener("click", onUndraggableElementClick));
219
- } else {
220
- undraggableElements.forEach(element => setTimeout(() => element.removeEventListener("click", onUndraggableElementClick), 100));
221
- }
222
- }, [dragging, onUndraggableElementClick]);
223
- useInterval(() => {
224
- if (!editing) next();
225
- }, delay, current, dragging);
226
- const classes = classNames("carousel", {
227
- carousel__fade: fade && !editing,
228
- carousel__editing: editing
229
- });
230
- const eventHandlers = {
231
- onMouseDown: onTouchStart,
232
- onTouchStart,
233
- onMouseMove: onTouchMove,
234
- onTouchMove,
235
- onMouseUp: onTouchEnd,
236
- onTouchEnd,
237
- onMouseLeave: onTouchEnd
238
- };
239
- return _jsxs("div", {
240
- ref: carouselRef,
241
- className: classes,
242
- ...eventHandlers,
243
- children: [children, (editing || controls && showPrevArrow || alwaysShowControls) && _jsx("button", {
244
- className: "carousel--prev",
245
- onClick: prev,
246
- disabled: alwaysShowControls && !showPrevArrow,
247
- "aria-label": "Pr\xE9cedent / Previous",
248
- children: _jsx(Icons.ArrowLeft, {
249
- className: "carousel--icon"
250
- })
251
- }), (editing || controls && showNextArrow || alwaysShowControls) && _jsx("button", {
252
- className: "carousel--next",
253
- onClick: next,
254
- disabled: alwaysShowControls && !showNextArrow,
255
- "aria-label": "Suivant / Next",
256
- children: _jsx(Icons.ArrowRight, {
257
- className: "carousel--icon"
258
- })
259
- }), dots && _jsx(Dots, {
260
- count: count,
261
- current: current,
262
- setCurrent: setCurrent,
263
- sections: sections
264
- }), thumbnails && count > 1 && _jsx(Thumbnails, {
265
- carouselRef: carouselRef,
266
- count: count,
267
- current: current,
268
- setCurrent: setCurrent,
269
- sections: sections
270
- })]
271
- });
272
- }
273
- function Dots({
274
- count,
275
- current,
276
- setCurrent
277
- }) {
278
- const length = [...new Array(count)];
279
- return _jsx("div", {
280
- className: "carousel__dots",
281
- children: length.map((_, i) => {
282
- const updateCurrent = e => {
107
+ if (startX < endX && current > 0)
108
+ prev();
109
+ if (startX > endX && current < count - 1)
110
+ next();
111
+ setTouchStartPosition(undefined);
112
+ };
113
+ const getSections = React.useCallback(() => {
114
+ const carousel = carouselRef.current;
115
+ const sections = carousel.querySelectorAll(TARGETS);
116
+ const visibleSections = Array.from(sections).filter((section) => {
117
+ return window.getComputedStyle(section).display !== "none";
118
+ });
119
+ return visibleSections;
120
+ }, []);
121
+ const updateSections = React.useCallback(() => {
122
+ const sections = getSections();
123
+ setSections(sections);
124
+ }, [getSections]);
125
+ React.useEffect(() => {
126
+ var _a;
127
+ const zone = (_a = carouselRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(".cms");
128
+ if (zone) {
129
+ zone.addEventListener("ublo-section-created", updateSections);
130
+ zone.addEventListener("ublo-section-pasted", updateSections);
131
+ zone.addEventListener("ublo-section-removed", updateSections);
132
+ return () => {
133
+ zone.removeEventListener("ublo-section-removed", updateSections);
134
+ zone.removeEventListener("ublo-section-pasted", updateSections);
135
+ zone.removeEventListener("ublo-section-created", updateSections);
136
+ };
137
+ }
138
+ }, [updateSections]);
139
+ React.useEffect(() => {
140
+ const carousel = carouselRef.current;
141
+ const inner = carousel.firstElementChild;
142
+ const sections = getSections();
143
+ const undraggableElements = Array.from(carousel.querySelectorAll(UNDRAGGABLE_TAGS));
144
+ setSections(sections);
145
+ if (!editing) {
146
+ sections.forEach((section, index) => {
147
+ const anchors = Array.from(section.querySelectorAll("a"));
148
+ anchors.forEach((anchor) => {
149
+ anchor.setAttribute("tabindex", current === index ? "0" : "-1");
150
+ });
151
+ });
152
+ undraggableElements.forEach(preventDrag);
153
+ }
154
+ if (!fade || editing) {
155
+ sections.forEach((section, index) => {
156
+ show(section);
157
+ if (!editing && current === index) {
158
+ section.setAttribute("data-current", "");
159
+ }
160
+ else {
161
+ section.removeAttribute("data-current");
162
+ }
163
+ });
164
+ inner.style.transform = `translateX(${-current * 100}%)`;
165
+ inner.style.removeProperty("transition");
166
+ }
167
+ else {
168
+ undraggableElements.forEach(enableDrag);
169
+ sections.forEach((section, index) => {
170
+ if (current === index) {
171
+ show(section);
172
+ section.setAttribute("data-current", "");
173
+ }
174
+ else {
175
+ section.removeAttribute("data-current");
176
+ Object.assign(section.style, {
177
+ opacity: 0,
178
+ pointerEvents: "none",
179
+ touchAction: "none",
180
+ });
181
+ }
182
+ });
183
+ if (fade)
184
+ inner.style.removeProperty("transform");
185
+ }
186
+ }, [current, editing, fade, getSections, lang, path]);
187
+ const onUndraggableElementClick = React.useCallback((e) => {
188
+ e.preventDefault();
283
189
  e.stopPropagation();
284
- setCurrent(i);
285
- };
286
- const classes = classNames("carousel__dot", {
287
- "carousel__dot--current": i === current
288
- });
289
- return _jsx("button", {
290
- className: classes,
291
- onClick: updateCurrent,
292
- "aria-label": i
293
- }, i);
294
- })
295
- });
190
+ }, []);
191
+ React.useEffect(() => {
192
+ if (typeof onChange === "function") {
193
+ onChange(current);
194
+ }
195
+ }, [current, onChange]);
196
+ React.useEffect(() => {
197
+ const carousel = carouselRef.current;
198
+ const inner = carousel.firstElementChild;
199
+ const undraggableElements = Array.from(inner.querySelectorAll(UNDRAGGABLE_TAGS));
200
+ if (dragging) {
201
+ undraggableElements.forEach((element) => element.addEventListener("click", onUndraggableElementClick));
202
+ }
203
+ else {
204
+ undraggableElements.forEach((element) => setTimeout(() => element.removeEventListener("click", onUndraggableElementClick), 100));
205
+ }
206
+ }, [dragging, onUndraggableElementClick]);
207
+ useInterval(() => {
208
+ if (!editing)
209
+ next();
210
+ }, delay, current, dragging);
211
+ const classes = classNames("carousel", {
212
+ carousel__fade: fade && !editing,
213
+ carousel__editing: editing,
214
+ });
215
+ const eventHandlers = {
216
+ onMouseDown: onTouchStart,
217
+ onTouchStart,
218
+ onMouseMove: onTouchMove,
219
+ onTouchMove,
220
+ onMouseUp: onTouchEnd,
221
+ onTouchEnd,
222
+ onMouseLeave: onTouchEnd,
223
+ };
224
+ return (<div ref={carouselRef} className={classes} {...eventHandlers}>
225
+ {children}
226
+ {(editing || (controls && showPrevArrow) || alwaysShowControls) && (<button className="carousel--prev" onClick={prev} disabled={alwaysShowControls && !showPrevArrow} aria-label="Précedent / Previous">
227
+ <Icons.ArrowLeft className="carousel--icon"/>
228
+ </button>)}
229
+ {(editing || (controls && showNextArrow) || alwaysShowControls) && (<button className="carousel--next" onClick={next} disabled={alwaysShowControls && !showNextArrow} aria-label="Suivant / Next">
230
+ <Icons.ArrowRight className="carousel--icon"/>
231
+ </button>)}
232
+ {dots && (<Dots count={count} current={current} setCurrent={setCurrent} sections={sections}/>)}
233
+ {thumbnails && count > 1 && (<Thumbnails carouselRef={carouselRef} count={count} current={current} setCurrent={setCurrent} sections={sections}/>)}
234
+ </div>);
296
235
  }
297
- function Thumbnails({
298
- carouselRef,
299
- current,
300
- setCurrent,
301
- sections
302
- }) {
303
- const [thumbnails, setThumbnails] = React.useState([]);
304
- React.useEffect(() => {
305
- const carousel = carouselRef.current;
306
- if (carousel) {
307
- if (sections.length) {
308
- const images = Array.from(sections).reduce((acc, section) => {
309
- const image = section.querySelector("img");
310
- if (!image?.src) return acc;
311
- return [...acc, image.src];
312
- }, []);
313
- setThumbnails(images);
314
- }
315
- }
316
- }, [carouselRef, sections]);
317
- if (!thumbnails.length) return null;
318
- return _jsx("div", {
319
- className: "carousel__thumbnails",
320
- children: thumbnails.map((thumbnail, i) => {
321
- const updateCurrent = e => {
322
- e.stopPropagation();
323
- setCurrent(i);
324
- };
325
- const classes = classNames("carousel__thumbnail", {
326
- "carousel__thumbnail--current": i === current
327
- });
328
- return _jsx("input", {
329
- type: "image",
330
- className: classes,
331
- src: thumbnail,
332
- onClick: updateCurrent
333
- }, i);
334
- })
335
- });
236
+ function Dots({ count, current, setCurrent }) {
237
+ const length = [...new Array(count)];
238
+ return (<div className="carousel__dots">
239
+ {length.map((_, i) => {
240
+ const updateCurrent = (e) => {
241
+ e.stopPropagation();
242
+ setCurrent(i);
243
+ };
244
+ const classes = classNames("carousel__dot", {
245
+ "carousel__dot--current": i === current,
246
+ });
247
+ return (<button key={i} className={classes} onClick={updateCurrent} aria-label={i}/>);
248
+ })}
249
+ </div>);
250
+ }
251
+ function Thumbnails({ carouselRef, current, setCurrent, sections }) {
252
+ const [thumbnails, setThumbnails] = React.useState([]);
253
+ React.useEffect(() => {
254
+ const carousel = carouselRef.current;
255
+ if (carousel) {
256
+ if (sections.length) {
257
+ const images = Array.from(sections).reduce((acc, section) => {
258
+ const image = section.querySelector("img");
259
+ if (!(image === null || image === void 0 ? void 0 : image.src))
260
+ return acc;
261
+ return [...acc, image.src];
262
+ }, []);
263
+ setThumbnails(images);
264
+ }
265
+ }
266
+ }, [carouselRef, sections]);
267
+ if (!thumbnails.length)
268
+ return null;
269
+ return (<div className="carousel__thumbnails">
270
+ {thumbnails.map((thumbnail, i) => {
271
+ const updateCurrent = (e) => {
272
+ e.stopPropagation();
273
+ setCurrent(i);
274
+ };
275
+ const classes = classNames("carousel__thumbnail", {
276
+ "carousel__thumbnail--current": i === current,
277
+ });
278
+ return (<input key={i} type="image" className={classes} src={thumbnail} onClick={updateCurrent}/>);
279
+ })}
280
+ </div>);
336
281
  }
337
282
  function euclideanModulo(a, b) {
338
- const m = a % b;
339
- return m < 0 ? b < 0 ? m - b : m + b : m;
283
+ const m = a % b;
284
+ return m < 0 ? (b < 0 ? m - b : m + b) : m;
340
285
  }
341
286
  function preventDrag(element) {
342
- element.setAttribute("draggable", false);
287
+ element.setAttribute("draggable", false);
343
288
  }
344
289
  function enableDrag(element) {
345
- element.removeAttribute("draggable");
290
+ element.removeAttribute("draggable");
346
291
  }
347
292
  function show(section) {
348
- const propertiesToRemove = ["opacity", "pointer-events", "touch-action"];
349
- propertiesToRemove.forEach(property => section.style.removeProperty(property));
293
+ const propertiesToRemove = ["opacity", "pointer-events", "touch-action"];
294
+ propertiesToRemove.forEach((property) => section.style.removeProperty(property));
350
295
  }
351
296
  function useInterval(callback, delay, current, dragging) {
352
- const savedCallback = React.useRef();
353
- React.useEffect(() => {
354
- savedCallback.current = callback;
355
- }, [callback]);
356
- React.useEffect(() => {
357
- function tick() {
358
- savedCallback.current();
359
- }
360
- if (!dragging && delay !== null && delay !== 0) {
361
- const interval = setInterval(tick, delay);
362
- return () => clearInterval(interval);
363
- }
364
- }, [current, delay, dragging]);
365
- }
297
+ const savedCallback = React.useRef();
298
+ React.useEffect(() => {
299
+ savedCallback.current = callback;
300
+ }, [callback]);
301
+ React.useEffect(() => {
302
+ function tick() {
303
+ savedCallback.current();
304
+ }
305
+ if (!dragging && delay !== null && delay !== 0) {
306
+ const interval = setInterval(tick, delay);
307
+ return () => clearInterval(interval);
308
+ }
309
+ }, [current, delay, dragging]);
310
+ }