ublo-lib 1.24.4 → 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 (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 +243 -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,26 +1,26 @@
1
- export const build = (params) => {
2
- return Object.keys(params)
3
- .map((key, i) => {
4
- const param = params[key];
5
- if (!param)
6
- return "";
7
- const isObject = typeof param === "object";
8
- const sign = i === 0 ? "?" : "&";
9
- const value = isObject ? encodeURI(JSON.stringify(param)) : param;
10
- return `${sign}${key}=${value}`;
11
- })
12
- .join("");
1
+ export const build = params => {
2
+ return Object.keys(params).map((key, i) => {
3
+ const param = params[key];
4
+ if (!param) return "";
5
+ const isObject = typeof param === "object";
6
+ const sign = i === 0 ? "?" : "&";
7
+ const value = isObject ? encodeURI(JSON.stringify(param)) : param;
8
+ return `${sign}${key}=${value}`;
9
+ }).join("");
13
10
  };
14
11
  export const getPresetUrl = (lang, preset, baseUrl) => {
15
- const { host, protocol } = window.location;
16
- const isExternalUrl = baseUrl.startsWith("http");
17
- const alreadyContainsLang = baseUrl.includes(`/${lang}`);
18
- const encodedParams = build(preset);
19
- if (isExternalUrl) {
20
- return baseUrl.concat(encodedParams);
21
- }
22
- if (alreadyContainsLang) {
23
- return `${protocol}//${host}${baseUrl}${encodedParams}`;
24
- }
25
- return `${protocol}//${host}/${lang}${baseUrl}${encodedParams}`;
26
- };
12
+ const {
13
+ host,
14
+ protocol
15
+ } = window.location;
16
+ const isExternalUrl = baseUrl.startsWith("http");
17
+ const alreadyContainsLang = baseUrl.includes(`/${lang}`);
18
+ const encodedParams = build(preset);
19
+ if (isExternalUrl) {
20
+ return baseUrl.concat(encodedParams);
21
+ }
22
+ if (alreadyContainsLang) {
23
+ return `${protocol}//${host}${baseUrl}${encodedParams}`;
24
+ }
25
+ return `${protocol}//${host}/${lang}${baseUrl}${encodedParams}`;
26
+ };
@@ -1,45 +1,57 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  import * as React from "react";
3
2
  import classNames from "classnames";
4
3
  import * as Icons from "dt-design-system/es/icons";
5
4
  import { MODES } from "../msem-preset-linker";
6
5
  import css from "./actions.module.css";
7
- export default function Actions({ mode, setMode }) {
8
- const toggleMode = React.useCallback(() => {
9
- if (mode === MODES.CONNECTED) {
10
- setMode(MODES.EDITING);
11
- window.Cms.desactivate();
12
- window.Cms.hideInfo();
13
- window.Cms.pageUi.removeAttribute("active");
14
- window.Cms.pageUi.setAttribute("hidden", "");
15
- document.body.classList.add("msem-preset-linker--editing");
16
- }
17
- else {
18
- setMode(MODES.CONNECTED);
19
- window.Cms.pageUi.removeAttribute("hidden");
20
- document.body.classList.remove("msem-preset-linker--editing");
21
- }
22
- }, [mode, setMode]);
23
- const onSaveClick = async () => {
24
- if (!window.Cms)
25
- return;
26
- window.Cms.pageUi.removeAttribute("hidden");
27
- window.Cms.pageUi.setAttribute("active", "");
28
- window.Cms.pageUi.startLoading();
29
- setMode(MODES.CONNECTED);
30
- setTimeout(async () => {
31
- window.Cms.pageUi.unsavedChanges = false;
32
- await window.Cms.save();
33
- window.Cms.pageUi.stopLoading();
34
- window.Cms.pageUi.removeAttribute("active");
35
- }, 200);
36
- };
37
- React.useEffect(() => {
38
- window.toggleMseMLinker = toggleMode;
39
- }, [mode, toggleMode]);
40
- if (mode !== MODES.EDITING)
41
- return null;
42
- const cancelClasses = classNames(css.action, css.cancel);
43
- const saveClasses = classNames(css.action, css.save);
44
- return (_jsxs(_Fragment, { children: [_jsx("button", { className: cancelClasses, onClick: toggleMode, children: _jsx(Icons.Cross, {}) }), _jsx("button", { className: saveClasses, onClick: onSaveClick, children: _jsx(Icons.Save, {}) })] }));
45
- }
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ import { Fragment as _Fragment } from "react/jsx-runtime";
8
+ import { jsxs as _jsxs } from "react/jsx-runtime";
9
+ export default function Actions({
10
+ mode,
11
+ setMode
12
+ }) {
13
+ const toggleMode = React.useCallback(() => {
14
+ if (mode === MODES.CONNECTED) {
15
+ setMode(MODES.EDITING);
16
+ window.Cms.desactivate();
17
+ window.Cms.hideInfo();
18
+ window.Cms.pageUi.removeAttribute("active");
19
+ window.Cms.pageUi.setAttribute("hidden", "");
20
+ document.body.classList.add("msem-preset-linker--editing");
21
+ } else {
22
+ setMode(MODES.CONNECTED);
23
+ window.Cms.pageUi.removeAttribute("hidden");
24
+ document.body.classList.remove("msem-preset-linker--editing");
25
+ }
26
+ }, [mode, setMode]);
27
+ const onSaveClick = async () => {
28
+ if (!window.Cms) return;
29
+ window.Cms.pageUi.removeAttribute("hidden");
30
+ window.Cms.pageUi.setAttribute("active", "");
31
+ window.Cms.pageUi.startLoading();
32
+ setMode(MODES.CONNECTED);
33
+ setTimeout(async () => {
34
+ window.Cms.pageUi.unsavedChanges = false;
35
+ await window.Cms.save();
36
+ window.Cms.pageUi.stopLoading();
37
+ window.Cms.pageUi.removeAttribute("active");
38
+ }, 200);
39
+ };
40
+ React.useEffect(() => {
41
+ window.toggleMseMLinker = toggleMode;
42
+ }, [mode, toggleMode]);
43
+ if (mode !== MODES.EDITING) return null;
44
+ const cancelClasses = classNames(css.action, css.cancel);
45
+ const saveClasses = classNames(css.action, css.save);
46
+ return _jsxs(_Fragment, {
47
+ children: [_jsx("button", {
48
+ className: cancelClasses,
49
+ onClick: toggleMode,
50
+ children: _jsx(Icons.Cross, {})
51
+ }), _jsx("button", {
52
+ className: saveClasses,
53
+ onClick: onSaveClick,
54
+ children: _jsx(Icons.Save, {})
55
+ })]
56
+ });
57
+ }
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
1
  import * as React from "react";
3
2
  import * as ReactDOM from "react-dom";
4
3
  import classNames from "classnames";
@@ -6,43 +5,60 @@ import Tooltip from "dt-design-system/es/tooltip";
6
5
  import * as Icons from "dt-design-system/es/icons";
7
6
  import { MODES } from "../msem-preset-linker";
8
7
  import css from "./overlays.module.css";
9
- export default function Overlays({ mode, target, setTarget }) {
10
- const [sections, setSections] = React.useState([]);
11
- React.useEffect(() => {
12
- if (mode === MODES.EDITING) {
13
- const targets = Array.from(document.querySelectorAll("section[data-class]"));
14
- setSections(targets);
15
- targets.forEach((target) => {
16
- const section = target;
17
- section.style.setProperty("position", "relative");
18
- });
19
- return () => {
20
- targets.forEach((target) => {
21
- const section = target;
22
- section.style.removeProperty("position");
23
- });
24
- };
25
- }
26
- }, [mode]);
27
- if (mode !== MODES.EDITING)
28
- return null;
29
- return (_jsx(_Fragment, { children: sections.map((section) => {
30
- const hasMseMPreset = section?.hasAttribute("data-msem-preset");
31
- const hasObsoletePreset = section?.hasAttribute("data-config");
32
- const hasPreset = hasMseMPreset || hasObsoletePreset;
33
- const isActive = section === target;
34
- const updateTarget = () => {
35
- if (target)
36
- return;
37
- setTarget(isActive ? null : section);
38
- };
39
- const classes = classNames(css.overlay, {
40
- [css.active]: isActive,
41
- [css.obsolete]: hasObsoletePreset,
42
- });
43
- const tooltip = hasObsoletePreset
44
- ? "1 preset MseM obsolète"
45
- : "1 preset MseM";
46
- return ReactDOM.createPortal(_jsx("div", { className: classes, onClick: updateTarget, "data-cms-remove": "", children: hasPreset && (_jsx(Tooltip, { content: tooltip, children: _jsx("div", { className: css.presetIndicator, children: _jsx(Icons.Tune, { className: css.presetIndicatorIcon }) }) })) }), section);
47
- }) }));
48
- }
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ import { Fragment as _Fragment } from "react/jsx-runtime";
10
+ export default function Overlays({
11
+ mode,
12
+ target,
13
+ setTarget
14
+ }) {
15
+ const [sections, setSections] = React.useState([]);
16
+ React.useEffect(() => {
17
+ if (mode === MODES.EDITING) {
18
+ const targets = Array.from(document.querySelectorAll("section[data-class]"));
19
+ setSections(targets);
20
+ targets.forEach(target => {
21
+ const section = target;
22
+ section.style.setProperty("position", "relative");
23
+ });
24
+ return () => {
25
+ targets.forEach(target => {
26
+ const section = target;
27
+ section.style.removeProperty("position");
28
+ });
29
+ };
30
+ }
31
+ }, [mode]);
32
+ if (mode !== MODES.EDITING) return null;
33
+ return _jsx(_Fragment, {
34
+ children: sections.map(section => {
35
+ const hasMseMPreset = section?.hasAttribute("data-msem-preset");
36
+ const hasObsoletePreset = section?.hasAttribute("data-config");
37
+ const hasPreset = hasMseMPreset || hasObsoletePreset;
38
+ const isActive = section === target;
39
+ const updateTarget = () => {
40
+ if (target) return;
41
+ setTarget(isActive ? null : section);
42
+ };
43
+ const classes = classNames(css.overlay, {
44
+ [css.active]: isActive,
45
+ [css.obsolete]: hasObsoletePreset
46
+ });
47
+ const tooltip = hasObsoletePreset ? "1 preset MseM obsolète" : "1 preset MseM";
48
+ return ReactDOM.createPortal(_jsx("div", {
49
+ className: classes,
50
+ onClick: updateTarget,
51
+ "data-cms-remove": "",
52
+ children: hasPreset && _jsx(Tooltip, {
53
+ content: tooltip,
54
+ children: _jsx("div", {
55
+ className: css.presetIndicator,
56
+ children: _jsx(Icons.Tune, {
57
+ className: css.presetIndicatorIcon
58
+ })
59
+ })
60
+ })
61
+ }), section);
62
+ })
63
+ });
64
+ }
@@ -1,12 +1,22 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import * as React from "react";
2
2
  import Select from "dt-design-system/es/select";
3
- export default function ResortSelector({ resorts, resort, setResort }) {
4
- const formatedResorts = resorts.map((resort) => ({
5
- label: resort.label,
6
- value: String(resort.resort),
7
- }));
8
- return (_jsx(Select, { value: resort, onValueChange: setResort, label: "Destination", options: [
9
- { label: "Sélectionnez une destination pour continuer", value: "" },
10
- ...formatedResorts,
11
- ] }));
12
- }
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ export default function ResortSelector({
5
+ resorts,
6
+ resort,
7
+ setResort
8
+ }) {
9
+ const formatedResorts = resorts.map(resort => ({
10
+ label: resort.label,
11
+ value: String(resort.resort)
12
+ }));
13
+ return _jsx(Select, {
14
+ value: resort,
15
+ onValueChange: setResort,
16
+ label: "Destination",
17
+ options: [{
18
+ label: "Sélectionnez une destination pour continuer",
19
+ value: ""
20
+ }, ...formatedResorts]
21
+ });
22
+ }
@@ -3,34 +3,46 @@ import { useUbloContext } from "ublo/with-ublo";
3
3
  import { MODES, PRESET_ATTRIBUTE } from "../msem-preset-linker";
4
4
  import * as UrlParams from "../services/url-params";
5
5
  import * as MseM from "../../../utils/msem-widget";
6
- // import * as MseM from "ublo-lib/es/common/utils/msem-widget";
7
- export default function useMsemPresets({ mode }) {
8
- const { lang, cmsMode, path } = useUbloContext();
9
- const isEnabled = cmsMode !== "editing" && cmsMode !== "info" && mode !== MODES.EDITING;
10
- const handleSectionClick = React.useCallback((e) => {
11
- const target = e.target;
12
- const section = target.closest(`section[${PRESET_ATTRIBUTE}]`);
13
- const preset = section?.getAttribute(PRESET_ATTRIBUTE);
14
- if (!preset)
15
- return;
16
- const { widget, options, presets, url } = JSON.parse(preset);
17
- e.preventDefault();
18
- e.stopPropagation();
19
- if (url) {
20
- const params = UrlParams.build({ options, presets });
21
- const endpoint = url.concat(params);
22
- window.open(endpoint, "_blank");
23
- return;
24
- }
25
- MseM.loadWidget(widget, options, presets);
26
- }, []);
27
- React.useEffect(() => {
28
- const container = document.getElementById("__next");
29
- if (isEnabled && container) {
30
- container.addEventListener("click", handleSectionClick);
31
- return () => {
32
- container.removeEventListener("click", handleSectionClick);
33
- };
34
- }
35
- }, [lang, handleSectionClick, isEnabled, path]);
36
- }
6
+ export default function useMsemPresets({
7
+ mode
8
+ }) {
9
+ const {
10
+ lang,
11
+ cmsMode,
12
+ path
13
+ } = useUbloContext();
14
+ const isEnabled = cmsMode !== "editing" && cmsMode !== "info" && mode !== MODES.EDITING;
15
+ const handleSectionClick = React.useCallback(e => {
16
+ const target = e.target;
17
+ const section = target.closest(`section[${PRESET_ATTRIBUTE}]`);
18
+ const preset = section?.getAttribute(PRESET_ATTRIBUTE);
19
+ if (!preset) return;
20
+ const {
21
+ widget,
22
+ options,
23
+ presets,
24
+ url
25
+ } = JSON.parse(preset);
26
+ e.preventDefault();
27
+ e.stopPropagation();
28
+ if (url) {
29
+ const params = UrlParams.build({
30
+ options,
31
+ presets
32
+ });
33
+ const endpoint = url.concat(params);
34
+ window.open(endpoint, "_blank");
35
+ return;
36
+ }
37
+ MseM.loadWidget(widget, options, presets);
38
+ }, []);
39
+ React.useEffect(() => {
40
+ const container = document.getElementById("__next");
41
+ if (isEnabled && container) {
42
+ container.addEventListener("click", handleSectionClick);
43
+ return () => {
44
+ container.removeEventListener("click", handleSectionClick);
45
+ };
46
+ }
47
+ }, [lang, handleSectionClick, isEnabled, path]);
48
+ }
@@ -1,2 +1,2 @@
1
1
  import MseMPresetLinker from "./msem-preset-linker";
2
- export default MseMPresetLinker;
2
+ export default MseMPresetLinker;
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  import * as React from "react";
3
2
  import { useUbloContext } from "ublo/with-ublo";
4
3
  import Router from "next/router";
@@ -7,48 +6,78 @@ import css from "./msem-preset-linker.module.css";
7
6
  import Overlays from "./components/overlays";
8
7
  import EditorDialog from "../msem-preset-editor/editor-dialog";
9
8
  import useMsemPresets from "./hooks/use-msem-presets";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ import { jsxs as _jsxs } from "react/jsx-runtime";
10
11
  export const MODES = {
11
- CONNECTED: 0,
12
- EDITING: 1,
12
+ CONNECTED: 0,
13
+ EDITING: 1
13
14
  };
14
15
  export const PRESET_ATTRIBUTE = "data-msem-preset";
15
- export default function MseMPresetLinker({ lang, options, urls, noLodgingPage, children, }) {
16
- const { cmsMode } = useUbloContext();
17
- const [mode, setMode] = React.useState(MODES.CONNECTED);
18
- const [target, setTarget] = React.useState(null);
19
- const link = target?.querySelector(":scope > a");
20
- const urlOverride = link?.getAttribute("href") || undefined;
21
- const urlsWithOverride = {
22
- ...urls,
23
- override: urlOverride,
24
- };
25
- const removeObsoletePreset = () => {
26
- const attributes = ["data-config", "data-widget", "data-resort"];
27
- attributes.forEach((attribute) => {
28
- target?.removeAttribute(attribute);
29
- });
30
- setTarget(null);
31
- };
32
- const updatePreset = (newPreset) => {
33
- if (newPreset) {
34
- target?.setAttribute(PRESET_ATTRIBUTE, JSON.stringify(newPreset));
35
- }
36
- else {
37
- target?.removeAttribute(PRESET_ATTRIBUTE);
38
- }
39
- removeObsoletePreset();
40
- setTarget(null);
41
- };
42
- const closeEditor = () => {
43
- setTarget(null);
44
- };
45
- Router.ready(() => {
46
- Router.events.on("routeChangeStart", () => {
47
- setMode(MODES.CONNECTED);
48
- });
16
+ export default function MseMPresetLinker({
17
+ lang,
18
+ options,
19
+ urls,
20
+ noLodgingPage,
21
+ children
22
+ }) {
23
+ const {
24
+ cmsMode
25
+ } = useUbloContext();
26
+ const [mode, setMode] = React.useState(MODES.CONNECTED);
27
+ const [target, setTarget] = React.useState(null);
28
+ const link = target?.querySelector(":scope > a");
29
+ const urlOverride = link?.getAttribute("href") || undefined;
30
+ const urlsWithOverride = {
31
+ ...urls,
32
+ override: urlOverride
33
+ };
34
+ const removeObsoletePreset = () => {
35
+ const attributes = ["data-config", "data-widget", "data-resort"];
36
+ attributes.forEach(attribute => {
37
+ target?.removeAttribute(attribute);
49
38
  });
50
- useMsemPresets({ mode });
51
- if (!cmsMode)
52
- return null;
53
- return (_jsxs("div", { className: css.linker, children: [_jsx(Actions, { mode: mode, setMode: setMode }), _jsx(Overlays, { mode: mode, target: target, setTarget: setTarget }), _jsx(EditorDialog, { lang: lang, options: options, target: target, updatePreset: updatePreset, closeEditor: closeEditor, removeObsoletePreset: removeObsoletePreset, urls: urlsWithOverride, noLodgingPage: noLodgingPage, children: children })] }));
54
- }
39
+ setTarget(null);
40
+ };
41
+ const updatePreset = newPreset => {
42
+ if (newPreset) {
43
+ target?.setAttribute(PRESET_ATTRIBUTE, JSON.stringify(newPreset));
44
+ } else {
45
+ target?.removeAttribute(PRESET_ATTRIBUTE);
46
+ }
47
+ removeObsoletePreset();
48
+ setTarget(null);
49
+ };
50
+ const closeEditor = () => {
51
+ setTarget(null);
52
+ };
53
+ Router.ready(() => {
54
+ Router.events.on("routeChangeStart", () => {
55
+ setMode(MODES.CONNECTED);
56
+ });
57
+ });
58
+ useMsemPresets({
59
+ mode
60
+ });
61
+ if (!cmsMode) return null;
62
+ return _jsxs("div", {
63
+ className: css.linker,
64
+ children: [_jsx(Actions, {
65
+ mode: mode,
66
+ setMode: setMode
67
+ }), _jsx(Overlays, {
68
+ mode: mode,
69
+ target: target,
70
+ setTarget: setTarget
71
+ }), _jsx(EditorDialog, {
72
+ lang: lang,
73
+ options: options,
74
+ target: target,
75
+ updatePreset: updatePreset,
76
+ closeEditor: closeEditor,
77
+ removeObsoletePreset: removeObsoletePreset,
78
+ urls: urlsWithOverride,
79
+ noLodgingPage: noLodgingPage,
80
+ children: children
81
+ })]
82
+ });
83
+ }
@@ -1,13 +1,10 @@
1
- export const build = (params) => {
2
- return Object.keys(params)
3
- .map((key, i) => {
4
- const param = params[key];
5
- if (!param)
6
- return "";
7
- const isObject = typeof param === "object";
8
- const sign = i === 0 ? "?" : "&";
9
- const value = isObject ? encodeURI(JSON.stringify(param)) : param;
10
- return `${sign}${key}=${value}`;
11
- })
12
- .join("");
13
- };
1
+ export const build = params => {
2
+ return Object.keys(params).map((key, i) => {
3
+ const param = params[key];
4
+ if (!param) return "";
5
+ const isObject = typeof param === "object";
6
+ const sign = i === 0 ? "?" : "&";
7
+ const value = isObject ? encodeURI(JSON.stringify(param)) : param;
8
+ return `${sign}${key}=${value}`;
9
+ }).join("");
10
+ };
@@ -2,24 +2,28 @@ import * as React from "react";
2
2
  import getConfig from "next/config";
3
3
  import load from "../services/load";
4
4
  import sendGoal from "../services/send-goal";
5
- const { publicRuntimeConfig } = getConfig();
6
- const { plausibleDomain } = publicRuntimeConfig;
5
+ const {
6
+ publicRuntimeConfig
7
+ } = getConfig();
8
+ const {
9
+ plausibleDomain
10
+ } = publicRuntimeConfig;
7
11
  export default function useGoal(goal, props, revenue, overridenDomain) {
8
- const [loaded] = usePlausible(overridenDomain);
9
- React.useEffect(() => {
10
- if (!loaded || !window.plausible)
11
- return;
12
- const defaultProps = { path: document.location.pathname };
13
- sendGoal(goal, props || defaultProps, revenue);
14
- }, [goal, loaded, props]);
12
+ const [loaded] = usePlausible(overridenDomain);
13
+ React.useEffect(() => {
14
+ if (!loaded || !window.plausible) return;
15
+ const defaultProps = {
16
+ path: document.location.pathname
17
+ };
18
+ sendGoal(goal, props || defaultProps, revenue);
19
+ }, [goal, loaded, props]);
15
20
  }
16
21
  function usePlausible(overridenDomain) {
17
- const [loaded, setLoaded] = React.useState(false);
18
- React.useEffect(() => {
19
- if (!overridenDomain && !plausibleDomain)
20
- return;
21
- load();
22
- setLoaded(true);
23
- }, [overridenDomain]);
24
- return [loaded, setLoaded];
25
- }
22
+ const [loaded, setLoaded] = React.useState(false);
23
+ React.useEffect(() => {
24
+ if (!overridenDomain && !plausibleDomain) return;
25
+ load();
26
+ setLoaded(true);
27
+ }, [overridenDomain]);
28
+ return [loaded, setLoaded];
29
+ }
@@ -4,4 +4,4 @@ const callback = Callback.MseM;
4
4
  export { default as load } from "./services/load";
5
5
  export { default as sendGoal } from "./services/send-goal";
6
6
  export { default as useGoal } from "./hooks/use-plausible";
7
- export { callback, Script };
7
+ export { callback, Script };
@@ -1,17 +1,26 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import * as React from "react";
2
2
  import Script from "next/script";
3
3
  import getConfig from "next/config";
4
- const { publicRuntimeConfig } = getConfig();
5
- const { plausibleDomain } = publicRuntimeConfig;
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ const {
6
+ publicRuntimeConfig
7
+ } = getConfig();
8
+ const {
9
+ plausibleDomain
10
+ } = publicRuntimeConfig;
6
11
  const DEFAULT_SOURCE = "https://plausible.io/js/script.revenue.file-downloads.outbound-links.js";
7
- export default function PlausibleScript({ lang, source = DEFAULT_SOURCE, }) {
8
- const hasI18n = typeof plausibleDomain === "object";
9
- if (hasI18n && !lang) {
10
- // eslint-disable-next-line no-console
11
- console.warn("PlausibleScript: the lang props is mandatory if you want to use a specific domain for each lang");
12
- }
13
- const domain = hasI18n && lang ? plausibleDomain[lang] : plausibleDomain;
14
- if (!domain)
15
- return null;
16
- return _jsx(Script, { "data-domain": domain, src: source });
17
- }
12
+ export default function PlausibleScript({
13
+ lang,
14
+ source = DEFAULT_SOURCE
15
+ }) {
16
+ const hasI18n = typeof plausibleDomain === "object";
17
+ if (hasI18n && !lang) {
18
+ console.warn("PlausibleScript: the lang props is mandatory if you want to use a specific domain for each lang");
19
+ }
20
+ const domain = hasI18n && lang ? plausibleDomain[lang] : plausibleDomain;
21
+ if (!domain) return null;
22
+ return _jsx(Script, {
23
+ "data-domain": domain,
24
+ src: source
25
+ });
26
+ }