@qite/tide-booking-component 1.4.101 → 1.4.102
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 +821 -403
- package/build/build-cjs/src/index.d.ts +3 -1
- package/build/build-cjs/src/search-results/store/search-results-slice.d.ts +8 -1
- package/build/build-cjs/src/search-results/types.d.ts +3 -1
- package/build/build-cjs/src/search-results/utils/flight-utils.d.ts +1 -0
- package/build/build-esm/index.js +821 -397
- package/build/build-esm/src/index.d.ts +3 -1
- package/build/build-esm/src/search-results/store/search-results-slice.d.ts +8 -1
- package/build/build-esm/src/search-results/types.d.ts +3 -1
- package/build/build-esm/src/search-results/utils/flight-utils.d.ts +1 -0
- package/package.json +2 -2
- package/src/index.ts +3 -1
- package/src/search-results/components/flight/flight-selection/independent-flight-option.tsx +1 -7
- package/src/search-results/components/flight/flight-selection/independent-flight-selection.tsx +2 -6
- package/src/search-results/components/itinerary/index.tsx +0 -2
- package/src/search-results/components/search-results-container/search-results-container.tsx +641 -77
- package/src/search-results/store/search-results-slice.ts +20 -1
- package/src/search-results/types.ts +3 -1
- package/src/search-results/utils/flight-utils.ts +5 -0
- package/src/shared/components/flyin/accommodation-flyin.tsx +4 -2
|
@@ -13,6 +13,7 @@ import PhotoGallery from './content/components/gallery';
|
|
|
13
13
|
import Breadcrumbs from './content/components/breadcrumb';
|
|
14
14
|
import FAQ from './content/components/faq';
|
|
15
15
|
import FeaturedTrips from './content/featured-trips';
|
|
16
|
+
import Spinner from './search-results/components/spinner/spinner';
|
|
16
17
|
export * from './content/navbar/types';
|
|
17
18
|
export * from './content/header/types';
|
|
18
19
|
export * from './content/footer/types';
|
|
@@ -38,5 +39,6 @@ export {
|
|
|
38
39
|
PhotoGallery,
|
|
39
40
|
Breadcrumbs,
|
|
40
41
|
FAQ,
|
|
41
|
-
FeaturedTrips
|
|
42
|
+
FeaturedTrips,
|
|
43
|
+
Spinner
|
|
42
44
|
};
|
|
@@ -5,7 +5,8 @@ import {
|
|
|
5
5
|
BookingPriceDetails,
|
|
6
6
|
ClientPortalItinerary,
|
|
7
7
|
PackagingAccommodationResponse,
|
|
8
|
-
PackagingEntry
|
|
8
|
+
PackagingEntry,
|
|
9
|
+
PackagingFlightResponse
|
|
9
10
|
} from '@qite/tide-client/build/types';
|
|
10
11
|
export interface SearchResultsState {
|
|
11
12
|
results: BookingPackageItem[];
|
|
@@ -15,10 +16,13 @@ export interface SearchResultsState {
|
|
|
15
16
|
filteredPackagingAccoResults: PackagingAccommodationResponse[];
|
|
16
17
|
packagingAccoSearchDetails: PackagingAccommodationResponse[];
|
|
17
18
|
selectedPackagingAccoResultCode: string | null;
|
|
19
|
+
packagingFlightResults: PackagingFlightResponse[];
|
|
20
|
+
selectedPackagingFlight: PackagingFlightResponse | null;
|
|
18
21
|
selectedFlight: ExtendedFlightSearchResponseItem | null;
|
|
19
22
|
selectedFlightDetails: ExtendedFlightSearchResponseItem | null;
|
|
20
23
|
bookingPackageDetails: BookingPackage | null;
|
|
21
24
|
isLoading: boolean;
|
|
25
|
+
flightsLoading: boolean;
|
|
22
26
|
filters: Filter[];
|
|
23
27
|
selectedSortType: SortByType | null;
|
|
24
28
|
activeTab: string | null;
|
|
@@ -43,6 +47,8 @@ export declare const setResults: import('@reduxjs/toolkit').ActionCreatorWithPay
|
|
|
43
47
|
'searchResults/setPackagingAccoSearchDetails'
|
|
44
48
|
>,
|
|
45
49
|
setSelectedPackagingAccoResult: import('@reduxjs/toolkit').ActionCreatorWithPayload<string | null, 'searchResults/setSelectedPackagingAccoResult'>,
|
|
50
|
+
setPackagingFlightResults: import('@reduxjs/toolkit').ActionCreatorWithPayload<PackagingFlightResponse[], 'searchResults/setPackagingFlightResults'>,
|
|
51
|
+
setSelectedPackagingFlight: import('@reduxjs/toolkit').ActionCreatorWithPayload<PackagingFlightResponse | null, 'searchResults/setSelectedPackagingFlight'>,
|
|
46
52
|
setSelectedFlight: import('@reduxjs/toolkit').ActionCreatorWithPayload<ExtendedFlightSearchResponseItem | null, 'searchResults/setSelectedFlight'>,
|
|
47
53
|
setSelectedFlightDetails: import('@reduxjs/toolkit').ActionCreatorWithPayload<
|
|
48
54
|
ExtendedFlightSearchResponseItem | null,
|
|
@@ -62,6 +68,7 @@ export declare const setResults: import('@reduxjs/toolkit').ActionCreatorWithPay
|
|
|
62
68
|
'searchResults/selectFlight'
|
|
63
69
|
>,
|
|
64
70
|
setIsLoading: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, 'searchResults/setIsLoading'>,
|
|
71
|
+
setFlightsLoading: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, 'searchResults/setFlightsLoading'>,
|
|
65
72
|
setFilters: import('@reduxjs/toolkit').ActionCreatorWithPayload<Filter[], 'searchResults/setFilters'>,
|
|
66
73
|
resetFilters: import('@reduxjs/toolkit').ActionCreatorWithPayload<Filter[], 'searchResults/resetFilters'>,
|
|
67
74
|
setSortType: import('@reduxjs/toolkit').ActionCreatorWithPayload<SortByType | null, 'searchResults/setSortType'>,
|
|
@@ -42,7 +42,7 @@ export interface SearchResultsConfiguration {
|
|
|
42
42
|
alt: string;
|
|
43
43
|
};
|
|
44
44
|
onBook?: (result: BookingPackage) => void;
|
|
45
|
-
packagingEntry?: PackagingEntry;
|
|
45
|
+
packagingEntry?: PackagingEntry | null;
|
|
46
46
|
}
|
|
47
47
|
export type FilterType = 'checkbox' | 'toggle' | 'slider' | 'star-rating';
|
|
48
48
|
export type FilterProperty = 'regime' | 'accommodation' | 'max-duration' | 'price' | 'rating' | 'theme';
|
|
@@ -161,6 +161,8 @@ export type SearchSeed = {
|
|
|
161
161
|
tagId?: number | null;
|
|
162
162
|
departureAirport?: string | null;
|
|
163
163
|
returnAirport?: string | null;
|
|
164
|
+
travelClass?: string | null;
|
|
165
|
+
nationality?: string | null;
|
|
164
166
|
destinationAirport?: string | null;
|
|
165
167
|
rooms: BookingPackageRequestRoom[];
|
|
166
168
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FlightSearchResponseFlight, FlightSearchResponseFlightSegment } from '@qite/tide-client';
|
|
2
2
|
import { ExtendedFlightSearchResponseItem } from '../types';
|
|
3
3
|
import { DepartureRange } from '../../shared/types';
|
|
4
|
+
export declare const getFlightKey: (segments: FlightSearchResponseFlightSegment[]) => string;
|
|
4
5
|
export declare const getOutwardFlight: (flightResult: ExtendedFlightSearchResponseItem) => FlightSearchResponseFlight | undefined;
|
|
5
6
|
export declare const getFlightSegments: (flight: FlightSearchResponseFlight | undefined) => FlightSearchResponseFlightSegment[];
|
|
6
7
|
export declare const getDepartureSegment: (flight: FlightSearchResponseFlight | undefined) => FlightSearchResponseFlightSegment | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qite/tide-booking-component",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.102",
|
|
4
4
|
"description": "React Booking wizard & Booking product component for Tide",
|
|
5
5
|
"main": "build/build-cjs/index.js",
|
|
6
6
|
"types": "build/build-cjs/src/index.d.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@jsonurl/jsonurl": "^1.1.4",
|
|
31
31
|
"@popperjs/core": "^2.10.2",
|
|
32
|
-
"@qite/tide-client": "^1.1.
|
|
32
|
+
"@qite/tide-client": "^1.1.162",
|
|
33
33
|
"@reduxjs/toolkit": "^2.8.2",
|
|
34
34
|
"@rollup/plugin-commonjs": "^19.0.1",
|
|
35
35
|
"@rollup/plugin-json": "^4.1.0",
|
package/src/index.ts
CHANGED
|
@@ -13,6 +13,7 @@ import PhotoGallery from './content/components/gallery';
|
|
|
13
13
|
import Breadcrumbs from './content/components/breadcrumb';
|
|
14
14
|
import FAQ from './content/components/faq';
|
|
15
15
|
import FeaturedTrips from './content/featured-trips';
|
|
16
|
+
import Spinner from './search-results/components/spinner/spinner';
|
|
16
17
|
|
|
17
18
|
export * from './content/navbar/types';
|
|
18
19
|
export * from './content/header/types';
|
|
@@ -40,5 +41,6 @@ export {
|
|
|
40
41
|
PhotoGallery,
|
|
41
42
|
Breadcrumbs,
|
|
42
43
|
FAQ,
|
|
43
|
-
FeaturedTrips
|
|
44
|
+
FeaturedTrips,
|
|
45
|
+
Spinner
|
|
44
46
|
};
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import React, { useContext, useState } from 'react';
|
|
2
|
-
import { durationTicksInHoursString,
|
|
2
|
+
import { durationTicksInHoursString, getTranslations, longFormatDate, timeFromDateTime } from '../../../../shared/utils/localization-util';
|
|
3
3
|
import Icon from '../../icon';
|
|
4
|
-
import { ExtendedFlightSearchResponseItem } from '../../../types';
|
|
5
4
|
import SearchResultsConfigurationContext from '../../../search-results-configuration-context';
|
|
6
5
|
import { getArrivalSegment, getDepartureSegment, getFlightSegments, getNumberOfStopsLabel } from '../../../utils/flight-utils';
|
|
7
|
-
import { useDispatch, useSelector } from 'react-redux';
|
|
8
|
-
import { setFlyInIsOpen, setSelectedFlight } from '../../../store/search-results-slice';
|
|
9
|
-
import { SearchResultsRootState } from '../../../store/search-results-store';
|
|
10
|
-
import { useFlightSearch } from '../flight-search-context';
|
|
11
6
|
import { FlightSearchResponseFlight } from '@qite/tide-client';
|
|
12
7
|
|
|
13
8
|
interface IndependentFlightOptionProps {
|
|
@@ -19,7 +14,6 @@ interface IndependentFlightOptionProps {
|
|
|
19
14
|
}
|
|
20
15
|
|
|
21
16
|
const IndependentFlightOption: React.FC<IndependentFlightOptionProps> = ({ item, onSelect, guid, selectedGuid, isOutward }) => {
|
|
22
|
-
const dispatch = useDispatch();
|
|
23
17
|
const context = useContext(SearchResultsConfigurationContext);
|
|
24
18
|
const language = context?.languageCode ?? 'en-GB';
|
|
25
19
|
const translations = getTranslations(language);
|
package/src/search-results/components/flight/flight-selection/independent-flight-selection.tsx
CHANGED
|
@@ -5,20 +5,15 @@ import SearchResultsConfigurationContext from '../../../search-results-configura
|
|
|
5
5
|
import { getTranslations } from '../../../../shared/utils/localization-util';
|
|
6
6
|
import { FlightSearchResponseFlightSegment } from '@qite/tide-client';
|
|
7
7
|
import IndependentFlightOption from './independent-flight-option';
|
|
8
|
-
import PairedFlightOption from './paired-flight-option';
|
|
9
8
|
import { useDispatch } from 'react-redux';
|
|
10
9
|
import { setFlyInIsOpen, setSelectedFlight } from '../../../store/search-results-slice';
|
|
11
10
|
import { useFlightSearch } from '../flight-search-context';
|
|
11
|
+
import { getFlightKey } from '../../../utils/flight-utils';
|
|
12
12
|
|
|
13
13
|
interface IndependentFlightSelectionProps {
|
|
14
14
|
searchResults: ExtendedFlightSearchResponseItem[];
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
const getFlightKey = (segments: FlightSearchResponseFlightSegment[]) => {
|
|
18
|
-
if (!segments || segments.length === 0) return '';
|
|
19
|
-
return segments.map((s) => `${s.marketingAirlineCode}${s.flightNumber}_${s.departureDateTime}`).join('_');
|
|
20
|
-
};
|
|
21
|
-
|
|
22
17
|
const IndependentFlightSelection: React.FC<IndependentFlightSelectionProps> = ({ searchResults }) => {
|
|
23
18
|
const dispatch = useDispatch();
|
|
24
19
|
|
|
@@ -133,6 +128,7 @@ const IndependentFlightSelection: React.FC<IndependentFlightSelectionProps> = ({
|
|
|
133
128
|
))
|
|
134
129
|
)}
|
|
135
130
|
</div>
|
|
131
|
+
|
|
136
132
|
<div className="search__results__label search__results__label--secondary">
|
|
137
133
|
<div className="search__results__label__date">
|
|
138
134
|
<Icon name="ui-flight" height={16} fill="white" />
|
|
@@ -148,8 +148,6 @@ const Itinerary: React.FC<ItineraryProps> = ({ isOpen, handleSetIsOpen, isLoadin
|
|
|
148
148
|
key,
|
|
149
149
|
segments
|
|
150
150
|
}));
|
|
151
|
-
console.log('otherSegments', otherSegments);
|
|
152
|
-
console.log('groupedOtherSegments', groupedOtherSegments);
|
|
153
151
|
|
|
154
152
|
const numberOfPax = packagingEntry.pax?.length || 1;
|
|
155
153
|
const totalPrice = priceDetails?.total || packagingEntry.price || 0;
|