@qite/tide-booking-component 1.4.109 → 1.4.111
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/index.js +3613 -2276
- package/build/build-cjs/src/booking-wizard/components/step-route.d.ts +2 -2
- package/build/build-cjs/src/booking-wizard/features/sidebar/sidebar-flight.d.ts +1 -0
- package/build/build-cjs/src/booking-wizard/features/sidebar/sidebar-util.d.ts +2 -1
- package/build/build-cjs/src/booking-wizard/features/sidebar/sidebar.d.ts +0 -31
- package/build/build-cjs/src/booking-wizard/features/travelers-form/travelers-form.d.ts +1 -2
- package/build/build-cjs/src/search-results/components/book-packaging-entry/index.d.ts +8 -0
- package/build/build-cjs/src/search-results/components/book-packaging-entry/wl-sidebar.d.ts +7 -0
- package/build/build-cjs/src/search-results/components/spinner/spinner.d.ts +4 -1
- package/build/build-cjs/src/search-results/store/search-results-slice.d.ts +7 -1
- package/build/build-cjs/src/search-results/types.d.ts +3 -0
- package/build/build-cjs/src/shared/booking/booking-panel.d.ts +13 -0
- package/build/build-cjs/src/shared/booking/shared-confirmation.d.ts +25 -0
- package/build/build-cjs/src/shared/booking/shared-sidebar.d.ts +34 -0
- package/build/build-cjs/src/shared/booking/step-indicators.d.ts +7 -0
- package/build/build-cjs/src/shared/booking/summary.d.ts +43 -0
- package/build/build-cjs/src/shared/booking/travelers-form.d.ts +93 -0
- package/build/build-cjs/src/shared/components/flyin/flyin.d.ts +2 -0
- package/build/build-cjs/src/shared/components/flyin/packaging-flights-flyin.d.ts +2 -0
- package/build/build-cjs/src/shared/utils/booking-summary.d.ts +1 -0
- package/build/build-cjs/src/shared/utils/localization-util.d.ts +7 -0
- package/build/build-esm/index.js +3572 -2247
- package/build/build-esm/src/booking-wizard/components/step-route.d.ts +2 -2
- package/build/build-esm/src/booking-wizard/features/sidebar/sidebar-flight.d.ts +1 -0
- package/build/build-esm/src/booking-wizard/features/sidebar/sidebar-util.d.ts +2 -1
- package/build/build-esm/src/booking-wizard/features/sidebar/sidebar.d.ts +0 -31
- package/build/build-esm/src/booking-wizard/features/travelers-form/travelers-form.d.ts +1 -2
- package/build/build-esm/src/search-results/components/book-packaging-entry/index.d.ts +8 -0
- package/build/build-esm/src/search-results/components/book-packaging-entry/wl-sidebar.d.ts +7 -0
- package/build/build-esm/src/search-results/components/spinner/spinner.d.ts +4 -1
- package/build/build-esm/src/search-results/store/search-results-slice.d.ts +7 -1
- package/build/build-esm/src/search-results/types.d.ts +3 -0
- package/build/build-esm/src/shared/booking/booking-panel.d.ts +13 -0
- package/build/build-esm/src/shared/booking/shared-confirmation.d.ts +25 -0
- package/build/build-esm/src/shared/booking/shared-sidebar.d.ts +34 -0
- package/build/build-esm/src/shared/booking/step-indicators.d.ts +7 -0
- package/build/build-esm/src/shared/booking/summary.d.ts +43 -0
- package/build/build-esm/src/shared/booking/travelers-form.d.ts +93 -0
- package/build/build-esm/src/shared/components/flyin/flyin.d.ts +2 -0
- package/build/build-esm/src/shared/components/flyin/packaging-flights-flyin.d.ts +2 -0
- package/build/build-esm/src/shared/utils/booking-summary.d.ts +1 -0
- package/build/build-esm/src/shared/utils/localization-util.d.ts +7 -0
- package/package.json +2 -2
- package/src/booking-wizard/components/step-indicator.tsx +10 -31
- package/src/booking-wizard/components/step-route.tsx +39 -14
- package/src/booking-wizard/features/confirmation/confirmation.tsx +11 -55
- package/src/booking-wizard/features/sidebar/index.tsx +10 -4
- package/src/booking-wizard/features/sidebar/sidebar-flight.tsx +2 -2
- package/src/booking-wizard/features/sidebar/sidebar-util.ts +1 -5
- package/src/booking-wizard/features/sidebar/sidebar.tsx +331 -326
- package/src/booking-wizard/features/summary/summary.tsx +1 -1
- package/src/booking-wizard/features/travelers-form/travelers-form.tsx +84 -1010
- package/src/search-results/components/book-packaging-entry/index.tsx +229 -0
- package/src/search-results/components/book-packaging-entry/wl-sidebar.tsx +162 -0
- package/src/search-results/components/excursions/day-by-day-excursions.tsx +6 -2
- package/src/search-results/components/excursions/excursion-results.tsx +1 -1
- package/src/search-results/components/flight/flight-selection/independent-flight-selection.tsx +12 -3
- package/src/search-results/components/group-tour/group-tour-card.tsx +1 -1
- package/src/search-results/components/group-tour/group-tour-results.tsx +1 -1
- package/src/search-results/components/hotel/hotel-accommodation-results.tsx +6 -3
- package/src/search-results/components/itinerary/full-itinerary.tsx +1 -1
- package/src/search-results/components/itinerary/index.tsx +13 -12
- package/src/search-results/components/search-results-container/flight-search-results.tsx +1 -1
- package/src/search-results/components/search-results-container/search-results-container.tsx +280 -217
- package/src/search-results/components/spinner/spinner.tsx +12 -4
- package/src/search-results/store/search-results-slice.ts +22 -2
- package/src/search-results/types.ts +4 -0
- package/src/shared/booking/booking-panel.tsx +25 -0
- package/src/shared/booking/shared-confirmation.tsx +105 -0
- package/src/shared/booking/shared-sidebar.tsx +432 -0
- package/src/shared/booking/step-indicators.tsx +30 -0
- package/src/shared/booking/summary.tsx +380 -0
- package/src/shared/booking/travelers-form.tsx +870 -0
- package/src/shared/components/flyin/accommodation-flyin.tsx +3 -4
- package/src/shared/components/flyin/flights-flyin.tsx +1 -1
- package/src/shared/components/flyin/flyin.tsx +16 -9
- package/src/shared/components/flyin/group-tour-flyin.tsx +3 -4
- package/src/shared/components/flyin/packaging-flights-flyin.tsx +11 -4
- package/src/shared/components/icon.tsx +13 -0
- package/src/shared/translations/ar-SA.json +7 -1
- package/src/shared/translations/da-DK.json +7 -1
- package/src/shared/translations/de-DE.json +7 -1
- package/src/shared/translations/en-GB.json +8 -2
- package/src/shared/translations/es-ES.json +7 -1
- package/src/shared/translations/fr-BE.json +7 -1
- package/src/shared/translations/fr-FR.json +7 -1
- package/src/shared/translations/is-IS.json +7 -1
- package/src/shared/translations/it-IT.json +7 -1
- package/src/shared/translations/ja-JP.json +7 -1
- package/src/shared/translations/nl-BE.json +7 -1
- package/src/shared/translations/nl-NL.json +7 -1
- package/src/shared/translations/no-NO.json +7 -1
- package/src/shared/translations/pl-PL.json +7 -1
- package/src/shared/translations/pt-PT.json +7 -1
- package/src/shared/translations/sv-SE.json +7 -1
- package/src/shared/utils/booking-summary.tsx +46 -0
- package/src/shared/utils/localization-util.ts +8 -0
- package/src/shared/utils/tide-api-utils.ts +2 -2
- package/styles/components/_dropdown.scss +5 -0
- package/styles/components/_flyin.scss +43 -0
- package/styles/components/_loader.scss +82 -0
- package/styles/components/_search.scss +14 -2
- package/styles/content-blocks-variables.scss +14 -14
- /package/build/build-cjs/src/{booking-wizard/components → shared/booking}/product-card.d.ts +0 -0
- /package/build/build-esm/src/{booking-wizard/components → shared/booking}/product-card.d.ts +0 -0
- /package/src/{booking-wizard/components → shared/booking}/product-card.tsx +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
selectAgentAdressId,
|
|
2
3
|
selectDepartureFlight,
|
|
3
4
|
selectIncludedServiceTypes,
|
|
4
5
|
selectIsFetchingProductOptions,
|
|
@@ -7,7 +8,8 @@ import {
|
|
|
7
8
|
selectPackageRooms,
|
|
8
9
|
selectReturnFlight,
|
|
9
10
|
selectRoomOptionDepartureFlightsMetaData,
|
|
10
|
-
selectRoomOptionReturnFlightsMetaData
|
|
11
|
+
selectRoomOptionReturnFlightsMetaData,
|
|
12
|
+
selectTranslations
|
|
11
13
|
} from '../booking/selectors';
|
|
12
14
|
import { getDateText, getTravelersText } from './sidebar-util';
|
|
13
15
|
import { selectFormRooms } from '../travelers-form/travelers-form-slice';
|
|
@@ -26,7 +28,7 @@ import { useSelector } from 'react-redux';
|
|
|
26
28
|
|
|
27
29
|
import React from 'react';
|
|
28
30
|
import SettingsContext from '../../settings-context';
|
|
29
|
-
import
|
|
31
|
+
import SharedSidebar from '../../../shared/booking/shared-sidebar';
|
|
30
32
|
import { selectBookingAttributes } from '../booking/selectors';
|
|
31
33
|
import { useContext } from 'react';
|
|
32
34
|
|
|
@@ -39,7 +41,8 @@ const SidebarContainer: React.FC<SidebarProps> = ({ productName, thumbnailUrl })
|
|
|
39
41
|
const { sidebarHeaderComponent, sidebarFooterComponent, loaderComponent, showPricesPerPaxType } = useContext(SettingsContext);
|
|
40
42
|
const bookingAttributes = useSelector(selectBookingAttributes);
|
|
41
43
|
const rooms = useSelector(selectFormRooms);
|
|
42
|
-
const
|
|
44
|
+
const translations = useSelector(selectTranslations);
|
|
45
|
+
const travelerRooms = getTravelersText(rooms, translations);
|
|
43
46
|
const departureFlight = useSelector(selectDepartureFlight);
|
|
44
47
|
const departureFlightMetaData = departureFlight?.flightMetaData ?? useSelector(selectRoomOptionDepartureFlightsMetaData)?.[0];
|
|
45
48
|
const returnFlight = useSelector(selectReturnFlight);
|
|
@@ -50,9 +53,10 @@ const SidebarContainer: React.FC<SidebarProps> = ({ productName, thumbnailUrl })
|
|
|
50
53
|
const includedServiceTypes = useSelector(selectIncludedServiceTypes);
|
|
51
54
|
const isUnavailable = useSelector(selectIsUnavailable) || false;
|
|
52
55
|
const isLoading = isFetchingProductOptions || isFetchingPriceDetails;
|
|
56
|
+
const agent = useSelector(selectAgentAdressId);
|
|
53
57
|
|
|
54
58
|
return (
|
|
55
|
-
<
|
|
59
|
+
<SharedSidebar
|
|
56
60
|
productName={productName}
|
|
57
61
|
thumbnailUrl={thumbnailUrl}
|
|
58
62
|
isLoading={isLoading}
|
|
@@ -76,6 +80,8 @@ const SidebarContainer: React.FC<SidebarProps> = ({ productName, thumbnailUrl })
|
|
|
76
80
|
isUnavailable={isUnavailable}
|
|
77
81
|
basePricePerPaxType={showPricesPerPaxType ? useSelector(selectBasePricePerPaxType) : undefined}
|
|
78
82
|
seperateExtraPricePerPaxType={showPricesPerPaxType ? useSelector(selectSeparateExtraPriceDetailsPerPaxType) : undefined}
|
|
83
|
+
translations={translations}
|
|
84
|
+
agent={agent}
|
|
79
85
|
/>
|
|
80
86
|
);
|
|
81
87
|
};
|
|
@@ -8,13 +8,13 @@ import { getAirlines, getDateText, parseFlightLines } from './sidebar-util';
|
|
|
8
8
|
interface SidebarFlightProps {
|
|
9
9
|
title: string;
|
|
10
10
|
flightMetaData: BookingPackageFlightMetaData;
|
|
11
|
+
translations?: any;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
const SidebarFlight: React.FC<SidebarFlightProps> = ({ title, flightMetaData }) => {
|
|
14
|
+
const SidebarFlight: React.FC<SidebarFlightProps> = ({ title, flightMetaData, translations }) => {
|
|
14
15
|
const flightLines = parseFlightLines(flightMetaData);
|
|
15
16
|
const firstFlight = first(flightLines);
|
|
16
17
|
const lastFlight = last(flightLines);
|
|
17
|
-
const translations = useSelector(selectTranslations);
|
|
18
18
|
|
|
19
19
|
return (
|
|
20
20
|
<div className="pricing-summary__group">
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { BookingPackageFlightMetaData } from '@qite/tide-client/build/types';
|
|
2
2
|
import { differenceInCalendarDays, format, parseISO } from 'date-fns';
|
|
3
3
|
import { compact, orderBy, uniq } from 'lodash';
|
|
4
|
-
import { useSelector } from 'react-redux';
|
|
5
4
|
import { FlightLine, RoomTraveler } from '../../types';
|
|
6
|
-
import { selectTranslations } from '../booking/selectors';
|
|
7
|
-
|
|
8
|
-
export const getTravelersText = (rooms: { adults: RoomTraveler[]; children: RoomTraveler[] }[]): string[] => {
|
|
9
|
-
const translations = useSelector(selectTranslations);
|
|
10
5
|
|
|
6
|
+
export const getTravelersText = (rooms: { adults: RoomTraveler[]; children: RoomTraveler[] }[], translations: any): string[] => {
|
|
11
7
|
return rooms.map((r) =>
|
|
12
8
|
compact([
|
|
13
9
|
r.adults.length,
|