@qite/tide-components 1.0.10 → 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.
Files changed (81) hide show
  1. package/build/build-cjs/index.js +753 -480
  2. package/build/build-cjs/src/booking-wizard/features/booking/selectors.d.ts +1 -0
  3. package/build/build-cjs/src/booking-wizard/features/travelers-form/validate-form.d.ts +2 -1
  4. package/build/build-cjs/src/booking-wizard/types.d.ts +8 -1
  5. package/build/build-cjs/src/shared/booking/travelers-form.d.ts +8 -3
  6. package/build/build-esm/index.js +755 -482
  7. package/build/build-esm/src/booking-wizard/features/booking/selectors.d.ts +1 -0
  8. package/build/build-esm/src/booking-wizard/features/travelers-form/validate-form.d.ts +2 -1
  9. package/build/build-esm/src/booking-wizard/types.d.ts +8 -1
  10. package/build/build-esm/src/shared/booking/travelers-form.d.ts +8 -3
  11. package/package.json +2 -2
  12. package/styles/abstracts/_mixins.scss +74 -74
  13. package/styles/abstracts/_variables.scss +57 -57
  14. package/styles/base/_fonts.scss +2 -2
  15. package/styles/base/_normalize.scss +227 -227
  16. package/styles/base/_typography.scss +35 -35
  17. package/styles/booking-joker-variables.scss +596 -596
  18. package/styles/booking-product-variables.scss +330 -330
  19. package/styles/booking-product.scss +438 -438
  20. package/styles/booking-qsm-variables.scss +501 -501
  21. package/styles/booking-qsm.scss +52 -52
  22. package/styles/booking-search-results-variables.scss +734 -734
  23. package/styles/booking-search-results.scss +53 -53
  24. package/styles/booking-wizard-variables.scss +603 -603
  25. package/styles/booking-wizard.scss +61 -61
  26. package/styles/components/_accordion.scss +67 -67
  27. package/styles/components/_animations.scss +39 -39
  28. package/styles/components/_base.scss +107 -107
  29. package/styles/components/_booking.scss +906 -906
  30. package/styles/components/_breadcrumb.scss +92 -92
  31. package/styles/components/_button.scss +238 -238
  32. package/styles/components/_checkbox.scss +230 -230
  33. package/styles/components/_contact.scss +255 -255
  34. package/styles/components/_content.scss +336 -336
  35. package/styles/components/_cta.scss +238 -238
  36. package/styles/components/_date-list.scss +41 -41
  37. package/styles/components/_date-range-picker.scss +223 -223
  38. package/styles/components/_decrement-increment.scss +35 -35
  39. package/styles/components/_dropdown.scss +77 -77
  40. package/styles/components/_error.scss +50 -50
  41. package/styles/components/_faq.scss +30 -30
  42. package/styles/components/_flight-option.scss +1432 -1432
  43. package/styles/components/_flyin.scss +830 -830
  44. package/styles/components/_footer.scss +135 -135
  45. package/styles/components/_form.scss +1704 -1693
  46. package/styles/components/_gallery.scss +317 -317
  47. package/styles/components/_header.scss +113 -113
  48. package/styles/components/_image-with-text.scss +206 -206
  49. package/styles/components/_img-slider.scss +175 -175
  50. package/styles/components/_info-message.scss +75 -75
  51. package/styles/components/_input.scss +35 -35
  52. package/styles/components/_list.scss +185 -185
  53. package/styles/components/_loader.scss +152 -152
  54. package/styles/components/_login.scss +140 -140
  55. package/styles/components/_map-view.scss +1100 -1100
  56. package/styles/components/_mixins.scss +579 -579
  57. package/styles/components/_navbar.scss +765 -765
  58. package/styles/components/_passenger-picker.scss +306 -306
  59. package/styles/components/_phone-input.scss +8 -8
  60. package/styles/components/_placeholders.scss +165 -165
  61. package/styles/components/_pricing-summary.scss +163 -163
  62. package/styles/components/_qsm.scss +17 -17
  63. package/styles/components/_radiobutton.scss +170 -170
  64. package/styles/components/_search.scss +2197 -2197
  65. package/styles/components/_select-wrapper.scss +81 -81
  66. package/styles/components/_slider.scss +128 -128
  67. package/styles/components/_spinner.scss +29 -29
  68. package/styles/components/_step-indicators.scss +187 -187
  69. package/styles/components/_table.scss +81 -81
  70. package/styles/components/_tide-form.scss +578 -578
  71. package/styles/components/_tree.scss +648 -648
  72. package/styles/components/_typeahead.scss +275 -275
  73. package/styles/components/_variables.scss +89 -89
  74. package/styles/content-blocks-variables.scss +543 -543
  75. package/styles/content-blocks.scss +66 -66
  76. package/styles/font.scss +2 -2
  77. package/styles/qsm/_calendar.scss +274 -274
  78. package/styles/qsm/_qsm.scss +1097 -1097
  79. package/styles/search.scss +1200 -1200
  80. package/styles/tide-form-variables.scss +275 -275
  81. package/styles/tide-form.scss +56 -56
@@ -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: "رقم المنزل",
@@ -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",
@@ -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",
@@ -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",
@@ -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",
@@ -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°",
@@ -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",
@@ -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",
@@ -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",
@@ -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",
@@ -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",
@@ -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",
@@ -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",
@@ -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",
@@ -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",
@@ -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: "番地",
@@ -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
- exports.DateAmountType = void 0;
7824
- (function (DateAmountType) {
7825
- DateAmountType[(DateAmountType["days"] = 0)] = "days";
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',
@@ -23061,185 +23189,6 @@ const Summary = () => {
23061
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))))));
23062
23190
  };
23063
23191
 
23064
- function isValidEmail(email) {
23065
- return !/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,24}$/i.test(email);
23066
- }
23067
- const NAME_CHARACTERS_REGEX = /^[\p{L}\s-]+$/u;
23068
- function hasInvalidNameCharacters(name) {
23069
- return !NAME_CHARACTERS_REGEX.test(name);
23070
- }
23071
- // Rejects values like a 5-digit year, which the native date input allows while typing
23072
- function isValidBirthDate(birthDateText) {
23073
- return dateFns.isValid(dateFns.parse(birthDateText, 'yyyy-MM-dd', new Date()));
23074
- }
23075
- function getAge(birthDateText, startDateText) {
23076
- var birthDate = new Date(birthDateText);
23077
- var startDate = new Date(startDateText);
23078
- var age = startDate.getFullYear() - birthDate.getFullYear();
23079
- var m = startDate.getMonth() - birthDate.getMonth();
23080
- if (m < 0 || (m === 0 && startDate.getDate() < birthDate.getDate())) {
23081
- age--;
23082
- }
23083
- return age;
23084
- }
23085
- const validateForm$1 = (values, agentRequired, bookingType, translations, formFields, mainBookerFormFields, maxChildAge = CHILD_MAX_AGE, maxBabyAge = BABY_MAX_AGE) => {
23086
- const errors = {};
23087
- const isFormFieldPresent = (type) => {
23088
- return formFields?.some((f) => f.type === type) ?? true;
23089
- };
23090
- const isMainBookerFormFieldPresent = (type) => {
23091
- return mainBookerFormFields?.some((f) => f.type === type) ?? true;
23092
- };
23093
- const formatTravelerField = (room, pax, field) => {
23094
- return values.rooms.length > 1
23095
- ? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_FIELD, [room, pax, field])
23096
- : format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_FIELD, [pax, field]);
23097
- };
23098
- const formatTravelerIsNoAdult = (room, pax) => {
23099
- return values.rooms.length > 1
23100
- ? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_IS_NO_ADULT, [room, pax])
23101
- : format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT, [pax]);
23102
- };
23103
- const formatTravelerIsNoChild = (room, pax) => {
23104
- return values.rooms.length > 1
23105
- ? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_IS_NO_CHILD, [room, pax])
23106
- : format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_IS_NO_CHILD, [pax]);
23107
- };
23108
- const formatTravelerIsNoBaby = (room, pax) => {
23109
- // The message states the boundary the traveler has to stay under, so we pass
23110
- // the first age that is too old rather than the inclusive maxBabyAge.
23111
- const tooOldAge = maxBabyAge + 1;
23112
- return values.rooms.length > 1
23113
- ? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_IS_NO_BABY, [room, pax, tooOldAge])
23114
- : format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_IS_NO_BABY, [pax, tooOldAge]);
23115
- };
23116
- const formatTravelerFieldInvalidCharacters = (room, pax, field) => {
23117
- return values.rooms.length > 1
23118
- ? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_FIELD_INVALID_CHARACTERS, [room, pax, field])
23119
- : format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS, [pax, field]);
23120
- };
23121
- values.rooms.forEach((r, rIndex) => r.adults.forEach((adult, index) => {
23122
- if (lodash.isEmpty(adult.gender) && isFormFieldPresent('gender')) {
23123
- lodash.set(errors, `rooms[${rIndex}].adults[${index}].gender`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.GENDER));
23124
- }
23125
- if (isFormFieldPresent('firstName')) {
23126
- if (lodash.isEmpty(adult.firstName)) {
23127
- lodash.set(errors, `rooms[${rIndex}].adults[${index}].firstName`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
23128
- }
23129
- else if (hasInvalidNameCharacters(adult.firstName)) {
23130
- lodash.set(errors, `rooms[${rIndex}].adults[${index}].firstName`, formatTravelerFieldInvalidCharacters(rIndex + 1, index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
23131
- }
23132
- }
23133
- if (isFormFieldPresent('lastName')) {
23134
- if (lodash.isEmpty(adult.lastName)) {
23135
- lodash.set(errors, `rooms[${rIndex}].adults[${index}].lastName`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.LAST_NAME));
23136
- }
23137
- else if (hasInvalidNameCharacters(adult.lastName)) {
23138
- lodash.set(errors, `rooms[${rIndex}].adults[${index}].lastName`, formatTravelerFieldInvalidCharacters(rIndex + 1, index + 1, translations.TRAVELERS_FORM.LAST_NAME));
23139
- }
23140
- }
23141
- if (isFormFieldPresent('birthDate')) {
23142
- if (lodash.isEmpty(adult.birthDate) || !isValidBirthDate(adult.birthDate)) {
23143
- lodash.set(errors, `rooms[${rIndex}].adults[${index}].birthDate`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.BIRTHDATE));
23144
- }
23145
- else if (values.endDate) {
23146
- // 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
23147
- const age = getAge(adult.birthDate, values.endDate);
23148
- if (age <= maxChildAge) {
23149
- lodash.set(errors, `rooms[${rIndex}].adults[${index}].birthDate`, formatTravelerIsNoAdult(rIndex + 1, index + 1));
23150
- }
23151
- }
23152
- }
23153
- }));
23154
- values.rooms.forEach((r, rIndex) => r.children.forEach((child, index) => {
23155
- if (lodash.isEmpty(child.gender) && isFormFieldPresent('gender')) {
23156
- lodash.set(errors, `rooms[${rIndex}].children[${index}].gender`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.GENDER));
23157
- }
23158
- if (isFormFieldPresent('firstName')) {
23159
- if (lodash.isEmpty(child.firstName)) {
23160
- lodash.set(errors, `rooms[${rIndex}].children[${index}].firstName`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
23161
- }
23162
- else if (hasInvalidNameCharacters(child.firstName)) {
23163
- lodash.set(errors, `rooms[${rIndex}].children[${index}].firstName`, formatTravelerFieldInvalidCharacters(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
23164
- }
23165
- }
23166
- if (isFormFieldPresent('lastName')) {
23167
- if (lodash.isEmpty(child.lastName)) {
23168
- lodash.set(errors, `rooms[${rIndex}].children[${index}].lastName`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.LAST_NAME));
23169
- }
23170
- else if (hasInvalidNameCharacters(child.lastName)) {
23171
- lodash.set(errors, `rooms[${rIndex}].children[${index}].lastName`, formatTravelerFieldInvalidCharacters(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.LAST_NAME));
23172
- }
23173
- }
23174
- if (isFormFieldPresent('birthDate')) {
23175
- if (lodash.isEmpty(child.birthDate) || !isValidBirthDate(child.birthDate)) {
23176
- lodash.set(errors, `rooms[${rIndex}].children[${index}].birthDate`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.BIRTHDATE));
23177
- }
23178
- else if (child.isBaby && values.startDate) {
23179
- // A baby only has to be under the maxBabyAge on departure, so we check the startDate here instead of the endDate (TIDE-3269)
23180
- const age = getAge(child.birthDate, values.startDate);
23181
- if (age > maxBabyAge) {
23182
- lodash.set(errors, `rooms[${rIndex}].children[${index}].birthDate`, formatTravelerIsNoBaby(rIndex + 1, r.adults.length + index + 1));
23183
- }
23184
- }
23185
- else if (values.endDate) {
23186
- // You need to be under the maxChildAge until the end of the trip, so we check the endDate here instead of the startDate.
23187
- // Babies land here too when there is no startDate to check them against, so they keep at least the child age check.
23188
- const age = getAge(child.birthDate, values.endDate);
23189
- if (age > maxChildAge) {
23190
- lodash.set(errors, `rooms[${rIndex}].children[${index}].birthDate`, formatTravelerIsNoChild(rIndex + 1, r.adults.length + index + 1));
23191
- }
23192
- }
23193
- }
23194
- }));
23195
- if (values.mainBookerId < 0) {
23196
- errors.mainBookerId = translations.TRAVELERS_FORM.VALIDATION.NO_MAIN_BOOKER_SELECTED;
23197
- }
23198
- if (bookingType != 'b2b' || mainBookerFormFields?.length) {
23199
- if (lodash.isEmpty(values.street) && isMainBookerFormFieldPresent('street')) {
23200
- errors.street = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.STREET]);
23201
- }
23202
- if (lodash.isEmpty(values.houseNumber) && isMainBookerFormFieldPresent('houseNumber')) {
23203
- errors.houseNumber = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.HOUSE_NUMBER]);
23204
- }
23205
- if (lodash.isEmpty(values.zipCode) && isMainBookerFormFieldPresent('zipCode')) {
23206
- errors.zipCode = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.ZIPCODE]);
23207
- }
23208
- if (lodash.isEmpty(values.place) && isMainBookerFormFieldPresent('place')) {
23209
- errors.place = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.CITY]);
23210
- }
23211
- if (isMainBookerFormFieldPresent('email')) {
23212
- if (lodash.isEmpty(values.email)) {
23213
- errors.email = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.EMAIL]);
23214
- }
23215
- else if (isValidEmail(values.email)) {
23216
- errors.email = translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_EMAIL_IS_INVALID;
23217
- }
23218
- if (lodash.isEmpty(values.emailConfirmation)) {
23219
- errors.emailConfirmation = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.REPEAT_EMAIL]);
23220
- }
23221
- else if (values.emailConfirmation !== values.email) {
23222
- errors.emailConfirmation = translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_EMAIL_DOES_NOT_MATCH;
23223
- }
23224
- }
23225
- if (lodash.isEmpty(values.country) && isMainBookerFormFieldPresent('country')) {
23226
- errors.country = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.COUNTRY]);
23227
- }
23228
- if (lodash.isEmpty(values.phone) && isMainBookerFormFieldPresent('phone')) {
23229
- errors.phone = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.PHONE]);
23230
- }
23231
- }
23232
- else {
23233
- if (lodash.isEmpty(values.phone)) {
23234
- errors.phone = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.PHONE]);
23235
- }
23236
- }
23237
- if (agentRequired && !values.travelAgentId) {
23238
- errors.travelAgentId = translations.TRAVELERS_FORM.VALIDATION.AGENT_IS_REQUIRED;
23239
- }
23240
- return errors;
23241
- };
23242
-
23243
23192
  const LabeledInput = ({ name, type, required, value, defaultValue, min, max, label, placeholder, extraClassName, hasError, onChange, onBlur }) => {
23244
23193
  return (React__default["default"].createElement("label", { className: buildClassName(['form__group', extraClassName, hasError && 'form__group--error']) },
23245
23194
  React__default["default"].createElement("span", { className: "form__label" }, lodash.compact([label, required && '*']).join(' ')),
@@ -23404,7 +23353,33 @@ function formatBirthDate$1(birthDate) {
23404
23353
  const parsed = dateFns.parse(birthDate, 'yyyy-MM-dd', new Date());
23405
23354
  return dateFns.isValid(parsed) ? dateFns.format(parsed, 'dd-MM-yyyy') : '';
23406
23355
  }
23407
- function createTraveler(traveler, followNumber, personTranslation, isCompact, maxBabyAge) {
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) {
23408
23383
  if (isCompact) {
23409
23384
  return {
23410
23385
  id: traveler.id,
@@ -23416,9 +23391,14 @@ function createTraveler(traveler, followNumber, personTranslation, isCompact, ma
23416
23391
  // old, while still falling back for a missing or unusable age. `??` alone would let a
23417
23392
  // NaN (unparseable date of birth upstream) reach the age input and the booked pax.
23418
23393
  // See TIDE-3269.
23419
- age: Number.isFinite(traveler.age) ? traveler.age : 30
23394
+ age: Number.isFinite(traveler.age) ? traveler.age : 30,
23420
23395
  // No isBaby here on purpose: the age below is editable and nothing revalidates it
23421
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)
23422
23402
  };
23423
23403
  }
23424
23404
  return {
@@ -23427,17 +23407,22 @@ function createTraveler(traveler, followNumber, personTranslation, isCompact, ma
23427
23407
  lastName: '',
23428
23408
  birthDate: '',
23429
23409
  gender: '',
23430
- 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)
23431
23416
  };
23432
23417
  }
23433
- function createInitialValuesFromRooms(formRooms, startDate, endDate, agentAdressId, personTranslation, isCompact, maxBabyAge) {
23418
+ function createInitialValuesFromRooms(formRooms, startDate, endDate, agentAdressId, personTranslation, isCompact, maxBabyAge, paxCustomFields) {
23434
23419
  const followNumber = { number: 1 };
23435
23420
  const initialValues = {
23436
23421
  startDate,
23437
23422
  endDate,
23438
23423
  rooms: formRooms.map((room) => ({
23439
- adults: room.adults.map((traveler) => createTraveler(traveler, followNumber, personTranslation, isCompact, maxBabyAge)),
23440
- 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))
23441
23426
  })),
23442
23427
  mainBookerId: -1,
23443
23428
  street: '',
@@ -23531,7 +23516,7 @@ function applyTravelersFormValuesToEditablePackagingEntry(editablePackagingEntry
23531
23516
  }
23532
23517
  };
23533
23518
  }
23534
- 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 }) => {
23535
23520
  const [showAgents, setShowAgents] = React.useState(initialShowAgents);
23536
23521
  const typeaheadAgents = React.useMemo(() => lodash.sortBy(agents?.map((agent) => ({
23537
23522
  key: `${agent.id}`,
@@ -23584,7 +23569,18 @@ const SharedTravelersForm = ({ formik, translations, travellersSettings, countri
23584
23569
  };
23585
23570
  const handleAddTraveler = (roomIndex) => {
23586
23571
  const rooms = [...formik.values.rooms];
23587
- const newAdult = { id: Date.now(), firstName: '', lastName: '', birthDate: '', gender: '' };
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
+ };
23588
23584
  rooms[roomIndex] = { ...rooms[roomIndex], adults: [...rooms[roomIndex].adults, newAdult] };
23589
23585
  formik.setFieldValue('rooms', rooms);
23590
23586
  };
@@ -23599,7 +23595,23 @@ const SharedTravelersForm = ({ formik, translations, travellersSettings, countri
23599
23595
  };
23600
23596
  const handleAddRoom = () => {
23601
23597
  const rooms = [...formik.values.rooms];
23602
- rooms.push({ adults: [{ id: Date.now(), firstName: '', lastName: '', birthDate: '', gender: '' }], children: [] });
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
+ });
23603
23615
  formik.setFieldValue('rooms', rooms);
23604
23616
  };
23605
23617
  const handleRemoveRoom = (roomIndex) => {
@@ -23618,6 +23630,54 @@ const SharedTravelersForm = ({ formik, translations, travellersSettings, countri
23618
23630
  React__default["default"].createElement("label", { className: "radiobutton__label" },
23619
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 }),
23620
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
+ };
23621
23681
  const getControl = (type, value, name) => {
23622
23682
  switch (type) {
23623
23683
  case 'gender':
@@ -23665,7 +23725,11 @@ const SharedTravelersForm = ({ formik, translations, travellersSettings, countri
23665
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 })));
23666
23726
  }
23667
23727
  if (travellersSettings?.formFields?.length) {
23668
- return (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}`))))));
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)));
23669
23733
  }
23670
23734
  return (React__default["default"].createElement(React__default["default"].Fragment, null,
23671
23735
  React__default["default"].createElement("div", { className: "form__row" }, renderGenderControl(`${namePrefix}.gender`, travelerValues)),
@@ -23673,6 +23737,9 @@ const SharedTravelersForm = ({ formik, translations, travellersSettings, countri
23673
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 }),
23674
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 }),
23675
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),
23676
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))));
23677
23744
  };
23678
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 },
@@ -23754,6 +23821,199 @@ const SharedTravelersForm = ({ formik, translations, travellersSettings, countri
23754
23821
  React__default["default"].createElement("button", { type: "submit", title: translations.STEPS.NEXT, className: 'cta' + (isUnavailable ? ' cta--disabled' : '') }, translations.STEPS.NEXT))));
23755
23822
  };
23756
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
+
23757
24017
  const TravelersForm = () => {
23758
24018
  const dispatch = useAppDispatch();
23759
24019
  const settings = React.useContext(SettingsContext);
@@ -23772,12 +24032,15 @@ const TravelersForm = () => {
23772
24032
  const bookingAttributes = reactRedux.useSelector(selectBookingAttributes);
23773
24033
  const hasMounted = reactRedux.useSelector(selectHasMounted);
23774
24034
  const countries = reactRedux.useSelector(selectCountries);
24035
+ const paxCustomFields = reactRedux.useSelector(selectPaxCustomFields);
23775
24036
  const inFlight = React.useRef(false);
23776
24037
  const pendingRefetch = React.useRef(false);
23777
24038
  const useCompactForm = !!settings.travellers.compactForm && !!settings.agentAdressId;
23778
24039
  const showAllCountries = !!settings.travellers.showAllCountries;
24040
+ const showWeightField = !!settings.travellers.showWeightField;
24041
+ const showHeightField = !!settings.travellers.showHeightField;
23779
24042
  const initialValues = reactRedux.useSelector(selectTravelersFormValues) ??
23780
- 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);
23781
24044
  const [showAgentSelection, setShowAgentSelection] = React.useState(!settings.agentAdressId && !settings.hideAgentSelection);
23782
24045
  const formik$1 = formik.useFormik({
23783
24046
  initialValues,
@@ -23787,7 +24050,7 @@ const TravelersForm = () => {
23787
24050
  // The travel dates are captured into initialValues once and then persisted in
23788
24051
  // redux, so validating against the values would use the dates of whichever
23789
24052
  // package option was selected first. Age checks need the current ones.
23790
- { ...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),
23791
24054
  onSubmit: (values) => {
23792
24055
  dispatch(setFormValues(values));
23793
24056
  if (useCompactForm) {
@@ -23870,7 +24133,7 @@ const TravelersForm = () => {
23870
24133
  dispatch(setFormValues(formValues));
23871
24134
  setShowAgentSelection(false);
23872
24135
  }, [agents, settings.affiliateSlug]);
23873
- 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 }));
23874
24137
  };
23875
24138
 
23876
24139
  const Booking = ({ productCode, productName, thumbnailUrl }) => {
@@ -27942,7 +28205,12 @@ const mapPackagingPaxToBookingPax = (pax, fallbackId, referenceDate) => ({
27942
28205
  dateOfBirth: pax?.dateOfBirth ?? undefined,
27943
28206
  age: pax?.dateOfBirth ? getAgeAtReferenceDate(pax.dateOfBirth, referenceDate) : undefined,
27944
28207
  isMainBooker: pax?.isMainBooker,
27945
- email: ''
28208
+ email: '',
28209
+ weight: null,
28210
+ weightType: build.WeightType.kilograms,
28211
+ height: null,
28212
+ heightType: build.HeightType.centimeters,
28213
+ customFields: []
27946
28214
  });
27947
28215
  const getRequestRoomsFromPackagingEntry = (entry) => {
27948
28216
  const accommodationLines = (entry.lines ?? []).filter((line) => line.serviceType === ACCOMMODATION_SERVICE_TYPE && line.pax?.length > 0);
@@ -31884,7 +32152,7 @@ const FlyIn = ({ srpType, isOpen, setIsOpen, className = '', onPanelRef, details
31884
32152
  dispatch(setBookPackagingEntry(true));
31885
32153
  }
31886
32154
  };
31887
- return (React__default["default"].createElement("div", { className: `flyin ${isOpen ? 'flyin--active' : ''} ${className} ${isPackageEditFlow || flyInType === 'acco-results' || flyInType === 'traject-day-activities' ? 'flyin--large' : ''} ${flyInType === 'excursion-results' || flyInType === 'excursion-details' ? 'flyin--medium' : ''}
32155
+ return (React__default["default"].createElement("div", { className: `flyin ${isOpen ? 'flyin--active' : ''} ${className} ${isPackageEditFlow || flyInType === 'acco-results' || flyInType === 'traject-day-activities' ? 'flyin--large' : ''} ${flyInType === 'excursion-results' || flyInType === 'excursion-details' ? 'flyin--medium' : ''}
31888
32156
  ${flyInType === 'flight-outward-results' || flyInType === 'flight-return-results' || flyInType === 'traject-flight-results' ? 'flyin--flight' : ''}` },
31889
32157
  React__default["default"].createElement("div", { className: `flyin__panel ${isOpen ? 'flyin__panel--active' : ''}`, ref: panelRef },
31890
32158
  React__default["default"].createElement("div", { className: "flyin__content" },
@@ -33333,7 +33601,12 @@ const getRequestRoomsFromPackagingSegments = (entry, segments) => {
33333
33601
  dateOfBirth: paxSource?.dateOfBirth ?? undefined,
33334
33602
  age: paxSource?.dateOfBirth ? undefined : 30,
33335
33603
  isMainBooker: paxSource?.isMainBooker,
33336
- email: ''
33604
+ email: '',
33605
+ weight: null,
33606
+ weightType: build.WeightType.kilograms,
33607
+ height: null,
33608
+ heightType: build.HeightType.centimeters,
33609
+ customFields: []
33337
33610
  };
33338
33611
  if (!groupedByRoom.has(roomIndexWithinLine)) {
33339
33612
  groupedByRoom.set(roomIndexWithinLine, []);
@@ -33472,20 +33745,20 @@ const buildFlightHtml = (line) => {
33472
33745
  */
33473
33746
  const buildFallbackHtml = (item, line) => {
33474
33747
  const details = [line?.accommodationName, line?.regimeName].filter(Boolean).join(' — ');
33475
- return `
33476
- <div class="itinerary-item__fallback">
33477
- <h3 class="itinerary-item__fallback-title">${escapeHtml(item.title)}</h3>
33478
- ${line ? buildFlightHtml(line) : ''}
33479
- ${details ? `<p class="itinerary-item__fallback-details">${escapeHtml(details)}</p>` : ''}
33480
- </div>
33748
+ return `
33749
+ <div class="itinerary-item__fallback">
33750
+ <h3 class="itinerary-item__fallback-title">${escapeHtml(item.title)}</h3>
33751
+ ${line ? buildFlightHtml(line) : ''}
33752
+ ${details ? `<p class="itinerary-item__fallback-details">${escapeHtml(details)}</p>` : ''}
33753
+ </div>
33481
33754
  `;
33482
33755
  };
33483
33756
  const buildItineraryHtml = (itinerary, translations, lines) => {
33484
33757
  if (!itinerary) {
33485
- return `
33486
- <div class="itinerary-shell">
33487
- <div class="itinerary-empty">Geen reisroute beschikbaar.</div>
33488
- </div>
33758
+ return `
33759
+ <div class="itinerary-shell">
33760
+ <div class="itinerary-empty">Geen reisroute beschikbaar.</div>
33761
+ </div>
33489
33762
  `;
33490
33763
  }
33491
33764
  const allNodes = itinerary.nodes ?? [];
@@ -33499,70 +33772,70 @@ const buildItineraryHtml = (itinerary, translations, lines) => {
33499
33772
  const hasAccommodationInCurrentNode = uniqueItems.some(isAccommodationItem);
33500
33773
  const activeAccommodation = findAccommodationForDay(allNodes, startDay);
33501
33774
  const accommodationBanner = !hasAccommodationInCurrentNode && activeAccommodation
33502
- ? `
33503
- <div class="itinerary-node__accommodation-banner">
33504
- Accommodatie voor deze dag: <strong>${escapeHtml(getAccommodationName(activeAccommodation))}</strong>
33505
- </div>
33775
+ ? `
33776
+ <div class="itinerary-node__accommodation-banner">
33777
+ Accommodatie voor deze dag: <strong>${escapeHtml(getAccommodationName(activeAccommodation))}</strong>
33778
+ </div>
33506
33779
  `
33507
33780
  : '';
33508
33781
  const itemsHtml = hasItems
33509
33782
  ? uniqueItems
33510
- .map((item) => `
33511
- <article class="itinerary-item" data-template="${escapeHtml(item.templateName)}">
33783
+ .map((item) => `
33784
+ <article class="itinerary-item" data-template="${escapeHtml(item.templateName)}">
33512
33785
  ${hasVisibleContent(item.contents)
33513
33786
  ? item.contents
33514
- : buildFallbackHtml(item, lines.find((line) => line.guid === item.itemGuid))}
33515
- </article>
33787
+ : buildFallbackHtml(item, lines.find((line) => line.guid === item.itemGuid))}
33788
+ </article>
33516
33789
  `)
33517
33790
  .join('')
33518
33791
  : `<div class="itinerary-node__empty">${translations.ITINERARY.NO_ITEMS}</div>`;
33519
- return `
33520
- <section class="itinerary-node">
33521
- <header class="itinerary-node__header">
33522
-
33523
- <div class="itinerary-node__day">
33524
- <p class="itinerary-node__day-day">${day}</p>
33525
- <p class="itinerary-node__day-month">${month}</p>
33526
- </div>
33527
-
33528
- <div>
33529
- <h2 class="itinerary-node__title">${escapeHtml(node.title)}</h2>
33530
- </div>
33531
- </header>
33532
-
33533
- <div class="itinerary-node__content">
33534
- ${accommodationBanner}
33535
- ${itemsHtml}
33536
- </div>
33537
- </section>
33792
+ return `
33793
+ <section class="itinerary-node">
33794
+ <header class="itinerary-node__header">
33795
+
33796
+ <div class="itinerary-node__day">
33797
+ <p class="itinerary-node__day-day">${day}</p>
33798
+ <p class="itinerary-node__day-month">${month}</p>
33799
+ </div>
33800
+
33801
+ <div>
33802
+ <h2 class="itinerary-node__title">${escapeHtml(node.title)}</h2>
33803
+ </div>
33804
+ </header>
33805
+
33806
+ <div class="itinerary-node__content">
33807
+ ${accommodationBanner}
33808
+ ${itemsHtml}
33809
+ </div>
33810
+ </section>
33538
33811
  `;
33539
33812
  })
33540
33813
  .join('');
33541
33814
  const defaultItemsHtml = itinerary.defaultItems && itinerary.defaultItems.length > 0
33542
- ? `
33543
- <section class="itinerary-default-items">
33544
- <h2 class="itinerary-default-items__title">Algemene info</h2>
33815
+ ? `
33816
+ <section class="itinerary-default-items">
33817
+ <h2 class="itinerary-default-items__title">Algemene info</h2>
33545
33818
  ${getUniqueItems(itinerary.defaultItems)
33546
- .map((item) => `
33547
- <article class="itinerary-item" data-template="${escapeHtml(item.templateName)}">
33819
+ .map((item) => `
33820
+ <article class="itinerary-item" data-template="${escapeHtml(item.templateName)}">
33548
33821
  ${hasVisibleContent(item.contents)
33549
33822
  ? item.contents
33550
- : buildFallbackHtml(item, lines.find((line) => line.guid === item.itemGuid))}
33551
- </article>
33823
+ : buildFallbackHtml(item, lines.find((line) => line.guid === item.itemGuid))}
33824
+ </article>
33552
33825
  `)
33553
- .join('')}
33554
- </section>
33826
+ .join('')}
33827
+ </section>
33555
33828
  `
33556
33829
  : '';
33557
- return `
33558
- <div class="itinerary-shell">
33559
- ${itinerary.title ? `<header class="itinerary-shell__header"><h1 class="itinerary-shell__title">${escapeHtml(itinerary.title)}</h1></header>` : ''}
33560
-
33561
- <div class="itinerary-shell__content">
33562
- ${nodesHtml}
33563
- ${defaultItemsHtml}
33564
- </div>
33565
- </div>
33830
+ return `
33831
+ <div class="itinerary-shell">
33832
+ ${itinerary.title ? `<header class="itinerary-shell__header"><h1 class="itinerary-shell__title">${escapeHtml(itinerary.title)}</h1></header>` : ''}
33833
+
33834
+ <div class="itinerary-shell__content">
33835
+ ${nodesHtml}
33836
+ ${defaultItemsHtml}
33837
+ </div>
33838
+ </div>
33566
33839
  `;
33567
33840
  };
33568
33841
  const FullItinerary = ({ isLoading }) => {
@@ -33584,170 +33857,170 @@ const FullItinerary = ({ isLoading }) => {
33584
33857
  }
33585
33858
  const shadowRoot = host.shadowRoot ?? host.attachShadow({ mode: 'open' });
33586
33859
  shadowRootRef.current = shadowRoot;
33587
- shadowRoot.innerHTML = `
33588
- <style>
33589
- :host {
33590
- all: initial;
33591
- display: block;
33592
- width: 100%;
33593
- }
33594
-
33595
- *,
33596
- *::before,
33597
- *::after {
33598
- box-sizing: border-box;
33599
- }
33600
-
33601
- .itinerary-shell {
33602
- width: 100%;
33603
- margin: 0 auto;
33604
- font-family: 'Outfit', sans-serif;
33605
- color: #222;
33606
- }
33607
-
33608
- .itinerary-shell__header {
33609
- margin-bottom: 24px;
33610
- }
33611
-
33612
- .itinerary-shell__title {
33613
- margin: 0;
33614
- font-size: 32px;
33615
- line-height: 1.2;
33616
- }
33617
-
33618
- .itinerary-shell__content {
33619
- display: grid;
33620
- gap: 24px;
33621
- }
33622
-
33623
- .itinerary-node {
33624
- border: 1px solid #e5e7eb;
33625
- border-radius: 16px;
33626
- overflow: hidden;
33627
- background: #fff;
33628
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
33629
- }
33630
-
33631
- .itinerary-node__header {
33632
- display: flex;
33633
- gap: 16px;
33634
- align-items: center;
33635
- border-bottom: 1px solid #eef0f2;
33636
- background: #fafafa;
33637
- }
33638
-
33639
- .itinerary-node__day {
33640
- flex: 50px 0 0;
33641
- display: flex;
33642
- flex-flow: column;
33643
- align-items: center;
33644
- justify-content: center;
33645
- background: #1f9470;
33646
- color: white;
33647
- border: 1.5px solid var(--tide-booking-color-secondary);
33648
- }
33649
-
33650
- .itinerary-node__day-month {
33651
- margin: 0px;
33652
- }
33653
-
33654
- .itinerary-node__day-day {
33655
- margin: 0px;
33656
- font-weight: var(--tide-booking-search-results-label-date-month-font-weight);
33657
- color: var(--tide-booking-search-results-label-date-month-color);
33658
- font-size: 24px;
33659
- }
33660
-
33661
- .itinerary-node__title {
33662
- margin: 0;
33663
- font-size: 22px;
33664
- line-height: 1.25;
33665
- }
33666
-
33667
- .itinerary-node__content {
33668
- display: grid;
33669
- gap: 20px;
33670
- padding: 20px;
33671
- }
33672
-
33673
- .itinerary-node__accommodation-banner {
33674
- padding: 12px 16px;
33675
- border: 1px solid #dbeafe;
33676
- border-radius: 12px;
33677
- background: #eff6ff;
33678
- color: #1e3a8a;
33679
- font-size: 14px;
33680
- line-height: 1.4;
33681
- }
33682
-
33683
- .itinerary-item {
33684
- display: block;
33685
- border-radius: 12px;
33686
- overflow: hidden;
33687
- background: #fff;
33688
- }
33689
-
33690
- /* An item whose template has no content view of its own still has to read as a service. */
33691
- .itinerary-item__fallback {
33692
- padding: 16px 20px;
33693
- border: 1px solid #e5e7eb;
33694
- border-radius: 12px;
33695
- }
33696
-
33697
- .itinerary-item__fallback-title {
33698
- margin: 0;
33699
- font-size: 16px;
33700
- font-weight: 600;
33701
- color: #111827;
33702
- }
33703
-
33704
- .itinerary-item__legs {
33705
- margin: 8px 0 0;
33706
- padding-left: 18px;
33707
- color: #374151;
33708
- }
33709
-
33710
- .itinerary-item__legs li + li {
33711
- margin-top: 4px;
33712
- }
33713
-
33714
- .itinerary-item__fallback-details {
33715
- margin: 8px 0 0;
33716
- color: #6b7280;
33717
- }
33718
-
33719
- .itinerary-node__empty,
33720
- .itinerary-empty {
33721
- padding: 20px;
33722
- border: 1px dashed #d1d5db;
33723
- border-radius: 12px;
33724
- color: #6b7280;
33725
- background: #fafafa;
33726
- }
33727
-
33728
- .itinerary-default-items {
33729
- border: 1px solid #e5e7eb;
33730
- border-radius: 16px;
33731
- padding: 20px;
33732
- background: #fff;
33733
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
33734
- }
33735
-
33736
- .itinerary-default-items__title {
33737
- margin: 0 0 16px;
33738
- font-size: 22px;
33739
- }
33740
-
33741
- @media (max-width: 768px) {
33742
- .itinerary-shell {
33743
- padding: 16px;
33744
- }
33745
- }
33746
-
33747
- ${itinerary?.styleSheetBody ?? ''}
33748
- </style>
33749
-
33750
- ${html}
33860
+ shadowRoot.innerHTML = `
33861
+ <style>
33862
+ :host {
33863
+ all: initial;
33864
+ display: block;
33865
+ width: 100%;
33866
+ }
33867
+
33868
+ *,
33869
+ *::before,
33870
+ *::after {
33871
+ box-sizing: border-box;
33872
+ }
33873
+
33874
+ .itinerary-shell {
33875
+ width: 100%;
33876
+ margin: 0 auto;
33877
+ font-family: 'Outfit', sans-serif;
33878
+ color: #222;
33879
+ }
33880
+
33881
+ .itinerary-shell__header {
33882
+ margin-bottom: 24px;
33883
+ }
33884
+
33885
+ .itinerary-shell__title {
33886
+ margin: 0;
33887
+ font-size: 32px;
33888
+ line-height: 1.2;
33889
+ }
33890
+
33891
+ .itinerary-shell__content {
33892
+ display: grid;
33893
+ gap: 24px;
33894
+ }
33895
+
33896
+ .itinerary-node {
33897
+ border: 1px solid #e5e7eb;
33898
+ border-radius: 16px;
33899
+ overflow: hidden;
33900
+ background: #fff;
33901
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
33902
+ }
33903
+
33904
+ .itinerary-node__header {
33905
+ display: flex;
33906
+ gap: 16px;
33907
+ align-items: center;
33908
+ border-bottom: 1px solid #eef0f2;
33909
+ background: #fafafa;
33910
+ }
33911
+
33912
+ .itinerary-node__day {
33913
+ flex: 50px 0 0;
33914
+ display: flex;
33915
+ flex-flow: column;
33916
+ align-items: center;
33917
+ justify-content: center;
33918
+ background: #1f9470;
33919
+ color: white;
33920
+ border: 1.5px solid var(--tide-booking-color-secondary);
33921
+ }
33922
+
33923
+ .itinerary-node__day-month {
33924
+ margin: 0px;
33925
+ }
33926
+
33927
+ .itinerary-node__day-day {
33928
+ margin: 0px;
33929
+ font-weight: var(--tide-booking-search-results-label-date-month-font-weight);
33930
+ color: var(--tide-booking-search-results-label-date-month-color);
33931
+ font-size: 24px;
33932
+ }
33933
+
33934
+ .itinerary-node__title {
33935
+ margin: 0;
33936
+ font-size: 22px;
33937
+ line-height: 1.25;
33938
+ }
33939
+
33940
+ .itinerary-node__content {
33941
+ display: grid;
33942
+ gap: 20px;
33943
+ padding: 20px;
33944
+ }
33945
+
33946
+ .itinerary-node__accommodation-banner {
33947
+ padding: 12px 16px;
33948
+ border: 1px solid #dbeafe;
33949
+ border-radius: 12px;
33950
+ background: #eff6ff;
33951
+ color: #1e3a8a;
33952
+ font-size: 14px;
33953
+ line-height: 1.4;
33954
+ }
33955
+
33956
+ .itinerary-item {
33957
+ display: block;
33958
+ border-radius: 12px;
33959
+ overflow: hidden;
33960
+ background: #fff;
33961
+ }
33962
+
33963
+ /* An item whose template has no content view of its own still has to read as a service. */
33964
+ .itinerary-item__fallback {
33965
+ padding: 16px 20px;
33966
+ border: 1px solid #e5e7eb;
33967
+ border-radius: 12px;
33968
+ }
33969
+
33970
+ .itinerary-item__fallback-title {
33971
+ margin: 0;
33972
+ font-size: 16px;
33973
+ font-weight: 600;
33974
+ color: #111827;
33975
+ }
33976
+
33977
+ .itinerary-item__legs {
33978
+ margin: 8px 0 0;
33979
+ padding-left: 18px;
33980
+ color: #374151;
33981
+ }
33982
+
33983
+ .itinerary-item__legs li + li {
33984
+ margin-top: 4px;
33985
+ }
33986
+
33987
+ .itinerary-item__fallback-details {
33988
+ margin: 8px 0 0;
33989
+ color: #6b7280;
33990
+ }
33991
+
33992
+ .itinerary-node__empty,
33993
+ .itinerary-empty {
33994
+ padding: 20px;
33995
+ border: 1px dashed #d1d5db;
33996
+ border-radius: 12px;
33997
+ color: #6b7280;
33998
+ background: #fafafa;
33999
+ }
34000
+
34001
+ .itinerary-default-items {
34002
+ border: 1px solid #e5e7eb;
34003
+ border-radius: 16px;
34004
+ padding: 20px;
34005
+ background: #fff;
34006
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
34007
+ }
34008
+
34009
+ .itinerary-default-items__title {
34010
+ margin: 0 0 16px;
34011
+ font-size: 22px;
34012
+ }
34013
+
34014
+ @media (max-width: 768px) {
34015
+ .itinerary-shell {
34016
+ padding: 16px;
34017
+ }
34018
+ }
34019
+
34020
+ ${itinerary?.styleSheetBody ?? ''}
34021
+ </style>
34022
+
34023
+ ${html}
33751
34024
  `;
33752
34025
  }, [html, itinerary?.styleSheetBody, isLoading]);
33753
34026
  return (React__default["default"].createElement(React__default["default"].Fragment, null,
@@ -38971,20 +39244,20 @@ function ItineraryMapView({ destinations: propDestinations, adults = 2, dateFrom
38971
39244
  const isStartEnd = dest.isStart || dest.isEnd;
38972
39245
  let iconHtml;
38973
39246
  if (isStartEnd) {
38974
- iconHtml = `
38975
- <div class="map-view__marker map-view__marker--plane">
38976
- <svg viewBox="0 0 576 512" fill="currentColor" width="16" height="16" xmlns="http://www.w3.org/2000/svg">
38977
- <path d="M482.3 192c34.2 0 93.7 29 93.7 64c0 36-59.5 64-93.7 64l-116.6 0L265.2 495.9c-5.7 10.1-16.3 16.1-27.8 16.1l-56.2 0c-10.6 0-18.3-10.3-15.8-20.6l49-196.3L112 288 68.8 377.6c-3 6.1-9.2 10.4-16 10.4l-2.8 0c-9.2 0-16-8.8-13.3-17.6L80 256L36.7 141.6C34 132.8 40.8 124 50 124l2.8 0c6.8 0 13 4.3 16 10.4L112 224l102.9 0-49-196.3C163.5 17.3 171.2 7 181.8 7l56.2 0c11.5 0 22.1 6 27.8 16.1L365.7 192l116.6 0z"/>
38978
- </svg>
39247
+ iconHtml = `
39248
+ <div class="map-view__marker map-view__marker--plane">
39249
+ <svg viewBox="0 0 576 512" fill="currentColor" width="16" height="16" xmlns="http://www.w3.org/2000/svg">
39250
+ <path d="M482.3 192c34.2 0 93.7 29 93.7 64c0 36-59.5 64-93.7 64l-116.6 0L265.2 495.9c-5.7 10.1-16.3 16.1-27.8 16.1l-56.2 0c-10.6 0-18.3-10.3-15.8-20.6l49-196.3L112 288 68.8 377.6c-3 6.1-9.2 10.4-16 10.4l-2.8 0c-9.2 0-16-8.8-13.3-17.6L80 256L36.7 141.6C34 132.8 40.8 124 50 124l2.8 0c6.8 0 13 4.3 16 10.4L112 224l102.9 0-49-196.3C163.5 17.3 171.2 7 181.8 7l56.2 0c11.5 0 22.1 6 27.8 16.1L365.7 192l116.6 0z"/>
39251
+ </svg>
38979
39252
  </div>`;
38980
39253
  }
38981
39254
  else {
38982
39255
  stopIndex++;
38983
39256
  const imgStyle = dest.imageUrl ? `style="background-image:url('${dest.imageUrl}')"` : '';
38984
- iconHtml = `
38985
- <div class="map-view__marker map-view__marker--stop" ${imgStyle}>
38986
- ${!dest.imageUrl ? `<span class="map-view__marker-number">${stopIndex}</span>` : ''}
38987
- <span class="map-view__marker-badge">${stopIndex}</span>
39257
+ iconHtml = `
39258
+ <div class="map-view__marker map-view__marker--stop" ${imgStyle}>
39259
+ ${!dest.imageUrl ? `<span class="map-view__marker-number">${stopIndex}</span>` : ''}
39260
+ <span class="map-view__marker-badge">${stopIndex}</span>
38988
39261
  </div>`;
38989
39262
  }
38990
39263
  const icon = L.divIcon({