@qite/tide-components 1.0.9 → 1.0.12

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.
@@ -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 selectPaxCustomFields: (state: RootState) => import("@qite/tide-client").BookingPackagePaxCustomField[];
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 { BookingPackagePaxCustomField } 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, paxCustomFields?: BookingPackagePaxCustomField[]) => 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;
@@ -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;
@@ -148,6 +150,11 @@ export interface Traveler {
148
150
  * form and its validation can treat the traveler as a baby instead of a child.
149
151
  */
150
152
  isBaby?: boolean;
153
+ weight?: number | null;
154
+ weightType?: number;
155
+ height?: number | null;
156
+ heightType?: number;
157
+ customFields?: BookingPackageCustomField[];
151
158
  }
152
159
  export interface Room {
153
160
  adults: number;
@@ -50,6 +50,18 @@ export interface SearchResultsConfiguration {
50
50
  * node's remaining results in the fly-in.
51
51
  */
52
52
  hideShowMoreResults?: boolean;
53
+ /**
54
+ * From the website portal configuration. When true a traject day's activity suggestions are
55
+ * only searched after the traveller asks for them; when false they load automatically once
56
+ * the trip has resolved.
57
+ */
58
+ loadDayActivitiesOnDemand?: boolean;
59
+ /**
60
+ * From the website portal configuration. When true a traject hotel's card row is filled up
61
+ * with non-preferred hotels found in the area (API or internal Tide); when false the row only
62
+ * holds the hotels configured on the node.
63
+ */
64
+ showNonPreferredHotels?: boolean;
53
65
  generatePaymentUrl?: boolean;
54
66
  entryStatus?: number;
55
67
  customEntryStatusId?: number;
@@ -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, BookingPackagePaxCustomField, CountryItem, PackagingEntry, PackagingEntryPax } from '@qite/tide-client';
5
5
  export type TravelersFormField = {
6
6
  type: string;
7
7
  };
@@ -33,6 +33,9 @@ export interface SharedTravelersFormProps {
33
33
  isUnavailable?: boolean;
34
34
  useCompactForm?: boolean;
35
35
  showAllCountries?: boolean;
36
+ showWeightField?: boolean;
37
+ showHeightField?: boolean;
38
+ paxCustomFields?: BookingPackagePaxCustomField[];
36
39
  showAgentSelection?: boolean;
37
40
  initialShowAgents?: boolean;
38
41
  renderPreviousButton?: () => ReactNode;
@@ -40,13 +43,15 @@ export interface SharedTravelersFormProps {
40
43
  }
41
44
  export declare function isBabyAge(age?: number | null, maxBabyAge?: number): boolean;
42
45
  export declare function formatBirthDate(birthDate?: string): string;
46
+ export declare function buildEmptyCustomFields(paxCustomFields?: BookingPackagePaxCustomField[]): BookingPackageCustomField[];
47
+ export declare function getApplicablePaxCustomFields(paxCustomFields: BookingPackagePaxCustomField[] | undefined, isMainBooker: boolean): BookingPackagePaxCustomField[];
43
48
  export declare function createTraveler(traveler: RoomTraveler, followNumber: {
44
49
  number: number;
45
- }, personTranslation?: string, isCompact?: boolean, maxBabyAge?: number): Traveler;
50
+ }, personTranslation?: string, isCompact?: boolean, maxBabyAge?: number, paxCustomFields?: BookingPackagePaxCustomField[]): Traveler;
46
51
  export declare function createInitialValuesFromRooms(formRooms: {
47
52
  adults: RoomTraveler[];
48
53
  children: RoomTraveler[];
49
- }[], startDate?: string, endDate?: string, agentAdressId?: number, personTranslation?: string, isCompact?: boolean, maxBabyAge?: number): TravelersFormValues;
54
+ }[], startDate?: string, endDate?: string, agentAdressId?: number, personTranslation?: string, isCompact?: boolean, maxBabyAge?: number, paxCustomFields?: BookingPackagePaxCustomField[]): TravelersFormValues;
50
55
  export declare function createInitialValuesFromEditablePackagingEntry(editablePackagingEntry: PackagingEntry, agentAdressId?: number): TravelersFormValues;
51
56
  export declare function applyTravelersFormValuesToEditablePackagingEntry(editablePackagingEntry: PackagingEntry, values: TravelersFormValues): {
52
57
  pax: PackagingEntryPax[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qite/tide-components",
3
- "version": "1.0.9",
3
+ "version": "1.0.12",
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.17",
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",
@@ -1654,6 +1654,17 @@
1654
1654
  }
1655
1655
  }
1656
1656
 
1657
+ .travelers-form__custom-fields-grid {
1658
+ display: flex;
1659
+ flex-direction: column;
1660
+
1661
+ @include media-md {
1662
+ display: grid;
1663
+ grid-template-columns: repeat(12, 1fr);
1664
+ gap: 15px;
1665
+ }
1666
+ }
1667
+
1657
1668
  .main-booker-form__grid {
1658
1669
  display: flex;
1659
1670
  flex-direction: column;