@qite/tide-booking-component 1.4.38 → 1.4.40
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-wizard/types.d.ts +1 -0
- package/build/build-cjs/content/components/login.d.ts +3 -0
- package/build/build-cjs/index.js +7618 -1952
- package/build/build-cjs/qsm/components/double-search-input-group/index.d.ts +2 -1
- package/build/build-cjs/qsm/components/search-input/index.d.ts +1 -0
- package/build/build-cjs/qsm/components/search-input-group/index.d.ts +3 -1
- package/build/build-cjs/qsm/store/qsm-slice.d.ts +6 -2
- package/build/build-cjs/qsm/types.d.ts +17 -32
- package/build/build-cjs/search-results/components/filters/flight-filters.d.ts +8 -0
- package/build/build-cjs/search-results/components/flight/flight-accommodation-results.d.ts +4 -1
- package/build/build-cjs/search-results/components/flight/flight-option.d.ts +7 -0
- package/build/build-cjs/search-results/components/flight/flight-search-context/index.d.ts +36 -0
- package/build/build-cjs/search-results/components/icon.d.ts +1 -0
- package/build/build-cjs/search-results/components/item-picker/index.d.ts +5 -3
- package/build/build-cjs/search-results/components/search-results-container/flight-search-results.d.ts +6 -0
- package/build/build-cjs/search-results/store/search-results-slice.d.ts +2 -0
- package/build/build-cjs/search-results/types.d.ts +31 -1
- package/build/build-cjs/search-results/utils/flight-utils.d.ts +16 -0
- package/build/build-cjs/shared/components/flyin.d.ts +9 -0
- package/build/build-cjs/shared/types.d.ts +6 -0
- package/build/build-cjs/shared/utils/localization-util.d.ts +91 -0
- package/build/build-esm/booking-wizard/types.d.ts +1 -0
- package/build/build-esm/content/components/login.d.ts +3 -0
- package/build/build-esm/index.js +8053 -2356
- package/build/build-esm/qsm/components/double-search-input-group/index.d.ts +2 -1
- package/build/build-esm/qsm/components/search-input/index.d.ts +1 -0
- package/build/build-esm/qsm/components/search-input-group/index.d.ts +3 -1
- package/build/build-esm/qsm/store/qsm-slice.d.ts +6 -2
- package/build/build-esm/qsm/types.d.ts +17 -32
- package/build/build-esm/search-results/components/filters/flight-filters.d.ts +8 -0
- package/build/build-esm/search-results/components/flight/flight-accommodation-results.d.ts +4 -1
- package/build/build-esm/search-results/components/flight/flight-option.d.ts +7 -0
- package/build/build-esm/search-results/components/flight/flight-search-context/index.d.ts +36 -0
- package/build/build-esm/search-results/components/icon.d.ts +1 -0
- package/build/build-esm/search-results/components/item-picker/index.d.ts +5 -3
- package/build/build-esm/search-results/components/search-results-container/flight-search-results.d.ts +6 -0
- package/build/build-esm/search-results/store/search-results-slice.d.ts +2 -0
- package/build/build-esm/search-results/types.d.ts +31 -1
- package/build/build-esm/search-results/utils/flight-utils.d.ts +16 -0
- package/build/build-esm/shared/components/flyin.d.ts +9 -0
- package/build/build-esm/shared/types.d.ts +6 -0
- package/build/build-esm/shared/utils/localization-util.d.ts +91 -0
- package/package.json +4 -3
- package/rollup.config.js +2 -2
- package/src/booking-product/components/dates.tsx +1 -1
- package/src/booking-wizard/features/booking/booking-slice.ts +4 -2
- package/src/booking-wizard/types.ts +1 -0
- package/src/content/components/login.tsx +162 -0
- package/src/content/components/slider.tsx +1 -1
- package/src/content/features/content-page/content-page-self-contained.tsx +56 -75
- package/src/qsm/components/QSMContainer/qsm-container.tsx +197 -75
- package/src/qsm/components/double-search-input-group/index.tsx +14 -75
- package/src/qsm/components/mobile-filter-modal/index.tsx +18 -11
- package/src/qsm/components/search-input/index.tsx +9 -2
- package/src/qsm/components/search-input-group/index.tsx +19 -31
- package/src/qsm/components/travel-class-picker/index.tsx +1 -0
- package/src/qsm/components/travel-input/index.tsx +4 -4
- package/src/qsm/components/travel-input-group/index.tsx +4 -3
- package/src/qsm/components/travel-nationality-picker/index.tsx +1 -0
- package/src/qsm/components/travel-type-picker/index.tsx +1 -0
- package/src/qsm/qsm-configuration-context.ts +6 -17
- package/src/qsm/store/qsm-slice.ts +13 -1
- package/src/qsm/types.ts +19 -39
- package/src/search-results/components/filters/flight-filters.tsx +671 -0
- package/src/search-results/components/flight/flight-accommodation-results.tsx +20 -562
- package/src/search-results/components/flight/flight-banner.tsx +1 -1
- package/src/search-results/components/flight/flight-option.tsx +243 -0
- package/src/search-results/components/flight/flight-search-context/index.tsx +508 -0
- package/src/search-results/components/hotel/hotel-card.tsx +0 -1
- package/src/search-results/components/icon.tsx +84 -44
- package/src/search-results/components/item-picker/index.tsx +16 -11
- package/src/search-results/components/search-results-container/flight-search-results.tsx +120 -0
- package/src/search-results/components/search-results-container/search-results-container.tsx +85 -70
- package/src/search-results/store/search-results-slice.ts +6 -0
- package/src/search-results/types.ts +37 -1
- package/src/search-results/utils/flight-utils.ts +106 -0
- package/src/shared/components/flyin.tsx +334 -0
- package/src/shared/translations/ar-SA.json +13 -1
- package/src/shared/translations/da-DK.json +13 -1
- package/src/shared/translations/de-DE.json +13 -1
- package/src/shared/translations/en-GB.json +13 -1
- package/src/shared/translations/es-ES.json +13 -1
- package/src/shared/translations/fr-BE.json +13 -1
- package/src/shared/translations/fr-FR.json +13 -1
- package/src/shared/translations/is-IS.json +13 -1
- package/src/shared/translations/it-IT.json +13 -1
- package/src/shared/translations/ja-JP.json +13 -1
- package/src/shared/translations/nl-BE.json +13 -1
- package/src/shared/translations/nl-NL.json +13 -1
- package/src/shared/translations/no-NO.json +13 -1
- package/src/shared/translations/pl-PL.json +13 -1
- package/src/shared/translations/pt-PT.json +13 -1
- package/src/shared/translations/sv-SE.json +13 -1
- package/src/shared/types.ts +7 -0
- package/src/shared/utils/localization-util.ts +71 -0
- package/styles/booking-search-results.scss +1 -0
- package/styles/components/_flyin.scss +550 -0
- package/styles/components/_login.scss +133 -0
- package/styles/content-blocks.scss +1 -0
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { BaseFieldConfig } from '../../types';
|
|
2
3
|
interface Props {
|
|
3
|
-
|
|
4
|
+
fieldConfig: BaseFieldConfig;
|
|
4
5
|
enableMobileFilter?: boolean;
|
|
5
6
|
highlightTarget?: string;
|
|
6
7
|
isSecondInput?: boolean;
|
|
7
8
|
isDoubleInput?: boolean;
|
|
8
9
|
readOnlyForced?: boolean;
|
|
10
|
+
isDisabled?: boolean;
|
|
9
11
|
}
|
|
10
12
|
declare const SearchInputGroup: React.FC<Props>;
|
|
11
13
|
export default SearchInputGroup;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { MobileFilterType, Room, TravelerType, TravelType, TravelClass, TypeaheadOption } from '../types';
|
|
1
|
+
import { MobileFilterType, Room, TravelerType, TravelType, TravelClass, TypeaheadOption, QsmType } from '../types';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
export interface QSMState {
|
|
4
|
+
qsmType?: QsmType;
|
|
4
5
|
selectedOrigin?: string;
|
|
5
6
|
selectedDestination?: string;
|
|
6
7
|
selectedAirport?: string;
|
|
@@ -31,6 +32,7 @@ export interface QSMState {
|
|
|
31
32
|
after: number;
|
|
32
33
|
};
|
|
33
34
|
travelTypes: TravelType[];
|
|
35
|
+
tripType: 'oneway' | 'roundtrip' | 'openjaw';
|
|
34
36
|
selectedTravelType?: string;
|
|
35
37
|
travelClasses: TravelClass[];
|
|
36
38
|
selectedTravelClass?: string;
|
|
@@ -45,7 +47,8 @@ export interface QSMState {
|
|
|
45
47
|
rooms: Room[];
|
|
46
48
|
[key: string]: any;
|
|
47
49
|
}
|
|
48
|
-
export declare const
|
|
50
|
+
export declare const setSelectedQsmType: import('@reduxjs/toolkit').ActionCreatorWithPayload<QsmType, 'qsm/setSelectedQsmType'>,
|
|
51
|
+
setOrigin: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, 'qsm/setOrigin'>,
|
|
49
52
|
setDestination: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, 'qsm/setDestination'>,
|
|
50
53
|
setAirport: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, 'qsm/setAirport'>,
|
|
51
54
|
setFromDate: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<string | undefined, 'qsm/setFromDate'>,
|
|
@@ -85,6 +88,7 @@ export declare const setOrigin: import('@reduxjs/toolkit').ActionCreatorWithPayl
|
|
|
85
88
|
| undefined,
|
|
86
89
|
'qsm/setSelectedFlexRange'
|
|
87
90
|
>,
|
|
91
|
+
setTripType: import('@reduxjs/toolkit').ActionCreatorWithPayload<'oneway' | 'roundtrip' | 'openjaw', 'qsm/setTripType'>,
|
|
88
92
|
setTravelTypes: import('@reduxjs/toolkit').ActionCreatorWithPayload<TravelType[], 'qsm/setTravelTypes'>,
|
|
89
93
|
setSelectedTravelType: import('@reduxjs/toolkit').ActionCreatorWithPayload<any, 'qsm/setSelectedTravelType'>,
|
|
90
94
|
setTravelClasses: import('@reduxjs/toolkit').ActionCreatorWithPayload<TravelType[], 'qsm/setTravelClasses'>,
|
|
@@ -1,35 +1,29 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export interface QSMConfiguration {
|
|
3
|
-
type
|
|
3
|
+
type?: QsmType;
|
|
4
4
|
askRooms?: boolean;
|
|
5
5
|
askTravelType?: boolean;
|
|
6
|
+
allowOneWay?: boolean;
|
|
7
|
+
allowRoundtrip?: boolean;
|
|
6
8
|
allowOpenJaw?: boolean;
|
|
7
9
|
allowMultiCity?: boolean;
|
|
8
10
|
askTravelClass?: boolean;
|
|
9
|
-
allowOneWay?: boolean;
|
|
10
11
|
additionalFilters?: AdditionalFilters;
|
|
11
12
|
askTravelers: boolean;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
airportTypeAhead: boolean;
|
|
22
|
-
airportIcon: ReactNode;
|
|
23
|
-
onAirportChange: (airport: string) => void;
|
|
24
|
-
travelTypes: TravelType[];
|
|
25
|
-
travelTypeIcon: ReactNode;
|
|
26
|
-
travelClasses: TravelClass[];
|
|
27
|
-
travelClassIcon: ReactNode;
|
|
13
|
+
askNationality?: boolean;
|
|
14
|
+
departureAirport?: BaseFieldConfig;
|
|
15
|
+
destinationAirport?: BaseFieldConfig;
|
|
16
|
+
returnAirport?: BaseFieldConfig;
|
|
17
|
+
destination?: BaseFieldConfig;
|
|
18
|
+
travelTypes?: TravelType[];
|
|
19
|
+
travelTypeIcon?: ReactNode;
|
|
20
|
+
travelClasses?: TravelClass[];
|
|
21
|
+
travelClassIcon?: ReactNode;
|
|
28
22
|
dateFlexibility?: DateFlexibility[];
|
|
29
23
|
minDate?: Date;
|
|
30
24
|
maxDate?: Date;
|
|
31
|
-
showReturnDate
|
|
32
|
-
datesIcon
|
|
25
|
+
showReturnDate?: boolean;
|
|
26
|
+
datesIcon?: ReactNode;
|
|
33
27
|
defaultTravelers?: number;
|
|
34
28
|
maxTravelers?: number;
|
|
35
29
|
maxChildAge?: number;
|
|
@@ -39,10 +33,12 @@ export interface QSMConfiguration {
|
|
|
39
33
|
nationalities: Nationality[];
|
|
40
34
|
languageCode?: string;
|
|
41
35
|
}
|
|
36
|
+
export type QsmType = 'multidestination' | 'hotel' | 'roundTrip' | 'flight' | 'hotel-flight' | 'package' | 'ticket' | 'car' | 'transfers' | 'cruises';
|
|
42
37
|
export interface BaseFieldConfig {
|
|
43
38
|
fieldKey: string;
|
|
44
39
|
label: string;
|
|
45
40
|
placeholder: string;
|
|
41
|
+
icon: ReactNode;
|
|
46
42
|
options: TypeaheadOption[];
|
|
47
43
|
autoComplete?: boolean;
|
|
48
44
|
onChange?: (data: any) => void;
|
|
@@ -62,6 +58,7 @@ export interface DoubleFieldConfig {
|
|
|
62
58
|
type: 'double';
|
|
63
59
|
fieldKey: string;
|
|
64
60
|
showReverse?: boolean;
|
|
61
|
+
disableReturnField?: boolean;
|
|
65
62
|
fields: BaseFieldConfig[];
|
|
66
63
|
}
|
|
67
64
|
export type FieldConfig = SingleFieldConfig | DoubleFieldConfig;
|
|
@@ -69,18 +66,6 @@ export interface AdditionalFilters {
|
|
|
69
66
|
showDirectFlights: boolean;
|
|
70
67
|
includeLuggage: boolean;
|
|
71
68
|
}
|
|
72
|
-
export interface Origin {
|
|
73
|
-
key: string;
|
|
74
|
-
value: string;
|
|
75
|
-
}
|
|
76
|
-
export interface Destination {
|
|
77
|
-
key: string;
|
|
78
|
-
value: string;
|
|
79
|
-
}
|
|
80
|
-
export interface Airport {
|
|
81
|
-
key: string;
|
|
82
|
-
value: string;
|
|
83
|
-
}
|
|
84
69
|
export interface DateFlexibility {
|
|
85
70
|
name: string;
|
|
86
71
|
before: number;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import { ExtendedFlightSearchResponseItem } from '../../types';
|
|
3
|
+
interface FlightAccommodationResultsProps {
|
|
4
|
+
searchResults: ExtendedFlightSearchResponseItem[];
|
|
5
|
+
}
|
|
3
6
|
declare const FlightAccommodationResults: React.FC<FlightAccommodationResultsProps>;
|
|
4
7
|
export default FlightAccommodationResults;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ExtendedFlightSearchResponseItem, Filters, SortByType } from '../../../types';
|
|
3
|
+
interface FlightFilterContextProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
tideConnection: any;
|
|
6
|
+
}
|
|
7
|
+
interface FlightSearchContext {
|
|
8
|
+
isHubReady: boolean;
|
|
9
|
+
currentRequestId: number;
|
|
10
|
+
valuesManuallyChanged: boolean;
|
|
11
|
+
flightsLoading: boolean;
|
|
12
|
+
flightSearchResults: ExtendedFlightSearchResponseItem[];
|
|
13
|
+
filteredResults: ExtendedFlightSearchResponseItem[];
|
|
14
|
+
filters: Filters;
|
|
15
|
+
sortByTypes: SortByType[];
|
|
16
|
+
selectedSortByType: SortByType;
|
|
17
|
+
airlineResults: ExtendedFlightSearchResponseItem[];
|
|
18
|
+
numberOfStopsResults: ExtendedFlightSearchResponseItem[];
|
|
19
|
+
departureRangeResults: ExtendedFlightSearchResponseItem[];
|
|
20
|
+
departureAirportsResults: ExtendedFlightSearchResponseItem[];
|
|
21
|
+
arrivalAirportsResults: ExtendedFlightSearchResponseItem[];
|
|
22
|
+
travelTimeResults: ExtendedFlightSearchResponseItem[];
|
|
23
|
+
priceResults: ExtendedFlightSearchResponseItem[];
|
|
24
|
+
onFlightSearch: () => void;
|
|
25
|
+
setFlightSearchResults: (results: ExtendedFlightSearchResponseItem[]) => void;
|
|
26
|
+
setFilters: (filters: Filters) => void;
|
|
27
|
+
setFilteredResults: (results: ExtendedFlightSearchResponseItem[]) => void;
|
|
28
|
+
setSelectedSortByType: (val: SortByType) => void;
|
|
29
|
+
resetFilters: () => void;
|
|
30
|
+
setValuesManuallyChanged: (val: boolean) => void;
|
|
31
|
+
onFilter: () => void;
|
|
32
|
+
}
|
|
33
|
+
declare const FlightSearchContext: React.Context<FlightSearchContext>;
|
|
34
|
+
export declare const FlightSearchProvider: React.FC<FlightFilterContextProps>;
|
|
35
|
+
export declare const useFlightSearch: () => FlightSearchContext;
|
|
36
|
+
export {};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TravelClass, TravelType } from '../../types';
|
|
2
|
+
import { SortByType, TravelClass, TravelType } from '../../types';
|
|
3
3
|
interface ItemPickerProps {
|
|
4
|
-
items: TravelType[] | TravelClass[];
|
|
4
|
+
items: TravelType[] | TravelClass[] | SortByType[];
|
|
5
5
|
selection: string | undefined;
|
|
6
|
+
selectedSortByType?: SortByType;
|
|
6
7
|
label: string;
|
|
7
8
|
placeholder: string;
|
|
8
9
|
classModifier: string;
|
|
9
|
-
|
|
10
|
+
valueFormatter?: (value: string, direction?: string) => string;
|
|
11
|
+
onPick: (picked: string, direction?: string) => void;
|
|
10
12
|
}
|
|
11
13
|
declare const ItemPicker: React.FC<ItemPickerProps>;
|
|
12
14
|
export default ItemPicker;
|
|
@@ -3,6 +3,7 @@ import { BookingPackage, BookingPackageItem, EntryLight } from '@qite/tide-clien
|
|
|
3
3
|
export interface SearchResultsState {
|
|
4
4
|
results: BookingPackageItem[];
|
|
5
5
|
selectedHotelId: number | null;
|
|
6
|
+
selectedFlightId: string | null;
|
|
6
7
|
bookingPackageDetails: BookingPackage | null;
|
|
7
8
|
entry: EntryLight | null;
|
|
8
9
|
isLoading: boolean;
|
|
@@ -18,6 +19,7 @@ export declare const setResults: import('@reduxjs/toolkit').ActionCreatorWithPay
|
|
|
18
19
|
'searchResults/setResults'
|
|
19
20
|
>,
|
|
20
21
|
setSelectedHotel: import('@reduxjs/toolkit').ActionCreatorWithPayload<number | null, 'searchResults/setSelectedHotel'>,
|
|
22
|
+
setSelectedFlight: import('@reduxjs/toolkit').ActionCreatorWithPayload<string | null, 'searchResults/setSelectedFlight'>,
|
|
21
23
|
setBookingPackageDetails: import('@reduxjs/toolkit').ActionCreatorWithPayload<
|
|
22
24
|
{
|
|
23
25
|
details: BookingPackage;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import { FlightSearchResponseItem } from '@qite/tide-client';
|
|
1
2
|
import { ReactNode } from 'react';
|
|
3
|
+
export type SRPType = 'hotel' | 'flight' | 'hotel-flight' | 'roundTrip';
|
|
2
4
|
export interface SearchResultsConfiguration {
|
|
3
|
-
type:
|
|
5
|
+
type: SRPType;
|
|
4
6
|
tideConnection: {
|
|
5
7
|
host: string;
|
|
6
8
|
apiKey: string;
|
|
7
9
|
catalogueIds?: number[];
|
|
10
|
+
officeId?: number;
|
|
8
11
|
};
|
|
9
12
|
showFilters: boolean;
|
|
10
13
|
filterIcon?: ReactNode;
|
|
@@ -109,3 +112,30 @@ export interface SortingOption {
|
|
|
109
112
|
label: string;
|
|
110
113
|
icon?: ReactNode;
|
|
111
114
|
}
|
|
115
|
+
export interface ExtendedFlightSearchResponseItem extends FlightSearchResponseItem {
|
|
116
|
+
requestId: number;
|
|
117
|
+
guid: string;
|
|
118
|
+
}
|
|
119
|
+
export interface Sequence {
|
|
120
|
+
requestId: number;
|
|
121
|
+
sequenceId: number;
|
|
122
|
+
}
|
|
123
|
+
export interface FilterValue {
|
|
124
|
+
name: string;
|
|
125
|
+
id: number | string;
|
|
126
|
+
lowestPrice: number;
|
|
127
|
+
}
|
|
128
|
+
export interface Filters {
|
|
129
|
+
airlines: FilterValue[];
|
|
130
|
+
numberOfStops: FilterValue[];
|
|
131
|
+
departureRanges: FilterValue[];
|
|
132
|
+
departureAirports: FilterValue[];
|
|
133
|
+
arrivalAirports: FilterValue[];
|
|
134
|
+
travelTimes: FilterValue[];
|
|
135
|
+
prices: FilterValue[];
|
|
136
|
+
}
|
|
137
|
+
export interface SortByType {
|
|
138
|
+
direction: 'asc' | 'desc';
|
|
139
|
+
label: string;
|
|
140
|
+
icon?: ReactNode;
|
|
141
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FlightSearchResponseFlight, FlightSearchResponseFlightSegment } from '@qite/tide-client';
|
|
2
|
+
import { ExtendedFlightSearchResponseItem, SortByType } from '../types';
|
|
3
|
+
import { DepartureRange } from '../../shared/types';
|
|
4
|
+
export declare const getOutwardFlight: (flightResult: ExtendedFlightSearchResponseItem) => FlightSearchResponseFlight | undefined;
|
|
5
|
+
export declare const getFlightSegments: (flight: FlightSearchResponseFlight | undefined) => FlightSearchResponseFlightSegment[];
|
|
6
|
+
export declare const getDepartureSegment: (flight: FlightSearchResponseFlight | undefined) => FlightSearchResponseFlightSegment | undefined;
|
|
7
|
+
export declare const getArrivalSegment: (flight: FlightSearchResponseFlight | undefined) => FlightSearchResponseFlightSegment | undefined;
|
|
8
|
+
export declare const getNumberOfStops: (flight: FlightSearchResponseFlight | undefined) => number;
|
|
9
|
+
export declare const getNumberOfStopsLabel: (
|
|
10
|
+
flight: FlightSearchResponseFlight | undefined,
|
|
11
|
+
directLabel: string,
|
|
12
|
+
stopsLabel: string,
|
|
13
|
+
stopLabel: string
|
|
14
|
+
) => string;
|
|
15
|
+
export declare const getDepartureRangeName: (translations: any, range: DepartureRange | undefined) => string;
|
|
16
|
+
export declare const getSortingName: (translations: any, sortByType: SortByType) => string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export declare const languages: string[];
|
|
2
2
|
export declare const defaultLanguage = 'nl-BE';
|
|
3
3
|
export declare const formatPrice: (price: number, currencyCode: string, locale?: string) => string;
|
|
4
|
+
import { DateStruct } from '@qite/tide-client';
|
|
5
|
+
import { DepartureRange } from '../types';
|
|
4
6
|
export declare const getTranslations: (language: string) => {
|
|
5
7
|
STEPS: {
|
|
6
8
|
PERSONAL_DETAILS: string;
|
|
@@ -137,8 +139,11 @@ export declare const getTranslations: (language: string) => {
|
|
|
137
139
|
CHILD: string;
|
|
138
140
|
CHILDREN: string;
|
|
139
141
|
GENDER: string;
|
|
142
|
+
GENDER_ID: string;
|
|
140
143
|
MALE: string;
|
|
144
|
+
MALE_GENDER: string;
|
|
141
145
|
FEMALE: string;
|
|
146
|
+
FEMALE_GENDER: string;
|
|
142
147
|
OTHER: string;
|
|
143
148
|
MAIN_BOOKER: string;
|
|
144
149
|
FIRST_NAME: string;
|
|
@@ -249,6 +254,85 @@ export declare const getTranslations: (language: string) => {
|
|
|
249
254
|
LABEL_CREATING: string;
|
|
250
255
|
LABEL_PRINTING: string;
|
|
251
256
|
};
|
|
257
|
+
QSM: {
|
|
258
|
+
MULTIDESTINATION: string;
|
|
259
|
+
PACKAGES: string;
|
|
260
|
+
TRANSPORT_HOTEL: string;
|
|
261
|
+
ACCOMMODATION: string;
|
|
262
|
+
TRANSPORTS: string;
|
|
263
|
+
TICKET_ONLY: string;
|
|
264
|
+
RENT_A_CAR: string;
|
|
265
|
+
TRANSFERS: string;
|
|
266
|
+
CRUISES: string;
|
|
267
|
+
ONE_ACCOMMODATION: string;
|
|
268
|
+
MULTIPLE_ACCOMMODATIONS: string;
|
|
269
|
+
TRAVEL_CLASS_LABEL: string;
|
|
270
|
+
TRAVEL_CLASS_PLACEHOLDER: string;
|
|
271
|
+
TRAVEL_TYPE_LABEL: string;
|
|
272
|
+
TRAVEL_TYPE_PLACEHOLDER: string;
|
|
273
|
+
NATIONALITY_LABEL: string;
|
|
274
|
+
NATIONALITY_PLACEHOLDER: string;
|
|
275
|
+
TRAVELERS_LABEL: string;
|
|
276
|
+
ADD_ROOM: string;
|
|
277
|
+
REMOVE_ROOM: string;
|
|
278
|
+
MAX_TRAVELERS_REACHED: string;
|
|
279
|
+
ADULTS: string;
|
|
280
|
+
CHILDREN: string;
|
|
281
|
+
BABIES: string;
|
|
282
|
+
CHOOSE_DATES: string;
|
|
283
|
+
DEPARTURE_DATE: string;
|
|
284
|
+
RETURN_DATE: string;
|
|
285
|
+
CONFIRM: string;
|
|
286
|
+
TRAVELERS: string;
|
|
287
|
+
};
|
|
288
|
+
SRP: {
|
|
289
|
+
NO_RESULTS: string;
|
|
290
|
+
TOTAL_RESULTS_LABEL: string;
|
|
291
|
+
RESET: string;
|
|
292
|
+
LUGGAGEINCLUDED: string;
|
|
293
|
+
CANCEL: string;
|
|
294
|
+
APPLY: string;
|
|
295
|
+
LOADING: string;
|
|
296
|
+
SEARCHRESULTCTA: string;
|
|
297
|
+
SORTBY: string;
|
|
298
|
+
PRICE_ASC: string;
|
|
299
|
+
PRICE_DESC: string;
|
|
300
|
+
DEPARTURE_ASC: string;
|
|
301
|
+
FILTERS: string;
|
|
302
|
+
SHOW_ITINERARY: string;
|
|
303
|
+
ITINERARY_TITLE: string;
|
|
304
|
+
DOSSIER_NUMBER: string;
|
|
305
|
+
PACKAGE_PRICE_PER_PERSON: string;
|
|
306
|
+
TOTAL: string;
|
|
307
|
+
DAY_BY_DAY: string;
|
|
308
|
+
START: string;
|
|
309
|
+
END: string;
|
|
310
|
+
EXTENDED: string;
|
|
311
|
+
COMPACT: string;
|
|
312
|
+
LIST: string;
|
|
313
|
+
SELECT: string;
|
|
314
|
+
DEPARTURE: string;
|
|
315
|
+
RETURN: string;
|
|
316
|
+
DIRECT: string;
|
|
317
|
+
STOPS: string;
|
|
318
|
+
STOP: string;
|
|
319
|
+
STOP_TIME: string;
|
|
320
|
+
ACCOMMODATION: string;
|
|
321
|
+
VIEW_DETAILS: string;
|
|
322
|
+
NIGHTS: string;
|
|
323
|
+
MORNING_RANGE: string;
|
|
324
|
+
AFTERNOON_RANGE: string;
|
|
325
|
+
EVENING_RANGE: string;
|
|
326
|
+
NIGHT_RANGE: string;
|
|
327
|
+
DEPARTURE_RANGE: string;
|
|
328
|
+
DEPARTURE_AIRPORTS: string;
|
|
329
|
+
ARRIVAL_AIRPORTS: string;
|
|
330
|
+
PRICE: string;
|
|
331
|
+
DEPARTURE_TIME_ASC: string;
|
|
332
|
+
DEPARTURE_TIME_DESC: string;
|
|
333
|
+
DURATION_ASC: string;
|
|
334
|
+
DURATION_DESC: string;
|
|
335
|
+
};
|
|
252
336
|
};
|
|
253
337
|
export declare const locales: {
|
|
254
338
|
'ar-SA': Locale;
|
|
@@ -273,3 +357,10 @@ export declare const getPriceDifferenceText: (price: number, currencyCode: strin
|
|
|
273
357
|
export declare function format(text: string, args: any[]): string;
|
|
274
358
|
export declare const formatTime: (date: Date) => string;
|
|
275
359
|
export declare const formatDate: (date: Date) => string;
|
|
360
|
+
export declare const dateToDateStruct: (date: Date | undefined) => DateStruct;
|
|
361
|
+
export declare const timeFromDateTime: (dateTime: Date | undefined) => string;
|
|
362
|
+
export declare const longFormatDate: (dateTime: Date | undefined, language: string) => string;
|
|
363
|
+
export declare const durationTicksInHoursString: (durationInTicks: number) => string;
|
|
364
|
+
export declare const durationInTicksInMinutes: (durationInTicks: number) => number;
|
|
365
|
+
export declare const minutesToHoursString: (totalMinutes: number) => string;
|
|
366
|
+
export declare const rangeFromDateTimeInMinutes: (dateTime: Date | undefined) => DepartureRange;
|
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.40",
|
|
4
4
|
"description": "React Booking wizard & Booking product component for Tide",
|
|
5
5
|
"main": "build/build-cjs/index.js",
|
|
6
6
|
"module": "build/build-esm/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@jsonurl/jsonurl": "^1.1.4",
|
|
29
29
|
"@popperjs/core": "^2.10.2",
|
|
30
|
-
"@qite/tide-client": "^1.1.
|
|
30
|
+
"@qite/tide-client": "^1.1.137",
|
|
31
31
|
"@reach/router": "^1.3.4",
|
|
32
32
|
"@reduxjs/toolkit": "^1.6.0",
|
|
33
33
|
"@rollup/plugin-commonjs": "^19.0.1",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"uuid": "^8.3.2"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"react-html-comment": "^2.0.16"
|
|
75
|
+
"react-html-comment": "^2.0.16",
|
|
76
|
+
"signalr-no-jquery": "^0.2.1"
|
|
76
77
|
}
|
|
77
78
|
}
|
package/rollup.config.js
CHANGED
|
@@ -9,8 +9,8 @@ import typescript from 'rollup-plugin-typescript2';
|
|
|
9
9
|
export default {
|
|
10
10
|
input: 'src/index.ts',
|
|
11
11
|
output: [
|
|
12
|
-
{ file: packageJson.main, format: 'cjs', banner: '/* eslint-disable */' },
|
|
13
|
-
{ file: packageJson.module, format: 'esm', banner: '/* eslint-disable */' }
|
|
12
|
+
{ file: packageJson.main, format: 'cjs', banner: '/* eslint-disable */', inlineDynamicImports: true },
|
|
13
|
+
{ file: packageJson.module, format: 'esm', banner: '/* eslint-disable */', inlineDynamicImports: true }
|
|
14
14
|
],
|
|
15
15
|
plugins: [peerDepsExternal(), json(), nodeResolve(), commonjs(), typescript(), del({ targets: ['build/*'] })]
|
|
16
16
|
};
|
|
@@ -129,7 +129,7 @@ const Dates: React.FC<DatesProps> = ({ value, duration, onChange, availableDateP
|
|
|
129
129
|
panelActive && 'qsm__panel--active',
|
|
130
130
|
!mqm?.matches && 'qsm__panel--mobile'
|
|
131
131
|
])}
|
|
132
|
-
style={mqm?.matches ? styles.popper : undefined}
|
|
132
|
+
style={mqm?.matches ? (styles.popper as any) : undefined}
|
|
133
133
|
{...attributes.popper}>
|
|
134
134
|
<DateRangePicker
|
|
135
135
|
fromDate={value?.fromDate}
|
|
@@ -177,7 +177,8 @@ const fetchPackageDetails = createAsyncThunk('booking/details', async (_, { disp
|
|
|
177
177
|
airlines: bookingAttributes.flight.outwardAirlines,
|
|
178
178
|
flightNumbers: bookingAttributes.flight.outwardNumbers,
|
|
179
179
|
fareCode: bookingAttributes.flight.outwardFareCode,
|
|
180
|
-
marketingName: bookingAttributes.flight.outwardMarketingName
|
|
180
|
+
marketingName: bookingAttributes.flight.outwardMarketingName,
|
|
181
|
+
luggageIncluded: bookingAttributes.flight.luggageIncluded
|
|
181
182
|
} as SelectedFlight;
|
|
182
183
|
|
|
183
184
|
if (bookingAttributes.flight.returnCode) {
|
|
@@ -188,7 +189,8 @@ const fetchPackageDetails = createAsyncThunk('booking/details', async (_, { disp
|
|
|
188
189
|
airlines: bookingAttributes.flight.returnAirlines,
|
|
189
190
|
flightNumbers: bookingAttributes.flight.returnNumbers,
|
|
190
191
|
fareCode: bookingAttributes.flight.returnFareCode,
|
|
191
|
-
marketingName: bookingAttributes.flight.returnMarketingName
|
|
192
|
+
marketingName: bookingAttributes.flight.returnMarketingName,
|
|
193
|
+
luggageIncluded: bookingAttributes.flight.luggageIncluded
|
|
192
194
|
} as SelectedFlight;
|
|
193
195
|
}
|
|
194
196
|
}
|
|
@@ -134,6 +134,7 @@ export interface FlightInfo {
|
|
|
134
134
|
returnClass: string;
|
|
135
135
|
returnDepartureDate: string | null;
|
|
136
136
|
returnArrivalDate: string | null;
|
|
137
|
+
luggageIncluded: boolean; // used to get correct flight from amadeus
|
|
137
138
|
}
|
|
138
139
|
|
|
139
140
|
export interface TravelersFormValues {
|