@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
@@ -2,8 +2,8 @@
2
2
  import * as React from 'react';
3
3
  import React__default, { useLayoutEffect as useLayoutEffect$1, useEffect, useContext, useState, useRef, useCallback, useMemo } from 'react';
4
4
  import JsonURL from '@jsonurl/jsonurl';
5
- import { format as format$2, isToday, getDate, startOfWeek, startOfMonth, endOfWeek, addWeeks, endOfMonth, eachDayOfInterval, getYear, getMonth, getISOWeek, getISODay, isSameMonth, startOfDay, isAfter, isSameDay, isEqual, isWithinInterval, endOfDay, isBefore, differenceInCalendarDays, addMonths, addDays, formatISO, addYears, differenceInYears, parseISO, differenceInMinutes, isValid, parse, startOfToday } from 'date-fns';
6
- import { merge, cloneDeep, isNil, isArray as isArray$1, compact, isEmpty as isEmpty$1, range, chunk, isFunction as isFunction$1, clamp, now, omit, isPlainObject as isPlainObject$1, mapValues, pickBy, first, orderBy, uniq, uniqBy, sortBy, sum, last, findIndex as findIndex$1, set, get, isEqual as isEqual$1, groupBy, minBy, concat, flatMap } from 'lodash';
5
+ import { format as format$2, isToday, getDate, startOfWeek, startOfMonth, endOfWeek, addWeeks, endOfMonth, eachDayOfInterval, getYear, getMonth, getISOWeek, getISODay, isSameMonth, startOfDay, isAfter, isSameDay, isEqual, isWithinInterval, endOfDay, isBefore, differenceInCalendarDays, addMonths, addDays, formatISO, addYears, differenceInYears, parseISO, differenceInMinutes, parse, isValid, startOfToday } from 'date-fns';
6
+ import { merge, cloneDeep, isNil, isArray as isArray$1, compact, isEmpty as isEmpty$1, range, chunk, isFunction as isFunction$1, clamp, now, omit, isPlainObject as isPlainObject$1, mapValues, pickBy, first, orderBy, uniq, uniqBy, sortBy, sum, last, findIndex as findIndex$1, get, set, isEqual as isEqual$1, groupBy, minBy, concat, flatMap } from 'lodash';
7
7
  import { arSA, da, de, enGB, es, fr, is, it, nl, nb, pl, pt, sv, ja, enUS } from 'date-fns/locale';
8
8
  import { usePopper } from 'react-popper';
9
9
  import { useSelector, useDispatch, Provider } from 'react-redux';
@@ -182,6 +182,12 @@ var TRAVELERS_FORM$f = {
182
182
  FIRST_NAME: "الاسم الأول",
183
183
  LAST_NAME: "اسم العائلة",
184
184
  BIRTHDATE: "تاريخ الميلاد",
185
+ WEIGHT: "الوزن",
186
+ WEIGHT_UNIT_KG: "kg",
187
+ WEIGHT_UNIT_LB: "lb",
188
+ HEIGHT: "الطول",
189
+ HEIGHT_UNIT_CM: "cm",
190
+ HEIGHT_UNIT_FT_IN: "ft/in",
185
191
  STREET: "الشارع",
186
192
  STREET_PLACEHOLDER: "اسم الشارع",
187
193
  HOUSE_NUMBER: "رقم المنزل",
@@ -629,6 +635,12 @@ var TRAVELERS_FORM$e = {
629
635
  FIRST_NAME: "Fornavn",
630
636
  LAST_NAME: "Efternavn",
631
637
  BIRTHDATE: "Fødselsdato",
638
+ WEIGHT: "Vægt",
639
+ WEIGHT_UNIT_KG: "kg",
640
+ WEIGHT_UNIT_LB: "lb",
641
+ HEIGHT: "Højde",
642
+ HEIGHT_UNIT_CM: "cm",
643
+ HEIGHT_UNIT_FT_IN: "ft/in",
632
644
  STREET: "Gade",
633
645
  STREET_PLACEHOLDER: "Din gade",
634
646
  HOUSE_NUMBER: "Husnummer",
@@ -1076,6 +1088,12 @@ var TRAVELERS_FORM$d = {
1076
1088
  FIRST_NAME: "Vorname",
1077
1089
  LAST_NAME: "Nachname",
1078
1090
  BIRTHDATE: "Geburtsdatum",
1091
+ WEIGHT: "Gewicht",
1092
+ WEIGHT_UNIT_KG: "kg",
1093
+ WEIGHT_UNIT_LB: "lb",
1094
+ HEIGHT: "Größe",
1095
+ HEIGHT_UNIT_CM: "cm",
1096
+ HEIGHT_UNIT_FT_IN: "ft/in",
1079
1097
  STREET: "Straße",
1080
1098
  STREET_PLACEHOLDER: "Ihre Straße",
1081
1099
  HOUSE_NUMBER: "Hausnummer",
@@ -1524,6 +1542,12 @@ var TRAVELERS_FORM$c = {
1524
1542
  FIRST_NAME: "First name",
1525
1543
  LAST_NAME: "Last name",
1526
1544
  BIRTHDATE: "Date of birth",
1545
+ WEIGHT: "Weight",
1546
+ WEIGHT_UNIT_KG: "kg",
1547
+ WEIGHT_UNIT_LB: "lb",
1548
+ HEIGHT: "Height",
1549
+ HEIGHT_UNIT_CM: "cm",
1550
+ HEIGHT_UNIT_FT_IN: "ft/in",
1527
1551
  STREET: "Street",
1528
1552
  STREET_PLACEHOLDER: "Your street",
1529
1553
  HOUSE_NUMBER: "House number",
@@ -1974,6 +1998,12 @@ var TRAVELERS_FORM$b = {
1974
1998
  FIRST_NAME: "Nombre",
1975
1999
  LAST_NAME: "Apellido",
1976
2000
  BIRTHDATE: "Fecha de nacimiento",
2001
+ WEIGHT: "Peso",
2002
+ WEIGHT_UNIT_KG: "kg",
2003
+ WEIGHT_UNIT_LB: "lb",
2004
+ HEIGHT: "Estatura",
2005
+ HEIGHT_UNIT_CM: "cm",
2006
+ HEIGHT_UNIT_FT_IN: "ft/in",
1977
2007
  STREET: "Calle",
1978
2008
  STREET_PLACEHOLDER: "Su calle",
1979
2009
  HOUSE_NUMBER: "Número",
@@ -2422,6 +2452,12 @@ var TRAVELERS_FORM$a = {
2422
2452
  FIRST_NAME: "Prénom",
2423
2453
  LAST_NAME: "Nom",
2424
2454
  BIRTHDATE: "Date de naissance",
2455
+ WEIGHT: "Poids",
2456
+ WEIGHT_UNIT_KG: "kg",
2457
+ WEIGHT_UNIT_LB: "lb",
2458
+ HEIGHT: "Taille",
2459
+ HEIGHT_UNIT_CM: "cm",
2460
+ HEIGHT_UNIT_FT_IN: "ft/in",
2425
2461
  STREET: "Rue",
2426
2462
  STREET_PLACEHOLDER: "Votre rue",
2427
2463
  HOUSE_NUMBER: "N°",
@@ -2872,6 +2908,12 @@ var TRAVELERS_FORM$9 = {
2872
2908
  FIRST_NAME: "Prénom",
2873
2909
  LAST_NAME: "Nom",
2874
2910
  BIRTHDATE: "Date de naissance",
2911
+ WEIGHT: "Poids",
2912
+ WEIGHT_UNIT_KG: "kg",
2913
+ WEIGHT_UNIT_LB: "lb",
2914
+ HEIGHT: "Taille",
2915
+ HEIGHT_UNIT_CM: "cm",
2916
+ HEIGHT_UNIT_FT_IN: "ft/in",
2875
2917
  STREET: "Rue",
2876
2918
  STREET_PLACEHOLDER: "Votre rue",
2877
2919
  HOUSE_NUMBER: "Numéro",
@@ -3319,6 +3361,12 @@ var TRAVELERS_FORM$8 = {
3319
3361
  FIRST_NAME: "Fornafn",
3320
3362
  LAST_NAME: "Eftirnafn",
3321
3363
  BIRTHDATE: "Fæðingardagur",
3364
+ WEIGHT: "Þyngd",
3365
+ WEIGHT_UNIT_KG: "kg",
3366
+ WEIGHT_UNIT_LB: "lb",
3367
+ HEIGHT: "Hæð",
3368
+ HEIGHT_UNIT_CM: "cm",
3369
+ HEIGHT_UNIT_FT_IN: "ft/in",
3322
3370
  STREET: "Gata",
3323
3371
  STREET_PLACEHOLDER: "Gatan þín",
3324
3372
  HOUSE_NUMBER: "Húsnúmer",
@@ -3766,6 +3814,12 @@ var TRAVELERS_FORM$7 = {
3766
3814
  FIRST_NAME: "Nome",
3767
3815
  LAST_NAME: "Cognome",
3768
3816
  BIRTHDATE: "Data di nascita",
3817
+ WEIGHT: "Peso",
3818
+ WEIGHT_UNIT_KG: "kg",
3819
+ WEIGHT_UNIT_LB: "lb",
3820
+ HEIGHT: "Altezza",
3821
+ HEIGHT_UNIT_CM: "cm",
3822
+ HEIGHT_UNIT_FT_IN: "ft/in",
3769
3823
  STREET: "Via",
3770
3824
  STREET_PLACEHOLDER: "La tua via",
3771
3825
  HOUSE_NUMBER: "Numero civico",
@@ -4214,6 +4268,12 @@ var TRAVELERS_FORM$6 = {
4214
4268
  FIRST_NAME: "Voornaam",
4215
4269
  LAST_NAME: "Naam",
4216
4270
  BIRTHDATE: "Geboortedatum",
4271
+ WEIGHT: "Gewicht",
4272
+ WEIGHT_UNIT_KG: "kg",
4273
+ WEIGHT_UNIT_LB: "lb",
4274
+ HEIGHT: "Lengte",
4275
+ HEIGHT_UNIT_CM: "cm",
4276
+ HEIGHT_UNIT_FT_IN: "ft/in",
4217
4277
  STREET: "Straat",
4218
4278
  STREET_PLACEHOLDER: "Jouw straat",
4219
4279
  HOUSE_NUMBER: "Huisnr",
@@ -4664,6 +4724,12 @@ var TRAVELERS_FORM$5 = {
4664
4724
  FIRST_NAME: "Voornaam",
4665
4725
  LAST_NAME: "Achternaam",
4666
4726
  BIRTHDATE: "Geboortedatum",
4727
+ WEIGHT: "Gewicht",
4728
+ WEIGHT_UNIT_KG: "kg",
4729
+ WEIGHT_UNIT_LB: "lb",
4730
+ HEIGHT: "Lengte",
4731
+ HEIGHT_UNIT_CM: "cm",
4732
+ HEIGHT_UNIT_FT_IN: "ft/in",
4667
4733
  STREET: "Straat",
4668
4734
  STREET_PLACEHOLDER: "Uw straat",
4669
4735
  HOUSE_NUMBER: "Huisnummer",
@@ -5111,6 +5177,12 @@ var TRAVELERS_FORM$4 = {
5111
5177
  FIRST_NAME: "Fornavn",
5112
5178
  LAST_NAME: "Etternavn",
5113
5179
  BIRTHDATE: "Fødselsdato",
5180
+ WEIGHT: "Vekt",
5181
+ WEIGHT_UNIT_KG: "kg",
5182
+ WEIGHT_UNIT_LB: "lb",
5183
+ HEIGHT: "Høyde",
5184
+ HEIGHT_UNIT_CM: "cm",
5185
+ HEIGHT_UNIT_FT_IN: "ft/in",
5114
5186
  STREET: "Gate",
5115
5187
  STREET_PLACEHOLDER: "Din gate",
5116
5188
  HOUSE_NUMBER: "Husnummer",
@@ -5558,6 +5630,12 @@ var TRAVELERS_FORM$3 = {
5558
5630
  FIRST_NAME: "Imię",
5559
5631
  LAST_NAME: "Nazwisko",
5560
5632
  BIRTHDATE: "Data urodzenia",
5633
+ WEIGHT: "Waga",
5634
+ WEIGHT_UNIT_KG: "kg",
5635
+ WEIGHT_UNIT_LB: "lb",
5636
+ HEIGHT: "Wzrost",
5637
+ HEIGHT_UNIT_CM: "cm",
5638
+ HEIGHT_UNIT_FT_IN: "ft/in",
5561
5639
  STREET: "Ulica",
5562
5640
  STREET_PLACEHOLDER: "Twoja ulica",
5563
5641
  HOUSE_NUMBER: "Numer domu",
@@ -6005,6 +6083,12 @@ var TRAVELERS_FORM$2 = {
6005
6083
  FIRST_NAME: "Nome",
6006
6084
  LAST_NAME: "Apelido",
6007
6085
  BIRTHDATE: "Data de nascimento",
6086
+ WEIGHT: "Peso",
6087
+ WEIGHT_UNIT_KG: "kg",
6088
+ WEIGHT_UNIT_LB: "lb",
6089
+ HEIGHT: "Altura",
6090
+ HEIGHT_UNIT_CM: "cm",
6091
+ HEIGHT_UNIT_FT_IN: "ft/in",
6008
6092
  STREET: "Rua",
6009
6093
  STREET_PLACEHOLDER: "A sua rua",
6010
6094
  HOUSE_NUMBER: "Número de porta",
@@ -6452,6 +6536,12 @@ var TRAVELERS_FORM$1 = {
6452
6536
  FIRST_NAME: "Förnamn",
6453
6537
  LAST_NAME: "Efternamn",
6454
6538
  BIRTHDATE: "Födelsedatum",
6539
+ WEIGHT: "Vikt",
6540
+ WEIGHT_UNIT_KG: "kg",
6541
+ WEIGHT_UNIT_LB: "lb",
6542
+ HEIGHT: "Längd",
6543
+ HEIGHT_UNIT_CM: "cm",
6544
+ HEIGHT_UNIT_FT_IN: "ft/in",
6455
6545
  STREET: "Gata",
6456
6546
  STREET_PLACEHOLDER: "Din gata",
6457
6547
  HOUSE_NUMBER: "Husnummer",
@@ -6899,6 +6989,12 @@ var TRAVELERS_FORM = {
6899
6989
  FIRST_NAME: "名",
6900
6990
  LAST_NAME: "姓",
6901
6991
  BIRTHDATE: "生年月日",
6992
+ WEIGHT: "体重",
6993
+ WEIGHT_UNIT_KG: "kg",
6994
+ WEIGHT_UNIT_LB: "lb",
6995
+ HEIGHT: "身長",
6996
+ HEIGHT_UNIT_CM: "cm",
6997
+ HEIGHT_UNIT_FT_IN: "ft/in",
6902
6998
  STREET: "住所",
6903
6999
  STREET_PLACEHOLDER: "住所を入力",
6904
7000
  HOUSE_NUMBER: "番地",
@@ -7552,6 +7648,14 @@ exports.AvailabilitySearchType = void 0;
7552
7648
  AvailabilitySearchType[(AvailabilitySearchType["flight"] = 3)] = "flight";
7553
7649
  })(exports.AvailabilitySearchType || (exports.AvailabilitySearchType = {}));
7554
7650
 
7651
+ var CustomFieldDataType = {
7652
+ bool: 0,
7653
+ date: 1,
7654
+ time: 2,
7655
+ string: 3,
7656
+ numeric: 4,
7657
+ };
7658
+
7555
7659
  var DataType = {
7556
7660
  text: "text",
7557
7661
  numeric: "number",
@@ -7567,6 +7671,12 @@ var DataType = {
7567
7671
  template: "template",
7568
7672
  };
7569
7673
 
7674
+ exports.DateAmountType = void 0;
7675
+ (function (DateAmountType) {
7676
+ DateAmountType[(DateAmountType["days"] = 0)] = "days";
7677
+ DateAmountType[(DateAmountType["months"] = 1)] = "months";
7678
+ })(exports.DateAmountType || (exports.DateAmountType = {}));
7679
+
7570
7680
  var DossierType = {
7571
7681
  hotelOnly: 0,
7572
7682
  transportOnly: 1,
@@ -7574,6 +7684,13 @@ var DossierType = {
7574
7684
  package: 3,
7575
7685
  };
7576
7686
 
7687
+ var DurationType = {
7688
+ hours: 0,
7689
+ days: 1,
7690
+ nights: 2,
7691
+ minutes: 3,
7692
+ };
7693
+
7577
7694
  var EntryLineFlag = {
7578
7695
  none: 0,
7579
7696
  allotmentNoPlace: 1,
@@ -7651,6 +7768,11 @@ var Gender = {
7651
7768
  other: 2,
7652
7769
  };
7653
7770
 
7771
+ var HeightType = {
7772
+ centimeters: 0,
7773
+ feetInches: 1,
7774
+ };
7775
+
7654
7776
  exports.MetaDataItemPropertyType = void 0;
7655
7777
  (function (MetaDataItemPropertyType) {
7656
7778
  MetaDataItemPropertyType[(MetaDataItemPropertyType["Height"] = 0)] = "Height";
@@ -7687,6 +7809,22 @@ var PaymentType = {
7687
7809
  cash: 3,
7688
7810
  };
7689
7811
 
7812
+ exports.PortalQsmType = void 0;
7813
+ (function (PortalQsmType) {
7814
+ PortalQsmType[(PortalQsmType["Multidestination"] = 0)] = "Multidestination";
7815
+ PortalQsmType[(PortalQsmType["Accommodation"] = 1)] = "Accommodation";
7816
+ PortalQsmType[(PortalQsmType["AccommodationAndFlight"] = 2)] =
7817
+ "AccommodationAndFlight";
7818
+ PortalQsmType[(PortalQsmType["Flight"] = 3)] = "Flight";
7819
+ PortalQsmType[(PortalQsmType["RoundTrip"] = 4)] = "RoundTrip";
7820
+ PortalQsmType[(PortalQsmType["GroupTour"] = 5)] = "GroupTour";
7821
+ PortalQsmType[(PortalQsmType["Package"] = 6)] = "Package";
7822
+ PortalQsmType[(PortalQsmType["Ticket"] = 7)] = "Ticket";
7823
+ PortalQsmType[(PortalQsmType["Car"] = 8)] = "Car";
7824
+ PortalQsmType[(PortalQsmType["Transfer"] = 9)] = "Transfer";
7825
+ PortalQsmType[(PortalQsmType["Cruise"] = 10)] = "Cruise";
7826
+ })(exports.PortalQsmType || (exports.PortalQsmType = {}));
7827
+
7690
7828
  var PriceChartType = {
7691
7829
  purchasePrices: 0,
7692
7830
  sellingPrices: 1,
@@ -7720,6 +7858,26 @@ var RoomType = {
7720
7858
  pk6: 5,
7721
7859
  };
7722
7860
 
7861
+ var RouteTransportType = {
7862
+ none: 0,
7863
+ privateTransport: 1,
7864
+ publicTransport: 2,
7865
+ rentalCar: 3,
7866
+ bus: 4,
7867
+ camper: 5,
7868
+ car: 6,
7869
+ charter: 7,
7870
+ cruise: 8,
7871
+ ferry: 9,
7872
+ flight: 10,
7873
+ taxi: 11,
7874
+ train: 12,
7875
+ transfer: 13,
7876
+ rocket: 14,
7877
+ walking: 15,
7878
+ cycling: 16,
7879
+ };
7880
+
7723
7881
  var SaleType = {
7724
7882
  ownOrganization: 0,
7725
7883
  resale: 1,
@@ -7759,6 +7917,13 @@ var ServiceType = {
7759
7917
  camp: 30,
7760
7918
  };
7761
7919
 
7920
+ var TrajectNodeType = {
7921
+ regular: 0,
7922
+ connectingNode: 1,
7923
+ poi: 2,
7924
+ subroute: 3,
7925
+ };
7926
+
7762
7927
  exports.UnitOfMeasure = void 0;
7763
7928
  (function (UnitOfMeasure) {
7764
7929
  UnitOfMeasure[(UnitOfMeasure["cm"] = 0)] = "cm";
@@ -7791,60 +7956,9 @@ var VendorType = {
7791
7956
  sunnyCars: 20,
7792
7957
  };
7793
7958
 
7794
- exports.DateAmountType = void 0;
7795
- (function (DateAmountType) {
7796
- DateAmountType[(DateAmountType["days"] = 0)] = "days";
7797
- DateAmountType[(DateAmountType["months"] = 1)] = "months";
7798
- })(exports.DateAmountType || (exports.DateAmountType = {}));
7799
-
7800
- exports.PortalQsmType = void 0;
7801
- (function (PortalQsmType) {
7802
- PortalQsmType[(PortalQsmType["Multidestination"] = 0)] = "Multidestination";
7803
- PortalQsmType[(PortalQsmType["Accommodation"] = 1)] = "Accommodation";
7804
- PortalQsmType[(PortalQsmType["AccommodationAndFlight"] = 2)] =
7805
- "AccommodationAndFlight";
7806
- PortalQsmType[(PortalQsmType["Flight"] = 3)] = "Flight";
7807
- PortalQsmType[(PortalQsmType["RoundTrip"] = 4)] = "RoundTrip";
7808
- PortalQsmType[(PortalQsmType["GroupTour"] = 5)] = "GroupTour";
7809
- PortalQsmType[(PortalQsmType["Package"] = 6)] = "Package";
7810
- PortalQsmType[(PortalQsmType["Ticket"] = 7)] = "Ticket";
7811
- PortalQsmType[(PortalQsmType["Car"] = 8)] = "Car";
7812
- PortalQsmType[(PortalQsmType["Transfer"] = 9)] = "Transfer";
7813
- PortalQsmType[(PortalQsmType["Cruise"] = 10)] = "Cruise";
7814
- })(exports.PortalQsmType || (exports.PortalQsmType = {}));
7815
-
7816
- var TrajectNodeType = {
7817
- regular: 0,
7818
- connectingNode: 1,
7819
- poi: 2,
7820
- subroute: 3,
7821
- };
7822
-
7823
- var DurationType = {
7824
- hours: 0,
7825
- days: 1,
7826
- nights: 2,
7827
- minutes: 3,
7828
- };
7829
-
7830
- var RouteTransportType = {
7831
- none: 0,
7832
- privateTransport: 1,
7833
- publicTransport: 2,
7834
- rentalCar: 3,
7835
- bus: 4,
7836
- camper: 5,
7837
- car: 6,
7838
- charter: 7,
7839
- cruise: 8,
7840
- ferry: 9,
7841
- flight: 10,
7842
- taxi: 11,
7843
- train: 12,
7844
- transfer: 13,
7845
- rocket: 14,
7846
- walking: 15,
7847
- cycling: 16,
7959
+ var WeightType = {
7960
+ kilograms: 0,
7961
+ pounds: 1,
7848
7962
  };
7849
7963
 
7850
7964
  /******************************************************************************
@@ -15196,6 +15310,7 @@ var submitForm = function (config, id, request, signal) {
15196
15310
  };
15197
15311
 
15198
15312
  exports.AllotmentType = AllotmentType;
15313
+ exports.CustomFieldDataType = CustomFieldDataType;
15199
15314
  exports.DataType = DataType;
15200
15315
  exports.DossierType = DossierType;
15201
15316
  exports.DurationType = DurationType;
@@ -15206,6 +15321,7 @@ exports.FormFieldType = FormFieldType;
15206
15321
  exports.FormFieldWidth = FormFieldWidth;
15207
15322
  exports.FormType = FormType;
15208
15323
  exports.Gender = Gender;
15324
+ exports.HeightType = HeightType;
15209
15325
  exports.MetaDataType = MetaDataType;
15210
15326
  exports.PaymentType = PaymentType;
15211
15327
  exports.PriceChartType = PriceChartType;
@@ -15217,6 +15333,7 @@ exports.ServiceTokenError = ServiceTokenError;
15217
15333
  exports.ServiceType = ServiceType;
15218
15334
  exports.TrajectNodeType = TrajectNodeType;
15219
15335
  exports.VendorType = VendorType;
15336
+ exports.WeightType = WeightType;
15220
15337
  exports.agents = agents;
15221
15338
  exports.alternateFlights = alternateFlights;
15222
15339
  exports.alternateHotels = alternateHotels;
@@ -17475,7 +17592,7 @@ const Product = ({ productCode, productName, duration, rating }) => {
17475
17592
  const [hasFlight, setHasFlight] = useState(false);
17476
17593
  const [hasTransfer, setHasTransfer] = useState(false);
17477
17594
  const [rooms, setRooms] = useState([{ adults: 2, children: 0, childAges: [] }]);
17478
- const [searchResponse, setSearchResponse] = useState([]);
17595
+ const [searchResponse, setSearchResponse] = useState();
17479
17596
  const [detailResponse, setDetailResponse] = useState();
17480
17597
  const [dateRange, setDateRange] = useState();
17481
17598
  const [urlDateRange, setUrlDateRange] = useState({ from: null, to: null });
@@ -17613,6 +17730,9 @@ const Product = ({ productCode, productName, duration, rating }) => {
17613
17730
  setPackageProductName(selectedItem.name);
17614
17731
  };
17615
17732
  useEffect(() => {
17733
+ if (searchResponse === undefined) {
17734
+ return;
17735
+ }
17616
17736
  if (searchResponse && !isEmpty$1(searchResponse)) {
17617
17737
  setSearchResults(searchResponse);
17618
17738
  const selectedItem = searchResponse.find((item) => new Date(item.fromDate).getTime() === dateRange?.fromDate?.getTime() && new Date(item.toDate).getTime() === dateRange?.toDate?.getTime());
@@ -18783,6 +18903,7 @@ const selectPackageOptionUnits = (state) => state.booking.package?.options.find(
18783
18903
  const selectPackageOptionPax = (state) => state.booking.package?.options.find((x) => x.isSelected)?.optionPax;
18784
18904
  const selectPackageGroups = (state) => state.booking.package?.options.find((x) => x.isSelected)?.groups;
18785
18905
  const selectPackageDetails = (state) => state.booking.package;
18906
+ const selectPaxCustomFields = (state) => state.booking.package?.paxCustomFields ?? [];
18786
18907
  const selectPackageFlights = (state) => ({
18787
18908
  outward: state.booking.package?.outwardFlights,
18788
18909
  return: state.booking.package?.returnFlights
@@ -19009,7 +19130,12 @@ const buildPax = (traveler, mainBookerId) => {
19009
19130
  lastName: traveler.lastName,
19010
19131
  dateOfBirth: traveler.birthDate,
19011
19132
  age: traveler.birthDate ? null : traveler.age,
19012
- isMainBooker: traveler.id == mainBookerId
19133
+ isMainBooker: traveler.id == mainBookerId,
19134
+ weight: traveler.weight ?? null,
19135
+ weightType: traveler.weightType ?? build.WeightType.kilograms,
19136
+ height: traveler.height ?? null,
19137
+ heightType: traveler.heightType ?? build.HeightType.centimeters,
19138
+ customFields: traveler.customFields ?? []
19013
19139
  };
19014
19140
  };
19015
19141
  const parseGender = (gender) => {
@@ -19519,7 +19645,9 @@ const SettingsContext = React__default.createContext({
19519
19645
  travellers: {
19520
19646
  pathSuffix: '/reizigers',
19521
19647
  travelersFirstStep: false,
19522
- showAllCountries: false
19648
+ showAllCountries: false,
19649
+ showWeightField: false,
19650
+ showHeightField: false
19523
19651
  },
19524
19652
  summary: {
19525
19653
  pathSuffix: '/samenvatting',
@@ -23032,185 +23160,6 @@ const Summary = () => {
23032
23160
  React__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))))));
23033
23161
  };
23034
23162
 
23035
- function isValidEmail(email) {
23036
- return !/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,24}$/i.test(email);
23037
- }
23038
- const NAME_CHARACTERS_REGEX = /^[\p{L}\s-]+$/u;
23039
- function hasInvalidNameCharacters(name) {
23040
- return !NAME_CHARACTERS_REGEX.test(name);
23041
- }
23042
- // Rejects values like a 5-digit year, which the native date input allows while typing
23043
- function isValidBirthDate(birthDateText) {
23044
- return isValid(parse(birthDateText, 'yyyy-MM-dd', new Date()));
23045
- }
23046
- function getAge(birthDateText, startDateText) {
23047
- var birthDate = new Date(birthDateText);
23048
- var startDate = new Date(startDateText);
23049
- var age = startDate.getFullYear() - birthDate.getFullYear();
23050
- var m = startDate.getMonth() - birthDate.getMonth();
23051
- if (m < 0 || (m === 0 && startDate.getDate() < birthDate.getDate())) {
23052
- age--;
23053
- }
23054
- return age;
23055
- }
23056
- const validateForm$1 = (values, agentRequired, bookingType, translations, formFields, mainBookerFormFields, maxChildAge = CHILD_MAX_AGE, maxBabyAge = BABY_MAX_AGE) => {
23057
- const errors = {};
23058
- const isFormFieldPresent = (type) => {
23059
- return formFields?.some((f) => f.type === type) ?? true;
23060
- };
23061
- const isMainBookerFormFieldPresent = (type) => {
23062
- return mainBookerFormFields?.some((f) => f.type === type) ?? true;
23063
- };
23064
- const formatTravelerField = (room, pax, field) => {
23065
- return values.rooms.length > 1
23066
- ? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_FIELD, [room, pax, field])
23067
- : format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_FIELD, [pax, field]);
23068
- };
23069
- const formatTravelerIsNoAdult = (room, pax) => {
23070
- return values.rooms.length > 1
23071
- ? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_IS_NO_ADULT, [room, pax])
23072
- : format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT, [pax]);
23073
- };
23074
- const formatTravelerIsNoChild = (room, pax) => {
23075
- return values.rooms.length > 1
23076
- ? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_IS_NO_CHILD, [room, pax])
23077
- : format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_IS_NO_CHILD, [pax]);
23078
- };
23079
- const formatTravelerIsNoBaby = (room, pax) => {
23080
- // The message states the boundary the traveler has to stay under, so we pass
23081
- // the first age that is too old rather than the inclusive maxBabyAge.
23082
- const tooOldAge = maxBabyAge + 1;
23083
- return values.rooms.length > 1
23084
- ? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_IS_NO_BABY, [room, pax, tooOldAge])
23085
- : format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_IS_NO_BABY, [pax, tooOldAge]);
23086
- };
23087
- const formatTravelerFieldInvalidCharacters = (room, pax, field) => {
23088
- return values.rooms.length > 1
23089
- ? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_FIELD_INVALID_CHARACTERS, [room, pax, field])
23090
- : format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS, [pax, field]);
23091
- };
23092
- values.rooms.forEach((r, rIndex) => r.adults.forEach((adult, index) => {
23093
- if (isEmpty$1(adult.gender) && isFormFieldPresent('gender')) {
23094
- set(errors, `rooms[${rIndex}].adults[${index}].gender`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.GENDER));
23095
- }
23096
- if (isFormFieldPresent('firstName')) {
23097
- if (isEmpty$1(adult.firstName)) {
23098
- set(errors, `rooms[${rIndex}].adults[${index}].firstName`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
23099
- }
23100
- else if (hasInvalidNameCharacters(adult.firstName)) {
23101
- set(errors, `rooms[${rIndex}].adults[${index}].firstName`, formatTravelerFieldInvalidCharacters(rIndex + 1, index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
23102
- }
23103
- }
23104
- if (isFormFieldPresent('lastName')) {
23105
- if (isEmpty$1(adult.lastName)) {
23106
- set(errors, `rooms[${rIndex}].adults[${index}].lastName`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.LAST_NAME));
23107
- }
23108
- else if (hasInvalidNameCharacters(adult.lastName)) {
23109
- set(errors, `rooms[${rIndex}].adults[${index}].lastName`, formatTravelerFieldInvalidCharacters(rIndex + 1, index + 1, translations.TRAVELERS_FORM.LAST_NAME));
23110
- }
23111
- }
23112
- if (isFormFieldPresent('birthDate')) {
23113
- if (isEmpty$1(adult.birthDate) || !isValidBirthDate(adult.birthDate)) {
23114
- set(errors, `rooms[${rIndex}].adults[${index}].birthDate`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.BIRTHDATE));
23115
- }
23116
- else if (values.endDate) {
23117
- // 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
23118
- const age = getAge(adult.birthDate, values.endDate);
23119
- if (age <= maxChildAge) {
23120
- set(errors, `rooms[${rIndex}].adults[${index}].birthDate`, formatTravelerIsNoAdult(rIndex + 1, index + 1));
23121
- }
23122
- }
23123
- }
23124
- }));
23125
- values.rooms.forEach((r, rIndex) => r.children.forEach((child, index) => {
23126
- if (isEmpty$1(child.gender) && isFormFieldPresent('gender')) {
23127
- set(errors, `rooms[${rIndex}].children[${index}].gender`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.GENDER));
23128
- }
23129
- if (isFormFieldPresent('firstName')) {
23130
- if (isEmpty$1(child.firstName)) {
23131
- set(errors, `rooms[${rIndex}].children[${index}].firstName`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
23132
- }
23133
- else if (hasInvalidNameCharacters(child.firstName)) {
23134
- set(errors, `rooms[${rIndex}].children[${index}].firstName`, formatTravelerFieldInvalidCharacters(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
23135
- }
23136
- }
23137
- if (isFormFieldPresent('lastName')) {
23138
- if (isEmpty$1(child.lastName)) {
23139
- set(errors, `rooms[${rIndex}].children[${index}].lastName`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.LAST_NAME));
23140
- }
23141
- else if (hasInvalidNameCharacters(child.lastName)) {
23142
- set(errors, `rooms[${rIndex}].children[${index}].lastName`, formatTravelerFieldInvalidCharacters(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.LAST_NAME));
23143
- }
23144
- }
23145
- if (isFormFieldPresent('birthDate')) {
23146
- if (isEmpty$1(child.birthDate) || !isValidBirthDate(child.birthDate)) {
23147
- set(errors, `rooms[${rIndex}].children[${index}].birthDate`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.BIRTHDATE));
23148
- }
23149
- else if (child.isBaby && values.startDate) {
23150
- // A baby only has to be under the maxBabyAge on departure, so we check the startDate here instead of the endDate (TIDE-3269)
23151
- const age = getAge(child.birthDate, values.startDate);
23152
- if (age > maxBabyAge) {
23153
- set(errors, `rooms[${rIndex}].children[${index}].birthDate`, formatTravelerIsNoBaby(rIndex + 1, r.adults.length + index + 1));
23154
- }
23155
- }
23156
- else if (values.endDate) {
23157
- // You need to be under the maxChildAge until the end of the trip, so we check the endDate here instead of the startDate.
23158
- // Babies land here too when there is no startDate to check them against, so they keep at least the child age check.
23159
- const age = getAge(child.birthDate, values.endDate);
23160
- if (age > maxChildAge) {
23161
- set(errors, `rooms[${rIndex}].children[${index}].birthDate`, formatTravelerIsNoChild(rIndex + 1, r.adults.length + index + 1));
23162
- }
23163
- }
23164
- }
23165
- }));
23166
- if (values.mainBookerId < 0) {
23167
- errors.mainBookerId = translations.TRAVELERS_FORM.VALIDATION.NO_MAIN_BOOKER_SELECTED;
23168
- }
23169
- if (bookingType != 'b2b' || mainBookerFormFields?.length) {
23170
- if (isEmpty$1(values.street) && isMainBookerFormFieldPresent('street')) {
23171
- errors.street = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.STREET]);
23172
- }
23173
- if (isEmpty$1(values.houseNumber) && isMainBookerFormFieldPresent('houseNumber')) {
23174
- errors.houseNumber = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.HOUSE_NUMBER]);
23175
- }
23176
- if (isEmpty$1(values.zipCode) && isMainBookerFormFieldPresent('zipCode')) {
23177
- errors.zipCode = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.ZIPCODE]);
23178
- }
23179
- if (isEmpty$1(values.place) && isMainBookerFormFieldPresent('place')) {
23180
- errors.place = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.CITY]);
23181
- }
23182
- if (isMainBookerFormFieldPresent('email')) {
23183
- if (isEmpty$1(values.email)) {
23184
- errors.email = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.EMAIL]);
23185
- }
23186
- else if (isValidEmail(values.email)) {
23187
- errors.email = translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_EMAIL_IS_INVALID;
23188
- }
23189
- if (isEmpty$1(values.emailConfirmation)) {
23190
- errors.emailConfirmation = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.REPEAT_EMAIL]);
23191
- }
23192
- else if (values.emailConfirmation !== values.email) {
23193
- errors.emailConfirmation = translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_EMAIL_DOES_NOT_MATCH;
23194
- }
23195
- }
23196
- if (isEmpty$1(values.country) && isMainBookerFormFieldPresent('country')) {
23197
- errors.country = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.COUNTRY]);
23198
- }
23199
- if (isEmpty$1(values.phone) && isMainBookerFormFieldPresent('phone')) {
23200
- errors.phone = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.PHONE]);
23201
- }
23202
- }
23203
- else {
23204
- if (isEmpty$1(values.phone)) {
23205
- errors.phone = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.PHONE]);
23206
- }
23207
- }
23208
- if (agentRequired && !values.travelAgentId) {
23209
- errors.travelAgentId = translations.TRAVELERS_FORM.VALIDATION.AGENT_IS_REQUIRED;
23210
- }
23211
- return errors;
23212
- };
23213
-
23214
23163
  const LabeledInput = ({ name, type, required, value, defaultValue, min, max, label, placeholder, extraClassName, hasError, onChange, onBlur }) => {
23215
23164
  return (React__default.createElement("label", { className: buildClassName(['form__group', extraClassName, hasError && 'form__group--error']) },
23216
23165
  React__default.createElement("span", { className: "form__label" }, compact([label, required && '*']).join(' ')),
@@ -23375,7 +23324,33 @@ function formatBirthDate$1(birthDate) {
23375
23324
  const parsed = parse(birthDate, 'yyyy-MM-dd', new Date());
23376
23325
  return isValid(parsed) ? format$2(parsed, 'dd-MM-yyyy') : '';
23377
23326
  }
23378
- function createTraveler(traveler, followNumber, personTranslation, isCompact, maxBabyAge) {
23327
+ // A customFieldConfigurationId can have separate "main-booker"/other-pax variants; resolved per traveler below.
23328
+ const MAIN_BOOKER_GROUP = 'main-booker';
23329
+ function buildEmptyCustomFields(paxCustomFields = []) {
23330
+ const uniqueIds = Array.from(new Set(paxCustomFields.map((field) => field.customFieldConfigurationId)));
23331
+ return uniqueIds.map((customFieldConfigurationId) => ({ customFieldConfigurationId, value: '' }));
23332
+ }
23333
+ function getApplicablePaxCustomFields(paxCustomFields = [], isMainBooker) {
23334
+ const variantsById = new Map();
23335
+ paxCustomFields.forEach((field) => {
23336
+ const variants = variantsById.get(field.customFieldConfigurationId) ?? [];
23337
+ variants.push(field);
23338
+ variantsById.set(field.customFieldConfigurationId, variants);
23339
+ });
23340
+ const applicableFields = [];
23341
+ variantsById.forEach((variants) => {
23342
+ const hasRoleSplit = variants.some((v) => v.group === MAIN_BOOKER_GROUP);
23343
+ if (!hasRoleSplit) {
23344
+ applicableFields.push(variants[0]);
23345
+ return;
23346
+ }
23347
+ const roleMatch = variants.find((v) => (v.group === MAIN_BOOKER_GROUP) === isMainBooker);
23348
+ if (roleMatch)
23349
+ applicableFields.push(roleMatch);
23350
+ });
23351
+ return applicableFields;
23352
+ }
23353
+ function createTraveler(traveler, followNumber, personTranslation, isCompact, maxBabyAge, paxCustomFields) {
23379
23354
  if (isCompact) {
23380
23355
  return {
23381
23356
  id: traveler.id,
@@ -23387,9 +23362,14 @@ function createTraveler(traveler, followNumber, personTranslation, isCompact, ma
23387
23362
  // old, while still falling back for a missing or unusable age. `??` alone would let a
23388
23363
  // NaN (unparseable date of birth upstream) reach the age input and the booked pax.
23389
23364
  // See TIDE-3269.
23390
- age: Number.isFinite(traveler.age) ? traveler.age : 30
23365
+ age: Number.isFinite(traveler.age) ? traveler.age : 30,
23391
23366
  // No isBaby here on purpose: the age below is editable and nothing revalidates it
23392
23367
  // in compact mode, so a stored flag would end up contradicting the entered age.
23368
+ weight: null,
23369
+ weightType: build.WeightType.kilograms,
23370
+ height: null,
23371
+ heightType: build.HeightType.centimeters,
23372
+ customFields: buildEmptyCustomFields(paxCustomFields)
23393
23373
  };
23394
23374
  }
23395
23375
  return {
@@ -23398,17 +23378,22 @@ function createTraveler(traveler, followNumber, personTranslation, isCompact, ma
23398
23378
  lastName: '',
23399
23379
  birthDate: '',
23400
23380
  gender: '',
23401
- isBaby: isBabyAge(traveler.age, maxBabyAge)
23381
+ isBaby: isBabyAge(traveler.age, maxBabyAge),
23382
+ weight: null,
23383
+ weightType: build.WeightType.kilograms,
23384
+ height: null,
23385
+ heightType: build.HeightType.centimeters,
23386
+ customFields: buildEmptyCustomFields(paxCustomFields)
23402
23387
  };
23403
23388
  }
23404
- function createInitialValuesFromRooms(formRooms, startDate, endDate, agentAdressId, personTranslation, isCompact, maxBabyAge) {
23389
+ function createInitialValuesFromRooms(formRooms, startDate, endDate, agentAdressId, personTranslation, isCompact, maxBabyAge, paxCustomFields) {
23405
23390
  const followNumber = { number: 1 };
23406
23391
  const initialValues = {
23407
23392
  startDate,
23408
23393
  endDate,
23409
23394
  rooms: formRooms.map((room) => ({
23410
- adults: room.adults.map((traveler) => createTraveler(traveler, followNumber, personTranslation, isCompact, maxBabyAge)),
23411
- children: room.children.map((traveler) => createTraveler(traveler, followNumber, personTranslation, isCompact, maxBabyAge))
23395
+ adults: room.adults.map((traveler) => createTraveler(traveler, followNumber, personTranslation, isCompact, maxBabyAge, paxCustomFields)),
23396
+ children: room.children.map((traveler) => createTraveler(traveler, followNumber, personTranslation, isCompact, maxBabyAge, paxCustomFields))
23412
23397
  })),
23413
23398
  mainBookerId: -1,
23414
23399
  street: '',
@@ -23502,7 +23487,7 @@ function applyTravelersFormValuesToEditablePackagingEntry(editablePackagingEntry
23502
23487
  }
23503
23488
  };
23504
23489
  }
23505
- const SharedTravelersForm = ({ formik, translations, travellersSettings, countries, agents, bookingType, agentAdressId, travelersFirstStep = false, isUnavailable = false, useCompactForm = false, showAllCountries = false, showAgentSelection = false, initialShowAgents = false, renderPreviousButton, onBookingTypeChange }) => {
23490
+ 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 }) => {
23506
23491
  const [showAgents, setShowAgents] = useState(initialShowAgents);
23507
23492
  const typeaheadAgents = useMemo(() => sortBy(agents?.map((agent) => ({
23508
23493
  key: `${agent.id}`,
@@ -23555,7 +23540,18 @@ const SharedTravelersForm = ({ formik, translations, travellersSettings, countri
23555
23540
  };
23556
23541
  const handleAddTraveler = (roomIndex) => {
23557
23542
  const rooms = [...formik.values.rooms];
23558
- const newAdult = { id: Date.now(), firstName: '', lastName: '', birthDate: '', gender: '' };
23543
+ const newAdult = {
23544
+ id: Date.now(),
23545
+ firstName: '',
23546
+ lastName: '',
23547
+ birthDate: '',
23548
+ gender: '',
23549
+ weight: null,
23550
+ weightType: build.WeightType.kilograms,
23551
+ height: null,
23552
+ heightType: build.HeightType.centimeters,
23553
+ customFields: buildEmptyCustomFields(paxCustomFields)
23554
+ };
23559
23555
  rooms[roomIndex] = { ...rooms[roomIndex], adults: [...rooms[roomIndex].adults, newAdult] };
23560
23556
  formik.setFieldValue('rooms', rooms);
23561
23557
  };
@@ -23570,7 +23566,23 @@ const SharedTravelersForm = ({ formik, translations, travellersSettings, countri
23570
23566
  };
23571
23567
  const handleAddRoom = () => {
23572
23568
  const rooms = [...formik.values.rooms];
23573
- rooms.push({ adults: [{ id: Date.now(), firstName: '', lastName: '', birthDate: '', gender: '' }], children: [] });
23569
+ rooms.push({
23570
+ adults: [
23571
+ {
23572
+ id: Date.now(),
23573
+ firstName: '',
23574
+ lastName: '',
23575
+ birthDate: '',
23576
+ gender: '',
23577
+ weight: null,
23578
+ weightType: build.WeightType.kilograms,
23579
+ height: null,
23580
+ heightType: build.HeightType.centimeters,
23581
+ customFields: buildEmptyCustomFields(paxCustomFields)
23582
+ }
23583
+ ],
23584
+ children: []
23585
+ });
23574
23586
  formik.setFieldValue('rooms', rooms);
23575
23587
  };
23576
23588
  const handleRemoveRoom = (roomIndex) => {
@@ -23589,6 +23601,54 @@ const SharedTravelersForm = ({ formik, translations, travellersSettings, countri
23589
23601
  React__default.createElement("label", { className: "radiobutton__label" },
23590
23602
  React__default.createElement("input", { type: "radio", className: "radiobutton__input", name: name, onChange: formik.handleChange, onBlur: formik.handleBlur, value: gender, checked: value.gender === gender }),
23591
23603
  label)))))));
23604
+ const renderWeightControl = (namePrefix, value) => (React__default.createElement("div", { className: "form__row" },
23605
+ React__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 ?? '' }),
23606
+ React__default.createElement(LabeledSelect, { extraClassName: "form__group--md-33", name: `${namePrefix}.weightType`, onChange: formik.handleChange, onBlur: formik.handleBlur, value: value.weightType, options: [
23607
+ { key: 'kg', value: build.WeightType.kilograms, label: translations.TRAVELERS_FORM.WEIGHT_UNIT_KG },
23608
+ { key: 'lb', value: build.WeightType.pounds, label: translations.TRAVELERS_FORM.WEIGHT_UNIT_LB }
23609
+ ] })));
23610
+ const renderHeightControl = (namePrefix, value) => (React__default.createElement("div", { className: "form__row" },
23611
+ React__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 ?? '' }),
23612
+ React__default.createElement(LabeledSelect, { extraClassName: "form__group--md-33", name: `${namePrefix}.heightType`, onChange: formik.handleChange, onBlur: formik.handleBlur, value: value.heightType, options: [
23613
+ { key: 'cm', value: build.HeightType.centimeters, label: translations.TRAVELERS_FORM.HEIGHT_UNIT_CM },
23614
+ { key: 'ftIn', value: build.HeightType.feetInches, label: translations.TRAVELERS_FORM.HEIGHT_UNIT_FT_IN }
23615
+ ] })));
23616
+ const getCustomFieldControl = (field, value, name) => {
23617
+ const label = compact([field.fieldName, field.isRequired && '*']).join(' ');
23618
+ switch (field.dataType) {
23619
+ case build.CustomFieldDataType.bool:
23620
+ return (React__default.createElement("div", { className: buildClassName(['form__group', hasVisibleError(name) && 'form__group--error']) },
23621
+ React__default.createElement("div", { className: "checkbox" },
23622
+ React__default.createElement("label", { className: "checkbox__label" },
23623
+ React__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 }),
23624
+ label))));
23625
+ case build.CustomFieldDataType.date:
23626
+ return (React__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 }));
23627
+ case build.CustomFieldDataType.time:
23628
+ return (React__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 }));
23629
+ case build.CustomFieldDataType.numeric:
23630
+ return (React__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 }));
23631
+ case build.CustomFieldDataType.string:
23632
+ default:
23633
+ return (React__default.createElement(LabeledInput, { hasError: hasVisibleError(name), label: label, name: name, onChange: (e) => formik.setFieldValue(name, e.target.value), onBlur: formik.handleBlur, value: value }));
23634
+ }
23635
+ };
23636
+ const renderCustomFields = (travelerValues, namePrefix) => {
23637
+ if (!paxCustomFields?.length)
23638
+ return null;
23639
+ const isMainBooker = travelerValues.id === formik.values.mainBookerId;
23640
+ const applicableFields = getApplicablePaxCustomFields(paxCustomFields, isMainBooker);
23641
+ if (!applicableFields.length)
23642
+ return null;
23643
+ return (React__default.createElement("div", { className: "travelers-form__custom-fields-grid" }, applicableFields.map((field) => {
23644
+ const fieldIndex = travelerValues.customFields?.findIndex((c) => c.customFieldConfigurationId === field.customFieldConfigurationId) ?? -1;
23645
+ if (fieldIndex < 0)
23646
+ return null;
23647
+ const name = `${namePrefix}.customFields[${fieldIndex}].value`;
23648
+ const value = travelerValues.customFields[fieldIndex].value;
23649
+ return (React__default.createElement("div", { key: field.customFieldConfigurationId, style: { gridColumn: `span ${field.col || 12}` } }, getCustomFieldControl(field, value, name)));
23650
+ })));
23651
+ };
23592
23652
  const getControl = (type, value, name) => {
23593
23653
  switch (type) {
23594
23654
  case 'gender':
@@ -23636,7 +23696,11 @@ const SharedTravelersForm = ({ formik, translations, travellersSettings, countri
23636
23696
  React__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 })));
23637
23697
  }
23638
23698
  if (travellersSettings?.formFields?.length) {
23639
- return (React__default.createElement("div", { className: "travelers-form__grid" }, travellersSettings.formFields.map((field, index) => (React__default.createElement("div", { key: index, className: `control control--${field.type}` }, getControl(field.type, travelerValues, `${namePrefix}.${field.type}`))))));
23699
+ return (React__default.createElement(React__default.Fragment, null,
23700
+ React__default.createElement("div", { className: "travelers-form__grid" }, travellersSettings.formFields.map((field, index) => (React__default.createElement("div", { key: index, className: `control control--${field.type}` }, getControl(field.type, travelerValues, `${namePrefix}.${field.type}`))))),
23701
+ showWeightField && renderWeightControl(namePrefix, travelerValues),
23702
+ showHeightField && renderHeightControl(namePrefix, travelerValues),
23703
+ renderCustomFields(travelerValues, namePrefix)));
23640
23704
  }
23641
23705
  return (React__default.createElement(React__default.Fragment, null,
23642
23706
  React__default.createElement("div", { className: "form__row" }, renderGenderControl(`${namePrefix}.gender`, travelerValues)),
@@ -23644,6 +23708,9 @@ const SharedTravelersForm = ({ formik, translations, travellersSettings, countri
23644
23708
  React__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 }),
23645
23709
  React__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 }),
23646
23710
  React__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 })),
23711
+ showWeightField && renderWeightControl(namePrefix, travelerValues),
23712
+ showHeightField && renderHeightControl(namePrefix, travelerValues),
23713
+ renderCustomFields(travelerValues, namePrefix),
23647
23714
  travelersFirstStep && isAdult && formik.values.rooms[roomIndex].adults.length > 1 && (React__default.createElement("button", { type: "button", className: "cta cta--secondary", onClick: () => handleRemoveTraveler(roomIndex, travelerIndex) }, translations.TRAVELERS_FORM.REMOVE_TRAVELER))));
23648
23715
  };
23649
23716
  return (React__default.createElement("form", { className: "form form__travelers", name: "booking--travellers", id: "booking--travellers", noValidate: true, onSubmit: formik.handleSubmit, onReset: formik.handleReset },
@@ -23725,6 +23792,199 @@ const SharedTravelersForm = ({ formik, translations, travellersSettings, countri
23725
23792
  React__default.createElement("button", { type: "submit", title: translations.STEPS.NEXT, className: 'cta' + (isUnavailable ? ' cta--disabled' : '') }, translations.STEPS.NEXT))));
23726
23793
  };
23727
23794
 
23795
+ function isValidEmail(email) {
23796
+ return !/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,24}$/i.test(email);
23797
+ }
23798
+ const NAME_CHARACTERS_REGEX = /^[\p{L}\s-]+$/u;
23799
+ function hasInvalidNameCharacters(name) {
23800
+ return !NAME_CHARACTERS_REGEX.test(name);
23801
+ }
23802
+ // Rejects values like a 5-digit year, which the native date input allows while typing
23803
+ function isValidBirthDate(birthDateText) {
23804
+ return isValid(parse(birthDateText, 'yyyy-MM-dd', new Date()));
23805
+ }
23806
+ function getAge(birthDateText, startDateText) {
23807
+ var birthDate = new Date(birthDateText);
23808
+ var startDate = new Date(startDateText);
23809
+ var age = startDate.getFullYear() - birthDate.getFullYear();
23810
+ var m = startDate.getMonth() - birthDate.getMonth();
23811
+ if (m < 0 || (m === 0 && startDate.getDate() < birthDate.getDate())) {
23812
+ age--;
23813
+ }
23814
+ return age;
23815
+ }
23816
+ const validateForm$1 = (values, agentRequired, bookingType, translations, formFields, mainBookerFormFields, maxChildAge = CHILD_MAX_AGE, maxBabyAge = BABY_MAX_AGE, paxCustomFields = []) => {
23817
+ const errors = {};
23818
+ const isFormFieldPresent = (type) => {
23819
+ return formFields?.some((f) => f.type === type) ?? true;
23820
+ };
23821
+ const isMainBookerFormFieldPresent = (type) => {
23822
+ return mainBookerFormFields?.some((f) => f.type === type) ?? true;
23823
+ };
23824
+ const formatTravelerField = (room, pax, field) => {
23825
+ return values.rooms.length > 1
23826
+ ? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_FIELD, [room, pax, field])
23827
+ : format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_FIELD, [pax, field]);
23828
+ };
23829
+ const formatTravelerIsNoAdult = (room, pax) => {
23830
+ return values.rooms.length > 1
23831
+ ? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_IS_NO_ADULT, [room, pax])
23832
+ : format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT, [pax]);
23833
+ };
23834
+ const formatTravelerIsNoChild = (room, pax) => {
23835
+ return values.rooms.length > 1
23836
+ ? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_IS_NO_CHILD, [room, pax])
23837
+ : format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_IS_NO_CHILD, [pax]);
23838
+ };
23839
+ const formatTravelerIsNoBaby = (room, pax) => {
23840
+ // The message states the boundary the traveler has to stay under, so we pass
23841
+ // the first age that is too old rather than the inclusive maxBabyAge.
23842
+ const tooOldAge = maxBabyAge + 1;
23843
+ return values.rooms.length > 1
23844
+ ? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_IS_NO_BABY, [room, pax, tooOldAge])
23845
+ : format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_IS_NO_BABY, [pax, tooOldAge]);
23846
+ };
23847
+ const formatTravelerFieldInvalidCharacters = (room, pax, field) => {
23848
+ return values.rooms.length > 1
23849
+ ? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_FIELD_INVALID_CHARACTERS, [room, pax, field])
23850
+ : format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS, [pax, field]);
23851
+ };
23852
+ const validateRequiredCustomFields = (traveler, path, room, pax) => {
23853
+ const isMainBooker = traveler.id === values.mainBookerId;
23854
+ const requiredFields = getApplicablePaxCustomFields(paxCustomFields, isMainBooker).filter((f) => f.isRequired);
23855
+ requiredFields.forEach((field) => {
23856
+ const fieldIndex = traveler.customFields?.findIndex((c) => c.customFieldConfigurationId === field.customFieldConfigurationId) ?? -1;
23857
+ if (fieldIndex < 0)
23858
+ return;
23859
+ if (isEmpty$1(traveler.customFields[fieldIndex].value)) {
23860
+ set(errors, `${path}.customFields[${fieldIndex}].value`, formatTravelerField(room, pax, field.fieldName));
23861
+ }
23862
+ });
23863
+ };
23864
+ values.rooms.forEach((r, rIndex) => r.adults.forEach((adult, index) => {
23865
+ if (isEmpty$1(adult.gender) && isFormFieldPresent('gender')) {
23866
+ set(errors, `rooms[${rIndex}].adults[${index}].gender`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.GENDER));
23867
+ }
23868
+ if (isFormFieldPresent('firstName')) {
23869
+ if (isEmpty$1(adult.firstName)) {
23870
+ set(errors, `rooms[${rIndex}].adults[${index}].firstName`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
23871
+ }
23872
+ else if (hasInvalidNameCharacters(adult.firstName)) {
23873
+ set(errors, `rooms[${rIndex}].adults[${index}].firstName`, formatTravelerFieldInvalidCharacters(rIndex + 1, index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
23874
+ }
23875
+ }
23876
+ if (isFormFieldPresent('lastName')) {
23877
+ if (isEmpty$1(adult.lastName)) {
23878
+ set(errors, `rooms[${rIndex}].adults[${index}].lastName`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.LAST_NAME));
23879
+ }
23880
+ else if (hasInvalidNameCharacters(adult.lastName)) {
23881
+ set(errors, `rooms[${rIndex}].adults[${index}].lastName`, formatTravelerFieldInvalidCharacters(rIndex + 1, index + 1, translations.TRAVELERS_FORM.LAST_NAME));
23882
+ }
23883
+ }
23884
+ if (isFormFieldPresent('birthDate')) {
23885
+ if (isEmpty$1(adult.birthDate) || !isValidBirthDate(adult.birthDate)) {
23886
+ set(errors, `rooms[${rIndex}].adults[${index}].birthDate`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.BIRTHDATE));
23887
+ }
23888
+ else if (values.endDate) {
23889
+ // 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
23890
+ const age = getAge(adult.birthDate, values.endDate);
23891
+ if (age <= maxChildAge) {
23892
+ set(errors, `rooms[${rIndex}].adults[${index}].birthDate`, formatTravelerIsNoAdult(rIndex + 1, index + 1));
23893
+ }
23894
+ }
23895
+ }
23896
+ validateRequiredCustomFields(adult, `rooms[${rIndex}].adults[${index}]`, rIndex + 1, index + 1);
23897
+ }));
23898
+ values.rooms.forEach((r, rIndex) => r.children.forEach((child, index) => {
23899
+ if (isEmpty$1(child.gender) && isFormFieldPresent('gender')) {
23900
+ set(errors, `rooms[${rIndex}].children[${index}].gender`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.GENDER));
23901
+ }
23902
+ if (isFormFieldPresent('firstName')) {
23903
+ if (isEmpty$1(child.firstName)) {
23904
+ set(errors, `rooms[${rIndex}].children[${index}].firstName`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
23905
+ }
23906
+ else if (hasInvalidNameCharacters(child.firstName)) {
23907
+ set(errors, `rooms[${rIndex}].children[${index}].firstName`, formatTravelerFieldInvalidCharacters(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
23908
+ }
23909
+ }
23910
+ if (isFormFieldPresent('lastName')) {
23911
+ if (isEmpty$1(child.lastName)) {
23912
+ set(errors, `rooms[${rIndex}].children[${index}].lastName`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.LAST_NAME));
23913
+ }
23914
+ else if (hasInvalidNameCharacters(child.lastName)) {
23915
+ set(errors, `rooms[${rIndex}].children[${index}].lastName`, formatTravelerFieldInvalidCharacters(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.LAST_NAME));
23916
+ }
23917
+ }
23918
+ if (isFormFieldPresent('birthDate')) {
23919
+ if (isEmpty$1(child.birthDate) || !isValidBirthDate(child.birthDate)) {
23920
+ set(errors, `rooms[${rIndex}].children[${index}].birthDate`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.BIRTHDATE));
23921
+ }
23922
+ else if (child.isBaby && values.startDate) {
23923
+ // A baby only has to be under the maxBabyAge on departure, so we check the startDate here instead of the endDate (TIDE-3269)
23924
+ const age = getAge(child.birthDate, values.startDate);
23925
+ if (age > maxBabyAge) {
23926
+ set(errors, `rooms[${rIndex}].children[${index}].birthDate`, formatTravelerIsNoBaby(rIndex + 1, r.adults.length + index + 1));
23927
+ }
23928
+ }
23929
+ else if (values.endDate) {
23930
+ // You need to be under the maxChildAge until the end of the trip, so we check the endDate here instead of the startDate.
23931
+ // Babies land here too when there is no startDate to check them against, so they keep at least the child age check.
23932
+ const age = getAge(child.birthDate, values.endDate);
23933
+ if (age > maxChildAge) {
23934
+ set(errors, `rooms[${rIndex}].children[${index}].birthDate`, formatTravelerIsNoChild(rIndex + 1, r.adults.length + index + 1));
23935
+ }
23936
+ }
23937
+ }
23938
+ validateRequiredCustomFields(child, `rooms[${rIndex}].children[${index}]`, rIndex + 1, r.adults.length + index + 1);
23939
+ }));
23940
+ if (values.mainBookerId < 0) {
23941
+ errors.mainBookerId = translations.TRAVELERS_FORM.VALIDATION.NO_MAIN_BOOKER_SELECTED;
23942
+ }
23943
+ if (bookingType != 'b2b' || mainBookerFormFields?.length) {
23944
+ if (isEmpty$1(values.street) && isMainBookerFormFieldPresent('street')) {
23945
+ errors.street = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.STREET]);
23946
+ }
23947
+ if (isEmpty$1(values.houseNumber) && isMainBookerFormFieldPresent('houseNumber')) {
23948
+ errors.houseNumber = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.HOUSE_NUMBER]);
23949
+ }
23950
+ if (isEmpty$1(values.zipCode) && isMainBookerFormFieldPresent('zipCode')) {
23951
+ errors.zipCode = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.ZIPCODE]);
23952
+ }
23953
+ if (isEmpty$1(values.place) && isMainBookerFormFieldPresent('place')) {
23954
+ errors.place = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.CITY]);
23955
+ }
23956
+ if (isMainBookerFormFieldPresent('email')) {
23957
+ if (isEmpty$1(values.email)) {
23958
+ errors.email = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.EMAIL]);
23959
+ }
23960
+ else if (isValidEmail(values.email)) {
23961
+ errors.email = translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_EMAIL_IS_INVALID;
23962
+ }
23963
+ if (isEmpty$1(values.emailConfirmation)) {
23964
+ errors.emailConfirmation = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.REPEAT_EMAIL]);
23965
+ }
23966
+ else if (values.emailConfirmation !== values.email) {
23967
+ errors.emailConfirmation = translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_EMAIL_DOES_NOT_MATCH;
23968
+ }
23969
+ }
23970
+ if (isEmpty$1(values.country) && isMainBookerFormFieldPresent('country')) {
23971
+ errors.country = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.COUNTRY]);
23972
+ }
23973
+ if (isEmpty$1(values.phone) && isMainBookerFormFieldPresent('phone')) {
23974
+ errors.phone = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.PHONE]);
23975
+ }
23976
+ }
23977
+ else {
23978
+ if (isEmpty$1(values.phone)) {
23979
+ errors.phone = format$1(translations.TRAVELERS_FORM.VALIDATION.MAIN_BOOKER_FIELD, [translations.TRAVELERS_FORM.PHONE]);
23980
+ }
23981
+ }
23982
+ if (agentRequired && !values.travelAgentId) {
23983
+ errors.travelAgentId = translations.TRAVELERS_FORM.VALIDATION.AGENT_IS_REQUIRED;
23984
+ }
23985
+ return errors;
23986
+ };
23987
+
23728
23988
  const TravelersForm = () => {
23729
23989
  const dispatch = useAppDispatch();
23730
23990
  const settings = useContext(SettingsContext);
@@ -23743,12 +24003,15 @@ const TravelersForm = () => {
23743
24003
  const bookingAttributes = useSelector(selectBookingAttributes);
23744
24004
  const hasMounted = useSelector(selectHasMounted);
23745
24005
  const countries = useSelector(selectCountries);
24006
+ const paxCustomFields = useSelector(selectPaxCustomFields);
23746
24007
  const inFlight = useRef(false);
23747
24008
  const pendingRefetch = useRef(false);
23748
24009
  const useCompactForm = !!settings.travellers.compactForm && !!settings.agentAdressId;
23749
24010
  const showAllCountries = !!settings.travellers.showAllCountries;
24011
+ const showWeightField = !!settings.travellers.showWeightField;
24012
+ const showHeightField = !!settings.travellers.showHeightField;
23750
24013
  const initialValues = useSelector(selectTravelersFormValues) ??
23751
- createInitialValuesFromRooms(formRooms, startDate, endDate, agentAdressId, translations.TRAVELERS_FORM.PERSON, useCompactForm, settings.maxBabyAge);
24014
+ createInitialValuesFromRooms(formRooms, startDate, endDate, agentAdressId, translations.TRAVELERS_FORM.PERSON, useCompactForm, settings.maxBabyAge, paxCustomFields);
23752
24015
  const [showAgentSelection, setShowAgentSelection] = useState(!settings.agentAdressId && !settings.hideAgentSelection);
23753
24016
  const formik = useFormik({
23754
24017
  initialValues,
@@ -23758,7 +24021,7 @@ const TravelersForm = () => {
23758
24021
  // The travel dates are captured into initialValues once and then persisted in
23759
24022
  // redux, so validating against the values would use the dates of whichever
23760
24023
  // package option was selected first. Age checks need the current ones.
23761
- { ...values, startDate, endDate }, settings.agentRequired, bookingType, translations, settings.travellers.formFields, settings.travellers.mainBookerFormFields, settings.maxChildAge, settings.maxBabyAge),
24024
+ { ...values, startDate, endDate }, settings.agentRequired, bookingType, translations, settings.travellers.formFields, settings.travellers.mainBookerFormFields, settings.maxChildAge, settings.maxBabyAge, paxCustomFields),
23762
24025
  onSubmit: (values) => {
23763
24026
  dispatch(setFormValues(values));
23764
24027
  if (useCompactForm) {
@@ -23841,7 +24104,7 @@ const TravelersForm = () => {
23841
24104
  dispatch(setFormValues(formValues));
23842
24105
  setShowAgentSelection(false);
23843
24106
  }, [agents, settings.affiliateSlug]);
23844
- return (React__default.createElement(SharedTravelersForm, { formik: formik, 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.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.createElement(Link, { to: `${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.options.pathSuffix}?${bookingQueryString}`, title: translations.STEPS.PREVIOUS, className: "cta cta--secondary" }, translations.STEPS.PREVIOUS)) : null }));
24107
+ return (React__default.createElement(SharedTravelersForm, { formik: formik, 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.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.createElement(Link, { to: `${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.options.pathSuffix}?${bookingQueryString}`, title: translations.STEPS.PREVIOUS, className: "cta cta--secondary" }, translations.STEPS.PREVIOUS)) : null }));
23845
24108
  };
23846
24109
 
23847
24110
  const Booking = ({ productCode, productName, thumbnailUrl }) => {
@@ -27913,7 +28176,12 @@ const mapPackagingPaxToBookingPax = (pax, fallbackId, referenceDate) => ({
27913
28176
  dateOfBirth: pax?.dateOfBirth ?? undefined,
27914
28177
  age: pax?.dateOfBirth ? getAgeAtReferenceDate(pax.dateOfBirth, referenceDate) : undefined,
27915
28178
  isMainBooker: pax?.isMainBooker,
27916
- email: ''
28179
+ email: '',
28180
+ weight: null,
28181
+ weightType: build.WeightType.kilograms,
28182
+ height: null,
28183
+ heightType: build.HeightType.centimeters,
28184
+ customFields: []
27917
28185
  });
27918
28186
  const getRequestRoomsFromPackagingEntry = (entry) => {
27919
28187
  const accommodationLines = (entry.lines ?? []).filter((line) => line.serviceType === ACCOMMODATION_SERVICE_TYPE && line.pax?.length > 0);
@@ -31855,7 +32123,7 @@ const FlyIn = ({ srpType, isOpen, setIsOpen, className = '', onPanelRef, details
31855
32123
  dispatch(setBookPackagingEntry(true));
31856
32124
  }
31857
32125
  };
31858
- return (React__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' : ''}
32126
+ return (React__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' : ''}
31859
32127
  ${flyInType === 'flight-outward-results' || flyInType === 'flight-return-results' || flyInType === 'traject-flight-results' ? 'flyin--flight' : ''}` },
31860
32128
  React__default.createElement("div", { className: `flyin__panel ${isOpen ? 'flyin__panel--active' : ''}`, ref: panelRef },
31861
32129
  React__default.createElement("div", { className: "flyin__content" },
@@ -33304,7 +33572,12 @@ const getRequestRoomsFromPackagingSegments = (entry, segments) => {
33304
33572
  dateOfBirth: paxSource?.dateOfBirth ?? undefined,
33305
33573
  age: paxSource?.dateOfBirth ? undefined : 30,
33306
33574
  isMainBooker: paxSource?.isMainBooker,
33307
- email: ''
33575
+ email: '',
33576
+ weight: null,
33577
+ weightType: build.WeightType.kilograms,
33578
+ height: null,
33579
+ heightType: build.HeightType.centimeters,
33580
+ customFields: []
33308
33581
  };
33309
33582
  if (!groupedByRoom.has(roomIndexWithinLine)) {
33310
33583
  groupedByRoom.set(roomIndexWithinLine, []);
@@ -33443,20 +33716,20 @@ const buildFlightHtml = (line) => {
33443
33716
  */
33444
33717
  const buildFallbackHtml = (item, line) => {
33445
33718
  const details = [line?.accommodationName, line?.regimeName].filter(Boolean).join(' — ');
33446
- return `
33447
- <div class="itinerary-item__fallback">
33448
- <h3 class="itinerary-item__fallback-title">${escapeHtml(item.title)}</h3>
33449
- ${line ? buildFlightHtml(line) : ''}
33450
- ${details ? `<p class="itinerary-item__fallback-details">${escapeHtml(details)}</p>` : ''}
33451
- </div>
33719
+ return `
33720
+ <div class="itinerary-item__fallback">
33721
+ <h3 class="itinerary-item__fallback-title">${escapeHtml(item.title)}</h3>
33722
+ ${line ? buildFlightHtml(line) : ''}
33723
+ ${details ? `<p class="itinerary-item__fallback-details">${escapeHtml(details)}</p>` : ''}
33724
+ </div>
33452
33725
  `;
33453
33726
  };
33454
33727
  const buildItineraryHtml = (itinerary, translations, lines) => {
33455
33728
  if (!itinerary) {
33456
- return `
33457
- <div class="itinerary-shell">
33458
- <div class="itinerary-empty">Geen reisroute beschikbaar.</div>
33459
- </div>
33729
+ return `
33730
+ <div class="itinerary-shell">
33731
+ <div class="itinerary-empty">Geen reisroute beschikbaar.</div>
33732
+ </div>
33460
33733
  `;
33461
33734
  }
33462
33735
  const allNodes = itinerary.nodes ?? [];
@@ -33470,70 +33743,70 @@ const buildItineraryHtml = (itinerary, translations, lines) => {
33470
33743
  const hasAccommodationInCurrentNode = uniqueItems.some(isAccommodationItem);
33471
33744
  const activeAccommodation = findAccommodationForDay(allNodes, startDay);
33472
33745
  const accommodationBanner = !hasAccommodationInCurrentNode && activeAccommodation
33473
- ? `
33474
- <div class="itinerary-node__accommodation-banner">
33475
- Accommodatie voor deze dag: <strong>${escapeHtml(getAccommodationName(activeAccommodation))}</strong>
33476
- </div>
33746
+ ? `
33747
+ <div class="itinerary-node__accommodation-banner">
33748
+ Accommodatie voor deze dag: <strong>${escapeHtml(getAccommodationName(activeAccommodation))}</strong>
33749
+ </div>
33477
33750
  `
33478
33751
  : '';
33479
33752
  const itemsHtml = hasItems
33480
33753
  ? uniqueItems
33481
- .map((item) => `
33482
- <article class="itinerary-item" data-template="${escapeHtml(item.templateName)}">
33754
+ .map((item) => `
33755
+ <article class="itinerary-item" data-template="${escapeHtml(item.templateName)}">
33483
33756
  ${hasVisibleContent(item.contents)
33484
33757
  ? item.contents
33485
- : buildFallbackHtml(item, lines.find((line) => line.guid === item.itemGuid))}
33486
- </article>
33758
+ : buildFallbackHtml(item, lines.find((line) => line.guid === item.itemGuid))}
33759
+ </article>
33487
33760
  `)
33488
33761
  .join('')
33489
33762
  : `<div class="itinerary-node__empty">${translations.ITINERARY.NO_ITEMS}</div>`;
33490
- return `
33491
- <section class="itinerary-node">
33492
- <header class="itinerary-node__header">
33493
-
33494
- <div class="itinerary-node__day">
33495
- <p class="itinerary-node__day-day">${day}</p>
33496
- <p class="itinerary-node__day-month">${month}</p>
33497
- </div>
33498
-
33499
- <div>
33500
- <h2 class="itinerary-node__title">${escapeHtml(node.title)}</h2>
33501
- </div>
33502
- </header>
33503
-
33504
- <div class="itinerary-node__content">
33505
- ${accommodationBanner}
33506
- ${itemsHtml}
33507
- </div>
33508
- </section>
33763
+ return `
33764
+ <section class="itinerary-node">
33765
+ <header class="itinerary-node__header">
33766
+
33767
+ <div class="itinerary-node__day">
33768
+ <p class="itinerary-node__day-day">${day}</p>
33769
+ <p class="itinerary-node__day-month">${month}</p>
33770
+ </div>
33771
+
33772
+ <div>
33773
+ <h2 class="itinerary-node__title">${escapeHtml(node.title)}</h2>
33774
+ </div>
33775
+ </header>
33776
+
33777
+ <div class="itinerary-node__content">
33778
+ ${accommodationBanner}
33779
+ ${itemsHtml}
33780
+ </div>
33781
+ </section>
33509
33782
  `;
33510
33783
  })
33511
33784
  .join('');
33512
33785
  const defaultItemsHtml = itinerary.defaultItems && itinerary.defaultItems.length > 0
33513
- ? `
33514
- <section class="itinerary-default-items">
33515
- <h2 class="itinerary-default-items__title">Algemene info</h2>
33786
+ ? `
33787
+ <section class="itinerary-default-items">
33788
+ <h2 class="itinerary-default-items__title">Algemene info</h2>
33516
33789
  ${getUniqueItems(itinerary.defaultItems)
33517
- .map((item) => `
33518
- <article class="itinerary-item" data-template="${escapeHtml(item.templateName)}">
33790
+ .map((item) => `
33791
+ <article class="itinerary-item" data-template="${escapeHtml(item.templateName)}">
33519
33792
  ${hasVisibleContent(item.contents)
33520
33793
  ? item.contents
33521
- : buildFallbackHtml(item, lines.find((line) => line.guid === item.itemGuid))}
33522
- </article>
33794
+ : buildFallbackHtml(item, lines.find((line) => line.guid === item.itemGuid))}
33795
+ </article>
33523
33796
  `)
33524
- .join('')}
33525
- </section>
33797
+ .join('')}
33798
+ </section>
33526
33799
  `
33527
33800
  : '';
33528
- return `
33529
- <div class="itinerary-shell">
33530
- ${itinerary.title ? `<header class="itinerary-shell__header"><h1 class="itinerary-shell__title">${escapeHtml(itinerary.title)}</h1></header>` : ''}
33531
-
33532
- <div class="itinerary-shell__content">
33533
- ${nodesHtml}
33534
- ${defaultItemsHtml}
33535
- </div>
33536
- </div>
33801
+ return `
33802
+ <div class="itinerary-shell">
33803
+ ${itinerary.title ? `<header class="itinerary-shell__header"><h1 class="itinerary-shell__title">${escapeHtml(itinerary.title)}</h1></header>` : ''}
33804
+
33805
+ <div class="itinerary-shell__content">
33806
+ ${nodesHtml}
33807
+ ${defaultItemsHtml}
33808
+ </div>
33809
+ </div>
33537
33810
  `;
33538
33811
  };
33539
33812
  const FullItinerary = ({ isLoading }) => {
@@ -33555,170 +33828,170 @@ const FullItinerary = ({ isLoading }) => {
33555
33828
  }
33556
33829
  const shadowRoot = host.shadowRoot ?? host.attachShadow({ mode: 'open' });
33557
33830
  shadowRootRef.current = shadowRoot;
33558
- shadowRoot.innerHTML = `
33559
- <style>
33560
- :host {
33561
- all: initial;
33562
- display: block;
33563
- width: 100%;
33564
- }
33565
-
33566
- *,
33567
- *::before,
33568
- *::after {
33569
- box-sizing: border-box;
33570
- }
33571
-
33572
- .itinerary-shell {
33573
- width: 100%;
33574
- margin: 0 auto;
33575
- font-family: 'Outfit', sans-serif;
33576
- color: #222;
33577
- }
33578
-
33579
- .itinerary-shell__header {
33580
- margin-bottom: 24px;
33581
- }
33582
-
33583
- .itinerary-shell__title {
33584
- margin: 0;
33585
- font-size: 32px;
33586
- line-height: 1.2;
33587
- }
33588
-
33589
- .itinerary-shell__content {
33590
- display: grid;
33591
- gap: 24px;
33592
- }
33593
-
33594
- .itinerary-node {
33595
- border: 1px solid #e5e7eb;
33596
- border-radius: 16px;
33597
- overflow: hidden;
33598
- background: #fff;
33599
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
33600
- }
33601
-
33602
- .itinerary-node__header {
33603
- display: flex;
33604
- gap: 16px;
33605
- align-items: center;
33606
- border-bottom: 1px solid #eef0f2;
33607
- background: #fafafa;
33608
- }
33609
-
33610
- .itinerary-node__day {
33611
- flex: 50px 0 0;
33612
- display: flex;
33613
- flex-flow: column;
33614
- align-items: center;
33615
- justify-content: center;
33616
- background: #1f9470;
33617
- color: white;
33618
- border: 1.5px solid var(--tide-booking-color-secondary);
33619
- }
33620
-
33621
- .itinerary-node__day-month {
33622
- margin: 0px;
33623
- }
33624
-
33625
- .itinerary-node__day-day {
33626
- margin: 0px;
33627
- font-weight: var(--tide-booking-search-results-label-date-month-font-weight);
33628
- color: var(--tide-booking-search-results-label-date-month-color);
33629
- font-size: 24px;
33630
- }
33631
-
33632
- .itinerary-node__title {
33633
- margin: 0;
33634
- font-size: 22px;
33635
- line-height: 1.25;
33636
- }
33637
-
33638
- .itinerary-node__content {
33639
- display: grid;
33640
- gap: 20px;
33641
- padding: 20px;
33642
- }
33643
-
33644
- .itinerary-node__accommodation-banner {
33645
- padding: 12px 16px;
33646
- border: 1px solid #dbeafe;
33647
- border-radius: 12px;
33648
- background: #eff6ff;
33649
- color: #1e3a8a;
33650
- font-size: 14px;
33651
- line-height: 1.4;
33652
- }
33653
-
33654
- .itinerary-item {
33655
- display: block;
33656
- border-radius: 12px;
33657
- overflow: hidden;
33658
- background: #fff;
33659
- }
33660
-
33661
- /* An item whose template has no content view of its own still has to read as a service. */
33662
- .itinerary-item__fallback {
33663
- padding: 16px 20px;
33664
- border: 1px solid #e5e7eb;
33665
- border-radius: 12px;
33666
- }
33667
-
33668
- .itinerary-item__fallback-title {
33669
- margin: 0;
33670
- font-size: 16px;
33671
- font-weight: 600;
33672
- color: #111827;
33673
- }
33674
-
33675
- .itinerary-item__legs {
33676
- margin: 8px 0 0;
33677
- padding-left: 18px;
33678
- color: #374151;
33679
- }
33680
-
33681
- .itinerary-item__legs li + li {
33682
- margin-top: 4px;
33683
- }
33684
-
33685
- .itinerary-item__fallback-details {
33686
- margin: 8px 0 0;
33687
- color: #6b7280;
33688
- }
33689
-
33690
- .itinerary-node__empty,
33691
- .itinerary-empty {
33692
- padding: 20px;
33693
- border: 1px dashed #d1d5db;
33694
- border-radius: 12px;
33695
- color: #6b7280;
33696
- background: #fafafa;
33697
- }
33698
-
33699
- .itinerary-default-items {
33700
- border: 1px solid #e5e7eb;
33701
- border-radius: 16px;
33702
- padding: 20px;
33703
- background: #fff;
33704
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
33705
- }
33706
-
33707
- .itinerary-default-items__title {
33708
- margin: 0 0 16px;
33709
- font-size: 22px;
33710
- }
33711
-
33712
- @media (max-width: 768px) {
33713
- .itinerary-shell {
33714
- padding: 16px;
33715
- }
33716
- }
33717
-
33718
- ${itinerary?.styleSheetBody ?? ''}
33719
- </style>
33720
-
33721
- ${html}
33831
+ shadowRoot.innerHTML = `
33832
+ <style>
33833
+ :host {
33834
+ all: initial;
33835
+ display: block;
33836
+ width: 100%;
33837
+ }
33838
+
33839
+ *,
33840
+ *::before,
33841
+ *::after {
33842
+ box-sizing: border-box;
33843
+ }
33844
+
33845
+ .itinerary-shell {
33846
+ width: 100%;
33847
+ margin: 0 auto;
33848
+ font-family: 'Outfit', sans-serif;
33849
+ color: #222;
33850
+ }
33851
+
33852
+ .itinerary-shell__header {
33853
+ margin-bottom: 24px;
33854
+ }
33855
+
33856
+ .itinerary-shell__title {
33857
+ margin: 0;
33858
+ font-size: 32px;
33859
+ line-height: 1.2;
33860
+ }
33861
+
33862
+ .itinerary-shell__content {
33863
+ display: grid;
33864
+ gap: 24px;
33865
+ }
33866
+
33867
+ .itinerary-node {
33868
+ border: 1px solid #e5e7eb;
33869
+ border-radius: 16px;
33870
+ overflow: hidden;
33871
+ background: #fff;
33872
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
33873
+ }
33874
+
33875
+ .itinerary-node__header {
33876
+ display: flex;
33877
+ gap: 16px;
33878
+ align-items: center;
33879
+ border-bottom: 1px solid #eef0f2;
33880
+ background: #fafafa;
33881
+ }
33882
+
33883
+ .itinerary-node__day {
33884
+ flex: 50px 0 0;
33885
+ display: flex;
33886
+ flex-flow: column;
33887
+ align-items: center;
33888
+ justify-content: center;
33889
+ background: #1f9470;
33890
+ color: white;
33891
+ border: 1.5px solid var(--tide-booking-color-secondary);
33892
+ }
33893
+
33894
+ .itinerary-node__day-month {
33895
+ margin: 0px;
33896
+ }
33897
+
33898
+ .itinerary-node__day-day {
33899
+ margin: 0px;
33900
+ font-weight: var(--tide-booking-search-results-label-date-month-font-weight);
33901
+ color: var(--tide-booking-search-results-label-date-month-color);
33902
+ font-size: 24px;
33903
+ }
33904
+
33905
+ .itinerary-node__title {
33906
+ margin: 0;
33907
+ font-size: 22px;
33908
+ line-height: 1.25;
33909
+ }
33910
+
33911
+ .itinerary-node__content {
33912
+ display: grid;
33913
+ gap: 20px;
33914
+ padding: 20px;
33915
+ }
33916
+
33917
+ .itinerary-node__accommodation-banner {
33918
+ padding: 12px 16px;
33919
+ border: 1px solid #dbeafe;
33920
+ border-radius: 12px;
33921
+ background: #eff6ff;
33922
+ color: #1e3a8a;
33923
+ font-size: 14px;
33924
+ line-height: 1.4;
33925
+ }
33926
+
33927
+ .itinerary-item {
33928
+ display: block;
33929
+ border-radius: 12px;
33930
+ overflow: hidden;
33931
+ background: #fff;
33932
+ }
33933
+
33934
+ /* An item whose template has no content view of its own still has to read as a service. */
33935
+ .itinerary-item__fallback {
33936
+ padding: 16px 20px;
33937
+ border: 1px solid #e5e7eb;
33938
+ border-radius: 12px;
33939
+ }
33940
+
33941
+ .itinerary-item__fallback-title {
33942
+ margin: 0;
33943
+ font-size: 16px;
33944
+ font-weight: 600;
33945
+ color: #111827;
33946
+ }
33947
+
33948
+ .itinerary-item__legs {
33949
+ margin: 8px 0 0;
33950
+ padding-left: 18px;
33951
+ color: #374151;
33952
+ }
33953
+
33954
+ .itinerary-item__legs li + li {
33955
+ margin-top: 4px;
33956
+ }
33957
+
33958
+ .itinerary-item__fallback-details {
33959
+ margin: 8px 0 0;
33960
+ color: #6b7280;
33961
+ }
33962
+
33963
+ .itinerary-node__empty,
33964
+ .itinerary-empty {
33965
+ padding: 20px;
33966
+ border: 1px dashed #d1d5db;
33967
+ border-radius: 12px;
33968
+ color: #6b7280;
33969
+ background: #fafafa;
33970
+ }
33971
+
33972
+ .itinerary-default-items {
33973
+ border: 1px solid #e5e7eb;
33974
+ border-radius: 16px;
33975
+ padding: 20px;
33976
+ background: #fff;
33977
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
33978
+ }
33979
+
33980
+ .itinerary-default-items__title {
33981
+ margin: 0 0 16px;
33982
+ font-size: 22px;
33983
+ }
33984
+
33985
+ @media (max-width: 768px) {
33986
+ .itinerary-shell {
33987
+ padding: 16px;
33988
+ }
33989
+ }
33990
+
33991
+ ${itinerary?.styleSheetBody ?? ''}
33992
+ </style>
33993
+
33994
+ ${html}
33722
33995
  `;
33723
33996
  }, [html, itinerary?.styleSheetBody, isLoading]);
33724
33997
  return (React__default.createElement(React__default.Fragment, null,
@@ -38942,20 +39215,20 @@ function ItineraryMapView({ destinations: propDestinations, adults = 2, dateFrom
38942
39215
  const isStartEnd = dest.isStart || dest.isEnd;
38943
39216
  let iconHtml;
38944
39217
  if (isStartEnd) {
38945
- iconHtml = `
38946
- <div class="map-view__marker map-view__marker--plane">
38947
- <svg viewBox="0 0 576 512" fill="currentColor" width="16" height="16" xmlns="http://www.w3.org/2000/svg">
38948
- <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"/>
38949
- </svg>
39218
+ iconHtml = `
39219
+ <div class="map-view__marker map-view__marker--plane">
39220
+ <svg viewBox="0 0 576 512" fill="currentColor" width="16" height="16" xmlns="http://www.w3.org/2000/svg">
39221
+ <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"/>
39222
+ </svg>
38950
39223
  </div>`;
38951
39224
  }
38952
39225
  else {
38953
39226
  stopIndex++;
38954
39227
  const imgStyle = dest.imageUrl ? `style="background-image:url('${dest.imageUrl}')"` : '';
38955
- iconHtml = `
38956
- <div class="map-view__marker map-view__marker--stop" ${imgStyle}>
38957
- ${!dest.imageUrl ? `<span class="map-view__marker-number">${stopIndex}</span>` : ''}
38958
- <span class="map-view__marker-badge">${stopIndex}</span>
39228
+ iconHtml = `
39229
+ <div class="map-view__marker map-view__marker--stop" ${imgStyle}>
39230
+ ${!dest.imageUrl ? `<span class="map-view__marker-number">${stopIndex}</span>` : ''}
39231
+ <span class="map-view__marker-badge">${stopIndex}</span>
38959
39232
  </div>`;
38960
39233
  }
38961
39234
  const icon = L.divIcon({