ublo-lib 1.31.42 → 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 -20
  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 -25
  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
@@ -0,0 +1,78 @@
1
+ import * as React from "react";
2
+ import classNames from "classnames";
3
+ import { useUbloContext } from "ublo/with-ublo";
4
+ import Button from "dt-design-system/es/button";
5
+ import * as Icons from "dt-design-system/es/icons";
6
+ import useWindowSizes from "../../hooks/use-window-sizes";
7
+ // import useWindowSizes from "ublo-lib/es/common/hooks/use-window-sizes";
8
+ import css from "./scrolling-carousel.module.css";
9
+ const PREV = 0;
10
+ const NEXT = 1;
11
+ export default function ScrollingCarousel({ className, children }) {
12
+ const { cmsMode } = useUbloContext();
13
+ const ref = React.useRef(null);
14
+ const zoneRef = React.useRef(null);
15
+ const [overflow, setOverflow] = React.useState(false);
16
+ const [controls, setControls] = React.useState({
17
+ prevDisabled: false,
18
+ nextDisabled: false,
19
+ });
20
+ const { width } = useWindowSizes();
21
+ const slideTo = (direction) => () => {
22
+ const zone = zoneRef.current;
23
+ const inner = ref.current;
24
+ if (zone && inner) {
25
+ const zoneContainer = zone;
26
+ const innerContainer = inner;
27
+ const firstSection = zoneContainer.querySelector("section:not([data-hidden], [hidden], [style*='display: none'])");
28
+ if (firstSection) {
29
+ const scrollDistance = firstSection.clientWidth;
30
+ if (direction === PREV) {
31
+ innerContainer.scrollLeft -= scrollDistance;
32
+ }
33
+ if (direction === NEXT) {
34
+ innerContainer.scrollLeft += scrollDistance;
35
+ }
36
+ }
37
+ }
38
+ };
39
+ const refreshControls = React.useCallback(() => {
40
+ const zone = zoneRef.current;
41
+ const inner = ref.current;
42
+ if (zone && inner) {
43
+ const zoneContainer = zone;
44
+ const innerContainer = inner;
45
+ setOverflow(innerContainer.clientWidth < zoneContainer.clientWidth);
46
+ setControls({
47
+ prevDisabled: Math.floor(innerContainer.scrollLeft) === 0,
48
+ nextDisabled: Math.round(innerContainer.scrollLeft) ===
49
+ Math.round(innerContainer.scrollWidth) -
50
+ Math.round(innerContainer.clientWidth),
51
+ });
52
+ }
53
+ }, []);
54
+ React.useEffect(() => {
55
+ refreshControls();
56
+ }, [cmsMode, refreshControls]);
57
+ React.useEffect(() => {
58
+ const inner = ref.current;
59
+ if (inner) {
60
+ const innerContainer = inner;
61
+ innerContainer.scrollLeft = 0;
62
+ }
63
+ }, [width]);
64
+ const classes = classNames(css.carousel, className);
65
+ return (<div className={classes}>
66
+ {overflow && (<div className={css.controls} data-controls="">
67
+ <Button className={css.control} variant="link" onClick={slideTo(PREV)} disabled={controls.prevDisabled} data-control="prev">
68
+ <Icons.ChevronLeft className={css.controlIcon}/>
69
+ </Button>
70
+ <Button className={css.control} variant="link" onClick={slideTo(NEXT)} disabled={controls.nextDisabled} data-control="next">
71
+ <Icons.ChevronRight className={css.controlIcon}/>
72
+ </Button>
73
+ </div>)}
74
+ <div className={css.inner} ref={ref} onScroll={refreshControls} data-inner="">
75
+ {React.cloneElement(children, { ref: zoneRef })}
76
+ </div>
77
+ </div>);
78
+ }
@@ -0,0 +1 @@
1
+ export default function useConstant(fn: any): any;
@@ -1,10 +1,8 @@
1
1
  import * as React from "react";
2
2
  export default function useConstant(fn) {
3
- const ref = React.useRef();
4
- if (!ref.current) {
5
- ref.current = {
6
- v: fn()
7
- };
8
- }
9
- return ref.current.v;
10
- }
3
+ const ref = React.useRef();
4
+ if (!ref.current) {
5
+ ref.current = { v: fn() };
6
+ }
7
+ return ref.current.v;
8
+ }
@@ -0,0 +1,6 @@
1
+ export default function useDebouncedSearch(searchFunction: any): {
2
+ text: string;
3
+ setText: React.Dispatch<React.SetStateAction<string>>;
4
+ search: import("react-async-hook").UseAsyncReturn<any, any[]>;
5
+ };
6
+ import * as React from "react";
@@ -1,20 +1,20 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
1
10
  import * as React from "react";
2
11
  import debouncePromise from "awesome-debounce-promise";
3
12
  import { useAsync } from "react-async-hook";
4
13
  import useConstant from "./use-constant";
5
14
  const DEBOUNCE_AMOUNT = 600;
6
15
  export default function useDebouncedSearch(searchFunction) {
7
- const [text, setText] = React.useState("");
8
- const debouncedSearchFunction = useConstant(() => debouncePromise(searchFunction, DEBOUNCE_AMOUNT));
9
- const search = useAsync(async () => text.length === 0 ? undefined : debouncedSearchFunction(text), [debouncedSearchFunction, text], {
10
- setLoading: state => ({
11
- ...state,
12
- loading: true
13
- })
14
- });
15
- return {
16
- text,
17
- setText,
18
- search
19
- };
20
- }
16
+ const [text, setText] = React.useState("");
17
+ const debouncedSearchFunction = useConstant(() => debouncePromise(searchFunction, DEBOUNCE_AMOUNT));
18
+ const search = useAsync(() => __awaiter(this, void 0, void 0, function* () { return (text.length === 0 ? undefined : debouncedSearchFunction(text)); }), [debouncedSearchFunction, text], { setLoading: (state) => (Object.assign(Object.assign({}, state), { loading: true })) });
19
+ return { text, setText, search };
20
+ }
@@ -0,0 +1,11 @@
1
+ export default function useSearch({ ubloApi, site, lang, seo, exclude }: {
2
+ ubloApi: any;
3
+ site: any;
4
+ lang: any;
5
+ seo: any;
6
+ exclude: any;
7
+ }): {
8
+ text: string;
9
+ setText: import("react").Dispatch<import("react").SetStateAction<string>>;
10
+ search: import("react-async-hook").UseAsyncReturn<any, any[]>;
11
+ };
@@ -1,13 +1,16 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
1
10
  import useDebouncedSearch from "./use-debounced-search";
2
11
  import { fetchResults } from "../utils/fetcher";
3
- export default function useSearch({
4
- ubloApi,
5
- site,
6
- lang,
7
- seo,
8
- exclude
9
- }) {
10
- return useDebouncedSearch(async query => {
11
- return fetchResults(ubloApi, site, lang, query, seo, exclude);
12
- });
13
- }
12
+ export default function useSearch({ ubloApi, site, lang, seo, exclude }) {
13
+ return useDebouncedSearch((query) => __awaiter(this, void 0, void 0, function* () {
14
+ return fetchResults(ubloApi, site, lang, query, seo, exclude);
15
+ }));
16
+ }
@@ -0,0 +1,2 @@
1
+ export default SearchBar;
2
+ import SearchBar from "./search-bar";
@@ -1,2 +1,2 @@
1
1
  import SearchBar from "./search-bar";
2
- export default SearchBar;
2
+ export default SearchBar;
@@ -0,0 +1,14 @@
1
+ export function message(lang: any, id: any, messages?: {
2
+ fr: {
3
+ "what-are-you-looking-for": string;
4
+ "no-results": string;
5
+ };
6
+ en: {
7
+ "what-are-you-looking-for": string;
8
+ "no-results": string;
9
+ };
10
+ es: {
11
+ "what-are-you-looking-for": string;
12
+ "no-results": string;
13
+ };
14
+ }): any;
@@ -1,19 +1,19 @@
1
1
  const DEFAULT_MESSAGES = {
2
- fr: {
3
- "what-are-you-looking-for": "Que recherchez-vous ?",
4
- "no-results": "Pas de résultats..."
5
- },
6
- en: {
7
- "what-are-you-looking-for": "What are you looking for?",
8
- "no-results": "No results..."
9
- },
10
- es: {
11
- "what-are-you-looking-for": "¿Qué estás buscando?",
12
- "no-results": "No hay resultados..."
13
- }
2
+ fr: {
3
+ "what-are-you-looking-for": "Que recherchez-vous ?",
4
+ "no-results": "Pas de résultats...",
5
+ },
6
+ en: {
7
+ "what-are-you-looking-for": "What are you looking for?",
8
+ "no-results": "No results...",
9
+ },
10
+ es: {
11
+ "what-are-you-looking-for": "¿Qué estás buscando?",
12
+ "no-results": "No hay resultados...",
13
+ },
14
14
  };
15
15
  export const message = (lang, id, messages = DEFAULT_MESSAGES) => {
16
- const locale = !messages[lang] ? "en" : lang;
17
- const langMessages = messages[locale];
18
- return langMessages[id] || `??${id}??`;
19
- };
16
+ const locale = !messages[lang] ? "en" : lang;
17
+ const langMessages = messages[locale];
18
+ return langMessages[id] || `??${id}??`;
19
+ };
@@ -0,0 +1,12 @@
1
+ declare const _default: React.MemoExoticComponent<({ lang, resultFormatter, backdrop, OverrideIcons, messages, seo, exclude, autofocus, }: {
2
+ lang: any;
3
+ resultFormatter: any;
4
+ backdrop: any;
5
+ OverrideIcons?: {};
6
+ messages: any;
7
+ seo: any;
8
+ exclude: any;
9
+ autofocus: any;
10
+ }) => React.JSX.Element>;
11
+ export default _default;
12
+ import * as React from "react";
@@ -9,211 +9,154 @@ import * as Plausible from "../plausible";
9
9
  import useSearch from "./hooks/use-search";
10
10
  import * as KeyboardKeys from "./utils/keyboard-keys";
11
11
  import { message } from "./messages";
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
- import { jsxs as _jsxs } from "react/jsx-runtime";
14
- const {
15
- publicRuntimeConfig
16
- } = getConfig();
17
- const {
18
- ubloApi,
19
- site
20
- } = publicRuntimeConfig;
21
- const SearchBar = ({
22
- lang,
23
- resultFormatter,
24
- backdrop,
25
- OverrideIcons = {},
26
- messages,
27
- seo,
28
- exclude,
29
- autofocus
30
- }) => {
31
- const input = React.useRef();
32
- const results = React.useRef();
33
- const [state, setState] = React.useState({
34
- active: 0,
35
- selected: undefined
36
- });
37
- const {
38
- lang: ubloLang = lang
39
- } = useUbloContext();
40
- const {
41
- text,
42
- setText,
43
- search
44
- } = useSearch({
45
- ubloApi,
46
- site,
47
- lang: ubloLang,
48
- seo,
49
- exclude
50
- });
51
- const DefaultIcons = {
52
- SearchIcon: DSIcons.Search,
53
- LoadIcon: DSIcons.Loader2
54
- };
55
- const Icons = Object.assign({}, DefaultIcons, OverrideIcons);
56
- const close = () => {
57
- setText("");
58
- };
59
- const updateSearch = e => {
60
- const userInput = e.currentTarget.value;
61
- setText(userInput);
62
- setState({
63
- active: 0
12
+ const { publicRuntimeConfig } = getConfig();
13
+ const { ubloApi, site } = publicRuntimeConfig;
14
+ const SearchBar = ({ lang, resultFormatter, backdrop, OverrideIcons = {}, messages, seo, exclude, autofocus, }) => {
15
+ var _a, _b;
16
+ const input = React.useRef();
17
+ const results = React.useRef();
18
+ const [state, setState] = React.useState({ active: 0, selected: undefined });
19
+ const { lang: ubloLang = lang } = useUbloContext();
20
+ const { text, setText, search } = useSearch({
21
+ ubloApi,
22
+ site,
23
+ lang: ubloLang,
24
+ seo,
25
+ exclude,
64
26
  });
65
- };
66
- const handleKeyDown = e => {
67
- const allowedKeys = ["ArrowUp", "ArrowDown", "Enter", "Escape"];
68
- const {
69
- code,
70
- keyCode,
71
- key,
72
- which
73
- } = e;
74
- const isAllowed = allowedKeys.includes(code) || allowedKeys.includes(key);
75
- if (!isAllowed) return;
76
- const keyId = keyCode ?? which;
77
- const up = keyId === KeyboardKeys.ArrowUp;
78
- const enter = keyId === KeyboardKeys.Enter;
79
- const escape = keyId === KeyboardKeys.Escape;
80
- if (escape) {
81
- close();
82
- return;
83
- }
84
- const container = results.current;
85
- const firstResult = container?.querySelector(".search-bar__result");
86
- const allResults = Array.from(container?.querySelectorAll(".search-bar__result"));
87
- const lastResult = allResults[allResults.length - 1];
88
- const selectedResult = container?.querySelector(".search-bar__result--selected");
89
- if (enter && selectedResult) {
90
- selectedResult.click();
91
- return;
92
- }
93
- let newSelected;
94
- if (!selectedResult) {
95
- newSelected = up ? lastResult : firstResult;
96
- } else {
97
- newSelected = up ? selectedResult.previousElementSibling || lastResult : selectedResult.nextElementSibling || firstResult;
98
- }
99
- allResults.forEach(result => result.classList.remove("search-bar__result--selected"));
100
- if (newSelected) {
101
- newSelected.classList.add("search-bar__result--selected");
102
- }
103
- if (container && newSelected) {
104
- container.scrollTop = newSelected.offsetTop - newSelected.clientHeight;
105
- }
106
- };
107
- const handleBlur = () => {
108
- if (text?.length > 2) {
109
- const event = search?.result?.length === 0 ? "Search failed" : "Search canceled";
110
- Plausible.sendGoal(event, {
111
- Terms: text
112
- });
113
- }
114
- };
115
- const focusInput = () => {
116
- input.current.focus();
117
- };
118
- const handleKeyPresses = React.useCallback(e => {
119
- const allowedKeys = ["k"];
120
- const {
121
- code,
122
- ctrlKey,
123
- key,
124
- keyCode,
125
- metaKey,
126
- which
127
- } = e;
128
- const isAllowed = !text && (ctrlKey || metaKey) && (allowedKeys.includes(code) || allowedKeys.includes(key));
129
- if (!isAllowed) return;
130
- e.preventDefault();
131
- const keyId = keyCode ?? which;
132
- if (keyId === KeyboardKeys.K && (ctrlKey || metaKey)) {
133
- focusInput();
134
- }
135
- }, [text]);
136
- Router.ready(() => {
137
- Router.events.on("routeChangeStart", close);
138
- });
139
- React.useEffect(() => {
140
- if (autofocus) focusInput();
141
- window.addEventListener("keydown", handleKeyPresses);
142
- return () => {
143
- window.removeEventListener("keydown", handleKeyPresses);
27
+ const DefaultIcons = {
28
+ SearchIcon: DSIcons.Search,
29
+ LoadIcon: DSIcons.Loader2,
144
30
  };
145
- }, [autofocus, handleKeyPresses]);
146
- const Icon = search?.loading ? Icons.LoadIcon : Icons.SearchIcon;
147
- const classes = classNames("search-bar", {
148
- "search-bar--opened": search?.result,
149
- "search-bar--loading": search?.loading
150
- });
151
- return _jsxs("div", {
152
- className: classes,
153
- children: [backdrop && _jsx("div", {
154
- className: "search-bar__backdrop",
155
- onClick: close
156
- }), _jsxs("div", {
157
- className: "search-bar__input-container",
158
- children: [_jsx("input", {
159
- ref: input,
160
- type: "text",
161
- value: text,
162
- onChange: updateSearch,
163
- onKeyDown: handleKeyDown,
164
- className: "search-bar__input",
165
- placeholder: message(ubloLang, "what-are-you-looking-for", messages),
166
- onBlur: handleBlur
167
- }), _jsx(Icon, {
168
- className: "search-bar__icon"
169
- }), _jsxs("div", {
170
- ref: results,
171
- className: "search-bar__results",
172
- children: [search.result?.map((result, i) => {
173
- const {
174
- name,
175
- title,
176
- page,
177
- path
178
- } = result;
179
- const externalLink = page === undefined;
180
- const Tag = externalLink ? "a" : Link;
181
- const resultLabel = typeof resultFormatter === "function" ? resultFormatter({
182
- lang: ubloLang,
183
- result,
184
- text
185
- }) : title;
186
- const anchorProps = {
187
- href: path,
188
- dangerouslySetInnerHTML: {
189
- __html: resultLabel
190
- }
191
- };
192
- const linkProps = {
193
- as: path,
194
- page,
195
- title: resultLabel
196
- };
197
- const sendPlausibleGoal = () => {
198
- Plausible.sendGoal("Search", {
199
- "Terms - Destination": `${text} - ${path}`
31
+ const Icons = Object.assign({}, DefaultIcons, OverrideIcons);
32
+ const close = () => {
33
+ setText("");
34
+ };
35
+ const updateSearch = (e) => {
36
+ const userInput = e.currentTarget.value;
37
+ setText(userInput);
38
+ setState({ active: 0 });
39
+ };
40
+ const handleKeyDown = (e) => {
41
+ const allowedKeys = ["ArrowUp", "ArrowDown", "Enter", "Escape"];
42
+ const { code, keyCode, key, which } = e;
43
+ const isAllowed = allowedKeys.includes(code) || allowedKeys.includes(key);
44
+ if (!isAllowed)
45
+ return;
46
+ const keyId = keyCode !== null && keyCode !== void 0 ? keyCode : which;
47
+ const up = keyId === KeyboardKeys.ArrowUp;
48
+ const enter = keyId === KeyboardKeys.Enter;
49
+ const escape = keyId === KeyboardKeys.Escape;
50
+ if (escape) {
51
+ close();
52
+ return;
53
+ }
54
+ const container = results.current;
55
+ const firstResult = container === null || container === void 0 ? void 0 : container.querySelector(".search-bar__result");
56
+ const allResults = Array.from(container === null || container === void 0 ? void 0 : container.querySelectorAll(".search-bar__result"));
57
+ const lastResult = allResults[allResults.length - 1];
58
+ const selectedResult = container === null || container === void 0 ? void 0 : container.querySelector(".search-bar__result--selected");
59
+ if (enter && selectedResult) {
60
+ selectedResult.click();
61
+ return;
62
+ }
63
+ let newSelected;
64
+ if (!selectedResult) {
65
+ newSelected = up ? lastResult : firstResult;
66
+ }
67
+ else {
68
+ newSelected = up
69
+ ? selectedResult.previousElementSibling || lastResult
70
+ : selectedResult.nextElementSibling || firstResult;
71
+ }
72
+ allResults.forEach((result) => result.classList.remove("search-bar__result--selected"));
73
+ if (newSelected) {
74
+ newSelected.classList.add("search-bar__result--selected");
75
+ }
76
+ if (container && newSelected) {
77
+ container.scrollTop = newSelected.offsetTop - newSelected.clientHeight;
78
+ }
79
+ };
80
+ const handleBlur = () => {
81
+ var _a;
82
+ if ((text === null || text === void 0 ? void 0 : text.length) > 2) {
83
+ const event = ((_a = search === null || search === void 0 ? void 0 : search.result) === null || _a === void 0 ? void 0 : _a.length) === 0 ? "Search failed" : "Search canceled";
84
+ Plausible.sendGoal(event, {
85
+ Terms: text,
86
+ });
87
+ }
88
+ };
89
+ const focusInput = () => {
90
+ input.current.focus();
91
+ };
92
+ const handleKeyPresses = React.useCallback((e) => {
93
+ const allowedKeys = ["k"];
94
+ const { code, ctrlKey, key, keyCode, metaKey, which } = e;
95
+ const isAllowed = !text &&
96
+ (ctrlKey || metaKey) &&
97
+ (allowedKeys.includes(code) || allowedKeys.includes(key));
98
+ if (!isAllowed)
99
+ return;
100
+ e.preventDefault();
101
+ const keyId = keyCode !== null && keyCode !== void 0 ? keyCode : which;
102
+ if (keyId === KeyboardKeys.K && (ctrlKey || metaKey)) {
103
+ focusInput();
104
+ }
105
+ }, [text]);
106
+ Router.ready(() => {
107
+ Router.events.on("routeChangeStart", close);
108
+ });
109
+ React.useEffect(() => {
110
+ if (autofocus)
111
+ focusInput();
112
+ window.addEventListener("keydown", handleKeyPresses);
113
+ return () => {
114
+ window.removeEventListener("keydown", handleKeyPresses);
115
+ };
116
+ }, [autofocus, handleKeyPresses]);
117
+ const Icon = (search === null || search === void 0 ? void 0 : search.loading) ? Icons.LoadIcon : Icons.SearchIcon;
118
+ const classes = classNames("search-bar", {
119
+ "search-bar--opened": search === null || search === void 0 ? void 0 : search.result,
120
+ "search-bar--loading": search === null || search === void 0 ? void 0 : search.loading,
121
+ });
122
+ return (<div className={classes}>
123
+ {backdrop && <div className="search-bar__backdrop" onClick={close}/>}
124
+ <div className="search-bar__input-container">
125
+ <input ref={input} type="text" value={text} onChange={updateSearch} onKeyDown={handleKeyDown} className="search-bar__input" placeholder={message(ubloLang, "what-are-you-looking-for", messages)} onBlur={handleBlur}/>
126
+ <Icon className="search-bar__icon"/>
127
+ <div ref={results} className="search-bar__results">
128
+ {(_a = search.result) === null || _a === void 0 ? void 0 : _a.map((result, i) => {
129
+ const { name, title, page, path } = result;
130
+ const externalLink = page === undefined;
131
+ const Tag = externalLink ? "a" : Link;
132
+ const resultLabel = typeof resultFormatter === "function"
133
+ ? resultFormatter({ lang: ubloLang, result, text })
134
+ : title;
135
+ const anchorProps = {
136
+ href: path,
137
+ dangerouslySetInnerHTML: { __html: resultLabel },
138
+ };
139
+ const linkProps = {
140
+ as: path,
141
+ page,
142
+ title: resultLabel,
143
+ };
144
+ const sendPlausibleGoal = () => {
145
+ Plausible.sendGoal("Search", {
146
+ "Terms - Destination": `${text} - ${path}`,
147
+ });
148
+ };
149
+ const props = externalLink ? anchorProps : linkProps;
150
+ const classes = classNames("search-bar__result", {
151
+ "search-bar__result--active": i === state.active,
200
152
  });
201
- };
202
- const props = externalLink ? anchorProps : linkProps;
203
- const classes = classNames("search-bar__result", {
204
- "search-bar__result--active": i === state.active
205
- });
206
- return _jsx(Tag, {
207
- className: classes,
208
- ...props,
209
- onClick: sendPlausibleGoal
210
- }, `${name}-${i}`);
211
- }), search.result?.length === 0 && _jsx("div", {
212
- className: "search-bar__no-result",
213
- children: message(ubloLang, "no-results", messages)
214
- })]
215
- })]
216
- })]
217
- });
153
+ return (<Tag key={`${name}-${i}`} className={classes} {...props} onClick={sendPlausibleGoal}/>);
154
+ })}
155
+ {((_b = search.result) === null || _b === void 0 ? void 0 : _b.length) === 0 && (<div className="search-bar__no-result">
156
+ {message(ubloLang, "no-results", messages)}
157
+ </div>)}
158
+ </div>
159
+ </div>
160
+ </div>);
218
161
  };
219
- export default React.memo(SearchBar);
162
+ export default React.memo(SearchBar);
@@ -0,0 +1 @@
1
+ export function fetchResults(ubloApi: any, site: any, lang: any, query: any, seo: any, exclude: any): Promise<any>;
@@ -1,14 +1,17 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
1
10
  import * as Params from "./params";
2
- export const fetchResults = async (ubloApi, site, lang, query, seo, exclude) => {
3
- const seoParam = seo === false ? "false" : undefined;
4
- const params = Params.build({
5
- site,
6
- lang,
7
- query,
8
- seo: seoParam,
9
- exclude
10
- });
11
- const url = `${ubloApi}/api/search${params}`;
12
- const res = await fetch(url);
13
- return res.json();
14
- };
11
+ export const fetchResults = (ubloApi, site, lang, query, seo, exclude) => __awaiter(void 0, void 0, void 0, function* () {
12
+ const seoParam = seo === false ? "false" : undefined;
13
+ const params = Params.build({ site, lang, query, seo: seoParam, exclude });
14
+ const url = `${ubloApi}/api/search${params}`;
15
+ const res = yield fetch(url);
16
+ return res.json();
17
+ });
@@ -0,0 +1,5 @@
1
+ export const K: 75;
2
+ export const ArrowUp: 38;
3
+ export const ArrowDown: 40;
4
+ export const Enter: 13;
5
+ export const Escape: 27;