@qite/tide-booking-component 1.4.109 → 1.4.111
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 +3613 -2276
- package/build/build-cjs/src/booking-wizard/components/step-route.d.ts +2 -2
- package/build/build-cjs/src/booking-wizard/features/sidebar/sidebar-flight.d.ts +1 -0
- package/build/build-cjs/src/booking-wizard/features/sidebar/sidebar-util.d.ts +2 -1
- package/build/build-cjs/src/booking-wizard/features/sidebar/sidebar.d.ts +0 -31
- package/build/build-cjs/src/booking-wizard/features/travelers-form/travelers-form.d.ts +1 -2
- package/build/build-cjs/src/search-results/components/book-packaging-entry/index.d.ts +8 -0
- package/build/build-cjs/src/search-results/components/book-packaging-entry/wl-sidebar.d.ts +7 -0
- package/build/build-cjs/src/search-results/components/spinner/spinner.d.ts +4 -1
- package/build/build-cjs/src/search-results/store/search-results-slice.d.ts +7 -1
- package/build/build-cjs/src/search-results/types.d.ts +3 -0
- package/build/build-cjs/src/shared/booking/booking-panel.d.ts +13 -0
- package/build/build-cjs/src/shared/booking/shared-confirmation.d.ts +25 -0
- package/build/build-cjs/src/shared/booking/shared-sidebar.d.ts +34 -0
- package/build/build-cjs/src/shared/booking/step-indicators.d.ts +7 -0
- package/build/build-cjs/src/shared/booking/summary.d.ts +43 -0
- package/build/build-cjs/src/shared/booking/travelers-form.d.ts +93 -0
- package/build/build-cjs/src/shared/components/flyin/flyin.d.ts +2 -0
- package/build/build-cjs/src/shared/components/flyin/packaging-flights-flyin.d.ts +2 -0
- package/build/build-cjs/src/shared/utils/booking-summary.d.ts +1 -0
- package/build/build-cjs/src/shared/utils/localization-util.d.ts +7 -0
- package/build/build-esm/index.js +3572 -2247
- package/build/build-esm/src/booking-wizard/components/step-route.d.ts +2 -2
- package/build/build-esm/src/booking-wizard/features/sidebar/sidebar-flight.d.ts +1 -0
- package/build/build-esm/src/booking-wizard/features/sidebar/sidebar-util.d.ts +2 -1
- package/build/build-esm/src/booking-wizard/features/sidebar/sidebar.d.ts +0 -31
- package/build/build-esm/src/booking-wizard/features/travelers-form/travelers-form.d.ts +1 -2
- package/build/build-esm/src/search-results/components/book-packaging-entry/index.d.ts +8 -0
- package/build/build-esm/src/search-results/components/book-packaging-entry/wl-sidebar.d.ts +7 -0
- package/build/build-esm/src/search-results/components/spinner/spinner.d.ts +4 -1
- package/build/build-esm/src/search-results/store/search-results-slice.d.ts +7 -1
- package/build/build-esm/src/search-results/types.d.ts +3 -0
- package/build/build-esm/src/shared/booking/booking-panel.d.ts +13 -0
- package/build/build-esm/src/shared/booking/shared-confirmation.d.ts +25 -0
- package/build/build-esm/src/shared/booking/shared-sidebar.d.ts +34 -0
- package/build/build-esm/src/shared/booking/step-indicators.d.ts +7 -0
- package/build/build-esm/src/shared/booking/summary.d.ts +43 -0
- package/build/build-esm/src/shared/booking/travelers-form.d.ts +93 -0
- package/build/build-esm/src/shared/components/flyin/flyin.d.ts +2 -0
- package/build/build-esm/src/shared/components/flyin/packaging-flights-flyin.d.ts +2 -0
- package/build/build-esm/src/shared/utils/booking-summary.d.ts +1 -0
- package/build/build-esm/src/shared/utils/localization-util.d.ts +7 -0
- package/package.json +2 -2
- package/src/booking-wizard/components/step-indicator.tsx +10 -31
- package/src/booking-wizard/components/step-route.tsx +39 -14
- package/src/booking-wizard/features/confirmation/confirmation.tsx +11 -55
- package/src/booking-wizard/features/sidebar/index.tsx +10 -4
- package/src/booking-wizard/features/sidebar/sidebar-flight.tsx +2 -2
- package/src/booking-wizard/features/sidebar/sidebar-util.ts +1 -5
- package/src/booking-wizard/features/sidebar/sidebar.tsx +331 -326
- package/src/booking-wizard/features/summary/summary.tsx +1 -1
- package/src/booking-wizard/features/travelers-form/travelers-form.tsx +84 -1010
- package/src/search-results/components/book-packaging-entry/index.tsx +229 -0
- package/src/search-results/components/book-packaging-entry/wl-sidebar.tsx +162 -0
- package/src/search-results/components/excursions/day-by-day-excursions.tsx +6 -2
- package/src/search-results/components/excursions/excursion-results.tsx +1 -1
- package/src/search-results/components/flight/flight-selection/independent-flight-selection.tsx +12 -3
- package/src/search-results/components/group-tour/group-tour-card.tsx +1 -1
- package/src/search-results/components/group-tour/group-tour-results.tsx +1 -1
- package/src/search-results/components/hotel/hotel-accommodation-results.tsx +6 -3
- package/src/search-results/components/itinerary/full-itinerary.tsx +1 -1
- package/src/search-results/components/itinerary/index.tsx +13 -12
- package/src/search-results/components/search-results-container/flight-search-results.tsx +1 -1
- package/src/search-results/components/search-results-container/search-results-container.tsx +280 -217
- package/src/search-results/components/spinner/spinner.tsx +12 -4
- package/src/search-results/store/search-results-slice.ts +22 -2
- package/src/search-results/types.ts +4 -0
- package/src/shared/booking/booking-panel.tsx +25 -0
- package/src/shared/booking/shared-confirmation.tsx +105 -0
- package/src/shared/booking/shared-sidebar.tsx +432 -0
- package/src/shared/booking/step-indicators.tsx +30 -0
- package/src/shared/booking/summary.tsx +380 -0
- package/src/shared/booking/travelers-form.tsx +870 -0
- package/src/shared/components/flyin/accommodation-flyin.tsx +3 -4
- package/src/shared/components/flyin/flights-flyin.tsx +1 -1
- package/src/shared/components/flyin/flyin.tsx +16 -9
- package/src/shared/components/flyin/group-tour-flyin.tsx +3 -4
- package/src/shared/components/flyin/packaging-flights-flyin.tsx +11 -4
- package/src/shared/components/icon.tsx +13 -0
- package/src/shared/translations/ar-SA.json +7 -1
- package/src/shared/translations/da-DK.json +7 -1
- package/src/shared/translations/de-DE.json +7 -1
- package/src/shared/translations/en-GB.json +8 -2
- package/src/shared/translations/es-ES.json +7 -1
- package/src/shared/translations/fr-BE.json +7 -1
- package/src/shared/translations/fr-FR.json +7 -1
- package/src/shared/translations/is-IS.json +7 -1
- package/src/shared/translations/it-IT.json +7 -1
- package/src/shared/translations/ja-JP.json +7 -1
- package/src/shared/translations/nl-BE.json +7 -1
- package/src/shared/translations/nl-NL.json +7 -1
- package/src/shared/translations/no-NO.json +7 -1
- package/src/shared/translations/pl-PL.json +7 -1
- package/src/shared/translations/pt-PT.json +7 -1
- package/src/shared/translations/sv-SE.json +7 -1
- package/src/shared/utils/booking-summary.tsx +46 -0
- package/src/shared/utils/localization-util.ts +8 -0
- package/src/shared/utils/tide-api-utils.ts +2 -2
- package/styles/components/_dropdown.scss +5 -0
- package/styles/components/_flyin.scss +43 -0
- package/styles/components/_loader.scss +82 -0
- package/styles/components/_search.scss +14 -2
- package/styles/content-blocks-variables.scss +14 -14
- /package/build/build-cjs/src/{booking-wizard/components → shared/booking}/product-card.d.ts +0 -0
- /package/build/build-esm/src/{booking-wizard/components → shared/booking}/product-card.d.ts +0 -0
- /package/src/{booking-wizard/components → shared/booking}/product-card.tsx +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
interface
|
|
2
|
+
interface StepRouteProps {
|
|
3
3
|
number: number;
|
|
4
4
|
title: string;
|
|
5
5
|
component: JSX.Element;
|
|
6
6
|
}
|
|
7
|
-
declare const StepRoute: React.FC<
|
|
7
|
+
declare const StepRoute: React.FC<StepRouteProps>;
|
|
8
8
|
export default StepRoute;
|
|
@@ -4,7 +4,8 @@ export declare const getTravelersText: (
|
|
|
4
4
|
rooms: {
|
|
5
5
|
adults: RoomTraveler[];
|
|
6
6
|
children: RoomTraveler[];
|
|
7
|
-
}[]
|
|
7
|
+
}[],
|
|
8
|
+
translations: any
|
|
8
9
|
) => string[];
|
|
9
10
|
export declare const getDateText: (date: string | undefined, hideYear?: boolean) => string | undefined;
|
|
10
11
|
export declare const getDatePeriodText: (translations: Record<string, any>, from?: string, to?: string, nightsOnly?: boolean) => string | undefined;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { BookingPackageFlightMetaData, BookingPackageRoom, BookingPriceDetail } from '@qite/tide-client/build/types';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { PricePerPaxType } from '../../types';
|
|
4
|
-
interface SidebarProps {
|
|
5
|
-
productName: string;
|
|
6
|
-
thumbnailUrl?: string;
|
|
7
|
-
isLoading: boolean;
|
|
8
|
-
travelerRooms?: string[];
|
|
9
|
-
startDateText?: string;
|
|
10
|
-
endDateText?: string;
|
|
11
|
-
departureFlightMetaData?: BookingPackageFlightMetaData;
|
|
12
|
-
returnFlightMetaData?: BookingPackageFlightMetaData;
|
|
13
|
-
basePrice?: number;
|
|
14
|
-
commission?: number;
|
|
15
|
-
totalPrice?: number;
|
|
16
|
-
remainingAmountText?: string;
|
|
17
|
-
includedCosts?: BookingPriceDetail[];
|
|
18
|
-
extraCosts?: BookingPriceDetail[];
|
|
19
|
-
deposit?: number;
|
|
20
|
-
accommodations?: BookingPackageRoom[];
|
|
21
|
-
includedServiceTypes?: number[];
|
|
22
|
-
isOnRequest?: boolean;
|
|
23
|
-
headerComponent?: JSX.Element;
|
|
24
|
-
footerComponent?: JSX.Element;
|
|
25
|
-
loaderComponent?: JSX.Element;
|
|
26
|
-
isUnavailable?: boolean;
|
|
27
|
-
basePricePerPaxType?: PricePerPaxType[];
|
|
28
|
-
seperateExtraPricePerPaxType?: PricePerPaxType[];
|
|
29
|
-
}
|
|
30
|
-
declare const Sidebar: React.FC<SidebarProps>;
|
|
31
|
-
export default Sidebar;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SearchSeed } from '../../types';
|
|
3
|
+
interface BookPackagingEntryProps {
|
|
4
|
+
activeSearchSeed: SearchSeed | null;
|
|
5
|
+
isConfirmationPage?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const BookPackagingEntry: React.FC<BookPackagingEntryProps>;
|
|
8
|
+
export default BookPackagingEntry;
|
|
@@ -43,6 +43,9 @@ export interface SearchResultsState {
|
|
|
43
43
|
excursionSearchParams: ExcursionSearchParams | null;
|
|
44
44
|
selectedExcursionSearchResult: PackagingAccommodationResponse | null;
|
|
45
45
|
confirmedExcursionsByDay: Record<string, PackagingAccommodationResponse[]>;
|
|
46
|
+
bookPackagingEntry: boolean;
|
|
47
|
+
currentStep: number;
|
|
48
|
+
bookingNumber?: string;
|
|
46
49
|
}
|
|
47
50
|
export declare const setResults: import('@reduxjs/toolkit').ActionCreatorWithPayload<BookingPackageItem[], 'searchResults/setResults'>,
|
|
48
51
|
setFilteredResults: import('@reduxjs/toolkit').ActionCreatorWithPayload<BookingPackageItem[], 'searchResults/setFilteredResults'>,
|
|
@@ -127,6 +130,9 @@ export declare const setResults: import('@reduxjs/toolkit').ActionCreatorWithPay
|
|
|
127
130
|
dayKey: string;
|
|
128
131
|
},
|
|
129
132
|
'searchResults/clearConfirmedExcursionsForDay'
|
|
130
|
-
|
|
133
|
+
>,
|
|
134
|
+
setBookPackagingEntry: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, 'searchResults/setBookPackagingEntry'>,
|
|
135
|
+
setCurrentStep: import('@reduxjs/toolkit').ActionCreatorWithPayload<number, 'searchResults/setCurrentStep'>,
|
|
136
|
+
setBookingNumber: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, 'searchResults/setBookingNumber'>;
|
|
131
137
|
declare const _default: import('@reduxjs/toolkit').Reducer<SearchResultsState>;
|
|
132
138
|
export default _default;
|
|
@@ -44,6 +44,9 @@ export interface SearchResultsConfiguration {
|
|
|
44
44
|
};
|
|
45
45
|
onBook?: (result: BookingPackage) => void;
|
|
46
46
|
packagingEntry?: PackagingEntry | null;
|
|
47
|
+
generatePaymentUrl?: boolean;
|
|
48
|
+
entryStatus?: number;
|
|
49
|
+
customEntryStatusId?: number;
|
|
47
50
|
}
|
|
48
51
|
export type FilterType = 'checkbox' | 'toggle' | 'slider' | 'star-rating';
|
|
49
52
|
export type FilterProperty =
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface BookingPanelProps {
|
|
3
|
+
currentStep: number;
|
|
4
|
+
stepLabels: string[];
|
|
5
|
+
renderTitle: (step: number) => React.ReactNode;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
StepIndicatorsComponent: React.ComponentType<{
|
|
8
|
+
currentStep: number;
|
|
9
|
+
stepLabels: string[];
|
|
10
|
+
}>;
|
|
11
|
+
}
|
|
12
|
+
declare const BookingPanel: React.FC<BookingPanelProps>;
|
|
13
|
+
export default BookingPanel;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface SharedConfirmationTranslations {
|
|
3
|
+
MAIL_SUBJECT: string;
|
|
4
|
+
TITLE_TEXT_OPTION: string;
|
|
5
|
+
TITLE_TEXT_OFFER: string;
|
|
6
|
+
TITLE_TEXT_BOOKING: string;
|
|
7
|
+
MESSAGE_TEXT1: string;
|
|
8
|
+
MESSAGE_TEXT2_OFFER: string;
|
|
9
|
+
MESSAGE_TEXT2_BOOKING: string;
|
|
10
|
+
QUESTIONS_TEXT1: string;
|
|
11
|
+
QUESTIONS_TEXT2: string;
|
|
12
|
+
QUESTIONS_TEXT3: string;
|
|
13
|
+
QUESTIONS_ALT: string;
|
|
14
|
+
}
|
|
15
|
+
export interface SharedConfirmationProps {
|
|
16
|
+
bookingNumber?: string;
|
|
17
|
+
isOption?: boolean;
|
|
18
|
+
isOffer?: boolean;
|
|
19
|
+
translations: SharedConfirmationTranslations;
|
|
20
|
+
companyContactPhone?: string;
|
|
21
|
+
companyContactEmail?: string;
|
|
22
|
+
homeUrl?: string;
|
|
23
|
+
}
|
|
24
|
+
declare const SharedConfirmation: React.FC<SharedConfirmationProps>;
|
|
25
|
+
export default SharedConfirmation;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BookingPackageRoom, PackagingEntryLine } from '@qite/tide-client';
|
|
3
|
+
import { PricePerPaxType } from '../../booking-wizard/types';
|
|
4
|
+
interface SharedSidebarProps {
|
|
5
|
+
productName: string;
|
|
6
|
+
thumbnailUrl?: string;
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
travelerRooms?: string[];
|
|
9
|
+
startDateText?: string;
|
|
10
|
+
endDateText?: string;
|
|
11
|
+
departureFlightMetaData?: any;
|
|
12
|
+
returnFlightMetaData?: any;
|
|
13
|
+
basePrice?: number;
|
|
14
|
+
commission?: number;
|
|
15
|
+
totalPrice?: number;
|
|
16
|
+
remainingAmountText?: string;
|
|
17
|
+
includedCosts?: any[];
|
|
18
|
+
extraCosts?: any[];
|
|
19
|
+
deposit?: number;
|
|
20
|
+
accommodations?: BookingPackageRoom[];
|
|
21
|
+
packagingAccommodations?: PackagingEntryLine[];
|
|
22
|
+
includedServiceTypes?: number[];
|
|
23
|
+
isOnRequest?: boolean;
|
|
24
|
+
headerComponent?: React.ReactNode;
|
|
25
|
+
footerComponent?: React.ReactNode;
|
|
26
|
+
loaderComponent?: React.ReactNode;
|
|
27
|
+
isUnavailable?: boolean;
|
|
28
|
+
basePricePerPaxType?: PricePerPaxType[];
|
|
29
|
+
seperateExtraPricePerPaxType?: PricePerPaxType[];
|
|
30
|
+
translations: any;
|
|
31
|
+
agent?: number;
|
|
32
|
+
}
|
|
33
|
+
declare const SharedSidebar: React.FC<SharedSidebarProps>;
|
|
34
|
+
export default SharedSidebar;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { SummaryCheckbox, TravelersFormValues } from '../../booking-wizard/types';
|
|
3
|
+
export interface SummaryNotification {
|
|
4
|
+
id: number;
|
|
5
|
+
title?: string | null;
|
|
6
|
+
description?: string | null;
|
|
7
|
+
hasToBeConfirmed?: boolean;
|
|
8
|
+
isConfirmed?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface SummaryVoucherState {
|
|
11
|
+
code?: string;
|
|
12
|
+
isValidated?: boolean;
|
|
13
|
+
isValid?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface SharedSummaryProps {
|
|
16
|
+
translations: any;
|
|
17
|
+
travelerFormValues: TravelersFormValues;
|
|
18
|
+
checkboxes?: SummaryCheckbox[] | null;
|
|
19
|
+
notifications?: SummaryNotification[] | null;
|
|
20
|
+
remarks?: string;
|
|
21
|
+
voucher?: SummaryVoucherState;
|
|
22
|
+
voucherCodes?: string[];
|
|
23
|
+
enableVoucher?: boolean;
|
|
24
|
+
allowOption?: boolean;
|
|
25
|
+
isOffer?: boolean;
|
|
26
|
+
customValidateText?: string;
|
|
27
|
+
isSubmitting?: boolean;
|
|
28
|
+
userValidated?: boolean;
|
|
29
|
+
renderOptions: () => ReactNode;
|
|
30
|
+
renderPreviousButton: () => ReactNode;
|
|
31
|
+
renderLoader?: () => ReactNode;
|
|
32
|
+
onSubmit: React.FormEventHandler<HTMLFormElement>;
|
|
33
|
+
onRemarksChange?: (text: string) => void;
|
|
34
|
+
onCheckboxesChange?: (checkboxes: SummaryCheckbox[]) => void;
|
|
35
|
+
onNotificationsChange?: (notifications: SummaryNotification[]) => void;
|
|
36
|
+
onVoucherChange?: (voucher: SummaryVoucherState) => void;
|
|
37
|
+
onValidateVoucher?: () => void;
|
|
38
|
+
onAddVoucher?: React.MouseEventHandler<HTMLButtonElement>;
|
|
39
|
+
onRemoveVoucher?: (code: string) => void;
|
|
40
|
+
onUserValidatedChange?: (isValid: boolean) => void;
|
|
41
|
+
}
|
|
42
|
+
declare const SharedSummary: React.FC<SharedSummaryProps>;
|
|
43
|
+
export default SharedSummary;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { FormikProps } from 'formik';
|
|
3
|
+
import { Country, RoomTraveler, Traveler, TravelersFormValues } from '../../booking-wizard/types';
|
|
4
|
+
import { CountryItem, PackagingEntry } from '@qite/tide-client';
|
|
5
|
+
export type TravelersFormField = {
|
|
6
|
+
type: string;
|
|
7
|
+
};
|
|
8
|
+
export type AgentOption = {
|
|
9
|
+
id: number | string;
|
|
10
|
+
name: string;
|
|
11
|
+
postalCode?: string;
|
|
12
|
+
location?: string;
|
|
13
|
+
};
|
|
14
|
+
export type TypeAheadOption = {
|
|
15
|
+
key: string;
|
|
16
|
+
value: string;
|
|
17
|
+
text: string;
|
|
18
|
+
};
|
|
19
|
+
export interface SharedTravelersSettings {
|
|
20
|
+
countries?: Country[];
|
|
21
|
+
formFields?: TravelersFormField[];
|
|
22
|
+
mainBookerFormFields?: TravelersFormField[];
|
|
23
|
+
}
|
|
24
|
+
export interface SharedTravelersFormProps {
|
|
25
|
+
formik: FormikProps<TravelersFormValues>;
|
|
26
|
+
translations: any;
|
|
27
|
+
travellersSettings?: SharedTravelersSettings;
|
|
28
|
+
countries?: CountryItem[];
|
|
29
|
+
agents?: AgentOption[];
|
|
30
|
+
bookingType?: string;
|
|
31
|
+
agentAdressId?: number;
|
|
32
|
+
travelersFirstStep?: boolean;
|
|
33
|
+
isUnavailable?: boolean;
|
|
34
|
+
useCompactForm?: boolean;
|
|
35
|
+
showAllCountries?: boolean;
|
|
36
|
+
showAgentSelection?: boolean;
|
|
37
|
+
initialShowAgents?: boolean;
|
|
38
|
+
renderPreviousButton?: () => ReactNode;
|
|
39
|
+
onBookingTypeChange?: (bookingType: string) => void;
|
|
40
|
+
}
|
|
41
|
+
export declare function createTraveler(
|
|
42
|
+
traveler: RoomTraveler,
|
|
43
|
+
followNumber: {
|
|
44
|
+
number: number;
|
|
45
|
+
},
|
|
46
|
+
personTranslation?: string,
|
|
47
|
+
isCompact?: boolean
|
|
48
|
+
): Traveler;
|
|
49
|
+
export declare function createInitialValuesFromRooms(
|
|
50
|
+
formRooms: {
|
|
51
|
+
adults: RoomTraveler[];
|
|
52
|
+
children: RoomTraveler[];
|
|
53
|
+
}[],
|
|
54
|
+
startDate?: string,
|
|
55
|
+
agentAdressId?: number,
|
|
56
|
+
personTranslation?: string,
|
|
57
|
+
isCompact?: boolean
|
|
58
|
+
): TravelersFormValues;
|
|
59
|
+
export declare function createInitialValuesFromEditablePackagingEntry(editablePackagingEntry: any, agentAdressId?: number): TravelersFormValues;
|
|
60
|
+
export declare function applyTravelersFormValuesToEditablePackagingEntry(
|
|
61
|
+
editablePackagingEntry: PackagingEntry,
|
|
62
|
+
values: TravelersFormValues
|
|
63
|
+
): {
|
|
64
|
+
pax: import('@qite/tide-client').PackagingEntryPax[];
|
|
65
|
+
address: {
|
|
66
|
+
street: string;
|
|
67
|
+
houseNumber: string;
|
|
68
|
+
box: string;
|
|
69
|
+
zipCode: string;
|
|
70
|
+
place: string;
|
|
71
|
+
country: string;
|
|
72
|
+
travelAgentId: number;
|
|
73
|
+
phone: string;
|
|
74
|
+
email: string;
|
|
75
|
+
remarks?: string;
|
|
76
|
+
};
|
|
77
|
+
language?: string;
|
|
78
|
+
transactionId: string;
|
|
79
|
+
magicLink?: string;
|
|
80
|
+
dossierNumber: string;
|
|
81
|
+
bookingDate?: string | null;
|
|
82
|
+
price: number;
|
|
83
|
+
depositAmount: number;
|
|
84
|
+
rooms: import('@qite/tide-client').PackagingEntryRoom[];
|
|
85
|
+
lines: import('@qite/tide-client').PackagingEntryLine[];
|
|
86
|
+
status: import('@qite/tide-client').EntryStatus;
|
|
87
|
+
customStatusId?: number;
|
|
88
|
+
redirectUrl?: string;
|
|
89
|
+
returnPaymentUrl?: boolean;
|
|
90
|
+
remarks?: string;
|
|
91
|
+
};
|
|
92
|
+
declare const SharedTravelersForm: React.FC<SharedTravelersFormProps>;
|
|
93
|
+
export default SharedTravelersForm;
|
|
@@ -2,6 +2,8 @@ import React from 'react';
|
|
|
2
2
|
type FlightsFlyInProps = {
|
|
3
3
|
isOpen: boolean;
|
|
4
4
|
setIsOpen: (open: boolean) => void;
|
|
5
|
+
toggleFilters?: () => void;
|
|
6
|
+
filtersOpen: boolean;
|
|
5
7
|
};
|
|
6
8
|
declare const PackageingFlightsFlyIn: React.FC<FlightsFlyInProps>;
|
|
7
9
|
export default PackageingFlightsFlyIn;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const renderEditablePackagingEntrySummaryOptions: (editablePackagingEntry: any, priceDetails: any, translations: any) => any;
|
|
@@ -354,6 +354,7 @@ export declare const getTranslations: (language: string) => {
|
|
|
354
354
|
DEPARTURE_ASC: string;
|
|
355
355
|
FILTERS: string;
|
|
356
356
|
SHOW_ITINERARY: string;
|
|
357
|
+
VIEW_BOOKING: string;
|
|
357
358
|
ITINERARY_TITLE: string;
|
|
358
359
|
DOSSIER_NUMBER: string;
|
|
359
360
|
PACKAGE_PRICE_PER_PERSON: string;
|
|
@@ -388,6 +389,11 @@ export declare const getTranslations: (language: string) => {
|
|
|
388
389
|
DURATION_DESC: string;
|
|
389
390
|
TRAVEL_GROUP: string;
|
|
390
391
|
EXCURSION: string;
|
|
392
|
+
LOADING_EXCURSIONS: string;
|
|
393
|
+
LOADING_FLIGHTS: string;
|
|
394
|
+
LOADING_ACCOMMODATIONS: string;
|
|
395
|
+
LOADING_ITINERARY: string;
|
|
396
|
+
LOADING_OPTIONS: string;
|
|
391
397
|
};
|
|
392
398
|
ITINERARY: {
|
|
393
399
|
DAY: string;
|
|
@@ -429,3 +435,4 @@ export declare const calculateDays: (fromDate: Date, toDate: Date) => number;
|
|
|
429
435
|
export declare const getSortingName: (translations: any, sortByType: SortByType) => string;
|
|
430
436
|
export declare const findSortByType: (sortByTypes: SortByType[], sortKey: string, direction: string) => SortByType;
|
|
431
437
|
export declare const getDatesBetween: (fromDate: string, toDate: string) => Date[];
|
|
438
|
+
export declare const getDateOnlyTime: (date?: string | Date | null) => number;
|
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.111",
|
|
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.172",
|
|
33
33
|
"@reduxjs/toolkit": "^2.8.2",
|
|
34
34
|
"@rollup/plugin-commonjs": "^19.0.1",
|
|
35
35
|
"@rollup/plugin-json": "^4.1.0",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import { useSelector } from 'react-redux';
|
|
3
|
-
import { buildClassName } from '../../shared/utils/class-util';
|
|
4
3
|
import { selectTranslations, selectTravelersFirstStep } from '../features/booking/selectors';
|
|
5
4
|
import SettingsContext from '../settings-context';
|
|
5
|
+
import SharedStepIndicators from '../../shared/booking/step-indicators';
|
|
6
6
|
|
|
7
7
|
interface StepIndicatorsProps {
|
|
8
8
|
currentStep: number;
|
|
@@ -10,48 +10,27 @@ interface StepIndicatorsProps {
|
|
|
10
10
|
|
|
11
11
|
const StepIndicators: React.FC<StepIndicatorsProps> = ({ currentStep }) => {
|
|
12
12
|
const { flightOptions, roomOptions } = useContext(SettingsContext);
|
|
13
|
-
|
|
14
13
|
const translations = useSelector(selectTranslations);
|
|
15
14
|
const travelersFirstStep = useSelector(selectTravelersFirstStep);
|
|
16
15
|
|
|
17
|
-
const
|
|
18
|
-
|
|
16
|
+
const stepLabels: string[] = [];
|
|
19
17
|
if (travelersFirstStep) {
|
|
20
|
-
|
|
18
|
+
stepLabels.push(translations.STEPS.PERSONAL_DETAILS);
|
|
21
19
|
}
|
|
22
20
|
if (!flightOptions.isHidden) {
|
|
23
|
-
|
|
21
|
+
stepLabels.push(translations.STEPS.FLIGHT_OPTIONS);
|
|
24
22
|
}
|
|
25
23
|
if (!roomOptions.isHidden) {
|
|
26
|
-
|
|
24
|
+
stepLabels.push(translations.STEPS.ROOM_OPTIONS);
|
|
27
25
|
}
|
|
28
|
-
|
|
29
|
-
allSteps.push(translations.STEPS.EXTRA_OPTIONS);
|
|
30
|
-
|
|
26
|
+
stepLabels.push(translations.STEPS.EXTRA_OPTIONS);
|
|
31
27
|
if (!travelersFirstStep) {
|
|
32
|
-
|
|
28
|
+
stepLabels.push(translations.STEPS.PERSONAL_DETAILS);
|
|
33
29
|
}
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
stepLabels.push(translations.STEPS.SUMMARY);
|
|
31
|
+
stepLabels.push(translations.STEPS.CONFIRMATION);
|
|
36
32
|
|
|
37
|
-
return
|
|
38
|
-
<div className="step-indicators">
|
|
39
|
-
<div className="step-indicators__items">
|
|
40
|
-
{allSteps.map((stepName, index) => (
|
|
41
|
-
<div
|
|
42
|
-
key={`${index + 1}-${stepName}`}
|
|
43
|
-
className={buildClassName([
|
|
44
|
-
'step-indicators__item',
|
|
45
|
-
currentStep === index + 1 && 'step-indicators__item--active',
|
|
46
|
-
currentStep > index + 1 && 'step-indicators__item--completed'
|
|
47
|
-
])}>
|
|
48
|
-
<div className="step-indicators__icon step-indicators__icon">{index + 1}</div>
|
|
49
|
-
<div className="step-indicators__text">{stepName}</div>
|
|
50
|
-
</div>
|
|
51
|
-
))}
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
);
|
|
33
|
+
return <SharedStepIndicators currentStep={currentStep} stepLabels={stepLabels} />;
|
|
55
34
|
};
|
|
56
35
|
|
|
57
36
|
export default StepIndicators;
|
|
@@ -1,25 +1,50 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
2
|
import StepIndicators from './step-indicator';
|
|
3
|
+
import BookingPanel from '../../shared/booking/booking-panel';
|
|
4
|
+
import SettingsContext from '../settings-context';
|
|
5
|
+
import { useSelector } from 'react-redux';
|
|
6
|
+
import { selectTranslations, selectTravelersFirstStep } from '../features/booking/selectors';
|
|
3
7
|
|
|
4
|
-
interface
|
|
8
|
+
interface StepRouteProps {
|
|
5
9
|
number: number;
|
|
6
10
|
title: string;
|
|
7
11
|
component: JSX.Element;
|
|
8
12
|
}
|
|
9
13
|
|
|
10
|
-
const StepRoute: React.FC<
|
|
14
|
+
const StepRoute: React.FC<StepRouteProps> = ({ number, title, component }) => {
|
|
15
|
+
const { flightOptions, roomOptions } = useContext(SettingsContext);
|
|
16
|
+
const translations = useSelector(selectTranslations);
|
|
17
|
+
const travelersFirstStep = useSelector(selectTravelersFirstStep);
|
|
18
|
+
|
|
19
|
+
const stepLabels: string[] = [];
|
|
20
|
+
if (travelersFirstStep) {
|
|
21
|
+
stepLabels.push(translations.STEPS.PERSONAL_DETAILS);
|
|
22
|
+
}
|
|
23
|
+
if (!flightOptions.isHidden) {
|
|
24
|
+
stepLabels.push(translations.STEPS.FLIGHT_OPTIONS);
|
|
25
|
+
}
|
|
26
|
+
if (!roomOptions.isHidden) {
|
|
27
|
+
stepLabels.push(translations.STEPS.ROOM_OPTIONS);
|
|
28
|
+
}
|
|
29
|
+
stepLabels.push(translations.STEPS.EXTRA_OPTIONS);
|
|
30
|
+
if (!travelersFirstStep) {
|
|
31
|
+
stepLabels.push(translations.STEPS.PERSONAL_DETAILS);
|
|
32
|
+
}
|
|
33
|
+
stepLabels.push(translations.STEPS.SUMMARY);
|
|
34
|
+
stepLabels.push(translations.STEPS.CONFIRMATION);
|
|
35
|
+
|
|
11
36
|
return (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
37
|
+
<BookingPanel
|
|
38
|
+
currentStep={number}
|
|
39
|
+
stepLabels={stepLabels}
|
|
40
|
+
StepIndicatorsComponent={StepIndicators}
|
|
41
|
+
renderTitle={(step) => (
|
|
42
|
+
<>
|
|
43
|
+
{step + 1}. {stepLabels[step]}
|
|
44
|
+
</>
|
|
45
|
+
)}>
|
|
46
|
+
{component}
|
|
47
|
+
</BookingPanel>
|
|
23
48
|
);
|
|
24
49
|
};
|
|
25
50
|
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import React, { useContext, useEffect } from 'react';
|
|
2
2
|
import { selectBookingNumber, selectBookingQueryString, selectIsOption, selectTranslations } from '../booking/selectors';
|
|
3
|
-
|
|
4
|
-
import Message from '../../components/message';
|
|
5
3
|
import SettingsContext from '../../settings-context';
|
|
6
4
|
import { useSelector } from 'react-redux';
|
|
7
|
-
import Icon from '../../../shared/components/icon';
|
|
8
5
|
import { useAppDispatch } from '../../store';
|
|
9
6
|
import { setCurrentStep } from '../booking/booking-slice';
|
|
10
7
|
import { OPTIONS_FORM_STEP } from '../booking/constants';
|
|
11
|
-
import { format } from '../../../shared/utils/localization-util';
|
|
12
8
|
import { useNavigate } from 'react-router';
|
|
13
|
-
import
|
|
9
|
+
import SharedConfirmation from '../../../shared/booking/shared-confirmation';
|
|
14
10
|
|
|
15
11
|
interface ConfirmationProps {}
|
|
16
12
|
|
|
@@ -22,6 +18,7 @@ const Confirmation: React.FC<ConfirmationProps> = () => {
|
|
|
22
18
|
const bookingNumber = useSelector(selectBookingNumber);
|
|
23
19
|
const bookingQueryString = useSelector(selectBookingQueryString);
|
|
24
20
|
const isOption = useSelector(selectIsOption);
|
|
21
|
+
const translations = useSelector(selectTranslations);
|
|
25
22
|
|
|
26
23
|
useEffect(() => {
|
|
27
24
|
if (!bookingNumber) {
|
|
@@ -33,57 +30,16 @@ const Confirmation: React.FC<ConfirmationProps> = () => {
|
|
|
33
30
|
}
|
|
34
31
|
}, [bookingNumber]);
|
|
35
32
|
|
|
36
|
-
const translations = useSelector(selectTranslations);
|
|
37
|
-
const encodedMailSubject = encodeURI(translations.CONFIRMATION.MAIL_SUBJECT);
|
|
38
|
-
|
|
39
|
-
const titleText = isOption
|
|
40
|
-
? format(translations.CONFIRMATION.TITLE_TEXT_OPTION, [bookingNumber])
|
|
41
|
-
: settings.isOffer
|
|
42
|
-
? format(translations.CONFIRMATION.TITLE_TEXT_OFFER, [bookingNumber])
|
|
43
|
-
: format(translations.CONFIRMATION.TITLE_TEXT_BOOKING, [bookingNumber]);
|
|
44
|
-
|
|
45
33
|
return (
|
|
46
|
-
<
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<a href={`tel://${settings.companyContactPhone}`} className="sm__icon">
|
|
56
|
-
<Icon name="tel" />
|
|
57
|
-
</a>
|
|
58
|
-
<a href={`mailto://${settings.companyContactEmail}`} className="sm__icon">
|
|
59
|
-
<Icon name="mail" />
|
|
60
|
-
</a>
|
|
61
|
-
<a href="/" className="sm__icon">
|
|
62
|
-
<Icon name="home" />
|
|
63
|
-
</a>
|
|
64
|
-
</div>
|
|
65
|
-
}>
|
|
66
|
-
{!isOption ? (
|
|
67
|
-
<>
|
|
68
|
-
<p>
|
|
69
|
-
{translations.CONFIRMATION.MESSAGE_TEXT1}
|
|
70
|
-
<br />
|
|
71
|
-
{settings.isOffer ? translations.CONFIRMATION.MESSAGE_TEXT2_OFFER : translations.CONFIRMATION.MESSAGE_TEXT2_BOOKING}
|
|
72
|
-
</p>
|
|
73
|
-
<p>
|
|
74
|
-
{translations.CONFIRMATION.QUESTIONS_TEXT1}{' '}
|
|
75
|
-
<a href={`mailto:${settings.companyContactEmail}?subject=${encodedMailSubject}`} title={translations.CONFIRMATION.QUESTIONS_ALT}>
|
|
76
|
-
{translations.CONFIRMATION.QUESTIONS_TEXT2}
|
|
77
|
-
</a>
|
|
78
|
-
{translations.CONFIRMATION.QUESTIONS_TEXT3}
|
|
79
|
-
</p>
|
|
80
|
-
</>
|
|
81
|
-
) : undefined}
|
|
82
|
-
</Message>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
</div>
|
|
86
|
-
</div>
|
|
34
|
+
<SharedConfirmation
|
|
35
|
+
bookingNumber={bookingNumber}
|
|
36
|
+
isOption={isOption}
|
|
37
|
+
isOffer={settings.isOffer}
|
|
38
|
+
translations={translations.CONFIRMATION}
|
|
39
|
+
companyContactPhone={settings.companyContactPhone}
|
|
40
|
+
companyContactEmail={settings.companyContactEmail}
|
|
41
|
+
homeUrl={settings.basePath || '/'}
|
|
42
|
+
/>
|
|
87
43
|
);
|
|
88
44
|
};
|
|
89
45
|
|