@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.
- package/build/build-cjs/index.js +585 -302
- 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 +8 -1
- package/build/build-cjs/src/search-results/types.d.ts +12 -0
- package/build/build-cjs/src/shared/booking/travelers-form.d.ts +8 -3
- package/build/build-esm/index.js +587 -304
- 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 +8 -1
- package/build/build-esm/src/search-results/types.d.ts +12 -0
- package/build/build-esm/src/shared/booking/travelers-form.d.ts +8 -3
- package/package.json +2 -2
- package/styles/components/_form.scss +11 -0
package/build/build-cjs/index.js
CHANGED
|
@@ -124,7 +124,7 @@ var PRODUCT$f = {
|
|
|
124
124
|
PER_PERSON_PER_NIGHT: "لكل شخص / لكل ليلة",
|
|
125
125
|
BOOK_NOW: "احجز الآن",
|
|
126
126
|
TO_YOUR_OFFER: "إلى عرضك",
|
|
127
|
-
NOT_AVAILABLE: "غير متاح",
|
|
127
|
+
NOT_AVAILABLE: "غير متاح — يرجى اختيار تاريخ آخر",
|
|
128
128
|
NUMBER_OF_ROOMS: "عدد الغرف",
|
|
129
129
|
AGE_BY_DEPARTURE_DATE: "عمر الأطفال عند تاريخ المغادرة",
|
|
130
130
|
YEAR: "سنة/سنوات",
|
|
@@ -211,6 +211,12 @@ var TRAVELERS_FORM$f = {
|
|
|
211
211
|
FIRST_NAME: "الاسم الأول",
|
|
212
212
|
LAST_NAME: "اسم العائلة",
|
|
213
213
|
BIRTHDATE: "تاريخ الميلاد",
|
|
214
|
+
WEIGHT: "الوزن",
|
|
215
|
+
WEIGHT_UNIT_KG: "kg",
|
|
216
|
+
WEIGHT_UNIT_LB: "lb",
|
|
217
|
+
HEIGHT: "الطول",
|
|
218
|
+
HEIGHT_UNIT_CM: "cm",
|
|
219
|
+
HEIGHT_UNIT_FT_IN: "ft/in",
|
|
214
220
|
STREET: "الشارع",
|
|
215
221
|
STREET_PLACEHOLDER: "اسم الشارع",
|
|
216
222
|
HOUSE_NUMBER: "رقم المنزل",
|
|
@@ -468,7 +474,7 @@ var SRP$f = {
|
|
|
468
474
|
};
|
|
469
475
|
var ITINERARY$f = {
|
|
470
476
|
DAY: "اليوم",
|
|
471
|
-
NO_ITEMS: "
|
|
477
|
+
NO_ITEMS: "لم يتم اختيار أنشطة لهذا اليوم."
|
|
472
478
|
};
|
|
473
479
|
var FORM$f = {
|
|
474
480
|
LOADING: "جاري تحميل النموذج...",
|
|
@@ -571,7 +577,7 @@ var PRODUCT$e = {
|
|
|
571
577
|
PER_PERSON_PER_NIGHT: "Per person / per nat",
|
|
572
578
|
BOOK_NOW: "Book nu",
|
|
573
579
|
TO_YOUR_OFFER: "Til dit tilbud",
|
|
574
|
-
NOT_AVAILABLE: "Ikke tilgængelig",
|
|
580
|
+
NOT_AVAILABLE: "Ikke tilgængelig — vælg venligst en anden dato",
|
|
575
581
|
NUMBER_OF_ROOMS: "Antal værelser",
|
|
576
582
|
AGE_BY_DEPARTURE_DATE: "Børns alder på afrejsedato",
|
|
577
583
|
YEAR: "år",
|
|
@@ -658,6 +664,12 @@ var TRAVELERS_FORM$e = {
|
|
|
658
664
|
FIRST_NAME: "Fornavn",
|
|
659
665
|
LAST_NAME: "Efternavn",
|
|
660
666
|
BIRTHDATE: "Fødselsdato",
|
|
667
|
+
WEIGHT: "Vægt",
|
|
668
|
+
WEIGHT_UNIT_KG: "kg",
|
|
669
|
+
WEIGHT_UNIT_LB: "lb",
|
|
670
|
+
HEIGHT: "Højde",
|
|
671
|
+
HEIGHT_UNIT_CM: "cm",
|
|
672
|
+
HEIGHT_UNIT_FT_IN: "ft/in",
|
|
661
673
|
STREET: "Gade",
|
|
662
674
|
STREET_PLACEHOLDER: "Din gade",
|
|
663
675
|
HOUSE_NUMBER: "Husnummer",
|
|
@@ -915,7 +927,7 @@ var SRP$e = {
|
|
|
915
927
|
};
|
|
916
928
|
var ITINERARY$e = {
|
|
917
929
|
DAY: "Dag",
|
|
918
|
-
NO_ITEMS: "Ingen
|
|
930
|
+
NO_ITEMS: "Ingen aktiviteter valgt for denne dag."
|
|
919
931
|
};
|
|
920
932
|
var FORM$e = {
|
|
921
933
|
LOADING: "Indlæser formular...",
|
|
@@ -1018,7 +1030,7 @@ var PRODUCT$d = {
|
|
|
1018
1030
|
PER_PERSON_PER_NIGHT: "Pro Person / pro Nacht",
|
|
1019
1031
|
BOOK_NOW: "Jetzt buchen",
|
|
1020
1032
|
TO_YOUR_OFFER: "Zu Ihrem Angebot",
|
|
1021
|
-
NOT_AVAILABLE: "Nicht verfügbar",
|
|
1033
|
+
NOT_AVAILABLE: "Nicht verfügbar — bitte wählen Sie ein anderes Datum",
|
|
1022
1034
|
NUMBER_OF_ROOMS: "Anzahl der Zimmer",
|
|
1023
1035
|
AGE_BY_DEPARTURE_DATE: "Alter der Kinder am Abreisedatum",
|
|
1024
1036
|
YEAR: "Jahr(e)",
|
|
@@ -1105,6 +1117,12 @@ var TRAVELERS_FORM$d = {
|
|
|
1105
1117
|
FIRST_NAME: "Vorname",
|
|
1106
1118
|
LAST_NAME: "Nachname",
|
|
1107
1119
|
BIRTHDATE: "Geburtsdatum",
|
|
1120
|
+
WEIGHT: "Gewicht",
|
|
1121
|
+
WEIGHT_UNIT_KG: "kg",
|
|
1122
|
+
WEIGHT_UNIT_LB: "lb",
|
|
1123
|
+
HEIGHT: "Größe",
|
|
1124
|
+
HEIGHT_UNIT_CM: "cm",
|
|
1125
|
+
HEIGHT_UNIT_FT_IN: "ft/in",
|
|
1108
1126
|
STREET: "Straße",
|
|
1109
1127
|
STREET_PLACEHOLDER: "Ihre Straße",
|
|
1110
1128
|
HOUSE_NUMBER: "Hausnummer",
|
|
@@ -1362,7 +1380,7 @@ var SRP$d = {
|
|
|
1362
1380
|
};
|
|
1363
1381
|
var ITINERARY$d = {
|
|
1364
1382
|
DAY: "Tag",
|
|
1365
|
-
NO_ITEMS: "Keine
|
|
1383
|
+
NO_ITEMS: "Keine Aktivitäten für diesen Tag ausgewählt."
|
|
1366
1384
|
};
|
|
1367
1385
|
var FORM$d = {
|
|
1368
1386
|
LOADING: "Formular wird geladen...",
|
|
@@ -1465,7 +1483,7 @@ var PRODUCT$c = {
|
|
|
1465
1483
|
PER_PERSON_PER_NIGHT: "Per person / per night",
|
|
1466
1484
|
BOOK_NOW: "Book now",
|
|
1467
1485
|
TO_YOUR_OFFER: "To your quote",
|
|
1468
|
-
NOT_AVAILABLE: "Not available",
|
|
1486
|
+
NOT_AVAILABLE: "Not available — please select a different date",
|
|
1469
1487
|
NUMBER_OF_ROOMS: "Number of rooms",
|
|
1470
1488
|
AGE_BY_DEPARTURE_DATE: "Age of children on departure date",
|
|
1471
1489
|
YEAR: "Year(s)",
|
|
@@ -1553,6 +1571,12 @@ var TRAVELERS_FORM$c = {
|
|
|
1553
1571
|
FIRST_NAME: "First name",
|
|
1554
1572
|
LAST_NAME: "Last name",
|
|
1555
1573
|
BIRTHDATE: "Date of birth",
|
|
1574
|
+
WEIGHT: "Weight",
|
|
1575
|
+
WEIGHT_UNIT_KG: "kg",
|
|
1576
|
+
WEIGHT_UNIT_LB: "lb",
|
|
1577
|
+
HEIGHT: "Height",
|
|
1578
|
+
HEIGHT_UNIT_CM: "cm",
|
|
1579
|
+
HEIGHT_UNIT_FT_IN: "ft/in",
|
|
1556
1580
|
STREET: "Street",
|
|
1557
1581
|
STREET_PLACEHOLDER: "Your street",
|
|
1558
1582
|
HOUSE_NUMBER: "House number",
|
|
@@ -1813,7 +1837,7 @@ var SRP$c = {
|
|
|
1813
1837
|
};
|
|
1814
1838
|
var ITINERARY$c = {
|
|
1815
1839
|
DAY: "Day",
|
|
1816
|
-
NO_ITEMS: "No
|
|
1840
|
+
NO_ITEMS: "No activities selected for this day."
|
|
1817
1841
|
};
|
|
1818
1842
|
var FORM$c = {
|
|
1819
1843
|
LOADING: "Loading form...",
|
|
@@ -1916,7 +1940,7 @@ var PRODUCT$b = {
|
|
|
1916
1940
|
PER_PERSON_PER_NIGHT: "Por persona / por noche",
|
|
1917
1941
|
BOOK_NOW: "Reservar ahora",
|
|
1918
1942
|
TO_YOUR_OFFER: "A su presupuesto",
|
|
1919
|
-
NOT_AVAILABLE: "No disponible",
|
|
1943
|
+
NOT_AVAILABLE: "No disponible — seleccione otra fecha",
|
|
1920
1944
|
NUMBER_OF_ROOMS: "Número de habitaciones",
|
|
1921
1945
|
AGE_BY_DEPARTURE_DATE: "Edad de los niños en la fecha de salida",
|
|
1922
1946
|
YEAR: "Año(s)",
|
|
@@ -2003,6 +2027,12 @@ var TRAVELERS_FORM$b = {
|
|
|
2003
2027
|
FIRST_NAME: "Nombre",
|
|
2004
2028
|
LAST_NAME: "Apellido",
|
|
2005
2029
|
BIRTHDATE: "Fecha de nacimiento",
|
|
2030
|
+
WEIGHT: "Peso",
|
|
2031
|
+
WEIGHT_UNIT_KG: "kg",
|
|
2032
|
+
WEIGHT_UNIT_LB: "lb",
|
|
2033
|
+
HEIGHT: "Estatura",
|
|
2034
|
+
HEIGHT_UNIT_CM: "cm",
|
|
2035
|
+
HEIGHT_UNIT_FT_IN: "ft/in",
|
|
2006
2036
|
STREET: "Calle",
|
|
2007
2037
|
STREET_PLACEHOLDER: "Su calle",
|
|
2008
2038
|
HOUSE_NUMBER: "Número",
|
|
@@ -2260,7 +2290,7 @@ var SRP$b = {
|
|
|
2260
2290
|
};
|
|
2261
2291
|
var ITINERARY$b = {
|
|
2262
2292
|
DAY: "Día",
|
|
2263
|
-
NO_ITEMS: "No hay
|
|
2293
|
+
NO_ITEMS: "No hay actividades seleccionadas para este día."
|
|
2264
2294
|
};
|
|
2265
2295
|
var FORM$b = {
|
|
2266
2296
|
LOADING: "Cargando formulario...",
|
|
@@ -2363,7 +2393,7 @@ var PRODUCT$a = {
|
|
|
2363
2393
|
PER_PERSON_PER_NIGHT: "Par personne / par nuit",
|
|
2364
2394
|
BOOK_NOW: "Réserver maintenant",
|
|
2365
2395
|
TO_YOUR_OFFER: "Vers votre devis",
|
|
2366
|
-
NOT_AVAILABLE: "Non disponible",
|
|
2396
|
+
NOT_AVAILABLE: "Non disponible — veuillez sélectionner une autre date",
|
|
2367
2397
|
NUMBER_OF_ROOMS: "Nombre de chambres",
|
|
2368
2398
|
AGE_BY_DEPARTURE_DATE: "Âge des enfants à la date de départ",
|
|
2369
2399
|
YEAR: "An(s)",
|
|
@@ -2451,6 +2481,12 @@ var TRAVELERS_FORM$a = {
|
|
|
2451
2481
|
FIRST_NAME: "Prénom",
|
|
2452
2482
|
LAST_NAME: "Nom",
|
|
2453
2483
|
BIRTHDATE: "Date de naissance",
|
|
2484
|
+
WEIGHT: "Poids",
|
|
2485
|
+
WEIGHT_UNIT_KG: "kg",
|
|
2486
|
+
WEIGHT_UNIT_LB: "lb",
|
|
2487
|
+
HEIGHT: "Taille",
|
|
2488
|
+
HEIGHT_UNIT_CM: "cm",
|
|
2489
|
+
HEIGHT_UNIT_FT_IN: "ft/in",
|
|
2454
2490
|
STREET: "Rue",
|
|
2455
2491
|
STREET_PLACEHOLDER: "Votre rue",
|
|
2456
2492
|
HOUSE_NUMBER: "N°",
|
|
@@ -2711,7 +2747,7 @@ var SRP$a = {
|
|
|
2711
2747
|
};
|
|
2712
2748
|
var ITINERARY$a = {
|
|
2713
2749
|
DAY: "Jour",
|
|
2714
|
-
NO_ITEMS: "
|
|
2750
|
+
NO_ITEMS: "Aucune activité sélectionnée pour ce jour."
|
|
2715
2751
|
};
|
|
2716
2752
|
var FORM$a = {
|
|
2717
2753
|
LOADING: "Chargement du formulaire...",
|
|
@@ -2814,7 +2850,7 @@ var PRODUCT$9 = {
|
|
|
2814
2850
|
PER_PERSON_PER_NIGHT: "Par personne / par nuit",
|
|
2815
2851
|
BOOK_NOW: "Réservez maintenant",
|
|
2816
2852
|
TO_YOUR_OFFER: "Vers votre devis",
|
|
2817
|
-
NOT_AVAILABLE: "Indisponible",
|
|
2853
|
+
NOT_AVAILABLE: "Indisponible — veuillez sélectionner une autre date",
|
|
2818
2854
|
NUMBER_OF_ROOMS: "Nombre de chambres",
|
|
2819
2855
|
AGE_BY_DEPARTURE_DATE: "Âge des enfants à la date de départ",
|
|
2820
2856
|
YEAR: "An(s)",
|
|
@@ -2901,6 +2937,12 @@ var TRAVELERS_FORM$9 = {
|
|
|
2901
2937
|
FIRST_NAME: "Prénom",
|
|
2902
2938
|
LAST_NAME: "Nom",
|
|
2903
2939
|
BIRTHDATE: "Date de naissance",
|
|
2940
|
+
WEIGHT: "Poids",
|
|
2941
|
+
WEIGHT_UNIT_KG: "kg",
|
|
2942
|
+
WEIGHT_UNIT_LB: "lb",
|
|
2943
|
+
HEIGHT: "Taille",
|
|
2944
|
+
HEIGHT_UNIT_CM: "cm",
|
|
2945
|
+
HEIGHT_UNIT_FT_IN: "ft/in",
|
|
2904
2946
|
STREET: "Rue",
|
|
2905
2947
|
STREET_PLACEHOLDER: "Votre rue",
|
|
2906
2948
|
HOUSE_NUMBER: "Numéro",
|
|
@@ -3158,7 +3200,7 @@ var SRP$9 = {
|
|
|
3158
3200
|
};
|
|
3159
3201
|
var ITINERARY$9 = {
|
|
3160
3202
|
DAY: "Jour",
|
|
3161
|
-
NO_ITEMS: "
|
|
3203
|
+
NO_ITEMS: "Aucune activité sélectionnée pour ce jour."
|
|
3162
3204
|
};
|
|
3163
3205
|
var FORM$9 = {
|
|
3164
3206
|
LOADING: "Chargement du formulaire...",
|
|
@@ -3261,7 +3303,7 @@ var PRODUCT$8 = {
|
|
|
3261
3303
|
PER_PERSON_PER_NIGHT: "Á mann / á nótt",
|
|
3262
3304
|
BOOK_NOW: "Panta núna",
|
|
3263
3305
|
TO_YOUR_OFFER: "Til tilboðsins þíns",
|
|
3264
|
-
NOT_AVAILABLE: "Ekki í boði",
|
|
3306
|
+
NOT_AVAILABLE: "Ekki í boði — vinsamlegast veldu aðra dagsetningu",
|
|
3265
3307
|
NUMBER_OF_ROOMS: "Fjöldi herbergja",
|
|
3266
3308
|
AGE_BY_DEPARTURE_DATE: "Aldur barna á brottfarardegi",
|
|
3267
3309
|
YEAR: "ár",
|
|
@@ -3348,6 +3390,12 @@ var TRAVELERS_FORM$8 = {
|
|
|
3348
3390
|
FIRST_NAME: "Fornafn",
|
|
3349
3391
|
LAST_NAME: "Eftirnafn",
|
|
3350
3392
|
BIRTHDATE: "Fæðingardagur",
|
|
3393
|
+
WEIGHT: "Þyngd",
|
|
3394
|
+
WEIGHT_UNIT_KG: "kg",
|
|
3395
|
+
WEIGHT_UNIT_LB: "lb",
|
|
3396
|
+
HEIGHT: "Hæð",
|
|
3397
|
+
HEIGHT_UNIT_CM: "cm",
|
|
3398
|
+
HEIGHT_UNIT_FT_IN: "ft/in",
|
|
3351
3399
|
STREET: "Gata",
|
|
3352
3400
|
STREET_PLACEHOLDER: "Gatan þín",
|
|
3353
3401
|
HOUSE_NUMBER: "Húsnúmer",
|
|
@@ -3605,7 +3653,7 @@ var SRP$8 = {
|
|
|
3605
3653
|
};
|
|
3606
3654
|
var ITINERARY$8 = {
|
|
3607
3655
|
DAY: "Dagur",
|
|
3608
|
-
NO_ITEMS: "
|
|
3656
|
+
NO_ITEMS: "Engin afþreying valin fyrir þennan dag."
|
|
3609
3657
|
};
|
|
3610
3658
|
var FORM$8 = {
|
|
3611
3659
|
LOADING: "Hleður eyðublað...",
|
|
@@ -3708,7 +3756,7 @@ var PRODUCT$7 = {
|
|
|
3708
3756
|
PER_PERSON_PER_NIGHT: "A persona / a notte",
|
|
3709
3757
|
BOOK_NOW: "Prenota ora",
|
|
3710
3758
|
TO_YOUR_OFFER: "Vai al preventivo",
|
|
3711
|
-
NOT_AVAILABLE: "Non disponibile",
|
|
3759
|
+
NOT_AVAILABLE: "Non disponibile — seleziona un'altra data",
|
|
3712
3760
|
NUMBER_OF_ROOMS: "Numero di camere",
|
|
3713
3761
|
AGE_BY_DEPARTURE_DATE: "Età dei bambini alla data di partenza",
|
|
3714
3762
|
YEAR: "Anno/i",
|
|
@@ -3795,6 +3843,12 @@ var TRAVELERS_FORM$7 = {
|
|
|
3795
3843
|
FIRST_NAME: "Nome",
|
|
3796
3844
|
LAST_NAME: "Cognome",
|
|
3797
3845
|
BIRTHDATE: "Data di nascita",
|
|
3846
|
+
WEIGHT: "Peso",
|
|
3847
|
+
WEIGHT_UNIT_KG: "kg",
|
|
3848
|
+
WEIGHT_UNIT_LB: "lb",
|
|
3849
|
+
HEIGHT: "Altezza",
|
|
3850
|
+
HEIGHT_UNIT_CM: "cm",
|
|
3851
|
+
HEIGHT_UNIT_FT_IN: "ft/in",
|
|
3798
3852
|
STREET: "Via",
|
|
3799
3853
|
STREET_PLACEHOLDER: "La tua via",
|
|
3800
3854
|
HOUSE_NUMBER: "Numero civico",
|
|
@@ -4052,7 +4106,7 @@ var SRP$7 = {
|
|
|
4052
4106
|
};
|
|
4053
4107
|
var ITINERARY$7 = {
|
|
4054
4108
|
DAY: "Giorno",
|
|
4055
|
-
NO_ITEMS: "
|
|
4109
|
+
NO_ITEMS: "Nessuna attività selezionata per questo giorno."
|
|
4056
4110
|
};
|
|
4057
4111
|
var FORM$7 = {
|
|
4058
4112
|
LOADING: "Caricamento modulo...",
|
|
@@ -4155,7 +4209,7 @@ var PRODUCT$6 = {
|
|
|
4155
4209
|
PER_PERSON_PER_NIGHT: "Per persoon / per nacht",
|
|
4156
4210
|
BOOK_NOW: "Boek nu",
|
|
4157
4211
|
TO_YOUR_OFFER: "Naar uw offerte",
|
|
4158
|
-
NOT_AVAILABLE: "Niet beschikbaar",
|
|
4212
|
+
NOT_AVAILABLE: "Niet beschikbaar — kies een andere datum",
|
|
4159
4213
|
NUMBER_OF_ROOMS: "Aantal kamers",
|
|
4160
4214
|
AGE_BY_DEPARTURE_DATE: "Leeftijd kinderen op vertrekdatum",
|
|
4161
4215
|
YEAR: "Jaar",
|
|
@@ -4243,6 +4297,12 @@ var TRAVELERS_FORM$6 = {
|
|
|
4243
4297
|
FIRST_NAME: "Voornaam",
|
|
4244
4298
|
LAST_NAME: "Naam",
|
|
4245
4299
|
BIRTHDATE: "Geboortedatum",
|
|
4300
|
+
WEIGHT: "Gewicht",
|
|
4301
|
+
WEIGHT_UNIT_KG: "kg",
|
|
4302
|
+
WEIGHT_UNIT_LB: "lb",
|
|
4303
|
+
HEIGHT: "Lengte",
|
|
4304
|
+
HEIGHT_UNIT_CM: "cm",
|
|
4305
|
+
HEIGHT_UNIT_FT_IN: "ft/in",
|
|
4246
4306
|
STREET: "Straat",
|
|
4247
4307
|
STREET_PLACEHOLDER: "Jouw straat",
|
|
4248
4308
|
HOUSE_NUMBER: "Huisnr",
|
|
@@ -4503,7 +4563,7 @@ var SRP$6 = {
|
|
|
4503
4563
|
};
|
|
4504
4564
|
var ITINERARY$6 = {
|
|
4505
4565
|
DAY: "Dag",
|
|
4506
|
-
NO_ITEMS: "Geen
|
|
4566
|
+
NO_ITEMS: "Geen activiteiten geselecteerd voor deze dag."
|
|
4507
4567
|
};
|
|
4508
4568
|
var FORM$6 = {
|
|
4509
4569
|
LOADING: "Formulier laden...",
|
|
@@ -4606,7 +4666,7 @@ var PRODUCT$5 = {
|
|
|
4606
4666
|
PER_PERSON_PER_NIGHT: "Per persoon / per nacht",
|
|
4607
4667
|
BOOK_NOW: "Nu boeken",
|
|
4608
4668
|
TO_YOUR_OFFER: "Naar uw offerte",
|
|
4609
|
-
NOT_AVAILABLE: "Niet beschikbaar",
|
|
4669
|
+
NOT_AVAILABLE: "Niet beschikbaar — kies een andere datum",
|
|
4610
4670
|
NUMBER_OF_ROOMS: "Aantal kamers",
|
|
4611
4671
|
AGE_BY_DEPARTURE_DATE: "Leeftijd van kinderen op vertrekdatum",
|
|
4612
4672
|
YEAR: "Jaar",
|
|
@@ -4693,6 +4753,12 @@ var TRAVELERS_FORM$5 = {
|
|
|
4693
4753
|
FIRST_NAME: "Voornaam",
|
|
4694
4754
|
LAST_NAME: "Achternaam",
|
|
4695
4755
|
BIRTHDATE: "Geboortedatum",
|
|
4756
|
+
WEIGHT: "Gewicht",
|
|
4757
|
+
WEIGHT_UNIT_KG: "kg",
|
|
4758
|
+
WEIGHT_UNIT_LB: "lb",
|
|
4759
|
+
HEIGHT: "Lengte",
|
|
4760
|
+
HEIGHT_UNIT_CM: "cm",
|
|
4761
|
+
HEIGHT_UNIT_FT_IN: "ft/in",
|
|
4696
4762
|
STREET: "Straat",
|
|
4697
4763
|
STREET_PLACEHOLDER: "Uw straat",
|
|
4698
4764
|
HOUSE_NUMBER: "Huisnummer",
|
|
@@ -4950,7 +5016,7 @@ var SRP$5 = {
|
|
|
4950
5016
|
};
|
|
4951
5017
|
var ITINERARY$5 = {
|
|
4952
5018
|
DAY: "Dag",
|
|
4953
|
-
NO_ITEMS: "Geen
|
|
5019
|
+
NO_ITEMS: "Geen activiteiten geselecteerd voor deze dag."
|
|
4954
5020
|
};
|
|
4955
5021
|
var FORM$5 = {
|
|
4956
5022
|
LOADING: "Formulier laden...",
|
|
@@ -5053,7 +5119,7 @@ var PRODUCT$4 = {
|
|
|
5053
5119
|
PER_PERSON_PER_NIGHT: "Per person / per natt",
|
|
5054
5120
|
BOOK_NOW: "Bestill nå",
|
|
5055
5121
|
TO_YOUR_OFFER: "Til ditt tilbud",
|
|
5056
|
-
NOT_AVAILABLE: "Ikke tilgjengelig",
|
|
5122
|
+
NOT_AVAILABLE: "Ikke tilgjengelig — velg en annen dato",
|
|
5057
5123
|
NUMBER_OF_ROOMS: "Antall rom",
|
|
5058
5124
|
AGE_BY_DEPARTURE_DATE: "Barnas alder på avreisedato",
|
|
5059
5125
|
YEAR: "År",
|
|
@@ -5140,6 +5206,12 @@ var TRAVELERS_FORM$4 = {
|
|
|
5140
5206
|
FIRST_NAME: "Fornavn",
|
|
5141
5207
|
LAST_NAME: "Etternavn",
|
|
5142
5208
|
BIRTHDATE: "Fødselsdato",
|
|
5209
|
+
WEIGHT: "Vekt",
|
|
5210
|
+
WEIGHT_UNIT_KG: "kg",
|
|
5211
|
+
WEIGHT_UNIT_LB: "lb",
|
|
5212
|
+
HEIGHT: "Høyde",
|
|
5213
|
+
HEIGHT_UNIT_CM: "cm",
|
|
5214
|
+
HEIGHT_UNIT_FT_IN: "ft/in",
|
|
5143
5215
|
STREET: "Gate",
|
|
5144
5216
|
STREET_PLACEHOLDER: "Din gate",
|
|
5145
5217
|
HOUSE_NUMBER: "Husnummer",
|
|
@@ -5397,7 +5469,7 @@ var SRP$4 = {
|
|
|
5397
5469
|
};
|
|
5398
5470
|
var ITINERARY$4 = {
|
|
5399
5471
|
DAY: "Dag",
|
|
5400
|
-
NO_ITEMS: "Ingen
|
|
5472
|
+
NO_ITEMS: "Ingen aktiviteter valgt for denne dagen."
|
|
5401
5473
|
};
|
|
5402
5474
|
var FORM$4 = {
|
|
5403
5475
|
LOADING: "Laster inn skjema...",
|
|
@@ -5500,7 +5572,7 @@ var PRODUCT$3 = {
|
|
|
5500
5572
|
PER_PERSON_PER_NIGHT: "Za osobę / za noc",
|
|
5501
5573
|
BOOK_NOW: "Zarezerwuj teraz",
|
|
5502
5574
|
TO_YOUR_OFFER: "Do oferty",
|
|
5503
|
-
NOT_AVAILABLE: "Niedostępne",
|
|
5575
|
+
NOT_AVAILABLE: "Niedostępne — wybierz inną datę",
|
|
5504
5576
|
NUMBER_OF_ROOMS: "Liczba pokoi",
|
|
5505
5577
|
AGE_BY_DEPARTURE_DATE: "Wiek dzieci w dniu wyjazdu",
|
|
5506
5578
|
YEAR: "Rok(lata)",
|
|
@@ -5587,6 +5659,12 @@ var TRAVELERS_FORM$3 = {
|
|
|
5587
5659
|
FIRST_NAME: "Imię",
|
|
5588
5660
|
LAST_NAME: "Nazwisko",
|
|
5589
5661
|
BIRTHDATE: "Data urodzenia",
|
|
5662
|
+
WEIGHT: "Waga",
|
|
5663
|
+
WEIGHT_UNIT_KG: "kg",
|
|
5664
|
+
WEIGHT_UNIT_LB: "lb",
|
|
5665
|
+
HEIGHT: "Wzrost",
|
|
5666
|
+
HEIGHT_UNIT_CM: "cm",
|
|
5667
|
+
HEIGHT_UNIT_FT_IN: "ft/in",
|
|
5590
5668
|
STREET: "Ulica",
|
|
5591
5669
|
STREET_PLACEHOLDER: "Twoja ulica",
|
|
5592
5670
|
HOUSE_NUMBER: "Numer domu",
|
|
@@ -5844,7 +5922,7 @@ var SRP$3 = {
|
|
|
5844
5922
|
};
|
|
5845
5923
|
var ITINERARY$3 = {
|
|
5846
5924
|
DAY: "Dzień",
|
|
5847
|
-
NO_ITEMS: "
|
|
5925
|
+
NO_ITEMS: "Nie wybrano atrakcji na ten dzień."
|
|
5848
5926
|
};
|
|
5849
5927
|
var FORM$3 = {
|
|
5850
5928
|
LOADING: "Ładowanie formularza...",
|
|
@@ -5947,7 +6025,7 @@ var PRODUCT$2 = {
|
|
|
5947
6025
|
PER_PERSON_PER_NIGHT: "Por pessoa / por noite",
|
|
5948
6026
|
BOOK_NOW: "Reservar agora",
|
|
5949
6027
|
TO_YOUR_OFFER: "Ir para o orçamento",
|
|
5950
|
-
NOT_AVAILABLE: "Indisponível",
|
|
6028
|
+
NOT_AVAILABLE: "Indisponível — selecione outra data",
|
|
5951
6029
|
NUMBER_OF_ROOMS: "Número de quartos",
|
|
5952
6030
|
AGE_BY_DEPARTURE_DATE: "Idade das crianças à data de partida",
|
|
5953
6031
|
YEAR: "Ano(s)",
|
|
@@ -6034,6 +6112,12 @@ var TRAVELERS_FORM$2 = {
|
|
|
6034
6112
|
FIRST_NAME: "Nome",
|
|
6035
6113
|
LAST_NAME: "Apelido",
|
|
6036
6114
|
BIRTHDATE: "Data de nascimento",
|
|
6115
|
+
WEIGHT: "Peso",
|
|
6116
|
+
WEIGHT_UNIT_KG: "kg",
|
|
6117
|
+
WEIGHT_UNIT_LB: "lb",
|
|
6118
|
+
HEIGHT: "Altura",
|
|
6119
|
+
HEIGHT_UNIT_CM: "cm",
|
|
6120
|
+
HEIGHT_UNIT_FT_IN: "ft/in",
|
|
6037
6121
|
STREET: "Rua",
|
|
6038
6122
|
STREET_PLACEHOLDER: "A sua rua",
|
|
6039
6123
|
HOUSE_NUMBER: "Número de porta",
|
|
@@ -6291,7 +6375,7 @@ var SRP$2 = {
|
|
|
6291
6375
|
};
|
|
6292
6376
|
var ITINERARY$2 = {
|
|
6293
6377
|
DAY: "Dia",
|
|
6294
|
-
NO_ITEMS: "
|
|
6378
|
+
NO_ITEMS: "Nenhuma atividade selecionada para este dia."
|
|
6295
6379
|
};
|
|
6296
6380
|
var FORM$2 = {
|
|
6297
6381
|
LOADING: "A carregar formulário...",
|
|
@@ -6394,7 +6478,7 @@ var PRODUCT$1 = {
|
|
|
6394
6478
|
PER_PERSON_PER_NIGHT: "Per person / per natt",
|
|
6395
6479
|
BOOK_NOW: "Boka nu",
|
|
6396
6480
|
TO_YOUR_OFFER: "Till din offert",
|
|
6397
|
-
NOT_AVAILABLE: "Ej tillgänglig",
|
|
6481
|
+
NOT_AVAILABLE: "Ej tillgänglig — välj ett annat datum",
|
|
6398
6482
|
NUMBER_OF_ROOMS: "Antal rum",
|
|
6399
6483
|
AGE_BY_DEPARTURE_DATE: "Barnens ålder vid avresedatum",
|
|
6400
6484
|
YEAR: "År",
|
|
@@ -6481,6 +6565,12 @@ var TRAVELERS_FORM$1 = {
|
|
|
6481
6565
|
FIRST_NAME: "Förnamn",
|
|
6482
6566
|
LAST_NAME: "Efternamn",
|
|
6483
6567
|
BIRTHDATE: "Födelsedatum",
|
|
6568
|
+
WEIGHT: "Vikt",
|
|
6569
|
+
WEIGHT_UNIT_KG: "kg",
|
|
6570
|
+
WEIGHT_UNIT_LB: "lb",
|
|
6571
|
+
HEIGHT: "Längd",
|
|
6572
|
+
HEIGHT_UNIT_CM: "cm",
|
|
6573
|
+
HEIGHT_UNIT_FT_IN: "ft/in",
|
|
6484
6574
|
STREET: "Gata",
|
|
6485
6575
|
STREET_PLACEHOLDER: "Din gata",
|
|
6486
6576
|
HOUSE_NUMBER: "Husnummer",
|
|
@@ -6738,7 +6828,7 @@ var SRP$1 = {
|
|
|
6738
6828
|
};
|
|
6739
6829
|
var ITINERARY$1 = {
|
|
6740
6830
|
DAY: "Dag",
|
|
6741
|
-
NO_ITEMS: "Inga
|
|
6831
|
+
NO_ITEMS: "Inga aktiviteter valda för denna dag."
|
|
6742
6832
|
};
|
|
6743
6833
|
var FORM$1 = {
|
|
6744
6834
|
LOADING: "Laddar formulär...",
|
|
@@ -6841,7 +6931,7 @@ var PRODUCT = {
|
|
|
6841
6931
|
PER_PERSON_PER_NIGHT: "1名・1泊あたり",
|
|
6842
6932
|
BOOK_NOW: "今すぐ予約",
|
|
6843
6933
|
TO_YOUR_OFFER: "見積もりへ",
|
|
6844
|
-
NOT_AVAILABLE: "利用不可",
|
|
6934
|
+
NOT_AVAILABLE: "利用不可 — 別の日付をお選びください",
|
|
6845
6935
|
NUMBER_OF_ROOMS: "客室数",
|
|
6846
6936
|
AGE_BY_DEPARTURE_DATE: "出発日時点での子供の年齢",
|
|
6847
6937
|
YEAR: "歳",
|
|
@@ -6928,6 +7018,12 @@ var TRAVELERS_FORM = {
|
|
|
6928
7018
|
FIRST_NAME: "名",
|
|
6929
7019
|
LAST_NAME: "姓",
|
|
6930
7020
|
BIRTHDATE: "生年月日",
|
|
7021
|
+
WEIGHT: "体重",
|
|
7022
|
+
WEIGHT_UNIT_KG: "kg",
|
|
7023
|
+
WEIGHT_UNIT_LB: "lb",
|
|
7024
|
+
HEIGHT: "身長",
|
|
7025
|
+
HEIGHT_UNIT_CM: "cm",
|
|
7026
|
+
HEIGHT_UNIT_FT_IN: "ft/in",
|
|
6931
7027
|
STREET: "住所",
|
|
6932
7028
|
STREET_PLACEHOLDER: "住所を入力",
|
|
6933
7029
|
HOUSE_NUMBER: "番地",
|
|
@@ -7185,7 +7281,7 @@ var SRP = {
|
|
|
7185
7281
|
};
|
|
7186
7282
|
var ITINERARY = {
|
|
7187
7283
|
DAY: "日",
|
|
7188
|
-
NO_ITEMS: "
|
|
7284
|
+
NO_ITEMS: "この日に選択されたアクティビティはありません。"
|
|
7189
7285
|
};
|
|
7190
7286
|
var FORM = {
|
|
7191
7287
|
LOADING: "フォームを読み込んでいます...",
|
|
@@ -7581,6 +7677,14 @@ exports.AvailabilitySearchType = void 0;
|
|
|
7581
7677
|
AvailabilitySearchType[(AvailabilitySearchType["flight"] = 3)] = "flight";
|
|
7582
7678
|
})(exports.AvailabilitySearchType || (exports.AvailabilitySearchType = {}));
|
|
7583
7679
|
|
|
7680
|
+
var CustomFieldDataType = {
|
|
7681
|
+
bool: 0,
|
|
7682
|
+
date: 1,
|
|
7683
|
+
time: 2,
|
|
7684
|
+
string: 3,
|
|
7685
|
+
numeric: 4,
|
|
7686
|
+
};
|
|
7687
|
+
|
|
7584
7688
|
var DataType = {
|
|
7585
7689
|
text: "text",
|
|
7586
7690
|
numeric: "number",
|
|
@@ -7596,6 +7700,12 @@ var DataType = {
|
|
|
7596
7700
|
template: "template",
|
|
7597
7701
|
};
|
|
7598
7702
|
|
|
7703
|
+
exports.DateAmountType = void 0;
|
|
7704
|
+
(function (DateAmountType) {
|
|
7705
|
+
DateAmountType[(DateAmountType["days"] = 0)] = "days";
|
|
7706
|
+
DateAmountType[(DateAmountType["months"] = 1)] = "months";
|
|
7707
|
+
})(exports.DateAmountType || (exports.DateAmountType = {}));
|
|
7708
|
+
|
|
7599
7709
|
var DossierType = {
|
|
7600
7710
|
hotelOnly: 0,
|
|
7601
7711
|
transportOnly: 1,
|
|
@@ -7603,6 +7713,13 @@ var DossierType = {
|
|
|
7603
7713
|
package: 3,
|
|
7604
7714
|
};
|
|
7605
7715
|
|
|
7716
|
+
var DurationType = {
|
|
7717
|
+
hours: 0,
|
|
7718
|
+
days: 1,
|
|
7719
|
+
nights: 2,
|
|
7720
|
+
minutes: 3,
|
|
7721
|
+
};
|
|
7722
|
+
|
|
7606
7723
|
var EntryLineFlag = {
|
|
7607
7724
|
none: 0,
|
|
7608
7725
|
allotmentNoPlace: 1,
|
|
@@ -7680,6 +7797,11 @@ var Gender = {
|
|
|
7680
7797
|
other: 2,
|
|
7681
7798
|
};
|
|
7682
7799
|
|
|
7800
|
+
var HeightType = {
|
|
7801
|
+
centimeters: 0,
|
|
7802
|
+
feetInches: 1,
|
|
7803
|
+
};
|
|
7804
|
+
|
|
7683
7805
|
exports.MetaDataItemPropertyType = void 0;
|
|
7684
7806
|
(function (MetaDataItemPropertyType) {
|
|
7685
7807
|
MetaDataItemPropertyType[(MetaDataItemPropertyType["Height"] = 0)] = "Height";
|
|
@@ -7716,6 +7838,22 @@ var PaymentType = {
|
|
|
7716
7838
|
cash: 3,
|
|
7717
7839
|
};
|
|
7718
7840
|
|
|
7841
|
+
exports.PortalQsmType = void 0;
|
|
7842
|
+
(function (PortalQsmType) {
|
|
7843
|
+
PortalQsmType[(PortalQsmType["Multidestination"] = 0)] = "Multidestination";
|
|
7844
|
+
PortalQsmType[(PortalQsmType["Accommodation"] = 1)] = "Accommodation";
|
|
7845
|
+
PortalQsmType[(PortalQsmType["AccommodationAndFlight"] = 2)] =
|
|
7846
|
+
"AccommodationAndFlight";
|
|
7847
|
+
PortalQsmType[(PortalQsmType["Flight"] = 3)] = "Flight";
|
|
7848
|
+
PortalQsmType[(PortalQsmType["RoundTrip"] = 4)] = "RoundTrip";
|
|
7849
|
+
PortalQsmType[(PortalQsmType["GroupTour"] = 5)] = "GroupTour";
|
|
7850
|
+
PortalQsmType[(PortalQsmType["Package"] = 6)] = "Package";
|
|
7851
|
+
PortalQsmType[(PortalQsmType["Ticket"] = 7)] = "Ticket";
|
|
7852
|
+
PortalQsmType[(PortalQsmType["Car"] = 8)] = "Car";
|
|
7853
|
+
PortalQsmType[(PortalQsmType["Transfer"] = 9)] = "Transfer";
|
|
7854
|
+
PortalQsmType[(PortalQsmType["Cruise"] = 10)] = "Cruise";
|
|
7855
|
+
})(exports.PortalQsmType || (exports.PortalQsmType = {}));
|
|
7856
|
+
|
|
7719
7857
|
var PriceChartType = {
|
|
7720
7858
|
purchasePrices: 0,
|
|
7721
7859
|
sellingPrices: 1,
|
|
@@ -7749,6 +7887,26 @@ var RoomType = {
|
|
|
7749
7887
|
pk6: 5,
|
|
7750
7888
|
};
|
|
7751
7889
|
|
|
7890
|
+
var RouteTransportType = {
|
|
7891
|
+
none: 0,
|
|
7892
|
+
privateTransport: 1,
|
|
7893
|
+
publicTransport: 2,
|
|
7894
|
+
rentalCar: 3,
|
|
7895
|
+
bus: 4,
|
|
7896
|
+
camper: 5,
|
|
7897
|
+
car: 6,
|
|
7898
|
+
charter: 7,
|
|
7899
|
+
cruise: 8,
|
|
7900
|
+
ferry: 9,
|
|
7901
|
+
flight: 10,
|
|
7902
|
+
taxi: 11,
|
|
7903
|
+
train: 12,
|
|
7904
|
+
transfer: 13,
|
|
7905
|
+
rocket: 14,
|
|
7906
|
+
walking: 15,
|
|
7907
|
+
cycling: 16,
|
|
7908
|
+
};
|
|
7909
|
+
|
|
7752
7910
|
var SaleType = {
|
|
7753
7911
|
ownOrganization: 0,
|
|
7754
7912
|
resale: 1,
|
|
@@ -7788,6 +7946,13 @@ var ServiceType = {
|
|
|
7788
7946
|
camp: 30,
|
|
7789
7947
|
};
|
|
7790
7948
|
|
|
7949
|
+
var TrajectNodeType = {
|
|
7950
|
+
regular: 0,
|
|
7951
|
+
connectingNode: 1,
|
|
7952
|
+
poi: 2,
|
|
7953
|
+
subroute: 3,
|
|
7954
|
+
};
|
|
7955
|
+
|
|
7791
7956
|
exports.UnitOfMeasure = void 0;
|
|
7792
7957
|
(function (UnitOfMeasure) {
|
|
7793
7958
|
UnitOfMeasure[(UnitOfMeasure["cm"] = 0)] = "cm";
|
|
@@ -7820,60 +7985,9 @@ var VendorType = {
|
|
|
7820
7985
|
sunnyCars: 20,
|
|
7821
7986
|
};
|
|
7822
7987
|
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
|
|
7826
|
-
DateAmountType[(DateAmountType["months"] = 1)] = "months";
|
|
7827
|
-
})(exports.DateAmountType || (exports.DateAmountType = {}));
|
|
7828
|
-
|
|
7829
|
-
exports.PortalQsmType = void 0;
|
|
7830
|
-
(function (PortalQsmType) {
|
|
7831
|
-
PortalQsmType[(PortalQsmType["Multidestination"] = 0)] = "Multidestination";
|
|
7832
|
-
PortalQsmType[(PortalQsmType["Accommodation"] = 1)] = "Accommodation";
|
|
7833
|
-
PortalQsmType[(PortalQsmType["AccommodationAndFlight"] = 2)] =
|
|
7834
|
-
"AccommodationAndFlight";
|
|
7835
|
-
PortalQsmType[(PortalQsmType["Flight"] = 3)] = "Flight";
|
|
7836
|
-
PortalQsmType[(PortalQsmType["RoundTrip"] = 4)] = "RoundTrip";
|
|
7837
|
-
PortalQsmType[(PortalQsmType["GroupTour"] = 5)] = "GroupTour";
|
|
7838
|
-
PortalQsmType[(PortalQsmType["Package"] = 6)] = "Package";
|
|
7839
|
-
PortalQsmType[(PortalQsmType["Ticket"] = 7)] = "Ticket";
|
|
7840
|
-
PortalQsmType[(PortalQsmType["Car"] = 8)] = "Car";
|
|
7841
|
-
PortalQsmType[(PortalQsmType["Transfer"] = 9)] = "Transfer";
|
|
7842
|
-
PortalQsmType[(PortalQsmType["Cruise"] = 10)] = "Cruise";
|
|
7843
|
-
})(exports.PortalQsmType || (exports.PortalQsmType = {}));
|
|
7844
|
-
|
|
7845
|
-
var TrajectNodeType = {
|
|
7846
|
-
regular: 0,
|
|
7847
|
-
connectingNode: 1,
|
|
7848
|
-
poi: 2,
|
|
7849
|
-
subroute: 3,
|
|
7850
|
-
};
|
|
7851
|
-
|
|
7852
|
-
var DurationType = {
|
|
7853
|
-
hours: 0,
|
|
7854
|
-
days: 1,
|
|
7855
|
-
nights: 2,
|
|
7856
|
-
minutes: 3,
|
|
7857
|
-
};
|
|
7858
|
-
|
|
7859
|
-
var RouteTransportType = {
|
|
7860
|
-
none: 0,
|
|
7861
|
-
privateTransport: 1,
|
|
7862
|
-
publicTransport: 2,
|
|
7863
|
-
rentalCar: 3,
|
|
7864
|
-
bus: 4,
|
|
7865
|
-
camper: 5,
|
|
7866
|
-
car: 6,
|
|
7867
|
-
charter: 7,
|
|
7868
|
-
cruise: 8,
|
|
7869
|
-
ferry: 9,
|
|
7870
|
-
flight: 10,
|
|
7871
|
-
taxi: 11,
|
|
7872
|
-
train: 12,
|
|
7873
|
-
transfer: 13,
|
|
7874
|
-
rocket: 14,
|
|
7875
|
-
walking: 15,
|
|
7876
|
-
cycling: 16,
|
|
7988
|
+
var WeightType = {
|
|
7989
|
+
kilograms: 0,
|
|
7990
|
+
pounds: 1,
|
|
7877
7991
|
};
|
|
7878
7992
|
|
|
7879
7993
|
/******************************************************************************
|
|
@@ -15225,6 +15339,7 @@ var submitForm = function (config, id, request, signal) {
|
|
|
15225
15339
|
};
|
|
15226
15340
|
|
|
15227
15341
|
exports.AllotmentType = AllotmentType;
|
|
15342
|
+
exports.CustomFieldDataType = CustomFieldDataType;
|
|
15228
15343
|
exports.DataType = DataType;
|
|
15229
15344
|
exports.DossierType = DossierType;
|
|
15230
15345
|
exports.DurationType = DurationType;
|
|
@@ -15235,6 +15350,7 @@ exports.FormFieldType = FormFieldType;
|
|
|
15235
15350
|
exports.FormFieldWidth = FormFieldWidth;
|
|
15236
15351
|
exports.FormType = FormType;
|
|
15237
15352
|
exports.Gender = Gender;
|
|
15353
|
+
exports.HeightType = HeightType;
|
|
15238
15354
|
exports.MetaDataType = MetaDataType;
|
|
15239
15355
|
exports.PaymentType = PaymentType;
|
|
15240
15356
|
exports.PriceChartType = PriceChartType;
|
|
@@ -15246,6 +15362,7 @@ exports.ServiceTokenError = ServiceTokenError;
|
|
|
15246
15362
|
exports.ServiceType = ServiceType;
|
|
15247
15363
|
exports.TrajectNodeType = TrajectNodeType;
|
|
15248
15364
|
exports.VendorType = VendorType;
|
|
15365
|
+
exports.WeightType = WeightType;
|
|
15249
15366
|
exports.agents = agents;
|
|
15250
15367
|
exports.alternateFlights = alternateFlights;
|
|
15251
15368
|
exports.alternateHotels = alternateHotels;
|
|
@@ -17504,7 +17621,7 @@ const Product = ({ productCode, productName, duration, rating }) => {
|
|
|
17504
17621
|
const [hasFlight, setHasFlight] = React.useState(false);
|
|
17505
17622
|
const [hasTransfer, setHasTransfer] = React.useState(false);
|
|
17506
17623
|
const [rooms, setRooms] = React.useState([{ adults: 2, children: 0, childAges: [] }]);
|
|
17507
|
-
const [searchResponse, setSearchResponse] = React.useState(
|
|
17624
|
+
const [searchResponse, setSearchResponse] = React.useState();
|
|
17508
17625
|
const [detailResponse, setDetailResponse] = React.useState();
|
|
17509
17626
|
const [dateRange, setDateRange] = React.useState();
|
|
17510
17627
|
const [urlDateRange, setUrlDateRange] = React.useState({ from: null, to: null });
|
|
@@ -17642,6 +17759,9 @@ const Product = ({ productCode, productName, duration, rating }) => {
|
|
|
17642
17759
|
setPackageProductName(selectedItem.name);
|
|
17643
17760
|
};
|
|
17644
17761
|
React.useEffect(() => {
|
|
17762
|
+
if (searchResponse === undefined) {
|
|
17763
|
+
return;
|
|
17764
|
+
}
|
|
17645
17765
|
if (searchResponse && !lodash.isEmpty(searchResponse)) {
|
|
17646
17766
|
setSearchResults(searchResponse);
|
|
17647
17767
|
const selectedItem = searchResponse.find((item) => new Date(item.fromDate).getTime() === dateRange?.fromDate?.getTime() && new Date(item.toDate).getTime() === dateRange?.toDate?.getTime());
|
|
@@ -18812,6 +18932,7 @@ const selectPackageOptionUnits = (state) => state.booking.package?.options.find(
|
|
|
18812
18932
|
const selectPackageOptionPax = (state) => state.booking.package?.options.find((x) => x.isSelected)?.optionPax;
|
|
18813
18933
|
const selectPackageGroups = (state) => state.booking.package?.options.find((x) => x.isSelected)?.groups;
|
|
18814
18934
|
const selectPackageDetails = (state) => state.booking.package;
|
|
18935
|
+
const selectPaxCustomFields = (state) => state.booking.package?.paxCustomFields ?? [];
|
|
18815
18936
|
const selectPackageFlights = (state) => ({
|
|
18816
18937
|
outward: state.booking.package?.outwardFlights,
|
|
18817
18938
|
return: state.booking.package?.returnFlights
|
|
@@ -19038,7 +19159,12 @@ const buildPax = (traveler, mainBookerId) => {
|
|
|
19038
19159
|
lastName: traveler.lastName,
|
|
19039
19160
|
dateOfBirth: traveler.birthDate,
|
|
19040
19161
|
age: traveler.birthDate ? null : traveler.age,
|
|
19041
|
-
isMainBooker: traveler.id == mainBookerId
|
|
19162
|
+
isMainBooker: traveler.id == mainBookerId,
|
|
19163
|
+
weight: traveler.weight ?? null,
|
|
19164
|
+
weightType: traveler.weightType ?? build.WeightType.kilograms,
|
|
19165
|
+
height: traveler.height ?? null,
|
|
19166
|
+
heightType: traveler.heightType ?? build.HeightType.centimeters,
|
|
19167
|
+
customFields: traveler.customFields ?? []
|
|
19042
19168
|
};
|
|
19043
19169
|
};
|
|
19044
19170
|
const parseGender = (gender) => {
|
|
@@ -19548,7 +19674,9 @@ const SettingsContext = React__default["default"].createContext({
|
|
|
19548
19674
|
travellers: {
|
|
19549
19675
|
pathSuffix: '/reizigers',
|
|
19550
19676
|
travelersFirstStep: false,
|
|
19551
|
-
showAllCountries: false
|
|
19677
|
+
showAllCountries: false,
|
|
19678
|
+
showWeightField: false,
|
|
19679
|
+
showHeightField: false
|
|
19552
19680
|
},
|
|
19553
19681
|
summary: {
|
|
19554
19682
|
pathSuffix: '/samenvatting',
|
|
@@ -21853,6 +21981,7 @@ const OptionRoom = ({ packageRoom, pax, optionPax, onRoomChange, includedService
|
|
|
21853
21981
|
|
|
21854
21982
|
function useOfferPrinter({ bookingPackage, getPax, tagIds = [], printActionId = null, onPrinted }) {
|
|
21855
21983
|
const settings = React.useContext(SettingsContext);
|
|
21984
|
+
const apiSettings = reactRedux.useSelector(selectApiSettings);
|
|
21856
21985
|
if (!settings)
|
|
21857
21986
|
throw new Error('useOfferPrinter must be used inside <BookingWizard>');
|
|
21858
21987
|
const { language, officeId } = settings;
|
|
@@ -21881,9 +22010,9 @@ function useOfferPrinter({ bookingPackage, getPax, tagIds = [], printActionId =
|
|
|
21881
22010
|
customerRequests: []
|
|
21882
22011
|
}
|
|
21883
22012
|
};
|
|
21884
|
-
const cfg = buildTideClientConfig();
|
|
22013
|
+
const cfg = buildTideClientConfig(apiSettings);
|
|
21885
22014
|
return build.book(cfg, request, undefined, language);
|
|
21886
|
-
}, [agentId, bookingPackage, getPax, language, officeId, tagIds]);
|
|
22015
|
+
}, [agentId, apiSettings, bookingPackage, getPax, language, officeId, tagIds]);
|
|
21887
22016
|
const languageData = [
|
|
21888
22017
|
{ code: 'nl-BE', tideId: 1 },
|
|
21889
22018
|
{ code: 'fr-BE', tideId: 2 },
|
|
@@ -21893,7 +22022,7 @@ function useOfferPrinter({ bookingPackage, getPax, tagIds = [], printActionId =
|
|
|
21893
22022
|
return languageData.find((l) => l.code === code)?.tideId || 1;
|
|
21894
22023
|
}
|
|
21895
22024
|
const printOffer = React.useCallback(async (offer) => {
|
|
21896
|
-
const cfg = buildTideClientConfig();
|
|
22025
|
+
const cfg = buildTideClientConfig(apiSettings);
|
|
21897
22026
|
const req = {
|
|
21898
22027
|
id: printActionId ?? 0,
|
|
21899
22028
|
dossierNumber: offer.dossierNumber ?? offer.number,
|
|
@@ -21904,7 +22033,7 @@ function useOfferPrinter({ bookingPackage, getPax, tagIds = [], printActionId =
|
|
|
21904
22033
|
const url = URL.createObjectURL(new Blob([buf], { type: 'application/pdf' }));
|
|
21905
22034
|
onPrinted?.(url);
|
|
21906
22035
|
window.open(url);
|
|
21907
|
-
}, [language, onPrinted]);
|
|
22036
|
+
}, [apiSettings, language, onPrinted, printActionId]);
|
|
21908
22037
|
const handlePrint = React.useCallback(async () => {
|
|
21909
22038
|
try {
|
|
21910
22039
|
setStage('creating');
|
|
@@ -23060,185 +23189,6 @@ const Summary = () => {
|
|
|
23060
23189
|
React__default["default"].createElement("button", { title: settings.isOffer ? translations.STEPS.SUBMIT_OFFER : translations.STEPS.SUBMIT_BOOKING, className: buildClassName(['cta', !userValidated && 'cta--disabled']), disabled: !userValidated, name: "default" }, settings.isOffer ? translations.STEPS.SUBMIT_OFFER : translations.STEPS.SUBMIT_BOOKING))))));
|
|
23061
23190
|
};
|
|
23062
23191
|
|
|
23063
|
-
function isValidEmail(email) {
|
|
23064
|
-
return !/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,24}$/i.test(email);
|
|
23065
|
-
}
|
|
23066
|
-
const NAME_CHARACTERS_REGEX = /^[\p{L}\s-]+$/u;
|
|
23067
|
-
function hasInvalidNameCharacters(name) {
|
|
23068
|
-
return !NAME_CHARACTERS_REGEX.test(name);
|
|
23069
|
-
}
|
|
23070
|
-
// Rejects values like a 5-digit year, which the native date input allows while typing
|
|
23071
|
-
function isValidBirthDate(birthDateText) {
|
|
23072
|
-
return dateFns.isValid(dateFns.parse(birthDateText, 'yyyy-MM-dd', new Date()));
|
|
23073
|
-
}
|
|
23074
|
-
function getAge(birthDateText, startDateText) {
|
|
23075
|
-
var birthDate = new Date(birthDateText);
|
|
23076
|
-
var startDate = new Date(startDateText);
|
|
23077
|
-
var age = startDate.getFullYear() - birthDate.getFullYear();
|
|
23078
|
-
var m = startDate.getMonth() - birthDate.getMonth();
|
|
23079
|
-
if (m < 0 || (m === 0 && startDate.getDate() < birthDate.getDate())) {
|
|
23080
|
-
age--;
|
|
23081
|
-
}
|
|
23082
|
-
return age;
|
|
23083
|
-
}
|
|
23084
|
-
const validateForm$1 = (values, agentRequired, bookingType, translations, formFields, mainBookerFormFields, maxChildAge = CHILD_MAX_AGE, maxBabyAge = BABY_MAX_AGE) => {
|
|
23085
|
-
const errors = {};
|
|
23086
|
-
const isFormFieldPresent = (type) => {
|
|
23087
|
-
return formFields?.some((f) => f.type === type) ?? true;
|
|
23088
|
-
};
|
|
23089
|
-
const isMainBookerFormFieldPresent = (type) => {
|
|
23090
|
-
return mainBookerFormFields?.some((f) => f.type === type) ?? true;
|
|
23091
|
-
};
|
|
23092
|
-
const formatTravelerField = (room, pax, field) => {
|
|
23093
|
-
return values.rooms.length > 1
|
|
23094
|
-
? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_FIELD, [room, pax, field])
|
|
23095
|
-
: format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_FIELD, [pax, field]);
|
|
23096
|
-
};
|
|
23097
|
-
const formatTravelerIsNoAdult = (room, pax) => {
|
|
23098
|
-
return values.rooms.length > 1
|
|
23099
|
-
? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_IS_NO_ADULT, [room, pax])
|
|
23100
|
-
: format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT, [pax]);
|
|
23101
|
-
};
|
|
23102
|
-
const formatTravelerIsNoChild = (room, pax) => {
|
|
23103
|
-
return values.rooms.length > 1
|
|
23104
|
-
? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_IS_NO_CHILD, [room, pax])
|
|
23105
|
-
: format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_IS_NO_CHILD, [pax]);
|
|
23106
|
-
};
|
|
23107
|
-
const formatTravelerIsNoBaby = (room, pax) => {
|
|
23108
|
-
// The message states the boundary the traveler has to stay under, so we pass
|
|
23109
|
-
// the first age that is too old rather than the inclusive maxBabyAge.
|
|
23110
|
-
const tooOldAge = maxBabyAge + 1;
|
|
23111
|
-
return values.rooms.length > 1
|
|
23112
|
-
? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_IS_NO_BABY, [room, pax, tooOldAge])
|
|
23113
|
-
: format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_IS_NO_BABY, [pax, tooOldAge]);
|
|
23114
|
-
};
|
|
23115
|
-
const formatTravelerFieldInvalidCharacters = (room, pax, field) => {
|
|
23116
|
-
return values.rooms.length > 1
|
|
23117
|
-
? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_FIELD_INVALID_CHARACTERS, [room, pax, field])
|
|
23118
|
-
: format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS, [pax, field]);
|
|
23119
|
-
};
|
|
23120
|
-
values.rooms.forEach((r, rIndex) => r.adults.forEach((adult, index) => {
|
|
23121
|
-
if (lodash.isEmpty(adult.gender) && isFormFieldPresent('gender')) {
|
|
23122
|
-
lodash.set(errors, `rooms[${rIndex}].adults[${index}].gender`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.GENDER));
|
|
23123
|
-
}
|
|
23124
|
-
if (isFormFieldPresent('firstName')) {
|
|
23125
|
-
if (lodash.isEmpty(adult.firstName)) {
|
|
23126
|
-
lodash.set(errors, `rooms[${rIndex}].adults[${index}].firstName`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
|
|
23127
|
-
}
|
|
23128
|
-
else if (hasInvalidNameCharacters(adult.firstName)) {
|
|
23129
|
-
lodash.set(errors, `rooms[${rIndex}].adults[${index}].firstName`, formatTravelerFieldInvalidCharacters(rIndex + 1, index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
|
|
23130
|
-
}
|
|
23131
|
-
}
|
|
23132
|
-
if (isFormFieldPresent('lastName')) {
|
|
23133
|
-
if (lodash.isEmpty(adult.lastName)) {
|
|
23134
|
-
lodash.set(errors, `rooms[${rIndex}].adults[${index}].lastName`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.LAST_NAME));
|
|
23135
|
-
}
|
|
23136
|
-
else if (hasInvalidNameCharacters(adult.lastName)) {
|
|
23137
|
-
lodash.set(errors, `rooms[${rIndex}].adults[${index}].lastName`, formatTravelerFieldInvalidCharacters(rIndex + 1, index + 1, translations.TRAVELERS_FORM.LAST_NAME));
|
|
23138
|
-
}
|
|
23139
|
-
}
|
|
23140
|
-
if (isFormFieldPresent('birthDate')) {
|
|
23141
|
-
if (lodash.isEmpty(adult.birthDate) || !isValidBirthDate(adult.birthDate)) {
|
|
23142
|
-
lodash.set(errors, `rooms[${rIndex}].adults[${index}].birthDate`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.BIRTHDATE));
|
|
23143
|
-
}
|
|
23144
|
-
else if (values.endDate) {
|
|
23145
|
-
// If you are younger than the maxChildAge at the end of the trip, you are considered a child, so we check the endDate here instead of the startDate
|
|
23146
|
-
const age = getAge(adult.birthDate, values.endDate);
|
|
23147
|
-
if (age <= maxChildAge) {
|
|
23148
|
-
lodash.set(errors, `rooms[${rIndex}].adults[${index}].birthDate`, formatTravelerIsNoAdult(rIndex + 1, index + 1));
|
|
23149
|
-
}
|
|
23150
|
-
}
|
|
23151
|
-
}
|
|
23152
|
-
}));
|
|
23153
|
-
values.rooms.forEach((r, rIndex) => r.children.forEach((child, index) => {
|
|
23154
|
-
if (lodash.isEmpty(child.gender) && isFormFieldPresent('gender')) {
|
|
23155
|
-
lodash.set(errors, `rooms[${rIndex}].children[${index}].gender`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.GENDER));
|
|
23156
|
-
}
|
|
23157
|
-
if (isFormFieldPresent('firstName')) {
|
|
23158
|
-
if (lodash.isEmpty(child.firstName)) {
|
|
23159
|
-
lodash.set(errors, `rooms[${rIndex}].children[${index}].firstName`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
|
|
23160
|
-
}
|
|
23161
|
-
else if (hasInvalidNameCharacters(child.firstName)) {
|
|
23162
|
-
lodash.set(errors, `rooms[${rIndex}].children[${index}].firstName`, formatTravelerFieldInvalidCharacters(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
|
|
23163
|
-
}
|
|
23164
|
-
}
|
|
23165
|
-
if (isFormFieldPresent('lastName')) {
|
|
23166
|
-
if (lodash.isEmpty(child.lastName)) {
|
|
23167
|
-
lodash.set(errors, `rooms[${rIndex}].children[${index}].lastName`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.LAST_NAME));
|
|
23168
|
-
}
|
|
23169
|
-
else if (hasInvalidNameCharacters(child.lastName)) {
|
|
23170
|
-
lodash.set(errors, `rooms[${rIndex}].children[${index}].lastName`, formatTravelerFieldInvalidCharacters(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.LAST_NAME));
|
|
23171
|
-
}
|
|
23172
|
-
}
|
|
23173
|
-
if (isFormFieldPresent('birthDate')) {
|
|
23174
|
-
if (lodash.isEmpty(child.birthDate) || !isValidBirthDate(child.birthDate)) {
|
|
23175
|
-
lodash.set(errors, `rooms[${rIndex}].children[${index}].birthDate`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.BIRTHDATE));
|
|
23176
|
-
}
|
|
23177
|
-
else if (child.isBaby && values.startDate) {
|
|
23178
|
-
// A baby only has to be under the maxBabyAge on departure, so we check the startDate here instead of the endDate (TIDE-3269)
|
|
23179
|
-
const age = getAge(child.birthDate, values.startDate);
|
|
23180
|
-
if (age > maxBabyAge) {
|
|
23181
|
-
lodash.set(errors, `rooms[${rIndex}].children[${index}].birthDate`, formatTravelerIsNoBaby(rIndex + 1, r.adults.length + index + 1));
|
|
23182
|
-
}
|
|
23183
|
-
}
|
|
23184
|
-
else if (values.endDate) {
|
|
23185
|
-
// You need to be under the maxChildAge until the end of the trip, so we check the endDate here instead of the startDate.
|
|
23186
|
-
// Babies land here too when there is no startDate to check them against, so they keep at least the child age check.
|
|
23187
|
-
const age = getAge(child.birthDate, values.endDate);
|
|
23188
|
-
if (age > maxChildAge) {
|
|
23189
|
-
lodash.set(errors, `rooms[${rIndex}].children[${index}].birthDate`, formatTravelerIsNoChild(rIndex + 1, r.adults.length + index + 1));
|
|
23190
|
-
}
|
|
23191
|
-
}
|
|
23192
|
-
}
|
|
23193
|
-
}));
|
|
23194
|
-
if (values.mainBookerId < 0) {
|
|
23195
|
-
errors.mainBookerId = translations.TRAVELERS_FORM.VALIDATION.NO_MAIN_BOOKER_SELECTED;
|
|
23196
|
-
}
|
|
23197
|
-
if (bookingType != 'b2b' || mainBookerFormFields?.length) {
|
|
23198
|
-
if (lodash.isEmpty(values.street) && isMainBookerFormFieldPresent('street')) {
|
|
23199
|
-
errors.street = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.STREET]);
|
|
23200
|
-
}
|
|
23201
|
-
if (lodash.isEmpty(values.houseNumber) && isMainBookerFormFieldPresent('houseNumber')) {
|
|
23202
|
-
errors.houseNumber = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.HOUSE_NUMBER]);
|
|
23203
|
-
}
|
|
23204
|
-
if (lodash.isEmpty(values.zipCode) && isMainBookerFormFieldPresent('zipCode')) {
|
|
23205
|
-
errors.zipCode = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.ZIPCODE]);
|
|
23206
|
-
}
|
|
23207
|
-
if (lodash.isEmpty(values.place) && isMainBookerFormFieldPresent('place')) {
|
|
23208
|
-
errors.place = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.CITY]);
|
|
23209
|
-
}
|
|
23210
|
-
if (isMainBookerFormFieldPresent('email')) {
|
|
23211
|
-
if (lodash.isEmpty(values.email)) {
|
|
23212
|
-
errors.email = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.EMAIL]);
|
|
23213
|
-
}
|
|
23214
|
-
else if (isValidEmail(values.email)) {
|
|
23215
|
-
errors.email = translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_EMAIL_IS_INVALID;
|
|
23216
|
-
}
|
|
23217
|
-
if (lodash.isEmpty(values.emailConfirmation)) {
|
|
23218
|
-
errors.emailConfirmation = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.REPEAT_EMAIL]);
|
|
23219
|
-
}
|
|
23220
|
-
else if (values.emailConfirmation !== values.email) {
|
|
23221
|
-
errors.emailConfirmation = translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_EMAIL_DOES_NOT_MATCH;
|
|
23222
|
-
}
|
|
23223
|
-
}
|
|
23224
|
-
if (lodash.isEmpty(values.country) && isMainBookerFormFieldPresent('country')) {
|
|
23225
|
-
errors.country = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.COUNTRY]);
|
|
23226
|
-
}
|
|
23227
|
-
if (lodash.isEmpty(values.phone) && isMainBookerFormFieldPresent('phone')) {
|
|
23228
|
-
errors.phone = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.PHONE]);
|
|
23229
|
-
}
|
|
23230
|
-
}
|
|
23231
|
-
else {
|
|
23232
|
-
if (lodash.isEmpty(values.phone)) {
|
|
23233
|
-
errors.phone = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.PHONE]);
|
|
23234
|
-
}
|
|
23235
|
-
}
|
|
23236
|
-
if (agentRequired && !values.travelAgentId) {
|
|
23237
|
-
errors.travelAgentId = translations.TRAVELERS_FORM.VALIDATION.AGENT_IS_REQUIRED;
|
|
23238
|
-
}
|
|
23239
|
-
return errors;
|
|
23240
|
-
};
|
|
23241
|
-
|
|
23242
23192
|
const LabeledInput = ({ name, type, required, value, defaultValue, min, max, label, placeholder, extraClassName, hasError, onChange, onBlur }) => {
|
|
23243
23193
|
return (React__default["default"].createElement("label", { className: buildClassName(['form__group', extraClassName, hasError && 'form__group--error']) },
|
|
23244
23194
|
React__default["default"].createElement("span", { className: "form__label" }, lodash.compact([label, required && '*']).join(' ')),
|
|
@@ -23403,7 +23353,33 @@ function formatBirthDate$1(birthDate) {
|
|
|
23403
23353
|
const parsed = dateFns.parse(birthDate, 'yyyy-MM-dd', new Date());
|
|
23404
23354
|
return dateFns.isValid(parsed) ? dateFns.format(parsed, 'dd-MM-yyyy') : '';
|
|
23405
23355
|
}
|
|
23406
|
-
|
|
23356
|
+
// A customFieldConfigurationId can have separate "main-booker"/other-pax variants; resolved per traveler below.
|
|
23357
|
+
const MAIN_BOOKER_GROUP = 'main-booker';
|
|
23358
|
+
function buildEmptyCustomFields(paxCustomFields = []) {
|
|
23359
|
+
const uniqueIds = Array.from(new Set(paxCustomFields.map((field) => field.customFieldConfigurationId)));
|
|
23360
|
+
return uniqueIds.map((customFieldConfigurationId) => ({ customFieldConfigurationId, value: '' }));
|
|
23361
|
+
}
|
|
23362
|
+
function getApplicablePaxCustomFields(paxCustomFields = [], isMainBooker) {
|
|
23363
|
+
const variantsById = new Map();
|
|
23364
|
+
paxCustomFields.forEach((field) => {
|
|
23365
|
+
const variants = variantsById.get(field.customFieldConfigurationId) ?? [];
|
|
23366
|
+
variants.push(field);
|
|
23367
|
+
variantsById.set(field.customFieldConfigurationId, variants);
|
|
23368
|
+
});
|
|
23369
|
+
const applicableFields = [];
|
|
23370
|
+
variantsById.forEach((variants) => {
|
|
23371
|
+
const hasRoleSplit = variants.some((v) => v.group === MAIN_BOOKER_GROUP);
|
|
23372
|
+
if (!hasRoleSplit) {
|
|
23373
|
+
applicableFields.push(variants[0]);
|
|
23374
|
+
return;
|
|
23375
|
+
}
|
|
23376
|
+
const roleMatch = variants.find((v) => (v.group === MAIN_BOOKER_GROUP) === isMainBooker);
|
|
23377
|
+
if (roleMatch)
|
|
23378
|
+
applicableFields.push(roleMatch);
|
|
23379
|
+
});
|
|
23380
|
+
return applicableFields;
|
|
23381
|
+
}
|
|
23382
|
+
function createTraveler(traveler, followNumber, personTranslation, isCompact, maxBabyAge, paxCustomFields) {
|
|
23407
23383
|
if (isCompact) {
|
|
23408
23384
|
return {
|
|
23409
23385
|
id: traveler.id,
|
|
@@ -23415,9 +23391,14 @@ function createTraveler(traveler, followNumber, personTranslation, isCompact, ma
|
|
|
23415
23391
|
// old, while still falling back for a missing or unusable age. `??` alone would let a
|
|
23416
23392
|
// NaN (unparseable date of birth upstream) reach the age input and the booked pax.
|
|
23417
23393
|
// See TIDE-3269.
|
|
23418
|
-
age: Number.isFinite(traveler.age) ? traveler.age : 30
|
|
23394
|
+
age: Number.isFinite(traveler.age) ? traveler.age : 30,
|
|
23419
23395
|
// No isBaby here on purpose: the age below is editable and nothing revalidates it
|
|
23420
23396
|
// in compact mode, so a stored flag would end up contradicting the entered age.
|
|
23397
|
+
weight: null,
|
|
23398
|
+
weightType: build.WeightType.kilograms,
|
|
23399
|
+
height: null,
|
|
23400
|
+
heightType: build.HeightType.centimeters,
|
|
23401
|
+
customFields: buildEmptyCustomFields(paxCustomFields)
|
|
23421
23402
|
};
|
|
23422
23403
|
}
|
|
23423
23404
|
return {
|
|
@@ -23426,17 +23407,22 @@ function createTraveler(traveler, followNumber, personTranslation, isCompact, ma
|
|
|
23426
23407
|
lastName: '',
|
|
23427
23408
|
birthDate: '',
|
|
23428
23409
|
gender: '',
|
|
23429
|
-
isBaby: isBabyAge(traveler.age, maxBabyAge)
|
|
23410
|
+
isBaby: isBabyAge(traveler.age, maxBabyAge),
|
|
23411
|
+
weight: null,
|
|
23412
|
+
weightType: build.WeightType.kilograms,
|
|
23413
|
+
height: null,
|
|
23414
|
+
heightType: build.HeightType.centimeters,
|
|
23415
|
+
customFields: buildEmptyCustomFields(paxCustomFields)
|
|
23430
23416
|
};
|
|
23431
23417
|
}
|
|
23432
|
-
function createInitialValuesFromRooms(formRooms, startDate, endDate, agentAdressId, personTranslation, isCompact, maxBabyAge) {
|
|
23418
|
+
function createInitialValuesFromRooms(formRooms, startDate, endDate, agentAdressId, personTranslation, isCompact, maxBabyAge, paxCustomFields) {
|
|
23433
23419
|
const followNumber = { number: 1 };
|
|
23434
23420
|
const initialValues = {
|
|
23435
23421
|
startDate,
|
|
23436
23422
|
endDate,
|
|
23437
23423
|
rooms: formRooms.map((room) => ({
|
|
23438
|
-
adults: room.adults.map((traveler) => createTraveler(traveler, followNumber, personTranslation, isCompact, maxBabyAge)),
|
|
23439
|
-
children: room.children.map((traveler) => createTraveler(traveler, followNumber, personTranslation, isCompact, maxBabyAge))
|
|
23424
|
+
adults: room.adults.map((traveler) => createTraveler(traveler, followNumber, personTranslation, isCompact, maxBabyAge, paxCustomFields)),
|
|
23425
|
+
children: room.children.map((traveler) => createTraveler(traveler, followNumber, personTranslation, isCompact, maxBabyAge, paxCustomFields))
|
|
23440
23426
|
})),
|
|
23441
23427
|
mainBookerId: -1,
|
|
23442
23428
|
street: '',
|
|
@@ -23530,7 +23516,7 @@ function applyTravelersFormValuesToEditablePackagingEntry(editablePackagingEntry
|
|
|
23530
23516
|
}
|
|
23531
23517
|
};
|
|
23532
23518
|
}
|
|
23533
|
-
const SharedTravelersForm = ({ formik, translations, travellersSettings, countries, agents, bookingType, agentAdressId, travelersFirstStep = false, isUnavailable = false, useCompactForm = false, showAllCountries = false, showAgentSelection = false, initialShowAgents = false, renderPreviousButton, onBookingTypeChange }) => {
|
|
23519
|
+
const SharedTravelersForm = ({ formik, translations, travellersSettings, countries, agents, bookingType, agentAdressId, travelersFirstStep = false, isUnavailable = false, useCompactForm = false, showAllCountries = false, showWeightField = false, showHeightField = false, paxCustomFields, showAgentSelection = false, initialShowAgents = false, renderPreviousButton, onBookingTypeChange }) => {
|
|
23534
23520
|
const [showAgents, setShowAgents] = React.useState(initialShowAgents);
|
|
23535
23521
|
const typeaheadAgents = React.useMemo(() => lodash.sortBy(agents?.map((agent) => ({
|
|
23536
23522
|
key: `${agent.id}`,
|
|
@@ -23583,7 +23569,18 @@ const SharedTravelersForm = ({ formik, translations, travellersSettings, countri
|
|
|
23583
23569
|
};
|
|
23584
23570
|
const handleAddTraveler = (roomIndex) => {
|
|
23585
23571
|
const rooms = [...formik.values.rooms];
|
|
23586
|
-
const newAdult = {
|
|
23572
|
+
const newAdult = {
|
|
23573
|
+
id: Date.now(),
|
|
23574
|
+
firstName: '',
|
|
23575
|
+
lastName: '',
|
|
23576
|
+
birthDate: '',
|
|
23577
|
+
gender: '',
|
|
23578
|
+
weight: null,
|
|
23579
|
+
weightType: build.WeightType.kilograms,
|
|
23580
|
+
height: null,
|
|
23581
|
+
heightType: build.HeightType.centimeters,
|
|
23582
|
+
customFields: buildEmptyCustomFields(paxCustomFields)
|
|
23583
|
+
};
|
|
23587
23584
|
rooms[roomIndex] = { ...rooms[roomIndex], adults: [...rooms[roomIndex].adults, newAdult] };
|
|
23588
23585
|
formik.setFieldValue('rooms', rooms);
|
|
23589
23586
|
};
|
|
@@ -23598,7 +23595,23 @@ const SharedTravelersForm = ({ formik, translations, travellersSettings, countri
|
|
|
23598
23595
|
};
|
|
23599
23596
|
const handleAddRoom = () => {
|
|
23600
23597
|
const rooms = [...formik.values.rooms];
|
|
23601
|
-
rooms.push({
|
|
23598
|
+
rooms.push({
|
|
23599
|
+
adults: [
|
|
23600
|
+
{
|
|
23601
|
+
id: Date.now(),
|
|
23602
|
+
firstName: '',
|
|
23603
|
+
lastName: '',
|
|
23604
|
+
birthDate: '',
|
|
23605
|
+
gender: '',
|
|
23606
|
+
weight: null,
|
|
23607
|
+
weightType: build.WeightType.kilograms,
|
|
23608
|
+
height: null,
|
|
23609
|
+
heightType: build.HeightType.centimeters,
|
|
23610
|
+
customFields: buildEmptyCustomFields(paxCustomFields)
|
|
23611
|
+
}
|
|
23612
|
+
],
|
|
23613
|
+
children: []
|
|
23614
|
+
});
|
|
23602
23615
|
formik.setFieldValue('rooms', rooms);
|
|
23603
23616
|
};
|
|
23604
23617
|
const handleRemoveRoom = (roomIndex) => {
|
|
@@ -23617,6 +23630,54 @@ const SharedTravelersForm = ({ formik, translations, travellersSettings, countri
|
|
|
23617
23630
|
React__default["default"].createElement("label", { className: "radiobutton__label" },
|
|
23618
23631
|
React__default["default"].createElement("input", { type: "radio", className: "radiobutton__input", name: name, onChange: formik.handleChange, onBlur: formik.handleBlur, value: gender, checked: value.gender === gender }),
|
|
23619
23632
|
label)))))));
|
|
23633
|
+
const renderWeightControl = (namePrefix, value) => (React__default["default"].createElement("div", { className: "form__row" },
|
|
23634
|
+
React__default["default"].createElement(LabeledInput, { type: "number", min: 0, hasError: hasVisibleError(`${namePrefix}.weight`), extraClassName: "form__group--md-33", label: translations.TRAVELERS_FORM.WEIGHT, name: `${namePrefix}.weight`, onChange: formik.handleChange, onBlur: formik.handleBlur, value: value.weight ?? '' }),
|
|
23635
|
+
React__default["default"].createElement(LabeledSelect, { extraClassName: "form__group--md-33", name: `${namePrefix}.weightType`, onChange: formik.handleChange, onBlur: formik.handleBlur, value: value.weightType, options: [
|
|
23636
|
+
{ key: 'kg', value: build.WeightType.kilograms, label: translations.TRAVELERS_FORM.WEIGHT_UNIT_KG },
|
|
23637
|
+
{ key: 'lb', value: build.WeightType.pounds, label: translations.TRAVELERS_FORM.WEIGHT_UNIT_LB }
|
|
23638
|
+
] })));
|
|
23639
|
+
const renderHeightControl = (namePrefix, value) => (React__default["default"].createElement("div", { className: "form__row" },
|
|
23640
|
+
React__default["default"].createElement(LabeledInput, { type: "number", min: 0, hasError: hasVisibleError(`${namePrefix}.height`), extraClassName: "form__group--md-33", label: translations.TRAVELERS_FORM.HEIGHT, name: `${namePrefix}.height`, onChange: formik.handleChange, onBlur: formik.handleBlur, value: value.height ?? '' }),
|
|
23641
|
+
React__default["default"].createElement(LabeledSelect, { extraClassName: "form__group--md-33", name: `${namePrefix}.heightType`, onChange: formik.handleChange, onBlur: formik.handleBlur, value: value.heightType, options: [
|
|
23642
|
+
{ key: 'cm', value: build.HeightType.centimeters, label: translations.TRAVELERS_FORM.HEIGHT_UNIT_CM },
|
|
23643
|
+
{ key: 'ftIn', value: build.HeightType.feetInches, label: translations.TRAVELERS_FORM.HEIGHT_UNIT_FT_IN }
|
|
23644
|
+
] })));
|
|
23645
|
+
const getCustomFieldControl = (field, value, name) => {
|
|
23646
|
+
const label = lodash.compact([field.fieldName, field.isRequired && '*']).join(' ');
|
|
23647
|
+
switch (field.dataType) {
|
|
23648
|
+
case build.CustomFieldDataType.bool:
|
|
23649
|
+
return (React__default["default"].createElement("div", { className: buildClassName(['form__group', hasVisibleError(name) && 'form__group--error']) },
|
|
23650
|
+
React__default["default"].createElement("div", { className: "checkbox" },
|
|
23651
|
+
React__default["default"].createElement("label", { className: "checkbox__label" },
|
|
23652
|
+
React__default["default"].createElement("input", { type: "checkbox", className: "checkbox__input", checked: value === 'true', onChange: (e) => formik.setFieldValue(name, e.target.checked ? 'true' : 'false'), onBlur: formik.handleBlur, name: name }),
|
|
23653
|
+
label))));
|
|
23654
|
+
case build.CustomFieldDataType.date:
|
|
23655
|
+
return (React__default["default"].createElement(LabeledInput, { type: "date", hasError: hasVisibleError(name), label: label, name: name, onChange: (e) => formik.setFieldValue(name, e.target.value), onBlur: formik.handleBlur, value: value }));
|
|
23656
|
+
case build.CustomFieldDataType.time:
|
|
23657
|
+
return (React__default["default"].createElement(LabeledInput, { type: "time", hasError: hasVisibleError(name), label: label, name: name, onChange: (e) => formik.setFieldValue(name, e.target.value), onBlur: formik.handleBlur, value: value }));
|
|
23658
|
+
case build.CustomFieldDataType.numeric:
|
|
23659
|
+
return (React__default["default"].createElement(LabeledInput, { type: "number", hasError: hasVisibleError(name), label: label, name: name, onChange: (e) => formik.setFieldValue(name, e.target.value), onBlur: formik.handleBlur, value: value }));
|
|
23660
|
+
case build.CustomFieldDataType.string:
|
|
23661
|
+
default:
|
|
23662
|
+
return (React__default["default"].createElement(LabeledInput, { hasError: hasVisibleError(name), label: label, name: name, onChange: (e) => formik.setFieldValue(name, e.target.value), onBlur: formik.handleBlur, value: value }));
|
|
23663
|
+
}
|
|
23664
|
+
};
|
|
23665
|
+
const renderCustomFields = (travelerValues, namePrefix) => {
|
|
23666
|
+
if (!paxCustomFields?.length)
|
|
23667
|
+
return null;
|
|
23668
|
+
const isMainBooker = travelerValues.id === formik.values.mainBookerId;
|
|
23669
|
+
const applicableFields = getApplicablePaxCustomFields(paxCustomFields, isMainBooker);
|
|
23670
|
+
if (!applicableFields.length)
|
|
23671
|
+
return null;
|
|
23672
|
+
return (React__default["default"].createElement("div", { className: "travelers-form__custom-fields-grid" }, applicableFields.map((field) => {
|
|
23673
|
+
const fieldIndex = travelerValues.customFields?.findIndex((c) => c.customFieldConfigurationId === field.customFieldConfigurationId) ?? -1;
|
|
23674
|
+
if (fieldIndex < 0)
|
|
23675
|
+
return null;
|
|
23676
|
+
const name = `${namePrefix}.customFields[${fieldIndex}].value`;
|
|
23677
|
+
const value = travelerValues.customFields[fieldIndex].value;
|
|
23678
|
+
return (React__default["default"].createElement("div", { key: field.customFieldConfigurationId, style: { gridColumn: `span ${field.col || 12}` } }, getCustomFieldControl(field, value, name)));
|
|
23679
|
+
})));
|
|
23680
|
+
};
|
|
23620
23681
|
const getControl = (type, value, name) => {
|
|
23621
23682
|
switch (type) {
|
|
23622
23683
|
case 'gender':
|
|
@@ -23664,7 +23725,11 @@ const SharedTravelersForm = ({ formik, translations, travellersSettings, countri
|
|
|
23664
23725
|
React__default["default"].createElement(LabeledInput, { hasError: hasVisibleError(`${namePrefix}.age`), extraClassName: "form__group--md-33", label: translations.TRAVELERS_FORM.AGE, required: true, name: `${namePrefix}.age`, onChange: formik.handleChange, onBlur: formik.handleBlur, value: travelerValues.age })));
|
|
23665
23726
|
}
|
|
23666
23727
|
if (travellersSettings?.formFields?.length) {
|
|
23667
|
-
return (React__default["default"].createElement(
|
|
23728
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
23729
|
+
React__default["default"].createElement("div", { className: "travelers-form__grid" }, travellersSettings.formFields.map((field, index) => (React__default["default"].createElement("div", { key: index, className: `control control--${field.type}` }, getControl(field.type, travelerValues, `${namePrefix}.${field.type}`))))),
|
|
23730
|
+
showWeightField && renderWeightControl(namePrefix, travelerValues),
|
|
23731
|
+
showHeightField && renderHeightControl(namePrefix, travelerValues),
|
|
23732
|
+
renderCustomFields(travelerValues, namePrefix)));
|
|
23668
23733
|
}
|
|
23669
23734
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
23670
23735
|
React__default["default"].createElement("div", { className: "form__row" }, renderGenderControl(`${namePrefix}.gender`, travelerValues)),
|
|
@@ -23672,6 +23737,9 @@ const SharedTravelersForm = ({ formik, translations, travellersSettings, countri
|
|
|
23672
23737
|
React__default["default"].createElement(LabeledInput, { hasError: hasVisibleError(`${namePrefix}.firstName`), extraClassName: "form__group--md-33", label: translations.TRAVELERS_FORM.FIRST_NAME, required: true, name: `${namePrefix}.firstName`, onChange: formik.handleChange, onBlur: formik.handleBlur, value: travelerValues.firstName }),
|
|
23673
23738
|
React__default["default"].createElement(LabeledInput, { hasError: hasVisibleError(`${namePrefix}.lastName`), extraClassName: "form__group--md-33", label: translations.TRAVELERS_FORM.LAST_NAME, required: true, name: `${namePrefix}.lastName`, onChange: formik.handleChange, onBlur: formik.handleBlur, value: travelerValues.lastName }),
|
|
23674
23739
|
React__default["default"].createElement(LabeledInput, { type: "date", hasError: hasVisibleError(`${namePrefix}.birthDate`), extraClassName: "form__group--md-33", label: translations.TRAVELERS_FORM.BIRTHDATE, required: true, name: `${namePrefix}.birthDate`, onChange: formik.handleChange, onBlur: formik.handleBlur, value: travelerValues.birthDate })),
|
|
23740
|
+
showWeightField && renderWeightControl(namePrefix, travelerValues),
|
|
23741
|
+
showHeightField && renderHeightControl(namePrefix, travelerValues),
|
|
23742
|
+
renderCustomFields(travelerValues, namePrefix),
|
|
23675
23743
|
travelersFirstStep && isAdult && formik.values.rooms[roomIndex].adults.length > 1 && (React__default["default"].createElement("button", { type: "button", className: "cta cta--secondary", onClick: () => handleRemoveTraveler(roomIndex, travelerIndex) }, translations.TRAVELERS_FORM.REMOVE_TRAVELER))));
|
|
23676
23744
|
};
|
|
23677
23745
|
return (React__default["default"].createElement("form", { className: "form form__travelers", name: "booking--travellers", id: "booking--travellers", noValidate: true, onSubmit: formik.handleSubmit, onReset: formik.handleReset },
|
|
@@ -23753,6 +23821,199 @@ const SharedTravelersForm = ({ formik, translations, travellersSettings, countri
|
|
|
23753
23821
|
React__default["default"].createElement("button", { type: "submit", title: translations.STEPS.NEXT, className: 'cta' + (isUnavailable ? ' cta--disabled' : '') }, translations.STEPS.NEXT))));
|
|
23754
23822
|
};
|
|
23755
23823
|
|
|
23824
|
+
function isValidEmail(email) {
|
|
23825
|
+
return !/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,24}$/i.test(email);
|
|
23826
|
+
}
|
|
23827
|
+
const NAME_CHARACTERS_REGEX = /^[\p{L}\s-]+$/u;
|
|
23828
|
+
function hasInvalidNameCharacters(name) {
|
|
23829
|
+
return !NAME_CHARACTERS_REGEX.test(name);
|
|
23830
|
+
}
|
|
23831
|
+
// Rejects values like a 5-digit year, which the native date input allows while typing
|
|
23832
|
+
function isValidBirthDate(birthDateText) {
|
|
23833
|
+
return dateFns.isValid(dateFns.parse(birthDateText, 'yyyy-MM-dd', new Date()));
|
|
23834
|
+
}
|
|
23835
|
+
function getAge(birthDateText, startDateText) {
|
|
23836
|
+
var birthDate = new Date(birthDateText);
|
|
23837
|
+
var startDate = new Date(startDateText);
|
|
23838
|
+
var age = startDate.getFullYear() - birthDate.getFullYear();
|
|
23839
|
+
var m = startDate.getMonth() - birthDate.getMonth();
|
|
23840
|
+
if (m < 0 || (m === 0 && startDate.getDate() < birthDate.getDate())) {
|
|
23841
|
+
age--;
|
|
23842
|
+
}
|
|
23843
|
+
return age;
|
|
23844
|
+
}
|
|
23845
|
+
const validateForm$1 = (values, agentRequired, bookingType, translations, formFields, mainBookerFormFields, maxChildAge = CHILD_MAX_AGE, maxBabyAge = BABY_MAX_AGE, paxCustomFields = []) => {
|
|
23846
|
+
const errors = {};
|
|
23847
|
+
const isFormFieldPresent = (type) => {
|
|
23848
|
+
return formFields?.some((f) => f.type === type) ?? true;
|
|
23849
|
+
};
|
|
23850
|
+
const isMainBookerFormFieldPresent = (type) => {
|
|
23851
|
+
return mainBookerFormFields?.some((f) => f.type === type) ?? true;
|
|
23852
|
+
};
|
|
23853
|
+
const formatTravelerField = (room, pax, field) => {
|
|
23854
|
+
return values.rooms.length > 1
|
|
23855
|
+
? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_FIELD, [room, pax, field])
|
|
23856
|
+
: format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_FIELD, [pax, field]);
|
|
23857
|
+
};
|
|
23858
|
+
const formatTravelerIsNoAdult = (room, pax) => {
|
|
23859
|
+
return values.rooms.length > 1
|
|
23860
|
+
? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_IS_NO_ADULT, [room, pax])
|
|
23861
|
+
: format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT, [pax]);
|
|
23862
|
+
};
|
|
23863
|
+
const formatTravelerIsNoChild = (room, pax) => {
|
|
23864
|
+
return values.rooms.length > 1
|
|
23865
|
+
? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_IS_NO_CHILD, [room, pax])
|
|
23866
|
+
: format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_IS_NO_CHILD, [pax]);
|
|
23867
|
+
};
|
|
23868
|
+
const formatTravelerIsNoBaby = (room, pax) => {
|
|
23869
|
+
// The message states the boundary the traveler has to stay under, so we pass
|
|
23870
|
+
// the first age that is too old rather than the inclusive maxBabyAge.
|
|
23871
|
+
const tooOldAge = maxBabyAge + 1;
|
|
23872
|
+
return values.rooms.length > 1
|
|
23873
|
+
? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_IS_NO_BABY, [room, pax, tooOldAge])
|
|
23874
|
+
: format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_IS_NO_BABY, [pax, tooOldAge]);
|
|
23875
|
+
};
|
|
23876
|
+
const formatTravelerFieldInvalidCharacters = (room, pax, field) => {
|
|
23877
|
+
return values.rooms.length > 1
|
|
23878
|
+
? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_FIELD_INVALID_CHARACTERS, [room, pax, field])
|
|
23879
|
+
: format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS, [pax, field]);
|
|
23880
|
+
};
|
|
23881
|
+
const validateRequiredCustomFields = (traveler, path, room, pax) => {
|
|
23882
|
+
const isMainBooker = traveler.id === values.mainBookerId;
|
|
23883
|
+
const requiredFields = getApplicablePaxCustomFields(paxCustomFields, isMainBooker).filter((f) => f.isRequired);
|
|
23884
|
+
requiredFields.forEach((field) => {
|
|
23885
|
+
const fieldIndex = traveler.customFields?.findIndex((c) => c.customFieldConfigurationId === field.customFieldConfigurationId) ?? -1;
|
|
23886
|
+
if (fieldIndex < 0)
|
|
23887
|
+
return;
|
|
23888
|
+
if (lodash.isEmpty(traveler.customFields[fieldIndex].value)) {
|
|
23889
|
+
lodash.set(errors, `${path}.customFields[${fieldIndex}].value`, formatTravelerField(room, pax, field.fieldName));
|
|
23890
|
+
}
|
|
23891
|
+
});
|
|
23892
|
+
};
|
|
23893
|
+
values.rooms.forEach((r, rIndex) => r.adults.forEach((adult, index) => {
|
|
23894
|
+
if (lodash.isEmpty(adult.gender) && isFormFieldPresent('gender')) {
|
|
23895
|
+
lodash.set(errors, `rooms[${rIndex}].adults[${index}].gender`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.GENDER));
|
|
23896
|
+
}
|
|
23897
|
+
if (isFormFieldPresent('firstName')) {
|
|
23898
|
+
if (lodash.isEmpty(adult.firstName)) {
|
|
23899
|
+
lodash.set(errors, `rooms[${rIndex}].adults[${index}].firstName`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
|
|
23900
|
+
}
|
|
23901
|
+
else if (hasInvalidNameCharacters(adult.firstName)) {
|
|
23902
|
+
lodash.set(errors, `rooms[${rIndex}].adults[${index}].firstName`, formatTravelerFieldInvalidCharacters(rIndex + 1, index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
|
|
23903
|
+
}
|
|
23904
|
+
}
|
|
23905
|
+
if (isFormFieldPresent('lastName')) {
|
|
23906
|
+
if (lodash.isEmpty(adult.lastName)) {
|
|
23907
|
+
lodash.set(errors, `rooms[${rIndex}].adults[${index}].lastName`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.LAST_NAME));
|
|
23908
|
+
}
|
|
23909
|
+
else if (hasInvalidNameCharacters(adult.lastName)) {
|
|
23910
|
+
lodash.set(errors, `rooms[${rIndex}].adults[${index}].lastName`, formatTravelerFieldInvalidCharacters(rIndex + 1, index + 1, translations.TRAVELERS_FORM.LAST_NAME));
|
|
23911
|
+
}
|
|
23912
|
+
}
|
|
23913
|
+
if (isFormFieldPresent('birthDate')) {
|
|
23914
|
+
if (lodash.isEmpty(adult.birthDate) || !isValidBirthDate(adult.birthDate)) {
|
|
23915
|
+
lodash.set(errors, `rooms[${rIndex}].adults[${index}].birthDate`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.BIRTHDATE));
|
|
23916
|
+
}
|
|
23917
|
+
else if (values.endDate) {
|
|
23918
|
+
// If you are younger than the maxChildAge at the end of the trip, you are considered a child, so we check the endDate here instead of the startDate
|
|
23919
|
+
const age = getAge(adult.birthDate, values.endDate);
|
|
23920
|
+
if (age <= maxChildAge) {
|
|
23921
|
+
lodash.set(errors, `rooms[${rIndex}].adults[${index}].birthDate`, formatTravelerIsNoAdult(rIndex + 1, index + 1));
|
|
23922
|
+
}
|
|
23923
|
+
}
|
|
23924
|
+
}
|
|
23925
|
+
validateRequiredCustomFields(adult, `rooms[${rIndex}].adults[${index}]`, rIndex + 1, index + 1);
|
|
23926
|
+
}));
|
|
23927
|
+
values.rooms.forEach((r, rIndex) => r.children.forEach((child, index) => {
|
|
23928
|
+
if (lodash.isEmpty(child.gender) && isFormFieldPresent('gender')) {
|
|
23929
|
+
lodash.set(errors, `rooms[${rIndex}].children[${index}].gender`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.GENDER));
|
|
23930
|
+
}
|
|
23931
|
+
if (isFormFieldPresent('firstName')) {
|
|
23932
|
+
if (lodash.isEmpty(child.firstName)) {
|
|
23933
|
+
lodash.set(errors, `rooms[${rIndex}].children[${index}].firstName`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
|
|
23934
|
+
}
|
|
23935
|
+
else if (hasInvalidNameCharacters(child.firstName)) {
|
|
23936
|
+
lodash.set(errors, `rooms[${rIndex}].children[${index}].firstName`, formatTravelerFieldInvalidCharacters(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
|
|
23937
|
+
}
|
|
23938
|
+
}
|
|
23939
|
+
if (isFormFieldPresent('lastName')) {
|
|
23940
|
+
if (lodash.isEmpty(child.lastName)) {
|
|
23941
|
+
lodash.set(errors, `rooms[${rIndex}].children[${index}].lastName`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.LAST_NAME));
|
|
23942
|
+
}
|
|
23943
|
+
else if (hasInvalidNameCharacters(child.lastName)) {
|
|
23944
|
+
lodash.set(errors, `rooms[${rIndex}].children[${index}].lastName`, formatTravelerFieldInvalidCharacters(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.LAST_NAME));
|
|
23945
|
+
}
|
|
23946
|
+
}
|
|
23947
|
+
if (isFormFieldPresent('birthDate')) {
|
|
23948
|
+
if (lodash.isEmpty(child.birthDate) || !isValidBirthDate(child.birthDate)) {
|
|
23949
|
+
lodash.set(errors, `rooms[${rIndex}].children[${index}].birthDate`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.BIRTHDATE));
|
|
23950
|
+
}
|
|
23951
|
+
else if (child.isBaby && values.startDate) {
|
|
23952
|
+
// A baby only has to be under the maxBabyAge on departure, so we check the startDate here instead of the endDate (TIDE-3269)
|
|
23953
|
+
const age = getAge(child.birthDate, values.startDate);
|
|
23954
|
+
if (age > maxBabyAge) {
|
|
23955
|
+
lodash.set(errors, `rooms[${rIndex}].children[${index}].birthDate`, formatTravelerIsNoBaby(rIndex + 1, r.adults.length + index + 1));
|
|
23956
|
+
}
|
|
23957
|
+
}
|
|
23958
|
+
else if (values.endDate) {
|
|
23959
|
+
// You need to be under the maxChildAge until the end of the trip, so we check the endDate here instead of the startDate.
|
|
23960
|
+
// Babies land here too when there is no startDate to check them against, so they keep at least the child age check.
|
|
23961
|
+
const age = getAge(child.birthDate, values.endDate);
|
|
23962
|
+
if (age > maxChildAge) {
|
|
23963
|
+
lodash.set(errors, `rooms[${rIndex}].children[${index}].birthDate`, formatTravelerIsNoChild(rIndex + 1, r.adults.length + index + 1));
|
|
23964
|
+
}
|
|
23965
|
+
}
|
|
23966
|
+
}
|
|
23967
|
+
validateRequiredCustomFields(child, `rooms[${rIndex}].children[${index}]`, rIndex + 1, r.adults.length + index + 1);
|
|
23968
|
+
}));
|
|
23969
|
+
if (values.mainBookerId < 0) {
|
|
23970
|
+
errors.mainBookerId = translations.TRAVELERS_FORM.VALIDATION.NO_MAIN_BOOKER_SELECTED;
|
|
23971
|
+
}
|
|
23972
|
+
if (bookingType != 'b2b' || mainBookerFormFields?.length) {
|
|
23973
|
+
if (lodash.isEmpty(values.street) && isMainBookerFormFieldPresent('street')) {
|
|
23974
|
+
errors.street = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.STREET]);
|
|
23975
|
+
}
|
|
23976
|
+
if (lodash.isEmpty(values.houseNumber) && isMainBookerFormFieldPresent('houseNumber')) {
|
|
23977
|
+
errors.houseNumber = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.HOUSE_NUMBER]);
|
|
23978
|
+
}
|
|
23979
|
+
if (lodash.isEmpty(values.zipCode) && isMainBookerFormFieldPresent('zipCode')) {
|
|
23980
|
+
errors.zipCode = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.ZIPCODE]);
|
|
23981
|
+
}
|
|
23982
|
+
if (lodash.isEmpty(values.place) && isMainBookerFormFieldPresent('place')) {
|
|
23983
|
+
errors.place = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.CITY]);
|
|
23984
|
+
}
|
|
23985
|
+
if (isMainBookerFormFieldPresent('email')) {
|
|
23986
|
+
if (lodash.isEmpty(values.email)) {
|
|
23987
|
+
errors.email = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.EMAIL]);
|
|
23988
|
+
}
|
|
23989
|
+
else if (isValidEmail(values.email)) {
|
|
23990
|
+
errors.email = translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_EMAIL_IS_INVALID;
|
|
23991
|
+
}
|
|
23992
|
+
if (lodash.isEmpty(values.emailConfirmation)) {
|
|
23993
|
+
errors.emailConfirmation = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.REPEAT_EMAIL]);
|
|
23994
|
+
}
|
|
23995
|
+
else if (values.emailConfirmation !== values.email) {
|
|
23996
|
+
errors.emailConfirmation = translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_EMAIL_DOES_NOT_MATCH;
|
|
23997
|
+
}
|
|
23998
|
+
}
|
|
23999
|
+
if (lodash.isEmpty(values.country) && isMainBookerFormFieldPresent('country')) {
|
|
24000
|
+
errors.country = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.COUNTRY]);
|
|
24001
|
+
}
|
|
24002
|
+
if (lodash.isEmpty(values.phone) && isMainBookerFormFieldPresent('phone')) {
|
|
24003
|
+
errors.phone = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.PHONE]);
|
|
24004
|
+
}
|
|
24005
|
+
}
|
|
24006
|
+
else {
|
|
24007
|
+
if (lodash.isEmpty(values.phone)) {
|
|
24008
|
+
errors.phone = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.PHONE]);
|
|
24009
|
+
}
|
|
24010
|
+
}
|
|
24011
|
+
if (agentRequired && !values.travelAgentId) {
|
|
24012
|
+
errors.travelAgentId = translations.TRAVELERS_FORM.VALIDATION.AGENT_IS_REQUIRED;
|
|
24013
|
+
}
|
|
24014
|
+
return errors;
|
|
24015
|
+
};
|
|
24016
|
+
|
|
23756
24017
|
const TravelersForm = () => {
|
|
23757
24018
|
const dispatch = useAppDispatch();
|
|
23758
24019
|
const settings = React.useContext(SettingsContext);
|
|
@@ -23771,12 +24032,15 @@ const TravelersForm = () => {
|
|
|
23771
24032
|
const bookingAttributes = reactRedux.useSelector(selectBookingAttributes);
|
|
23772
24033
|
const hasMounted = reactRedux.useSelector(selectHasMounted);
|
|
23773
24034
|
const countries = reactRedux.useSelector(selectCountries);
|
|
24035
|
+
const paxCustomFields = reactRedux.useSelector(selectPaxCustomFields);
|
|
23774
24036
|
const inFlight = React.useRef(false);
|
|
23775
24037
|
const pendingRefetch = React.useRef(false);
|
|
23776
24038
|
const useCompactForm = !!settings.travellers.compactForm && !!settings.agentAdressId;
|
|
23777
24039
|
const showAllCountries = !!settings.travellers.showAllCountries;
|
|
24040
|
+
const showWeightField = !!settings.travellers.showWeightField;
|
|
24041
|
+
const showHeightField = !!settings.travellers.showHeightField;
|
|
23778
24042
|
const initialValues = reactRedux.useSelector(selectTravelersFormValues) ??
|
|
23779
|
-
createInitialValuesFromRooms(formRooms, startDate, endDate, agentAdressId, translations.TRAVELERS_FORM.PERSON, useCompactForm, settings.maxBabyAge);
|
|
24043
|
+
createInitialValuesFromRooms(formRooms, startDate, endDate, agentAdressId, translations.TRAVELERS_FORM.PERSON, useCompactForm, settings.maxBabyAge, paxCustomFields);
|
|
23780
24044
|
const [showAgentSelection, setShowAgentSelection] = React.useState(!settings.agentAdressId && !settings.hideAgentSelection);
|
|
23781
24045
|
const formik$1 = formik.useFormik({
|
|
23782
24046
|
initialValues,
|
|
@@ -23786,7 +24050,7 @@ const TravelersForm = () => {
|
|
|
23786
24050
|
// The travel dates are captured into initialValues once and then persisted in
|
|
23787
24051
|
// redux, so validating against the values would use the dates of whichever
|
|
23788
24052
|
// package option was selected first. Age checks need the current ones.
|
|
23789
|
-
{ ...values, startDate, endDate }, settings.agentRequired, bookingType, translations, settings.travellers.formFields, settings.travellers.mainBookerFormFields, settings.maxChildAge, settings.maxBabyAge),
|
|
24053
|
+
{ ...values, startDate, endDate }, settings.agentRequired, bookingType, translations, settings.travellers.formFields, settings.travellers.mainBookerFormFields, settings.maxChildAge, settings.maxBabyAge, paxCustomFields),
|
|
23790
24054
|
onSubmit: (values) => {
|
|
23791
24055
|
dispatch(setFormValues(values));
|
|
23792
24056
|
if (useCompactForm) {
|
|
@@ -23869,7 +24133,7 @@ const TravelersForm = () => {
|
|
|
23869
24133
|
dispatch(setFormValues(formValues));
|
|
23870
24134
|
setShowAgentSelection(false);
|
|
23871
24135
|
}, [agents, settings.affiliateSlug]);
|
|
23872
|
-
return (React__default["default"].createElement(SharedTravelersForm, { formik: formik$1, translations: translations, travellersSettings: settings.travellers, countries: countries, agents: agents, bookingType: bookingType, agentAdressId: agentAdressId, travelersFirstStep: travelersFirstStep, isUnavailable: isUnavailable, useCompactForm: useCompactForm, showAllCountries: showAllCountries, showAgentSelection: showAgentSelection, initialShowAgents: settings.agentRequired ?? false, onBookingTypeChange: (nextBookingType) => dispatch(setBookingType(nextBookingType)), renderPreviousButton: () => !travelersFirstStep && settings.skipRouter ? (React__default["default"].createElement("button", { type: "button", title: translations.STEPS.PREVIOUS, onClick: () => dispatch(setCurrentStep$1(OPTIONS_FORM_STEP)), className: "cta cta--secondary" }, translations.STEPS.PREVIOUS)) : !travelersFirstStep ? (React__default["default"].createElement(Link, { to: `${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.options.pathSuffix}?${bookingQueryString}`, title: translations.STEPS.PREVIOUS, className: "cta cta--secondary" }, translations.STEPS.PREVIOUS)) : null }));
|
|
24136
|
+
return (React__default["default"].createElement(SharedTravelersForm, { formik: formik$1, translations: translations, travellersSettings: settings.travellers, countries: countries, agents: agents, bookingType: bookingType, agentAdressId: agentAdressId, travelersFirstStep: travelersFirstStep, isUnavailable: isUnavailable, useCompactForm: useCompactForm, showAllCountries: showAllCountries, showWeightField: showWeightField, showHeightField: showHeightField, paxCustomFields: paxCustomFields, showAgentSelection: showAgentSelection, initialShowAgents: settings.agentRequired ?? false, onBookingTypeChange: (nextBookingType) => dispatch(setBookingType(nextBookingType)), renderPreviousButton: () => !travelersFirstStep && settings.skipRouter ? (React__default["default"].createElement("button", { type: "button", title: translations.STEPS.PREVIOUS, onClick: () => dispatch(setCurrentStep$1(OPTIONS_FORM_STEP)), className: "cta cta--secondary" }, translations.STEPS.PREVIOUS)) : !travelersFirstStep ? (React__default["default"].createElement(Link, { to: `${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.options.pathSuffix}?${bookingQueryString}`, title: translations.STEPS.PREVIOUS, className: "cta cta--secondary" }, translations.STEPS.PREVIOUS)) : null }));
|
|
23873
24137
|
};
|
|
23874
24138
|
|
|
23875
24139
|
const Booking = ({ productCode, productName, thumbnailUrl }) => {
|
|
@@ -27941,7 +28205,12 @@ const mapPackagingPaxToBookingPax = (pax, fallbackId, referenceDate) => ({
|
|
|
27941
28205
|
dateOfBirth: pax?.dateOfBirth ?? undefined,
|
|
27942
28206
|
age: pax?.dateOfBirth ? getAgeAtReferenceDate(pax.dateOfBirth, referenceDate) : undefined,
|
|
27943
28207
|
isMainBooker: pax?.isMainBooker,
|
|
27944
|
-
email: ''
|
|
28208
|
+
email: '',
|
|
28209
|
+
weight: null,
|
|
28210
|
+
weightType: build.WeightType.kilograms,
|
|
28211
|
+
height: null,
|
|
28212
|
+
heightType: build.HeightType.centimeters,
|
|
28213
|
+
customFields: []
|
|
27945
28214
|
});
|
|
27946
28215
|
const getRequestRoomsFromPackagingEntry = (entry) => {
|
|
27947
28216
|
const accommodationLines = (entry.lines ?? []).filter((line) => line.serviceType === ACCOMMODATION_SERVICE_TYPE && line.pax?.length > 0);
|
|
@@ -28261,8 +28530,6 @@ const buildTrajectNodeRequest = ({ node, line }, context, productCode, destinati
|
|
|
28261
28530
|
language: context.language,
|
|
28262
28531
|
serviceType: node.serviceType,
|
|
28263
28532
|
fromDate: toDateOnlyString(line.from),
|
|
28264
|
-
// An excursion happens on a day rather than over a span. The traject gives its line an end a day
|
|
28265
|
-
// out, the way a night is counted, which asks the search for a window it does not have.
|
|
28266
28533
|
toDate: toDateOnlyString(node.serviceType === EXCURSION_SERVICE_TYPE ? line.from : line.to),
|
|
28267
28534
|
destination: destination ?? buildDestination(line, node),
|
|
28268
28535
|
productCode,
|
|
@@ -31182,7 +31449,7 @@ const Filters = ({ initialFilters, filters, isOpen, handleSetIsOpen, isLoading,
|
|
|
31182
31449
|
const max = filter.max ?? 100;
|
|
31183
31450
|
const selectedMin = filter.selectedMin ?? min;
|
|
31184
31451
|
const selectedMax = filter.selectedMax ?? max;
|
|
31185
|
-
return (React__default["default"].createElement(MultiRangeFilter, { min: min, max: max, selectedMin: selectedMin, selectedMax: selectedMax, valueFormatter: (value) => `${value}
|
|
31452
|
+
return (React__default["default"].createElement(MultiRangeFilter, { min: min, max: max, selectedMin: selectedMin, selectedMax: selectedMax, valueFormatter: (value) => (filter.property === 'price' ? value.toFixed(2).replace('.', ',') : `${value}`), onChange: (newMin, newMax) => {
|
|
31186
31453
|
handleSliderChange(filter, newMin, newMax);
|
|
31187
31454
|
} }));
|
|
31188
31455
|
})(),
|
|
@@ -32674,7 +32941,7 @@ const FlightFilters = ({ isOpen, handleSetIsOpen, isLoading }) => {
|
|
|
32674
32941
|
!lodash.isEmpty(priceRangeValues) &&
|
|
32675
32942
|
(() => {
|
|
32676
32943
|
return (React__default["default"].createElement("div", { className: "search__filter-rows" },
|
|
32677
|
-
React__default["default"].createElement(MultiRangeFilter, { min: minPrice, max: maxPrice, selectedMin: lodash.first(priceRangeValues) ?? minPrice, selectedMax: lodash.last(priceRangeValues) ?? maxPrice, valueFormatter: (value) => `€${value}`, onChange: (newMin, newMax) => {
|
|
32944
|
+
React__default["default"].createElement(MultiRangeFilter, { min: minPrice, max: maxPrice, selectedMin: lodash.first(priceRangeValues) ?? minPrice, selectedMax: lodash.last(priceRangeValues) ?? maxPrice, valueFormatter: (value) => `€${value.toFixed(2).replace('.', ',')}`, onChange: (newMin, newMax) => {
|
|
32678
32945
|
handlePriceSliderChange([newMin, newMax]);
|
|
32679
32946
|
} })));
|
|
32680
32947
|
})()))))));
|
|
@@ -33334,7 +33601,12 @@ const getRequestRoomsFromPackagingSegments = (entry, segments) => {
|
|
|
33334
33601
|
dateOfBirth: paxSource?.dateOfBirth ?? undefined,
|
|
33335
33602
|
age: paxSource?.dateOfBirth ? undefined : 30,
|
|
33336
33603
|
isMainBooker: paxSource?.isMainBooker,
|
|
33337
|
-
email: ''
|
|
33604
|
+
email: '',
|
|
33605
|
+
weight: null,
|
|
33606
|
+
weightType: build.WeightType.kilograms,
|
|
33607
|
+
height: null,
|
|
33608
|
+
heightType: build.HeightType.centimeters,
|
|
33609
|
+
customFields: []
|
|
33338
33610
|
};
|
|
33339
33611
|
if (!groupedByRoom.has(roomIndexWithinLine)) {
|
|
33340
33612
|
groupedByRoom.set(roomIndexWithinLine, []);
|
|
@@ -34342,6 +34614,7 @@ const getNodeIcon = (node) => {
|
|
|
34342
34614
|
const isRenderableNode = (node) => node.trajectNodeType === REGULAR_TRAJECT_NODE_TYPE &&
|
|
34343
34615
|
(node.serviceType === ACCOMMODATION_SERVICE_TYPE || node.serviceType === EXCURSION_SERVICE_TYPE || node.serviceType === FLIGHT_SERVICE_TYPE);
|
|
34344
34616
|
const MAX_DAY_ACTIVITIES = 6;
|
|
34617
|
+
const MAX_HOTEL_RESULTS = 6;
|
|
34345
34618
|
const TrajectResults = ({ isLoading }) => {
|
|
34346
34619
|
const context = React.useContext(SearchResultsConfigurationContext);
|
|
34347
34620
|
const dispatch = reactRedux.useDispatch();
|
|
@@ -34351,6 +34624,8 @@ const TrajectResults = ({ isLoading }) => {
|
|
|
34351
34624
|
const { trajectNodeAvailability, trajectFlightAvailability, trajectDaySuggestions, editablePackagingEntry } = reactRedux.useSelector((state) => state.searchResults);
|
|
34352
34625
|
const trajectEntry = context?.trajectEntry;
|
|
34353
34626
|
const hideShowMoreResults = !!context?.hideShowMoreResults;
|
|
34627
|
+
const loadDayActivitiesOnDemand = !!context?.loadDayActivitiesOnDemand;
|
|
34628
|
+
const showNonPreferredHotels = !!context?.showNonPreferredHotels;
|
|
34354
34629
|
const nodesWithLines = React.useMemo(() => (trajectEntry ? getTrajectNodesWithLines(trajectEntry) : []), [trajectEntry]);
|
|
34355
34630
|
const lineByNodeId = React.useMemo(() => new Map(nodesWithLines.map((x) => [x.node.nodeId, x])), [nodesWithLines]);
|
|
34356
34631
|
const nodesByDay = React.useMemo(() => {
|
|
@@ -34388,13 +34663,14 @@ const TrajectResults = ({ isLoading }) => {
|
|
|
34388
34663
|
/**
|
|
34389
34664
|
* Each day's activities are one more search, and a traject has as many as it has days. They go
|
|
34390
34665
|
* out together, but only once the trip itself has resolved — sharing the connections with the
|
|
34391
|
-
* searches the trip cannot do without would only make those slower.
|
|
34666
|
+
* searches the trip cannot do without would only make those slower. A portal can turn the
|
|
34667
|
+
* automatic load off, and then each day waits for its own "show activities" click instead.
|
|
34392
34668
|
*/
|
|
34393
34669
|
React.useEffect(() => {
|
|
34394
|
-
if (!trajectEntry || !tripResolved)
|
|
34670
|
+
if (!trajectEntry || !tripResolved || loadDayActivitiesOnDemand)
|
|
34395
34671
|
return;
|
|
34396
34672
|
(trajectEntry.traject.days ?? []).filter((day) => stayByDay.has(day.order)).forEach((day) => loadDay(day));
|
|
34397
|
-
}, [trajectEntry, tripResolved, stayByDay]);
|
|
34673
|
+
}, [trajectEntry, tripResolved, stayByDay, loadDayActivitiesOnDemand]);
|
|
34398
34674
|
if (!context || !trajectEntry)
|
|
34399
34675
|
return null;
|
|
34400
34676
|
const handleSelect = (item, code) => {
|
|
@@ -34468,6 +34744,10 @@ const TrajectResults = ({ isLoading }) => {
|
|
|
34468
34744
|
const selected = results.find((x) => x.code === availability?.selectedCode) ?? null;
|
|
34469
34745
|
const configured = results.filter((x) => x.code !== selected?.code && !!findCandidateForResult(node, x));
|
|
34470
34746
|
const others = results.filter((x) => x.code !== selected?.code && !findCandidateForResult(node, x));
|
|
34747
|
+
// A hotel row holds the hotels configured on the node; a portal can also let it fill up with
|
|
34748
|
+
// non-preferred hotels found in the area, the rest staying behind "show more".
|
|
34749
|
+
const fill = showNonPreferredHotels && node.serviceType === ACCOMMODATION_SERVICE_TYPE ? others.slice(0, Math.max(MAX_HOTEL_RESULTS - 1 - configured.length, 0)) : [];
|
|
34750
|
+
const remaining = others.length - fill.length;
|
|
34471
34751
|
// No entry yet means the node's search has been queued but not dispatched — still loading.
|
|
34472
34752
|
const status = availability?.status ?? 'loading';
|
|
34473
34753
|
return (React__default["default"].createElement(React__default["default"].Fragment, { key: line.guid },
|
|
@@ -34487,12 +34767,12 @@ const TrajectResults = ({ isLoading }) => {
|
|
|
34487
34767
|
node.preferredAccommodationName,
|
|
34488
34768
|
" \u2014 ",
|
|
34489
34769
|
translations.SRP.NO_RESULTS))),
|
|
34490
|
-
React__default["default"].createElement("div", { className: "search__results__cards search__results__cards--scroll" }, [selected, ...configured].map((result) => (React__default["default"].createElement(TrajectNodeCard, { key: result.code, node: node, result: result, isSelected: result.code === selected.code, languageCode: context.languageCode, translations: translations, onSelect: () => handleSelect(item, result.code), onEditOptions: node.serviceType === ACCOMMODATION_SERVICE_TYPE ? () => handleEditOptions(item) : undefined, showNights: node.serviceType === ACCOMMODATION_SERVICE_TYPE })))),
|
|
34491
|
-
|
|
34770
|
+
React__default["default"].createElement("div", { className: "search__results__cards search__results__cards--scroll" }, [selected, ...configured, ...fill].map((result) => (React__default["default"].createElement(TrajectNodeCard, { key: result.code, node: node, result: result, isSelected: result.code === selected.code, languageCode: context.languageCode, translations: translations, onSelect: () => handleSelect(item, result.code), onEditOptions: node.serviceType === ACCOMMODATION_SERVICE_TYPE ? () => handleEditOptions(item) : undefined, showNights: node.serviceType === ACCOMMODATION_SERVICE_TYPE })))),
|
|
34771
|
+
remaining > 0 && !hideShowMoreResults && (React__default["default"].createElement("div", { className: "search__results__cards__actions" },
|
|
34492
34772
|
React__default["default"].createElement("button", { type: "button", className: "cta cta--secondary", onClick: () => handleShowMore(item) },
|
|
34493
34773
|
translations.SRP.SHOW_MORE,
|
|
34494
34774
|
" (",
|
|
34495
|
-
|
|
34775
|
+
remaining,
|
|
34496
34776
|
")")))))));
|
|
34497
34777
|
};
|
|
34498
34778
|
const handleSelectFlight = (item, flight) => {
|
|
@@ -34583,6 +34863,7 @@ const TrajectResults = ({ isLoading }) => {
|
|
|
34583
34863
|
return null;
|
|
34584
34864
|
const visible = cards.slice(0, MAX_DAY_ACTIVITIES);
|
|
34585
34865
|
const hidden = cards.length - visible.length;
|
|
34866
|
+
const awaitsRequest = loadDayActivitiesOnDemand && !suggestions && canSearch && !nodesResolving && hidden === 0;
|
|
34586
34867
|
return (React__default["default"].createElement(React__default["default"].Fragment, { key: `activities-${day.order}` },
|
|
34587
34868
|
React__default["default"].createElement("div", { className: "search__results__label search__results__label--sub" },
|
|
34588
34869
|
React__default["default"].createElement("div", { className: "search__results__label__text" },
|
|
@@ -34592,11 +34873,13 @@ const TrajectResults = ({ isLoading }) => {
|
|
|
34592
34873
|
(nodesResolving || isSearching) && !cards.length && React__default["default"].createElement(Spinner, { label: translations.SRP.LOADING_ACTIVITIES }),
|
|
34593
34874
|
!!cards.length && React__default["default"].createElement("div", { className: "search__results__cards search__results__cards--scroll" }, visible.map(renderActivityCard)),
|
|
34594
34875
|
!nodesResolving && !isSearching && !cards.length && (!!items.length || !!suggestions) && (React__default["default"].createElement("div", { className: "no-results" }, translations.SRP.NO_RESULTS)),
|
|
34595
|
-
React__default["default"].createElement("div", { className: "search__results__cards__actions" },
|
|
34596
|
-
translations.SRP.
|
|
34597
|
-
|
|
34598
|
-
|
|
34599
|
-
|
|
34876
|
+
React__default["default"].createElement("div", { className: "search__results__cards__actions" },
|
|
34877
|
+
awaitsRequest && (React__default["default"].createElement("button", { type: "button", className: "cta cta--secondary", onClick: () => loadDay(day) }, translations.SRP.SHOW_ACTIVITIES)),
|
|
34878
|
+
hidden > 0 && !hideShowMoreResults && (React__default["default"].createElement("button", { type: "button", className: "cta cta--secondary", onClick: () => handleShowMoreActivities(day.order) },
|
|
34879
|
+
translations.SRP.SHOW_MORE,
|
|
34880
|
+
" (",
|
|
34881
|
+
hidden,
|
|
34882
|
+
")")))));
|
|
34600
34883
|
};
|
|
34601
34884
|
/**
|
|
34602
34885
|
* An activity the traject books is swapped for another, the way a hotel is; one the traveller
|