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,30 +1,81 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import * as React from "react";
2
2
  import Link from "ublo/link";
3
3
  import Loader from "dt-design-system/es/loader";
4
4
  import * as Icons from "dt-design-system/es/icons";
5
5
  import * as Ripple from "dt-design-system/es/ripple";
6
6
  import * as Utils from "./services/utils";
7
7
  import css from "./links.module.css";
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ import { jsxs as _jsxs } from "react/jsx-runtime";
8
10
  const PLACEHOLDERS = [...new Array(3)];
9
- export default function Links({ icon, linksTitle, links, pageTitleAsTitle, loading, sendPlausibleGoal, }) {
10
- const Icon = Icons[icon];
11
- const noResult = !loading && !links.length;
12
- const createRipple = (e) => {
13
- Ripple.create(e);
14
- };
15
- if (noResult)
16
- return null;
17
- return (_jsxs("div", { className: css.linksSection, children: [_jsx("div", { className: css.linksTitle, children: linksTitle }), _jsxs("div", { className: css.links, children: [loading &&
18
- PLACEHOLDERS.map((_, i) => {
19
- return (_jsx("div", { className: css.loaderContainer, children: _jsx(Loader, { className: css.loader, variant: "overlay" }) }, i));
20
- }), !loading &&
21
- links.map((link) => {
22
- const { id, text, parentTitle, path } = link.document;
23
- const decodedPath = decodeURIComponent(path);
24
- const titleProperty = pageTitleAsTitle ? "pageTitle" : "title";
25
- const linkTitle = Utils.getHighlight(titleProperty, link.highlight) ||
26
- link.document[titleProperty];
27
- const linkText = Utils.getHighlight("text", link.highlight, true) || text;
28
- return (_jsxs(Link, { href: decodedPath, className: css.link, onClick: sendPlausibleGoal(decodedPath), onMouseDown: createRipple, children: [_jsx(Icon, { className: css.linkIcon }), _jsxs("div", { className: css.linkContent, children: [parentTitle && (_jsx("div", { className: css.linkParent, dangerouslySetInnerHTML: { __html: parentTitle } })), _jsx("div", { className: css.linkTitle, dangerouslySetInnerHTML: { __html: linkTitle } }), linkText && (_jsx("div", { className: css.linkText, dangerouslySetInnerHTML: { __html: linkText } }))] })] }, id));
29
- })] })] }));
30
- }
11
+ export default function Links({
12
+ icon,
13
+ linksTitle,
14
+ links,
15
+ pageTitleAsTitle,
16
+ loading,
17
+ sendPlausibleGoal
18
+ }) {
19
+ const Icon = Icons[icon];
20
+ const noResult = !loading && !links.length;
21
+ const createRipple = e => {
22
+ Ripple.create(e);
23
+ };
24
+ if (noResult) return null;
25
+ return _jsxs("div", {
26
+ className: css.linksSection,
27
+ children: [_jsx("div", {
28
+ className: css.linksTitle,
29
+ children: linksTitle
30
+ }), _jsxs("div", {
31
+ className: css.links,
32
+ children: [loading && PLACEHOLDERS.map((_, i) => {
33
+ return _jsx("div", {
34
+ className: css.loaderContainer,
35
+ children: _jsx(Loader, {
36
+ className: css.loader,
37
+ variant: "overlay"
38
+ })
39
+ }, i);
40
+ }), !loading && links.map(link => {
41
+ const {
42
+ id,
43
+ text,
44
+ parentTitle,
45
+ path
46
+ } = link.document;
47
+ const decodedPath = decodeURIComponent(path);
48
+ const titleProperty = pageTitleAsTitle ? "pageTitle" : "title";
49
+ const linkTitle = Utils.getHighlight(titleProperty, link.highlight) || link.document[titleProperty];
50
+ const linkText = Utils.getHighlight("text", link.highlight, true) || text;
51
+ return _jsxs(Link, {
52
+ href: decodedPath,
53
+ className: css.link,
54
+ onClick: sendPlausibleGoal(decodedPath),
55
+ onMouseDown: createRipple,
56
+ children: [_jsx(Icon, {
57
+ className: css.linkIcon
58
+ }), _jsxs("div", {
59
+ className: css.linkContent,
60
+ children: [parentTitle && _jsx("div", {
61
+ className: css.linkParent,
62
+ dangerouslySetInnerHTML: {
63
+ __html: parentTitle
64
+ }
65
+ }), _jsx("div", {
66
+ className: css.linkTitle,
67
+ dangerouslySetInnerHTML: {
68
+ __html: linkTitle
69
+ }
70
+ }), linkText && _jsx("div", {
71
+ className: css.linkText,
72
+ dangerouslySetInnerHTML: {
73
+ __html: linkText
74
+ }
75
+ })]
76
+ })]
77
+ }, id);
78
+ })]
79
+ })]
80
+ });
81
+ }
@@ -1,4 +1,81 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export default function NoProduct({ className }) {
3
- return (_jsxs("svg", { width: "200", height: "200", viewBox: "0 0 200 200", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: [_jsx("path", { d: "M100.5 184.3a85.8 85.8 0 1 0 0-171.5 85.8 85.8 0 0 0 0 171.5Z", fill: "#EDEDED" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M100.5 11a87.5 87.5 0 1 0 0 175 87.5 87.5 0 0 0 0-175Zm0 3.5a84 84 0 1 1 0 168 84 84 0 0 1 0-168Z", fill: "#D7D7D7" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M161.4 61.5c1 0 1.8-.8 1.8-1.8V46.1a4.7 4.7 0 0 0-4.7-4.7H26a4.7 4.7 0 0 0-4.7 4.7v34.3c0 1 .8 1.8 1.8 1.8h61.5c.4 0 .8-.1 1.1-.4l26.4-20.3h49.3Z", fill: "#D7D7D7" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M138.4 59.7h-25.5L84.6 80.4H45.3V25.7a3 3 0 0 1 2.9-2.9h64.7l25.5 27.5v9.4Z", fill: "#fff" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M112.9 21H48.2a4.7 4.7 0 0 0-4.7 4.7v54.7c0 1 .8 1.8 1.8 1.8h39.3c.4 0 .8-.1 1-.3l27.8-20.4h25c1 0 1.8-.8 1.8-1.8V50l-.1-.3-.2-.3v-.2l-.2-.1L114 21.6l-.1-.2-.4-.2h-.1l-.3-.1H113Zm-1.8 3.6H48.2c-.6 0-1.2.5-1.2 1.1v53h37l27.8-20.4c.3-.2.7-.3 1-.3h23.8v-6H113c-1 0-1.8-.8-1.8-1.7V24.6Zm-51 44.8h25.7a1.8 1.8 0 0 0 0-3.5H60.2a1.8 1.8 0 0 0 0 3.5Zm0-16h22a1.8 1.8 0 0 0 0-3.5H60a1.8 1.8 0 0 0 0 3.5Zm0-8.4h37.4a1.8 1.8 0 0 0 0-3.6H60.2a1.8 1.8 0 0 0 0 3.6Z", fill: "#D7D7D7" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.8 84a3 3 0 0 1 2.9-3.6h76.5a3 3 0 0 0 1.7-.5l26.4-19.6a3 3 0 0 1 1.8-.6h64.7a3 3 0 0 1 3 3.5c-2.9 16-14.4 83-16.8 96.7a3 3 0 0 1-2.9 2.4H25.4a3 3 0 0 1-2.9-2.2L4.8 84Z", fill: "#EDEDED" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "m3.1 84.4 17.7 76a4.7 4.7 0 0 0 4.6 3.7h136.7c2.3 0 4.2-1.7 4.6-4l16.7-96.6a4.7 4.7 0 0 0-4.6-5.5h-64.7c-1 0-2 .3-2.8.9a1130716.6 1130716.6 0 0 1-27.1 19.8H7.7a4.7 4.7 0 0 0-4.6 5.7Zm3.5-.8a1.2 1.2 0 0 1 1.1-1.4h76.5c1 0 2-.3 2.8-1a724489.6 724489.6 0 0 1 27-19.7h64.8a1.2 1.2 0 0 1 1.2 1.4l-16.7 96.7c-.1.6-.6 1-1.2 1H25.4c-.5 0-1-.4-1.1-1l-17.7-76Z", fill: "#D7D7D7" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M159.7 161a36.5 36.5 0 0 1-46.5-4 36.6 36.6 0 0 1 .4-51.8 36.6 36.6 0 0 1 51.7-.4 36.5 36.5 0 0 1 4 46.5l25 24.9c2.6 2.6 2.6 7 0 9.6a6.8 6.8 0 0 1-9.7 0l-25-24.9Z", fill: "#fff" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "m159.5 163.2 23.8 23.9a8.6 8.6 0 0 0 12.2 0 8.6 8.6 0 0 0 0-12.2L171.6 151a38.2 38.2 0 0 0-5-47.4 38.3 38.3 0 0 0-54.2.4 38.3 38.3 0 0 0-.4 54.2 38.2 38.2 0 0 0 47.5 5Zm1.4-3.5c-.6-.6-1.5-.7-2.2-.2a34.7 34.7 0 0 1-44.2-3.8 34.8 34.8 0 0 1 .4-49.2 34.8 34.8 0 0 1 49.2-.4c12 11.9 13.1 30.5 3.8 44.2-.5.7-.4 1.6.2 2.2l24.9 25c2 1.9 2 5.1 0 7a5 5 0 0 1-7.2 0L161 159.8Z", fill: "#D7D7D7" }), _jsx("path", { d: "M163.5 130.8a24.4 24.4 0 0 0-24.2-24.6c-13.4 0-24.3 11-24.3 24.6a24.4 24.4 0 0 0 24.3 24.6c13.3 0 24.2-11 24.2-24.6Z", fill: "#EDEDED" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M113.3 130.8a26.2 26.2 0 0 0 26 26.4c14.3 0 26-11.8 26-26.4a26.2 26.2 0 0 0-26-26.4c-14.4 0-26 11.8-26 26.4Zm3.5 0c0-12.6 10-22.8 22.5-22.8a22.7 22.7 0 0 1 22.4 22.8c0 12.6-10 22.9-22.4 22.9a22.7 22.7 0 0 1-22.5-22.9Z", fill: "#D7D7D7" }), _jsx("path", { opacity: ".7", fillRule: "evenodd", clipRule: "evenodd", d: "M117 121c.7-1.4 13.9 1.6 22.3 9.9 8.1 8 11.4 21.4 10.2 22-9.1 4.3-20.2 2.7-27.6-4.7-7.4-7.3-9-18.3-4.8-27.3Z", fill: "#fff" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M120.9 112.5a26.2 26.2 0 0 0-.3 37 26.2 26.2 0 0 0 37-.2 26.2 26.2 0 0 0 .3-37 26.2 26.2 0 0 0-37 .2Zm2.5 2.5c9-9 23.3-9 32-.3a22.7 22.7 0 0 1-.2 32c-9 9-23.3 9.1-32 .3a22.7 22.7 0 0 1 .2-32Z", fill: "#D7D7D7" }), _jsx("path", { d: "M140.2 142.1c1.4 0 2.4 1 2.4 2.4 0 1.3-1 2.3-2.4 2.3-1.3 0-2.3-1-2.3-2.3 0-1.3 1-2.4 2.3-2.4Zm.1-20.5V117a9.5 9.5 0 0 0-9.4 6.8v.2l4.5 1v.1l-4.6-1.1c-.3 1.2.5 2.5 1.8 2.8 1.2.3 2.5-.5 2.8-1.7l.2-.5.7-1.2c.7-.8 1.8-1.7 4-1.7Zm9.4 5.1a9.3 9.3 0 0 0-9.4-9.8v4.7c.6 0 1.8.2 2.9 1 .9.6 1.8 1.7 1.8 4.1 0 .5-.2 1-.7 1.6-.5.6-1.3 1.2-2.2 1.7a18.4 18.4 0 0 1-3.4 1.5h-.3c-1.2.4-2 1.8-1.6 3 .4 1.3 1.7 2 3 1.6l-.7-2.2-.4-1.4-.2-.6V131.6l.6 2.3.6 2.2h.2a11.6 11.6 0 0 0 1.3-.5c.9-.3 2-.8 3.2-1.5 1.2-.6 2.4-1.5 3.4-2.7a7 7 0 0 0 2-4.7Z", fill: "#D7D7D7" })] }));
4
- }
1
+ import * as React from "react";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { jsxs as _jsxs } from "react/jsx-runtime";
4
+ export default function NoProduct({
5
+ className
6
+ }) {
7
+ return _jsxs("svg", {
8
+ width: "200",
9
+ height: "200",
10
+ viewBox: "0 0 200 200",
11
+ fill: "none",
12
+ xmlns: "http://www.w3.org/2000/svg",
13
+ className: className,
14
+ children: [_jsx("path", {
15
+ d: "M100.5 184.3a85.8 85.8 0 1 0 0-171.5 85.8 85.8 0 0 0 0 171.5Z",
16
+ fill: "#EDEDED"
17
+ }), _jsx("path", {
18
+ fillRule: "evenodd",
19
+ clipRule: "evenodd",
20
+ d: "M100.5 11a87.5 87.5 0 1 0 0 175 87.5 87.5 0 0 0 0-175Zm0 3.5a84 84 0 1 1 0 168 84 84 0 0 1 0-168Z",
21
+ fill: "#D7D7D7"
22
+ }), _jsx("path", {
23
+ fillRule: "evenodd",
24
+ clipRule: "evenodd",
25
+ d: "M161.4 61.5c1 0 1.8-.8 1.8-1.8V46.1a4.7 4.7 0 0 0-4.7-4.7H26a4.7 4.7 0 0 0-4.7 4.7v34.3c0 1 .8 1.8 1.8 1.8h61.5c.4 0 .8-.1 1.1-.4l26.4-20.3h49.3Z",
26
+ fill: "#D7D7D7"
27
+ }), _jsx("path", {
28
+ fillRule: "evenodd",
29
+ clipRule: "evenodd",
30
+ d: "M138.4 59.7h-25.5L84.6 80.4H45.3V25.7a3 3 0 0 1 2.9-2.9h64.7l25.5 27.5v9.4Z",
31
+ fill: "#fff"
32
+ }), _jsx("path", {
33
+ fillRule: "evenodd",
34
+ clipRule: "evenodd",
35
+ d: "M112.9 21H48.2a4.7 4.7 0 0 0-4.7 4.7v54.7c0 1 .8 1.8 1.8 1.8h39.3c.4 0 .8-.1 1-.3l27.8-20.4h25c1 0 1.8-.8 1.8-1.8V50l-.1-.3-.2-.3v-.2l-.2-.1L114 21.6l-.1-.2-.4-.2h-.1l-.3-.1H113Zm-1.8 3.6H48.2c-.6 0-1.2.5-1.2 1.1v53h37l27.8-20.4c.3-.2.7-.3 1-.3h23.8v-6H113c-1 0-1.8-.8-1.8-1.7V24.6Zm-51 44.8h25.7a1.8 1.8 0 0 0 0-3.5H60.2a1.8 1.8 0 0 0 0 3.5Zm0-16h22a1.8 1.8 0 0 0 0-3.5H60a1.8 1.8 0 0 0 0 3.5Zm0-8.4h37.4a1.8 1.8 0 0 0 0-3.6H60.2a1.8 1.8 0 0 0 0 3.6Z",
36
+ fill: "#D7D7D7"
37
+ }), _jsx("path", {
38
+ fillRule: "evenodd",
39
+ clipRule: "evenodd",
40
+ d: "M4.8 84a3 3 0 0 1 2.9-3.6h76.5a3 3 0 0 0 1.7-.5l26.4-19.6a3 3 0 0 1 1.8-.6h64.7a3 3 0 0 1 3 3.5c-2.9 16-14.4 83-16.8 96.7a3 3 0 0 1-2.9 2.4H25.4a3 3 0 0 1-2.9-2.2L4.8 84Z",
41
+ fill: "#EDEDED"
42
+ }), _jsx("path", {
43
+ fillRule: "evenodd",
44
+ clipRule: "evenodd",
45
+ d: "m3.1 84.4 17.7 76a4.7 4.7 0 0 0 4.6 3.7h136.7c2.3 0 4.2-1.7 4.6-4l16.7-96.6a4.7 4.7 0 0 0-4.6-5.5h-64.7c-1 0-2 .3-2.8.9a1130716.6 1130716.6 0 0 1-27.1 19.8H7.7a4.7 4.7 0 0 0-4.6 5.7Zm3.5-.8a1.2 1.2 0 0 1 1.1-1.4h76.5c1 0 2-.3 2.8-1a724489.6 724489.6 0 0 1 27-19.7h64.8a1.2 1.2 0 0 1 1.2 1.4l-16.7 96.7c-.1.6-.6 1-1.2 1H25.4c-.5 0-1-.4-1.1-1l-17.7-76Z",
46
+ fill: "#D7D7D7"
47
+ }), _jsx("path", {
48
+ fillRule: "evenodd",
49
+ clipRule: "evenodd",
50
+ d: "M159.7 161a36.5 36.5 0 0 1-46.5-4 36.6 36.6 0 0 1 .4-51.8 36.6 36.6 0 0 1 51.7-.4 36.5 36.5 0 0 1 4 46.5l25 24.9c2.6 2.6 2.6 7 0 9.6a6.8 6.8 0 0 1-9.7 0l-25-24.9Z",
51
+ fill: "#fff"
52
+ }), _jsx("path", {
53
+ fillRule: "evenodd",
54
+ clipRule: "evenodd",
55
+ d: "m159.5 163.2 23.8 23.9a8.6 8.6 0 0 0 12.2 0 8.6 8.6 0 0 0 0-12.2L171.6 151a38.2 38.2 0 0 0-5-47.4 38.3 38.3 0 0 0-54.2.4 38.3 38.3 0 0 0-.4 54.2 38.2 38.2 0 0 0 47.5 5Zm1.4-3.5c-.6-.6-1.5-.7-2.2-.2a34.7 34.7 0 0 1-44.2-3.8 34.8 34.8 0 0 1 .4-49.2 34.8 34.8 0 0 1 49.2-.4c12 11.9 13.1 30.5 3.8 44.2-.5.7-.4 1.6.2 2.2l24.9 25c2 1.9 2 5.1 0 7a5 5 0 0 1-7.2 0L161 159.8Z",
56
+ fill: "#D7D7D7"
57
+ }), _jsx("path", {
58
+ d: "M163.5 130.8a24.4 24.4 0 0 0-24.2-24.6c-13.4 0-24.3 11-24.3 24.6a24.4 24.4 0 0 0 24.3 24.6c13.3 0 24.2-11 24.2-24.6Z",
59
+ fill: "#EDEDED"
60
+ }), _jsx("path", {
61
+ fillRule: "evenodd",
62
+ clipRule: "evenodd",
63
+ d: "M113.3 130.8a26.2 26.2 0 0 0 26 26.4c14.3 0 26-11.8 26-26.4a26.2 26.2 0 0 0-26-26.4c-14.4 0-26 11.8-26 26.4Zm3.5 0c0-12.6 10-22.8 22.5-22.8a22.7 22.7 0 0 1 22.4 22.8c0 12.6-10 22.9-22.4 22.9a22.7 22.7 0 0 1-22.5-22.9Z",
64
+ fill: "#D7D7D7"
65
+ }), _jsx("path", {
66
+ opacity: ".7",
67
+ fillRule: "evenodd",
68
+ clipRule: "evenodd",
69
+ d: "M117 121c.7-1.4 13.9 1.6 22.3 9.9 8.1 8 11.4 21.4 10.2 22-9.1 4.3-20.2 2.7-27.6-4.7-7.4-7.3-9-18.3-4.8-27.3Z",
70
+ fill: "#fff"
71
+ }), _jsx("path", {
72
+ fillRule: "evenodd",
73
+ clipRule: "evenodd",
74
+ d: "M120.9 112.5a26.2 26.2 0 0 0-.3 37 26.2 26.2 0 0 0 37-.2 26.2 26.2 0 0 0 .3-37 26.2 26.2 0 0 0-37 .2Zm2.5 2.5c9-9 23.3-9 32-.3a22.7 22.7 0 0 1-.2 32c-9 9-23.3 9.1-32 .3a22.7 22.7 0 0 1 .2-32Z",
75
+ fill: "#D7D7D7"
76
+ }), _jsx("path", {
77
+ d: "M140.2 142.1c1.4 0 2.4 1 2.4 2.4 0 1.3-1 2.3-2.4 2.3-1.3 0-2.3-1-2.3-2.3 0-1.3 1-2.4 2.3-2.4Zm.1-20.5V117a9.5 9.5 0 0 0-9.4 6.8v.2l4.5 1v.1l-4.6-1.1c-.3 1.2.5 2.5 1.8 2.8 1.2.3 2.5-.5 2.8-1.7l.2-.5.7-1.2c.7-.8 1.8-1.7 4-1.7Zm9.4 5.1a9.3 9.3 0 0 0-9.4-9.8v4.7c.6 0 1.8.2 2.9 1 .9.6 1.8 1.7 1.8 4.1 0 .5-.2 1-.7 1.6-.5.6-1.3 1.2-2.2 1.7a18.4 18.4 0 0 1-3.4 1.5h-.3c-1.2.4-2 1.8-1.6 3 .4 1.3 1.7 2 3 1.6l-.7-2.2-.4-1.4-.2-.6V131.6l.6 2.3.6 2.2h.2a11.6 11.6 0 0 0 1.3-.5c.9-.3 2-.8 3.2-1.5 1.2-.6 2.4-1.5 3.4-2.7a7 7 0 0 0 2-4.7Z",
78
+ fill: "#D7D7D7"
79
+ })]
80
+ });
81
+ }
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import * as React from "react";
2
2
  import Image from "next/image";
3
3
  import Link from "ublo/link";
4
4
  import Loader from "dt-design-system/es/loader";
@@ -9,34 +9,121 @@ import * as Utils from "./services/utils";
9
9
  import message from "./services/messages";
10
10
  import NoProduct from "./no-product";
11
11
  import css from "./products.module.css";
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { jsxs as _jsxs } from "react/jsx-runtime";
14
+ import { Fragment as _Fragment } from "react/jsx-runtime";
12
15
  const PLACEHOLDERS = [...new Array(5)];
13
- export default function Products({ lang, products, weekNumber, loading, sendPlausibleGoal, otherResultsRef, isOtherResultsEmpty, }) {
14
- const filteredProducts = Utils.filterProducts(products, weekNumber);
15
- const noProduct = !loading && !filteredProducts.length;
16
- const scrollToOtherResults = () => {
17
- if (otherResultsRef.current) {
18
- otherResultsRef.current.scrollIntoView({
19
- behavior: "smooth",
20
- block: "start",
21
- });
22
- }
23
- };
24
- const createRipple = (e) => {
25
- Ripple.create(e);
26
- };
27
- return (_jsxs(_Fragment, { children: [noProduct && (_jsxs("div", { className: css.noProduct, children: [_jsx(NoProduct, { className: css.noProductIcon }), message(lang, "noProducts")] })), loading &&
28
- PLACEHOLDERS.map((_, i) => {
29
- return (_jsx("div", { className: css.loaderContainer, children: _jsx(Loader, { className: css.loader, variant: "overlay" }) }, i));
30
- }), !loading &&
31
- filteredProducts.map((product) => {
32
- const { id, pageTitle, title, parentTitle, image = "", imagePlaceholder, price, time, text, path, } = product.document;
33
- const decodedPath = decodeURIComponent(path);
34
- const productPageTitle = Utils.getHighlight("pageTitle", product.highlight) || pageTitle;
35
- const productTitle = Utils.getHighlight("title", product.highlight) || title;
36
- const productTime = Utils.getHighlight("time", product.highlight) || time;
37
- const productText = Utils.getHighlight("text", product.highlight) || text;
38
- const showPrice = price !== undefined && weekNumber !== null;
39
- const imagePlaceholderStategy = imagePlaceholder ? "blur" : "empty";
40
- return (_jsxs(Link, { className: css.product, href: decodedPath, onClick: sendPlausibleGoal(decodedPath), onMouseDown: createRipple, children: [_jsx(Image, { className: css.productImage, src: image, alt: title, width: 220, height: 180, placeholder: imagePlaceholderStategy, blurDataURL: imagePlaceholder }), _jsxs("div", { className: css.productContent, children: [parentTitle && (_jsx("div", { className: css.productParent, dangerouslySetInnerHTML: { __html: parentTitle } })), _jsx("div", { className: css.productPageTitle, dangerouslySetInnerHTML: { __html: productPageTitle } }), _jsx("div", { className: css.productTitle, dangerouslySetInnerHTML: { __html: productTitle } }), _jsx("div", { className: css.productTime, dangerouslySetInnerHTML: { __html: productTime } }), _jsx("div", { className: css.productText, dangerouslySetInnerHTML: { __html: productText } }), showPrice && (_jsx("div", { className: css.productPrice, dangerouslySetInnerHTML: { __html: price } }))] })] }, id));
41
- }), !noProduct && !isOtherResultsEmpty && (_jsx("div", { className: css.otherProducts, children: _jsxs(Button, { className: css.otherProductsButton, onClick: scrollToOtherResults, children: [message(lang, "showOtherResults"), _jsx(Icons.ArrowDown, {})] }) }))] }));
42
- }
16
+ export default function Products({
17
+ lang,
18
+ products,
19
+ weekNumber,
20
+ loading,
21
+ sendPlausibleGoal,
22
+ otherResultsRef,
23
+ isOtherResultsEmpty
24
+ }) {
25
+ const filteredProducts = Utils.filterProducts(products, weekNumber);
26
+ const noProduct = !loading && !filteredProducts.length;
27
+ const scrollToOtherResults = () => {
28
+ if (otherResultsRef.current) {
29
+ otherResultsRef.current.scrollIntoView({
30
+ behavior: "smooth",
31
+ block: "start"
32
+ });
33
+ }
34
+ };
35
+ const createRipple = e => {
36
+ Ripple.create(e);
37
+ };
38
+ return _jsxs(_Fragment, {
39
+ children: [noProduct && _jsxs("div", {
40
+ className: css.noProduct,
41
+ children: [_jsx(NoProduct, {
42
+ className: css.noProductIcon
43
+ }), message(lang, "noProducts")]
44
+ }), loading && PLACEHOLDERS.map((_, i) => {
45
+ return _jsx("div", {
46
+ className: css.loaderContainer,
47
+ children: _jsx(Loader, {
48
+ className: css.loader,
49
+ variant: "overlay"
50
+ })
51
+ }, i);
52
+ }), !loading && filteredProducts.map(product => {
53
+ const {
54
+ id,
55
+ pageTitle,
56
+ title,
57
+ parentTitle,
58
+ image = "",
59
+ imagePlaceholder,
60
+ price,
61
+ time,
62
+ text,
63
+ path
64
+ } = product.document;
65
+ const decodedPath = decodeURIComponent(path);
66
+ const productPageTitle = Utils.getHighlight("pageTitle", product.highlight) || pageTitle;
67
+ const productTitle = Utils.getHighlight("title", product.highlight) || title;
68
+ const productTime = Utils.getHighlight("time", product.highlight) || time;
69
+ const productText = Utils.getHighlight("text", product.highlight) || text;
70
+ const showPrice = price !== undefined && weekNumber !== null;
71
+ const imagePlaceholderStategy = imagePlaceholder ? "blur" : "empty";
72
+ return _jsxs(Link, {
73
+ className: css.product,
74
+ href: decodedPath,
75
+ onClick: sendPlausibleGoal(decodedPath),
76
+ onMouseDown: createRipple,
77
+ children: [_jsx(Image, {
78
+ className: css.productImage,
79
+ src: image,
80
+ alt: title,
81
+ width: 220,
82
+ height: 180,
83
+ placeholder: imagePlaceholderStategy,
84
+ blurDataURL: imagePlaceholder
85
+ }), _jsxs("div", {
86
+ className: css.productContent,
87
+ children: [parentTitle && _jsx("div", {
88
+ className: css.productParent,
89
+ dangerouslySetInnerHTML: {
90
+ __html: parentTitle
91
+ }
92
+ }), _jsx("div", {
93
+ className: css.productPageTitle,
94
+ dangerouslySetInnerHTML: {
95
+ __html: productPageTitle
96
+ }
97
+ }), _jsx("div", {
98
+ className: css.productTitle,
99
+ dangerouslySetInnerHTML: {
100
+ __html: productTitle
101
+ }
102
+ }), _jsx("div", {
103
+ className: css.productTime,
104
+ dangerouslySetInnerHTML: {
105
+ __html: productTime
106
+ }
107
+ }), _jsx("div", {
108
+ className: css.productText,
109
+ dangerouslySetInnerHTML: {
110
+ __html: productText
111
+ }
112
+ }), showPrice && _jsx("div", {
113
+ className: css.productPrice,
114
+ dangerouslySetInnerHTML: {
115
+ __html: price
116
+ }
117
+ })]
118
+ })]
119
+ }, id);
120
+ }), !noProduct && !isOtherResultsEmpty && _jsx("div", {
121
+ className: css.otherProducts,
122
+ children: _jsxs(Button, {
123
+ className: css.otherProductsButton,
124
+ onClick: scrollToOtherResults,
125
+ children: [message(lang, "showOtherResults"), _jsx(Icons.ArrowDown, {})]
126
+ })
127
+ })]
128
+ });
129
+ }
@@ -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 Button from "dt-design-system/es/button";
@@ -8,34 +7,124 @@ import Products from "./products";
8
7
  import * as Dates from "./services/dates";
9
8
  import message from "./services/messages";
10
9
  import css from "./results.module.css";
11
- const { publicRuntimeConfig } = getConfig();
12
- const { season } = publicRuntimeConfig;
13
- export default function Results({ lang, text, results, weekNumber, openPeriodPicker, loading, sendPlausibleGoal, }) {
14
- const ref = React.useRef(null);
15
- const { grouped_hits: groupedHits = [] } = results || {};
16
- const flattenedHits = groupedHits.reduce((acc, group) => {
17
- return [...acc, ...group.hits];
18
- }, []);
19
- const sortedHits = flattenedHits.reduce((acc, hit) => {
20
- const { type } = hit.document;
21
- return { ...acc, [type]: [...acc[type], hit] };
22
- }, { page: [], product: [], information: [], faq: [], instructor: [] });
23
- const { page: pages, product: products, information, faq: faqs, instructor: instructors, } = sortedHits;
24
- const filteredFaqs = faqs.reduce((acc, faq) => {
25
- const isAlreadyInAcc = acc.some((item) => {
26
- const hasSameTitle = item.document.title === faq.document.title;
27
- const hasSameParentTitle = item.document.parentTitle === faq.document.parentTitle;
28
- return hasSameTitle && hasSameParentTitle;
29
- });
30
- if (isAlreadyInAcc)
31
- return acc;
32
- return [...acc, faq];
33
- }, []);
34
- const weekSystemEnabled = Boolean(season);
35
- const showProductsTitle = weekNumber !== null;
36
- const isOtherResultsEmpty = !(pages.length ||
37
- instructors.length ||
38
- filteredFaqs.length ||
39
- information.length);
40
- return (_jsx("div", { className: css.results, children: (loading || text.length > 0) && (_jsxs("div", { className: css.inner, children: [_jsxs("div", { ref: ref, className: css.left, children: [_jsx(Links, { linksTitle: message(lang, "pages"), icon: "FileText", links: pages, loading: loading, sendPlausibleGoal: sendPlausibleGoal }), _jsx(Links, { linksTitle: message(lang, "instructors"), icon: "User", links: instructors, loading: loading, sendPlausibleGoal: sendPlausibleGoal }), _jsx(Links, { linksTitle: message(lang, "faqs"), icon: "Question", links: filteredFaqs, loading: loading, sendPlausibleGoal: sendPlausibleGoal }), _jsx(Links, { linksTitle: message(lang, "information"), icon: "Info", links: information, loading: loading, sendPlausibleGoal: sendPlausibleGoal, pageTitleAsTitle: true })] }), _jsxs("div", { className: css.right, children: [!loading && products.length > 0 && weekSystemEnabled && (_jsx(_Fragment, { children: showProductsTitle ? (_jsxs("div", { className: css.resultsWithWeekTitle, children: [message(lang, "productTitleWithWeek"), Dates.weekToLongDate(weekNumber, season.end, season.forceSeasonSwitch), _jsxs(Button, { onClick: openPeriodPicker, children: [_jsx(Icons.Calendar, {}), message(lang, "updateWeek")] })] })) : (_jsxs("div", { className: css.resultsWithoutWeekTitle, children: [message(lang, "productTitleWithoutWeek"), _jsxs(Button, { onClick: openPeriodPicker, children: [_jsx(Icons.Calendar, {}), message(lang, "chooseWeek")] })] })) })), _jsx(Products, { lang: lang, products: products, weekNumber: weekNumber, loading: loading, sendPlausibleGoal: sendPlausibleGoal, otherResultsRef: ref, isOtherResultsEmpty: isOtherResultsEmpty })] })] })) }));
41
- }
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ import { jsxs as _jsxs } from "react/jsx-runtime";
12
+ import { Fragment as _Fragment } from "react/jsx-runtime";
13
+ const {
14
+ publicRuntimeConfig
15
+ } = getConfig();
16
+ const {
17
+ season
18
+ } = publicRuntimeConfig;
19
+ export default function Results({
20
+ lang,
21
+ text,
22
+ results,
23
+ weekNumber,
24
+ openPeriodPicker,
25
+ loading,
26
+ sendPlausibleGoal
27
+ }) {
28
+ const ref = React.useRef(null);
29
+ const {
30
+ grouped_hits: groupedHits = []
31
+ } = results || {};
32
+ const flattenedHits = groupedHits.reduce((acc, group) => {
33
+ return [...acc, ...group.hits];
34
+ }, []);
35
+ const sortedHits = flattenedHits.reduce((acc, hit) => {
36
+ const {
37
+ type
38
+ } = hit.document;
39
+ return {
40
+ ...acc,
41
+ [type]: [...acc[type], hit]
42
+ };
43
+ }, {
44
+ page: [],
45
+ product: [],
46
+ information: [],
47
+ faq: [],
48
+ instructor: []
49
+ });
50
+ const {
51
+ page: pages,
52
+ product: products,
53
+ information,
54
+ faq: faqs,
55
+ instructor: instructors
56
+ } = sortedHits;
57
+ const filteredFaqs = faqs.reduce((acc, faq) => {
58
+ const isAlreadyInAcc = acc.some(item => {
59
+ const hasSameTitle = item.document.title === faq.document.title;
60
+ const hasSameParentTitle = item.document.parentTitle === faq.document.parentTitle;
61
+ return hasSameTitle && hasSameParentTitle;
62
+ });
63
+ if (isAlreadyInAcc) return acc;
64
+ return [...acc, faq];
65
+ }, []);
66
+ const weekSystemEnabled = Boolean(season);
67
+ const showProductsTitle = weekNumber !== null;
68
+ const isOtherResultsEmpty = !(pages.length || instructors.length || filteredFaqs.length || information.length);
69
+ return _jsx("div", {
70
+ className: css.results,
71
+ children: (loading || text.length > 0) && _jsxs("div", {
72
+ className: css.inner,
73
+ children: [_jsxs("div", {
74
+ ref: ref,
75
+ className: css.left,
76
+ children: [_jsx(Links, {
77
+ linksTitle: message(lang, "pages"),
78
+ icon: "FileText",
79
+ links: pages,
80
+ loading: loading,
81
+ sendPlausibleGoal: sendPlausibleGoal
82
+ }), _jsx(Links, {
83
+ linksTitle: message(lang, "instructors"),
84
+ icon: "User",
85
+ links: instructors,
86
+ loading: loading,
87
+ sendPlausibleGoal: sendPlausibleGoal
88
+ }), _jsx(Links, {
89
+ linksTitle: message(lang, "faqs"),
90
+ icon: "Question",
91
+ links: filteredFaqs,
92
+ loading: loading,
93
+ sendPlausibleGoal: sendPlausibleGoal
94
+ }), _jsx(Links, {
95
+ linksTitle: message(lang, "information"),
96
+ icon: "Info",
97
+ links: information,
98
+ loading: loading,
99
+ sendPlausibleGoal: sendPlausibleGoal,
100
+ pageTitleAsTitle: true
101
+ })]
102
+ }), _jsxs("div", {
103
+ className: css.right,
104
+ children: [!loading && products.length > 0 && weekSystemEnabled && _jsx(_Fragment, {
105
+ children: showProductsTitle ? _jsxs("div", {
106
+ className: css.resultsWithWeekTitle,
107
+ children: [message(lang, "productTitleWithWeek"), Dates.weekToLongDate(weekNumber, season.end, season.forceSeasonSwitch), _jsxs(Button, {
108
+ onClick: openPeriodPicker,
109
+ children: [_jsx(Icons.Calendar, {}), message(lang, "updateWeek")]
110
+ })]
111
+ }) : _jsxs("div", {
112
+ className: css.resultsWithoutWeekTitle,
113
+ children: [message(lang, "productTitleWithoutWeek"), _jsxs(Button, {
114
+ onClick: openPeriodPicker,
115
+ children: [_jsx(Icons.Calendar, {}), message(lang, "chooseWeek")]
116
+ })]
117
+ })
118
+ }), _jsx(Products, {
119
+ lang: lang,
120
+ products: products,
121
+ weekNumber: weekNumber,
122
+ loading: loading,
123
+ sendPlausibleGoal: sendPlausibleGoal,
124
+ otherResultsRef: ref,
125
+ isOtherResultsEmpty: isOtherResultsEmpty
126
+ })]
127
+ })]
128
+ })
129
+ });
130
+ }
@@ -1,13 +1,15 @@
1
- // import * as Fetcher from "ublo-lib/es/common/utils/fetcher";
2
1
  import * as Fetcher from "../../../utils/fetcher";
3
2
  const api = "https://search.ublo.app/api";
4
3
  export function fetchResults(site, lang, query, groupLimit = 8, queryBy = "title,text,pageTitle,seoKeywords,parentTitle,seoTitle", queryByWeights) {
5
- const endpoint = `${api}/search`;
6
- return Fetcher.post(endpoint, {
7
- q: query,
8
- query_by: queryBy,
9
- query_by_weights: queryByWeights,
10
- group_limit: groupLimit,
11
- per_page: 30,
12
- }, { site, lang });
13
- }
4
+ const endpoint = `${api}/search`;
5
+ return Fetcher.post(endpoint, {
6
+ q: query,
7
+ query_by: queryBy,
8
+ query_by_weights: queryByWeights,
9
+ group_limit: groupLimit,
10
+ per_page: 30
11
+ }, {
12
+ site,
13
+ lang
14
+ });
15
+ }
@@ -1,5 +1,5 @@
1
1
  import locales from "../i18n.json";
2
2
  export default function message(lang, id) {
3
- const messages = locales[lang] || locales.en;
4
- return messages[id] || `??${id}??`;
5
- }
3
+ const messages = locales[lang] || locales.en;
4
+ return messages[id] || `??${id}??`;
5
+ }
@@ -1,39 +1,39 @@
1
1
  export function getHighlight(property, highlight, withExtractQuotes = false) {
2
- if (!highlight[property]?.snippet)
3
- return;
4
- let snippet = highlight[property].snippet;
5
- if (!withExtractQuotes)
6
- return snippet;
7
- const startsWithMaj = /[A-Z]/.test(snippet);
8
- const endsWithDot = snippet[snippet.length - 1] === ".";
9
- if (!startsWithMaj) {
10
- snippet = `...${snippet}`;
11
- }
12
- if (!endsWithDot) {
13
- snippet = `${snippet}...`;
14
- }
15
- return snippet;
2
+ if (!highlight[property]?.snippet) return;
3
+ let snippet = highlight[property].snippet;
4
+ if (!withExtractQuotes) return snippet;
5
+ const startsWithMaj = /[A-Z]/.test(snippet);
6
+ const endsWithDot = snippet[snippet.length - 1] === ".";
7
+ if (!startsWithMaj) {
8
+ snippet = `...${snippet}`;
9
+ }
10
+ if (!endsWithDot) {
11
+ snippet = `${snippet}...`;
12
+ }
13
+ return snippet;
16
14
  }
17
15
  export function filterProducts(products, weekNumber) {
18
- if (weekNumber !== null) {
19
- return products.filter((product) => {
20
- const { weeks = [] } = product.document;
21
- return weeks.length === 0 || weeks.includes(weekNumber);
22
- });
23
- }
24
- return products.reduce((acc, product) => {
25
- const { image, pageTitle } = product.document;
26
- const isAlreadyInAcc = acc.some((item) => {
27
- return (normalizeImage(item.document.image) === normalizeImage(image) &&
28
- item.document.pageTitle === pageTitle);
29
- });
30
- if (isAlreadyInAcc)
31
- return acc;
32
- return [...acc, product];
33
- }, []);
16
+ if (weekNumber !== null) {
17
+ return products.filter(product => {
18
+ const {
19
+ weeks = []
20
+ } = product.document;
21
+ return weeks.length === 0 || weeks.includes(weekNumber);
22
+ });
23
+ }
24
+ return products.reduce((acc, product) => {
25
+ const {
26
+ image,
27
+ pageTitle
28
+ } = product.document;
29
+ const isAlreadyInAcc = acc.some(item => {
30
+ return normalizeImage(item.document.image) === normalizeImage(image) && item.document.pageTitle === pageTitle;
31
+ });
32
+ if (isAlreadyInAcc) return acc;
33
+ return [...acc, product];
34
+ }, []);
34
35
  }
35
36
  function normalizeImage(image) {
36
- if (!image)
37
- return "";
38
- return image.replace(/(-[0-9]+)?.(jpg|jpeg|png|gif)/, "");
39
- }
37
+ if (!image) return "";
38
+ return image.replace(/(-[0-9]+)?.(jpg|jpeg|png|gif)/, "");
39
+ }