ublo-lib 1.31.42 → 1.31.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/common/components/admin-links/admin-links.d.ts +11 -0
- package/es/common/components/admin-links/admin-links.jsx +65 -0
- package/es/common/components/admin-links/{index.js → index.d.ts} +1 -1
- package/es/common/components/admin-links/index.jsx +2 -0
- package/es/common/components/analytics.d.ts +5 -0
- package/es/common/components/analytics.js +36 -34
- package/es/common/components/breadcrumb.d.ts +16 -0
- package/es/common/components/breadcrumb.jsx +32 -0
- package/es/common/components/carousel-zone.d.ts +7 -0
- package/es/common/components/carousel-zone.js +36 -55
- package/es/common/components/carousel.d.ts +14 -0
- package/es/common/components/carousel.js +288 -343
- package/es/common/components/cart-preview/api.d.ts +1 -0
- package/es/common/components/cart-preview/api.js +23 -19
- package/es/common/components/cart-preview/cart-pill.d.ts +5 -0
- package/es/common/components/cart-preview/cart-pill.js +5 -10
- package/es/common/components/cart-preview/cart-preview.d.ts +6 -0
- package/es/common/components/cart-preview/cart-preview.js +73 -102
- package/es/common/components/cart-preview/index.d.ts +2 -0
- package/es/common/components/cart-preview/index.js +1 -1
- package/es/common/components/cart-preview/utils.d.ts +2 -0
- package/es/common/components/cart-preview/utils.js +23 -13
- package/es/common/components/collapsible/collapsible.d.ts +9 -0
- package/es/common/components/collapsible/collapsible.jsx +51 -0
- package/es/common/components/collapsible/{index.js → index.d.ts} +1 -1
- package/es/common/components/collapsible/index.jsx +2 -0
- package/es/common/components/cookie-consent/cookie-consent.d.ts +7 -0
- package/es/common/components/cookie-consent/cookie-consent.js +99 -112
- package/es/common/components/cookie-consent/index.d.ts +4 -0
- package/es/common/components/cookie-consent/index.js +1 -1
- package/es/common/components/cookie-consent/messages.d.ts +1 -0
- package/es/common/components/cookie-consent/messages.js +27 -27
- package/es/common/components/cookie-consent/utils.d.ts +1 -0
- package/es/common/components/cookie-consent/utils.js +30 -21
- package/es/common/components/cross-selling-editor/cross-selling-editor.d.ts +18 -0
- package/es/common/components/cross-selling-editor/cross-selling-editor.jsx +35 -0
- package/es/common/components/cross-selling-editor/editor.d.ts +8 -0
- package/es/common/components/cross-selling-editor/editor.jsx +89 -0
- package/es/common/components/cross-selling-editor/hooks/use-custom-offers.d.ts +6 -0
- package/es/common/components/cross-selling-editor/hooks/use-custom-offers.js +56 -51
- package/es/common/components/cross-selling-editor/hooks/use-tunnel-offers.d.ts +1 -0
- package/es/common/components/cross-selling-editor/hooks/use-tunnel-offers.js +39 -31
- package/es/common/components/cross-selling-editor/{index.js → index.d.ts} +1 -1
- package/es/common/components/cross-selling-editor/index.jsx +2 -0
- package/es/common/components/cross-selling-editor/override-trigger-form.d.ts +10 -0
- package/es/common/components/cross-selling-editor/override-trigger-form.jsx +68 -0
- package/es/common/components/cross-selling-editor/override.d.ts +16 -0
- package/es/common/components/cross-selling-editor/override.jsx +102 -0
- package/es/common/components/cross-selling-editor/overrides-list.d.ts +13 -0
- package/es/common/components/cross-selling-editor/overrides-list.jsx +74 -0
- package/es/common/components/cross-selling-editor/rule.d.ts +13 -0
- package/es/common/components/cross-selling-editor/rule.jsx +55 -0
- package/es/common/components/cross-selling-editor/rules.d.ts +11 -0
- package/es/common/components/cross-selling-editor/rules.jsx +53 -0
- package/es/common/components/cross-selling-editor/services/api.d.ts +2 -0
- package/es/common/components/cross-selling-editor/services/api.js +27 -27
- package/es/common/components/cross-selling-editor/services/utils.d.ts +61 -0
- package/es/common/components/cross-selling-editor/services/utils.js +177 -175
- package/es/common/components/cross-selling-editor/tester-tunnel-offer.d.ts +13 -0
- package/es/common/components/cross-selling-editor/tester-tunnel-offer.jsx +26 -0
- package/es/common/components/cross-selling-editor/tester.d.ts +10 -0
- package/es/common/components/cross-selling-editor/tester.jsx +134 -0
- package/es/common/components/cross-selling-editor/types.d.ts +29 -0
- package/es/common/components/cross-selling-editor/types.js +1 -1
- package/es/common/components/custom-contact-form/attachment.d.ts +9 -0
- package/es/common/components/custom-contact-form/attachment.js +131 -201
- package/es/common/components/custom-contact-form/custom-contact-form.d.ts +24 -0
- package/es/common/components/custom-contact-form/custom-contact-form.jsx +121 -0
- package/es/common/components/custom-contact-form/field.d.ts +10 -0
- package/es/common/components/custom-contact-form/field.js +115 -218
- package/es/common/components/custom-contact-form/icons.d.ts +5 -0
- package/es/common/components/custom-contact-form/icons.js +35 -50
- package/es/common/components/custom-contact-form/index.d.ts +2 -0
- package/es/common/components/custom-contact-form/index.js +1 -1
- package/es/common/components/custom-contact-form/messages.d.ts +1 -0
- package/es/common/components/custom-contact-form/messages.js +78 -77
- package/es/common/components/custom-contact-form/utils.d.ts +29 -0
- package/es/common/components/custom-contact-form/utils.js +101 -124
- package/es/common/components/date-picker/calendar.d.ts +14 -0
- package/es/common/components/date-picker/calendar.js +172 -250
- package/es/common/components/date-picker/data.d.ts +86 -0
- package/es/common/components/date-picker/data.js +72 -78
- package/es/common/components/date-picker/date-item.d.ts +21 -0
- package/es/common/components/date-picker/date-item.js +123 -117
- package/es/common/components/date-picker/date-picker.d.ts +16 -0
- package/es/common/components/date-picker/date-picker.js +28 -56
- package/es/common/components/date-picker/helper.d.ts +9 -0
- package/es/common/components/date-picker/helper.js +37 -51
- package/es/common/components/date-picker/index.d.ts +3 -0
- package/es/common/components/date-picker/index.js +1 -1
- package/es/common/components/date-picker/messages.d.ts +1 -0
- package/es/common/components/date-picker/messages.js +47 -46
- package/es/common/components/date-picker/month.d.ts +20 -0
- package/es/common/components/date-picker/month.js +27 -72
- package/es/common/components/date-picker/utils.d.ts +24 -0
- package/es/common/components/date-picker/utils.js +104 -88
- package/es/common/components/editable-calendar/calendar-caption.d.ts +5 -0
- package/es/common/components/editable-calendar/calendar-caption.js +93 -144
- package/es/common/components/editable-calendar/calendar-date.d.ts +12 -0
- package/es/common/components/editable-calendar/calendar-date.js +64 -79
- package/es/common/components/editable-calendar/calendar-editor.d.ts +7 -0
- package/es/common/components/editable-calendar/calendar-editor.js +49 -83
- package/es/common/components/editable-calendar/calendar-header.d.ts +8 -0
- package/es/common/components/editable-calendar/calendar-header.js +13 -26
- package/es/common/components/editable-calendar/calendar.d.ts +6 -0
- package/es/common/components/editable-calendar/calendar.js +81 -115
- package/es/common/components/editable-calendar/data.d.ts +131 -0
- package/es/common/components/editable-calendar/data.js +95 -101
- package/es/common/components/editable-calendar/index.d.ts +1 -0
- package/es/common/components/editable-calendar/index.js +37 -49
- package/es/common/components/editable-calendar/utils.d.ts +18 -0
- package/es/common/components/editable-calendar/utils.js +58 -52
- package/es/common/components/editable-map/cluster.d.ts +4 -0
- package/es/common/components/editable-map/cluster.js +7 -12
- package/es/common/components/editable-map/edit-form.d.ts +7 -0
- package/es/common/components/editable-map/edit-form.js +43 -97
- package/es/common/components/editable-map/editable-map.d.ts +6 -0
- package/es/common/components/editable-map/editable-map.js +56 -111
- package/es/common/components/editable-map/full-screen-button.d.ts +6 -0
- package/es/common/components/editable-map/full-screen-button.js +61 -59
- package/es/common/components/editable-map/helper.d.ts +2 -0
- package/es/common/components/editable-map/helper.js +22 -23
- package/es/common/components/editable-map/icon-picker.d.ts +6 -0
- package/es/common/components/editable-map/icon-picker.js +41 -63
- package/es/common/components/editable-map/icons/esf-pralognan.d.ts +51 -0
- package/es/common/components/editable-map/icons/esf-pralognan.js +372 -1088
- package/es/common/components/editable-map/icons/esf.d.ts +39 -0
- package/es/common/components/editable-map/icons/esf.js +266 -758
- package/es/common/components/editable-map/icons/index.d.ts +6 -0
- package/es/common/components/editable-map/icons/index.js +1 -1
- package/es/common/components/editable-map/icons/lavovelo.d.ts +5 -0
- package/es/common/components/editable-map/icons/lavovelo.js +43 -84
- package/es/common/components/editable-map/icons/sata-huez.d.ts +29 -0
- package/es/common/components/editable-map/icons/sata-huez.js +169 -468
- package/es/common/components/editable-map/icons/sedev-vars.d.ts +29 -0
- package/es/common/components/editable-map/icons/sedev-vars.js +169 -468
- package/es/common/components/editable-map/icons/viarmonia.d.ts +3 -0
- package/es/common/components/editable-map/icons/viarmonia.js +26 -40
- package/es/common/components/editable-map/index.d.ts +4 -0
- package/es/common/components/editable-map/index.js +66 -74
- package/es/common/components/editable-map/map-events.d.ts +9 -0
- package/es/common/components/editable-map/map-events.js +33 -40
- package/es/common/components/editable-map/marker-list.d.ts +7 -0
- package/es/common/components/editable-map/marker-list.js +64 -87
- package/es/common/components/editable-map/markers.d.ts +6 -0
- package/es/common/components/editable-map/markers.js +39 -88
- package/es/common/components/editable-map/popup-data.d.ts +4 -0
- package/es/common/components/editable-map/popup-data.js +14 -35
- package/es/common/components/editable-map/slopes-toggle.d.ts +5 -0
- package/es/common/components/editable-map/slopes-toggle.js +9 -18
- package/es/common/components/error-404/error-404.d.ts +6 -0
- package/es/common/components/error-404/error-404.js +22 -42
- package/es/common/components/error-404/index.d.ts +2 -0
- package/es/common/components/error-404/index.js +1 -1
- package/es/common/components/error-404/messages.d.ts +1 -0
- package/es/common/components/error-404/messages.js +14 -13
- package/es/common/components/faq.d.ts +6 -0
- package/es/common/components/faq.js +45 -49
- package/es/common/components/gesco-contact-form/gesco-contact-form.d.ts +18 -0
- package/es/common/components/gesco-contact-form/gesco-contact-form.jsx +152 -0
- package/es/common/components/gesco-contact-form/hooks/use-params.d.ts +14 -0
- package/es/common/components/gesco-contact-form/hooks/use-params.js +30 -36
- package/es/common/components/gesco-contact-form/index.d.ts +2 -0
- package/es/common/components/gesco-contact-form/index.js +1 -1
- package/es/common/components/gesco-contact-form/phone-code-select.d.ts +7 -0
- package/es/common/components/gesco-contact-form/phone-code-select.jsx +61 -0
- package/es/common/components/gesco-contact-form/services/api.d.ts +29 -0
- package/es/common/components/gesco-contact-form/services/api.js +23 -9
- package/es/common/components/gesco-contact-form/services/form.d.ts +30 -0
- package/es/common/components/gesco-contact-form/services/form.js +25 -39
- package/es/common/components/gesco-contact-form/services/messages.d.ts +33 -0
- package/es/common/components/gesco-contact-form/services/messages.js +65 -68
- package/es/common/components/gesco-contact-form/services/plausible.d.ts +2 -0
- package/es/common/components/gesco-contact-form/services/plausible.js +10 -8
- package/es/common/components/gesco-contact-form/types.d.ts +33 -0
- package/es/common/components/gesco-contact-form/types.js +1 -1
- package/es/common/components/info-buttons.d.ts +7 -0
- package/es/common/components/info-buttons.js +91 -95
- package/es/common/components/information/index.d.ts +2 -0
- package/es/common/components/information/index.js +1 -1
- package/es/common/components/information/information.d.ts +6 -0
- package/es/common/components/information/information.jsx +49 -0
- package/es/common/components/instant-search/hooks/use-constant.d.ts +1 -0
- package/es/common/components/instant-search/hooks/use-constant.js +6 -8
- package/es/common/components/instant-search/hooks/use-debounced-search.d.ts +6 -0
- package/es/common/components/instant-search/hooks/use-debounced-search.js +14 -14
- package/es/common/components/instant-search/hooks/use-search.d.ts +15 -0
- package/es/common/components/instant-search/hooks/use-search.js +15 -10
- package/es/common/components/instant-search/{index.js → index.d.ts} +1 -1
- package/es/common/components/instant-search/index.jsx +2 -0
- package/es/common/components/instant-search/input.d.ts +15 -0
- package/es/common/components/instant-search/input.jsx +64 -0
- package/es/common/components/instant-search/instant-search.d.ts +19 -0
- package/es/common/components/instant-search/instant-search.jsx +98 -0
- package/es/common/components/instant-search/links.d.ts +12 -0
- package/es/common/components/instant-search/links.jsx +45 -0
- package/es/common/components/instant-search/no-product.d.ts +6 -0
- package/es/common/components/instant-search/no-product.jsx +19 -0
- package/es/common/components/instant-search/products.d.ts +13 -0
- package/es/common/components/instant-search/products.jsx +67 -0
- package/es/common/components/instant-search/results.d.ts +76 -0
- package/es/common/components/instant-search/results.jsx +68 -0
- package/es/common/components/instant-search/services/api.d.ts +1 -0
- package/es/common/components/instant-search/services/api.js +10 -12
- package/es/common/components/instant-search/services/dates.d.ts +1 -0
- package/es/common/components/instant-search/services/dates.js +41 -36
- package/es/common/components/instant-search/services/messages.d.ts +1 -0
- package/es/common/components/instant-search/services/messages.js +3 -3
- package/es/common/components/instant-search/services/utils.d.ts +3 -0
- package/es/common/components/instant-search/services/utils.js +35 -34
- package/es/common/components/msem-preset-editor/components/facet-selector.d.ts +6 -0
- package/es/common/components/msem-preset-editor/components/facet-selector.jsx +20 -0
- package/es/common/components/msem-preset-editor/components/form.d.ts +8 -0
- package/es/common/components/msem-preset-editor/components/form.jsx +28 -0
- package/es/common/components/msem-preset-editor/components/stay-picker.d.ts +14 -0
- package/es/common/components/msem-preset-editor/components/stay-picker.jsx +38 -0
- package/es/common/components/msem-preset-editor/components/widget-list-item.d.ts +11 -0
- package/es/common/components/msem-preset-editor/components/widget-list-item.jsx +97 -0
- package/es/common/components/msem-preset-editor/components/widget-list.d.ts +16 -0
- package/es/common/components/msem-preset-editor/components/widget-list.jsx +46 -0
- package/es/common/components/msem-preset-editor/editor-dialog.d.ts +29 -0
- package/es/common/components/msem-preset-editor/editor-dialog.jsx +45 -0
- package/es/common/components/msem-preset-editor/editors/elloha.d.ts +14 -0
- package/es/common/components/msem-preset-editor/editors/elloha.jsx +95 -0
- package/es/common/components/msem-preset-editor/editors/index.d.ts +15 -0
- package/es/common/components/msem-preset-editor/editors/{index.js → index.jsx} +7 -7
- package/es/common/components/msem-preset-editor/editors/lodgings.d.ts +16 -0
- package/es/common/components/msem-preset-editor/editors/lodgings.jsx +235 -0
- package/es/common/components/msem-preset-editor/editors/ski-passes-jb.d.ts +15 -0
- package/es/common/components/msem-preset-editor/editors/ski-passes-jb.jsx +89 -0
- package/es/common/components/msem-preset-editor/editors/ski-passes.d.ts +15 -0
- package/es/common/components/msem-preset-editor/editors/ski-passes.jsx +215 -0
- package/es/common/components/msem-preset-editor/editors/standard-products.d.ts +15 -0
- package/es/common/components/msem-preset-editor/editors/standard-products.jsx +70 -0
- package/es/common/components/msem-preset-editor/editors/vakario.d.ts +14 -0
- package/es/common/components/msem-preset-editor/editors/vakario.jsx +177 -0
- package/es/common/components/msem-preset-editor/index.d.ts +2 -0
- package/es/common/components/msem-preset-editor/index.js +1 -1
- package/es/common/components/msem-preset-editor/msem-preset-editor.d.ts +27 -0
- package/es/common/components/msem-preset-editor/msem-preset-editor.jsx +176 -0
- package/es/common/components/msem-preset-editor/services/api.d.ts +14 -0
- package/es/common/components/msem-preset-editor/services/api.js +90 -82
- package/es/common/components/msem-preset-editor/services/offers.d.ts +22 -0
- package/es/common/components/msem-preset-editor/services/offers.js +68 -77
- package/es/common/components/msem-preset-editor/services/preset.d.ts +31 -0
- package/es/common/components/msem-preset-editor/services/preset.js +18 -26
- package/es/common/components/msem-preset-editor/services/url-params.d.ts +2 -0
- package/es/common/components/msem-preset-editor/services/url-params.js +24 -24
- package/es/common/components/msem-preset-linker/components/actions.d.ts +11 -0
- package/es/common/components/msem-preset-linker/components/actions.jsx +60 -0
- package/es/common/components/msem-preset-linker/components/overlays.d.ts +8 -0
- package/es/common/components/msem-preset-linker/components/overlays.jsx +59 -0
- package/es/common/components/msem-preset-linker/components/resort-selector.d.ts +6 -0
- package/es/common/components/msem-preset-linker/components/resort-selector.jsx +12 -0
- package/es/common/components/msem-preset-linker/hooks/use-msem-presets.d.ts +4 -0
- package/es/common/components/msem-preset-linker/hooks/use-msem-presets.js +32 -48
- package/es/common/components/msem-preset-linker/{index.js → index.d.ts} +1 -1
- package/es/common/components/msem-preset-linker/index.jsx +2 -0
- package/es/common/components/msem-preset-linker/msem-preset-linker.d.ts +29 -0
- package/es/common/components/msem-preset-linker/msem-preset-linker.jsx +56 -0
- package/es/common/components/msem-preset-linker/services/url-params.d.ts +1 -0
- package/es/common/components/msem-preset-linker/services/url-params.js +13 -10
- package/es/common/components/packages-selector/index.d.ts +7 -0
- package/es/common/components/packages-selector/index.js +41 -49
- package/es/common/components/plausible/hooks/use-plausible.d.ts +11 -0
- package/es/common/components/plausible/hooks/use-plausible.js +18 -22
- package/es/common/components/plausible/index.d.ts +7 -0
- package/es/common/components/plausible/index.js +1 -1
- package/es/common/components/plausible/plausible.d.ts +7 -0
- package/es/common/components/plausible/plausible.jsx +17 -0
- package/es/common/components/plausible/services/callback.d.ts +23 -0
- package/es/common/components/plausible/services/callback.js +123 -186
- package/es/common/components/plausible/services/load.d.ts +1 -0
- package/es/common/components/plausible/services/load.js +6 -4
- package/es/common/components/plausible/services/send-goal.d.ts +6 -0
- package/es/common/components/plausible/services/send-goal.js +3 -6
- package/es/common/components/popup.d.ts +6 -0
- package/es/common/components/popup.js +51 -80
- package/es/common/components/scroll-spy.d.ts +13 -0
- package/es/common/components/scroll-spy.jsx +56 -0
- package/es/common/components/scrolling-carousel/{index.js → index.d.ts} +1 -1
- package/es/common/components/scrolling-carousel/index.jsx +2 -0
- package/es/common/components/scrolling-carousel/scrolling-carousel.d.ts +7 -0
- package/es/common/components/scrolling-carousel/scrolling-carousel.jsx +78 -0
- package/es/common/components/search-bar/hooks/use-constant.d.ts +1 -0
- package/es/common/components/search-bar/hooks/use-constant.js +6 -8
- package/es/common/components/search-bar/hooks/use-debounced-search.d.ts +6 -0
- package/es/common/components/search-bar/hooks/use-debounced-search.js +14 -14
- package/es/common/components/search-bar/hooks/use-search.d.ts +11 -0
- package/es/common/components/search-bar/hooks/use-search.js +14 -11
- package/es/common/components/search-bar/index.d.ts +2 -0
- package/es/common/components/search-bar/index.js +1 -1
- package/es/common/components/search-bar/messages.d.ts +14 -0
- package/es/common/components/search-bar/messages.js +16 -16
- package/es/common/components/search-bar/search-bar.d.ts +12 -0
- package/es/common/components/search-bar/search-bar.js +147 -204
- package/es/common/components/search-bar/utils/fetcher.d.ts +1 -0
- package/es/common/components/search-bar/utils/fetcher.js +16 -13
- package/es/common/components/search-bar/utils/keyboard-keys.d.ts +5 -0
- package/es/common/components/search-bar/utils/keyboard-keys.js +1 -1
- package/es/common/components/search-bar/utils/params.d.ts +1 -0
- package/es/common/components/search-bar/utils/params.js +11 -8
- package/es/common/components/tabbed-zones.d.ts +12 -0
- package/es/common/components/tabbed-zones.jsx +68 -0
- package/es/common/components/video-player/controls.d.ts +16 -0
- package/es/common/components/video-player/controls.js +71 -114
- package/es/common/components/video-player/icons.d.ts +7 -0
- package/es/common/components/video-player/icons.js +35 -48
- package/es/common/components/video-player/index.d.ts +1 -0
- package/es/common/components/video-player/index.js +1 -1
- package/es/common/components/video-player/utils.d.ts +4 -0
- package/es/common/components/video-player/utils.js +42 -34
- package/es/common/components/video-player/video-player.d.ts +9 -0
- package/es/common/components/video-player/video-player.js +77 -101
- package/es/common/hooks/use-account.d.ts +6 -0
- package/es/common/hooks/use-account.js +33 -25
- package/es/common/hooks/use-faq.d.ts +2 -0
- package/es/common/hooks/use-faq.js +36 -37
- package/es/common/hooks/use-in-view.d.ts +4 -0
- package/es/common/hooks/use-in-view.js +74 -74
- package/es/common/hooks/use-injected-cms-markup.d.ts +2 -0
- package/es/common/hooks/use-injected-cms-markup.js +46 -39
- package/es/common/hooks/use-packages.d.ts +2 -0
- package/es/common/hooks/use-packages.js +98 -97
- package/es/common/hooks/use-scroll-direction.d.ts +10 -0
- package/es/common/hooks/use-scroll-direction.js +32 -37
- package/es/common/hooks/use-stay.d.ts +3 -0
- package/es/common/hooks/use-stay.js +13 -16
- package/es/common/hooks/use-sticky.d.ts +3 -0
- package/es/common/hooks/use-sticky.js +35 -35
- package/es/common/hooks/use-tunnel.d.ts +10 -0
- package/es/common/hooks/use-tunnel.js +56 -51
- package/es/common/hooks/use-update-effect.d.ts +1 -0
- package/es/common/hooks/use-update-effect.js +9 -9
- package/es/common/hooks/use-window-sizes.d.ts +6 -0
- package/es/common/hooks/use-window-sizes.js +28 -29
- package/es/common/hooks/use-youtube-popup.d.ts +2 -0
- package/es/common/hooks/use-youtube-popup.js +46 -53
- package/es/common/hooks/use-zone-sync.d.ts +2 -0
- package/es/common/hooks/use-zone-sync.js +54 -52
- package/es/common/utils/cms.d.ts +3 -0
- package/es/common/utils/cms.js +32 -17
- package/es/common/utils/cookies.d.ts +1 -0
- package/es/common/utils/cookies.js +11 -10
- package/es/common/utils/copy.d.ts +1 -0
- package/es/common/utils/copy.js +11 -11
- package/es/common/utils/dates.d.ts +1 -0
- package/es/common/utils/dates.js +10 -8
- package/es/common/utils/elements.d.ts +4 -0
- package/es/common/utils/elements.js +16 -14
- package/es/common/utils/events.d.ts +3 -0
- package/es/common/utils/events.js +19 -4
- package/es/common/utils/fetcher.d.ts +4 -0
- package/es/common/utils/fetcher.js +48 -28
- package/es/common/utils/file-manager.d.ts +12 -0
- package/es/common/utils/file-manager.js +20 -13
- package/es/common/utils/load-js.d.ts +2 -0
- package/es/common/utils/load-js.js +11 -10
- package/es/common/utils/msem-widget.d.ts +16 -0
- package/es/common/utils/msem-widget.jsx +49 -0
- package/es/common/utils/scrollbar-size.d.ts +1 -0
- package/es/common/utils/scrollbar-size.js +1 -1
- package/es/common/utils/touch-device.d.ts +1 -0
- package/es/common/utils/touch-device.js +3 -1
- package/es/common/utils/url-parameters.d.ts +1 -0
- package/es/common/utils/url-parameters.js +7 -11
- package/es/esf/components/account-button/account-button.d.ts +14 -0
- package/es/esf/components/account-button/account-button.jsx +16 -0
- package/es/esf/components/account-button/index.d.ts +2 -0
- package/es/esf/components/account-button/index.js +1 -1
- package/es/esf/components/booking-form/booking-form.d.ts +3 -0
- package/es/esf/components/booking-form/booking-form.js +31 -65
- package/es/esf/components/booking-form/data.d.ts +334 -0
- package/es/esf/components/booking-form/data.js +212 -206
- package/es/esf/components/booking-form/field.d.ts +10 -0
- package/es/esf/components/booking-form/field.js +79 -102
- package/es/esf/components/booking-form/hooks/use-custom-fields.d.ts +2 -0
- package/es/esf/components/booking-form/hooks/use-custom-fields.js +17 -23
- package/es/esf/components/booking-form/hooks/use-stay.d.ts +2 -0
- package/es/esf/components/booking-form/hooks/use-stay.js +9 -9
- package/es/esf/components/booking-form/index.d.ts +2 -0
- package/es/esf/components/booking-form/index.js +1 -1
- package/es/esf/components/booking-form/lesson.d.ts +9 -0
- package/es/esf/components/booking-form/lesson.js +31 -48
- package/es/esf/components/booking-form/lessons.d.ts +12 -0
- package/es/esf/components/booking-form/lessons.js +51 -77
- package/es/esf/components/booking-form/messages.d.ts +1 -0
- package/es/esf/components/booking-form/messages.js +51 -50
- package/es/esf/components/booking-form/personal-data.d.ts +10 -0
- package/es/esf/components/booking-form/personal-data.js +31 -55
- package/es/esf/components/booking-form/progress-bar.d.ts +6 -0
- package/es/esf/components/booking-form/progress-bar.js +16 -29
- package/es/esf/components/booking-form/steps.d.ts +14 -0
- package/es/esf/components/booking-form/steps.js +38 -70
- package/es/esf/components/booking-form/summary.d.ts +11 -0
- package/es/esf/components/booking-form/summary.js +101 -131
- package/es/esf/components/booking-form/utils.d.ts +5 -0
- package/es/esf/components/booking-form/utils.js +53 -58
- package/es/esf/components/covid-link/index.d.ts +2 -0
- package/es/esf/components/covid-link/index.js +133 -2
- package/es/esf/components/covid-link/mask-icon.d.ts +3 -0
- package/es/esf/components/covid-link/mask-icon.js +5 -15
- package/es/esf/components/covid-link/vax-pass-icon.d.ts +3 -0
- package/es/esf/components/covid-link/vax-pass-icon.js +13 -32
- package/es/esf/components/cp-form.d.ts +14 -0
- package/es/esf/components/cp-form.js +58 -57
- package/es/esf/components/instructors-book/api.d.ts +3 -0
- package/es/esf/components/instructors-book/api.js +66 -57
- package/es/esf/components/instructors-book/book.d.ts +5 -0
- package/es/esf/components/instructors-book/book.js +66 -75
- package/es/esf/components/instructors-book/filters.d.ts +9 -0
- package/es/esf/components/instructors-book/filters.js +23 -56
- package/es/esf/components/instructors-book/flags.d.ts +34 -0
- package/es/esf/components/instructors-book/flags.js +108 -246
- package/es/esf/components/instructors-book/index.d.ts +6 -0
- package/es/esf/components/instructors-book/index.js +1 -1
- package/es/esf/components/instructors-book/instructor.d.ts +8 -0
- package/es/esf/components/instructors-book/instructor.js +64 -103
- package/es/esf/components/instructors-book/list.d.ts +10 -0
- package/es/esf/components/instructors-book/list.js +21 -40
- package/es/esf/components/instructors-book/messages.d.ts +1 -0
- package/es/esf/components/instructors-book/messages.js +38 -38
- package/es/esf/components/instructors-book/prefixes.d.ts +5 -0
- package/es/esf/components/instructors-book/prefixes.js +3 -3
- package/es/esf/components/instructors-book/sheet.d.ts +8 -0
- package/es/esf/components/instructors-book/sheet.js +93 -159
- package/es/esf/components/instructors-book/suggestions.d.ts +7 -0
- package/es/esf/components/instructors-book/suggestions.js +43 -51
- package/es/esf/components/instructors-book/utils.d.ts +13 -0
- package/es/esf/components/instructors-book/utils.js +42 -39
- package/es/esf/components/levels/detail.d.ts +5 -0
- package/es/esf/components/levels/detail.js +14 -34
- package/es/esf/components/levels/index.d.ts +2 -0
- package/es/esf/components/levels/index.js +1 -1
- package/es/esf/components/levels/levels.d.ts +5 -0
- package/es/esf/components/levels/levels.js +239 -325
- package/es/esf/components/loyal-customers/api.d.ts +4 -0
- package/es/esf/components/loyal-customers/api.js +25 -20
- package/es/esf/components/loyal-customers/components/bin-icon.d.ts +3 -0
- package/es/esf/components/loyal-customers/components/bin-icon.js +9 -25
- package/es/esf/components/loyal-customers/components/customer-form.d.ts +18 -0
- package/es/esf/components/loyal-customers/components/customer-form.js +54 -89
- package/es/esf/components/loyal-customers/components/field.d.ts +9 -0
- package/es/esf/components/loyal-customers/components/field.js +67 -91
- package/es/esf/components/loyal-customers/components/row.d.ts +10 -0
- package/es/esf/components/loyal-customers/components/row.js +31 -66
- package/es/esf/components/loyal-customers/components/rows.d.ts +9 -0
- package/es/esf/components/loyal-customers/components/rows.js +14 -30
- package/es/esf/components/loyal-customers/components/stay.d.ts +5 -0
- package/es/esf/components/loyal-customers/components/stay.js +24 -30
- package/es/esf/components/loyal-customers/components/student-form.d.ts +10 -0
- package/es/esf/components/loyal-customers/components/student-form.js +59 -106
- package/es/esf/components/loyal-customers/components/voucher.d.ts +7 -0
- package/es/esf/components/loyal-customers/components/voucher.js +5 -19
- package/es/esf/components/loyal-customers/content.d.ts +17 -0
- package/es/esf/components/loyal-customers/content.js +43 -46
- package/es/esf/components/loyal-customers/data.d.ts +166 -0
- package/es/esf/components/loyal-customers/data.js +62 -113
- package/es/esf/components/loyal-customers/hooks/use-stored-rows.d.ts +3 -0
- package/es/esf/components/loyal-customers/hooks/use-stored-rows.js +9 -8
- package/es/esf/components/loyal-customers/index.d.ts +2 -0
- package/es/esf/components/loyal-customers/index.js +1 -1
- package/es/esf/components/loyal-customers/loyal-customers.d.ts +17 -0
- package/es/esf/components/loyal-customers/loyal-customers.js +62 -120
- package/es/esf/components/loyal-customers/messages.d.ts +1 -0
- package/es/esf/components/loyal-customers/messages.js +57 -56
- package/es/esf/components/loyal-customers/utils.d.ts +20 -0
- package/es/esf/components/loyal-customers/utils.js +42 -67
- package/es/esf/components/magic-box/booking.d.ts +11 -0
- package/es/esf/components/magic-box/booking.js +97 -90
- package/es/esf/components/magic-box/filter.d.ts +8 -0
- package/es/esf/components/magic-box/filter.js +16 -38
- package/es/esf/components/magic-box/filters.d.ts +7 -0
- package/es/esf/components/magic-box/filters.js +7 -18
- package/es/esf/components/magic-box/index.d.ts +2 -0
- package/es/esf/components/magic-box/index.js +1 -1
- package/es/esf/components/magic-box/magic-box.d.ts +27 -0
- package/es/esf/components/magic-box/magic-box.jsx +142 -0
- package/es/esf/components/magic-box/messages.d.ts +1 -0
- package/es/esf/components/magic-box/messages.js +27 -26
- package/es/esf/components/magic-box/services/api.d.ts +18 -0
- package/es/esf/components/magic-box/services/api.js +39 -48
- package/es/esf/components/magic-box/services/widgets.d.ts +1 -0
- package/es/esf/components/magic-box/services/widgets.js +15 -3
- package/es/esf/components/parcours-esf/index.d.ts +2 -0
- package/es/esf/components/parcours-esf/index.js +1 -1
- package/es/esf/components/parcours-esf/parcours-esf.d.ts +14 -0
- package/es/esf/components/parcours-esf/parcours-esf.jsx +42 -0
- package/es/esf/components/period-picker/controls.d.ts +5 -0
- package/es/esf/components/period-picker/controls.js +22 -38
- package/es/esf/components/period-picker/date-display.d.ts +4 -0
- package/es/esf/components/period-picker/date-display.js +40 -59
- package/es/esf/components/period-picker/days.d.ts +3 -0
- package/es/esf/components/period-picker/days.js +68 -102
- package/es/esf/components/period-picker/extended-stay-picker.d.ts +12 -0
- package/es/esf/components/period-picker/extended-stay-picker.js +23 -48
- package/es/esf/components/period-picker/index.d.ts +2 -0
- package/es/esf/components/period-picker/index.js +1 -1
- package/es/esf/components/period-picker/messages.d.ts +1 -0
- package/es/esf/components/period-picker/messages.js +87 -87
- package/es/esf/components/period-picker/period-picker.d.ts +8 -0
- package/es/esf/components/period-picker/period-picker.js +125 -183
- package/es/esf/components/period-picker/popup.d.ts +7 -0
- package/es/esf/components/period-picker/popup.js +16 -33
- package/es/esf/components/period-picker/services/dates.d.ts +15 -0
- package/es/esf/components/period-picker/services/dates.js +70 -68
- package/es/esf/components/period-picker/services/events.d.ts +1 -0
- package/es/esf/components/period-picker/services/events.js +3 -6
- package/es/esf/components/period-picker/services/motions.d.ts +50 -0
- package/es/esf/components/period-picker/services/motions.js +8 -33
- package/es/esf/components/period-picker/services/sections.d.ts +2 -0
- package/es/esf/components/period-picker/services/sections.js +39 -31
- package/es/esf/components/period-picker/services/stay.d.ts +2 -0
- package/es/esf/components/period-picker/services/stay.js +20 -21
- package/es/esf/components/period-picker/title.d.ts +5 -0
- package/es/esf/components/period-picker/title.js +9 -22
- package/es/esf/components/period-picker/warning.d.ts +8 -0
- package/es/esf/components/period-picker/warning.js +24 -43
- package/es/esf/components/period-picker/weeks.d.ts +3 -0
- package/es/esf/components/period-picker/weeks.js +98 -137
- package/es/esf/components/reviews.d.ts +7 -0
- package/es/esf/components/reviews.js +27 -25
- package/es/esf/components/village-maps/icons.d.ts +6 -0
- package/es/esf/components/village-maps/icons.js +32 -38
- package/es/esf/components/village-maps/index.d.ts +8 -0
- package/es/esf/components/village-maps/index.js +100 -193
- package/es/esf/components/village-maps/messages.d.ts +2 -0
- package/es/esf/components/village-maps/messages.js +13 -13
- package/es/esf/components/village-maps/utils.d.ts +4 -0
- package/es/esf/components/village-maps/utils.js +20 -19
- package/es/esf/components/week-picker/index.d.ts +14 -0
- package/es/esf/components/week-picker/index.js +182 -222
- package/es/esf/components/week-picker/messages.d.ts +27 -0
- package/es/esf/components/week-picker/messages.js +31 -30
- package/es/esf/components/week-picker/utils.d.ts +5 -0
- package/es/esf/components/week-picker/utils.js +52 -47
- package/es/esf/components/week-picker/week.d.ts +10 -0
- package/es/esf/components/week-picker/week.js +31 -46
- package/es/esf/components/week-picker-2/index.d.ts +14 -0
- package/es/esf/components/week-picker-2/index.js +207 -259
- package/es/esf/components/week-picker-2/messages.d.ts +31 -0
- package/es/esf/components/week-picker-2/messages.js +29 -29
- package/es/esf/components/week-picker-2/utils.d.ts +5 -0
- package/es/esf/components/week-picker-2/utils.js +52 -47
- package/es/esf/components/week-picker-2/week.d.ts +10 -0
- package/es/esf/components/week-picker-2/week.js +32 -49
- package/es/esf/hooks/use-affiliation.d.ts +1 -0
- package/es/esf/hooks/use-affiliation.js +12 -16
- package/es/esf/hooks/use-booking-links.d.ts +1 -0
- package/es/esf/hooks/use-booking-links.js +52 -34
- package/es/esf/hooks/use-reviews.d.ts +2 -0
- package/es/esf/hooks/use-reviews.js +27 -22
- package/es/esf/hooks/use-season-products.d.ts +1 -0
- package/es/esf/hooks/use-season-products.js +83 -79
- package/es/future/components/msem/index.d.ts +3 -0
- package/es/future/components/msem/index.js +1 -1
- package/es/future/components/msem/script.d.ts +6 -0
- package/es/future/components/msem/script.jsx +7 -0
- package/es/future/components/msem/tunnel.d.ts +41 -0
- package/es/future/components/msem/tunnel.jsx +18 -0
- package/es/future/components/msem/types.d.ts +15 -0
- package/es/future/components/msem/types.js +1 -1
- package/es/future/components/msem/utils.d.ts +3 -0
- package/es/future/components/msem/utils.js +19 -20
- package/es/future/components/plausible/hooks/use-plausible.d.ts +11 -0
- package/es/future/components/plausible/hooks/use-plausible.js +18 -22
- package/es/future/components/plausible/index.d.ts +7 -0
- package/es/future/components/plausible/index.js +1 -1
- package/es/future/components/plausible/plausible.d.ts +7 -0
- package/es/future/components/plausible/plausible.jsx +17 -0
- package/es/future/components/plausible/services/callback.d.ts +23 -0
- package/es/future/components/plausible/services/callback.js +123 -186
- package/es/future/components/plausible/services/load.d.ts +1 -0
- package/es/future/components/plausible/services/load.js +6 -4
- package/es/future/components/plausible/services/send-goal.d.ts +6 -0
- package/es/future/components/plausible/services/send-goal.js +3 -6
- package/es/lbm/components/lumiplan/api.d.ts +8 -0
- package/es/lbm/components/lumiplan/api.js +60 -54
- package/es/lbm/components/lumiplan/domain.d.ts +7 -0
- package/es/lbm/components/lumiplan/domain.jsx +74 -0
- package/es/lbm/components/lumiplan/header.d.ts +8 -0
- package/es/lbm/components/lumiplan/header.jsx +25 -0
- package/es/lbm/components/lumiplan/i18n/translations.d.ts +7 -0
- package/es/lbm/components/lumiplan/i18n/translations.jsx +20 -0
- package/es/lbm/components/lumiplan/icons/alert.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/alert.js +6 -21
- package/es/lbm/components/lumiplan/icons/avalanche-risk.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/avalanche-risk.js +5 -14
- package/es/lbm/components/lumiplan/icons/cabin.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/cabin.js +5 -14
- package/es/lbm/components/lumiplan/icons/check.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/check.js +5 -16
- package/es/lbm/components/lumiplan/icons/close.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/close.js +6 -21
- package/es/lbm/components/lumiplan/icons/cloud.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/cloud.js +6 -20
- package/es/lbm/components/lumiplan/icons/dawn.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/dawn.js +6 -19
- package/es/lbm/components/lumiplan/icons/fog.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/fog.js +7 -23
- package/es/lbm/components/lumiplan/icons/heavy-snow.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/heavy-snow.js +10 -32
- package/es/lbm/components/lumiplan/icons/information.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/information.js +6 -21
- package/es/lbm/components/lumiplan/icons/isothermal.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/isothermal.js +10 -25
- package/es/lbm/components/lumiplan/icons/lifts/index.d.ts +5 -0
- package/es/lbm/components/lumiplan/icons/lifts/index.js +1 -1
- package/es/lbm/components/lumiplan/icons/lifts/tapis-roulant.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/lifts/tapis-roulant.js +5 -16
- package/es/lbm/components/lumiplan/icons/lifts/telecabine.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/lifts/telecabine.js +5 -16
- package/es/lbm/components/lumiplan/icons/lifts/telesiege-debrayable.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/lifts/telesiege-debrayable.js +8 -27
- package/es/lbm/components/lumiplan/icons/lifts/telesiege.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/lifts/telesiege.js +5 -16
- package/es/lbm/components/lumiplan/icons/lifts/teleski.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/lifts/teleski.js +5 -16
- package/es/lbm/components/lumiplan/icons/link.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/link.js +6 -17
- package/es/lbm/components/lumiplan/icons/night.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/night.js +5 -14
- package/es/lbm/components/lumiplan/icons/rain.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/rain.js +10 -24
- package/es/lbm/components/lumiplan/icons/rainy-rainy.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/rainy-rainy.js +6 -20
- package/es/lbm/components/lumiplan/icons/rainy.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/rainy.js +6 -20
- package/es/lbm/components/lumiplan/icons/reload.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/reload.js +13 -30
- package/es/lbm/components/lumiplan/icons/road-condition.d.ts +7 -0
- package/es/lbm/components/lumiplan/icons/road-condition.js +10 -28
- package/es/lbm/components/lumiplan/icons/slopes.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/slopes.js +5 -14
- package/es/lbm/components/lumiplan/icons/snow-cover.d.ts +7 -0
- package/es/lbm/components/lumiplan/icons/snow-cover.js +5 -16
- package/es/lbm/components/lumiplan/icons/snow.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/snow.js +8 -26
- package/es/lbm/components/lumiplan/icons/storm.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/storm.js +5 -15
- package/es/lbm/components/lumiplan/icons/sun.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/sun.js +5 -16
- package/es/lbm/components/lumiplan/icons/sunny.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/sunny.js +7 -23
- package/es/lbm/components/lumiplan/icons/time.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/time.js +6 -21
- package/es/lbm/components/lumiplan/icons/trails/accrobranche.d.ts +5 -0
- package/es/lbm/components/lumiplan/icons/trails/accrobranche.js +6 -17
- package/es/lbm/components/lumiplan/icons/trails/boarder-cross.d.ts +5 -0
- package/es/lbm/components/lumiplan/icons/trails/boarder-cross.js +7 -21
- package/es/lbm/components/lumiplan/icons/trails/champ-de-bosse.d.ts +5 -0
- package/es/lbm/components/lumiplan/icons/trails/champ-de-bosse.js +6 -19
- package/es/lbm/components/lumiplan/icons/trails/freeride.d.ts +5 -0
- package/es/lbm/components/lumiplan/icons/trails/freeride.js +5 -16
- package/es/lbm/components/lumiplan/icons/trails/index.d.ts +16 -0
- package/es/lbm/components/lumiplan/icons/trails/index.js +1 -1
- package/es/lbm/components/lumiplan/icons/trails/luge-sur-rail.d.ts +5 -0
- package/es/lbm/components/lumiplan/icons/trails/luge-sur-rail.js +6 -19
- package/es/lbm/components/lumiplan/icons/trails/luge.d.ts +5 -0
- package/es/lbm/components/lumiplan/icons/trails/luge.js +5 -16
- package/es/lbm/components/lumiplan/icons/trails/pieton.d.ts +5 -0
- package/es/lbm/components/lumiplan/icons/trails/pieton.js +5 -16
- package/es/lbm/components/lumiplan/icons/trails/piste-eclairee.d.ts +5 -0
- package/es/lbm/components/lumiplan/icons/trails/piste-eclairee.js +6 -19
- package/es/lbm/components/lumiplan/icons/trails/raquette.d.ts +5 -0
- package/es/lbm/components/lumiplan/icons/trails/raquette.js +17 -65
- package/es/lbm/components/lumiplan/icons/trails/ski-alpin.d.ts +5 -0
- package/es/lbm/components/lumiplan/icons/trails/ski-alpin.js +5 -16
- package/es/lbm/components/lumiplan/icons/trails/ski-fond.d.ts +5 -0
- package/es/lbm/components/lumiplan/icons/trails/ski-fond.js +5 -16
- package/es/lbm/components/lumiplan/icons/trails/snowpark.d.ts +5 -0
- package/es/lbm/components/lumiplan/icons/trails/snowpark.js +5 -16
- package/es/lbm/components/lumiplan/icons/trails/snowtubing.d.ts +5 -0
- package/es/lbm/components/lumiplan/icons/trails/snowtubing.js +7 -23
- package/es/lbm/components/lumiplan/icons/trails/tyrolienne.d.ts +5 -0
- package/es/lbm/components/lumiplan/icons/trails/tyrolienne.js +5 -16
- package/es/lbm/components/lumiplan/icons/trails/vtt.d.ts +5 -0
- package/es/lbm/components/lumiplan/icons/trails/vtt.js +6 -19
- package/es/lbm/components/lumiplan/icons/trails/zone-freeride.d.ts +5 -0
- package/es/lbm/components/lumiplan/icons/trails/zone-freeride.js +5 -16
- package/es/lbm/components/lumiplan/icons/variable-snow.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/variable-snow.js +9 -29
- package/es/lbm/components/lumiplan/icons/variable-storm.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/variable-storm.js +6 -22
- package/es/lbm/components/lumiplan/icons/variable.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/variable.js +6 -20
- package/es/lbm/components/lumiplan/icons/warning.d.ts +6 -0
- package/es/lbm/components/lumiplan/icons/warning.js +6 -21
- package/es/lbm/components/lumiplan/icons/wind.d.ts +7 -0
- package/es/lbm/components/lumiplan/icons/wind.js +13 -26
- package/es/lbm/components/lumiplan/index.d.ts +2 -0
- package/es/lbm/components/lumiplan/index.js +1 -1
- package/es/lbm/components/lumiplan/lumiplan.d.ts +2 -0
- package/es/lbm/components/lumiplan/lumiplan.jsx +179 -0
- package/es/lbm/components/lumiplan/opening.d.ts +8 -0
- package/es/lbm/components/lumiplan/opening.jsx +108 -0
- package/es/lbm/components/lumiplan/pois.d.ts +7 -0
- package/es/lbm/components/lumiplan/pois.jsx +233 -0
- package/es/lbm/components/lumiplan/print-button.d.ts +9 -0
- package/es/lbm/components/lumiplan/print-button.jsx +27 -0
- package/es/lbm/components/lumiplan/resort-selector.d.ts +12 -0
- package/es/lbm/components/lumiplan/resort-selector.jsx +47 -0
- package/es/lbm/components/lumiplan/road-condition.d.ts +7 -0
- package/es/lbm/components/lumiplan/road-condition.jsx +59 -0
- package/es/lbm/components/lumiplan/signature.d.ts +7 -0
- package/es/lbm/components/lumiplan/signature.jsx +12 -0
- package/es/lbm/components/lumiplan/todays-tips.d.ts +7 -0
- package/es/lbm/components/lumiplan/todays-tips.jsx +28 -0
- package/es/lbm/components/lumiplan/toolbar.d.ts +7 -0
- package/es/lbm/components/lumiplan/toolbar.jsx +15 -0
- package/es/lbm/components/lumiplan/types.d.ts +291 -0
- package/es/lbm/components/lumiplan/types.js +1 -1
- package/es/lbm/components/lumiplan/weather/avalanche-risk.d.ts +4 -0
- package/es/lbm/components/lumiplan/weather/avalanche-risk.jsx +22 -0
- package/es/lbm/components/lumiplan/weather/index.d.ts +2 -0
- package/es/lbm/components/lumiplan/weather/index.js +1 -1
- package/es/lbm/components/lumiplan/weather/snow-data.d.ts +8 -0
- package/es/lbm/components/lumiplan/weather/snow-data.jsx +44 -0
- package/es/lbm/components/lumiplan/weather/weather-data.d.ts +9 -0
- package/es/lbm/components/lumiplan/weather/weather-data.jsx +85 -0
- package/es/lbm/components/lumiplan/weather/weather-days.d.ts +7 -0
- package/es/lbm/components/lumiplan/weather/weather-days.jsx +60 -0
- package/es/lbm/components/lumiplan/weather/weather-icon.d.ts +68 -0
- package/es/lbm/components/lumiplan/weather/weather-icon.jsx +34 -0
- package/es/lbm/components/lumiplan/weather/weather-zones.d.ts +6 -0
- package/es/lbm/components/lumiplan/weather/weather-zones.jsx +56 -0
- package/es/lbm/components/lumiplan/weather/weather.d.ts +7 -0
- package/es/lbm/components/lumiplan/weather/weather.jsx +80 -0
- package/package.json +4 -13
- package/es/common/components/admin-links/admin-links.js +0 -102
- package/es/common/components/breadcrumb.js +0 -82
- package/es/common/components/collapsible/collapsible.js +0 -69
- package/es/common/components/cross-selling-editor/cross-selling-editor.js +0 -60
- package/es/common/components/cross-selling-editor/editor.js +0 -109
- package/es/common/components/cross-selling-editor/override-trigger-form.js +0 -166
- package/es/common/components/cross-selling-editor/override.js +0 -167
- package/es/common/components/cross-selling-editor/overrides-list.js +0 -131
- package/es/common/components/cross-selling-editor/rule.js +0 -105
- package/es/common/components/cross-selling-editor/rules.js +0 -86
- package/es/common/components/cross-selling-editor/tester-tunnel-offer.js +0 -65
- package/es/common/components/cross-selling-editor/tester.js +0 -197
- package/es/common/components/custom-contact-form/custom-contact-form.js +0 -164
- package/es/common/components/gesco-contact-form/gesco-contact-form.js +0 -262
- package/es/common/components/gesco-contact-form/phone-code-select.js +0 -81
- package/es/common/components/information/information.js +0 -58
- package/es/common/components/instant-search/input.js +0 -86
- package/es/common/components/instant-search/instant-search.js +0 -138
- package/es/common/components/instant-search/links.js +0 -81
- package/es/common/components/instant-search/no-product.js +0 -81
- package/es/common/components/instant-search/products.js +0 -129
- package/es/common/components/instant-search/results.js +0 -130
- package/es/common/components/msem-preset-editor/components/facet-selector.js +0 -40
- package/es/common/components/msem-preset-editor/components/form.js +0 -58
- package/es/common/components/msem-preset-editor/components/stay-picker.js +0 -74
- package/es/common/components/msem-preset-editor/components/widget-list-item.js +0 -137
- package/es/common/components/msem-preset-editor/components/widget-list.js +0 -59
- package/es/common/components/msem-preset-editor/editor-dialog.js +0 -74
- package/es/common/components/msem-preset-editor/editors/elloha.js +0 -113
- package/es/common/components/msem-preset-editor/editors/lodgings.js +0 -333
- package/es/common/components/msem-preset-editor/editors/ski-passes-jb.js +0 -130
- package/es/common/components/msem-preset-editor/editors/ski-passes.js +0 -285
- package/es/common/components/msem-preset-editor/editors/standard-products.js +0 -94
- package/es/common/components/msem-preset-editor/editors/vakario.js +0 -252
- package/es/common/components/msem-preset-editor/msem-preset-editor.js +0 -251
- package/es/common/components/msem-preset-linker/components/actions.js +0 -57
- package/es/common/components/msem-preset-linker/components/overlays.js +0 -68
- package/es/common/components/msem-preset-linker/components/resort-selector.js +0 -22
- package/es/common/components/msem-preset-linker/msem-preset-linker.js +0 -84
- package/es/common/components/plausible/plausible.js +0 -26
- package/es/common/components/scroll-spy.js +0 -59
- package/es/common/components/scrolling-carousel/scrolling-carousel.js +0 -105
- package/es/common/components/tabbed-zones.js +0 -103
- package/es/common/utils/msem-widget.js +0 -45
- package/es/esf/components/account-button/account-button.js +0 -40
- package/es/esf/components/magic-box/magic-box.js +0 -186
- package/es/esf/components/parcours-esf/parcours-esf.js +0 -52
- package/es/future/components/msem/script.js +0 -14
- package/es/future/components/msem/tunnel.js +0 -25
- package/es/future/components/plausible/plausible.js +0 -26
- package/es/lbm/components/lumiplan/domain.js +0 -118
- package/es/lbm/components/lumiplan/header.js +0 -39
- package/es/lbm/components/lumiplan/i18n/translations.js +0 -29
- package/es/lbm/components/lumiplan/lumiplan.js +0 -189
- package/es/lbm/components/lumiplan/opening.js +0 -147
- package/es/lbm/components/lumiplan/pois.js +0 -299
- package/es/lbm/components/lumiplan/print-button.js +0 -29
- package/es/lbm/components/lumiplan/resort-selector.js +0 -64
- package/es/lbm/components/lumiplan/road-condition.js +0 -108
- package/es/lbm/components/lumiplan/signature.js +0 -24
- package/es/lbm/components/lumiplan/todays-tips.js +0 -52
- package/es/lbm/components/lumiplan/toolbar.js +0 -31
- package/es/lbm/components/lumiplan/weather/avalanche-risk.js +0 -37
- package/es/lbm/components/lumiplan/weather/snow-data.js +0 -74
- package/es/lbm/components/lumiplan/weather/weather-data.js +0 -131
- package/es/lbm/components/lumiplan/weather/weather-days.js +0 -82
- package/es/lbm/components/lumiplan/weather/weather-icon.js +0 -37
- package/es/lbm/components/lumiplan/weather/weather-zones.js +0 -77
- package/es/lbm/components/lumiplan/weather/weather.js +0 -139
|
@@ -1,107 +1,103 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
1
10
|
import * as React from "react";
|
|
2
11
|
import { memo, useEffect, useState, useRef } from "react";
|
|
3
12
|
import { useUbloContext } from "ublo/with-ublo";
|
|
4
13
|
import Popup from "./popup";
|
|
5
14
|
import Levels from "../../esf/components/levels";
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
15
|
const SLASH = "/";
|
|
9
16
|
const modules = {
|
|
10
|
-
|
|
17
|
+
Levels,
|
|
11
18
|
};
|
|
12
|
-
const isLocalUrl = href => href !== null &&
|
|
19
|
+
const isLocalUrl = (href) => href !== null &&
|
|
20
|
+
href !== undefined &&
|
|
21
|
+
href.length > 2 &&
|
|
22
|
+
href[0] === SLASH &&
|
|
23
|
+
href[1] !== SLASH;
|
|
13
24
|
const pdfRegex = /.*\.pdf$/;
|
|
14
|
-
const isPdfUrl = href => href !== null && href !== undefined && pdfRegex.exec(href) !== null;
|
|
15
|
-
const hasUrlTarget = target => target === "_blank";
|
|
16
|
-
const handleClick =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
e.preventDefault();
|
|
29
|
-
e.stopPropagation();
|
|
30
|
-
if (module !== undefined) {
|
|
31
|
-
const Module = modules[module];
|
|
32
|
-
const menu = href === "" || href === null || href === undefined ? undefined : href;
|
|
33
|
-
setContent();
|
|
34
|
-
setModule(_jsx(Module, {
|
|
35
|
-
menu: menu
|
|
36
|
-
}));
|
|
37
|
-
setClosed(false);
|
|
38
|
-
} else {
|
|
39
|
-
const {
|
|
40
|
-
ubloApi,
|
|
41
|
-
site
|
|
42
|
-
} = config;
|
|
43
|
-
const url = `${ubloApi}/api/zone?site=${site}&lang=${lang}&path=${href}&id=${zone}`;
|
|
44
|
-
const req = await fetch(url);
|
|
45
|
-
const data = await req.text();
|
|
46
|
-
setModule();
|
|
47
|
-
setContent(data);
|
|
48
|
-
setClosed(false);
|
|
49
|
-
}
|
|
50
|
-
setPopupClassName(className);
|
|
51
|
-
};
|
|
52
|
-
const InfoButtons = ({
|
|
53
|
-
zone = "contenu",
|
|
54
|
-
selector = ".tool-button",
|
|
55
|
-
children
|
|
56
|
-
}) => {
|
|
57
|
-
const ref = useRef();
|
|
58
|
-
const {
|
|
59
|
-
cmsMode,
|
|
60
|
-
config,
|
|
61
|
-
lang
|
|
62
|
-
} = useUbloContext();
|
|
63
|
-
const [count, setCount] = useState(0);
|
|
64
|
-
const [content, setContent] = useState("");
|
|
65
|
-
const [module, setModule] = useState();
|
|
66
|
-
const [closed, setClosed] = useState(true);
|
|
67
|
-
const [popupClassName, setPopupClassName] = useState();
|
|
68
|
-
const close = () => {
|
|
69
|
-
setClosed(true);
|
|
70
|
-
};
|
|
71
|
-
useEffect(() => {
|
|
72
|
-
if (window.location.hostname === "localhost") {
|
|
73
|
-
console.warn("InfoButtons is deprecated, prefer useInfoButtons");
|
|
25
|
+
const isPdfUrl = (href) => href !== null && href !== undefined && pdfRegex.exec(href) !== null;
|
|
26
|
+
const hasUrlTarget = (target) => target === "_blank";
|
|
27
|
+
const handleClick = (config, lang, section, zone, setContent, setModule, setClosed, e, setPopupClassName) => __awaiter(void 0, void 0, void 0, function* () {
|
|
28
|
+
const anchor = section.querySelector("a");
|
|
29
|
+
const href = anchor.getAttribute("href");
|
|
30
|
+
const target = anchor.getAttribute("target");
|
|
31
|
+
// eslint-disable-next-line @next/next/no-assign-module-variable
|
|
32
|
+
const module = anchor.dataset.module;
|
|
33
|
+
const isLocal = isLocalUrl(href);
|
|
34
|
+
const isPdf = isPdfUrl(href);
|
|
35
|
+
const hasTarget = hasUrlTarget(target);
|
|
36
|
+
const className = section.getAttribute("data-class");
|
|
37
|
+
if (!isLocal || isPdf || (module === undefined && !hasTarget)) {
|
|
38
|
+
return;
|
|
74
39
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
if (cmsMode !== "editing") {
|
|
84
|
-
Array.prototype.forEach.call(sections, section => {
|
|
85
|
-
section.clicked = clicked(section);
|
|
86
|
-
section.addEventListener("click", section.clicked);
|
|
87
|
-
});
|
|
88
|
-
return () => {
|
|
89
|
-
Array.prototype.forEach.call(sections, section => {
|
|
90
|
-
section.removeEventListener("click", section.clicked);
|
|
91
|
-
});
|
|
92
|
-
};
|
|
40
|
+
e.preventDefault();
|
|
41
|
+
e.stopPropagation();
|
|
42
|
+
if (module !== undefined) {
|
|
43
|
+
const Module = modules[module];
|
|
44
|
+
const menu = href === "" || href === null || href === undefined ? undefined : href;
|
|
45
|
+
setContent();
|
|
46
|
+
setModule(<Module menu={menu}/>);
|
|
47
|
+
setClosed(false);
|
|
93
48
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
49
|
+
else {
|
|
50
|
+
const { ubloApi, site } = config;
|
|
51
|
+
const url = `${ubloApi}/api/zone?site=${site}&lang=${lang}&path=${href}&id=${zone}`;
|
|
52
|
+
const req = yield fetch(url);
|
|
53
|
+
const data = yield req.text();
|
|
54
|
+
setModule();
|
|
55
|
+
setContent(data);
|
|
56
|
+
setClosed(false);
|
|
57
|
+
}
|
|
58
|
+
setPopupClassName(className);
|
|
59
|
+
});
|
|
60
|
+
const InfoButtons = ({ zone = "contenu", selector = ".tool-button", children, }) => {
|
|
61
|
+
const ref = useRef();
|
|
62
|
+
const { cmsMode, config, lang } = useUbloContext();
|
|
63
|
+
const [count, setCount] = useState(0);
|
|
64
|
+
const [content, setContent] = useState("");
|
|
65
|
+
const [module, setModule] = useState();
|
|
66
|
+
const [closed, setClosed] = useState(true);
|
|
67
|
+
const [popupClassName, setPopupClassName] = useState();
|
|
68
|
+
const close = () => {
|
|
69
|
+
setClosed(true);
|
|
70
|
+
};
|
|
71
|
+
useEffect(() => {
|
|
72
|
+
if (window.location.hostname === "localhost") {
|
|
73
|
+
// eslint-disable-next-line no-console
|
|
74
|
+
console.warn("InfoButtons is deprecated, prefer useInfoButtons");
|
|
75
|
+
}
|
|
76
|
+
}, []);
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
const infos = ref.current;
|
|
79
|
+
const sections = infos.querySelectorAll(`section${selector}`);
|
|
80
|
+
setCount(sections.length);
|
|
81
|
+
const clicked = (section) => (e) => {
|
|
82
|
+
handleClick(config, lang, section, zone, setContent, setModule, setClosed, e, setPopupClassName);
|
|
83
|
+
};
|
|
84
|
+
if (cmsMode !== "editing") {
|
|
85
|
+
Array.prototype.forEach.call(sections, (section) => {
|
|
86
|
+
section.clicked = clicked(section);
|
|
87
|
+
section.addEventListener("click", section.clicked);
|
|
88
|
+
});
|
|
89
|
+
return () => {
|
|
90
|
+
Array.prototype.forEach.call(sections, (section) => {
|
|
91
|
+
section.removeEventListener("click", section.clicked);
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
}, [count, cmsMode, config, lang, zone, selector]);
|
|
96
|
+
return (<div className="info-buttons" ref={ref}>
|
|
97
|
+
{children}
|
|
98
|
+
{!closed && (<Popup close={close} html={content} className={popupClassName} backdrop>
|
|
99
|
+
{module}
|
|
100
|
+
</Popup>)}
|
|
101
|
+
</div>);
|
|
106
102
|
};
|
|
107
|
-
export default memo(InfoButtons);
|
|
103
|
+
export default memo(InfoButtons);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import Information from "./information";
|
|
2
|
-
export default Information;
|
|
2
|
+
export default Information;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import * as React from "react";
|
|
11
|
+
import Router from "next/router";
|
|
12
|
+
import { useUbloContext } from "ublo/with-ublo";
|
|
13
|
+
import { fetchZone, fetchMenus } from "ublo/fetcher";
|
|
14
|
+
import Dialog from "dt-design-system/es/dialog";
|
|
15
|
+
import styles from "./information.module.css";
|
|
16
|
+
const STORAGE_KEY = "information_viewed";
|
|
17
|
+
export default function Information({ source = "/popup", zone = "content", preventOpening, }) {
|
|
18
|
+
const [content, setContent] = React.useState();
|
|
19
|
+
const { config, lang } = useUbloContext();
|
|
20
|
+
const { ubloApi, site } = config;
|
|
21
|
+
const close = React.useCallback(() => {
|
|
22
|
+
sessionStorage.setItem(STORAGE_KEY, "true");
|
|
23
|
+
setContent(undefined);
|
|
24
|
+
}, []);
|
|
25
|
+
const getContent = React.useCallback(() => __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
const menus = yield fetchMenus(ubloApi, site, lang, source, 1, true);
|
|
27
|
+
if (menus.length === 1) {
|
|
28
|
+
const content = yield fetchZone(ubloApi, site, lang, source, zone);
|
|
29
|
+
if (!content)
|
|
30
|
+
return;
|
|
31
|
+
setContent(content);
|
|
32
|
+
}
|
|
33
|
+
}), [lang, site, source, ubloApi, zone]);
|
|
34
|
+
React.useEffect(() => {
|
|
35
|
+
const alreadySeen = sessionStorage.getItem(STORAGE_KEY) ||
|
|
36
|
+
sessionStorage.getItem("cms_token");
|
|
37
|
+
if (!preventOpening && !alreadySeen) {
|
|
38
|
+
getContent();
|
|
39
|
+
}
|
|
40
|
+
}, [getContent, preventOpening]);
|
|
41
|
+
Router.ready(() => {
|
|
42
|
+
Router.events.on("routeChangeComplete", () => {
|
|
43
|
+
close();
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
return (<Dialog className={styles.information} close={close} isOpened={!!content}>
|
|
47
|
+
<div className={styles.inner} dangerouslySetInnerHTML={{ __html: content }} data-information-popup=""/>
|
|
48
|
+
</Dialog>);
|
|
49
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useConstant(fn: any): any;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
export default function useConstant(fn) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return ref.current.v;
|
|
10
|
-
}
|
|
3
|
+
const ref = React.useRef();
|
|
4
|
+
if (!ref.current) {
|
|
5
|
+
ref.current = { v: fn() };
|
|
6
|
+
}
|
|
7
|
+
return ref.current.v;
|
|
8
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export default function useDebouncedSearch(searchFunction: (text: string) => Promise<any>): {
|
|
3
|
+
text: string;
|
|
4
|
+
setText: React.Dispatch<React.SetStateAction<string>>;
|
|
5
|
+
search: import("react-async-hook").UseAsyncReturn<any, any[]>;
|
|
6
|
+
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
1
10
|
import * as React from "react";
|
|
2
11
|
import debouncePromise from "awesome-debounce-promise";
|
|
3
12
|
import { useAsync } from "react-async-hook";
|
|
4
13
|
import useConstant from "./use-constant";
|
|
5
14
|
const DEBOUNCE_AMOUNT = 400;
|
|
6
15
|
export default function useDebouncedSearch(searchFunction) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
loading: true
|
|
13
|
-
})
|
|
14
|
-
});
|
|
15
|
-
return {
|
|
16
|
-
text,
|
|
17
|
-
setText,
|
|
18
|
-
search
|
|
19
|
-
};
|
|
20
|
-
}
|
|
16
|
+
const [text, setText] = React.useState("");
|
|
17
|
+
const debouncedSearchFunction = useConstant(() => debouncePromise(searchFunction, DEBOUNCE_AMOUNT));
|
|
18
|
+
const search = useAsync(() => __awaiter(this, void 0, void 0, function* () { return (text.length === 0 ? undefined : debouncedSearchFunction(text)); }), [debouncedSearchFunction, text], { setLoading: (state) => (Object.assign(Object.assign({}, state), { loading: true })) });
|
|
19
|
+
return { text, setText, search };
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type SearchOptions = {
|
|
3
|
+
groupLimit?: number;
|
|
4
|
+
page?: number;
|
|
5
|
+
perPage?: number;
|
|
6
|
+
queryBy?: string;
|
|
7
|
+
queryByWeights?: string;
|
|
8
|
+
filterBy?: string;
|
|
9
|
+
sortBy?: string;
|
|
10
|
+
};
|
|
11
|
+
export default function useSearch(lang: string, options?: SearchOptions): {
|
|
12
|
+
text: string;
|
|
13
|
+
setText: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
14
|
+
search: import("react-async-hook").UseAsyncReturn<any, any[]>;
|
|
15
|
+
};
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
1
10
|
import getConfig from "next/config";
|
|
2
11
|
import useDebouncedSearch from "./use-debounced-search";
|
|
3
12
|
import * as API from "../services/api";
|
|
4
|
-
const {
|
|
5
|
-
|
|
6
|
-
} = getConfig();
|
|
7
|
-
const {
|
|
8
|
-
site
|
|
9
|
-
} = publicRuntimeConfig;
|
|
13
|
+
const { publicRuntimeConfig } = getConfig();
|
|
14
|
+
const { site } = publicRuntimeConfig;
|
|
10
15
|
export default function useSearch(lang, options = {}) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
16
|
+
return useDebouncedSearch((query) => __awaiter(this, void 0, void 0, function* () {
|
|
17
|
+
return API.fetchResults(site, lang, query, options.groupLimit, options.queryBy, options.queryByWeights);
|
|
18
|
+
}));
|
|
19
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import InstantSearch from "./instant-search";
|
|
2
|
-
export default InstantSearch;
|
|
2
|
+
export default InstantSearch;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type Suggestions = {
|
|
3
|
+
fr?: string[];
|
|
4
|
+
en?: string[];
|
|
5
|
+
};
|
|
6
|
+
type Props = {
|
|
7
|
+
lang: string;
|
|
8
|
+
text: string;
|
|
9
|
+
setText: (value: string) => void;
|
|
10
|
+
loading: boolean;
|
|
11
|
+
closeSearch: () => void;
|
|
12
|
+
suggestions?: Suggestions;
|
|
13
|
+
};
|
|
14
|
+
export default function SearchInput({ lang, text, setText, closeSearch, loading, suggestions, }: Props): React.JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import Input from "dt-design-system/es/input";
|
|
4
|
+
import Button from "dt-design-system/es/button";
|
|
5
|
+
import * as Icons from "dt-design-system/es/icons";
|
|
6
|
+
import * as Ripple from "dt-design-system/es/ripple";
|
|
7
|
+
import message from "./services/messages";
|
|
8
|
+
import css from "./input.module.css";
|
|
9
|
+
const TRANSITION_DURATION = 1800;
|
|
10
|
+
export default function SearchInput({ lang, text, setText, closeSearch, loading, suggestions, }) {
|
|
11
|
+
const [currentSuggestion, setCurrentSuggestion] = React.useState(0);
|
|
12
|
+
const updateText = (value) => () => {
|
|
13
|
+
setText(value);
|
|
14
|
+
};
|
|
15
|
+
const classes = classNames(css.input, {
|
|
16
|
+
[css.inputLoading]: loading,
|
|
17
|
+
});
|
|
18
|
+
const inputIcon = loading ? "Loader2" : "Search";
|
|
19
|
+
const suggestionsSet = getSuggestions(suggestions)[lang];
|
|
20
|
+
const enableSuggestion = Boolean(suggestionsSet);
|
|
21
|
+
const createRipple = (e) => {
|
|
22
|
+
Ripple.create(e);
|
|
23
|
+
};
|
|
24
|
+
React.useEffect(() => {
|
|
25
|
+
if (enableSuggestion && !text) {
|
|
26
|
+
const interval = setInterval(() => {
|
|
27
|
+
setCurrentSuggestion((current) => {
|
|
28
|
+
const nextSuggestion = current >= suggestionsSet.length - 1 ? 0 : current + 1;
|
|
29
|
+
return nextSuggestion;
|
|
30
|
+
});
|
|
31
|
+
}, TRANSITION_DURATION);
|
|
32
|
+
return () => {
|
|
33
|
+
clearInterval(interval);
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}, [enableSuggestion, suggestionsSet, text]);
|
|
37
|
+
return (<div className={css.container}>
|
|
38
|
+
<Input value={text} onValueChange={setText} icon={inputIcon} className={classes}/>
|
|
39
|
+
{enableSuggestion && !text && (<div className={css.suggestion}>
|
|
40
|
+
{message(lang, "try")}
|
|
41
|
+
<div className={css.buttons}>
|
|
42
|
+
{suggestionsSet.map((suggestion, i) => {
|
|
43
|
+
const isCurrent = i === currentSuggestion;
|
|
44
|
+
const isPrev = currentSuggestion === 0
|
|
45
|
+
? i === suggestionsSet.length - 1
|
|
46
|
+
: i === currentSuggestion - 1;
|
|
47
|
+
const classes = classNames(css.button, {
|
|
48
|
+
[css.buttonCurrent]: isCurrent,
|
|
49
|
+
[css.buttonPrev]: isPrev,
|
|
50
|
+
});
|
|
51
|
+
return (<button key={suggestion} className={classes} onClick={updateText(suggestion)} onMouseDown={createRipple}>
|
|
52
|
+
« {suggestion} »
|
|
53
|
+
</button>);
|
|
54
|
+
})}
|
|
55
|
+
</div>
|
|
56
|
+
</div>)}
|
|
57
|
+
<Button variant="transparent" className={css.close} onClick={closeSearch}>
|
|
58
|
+
<Icons.Cross />
|
|
59
|
+
</Button>
|
|
60
|
+
</div>);
|
|
61
|
+
}
|
|
62
|
+
function getSuggestions(suggestions = {}) {
|
|
63
|
+
return Object.assign({ fr: ["cours de ski", "cours privés", "compétition", "cours débutants"], en: ["ski lessons", "private lessons", "competition"] }, suggestions);
|
|
64
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { SearchOptions } from "./hooks/use-search";
|
|
3
|
+
type Props = {
|
|
4
|
+
lang: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
ubloContext: {
|
|
7
|
+
lang: string;
|
|
8
|
+
cmsMode: "connected" | "editing" | "info";
|
|
9
|
+
metadata: Record<string, string>;
|
|
10
|
+
path: string;
|
|
11
|
+
};
|
|
12
|
+
suggestions?: {
|
|
13
|
+
fr?: string[];
|
|
14
|
+
en?: string[];
|
|
15
|
+
};
|
|
16
|
+
options?: SearchOptions;
|
|
17
|
+
};
|
|
18
|
+
export default function InstantSearch({ lang, suggestions, className, ubloContext, options, }: Props): React.JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import Router from "next/router";
|
|
4
|
+
import Button from "dt-design-system/es/button";
|
|
5
|
+
import * as Icons from "dt-design-system/es/icons";
|
|
6
|
+
import Dialog from "dt-design-system/es/dialog";
|
|
7
|
+
// import PeriodPicker from "ublo-lib/es/esf/components/period-picker";
|
|
8
|
+
import PeriodPicker from "../../../esf/components/period-picker";
|
|
9
|
+
import Input from "./input";
|
|
10
|
+
import Results from "./results";
|
|
11
|
+
import useSearch from "./hooks/use-search";
|
|
12
|
+
// import * as Plausible from "ublo-lib/es/common/components/plausible";
|
|
13
|
+
import * as Plausible from "../plausible";
|
|
14
|
+
import css from "./instant-search.module.css";
|
|
15
|
+
export default function InstantSearch({ lang, suggestions, className, ubloContext, options = {}, }) {
|
|
16
|
+
const [opened, setOpened] = React.useState(false);
|
|
17
|
+
const [periodPickerOpened, setPeriodPickerOpened] = React.useState(false);
|
|
18
|
+
const [weekNumber, setWeekNumber] = React.useState(null);
|
|
19
|
+
const { text, setText, search } = useSearch(lang, options);
|
|
20
|
+
const classes = classNames(css.search, className);
|
|
21
|
+
const openSearch = () => {
|
|
22
|
+
setOpened(true);
|
|
23
|
+
};
|
|
24
|
+
const closeSearch = (skipEvent) => {
|
|
25
|
+
var _a;
|
|
26
|
+
setOpened(false);
|
|
27
|
+
setText("");
|
|
28
|
+
document.body.style.removeProperty("overflow");
|
|
29
|
+
if (!skipEvent) {
|
|
30
|
+
const event = ((_a = search === null || search === void 0 ? void 0 : search.result) === null || _a === void 0 ? void 0 : _a.length) === 0 ? "Search failed" : "Search canceled";
|
|
31
|
+
if (text.length > 0) {
|
|
32
|
+
Plausible.sendGoal(event, {
|
|
33
|
+
Terms: text,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const sendPlausibleGoal = (path) => () => {
|
|
39
|
+
Plausible.sendGoal("Search", {
|
|
40
|
+
"Terms - Destination": `${text} - ${path}`,
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
const openPeriodPicker = () => {
|
|
44
|
+
setPeriodPickerOpened(true);
|
|
45
|
+
};
|
|
46
|
+
const closePeriodPicker = () => {
|
|
47
|
+
setPeriodPickerOpened(false);
|
|
48
|
+
};
|
|
49
|
+
const updateWeek = () => {
|
|
50
|
+
const storedWeekNumber = window.sessionStorage.getItem("stayWeek");
|
|
51
|
+
if (storedWeekNumber !== null) {
|
|
52
|
+
setWeekNumber(Number(storedWeekNumber));
|
|
53
|
+
setPeriodPickerOpened(false);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
Router.ready(() => {
|
|
57
|
+
Router.events.on("routeChangeStart", () => {
|
|
58
|
+
if (opened) {
|
|
59
|
+
closeSearch(true);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
const handleKeyPresses = React.useCallback((e) => {
|
|
64
|
+
const allowedKeys = ["k"];
|
|
65
|
+
const { code, ctrlKey, key, metaKey } = e;
|
|
66
|
+
const isAllowed = (ctrlKey || metaKey) &&
|
|
67
|
+
(allowedKeys.includes(code) || allowedKeys.includes(key));
|
|
68
|
+
if (!isAllowed)
|
|
69
|
+
return;
|
|
70
|
+
e.preventDefault();
|
|
71
|
+
if (key === "k" && (ctrlKey || metaKey)) {
|
|
72
|
+
openSearch();
|
|
73
|
+
}
|
|
74
|
+
}, []);
|
|
75
|
+
React.useEffect(() => {
|
|
76
|
+
if (opened) {
|
|
77
|
+
updateWeek();
|
|
78
|
+
}
|
|
79
|
+
}, [opened]);
|
|
80
|
+
React.useEffect(() => {
|
|
81
|
+
window.addEventListener("keydown", handleKeyPresses);
|
|
82
|
+
return () => {
|
|
83
|
+
window.removeEventListener("keydown", handleKeyPresses);
|
|
84
|
+
};
|
|
85
|
+
}, [handleKeyPresses]);
|
|
86
|
+
return (<>
|
|
87
|
+
<Button className={classes} onClick={openSearch}>
|
|
88
|
+
<Icons.Search className={css.searchIcon}/>
|
|
89
|
+
</Button>
|
|
90
|
+
<Dialog className={css.dialog} isOpened={opened} showCloseButton={false} close={closeSearch} container="body">
|
|
91
|
+
<Input lang={lang} text={text} setText={setText} closeSearch={closeSearch} loading={search.loading === true} suggestions={suggestions}/>
|
|
92
|
+
<Results lang={lang} text={text} results={search.result} weekNumber={weekNumber} openPeriodPicker={openPeriodPicker} loading={search.loading === true && search.result === undefined} sendPlausibleGoal={sendPlausibleGoal}/>
|
|
93
|
+
</Dialog>
|
|
94
|
+
<Dialog isOpened={periodPickerOpened} close={closePeriodPicker} container="body">
|
|
95
|
+
<PeriodPicker onChange={updateWeek} ubloContext={ubloContext}/>
|
|
96
|
+
</Dialog>
|
|
97
|
+
</>);
|
|
98
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { Hit } from "./results";
|
|
3
|
+
type Props = {
|
|
4
|
+
linksTitle: string;
|
|
5
|
+
icon: "FileText" | "Info" | "Question" | "User";
|
|
6
|
+
links: Hit[];
|
|
7
|
+
pageTitleAsTitle?: boolean;
|
|
8
|
+
loading: boolean;
|
|
9
|
+
sendPlausibleGoal: (path: string) => void;
|
|
10
|
+
};
|
|
11
|
+
export default function Links({ icon, linksTitle, links, pageTitleAsTitle, loading, sendPlausibleGoal, }: Props): React.JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import Link from "ublo/link";
|
|
3
|
+
import Loader from "dt-design-system/es/loader";
|
|
4
|
+
import * as Icons from "dt-design-system/es/icons";
|
|
5
|
+
import * as Ripple from "dt-design-system/es/ripple";
|
|
6
|
+
import * as Utils from "./services/utils";
|
|
7
|
+
import css from "./links.module.css";
|
|
8
|
+
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 (<div className={css.linksSection}>
|
|
18
|
+
<div className={css.linksTitle}>{linksTitle}</div>
|
|
19
|
+
<div className={css.links}>
|
|
20
|
+
{loading &&
|
|
21
|
+
PLACEHOLDERS.map((_, i) => {
|
|
22
|
+
return (<div key={i} className={css.loaderContainer}>
|
|
23
|
+
<Loader className={css.loader} variant="overlay"/>
|
|
24
|
+
</div>);
|
|
25
|
+
})}
|
|
26
|
+
{!loading &&
|
|
27
|
+
links.map((link) => {
|
|
28
|
+
const { id, text, parentTitle, path } = link.document;
|
|
29
|
+
const decodedPath = decodeURIComponent(path);
|
|
30
|
+
const titleProperty = pageTitleAsTitle ? "pageTitle" : "title";
|
|
31
|
+
const linkTitle = Utils.getHighlight(titleProperty, link.highlight) ||
|
|
32
|
+
link.document[titleProperty];
|
|
33
|
+
const linkText = Utils.getHighlight("text", link.highlight, true) || text;
|
|
34
|
+
return (<Link key={id} href={decodedPath} className={css.link} onClick={sendPlausibleGoal(decodedPath)} onMouseDown={createRipple}>
|
|
35
|
+
<Icon className={css.linkIcon}/>
|
|
36
|
+
<div className={css.linkContent}>
|
|
37
|
+
{parentTitle && (<div className={css.linkParent} dangerouslySetInnerHTML={{ __html: parentTitle }}/>)}
|
|
38
|
+
<div className={css.linkTitle} dangerouslySetInnerHTML={{ __html: linkTitle }}/>
|
|
39
|
+
{linkText && (<div className={css.linkText} dangerouslySetInnerHTML={{ __html: linkText }}/>)}
|
|
40
|
+
</div>
|
|
41
|
+
</Link>);
|
|
42
|
+
})}
|
|
43
|
+
</div>
|
|
44
|
+
</div>);
|
|
45
|
+
}
|