@qite/tide-booking-component 1.4.30 → 1.4.32

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 (83) hide show
  1. package/build/build-cjs/booking-product/components/date-range-picker/index.d.ts +1 -0
  2. package/build/build-cjs/booking-product/components/dates.d.ts +5 -0
  3. package/build/build-cjs/booking-product/components/list-view.d.ts +8 -0
  4. package/build/build-cjs/booking-product/constants.d.ts +1 -0
  5. package/build/build-cjs/booking-product/types.d.ts +2 -0
  6. package/build/build-cjs/booking-product/utils/api.d.ts +6 -1
  7. package/build/build-cjs/booking-wizard/features/booking/booking-slice.d.ts +8 -1
  8. package/build/build-cjs/booking-wizard/features/booking/selectors.d.ts +3 -0
  9. package/build/build-cjs/booking-wizard/features/sidebar/sidebar-util.d.ts +1 -1
  10. package/build/build-cjs/booking-wizard/features/sidebar/sidebar.d.ts +1 -0
  11. package/build/build-cjs/booking-wizard/features/travelers-form/travelers-form-slice.d.ts +1 -0
  12. package/build/build-cjs/booking-wizard/types.d.ts +1 -0
  13. package/build/build-cjs/index.js +5219 -1052
  14. package/build/build-cjs/search-results/store/search-results-slice.d.ts +2 -0
  15. package/build/build-cjs/search-results/types.d.ts +2 -2
  16. package/build/build-cjs/shared/utils/localization-util.d.ts +17 -2
  17. package/build/build-esm/booking-product/components/date-range-picker/index.d.ts +1 -0
  18. package/build/build-esm/booking-product/components/dates.d.ts +5 -0
  19. package/build/build-esm/booking-product/components/list-view.d.ts +8 -0
  20. package/build/build-esm/booking-product/constants.d.ts +1 -0
  21. package/build/build-esm/booking-product/types.d.ts +2 -0
  22. package/build/build-esm/booking-product/utils/api.d.ts +6 -1
  23. package/build/build-esm/booking-wizard/features/booking/booking-slice.d.ts +8 -1
  24. package/build/build-esm/booking-wizard/features/booking/selectors.d.ts +3 -0
  25. package/build/build-esm/booking-wizard/features/sidebar/sidebar-util.d.ts +1 -1
  26. package/build/build-esm/booking-wizard/features/sidebar/sidebar.d.ts +1 -0
  27. package/build/build-esm/booking-wizard/features/travelers-form/travelers-form-slice.d.ts +1 -0
  28. package/build/build-esm/booking-wizard/types.d.ts +1 -0
  29. package/build/build-esm/index.js +5211 -1045
  30. package/build/build-esm/search-results/store/search-results-slice.d.ts +2 -0
  31. package/build/build-esm/search-results/types.d.ts +2 -2
  32. package/build/build-esm/shared/utils/localization-util.d.ts +17 -2
  33. package/package.json +1 -1
  34. package/src/booking-product/components/date-range-picker/index.tsx +29 -16
  35. package/src/booking-product/components/dates.tsx +28 -5
  36. package/src/booking-product/components/list-view.tsx +54 -0
  37. package/src/booking-product/components/product.tsx +152 -20
  38. package/src/booking-product/constants.ts +1 -0
  39. package/src/booking-product/settings-context.ts +3 -1
  40. package/src/booking-product/types.ts +2 -0
  41. package/src/booking-product/utils/api.ts +9 -3
  42. package/src/booking-wizard/components/step-indicator.tsx +11 -2
  43. package/src/booking-wizard/features/booking/booking-slice.ts +27 -2
  44. package/src/booking-wizard/features/booking/booking.tsx +32 -15
  45. package/src/booking-wizard/features/booking/selectors.ts +6 -0
  46. package/src/booking-wizard/features/flight-options/index.tsx +27 -3
  47. package/src/booking-wizard/features/product-options/option-room.tsx +1 -1
  48. package/src/booking-wizard/features/product-options/options-form.tsx +14 -4
  49. package/src/booking-wizard/features/room-options/room.tsx +1 -1
  50. package/src/booking-wizard/features/sidebar/index.tsx +4 -1
  51. package/src/booking-wizard/features/sidebar/sidebar-util.ts +1 -3
  52. package/src/booking-wizard/features/sidebar/sidebar.tsx +112 -104
  53. package/src/booking-wizard/features/travelers-form/travelers-form-slice.ts +1 -0
  54. package/src/booking-wizard/features/travelers-form/travelers-form.tsx +146 -10
  55. package/src/booking-wizard/settings-context.ts +2 -1
  56. package/src/booking-wizard/types.ts +1 -0
  57. package/src/search-results/components/flight/flight-card.tsx +1 -1
  58. package/src/search-results/components/hotel/hotel-accommodation-results.tsx +11 -6
  59. package/src/search-results/components/hotel/hotel-card.tsx +15 -1
  60. package/src/search-results/components/search-results-container/search-results-container.tsx +69 -29
  61. package/src/search-results/features/flights/flight-search-results-self-contained.tsx +0 -3
  62. package/src/search-results/features/hotels/hotel-search-results-self-contained.tsx +0 -3
  63. package/src/search-results/store/search-results-slice.ts +7 -1
  64. package/src/search-results/types.ts +2 -2
  65. package/src/shared/translations/ar-SA.json +249 -0
  66. package/src/shared/translations/da-DK.json +249 -0
  67. package/src/shared/translations/de-DE.json +249 -0
  68. package/src/shared/translations/en-GB.json +8 -2
  69. package/src/shared/translations/es-ES.json +249 -0
  70. package/src/shared/translations/fr-BE.json +8 -2
  71. package/src/shared/translations/fr-FR.json +249 -0
  72. package/src/shared/translations/is-IS.json +249 -0
  73. package/src/shared/translations/it-IT.json +249 -0
  74. package/src/shared/translations/ja-JP.json +249 -0
  75. package/src/shared/translations/nl-BE.json +8 -2
  76. package/src/shared/translations/nl-NL.json +249 -0
  77. package/src/shared/translations/no-NO.json +249 -0
  78. package/src/shared/translations/pl-PL.json +249 -0
  79. package/src/shared/translations/pt-PT.json +249 -0
  80. package/src/shared/translations/sv-SE.json +249 -0
  81. package/src/shared/utils/localization-util.ts +107 -12
  82. package/styles/components/_form.scss +6 -0
  83. package/styles/components/_search.scss +1 -0
@@ -15,6 +15,7 @@ interface DateRangePickerProps {
15
15
  onFromDateChange?: (date?: Date) => void;
16
16
  onToDateChange?: (date?: Date) => void;
17
17
  onFocusMonthChange?: (focusMonth: { month: number; year: number }) => void;
18
+ toDateByFromDate?: (fromDate?: Date) => Date | undefined;
18
19
  }
19
20
  declare const DateRangePicker: React.FC<DateRangePickerProps>;
20
21
  export default DateRangePicker;
@@ -4,6 +4,11 @@ interface DatesProps {
4
4
  value?: DateRange;
5
5
  duration?: number;
6
6
  onChange?: (value: DateRange) => void;
7
+ availableDatePairs?: {
8
+ fromDate: Date;
9
+ toDate: Date;
10
+ }[];
11
+ isLoading?: boolean;
7
12
  }
8
13
  declare const Dates: React.FC<DatesProps>;
9
14
  export default Dates;
@@ -0,0 +1,8 @@
1
+ import { BookingPackageItem } from '@qite/tide-client';
2
+ import React from 'react';
3
+ interface ListViewProps {
4
+ searchResults: BookingPackageItem[];
5
+ onSelect?: (selectedItem: BookingPackageItem) => void;
6
+ }
7
+ declare const ListView: React.FC<ListViewProps>;
8
+ export default ListView;
@@ -0,0 +1 @@
1
+ export declare const DATE_FORMAT = 'yyyy-MM-dd';
@@ -11,6 +11,8 @@ export interface Settings {
11
11
  apiKey?: string;
12
12
  addProductToQuery?: boolean;
13
13
  isOffer?: boolean;
14
+ displayMode?: 'list' | 'calendar';
15
+ searchType?: number;
14
16
  alternativeActionText?: string;
15
17
  alternativeAction?: () => void;
16
18
  }
@@ -1,4 +1,4 @@
1
- import { BookingPackage, BookingPackageDetailsRequest, BookingPackageRequest, TideResponse } from '@qite/tide-client/build/types';
1
+ import { BookingPackage, BookingPackageDetailsRequest, BookingPackageRequest, BookingPackageSearchRequest, TideResponse } from '@qite/tide-client/build/types';
2
2
  import { ApiSettingsState } from '../../shared/types';
3
3
  declare const packageApi: {
4
4
  fetchDetails: (
@@ -7,5 +7,10 @@ declare const packageApi: {
7
7
  languageCode?: string,
8
8
  apiSettings?: ApiSettingsState
9
9
  ) => Promise<TideResponse<BookingPackage>>;
10
+ fetchSearch: (
11
+ request: BookingPackageRequest<BookingPackageSearchRequest>,
12
+ signal: AbortSignal,
13
+ apiSettings?: ApiSettingsState
14
+ ) => Promise<import('@qite/tide-client').BookingPackageItem[]>;
10
15
  };
11
16
  export default packageApi;
@@ -43,6 +43,9 @@ export interface BookingState {
43
43
  [key: string]: string;
44
44
  };
45
45
  isOption?: boolean;
46
+ travelersFirstStep: boolean;
47
+ isFetching?: boolean;
48
+ hasMounted: boolean;
46
49
  }
47
50
  export declare const fetchPackage: import('@reduxjs/toolkit').AsyncThunk<
48
51
  void,
@@ -69,6 +72,8 @@ export declare const setOfficeId: import('@reduxjs/toolkit').ActionCreatorWithPa
69
72
  setBookingNumber: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, 'booking/setBookingNumber'>,
70
73
  setIsRetry: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, 'booking/setIsRetry'>,
71
74
  setFetchingPackage: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, 'booking/setFetchingPackage'>,
75
+ setIsFetching: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, 'booking/setIsFetching'>,
76
+ setHasMounted: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, 'booking/setHasMounted'>,
72
77
  setPackage: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<BookingPackage | undefined, 'booking/setPackage'>,
73
78
  setPackageRooms: import('@reduxjs/toolkit').ActionCreatorWithPayload<BookingPackageRoom[], 'booking/setPackageRooms'>,
74
79
  setPackageOptionPax: import('@reduxjs/toolkit').ActionCreatorWithPayload<BookingOptionPax[], 'booking/setPackageOptionPax'>,
@@ -91,6 +96,8 @@ export declare const setOfficeId: import('@reduxjs/toolkit').ActionCreatorWithPa
91
96
  >,
92
97
  setFlights: import('@reduxjs/toolkit').ActionCreatorWithPayload<GroupedFlights, 'booking/setFlights'>,
93
98
  setAccommodationViewId: import('@reduxjs/toolkit').ActionCreatorWithPayload<number, 'booking/setAccommodationViewId'>,
94
- setIsOption: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, 'booking/setIsOption'>;
99
+ setIsOption: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, 'booking/setIsOption'>,
100
+ setTravelersFirstStep: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, 'booking/setTravelersFirstStep'>,
101
+ setIsUnavailable: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, 'booking/setIsUnavailable'>;
95
102
  declare const _default: import('redux').Reducer<BookingState, import('redux').AnyAction>;
96
103
  export default _default;
@@ -1,6 +1,8 @@
1
1
  import { BookingPackageAddress, BookingPackageBookRequest, BookingPackagePax, BookingPackageRequest } from '@qite/tide-client/build/types';
2
2
  import { RootState } from '../../store';
3
3
  import { Room } from '../../types';
4
+ export declare const selectHasMounted: (state: RootState) => boolean;
5
+ export declare const selectIsFetching: (state: RootState) => boolean | undefined;
4
6
  export declare const selectCurrentStep: (state: RootState) => import('./constants').BookingStep;
5
7
  export declare const selectGeneratePaymentUrl: (state: RootState) => boolean;
6
8
  export declare const selectSkipPaymentWithAgent: (state: RootState) => boolean;
@@ -278,3 +280,4 @@ export declare const selectBookingPackageBookRequest: ((state: {
278
280
  > & {
279
281
  clearCache: () => void;
280
282
  };
283
+ export declare const selectTravelersFirstStep: (state: any) => any;
@@ -7,7 +7,7 @@ export declare const getTravelersText: (
7
7
  }[]
8
8
  ) => string[];
9
9
  export declare const getDateText: (date: string | undefined, hideYear?: boolean) => string | undefined;
10
- export declare const getDatePeriodText: (from?: string, to?: string, nightsOnly?: boolean) => string | undefined;
10
+ export declare const getDatePeriodText: (translations: Record<string, any>, from?: string, to?: string, nightsOnly?: boolean) => string | undefined;
11
11
  export declare const getFlightText: (firstFlight: FlightLine | undefined, lastFlight: FlightLine | undefined) => string;
12
12
  export declare const getAirlines: (flightLines: FlightLine[] | undefined) => string;
13
13
  export declare const getFlightHours: (firstFlight: FlightLine | undefined, lastFlight: FlightLine | undefined) => string;
@@ -21,6 +21,7 @@ interface SidebarProps {
21
21
  headerComponent?: JSX.Element;
22
22
  footerComponent?: JSX.Element;
23
23
  loaderComponent?: JSX.Element;
24
+ isUnavailable?: boolean;
24
25
  }
25
26
  declare const Sidebar: React.FC<SidebarProps>;
26
27
  export default Sidebar;
@@ -2,6 +2,7 @@ import { RootState } from '../../store';
2
2
  import { TravelersFormValues, RoomTraveler } from '../../types';
3
3
  export interface TravelersFormState {
4
4
  formValues?: TravelersFormValues;
5
+ isTravelersFirst?: boolean;
5
6
  }
6
7
  export declare const CHILD_MAX_AGE = 17;
7
8
  export declare const setFormValues: import('@reduxjs/toolkit').ActionCreatorWithPayload<TravelersFormValues, 'travelersForm/setFormValues'>;
@@ -25,6 +25,7 @@ export interface Settings {
25
25
  formFields?: FormField[];
26
26
  mainBookerFormFields?: FormField[];
27
27
  countries?: Country[];
28
+ travelersFirstStep?: boolean;
28
29
  };
29
30
  summary: {
30
31
  pathSuffix: string;