ublo-lib 1.24.3 → 1.25.0

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 (331) 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 +243 -95
  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/scrolling-carousel/scrolling-carousel.module.css +1 -0
  86. package/es/common/components/tabbed-zones.js +100 -47
  87. package/es/common/hooks/use-faq.js +37 -36
  88. package/es/common/hooks/use-in-view.js +74 -74
  89. package/es/common/hooks/use-scroll-direction.js +37 -32
  90. package/es/common/hooks/use-stay.js +16 -13
  91. package/es/common/hooks/use-sticky.js +35 -35
  92. package/es/common/hooks/use-tunnel.js +42 -30
  93. package/es/common/hooks/use-update-effect.js +9 -9
  94. package/es/common/hooks/use-window-sizes.js +27 -28
  95. package/es/common/utils/cms.js +15 -17
  96. package/es/common/utils/cookies.js +10 -11
  97. package/es/common/utils/copy.js +11 -11
  98. package/es/common/utils/dates.js +8 -10
  99. package/es/common/utils/elements.js +14 -15
  100. package/es/common/utils/events.js +4 -19
  101. package/es/common/utils/file-manager.js +12 -10
  102. package/es/common/utils/load-js.js +10 -11
  103. package/es/common/utils/msem-widget.js +30 -23
  104. package/es/common/utils/url-parameters.js +11 -7
  105. package/es/esf/components/magic-box/index.js +1 -1
  106. package/es/esf/components/magic-box/magic-box.js +164 -102
  107. package/es/esf/components/parcours-esf/index.js +1 -1
  108. package/es/esf/components/parcours-esf/parcours-esf.js +45 -30
  109. package/es/esf/components/period-picker/period-picker.js +5 -5
  110. package/es/lbm/components/lumiplan/api.js +35 -18
  111. package/es/lbm/components/lumiplan/domain.js +96 -20
  112. package/es/lbm/components/lumiplan/i18n/translations.js +24 -15
  113. package/es/lbm/components/lumiplan/index.js +1 -1
  114. package/es/lbm/components/lumiplan/lumiplan.js +130 -102
  115. package/es/lbm/components/lumiplan/opening.js +116 -38
  116. package/es/lbm/components/lumiplan/pois.js +270 -161
  117. package/es/lbm/components/lumiplan/resort-selector.js +58 -36
  118. package/es/lbm/components/lumiplan/road-condition.js +100 -19
  119. package/es/lbm/components/lumiplan/todays-tips.js +45 -16
  120. package/es/lbm/components/lumiplan/types.js +1 -1
  121. package/es/lbm/components/lumiplan/weather/avalanche-risk.js +33 -8
  122. package/es/lbm/components/lumiplan/weather/index.js +1 -1
  123. package/es/lbm/components/lumiplan/weather/snow-data.js +71 -5
  124. package/es/lbm/components/lumiplan/weather/weather-data.js +126 -7
  125. package/es/lbm/components/lumiplan/weather/weather-days.js +76 -48
  126. package/es/lbm/components/lumiplan/weather/weather-icon.js +23 -20
  127. package/es/lbm/components/lumiplan/weather/weather-zones.js +71 -42
  128. package/es/lbm/components/lumiplan/weather/weather.js +90 -28
  129. package/package.json +4 -10
  130. package/es/common/components/admin-links/admin-links.d.ts +0 -11
  131. package/es/common/components/admin-links/admin-links.d.ts.map +0 -1
  132. package/es/common/components/admin-links/index.d.ts +0 -3
  133. package/es/common/components/admin-links/index.d.ts.map +0 -1
  134. package/es/common/components/breadcrumb.d.ts +0 -16
  135. package/es/common/components/breadcrumb.d.ts.map +0 -1
  136. package/es/common/components/custom-contact-form/custom-contact-form.d.ts +0 -25
  137. package/es/common/components/custom-contact-form/custom-contact-form.d.ts.map +0 -1
  138. package/es/common/components/gesco-contact-form/gesco-contact-form.d.ts +0 -17
  139. package/es/common/components/gesco-contact-form/gesco-contact-form.d.ts.map +0 -1
  140. package/es/common/components/gesco-contact-form/hooks/use-params.d.ts +0 -15
  141. package/es/common/components/gesco-contact-form/hooks/use-params.d.ts.map +0 -1
  142. package/es/common/components/gesco-contact-form/index.d.ts +0 -3
  143. package/es/common/components/gesco-contact-form/index.d.ts.map +0 -1
  144. package/es/common/components/gesco-contact-form/phone-code-select.d.ts +0 -7
  145. package/es/common/components/gesco-contact-form/phone-code-select.d.ts.map +0 -1
  146. package/es/common/components/gesco-contact-form/services/api.d.ts +0 -30
  147. package/es/common/components/gesco-contact-form/services/api.d.ts.map +0 -1
  148. package/es/common/components/gesco-contact-form/services/form.d.ts +0 -31
  149. package/es/common/components/gesco-contact-form/services/form.d.ts.map +0 -1
  150. package/es/common/components/gesco-contact-form/services/messages.d.ts +0 -34
  151. package/es/common/components/gesco-contact-form/services/messages.d.ts.map +0 -1
  152. package/es/common/components/gesco-contact-form/services/plausible.d.ts +0 -3
  153. package/es/common/components/gesco-contact-form/services/plausible.d.ts.map +0 -1
  154. package/es/common/components/gesco-contact-form/types.d.ts +0 -34
  155. package/es/common/components/gesco-contact-form/types.d.ts.map +0 -1
  156. package/es/common/components/instant-search/hooks/use-constant.d.ts +0 -2
  157. package/es/common/components/instant-search/hooks/use-constant.d.ts.map +0 -1
  158. package/es/common/components/instant-search/hooks/use-debounced-search.d.ts +0 -7
  159. package/es/common/components/instant-search/hooks/use-debounced-search.d.ts.map +0 -1
  160. package/es/common/components/instant-search/hooks/use-search.d.ts +0 -16
  161. package/es/common/components/instant-search/hooks/use-search.d.ts.map +0 -1
  162. package/es/common/components/instant-search/index.d.ts +0 -3
  163. package/es/common/components/instant-search/index.d.ts.map +0 -1
  164. package/es/common/components/instant-search/input.d.ts +0 -15
  165. package/es/common/components/instant-search/input.d.ts.map +0 -1
  166. package/es/common/components/instant-search/instant-search.d.ts +0 -14
  167. package/es/common/components/instant-search/instant-search.d.ts.map +0 -1
  168. package/es/common/components/instant-search/links.d.ts +0 -12
  169. package/es/common/components/instant-search/links.d.ts.map +0 -1
  170. package/es/common/components/instant-search/no-product.d.ts +0 -6
  171. package/es/common/components/instant-search/no-product.d.ts.map +0 -1
  172. package/es/common/components/instant-search/products.d.ts +0 -14
  173. package/es/common/components/instant-search/products.d.ts.map +0 -1
  174. package/es/common/components/instant-search/results.d.ts +0 -76
  175. package/es/common/components/instant-search/results.d.ts.map +0 -1
  176. package/es/common/components/instant-search/services/api.d.ts +0 -2
  177. package/es/common/components/instant-search/services/api.d.ts.map +0 -1
  178. package/es/common/components/instant-search/services/messages.d.ts +0 -2
  179. package/es/common/components/instant-search/services/messages.d.ts.map +0 -1
  180. package/es/common/components/instant-search/services/utils.d.ts +0 -4
  181. package/es/common/components/instant-search/services/utils.d.ts.map +0 -1
  182. package/es/common/components/msem-preset-editor/components/facet-selector.d.ts +0 -6
  183. package/es/common/components/msem-preset-editor/components/facet-selector.d.ts.map +0 -1
  184. package/es/common/components/msem-preset-editor/components/form.d.ts +0 -8
  185. package/es/common/components/msem-preset-editor/components/form.d.ts.map +0 -1
  186. package/es/common/components/msem-preset-editor/components/stay-picker.d.ts +0 -14
  187. package/es/common/components/msem-preset-editor/components/stay-picker.d.ts.map +0 -1
  188. package/es/common/components/msem-preset-editor/components/widget-list-item.d.ts +0 -12
  189. package/es/common/components/msem-preset-editor/components/widget-list-item.d.ts.map +0 -1
  190. package/es/common/components/msem-preset-editor/components/widget-list.d.ts +0 -17
  191. package/es/common/components/msem-preset-editor/components/widget-list.d.ts.map +0 -1
  192. package/es/common/components/msem-preset-editor/editor-dialog.d.ts +0 -30
  193. package/es/common/components/msem-preset-editor/editor-dialog.d.ts.map +0 -1
  194. package/es/common/components/msem-preset-editor/editors/elloha.d.ts +0 -15
  195. package/es/common/components/msem-preset-editor/editors/elloha.d.ts.map +0 -1
  196. package/es/common/components/msem-preset-editor/editors/index.d.ts +0 -14
  197. package/es/common/components/msem-preset-editor/editors/index.d.ts.map +0 -1
  198. package/es/common/components/msem-preset-editor/editors/lodgings.d.ts +0 -17
  199. package/es/common/components/msem-preset-editor/editors/lodgings.d.ts.map +0 -1
  200. package/es/common/components/msem-preset-editor/editors/ski-passes.d.ts +0 -16
  201. package/es/common/components/msem-preset-editor/editors/ski-passes.d.ts.map +0 -1
  202. package/es/common/components/msem-preset-editor/editors/standard-products.d.ts +0 -16
  203. package/es/common/components/msem-preset-editor/editors/standard-products.d.ts.map +0 -1
  204. package/es/common/components/msem-preset-editor/editors/vakario.d.ts +0 -15
  205. package/es/common/components/msem-preset-editor/editors/vakario.d.ts.map +0 -1
  206. package/es/common/components/msem-preset-editor/msem-preset-editor.d.ts +0 -28
  207. package/es/common/components/msem-preset-editor/msem-preset-editor.d.ts.map +0 -1
  208. package/es/common/components/msem-preset-editor/services/api.d.ts +0 -15
  209. package/es/common/components/msem-preset-editor/services/api.d.ts.map +0 -1
  210. package/es/common/components/msem-preset-editor/services/offers.d.ts +0 -47
  211. package/es/common/components/msem-preset-editor/services/offers.d.ts.map +0 -1
  212. package/es/common/components/msem-preset-editor/services/preset.d.ts +0 -40
  213. package/es/common/components/msem-preset-editor/services/preset.d.ts.map +0 -1
  214. package/es/common/components/msem-preset-editor/services/url-params.d.ts +0 -3
  215. package/es/common/components/msem-preset-editor/services/url-params.d.ts.map +0 -1
  216. package/es/common/components/msem-preset-linker/components/actions.d.ts +0 -11
  217. package/es/common/components/msem-preset-linker/components/actions.d.ts.map +0 -1
  218. package/es/common/components/msem-preset-linker/components/overlays.d.ts +0 -8
  219. package/es/common/components/msem-preset-linker/components/overlays.d.ts.map +0 -1
  220. package/es/common/components/msem-preset-linker/components/resort-selector.d.ts +0 -6
  221. package/es/common/components/msem-preset-linker/components/resort-selector.d.ts.map +0 -1
  222. package/es/common/components/msem-preset-linker/hooks/use-msem-presets.d.ts +0 -4
  223. package/es/common/components/msem-preset-linker/hooks/use-msem-presets.d.ts.map +0 -1
  224. package/es/common/components/msem-preset-linker/index.d.ts +0 -3
  225. package/es/common/components/msem-preset-linker/index.d.ts.map +0 -1
  226. package/es/common/components/msem-preset-linker/msem-preset-linker.d.ts +0 -30
  227. package/es/common/components/msem-preset-linker/msem-preset-linker.d.ts.map +0 -1
  228. package/es/common/components/msem-preset-linker/services/url-params.d.ts +0 -2
  229. package/es/common/components/msem-preset-linker/services/url-params.d.ts.map +0 -1
  230. package/es/common/components/plausible/hooks/use-plausible.d.ts +0 -12
  231. package/es/common/components/plausible/hooks/use-plausible.d.ts.map +0 -1
  232. package/es/common/components/plausible/index.d.ts +0 -8
  233. package/es/common/components/plausible/index.d.ts.map +0 -1
  234. package/es/common/components/plausible/plausible.d.ts +0 -7
  235. package/es/common/components/plausible/plausible.d.ts.map +0 -1
  236. package/es/common/components/plausible/services/callback.d.ts +0 -24
  237. package/es/common/components/plausible/services/callback.d.ts.map +0 -1
  238. package/es/common/components/plausible/services/load.d.ts +0 -2
  239. package/es/common/components/plausible/services/load.d.ts.map +0 -1
  240. package/es/common/components/plausible/services/send-goal.d.ts +0 -7
  241. package/es/common/components/plausible/services/send-goal.d.ts.map +0 -1
  242. package/es/common/components/scroll-spy.d.ts +0 -14
  243. package/es/common/components/scroll-spy.d.ts.map +0 -1
  244. package/es/common/components/scrolling-carousel/index.d.ts +0 -3
  245. package/es/common/components/scrolling-carousel/index.d.ts.map +0 -1
  246. package/es/common/components/scrolling-carousel/scrolling-carousel.d.ts +0 -8
  247. package/es/common/components/scrolling-carousel/scrolling-carousel.d.ts.map +0 -1
  248. package/es/common/components/tabbed-zones.d.ts +0 -12
  249. package/es/common/components/tabbed-zones.d.ts.map +0 -1
  250. package/es/common/hooks/use-faq.d.ts +0 -3
  251. package/es/common/hooks/use-faq.d.ts.map +0 -1
  252. package/es/common/hooks/use-in-view.d.ts +0 -5
  253. package/es/common/hooks/use-in-view.d.ts.map +0 -1
  254. package/es/common/hooks/use-scroll-direction.d.ts +0 -11
  255. package/es/common/hooks/use-scroll-direction.d.ts.map +0 -1
  256. package/es/common/hooks/use-stay.d.ts +0 -4
  257. package/es/common/hooks/use-stay.d.ts.map +0 -1
  258. package/es/common/hooks/use-sticky.d.ts +0 -4
  259. package/es/common/hooks/use-sticky.d.ts.map +0 -1
  260. package/es/common/hooks/use-tunnel.d.ts +0 -8
  261. package/es/common/hooks/use-tunnel.d.ts.map +0 -1
  262. package/es/common/hooks/use-update-effect.d.ts +0 -2
  263. package/es/common/hooks/use-update-effect.d.ts.map +0 -1
  264. package/es/common/hooks/use-window-sizes.d.ts +0 -7
  265. package/es/common/hooks/use-window-sizes.d.ts.map +0 -1
  266. package/es/common/utils/cms.d.ts +0 -4
  267. package/es/common/utils/cms.d.ts.map +0 -1
  268. package/es/common/utils/cookies.d.ts +0 -2
  269. package/es/common/utils/cookies.d.ts.map +0 -1
  270. package/es/common/utils/copy.d.ts +0 -2
  271. package/es/common/utils/copy.d.ts.map +0 -1
  272. package/es/common/utils/dates.d.ts +0 -2
  273. package/es/common/utils/dates.d.ts.map +0 -1
  274. package/es/common/utils/elements.d.ts +0 -5
  275. package/es/common/utils/elements.d.ts.map +0 -1
  276. package/es/common/utils/events.d.ts +0 -4
  277. package/es/common/utils/events.d.ts.map +0 -1
  278. package/es/common/utils/file-manager.d.ts +0 -13
  279. package/es/common/utils/file-manager.d.ts.map +0 -1
  280. package/es/common/utils/load-js.d.ts +0 -3
  281. package/es/common/utils/load-js.d.ts.map +0 -1
  282. package/es/common/utils/msem-widget.d.ts +0 -16
  283. package/es/common/utils/msem-widget.d.ts.map +0 -1
  284. package/es/common/utils/url-parameters.d.ts +0 -2
  285. package/es/common/utils/url-parameters.d.ts.map +0 -1
  286. package/es/esf/components/magic-box/index.d.ts +0 -3
  287. package/es/esf/components/magic-box/index.d.ts.map +0 -1
  288. package/es/esf/components/magic-box/magic-box.d.ts +0 -22
  289. package/es/esf/components/magic-box/magic-box.d.ts.map +0 -1
  290. package/es/esf/components/parcours-esf/index.d.ts +0 -3
  291. package/es/esf/components/parcours-esf/index.d.ts.map +0 -1
  292. package/es/esf/components/parcours-esf/parcours-esf.d.ts +0 -14
  293. package/es/esf/components/parcours-esf/parcours-esf.d.ts.map +0 -1
  294. package/es/lbm/components/lumiplan/api.d.ts +0 -8
  295. package/es/lbm/components/lumiplan/api.d.ts.map +0 -1
  296. package/es/lbm/components/lumiplan/domain.d.ts +0 -8
  297. package/es/lbm/components/lumiplan/domain.d.ts.map +0 -1
  298. package/es/lbm/components/lumiplan/i18n/translations.d.ts +0 -7
  299. package/es/lbm/components/lumiplan/i18n/translations.d.ts.map +0 -1
  300. package/es/lbm/components/lumiplan/index.d.ts +0 -3
  301. package/es/lbm/components/lumiplan/index.d.ts.map +0 -1
  302. package/es/lbm/components/lumiplan/lumiplan.d.ts +0 -2
  303. package/es/lbm/components/lumiplan/lumiplan.d.ts.map +0 -1
  304. package/es/lbm/components/lumiplan/opening.d.ts +0 -9
  305. package/es/lbm/components/lumiplan/opening.d.ts.map +0 -1
  306. package/es/lbm/components/lumiplan/pois.d.ts +0 -8
  307. package/es/lbm/components/lumiplan/pois.d.ts.map +0 -1
  308. package/es/lbm/components/lumiplan/resort-selector.d.ts +0 -12
  309. package/es/lbm/components/lumiplan/resort-selector.d.ts.map +0 -1
  310. package/es/lbm/components/lumiplan/road-condition.d.ts +0 -8
  311. package/es/lbm/components/lumiplan/road-condition.d.ts.map +0 -1
  312. package/es/lbm/components/lumiplan/todays-tips.d.ts +0 -8
  313. package/es/lbm/components/lumiplan/todays-tips.d.ts.map +0 -1
  314. package/es/lbm/components/lumiplan/types.d.ts +0 -285
  315. package/es/lbm/components/lumiplan/types.d.ts.map +0 -1
  316. package/es/lbm/components/lumiplan/weather/avalanche-risk.d.ts +0 -4
  317. package/es/lbm/components/lumiplan/weather/avalanche-risk.d.ts.map +0 -1
  318. package/es/lbm/components/lumiplan/weather/index.d.ts +0 -3
  319. package/es/lbm/components/lumiplan/weather/index.d.ts.map +0 -1
  320. package/es/lbm/components/lumiplan/weather/snow-data.d.ts +0 -8
  321. package/es/lbm/components/lumiplan/weather/snow-data.d.ts.map +0 -1
  322. package/es/lbm/components/lumiplan/weather/weather-data.d.ts +0 -9
  323. package/es/lbm/components/lumiplan/weather/weather-data.d.ts.map +0 -1
  324. package/es/lbm/components/lumiplan/weather/weather-days.d.ts +0 -7
  325. package/es/lbm/components/lumiplan/weather/weather-days.d.ts.map +0 -1
  326. package/es/lbm/components/lumiplan/weather/weather-icon.d.ts +0 -23
  327. package/es/lbm/components/lumiplan/weather/weather-icon.d.ts.map +0 -1
  328. package/es/lbm/components/lumiplan/weather/weather-zones.d.ts +0 -6
  329. package/es/lbm/components/lumiplan/weather/weather-zones.d.ts.map +0 -1
  330. package/es/lbm/components/lumiplan/weather/weather.d.ts +0 -8
  331. package/es/lbm/components/lumiplan/weather/weather.d.ts.map +0 -1
@@ -1,50 +1,103 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  import * as React from "react";
3
2
  import classNames from "classnames";
4
3
  import Zone from "ublo/zone";
5
- const defaultTabs = [{ subs: null }, { subs: 2 }];
6
- export default function TabbedZones({ current = 0, currentSub = 0, tabs = defaultTabs, zonesProps = {}, }) {
7
- const [currentTab, setCurrentTab] = React.useState(current);
8
- const [currentSubTab, setCurrentSubTab] = React.useState(currentSub);
9
- return (_jsxs("div", { className: "tabbed-zones", children: [_jsx("div", { className: "tabbed-zones__tabs", children: tabs.map((_, i) => {
10
- const updateCurrentTab = () => {
11
- setCurrentTab(i);
12
- setCurrentSubTab(0);
13
- };
14
- const classes = classNames("tabbed-zones__tab", `tabbed-zones__tab--${i}`, {
15
- "tabbed-zones__tab--current": i === currentTab,
16
- });
17
- return (_jsx("div", { className: classes, onClick: updateCurrentTab, children: _jsx(Zone, { id: `tabbed-zones-tab-${i}`, section: "rich-text", maxSections: "1", tooltip: "Zone d'edition: Titre onglet" }) }, i));
18
- }) }), tabs.map((tab, i) => {
19
- if (!tab.subs)
20
- return null;
21
- const length = [...new Array(tab.subs)];
22
- const classes = classNames("tabbed-zones__sub-tabs", `tabbed-zones__sub-tabs--${i}`, {
23
- "tabbed-zones__sub-tabs--current": i === currentTab,
24
- });
25
- return (_jsx("div", { className: classes, children: length.map((_, j) => {
26
- const updateCurrentTab = () => setCurrentSubTab(j);
27
- const classes = classNames("tabbed-zones__sub-tab", `tabbed-zones__sub-tab--${i}-${j}`, {
28
- "tabbed-zones__sub-tab--current": i === currentTab && j === currentSubTab,
29
- });
30
- return (_jsx("div", { className: classes, onClick: updateCurrentTab, children: _jsx(Zone, { id: `tabbed-zones-sub-tab-${i}-${j}`, section: "rich-text", maxSections: "1", tooltip: "Zone d'edition: Titre onglet", ...zonesProps }) }, j));
31
- }) }, i));
32
- }), _jsxs("div", { className: "tabbed-zones__zones", children: [tabs.map((tab, i) => {
33
- const classes = classNames("tabbed-zones__zone", `tabbed-zones__zone--${i}`, {
34
- "tabbed-zones__zone--current": i === currentTab,
35
- });
36
- if (tab.subs)
37
- return null;
38
- return (_jsx("div", { className: classes, children: _jsx(Zone, { id: `tabbed-zone-${i}`, tooltip: "Zone d'edition : Contenu onglet", ...zonesProps }) }, i));
39
- }), tabs.map((tab, i) => {
40
- if (!tab.subs)
41
- return null;
42
- const length = [...new Array(tab.subs)];
43
- return length.map((_, j) => {
44
- const classes = classNames("tabbed-zones__zone", `tabbed-zones__zone--${i}-${j}`, {
45
- "tabbed-zones__zone--current": i === currentTab && j === currentSubTab,
46
- });
47
- return (_jsx("div", { className: classes, children: _jsx(Zone, { id: `tabbed-zone-offers-${i}-${j}`, className: "tabbed-zone-offers", tooltip: "Zone d'edition : Contenu et blocs produit", ...zonesProps }) }, j));
48
- });
49
- })] })] }));
50
- }
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ import { jsxs as _jsxs } from "react/jsx-runtime";
6
+ const defaultTabs = [{
7
+ subs: null
8
+ }, {
9
+ subs: 2
10
+ }];
11
+ export default function TabbedZones({
12
+ current = 0,
13
+ currentSub = 0,
14
+ tabs = defaultTabs,
15
+ zonesProps = {}
16
+ }) {
17
+ const [currentTab, setCurrentTab] = React.useState(current);
18
+ const [currentSubTab, setCurrentSubTab] = React.useState(currentSub);
19
+ return _jsxs("div", {
20
+ className: "tabbed-zones",
21
+ children: [_jsx("div", {
22
+ className: "tabbed-zones__tabs",
23
+ children: tabs.map((_, i) => {
24
+ const updateCurrentTab = () => {
25
+ setCurrentTab(i);
26
+ setCurrentSubTab(0);
27
+ };
28
+ const classes = classNames("tabbed-zones__tab", `tabbed-zones__tab--${i}`, {
29
+ "tabbed-zones__tab--current": i === currentTab
30
+ });
31
+ return _jsx("div", {
32
+ className: classes,
33
+ onClick: updateCurrentTab,
34
+ children: _jsx(Zone, {
35
+ id: `tabbed-zones-tab-${i}`,
36
+ section: "rich-text",
37
+ maxSections: "1",
38
+ tooltip: "Zone d'edition: Titre onglet"
39
+ })
40
+ }, i);
41
+ })
42
+ }), tabs.map((tab, i) => {
43
+ if (!tab.subs) return null;
44
+ const length = [...new Array(tab.subs)];
45
+ const classes = classNames("tabbed-zones__sub-tabs", `tabbed-zones__sub-tabs--${i}`, {
46
+ "tabbed-zones__sub-tabs--current": i === currentTab
47
+ });
48
+ return _jsx("div", {
49
+ className: classes,
50
+ children: length.map((_, j) => {
51
+ const updateCurrentTab = () => setCurrentSubTab(j);
52
+ const classes = classNames("tabbed-zones__sub-tab", `tabbed-zones__sub-tab--${i}-${j}`, {
53
+ "tabbed-zones__sub-tab--current": i === currentTab && j === currentSubTab
54
+ });
55
+ return _jsx("div", {
56
+ className: classes,
57
+ onClick: updateCurrentTab,
58
+ children: _jsx(Zone, {
59
+ id: `tabbed-zones-sub-tab-${i}-${j}`,
60
+ section: "rich-text",
61
+ maxSections: "1",
62
+ tooltip: "Zone d'edition: Titre onglet",
63
+ ...zonesProps
64
+ })
65
+ }, j);
66
+ })
67
+ }, i);
68
+ }), _jsxs("div", {
69
+ className: "tabbed-zones__zones",
70
+ children: [tabs.map((tab, i) => {
71
+ const classes = classNames("tabbed-zones__zone", `tabbed-zones__zone--${i}`, {
72
+ "tabbed-zones__zone--current": i === currentTab
73
+ });
74
+ if (tab.subs) return null;
75
+ return _jsx("div", {
76
+ className: classes,
77
+ children: _jsx(Zone, {
78
+ id: `tabbed-zone-${i}`,
79
+ tooltip: "Zone d'edition : Contenu onglet",
80
+ ...zonesProps
81
+ })
82
+ }, i);
83
+ }), tabs.map((tab, i) => {
84
+ if (!tab.subs) return null;
85
+ const length = [...new Array(tab.subs)];
86
+ return length.map((_, j) => {
87
+ const classes = classNames("tabbed-zones__zone", `tabbed-zones__zone--${i}-${j}`, {
88
+ "tabbed-zones__zone--current": i === currentTab && j === currentSubTab
89
+ });
90
+ return _jsx("div", {
91
+ className: classes,
92
+ children: _jsx(Zone, {
93
+ id: `tabbed-zone-offers-${i}-${j}`,
94
+ className: "tabbed-zone-offers",
95
+ tooltip: "Zone d'edition : Contenu et blocs produit",
96
+ ...zonesProps
97
+ })
98
+ }, j);
99
+ });
100
+ })]
101
+ })]
102
+ });
103
+ }
@@ -1,40 +1,41 @@
1
1
  import * as React from "react";
2
2
  import { useUbloContext } from "ublo/with-ublo";
3
- const buildClass = (className) => `${className}--opened`;
3
+ const buildClass = className => `${className}--opened`;
4
4
  const useFaq = (selector = ".faq-block", refresh) => {
5
- const [blocks, setBlocks] = React.useState([]);
6
- const { cmsMode } = useUbloContext();
7
- const clicked = React.useCallback((clickedBlock, blocks) => () => {
8
- if (cmsMode)
9
- return;
10
- const openedClass = buildClass(clickedBlock.classList[0]);
11
- blocks.forEach((block) => {
12
- const { classList } = block;
13
- block !== clickedBlock || block.classList.contains(openedClass)
14
- ? classList.remove(openedClass)
15
- : classList.add(openedClass);
16
- });
17
- }, [cmsMode]);
18
- const init = React.useCallback((block, blocks) => {
19
- block.clicked = clicked(block, blocks);
20
- block.addEventListener("click", block.clicked);
21
- }, [clicked]);
22
- const cleanup = React.useCallback((block) => {
23
- block.removeEventListener("click", block.clicked);
24
- const openedClass = buildClass(block.classList[0]);
25
- block.classList.remove(openedClass);
26
- }, []);
27
- React.useEffect(() => {
28
- if (cmsMode === undefined) {
29
- setTimeout(() => {
30
- const blocks = Array.from(document.querySelectorAll(selector));
31
- setBlocks(blocks);
32
- });
33
- }
34
- }, [cmsMode, selector, refresh]);
35
- React.useEffect(() => {
36
- blocks.forEach((block) => init(block, blocks));
37
- return () => blocks.forEach(cleanup);
38
- }, [blocks, cleanup, init]);
5
+ const [blocks, setBlocks] = React.useState([]);
6
+ const {
7
+ cmsMode
8
+ } = useUbloContext();
9
+ const clicked = React.useCallback((clickedBlock, blocks) => () => {
10
+ if (cmsMode) return;
11
+ const openedClass = buildClass(clickedBlock.classList[0]);
12
+ blocks.forEach(block => {
13
+ const {
14
+ classList
15
+ } = block;
16
+ block !== clickedBlock || block.classList.contains(openedClass) ? classList.remove(openedClass) : classList.add(openedClass);
17
+ });
18
+ }, [cmsMode]);
19
+ const init = React.useCallback((block, blocks) => {
20
+ block.clicked = clicked(block, blocks);
21
+ block.addEventListener("click", block.clicked);
22
+ }, [clicked]);
23
+ const cleanup = React.useCallback(block => {
24
+ block.removeEventListener("click", block.clicked);
25
+ const openedClass = buildClass(block.classList[0]);
26
+ block.classList.remove(openedClass);
27
+ }, []);
28
+ React.useEffect(() => {
29
+ if (cmsMode === undefined) {
30
+ setTimeout(() => {
31
+ const blocks = Array.from(document.querySelectorAll(selector));
32
+ setBlocks(blocks);
33
+ });
34
+ }
35
+ }, [cmsMode, selector, refresh]);
36
+ React.useEffect(() => {
37
+ blocks.forEach(block => init(block, blocks));
38
+ return () => blocks.forEach(cleanup);
39
+ }, [blocks, cleanup, init]);
39
40
  };
40
- export default useFaq;
41
+ export default useFaq;
@@ -1,86 +1,86 @@
1
1
  import * as React from "react";
2
2
  import { useUbloContext } from "ublo/with-ublo";
3
3
  const options = {
4
- rootMargin: "0px",
5
- threshold: ratio(100),
4
+ rootMargin: "0px",
5
+ threshold: ratio(100)
6
6
  };
7
7
  export default function useInView(ref, cmsMode, selector, repeat = true, intersectionValue = 0.2) {
8
- const { lang, path } = useUbloContext();
9
- const [compatible, setCompatible] = React.useState(false);
10
- const callback = React.useCallback((entries) => {
11
- entries.forEach((entry) => {
12
- const { intersectionRatio, target } = entry;
13
- if (!target || !target.classList[0])
14
- return;
15
- const inViewClass = buildClass(target.classList[0]);
16
- if (intersectionRatio !== 0) {
17
- if (repeat) {
18
- intersectionRatio <= intersectionValue
19
- ? target.classList.remove(inViewClass)
20
- : target.classList.add(inViewClass);
21
- }
22
- else {
23
- if (intersectionRatio >= intersectionValue) {
24
- target.classList.add(inViewClass);
25
- }
26
- }
8
+ const {
9
+ lang,
10
+ path
11
+ } = useUbloContext();
12
+ const [compatible, setCompatible] = React.useState(false);
13
+ const callback = React.useCallback(entries => {
14
+ entries.forEach(entry => {
15
+ const {
16
+ intersectionRatio,
17
+ target
18
+ } = entry;
19
+ if (!target || !target.classList[0]) return;
20
+ const inViewClass = buildClass(target.classList[0]);
21
+ if (intersectionRatio !== 0) {
22
+ if (repeat) {
23
+ intersectionRatio <= intersectionValue ? target.classList.remove(inViewClass) : target.classList.add(inViewClass);
24
+ } else {
25
+ if (intersectionRatio >= intersectionValue) {
26
+ target.classList.add(inViewClass);
27
+ }
28
+ }
29
+ }
30
+ });
31
+ }, [intersectionValue, repeat]);
32
+ React.useEffect(() => {
33
+ setCompatible(typeof IntersectionObserver !== "undefined");
34
+ const container = ref.current;
35
+ const targets = selector !== undefined ? Array.from(container.querySelectorAll(selector)) : [container];
36
+ if (container) {
37
+ if (!cmsMode) {
38
+ if (!compatible) {
39
+ targets.forEach(target => {
40
+ const firstClassName = target.classList[0];
41
+ if (firstClassName) {
42
+ const inViewClassName = buildClass(firstClassName);
43
+ target.classList.add(inViewClassName);
44
+ }
45
+ target.setAttribute("data-in-view", "");
46
+ });
47
+ } else {
48
+ targets.forEach(target => {
49
+ const firstClassName = target.classList[0];
50
+ if (firstClassName) {
51
+ const inViewClassName = buildClass(firstClassName);
52
+ target.classList.remove(inViewClassName);
27
53
  }
28
- });
29
- }, [intersectionValue, repeat]);
30
- React.useEffect(() => {
31
- setCompatible(typeof IntersectionObserver !== "undefined");
32
- const container = ref.current;
33
- const targets = selector !== undefined
34
- ? Array.from(container.querySelectorAll(selector))
35
- : [container];
36
- if (container) {
37
- if (!cmsMode) {
38
- if (!compatible) {
39
- targets.forEach((target) => {
40
- const firstClassName = target.classList[0];
41
- if (firstClassName) {
42
- const inViewClassName = buildClass(firstClassName);
43
- target.classList.add(inViewClassName);
44
- }
45
- target.setAttribute("data-in-view", "");
46
- });
47
- }
48
- else {
49
- targets.forEach((target) => {
50
- const firstClassName = target.classList[0];
51
- if (firstClassName) {
52
- const inViewClassName = buildClass(firstClassName);
53
- target.classList.remove(inViewClassName);
54
- }
55
- target.removeAttribute("data-in-view");
56
- });
57
- const observer = new IntersectionObserver(callback, options);
58
- const observe = () => {
59
- targets.forEach((target) => observer?.observe(target));
60
- };
61
- const unobserve = () => targets.forEach((target) => {
62
- if (!target)
63
- return;
64
- const firstClassName = target.classList[0];
65
- if (firstClassName) {
66
- const inViewClassName = buildClass(firstClassName);
67
- target.classList.remove(inViewClassName);
68
- }
69
- target.removeAttribute("data-in-view");
70
- observer.disconnect();
71
- });
72
- observe();
73
- return () => {
74
- unobserve();
75
- };
76
- }
54
+ target.removeAttribute("data-in-view");
55
+ });
56
+ const observer = new IntersectionObserver(callback, options);
57
+ const observe = () => {
58
+ targets.forEach(target => observer?.observe(target));
59
+ };
60
+ const unobserve = () => targets.forEach(target => {
61
+ if (!target) return;
62
+ const firstClassName = target.classList[0];
63
+ if (firstClassName) {
64
+ const inViewClassName = buildClass(firstClassName);
65
+ target.classList.remove(inViewClassName);
77
66
  }
67
+ target.removeAttribute("data-in-view");
68
+ observer.disconnect();
69
+ });
70
+ observe();
71
+ return () => {
72
+ unobserve();
73
+ };
78
74
  }
79
- }, [callback, cmsMode, compatible, lang, path, ref, selector]);
75
+ }
76
+ }
77
+ }, [callback, cmsMode, compatible, lang, path, ref, selector]);
80
78
  }
81
79
  function ratio(steps) {
82
- return Array.from({ length: steps + 1 }).map((_, i) => i / steps);
80
+ return Array.from({
81
+ length: steps + 1
82
+ }).map((_, i) => i / steps);
83
83
  }
84
84
  function buildClass(className) {
85
- return `${className}--in-view`;
86
- }
85
+ return `${className}--in-view`;
86
+ }
@@ -1,36 +1,41 @@
1
1
  import { useState, useEffect } from "react";
2
2
  const SCROLL_UP = "up";
3
3
  const SCROLL_DOWN = "down";
4
- const useScrollDirection = ({ initialDirection, thresholdPixels, off, } = {}) => {
5
- const [scrollDir, setScrollDir] = useState(initialDirection);
6
- useEffect(() => {
7
- const threshold = thresholdPixels || 0;
8
- let lastScrollY = window.pageYOffset;
9
- let ticking = false;
10
- const updateScrollDir = () => {
11
- const scrollY = window.pageYOffset;
12
- if (Math.abs(scrollY - lastScrollY) < threshold) {
13
- ticking = false;
14
- return;
15
- }
16
- setScrollDir(scrollY > lastScrollY ? SCROLL_DOWN : SCROLL_UP);
17
- lastScrollY = scrollY > 0 ? scrollY : 0;
18
- ticking = false;
19
- };
20
- const onScroll = () => {
21
- if (!ticking) {
22
- window.requestAnimationFrame(updateScrollDir);
23
- ticking = true;
24
- }
25
- };
26
- if (!off) {
27
- window.addEventListener("scroll", onScroll);
28
- }
29
- else {
30
- setScrollDir(initialDirection);
31
- }
32
- return () => window.removeEventListener("scroll", onScroll);
33
- }, [initialDirection, thresholdPixels, off]);
34
- return { scrollDir };
4
+ const useScrollDirection = ({
5
+ initialDirection,
6
+ thresholdPixels,
7
+ off
8
+ } = {}) => {
9
+ const [scrollDir, setScrollDir] = useState(initialDirection);
10
+ useEffect(() => {
11
+ const threshold = thresholdPixels || 0;
12
+ let lastScrollY = window.pageYOffset;
13
+ let ticking = false;
14
+ const updateScrollDir = () => {
15
+ const scrollY = window.pageYOffset;
16
+ if (Math.abs(scrollY - lastScrollY) < threshold) {
17
+ ticking = false;
18
+ return;
19
+ }
20
+ setScrollDir(scrollY > lastScrollY ? SCROLL_DOWN : SCROLL_UP);
21
+ lastScrollY = scrollY > 0 ? scrollY : 0;
22
+ ticking = false;
23
+ };
24
+ const onScroll = () => {
25
+ if (!ticking) {
26
+ window.requestAnimationFrame(updateScrollDir);
27
+ ticking = true;
28
+ }
29
+ };
30
+ if (!off) {
31
+ window.addEventListener("scroll", onScroll);
32
+ } else {
33
+ setScrollDir(initialDirection);
34
+ }
35
+ return () => window.removeEventListener("scroll", onScroll);
36
+ }, [initialDirection, thresholdPixels, off]);
37
+ return {
38
+ scrollDir
39
+ };
35
40
  };
36
- export default useScrollDirection;
41
+ export default useScrollDirection;
@@ -1,16 +1,19 @@
1
1
  import * as React from "react";
2
2
  const useStay = () => {
3
- const [stay, setStay] = React.useState();
4
- React.useEffect(() => {
5
- const params = new URLSearchParams(document.location.search);
6
- const from = params.get("from");
7
- const to = params.get("to");
8
- if (from && to) {
9
- window.sessionStorage.setItem("stay", JSON.stringify({ from, to }));
10
- }
11
- const storedStay = window.sessionStorage.getItem("stay");
12
- setStay(storedStay ? JSON.parse(storedStay) : undefined);
13
- }, []);
14
- return [stay, setStay];
3
+ const [stay, setStay] = React.useState();
4
+ React.useEffect(() => {
5
+ const params = new URLSearchParams(document.location.search);
6
+ const from = params.get("from");
7
+ const to = params.get("to");
8
+ if (from && to) {
9
+ window.sessionStorage.setItem("stay", JSON.stringify({
10
+ from,
11
+ to
12
+ }));
13
+ }
14
+ const storedStay = window.sessionStorage.getItem("stay");
15
+ setStay(storedStay ? JSON.parse(storedStay) : undefined);
16
+ }, []);
17
+ return [stay, setStay];
15
18
  };
16
- export default useStay;
19
+ export default useStay;
@@ -1,40 +1,40 @@
1
1
  import * as React from "react";
2
2
  const eventsToBind = {
3
- document: ["scroll"],
4
- window: ["resize", "orientationchange"],
3
+ document: ["scroll"],
4
+ window: ["resize", "orientationchange"]
5
5
  };
6
6
  const useSticky = () => {
7
- const ref = React.useRef(null);
8
- const [sticky, setSticky] = React.useState(false);
9
- const observe = React.useCallback(() => {
10
- const container = ref.current;
11
- if (container) {
12
- const target = container;
13
- const offset = target.getBoundingClientRect().top;
14
- const stickyOffset = parseInt(getComputedStyle(target).top);
15
- const stickyActive = offset <= stickyOffset;
16
- setSticky((stickyActive && !sticky) || (stickyActive && sticky));
17
- }
18
- }, [sticky]);
19
- const init = React.useCallback(() => {
20
- Object.keys(eventsToBind).forEach((key) => {
21
- const events = eventsToBind[key];
22
- const target = window[key];
23
- events.forEach((event) => target.addEventListener(event, observe));
24
- });
25
- }, [observe]);
26
- const cleanup = React.useCallback(() => {
27
- Object.keys(eventsToBind).forEach((key) => {
28
- const events = eventsToBind[key];
29
- const target = window[key];
30
- events.forEach((event) => target.removeEventListener(event, observe));
31
- });
32
- }, [observe]);
33
- React.useEffect(() => {
34
- observe();
35
- init();
36
- return () => cleanup();
37
- }, [cleanup, init, observe]);
38
- return [ref, sticky];
7
+ const ref = React.useRef(null);
8
+ const [sticky, setSticky] = React.useState(false);
9
+ const observe = React.useCallback(() => {
10
+ const container = ref.current;
11
+ if (container) {
12
+ const target = container;
13
+ const offset = target.getBoundingClientRect().top;
14
+ const stickyOffset = parseInt(getComputedStyle(target).top);
15
+ const stickyActive = offset <= stickyOffset;
16
+ setSticky(stickyActive && !sticky || stickyActive && sticky);
17
+ }
18
+ }, [sticky]);
19
+ const init = React.useCallback(() => {
20
+ Object.keys(eventsToBind).forEach(key => {
21
+ const events = eventsToBind[key];
22
+ const target = window[key];
23
+ events.forEach(event => target.addEventListener(event, observe));
24
+ });
25
+ }, [observe]);
26
+ const cleanup = React.useCallback(() => {
27
+ Object.keys(eventsToBind).forEach(key => {
28
+ const events = eventsToBind[key];
29
+ const target = window[key];
30
+ events.forEach(event => target.removeEventListener(event, observe));
31
+ });
32
+ }, [observe]);
33
+ React.useEffect(() => {
34
+ observe();
35
+ init();
36
+ return () => cleanup();
37
+ }, [cleanup, init, observe]);
38
+ return [ref, sticky];
39
39
  };
40
- export default useSticky;
40
+ export default useSticky;