@qite/tide-booking-component 1.4.97 → 1.4.99
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 +1423 -975
- package/build/build-cjs/src/search-results/components/itinerary/index.d.ts +2 -0
- package/build/build-cjs/src/search-results/store/search-results-slice.d.ts +9 -10
- package/build/build-cjs/src/search-results/types.d.ts +24 -1
- package/build/build-cjs/src/search-results/utils/packaging-utils.d.ts +7 -0
- package/build/build-cjs/src/search-results/utils/query-utils.d.ts +11 -0
- package/build/build-cjs/src/shared/components/flyin/accommodation-flyin.d.ts +1 -2
- package/build/build-cjs/src/shared/components/flyin/flyin.d.ts +4 -0
- package/build/build-cjs/src/shared/utils/localization-util.d.ts +1 -0
- package/build/build-esm/index.js +1419 -965
- package/build/build-esm/src/search-results/components/itinerary/index.d.ts +2 -0
- package/build/build-esm/src/search-results/store/search-results-slice.d.ts +9 -10
- package/build/build-esm/src/search-results/types.d.ts +24 -1
- package/build/build-esm/src/search-results/utils/packaging-utils.d.ts +7 -0
- package/build/build-esm/src/search-results/utils/query-utils.d.ts +11 -0
- package/build/build-esm/src/shared/components/flyin/accommodation-flyin.d.ts +1 -2
- package/build/build-esm/src/shared/components/flyin/flyin.d.ts +4 -0
- package/build/build-esm/src/shared/utils/localization-util.d.ts +1 -0
- package/package.json +2 -2
- package/src/qsm/components/search-input-group/index.tsx +0 -1
- package/src/search-results/components/itinerary/index.tsx +331 -234
- package/src/search-results/components/search-results-container/search-results-container.tsx +444 -383
- package/src/search-results/store/search-results-slice.ts +22 -10
- package/src/search-results/types.ts +26 -1
- package/src/search-results/utils/packaging-utils.ts +75 -0
- package/src/search-results/utils/query-utils.ts +152 -0
- package/src/shared/components/flyin/accommodation-flyin.tsx +10 -11
- package/src/shared/components/flyin/flyin.tsx +52 -4
- package/styles/components/_flyin.scss +25 -0
- package/styles/components/_search.scss +28 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { PackagingEntryLine } from '@qite/tide-client';
|
|
2
3
|
interface ItineraryProps {
|
|
3
4
|
isOpen: boolean;
|
|
4
5
|
handleSetIsOpen: () => void;
|
|
5
6
|
isLoading?: boolean;
|
|
7
|
+
onEditAccommodation?: (segments: PackagingEntryLine[]) => void;
|
|
6
8
|
}
|
|
7
9
|
declare const Itinerary: React.FC<ItineraryProps>;
|
|
8
10
|
export default Itinerary;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExtendedFlightSearchResponseItem, Filter, SortByType } from '../types';
|
|
2
|
-
import { BookingPackage, BookingPackageItem,
|
|
1
|
+
import { AccommodationFlyInStep, ExtendedFlightSearchResponseItem, Filter, SortByType } from '../types';
|
|
2
|
+
import { BookingPackage, BookingPackageItem, PackagingAccommodationResponse, PackagingEntry } from '@qite/tide-client/build/types';
|
|
3
3
|
export interface SearchResultsState {
|
|
4
4
|
results: BookingPackageItem[];
|
|
5
5
|
filteredResults: BookingPackageItem[];
|
|
@@ -11,13 +11,15 @@ export interface SearchResultsState {
|
|
|
11
11
|
selectedFlight: ExtendedFlightSearchResponseItem | null;
|
|
12
12
|
selectedFlightDetails: ExtendedFlightSearchResponseItem | null;
|
|
13
13
|
bookingPackageDetails: BookingPackage | null;
|
|
14
|
-
entry: EntryLight | null;
|
|
15
14
|
isLoading: boolean;
|
|
16
15
|
filters: Filter[];
|
|
17
16
|
selectedSortType: SortByType | null;
|
|
18
17
|
activeTab: string | null;
|
|
19
18
|
currentPage: number;
|
|
20
19
|
flyInIsOpen: boolean;
|
|
20
|
+
editablePackagingEntry: PackagingEntry | null;
|
|
21
|
+
transactionId: string | null;
|
|
22
|
+
accommodationFlyInStep: AccommodationFlyInStep;
|
|
21
23
|
}
|
|
22
24
|
export declare const setResults: import('@reduxjs/toolkit').ActionCreatorWithPayload<BookingPackageItem[], 'searchResults/setResults'>,
|
|
23
25
|
setFilteredResults: import('@reduxjs/toolkit').ActionCreatorWithPayload<BookingPackageItem[], 'searchResults/setFilteredResults'>,
|
|
@@ -43,12 +45,6 @@ export declare const setResults: import('@reduxjs/toolkit').ActionCreatorWithPay
|
|
|
43
45
|
},
|
|
44
46
|
'searchResults/setBookingPackageDetails'
|
|
45
47
|
>,
|
|
46
|
-
setEntry: import('@reduxjs/toolkit').ActionCreatorWithPayload<
|
|
47
|
-
{
|
|
48
|
-
entry: EntryLight;
|
|
49
|
-
},
|
|
50
|
-
'searchResults/setEntry'
|
|
51
|
-
>,
|
|
52
48
|
selectFlight: import('@reduxjs/toolkit').ActionCreatorWithPayload<
|
|
53
49
|
{
|
|
54
50
|
flightOptionId: string;
|
|
@@ -63,6 +59,9 @@ export declare const setResults: import('@reduxjs/toolkit').ActionCreatorWithPay
|
|
|
63
59
|
setActiveTab: import('@reduxjs/toolkit').ActionCreatorWithPayload<string | null, 'searchResults/setActiveTab'>,
|
|
64
60
|
setCurrentPage: import('@reduxjs/toolkit').ActionCreatorWithPayload<number, 'searchResults/setCurrentPage'>,
|
|
65
61
|
resetSearchState: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<'searchResults/resetSearchState'>,
|
|
66
|
-
setFlyInIsOpen: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, 'searchResults/setFlyInIsOpen'
|
|
62
|
+
setFlyInIsOpen: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, 'searchResults/setFlyInIsOpen'>,
|
|
63
|
+
setEditablePackagingEntry: import('@reduxjs/toolkit').ActionCreatorWithPayload<PackagingEntry | null, 'searchResults/setEditablePackagingEntry'>,
|
|
64
|
+
setTransactionId: import('@reduxjs/toolkit').ActionCreatorWithPayload<string | null, 'searchResults/setTransactionId'>,
|
|
65
|
+
setAccommodationFlyInStep: import('@reduxjs/toolkit').ActionCreatorWithPayload<AccommodationFlyInStep, 'searchResults/setAccommodationFlyInStep'>;
|
|
67
66
|
declare const _default: import('@reduxjs/toolkit').Reducer<SearchResultsState>;
|
|
68
67
|
export default _default;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
BookingPackage,
|
|
3
|
+
BookingPackageRequestRoom,
|
|
4
|
+
FlightSearchResponseItem,
|
|
5
|
+
PackagingEntry,
|
|
6
|
+
WebsiteConfigurationSearchConfiguration
|
|
7
|
+
} from '@qite/tide-client';
|
|
2
8
|
import { ReactNode } from 'react';
|
|
3
9
|
export type FlightSelectionMode = 'paired' | 'independent';
|
|
4
10
|
export interface SearchResultsConfiguration {
|
|
@@ -36,6 +42,7 @@ export interface SearchResultsConfiguration {
|
|
|
36
42
|
alt: string;
|
|
37
43
|
};
|
|
38
44
|
onBook?: (result: BookingPackage) => void;
|
|
45
|
+
packagingEntry?: PackagingEntry;
|
|
39
46
|
}
|
|
40
47
|
export type FilterType = 'checkbox' | 'toggle' | 'slider' | 'star-rating';
|
|
41
48
|
export type FilterProperty = 'regime' | 'accommodation' | 'max-duration' | 'price' | 'rating' | 'theme';
|
|
@@ -142,3 +149,19 @@ export interface TideTag {
|
|
|
142
149
|
id: number;
|
|
143
150
|
name: string;
|
|
144
151
|
}
|
|
152
|
+
export type SearchSeed = {
|
|
153
|
+
fromDate: string;
|
|
154
|
+
toDate: string;
|
|
155
|
+
country?: number | null;
|
|
156
|
+
region?: number | null;
|
|
157
|
+
oord?: number | null;
|
|
158
|
+
location?: number | null;
|
|
159
|
+
hotel?: number | null;
|
|
160
|
+
hotelCode?: string | null;
|
|
161
|
+
tagId?: number | null;
|
|
162
|
+
departureAirport?: string | null;
|
|
163
|
+
returnAirport?: string | null;
|
|
164
|
+
destinationAirport?: string | null;
|
|
165
|
+
rooms: BookingPackageRequestRoom[];
|
|
166
|
+
};
|
|
167
|
+
export type AccommodationFlyInStep = 'results' | 'details';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BookingPackageRequestRoom, PackagingAccommodationResponse, PackagingEntry, PackagingEntryLine } from '@qite/tide-client';
|
|
2
|
+
export declare const getSelectedOptionsPerRoom: (details: PackagingAccommodationResponse[]) => {
|
|
3
|
+
roomIndex: number;
|
|
4
|
+
option: import('@qite/tide-client').PackageMainOption;
|
|
5
|
+
}[];
|
|
6
|
+
export declare const getRoomIndexFromLine: (line: PackagingEntryLine) => number;
|
|
7
|
+
export declare const getRequestRoomsFromPackagingSegments: (entry: PackagingEntry, segments: PackagingEntryLine[]) => BookingPackageRequestRoom[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PackagingEntryLine, PackagingEntry, BookingPackageRequestRoom, PackagingRoom } from '@qite/tide-client';
|
|
2
|
+
export declare const GROUP_TOUR_SERVICE_TYPE = 1;
|
|
3
|
+
export declare const ACCOMMODATION_SERVICE_TYPE = 3;
|
|
4
|
+
export declare const FLIGHT_SERVICE_TYPE = 7;
|
|
5
|
+
export declare const toDateOnlyString: (value: string | Date) => string;
|
|
6
|
+
export declare const getPrimaryAccommodationLine: (lines: PackagingEntryLine[]) => PackagingEntryLine | undefined;
|
|
7
|
+
export declare const getDepartureAirportFromEntry: (lines: PackagingEntryLine[]) => string | null;
|
|
8
|
+
export declare const getDestinationAirportFromEntry: (lines: PackagingEntryLine[]) => string | null;
|
|
9
|
+
export declare const getRequestRoomsFromPackagingEntry: (entry: PackagingEntry) => BookingPackageRequestRoom[];
|
|
10
|
+
export declare const parseHotelId: (line?: PackagingEntryLine) => number | null;
|
|
11
|
+
export declare const getPackagingRequestRoomsFromBookingRooms: (rooms: BookingPackageRequestRoom[] | null) => PackagingRoom[];
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
type AccommodationFlyInProps = {
|
|
3
3
|
isLoading: boolean;
|
|
4
|
-
|
|
5
|
-
setIsOpen: (open: boolean) => void;
|
|
4
|
+
handleConfirm: () => void;
|
|
6
5
|
};
|
|
7
6
|
declare const AccommodationFlyIn: React.FC<AccommodationFlyInProps>;
|
|
8
7
|
export default AccommodationFlyIn;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PortalQsmType } from '@qite/tide-client';
|
|
3
|
+
import { AccommodationFlyInStep } from '../../../search-results/types';
|
|
3
4
|
type FlyInProps = {
|
|
4
5
|
title: string;
|
|
5
6
|
srpType: PortalQsmType;
|
|
@@ -8,6 +9,9 @@ type FlyInProps = {
|
|
|
8
9
|
className?: string;
|
|
9
10
|
onPanelRef?: (el: HTMLDivElement | null) => void;
|
|
10
11
|
detailsLoading: boolean;
|
|
12
|
+
handleConfirm?: () => void;
|
|
13
|
+
accommodationStep?: AccommodationFlyInStep;
|
|
14
|
+
isPackageEditFlow?: boolean;
|
|
11
15
|
};
|
|
12
16
|
declare const FlyIn: React.FC<FlyInProps>;
|
|
13
17
|
export default FlyIn;
|
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.99",
|
|
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.155",
|
|
33
33
|
"@reduxjs/toolkit": "^2.8.2",
|
|
34
34
|
"@rollup/plugin-commonjs": "^19.0.1",
|
|
35
35
|
"@rollup/plugin-json": "^4.1.0",
|