@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.
Files changed (91) hide show
  1. package/build/build-cjs/booking-wizard/types.d.ts +1 -0
  2. package/build/build-cjs/content/image-card-grid/index.d.ts +4 -0
  3. package/build/build-cjs/content/image-card-grid/types.d.ts +12 -0
  4. package/build/build-cjs/index.d.ts +2 -1
  5. package/build/build-cjs/index.js +9620 -2315
  6. package/build/build-cjs/qsm/store/qsm-slice.d.ts +4 -2
  7. package/build/build-cjs/qsm/types.d.ts +2 -1
  8. package/build/build-cjs/search-results/components/filters/flight-filters.d.ts +8 -0
  9. package/build/build-cjs/search-results/components/flight/flight-accommodation-results.d.ts +4 -1
  10. package/build/build-cjs/search-results/components/flight/flight-option.d.ts +7 -0
  11. package/build/build-cjs/search-results/components/flight/flight-search-context/index.d.ts +36 -0
  12. package/build/build-cjs/search-results/components/icon.d.ts +1 -0
  13. package/build/build-cjs/search-results/components/item-picker/index.d.ts +5 -3
  14. package/build/build-cjs/search-results/components/search-results-container/flight-search-results.d.ts +6 -0
  15. package/build/build-cjs/search-results/store/search-results-slice.d.ts +2 -0
  16. package/build/build-cjs/search-results/types.d.ts +31 -1
  17. package/build/build-cjs/search-results/utils/flight-utils.d.ts +16 -0
  18. package/build/build-cjs/shared/components/flyin.d.ts +9 -0
  19. package/build/build-cjs/shared/components/icon.d.ts +10 -0
  20. package/build/build-cjs/shared/types.d.ts +6 -0
  21. package/build/build-cjs/shared/utils/localization-util.d.ts +21 -0
  22. package/build/build-esm/booking-wizard/types.d.ts +1 -0
  23. package/build/build-esm/content/image-card-grid/index.d.ts +4 -0
  24. package/build/build-esm/content/image-card-grid/types.d.ts +12 -0
  25. package/build/build-esm/index.d.ts +2 -1
  26. package/build/build-esm/index.js +9496 -2304
  27. package/build/build-esm/qsm/store/qsm-slice.d.ts +4 -2
  28. package/build/build-esm/qsm/types.d.ts +2 -1
  29. package/build/build-esm/search-results/components/filters/flight-filters.d.ts +8 -0
  30. package/build/build-esm/search-results/components/flight/flight-accommodation-results.d.ts +4 -1
  31. package/build/build-esm/search-results/components/flight/flight-option.d.ts +7 -0
  32. package/build/build-esm/search-results/components/flight/flight-search-context/index.d.ts +36 -0
  33. package/build/build-esm/search-results/components/icon.d.ts +1 -0
  34. package/build/build-esm/search-results/components/item-picker/index.d.ts +5 -3
  35. package/build/build-esm/search-results/components/search-results-container/flight-search-results.d.ts +6 -0
  36. package/build/build-esm/search-results/store/search-results-slice.d.ts +2 -0
  37. package/build/build-esm/search-results/types.d.ts +31 -1
  38. package/build/build-esm/search-results/utils/flight-utils.d.ts +16 -0
  39. package/build/build-esm/shared/components/flyin.d.ts +9 -0
  40. package/build/build-esm/shared/components/icon.d.ts +10 -0
  41. package/build/build-esm/shared/types.d.ts +6 -0
  42. package/build/build-esm/shared/utils/localization-util.d.ts +21 -0
  43. package/package.json +4 -3
  44. package/rollup.config.js +2 -2
  45. package/src/booking-product/components/dates.tsx +1 -1
  46. package/src/booking-wizard/features/booking/booking-slice.ts +4 -2
  47. package/src/booking-wizard/types.ts +1 -0
  48. package/src/content/components/slider.tsx +1 -1
  49. package/src/content/image-card-grid/index.tsx +34 -0
  50. package/src/content/image-card-grid/types.ts +13 -0
  51. package/src/index.ts +2 -1
  52. package/src/qsm/components/QSMContainer/qsm-container.tsx +38 -26
  53. package/src/qsm/components/search-input-group/index.tsx +0 -1
  54. package/src/qsm/components/travel-input/index.tsx +4 -4
  55. package/src/qsm/components/travel-input-group/index.tsx +4 -3
  56. package/src/qsm/store/qsm-slice.ts +7 -1
  57. package/src/qsm/types.ts +3 -1
  58. package/src/search-results/components/filters/flight-filters.tsx +671 -0
  59. package/src/search-results/components/flight/flight-accommodation-results.tsx +20 -562
  60. package/src/search-results/components/flight/flight-option.tsx +243 -0
  61. package/src/search-results/components/flight/flight-search-context/index.tsx +508 -0
  62. package/src/search-results/components/hotel/hotel-card.tsx +0 -1
  63. package/src/search-results/components/icon.tsx +84 -44
  64. package/src/search-results/components/item-picker/index.tsx +16 -11
  65. package/src/search-results/components/search-results-container/flight-search-results.tsx +120 -0
  66. package/src/search-results/components/search-results-container/search-results-container.tsx +85 -70
  67. package/src/search-results/store/search-results-slice.ts +6 -0
  68. package/src/search-results/types.ts +37 -1
  69. package/src/search-results/utils/flight-utils.ts +106 -0
  70. package/src/shared/components/flyin.tsx +622 -0
  71. package/src/shared/components/icon.tsx +826 -0
  72. package/src/shared/translations/ar-SA.json +13 -1
  73. package/src/shared/translations/da-DK.json +13 -1
  74. package/src/shared/translations/de-DE.json +13 -1
  75. package/src/shared/translations/en-GB.json +13 -1
  76. package/src/shared/translations/es-ES.json +13 -1
  77. package/src/shared/translations/fr-BE.json +13 -1
  78. package/src/shared/translations/fr-FR.json +13 -1
  79. package/src/shared/translations/is-IS.json +13 -1
  80. package/src/shared/translations/it-IT.json +13 -1
  81. package/src/shared/translations/ja-JP.json +13 -1
  82. package/src/shared/translations/nl-BE.json +13 -1
  83. package/src/shared/translations/nl-NL.json +13 -1
  84. package/src/shared/translations/no-NO.json +13 -1
  85. package/src/shared/translations/pl-PL.json +13 -1
  86. package/src/shared/translations/pt-PT.json +13 -1
  87. package/src/shared/translations/sv-SE.json +13 -1
  88. package/src/shared/types.ts +7 -0
  89. package/src/shared/utils/localization-util.ts +71 -0
  90. package/styles/booking-search-results.scss +1 -0
  91. 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 setOrigin: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, 'qsm/setOrigin'>,
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: 'hotel' | 'roundTrip' | 'flight' | 'flight+hotel';
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;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface FiltersProps {
3
+ isOpen: boolean;
4
+ handleSetIsOpen: () => void;
5
+ isLoading?: boolean;
6
+ }
7
+ declare const FlightFilters: React.FC<FiltersProps>;
8
+ export default FlightFilters;
@@ -1,4 +1,7 @@
1
1
  import React from 'react';
2
- interface FlightAccommodationResultsProps {}
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,7 @@
1
+ import React from 'react';
2
+ import { ExtendedFlightSearchResponseItem } from '../../types';
3
+ interface FlightOptionProps {
4
+ item: ExtendedFlightSearchResponseItem;
5
+ }
6
+ declare const FlightOption: React.FC<FlightOptionProps>;
7
+ export default FlightOption;
@@ -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 {};
@@ -5,6 +5,7 @@ interface IconProps {
5
5
  title?: string;
6
6
  width?: number;
7
7
  height?: number;
8
+ fill?: string;
8
9
  }
9
10
  declare const Icon: React.FC<IconProps>;
10
11
  export default Icon;
@@ -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
- onPick: (picked: string) => void;
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;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface FlightResultsContainerProps {
3
+ isMobile: boolean;
4
+ }
5
+ declare const FlightResultsContainer: React.FC<FlightResultsContainerProps>;
6
+ export default FlightResultsContainer;
@@ -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: 'hotel' | 'roundTrip' | 'flight' | 'hotel-flight';
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;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ type FlyInProps = {
3
+ isOpen: boolean;
4
+ setIsOpen: (open: boolean) => void;
5
+ className?: string;
6
+ onPanelRef?: (el: HTMLDivElement | null) => void;
7
+ };
8
+ declare const FlyIn: React.FC<FlyInProps>;
9
+ export default FlyIn;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ interface IconProps {
3
+ name: string;
4
+ className?: string;
5
+ title?: string;
6
+ width?: number;
7
+ height?: number;
8
+ }
9
+ declare const Icon: React.FC<IconProps>;
10
+ export default Icon;
@@ -2,3 +2,9 @@ export interface ApiSettingsState {
2
2
  apiUrl: string;
3
3
  apiKey: string;
4
4
  }
5
+ export declare enum DepartureRange {
6
+ Morning = 0,
7
+ Afternoon = 1,
8
+ Evening = 2,
9
+ Night = 3
10
+ }
@@ -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;
@@ -126,6 +126,7 @@ export interface FlightInfo {
126
126
  returnClass: string;
127
127
  returnDepartureDate: string | null;
128
128
  returnArrivalDate: string | null;
129
+ luggageIncluded: boolean;
129
130
  }
130
131
  export interface TravelersFormValues {
131
132
  rooms: TravelersFormRoomValues[];
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ImageCardGridProps } from './types';
3
+ declare const ImageCardGrid: React.FC<ImageCardGridProps>;
4
+ export default ImageCardGrid;
@@ -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
- export { BookingProduct, BookingWizard, QSM, SearchResults, Navbar, Header, Footer };
8
+ import ImageCardGrid from './content/image-card-grid';
9
+ export { BookingProduct, BookingWizard, QSM, SearchResults, Navbar, Header, Footer, ImageCardGrid };