@qite/tide-booking-component 1.4.32 → 1.4.33
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/build/build-cjs/booking-product/components/age-select.d.ts +8 -8
- package/build/build-cjs/booking-product/components/amount-input.d.ts +10 -10
- package/build/build-cjs/booking-product/components/date-range-picker/calendar-day.d.ts +12 -12
- package/build/build-cjs/booking-product/components/date-range-picker/calendar.d.ts +19 -19
- package/build/build-cjs/booking-product/components/date-range-picker/index.d.ts +24 -21
- package/build/build-cjs/booking-product/components/dates.d.ts +14 -14
- package/build/build-cjs/booking-product/components/footer.d.ts +10 -10
- package/build/build-cjs/booking-product/components/header.d.ts +11 -11
- package/build/build-cjs/booking-product/components/icon.d.ts +10 -10
- package/build/build-cjs/booking-product/components/list-view.d.ts +8 -8
- package/build/build-cjs/booking-product/components/product.d.ts +9 -9
- package/build/build-cjs/booking-product/components/rating.d.ts +6 -6
- package/build/build-cjs/booking-product/components/rooms.d.ts +10 -10
- package/build/build-cjs/booking-product/constants.d.ts +1 -1
- package/build/build-cjs/booking-product/index.d.ts +10 -10
- package/build/build-cjs/booking-product/settings-context.d.ts +6 -5
- package/build/build-cjs/booking-product/types.d.ts +27 -27
- package/build/build-cjs/booking-product/utils/api.d.ts +7 -16
- package/build/build-cjs/booking-product/utils/price.d.ts +1 -10
- package/build/build-cjs/booking-wizard/api-settings-slice.d.ts +4 -5
- package/build/build-cjs/booking-wizard/components/icon.d.ts +10 -10
- package/build/build-cjs/booking-wizard/components/labeled-input.d.ts +18 -18
- package/build/build-cjs/booking-wizard/components/labeled-select.d.ts +21 -21
- package/build/build-cjs/booking-wizard/components/message.d.ts +9 -9
- package/build/build-cjs/booking-wizard/components/multi-range-filter.d.ts +11 -11
- package/build/build-cjs/booking-wizard/components/phone-input.d.ts +17 -17
- package/build/build-cjs/booking-wizard/components/print-offer-button.d.ts +17 -17
- package/build/build-cjs/booking-wizard/components/product-card.d.ts +8 -8
- package/build/build-cjs/booking-wizard/components/step-indicator.d.ts +6 -6
- package/build/build-cjs/booking-wizard/components/step-route.d.ts +9 -9
- package/build/build-cjs/booking-wizard/features/booking/api.d.ts +10 -26
- package/build/build-cjs/booking-wizard/features/booking/booking-self-contained.d.ts +8 -8
- package/build/build-cjs/booking-wizard/features/booking/booking-slice.d.ts +50 -103
- package/build/build-cjs/booking-wizard/features/booking/booking.d.ts +8 -8
- package/build/build-cjs/booking-wizard/features/booking/constants.d.ts +8 -15
- package/build/build-cjs/booking-wizard/features/booking/selectors.d.ts +195 -283
- package/build/build-cjs/booking-wizard/features/confirmation/confirmation.d.ts +5 -4
- package/build/build-cjs/booking-wizard/features/error/error.d.ts +5 -4
- package/build/build-cjs/booking-wizard/features/flight-options/flight-filter.d.ts +9 -9
- package/build/build-cjs/booking-wizard/features/flight-options/flight-option-flight.d.ts +8 -8
- package/build/build-cjs/booking-wizard/features/flight-options/flight-option-modal.d.ts +3 -3
- package/build/build-cjs/booking-wizard/features/flight-options/flight-option.d.ts +10 -10
- package/build/build-cjs/booking-wizard/features/flight-options/flight-utils.d.ts +6 -13
- package/build/build-cjs/booking-wizard/features/flight-options/index.d.ts +5 -4
- package/build/build-cjs/booking-wizard/features/price-details/price-details-api.d.ts +6 -11
- package/build/build-cjs/booking-wizard/features/price-details/price-details-slice.d.ts +80 -105
- package/build/build-cjs/booking-wizard/features/price-details/util.d.ts +2 -2
- package/build/build-cjs/booking-wizard/features/product-options/no-options.d.ts +3 -3
- package/build/build-cjs/booking-wizard/features/product-options/none-option.d.ts +9 -9
- package/build/build-cjs/booking-wizard/features/product-options/option-booking-airline-group.d.ts +8 -8
- package/build/build-cjs/booking-wizard/features/product-options/option-booking-group.d.ts +12 -12
- package/build/build-cjs/booking-wizard/features/product-options/option-item.d.ts +11 -11
- package/build/build-cjs/booking-wizard/features/product-options/option-pax-card.d.ts +10 -10
- package/build/build-cjs/booking-wizard/features/product-options/option-pax-group.d.ts +13 -13
- package/build/build-cjs/booking-wizard/features/product-options/option-room.d.ts +11 -11
- package/build/build-cjs/booking-wizard/features/product-options/option-unit-group.d.ts +13 -13
- package/build/build-cjs/booking-wizard/features/product-options/option-units-card.d.ts +9 -9
- package/build/build-cjs/booking-wizard/features/product-options/options-form.d.ts +5 -4
- package/build/build-cjs/booking-wizard/features/room-options/index.d.ts +5 -4
- package/build/build-cjs/booking-wizard/features/room-options/room-utils.d.ts +9 -22
- package/build/build-cjs/booking-wizard/features/room-options/room.d.ts +12 -12
- package/build/build-cjs/booking-wizard/features/room-options/traveler-rooms.d.ts +9 -9
- package/build/build-cjs/booking-wizard/features/sidebar/index.d.ts +7 -7
- package/build/build-cjs/booking-wizard/features/sidebar/sidebar-flight.d.ts +8 -8
- package/build/build-cjs/booking-wizard/features/sidebar/sidebar-util.d.ts +12 -14
- package/build/build-cjs/booking-wizard/features/sidebar/sidebar.d.ts +27 -27
- package/build/build-cjs/booking-wizard/features/summary/summary-booking-option-pax.d.ts +7 -7
- package/build/build-cjs/booking-wizard/features/summary/summary-booking-option-unit.d.ts +7 -7
- package/build/build-cjs/booking-wizard/features/summary/summary-flight.d.ts +8 -8
- package/build/build-cjs/booking-wizard/features/summary/summary-per-booking-option-group.d.ts +7 -7
- package/build/build-cjs/booking-wizard/features/summary/summary-per-pax-option-group.d.ts +7 -7
- package/build/build-cjs/booking-wizard/features/summary/summary-per-unit-option-group.d.ts +7 -7
- package/build/build-cjs/booking-wizard/features/summary/summary-slice.d.ts +8 -8
- package/build/build-cjs/booking-wizard/features/summary/summary.d.ts +5 -4
- package/build/build-cjs/booking-wizard/features/travelers-form/controls/gender-control.d.ts +5 -5
- package/build/build-cjs/booking-wizard/features/travelers-form/travelers-form-slice.d.ts +50 -62
- package/build/build-cjs/booking-wizard/features/travelers-form/travelers-form-util.d.ts +7 -7
- package/build/build-cjs/booking-wizard/features/travelers-form/travelers-form.d.ts +5 -4
- package/build/build-cjs/booking-wizard/features/travelers-form/type-ahead-input.d.ts +16 -16
- package/build/build-cjs/booking-wizard/features/travelers-form/validate-form.d.ts +4 -11
- package/build/build-cjs/booking-wizard/index.d.ts +12 -12
- package/build/build-cjs/booking-wizard/settings-context.d.ts +6 -5
- package/build/build-cjs/booking-wizard/store.d.ts +24 -39
- package/build/build-cjs/booking-wizard/types.d.ts +284 -284
- package/build/build-cjs/booking-wizard/use-offer-printer.d.ts +13 -13
- package/build/build-cjs/content/components/LanguageSwitcher.d.ts +12 -12
- package/build/build-cjs/content/components/accordion.d.ts +9 -9
- package/build/build-cjs/content/components/breadcrumb.d.ts +16 -16
- package/build/build-cjs/content/components/contact.d.ts +3 -3
- package/build/build-cjs/content/components/faq.d.ts +10 -10
- package/build/build-cjs/content/components/gallery.d.ts +12 -12
- package/build/build-cjs/content/components/icon.d.ts +10 -10
- package/build/build-cjs/content/components/image-with-text.d.ts +28 -28
- package/build/build-cjs/content/components/personal-contact-form.d.ts +3 -3
- package/build/build-cjs/content/components/slider.d.ts +10 -10
- package/build/build-cjs/content/features/content-page/content-page-self-contained.d.ts +6 -6
- package/build/build-cjs/content/footer/index.d.ts +4 -4
- package/build/build-cjs/content/footer/types.d.ts +27 -27
- package/build/build-cjs/content/header/index.d.ts +4 -4
- package/build/build-cjs/content/header/types.d.ts +22 -25
- package/build/build-cjs/content/navbar/index.d.ts +4 -4
- package/build/build-cjs/content/navbar/placeholderData.d.ts +10 -10
- package/build/build-cjs/content/navbar/types.d.ts +27 -27
- package/build/build-cjs/index.d.ts +8 -8
- package/build/build-cjs/index.js +19870 -30361
- package/build/build-cjs/qsm/components/QSMContainer/qsm-container.d.ts +3 -3
- package/build/build-cjs/qsm/components/date-picker/index.d.ts +3 -3
- package/build/build-cjs/qsm/components/date-range-picker/calendar-day.d.ts +12 -12
- package/build/build-cjs/qsm/components/date-range-picker/calendar.d.ts +24 -24
- package/build/build-cjs/qsm/components/date-range-picker/index.d.ts +10 -10
- package/build/build-cjs/qsm/components/double-search-input-group/index.d.ts +7 -7
- package/build/build-cjs/qsm/components/icon.d.ts +10 -10
- package/build/build-cjs/qsm/components/item-picker/index.d.ts +12 -12
- package/build/build-cjs/qsm/components/mobile-filter-modal/index.d.ts +3 -3
- package/build/build-cjs/qsm/components/search-input/index.d.ts +13 -13
- package/build/build-cjs/qsm/components/search-input-group/index.d.ts +11 -11
- package/build/build-cjs/qsm/components/travel-class-picker/index.d.ts +3 -3
- package/build/build-cjs/qsm/components/travel-input/index.d.ts +3 -3
- package/build/build-cjs/qsm/components/travel-input-group/index.d.ts +3 -3
- package/build/build-cjs/qsm/components/travel-nationality-picker/index.d.ts +3 -3
- package/build/build-cjs/qsm/components/travel-type-picker/index.d.ts +3 -3
- package/build/build-cjs/qsm/index.d.ts +7 -7
- package/build/build-cjs/qsm/qsm-configuration-context.d.ts +4 -4
- package/build/build-cjs/qsm/store/qsm-slice.d.ts +70 -122
- package/build/build-cjs/qsm/store/qsm-store.d.ts +8 -18
- package/build/build-cjs/qsm/types.d.ts +110 -109
- package/build/build-cjs/search-results/components/filters/filters.d.ts +11 -11
- package/build/build-cjs/search-results/components/filters/utility.d.ts +3 -3
- package/build/build-cjs/search-results/components/flight/flight-accommodation-results.d.ts +5 -4
- package/build/build-cjs/search-results/components/flight/flight-banner.d.ts +8 -8
- package/build/build-cjs/search-results/components/flight/flight-card.d.ts +7 -7
- package/build/build-cjs/search-results/components/flight/flight-leg.d.ts +7 -7
- package/build/build-cjs/search-results/components/flight/flight-path.d.ts +6 -6
- package/build/build-cjs/search-results/components/flight/flight-results.d.ts +6 -6
- package/build/build-cjs/search-results/components/hotel/hotel-accommodation-results.d.ts +8 -8
- package/build/build-cjs/search-results/components/hotel/hotel-card.d.ts +7 -7
- package/build/build-cjs/search-results/components/icon.d.ts +10 -10
- package/build/build-cjs/search-results/components/item-picker/index.d.ts +12 -12
- package/build/build-cjs/search-results/components/itinerary/index.d.ts +8 -8
- package/build/build-cjs/search-results/components/multi-range-filter.d.ts +11 -11
- package/build/build-cjs/search-results/components/round-trip/round-trip-results.d.ts +5 -4
- package/build/build-cjs/search-results/components/search-results-container/search-results-container.d.ts +3 -3
- package/build/build-cjs/search-results/components/spinner/spinner.d.ts +3 -3
- package/build/build-cjs/search-results/components/tab-views/index.d.ts +5 -4
- package/build/build-cjs/search-results/features/flights/flight-search-results-self-contained.d.ts +5 -4
- package/build/build-cjs/search-results/features/hotels/hotel-flight-search-results-self-contained.d.ts +5 -4
- package/build/build-cjs/search-results/features/hotels/hotel-search-results-self-contained.d.ts +5 -4
- package/build/build-cjs/search-results/features/roundtrips/roundtrip-search-results-self-contained.d.ts +5 -4
- package/build/build-cjs/search-results/index.d.ts +7 -7
- package/build/build-cjs/search-results/search-results-configuration-context.d.ts +4 -4
- package/build/build-cjs/search-results/store/search-results-slice.d.ts +16 -27
- package/build/build-cjs/search-results/store/search-results-store.d.ts +8 -18
- package/build/build-cjs/search-results/types.d.ts +120 -120
- package/build/build-cjs/shared/components/loader.d.ts +6 -6
- package/build/build-cjs/shared/types.d.ts +4 -4
- package/build/build-cjs/shared/utils/class-util.d.ts +1 -1
- package/build/build-cjs/shared/utils/localization-util.d.ts +275 -275
- package/build/build-cjs/shared/utils/query-string-util.d.ts +8 -8
- package/build/build-cjs/shared/utils/tide-api-utils.d.ts +4 -4
- package/build/build-cjs/shared/utils/use-media-query-util.d.ts +2 -2
- package/build/build-esm/booking-product/components/age-select.d.ts +8 -8
- package/build/build-esm/booking-product/components/amount-input.d.ts +10 -10
- package/build/build-esm/booking-product/components/date-range-picker/calendar-day.d.ts +12 -12
- package/build/build-esm/booking-product/components/date-range-picker/calendar.d.ts +19 -19
- package/build/build-esm/booking-product/components/date-range-picker/index.d.ts +24 -21
- package/build/build-esm/booking-product/components/dates.d.ts +14 -14
- package/build/build-esm/booking-product/components/footer.d.ts +10 -10
- package/build/build-esm/booking-product/components/header.d.ts +11 -11
- package/build/build-esm/booking-product/components/icon.d.ts +10 -10
- package/build/build-esm/booking-product/components/list-view.d.ts +8 -8
- package/build/build-esm/booking-product/components/product.d.ts +9 -9
- package/build/build-esm/booking-product/components/rating.d.ts +6 -6
- package/build/build-esm/booking-product/components/rooms.d.ts +10 -10
- package/build/build-esm/booking-product/constants.d.ts +1 -1
- package/build/build-esm/booking-product/index.d.ts +10 -10
- package/build/build-esm/booking-product/settings-context.d.ts +6 -5
- package/build/build-esm/booking-product/types.d.ts +27 -27
- package/build/build-esm/booking-product/utils/api.d.ts +7 -16
- package/build/build-esm/booking-product/utils/price.d.ts +1 -10
- package/build/build-esm/booking-wizard/api-settings-slice.d.ts +4 -5
- package/build/build-esm/booking-wizard/components/icon.d.ts +10 -10
- package/build/build-esm/booking-wizard/components/labeled-input.d.ts +18 -18
- package/build/build-esm/booking-wizard/components/labeled-select.d.ts +21 -21
- package/build/build-esm/booking-wizard/components/message.d.ts +9 -9
- package/build/build-esm/booking-wizard/components/multi-range-filter.d.ts +11 -11
- package/build/build-esm/booking-wizard/components/phone-input.d.ts +17 -17
- package/build/build-esm/booking-wizard/components/print-offer-button.d.ts +17 -17
- package/build/build-esm/booking-wizard/components/product-card.d.ts +8 -8
- package/build/build-esm/booking-wizard/components/step-indicator.d.ts +6 -6
- package/build/build-esm/booking-wizard/components/step-route.d.ts +9 -9
- package/build/build-esm/booking-wizard/features/booking/api.d.ts +10 -26
- package/build/build-esm/booking-wizard/features/booking/booking-self-contained.d.ts +8 -8
- package/build/build-esm/booking-wizard/features/booking/booking-slice.d.ts +50 -103
- package/build/build-esm/booking-wizard/features/booking/booking.d.ts +8 -8
- package/build/build-esm/booking-wizard/features/booking/constants.d.ts +8 -15
- package/build/build-esm/booking-wizard/features/booking/selectors.d.ts +195 -283
- package/build/build-esm/booking-wizard/features/confirmation/confirmation.d.ts +5 -4
- package/build/build-esm/booking-wizard/features/error/error.d.ts +5 -4
- package/build/build-esm/booking-wizard/features/flight-options/flight-filter.d.ts +9 -9
- package/build/build-esm/booking-wizard/features/flight-options/flight-option-flight.d.ts +8 -8
- package/build/build-esm/booking-wizard/features/flight-options/flight-option-modal.d.ts +3 -3
- package/build/build-esm/booking-wizard/features/flight-options/flight-option.d.ts +10 -10
- package/build/build-esm/booking-wizard/features/flight-options/flight-utils.d.ts +6 -13
- package/build/build-esm/booking-wizard/features/flight-options/index.d.ts +5 -4
- package/build/build-esm/booking-wizard/features/price-details/price-details-api.d.ts +6 -11
- package/build/build-esm/booking-wizard/features/price-details/price-details-slice.d.ts +80 -105
- package/build/build-esm/booking-wizard/features/price-details/util.d.ts +2 -2
- package/build/build-esm/booking-wizard/features/product-options/no-options.d.ts +3 -3
- package/build/build-esm/booking-wizard/features/product-options/none-option.d.ts +9 -9
- package/build/build-esm/booking-wizard/features/product-options/option-booking-airline-group.d.ts +8 -8
- package/build/build-esm/booking-wizard/features/product-options/option-booking-group.d.ts +12 -12
- package/build/build-esm/booking-wizard/features/product-options/option-item.d.ts +11 -11
- package/build/build-esm/booking-wizard/features/product-options/option-pax-card.d.ts +10 -10
- package/build/build-esm/booking-wizard/features/product-options/option-pax-group.d.ts +13 -13
- package/build/build-esm/booking-wizard/features/product-options/option-room.d.ts +11 -11
- package/build/build-esm/booking-wizard/features/product-options/option-unit-group.d.ts +13 -13
- package/build/build-esm/booking-wizard/features/product-options/option-units-card.d.ts +9 -9
- package/build/build-esm/booking-wizard/features/product-options/options-form.d.ts +5 -4
- package/build/build-esm/booking-wizard/features/room-options/index.d.ts +5 -4
- package/build/build-esm/booking-wizard/features/room-options/room-utils.d.ts +9 -22
- package/build/build-esm/booking-wizard/features/room-options/room.d.ts +12 -12
- package/build/build-esm/booking-wizard/features/room-options/traveler-rooms.d.ts +9 -9
- package/build/build-esm/booking-wizard/features/sidebar/index.d.ts +7 -7
- package/build/build-esm/booking-wizard/features/sidebar/sidebar-flight.d.ts +8 -8
- package/build/build-esm/booking-wizard/features/sidebar/sidebar-util.d.ts +12 -14
- package/build/build-esm/booking-wizard/features/sidebar/sidebar.d.ts +27 -27
- package/build/build-esm/booking-wizard/features/summary/summary-booking-option-pax.d.ts +7 -7
- package/build/build-esm/booking-wizard/features/summary/summary-booking-option-unit.d.ts +7 -7
- package/build/build-esm/booking-wizard/features/summary/summary-flight.d.ts +8 -8
- package/build/build-esm/booking-wizard/features/summary/summary-per-booking-option-group.d.ts +7 -7
- package/build/build-esm/booking-wizard/features/summary/summary-per-pax-option-group.d.ts +7 -7
- package/build/build-esm/booking-wizard/features/summary/summary-per-unit-option-group.d.ts +7 -7
- package/build/build-esm/booking-wizard/features/summary/summary-slice.d.ts +8 -8
- package/build/build-esm/booking-wizard/features/summary/summary.d.ts +5 -4
- package/build/build-esm/booking-wizard/features/travelers-form/controls/gender-control.d.ts +5 -5
- package/build/build-esm/booking-wizard/features/travelers-form/travelers-form-slice.d.ts +50 -62
- package/build/build-esm/booking-wizard/features/travelers-form/travelers-form-util.d.ts +7 -7
- package/build/build-esm/booking-wizard/features/travelers-form/travelers-form.d.ts +5 -4
- package/build/build-esm/booking-wizard/features/travelers-form/type-ahead-input.d.ts +16 -16
- package/build/build-esm/booking-wizard/features/travelers-form/validate-form.d.ts +4 -11
- package/build/build-esm/booking-wizard/index.d.ts +12 -12
- package/build/build-esm/booking-wizard/settings-context.d.ts +6 -5
- package/build/build-esm/booking-wizard/store.d.ts +24 -39
- package/build/build-esm/booking-wizard/types.d.ts +284 -284
- package/build/build-esm/booking-wizard/use-offer-printer.d.ts +13 -13
- package/build/build-esm/content/components/LanguageSwitcher.d.ts +12 -12
- package/build/build-esm/content/components/accordion.d.ts +9 -9
- package/build/build-esm/content/components/breadcrumb.d.ts +16 -16
- package/build/build-esm/content/components/contact.d.ts +3 -3
- package/build/build-esm/content/components/faq.d.ts +10 -10
- package/build/build-esm/content/components/gallery.d.ts +12 -12
- package/build/build-esm/content/components/icon.d.ts +10 -10
- package/build/build-esm/content/components/image-with-text.d.ts +28 -28
- package/build/build-esm/content/components/personal-contact-form.d.ts +3 -3
- package/build/build-esm/content/components/slider.d.ts +10 -10
- package/build/build-esm/content/features/content-page/content-page-self-contained.d.ts +6 -6
- package/build/build-esm/content/footer/index.d.ts +4 -4
- package/build/build-esm/content/footer/types.d.ts +27 -27
- package/build/build-esm/content/header/index.d.ts +4 -4
- package/build/build-esm/content/header/types.d.ts +22 -25
- package/build/build-esm/content/navbar/index.d.ts +4 -4
- package/build/build-esm/content/navbar/placeholderData.d.ts +10 -10
- package/build/build-esm/content/navbar/types.d.ts +27 -27
- package/build/build-esm/index.d.ts +8 -8
- package/build/build-esm/index.js +19867 -30105
- package/build/build-esm/qsm/components/QSMContainer/qsm-container.d.ts +3 -3
- package/build/build-esm/qsm/components/date-picker/index.d.ts +3 -3
- package/build/build-esm/qsm/components/date-range-picker/calendar-day.d.ts +12 -12
- package/build/build-esm/qsm/components/date-range-picker/calendar.d.ts +24 -24
- package/build/build-esm/qsm/components/date-range-picker/index.d.ts +10 -10
- package/build/build-esm/qsm/components/double-search-input-group/index.d.ts +7 -7
- package/build/build-esm/qsm/components/icon.d.ts +10 -10
- package/build/build-esm/qsm/components/item-picker/index.d.ts +12 -12
- package/build/build-esm/qsm/components/mobile-filter-modal/index.d.ts +3 -3
- package/build/build-esm/qsm/components/search-input/index.d.ts +13 -13
- package/build/build-esm/qsm/components/search-input-group/index.d.ts +11 -11
- package/build/build-esm/qsm/components/travel-class-picker/index.d.ts +3 -3
- package/build/build-esm/qsm/components/travel-input/index.d.ts +3 -3
- package/build/build-esm/qsm/components/travel-input-group/index.d.ts +3 -3
- package/build/build-esm/qsm/components/travel-nationality-picker/index.d.ts +3 -3
- package/build/build-esm/qsm/components/travel-type-picker/index.d.ts +3 -3
- package/build/build-esm/qsm/index.d.ts +7 -7
- package/build/build-esm/qsm/qsm-configuration-context.d.ts +4 -4
- package/build/build-esm/qsm/store/qsm-slice.d.ts +70 -122
- package/build/build-esm/qsm/store/qsm-store.d.ts +8 -18
- package/build/build-esm/qsm/types.d.ts +110 -109
- package/build/build-esm/search-results/components/filters/filters.d.ts +11 -11
- package/build/build-esm/search-results/components/filters/utility.d.ts +3 -3
- package/build/build-esm/search-results/components/flight/flight-accommodation-results.d.ts +5 -4
- package/build/build-esm/search-results/components/flight/flight-banner.d.ts +8 -8
- package/build/build-esm/search-results/components/flight/flight-card.d.ts +7 -7
- package/build/build-esm/search-results/components/flight/flight-leg.d.ts +7 -7
- package/build/build-esm/search-results/components/flight/flight-path.d.ts +6 -6
- package/build/build-esm/search-results/components/flight/flight-results.d.ts +6 -6
- package/build/build-esm/search-results/components/hotel/hotel-accommodation-results.d.ts +8 -8
- package/build/build-esm/search-results/components/hotel/hotel-card.d.ts +7 -7
- package/build/build-esm/search-results/components/icon.d.ts +10 -10
- package/build/build-esm/search-results/components/item-picker/index.d.ts +12 -12
- package/build/build-esm/search-results/components/itinerary/index.d.ts +8 -8
- package/build/build-esm/search-results/components/multi-range-filter.d.ts +11 -11
- package/build/build-esm/search-results/components/round-trip/round-trip-results.d.ts +5 -4
- package/build/build-esm/search-results/components/search-results-container/search-results-container.d.ts +3 -3
- package/build/build-esm/search-results/components/spinner/spinner.d.ts +3 -3
- package/build/build-esm/search-results/components/tab-views/index.d.ts +5 -4
- package/build/build-esm/search-results/features/flights/flight-search-results-self-contained.d.ts +5 -4
- package/build/build-esm/search-results/features/hotels/hotel-flight-search-results-self-contained.d.ts +5 -4
- package/build/build-esm/search-results/features/hotels/hotel-search-results-self-contained.d.ts +5 -4
- package/build/build-esm/search-results/features/roundtrips/roundtrip-search-results-self-contained.d.ts +5 -4
- package/build/build-esm/search-results/index.d.ts +7 -7
- package/build/build-esm/search-results/search-results-configuration-context.d.ts +4 -4
- package/build/build-esm/search-results/store/search-results-slice.d.ts +16 -27
- package/build/build-esm/search-results/store/search-results-store.d.ts +8 -18
- package/build/build-esm/search-results/types.d.ts +120 -120
- package/build/build-esm/shared/components/loader.d.ts +6 -6
- package/build/build-esm/shared/types.d.ts +4 -4
- package/build/build-esm/shared/utils/class-util.d.ts +1 -1
- package/build/build-esm/shared/utils/localization-util.d.ts +275 -275
- package/build/build-esm/shared/utils/query-string-util.d.ts +8 -8
- package/build/build-esm/shared/utils/tide-api-utils.d.ts +4 -4
- package/build/build-esm/shared/utils/use-media-query-util.d.ts +2 -2
- package/package.json +77 -77
- package/src/booking-wizard/features/booking/booking-self-contained.tsx +304 -301
- package/src/qsm/components/QSMContainer/qsm-container.tsx +218 -234
- package/src/qsm/store/qsm-slice.ts +261 -267
- package/src/qsm/types.ts +145 -144
- package/src/search-results/components/search-results-container/search-results-container.tsx +337 -337
|
@@ -1,337 +1,337 @@
|
|
|
1
|
-
import React, { useContext, useEffect, useState } from 'react';
|
|
2
|
-
import { useDispatch, useSelector } from 'react-redux';
|
|
3
|
-
import { SearchResultsRootState } from '../../store/search-results-store';
|
|
4
|
-
import SearchResultsConfigurationContext from '../../search-results-configuration-context';
|
|
5
|
-
|
|
6
|
-
import { resetFilters, setSortKey, setResults, setIsLoading, setSelectedHotel } from '../../store/search-results-slice';
|
|
7
|
-
import { Filter, SortingOption } from '../../types';
|
|
8
|
-
import useMediaQuery from '../../../shared/utils/use-media-query-util';
|
|
9
|
-
import Filters from '../filters/filters';
|
|
10
|
-
import ItemPicker from '../item-picker';
|
|
11
|
-
|
|
12
|
-
import { TideClientConfig, details, search } from '@qite/tide-client';
|
|
13
|
-
import {
|
|
14
|
-
BookingPackageDestination,
|
|
15
|
-
BookingPackageDetailsRequest,
|
|
16
|
-
BookingPackagePax,
|
|
17
|
-
BookingPackageRequest,
|
|
18
|
-
BookingPackageRequestRoom,
|
|
19
|
-
BookingPackageSearchRequest
|
|
20
|
-
} from '@qite/tide-client/build/types';
|
|
21
|
-
import { getDateFromParams, getNumberFromParams, getRoomsFromParams } from '../../../shared/utils/query-string-util';
|
|
22
|
-
import { range } from 'lodash';
|
|
23
|
-
import { Room } from '../../../booking-wizard/types';
|
|
24
|
-
import Icon from '../icon';
|
|
25
|
-
import Itinerary from '../itinerary';
|
|
26
|
-
import TabViews from '../tab-views';
|
|
27
|
-
import HotelAccommodationResults from '../hotel/hotel-accommodation-results';
|
|
28
|
-
import RoundTripResults from '../round-trip/round-trip-results';
|
|
29
|
-
import { enrichFiltersWithResults } from '../filters/utility';
|
|
30
|
-
|
|
31
|
-
const SearchResultsContainer: React.FC = () => {
|
|
32
|
-
const isMobile = useMediaQuery('(max-width: 1200px)');
|
|
33
|
-
const dispatch = useDispatch();
|
|
34
|
-
const context = useContext(SearchResultsConfigurationContext);
|
|
35
|
-
const { results, isLoading, filters, sortKey, selectedHotelId } = useSelector((state: SearchResultsRootState) => state.searchResults);
|
|
36
|
-
|
|
37
|
-
const [searchTrigger, setSearchTrigger] = useState(0);
|
|
38
|
-
const [initialFiltersSet, setInitialFiltersSet] = useState(false);
|
|
39
|
-
const [initialFilters, setInitialFilters] = useState<Filter[]>([]);
|
|
40
|
-
|
|
41
|
-
useEffect(() => {
|
|
42
|
-
const runSearch = async () => {
|
|
43
|
-
dispatch(setIsLoading(true));
|
|
44
|
-
try {
|
|
45
|
-
if (!context) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const params = new URLSearchParams(location.search);
|
|
50
|
-
let from = getDateFromParams(params, '
|
|
51
|
-
let to = getDateFromParams(params, '
|
|
52
|
-
const rooms = getRoomsFromParams(params, 'rooms');
|
|
53
|
-
let country = getNumberFromParams(params, 'country');
|
|
54
|
-
let region = getNumberFromParams(params, 'region');
|
|
55
|
-
let oord = getNumberFromParams(params, 'oord');
|
|
56
|
-
let city = getNumberFromParams(params, 'location');
|
|
57
|
-
|
|
58
|
-
// temp hardcoded params
|
|
59
|
-
if (!from || !to) {
|
|
60
|
-
from = '2026-04-07';
|
|
61
|
-
to = '2026-04-13';
|
|
62
|
-
}
|
|
63
|
-
if (!country && !region && !oord && !city) {
|
|
64
|
-
region = 1;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if (typeof window !== 'undefined') {
|
|
68
|
-
window.scrollTo(0, 0);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
let destinationId: number | null = null;
|
|
72
|
-
let destinationIsCountry = false;
|
|
73
|
-
let destinationIsRegion = false;
|
|
74
|
-
let destinationIsOord = false;
|
|
75
|
-
let destinationIsLocation = false;
|
|
76
|
-
|
|
77
|
-
if (country) {
|
|
78
|
-
destinationId = country;
|
|
79
|
-
destinationIsCountry = true;
|
|
80
|
-
} else if (region) {
|
|
81
|
-
destinationId = region;
|
|
82
|
-
destinationIsRegion = true;
|
|
83
|
-
} else if (oord) {
|
|
84
|
-
destinationId = oord;
|
|
85
|
-
destinationIsOord = true;
|
|
86
|
-
} else if (city) {
|
|
87
|
-
destinationId = city;
|
|
88
|
-
destinationIsLocation = true;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
const searchRequest: BookingPackageRequest<BookingPackageSearchRequest> = {
|
|
92
|
-
officeId: 1,
|
|
93
|
-
payload: {
|
|
94
|
-
catalogueIds: context.tideConnection.catalogueIds ?? [],
|
|
95
|
-
serviceType:
|
|
96
|
-
context?.type === 'hotel' || context?.type === 'hotel-flight' ? 3 : context?.type === 'flight' ? 7 : context?.type === 'roundTrip' ? 1 : 0,
|
|
97
|
-
searchType: 0,
|
|
98
|
-
destination: {
|
|
99
|
-
id: Number(destinationId),
|
|
100
|
-
isCountry: destinationIsCountry,
|
|
101
|
-
isRegion: destinationIsRegion,
|
|
102
|
-
isOord: destinationIsOord,
|
|
103
|
-
isLocation: destinationIsLocation
|
|
104
|
-
} as BookingPackageDestination,
|
|
105
|
-
rooms: getRequestRooms(rooms),
|
|
106
|
-
fromDate: from,
|
|
107
|
-
toDate: to,
|
|
108
|
-
earliestFromOffset: 0,
|
|
109
|
-
latestToOffset: 0,
|
|
110
|
-
includeFlights: true,
|
|
111
|
-
regimeCodes:
|
|
112
|
-
filters
|
|
113
|
-
.find((f) => f.property === 'regime')
|
|
114
|
-
?.options?.filter((o) => o.isChecked)
|
|
115
|
-
.flatMap((o) => o.value.toString()) || [],
|
|
116
|
-
minPrice: filters.find((f) => f.property === 'price')?.selectedMin,
|
|
117
|
-
maxPrice: filters.find((f) => f.property === 'price')?.selectedMax,
|
|
118
|
-
useExactDates: true,
|
|
119
|
-
onlyCachedResults: false,
|
|
120
|
-
includeAllAllotments: true
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
const config: TideClientConfig = {
|
|
125
|
-
host: context.tideConnection.host,
|
|
126
|
-
apiKey: context.tideConnection.apiKey
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
const packageSearchResults = await search(config, searchRequest);
|
|
130
|
-
|
|
131
|
-
console.log('Search results', packageSearchResults);
|
|
132
|
-
|
|
133
|
-
const enrichedFilters = enrichFiltersWithResults(packageSearchResults, context.filters);
|
|
134
|
-
if (!initialFiltersSet) {
|
|
135
|
-
dispatch(resetFilters(enrichedFilters));
|
|
136
|
-
setInitialFilters(enrichedFilters);
|
|
137
|
-
setInitialFiltersSet(true);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
dispatch(setResults({ results: packageSearchResults }));
|
|
141
|
-
if (packageSearchResults?.length > 0) {
|
|
142
|
-
dispatch(setSelectedHotel(packageSearchResults[0].productId));
|
|
143
|
-
}
|
|
144
|
-
dispatch(setIsLoading(false));
|
|
145
|
-
} catch (err) {
|
|
146
|
-
console.error('Search failed', err);
|
|
147
|
-
dispatch(setIsLoading(false));
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
runSearch();
|
|
152
|
-
}, [location.search, searchTrigger]);
|
|
153
|
-
|
|
154
|
-
useEffect(() => {
|
|
155
|
-
const fetchPackageDetails = async () => {
|
|
156
|
-
if (!selectedHotelId || !context) return;
|
|
157
|
-
|
|
158
|
-
try {
|
|
159
|
-
const config: TideClientConfig = {
|
|
160
|
-
host: context.tideConnection.host,
|
|
161
|
-
apiKey: context.tideConnection.apiKey
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
const selectedItem = results.find((r) => r.productId === selectedHotelId);
|
|
165
|
-
if (!selectedItem) return;
|
|
166
|
-
|
|
167
|
-
const params = new URLSearchParams(location.search);
|
|
168
|
-
const rooms = getRoomsFromParams(params, 'rooms');
|
|
169
|
-
const requestRooms = getRequestRooms(rooms);
|
|
170
|
-
|
|
171
|
-
const detailsRequest: BookingPackageRequest<BookingPackageDetailsRequest> = {
|
|
172
|
-
officeId: 1,
|
|
173
|
-
payload: {
|
|
174
|
-
catalogueId: selectedItem.catalogueId,
|
|
175
|
-
rooms: requestRooms,
|
|
176
|
-
searchType: 0, // same as search
|
|
177
|
-
productCode: selectedItem.code,
|
|
178
|
-
fromDate: selectedItem.fromDate,
|
|
179
|
-
toDate: selectedItem.toDate,
|
|
180
|
-
includeFlights: true,
|
|
181
|
-
includeHotels: true,
|
|
182
|
-
includePaxTypes: true,
|
|
183
|
-
checkExternalAvailability: true,
|
|
184
|
-
expectedPrice: selectedItem.price,
|
|
185
|
-
duration: null,
|
|
186
|
-
preNights: null,
|
|
187
|
-
postNights: null
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
const detailsResponse = await details(config, detailsRequest);
|
|
192
|
-
|
|
193
|
-
console.log('Package details:', detailsResponse);
|
|
194
|
-
|
|
195
|
-
// TODO: store flights / details in redux
|
|
196
|
-
// dispatch(setSelectedHotelDetails(details));
|
|
197
|
-
} catch (err) {
|
|
198
|
-
console.error('Failed to fetch package details', err);
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
fetchPackageDetails();
|
|
203
|
-
}, [selectedHotelId]);
|
|
204
|
-
|
|
205
|
-
const getRequestRooms = (rooms: Room[] | null) => {
|
|
206
|
-
if (!rooms) {
|
|
207
|
-
// Fall back to 2 adults
|
|
208
|
-
var room = { index: 0, pax: [] } as BookingPackageRequestRoom;
|
|
209
|
-
range(0, 2).forEach(() => {
|
|
210
|
-
room.pax.push({
|
|
211
|
-
age: 30
|
|
212
|
-
} as BookingPackagePax);
|
|
213
|
-
});
|
|
214
|
-
return [room];
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
const requestRooms = rooms?.map((x, i) => {
|
|
218
|
-
var room = { index: i, pax: [] } as BookingPackageRequestRoom;
|
|
219
|
-
range(0, x.adults).forEach(() => {
|
|
220
|
-
room.pax.push({
|
|
221
|
-
age: 30
|
|
222
|
-
} as BookingPackagePax);
|
|
223
|
-
});
|
|
224
|
-
x.childAges.forEach((x) => {
|
|
225
|
-
room.pax.push({
|
|
226
|
-
age: x
|
|
227
|
-
} as BookingPackagePax);
|
|
228
|
-
});
|
|
229
|
-
return room;
|
|
230
|
-
});
|
|
231
|
-
|
|
232
|
-
return requestRooms;
|
|
233
|
-
};
|
|
234
|
-
|
|
235
|
-
const [isMobileFiltersOpen, setIsMobileFiltersOpen] = useState(false);
|
|
236
|
-
|
|
237
|
-
const handleSortChange = (newSortKey: string) => {
|
|
238
|
-
dispatch(setSortKey(newSortKey));
|
|
239
|
-
};
|
|
240
|
-
|
|
241
|
-
const handleSetIsMobileFiltersOpen = () => {
|
|
242
|
-
setIsMobileFiltersOpen(!isMobileFiltersOpen);
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
useEffect(() => {
|
|
246
|
-
if (typeof document !== 'undefined') {
|
|
247
|
-
document.body.classList.toggle('has-overlay', isMobileFiltersOpen);
|
|
248
|
-
}
|
|
249
|
-
}, [isMobileFiltersOpen]);
|
|
250
|
-
|
|
251
|
-
const sortingOptions: SortingOption[] = [
|
|
252
|
-
{ key: 'price-asc', label: 'Price: Low to High' },
|
|
253
|
-
{ key: 'price-desc', label: 'Price: High to Low' },
|
|
254
|
-
{ key: 'departure-date', label: 'Departure Date' }
|
|
255
|
-
];
|
|
256
|
-
|
|
257
|
-
return (
|
|
258
|
-
<div id="tide-booking" className="search__bg">
|
|
259
|
-
{context && (
|
|
260
|
-
<div className="search">
|
|
261
|
-
<div className="search__container">
|
|
262
|
-
{context.showFilters && (
|
|
263
|
-
<Filters
|
|
264
|
-
filters={filters}
|
|
265
|
-
isMobileFiltersOpen={isMobileFiltersOpen}
|
|
266
|
-
handleSetIsMobileFiltersOpen={handleSetIsMobileFiltersOpen}
|
|
267
|
-
handleApplyFilters={() => setSearchTrigger((prev) => prev + 1)}
|
|
268
|
-
isLoading={isLoading}
|
|
269
|
-
/>
|
|
270
|
-
)}
|
|
271
|
-
{context.type === 'hotel-flight' && (
|
|
272
|
-
<Itinerary isMobileFiltersOpen={isMobileFiltersOpen} handleSetIsMobileFiltersOpen={handleSetIsMobileFiltersOpen} isLoading={isLoading} />
|
|
273
|
-
)}
|
|
274
|
-
{/* ---------------- Results ---------------- */}
|
|
275
|
-
<div className="search__results">
|
|
276
|
-
{isMobile && (
|
|
277
|
-
<div className="search__result-row">
|
|
278
|
-
<div className="cta cta--filter" onClick={() => setIsMobileFiltersOpen(true)}>
|
|
279
|
-
<Icon name="ui-filter" className="mobile-filters-button__icon" height={16} />
|
|
280
|
-
{context.translations?.filters}
|
|
281
|
-
</div>
|
|
282
|
-
{sortingOptions && sortingOptions.length > 0 && (
|
|
283
|
-
<ItemPicker
|
|
284
|
-
items={sortingOptions}
|
|
285
|
-
selection={sortKey || undefined}
|
|
286
|
-
label="Sort by"
|
|
287
|
-
placeholder="Sort by"
|
|
288
|
-
classModifier="travel-class-picker__items"
|
|
289
|
-
onPick={handleSortChange}
|
|
290
|
-
/>
|
|
291
|
-
)}
|
|
292
|
-
</div>
|
|
293
|
-
)}
|
|
294
|
-
|
|
295
|
-
<div className="search__result-row">
|
|
296
|
-
<span className="search__result-row-text">
|
|
297
|
-
{!isLoading && (
|
|
298
|
-
<>
|
|
299
|
-
{results?.length ?? 4} {context.translations?.totalResultsLabel}
|
|
300
|
-
</>
|
|
301
|
-
)}
|
|
302
|
-
</span>
|
|
303
|
-
{!isMobile && sortingOptions && sortingOptions.length > 0 && (
|
|
304
|
-
<div className="search__result-row-filter">
|
|
305
|
-
<ItemPicker
|
|
306
|
-
items={sortingOptions}
|
|
307
|
-
selection={sortKey || undefined}
|
|
308
|
-
label="Sort by"
|
|
309
|
-
placeholder="Sort by"
|
|
310
|
-
classModifier="travel-class-picker__items"
|
|
311
|
-
onPick={handleSortChange}
|
|
312
|
-
/>
|
|
313
|
-
</div>
|
|
314
|
-
)}
|
|
315
|
-
</div>
|
|
316
|
-
|
|
317
|
-
<div className="search__results__wrapper">
|
|
318
|
-
{context.showTabViews && <TabViews />}
|
|
319
|
-
|
|
320
|
-
{context.showRoundTripResults && <RoundTripResults />}
|
|
321
|
-
|
|
322
|
-
{/* {context.showFlightResults && <FlightResults isDeparture={true} />} */}
|
|
323
|
-
|
|
324
|
-
{context.showHotelAccommodationResults && <HotelAccommodationResults isLoading={isLoading} context={context} />}
|
|
325
|
-
{/* {context.showFlightAccommodationResults && <FlightAccommodationResults />} */}
|
|
326
|
-
|
|
327
|
-
{/* {context.showFlightResults && <FlightResults isDeparture={false} />} */}
|
|
328
|
-
</div>
|
|
329
|
-
</div>
|
|
330
|
-
</div>
|
|
331
|
-
</div>
|
|
332
|
-
)}
|
|
333
|
-
</div>
|
|
334
|
-
);
|
|
335
|
-
};
|
|
336
|
-
|
|
337
|
-
export default SearchResultsContainer;
|
|
1
|
+
import React, { useContext, useEffect, useState } from 'react';
|
|
2
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
3
|
+
import { SearchResultsRootState } from '../../store/search-results-store';
|
|
4
|
+
import SearchResultsConfigurationContext from '../../search-results-configuration-context';
|
|
5
|
+
|
|
6
|
+
import { resetFilters, setSortKey, setResults, setIsLoading, setSelectedHotel } from '../../store/search-results-slice';
|
|
7
|
+
import { Filter, SortingOption } from '../../types';
|
|
8
|
+
import useMediaQuery from '../../../shared/utils/use-media-query-util';
|
|
9
|
+
import Filters from '../filters/filters';
|
|
10
|
+
import ItemPicker from '../item-picker';
|
|
11
|
+
|
|
12
|
+
import { TideClientConfig, details, search } from '@qite/tide-client';
|
|
13
|
+
import {
|
|
14
|
+
BookingPackageDestination,
|
|
15
|
+
BookingPackageDetailsRequest,
|
|
16
|
+
BookingPackagePax,
|
|
17
|
+
BookingPackageRequest,
|
|
18
|
+
BookingPackageRequestRoom,
|
|
19
|
+
BookingPackageSearchRequest
|
|
20
|
+
} from '@qite/tide-client/build/types';
|
|
21
|
+
import { getDateFromParams, getNumberFromParams, getRoomsFromParams } from '../../../shared/utils/query-string-util';
|
|
22
|
+
import { range } from 'lodash';
|
|
23
|
+
import { Room } from '../../../booking-wizard/types';
|
|
24
|
+
import Icon from '../icon';
|
|
25
|
+
import Itinerary from '../itinerary';
|
|
26
|
+
import TabViews from '../tab-views';
|
|
27
|
+
import HotelAccommodationResults from '../hotel/hotel-accommodation-results';
|
|
28
|
+
import RoundTripResults from '../round-trip/round-trip-results';
|
|
29
|
+
import { enrichFiltersWithResults } from '../filters/utility';
|
|
30
|
+
|
|
31
|
+
const SearchResultsContainer: React.FC = () => {
|
|
32
|
+
const isMobile = useMediaQuery('(max-width: 1200px)');
|
|
33
|
+
const dispatch = useDispatch();
|
|
34
|
+
const context = useContext(SearchResultsConfigurationContext);
|
|
35
|
+
const { results, isLoading, filters, sortKey, selectedHotelId } = useSelector((state: SearchResultsRootState) => state.searchResults);
|
|
36
|
+
|
|
37
|
+
const [searchTrigger, setSearchTrigger] = useState(0);
|
|
38
|
+
const [initialFiltersSet, setInitialFiltersSet] = useState(false);
|
|
39
|
+
const [initialFilters, setInitialFilters] = useState<Filter[]>([]);
|
|
40
|
+
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
const runSearch = async () => {
|
|
43
|
+
dispatch(setIsLoading(true));
|
|
44
|
+
try {
|
|
45
|
+
if (!context) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const params = new URLSearchParams(location.search);
|
|
50
|
+
let from = getDateFromParams(params, 'fromDate');
|
|
51
|
+
let to = getDateFromParams(params, 'toDate');
|
|
52
|
+
const rooms = getRoomsFromParams(params, 'rooms');
|
|
53
|
+
let country = getNumberFromParams(params, 'country');
|
|
54
|
+
let region = getNumberFromParams(params, 'region');
|
|
55
|
+
let oord = getNumberFromParams(params, 'oord');
|
|
56
|
+
let city = getNumberFromParams(params, 'location');
|
|
57
|
+
|
|
58
|
+
// temp hardcoded params
|
|
59
|
+
if (!from || !to) {
|
|
60
|
+
from = '2026-04-07';
|
|
61
|
+
to = '2026-04-13';
|
|
62
|
+
}
|
|
63
|
+
if (!country && !region && !oord && !city) {
|
|
64
|
+
region = 1;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (typeof window !== 'undefined') {
|
|
68
|
+
window.scrollTo(0, 0);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
let destinationId: number | null = null;
|
|
72
|
+
let destinationIsCountry = false;
|
|
73
|
+
let destinationIsRegion = false;
|
|
74
|
+
let destinationIsOord = false;
|
|
75
|
+
let destinationIsLocation = false;
|
|
76
|
+
|
|
77
|
+
if (country) {
|
|
78
|
+
destinationId = country;
|
|
79
|
+
destinationIsCountry = true;
|
|
80
|
+
} else if (region) {
|
|
81
|
+
destinationId = region;
|
|
82
|
+
destinationIsRegion = true;
|
|
83
|
+
} else if (oord) {
|
|
84
|
+
destinationId = oord;
|
|
85
|
+
destinationIsOord = true;
|
|
86
|
+
} else if (city) {
|
|
87
|
+
destinationId = city;
|
|
88
|
+
destinationIsLocation = true;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const searchRequest: BookingPackageRequest<BookingPackageSearchRequest> = {
|
|
92
|
+
officeId: 1,
|
|
93
|
+
payload: {
|
|
94
|
+
catalogueIds: context.tideConnection.catalogueIds ?? [],
|
|
95
|
+
serviceType:
|
|
96
|
+
context?.type === 'hotel' || context?.type === 'hotel-flight' ? 3 : context?.type === 'flight' ? 7 : context?.type === 'roundTrip' ? 1 : 0,
|
|
97
|
+
searchType: 0,
|
|
98
|
+
destination: {
|
|
99
|
+
id: Number(destinationId),
|
|
100
|
+
isCountry: destinationIsCountry,
|
|
101
|
+
isRegion: destinationIsRegion,
|
|
102
|
+
isOord: destinationIsOord,
|
|
103
|
+
isLocation: destinationIsLocation
|
|
104
|
+
} as BookingPackageDestination,
|
|
105
|
+
rooms: getRequestRooms(rooms),
|
|
106
|
+
fromDate: from,
|
|
107
|
+
toDate: to,
|
|
108
|
+
earliestFromOffset: 0,
|
|
109
|
+
latestToOffset: 0,
|
|
110
|
+
includeFlights: true,
|
|
111
|
+
regimeCodes:
|
|
112
|
+
filters
|
|
113
|
+
.find((f) => f.property === 'regime')
|
|
114
|
+
?.options?.filter((o) => o.isChecked)
|
|
115
|
+
.flatMap((o) => o.value.toString()) || [],
|
|
116
|
+
minPrice: filters.find((f) => f.property === 'price')?.selectedMin,
|
|
117
|
+
maxPrice: filters.find((f) => f.property === 'price')?.selectedMax,
|
|
118
|
+
useExactDates: true,
|
|
119
|
+
onlyCachedResults: false,
|
|
120
|
+
includeAllAllotments: true
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const config: TideClientConfig = {
|
|
125
|
+
host: context.tideConnection.host,
|
|
126
|
+
apiKey: context.tideConnection.apiKey
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const packageSearchResults = await search(config, searchRequest);
|
|
130
|
+
|
|
131
|
+
console.log('Search results', packageSearchResults);
|
|
132
|
+
|
|
133
|
+
const enrichedFilters = enrichFiltersWithResults(packageSearchResults, context.filters);
|
|
134
|
+
if (!initialFiltersSet) {
|
|
135
|
+
dispatch(resetFilters(enrichedFilters));
|
|
136
|
+
setInitialFilters(enrichedFilters);
|
|
137
|
+
setInitialFiltersSet(true);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
dispatch(setResults({ results: packageSearchResults }));
|
|
141
|
+
if (packageSearchResults?.length > 0) {
|
|
142
|
+
dispatch(setSelectedHotel(packageSearchResults[0].productId));
|
|
143
|
+
}
|
|
144
|
+
dispatch(setIsLoading(false));
|
|
145
|
+
} catch (err) {
|
|
146
|
+
console.error('Search failed', err);
|
|
147
|
+
dispatch(setIsLoading(false));
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
runSearch();
|
|
152
|
+
}, [location.search, searchTrigger]);
|
|
153
|
+
|
|
154
|
+
useEffect(() => {
|
|
155
|
+
const fetchPackageDetails = async () => {
|
|
156
|
+
if (!selectedHotelId || !context) return;
|
|
157
|
+
|
|
158
|
+
try {
|
|
159
|
+
const config: TideClientConfig = {
|
|
160
|
+
host: context.tideConnection.host,
|
|
161
|
+
apiKey: context.tideConnection.apiKey
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
const selectedItem = results.find((r) => r.productId === selectedHotelId);
|
|
165
|
+
if (!selectedItem) return;
|
|
166
|
+
|
|
167
|
+
const params = new URLSearchParams(location.search);
|
|
168
|
+
const rooms = getRoomsFromParams(params, 'rooms');
|
|
169
|
+
const requestRooms = getRequestRooms(rooms);
|
|
170
|
+
|
|
171
|
+
const detailsRequest: BookingPackageRequest<BookingPackageDetailsRequest> = {
|
|
172
|
+
officeId: 1,
|
|
173
|
+
payload: {
|
|
174
|
+
catalogueId: selectedItem.catalogueId,
|
|
175
|
+
rooms: requestRooms,
|
|
176
|
+
searchType: 0, // same as search
|
|
177
|
+
productCode: selectedItem.code,
|
|
178
|
+
fromDate: selectedItem.fromDate,
|
|
179
|
+
toDate: selectedItem.toDate,
|
|
180
|
+
includeFlights: true,
|
|
181
|
+
includeHotels: true,
|
|
182
|
+
includePaxTypes: true,
|
|
183
|
+
checkExternalAvailability: true,
|
|
184
|
+
expectedPrice: selectedItem.price,
|
|
185
|
+
duration: null,
|
|
186
|
+
preNights: null,
|
|
187
|
+
postNights: null
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
const detailsResponse = await details(config, detailsRequest);
|
|
192
|
+
|
|
193
|
+
console.log('Package details:', detailsResponse);
|
|
194
|
+
|
|
195
|
+
// TODO: store flights / details in redux
|
|
196
|
+
// dispatch(setSelectedHotelDetails(details));
|
|
197
|
+
} catch (err) {
|
|
198
|
+
console.error('Failed to fetch package details', err);
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
fetchPackageDetails();
|
|
203
|
+
}, [selectedHotelId]);
|
|
204
|
+
|
|
205
|
+
const getRequestRooms = (rooms: Room[] | null) => {
|
|
206
|
+
if (!rooms) {
|
|
207
|
+
// Fall back to 2 adults
|
|
208
|
+
var room = { index: 0, pax: [] } as BookingPackageRequestRoom;
|
|
209
|
+
range(0, 2).forEach(() => {
|
|
210
|
+
room.pax.push({
|
|
211
|
+
age: 30
|
|
212
|
+
} as BookingPackagePax);
|
|
213
|
+
});
|
|
214
|
+
return [room];
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const requestRooms = rooms?.map((x, i) => {
|
|
218
|
+
var room = { index: i, pax: [] } as BookingPackageRequestRoom;
|
|
219
|
+
range(0, x.adults).forEach(() => {
|
|
220
|
+
room.pax.push({
|
|
221
|
+
age: 30
|
|
222
|
+
} as BookingPackagePax);
|
|
223
|
+
});
|
|
224
|
+
x.childAges.forEach((x) => {
|
|
225
|
+
room.pax.push({
|
|
226
|
+
age: x
|
|
227
|
+
} as BookingPackagePax);
|
|
228
|
+
});
|
|
229
|
+
return room;
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
return requestRooms;
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
const [isMobileFiltersOpen, setIsMobileFiltersOpen] = useState(false);
|
|
236
|
+
|
|
237
|
+
const handleSortChange = (newSortKey: string) => {
|
|
238
|
+
dispatch(setSortKey(newSortKey));
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
const handleSetIsMobileFiltersOpen = () => {
|
|
242
|
+
setIsMobileFiltersOpen(!isMobileFiltersOpen);
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
useEffect(() => {
|
|
246
|
+
if (typeof document !== 'undefined') {
|
|
247
|
+
document.body.classList.toggle('has-overlay', isMobileFiltersOpen);
|
|
248
|
+
}
|
|
249
|
+
}, [isMobileFiltersOpen]);
|
|
250
|
+
|
|
251
|
+
const sortingOptions: SortingOption[] = [
|
|
252
|
+
{ key: 'price-asc', label: 'Price: Low to High' },
|
|
253
|
+
{ key: 'price-desc', label: 'Price: High to Low' },
|
|
254
|
+
{ key: 'departure-date', label: 'Departure Date' }
|
|
255
|
+
];
|
|
256
|
+
|
|
257
|
+
return (
|
|
258
|
+
<div id="tide-booking" className="search__bg">
|
|
259
|
+
{context && (
|
|
260
|
+
<div className="search">
|
|
261
|
+
<div className="search__container">
|
|
262
|
+
{context.showFilters && (
|
|
263
|
+
<Filters
|
|
264
|
+
filters={filters}
|
|
265
|
+
isMobileFiltersOpen={isMobileFiltersOpen}
|
|
266
|
+
handleSetIsMobileFiltersOpen={handleSetIsMobileFiltersOpen}
|
|
267
|
+
handleApplyFilters={() => setSearchTrigger((prev) => prev + 1)}
|
|
268
|
+
isLoading={isLoading}
|
|
269
|
+
/>
|
|
270
|
+
)}
|
|
271
|
+
{context.type === 'hotel-flight' && (
|
|
272
|
+
<Itinerary isMobileFiltersOpen={isMobileFiltersOpen} handleSetIsMobileFiltersOpen={handleSetIsMobileFiltersOpen} isLoading={isLoading} />
|
|
273
|
+
)}
|
|
274
|
+
{/* ---------------- Results ---------------- */}
|
|
275
|
+
<div className="search__results">
|
|
276
|
+
{isMobile && (
|
|
277
|
+
<div className="search__result-row">
|
|
278
|
+
<div className="cta cta--filter" onClick={() => setIsMobileFiltersOpen(true)}>
|
|
279
|
+
<Icon name="ui-filter" className="mobile-filters-button__icon" height={16} />
|
|
280
|
+
{context.translations?.filters}
|
|
281
|
+
</div>
|
|
282
|
+
{sortingOptions && sortingOptions.length > 0 && (
|
|
283
|
+
<ItemPicker
|
|
284
|
+
items={sortingOptions}
|
|
285
|
+
selection={sortKey || undefined}
|
|
286
|
+
label="Sort by"
|
|
287
|
+
placeholder="Sort by"
|
|
288
|
+
classModifier="travel-class-picker__items"
|
|
289
|
+
onPick={handleSortChange}
|
|
290
|
+
/>
|
|
291
|
+
)}
|
|
292
|
+
</div>
|
|
293
|
+
)}
|
|
294
|
+
|
|
295
|
+
<div className="search__result-row">
|
|
296
|
+
<span className="search__result-row-text">
|
|
297
|
+
{!isLoading && (
|
|
298
|
+
<>
|
|
299
|
+
{results?.length ?? 4} {context.translations?.totalResultsLabel}
|
|
300
|
+
</>
|
|
301
|
+
)}
|
|
302
|
+
</span>
|
|
303
|
+
{!isMobile && sortingOptions && sortingOptions.length > 0 && (
|
|
304
|
+
<div className="search__result-row-filter">
|
|
305
|
+
<ItemPicker
|
|
306
|
+
items={sortingOptions}
|
|
307
|
+
selection={sortKey || undefined}
|
|
308
|
+
label="Sort by"
|
|
309
|
+
placeholder="Sort by"
|
|
310
|
+
classModifier="travel-class-picker__items"
|
|
311
|
+
onPick={handleSortChange}
|
|
312
|
+
/>
|
|
313
|
+
</div>
|
|
314
|
+
)}
|
|
315
|
+
</div>
|
|
316
|
+
|
|
317
|
+
<div className="search__results__wrapper">
|
|
318
|
+
{context.showTabViews && <TabViews />}
|
|
319
|
+
|
|
320
|
+
{context.showRoundTripResults && <RoundTripResults />}
|
|
321
|
+
|
|
322
|
+
{/* {context.showFlightResults && <FlightResults isDeparture={true} />} */}
|
|
323
|
+
|
|
324
|
+
{context.showHotelAccommodationResults && <HotelAccommodationResults isLoading={isLoading} context={context} />}
|
|
325
|
+
{/* {context.showFlightAccommodationResults && <FlightAccommodationResults />} */}
|
|
326
|
+
|
|
327
|
+
{/* {context.showFlightResults && <FlightResults isDeparture={false} />} */}
|
|
328
|
+
</div>
|
|
329
|
+
</div>
|
|
330
|
+
</div>
|
|
331
|
+
</div>
|
|
332
|
+
)}
|
|
333
|
+
</div>
|
|
334
|
+
);
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
export default SearchResultsContainer;
|