@qite/tide-booking-component 1.4.129 → 1.4.130
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/build-cjs/index.js +87 -21
- package/build/build-cjs/src/shared/booking/shared-sidebar.d.ts +2 -0
- package/build/build-cjs/src/shared/utils/booking-summary.d.ts +1 -1
- package/build/build-esm/index.js +87 -21
- package/build/build-esm/src/shared/booking/shared-sidebar.d.ts +2 -0
- package/build/build-esm/src/shared/utils/booking-summary.d.ts +1 -1
- package/package.json +1 -1
package/build/build-cjs/index.js
CHANGED
|
@@ -237,6 +237,8 @@ var TRAVELERS_FORM$f = {
|
|
|
237
237
|
VALIDATION: {
|
|
238
238
|
TRAVELER_X_FIELD: "الغرفة {0} - المسافر {1}: {2}",
|
|
239
239
|
SINGLE_ROOM_TRAVELER_X_FIELD: "المسافر {0}: {1}",
|
|
240
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "الغرفة {0} - المسافر {1}: {2} يحتوي على أحرف غير صالحة",
|
|
241
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "المسافر {0}: {1} يحتوي على أحرف غير صالحة",
|
|
240
242
|
TRAVELER_X_IS_NO_ADULT: "الغرفة {0} - المسافر {1}: ليس بالغًا",
|
|
241
243
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "المسافر {0}: ليس بالغًا",
|
|
242
244
|
TRAVELER_X_IS_NO_CHILD: "الغرفة {0} - المسافر {1}: ليس طفلًا",
|
|
@@ -669,6 +671,8 @@ var TRAVELERS_FORM$e = {
|
|
|
669
671
|
VALIDATION: {
|
|
670
672
|
TRAVELER_X_FIELD: "Værelse {0} - Rejsende {1}: {2}",
|
|
671
673
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Rejsende {0}: {1}",
|
|
674
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Værelse {0} - Rejsende {1}: {2} indeholder ugyldige tegn",
|
|
675
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Rejsende {0}: {1} indeholder ugyldige tegn",
|
|
672
676
|
TRAVELER_X_IS_NO_ADULT: "Værelse {0} - Rejsende {1}: er ikke voksen",
|
|
673
677
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Rejsende {0}: er ikke voksen",
|
|
674
678
|
TRAVELER_X_IS_NO_CHILD: "Værelse {0} - Rejsende {1}: er ikke barn",
|
|
@@ -1101,6 +1105,8 @@ var TRAVELERS_FORM$d = {
|
|
|
1101
1105
|
VALIDATION: {
|
|
1102
1106
|
TRAVELER_X_FIELD: "Zimmer {0} - Reisender {1}: {2}",
|
|
1103
1107
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Reisender {0}: {1}",
|
|
1108
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Zimmer {0} - Reisender {1}: {2} enthält ungültige Zeichen",
|
|
1109
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Reisender {0}: {1} enthält ungültige Zeichen",
|
|
1104
1110
|
TRAVELER_X_IS_NO_ADULT: "Zimmer {0} - Reisender {1}: ist kein Erwachsener",
|
|
1105
1111
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Reisender {0}: ist kein Erwachsener",
|
|
1106
1112
|
TRAVELER_X_IS_NO_CHILD: "Zimmer {0} - Reisender {1}: ist kein Kind",
|
|
@@ -1537,6 +1543,8 @@ var TRAVELERS_FORM$c = {
|
|
|
1537
1543
|
VALIDATION: {
|
|
1538
1544
|
TRAVELER_X_FIELD: "Room {0} - Traveler {1}: {2}",
|
|
1539
1545
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Traveler {0}: {1}",
|
|
1546
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Room {0} - Traveler {1}: {2} contains invalid characters",
|
|
1547
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Traveler {0}: {1} contains invalid characters",
|
|
1540
1548
|
TRAVELER_X_IS_NO_ADULT: "Room {0} - Traveler {1}: is not an adult",
|
|
1541
1549
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Traveler {0}: is not an adult",
|
|
1542
1550
|
TRAVELER_X_IS_NO_CHILD: "Room {0} - Traveler {1}: is not a child",
|
|
@@ -1969,6 +1977,8 @@ var TRAVELERS_FORM$b = {
|
|
|
1969
1977
|
VALIDATION: {
|
|
1970
1978
|
TRAVELER_X_FIELD: "Habitación {0} - Viajero {1}: {2}",
|
|
1971
1979
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Viajero {0}: {1}",
|
|
1980
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Habitación {0} - Viajero {1}: {2} contiene caracteres no válidos",
|
|
1981
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Viajero {0}: {1} contiene caracteres no válidos",
|
|
1972
1982
|
TRAVELER_X_IS_NO_ADULT: "Habitación {0} - Viajero {1}: no es adulto",
|
|
1973
1983
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Viajero {0}: no es adulto",
|
|
1974
1984
|
TRAVELER_X_IS_NO_CHILD: "Habitación {0} - Viajero {1}: no es niño",
|
|
@@ -2405,6 +2415,8 @@ var TRAVELERS_FORM$a = {
|
|
|
2405
2415
|
VALIDATION: {
|
|
2406
2416
|
TRAVELER_X_FIELD: "Chambre {0} - Voyageur {1} : {2}",
|
|
2407
2417
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Voyageur {0} : {1}",
|
|
2418
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Chambre {0} - Voyageur {1} : {2} contient des caractères non valides",
|
|
2419
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Voyageur {0} : {1} contient des caractères non valides",
|
|
2408
2420
|
TRAVELER_X_IS_NO_ADULT: "Chambre {0} - Voyageur {1} : n'est pas un adulte",
|
|
2409
2421
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Voyageur {0} : n'est pas un adulte",
|
|
2410
2422
|
TRAVELER_X_IS_NO_CHILD: "Chambre {0} - Voyageur {1} : n'est pas un enfant",
|
|
@@ -2837,6 +2849,8 @@ var TRAVELERS_FORM$9 = {
|
|
|
2837
2849
|
VALIDATION: {
|
|
2838
2850
|
TRAVELER_X_FIELD: "Chambre {0} - Voyageur {1} : {2}",
|
|
2839
2851
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Voyageur {0} : {1}",
|
|
2852
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Chambre {0} - Voyageur {1} : {2} contient des caractères non valides",
|
|
2853
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Voyageur {0} : {1} contient des caractères non valides",
|
|
2840
2854
|
TRAVELER_X_IS_NO_ADULT: "Chambre {0} - Voyageur {1} : n'est pas un adulte",
|
|
2841
2855
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Voyageur {0} : n'est pas un adulte",
|
|
2842
2856
|
TRAVELER_X_IS_NO_CHILD: "Chambre {0} - Voyageur {1} : n'est pas un enfant",
|
|
@@ -3269,6 +3283,8 @@ var TRAVELERS_FORM$8 = {
|
|
|
3269
3283
|
VALIDATION: {
|
|
3270
3284
|
TRAVELER_X_FIELD: "Herbergi {0} - Farþegi {1}: {2}",
|
|
3271
3285
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Farþegi {0}: {1}",
|
|
3286
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Herbergi {0} - Farþegi {1}: {2} inniheldur ógild tákn",
|
|
3287
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Farþegi {0}: {1} inniheldur ógild tákn",
|
|
3272
3288
|
TRAVELER_X_IS_NO_ADULT: "Herbergi {0} - Farþegi {1}: er ekki fullorðinn",
|
|
3273
3289
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Farþegi {0}: er ekki fullorðinn",
|
|
3274
3290
|
TRAVELER_X_IS_NO_CHILD: "Herbergi {0} - Farþegi {1}: er ekki barn",
|
|
@@ -3701,6 +3717,8 @@ var TRAVELERS_FORM$7 = {
|
|
|
3701
3717
|
VALIDATION: {
|
|
3702
3718
|
TRAVELER_X_FIELD: "Camera {0} - Viaggiatore {1}: {2}",
|
|
3703
3719
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Viaggiatore {0}: {1}",
|
|
3720
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Camera {0} - Viaggiatore {1}: {2} contiene caratteri non validi",
|
|
3721
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Viaggiatore {0}: {1} contiene caratteri non validi",
|
|
3704
3722
|
TRAVELER_X_IS_NO_ADULT: "Camera {0} - Viaggiatore {1}: non è un adulto",
|
|
3705
3723
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Viaggiatore {0}: non è un adulto",
|
|
3706
3724
|
TRAVELER_X_IS_NO_CHILD: "Camera {0} - Viaggiatore {1}: non è un bambino",
|
|
@@ -4137,6 +4155,8 @@ var TRAVELERS_FORM$6 = {
|
|
|
4137
4155
|
VALIDATION: {
|
|
4138
4156
|
TRAVELER_X_FIELD: "Kamer {0} - Reiziger {1}: {2}",
|
|
4139
4157
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Reiziger {0}: {1}",
|
|
4158
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Kamer {0} - Reiziger {1}: {2} bevat ongeldige tekens",
|
|
4159
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Reiziger {0}: {1} bevat ongeldige tekens",
|
|
4140
4160
|
TRAVELER_X_IS_NO_ADULT: "Kamer {0} - Reiziger {1}: is geen volwassene",
|
|
4141
4161
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Reiziger {0}: is geen volwassene",
|
|
4142
4162
|
TRAVELER_X_IS_NO_CHILD: "Kamer {0} - Reiziger {1}: is geen kind",
|
|
@@ -4569,6 +4589,8 @@ var TRAVELERS_FORM$5 = {
|
|
|
4569
4589
|
VALIDATION: {
|
|
4570
4590
|
TRAVELER_X_FIELD: "Kamer {0} - Reiziger {1}: {2}",
|
|
4571
4591
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Reiziger {0}: {1}",
|
|
4592
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Kamer {0} - Reiziger {1}: {2} bevat ongeldige tekens",
|
|
4593
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Reiziger {0}: {1} bevat ongeldige tekens",
|
|
4572
4594
|
TRAVELER_X_IS_NO_ADULT: "Kamer {0} - Reiziger {1}: is geen volwassene",
|
|
4573
4595
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Reiziger {0}: is geen volwassene",
|
|
4574
4596
|
TRAVELER_X_IS_NO_CHILD: "Kamer {0} - Reiziger {1}: is geen kind",
|
|
@@ -5001,6 +5023,8 @@ var TRAVELERS_FORM$4 = {
|
|
|
5001
5023
|
VALIDATION: {
|
|
5002
5024
|
TRAVELER_X_FIELD: "Rom {0} – Reisende {1}: {2}",
|
|
5003
5025
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Reisende {0}: {1}",
|
|
5026
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Rom {0} – Reisende {1}: {2} inneholder ugyldige tegn",
|
|
5027
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Reisende {0}: {1} inneholder ugyldige tegn",
|
|
5004
5028
|
TRAVELER_X_IS_NO_ADULT: "Rom {0} – Reisende {1}: er ikke voksen",
|
|
5005
5029
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Reisende {0}: er ikke voksen",
|
|
5006
5030
|
TRAVELER_X_IS_NO_CHILD: "Rom {0} – Reisende {1}: er ikke barn",
|
|
@@ -5433,6 +5457,8 @@ var TRAVELERS_FORM$3 = {
|
|
|
5433
5457
|
VALIDATION: {
|
|
5434
5458
|
TRAVELER_X_FIELD: "Pokój {0} – Podróżny {1}: {2}",
|
|
5435
5459
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Podróżny {0}: {1}",
|
|
5460
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Pokój {0} – Podróżny {1}: {2} zawiera nieprawidłowe znaki",
|
|
5461
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Podróżny {0}: {1} zawiera nieprawidłowe znaki",
|
|
5436
5462
|
TRAVELER_X_IS_NO_ADULT: "Pokój {0} – Podróżny {1}: nie jest dorosły",
|
|
5437
5463
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Podróżny {0}: nie jest dorosły",
|
|
5438
5464
|
TRAVELER_X_IS_NO_CHILD: "Pokój {0} – Podróżny {1}: nie jest dzieckiem",
|
|
@@ -5865,6 +5891,8 @@ var TRAVELERS_FORM$2 = {
|
|
|
5865
5891
|
VALIDATION: {
|
|
5866
5892
|
TRAVELER_X_FIELD: "Quarto {0} – Viajante {1}: {2}",
|
|
5867
5893
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Viajante {0}: {1}",
|
|
5894
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Quarto {0} – Viajante {1}: {2} contém caracteres inválidos",
|
|
5895
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Viajante {0}: {1} contém caracteres inválidos",
|
|
5868
5896
|
TRAVELER_X_IS_NO_ADULT: "Quarto {0} – Viajante {1}: não é adulto",
|
|
5869
5897
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Viajante {0}: não é adulto",
|
|
5870
5898
|
TRAVELER_X_IS_NO_CHILD: "Quarto {0} – Viajante {1}: não é criança",
|
|
@@ -6297,6 +6325,8 @@ var TRAVELERS_FORM$1 = {
|
|
|
6297
6325
|
VALIDATION: {
|
|
6298
6326
|
TRAVELER_X_FIELD: "Rum {0} – Resenär {1}: {2}",
|
|
6299
6327
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Resenär {0}: {1}",
|
|
6328
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Rum {0} – Resenär {1}: {2} innehåller ogiltiga tecken",
|
|
6329
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Resenär {0}: {1} innehåller ogiltiga tecken",
|
|
6300
6330
|
TRAVELER_X_IS_NO_ADULT: "Rum {0} – Resenär {1}: är inte vuxen",
|
|
6301
6331
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Resenär {0}: är inte vuxen",
|
|
6302
6332
|
TRAVELER_X_IS_NO_CHILD: "Rum {0} – Resenär {1}: är inte barn",
|
|
@@ -6729,6 +6759,8 @@ var TRAVELERS_FORM = {
|
|
|
6729
6759
|
VALIDATION: {
|
|
6730
6760
|
TRAVELER_X_FIELD: "客室 {0} – 旅行者 {1}: {2}",
|
|
6731
6761
|
SINGLE_ROOM_TRAVELER_X_FIELD: "旅行者 {0}: {1}",
|
|
6762
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "客室 {0} – 旅行者 {1}: {2} に無効な文字が含まれています",
|
|
6763
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "旅行者 {0}: {1} に無効な文字が含まれています",
|
|
6732
6764
|
TRAVELER_X_IS_NO_ADULT: "客室 {0} – 旅行者 {1}: 大人ではありません",
|
|
6733
6765
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "旅行者 {0}: 大人ではありません",
|
|
6734
6766
|
TRAVELER_X_IS_NO_CHILD: "客室 {0} – 旅行者 {1}: 子供ではありません",
|
|
@@ -21354,7 +21386,7 @@ const SidebarFlight = ({ title, flightMetaData, translations }) => {
|
|
|
21354
21386
|
React__default["default"].createElement("div", { className: "pricing-summary__value" }, translations.SIDEBAR.LUGGAGE_INCLUDED)))));
|
|
21355
21387
|
};
|
|
21356
21388
|
|
|
21357
|
-
const SharedSidebar = ({ productName, thumbnailUrl, isLoading, translations, headerComponent, travelerRooms, startDateText, endDateText, loaderComponent, departureFlightMetaData, returnFlightMetaData, accommodations, packagingAccommodations, isOnRequest, includedServiceTypes, basePrice, commission, totalPrice, includedCosts, extraCosts, deposit, basePricePerPaxType, seperateExtraPricePerPaxType, isUnavailable, agent, footerComponent }) => {
|
|
21389
|
+
const SharedSidebar = ({ productName, thumbnailUrl, isLoading, translations, headerComponent, travelerRooms, startDateText, endDateText, loaderComponent, departureFlightMetaData, returnFlightMetaData, accommodations, packagingAccommodations, isOnRequest, includedServiceTypes, basePrice, commission, showCommission, totalPrice, includedCosts, extraCosts, deposit, basePricePerPaxType, seperateExtraPricePerPaxType, isUnavailable, agent, footerComponent, currencyCode = 'EUR' }) => {
|
|
21358
21390
|
if (!translations)
|
|
21359
21391
|
return null;
|
|
21360
21392
|
const [active, setActive] = React.useState(false);
|
|
@@ -21365,8 +21397,6 @@ const SharedSidebar = ({ productName, thumbnailUrl, isLoading, translations, hea
|
|
|
21365
21397
|
const canShowPriceBreakdownSection = Boolean(basePrice && basePrice > 0) || !lodash.isEmpty(includedCosts) || !lodash.isEmpty(extraCosts);
|
|
21366
21398
|
const canShowTotalPriceSection = Boolean(totalPrice && totalPrice > 0);
|
|
21367
21399
|
const remainingAmount = Number(((totalPrice ?? 0) - (deposit ?? 0)).toFixed(2));
|
|
21368
|
-
// TODO: Determine currency code based on the data, for now default to EUR
|
|
21369
|
-
let currencyCode = 'EUR';
|
|
21370
21400
|
return (React__default["default"].createElement("div", { className: buildClassName(['booking__sidebar', active && 'booking__sidebar--active']) },
|
|
21371
21401
|
headerComponent,
|
|
21372
21402
|
React__default["default"].createElement("div", { className: "booking__sidebar-frame" },
|
|
@@ -21496,7 +21526,7 @@ const SharedSidebar = ({ productName, thumbnailUrl, isLoading, translations, hea
|
|
|
21496
21526
|
translations.SIDEBAR.DEPOSIT_TEXT4,
|
|
21497
21527
|
React__default["default"].createElement("strong", null, translations.SIDEBAR.DEPOSIT_TEXT5),
|
|
21498
21528
|
translations.SIDEBAR.DEPOSIT_TEXT6))))) : (React__default["default"].createElement("div", { className: "pricing-summary__group" },
|
|
21499
|
-
agent && (React__default["default"].createElement("div", { className: "pricing-summary__row pricing-summary__row--total-price" },
|
|
21529
|
+
agent && showCommission && (React__default["default"].createElement("div", { className: "pricing-summary__row pricing-summary__row--total-price" },
|
|
21500
21530
|
React__default["default"].createElement("div", { className: "pricing-summary__property" },
|
|
21501
21531
|
React__default["default"].createElement("h6", { className: "pricing-summary__title" }, translations.SIDEBAR.COMMISSION)),
|
|
21502
21532
|
React__default["default"].createElement("div", { className: "pricing-summary__value" },
|
|
@@ -21512,7 +21542,7 @@ const SharedSidebar = ({ productName, thumbnailUrl, isLoading, translations, hea
|
|
|
21512
21542
|
};
|
|
21513
21543
|
|
|
21514
21544
|
const SidebarContainer = ({ productName, thumbnailUrl }) => {
|
|
21515
|
-
const { sidebarHeaderComponent, sidebarFooterComponent, loaderComponent, showPricesPerPaxType, maxChildAge } = React.useContext(SettingsContext);
|
|
21545
|
+
const { sidebarHeaderComponent, sidebarFooterComponent, loaderComponent, showPricesPerPaxType, maxChildAge, showCommission } = React.useContext(SettingsContext);
|
|
21516
21546
|
const bookingAttributes = reactRedux.useSelector(selectBookingAttributes);
|
|
21517
21547
|
const selectFormRooms = React.useMemo(() => makeSelectFormRooms(maxChildAge), [maxChildAge]);
|
|
21518
21548
|
const rooms = reactRedux.useSelector(selectFormRooms);
|
|
@@ -21529,7 +21559,7 @@ const SidebarContainer = ({ productName, thumbnailUrl }) => {
|
|
|
21529
21559
|
const isUnavailable = reactRedux.useSelector(selectIsUnavailable) || false;
|
|
21530
21560
|
const isLoading = isFetchingProductOptions || isFetchingPriceDetails;
|
|
21531
21561
|
const agent = reactRedux.useSelector(selectAgentAdressId);
|
|
21532
|
-
return (React__default["default"].createElement(SharedSidebar, { productName: productName, thumbnailUrl: thumbnailUrl, isLoading: isLoading, startDateText: getDateText(bookingAttributes?.startDate), endDateText: bookingAttributes?.startDate !== bookingAttributes?.endDate ? getDateText(bookingAttributes?.endDate) : undefined, travelerRooms: travelerRooms, departureFlightMetaData: departureFlightMetaData, returnFlightMetaData: returnFlightMetaData, basePrice: reactRedux.useSelector(selectBasePrice), commission: reactRedux.useSelector(selectCommission), totalPrice: reactRedux.useSelector(selectTotalPrice), includedCosts: reactRedux.useSelector(selectSeparatePackagePriceDetails$1), extraCosts: reactRedux.useSelector(selectSeparateExtraPriceDetails), accommodations: accommodations, includedServiceTypes: includedServiceTypes, deposit: reactRedux.useSelector(selectDeposit), isOnRequest: reactRedux.useSelector(selectIsOnRequest), headerComponent: sidebarHeaderComponent ?? undefined, footerComponent: sidebarFooterComponent ?? undefined, loaderComponent: loaderComponent ?? undefined, isUnavailable: isUnavailable, basePricePerPaxType: showPricesPerPaxType ? reactRedux.useSelector(selectBasePricePerPaxType) : undefined, seperateExtraPricePerPaxType: showPricesPerPaxType ? reactRedux.useSelector(selectSeparateExtraPriceDetailsPerPaxType) : undefined, translations: translations, agent: agent }));
|
|
21562
|
+
return (React__default["default"].createElement(SharedSidebar, { productName: productName, thumbnailUrl: thumbnailUrl, isLoading: isLoading, startDateText: getDateText(bookingAttributes?.startDate), endDateText: bookingAttributes?.startDate !== bookingAttributes?.endDate ? getDateText(bookingAttributes?.endDate) : undefined, travelerRooms: travelerRooms, departureFlightMetaData: departureFlightMetaData, returnFlightMetaData: returnFlightMetaData, basePrice: reactRedux.useSelector(selectBasePrice), commission: reactRedux.useSelector(selectCommission), showCommission: showCommission, totalPrice: reactRedux.useSelector(selectTotalPrice), includedCosts: reactRedux.useSelector(selectSeparatePackagePriceDetails$1), extraCosts: reactRedux.useSelector(selectSeparateExtraPriceDetails), accommodations: accommodations, includedServiceTypes: includedServiceTypes, deposit: reactRedux.useSelector(selectDeposit), isOnRequest: reactRedux.useSelector(selectIsOnRequest), headerComponent: sidebarHeaderComponent ?? undefined, footerComponent: sidebarFooterComponent ?? undefined, loaderComponent: loaderComponent ?? undefined, isUnavailable: isUnavailable, basePricePerPaxType: showPricesPerPaxType ? reactRedux.useSelector(selectBasePricePerPaxType) : undefined, seperateExtraPricePerPaxType: showPricesPerPaxType ? reactRedux.useSelector(selectSeparateExtraPriceDetailsPerPaxType) : undefined, translations: translations, agent: agent, currencyCode: reactRedux.useSelector(selectCurrencyCode) }));
|
|
21533
21563
|
};
|
|
21534
21564
|
|
|
21535
21565
|
const SummaryPerPaxOptionGroup = ({ group }) => {
|
|
@@ -21711,7 +21741,7 @@ const Summary = () => {
|
|
|
21711
21741
|
}
|
|
21712
21742
|
else {
|
|
21713
21743
|
const location = window.location;
|
|
21714
|
-
bookRequest.payload.redirectUrl = `${location.protocol}//${location.host}${settings.basePath}?${bookingQueryString}`;
|
|
21744
|
+
bookRequest.payload.redirectUrl = `${location.protocol}//${location.host}${settings.basePath ?? location.pathname}?${bookingQueryString}`;
|
|
21715
21745
|
}
|
|
21716
21746
|
}
|
|
21717
21747
|
}
|
|
@@ -21980,6 +22010,10 @@ const Summary = () => {
|
|
|
21980
22010
|
function isValidEmail(email) {
|
|
21981
22011
|
return !/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,24}$/i.test(email);
|
|
21982
22012
|
}
|
|
22013
|
+
const NAME_CHARACTERS_REGEX = /^[\p{L}\s-]+$/u;
|
|
22014
|
+
function hasInvalidNameCharacters(name) {
|
|
22015
|
+
return !NAME_CHARACTERS_REGEX.test(name);
|
|
22016
|
+
}
|
|
21983
22017
|
function getAge(birthDateText, startDateText) {
|
|
21984
22018
|
var birthDate = new Date(birthDateText);
|
|
21985
22019
|
var startDate = new Date(startDateText);
|
|
@@ -22013,15 +22047,30 @@ const validateForm$1 = (values, agentRequired, bookingType, translations, formFi
|
|
|
22013
22047
|
? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_IS_NO_CHILD, [room, pax])
|
|
22014
22048
|
: format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_IS_NO_CHILD, [pax]);
|
|
22015
22049
|
};
|
|
22050
|
+
const formatTravelerFieldInvalidCharacters = (room, pax, field) => {
|
|
22051
|
+
return values.rooms.length > 1
|
|
22052
|
+
? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_FIELD_INVALID_CHARACTERS, [room, pax, field])
|
|
22053
|
+
: format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS, [pax, field]);
|
|
22054
|
+
};
|
|
22016
22055
|
values.rooms.forEach((r, rIndex) => r.adults.forEach((adult, index) => {
|
|
22017
22056
|
if (lodash.isEmpty(adult.gender) && isFormFieldPresent('gender')) {
|
|
22018
22057
|
lodash.set(errors, `rooms[${rIndex}].adults[${index}].gender`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.GENDER));
|
|
22019
22058
|
}
|
|
22020
|
-
if (
|
|
22021
|
-
lodash.
|
|
22059
|
+
if (isFormFieldPresent('firstName')) {
|
|
22060
|
+
if (lodash.isEmpty(adult.firstName)) {
|
|
22061
|
+
lodash.set(errors, `rooms[${rIndex}].adults[${index}].firstName`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
|
|
22062
|
+
}
|
|
22063
|
+
else if (hasInvalidNameCharacters(adult.firstName)) {
|
|
22064
|
+
lodash.set(errors, `rooms[${rIndex}].adults[${index}].firstName`, formatTravelerFieldInvalidCharacters(rIndex + 1, index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
|
|
22065
|
+
}
|
|
22022
22066
|
}
|
|
22023
|
-
if (
|
|
22024
|
-
lodash.
|
|
22067
|
+
if (isFormFieldPresent('lastName')) {
|
|
22068
|
+
if (lodash.isEmpty(adult.lastName)) {
|
|
22069
|
+
lodash.set(errors, `rooms[${rIndex}].adults[${index}].lastName`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.LAST_NAME));
|
|
22070
|
+
}
|
|
22071
|
+
else if (hasInvalidNameCharacters(adult.lastName)) {
|
|
22072
|
+
lodash.set(errors, `rooms[${rIndex}].adults[${index}].lastName`, formatTravelerFieldInvalidCharacters(rIndex + 1, index + 1, translations.TRAVELERS_FORM.LAST_NAME));
|
|
22073
|
+
}
|
|
22025
22074
|
}
|
|
22026
22075
|
if (isFormFieldPresent('birthDate')) {
|
|
22027
22076
|
if (lodash.isEmpty(adult.birthDate)) {
|
|
@@ -22040,11 +22089,21 @@ const validateForm$1 = (values, agentRequired, bookingType, translations, formFi
|
|
|
22040
22089
|
if (lodash.isEmpty(child.gender) && isFormFieldPresent('gender')) {
|
|
22041
22090
|
lodash.set(errors, `rooms[${rIndex}].children[${index}].gender`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.GENDER));
|
|
22042
22091
|
}
|
|
22043
|
-
if (
|
|
22044
|
-
lodash.
|
|
22092
|
+
if (isFormFieldPresent('firstName')) {
|
|
22093
|
+
if (lodash.isEmpty(child.firstName)) {
|
|
22094
|
+
lodash.set(errors, `children[${index}].firstName`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
|
|
22095
|
+
}
|
|
22096
|
+
else if (hasInvalidNameCharacters(child.firstName)) {
|
|
22097
|
+
lodash.set(errors, `children[${index}].firstName`, formatTravelerFieldInvalidCharacters(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
|
|
22098
|
+
}
|
|
22045
22099
|
}
|
|
22046
|
-
if (
|
|
22047
|
-
lodash.
|
|
22100
|
+
if (isFormFieldPresent('lastName')) {
|
|
22101
|
+
if (lodash.isEmpty(child.lastName)) {
|
|
22102
|
+
lodash.set(errors, `rooms[${rIndex}].children[${index}].lastName`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.LAST_NAME));
|
|
22103
|
+
}
|
|
22104
|
+
else if (hasInvalidNameCharacters(child.lastName)) {
|
|
22105
|
+
lodash.set(errors, `rooms[${rIndex}].children[${index}].lastName`, formatTravelerFieldInvalidCharacters(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.LAST_NAME));
|
|
22106
|
+
}
|
|
22048
22107
|
}
|
|
22049
22108
|
if (isFormFieldPresent('birthDate')) {
|
|
22050
22109
|
if (lodash.isEmpty(child.birthDate)) {
|
|
@@ -22642,7 +22701,12 @@ const TravelersForm = () => {
|
|
|
22642
22701
|
navigate(`${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.summary.pathSuffix}?${bookingQueryString}`);
|
|
22643
22702
|
return;
|
|
22644
22703
|
}
|
|
22645
|
-
|
|
22704
|
+
if (travelersFirstStep) {
|
|
22705
|
+
dispatch(fetchPackage());
|
|
22706
|
+
}
|
|
22707
|
+
else {
|
|
22708
|
+
dispatch(fetchPriceDetails());
|
|
22709
|
+
}
|
|
22646
22710
|
if (settings.skipRouter)
|
|
22647
22711
|
dispatch(setCurrentStep$1(travelersFirstStep ? FLIGHT_OPTIONS_FORM_STEP : SUMMARY_STEP));
|
|
22648
22712
|
else
|
|
@@ -22653,6 +22717,8 @@ const TravelersForm = () => {
|
|
|
22653
22717
|
dispatch(fetchPriceDetails());
|
|
22654
22718
|
}, [dispatch]);
|
|
22655
22719
|
React.useEffect(() => {
|
|
22720
|
+
if (!travelersFirstStep)
|
|
22721
|
+
return;
|
|
22656
22722
|
if (!bookingAttributes?.rooms?.length)
|
|
22657
22723
|
return;
|
|
22658
22724
|
if (!hasMounted) {
|
|
@@ -22677,7 +22743,7 @@ const TravelersForm = () => {
|
|
|
22677
22743
|
}
|
|
22678
22744
|
};
|
|
22679
22745
|
fetchAll();
|
|
22680
|
-
}, [bookingAttributes?.rooms, dispatch, hasMounted]);
|
|
22746
|
+
}, [bookingAttributes?.rooms, dispatch, hasMounted, travelersFirstStep]);
|
|
22681
22747
|
const roomsQuery = React.useMemo(() => formik$1.values.rooms
|
|
22682
22748
|
.map((room) => {
|
|
22683
22749
|
const adults = room.adults ? room.adults.length : 0;
|
|
@@ -31377,7 +31443,7 @@ const DayByDayExcursions = () => {
|
|
|
31377
31443
|
})));
|
|
31378
31444
|
};
|
|
31379
31445
|
|
|
31380
|
-
const renderEditablePackagingEntrySummaryOptions = (editablePackagingEntry, priceDetails, translations) => {
|
|
31446
|
+
const renderEditablePackagingEntrySummaryOptions = (editablePackagingEntry, priceDetails, translations, currencyCode) => {
|
|
31381
31447
|
const priceDetailsByProduct = lodash.groupBy(priceDetails?.details ?? [], (detail) => `${detail.productCode}|${detail.accommodationCode}`);
|
|
31382
31448
|
return (editablePackagingEntry?.lines ?? []).map((line) => {
|
|
31383
31449
|
const groupedPriceDetails = priceDetailsByProduct[`${line.productCode}|${line.accommodationCode}`] ?? [];
|
|
@@ -31401,7 +31467,7 @@ const renderEditablePackagingEntrySummaryOptions = (editablePackagingEntry, pric
|
|
|
31401
31467
|
visiblePriceDetails.map((detail, index) => (React__default["default"].createElement("li", { className: "list__item", key: `${line.guid}-price-${index}` },
|
|
31402
31468
|
detail.priceDescription,
|
|
31403
31469
|
": ",
|
|
31404
|
-
detail.total
|
|
31470
|
+
detail.total !== undefined && detail.total !== null ? formatPrice$3(detail.total, currencyCode ?? 'EUR') : '')))),
|
|
31405
31471
|
React__default["default"].createElement("p", null,
|
|
31406
31472
|
"(",
|
|
31407
31473
|
line.from === line.to ? (getDateText(line.from)) : (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
@@ -31521,7 +31587,7 @@ const WLSidebar = ({ activeSearchSeed, packagingAccoResult }) => {
|
|
|
31521
31587
|
const separateExtraPriceDetails = priceDetails?.details.filter((pd) => !pd.isInPackage && pd.isSeparate) ?? [];
|
|
31522
31588
|
const totalPrice = lodash.sum([basePrice, ...separateExtraPriceDetails.map((priceDetail) => priceDetail.price * priceDetail.amount)]);
|
|
31523
31589
|
const includedCosts = selectSeparatePackagePriceDetails(priceDetails?.details.filter((pd) => pd.isInPackage) ?? []);
|
|
31524
|
-
return (React__default["default"].createElement(SharedSidebar, { productName: location ?? '', thumbnailUrl: accoImage ?? context.destinationImage?.url, translations: translations, travelerRooms: travelerRooms, startDateText: lodash.first(sortedLines)?.from && formatDate(new Date(lodash.first(sortedLines).from)), endDateText: lodash.last(sortedLines)?.to && formatDate(new Date(lodash.last(sortedLines).to)), isLoading: !editablePackagingEntry || !priceDetails, loaderComponent: React__default["default"].createElement(Spinner, null), departureFlightMetaData: outboundFlightMetaData, returnFlightMetaData: returnFlightMetaData, includedServiceTypes: editablePackagingEntry.lines.map((line) => line.serviceType), packagingAccommodations: accommodationLines, basePrice: basePrice, commission: priceDetails?.commission, totalPrice: totalPrice, includedCosts: includedCosts, extraCosts: separateExtraPriceDetails, deposit: priceDetails?.deposit, isUnavailable: false, agent: context.agentId }));
|
|
31590
|
+
return (React__default["default"].createElement(SharedSidebar, { productName: location ?? '', thumbnailUrl: accoImage ?? context.destinationImage?.url, translations: translations, travelerRooms: travelerRooms, startDateText: lodash.first(sortedLines)?.from && formatDate(new Date(lodash.first(sortedLines).from)), endDateText: lodash.last(sortedLines)?.to && formatDate(new Date(lodash.last(sortedLines).to)), isLoading: !editablePackagingEntry || !priceDetails, loaderComponent: React__default["default"].createElement(Spinner, null), departureFlightMetaData: outboundFlightMetaData, returnFlightMetaData: returnFlightMetaData, includedServiceTypes: editablePackagingEntry.lines.map((line) => line.serviceType), packagingAccommodations: accommodationLines, basePrice: basePrice, commission: priceDetails?.commission, totalPrice: totalPrice, includedCosts: includedCosts, extraCosts: separateExtraPriceDetails, deposit: priceDetails?.deposit, isUnavailable: false, agent: context.agentId, currencyCode: packagingAccoResult?.currencyCode }));
|
|
31525
31591
|
};
|
|
31526
31592
|
|
|
31527
31593
|
const formatBirthDate = (birthDate) => {
|
|
@@ -31815,7 +31881,7 @@ const BookPackagingEntry = ({ activeSearchSeed, isLoading, isConfirmationPage })
|
|
|
31815
31881
|
stepLabels[step])) },
|
|
31816
31882
|
isConfirmationPage && isLoading && React__default["default"].createElement(Spinner, { label: translations.SUMMARY.PROCESS_BOOKING }),
|
|
31817
31883
|
currentStep === 0 && (React__default["default"].createElement(SharedTravelersForm, { formik: formik$1, translations: translations, travellersSettings: travellersSettings, countries: countries, travelersFirstStep: false, isUnavailable: false, useCompactForm: false, showAgentSelection: false })),
|
|
31818
|
-
currentStep === 1 && (React__default["default"].createElement(SharedSummary, { translations: translations, travelerFormValues: formik$1.values, isSubmitting: isSubmitting, skipPayment: !context.generatePaymentUrl, userValidated: userValidated, remarks: remarks, enableVoucher: false, allowOption: false, isOffer: false, onUserValidatedChange: setUserValidated, onRemarksChange: setRemarks, onSubmit: handleSummarySubmit, renderOptions: () => renderEditablePackagingEntrySummaryOptions(editablePackagingEntry, priceDetails), renderPreviousButton: () => (React__default["default"].createElement("button", { type: "button", title: translations.STEPS.PREVIOUS, onClick: () => dispatch(setCurrentStep(0)), className: "cta cta--secondary" }, translations.STEPS.PREVIOUS)) })),
|
|
31884
|
+
currentStep === 1 && (React__default["default"].createElement(SharedSummary, { translations: translations, travelerFormValues: formik$1.values, isSubmitting: isSubmitting, skipPayment: !context.generatePaymentUrl, userValidated: userValidated, remarks: remarks, enableVoucher: false, allowOption: false, isOffer: false, onUserValidatedChange: setUserValidated, onRemarksChange: setRemarks, onSubmit: handleSummarySubmit, renderOptions: () => renderEditablePackagingEntrySummaryOptions(editablePackagingEntry, priceDetails, translations, selectedPackagingAccoResult?.currencyCode), renderPreviousButton: () => (React__default["default"].createElement("button", { type: "button", title: translations.STEPS.PREVIOUS, onClick: () => dispatch(setCurrentStep(0)), className: "cta cta--secondary" }, translations.STEPS.PREVIOUS)) })),
|
|
31819
31885
|
currentStep === 2 && (React__default["default"].createElement(SharedConfirmation, { bookingNumber: bookingNumber ?? editablePackagingEntry?.dossierNumber ?? '', isOption: false, isOffer: false, translations: translations.CONFIRMATION })),
|
|
31820
31886
|
currentStep === 3 && React__default["default"].createElement("div", null))),
|
|
31821
31887
|
React__default["default"].createElement("div", { className: "backdrop", id: "backdrop" }),
|
|
@@ -12,6 +12,7 @@ interface SharedSidebarProps {
|
|
|
12
12
|
returnFlightMetaData?: any;
|
|
13
13
|
basePrice?: number;
|
|
14
14
|
commission?: number;
|
|
15
|
+
showCommission?: boolean;
|
|
15
16
|
totalPrice?: number;
|
|
16
17
|
remainingAmountText?: string;
|
|
17
18
|
includedCosts?: any[];
|
|
@@ -29,6 +30,7 @@ interface SharedSidebarProps {
|
|
|
29
30
|
seperateExtraPricePerPaxType?: PricePerPaxType[];
|
|
30
31
|
translations: any;
|
|
31
32
|
agent?: number;
|
|
33
|
+
currencyCode?: string;
|
|
32
34
|
}
|
|
33
35
|
declare const SharedSidebar: React.FC<SharedSidebarProps>;
|
|
34
36
|
export default SharedSidebar;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const renderEditablePackagingEntrySummaryOptions: (editablePackagingEntry: any, priceDetails: any, translations: any) => any;
|
|
1
|
+
export declare const renderEditablePackagingEntrySummaryOptions: (editablePackagingEntry: any, priceDetails: any, translations: any, currencyCode?: string) => any;
|
|
2
2
|
export declare const getImageSrcFromHtml: (html?: string | null) => string | undefined;
|
package/build/build-esm/index.js
CHANGED
|
@@ -208,6 +208,8 @@ var TRAVELERS_FORM$f = {
|
|
|
208
208
|
VALIDATION: {
|
|
209
209
|
TRAVELER_X_FIELD: "الغرفة {0} - المسافر {1}: {2}",
|
|
210
210
|
SINGLE_ROOM_TRAVELER_X_FIELD: "المسافر {0}: {1}",
|
|
211
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "الغرفة {0} - المسافر {1}: {2} يحتوي على أحرف غير صالحة",
|
|
212
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "المسافر {0}: {1} يحتوي على أحرف غير صالحة",
|
|
211
213
|
TRAVELER_X_IS_NO_ADULT: "الغرفة {0} - المسافر {1}: ليس بالغًا",
|
|
212
214
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "المسافر {0}: ليس بالغًا",
|
|
213
215
|
TRAVELER_X_IS_NO_CHILD: "الغرفة {0} - المسافر {1}: ليس طفلًا",
|
|
@@ -640,6 +642,8 @@ var TRAVELERS_FORM$e = {
|
|
|
640
642
|
VALIDATION: {
|
|
641
643
|
TRAVELER_X_FIELD: "Værelse {0} - Rejsende {1}: {2}",
|
|
642
644
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Rejsende {0}: {1}",
|
|
645
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Værelse {0} - Rejsende {1}: {2} indeholder ugyldige tegn",
|
|
646
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Rejsende {0}: {1} indeholder ugyldige tegn",
|
|
643
647
|
TRAVELER_X_IS_NO_ADULT: "Værelse {0} - Rejsende {1}: er ikke voksen",
|
|
644
648
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Rejsende {0}: er ikke voksen",
|
|
645
649
|
TRAVELER_X_IS_NO_CHILD: "Værelse {0} - Rejsende {1}: er ikke barn",
|
|
@@ -1072,6 +1076,8 @@ var TRAVELERS_FORM$d = {
|
|
|
1072
1076
|
VALIDATION: {
|
|
1073
1077
|
TRAVELER_X_FIELD: "Zimmer {0} - Reisender {1}: {2}",
|
|
1074
1078
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Reisender {0}: {1}",
|
|
1079
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Zimmer {0} - Reisender {1}: {2} enthält ungültige Zeichen",
|
|
1080
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Reisender {0}: {1} enthält ungültige Zeichen",
|
|
1075
1081
|
TRAVELER_X_IS_NO_ADULT: "Zimmer {0} - Reisender {1}: ist kein Erwachsener",
|
|
1076
1082
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Reisender {0}: ist kein Erwachsener",
|
|
1077
1083
|
TRAVELER_X_IS_NO_CHILD: "Zimmer {0} - Reisender {1}: ist kein Kind",
|
|
@@ -1508,6 +1514,8 @@ var TRAVELERS_FORM$c = {
|
|
|
1508
1514
|
VALIDATION: {
|
|
1509
1515
|
TRAVELER_X_FIELD: "Room {0} - Traveler {1}: {2}",
|
|
1510
1516
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Traveler {0}: {1}",
|
|
1517
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Room {0} - Traveler {1}: {2} contains invalid characters",
|
|
1518
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Traveler {0}: {1} contains invalid characters",
|
|
1511
1519
|
TRAVELER_X_IS_NO_ADULT: "Room {0} - Traveler {1}: is not an adult",
|
|
1512
1520
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Traveler {0}: is not an adult",
|
|
1513
1521
|
TRAVELER_X_IS_NO_CHILD: "Room {0} - Traveler {1}: is not a child",
|
|
@@ -1940,6 +1948,8 @@ var TRAVELERS_FORM$b = {
|
|
|
1940
1948
|
VALIDATION: {
|
|
1941
1949
|
TRAVELER_X_FIELD: "Habitación {0} - Viajero {1}: {2}",
|
|
1942
1950
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Viajero {0}: {1}",
|
|
1951
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Habitación {0} - Viajero {1}: {2} contiene caracteres no válidos",
|
|
1952
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Viajero {0}: {1} contiene caracteres no válidos",
|
|
1943
1953
|
TRAVELER_X_IS_NO_ADULT: "Habitación {0} - Viajero {1}: no es adulto",
|
|
1944
1954
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Viajero {0}: no es adulto",
|
|
1945
1955
|
TRAVELER_X_IS_NO_CHILD: "Habitación {0} - Viajero {1}: no es niño",
|
|
@@ -2376,6 +2386,8 @@ var TRAVELERS_FORM$a = {
|
|
|
2376
2386
|
VALIDATION: {
|
|
2377
2387
|
TRAVELER_X_FIELD: "Chambre {0} - Voyageur {1} : {2}",
|
|
2378
2388
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Voyageur {0} : {1}",
|
|
2389
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Chambre {0} - Voyageur {1} : {2} contient des caractères non valides",
|
|
2390
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Voyageur {0} : {1} contient des caractères non valides",
|
|
2379
2391
|
TRAVELER_X_IS_NO_ADULT: "Chambre {0} - Voyageur {1} : n'est pas un adulte",
|
|
2380
2392
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Voyageur {0} : n'est pas un adulte",
|
|
2381
2393
|
TRAVELER_X_IS_NO_CHILD: "Chambre {0} - Voyageur {1} : n'est pas un enfant",
|
|
@@ -2808,6 +2820,8 @@ var TRAVELERS_FORM$9 = {
|
|
|
2808
2820
|
VALIDATION: {
|
|
2809
2821
|
TRAVELER_X_FIELD: "Chambre {0} - Voyageur {1} : {2}",
|
|
2810
2822
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Voyageur {0} : {1}",
|
|
2823
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Chambre {0} - Voyageur {1} : {2} contient des caractères non valides",
|
|
2824
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Voyageur {0} : {1} contient des caractères non valides",
|
|
2811
2825
|
TRAVELER_X_IS_NO_ADULT: "Chambre {0} - Voyageur {1} : n'est pas un adulte",
|
|
2812
2826
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Voyageur {0} : n'est pas un adulte",
|
|
2813
2827
|
TRAVELER_X_IS_NO_CHILD: "Chambre {0} - Voyageur {1} : n'est pas un enfant",
|
|
@@ -3240,6 +3254,8 @@ var TRAVELERS_FORM$8 = {
|
|
|
3240
3254
|
VALIDATION: {
|
|
3241
3255
|
TRAVELER_X_FIELD: "Herbergi {0} - Farþegi {1}: {2}",
|
|
3242
3256
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Farþegi {0}: {1}",
|
|
3257
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Herbergi {0} - Farþegi {1}: {2} inniheldur ógild tákn",
|
|
3258
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Farþegi {0}: {1} inniheldur ógild tákn",
|
|
3243
3259
|
TRAVELER_X_IS_NO_ADULT: "Herbergi {0} - Farþegi {1}: er ekki fullorðinn",
|
|
3244
3260
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Farþegi {0}: er ekki fullorðinn",
|
|
3245
3261
|
TRAVELER_X_IS_NO_CHILD: "Herbergi {0} - Farþegi {1}: er ekki barn",
|
|
@@ -3672,6 +3688,8 @@ var TRAVELERS_FORM$7 = {
|
|
|
3672
3688
|
VALIDATION: {
|
|
3673
3689
|
TRAVELER_X_FIELD: "Camera {0} - Viaggiatore {1}: {2}",
|
|
3674
3690
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Viaggiatore {0}: {1}",
|
|
3691
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Camera {0} - Viaggiatore {1}: {2} contiene caratteri non validi",
|
|
3692
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Viaggiatore {0}: {1} contiene caratteri non validi",
|
|
3675
3693
|
TRAVELER_X_IS_NO_ADULT: "Camera {0} - Viaggiatore {1}: non è un adulto",
|
|
3676
3694
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Viaggiatore {0}: non è un adulto",
|
|
3677
3695
|
TRAVELER_X_IS_NO_CHILD: "Camera {0} - Viaggiatore {1}: non è un bambino",
|
|
@@ -4108,6 +4126,8 @@ var TRAVELERS_FORM$6 = {
|
|
|
4108
4126
|
VALIDATION: {
|
|
4109
4127
|
TRAVELER_X_FIELD: "Kamer {0} - Reiziger {1}: {2}",
|
|
4110
4128
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Reiziger {0}: {1}",
|
|
4129
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Kamer {0} - Reiziger {1}: {2} bevat ongeldige tekens",
|
|
4130
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Reiziger {0}: {1} bevat ongeldige tekens",
|
|
4111
4131
|
TRAVELER_X_IS_NO_ADULT: "Kamer {0} - Reiziger {1}: is geen volwassene",
|
|
4112
4132
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Reiziger {0}: is geen volwassene",
|
|
4113
4133
|
TRAVELER_X_IS_NO_CHILD: "Kamer {0} - Reiziger {1}: is geen kind",
|
|
@@ -4540,6 +4560,8 @@ var TRAVELERS_FORM$5 = {
|
|
|
4540
4560
|
VALIDATION: {
|
|
4541
4561
|
TRAVELER_X_FIELD: "Kamer {0} - Reiziger {1}: {2}",
|
|
4542
4562
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Reiziger {0}: {1}",
|
|
4563
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Kamer {0} - Reiziger {1}: {2} bevat ongeldige tekens",
|
|
4564
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Reiziger {0}: {1} bevat ongeldige tekens",
|
|
4543
4565
|
TRAVELER_X_IS_NO_ADULT: "Kamer {0} - Reiziger {1}: is geen volwassene",
|
|
4544
4566
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Reiziger {0}: is geen volwassene",
|
|
4545
4567
|
TRAVELER_X_IS_NO_CHILD: "Kamer {0} - Reiziger {1}: is geen kind",
|
|
@@ -4972,6 +4994,8 @@ var TRAVELERS_FORM$4 = {
|
|
|
4972
4994
|
VALIDATION: {
|
|
4973
4995
|
TRAVELER_X_FIELD: "Rom {0} – Reisende {1}: {2}",
|
|
4974
4996
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Reisende {0}: {1}",
|
|
4997
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Rom {0} – Reisende {1}: {2} inneholder ugyldige tegn",
|
|
4998
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Reisende {0}: {1} inneholder ugyldige tegn",
|
|
4975
4999
|
TRAVELER_X_IS_NO_ADULT: "Rom {0} – Reisende {1}: er ikke voksen",
|
|
4976
5000
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Reisende {0}: er ikke voksen",
|
|
4977
5001
|
TRAVELER_X_IS_NO_CHILD: "Rom {0} – Reisende {1}: er ikke barn",
|
|
@@ -5404,6 +5428,8 @@ var TRAVELERS_FORM$3 = {
|
|
|
5404
5428
|
VALIDATION: {
|
|
5405
5429
|
TRAVELER_X_FIELD: "Pokój {0} – Podróżny {1}: {2}",
|
|
5406
5430
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Podróżny {0}: {1}",
|
|
5431
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Pokój {0} – Podróżny {1}: {2} zawiera nieprawidłowe znaki",
|
|
5432
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Podróżny {0}: {1} zawiera nieprawidłowe znaki",
|
|
5407
5433
|
TRAVELER_X_IS_NO_ADULT: "Pokój {0} – Podróżny {1}: nie jest dorosły",
|
|
5408
5434
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Podróżny {0}: nie jest dorosły",
|
|
5409
5435
|
TRAVELER_X_IS_NO_CHILD: "Pokój {0} – Podróżny {1}: nie jest dzieckiem",
|
|
@@ -5836,6 +5862,8 @@ var TRAVELERS_FORM$2 = {
|
|
|
5836
5862
|
VALIDATION: {
|
|
5837
5863
|
TRAVELER_X_FIELD: "Quarto {0} – Viajante {1}: {2}",
|
|
5838
5864
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Viajante {0}: {1}",
|
|
5865
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Quarto {0} – Viajante {1}: {2} contém caracteres inválidos",
|
|
5866
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Viajante {0}: {1} contém caracteres inválidos",
|
|
5839
5867
|
TRAVELER_X_IS_NO_ADULT: "Quarto {0} – Viajante {1}: não é adulto",
|
|
5840
5868
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Viajante {0}: não é adulto",
|
|
5841
5869
|
TRAVELER_X_IS_NO_CHILD: "Quarto {0} – Viajante {1}: não é criança",
|
|
@@ -6268,6 +6296,8 @@ var TRAVELERS_FORM$1 = {
|
|
|
6268
6296
|
VALIDATION: {
|
|
6269
6297
|
TRAVELER_X_FIELD: "Rum {0} – Resenär {1}: {2}",
|
|
6270
6298
|
SINGLE_ROOM_TRAVELER_X_FIELD: "Resenär {0}: {1}",
|
|
6299
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "Rum {0} – Resenär {1}: {2} innehåller ogiltiga tecken",
|
|
6300
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "Resenär {0}: {1} innehåller ogiltiga tecken",
|
|
6271
6301
|
TRAVELER_X_IS_NO_ADULT: "Rum {0} – Resenär {1}: är inte vuxen",
|
|
6272
6302
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Resenär {0}: är inte vuxen",
|
|
6273
6303
|
TRAVELER_X_IS_NO_CHILD: "Rum {0} – Resenär {1}: är inte barn",
|
|
@@ -6700,6 +6730,8 @@ var TRAVELERS_FORM = {
|
|
|
6700
6730
|
VALIDATION: {
|
|
6701
6731
|
TRAVELER_X_FIELD: "客室 {0} – 旅行者 {1}: {2}",
|
|
6702
6732
|
SINGLE_ROOM_TRAVELER_X_FIELD: "旅行者 {0}: {1}",
|
|
6733
|
+
TRAVELER_X_FIELD_INVALID_CHARACTERS: "客室 {0} – 旅行者 {1}: {2} に無効な文字が含まれています",
|
|
6734
|
+
SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS: "旅行者 {0}: {1} に無効な文字が含まれています",
|
|
6703
6735
|
TRAVELER_X_IS_NO_ADULT: "客室 {0} – 旅行者 {1}: 大人ではありません",
|
|
6704
6736
|
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "旅行者 {0}: 大人ではありません",
|
|
6705
6737
|
TRAVELER_X_IS_NO_CHILD: "客室 {0} – 旅行者 {1}: 子供ではありません",
|
|
@@ -21325,7 +21357,7 @@ const SidebarFlight = ({ title, flightMetaData, translations }) => {
|
|
|
21325
21357
|
React__default.createElement("div", { className: "pricing-summary__value" }, translations.SIDEBAR.LUGGAGE_INCLUDED)))));
|
|
21326
21358
|
};
|
|
21327
21359
|
|
|
21328
|
-
const SharedSidebar = ({ productName, thumbnailUrl, isLoading, translations, headerComponent, travelerRooms, startDateText, endDateText, loaderComponent, departureFlightMetaData, returnFlightMetaData, accommodations, packagingAccommodations, isOnRequest, includedServiceTypes, basePrice, commission, totalPrice, includedCosts, extraCosts, deposit, basePricePerPaxType, seperateExtraPricePerPaxType, isUnavailable, agent, footerComponent }) => {
|
|
21360
|
+
const SharedSidebar = ({ productName, thumbnailUrl, isLoading, translations, headerComponent, travelerRooms, startDateText, endDateText, loaderComponent, departureFlightMetaData, returnFlightMetaData, accommodations, packagingAccommodations, isOnRequest, includedServiceTypes, basePrice, commission, showCommission, totalPrice, includedCosts, extraCosts, deposit, basePricePerPaxType, seperateExtraPricePerPaxType, isUnavailable, agent, footerComponent, currencyCode = 'EUR' }) => {
|
|
21329
21361
|
if (!translations)
|
|
21330
21362
|
return null;
|
|
21331
21363
|
const [active, setActive] = useState(false);
|
|
@@ -21336,8 +21368,6 @@ const SharedSidebar = ({ productName, thumbnailUrl, isLoading, translations, hea
|
|
|
21336
21368
|
const canShowPriceBreakdownSection = Boolean(basePrice && basePrice > 0) || !isEmpty$1(includedCosts) || !isEmpty$1(extraCosts);
|
|
21337
21369
|
const canShowTotalPriceSection = Boolean(totalPrice && totalPrice > 0);
|
|
21338
21370
|
const remainingAmount = Number(((totalPrice ?? 0) - (deposit ?? 0)).toFixed(2));
|
|
21339
|
-
// TODO: Determine currency code based on the data, for now default to EUR
|
|
21340
|
-
let currencyCode = 'EUR';
|
|
21341
21371
|
return (React__default.createElement("div", { className: buildClassName(['booking__sidebar', active && 'booking__sidebar--active']) },
|
|
21342
21372
|
headerComponent,
|
|
21343
21373
|
React__default.createElement("div", { className: "booking__sidebar-frame" },
|
|
@@ -21467,7 +21497,7 @@ const SharedSidebar = ({ productName, thumbnailUrl, isLoading, translations, hea
|
|
|
21467
21497
|
translations.SIDEBAR.DEPOSIT_TEXT4,
|
|
21468
21498
|
React__default.createElement("strong", null, translations.SIDEBAR.DEPOSIT_TEXT5),
|
|
21469
21499
|
translations.SIDEBAR.DEPOSIT_TEXT6))))) : (React__default.createElement("div", { className: "pricing-summary__group" },
|
|
21470
|
-
agent && (React__default.createElement("div", { className: "pricing-summary__row pricing-summary__row--total-price" },
|
|
21500
|
+
agent && showCommission && (React__default.createElement("div", { className: "pricing-summary__row pricing-summary__row--total-price" },
|
|
21471
21501
|
React__default.createElement("div", { className: "pricing-summary__property" },
|
|
21472
21502
|
React__default.createElement("h6", { className: "pricing-summary__title" }, translations.SIDEBAR.COMMISSION)),
|
|
21473
21503
|
React__default.createElement("div", { className: "pricing-summary__value" },
|
|
@@ -21483,7 +21513,7 @@ const SharedSidebar = ({ productName, thumbnailUrl, isLoading, translations, hea
|
|
|
21483
21513
|
};
|
|
21484
21514
|
|
|
21485
21515
|
const SidebarContainer = ({ productName, thumbnailUrl }) => {
|
|
21486
|
-
const { sidebarHeaderComponent, sidebarFooterComponent, loaderComponent, showPricesPerPaxType, maxChildAge } = useContext(SettingsContext);
|
|
21516
|
+
const { sidebarHeaderComponent, sidebarFooterComponent, loaderComponent, showPricesPerPaxType, maxChildAge, showCommission } = useContext(SettingsContext);
|
|
21487
21517
|
const bookingAttributes = useSelector(selectBookingAttributes);
|
|
21488
21518
|
const selectFormRooms = useMemo(() => makeSelectFormRooms(maxChildAge), [maxChildAge]);
|
|
21489
21519
|
const rooms = useSelector(selectFormRooms);
|
|
@@ -21500,7 +21530,7 @@ const SidebarContainer = ({ productName, thumbnailUrl }) => {
|
|
|
21500
21530
|
const isUnavailable = useSelector(selectIsUnavailable) || false;
|
|
21501
21531
|
const isLoading = isFetchingProductOptions || isFetchingPriceDetails;
|
|
21502
21532
|
const agent = useSelector(selectAgentAdressId);
|
|
21503
|
-
return (React__default.createElement(SharedSidebar, { productName: productName, thumbnailUrl: thumbnailUrl, isLoading: isLoading, startDateText: getDateText(bookingAttributes?.startDate), endDateText: bookingAttributes?.startDate !== bookingAttributes?.endDate ? getDateText(bookingAttributes?.endDate) : undefined, travelerRooms: travelerRooms, departureFlightMetaData: departureFlightMetaData, returnFlightMetaData: returnFlightMetaData, basePrice: useSelector(selectBasePrice), commission: useSelector(selectCommission), totalPrice: useSelector(selectTotalPrice), includedCosts: useSelector(selectSeparatePackagePriceDetails$1), extraCosts: useSelector(selectSeparateExtraPriceDetails), accommodations: accommodations, includedServiceTypes: includedServiceTypes, deposit: useSelector(selectDeposit), isOnRequest: useSelector(selectIsOnRequest), headerComponent: sidebarHeaderComponent ?? undefined, footerComponent: sidebarFooterComponent ?? undefined, loaderComponent: loaderComponent ?? undefined, isUnavailable: isUnavailable, basePricePerPaxType: showPricesPerPaxType ? useSelector(selectBasePricePerPaxType) : undefined, seperateExtraPricePerPaxType: showPricesPerPaxType ? useSelector(selectSeparateExtraPriceDetailsPerPaxType) : undefined, translations: translations, agent: agent }));
|
|
21533
|
+
return (React__default.createElement(SharedSidebar, { productName: productName, thumbnailUrl: thumbnailUrl, isLoading: isLoading, startDateText: getDateText(bookingAttributes?.startDate), endDateText: bookingAttributes?.startDate !== bookingAttributes?.endDate ? getDateText(bookingAttributes?.endDate) : undefined, travelerRooms: travelerRooms, departureFlightMetaData: departureFlightMetaData, returnFlightMetaData: returnFlightMetaData, basePrice: useSelector(selectBasePrice), commission: useSelector(selectCommission), showCommission: showCommission, totalPrice: useSelector(selectTotalPrice), includedCosts: useSelector(selectSeparatePackagePriceDetails$1), extraCosts: useSelector(selectSeparateExtraPriceDetails), accommodations: accommodations, includedServiceTypes: includedServiceTypes, deposit: useSelector(selectDeposit), isOnRequest: useSelector(selectIsOnRequest), headerComponent: sidebarHeaderComponent ?? undefined, footerComponent: sidebarFooterComponent ?? undefined, loaderComponent: loaderComponent ?? undefined, isUnavailable: isUnavailable, basePricePerPaxType: showPricesPerPaxType ? useSelector(selectBasePricePerPaxType) : undefined, seperateExtraPricePerPaxType: showPricesPerPaxType ? useSelector(selectSeparateExtraPriceDetailsPerPaxType) : undefined, translations: translations, agent: agent, currencyCode: useSelector(selectCurrencyCode) }));
|
|
21504
21534
|
};
|
|
21505
21535
|
|
|
21506
21536
|
const SummaryPerPaxOptionGroup = ({ group }) => {
|
|
@@ -21682,7 +21712,7 @@ const Summary = () => {
|
|
|
21682
21712
|
}
|
|
21683
21713
|
else {
|
|
21684
21714
|
const location = window.location;
|
|
21685
|
-
bookRequest.payload.redirectUrl = `${location.protocol}//${location.host}${settings.basePath}?${bookingQueryString}`;
|
|
21715
|
+
bookRequest.payload.redirectUrl = `${location.protocol}//${location.host}${settings.basePath ?? location.pathname}?${bookingQueryString}`;
|
|
21686
21716
|
}
|
|
21687
21717
|
}
|
|
21688
21718
|
}
|
|
@@ -21951,6 +21981,10 @@ const Summary = () => {
|
|
|
21951
21981
|
function isValidEmail(email) {
|
|
21952
21982
|
return !/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,24}$/i.test(email);
|
|
21953
21983
|
}
|
|
21984
|
+
const NAME_CHARACTERS_REGEX = /^[\p{L}\s-]+$/u;
|
|
21985
|
+
function hasInvalidNameCharacters(name) {
|
|
21986
|
+
return !NAME_CHARACTERS_REGEX.test(name);
|
|
21987
|
+
}
|
|
21954
21988
|
function getAge(birthDateText, startDateText) {
|
|
21955
21989
|
var birthDate = new Date(birthDateText);
|
|
21956
21990
|
var startDate = new Date(startDateText);
|
|
@@ -21984,15 +22018,30 @@ const validateForm$1 = (values, agentRequired, bookingType, translations, formFi
|
|
|
21984
22018
|
? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_IS_NO_CHILD, [room, pax])
|
|
21985
22019
|
: format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_IS_NO_CHILD, [pax]);
|
|
21986
22020
|
};
|
|
22021
|
+
const formatTravelerFieldInvalidCharacters = (room, pax, field) => {
|
|
22022
|
+
return values.rooms.length > 1
|
|
22023
|
+
? format$1(translations.TRAVELERS_FORM.VALIDATION.TRAVELER_X_FIELD_INVALID_CHARACTERS, [room, pax, field])
|
|
22024
|
+
: format$1(translations.TRAVELERS_FORM.VALIDATION.SINGLE_ROOM_TRAVELER_X_FIELD_INVALID_CHARACTERS, [pax, field]);
|
|
22025
|
+
};
|
|
21987
22026
|
values.rooms.forEach((r, rIndex) => r.adults.forEach((adult, index) => {
|
|
21988
22027
|
if (isEmpty$1(adult.gender) && isFormFieldPresent('gender')) {
|
|
21989
22028
|
set(errors, `rooms[${rIndex}].adults[${index}].gender`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.GENDER));
|
|
21990
22029
|
}
|
|
21991
|
-
if (
|
|
21992
|
-
|
|
22030
|
+
if (isFormFieldPresent('firstName')) {
|
|
22031
|
+
if (isEmpty$1(adult.firstName)) {
|
|
22032
|
+
set(errors, `rooms[${rIndex}].adults[${index}].firstName`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
|
|
22033
|
+
}
|
|
22034
|
+
else if (hasInvalidNameCharacters(adult.firstName)) {
|
|
22035
|
+
set(errors, `rooms[${rIndex}].adults[${index}].firstName`, formatTravelerFieldInvalidCharacters(rIndex + 1, index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
|
|
22036
|
+
}
|
|
21993
22037
|
}
|
|
21994
|
-
if (
|
|
21995
|
-
|
|
22038
|
+
if (isFormFieldPresent('lastName')) {
|
|
22039
|
+
if (isEmpty$1(adult.lastName)) {
|
|
22040
|
+
set(errors, `rooms[${rIndex}].adults[${index}].lastName`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.LAST_NAME));
|
|
22041
|
+
}
|
|
22042
|
+
else if (hasInvalidNameCharacters(adult.lastName)) {
|
|
22043
|
+
set(errors, `rooms[${rIndex}].adults[${index}].lastName`, formatTravelerFieldInvalidCharacters(rIndex + 1, index + 1, translations.TRAVELERS_FORM.LAST_NAME));
|
|
22044
|
+
}
|
|
21996
22045
|
}
|
|
21997
22046
|
if (isFormFieldPresent('birthDate')) {
|
|
21998
22047
|
if (isEmpty$1(adult.birthDate)) {
|
|
@@ -22011,11 +22060,21 @@ const validateForm$1 = (values, agentRequired, bookingType, translations, formFi
|
|
|
22011
22060
|
if (isEmpty$1(child.gender) && isFormFieldPresent('gender')) {
|
|
22012
22061
|
set(errors, `rooms[${rIndex}].children[${index}].gender`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.GENDER));
|
|
22013
22062
|
}
|
|
22014
|
-
if (
|
|
22015
|
-
|
|
22063
|
+
if (isFormFieldPresent('firstName')) {
|
|
22064
|
+
if (isEmpty$1(child.firstName)) {
|
|
22065
|
+
set(errors, `children[${index}].firstName`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
|
|
22066
|
+
}
|
|
22067
|
+
else if (hasInvalidNameCharacters(child.firstName)) {
|
|
22068
|
+
set(errors, `children[${index}].firstName`, formatTravelerFieldInvalidCharacters(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.FIRST_NAME));
|
|
22069
|
+
}
|
|
22016
22070
|
}
|
|
22017
|
-
if (
|
|
22018
|
-
|
|
22071
|
+
if (isFormFieldPresent('lastName')) {
|
|
22072
|
+
if (isEmpty$1(child.lastName)) {
|
|
22073
|
+
set(errors, `rooms[${rIndex}].children[${index}].lastName`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.LAST_NAME));
|
|
22074
|
+
}
|
|
22075
|
+
else if (hasInvalidNameCharacters(child.lastName)) {
|
|
22076
|
+
set(errors, `rooms[${rIndex}].children[${index}].lastName`, formatTravelerFieldInvalidCharacters(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.LAST_NAME));
|
|
22077
|
+
}
|
|
22019
22078
|
}
|
|
22020
22079
|
if (isFormFieldPresent('birthDate')) {
|
|
22021
22080
|
if (isEmpty$1(child.birthDate)) {
|
|
@@ -22613,7 +22672,12 @@ const TravelersForm = () => {
|
|
|
22613
22672
|
navigate(`${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.summary.pathSuffix}?${bookingQueryString}`);
|
|
22614
22673
|
return;
|
|
22615
22674
|
}
|
|
22616
|
-
|
|
22675
|
+
if (travelersFirstStep) {
|
|
22676
|
+
dispatch(fetchPackage());
|
|
22677
|
+
}
|
|
22678
|
+
else {
|
|
22679
|
+
dispatch(fetchPriceDetails());
|
|
22680
|
+
}
|
|
22617
22681
|
if (settings.skipRouter)
|
|
22618
22682
|
dispatch(setCurrentStep$1(travelersFirstStep ? FLIGHT_OPTIONS_FORM_STEP : SUMMARY_STEP));
|
|
22619
22683
|
else
|
|
@@ -22624,6 +22688,8 @@ const TravelersForm = () => {
|
|
|
22624
22688
|
dispatch(fetchPriceDetails());
|
|
22625
22689
|
}, [dispatch]);
|
|
22626
22690
|
useEffect(() => {
|
|
22691
|
+
if (!travelersFirstStep)
|
|
22692
|
+
return;
|
|
22627
22693
|
if (!bookingAttributes?.rooms?.length)
|
|
22628
22694
|
return;
|
|
22629
22695
|
if (!hasMounted) {
|
|
@@ -22648,7 +22714,7 @@ const TravelersForm = () => {
|
|
|
22648
22714
|
}
|
|
22649
22715
|
};
|
|
22650
22716
|
fetchAll();
|
|
22651
|
-
}, [bookingAttributes?.rooms, dispatch, hasMounted]);
|
|
22717
|
+
}, [bookingAttributes?.rooms, dispatch, hasMounted, travelersFirstStep]);
|
|
22652
22718
|
const roomsQuery = useMemo(() => formik.values.rooms
|
|
22653
22719
|
.map((room) => {
|
|
22654
22720
|
const adults = room.adults ? room.adults.length : 0;
|
|
@@ -31348,7 +31414,7 @@ const DayByDayExcursions = () => {
|
|
|
31348
31414
|
})));
|
|
31349
31415
|
};
|
|
31350
31416
|
|
|
31351
|
-
const renderEditablePackagingEntrySummaryOptions = (editablePackagingEntry, priceDetails, translations) => {
|
|
31417
|
+
const renderEditablePackagingEntrySummaryOptions = (editablePackagingEntry, priceDetails, translations, currencyCode) => {
|
|
31352
31418
|
const priceDetailsByProduct = groupBy(priceDetails?.details ?? [], (detail) => `${detail.productCode}|${detail.accommodationCode}`);
|
|
31353
31419
|
return (editablePackagingEntry?.lines ?? []).map((line) => {
|
|
31354
31420
|
const groupedPriceDetails = priceDetailsByProduct[`${line.productCode}|${line.accommodationCode}`] ?? [];
|
|
@@ -31372,7 +31438,7 @@ const renderEditablePackagingEntrySummaryOptions = (editablePackagingEntry, pric
|
|
|
31372
31438
|
visiblePriceDetails.map((detail, index) => (React__default.createElement("li", { className: "list__item", key: `${line.guid}-price-${index}` },
|
|
31373
31439
|
detail.priceDescription,
|
|
31374
31440
|
": ",
|
|
31375
|
-
detail.total
|
|
31441
|
+
detail.total !== undefined && detail.total !== null ? formatPrice$3(detail.total, currencyCode ?? 'EUR') : '')))),
|
|
31376
31442
|
React__default.createElement("p", null,
|
|
31377
31443
|
"(",
|
|
31378
31444
|
line.from === line.to ? (getDateText(line.from)) : (React__default.createElement(React__default.Fragment, null,
|
|
@@ -31492,7 +31558,7 @@ const WLSidebar = ({ activeSearchSeed, packagingAccoResult }) => {
|
|
|
31492
31558
|
const separateExtraPriceDetails = priceDetails?.details.filter((pd) => !pd.isInPackage && pd.isSeparate) ?? [];
|
|
31493
31559
|
const totalPrice = sum([basePrice, ...separateExtraPriceDetails.map((priceDetail) => priceDetail.price * priceDetail.amount)]);
|
|
31494
31560
|
const includedCosts = selectSeparatePackagePriceDetails(priceDetails?.details.filter((pd) => pd.isInPackage) ?? []);
|
|
31495
|
-
return (React__default.createElement(SharedSidebar, { productName: location ?? '', thumbnailUrl: accoImage ?? context.destinationImage?.url, translations: translations, travelerRooms: travelerRooms, startDateText: first(sortedLines)?.from && formatDate(new Date(first(sortedLines).from)), endDateText: last(sortedLines)?.to && formatDate(new Date(last(sortedLines).to)), isLoading: !editablePackagingEntry || !priceDetails, loaderComponent: React__default.createElement(Spinner, null), departureFlightMetaData: outboundFlightMetaData, returnFlightMetaData: returnFlightMetaData, includedServiceTypes: editablePackagingEntry.lines.map((line) => line.serviceType), packagingAccommodations: accommodationLines, basePrice: basePrice, commission: priceDetails?.commission, totalPrice: totalPrice, includedCosts: includedCosts, extraCosts: separateExtraPriceDetails, deposit: priceDetails?.deposit, isUnavailable: false, agent: context.agentId }));
|
|
31561
|
+
return (React__default.createElement(SharedSidebar, { productName: location ?? '', thumbnailUrl: accoImage ?? context.destinationImage?.url, translations: translations, travelerRooms: travelerRooms, startDateText: first(sortedLines)?.from && formatDate(new Date(first(sortedLines).from)), endDateText: last(sortedLines)?.to && formatDate(new Date(last(sortedLines).to)), isLoading: !editablePackagingEntry || !priceDetails, loaderComponent: React__default.createElement(Spinner, null), departureFlightMetaData: outboundFlightMetaData, returnFlightMetaData: returnFlightMetaData, includedServiceTypes: editablePackagingEntry.lines.map((line) => line.serviceType), packagingAccommodations: accommodationLines, basePrice: basePrice, commission: priceDetails?.commission, totalPrice: totalPrice, includedCosts: includedCosts, extraCosts: separateExtraPriceDetails, deposit: priceDetails?.deposit, isUnavailable: false, agent: context.agentId, currencyCode: packagingAccoResult?.currencyCode }));
|
|
31496
31562
|
};
|
|
31497
31563
|
|
|
31498
31564
|
const formatBirthDate = (birthDate) => {
|
|
@@ -31786,7 +31852,7 @@ const BookPackagingEntry = ({ activeSearchSeed, isLoading, isConfirmationPage })
|
|
|
31786
31852
|
stepLabels[step])) },
|
|
31787
31853
|
isConfirmationPage && isLoading && React__default.createElement(Spinner, { label: translations.SUMMARY.PROCESS_BOOKING }),
|
|
31788
31854
|
currentStep === 0 && (React__default.createElement(SharedTravelersForm, { formik: formik, translations: translations, travellersSettings: travellersSettings, countries: countries, travelersFirstStep: false, isUnavailable: false, useCompactForm: false, showAgentSelection: false })),
|
|
31789
|
-
currentStep === 1 && (React__default.createElement(SharedSummary, { translations: translations, travelerFormValues: formik.values, isSubmitting: isSubmitting, skipPayment: !context.generatePaymentUrl, userValidated: userValidated, remarks: remarks, enableVoucher: false, allowOption: false, isOffer: false, onUserValidatedChange: setUserValidated, onRemarksChange: setRemarks, onSubmit: handleSummarySubmit, renderOptions: () => renderEditablePackagingEntrySummaryOptions(editablePackagingEntry, priceDetails), renderPreviousButton: () => (React__default.createElement("button", { type: "button", title: translations.STEPS.PREVIOUS, onClick: () => dispatch(setCurrentStep(0)), className: "cta cta--secondary" }, translations.STEPS.PREVIOUS)) })),
|
|
31855
|
+
currentStep === 1 && (React__default.createElement(SharedSummary, { translations: translations, travelerFormValues: formik.values, isSubmitting: isSubmitting, skipPayment: !context.generatePaymentUrl, userValidated: userValidated, remarks: remarks, enableVoucher: false, allowOption: false, isOffer: false, onUserValidatedChange: setUserValidated, onRemarksChange: setRemarks, onSubmit: handleSummarySubmit, renderOptions: () => renderEditablePackagingEntrySummaryOptions(editablePackagingEntry, priceDetails, translations, selectedPackagingAccoResult?.currencyCode), renderPreviousButton: () => (React__default.createElement("button", { type: "button", title: translations.STEPS.PREVIOUS, onClick: () => dispatch(setCurrentStep(0)), className: "cta cta--secondary" }, translations.STEPS.PREVIOUS)) })),
|
|
31790
31856
|
currentStep === 2 && (React__default.createElement(SharedConfirmation, { bookingNumber: bookingNumber ?? editablePackagingEntry?.dossierNumber ?? '', isOption: false, isOffer: false, translations: translations.CONFIRMATION })),
|
|
31791
31857
|
currentStep === 3 && React__default.createElement("div", null))),
|
|
31792
31858
|
React__default.createElement("div", { className: "backdrop", id: "backdrop" }),
|
|
@@ -12,6 +12,7 @@ interface SharedSidebarProps {
|
|
|
12
12
|
returnFlightMetaData?: any;
|
|
13
13
|
basePrice?: number;
|
|
14
14
|
commission?: number;
|
|
15
|
+
showCommission?: boolean;
|
|
15
16
|
totalPrice?: number;
|
|
16
17
|
remainingAmountText?: string;
|
|
17
18
|
includedCosts?: any[];
|
|
@@ -29,6 +30,7 @@ interface SharedSidebarProps {
|
|
|
29
30
|
seperateExtraPricePerPaxType?: PricePerPaxType[];
|
|
30
31
|
translations: any;
|
|
31
32
|
agent?: number;
|
|
33
|
+
currencyCode?: string;
|
|
32
34
|
}
|
|
33
35
|
declare const SharedSidebar: React.FC<SharedSidebarProps>;
|
|
34
36
|
export default SharedSidebar;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const renderEditablePackagingEntrySummaryOptions: (editablePackagingEntry: any, priceDetails: any, translations: any) => any;
|
|
1
|
+
export declare const renderEditablePackagingEntrySummaryOptions: (editablePackagingEntry: any, priceDetails: any, translations: any, currencyCode?: string) => any;
|
|
2
2
|
export declare const getImageSrcFromHtml: (html?: string | null) => string | undefined;
|
package/package.json
CHANGED