@qite/tide-booking-component 1.4.39 → 1.4.41
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/image-card-grid/index.d.ts +4 -0
- package/build/build-cjs/content/image-card-grid/types.d.ts +12 -0
- package/build/build-cjs/index.d.ts +2 -1
- package/build/build-cjs/index.js +9620 -2315
- package/build/build-cjs/qsm/store/qsm-slice.d.ts +4 -2
- package/build/build-cjs/qsm/types.d.ts +2 -1
- 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/components/icon.d.ts +10 -0
- package/build/build-cjs/shared/types.d.ts +6 -0
- package/build/build-cjs/shared/utils/localization-util.d.ts +21 -0
- package/build/build-esm/booking-wizard/types.d.ts +1 -0
- package/build/build-esm/content/image-card-grid/index.d.ts +4 -0
- package/build/build-esm/content/image-card-grid/types.d.ts +12 -0
- package/build/build-esm/index.d.ts +2 -1
- package/build/build-esm/index.js +9496 -2304
- package/build/build-esm/qsm/store/qsm-slice.d.ts +4 -2
- package/build/build-esm/qsm/types.d.ts +2 -1
- 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/components/icon.d.ts +10 -0
- package/build/build-esm/shared/types.d.ts +6 -0
- package/build/build-esm/shared/utils/localization-util.d.ts +21 -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/slider.tsx +1 -1
- package/src/content/image-card-grid/index.tsx +34 -0
- package/src/content/image-card-grid/types.ts +13 -0
- package/src/index.ts +2 -1
- package/src/qsm/components/QSMContainer/qsm-container.tsx +38 -26
- package/src/qsm/components/search-input-group/index.tsx +0 -1
- package/src/qsm/components/travel-input/index.tsx +4 -4
- package/src/qsm/components/travel-input-group/index.tsx +4 -3
- package/src/qsm/store/qsm-slice.ts +7 -1
- package/src/qsm/types.ts +3 -1
- 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-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 +622 -0
- package/src/shared/components/icon.tsx +826 -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 +541 -0
|
@@ -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;
|
|
@@ -46,7 +47,8 @@ export interface QSMState {
|
|
|
46
47
|
rooms: Room[];
|
|
47
48
|
[key: string]: any;
|
|
48
49
|
}
|
|
49
|
-
export declare const
|
|
50
|
+
export declare const setSelectedQsmType: import('@reduxjs/toolkit').ActionCreatorWithPayload<QsmType, 'qsm/setSelectedQsmType'>,
|
|
51
|
+
setOrigin: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, 'qsm/setOrigin'>,
|
|
50
52
|
setDestination: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, 'qsm/setDestination'>,
|
|
51
53
|
setAirport: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, 'qsm/setAirport'>,
|
|
52
54
|
setFromDate: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<string | undefined, 'qsm/setFromDate'>,
|
|
@@ -1,6 +1,6 @@
|
|
|
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
6
|
allowOneWay?: boolean;
|
|
@@ -33,6 +33,7 @@ export interface QSMConfiguration {
|
|
|
33
33
|
nationalities: Nationality[];
|
|
34
34
|
languageCode?: string;
|
|
35
35
|
}
|
|
36
|
+
export type QsmType = 'multidestination' | 'hotel' | 'roundTrip' | 'flight' | 'hotel-flight' | 'package' | 'ticket' | 'car' | 'transfers' | 'cruises';
|
|
36
37
|
export interface BaseFieldConfig {
|
|
37
38
|
fieldKey: string;
|
|
38
39
|
label: string;
|
|
@@ -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;
|
|
@@ -318,6 +320,18 @@ export declare const getTranslations: (language: string) => {
|
|
|
318
320
|
ACCOMMODATION: string;
|
|
319
321
|
VIEW_DETAILS: string;
|
|
320
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;
|
|
321
335
|
};
|
|
322
336
|
};
|
|
323
337
|
export declare const locales: {
|
|
@@ -343,3 +357,10 @@ export declare const getPriceDifferenceText: (price: number, currencyCode: strin
|
|
|
343
357
|
export declare function format(text: string, args: any[]): string;
|
|
344
358
|
export declare const formatTime: (date: Date) => string;
|
|
345
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;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ImageCardGridProps {
|
|
2
|
+
title: string;
|
|
3
|
+
cards: ImageCard[];
|
|
4
|
+
columns: number;
|
|
5
|
+
}
|
|
6
|
+
export interface ImageCard {
|
|
7
|
+
image: string;
|
|
8
|
+
title: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
buttonText?: string;
|
|
11
|
+
onButtonClick: (card: ImageCard) => void;
|
|
12
|
+
}
|
|
@@ -5,4 +5,5 @@ import Navbar from './content/navbar';
|
|
|
5
5
|
import Footer from './content/footer';
|
|
6
6
|
import QSM from './qsm';
|
|
7
7
|
import SearchResults from './search-results';
|
|
8
|
-
|
|
8
|
+
import ImageCardGrid from './content/image-card-grid';
|
|
9
|
+
export { BookingProduct, BookingWizard, QSM, SearchResults, Navbar, Header, Footer, ImageCardGrid };
|