ublo-lib 1.24.4 → 1.25.1

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 (330) hide show
  1. package/es/common/components/admin-links/admin-links.js +95 -52
  2. package/es/common/components/admin-links/index.js +1 -1
  3. package/es/common/components/breadcrumb.js +78 -21
  4. package/es/common/components/cross-selling-editor/cross-selling-editor.js +52 -0
  5. package/es/common/components/cross-selling-editor/cross-selling-editor.module.css +6 -0
  6. package/es/common/components/cross-selling-editor/editor.js +98 -0
  7. package/es/common/components/cross-selling-editor/editor.module.css +23 -0
  8. package/es/common/components/cross-selling-editor/hooks/use-custom-offers.js +52 -0
  9. package/es/common/components/cross-selling-editor/hooks/use-tunnel-offers.js +35 -0
  10. package/es/common/components/cross-selling-editor/index.js +2 -0
  11. package/es/common/components/cross-selling-editor/override-trigger-form.js +156 -0
  12. package/es/common/components/cross-selling-editor/override-trigger-form.module.css +58 -0
  13. package/es/common/components/cross-selling-editor/override.js +124 -0
  14. package/es/common/components/cross-selling-editor/override.module.css +65 -0
  15. package/es/common/components/cross-selling-editor/overrides-list.js +111 -0
  16. package/es/common/components/cross-selling-editor/overrides-list.module.css +56 -0
  17. package/es/common/components/cross-selling-editor/rule.js +105 -0
  18. package/es/common/components/cross-selling-editor/rule.module.css +37 -0
  19. package/es/common/components/cross-selling-editor/rules.js +84 -0
  20. package/es/common/components/cross-selling-editor/rules.module.css +39 -0
  21. package/es/common/components/cross-selling-editor/services/api.js +36 -0
  22. package/es/common/components/cross-selling-editor/services/utils.js +199 -0
  23. package/es/common/components/cross-selling-editor/tester-tunnel-offer.js +53 -0
  24. package/es/common/components/cross-selling-editor/tester-tunnel-offer.module.css +18 -0
  25. package/es/common/components/cross-selling-editor/tester.js +188 -0
  26. package/es/common/components/cross-selling-editor/tester.module.css +106 -0
  27. package/es/common/components/cross-selling-editor/types.js +1 -0
  28. package/es/common/components/custom-contact-form/custom-contact-form.js +147 -75
  29. package/es/common/components/date-picker/calendar.js +1 -1
  30. package/es/common/components/gesco-contact-form/gesco-contact-form.js +240 -91
  31. package/es/common/components/gesco-contact-form/hooks/use-params.js +35 -20
  32. package/es/common/components/gesco-contact-form/index.js +1 -1
  33. package/es/common/components/gesco-contact-form/phone-code-select.js +76 -56
  34. package/es/common/components/gesco-contact-form/services/api.js +7 -8
  35. package/es/common/components/gesco-contact-form/services/form.js +39 -25
  36. package/es/common/components/gesco-contact-form/services/messages.js +68 -65
  37. package/es/common/components/gesco-contact-form/services/plausible.js +8 -10
  38. package/es/common/components/gesco-contact-form/types.js +1 -1
  39. package/es/common/components/instant-search/hooks/use-constant.js +8 -6
  40. package/es/common/components/instant-search/hooks/use-debounced-search.js +14 -5
  41. package/es/common/components/instant-search/hooks/use-search.js +10 -6
  42. package/es/common/components/instant-search/index.js +1 -1
  43. package/es/common/components/instant-search/input.js +75 -45
  44. package/es/common/components/instant-search/instant-search.js +124 -73
  45. package/es/common/components/instant-search/links.js +74 -23
  46. package/es/common/components/instant-search/no-product.js +81 -4
  47. package/es/common/components/instant-search/products.js +118 -31
  48. package/es/common/components/instant-search/results.js +121 -32
  49. package/es/common/components/instant-search/services/api.js +12 -10
  50. package/es/common/components/instant-search/services/messages.js +3 -3
  51. package/es/common/components/instant-search/services/utils.js +34 -34
  52. package/es/common/components/msem-preset-editor/components/facet-selector.js +39 -22
  53. package/es/common/components/msem-preset-editor/components/form.js +54 -5
  54. package/es/common/components/msem-preset-editor/components/stay-picker.js +72 -33
  55. package/es/common/components/msem-preset-editor/components/widget-list-item.js +130 -42
  56. package/es/common/components/msem-preset-editor/components/widget-list.js +54 -29
  57. package/es/common/components/msem-preset-editor/editor-dialog.js +68 -21
  58. package/es/common/components/msem-preset-editor/editors/elloha.js +102 -69
  59. package/es/common/components/msem-preset-editor/editors/index.js +6 -6
  60. package/es/common/components/msem-preset-editor/editors/lodgings.js +316 -184
  61. package/es/common/components/msem-preset-editor/editors/ski-passes.js +267 -180
  62. package/es/common/components/msem-preset-editor/editors/standard-products.js +84 -56
  63. package/es/common/components/msem-preset-editor/editors/vakario.js +239 -171
  64. package/es/common/components/msem-preset-editor/msem-preset-editor.js +215 -129
  65. package/es/common/components/msem-preset-editor/services/api.js +69 -42
  66. package/es/common/components/msem-preset-editor/services/offers.js +61 -35
  67. package/es/common/components/msem-preset-editor/services/preset.js +22 -14
  68. package/es/common/components/msem-preset-editor/services/url-params.js +24 -24
  69. package/es/common/components/msem-preset-linker/components/actions.js +52 -40
  70. package/es/common/components/msem-preset-linker/components/overlays.js +57 -41
  71. package/es/common/components/msem-preset-linker/components/resort-selector.js +21 -11
  72. package/es/common/components/msem-preset-linker/hooks/use-msem-presets.js +43 -31
  73. package/es/common/components/msem-preset-linker/index.js +1 -1
  74. package/es/common/components/msem-preset-linker/msem-preset-linker.js +71 -42
  75. package/es/common/components/msem-preset-linker/services/url-params.js +10 -13
  76. package/es/common/components/plausible/hooks/use-plausible.js +22 -18
  77. package/es/common/components/plausible/index.js +1 -1
  78. package/es/common/components/plausible/plausible.js +23 -14
  79. package/es/common/components/plausible/services/callback.js +164 -115
  80. package/es/common/components/plausible/services/load.js +4 -6
  81. package/es/common/components/plausible/services/send-goal.js +6 -3
  82. package/es/common/components/scroll-spy.js +56 -43
  83. package/es/common/components/scrolling-carousel/index.js +1 -1
  84. package/es/common/components/scrolling-carousel/scrolling-carousel.js +94 -55
  85. package/es/common/components/tabbed-zones.js +100 -47
  86. package/es/common/hooks/use-faq.js +37 -36
  87. package/es/common/hooks/use-in-view.js +74 -74
  88. package/es/common/hooks/use-scroll-direction.js +37 -32
  89. package/es/common/hooks/use-stay.js +16 -13
  90. package/es/common/hooks/use-sticky.js +35 -35
  91. package/es/common/hooks/use-tunnel.js +42 -30
  92. package/es/common/hooks/use-update-effect.js +9 -9
  93. package/es/common/hooks/use-window-sizes.js +27 -28
  94. package/es/common/utils/cms.js +15 -17
  95. package/es/common/utils/cookies.js +10 -11
  96. package/es/common/utils/copy.js +11 -11
  97. package/es/common/utils/dates.js +8 -10
  98. package/es/common/utils/elements.js +14 -15
  99. package/es/common/utils/events.js +4 -19
  100. package/es/common/utils/file-manager.js +12 -10
  101. package/es/common/utils/load-js.js +10 -11
  102. package/es/common/utils/msem-widget.js +30 -23
  103. package/es/common/utils/url-parameters.js +11 -7
  104. package/es/esf/components/magic-box/index.js +1 -1
  105. package/es/esf/components/magic-box/magic-box.js +164 -102
  106. package/es/esf/components/parcours-esf/index.js +1 -1
  107. package/es/esf/components/parcours-esf/parcours-esf.js +45 -30
  108. package/es/esf/components/period-picker/period-picker.js +5 -5
  109. package/es/lbm/components/lumiplan/api.js +35 -18
  110. package/es/lbm/components/lumiplan/domain.js +96 -20
  111. package/es/lbm/components/lumiplan/i18n/translations.js +24 -15
  112. package/es/lbm/components/lumiplan/index.js +1 -1
  113. package/es/lbm/components/lumiplan/lumiplan.js +130 -102
  114. package/es/lbm/components/lumiplan/opening.js +116 -38
  115. package/es/lbm/components/lumiplan/pois.js +270 -161
  116. package/es/lbm/components/lumiplan/resort-selector.js +58 -36
  117. package/es/lbm/components/lumiplan/road-condition.js +100 -19
  118. package/es/lbm/components/lumiplan/todays-tips.js +45 -16
  119. package/es/lbm/components/lumiplan/types.js +1 -1
  120. package/es/lbm/components/lumiplan/weather/avalanche-risk.js +33 -8
  121. package/es/lbm/components/lumiplan/weather/index.js +1 -1
  122. package/es/lbm/components/lumiplan/weather/snow-data.js +71 -5
  123. package/es/lbm/components/lumiplan/weather/weather-data.js +126 -7
  124. package/es/lbm/components/lumiplan/weather/weather-days.js +76 -48
  125. package/es/lbm/components/lumiplan/weather/weather-icon.js +23 -20
  126. package/es/lbm/components/lumiplan/weather/weather-zones.js +71 -42
  127. package/es/lbm/components/lumiplan/weather/weather.js +90 -28
  128. package/package.json +4 -10
  129. package/es/common/components/admin-links/admin-links.d.ts +0 -11
  130. package/es/common/components/admin-links/admin-links.d.ts.map +0 -1
  131. package/es/common/components/admin-links/index.d.ts +0 -3
  132. package/es/common/components/admin-links/index.d.ts.map +0 -1
  133. package/es/common/components/breadcrumb.d.ts +0 -16
  134. package/es/common/components/breadcrumb.d.ts.map +0 -1
  135. package/es/common/components/custom-contact-form/custom-contact-form.d.ts +0 -25
  136. package/es/common/components/custom-contact-form/custom-contact-form.d.ts.map +0 -1
  137. package/es/common/components/gesco-contact-form/gesco-contact-form.d.ts +0 -17
  138. package/es/common/components/gesco-contact-form/gesco-contact-form.d.ts.map +0 -1
  139. package/es/common/components/gesco-contact-form/hooks/use-params.d.ts +0 -15
  140. package/es/common/components/gesco-contact-form/hooks/use-params.d.ts.map +0 -1
  141. package/es/common/components/gesco-contact-form/index.d.ts +0 -3
  142. package/es/common/components/gesco-contact-form/index.d.ts.map +0 -1
  143. package/es/common/components/gesco-contact-form/phone-code-select.d.ts +0 -7
  144. package/es/common/components/gesco-contact-form/phone-code-select.d.ts.map +0 -1
  145. package/es/common/components/gesco-contact-form/services/api.d.ts +0 -30
  146. package/es/common/components/gesco-contact-form/services/api.d.ts.map +0 -1
  147. package/es/common/components/gesco-contact-form/services/form.d.ts +0 -31
  148. package/es/common/components/gesco-contact-form/services/form.d.ts.map +0 -1
  149. package/es/common/components/gesco-contact-form/services/messages.d.ts +0 -34
  150. package/es/common/components/gesco-contact-form/services/messages.d.ts.map +0 -1
  151. package/es/common/components/gesco-contact-form/services/plausible.d.ts +0 -3
  152. package/es/common/components/gesco-contact-form/services/plausible.d.ts.map +0 -1
  153. package/es/common/components/gesco-contact-form/types.d.ts +0 -34
  154. package/es/common/components/gesco-contact-form/types.d.ts.map +0 -1
  155. package/es/common/components/instant-search/hooks/use-constant.d.ts +0 -2
  156. package/es/common/components/instant-search/hooks/use-constant.d.ts.map +0 -1
  157. package/es/common/components/instant-search/hooks/use-debounced-search.d.ts +0 -7
  158. package/es/common/components/instant-search/hooks/use-debounced-search.d.ts.map +0 -1
  159. package/es/common/components/instant-search/hooks/use-search.d.ts +0 -16
  160. package/es/common/components/instant-search/hooks/use-search.d.ts.map +0 -1
  161. package/es/common/components/instant-search/index.d.ts +0 -3
  162. package/es/common/components/instant-search/index.d.ts.map +0 -1
  163. package/es/common/components/instant-search/input.d.ts +0 -15
  164. package/es/common/components/instant-search/input.d.ts.map +0 -1
  165. package/es/common/components/instant-search/instant-search.d.ts +0 -14
  166. package/es/common/components/instant-search/instant-search.d.ts.map +0 -1
  167. package/es/common/components/instant-search/links.d.ts +0 -12
  168. package/es/common/components/instant-search/links.d.ts.map +0 -1
  169. package/es/common/components/instant-search/no-product.d.ts +0 -6
  170. package/es/common/components/instant-search/no-product.d.ts.map +0 -1
  171. package/es/common/components/instant-search/products.d.ts +0 -14
  172. package/es/common/components/instant-search/products.d.ts.map +0 -1
  173. package/es/common/components/instant-search/results.d.ts +0 -76
  174. package/es/common/components/instant-search/results.d.ts.map +0 -1
  175. package/es/common/components/instant-search/services/api.d.ts +0 -2
  176. package/es/common/components/instant-search/services/api.d.ts.map +0 -1
  177. package/es/common/components/instant-search/services/messages.d.ts +0 -2
  178. package/es/common/components/instant-search/services/messages.d.ts.map +0 -1
  179. package/es/common/components/instant-search/services/utils.d.ts +0 -4
  180. package/es/common/components/instant-search/services/utils.d.ts.map +0 -1
  181. package/es/common/components/msem-preset-editor/components/facet-selector.d.ts +0 -6
  182. package/es/common/components/msem-preset-editor/components/facet-selector.d.ts.map +0 -1
  183. package/es/common/components/msem-preset-editor/components/form.d.ts +0 -8
  184. package/es/common/components/msem-preset-editor/components/form.d.ts.map +0 -1
  185. package/es/common/components/msem-preset-editor/components/stay-picker.d.ts +0 -14
  186. package/es/common/components/msem-preset-editor/components/stay-picker.d.ts.map +0 -1
  187. package/es/common/components/msem-preset-editor/components/widget-list-item.d.ts +0 -12
  188. package/es/common/components/msem-preset-editor/components/widget-list-item.d.ts.map +0 -1
  189. package/es/common/components/msem-preset-editor/components/widget-list.d.ts +0 -17
  190. package/es/common/components/msem-preset-editor/components/widget-list.d.ts.map +0 -1
  191. package/es/common/components/msem-preset-editor/editor-dialog.d.ts +0 -30
  192. package/es/common/components/msem-preset-editor/editor-dialog.d.ts.map +0 -1
  193. package/es/common/components/msem-preset-editor/editors/elloha.d.ts +0 -15
  194. package/es/common/components/msem-preset-editor/editors/elloha.d.ts.map +0 -1
  195. package/es/common/components/msem-preset-editor/editors/index.d.ts +0 -14
  196. package/es/common/components/msem-preset-editor/editors/index.d.ts.map +0 -1
  197. package/es/common/components/msem-preset-editor/editors/lodgings.d.ts +0 -17
  198. package/es/common/components/msem-preset-editor/editors/lodgings.d.ts.map +0 -1
  199. package/es/common/components/msem-preset-editor/editors/ski-passes.d.ts +0 -16
  200. package/es/common/components/msem-preset-editor/editors/ski-passes.d.ts.map +0 -1
  201. package/es/common/components/msem-preset-editor/editors/standard-products.d.ts +0 -16
  202. package/es/common/components/msem-preset-editor/editors/standard-products.d.ts.map +0 -1
  203. package/es/common/components/msem-preset-editor/editors/vakario.d.ts +0 -15
  204. package/es/common/components/msem-preset-editor/editors/vakario.d.ts.map +0 -1
  205. package/es/common/components/msem-preset-editor/msem-preset-editor.d.ts +0 -28
  206. package/es/common/components/msem-preset-editor/msem-preset-editor.d.ts.map +0 -1
  207. package/es/common/components/msem-preset-editor/services/api.d.ts +0 -15
  208. package/es/common/components/msem-preset-editor/services/api.d.ts.map +0 -1
  209. package/es/common/components/msem-preset-editor/services/offers.d.ts +0 -47
  210. package/es/common/components/msem-preset-editor/services/offers.d.ts.map +0 -1
  211. package/es/common/components/msem-preset-editor/services/preset.d.ts +0 -40
  212. package/es/common/components/msem-preset-editor/services/preset.d.ts.map +0 -1
  213. package/es/common/components/msem-preset-editor/services/url-params.d.ts +0 -3
  214. package/es/common/components/msem-preset-editor/services/url-params.d.ts.map +0 -1
  215. package/es/common/components/msem-preset-linker/components/actions.d.ts +0 -11
  216. package/es/common/components/msem-preset-linker/components/actions.d.ts.map +0 -1
  217. package/es/common/components/msem-preset-linker/components/overlays.d.ts +0 -8
  218. package/es/common/components/msem-preset-linker/components/overlays.d.ts.map +0 -1
  219. package/es/common/components/msem-preset-linker/components/resort-selector.d.ts +0 -6
  220. package/es/common/components/msem-preset-linker/components/resort-selector.d.ts.map +0 -1
  221. package/es/common/components/msem-preset-linker/hooks/use-msem-presets.d.ts +0 -4
  222. package/es/common/components/msem-preset-linker/hooks/use-msem-presets.d.ts.map +0 -1
  223. package/es/common/components/msem-preset-linker/index.d.ts +0 -3
  224. package/es/common/components/msem-preset-linker/index.d.ts.map +0 -1
  225. package/es/common/components/msem-preset-linker/msem-preset-linker.d.ts +0 -30
  226. package/es/common/components/msem-preset-linker/msem-preset-linker.d.ts.map +0 -1
  227. package/es/common/components/msem-preset-linker/services/url-params.d.ts +0 -2
  228. package/es/common/components/msem-preset-linker/services/url-params.d.ts.map +0 -1
  229. package/es/common/components/plausible/hooks/use-plausible.d.ts +0 -12
  230. package/es/common/components/plausible/hooks/use-plausible.d.ts.map +0 -1
  231. package/es/common/components/plausible/index.d.ts +0 -8
  232. package/es/common/components/plausible/index.d.ts.map +0 -1
  233. package/es/common/components/plausible/plausible.d.ts +0 -7
  234. package/es/common/components/plausible/plausible.d.ts.map +0 -1
  235. package/es/common/components/plausible/services/callback.d.ts +0 -24
  236. package/es/common/components/plausible/services/callback.d.ts.map +0 -1
  237. package/es/common/components/plausible/services/load.d.ts +0 -2
  238. package/es/common/components/plausible/services/load.d.ts.map +0 -1
  239. package/es/common/components/plausible/services/send-goal.d.ts +0 -7
  240. package/es/common/components/plausible/services/send-goal.d.ts.map +0 -1
  241. package/es/common/components/scroll-spy.d.ts +0 -14
  242. package/es/common/components/scroll-spy.d.ts.map +0 -1
  243. package/es/common/components/scrolling-carousel/index.d.ts +0 -3
  244. package/es/common/components/scrolling-carousel/index.d.ts.map +0 -1
  245. package/es/common/components/scrolling-carousel/scrolling-carousel.d.ts +0 -8
  246. package/es/common/components/scrolling-carousel/scrolling-carousel.d.ts.map +0 -1
  247. package/es/common/components/tabbed-zones.d.ts +0 -12
  248. package/es/common/components/tabbed-zones.d.ts.map +0 -1
  249. package/es/common/hooks/use-faq.d.ts +0 -3
  250. package/es/common/hooks/use-faq.d.ts.map +0 -1
  251. package/es/common/hooks/use-in-view.d.ts +0 -5
  252. package/es/common/hooks/use-in-view.d.ts.map +0 -1
  253. package/es/common/hooks/use-scroll-direction.d.ts +0 -11
  254. package/es/common/hooks/use-scroll-direction.d.ts.map +0 -1
  255. package/es/common/hooks/use-stay.d.ts +0 -4
  256. package/es/common/hooks/use-stay.d.ts.map +0 -1
  257. package/es/common/hooks/use-sticky.d.ts +0 -4
  258. package/es/common/hooks/use-sticky.d.ts.map +0 -1
  259. package/es/common/hooks/use-tunnel.d.ts +0 -8
  260. package/es/common/hooks/use-tunnel.d.ts.map +0 -1
  261. package/es/common/hooks/use-update-effect.d.ts +0 -2
  262. package/es/common/hooks/use-update-effect.d.ts.map +0 -1
  263. package/es/common/hooks/use-window-sizes.d.ts +0 -7
  264. package/es/common/hooks/use-window-sizes.d.ts.map +0 -1
  265. package/es/common/utils/cms.d.ts +0 -4
  266. package/es/common/utils/cms.d.ts.map +0 -1
  267. package/es/common/utils/cookies.d.ts +0 -2
  268. package/es/common/utils/cookies.d.ts.map +0 -1
  269. package/es/common/utils/copy.d.ts +0 -2
  270. package/es/common/utils/copy.d.ts.map +0 -1
  271. package/es/common/utils/dates.d.ts +0 -2
  272. package/es/common/utils/dates.d.ts.map +0 -1
  273. package/es/common/utils/elements.d.ts +0 -5
  274. package/es/common/utils/elements.d.ts.map +0 -1
  275. package/es/common/utils/events.d.ts +0 -4
  276. package/es/common/utils/events.d.ts.map +0 -1
  277. package/es/common/utils/file-manager.d.ts +0 -13
  278. package/es/common/utils/file-manager.d.ts.map +0 -1
  279. package/es/common/utils/load-js.d.ts +0 -3
  280. package/es/common/utils/load-js.d.ts.map +0 -1
  281. package/es/common/utils/msem-widget.d.ts +0 -16
  282. package/es/common/utils/msem-widget.d.ts.map +0 -1
  283. package/es/common/utils/url-parameters.d.ts +0 -2
  284. package/es/common/utils/url-parameters.d.ts.map +0 -1
  285. package/es/esf/components/magic-box/index.d.ts +0 -3
  286. package/es/esf/components/magic-box/index.d.ts.map +0 -1
  287. package/es/esf/components/magic-box/magic-box.d.ts +0 -22
  288. package/es/esf/components/magic-box/magic-box.d.ts.map +0 -1
  289. package/es/esf/components/parcours-esf/index.d.ts +0 -3
  290. package/es/esf/components/parcours-esf/index.d.ts.map +0 -1
  291. package/es/esf/components/parcours-esf/parcours-esf.d.ts +0 -14
  292. package/es/esf/components/parcours-esf/parcours-esf.d.ts.map +0 -1
  293. package/es/lbm/components/lumiplan/api.d.ts +0 -8
  294. package/es/lbm/components/lumiplan/api.d.ts.map +0 -1
  295. package/es/lbm/components/lumiplan/domain.d.ts +0 -8
  296. package/es/lbm/components/lumiplan/domain.d.ts.map +0 -1
  297. package/es/lbm/components/lumiplan/i18n/translations.d.ts +0 -7
  298. package/es/lbm/components/lumiplan/i18n/translations.d.ts.map +0 -1
  299. package/es/lbm/components/lumiplan/index.d.ts +0 -3
  300. package/es/lbm/components/lumiplan/index.d.ts.map +0 -1
  301. package/es/lbm/components/lumiplan/lumiplan.d.ts +0 -2
  302. package/es/lbm/components/lumiplan/lumiplan.d.ts.map +0 -1
  303. package/es/lbm/components/lumiplan/opening.d.ts +0 -9
  304. package/es/lbm/components/lumiplan/opening.d.ts.map +0 -1
  305. package/es/lbm/components/lumiplan/pois.d.ts +0 -8
  306. package/es/lbm/components/lumiplan/pois.d.ts.map +0 -1
  307. package/es/lbm/components/lumiplan/resort-selector.d.ts +0 -12
  308. package/es/lbm/components/lumiplan/resort-selector.d.ts.map +0 -1
  309. package/es/lbm/components/lumiplan/road-condition.d.ts +0 -8
  310. package/es/lbm/components/lumiplan/road-condition.d.ts.map +0 -1
  311. package/es/lbm/components/lumiplan/todays-tips.d.ts +0 -8
  312. package/es/lbm/components/lumiplan/todays-tips.d.ts.map +0 -1
  313. package/es/lbm/components/lumiplan/types.d.ts +0 -285
  314. package/es/lbm/components/lumiplan/types.d.ts.map +0 -1
  315. package/es/lbm/components/lumiplan/weather/avalanche-risk.d.ts +0 -4
  316. package/es/lbm/components/lumiplan/weather/avalanche-risk.d.ts.map +0 -1
  317. package/es/lbm/components/lumiplan/weather/index.d.ts +0 -3
  318. package/es/lbm/components/lumiplan/weather/index.d.ts.map +0 -1
  319. package/es/lbm/components/lumiplan/weather/snow-data.d.ts +0 -8
  320. package/es/lbm/components/lumiplan/weather/snow-data.d.ts.map +0 -1
  321. package/es/lbm/components/lumiplan/weather/weather-data.d.ts +0 -9
  322. package/es/lbm/components/lumiplan/weather/weather-data.d.ts.map +0 -1
  323. package/es/lbm/components/lumiplan/weather/weather-days.d.ts +0 -7
  324. package/es/lbm/components/lumiplan/weather/weather-days.d.ts.map +0 -1
  325. package/es/lbm/components/lumiplan/weather/weather-icon.d.ts +0 -23
  326. package/es/lbm/components/lumiplan/weather/weather-icon.d.ts.map +0 -1
  327. package/es/lbm/components/lumiplan/weather/weather-zones.d.ts +0 -6
  328. package/es/lbm/components/lumiplan/weather/weather-zones.d.ts.map +0 -1
  329. package/es/lbm/components/lumiplan/weather/weather.d.ts +0 -8
  330. package/es/lbm/components/lumiplan/weather/weather.d.ts.map +0 -1
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
1
  import * as React from "react";
3
2
  import getConfig from "next/config";
4
3
  import Image from "next/image";
@@ -9,177 +8,287 @@ import Tooltip from "dt-design-system/es/tooltip";
9
8
  import Popover from "dt-design-system/es/popover";
10
9
  import Loader from "dt-design-system/es/loader";
11
10
  import * as Icons from "dt-design-system/es/icons";
12
- // import useWindowSizes from "ublo-lib/es/common/hooks/use-window-sizes";
13
11
  import useWindowSizes from "../../../common/hooks/use-window-sizes";
14
12
  import * as LiftsIcons from "./icons/lifts";
15
13
  import * as TrailIcons from "./icons/trails";
16
14
  import LinkIcon from "./icons/link";
17
15
  import T, { t } from "./i18n/translations";
18
16
  import css from "./pois.module.css";
17
+ import { jsx as _jsx } from "react/jsx-runtime";
18
+ import { jsxs as _jsxs } from "react/jsx-runtime";
19
+ import { Fragment as _Fragment } from "react/jsx-runtime";
19
20
  const LIFT_ICONS = {
20
- TRAIN: LiftsIcons.Teleski,
21
- FUNICULAR: LiftsIcons.Teleski,
22
- TRAM: LiftsIcons.Teleski,
23
- CABRIOLET_GONDOLA: LiftsIcons.Telecabine,
24
- GONDOLA: LiftsIcons.Telecabine,
25
- COMBINED_CHAIR_GONDOLA_LIFT: LiftsIcons.Telecabine,
26
- DETACHABLE_BUBBLE_CHAIRLIFT: LiftsIcons.Telecabine,
27
- DETACHABLE_CHAIRLIFT: LiftsIcons.TelesiegeDebrayable,
28
- CHAIRLIFT: LiftsIcons.Telesiege,
29
- SURFACE_LIFT: LiftsIcons.Teleski,
30
- MAGIC_CARPET: LiftsIcons.TapisRoulant,
31
- ROPE_TOW: LiftsIcons.Teleski,
32
- DEFAULT: LiftsIcons.Teleski,
21
+ TRAIN: LiftsIcons.Teleski,
22
+ FUNICULAR: LiftsIcons.Teleski,
23
+ TRAM: LiftsIcons.Teleski,
24
+ CABRIOLET_GONDOLA: LiftsIcons.Telecabine,
25
+ GONDOLA: LiftsIcons.Telecabine,
26
+ COMBINED_CHAIR_GONDOLA_LIFT: LiftsIcons.Telecabine,
27
+ DETACHABLE_BUBBLE_CHAIRLIFT: LiftsIcons.Telecabine,
28
+ DETACHABLE_CHAIRLIFT: LiftsIcons.TelesiegeDebrayable,
29
+ CHAIRLIFT: LiftsIcons.Telesiege,
30
+ SURFACE_LIFT: LiftsIcons.Teleski,
31
+ MAGIC_CARPET: LiftsIcons.TapisRoulant,
32
+ ROPE_TOW: LiftsIcons.Teleski,
33
+ DEFAULT: LiftsIcons.Teleski
33
34
  };
34
35
  const TRAIL_ICONS = {
35
- BIKE_PARK: TrailIcons.VTT,
36
- BOARDERCROSS: TrailIcons.BoarderCross,
37
- BUMP_TRAIL: TrailIcons.ChampDeBosse,
38
- COASTER: TrailIcons.LugeSurRail,
39
- CROSS_COUNTRY_MOUNTAIN_BIKING: TrailIcons.BoarderCross,
40
- CROSS_COUNTRY_SKIING: TrailIcons.SkiAlpin,
41
- DOWNHILL_MOUNTAIN_BIKING: TrailIcons.VTT,
42
- DOWNHILL_SKIING: TrailIcons.SkiAlpin,
43
- EBIKE: TrailIcons.VTT,
44
- ENDURO: TrailIcons.VTT,
45
- FREERIDE_AREA_OFF_PIST: TrailIcons.SkiAlpin,
46
- FREERIDE_SKI_ITINERARY: TrailIcons.SkiAlpin,
47
- FUN_ZONE: TrailIcons.Freeride,
48
- GATE: TrailIcons.Freeride,
49
- GLADES: TrailIcons.Freeride,
50
- ILLUMINATED_TRAIL: TrailIcons.PisteEclairee,
51
- MULTI_USE_TRAIL: TrailIcons.Freeride,
52
- MTB_ENDURO: TrailIcons.VTT,
53
- PATH: TrailIcons.Pieton,
54
- PEDESTRIAN: TrailIcons.Pieton,
55
- ROUTE_OF_CROSS_COUNTRY: TrailIcons.SkiAlpin,
56
- SKI_TOURING: TrailIcons.Freeride,
57
- SLEDDING_HILL: TrailIcons.Luge,
58
- SNOWPARK: TrailIcons.Snowpark,
59
- SNOWPARK_LINE: TrailIcons.Snowpark,
60
- SNOWSHOE: TrailIcons.Raquette,
61
- SNOWTUBING: TrailIcons.Snowtubing,
62
- TERRAIN_PARK: TrailIcons.Snowpark,
63
- TERRAIN_PARK_US: TrailIcons.Snowpark,
64
- TRAIL_RUNNING: TrailIcons.Pieton,
65
- TREETOP_ADVENTURE_PARK: TrailIcons.Accrobranche,
66
- TYROLEAN: TrailIcons.Tyrolienne,
67
- VIDEO_ZONE: TrailIcons.Freeride,
68
- UNDEF: TrailIcons.Freeride,
69
- DEFAULT: TrailIcons.Freeride,
36
+ BIKE_PARK: TrailIcons.VTT,
37
+ BOARDERCROSS: TrailIcons.BoarderCross,
38
+ BUMP_TRAIL: TrailIcons.ChampDeBosse,
39
+ COASTER: TrailIcons.LugeSurRail,
40
+ CROSS_COUNTRY_MOUNTAIN_BIKING: TrailIcons.BoarderCross,
41
+ CROSS_COUNTRY_SKIING: TrailIcons.SkiAlpin,
42
+ DOWNHILL_MOUNTAIN_BIKING: TrailIcons.VTT,
43
+ DOWNHILL_SKIING: TrailIcons.SkiAlpin,
44
+ EBIKE: TrailIcons.VTT,
45
+ ENDURO: TrailIcons.VTT,
46
+ FREERIDE_AREA_OFF_PIST: TrailIcons.SkiAlpin,
47
+ FREERIDE_SKI_ITINERARY: TrailIcons.SkiAlpin,
48
+ FUN_ZONE: TrailIcons.Freeride,
49
+ GATE: TrailIcons.Freeride,
50
+ GLADES: TrailIcons.Freeride,
51
+ ILLUMINATED_TRAIL: TrailIcons.PisteEclairee,
52
+ MULTI_USE_TRAIL: TrailIcons.Freeride,
53
+ MTB_ENDURO: TrailIcons.VTT,
54
+ PATH: TrailIcons.Pieton,
55
+ PEDESTRIAN: TrailIcons.Pieton,
56
+ ROUTE_OF_CROSS_COUNTRY: TrailIcons.SkiAlpin,
57
+ SKI_TOURING: TrailIcons.Freeride,
58
+ SLEDDING_HILL: TrailIcons.Luge,
59
+ SNOWPARK: TrailIcons.Snowpark,
60
+ SNOWPARK_LINE: TrailIcons.Snowpark,
61
+ SNOWSHOE: TrailIcons.Raquette,
62
+ SNOWTUBING: TrailIcons.Snowtubing,
63
+ TERRAIN_PARK: TrailIcons.Snowpark,
64
+ TERRAIN_PARK_US: TrailIcons.Snowpark,
65
+ TRAIL_RUNNING: TrailIcons.Pieton,
66
+ TREETOP_ADVENTURE_PARK: TrailIcons.Accrobranche,
67
+ TYROLEAN: TrailIcons.Tyrolienne,
68
+ VIDEO_ZONE: TrailIcons.Freeride,
69
+ UNDEF: TrailIcons.Freeride,
70
+ DEFAULT: TrailIcons.Freeride
70
71
  };
71
- const { publicRuntimeConfig } = getConfig();
72
- const { lumiplanApi } = publicRuntimeConfig;
72
+ const {
73
+ publicRuntimeConfig
74
+ } = getConfig();
75
+ const {
76
+ lumiplanApi
77
+ } = publicRuntimeConfig;
73
78
  const SPECIAL_TRAILS = {
74
- "Labell'glisse": `${lumiplanApi}/pistes-ludiques/labell-glisse.png`,
75
- Waouland: `${lumiplanApi}/pistes-ludiques/waouland.png`,
76
- Opoualand: `${lumiplanApi}/pistes-ludiques/opoualand.png`,
77
- "The Flying Donuts": `${lumiplanApi}/pistes-ludiques/flying-donuts.png`,
78
- "Schlitte Mountain": `${lumiplanApi}/pistes-ludiques/schlitte-mountain.png`,
79
+ "Labell'glisse": `${lumiplanApi}/pistes-ludiques/labell-glisse.png`,
80
+ Waouland: `${lumiplanApi}/pistes-ludiques/waouland.png`,
81
+ Opoualand: `${lumiplanApi}/pistes-ludiques/opoualand.png`,
82
+ "The Flying Donuts": `${lumiplanApi}/pistes-ludiques/flying-donuts.png`,
83
+ "Schlitte Mountain": `${lumiplanApi}/pistes-ludiques/schlitte-mountain.png`
79
84
  };
80
- const Pois = React.forwardRef(({ pois }, ref) => {
81
- const { lang } = useUbloContext();
82
- const { width: windowWidth } = useWindowSizes();
83
- const isMobile = windowWidth && windowWidth < 768;
84
- if (pois === undefined) {
85
- return (_jsx("div", { ref: ref, className: css.loader, children: _jsx(Loader, { variant: "overlay" }) }));
86
- }
87
- if (!pois) {
88
- return null;
89
- }
90
- const flattenedPois = pois.reduce((acc, zone) => {
91
- const { name, lifts = [], trails = [], activities = [], interconnections = [], } = zone;
92
- const liftsWithSectorName = lifts.map((lift) => ({
93
- ...lift,
94
- sectorName: name,
95
- }));
96
- const trailsWithSectorName = trails.map((trail) => ({
97
- ...trail,
98
- sectorName: name,
99
- }));
100
- const activitiesWithSectorName = activities.map((activity) => ({
101
- ...activity,
102
- sectorName: name,
103
- }));
104
- const interconnectionsWithSectorName = interconnections.map((interconnection) => ({
105
- ...interconnection,
106
- sectorName: name,
107
- }));
108
- return [
109
- ...interconnectionsWithSectorName,
110
- ...acc,
111
- ...liftsWithSectorName,
112
- ...trailsWithSectorName,
113
- ...activitiesWithSectorName,
114
- ];
115
- }, []);
116
- if (!flattenedPois.length) {
117
- return null;
118
- }
119
- return (_jsx("div", { className: css.pois, children: _jsx("div", { className: css.inner, children: pois.map((zone) => {
120
- const { name, lifts = [], trails = [], activities = [], interconnections = [], } = zone;
121
- const zonePois = [
122
- ...interconnections,
123
- ...lifts,
124
- ...trails,
125
- ...activities,
126
- ];
127
- if (!zonePois.length) {
128
- return null;
129
- }
130
- return (_jsxs("div", { className: css.zone, children: [_jsx("div", { className: css.zoneName, children: name }), _jsx("div", { className: css.list, children: zonePois.map(({ id, name, type, liftType, trailType, activityType, trailLevel, messagePoi, openingStatus, snowQuality, groomingStatus, openingTimesReal, openingTimesTh, }) => {
131
- const isLift = type === "SKI_LIFT";
132
- const isInterconnection = type === "LINK";
133
- const translationCode = isLift
134
- ? `pois.lifts.${liftType}`
135
- : `pois.trails.${trailType}`;
136
- const hasTrailLevel = trailLevel !== undefined &&
137
- trailLevel !== "UNDEF" &&
138
- trailLevel !== "YELLOW";
139
- const trailLevelLabel = hasTrailLevel
140
- ? `(${t(lang, `pois.trail-levels.${trailLevel}`)})`
141
- : null;
142
- const specialTrail = Object.keys(SPECIAL_TRAILS).find((key) => name?.toLowerCase()?.includes(key.toLowerCase()));
143
- const message = messagePoi?.data?.find(({ language }) => {
144
- const _lang = lang === "fr" ? "fr_FR" : "en_US";
145
- return language === _lang;
146
- });
147
- const hasGroomingStatus = groomingStatus !== undefined &&
148
- groomingStatus !== "UNDEF";
149
- const hasSnowQuality = snowQuality !== undefined && snowQuality !== "UNDEF";
150
- const classes = classNames(css.poi, {
151
- [css[trailLevel]]: hasTrailLevel,
152
- });
153
- let status = "CLOSED";
154
- if (openingStatus?.includes("DELAYED")) {
155
- status = "DELAYED";
156
- }
157
- else if (openingStatus?.includes("STOPPED")) {
158
- status = "STOPPED";
159
- }
160
- else if (openingStatus?.includes("FORECAST")) {
161
- status = "FORECAST";
162
- }
163
- else if (openingStatus?.includes("OPEN")) {
164
- status = "OPEN";
165
- }
166
- const statusCode = `pois.opening-statuses.${status}`;
167
- let Icon = isLift
168
- ? LIFT_ICONS[liftType] || LIFT_ICONS.DEFAULT
169
- : TRAIL_ICONS[activityType || trailType] ||
170
- TRAIL_ICONS.DEFAULT;
171
- if (isInterconnection) {
172
- Icon = LinkIcon;
173
- }
174
- const openingTimes = openingTimesReal || openingTimesTh;
175
- const isClosed = status === "CLOSED";
176
- const showOpeningTimes = !isClosed && openingTimes && openingTimes?.length > 0;
177
- return (_jsxs("div", { className: classes, children: [_jsx("div", { className: css.poiIcon, children: specialTrail ? (_jsx(Image, { src: SPECIAL_TRAILS[specialTrail], width: 50, height: 50, alt: specialTrail })) : (_jsx(Icon, {})) }), _jsxs("div", { className: css.poiInfo, children: [_jsxs("div", { className: css.poiHeader, children: [_jsx("span", { className: css.poiName, children: name }), _jsxs("span", { className: css.poiStatus, children: [_jsx(T, { id: statusCode }), showOpeningTimes && (_jsxs("div", { className: css.poiOpeningTimes, children: [openingTimes[0].beginTime, " -", " ", openingTimes[0].endTime] }))] })] }), _jsxs("div", { className: css.poiDetail, children: [isInterconnection && (_jsx("div", { className: css.poiDetailHeader, children: _jsx("b", { children: _jsx(T, { id: "interconnection" }) }) })), trailType !== "FUN_ZONE" &&
178
- activityType !== "FUN_ZONE" && (_jsxs("div", { className: css.poiDetailKind, children: [_jsx(T, { id: translationCode }), " ", trailLevelLabel] })), !isLift && (_jsxs("div", { className: css.poiTrailDetail, children: [hasGroomingStatus && (_jsx("div", { className: css.poiTrailDetailItem, children: _jsx(T, { id: `snow.grooming.states.${groomingStatus}` }) })), hasSnowQuality && (_jsxs("div", { className: css.poiTrailDetailItem, children: [_jsx(T, { id: "snow.snow-quality.title" }), " :", " ", _jsx(T, { id: `snow.snow-quality.states.${snowQuality}` })] }))] }))] })] }), _jsx("div", { className: css.poiMessage, children: message?.data && (_jsx(_Fragment, { children: isMobile ? (
179
- // @ts-ignore
180
- _jsx(Popover, { innerClassName: css.poiPopover, trigger: _jsx(Button, { variant: "transparent", children: _jsx(Icons.Info, {}) }), children: message.data })) : (_jsx(Tooltip, { content: message.data, children: _jsx(Button, { variant: "transparent", children: _jsx(Icons.Info, {}) }) })) })) })] }, id));
181
- }) })] }, name));
182
- }) }) }));
85
+ const Pois = React.forwardRef(({
86
+ pois
87
+ }, ref) => {
88
+ const {
89
+ lang
90
+ } = useUbloContext();
91
+ const {
92
+ width: windowWidth
93
+ } = useWindowSizes();
94
+ const isMobile = windowWidth && windowWidth < 768;
95
+ if (pois === undefined) {
96
+ return _jsx("div", {
97
+ ref: ref,
98
+ className: css.loader,
99
+ children: _jsx(Loader, {
100
+ variant: "overlay"
101
+ })
102
+ });
103
+ }
104
+ if (!pois) {
105
+ return null;
106
+ }
107
+ const flattenedPois = pois.reduce((acc, zone) => {
108
+ const {
109
+ name,
110
+ lifts = [],
111
+ trails = [],
112
+ activities = [],
113
+ interconnections = []
114
+ } = zone;
115
+ const liftsWithSectorName = lifts.map(lift => ({
116
+ ...lift,
117
+ sectorName: name
118
+ }));
119
+ const trailsWithSectorName = trails.map(trail => ({
120
+ ...trail,
121
+ sectorName: name
122
+ }));
123
+ const activitiesWithSectorName = activities.map(activity => ({
124
+ ...activity,
125
+ sectorName: name
126
+ }));
127
+ const interconnectionsWithSectorName = interconnections.map(interconnection => ({
128
+ ...interconnection,
129
+ sectorName: name
130
+ }));
131
+ return [...interconnectionsWithSectorName, ...acc, ...liftsWithSectorName, ...trailsWithSectorName, ...activitiesWithSectorName];
132
+ }, []);
133
+ if (!flattenedPois.length) {
134
+ return null;
135
+ }
136
+ return _jsx("div", {
137
+ className: css.pois,
138
+ children: _jsx("div", {
139
+ className: css.inner,
140
+ children: pois.map(zone => {
141
+ const {
142
+ name,
143
+ lifts = [],
144
+ trails = [],
145
+ activities = [],
146
+ interconnections = []
147
+ } = zone;
148
+ const zonePois = [...interconnections, ...lifts, ...trails, ...activities];
149
+ if (!zonePois.length) {
150
+ return null;
151
+ }
152
+ return _jsxs("div", {
153
+ className: css.zone,
154
+ children: [_jsx("div", {
155
+ className: css.zoneName,
156
+ children: name
157
+ }), _jsx("div", {
158
+ className: css.list,
159
+ children: zonePois.map(({
160
+ id,
161
+ name,
162
+ type,
163
+ liftType,
164
+ trailType,
165
+ activityType,
166
+ trailLevel,
167
+ messagePoi,
168
+ openingStatus,
169
+ snowQuality,
170
+ groomingStatus,
171
+ openingTimesReal,
172
+ openingTimesTh
173
+ }) => {
174
+ const isLift = type === "SKI_LIFT";
175
+ const isInterconnection = type === "LINK";
176
+ const translationCode = isLift ? `pois.lifts.${liftType}` : `pois.trails.${trailType}`;
177
+ const hasTrailLevel = trailLevel !== undefined && trailLevel !== "UNDEF" && trailLevel !== "YELLOW";
178
+ const trailLevelLabel = hasTrailLevel ? `(${t(lang, `pois.trail-levels.${trailLevel}`)})` : null;
179
+ const specialTrail = Object.keys(SPECIAL_TRAILS).find(key => name?.toLowerCase()?.includes(key.toLowerCase()));
180
+ const message = messagePoi?.data?.find(({
181
+ language
182
+ }) => {
183
+ const _lang = lang === "fr" ? "fr_FR" : "en_US";
184
+ return language === _lang;
185
+ });
186
+ const hasGroomingStatus = groomingStatus !== undefined && groomingStatus !== "UNDEF";
187
+ const hasSnowQuality = snowQuality !== undefined && snowQuality !== "UNDEF";
188
+ const classes = classNames(css.poi, {
189
+ [css[trailLevel]]: hasTrailLevel
190
+ });
191
+ let status = "CLOSED";
192
+ if (openingStatus?.includes("DELAYED")) {
193
+ status = "DELAYED";
194
+ } else if (openingStatus?.includes("STOPPED")) {
195
+ status = "STOPPED";
196
+ } else if (openingStatus?.includes("FORECAST")) {
197
+ status = "FORECAST";
198
+ } else if (openingStatus?.includes("OPEN")) {
199
+ status = "OPEN";
200
+ }
201
+ const statusCode = `pois.opening-statuses.${status}`;
202
+ let Icon = isLift ? LIFT_ICONS[liftType] || LIFT_ICONS.DEFAULT : TRAIL_ICONS[activityType || trailType] || TRAIL_ICONS.DEFAULT;
203
+ if (isInterconnection) {
204
+ Icon = LinkIcon;
205
+ }
206
+ const openingTimes = openingTimesReal || openingTimesTh;
207
+ const isClosed = status === "CLOSED";
208
+ const showOpeningTimes = !isClosed && openingTimes && openingTimes?.length > 0;
209
+ return _jsxs("div", {
210
+ className: classes,
211
+ children: [_jsx("div", {
212
+ className: css.poiIcon,
213
+ children: specialTrail ? _jsx(Image, {
214
+ src: SPECIAL_TRAILS[specialTrail],
215
+ width: 50,
216
+ height: 50,
217
+ alt: specialTrail
218
+ }) : _jsx(Icon, {})
219
+ }), _jsxs("div", {
220
+ className: css.poiInfo,
221
+ children: [_jsxs("div", {
222
+ className: css.poiHeader,
223
+ children: [_jsx("span", {
224
+ className: css.poiName,
225
+ children: name
226
+ }), _jsxs("span", {
227
+ className: css.poiStatus,
228
+ children: [_jsx(T, {
229
+ id: statusCode
230
+ }), showOpeningTimes && _jsxs("div", {
231
+ className: css.poiOpeningTimes,
232
+ children: [openingTimes[0].beginTime, " -", " ", openingTimes[0].endTime]
233
+ })]
234
+ })]
235
+ }), _jsxs("div", {
236
+ className: css.poiDetail,
237
+ children: [isInterconnection && _jsx("div", {
238
+ className: css.poiDetailHeader,
239
+ children: _jsx("b", {
240
+ children: _jsx(T, {
241
+ id: "interconnection"
242
+ })
243
+ })
244
+ }), trailType !== "FUN_ZONE" && activityType !== "FUN_ZONE" && _jsxs("div", {
245
+ className: css.poiDetailKind,
246
+ children: [_jsx(T, {
247
+ id: translationCode
248
+ }), " ", trailLevelLabel]
249
+ }), !isLift && _jsxs("div", {
250
+ className: css.poiTrailDetail,
251
+ children: [hasGroomingStatus && _jsx("div", {
252
+ className: css.poiTrailDetailItem,
253
+ children: _jsx(T, {
254
+ id: `snow.grooming.states.${groomingStatus}`
255
+ })
256
+ }), hasSnowQuality && _jsxs("div", {
257
+ className: css.poiTrailDetailItem,
258
+ children: [_jsx(T, {
259
+ id: "snow.snow-quality.title"
260
+ }), " :", " ", _jsx(T, {
261
+ id: `snow.snow-quality.states.${snowQuality}`
262
+ })]
263
+ })]
264
+ })]
265
+ })]
266
+ }), _jsx("div", {
267
+ className: css.poiMessage,
268
+ children: message?.data && _jsx(_Fragment, {
269
+ children: isMobile ? _jsx(Popover, {
270
+ innerClassName: css.poiPopover,
271
+ trigger: _jsx(Button, {
272
+ variant: "transparent",
273
+ children: _jsx(Icons.Info, {})
274
+ }),
275
+ children: message.data
276
+ }) : _jsx(Tooltip, {
277
+ content: message.data,
278
+ children: _jsx(Button, {
279
+ variant: "transparent",
280
+ children: _jsx(Icons.Info, {})
281
+ })
282
+ })
283
+ })
284
+ })]
285
+ }, id);
286
+ })
287
+ })]
288
+ }, name);
289
+ })
290
+ })
291
+ });
183
292
  });
184
293
  Pois.displayName = "Pois";
185
- export default Pois;
294
+ export default Pois;
@@ -1,42 +1,64 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  import * as React from "react";
3
2
  import classNames from "classnames";
4
- // import useWindowSizes from "ublo-lib/es/common/hooks/use-window-sizes";
5
3
  import useWindowSizes from "../../../common/hooks/use-window-sizes";
6
4
  import Button from "dt-design-system/es/button";
7
5
  import css from "./resort-selector.module.css";
8
- export default function ResortSelector({ resorts, currentResortId, setCurrentResortId, }) {
9
- const [showLeftShadow, setShowLeftShadow] = React.useState(false);
10
- const [showRightShadow, setShowRightShadow] = React.useState(false);
11
- const containerRef = React.useRef(null);
12
- const scrollerRef = React.useRef(null);
13
- const { width, height } = useWindowSizes();
14
- const refreshShadows = React.useCallback(() => {
15
- const container = containerRef.current;
16
- const scroller = scrollerRef.current;
17
- if (container && scroller) {
18
- setShowLeftShadow(scroller.scrollLeft > 50);
19
- const maxScroll = Math.round(scroller.scrollWidth) - Math.round(scroller.clientWidth);
20
- setShowRightShadow(scroller.scrollLeft < maxScroll - 50);
21
- }
22
- }, []);
23
- React.useEffect(() => {
24
- refreshShadows();
25
- }, [refreshShadows, width, height]);
26
- if (!resorts || resorts.length < 2) {
27
- return null;
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ export default function ResortSelector({
8
+ resorts,
9
+ currentResortId,
10
+ setCurrentResortId
11
+ }) {
12
+ const [showLeftShadow, setShowLeftShadow] = React.useState(false);
13
+ const [showRightShadow, setShowRightShadow] = React.useState(false);
14
+ const containerRef = React.useRef(null);
15
+ const scrollerRef = React.useRef(null);
16
+ const {
17
+ width,
18
+ height
19
+ } = useWindowSizes();
20
+ const refreshShadows = React.useCallback(() => {
21
+ const container = containerRef.current;
22
+ const scroller = scrollerRef.current;
23
+ if (container && scroller) {
24
+ setShowLeftShadow(scroller.scrollLeft > 50);
25
+ const maxScroll = Math.round(scroller.scrollWidth) - Math.round(scroller.clientWidth);
26
+ setShowRightShadow(scroller.scrollLeft < maxScroll - 50);
28
27
  }
29
- const classes = classNames(css.selector, {
30
- [css.leftShadow]: showLeftShadow,
31
- [css.rightShadow]: showRightShadow,
32
- });
33
- return (_jsx("div", { ref: containerRef, className: classes, children: _jsx("div", { ref: scrollerRef, onScroll: refreshShadows, className: css.content, children: resorts.map(({ id, label }) => {
34
- const classes = classNames(css.button, {
35
- [css.selected]: id === currentResortId,
36
- });
37
- const updateCurrentResort = () => {
38
- setCurrentResortId(id);
39
- };
40
- return (_jsx(Button, { className: classes, onClick: updateCurrentResort, children: label }, id));
41
- }) }) }));
42
- }
28
+ }, []);
29
+ React.useEffect(() => {
30
+ refreshShadows();
31
+ }, [refreshShadows, width, height]);
32
+ if (!resorts || resorts.length < 2) {
33
+ return null;
34
+ }
35
+ const classes = classNames(css.selector, {
36
+ [css.leftShadow]: showLeftShadow,
37
+ [css.rightShadow]: showRightShadow
38
+ });
39
+ return _jsx("div", {
40
+ ref: containerRef,
41
+ className: classes,
42
+ children: _jsx("div", {
43
+ ref: scrollerRef,
44
+ onScroll: refreshShadows,
45
+ className: css.content,
46
+ children: resorts.map(({
47
+ id,
48
+ label
49
+ }) => {
50
+ const classes = classNames(css.button, {
51
+ [css.selected]: id === currentResortId
52
+ });
53
+ const updateCurrentResort = () => {
54
+ setCurrentResortId(id);
55
+ };
56
+ return _jsx(Button, {
57
+ className: classes,
58
+ onClick: updateCurrentResort,
59
+ children: label
60
+ }, id);
61
+ })
62
+ })
63
+ });
64
+ }