@qite/tide-components 1.0.13-preview.0 → 1.0.13

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 (24) hide show
  1. package/build/build-cjs/index.js +1653 -2403
  2. package/build/build-cjs/src/booking-wizard/features/booking/selectors.d.ts +1 -1
  3. package/build/build-cjs/src/booking-wizard/features/travelers-form/validate-form.d.ts +2 -2
  4. package/build/build-cjs/src/booking-wizard/types.d.ts +3 -23
  5. package/build/build-cjs/src/search-results/components/flight/flight-selection/independent-flight-option.d.ts +0 -2
  6. package/build/build-cjs/src/search-results/components/itinerary/index.d.ts +0 -1
  7. package/build/build-cjs/src/search-results/components/itinerary/itinerary-utils.d.ts +0 -1
  8. package/build/build-cjs/src/search-results/types.d.ts +0 -8
  9. package/build/build-cjs/src/search-results/utils/traject-utils.d.ts +0 -7
  10. package/build/build-cjs/src/shared/booking/travelers-form.d.ts +8 -13
  11. package/build/build-esm/index.js +1655 -2405
  12. package/build/build-esm/src/booking-wizard/features/booking/selectors.d.ts +1 -1
  13. package/build/build-esm/src/booking-wizard/features/travelers-form/validate-form.d.ts +2 -2
  14. package/build/build-esm/src/booking-wizard/types.d.ts +3 -23
  15. package/build/build-esm/src/search-results/components/flight/flight-selection/independent-flight-option.d.ts +0 -2
  16. package/build/build-esm/src/search-results/components/itinerary/index.d.ts +0 -1
  17. package/build/build-esm/src/search-results/components/itinerary/itinerary-utils.d.ts +0 -1
  18. package/build/build-esm/src/search-results/types.d.ts +0 -8
  19. package/build/build-esm/src/search-results/utils/traject-utils.d.ts +0 -7
  20. package/build/build-esm/src/shared/booking/travelers-form.d.ts +8 -13
  21. package/package.json +2 -2
  22. package/styles/components/_flight-option.scss +12 -0
  23. package/build/build-cjs/src/search-results/utils/booked-entry-utils.d.ts +0 -20
  24. package/build/build-esm/src/search-results/utils/booked-entry-utils.d.ts +0 -20
@@ -17,7 +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
+ export declare const selectPaxCustomFields: (state: RootState) => import("@qite/tide-client").BookingPackagePaxCustomField[];
21
21
  export declare const selectPackageFlights: (state: RootState) => {
22
22
  outward: import("@qite/tide-client").BookingPackageFlight[] | undefined;
23
23
  return: import("@qite/tide-client").BookingPackageFlight[] | undefined;
@@ -1,5 +1,5 @@
1
1
  import { FormikErrors } from 'formik';
2
- import { BookingPackagePaxFieldConfig } from '@qite/tide-client/build/types';
2
+ import { BookingPackagePaxCustomField } from '@qite/tide-client/build/types';
3
3
  import { FormField, TravelersFormValues } from '../../types';
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
+ declare const validateForm: (values: TravelersFormValues, agentRequired?: boolean, bookingType?: string, translations?: any, formFields?: FormField[], mainBookerFormFields?: FormField[], maxChildAge?: number, maxBabyAge?: number, paxCustomFields?: BookingPackagePaxCustomField[]) => FormikErrors<TravelersFormValues>;
5
5
  export default validateForm;
@@ -27,6 +27,8 @@ export interface Settings {
27
27
  countries?: Country[];
28
28
  travelersFirstStep?: boolean;
29
29
  showAllCountries?: boolean;
30
+ showWeightField?: boolean;
31
+ showHeightField?: boolean;
30
32
  };
31
33
  summary: {
32
34
  pathSuffix: string;
@@ -136,13 +138,6 @@ export interface SummaryCheckbox {
136
138
  text: string;
137
139
  isSelected: boolean;
138
140
  }
139
- export interface TravelerAddress {
140
- street?: string;
141
- number?: string;
142
- postalCode?: string;
143
- location?: string;
144
- country?: string;
145
- }
146
141
  export interface Traveler {
147
142
  id: number;
148
143
  gender: string;
@@ -159,22 +154,6 @@ export interface Traveler {
159
154
  weightType?: number;
160
155
  height?: number | null;
161
156
  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
157
  customFields?: BookingPackageCustomField[];
179
158
  }
180
159
  export interface Room {
@@ -336,6 +315,7 @@ export interface FlightFilterOptions {
336
315
  airports: FlightFilterOption[];
337
316
  airlines: FlightFilterOption[];
338
317
  numberOfStops: FlightFilterOption[];
318
+ travelClasses: FlightFilterOption[];
339
319
  outward: FlightDirectionFilter;
340
320
  return: FlightDirectionFilter;
341
321
  }
@@ -9,8 +9,6 @@ interface IndependentFlightOptionProps {
9
9
  showSelectedState?: boolean;
10
10
  currentSelectedPrice?: number;
11
11
  price?: number;
12
- selectLabel?: string;
13
- selectedLabel?: string;
14
12
  }
15
13
  declare const IndependentFlightOption: React.FC<IndependentFlightOptionProps>;
16
14
  export default IndependentFlightOption;
@@ -5,7 +5,6 @@ interface ItineraryProps {
5
5
  handleSetIsOpen: () => void;
6
6
  isLoading?: boolean;
7
7
  onEditAccommodation?: (segments: PackagingEntryLine[]) => void;
8
- onSaveEntry?: () => void;
9
8
  }
10
9
  declare const Itinerary: React.FC<ItineraryProps>;
11
10
  export default Itinerary;
@@ -1,5 +1,4 @@
1
1
  import { PackagingEntryLine, PackagingEntryLineFlightLine, PackagingTrajectNode } from '@qite/tide-client';
2
- export declare const isMeaningfulItineraryLine: (line: PackagingEntryLine) => boolean;
3
2
  export declare const getFlightLines: (flight?: PackagingEntryLine) => PackagingEntryLineFlightLine[];
4
3
  export declare const getDepartureTime: (flight?: PackagingEntryLine) => string;
5
4
  export declare const getArrivalTime: (flight?: PackagingEntryLine) => string;
@@ -39,14 +39,6 @@ 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;
50
42
  /**
51
43
  * From the website portal configuration. When true a traject node may also offer externally
52
44
  * sourced (API/vendor) hotels and excursions; when false only products held internally in Tide
@@ -74,8 +74,6 @@ 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;
79
77
  export declare const buildTrajectFlightRequest: ({ node, line }: TrajectNodeWithLine, context: TrajectSearchContext, pax: FlightSearchRequest["pax"]) => FlightSearchRequest;
80
78
  /**
81
79
  * The entry as the backend can price it.
@@ -89,11 +87,6 @@ export declare const buildTrajectFlightRequest: ({ node, line }: TrajectNodeWith
89
87
  * mapper gave them. This swaps in the guid of whatever each line resolved onto, leaving the
90
88
  * lines the traveller added themselves alone — those were built from a search result and already
91
89
  * 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.
97
90
  */
98
91
  export declare const withCachedEntryLineGuids: (entry: PackagingEntry, trajectEntry: PackagingTrajectResponse, nodeAvailability: Record<string, {
99
92
  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 { BookingPackageCustomField, BookingPackagePax, BookingPackagePaxFieldConfig, CountryItem, PackagingEntry, PackagingEntryPax } from '@qite/tide-client';
4
+ import { BookingPackageCustomField, BookingPackagePaxCustomField, CountryItem, PackagingEntry, PackagingEntryPax } from '@qite/tide-client';
5
5
  export type TravelersFormField = {
6
6
  type: string;
7
7
  };
@@ -33,7 +33,9 @@ export interface SharedTravelersFormProps {
33
33
  isUnavailable?: boolean;
34
34
  useCompactForm?: boolean;
35
35
  showAllCountries?: boolean;
36
- paxFields?: BookingPackagePaxFieldConfig[];
36
+ showWeightField?: boolean;
37
+ showHeightField?: boolean;
38
+ paxCustomFields?: BookingPackagePaxCustomField[];
37
39
  showAgentSelection?: boolean;
38
40
  initialShowAgents?: boolean;
39
41
  renderPreviousButton?: () => ReactNode;
@@ -41,21 +43,15 @@ export interface SharedTravelersFormProps {
41
43
  }
42
44
  export declare function isBabyAge(age?: number | null, maxBabyAge?: number): boolean;
43
45
  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;
46
+ export declare function buildEmptyCustomFields(paxCustomFields?: BookingPackagePaxCustomField[]): BookingPackageCustomField[];
47
+ export declare function getApplicablePaxCustomFields(paxCustomFields: BookingPackagePaxCustomField[] | undefined, isMainBooker: boolean): BookingPackagePaxCustomField[];
52
48
  export declare function createTraveler(traveler: RoomTraveler, followNumber: {
53
49
  number: number;
54
- }, personTranslation?: string, isCompact?: boolean, maxBabyAge?: number, paxFields?: BookingPackagePaxFieldConfig[]): Traveler;
50
+ }, personTranslation?: string, isCompact?: boolean, maxBabyAge?: number, paxCustomFields?: BookingPackagePaxCustomField[]): Traveler;
55
51
  export declare function createInitialValuesFromRooms(formRooms: {
56
52
  adults: RoomTraveler[];
57
53
  children: RoomTraveler[];
58
- }[], startDate?: string, endDate?: string, agentAdressId?: number, personTranslation?: string, isCompact?: boolean, maxBabyAge?: number, paxFields?: BookingPackagePaxFieldConfig[]): TravelersFormValues;
54
+ }[], startDate?: string, endDate?: string, agentAdressId?: number, personTranslation?: string, isCompact?: boolean, maxBabyAge?: number, paxCustomFields?: BookingPackagePaxCustomField[]): TravelersFormValues;
59
55
  export declare function createInitialValuesFromEditablePackagingEntry(editablePackagingEntry: PackagingEntry, agentAdressId?: number): TravelersFormValues;
60
56
  export declare function applyTravelersFormValuesToEditablePackagingEntry(editablePackagingEntry: PackagingEntry, values: TravelersFormValues): {
61
57
  pax: PackagingEntryPax[];
@@ -79,7 +75,6 @@ export declare function applyTravelersFormValuesToEditablePackagingEntry(editabl
79
75
  price: number;
80
76
  depositAmount: number;
81
77
  rooms: import("@qite/tide-client").PackagingEntryRoom[];
82
- paxFields: BookingPackagePaxFieldConfig[];
83
78
  lines: import("@qite/tide-client").PackagingEntryLine[];
84
79
  status: import("@qite/tide-client").EntryStatus;
85
80
  customStatusId?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qite/tide-components",
3
- "version": "1.0.13-preview.0",
3
+ "version": "1.0.13",
4
4
  "description": "React components for Tide (booking, product availability, form, ...)",
5
5
  "main": "build/build-cjs/index.js",
6
6
  "types": "build/build-cjs/src/index.d.ts",
@@ -36,7 +36,7 @@
36
36
  "devDependencies": {
37
37
  "@jsonurl/jsonurl": "^1.1.4",
38
38
  "@popperjs/core": "^2.10.2",
39
- "@qite/tide-client": "^2.0.21-preview.1",
39
+ "@qite/tide-client": "^2.0.19",
40
40
  "@reduxjs/toolkit": "^2.8.2",
41
41
  "@rollup/plugin-commonjs": "^19.0.1",
42
42
  "@rollup/plugin-json": "^4.1.0",
@@ -995,6 +995,18 @@
995
995
  &--pub {
996
996
  background: var(--tide-booking-price-decrease);
997
997
  }
998
+
999
+ &__badge {
1000
+ display: inline-flex;
1001
+ align-items: center;
1002
+ color: #fff;
1003
+ background: var(--tide-booking-color-primary);
1004
+ border-radius: 20px;
1005
+ padding: 5px 12px;
1006
+ font-size: 12px;
1007
+ font-weight: 300;
1008
+ white-space: nowrap;
1009
+ }
998
1010
  }
999
1011
 
1000
1012
  &__airport {
@@ -1,20 +0,0 @@
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;
@@ -1,20 +0,0 @@
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;