@qite/tide-components 1.0.10 → 1.0.13-preview.0
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 +2386 -1305
- package/build/build-cjs/src/booking-wizard/features/booking/selectors.d.ts +1 -0
- package/build/build-cjs/src/booking-wizard/features/travelers-form/validate-form.d.ts +2 -1
- package/build/build-cjs/src/booking-wizard/types.d.ts +29 -1
- package/build/build-cjs/src/search-results/components/flight/flight-selection/independent-flight-option.d.ts +2 -0
- package/build/build-cjs/src/search-results/components/itinerary/index.d.ts +1 -0
- package/build/build-cjs/src/search-results/components/itinerary/itinerary-utils.d.ts +1 -0
- package/build/build-cjs/src/search-results/types.d.ts +8 -0
- package/build/build-cjs/src/search-results/utils/booked-entry-utils.d.ts +20 -0
- package/build/build-cjs/src/search-results/utils/traject-utils.d.ts +7 -0
- package/build/build-cjs/src/shared/booking/travelers-form.d.ts +13 -3
- package/build/build-esm/index.js +2390 -1309
- package/build/build-esm/src/booking-wizard/features/booking/selectors.d.ts +1 -0
- package/build/build-esm/src/booking-wizard/features/travelers-form/validate-form.d.ts +2 -1
- package/build/build-esm/src/booking-wizard/types.d.ts +29 -1
- package/build/build-esm/src/search-results/components/flight/flight-selection/independent-flight-option.d.ts +2 -0
- package/build/build-esm/src/search-results/components/itinerary/index.d.ts +1 -0
- package/build/build-esm/src/search-results/components/itinerary/itinerary-utils.d.ts +1 -0
- package/build/build-esm/src/search-results/types.d.ts +8 -0
- package/build/build-esm/src/search-results/utils/booked-entry-utils.d.ts +20 -0
- package/build/build-esm/src/search-results/utils/traject-utils.d.ts +7 -0
- package/build/build-esm/src/shared/booking/travelers-form.d.ts +13 -3
- package/package.json +2 -2
- package/styles/abstracts/_mixins.scss +74 -74
- package/styles/abstracts/_variables.scss +57 -57
- package/styles/base/_fonts.scss +2 -2
- package/styles/base/_normalize.scss +227 -227
- package/styles/base/_typography.scss +35 -35
- package/styles/booking-joker-variables.scss +596 -596
- package/styles/booking-product-variables.scss +330 -330
- package/styles/booking-product.scss +438 -438
- package/styles/booking-qsm-variables.scss +501 -501
- package/styles/booking-qsm.scss +52 -52
- package/styles/booking-search-results-variables.scss +734 -734
- package/styles/booking-search-results.scss +53 -53
- package/styles/booking-wizard-variables.scss +603 -603
- package/styles/booking-wizard.scss +61 -61
- package/styles/components/_accordion.scss +67 -67
- package/styles/components/_animations.scss +39 -39
- package/styles/components/_base.scss +107 -107
- package/styles/components/_booking.scss +906 -906
- package/styles/components/_breadcrumb.scss +92 -92
- package/styles/components/_button.scss +238 -238
- package/styles/components/_checkbox.scss +230 -230
- package/styles/components/_contact.scss +255 -255
- package/styles/components/_content.scss +336 -336
- package/styles/components/_cta.scss +238 -238
- package/styles/components/_date-list.scss +41 -41
- package/styles/components/_date-range-picker.scss +223 -223
- package/styles/components/_decrement-increment.scss +35 -35
- package/styles/components/_dropdown.scss +77 -77
- package/styles/components/_error.scss +50 -50
- package/styles/components/_faq.scss +30 -30
- package/styles/components/_flight-option.scss +1432 -1432
- package/styles/components/_flyin.scss +830 -830
- package/styles/components/_footer.scss +135 -135
- package/styles/components/_form.scss +1704 -1693
- package/styles/components/_gallery.scss +317 -317
- package/styles/components/_header.scss +113 -113
- package/styles/components/_image-with-text.scss +206 -206
- package/styles/components/_img-slider.scss +175 -175
- package/styles/components/_info-message.scss +75 -75
- package/styles/components/_input.scss +35 -35
- package/styles/components/_list.scss +185 -185
- package/styles/components/_loader.scss +152 -152
- package/styles/components/_login.scss +140 -140
- package/styles/components/_map-view.scss +1100 -1100
- package/styles/components/_mixins.scss +579 -579
- package/styles/components/_navbar.scss +765 -765
- package/styles/components/_passenger-picker.scss +306 -306
- package/styles/components/_phone-input.scss +8 -8
- package/styles/components/_placeholders.scss +165 -165
- package/styles/components/_pricing-summary.scss +163 -163
- package/styles/components/_qsm.scss +17 -17
- package/styles/components/_radiobutton.scss +170 -170
- package/styles/components/_search.scss +2197 -2197
- package/styles/components/_select-wrapper.scss +81 -81
- package/styles/components/_slider.scss +120 -128
- package/styles/components/_spinner.scss +29 -29
- package/styles/components/_step-indicators.scss +187 -187
- package/styles/components/_table.scss +81 -81
- package/styles/components/_tide-form.scss +578 -578
- package/styles/components/_tree.scss +648 -648
- package/styles/components/_typeahead.scss +275 -275
- package/styles/components/_variables.scss +89 -89
- package/styles/content-blocks-variables.scss +543 -543
- package/styles/content-blocks.scss +66 -66
- package/styles/font.scss +2 -2
- package/styles/qsm/_calendar.scss +274 -274
- package/styles/qsm/_qsm.scss +1097 -1097
- package/styles/search.scss +1200 -1200
- package/styles/tide-form-variables.scss +275 -275
- package/styles/tide-form.scss +56 -56
|
@@ -17,6 +17,7 @@ export declare const selectPackageOptionUnits: (state: RootState) => import("@qi
|
|
|
17
17
|
export declare const selectPackageOptionPax: (state: RootState) => import("@qite/tide-client").BookingOptionPax[] | undefined;
|
|
18
18
|
export declare const selectPackageGroups: (state: RootState) => import("@qite/tide-client").BookingOptionGroup<import("@qite/tide-client").PerBookingPackageOption>[] | undefined;
|
|
19
19
|
export declare const selectPackageDetails: (state: RootState) => import("@qite/tide-client").BookingPackage | undefined;
|
|
20
|
+
export declare const selectPaxFields: (state: RootState) => import("@qite/tide-client").BookingPackagePaxFieldConfig[];
|
|
20
21
|
export declare const selectPackageFlights: (state: RootState) => {
|
|
21
22
|
outward: import("@qite/tide-client").BookingPackageFlight[] | undefined;
|
|
22
23
|
return: import("@qite/tide-client").BookingPackageFlight[] | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FormikErrors } from 'formik';
|
|
2
|
+
import { BookingPackagePaxFieldConfig } from '@qite/tide-client/build/types';
|
|
2
3
|
import { FormField, TravelersFormValues } from '../../types';
|
|
3
|
-
declare const validateForm: (values: TravelersFormValues, agentRequired?: boolean, bookingType?: string, translations?: any, formFields?: FormField[], mainBookerFormFields?: FormField[], maxChildAge?: number, maxBabyAge?: number) => FormikErrors<TravelersFormValues>;
|
|
4
|
+
declare const validateForm: (values: TravelersFormValues, agentRequired?: boolean, bookingType?: string, translations?: any, formFields?: FormField[], mainBookerFormFields?: FormField[], maxChildAge?: number, maxBabyAge?: number, paxFields?: BookingPackagePaxFieldConfig[]) => FormikErrors<TravelersFormValues>;
|
|
4
5
|
export default validateForm;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BookingPackageFlight } from '@qite/tide-client/build/types';
|
|
1
|
+
import { BookingPackageCustomField, BookingPackageFlight } from '@qite/tide-client/build/types';
|
|
2
2
|
export interface Settings {
|
|
3
3
|
officeId: number;
|
|
4
4
|
token?: string;
|
|
@@ -136,6 +136,13 @@ export interface SummaryCheckbox {
|
|
|
136
136
|
text: string;
|
|
137
137
|
isSelected: boolean;
|
|
138
138
|
}
|
|
139
|
+
export interface TravelerAddress {
|
|
140
|
+
street?: string;
|
|
141
|
+
number?: string;
|
|
142
|
+
postalCode?: string;
|
|
143
|
+
location?: string;
|
|
144
|
+
country?: string;
|
|
145
|
+
}
|
|
139
146
|
export interface Traveler {
|
|
140
147
|
id: number;
|
|
141
148
|
gender: string;
|
|
@@ -148,6 +155,27 @@ export interface Traveler {
|
|
|
148
155
|
* form and its validation can treat the traveler as a baby instead of a child.
|
|
149
156
|
*/
|
|
150
157
|
isBaby?: boolean;
|
|
158
|
+
weight?: number | null;
|
|
159
|
+
weightType?: number;
|
|
160
|
+
height?: number | null;
|
|
161
|
+
heightType?: number;
|
|
162
|
+
nickname?: string;
|
|
163
|
+
birthplace?: string;
|
|
164
|
+
nationality?: string;
|
|
165
|
+
preferredLanguageId?: number;
|
|
166
|
+
email?: string;
|
|
167
|
+
phone?: string;
|
|
168
|
+
mobile?: string;
|
|
169
|
+
passportNumber?: string;
|
|
170
|
+
passportIssueDate?: string;
|
|
171
|
+
passportIssuedLocation?: string;
|
|
172
|
+
passportExpiryDate?: string;
|
|
173
|
+
emergencyNumber?: string;
|
|
174
|
+
hasInsurance?: boolean;
|
|
175
|
+
insuranceName?: string;
|
|
176
|
+
info?: string;
|
|
177
|
+
address?: TravelerAddress;
|
|
178
|
+
customFields?: BookingPackageCustomField[];
|
|
151
179
|
}
|
|
152
180
|
export interface Room {
|
|
153
181
|
adults: number;
|
|
@@ -9,6 +9,8 @@ interface IndependentFlightOptionProps {
|
|
|
9
9
|
showSelectedState?: boolean;
|
|
10
10
|
currentSelectedPrice?: number;
|
|
11
11
|
price?: number;
|
|
12
|
+
selectLabel?: string;
|
|
13
|
+
selectedLabel?: string;
|
|
12
14
|
}
|
|
13
15
|
declare const IndependentFlightOption: React.FC<IndependentFlightOptionProps>;
|
|
14
16
|
export default IndependentFlightOption;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PackagingEntryLine, PackagingEntryLineFlightLine, PackagingTrajectNode } from '@qite/tide-client';
|
|
2
|
+
export declare const isMeaningfulItineraryLine: (line: PackagingEntryLine) => boolean;
|
|
2
3
|
export declare const getFlightLines: (flight?: PackagingEntryLine) => PackagingEntryLineFlightLine[];
|
|
3
4
|
export declare const getDepartureTime: (flight?: PackagingEntryLine) => string;
|
|
4
5
|
export declare const getArrivalTime: (flight?: PackagingEntryLine) => string;
|
|
@@ -39,6 +39,14 @@ export interface SearchResultsConfiguration {
|
|
|
39
39
|
onFlightBook?: (result: ExtendedFlightSearchResponseItem) => void;
|
|
40
40
|
packagingEntry?: PackagingEntry | null;
|
|
41
41
|
trajectEntry?: PackagingTrajectResponse | null;
|
|
42
|
+
/**
|
|
43
|
+
* From the website portal configuration. Lets the traveller change an already booked entry
|
|
44
|
+
* opened through its magic link: the entry lands on the day-by-day service cards (the traject
|
|
45
|
+
* results screen) where booked services can be swapped for alternatives and extras added. The
|
|
46
|
+
* booked entry needs `magicLink` set — booking merges changes into the dossier on it. Off by
|
|
47
|
+
* default: without it a booked entry only shows its full itinerary, as before.
|
|
48
|
+
*/
|
|
49
|
+
allowBookedEntryChanges?: boolean;
|
|
42
50
|
/**
|
|
43
51
|
* From the website portal configuration. When true a traject node may also offer externally
|
|
44
52
|
* sourced (API/vendor) hotels and excursions; when false only products held internally in Tide
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PackagingAccommodationResponse, PackagingEntry, PackagingEntryLine, PackagingFlightResponse, PackagingTrajectNode, PackagingTrajectResponse } from '@qite/tide-client';
|
|
2
|
+
/**
|
|
3
|
+
* A booked entry opened through its magic link knows nothing about the traject it may once have
|
|
4
|
+
* been composed from — the dossier only keeps the lines. To give it the same day-by-day services
|
|
5
|
+
* screen a traject gets, the traject structure is rebuilt from those lines: every booked service
|
|
6
|
+
* becomes a node whose one "alternative" is the booked product itself, and the days span the trip.
|
|
7
|
+
*
|
|
8
|
+
* The synthesized response keeps the entry untouched (magic link included), which is also how the
|
|
9
|
+
* rest of the component tells this mode apart from a real traject: see isBookedEntryTraject.
|
|
10
|
+
*/
|
|
11
|
+
export declare const isBookedEntryTraject: (trajectEntry?: PackagingTrajectResponse | null) => boolean;
|
|
12
|
+
export declare const buildBookedTrajectEntry: (entry: PackagingEntry) => PackagingTrajectResponse;
|
|
13
|
+
/**
|
|
14
|
+
* The card for a booked service when no search result carries it any more (sold out, delisted).
|
|
15
|
+
* Rendered from the line, so the traveller still sees what they booked; price 0 makes the card
|
|
16
|
+
* leave its price out — the paid price lives in the price details, not on the line.
|
|
17
|
+
*/
|
|
18
|
+
export declare const buildBookedNodeResult: (node: PackagingTrajectNode, lines: PackagingEntryLine[]) => PackagingAccommodationResponse;
|
|
19
|
+
/** The booked flight as a flight result, so the card that shows it is the card the search results use. */
|
|
20
|
+
export declare const buildBookedFlightResult: (line: PackagingEntryLine) => PackagingFlightResponse;
|
|
@@ -74,6 +74,8 @@ export declare const getPackagingRoomsFromEntry: (entry: PackagingEntry) => Pack
|
|
|
74
74
|
export declare const pickCheapest: (results: PackagingAccommodationResponse[]) => PackagingAccommodationResponse | null;
|
|
75
75
|
export declare const applyResultToLines: (lines: PackagingEntryLine[], result: PackagingAccommodationResponse) => PackagingEntryLine[];
|
|
76
76
|
export declare const applyResultToLine: (line: PackagingEntryLine, result: PackagingAccommodationResponse, roomIndex?: number) => PackagingEntryLine;
|
|
77
|
+
export declare const buildNodeSelectionLines: (item: TrajectNodeWithLine, result: PackagingAccommodationResponse, bookedMode: boolean) => PackagingEntryLine[];
|
|
78
|
+
export declare const buildFlightSelectionLine: (item: TrajectNodeWithLine, flight: PackagingFlightResponse, bookedMode: boolean) => PackagingEntryLine;
|
|
77
79
|
export declare const buildTrajectFlightRequest: ({ node, line }: TrajectNodeWithLine, context: TrajectSearchContext, pax: FlightSearchRequest["pax"]) => FlightSearchRequest;
|
|
78
80
|
/**
|
|
79
81
|
* The entry as the backend can price it.
|
|
@@ -87,6 +89,11 @@ export declare const buildTrajectFlightRequest: ({ node, line }: TrajectNodeWith
|
|
|
87
89
|
* mapper gave them. This swaps in the guid of whatever each line resolved onto, leaving the
|
|
88
90
|
* lines the traveller added themselves alone — those were built from a search result and already
|
|
89
91
|
* carry the right one.
|
|
92
|
+
*
|
|
93
|
+
* A booked entry (the traject was rebuilt from a magic-link entry) is the other way around: its
|
|
94
|
+
* lines live in the dossier under their own guids, and only a line the traveller actually swapped
|
|
95
|
+
* (isChanged) exists in the search cache. Swapping an untouched line's guid would orphan it —
|
|
96
|
+
* the backend drops the dossier line and finds nothing to add — so those keep theirs.
|
|
90
97
|
*/
|
|
91
98
|
export declare const withCachedEntryLineGuids: (entry: PackagingEntry, trajectEntry: PackagingTrajectResponse, nodeAvailability: Record<string, {
|
|
92
99
|
results: PackagingAccommodationResponse[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { FormikProps } from 'formik';
|
|
3
3
|
import { Country, RoomTraveler, Traveler, TravelersFormValues } from '../../booking-wizard/types';
|
|
4
|
-
import { CountryItem, PackagingEntry, PackagingEntryPax } from '@qite/tide-client';
|
|
4
|
+
import { BookingPackageCustomField, BookingPackagePax, BookingPackagePaxFieldConfig, CountryItem, PackagingEntry, PackagingEntryPax } from '@qite/tide-client';
|
|
5
5
|
export type TravelersFormField = {
|
|
6
6
|
type: string;
|
|
7
7
|
};
|
|
@@ -33,6 +33,7 @@ export interface SharedTravelersFormProps {
|
|
|
33
33
|
isUnavailable?: boolean;
|
|
34
34
|
useCompactForm?: boolean;
|
|
35
35
|
showAllCountries?: boolean;
|
|
36
|
+
paxFields?: BookingPackagePaxFieldConfig[];
|
|
36
37
|
showAgentSelection?: boolean;
|
|
37
38
|
initialShowAgents?: boolean;
|
|
38
39
|
renderPreviousButton?: () => ReactNode;
|
|
@@ -40,13 +41,21 @@ export interface SharedTravelersFormProps {
|
|
|
40
41
|
}
|
|
41
42
|
export declare function isBabyAge(age?: number | null, maxBabyAge?: number): boolean;
|
|
42
43
|
export declare function formatBirthDate(birthDate?: string): string;
|
|
44
|
+
export declare function buildEmptyCustomFields(paxFields?: BookingPackagePaxFieldConfig[]): BookingPackageCustomField[];
|
|
45
|
+
export declare function getApplicablePaxCustomFields(paxFields: BookingPackagePaxFieldConfig[] | undefined, isMainBooker: boolean): BookingPackagePaxFieldConfig[];
|
|
46
|
+
export declare function getApplicableBuiltInPaxFields(paxFields: BookingPackagePaxFieldConfig[] | undefined, isMainBooker: boolean): BookingPackagePaxFieldConfig[];
|
|
47
|
+
export declare function getBuiltInPaxField(paxFields: BookingPackagePaxFieldConfig[] | undefined, fieldName: string, isMainBooker: boolean): BookingPackagePaxFieldConfig | undefined;
|
|
48
|
+
export declare const BUILT_IN_FIELD_PATHS: Record<string, string>;
|
|
49
|
+
export declare const CORE_FIELD_NAMES: Set<string>;
|
|
50
|
+
export declare const ADDRESS_FIELD_NAMES: string[];
|
|
51
|
+
export declare function applyTravelerToPax<T extends BookingPackagePax>(pax: T, traveler: Traveler, mainBookerId?: number): T;
|
|
43
52
|
export declare function createTraveler(traveler: RoomTraveler, followNumber: {
|
|
44
53
|
number: number;
|
|
45
|
-
}, personTranslation?: string, isCompact?: boolean, maxBabyAge?: number): Traveler;
|
|
54
|
+
}, personTranslation?: string, isCompact?: boolean, maxBabyAge?: number, paxFields?: BookingPackagePaxFieldConfig[]): Traveler;
|
|
46
55
|
export declare function createInitialValuesFromRooms(formRooms: {
|
|
47
56
|
adults: RoomTraveler[];
|
|
48
57
|
children: RoomTraveler[];
|
|
49
|
-
}[], startDate?: string, endDate?: string, agentAdressId?: number, personTranslation?: string, isCompact?: boolean, maxBabyAge?: number): TravelersFormValues;
|
|
58
|
+
}[], startDate?: string, endDate?: string, agentAdressId?: number, personTranslation?: string, isCompact?: boolean, maxBabyAge?: number, paxFields?: BookingPackagePaxFieldConfig[]): TravelersFormValues;
|
|
50
59
|
export declare function createInitialValuesFromEditablePackagingEntry(editablePackagingEntry: PackagingEntry, agentAdressId?: number): TravelersFormValues;
|
|
51
60
|
export declare function applyTravelersFormValuesToEditablePackagingEntry(editablePackagingEntry: PackagingEntry, values: TravelersFormValues): {
|
|
52
61
|
pax: PackagingEntryPax[];
|
|
@@ -70,6 +79,7 @@ export declare function applyTravelersFormValuesToEditablePackagingEntry(editabl
|
|
|
70
79
|
price: number;
|
|
71
80
|
depositAmount: number;
|
|
72
81
|
rooms: import("@qite/tide-client").PackagingEntryRoom[];
|
|
82
|
+
paxFields: BookingPackagePaxFieldConfig[];
|
|
73
83
|
lines: import("@qite/tide-client").PackagingEntryLine[];
|
|
74
84
|
status: import("@qite/tide-client").EntryStatus;
|
|
75
85
|
customStatusId?: number;
|