@qite/tide-booking-component 1.4.69 → 1.4.71
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 +1299 -1058
- package/build/build-cjs/src/qsm/store/qsm-slice.d.ts +4 -4
- package/build/build-cjs/src/qsm/types.d.ts +2 -14
- package/build/build-cjs/src/search-results/components/filters/filters.d.ts +1 -1
- package/build/build-cjs/src/search-results/components/filters/utility.d.ts +2 -2
- package/build/build-cjs/src/search-results/components/group-tour/group-tour-card.d.ts +8 -0
- package/build/build-cjs/src/search-results/components/group-tour/group-tour-results.d.ts +6 -0
- package/build/build-cjs/src/search-results/components/hotel/hotel-accommodation-results.d.ts +0 -2
- package/build/build-cjs/src/search-results/store/search-results-slice.d.ts +5 -8
- package/build/build-cjs/src/search-results/types.d.ts +7 -2
- package/build/build-cjs/src/search-results/utils/search-results-utils.d.ts +3 -0
- package/build/build-cjs/src/shared/components/flyin/accommodation-flyin.d.ts +8 -0
- package/build/build-cjs/src/shared/components/flyin/flights-flyin.d.ts +7 -0
- package/build/build-cjs/src/shared/components/{flyin.d.ts → flyin/flyin.d.ts} +3 -2
- package/build/build-cjs/src/shared/types.d.ts +12 -0
- package/build/build-cjs/src/shared/utils/localization-util.d.ts +5 -0
- package/build/build-esm/index.js +1285 -1053
- package/build/build-esm/src/qsm/store/qsm-slice.d.ts +4 -4
- package/build/build-esm/src/qsm/types.d.ts +2 -14
- package/build/build-esm/src/search-results/components/filters/filters.d.ts +1 -1
- package/build/build-esm/src/search-results/components/filters/utility.d.ts +2 -2
- package/build/build-esm/src/search-results/components/group-tour/group-tour-card.d.ts +8 -0
- package/build/build-esm/src/search-results/components/group-tour/group-tour-results.d.ts +6 -0
- package/build/build-esm/src/search-results/components/hotel/hotel-accommodation-results.d.ts +0 -2
- package/build/build-esm/src/search-results/store/search-results-slice.d.ts +5 -8
- package/build/build-esm/src/search-results/types.d.ts +7 -2
- package/build/build-esm/src/search-results/utils/search-results-utils.d.ts +3 -0
- package/build/build-esm/src/shared/components/flyin/accommodation-flyin.d.ts +8 -0
- package/build/build-esm/src/shared/components/flyin/flights-flyin.d.ts +7 -0
- package/build/build-esm/src/shared/components/{flyin.d.ts → flyin/flyin.d.ts} +3 -2
- package/build/build-esm/src/shared/types.d.ts +12 -0
- package/build/build-esm/src/shared/utils/localization-util.d.ts +5 -0
- package/package.json +2 -2
- package/src/qsm/components/QSMContainer/qsm-container.tsx +16 -3
- package/src/qsm/store/qsm-slice.ts +4 -4
- package/src/qsm/types.ts +2 -15
- package/src/search-results/components/filters/filters.tsx +136 -293
- package/src/search-results/components/filters/utility.tsx +61 -2
- package/src/search-results/components/group-tour/group-tour-card.tsx +100 -0
- package/src/search-results/components/group-tour/group-tour-results.tsx +40 -0
- package/src/search-results/components/hotel/hotel-accommodation-results.tsx +13 -16
- package/src/search-results/components/hotel/hotel-card.tsx +11 -8
- package/src/search-results/components/icon.tsx +18 -0
- package/src/search-results/components/search-results-container/search-results-container.tsx +62 -30
- package/src/search-results/store/search-results-slice.ts +13 -7
- package/src/search-results/types.ts +9 -2
- package/src/search-results/utils/search-results-utils.ts +42 -0
- package/src/shared/components/flyin/accommodation-flyin.tsx +40 -0
- package/src/shared/components/flyin/flights-flyin.tsx +499 -0
- package/src/shared/components/flyin/flyin.tsx +79 -0
- package/src/shared/translations/ar-SA.json +4 -2
- package/src/shared/translations/da-DK.json +4 -2
- package/src/shared/translations/de-DE.json +4 -2
- package/src/shared/translations/en-GB.json +4 -2
- package/src/shared/translations/es-ES.json +4 -2
- package/src/shared/translations/fr-BE.json +4 -2
- package/src/shared/translations/fr-FR.json +4 -2
- package/src/shared/translations/is-IS.json +4 -2
- package/src/shared/translations/it-IT.json +4 -2
- package/src/shared/translations/ja-JP.json +4 -2
- package/src/shared/translations/nl-BE.json +4 -2
- package/src/shared/translations/nl-NL.json +4 -2
- package/src/shared/translations/no-NO.json +4 -2
- package/src/shared/translations/pl-PL.json +4 -2
- package/src/shared/translations/pt-PT.json +4 -2
- package/src/shared/translations/sv-SE.json +4 -2
- package/src/shared/types.ts +13 -0
- package/src/shared/utils/localization-util.ts +16 -0
- package/styles/components/_flyin.scss +10 -0
- package/src/shared/components/flyin.tsx +0 -546
package/build/build-cjs/index.js
CHANGED
|
@@ -294,7 +294,8 @@ var FLIGHTS_FORM$f = {
|
|
|
294
294
|
EVENING_DEPARTURE: 'مساءً (18:00 - 00:00)',
|
|
295
295
|
FLIGHTS_FOUND_1: '',
|
|
296
296
|
FLIGHTS_FOUND_2: 'رحلات',
|
|
297
|
-
FLIGHTS_FOUND_3: 'تم العثور عليها'
|
|
297
|
+
FLIGHTS_FOUND_3: 'تم العثور عليها',
|
|
298
|
+
SELECT_YOUR_FARE: 'اختر السعر الخاص بك'
|
|
298
299
|
};
|
|
299
300
|
var PRODUCT$f = {
|
|
300
301
|
STAY_INCLUDED: 'الإقامة متضمنة',
|
|
@@ -620,7 +621,8 @@ var SRP$f = {
|
|
|
620
621
|
DEPARTURE_TIME_ASC: 'وقت المغادرة تصاعدياً',
|
|
621
622
|
DEPARTURE_TIME_DESC: 'وقت المغادرة تنازلياً',
|
|
622
623
|
DURATION_ASC: 'المدة تصاعدياً',
|
|
623
|
-
DURATION_DESC: 'المدة تنازلياً'
|
|
624
|
+
DURATION_DESC: 'المدة تنازلياً',
|
|
625
|
+
TRAVEL_GROUP: 'مجموعة المسافرين'
|
|
624
626
|
};
|
|
625
627
|
var arJson = {
|
|
626
628
|
STEPS: STEPS$f,
|
|
@@ -693,7 +695,8 @@ var FLIGHTS_FORM$e = {
|
|
|
693
695
|
EVENING_DEPARTURE: 'Aften (18:00 - 00:00)',
|
|
694
696
|
FLIGHTS_FOUND_1: '',
|
|
695
697
|
FLIGHTS_FOUND_2: 'fly',
|
|
696
|
-
FLIGHTS_FOUND_3: 'fundet'
|
|
698
|
+
FLIGHTS_FOUND_3: 'fundet',
|
|
699
|
+
SELECT_YOUR_FARE: 'Vælg din pris'
|
|
697
700
|
};
|
|
698
701
|
var PRODUCT$e = {
|
|
699
702
|
STAY_INCLUDED: 'Ophold inkluderet',
|
|
@@ -1019,7 +1022,8 @@ var SRP$e = {
|
|
|
1019
1022
|
DEPARTURE_TIME_ASC: 'Afgangstid stigende',
|
|
1020
1023
|
DEPARTURE_TIME_DESC: 'Afgangstid faldende',
|
|
1021
1024
|
DURATION_ASC: 'Varighed stigende',
|
|
1022
|
-
DURATION_DESC: 'Varighed faldende'
|
|
1025
|
+
DURATION_DESC: 'Varighed faldende',
|
|
1026
|
+
TRAVEL_GROUP: 'Rejseselskab'
|
|
1023
1027
|
};
|
|
1024
1028
|
var daJson = {
|
|
1025
1029
|
STEPS: STEPS$e,
|
|
@@ -1092,7 +1096,8 @@ var FLIGHTS_FORM$d = {
|
|
|
1092
1096
|
EVENING_DEPARTURE: 'Abend (18:00 - 00:00)',
|
|
1093
1097
|
FLIGHTS_FOUND_1: '',
|
|
1094
1098
|
FLIGHTS_FOUND_2: 'Flüge',
|
|
1095
|
-
FLIGHTS_FOUND_3: 'gefunden'
|
|
1099
|
+
FLIGHTS_FOUND_3: 'gefunden',
|
|
1100
|
+
SELECT_YOUR_FARE: 'Wählen Sie Ihren Tarif'
|
|
1096
1101
|
};
|
|
1097
1102
|
var PRODUCT$d = {
|
|
1098
1103
|
STAY_INCLUDED: 'Aufenthalt inbegriffen',
|
|
@@ -1419,7 +1424,8 @@ var SRP$d = {
|
|
|
1419
1424
|
DEPARTURE_RANGE: 'Abflugzeitraum',
|
|
1420
1425
|
DEPARTURE_AIRPORTS: 'Abflughäfen',
|
|
1421
1426
|
ARRIVAL_AIRPORTS: 'Ankunftsflughäfen',
|
|
1422
|
-
PRICE: 'Preis'
|
|
1427
|
+
PRICE: 'Preis',
|
|
1428
|
+
TRAVEL_GROUP: 'Reisegruppe'
|
|
1423
1429
|
};
|
|
1424
1430
|
var deJson = {
|
|
1425
1431
|
STEPS: STEPS$d,
|
|
@@ -1492,7 +1498,8 @@ var FLIGHTS_FORM$c = {
|
|
|
1492
1498
|
EVENING_DEPARTURE: 'Evening (18:00 - 00:00)',
|
|
1493
1499
|
FLIGHTS_FOUND_1: '',
|
|
1494
1500
|
FLIGHTS_FOUND_2: 'flights',
|
|
1495
|
-
FLIGHTS_FOUND_3: 'found'
|
|
1501
|
+
FLIGHTS_FOUND_3: 'found',
|
|
1502
|
+
SELECT_YOUR_FARE: 'Select your fare'
|
|
1496
1503
|
};
|
|
1497
1504
|
var PRODUCT$c = {
|
|
1498
1505
|
STAY_INCLUDED: 'Stay included',
|
|
@@ -1822,7 +1829,8 @@ var SRP$c = {
|
|
|
1822
1829
|
NIGHT_RANGE: 'Night',
|
|
1823
1830
|
DEPARTURE_RANGE: 'Departure range',
|
|
1824
1831
|
DEPARTURE_AIRPORTS: 'Departure airports',
|
|
1825
|
-
ARRIVAL_AIRPORTS: 'Arrival airports'
|
|
1832
|
+
ARRIVAL_AIRPORTS: 'Arrival airports',
|
|
1833
|
+
TRAVEL_GROUP: 'Travel group'
|
|
1826
1834
|
};
|
|
1827
1835
|
var enJson = {
|
|
1828
1836
|
STEPS: STEPS$c,
|
|
@@ -1895,7 +1903,8 @@ var FLIGHTS_FORM$b = {
|
|
|
1895
1903
|
EVENING_DEPARTURE: 'Noche (18:00 - 00:00)',
|
|
1896
1904
|
FLIGHTS_FOUND_1: '',
|
|
1897
1905
|
FLIGHTS_FOUND_2: 'vuelos',
|
|
1898
|
-
FLIGHTS_FOUND_3: 'encontrados'
|
|
1906
|
+
FLIGHTS_FOUND_3: 'encontrados',
|
|
1907
|
+
SELECT_YOUR_FARE: 'Seleccione su tarifa'
|
|
1899
1908
|
};
|
|
1900
1909
|
var PRODUCT$b = {
|
|
1901
1910
|
STAY_INCLUDED: 'Estancia incluida',
|
|
@@ -2222,7 +2231,8 @@ var SRP$b = {
|
|
|
2222
2231
|
DEPARTURE_RANGE: 'Franja de salida',
|
|
2223
2232
|
DEPARTURE_AIRPORTS: 'Aeropuertos de salida',
|
|
2224
2233
|
ARRIVAL_AIRPORTS: 'Aeropuertos de llegada',
|
|
2225
|
-
PRICE: 'Precio'
|
|
2234
|
+
PRICE: 'Precio',
|
|
2235
|
+
TRAVEL_GROUP: 'Grupo de viaje'
|
|
2226
2236
|
};
|
|
2227
2237
|
var esJson = {
|
|
2228
2238
|
STEPS: STEPS$b,
|
|
@@ -2295,7 +2305,8 @@ var FLIGHTS_FORM$a = {
|
|
|
2295
2305
|
EVENING_DEPARTURE: 'Soir (18:00 - 00:00)',
|
|
2296
2306
|
FLIGHTS_FOUND_1: '',
|
|
2297
2307
|
FLIGHTS_FOUND_2: 'vols',
|
|
2298
|
-
FLIGHTS_FOUND_3: 'trouvés'
|
|
2308
|
+
FLIGHTS_FOUND_3: 'trouvés',
|
|
2309
|
+
SELECT_YOUR_FARE: 'Sélectionnez votre tarif'
|
|
2299
2310
|
};
|
|
2300
2311
|
var PRODUCT$a = {
|
|
2301
2312
|
STAY_INCLUDED: 'Séjour inclus',
|
|
@@ -2626,7 +2637,8 @@ var SRP$a = {
|
|
|
2626
2637
|
DEPARTURE_RANGE: 'Plage de départ',
|
|
2627
2638
|
DEPARTURE_AIRPORTS: 'Aéroports de départ',
|
|
2628
2639
|
ARRIVAL_AIRPORTS: 'Aéroports d’arrivée',
|
|
2629
|
-
PRICE: 'Prix'
|
|
2640
|
+
PRICE: 'Prix',
|
|
2641
|
+
TRAVEL_GROUP: 'Groupe de voyageurs'
|
|
2630
2642
|
};
|
|
2631
2643
|
var frBeJson = {
|
|
2632
2644
|
STEPS: STEPS$a,
|
|
@@ -2699,7 +2711,8 @@ var FLIGHTS_FORM$9 = {
|
|
|
2699
2711
|
EVENING_DEPARTURE: 'Soir (18:00 - 00:00)',
|
|
2700
2712
|
FLIGHTS_FOUND_1: '',
|
|
2701
2713
|
FLIGHTS_FOUND_2: 'vols',
|
|
2702
|
-
FLIGHTS_FOUND_3: 'trouvés'
|
|
2714
|
+
FLIGHTS_FOUND_3: 'trouvés',
|
|
2715
|
+
SELECT_YOUR_FARE: 'Sélectionnez votre tarif'
|
|
2703
2716
|
};
|
|
2704
2717
|
var PRODUCT$9 = {
|
|
2705
2718
|
STAY_INCLUDED: 'Séjour inclus',
|
|
@@ -3025,7 +3038,8 @@ var SRP$9 = {
|
|
|
3025
3038
|
DEPARTURE_RANGE: 'Plage de départ',
|
|
3026
3039
|
DEPARTURE_AIRPORTS: 'Aéroports de départ',
|
|
3027
3040
|
ARRIVAL_AIRPORTS: 'Aéroports d’arrivée',
|
|
3028
|
-
PRICE: 'Prix'
|
|
3041
|
+
PRICE: 'Prix',
|
|
3042
|
+
TRAVEL_GROUP: 'Groupe de voyageurs'
|
|
3029
3043
|
};
|
|
3030
3044
|
var frFrJson = {
|
|
3031
3045
|
STEPS: STEPS$9,
|
|
@@ -3098,7 +3112,8 @@ var FLIGHTS_FORM$8 = {
|
|
|
3098
3112
|
EVENING_DEPARTURE: 'Kvöld (18:00 - 00:00)',
|
|
3099
3113
|
FLIGHTS_FOUND_1: '',
|
|
3100
3114
|
FLIGHTS_FOUND_2: 'flug',
|
|
3101
|
-
FLIGHTS_FOUND_3: 'fundust'
|
|
3115
|
+
FLIGHTS_FOUND_3: 'fundust',
|
|
3116
|
+
SELECT_YOUR_FARE: 'Veldu flugverð'
|
|
3102
3117
|
};
|
|
3103
3118
|
var PRODUCT$8 = {
|
|
3104
3119
|
STAY_INCLUDED: 'Dvöl innifalin',
|
|
@@ -3424,7 +3439,8 @@ var SRP$8 = {
|
|
|
3424
3439
|
DEPARTURE_RANGE: 'Brottfarartímabil',
|
|
3425
3440
|
DEPARTURE_AIRPORTS: 'Brottfararflugvellir',
|
|
3426
3441
|
ARRIVAL_AIRPORTS: 'Komuflugvellir',
|
|
3427
|
-
PRICE: 'Verð'
|
|
3442
|
+
PRICE: 'Verð',
|
|
3443
|
+
TRAVEL_GROUP: 'Ferðahópur'
|
|
3428
3444
|
};
|
|
3429
3445
|
var isJson = {
|
|
3430
3446
|
STEPS: STEPS$8,
|
|
@@ -3497,7 +3513,8 @@ var FLIGHTS_FORM$7 = {
|
|
|
3497
3513
|
EVENING_DEPARTURE: 'Sera (18:00 - 00:00)',
|
|
3498
3514
|
FLIGHTS_FOUND_1: '',
|
|
3499
3515
|
FLIGHTS_FOUND_2: 'voli',
|
|
3500
|
-
FLIGHTS_FOUND_3: 'trovati'
|
|
3516
|
+
FLIGHTS_FOUND_3: 'trovati',
|
|
3517
|
+
SELECT_YOUR_FARE: 'Seleziona la tua tariffa'
|
|
3501
3518
|
};
|
|
3502
3519
|
var PRODUCT$7 = {
|
|
3503
3520
|
STAY_INCLUDED: 'Soggiorno incluso',
|
|
@@ -3824,7 +3841,8 @@ var SRP$7 = {
|
|
|
3824
3841
|
DEPARTURE_RANGE: 'Fascia di partenza',
|
|
3825
3842
|
DEPARTURE_AIRPORTS: 'Aeroporti di partenza',
|
|
3826
3843
|
ARRIVAL_AIRPORTS: 'Aeroporti di arrivo',
|
|
3827
|
-
PRICE: 'Prezzo'
|
|
3844
|
+
PRICE: 'Prezzo',
|
|
3845
|
+
TRAVEL_GROUP: 'Gruppo di viaggio'
|
|
3828
3846
|
};
|
|
3829
3847
|
var itJson = {
|
|
3830
3848
|
STEPS: STEPS$7,
|
|
@@ -3897,7 +3915,8 @@ var FLIGHTS_FORM$6 = {
|
|
|
3897
3915
|
EVENING_DEPARTURE: 'Avond (18:00 - 00:00)',
|
|
3898
3916
|
FLIGHTS_FOUND_1: 'Er zijn',
|
|
3899
3917
|
FLIGHTS_FOUND_2: 'vluchten',
|
|
3900
|
-
FLIGHTS_FOUND_3: 'gevonden'
|
|
3918
|
+
FLIGHTS_FOUND_3: 'gevonden',
|
|
3919
|
+
SELECT_YOUR_FARE: 'Selecteer uw tarief'
|
|
3901
3920
|
};
|
|
3902
3921
|
var PRODUCT$6 = {
|
|
3903
3922
|
STAY_INCLUDED: 'Inclusief verblijf',
|
|
@@ -4228,7 +4247,8 @@ var SRP$6 = {
|
|
|
4228
4247
|
DEPARTURE_RANGE: 'Vertrektijdstip',
|
|
4229
4248
|
DEPARTURE_AIRPORTS: 'Vertrekluchthavens',
|
|
4230
4249
|
ARRIVAL_AIRPORTS: 'Aankomstluchthavens',
|
|
4231
|
-
PRICE: 'Prijs'
|
|
4250
|
+
PRICE: 'Prijs',
|
|
4251
|
+
TRAVEL_GROUP: 'Reisgezelschap'
|
|
4232
4252
|
};
|
|
4233
4253
|
var nlBeJson = {
|
|
4234
4254
|
STEPS: STEPS$6,
|
|
@@ -4301,7 +4321,8 @@ var FLIGHTS_FORM$5 = {
|
|
|
4301
4321
|
EVENING_DEPARTURE: 'Avond (18:00 - 00:00)',
|
|
4302
4322
|
FLIGHTS_FOUND_1: '',
|
|
4303
4323
|
FLIGHTS_FOUND_2: 'vluchten',
|
|
4304
|
-
FLIGHTS_FOUND_3: 'gevonden'
|
|
4324
|
+
FLIGHTS_FOUND_3: 'gevonden',
|
|
4325
|
+
SELECT_YOUR_FARE: 'Selecteer uw tarief'
|
|
4305
4326
|
};
|
|
4306
4327
|
var PRODUCT$5 = {
|
|
4307
4328
|
STAY_INCLUDED: 'Verblijf inbegrepen',
|
|
@@ -4628,7 +4649,8 @@ var SRP$5 = {
|
|
|
4628
4649
|
DEPARTURE_RANGE: 'Vertrektijdstip',
|
|
4629
4650
|
DEPARTURE_AIRPORTS: 'Vertrekluchthavens',
|
|
4630
4651
|
ARRIVAL_AIRPORTS: 'Aankomstluchthavens',
|
|
4631
|
-
PRICE: 'Prijs'
|
|
4652
|
+
PRICE: 'Prijs',
|
|
4653
|
+
TRAVEL_GROUP: 'Reisgezelschap'
|
|
4632
4654
|
};
|
|
4633
4655
|
var nlNlJson = {
|
|
4634
4656
|
STEPS: STEPS$5,
|
|
@@ -4701,7 +4723,8 @@ var FLIGHTS_FORM$4 = {
|
|
|
4701
4723
|
EVENING_DEPARTURE: 'Kveld (18:00 - 00:00)',
|
|
4702
4724
|
FLIGHTS_FOUND_1: '',
|
|
4703
4725
|
FLIGHTS_FOUND_2: 'fly',
|
|
4704
|
-
FLIGHTS_FOUND_3: 'funnet'
|
|
4726
|
+
FLIGHTS_FOUND_3: 'funnet',
|
|
4727
|
+
SELECT_YOUR_FARE: 'Velg din pris:'
|
|
4705
4728
|
};
|
|
4706
4729
|
var PRODUCT$4 = {
|
|
4707
4730
|
STAY_INCLUDED: 'Opphold inkludert',
|
|
@@ -5028,7 +5051,8 @@ var SRP$4 = {
|
|
|
5028
5051
|
DEPARTURE_RANGE: 'Avgangsperiode',
|
|
5029
5052
|
DEPARTURE_AIRPORTS: 'Avgangsflyplasser',
|
|
5030
5053
|
ARRIVAL_AIRPORTS: 'Ankomstflyplasser',
|
|
5031
|
-
PRICE: 'Pris'
|
|
5054
|
+
PRICE: 'Pris',
|
|
5055
|
+
TRAVEL_GROUP: 'Reisefølge'
|
|
5032
5056
|
};
|
|
5033
5057
|
var noJson = {
|
|
5034
5058
|
STEPS: STEPS$4,
|
|
@@ -5101,7 +5125,8 @@ var FLIGHTS_FORM$3 = {
|
|
|
5101
5125
|
EVENING_DEPARTURE: 'Wieczór (18:00 - 00:00)',
|
|
5102
5126
|
FLIGHTS_FOUND_1: '',
|
|
5103
5127
|
FLIGHTS_FOUND_2: 'lotów',
|
|
5104
|
-
FLIGHTS_FOUND_3: 'znaleziono'
|
|
5128
|
+
FLIGHTS_FOUND_3: 'znaleziono',
|
|
5129
|
+
SELECT_YOUR_FARE: 'Wybierz swój taryfę'
|
|
5105
5130
|
};
|
|
5106
5131
|
var PRODUCT$3 = {
|
|
5107
5132
|
STAY_INCLUDED: 'Pobyt wliczony w cenę',
|
|
@@ -5428,7 +5453,8 @@ var SRP$3 = {
|
|
|
5428
5453
|
DEPARTURE_RANGE: 'Zakres wylotu',
|
|
5429
5454
|
DEPARTURE_AIRPORTS: 'Lotniska wylotu',
|
|
5430
5455
|
ARRIVAL_AIRPORTS: 'Lotniska przylotu',
|
|
5431
|
-
PRICE: 'Cena'
|
|
5456
|
+
PRICE: 'Cena',
|
|
5457
|
+
TRAVEL_GROUP: 'Grupa podróżnych'
|
|
5432
5458
|
};
|
|
5433
5459
|
var plJson = {
|
|
5434
5460
|
STEPS: STEPS$3,
|
|
@@ -5501,7 +5527,8 @@ var FLIGHTS_FORM$2 = {
|
|
|
5501
5527
|
EVENING_DEPARTURE: 'Noite (18:00 - 00:00)',
|
|
5502
5528
|
FLIGHTS_FOUND_1: '',
|
|
5503
5529
|
FLIGHTS_FOUND_2: 'voos',
|
|
5504
|
-
FLIGHTS_FOUND_3: 'encontrados'
|
|
5530
|
+
FLIGHTS_FOUND_3: 'encontrados',
|
|
5531
|
+
SELECT_YOUR_FARE: 'Selecione a sua tarifa:'
|
|
5505
5532
|
};
|
|
5506
5533
|
var PRODUCT$2 = {
|
|
5507
5534
|
STAY_INCLUDED: 'Estadia incluída',
|
|
@@ -5828,7 +5855,8 @@ var SRP$2 = {
|
|
|
5828
5855
|
DEPARTURE_RANGE: 'Intervalo de partida',
|
|
5829
5856
|
DEPARTURE_AIRPORTS: 'Aeroportos de partida',
|
|
5830
5857
|
ARRIVAL_AIRPORTS: 'Aeroportos de chegada',
|
|
5831
|
-
PRICE: 'Preço'
|
|
5858
|
+
PRICE: 'Preço',
|
|
5859
|
+
TRAVEL_GROUP: 'Grupo de viajantes'
|
|
5832
5860
|
};
|
|
5833
5861
|
var ptJson = {
|
|
5834
5862
|
STEPS: STEPS$2,
|
|
@@ -5901,7 +5929,8 @@ var FLIGHTS_FORM$1 = {
|
|
|
5901
5929
|
EVENING_DEPARTURE: 'Kväll (18:00 – 00:00)',
|
|
5902
5930
|
FLIGHTS_FOUND_1: '',
|
|
5903
5931
|
FLIGHTS_FOUND_2: 'flyg',
|
|
5904
|
-
FLIGHTS_FOUND_3: 'hittades'
|
|
5932
|
+
FLIGHTS_FOUND_3: 'hittades',
|
|
5933
|
+
SELECT_YOUR_FARE: 'Välj din pris:'
|
|
5905
5934
|
};
|
|
5906
5935
|
var PRODUCT$1 = {
|
|
5907
5936
|
STAY_INCLUDED: 'Boende ingår',
|
|
@@ -6228,7 +6257,8 @@ var SRP$1 = {
|
|
|
6228
6257
|
DEPARTURE_RANGE: 'Avgångsintervall',
|
|
6229
6258
|
DEPARTURE_AIRPORTS: 'Avgångsflygplatser',
|
|
6230
6259
|
ARRIVAL_AIRPORTS: 'Ankomstflygplatser',
|
|
6231
|
-
PRICE: 'Pris'
|
|
6260
|
+
PRICE: 'Pris',
|
|
6261
|
+
TRAVEL_GROUP: 'Resesällskap'
|
|
6232
6262
|
};
|
|
6233
6263
|
var svJson = {
|
|
6234
6264
|
STEPS: STEPS$1,
|
|
@@ -6301,7 +6331,8 @@ var FLIGHTS_FORM = {
|
|
|
6301
6331
|
EVENING_DEPARTURE: '夜 (18:00 - 00:00)',
|
|
6302
6332
|
FLIGHTS_FOUND_1: '',
|
|
6303
6333
|
FLIGHTS_FOUND_2: '件のフライトが',
|
|
6304
|
-
FLIGHTS_FOUND_3: '見つかりました'
|
|
6334
|
+
FLIGHTS_FOUND_3: '見つかりました',
|
|
6335
|
+
SELECT_YOUR_FARE: '料金を選択してください'
|
|
6305
6336
|
};
|
|
6306
6337
|
var PRODUCT = {
|
|
6307
6338
|
STAY_INCLUDED: '宿泊込み',
|
|
@@ -6626,7 +6657,8 @@ var SRP = {
|
|
|
6626
6657
|
DEPARTURE_RANGE: '出発時間帯',
|
|
6627
6658
|
DEPARTURE_AIRPORTS: '出発空港',
|
|
6628
6659
|
ARRIVAL_AIRPORTS: '到着空港',
|
|
6629
|
-
PRICE: '価格'
|
|
6660
|
+
PRICE: '価格',
|
|
6661
|
+
TRAVEL_GROUP: '旅行グループ'
|
|
6630
6662
|
};
|
|
6631
6663
|
var jaJson = {
|
|
6632
6664
|
STEPS: STEPS,
|
|
@@ -6833,6 +6865,18 @@ var rangeFromDateTimeInMinutes = function (dateTime) {
|
|
|
6833
6865
|
return exports.DepartureRange.Night;
|
|
6834
6866
|
}
|
|
6835
6867
|
};
|
|
6868
|
+
var calculateNights = function (fromDate, toDate) {
|
|
6869
|
+
var from = new Date(fromDate);
|
|
6870
|
+
var to = new Date(toDate);
|
|
6871
|
+
// Normalize to midnight to avoid time issues
|
|
6872
|
+
from.setHours(0, 0, 0, 0);
|
|
6873
|
+
to.setHours(0, 0, 0, 0);
|
|
6874
|
+
var diffTime = to.getTime() - from.getTime();
|
|
6875
|
+
return Math.round(diffTime / (1000 * 60 * 60 * 24));
|
|
6876
|
+
};
|
|
6877
|
+
var calculateDays = function (fromDate, toDate) {
|
|
6878
|
+
return calculateNights(fromDate, toDate) + 1;
|
|
6879
|
+
};
|
|
6836
6880
|
|
|
6837
6881
|
var getDateFromParams = function (params, name) {
|
|
6838
6882
|
var dateString = params.get(name);
|
|
@@ -32963,6 +33007,17 @@ var QSMContainer = function () {
|
|
|
32963
33007
|
};
|
|
32964
33008
|
var handleQsmTypeChange = function (value) {
|
|
32965
33009
|
dispatch(setSelectedQsmType(value));
|
|
33010
|
+
if (value === 'groupTour') {
|
|
33011
|
+
handleDateChange({
|
|
33012
|
+
fromDate: new Date(fromDate !== null && fromDate !== void 0 ? fromDate : Date.now()),
|
|
33013
|
+
toDate: dateFns.addYears(new Date(fromDate !== null && fromDate !== void 0 ? fromDate : Date.now()), 1)
|
|
33014
|
+
});
|
|
33015
|
+
} else {
|
|
33016
|
+
handleDateChange({
|
|
33017
|
+
fromDate: new Date(fromDate !== null && fromDate !== void 0 ? fromDate : Date.now()),
|
|
33018
|
+
toDate: dateFns.addDays(new Date(fromDate !== null && fromDate !== void 0 ? fromDate : Date.now()), 7)
|
|
33019
|
+
});
|
|
33020
|
+
}
|
|
32966
33021
|
};
|
|
32967
33022
|
var handleSubmit = function () {
|
|
32968
33023
|
if (!onSubmit) return;
|
|
@@ -33425,7 +33480,8 @@ var SearchResultsConfigurationContext = React__default['default'].createContext(
|
|
|
33425
33480
|
var _a;
|
|
33426
33481
|
var initialState$1 = {
|
|
33427
33482
|
results: [],
|
|
33428
|
-
|
|
33483
|
+
filteredResults: [],
|
|
33484
|
+
selectedSearchResultId: null,
|
|
33429
33485
|
selectedFlight: null,
|
|
33430
33486
|
selectedFlightDetails: null,
|
|
33431
33487
|
bookingPackageDetails: null,
|
|
@@ -33442,10 +33498,13 @@ var searchResultsSlice = toolkit.createSlice({
|
|
|
33442
33498
|
initialState: initialState$1,
|
|
33443
33499
|
reducers: {
|
|
33444
33500
|
setResults: function (state, action) {
|
|
33445
|
-
state.results = action.payload
|
|
33501
|
+
state.results = action.payload;
|
|
33446
33502
|
},
|
|
33447
|
-
|
|
33448
|
-
state.
|
|
33503
|
+
setFilteredResults: function (state, action) {
|
|
33504
|
+
state.filteredResults = action.payload;
|
|
33505
|
+
},
|
|
33506
|
+
setSelectedSearchResult: function (state, action) {
|
|
33507
|
+
state.selectedSearchResultId = action.payload;
|
|
33449
33508
|
},
|
|
33450
33509
|
setSelectedFlight: function (state, action) {
|
|
33451
33510
|
state.selectedFlight = action.payload;
|
|
@@ -33511,7 +33570,8 @@ var searchResultsSlice = toolkit.createSlice({
|
|
|
33511
33570
|
}
|
|
33512
33571
|
});
|
|
33513
33572
|
var setResults = ((_a = searchResultsSlice.actions), _a.setResults),
|
|
33514
|
-
|
|
33573
|
+
setFilteredResults = _a.setFilteredResults,
|
|
33574
|
+
setSelectedSearchResult = _a.setSelectedSearchResult,
|
|
33515
33575
|
setSelectedFlight = _a.setSelectedFlight,
|
|
33516
33576
|
setSelectedFlightDetails = _a.setSelectedFlightDetails,
|
|
33517
33577
|
setBookingPackageDetails = _a.setBookingPackageDetails,
|
|
@@ -34527,6 +34587,27 @@ var Icon$1 = function (_a) {
|
|
|
34527
34587
|
fill: 'currentColor'
|
|
34528
34588
|
})
|
|
34529
34589
|
);
|
|
34590
|
+
case 'ui-other':
|
|
34591
|
+
return React__default['default'].createElement(
|
|
34592
|
+
'svg',
|
|
34593
|
+
{
|
|
34594
|
+
className: ['icon', 'icon--'.concat(name), className]
|
|
34595
|
+
.filter(function (className) {
|
|
34596
|
+
return !lodash.isEmpty(className);
|
|
34597
|
+
})
|
|
34598
|
+
.join(' '),
|
|
34599
|
+
width: width,
|
|
34600
|
+
height: height,
|
|
34601
|
+
viewBox: '0 0 640 512',
|
|
34602
|
+
fill: fill !== null && fill !== void 0 ? fill : 'currentColor'
|
|
34603
|
+
},
|
|
34604
|
+
React__default['default'].createElement(HTMLComment, { text: '!Font Awesome Free 6.7.2 - mars-and-venus' }),
|
|
34605
|
+
title && React__default['default'].createElement('title', null, title),
|
|
34606
|
+
React__default['default'].createElement('path', {
|
|
34607
|
+
d: 'M320 32c0-17.7 14.3-32 32-32l128 0c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-50.7-64.2 64.2c19.5 28.4 31 62.7 31 99.8 0 97.2-78.8 176-176 176S32 401.2 32 304s78.8-176 176-176c37.1 0 71.4 11.5 99.8 31l64.2-64.2L320 96c-17.7 0-32-14.3-32-32zM208 416a112 112 0 1 0 0-224 112 112 0 1 0 0 224z',
|
|
34608
|
+
fill: 'currentColor'
|
|
34609
|
+
})
|
|
34610
|
+
);
|
|
34530
34611
|
default:
|
|
34531
34612
|
return null;
|
|
34532
34613
|
}
|
|
@@ -36957,88 +37038,40 @@ var useFlightSearch = function () {
|
|
|
36957
37038
|
return context;
|
|
36958
37039
|
};
|
|
36959
37040
|
|
|
36960
|
-
var
|
|
37041
|
+
var FlightsFlyIn = function (_a) {
|
|
36961
37042
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
36962
|
-
_a.srpType;
|
|
36963
37043
|
var isOpen = _a.isOpen,
|
|
36964
|
-
setIsOpen = _a.setIsOpen
|
|
36965
|
-
_p = _a.className,
|
|
36966
|
-
className = _p === void 0 ? '' : _p,
|
|
36967
|
-
onPanelRef = _a.onPanelRef;
|
|
37044
|
+
setIsOpen = _a.setIsOpen;
|
|
36968
37045
|
var context = React.useContext(SearchResultsConfigurationContext);
|
|
36969
37046
|
var language = (_b = context === null || context === void 0 ? void 0 : context.languageCode) !== null && _b !== void 0 ? _b : 'en-GB';
|
|
36970
37047
|
var translations = getTranslations(language);
|
|
36971
37048
|
var dispatch = reactRedux.useDispatch();
|
|
36972
|
-
var
|
|
36973
|
-
flightSearchDetailsLoading =
|
|
36974
|
-
flightDetailsSearchResults =
|
|
36975
|
-
onCancelSearch =
|
|
36976
|
-
numberOfTravellers =
|
|
37049
|
+
var _p = useFlightSearch(),
|
|
37050
|
+
flightSearchDetailsLoading = _p.flightSearchDetailsLoading,
|
|
37051
|
+
flightDetailsSearchResults = _p.flightDetailsSearchResults,
|
|
37052
|
+
onCancelSearch = _p.onCancelSearch,
|
|
37053
|
+
numberOfTravellers = _p.numberOfTravellers;
|
|
36977
37054
|
var selectedFlight = reactRedux.useSelector(function (state) {
|
|
36978
37055
|
return state.searchResults;
|
|
36979
37056
|
}).selectedFlight;
|
|
36980
|
-
var
|
|
36981
|
-
|
|
36982
|
-
|
|
36983
|
-
|
|
36984
|
-
|
|
36985
|
-
|
|
36986
|
-
|
|
36987
|
-
|
|
36988
|
-
|
|
36989
|
-
|
|
36990
|
-
|
|
36991
|
-
|
|
36992
|
-
|
|
36993
|
-
|
|
36994
|
-
|
|
36995
|
-
|
|
36996
|
-
|
|
36997
|
-
|
|
36998
|
-
setSelectedReturnFareCode = _w[1];
|
|
36999
|
-
// expose DOM node if needed
|
|
37000
|
-
React.useEffect(
|
|
37001
|
-
function () {
|
|
37002
|
-
onPanelRef === null || onPanelRef === void 0 ? void 0 : onPanelRef(panelRef.current);
|
|
37003
|
-
return function () {
|
|
37004
|
-
return onPanelRef === null || onPanelRef === void 0 ? void 0 : onPanelRef(null);
|
|
37005
|
-
};
|
|
37006
|
-
},
|
|
37007
|
-
[onPanelRef]
|
|
37008
|
-
);
|
|
37009
|
-
React.useEffect(
|
|
37010
|
-
function () {
|
|
37011
|
-
// click outside detection
|
|
37012
|
-
var handleClickOutside = function (event) {
|
|
37013
|
-
if (isOpen && panelRef.current && !panelRef.current.contains(event.target)) {
|
|
37014
|
-
handleClose();
|
|
37015
|
-
}
|
|
37016
|
-
};
|
|
37017
|
-
document.addEventListener('mousedown', handleClickOutside);
|
|
37018
|
-
return function () {
|
|
37019
|
-
return document.removeEventListener('mousedown', handleClickOutside);
|
|
37020
|
-
};
|
|
37021
|
-
},
|
|
37022
|
-
[isOpen, setIsOpen]
|
|
37023
|
-
);
|
|
37024
|
-
// body scroll lock
|
|
37025
|
-
React.useEffect(
|
|
37026
|
-
function () {
|
|
37027
|
-
document.body.style.overflow = isOpen ? 'hidden' : '';
|
|
37028
|
-
return function () {
|
|
37029
|
-
document.body.style.overflow = '';
|
|
37030
|
-
};
|
|
37031
|
-
},
|
|
37032
|
-
[isOpen]
|
|
37033
|
-
);
|
|
37034
|
-
var handleClose = function () {
|
|
37035
|
-
if (isOpen && panelRef.current) {
|
|
37036
|
-
dispatch(setSelectedFlight(null));
|
|
37037
|
-
dispatch(setSelectedFlightDetails(null));
|
|
37038
|
-
onCancelSearch();
|
|
37039
|
-
setIsOpen(false);
|
|
37040
|
-
}
|
|
37041
|
-
};
|
|
37057
|
+
var _q = React.useState([]),
|
|
37058
|
+
flights = _q[0],
|
|
37059
|
+
setFlights = _q[1];
|
|
37060
|
+
var _r = React.useState(undefined),
|
|
37061
|
+
flight = _r[0],
|
|
37062
|
+
setFlight = _r[1];
|
|
37063
|
+
var _s = React.useState([]),
|
|
37064
|
+
uniqueOutwardFlights = _s[0],
|
|
37065
|
+
setUniqueOutwardFlights = _s[1];
|
|
37066
|
+
var _t = React.useState(null),
|
|
37067
|
+
selectedOutwardFareCode = _t[0],
|
|
37068
|
+
setSelectedOutwardFareCode = _t[1];
|
|
37069
|
+
var _u = React.useState([]),
|
|
37070
|
+
uniqueReturnFlights = _u[0],
|
|
37071
|
+
setUniqueReturnFlights = _u[1];
|
|
37072
|
+
var _v = React.useState(null),
|
|
37073
|
+
selectedReturnFareCode = _v[0],
|
|
37074
|
+
setSelectedReturnFareCode = _v[1];
|
|
37042
37075
|
React.useEffect(
|
|
37043
37076
|
function () {
|
|
37044
37077
|
var _a, _b, _c, _d;
|
|
@@ -37226,334 +37259,20 @@ var FlyIn = function (_a) {
|
|
|
37226
37259
|
};
|
|
37227
37260
|
// TODO: go to booking page?
|
|
37228
37261
|
var handleConfirm = function () {
|
|
37229
|
-
if (isOpen
|
|
37262
|
+
if (isOpen) {
|
|
37230
37263
|
onCancelSearch();
|
|
37231
37264
|
setIsOpen(false);
|
|
37232
37265
|
}
|
|
37233
37266
|
};
|
|
37234
37267
|
return React__default['default'].createElement(
|
|
37235
|
-
'
|
|
37236
|
-
|
|
37268
|
+
React__default['default'].Fragment,
|
|
37269
|
+
null,
|
|
37237
37270
|
React__default['default'].createElement(
|
|
37238
37271
|
'div',
|
|
37239
|
-
{ className: '
|
|
37240
|
-
|
|
37241
|
-
'
|
|
37242
|
-
|
|
37243
|
-
React__default['default'].createElement(
|
|
37244
|
-
'div',
|
|
37245
|
-
{ className: 'flyin__content-title-row' },
|
|
37246
|
-
React__default['default'].createElement('h3', { className: 'flyin__content-title' }, 'Select your fare'),
|
|
37247
|
-
React__default['default'].createElement(
|
|
37248
|
-
'span',
|
|
37249
|
-
{
|
|
37250
|
-
className: 'flyin__close',
|
|
37251
|
-
onClick: function () {
|
|
37252
|
-
return handleClose();
|
|
37253
|
-
}
|
|
37254
|
-
},
|
|
37255
|
-
React__default['default'].createElement(Icon, { name: 'ui-close', width: 30, height: 30, 'aria-hidden': 'true' })
|
|
37256
|
-
)
|
|
37257
|
-
),
|
|
37258
|
-
flightSearchDetailsLoading || lodash.isEmpty(flights)
|
|
37259
|
-
? React__default['default'].createElement(Spinner, null)
|
|
37260
|
-
: flight &&
|
|
37261
|
-
React__default['default'].createElement(
|
|
37262
|
-
'div',
|
|
37263
|
-
{ className: 'flyin__content-text-row' },
|
|
37264
|
-
React__default['default'].createElement(
|
|
37265
|
-
'div',
|
|
37266
|
-
{ className: 'flyin__content-text-icon-row' },
|
|
37267
|
-
React__default['default'].createElement('img', {
|
|
37268
|
-
src: 'https://media.tidesoftware.be/media/shared/Airlines/'.concat(
|
|
37269
|
-
(_c = getDepartureSegment(flight.outward)) === null || _c === void 0 ? void 0 : _c.marketingAirlineCode,
|
|
37270
|
-
'.png?height=256'
|
|
37271
|
-
),
|
|
37272
|
-
alt: 'airline-logo',
|
|
37273
|
-
className: 'logo',
|
|
37274
|
-
'aria-hidden': 'true'
|
|
37275
|
-
}),
|
|
37276
|
-
React__default['default'].createElement(
|
|
37277
|
-
'div',
|
|
37278
|
-
{ className: 'flyin__content-text-col' },
|
|
37279
|
-
React__default['default'].createElement(
|
|
37280
|
-
'span',
|
|
37281
|
-
{ className: 'flyin__content-text-title-row' },
|
|
37282
|
-
React__default['default'].createElement('strong', null, translations.SRP.DEPARTURE),
|
|
37283
|
-
' ',
|
|
37284
|
-
(_d = getDepartureSegment(flight === null || flight === void 0 ? void 0 : flight.outward)) === null || _d === void 0
|
|
37285
|
-
? void 0
|
|
37286
|
-
: _d.departureAirportCode,
|
|
37287
|
-
' -',
|
|
37288
|
-
' ',
|
|
37289
|
-
(_e = getArrivalSegment(flight === null || flight === void 0 ? void 0 : flight.outward)) === null || _e === void 0
|
|
37290
|
-
? void 0
|
|
37291
|
-
: _e.arrivalAirportCode
|
|
37292
|
-
),
|
|
37293
|
-
React__default['default'].createElement(
|
|
37294
|
-
'span',
|
|
37295
|
-
{ className: 'flyin__content-text' },
|
|
37296
|
-
timeFromDateTime(
|
|
37297
|
-
(_f = getDepartureSegment(flight === null || flight === void 0 ? void 0 : flight.outward)) === null || _f === void 0
|
|
37298
|
-
? void 0
|
|
37299
|
-
: _f.departureDateTime
|
|
37300
|
-
),
|
|
37301
|
-
' -',
|
|
37302
|
-
' ',
|
|
37303
|
-
timeFromDateTime(
|
|
37304
|
-
(_g = getArrivalSegment(flight === null || flight === void 0 ? void 0 : flight.outward)) === null || _g === void 0
|
|
37305
|
-
? void 0
|
|
37306
|
-
: _g.arrivalDateTime
|
|
37307
|
-
),
|
|
37308
|
-
' (',
|
|
37309
|
-
durationTicksInHoursString(flight.outward.durationInTicks),
|
|
37310
|
-
',',
|
|
37311
|
-
' ',
|
|
37312
|
-
getNumberOfStopsLabel(flight.outward, translations.SRP.DIRECT, translations.SRP.STOPS, translations.SRP.STOP),
|
|
37313
|
-
'), ',
|
|
37314
|
-
numberOfTravellers,
|
|
37315
|
-
' ',
|
|
37316
|
-
'travellers'
|
|
37317
|
-
)
|
|
37318
|
-
)
|
|
37319
|
-
),
|
|
37320
|
-
React__default['default'].createElement(
|
|
37321
|
-
'div',
|
|
37322
|
-
{ className: 'flyin__content-arrow-row' },
|
|
37323
|
-
React__default['default'].createElement(
|
|
37324
|
-
'div',
|
|
37325
|
-
{ className: 'flyin__content-arrow is-disabled', 'aria-disabled': 'true' },
|
|
37326
|
-
React__default['default'].createElement(Icon, {
|
|
37327
|
-
name: 'ui-arrow',
|
|
37328
|
-
className: 'flyin__content-arrow-icon',
|
|
37329
|
-
width: 16,
|
|
37330
|
-
height: 16,
|
|
37331
|
-
'aria-hidden': 'true'
|
|
37332
|
-
})
|
|
37333
|
-
),
|
|
37334
|
-
React__default['default'].createElement(
|
|
37335
|
-
'div',
|
|
37336
|
-
{ className: 'flyin__content-arrow' },
|
|
37337
|
-
React__default['default'].createElement(Icon, {
|
|
37338
|
-
name: 'ui-arrow',
|
|
37339
|
-
className: 'flyin__content-arrow-icon flyin__content-arrow-icon--forward',
|
|
37340
|
-
width: 16,
|
|
37341
|
-
height: 16,
|
|
37342
|
-
'aria-hidden': 'true'
|
|
37343
|
-
})
|
|
37344
|
-
)
|
|
37345
|
-
)
|
|
37346
|
-
)
|
|
37347
|
-
),
|
|
37348
|
-
!flightSearchDetailsLoading &&
|
|
37349
|
-
flight &&
|
|
37350
|
-
React__default['default'].createElement(
|
|
37351
|
-
React__default['default'].Fragment,
|
|
37352
|
-
null,
|
|
37353
|
-
React__default['default'].createElement(
|
|
37354
|
-
'div',
|
|
37355
|
-
{ className: 'flyin__content-cards-wrapper' },
|
|
37356
|
-
React__default['default'].createElement(
|
|
37357
|
-
'div',
|
|
37358
|
-
{ className: 'flyin__content-cards' },
|
|
37359
|
-
uniqueOutwardFlights.map(function (flightOption, index) {
|
|
37360
|
-
var firstSegment = lodash.first(flightOption.outward.segments);
|
|
37361
|
-
if (!firstSegment) return null;
|
|
37362
|
-
var diff = getOutwardPriceDiff(firstSegment.metaData.fareCode);
|
|
37363
|
-
return React__default['default'].createElement(
|
|
37364
|
-
'div',
|
|
37365
|
-
{
|
|
37366
|
-
key: 'outward-flight-option-'.concat(index),
|
|
37367
|
-
className: 'flyin__content-card '.concat(selectedOutwardFareCode === firstSegment.metaData.fareCode ? 'flyin__content-card--selected' : '')
|
|
37368
|
-
},
|
|
37369
|
-
React__default['default'].createElement(
|
|
37370
|
-
'div',
|
|
37371
|
-
{ className: 'flyin__content-card-top' },
|
|
37372
|
-
React__default['default'].createElement('span', { className: 'flyin__content-card-top-tag' }, firstSegment.metaData.fareMarketingName),
|
|
37373
|
-
diff !== null &&
|
|
37374
|
-
diff != 0 &&
|
|
37375
|
-
React__default['default'].createElement(
|
|
37376
|
-
'span',
|
|
37377
|
-
{
|
|
37378
|
-
className: 'flyin__content-card-top-price '.concat(
|
|
37379
|
-
diff > 0 ? 'flyin__content-card-top-price--increase' : diff < 0 ? 'flyin__content-card-top-price--decrease' : ''
|
|
37380
|
-
)
|
|
37381
|
-
},
|
|
37382
|
-
diff > 0 ? '+\u20AC'.concat(diff) : '-\u20AC'.concat(Math.abs(diff))
|
|
37383
|
-
)
|
|
37384
|
-
),
|
|
37385
|
-
React__default['default'].createElement(
|
|
37386
|
-
'div',
|
|
37387
|
-
{ className: 'flyin__content-card-middle' },
|
|
37388
|
-
React__default['default'].createElement(
|
|
37389
|
-
'div',
|
|
37390
|
-
{ className: 'flyin__content-card-middle-rows' },
|
|
37391
|
-
React__default['default'].createElement(
|
|
37392
|
-
'div',
|
|
37393
|
-
{ className: 'flyin__content-card-middle-row' },
|
|
37394
|
-
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-left' }, 'Number of travellers'),
|
|
37395
|
-
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-right' }, numberOfTravellers)
|
|
37396
|
-
),
|
|
37397
|
-
React__default['default'].createElement(
|
|
37398
|
-
'div',
|
|
37399
|
-
{ className: 'flyin__content-card-middle-row' },
|
|
37400
|
-
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-left' }, 'Travel class'),
|
|
37401
|
-
React__default['default'].createElement(
|
|
37402
|
-
'span',
|
|
37403
|
-
{ className: 'flyin__content-card-middle-row-right' },
|
|
37404
|
-
firstSegment.metaData.fareMarketingName
|
|
37405
|
-
)
|
|
37406
|
-
),
|
|
37407
|
-
React__default['default'].createElement(
|
|
37408
|
-
'div',
|
|
37409
|
-
{ className: 'flyin__content-card-middle-row' },
|
|
37410
|
-
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-left' }, 'Booking class'),
|
|
37411
|
-
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-right' }, firstSegment.bookingClassCode)
|
|
37412
|
-
),
|
|
37413
|
-
React__default['default'].createElement(
|
|
37414
|
-
'div',
|
|
37415
|
-
{ className: 'flyin__content-card-middle-row' },
|
|
37416
|
-
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-left' }, 'Fare basis'),
|
|
37417
|
-
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-right' }, firstSegment.metaData.fareCode)
|
|
37418
|
-
),
|
|
37419
|
-
React__default['default'].createElement(
|
|
37420
|
-
'div',
|
|
37421
|
-
{ className: 'flyin__content-data' },
|
|
37422
|
-
firstSegment.metaData.luggageCarryOn &&
|
|
37423
|
-
React__default['default'].createElement(
|
|
37424
|
-
'div',
|
|
37425
|
-
{ className: 'flyin__content-data__item' },
|
|
37426
|
-
React__default['default'].createElement(
|
|
37427
|
-
'div',
|
|
37428
|
-
{ className: 'flyin__content-data__item-icon' },
|
|
37429
|
-
React__default['default'].createElement(Icon, { name: 'ui-bag', width: 20, 'aria-hidden': 'true' })
|
|
37430
|
-
),
|
|
37431
|
-
React__default['default'].createElement(
|
|
37432
|
-
'div',
|
|
37433
|
-
{ className: 'flyin__content-data__item-content' },
|
|
37434
|
-
React__default['default'].createElement('div', { className: 'flyin__content-data__item-content-title' }, 'Carry-on luggage'),
|
|
37435
|
-
React__default['default'].createElement(
|
|
37436
|
-
'div',
|
|
37437
|
-
{ className: 'flyin__content-data__item-content-description' },
|
|
37438
|
-
firstSegment.metaData.luggageCarryOn.text
|
|
37439
|
-
)
|
|
37440
|
-
)
|
|
37441
|
-
),
|
|
37442
|
-
firstSegment.metaData.luggageChecked &&
|
|
37443
|
-
React__default['default'].createElement(
|
|
37444
|
-
'div',
|
|
37445
|
-
{ className: 'flyin__content-data__item' },
|
|
37446
|
-
React__default['default'].createElement(
|
|
37447
|
-
'div',
|
|
37448
|
-
{ className: 'flyin__content-data__item-icon' },
|
|
37449
|
-
React__default['default'].createElement(Icon, { name: 'ui-suitcase', width: 20 })
|
|
37450
|
-
),
|
|
37451
|
-
React__default['default'].createElement(
|
|
37452
|
-
'div',
|
|
37453
|
-
{ className: 'flyin__content-data__item-content' },
|
|
37454
|
-
React__default['default'].createElement('div', { className: 'flyin__content-data__item-content-title' }, 'Checked luggage'),
|
|
37455
|
-
React__default['default'].createElement(
|
|
37456
|
-
'div',
|
|
37457
|
-
{ className: 'flyin__content-data__item-content-description' },
|
|
37458
|
-
firstSegment.metaData.luggageChecked.text
|
|
37459
|
-
)
|
|
37460
|
-
)
|
|
37461
|
-
),
|
|
37462
|
-
firstSegment.metaData.seatSelection &&
|
|
37463
|
-
React__default['default'].createElement(
|
|
37464
|
-
'div',
|
|
37465
|
-
{ className: 'flyin__content-data__item' },
|
|
37466
|
-
React__default['default'].createElement(
|
|
37467
|
-
'div',
|
|
37468
|
-
{ className: 'flyin__content-data__item-icon' },
|
|
37469
|
-
React__default['default'].createElement(Icon, { name: 'ui-seat', width: 20 })
|
|
37470
|
-
),
|
|
37471
|
-
React__default['default'].createElement(
|
|
37472
|
-
'div',
|
|
37473
|
-
{ className: 'flyin__content-data__item-content' },
|
|
37474
|
-
React__default['default'].createElement('div', { className: 'flyin__content-data__item-content-title' }, 'Seat selection'),
|
|
37475
|
-
React__default['default'].createElement(
|
|
37476
|
-
'div',
|
|
37477
|
-
{ className: 'flyin__content-data__item-content-description' },
|
|
37478
|
-
firstSegment.metaData.seatSelection.text
|
|
37479
|
-
)
|
|
37480
|
-
)
|
|
37481
|
-
),
|
|
37482
|
-
firstSegment.metaData.cancel &&
|
|
37483
|
-
React__default['default'].createElement(
|
|
37484
|
-
'div',
|
|
37485
|
-
{ className: 'flyin__content-data__item' },
|
|
37486
|
-
React__default['default'].createElement(
|
|
37487
|
-
'div',
|
|
37488
|
-
{ className: 'flyin__content-data__item-icon' },
|
|
37489
|
-
React__default['default'].createElement(Icon, { name: 'ui-refund', width: 20 })
|
|
37490
|
-
),
|
|
37491
|
-
React__default['default'].createElement(
|
|
37492
|
-
'div',
|
|
37493
|
-
{ className: 'flyin__content-data__item-content' },
|
|
37494
|
-
React__default['default'].createElement('div', { className: 'flyin__content-data__item-content-title' }, 'Refund'),
|
|
37495
|
-
React__default['default'].createElement(
|
|
37496
|
-
'div',
|
|
37497
|
-
{ className: 'flyin__content-data__item-content-description' },
|
|
37498
|
-
firstSegment.metaData.cancel.text
|
|
37499
|
-
)
|
|
37500
|
-
)
|
|
37501
|
-
),
|
|
37502
|
-
firstSegment.metaData.other &&
|
|
37503
|
-
React__default['default'].createElement(
|
|
37504
|
-
'div',
|
|
37505
|
-
{ className: 'flyin__content-data__item' },
|
|
37506
|
-
React__default['default'].createElement(
|
|
37507
|
-
'div',
|
|
37508
|
-
{ className: 'flyin__content-data__item-icon flyin__content-data__item-icon--other' },
|
|
37509
|
-
React__default['default'].createElement(Icon, { name: 'ui-else', width: 20 })
|
|
37510
|
-
),
|
|
37511
|
-
React__default['default'].createElement(
|
|
37512
|
-
'div',
|
|
37513
|
-
{ className: 'flyin__content-data__item-content' },
|
|
37514
|
-
React__default['default'].createElement('div', { className: 'flyin__content-data__item-content-title' }, 'Other'),
|
|
37515
|
-
React__default['default'].createElement(
|
|
37516
|
-
'ul',
|
|
37517
|
-
{ className: 'flyin__content-data__item-content-description flyin__content-data__item-content-description--list' },
|
|
37518
|
-
firstSegment.metaData.other.map(function (other, index) {
|
|
37519
|
-
return React__default['default'].createElement('li', { key: 'other-'.concat(index) }, other.text);
|
|
37520
|
-
})
|
|
37521
|
-
)
|
|
37522
|
-
)
|
|
37523
|
-
)
|
|
37524
|
-
)
|
|
37525
|
-
)
|
|
37526
|
-
),
|
|
37527
|
-
React__default['default'].createElement(
|
|
37528
|
-
'div',
|
|
37529
|
-
{
|
|
37530
|
-
className: 'flyin__content-card-button',
|
|
37531
|
-
onClick: function () {
|
|
37532
|
-
var _a, _b, _c;
|
|
37533
|
-
var fareCode =
|
|
37534
|
-
(_c =
|
|
37535
|
-
(_b = (_a = flightOption.outward.segments) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0
|
|
37536
|
-
? void 0
|
|
37537
|
-
: _b.metaData) === null || _c === void 0
|
|
37538
|
-
? void 0
|
|
37539
|
-
: _c.fareCode;
|
|
37540
|
-
setSelectedOutwardFareCode(fareCode !== null && fareCode !== void 0 ? fareCode : null);
|
|
37541
|
-
}
|
|
37542
|
-
},
|
|
37543
|
-
React__default['default'].createElement(
|
|
37544
|
-
'div',
|
|
37545
|
-
{ className: 'cta '.concat(selectedOutwardFareCode === firstSegment.metaData.fareCode ? 'cta--selected' : '') },
|
|
37546
|
-
' ',
|
|
37547
|
-
selectedOutwardFareCode === firstSegment.metaData.fareCode ? 'Selected' : 'Select'
|
|
37548
|
-
)
|
|
37549
|
-
)
|
|
37550
|
-
);
|
|
37551
|
-
})
|
|
37552
|
-
)
|
|
37553
|
-
),
|
|
37554
|
-
React__default['default'].createElement(
|
|
37555
|
-
'div',
|
|
37556
|
-
{ className: 'flyin__content' },
|
|
37272
|
+
{ className: 'flyin__content' },
|
|
37273
|
+
flightSearchDetailsLoading || lodash.isEmpty(flights)
|
|
37274
|
+
? React__default['default'].createElement(Spinner, null)
|
|
37275
|
+
: flight &&
|
|
37557
37276
|
React__default['default'].createElement(
|
|
37558
37277
|
'div',
|
|
37559
37278
|
{ className: 'flyin__content-text-row' },
|
|
@@ -37562,7 +37281,7 @@ var FlyIn = function (_a) {
|
|
|
37562
37281
|
{ className: 'flyin__content-text-icon-row' },
|
|
37563
37282
|
React__default['default'].createElement('img', {
|
|
37564
37283
|
src: 'https://media.tidesoftware.be/media/shared/Airlines/'.concat(
|
|
37565
|
-
(
|
|
37284
|
+
(_c = getDepartureSegment(flight.outward)) === null || _c === void 0 ? void 0 : _c.marketingAirlineCode,
|
|
37566
37285
|
'.png?height=256'
|
|
37567
37286
|
),
|
|
37568
37287
|
alt: 'airline-logo',
|
|
@@ -37575,37 +37294,37 @@ var FlyIn = function (_a) {
|
|
|
37575
37294
|
React__default['default'].createElement(
|
|
37576
37295
|
'span',
|
|
37577
37296
|
{ className: 'flyin__content-text-title-row' },
|
|
37578
|
-
React__default['default'].createElement('strong', null, translations.SRP.
|
|
37297
|
+
React__default['default'].createElement('strong', null, translations.SRP.DEPARTURE),
|
|
37579
37298
|
' ',
|
|
37580
|
-
(
|
|
37299
|
+
(_d = getDepartureSegment(flight === null || flight === void 0 ? void 0 : flight.outward)) === null || _d === void 0
|
|
37581
37300
|
? void 0
|
|
37582
|
-
:
|
|
37301
|
+
: _d.departureAirportCode,
|
|
37583
37302
|
' -',
|
|
37584
37303
|
' ',
|
|
37585
|
-
(
|
|
37304
|
+
(_e = getArrivalSegment(flight === null || flight === void 0 ? void 0 : flight.outward)) === null || _e === void 0
|
|
37586
37305
|
? void 0
|
|
37587
|
-
:
|
|
37306
|
+
: _e.arrivalAirportCode
|
|
37588
37307
|
),
|
|
37589
37308
|
React__default['default'].createElement(
|
|
37590
37309
|
'span',
|
|
37591
37310
|
{ className: 'flyin__content-text' },
|
|
37592
37311
|
timeFromDateTime(
|
|
37593
|
-
(
|
|
37312
|
+
(_f = getDepartureSegment(flight === null || flight === void 0 ? void 0 : flight.outward)) === null || _f === void 0
|
|
37594
37313
|
? void 0
|
|
37595
|
-
:
|
|
37314
|
+
: _f.departureDateTime
|
|
37596
37315
|
),
|
|
37597
37316
|
' -',
|
|
37598
37317
|
' ',
|
|
37599
37318
|
timeFromDateTime(
|
|
37600
|
-
(
|
|
37319
|
+
(_g = getArrivalSegment(flight === null || flight === void 0 ? void 0 : flight.outward)) === null || _g === void 0
|
|
37601
37320
|
? void 0
|
|
37602
|
-
:
|
|
37321
|
+
: _g.arrivalDateTime
|
|
37603
37322
|
),
|
|
37604
37323
|
' (',
|
|
37605
|
-
durationTicksInHoursString(flight.
|
|
37324
|
+
durationTicksInHoursString(flight.outward.durationInTicks),
|
|
37606
37325
|
',',
|
|
37607
37326
|
' ',
|
|
37608
|
-
getNumberOfStopsLabel(flight.
|
|
37327
|
+
getNumberOfStopsLabel(flight.outward, translations.SRP.DIRECT, translations.SRP.STOPS, translations.SRP.STOP),
|
|
37609
37328
|
'), ',
|
|
37610
37329
|
numberOfTravellers,
|
|
37611
37330
|
' ',
|
|
@@ -37640,229 +37359,628 @@ var FlyIn = function (_a) {
|
|
|
37640
37359
|
)
|
|
37641
37360
|
)
|
|
37642
37361
|
)
|
|
37643
|
-
|
|
37362
|
+
),
|
|
37363
|
+
!flightSearchDetailsLoading &&
|
|
37364
|
+
flight &&
|
|
37365
|
+
React__default['default'].createElement(
|
|
37366
|
+
React__default['default'].Fragment,
|
|
37367
|
+
null,
|
|
37368
|
+
React__default['default'].createElement(
|
|
37369
|
+
'div',
|
|
37370
|
+
{ className: 'flyin__content-cards-wrapper' },
|
|
37644
37371
|
React__default['default'].createElement(
|
|
37645
37372
|
'div',
|
|
37646
|
-
{ className: 'flyin__content-cards
|
|
37647
|
-
|
|
37648
|
-
|
|
37649
|
-
|
|
37650
|
-
|
|
37651
|
-
|
|
37652
|
-
|
|
37653
|
-
|
|
37654
|
-
|
|
37373
|
+
{ className: 'flyin__content-cards' },
|
|
37374
|
+
uniqueOutwardFlights.map(function (flightOption, index) {
|
|
37375
|
+
var firstSegment = lodash.first(flightOption.outward.segments);
|
|
37376
|
+
if (!firstSegment) return null;
|
|
37377
|
+
var diff = getOutwardPriceDiff(firstSegment.metaData.fareCode);
|
|
37378
|
+
return React__default['default'].createElement(
|
|
37379
|
+
'div',
|
|
37380
|
+
{
|
|
37381
|
+
key: 'outward-flight-option-'.concat(index),
|
|
37382
|
+
className: 'flyin__content-card '.concat(selectedOutwardFareCode === firstSegment.metaData.fareCode ? 'flyin__content-card--selected' : '')
|
|
37383
|
+
},
|
|
37384
|
+
React__default['default'].createElement(
|
|
37655
37385
|
'div',
|
|
37656
|
-
{
|
|
37657
|
-
|
|
37658
|
-
|
|
37659
|
-
|
|
37386
|
+
{ className: 'flyin__content-card-top' },
|
|
37387
|
+
React__default['default'].createElement('span', { className: 'flyin__content-card-top-tag' }, firstSegment.metaData.fareMarketingName),
|
|
37388
|
+
diff !== null &&
|
|
37389
|
+
diff != 0 &&
|
|
37390
|
+
React__default['default'].createElement(
|
|
37391
|
+
'span',
|
|
37392
|
+
{
|
|
37393
|
+
className: 'flyin__content-card-top-price '.concat(
|
|
37394
|
+
diff > 0 ? 'flyin__content-card-top-price--increase' : diff < 0 ? 'flyin__content-card-top-price--decrease' : ''
|
|
37395
|
+
)
|
|
37396
|
+
},
|
|
37397
|
+
diff > 0 ? '+\u20AC'.concat(diff) : '-\u20AC'.concat(Math.abs(diff))
|
|
37398
|
+
)
|
|
37399
|
+
),
|
|
37400
|
+
React__default['default'].createElement(
|
|
37401
|
+
'div',
|
|
37402
|
+
{ className: 'flyin__content-card-middle' },
|
|
37660
37403
|
React__default['default'].createElement(
|
|
37661
37404
|
'div',
|
|
37662
|
-
{ className: 'flyin__content-card-
|
|
37663
|
-
React__default['default'].createElement(
|
|
37664
|
-
|
|
37665
|
-
|
|
37405
|
+
{ className: 'flyin__content-card-middle-rows' },
|
|
37406
|
+
React__default['default'].createElement(
|
|
37407
|
+
'div',
|
|
37408
|
+
{ className: 'flyin__content-card-middle-row' },
|
|
37409
|
+
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-left' }, 'Number of travellers'),
|
|
37410
|
+
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-right' }, numberOfTravellers)
|
|
37411
|
+
),
|
|
37412
|
+
React__default['default'].createElement(
|
|
37413
|
+
'div',
|
|
37414
|
+
{ className: 'flyin__content-card-middle-row' },
|
|
37415
|
+
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-left' }, 'Travel class'),
|
|
37666
37416
|
React__default['default'].createElement(
|
|
37667
37417
|
'span',
|
|
37668
|
-
{
|
|
37669
|
-
|
|
37670
|
-
diff > 0 ? 'flyin__content-card-top-price--increase' : diff < 0 ? 'flyin__content-card-top-price--decrease' : ''
|
|
37671
|
-
)
|
|
37672
|
-
},
|
|
37673
|
-
diff > 0 ? '+\u20AC'.concat(diff) : '-\u20AC'.concat(Math.abs(diff))
|
|
37418
|
+
{ className: 'flyin__content-card-middle-row-right' },
|
|
37419
|
+
firstSegment.metaData.fareMarketingName
|
|
37674
37420
|
)
|
|
37675
|
-
|
|
37676
|
-
React__default['default'].createElement(
|
|
37677
|
-
'div',
|
|
37678
|
-
{ className: 'flyin__content-card-middle' },
|
|
37421
|
+
),
|
|
37679
37422
|
React__default['default'].createElement(
|
|
37680
37423
|
'div',
|
|
37681
|
-
{ className: 'flyin__content-card-middle-
|
|
37682
|
-
React__default['default'].createElement(
|
|
37683
|
-
|
|
37684
|
-
|
|
37685
|
-
|
|
37686
|
-
|
|
37687
|
-
|
|
37688
|
-
React__default['default'].createElement(
|
|
37689
|
-
|
|
37690
|
-
|
|
37691
|
-
|
|
37424
|
+
{ className: 'flyin__content-card-middle-row' },
|
|
37425
|
+
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-left' }, 'Booking class'),
|
|
37426
|
+
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-right' }, firstSegment.bookingClassCode)
|
|
37427
|
+
),
|
|
37428
|
+
React__default['default'].createElement(
|
|
37429
|
+
'div',
|
|
37430
|
+
{ className: 'flyin__content-card-middle-row' },
|
|
37431
|
+
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-left' }, 'Fare basis'),
|
|
37432
|
+
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-right' }, firstSegment.metaData.fareCode)
|
|
37433
|
+
),
|
|
37434
|
+
React__default['default'].createElement(
|
|
37435
|
+
'div',
|
|
37436
|
+
{ className: 'flyin__content-data' },
|
|
37437
|
+
firstSegment.metaData.luggageCarryOn &&
|
|
37692
37438
|
React__default['default'].createElement(
|
|
37693
|
-
'
|
|
37694
|
-
{ className: 'flyin__content-
|
|
37695
|
-
|
|
37696
|
-
|
|
37697
|
-
|
|
37698
|
-
|
|
37699
|
-
|
|
37700
|
-
{ className: 'flyin__content-card-middle-row' },
|
|
37701
|
-
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-left' }, 'Booking class'),
|
|
37702
|
-
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-right' }, firstSegment.bookingClassCode)
|
|
37703
|
-
),
|
|
37704
|
-
React__default['default'].createElement(
|
|
37705
|
-
'div',
|
|
37706
|
-
{ className: 'flyin__content-card-middle-row' },
|
|
37707
|
-
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-left' }, 'Fare basis'),
|
|
37708
|
-
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-right' }, firstSegment.metaData.fareCode)
|
|
37709
|
-
),
|
|
37710
|
-
React__default['default'].createElement(
|
|
37711
|
-
'div',
|
|
37712
|
-
{ className: 'flyin__content-data' },
|
|
37713
|
-
firstSegment.metaData.luggageCarryOn &&
|
|
37439
|
+
'div',
|
|
37440
|
+
{ className: 'flyin__content-data__item' },
|
|
37441
|
+
React__default['default'].createElement(
|
|
37442
|
+
'div',
|
|
37443
|
+
{ className: 'flyin__content-data__item-icon' },
|
|
37444
|
+
React__default['default'].createElement(Icon, { name: 'ui-bag', width: 20, 'aria-hidden': 'true' })
|
|
37445
|
+
),
|
|
37714
37446
|
React__default['default'].createElement(
|
|
37715
37447
|
'div',
|
|
37716
|
-
{ className: 'flyin__content-data__item' },
|
|
37448
|
+
{ className: 'flyin__content-data__item-content' },
|
|
37449
|
+
React__default['default'].createElement('div', { className: 'flyin__content-data__item-content-title' }, 'Carry-on luggage'),
|
|
37717
37450
|
React__default['default'].createElement(
|
|
37718
37451
|
'div',
|
|
37719
|
-
{ className: 'flyin__content-data__item-
|
|
37720
|
-
|
|
37721
|
-
)
|
|
37452
|
+
{ className: 'flyin__content-data__item-content-description' },
|
|
37453
|
+
firstSegment.metaData.luggageCarryOn.text
|
|
37454
|
+
)
|
|
37455
|
+
)
|
|
37456
|
+
),
|
|
37457
|
+
firstSegment.metaData.luggageChecked &&
|
|
37458
|
+
React__default['default'].createElement(
|
|
37459
|
+
'div',
|
|
37460
|
+
{ className: 'flyin__content-data__item' },
|
|
37461
|
+
React__default['default'].createElement(
|
|
37462
|
+
'div',
|
|
37463
|
+
{ className: 'flyin__content-data__item-icon' },
|
|
37464
|
+
React__default['default'].createElement(Icon, { name: 'ui-suitcase', width: 20 })
|
|
37465
|
+
),
|
|
37466
|
+
React__default['default'].createElement(
|
|
37467
|
+
'div',
|
|
37468
|
+
{ className: 'flyin__content-data__item-content' },
|
|
37469
|
+
React__default['default'].createElement('div', { className: 'flyin__content-data__item-content-title' }, 'Checked luggage'),
|
|
37722
37470
|
React__default['default'].createElement(
|
|
37723
37471
|
'div',
|
|
37724
|
-
{ className: 'flyin__content-data__item-content' },
|
|
37725
|
-
|
|
37726
|
-
React__default['default'].createElement(
|
|
37727
|
-
'div',
|
|
37728
|
-
{ className: 'flyin__content-data__item-content-description' },
|
|
37729
|
-
firstSegment.metaData.luggageCarryOn.text
|
|
37730
|
-
)
|
|
37472
|
+
{ className: 'flyin__content-data__item-content-description' },
|
|
37473
|
+
firstSegment.metaData.luggageChecked.text
|
|
37731
37474
|
)
|
|
37475
|
+
)
|
|
37476
|
+
),
|
|
37477
|
+
firstSegment.metaData.seatSelection &&
|
|
37478
|
+
React__default['default'].createElement(
|
|
37479
|
+
'div',
|
|
37480
|
+
{ className: 'flyin__content-data__item' },
|
|
37481
|
+
React__default['default'].createElement(
|
|
37482
|
+
'div',
|
|
37483
|
+
{ className: 'flyin__content-data__item-icon' },
|
|
37484
|
+
React__default['default'].createElement(Icon, { name: 'ui-seat', width: 20 })
|
|
37732
37485
|
),
|
|
37733
|
-
firstSegment.metaData.luggageChecked &&
|
|
37734
37486
|
React__default['default'].createElement(
|
|
37735
37487
|
'div',
|
|
37736
|
-
{ className: 'flyin__content-data__item' },
|
|
37488
|
+
{ className: 'flyin__content-data__item-content' },
|
|
37489
|
+
React__default['default'].createElement('div', { className: 'flyin__content-data__item-content-title' }, 'Seat selection'),
|
|
37737
37490
|
React__default['default'].createElement(
|
|
37738
37491
|
'div',
|
|
37739
|
-
{ className: 'flyin__content-data__item-
|
|
37740
|
-
|
|
37741
|
-
)
|
|
37492
|
+
{ className: 'flyin__content-data__item-content-description' },
|
|
37493
|
+
firstSegment.metaData.seatSelection.text
|
|
37494
|
+
)
|
|
37495
|
+
)
|
|
37496
|
+
),
|
|
37497
|
+
firstSegment.metaData.cancel &&
|
|
37498
|
+
React__default['default'].createElement(
|
|
37499
|
+
'div',
|
|
37500
|
+
{ className: 'flyin__content-data__item' },
|
|
37501
|
+
React__default['default'].createElement(
|
|
37502
|
+
'div',
|
|
37503
|
+
{ className: 'flyin__content-data__item-icon' },
|
|
37504
|
+
React__default['default'].createElement(Icon, { name: 'ui-refund', width: 20 })
|
|
37505
|
+
),
|
|
37506
|
+
React__default['default'].createElement(
|
|
37507
|
+
'div',
|
|
37508
|
+
{ className: 'flyin__content-data__item-content' },
|
|
37509
|
+
React__default['default'].createElement('div', { className: 'flyin__content-data__item-content-title' }, 'Refund'),
|
|
37742
37510
|
React__default['default'].createElement(
|
|
37743
37511
|
'div',
|
|
37744
|
-
{ className: 'flyin__content-data__item-content' },
|
|
37745
|
-
|
|
37746
|
-
React__default['default'].createElement(
|
|
37747
|
-
'div',
|
|
37748
|
-
{ className: 'flyin__content-data__item-content-description' },
|
|
37749
|
-
firstSegment.metaData.luggageChecked.text
|
|
37750
|
-
)
|
|
37512
|
+
{ className: 'flyin__content-data__item-content-description' },
|
|
37513
|
+
firstSegment.metaData.cancel.text
|
|
37751
37514
|
)
|
|
37515
|
+
)
|
|
37516
|
+
),
|
|
37517
|
+
firstSegment.metaData.other &&
|
|
37518
|
+
React__default['default'].createElement(
|
|
37519
|
+
'div',
|
|
37520
|
+
{ className: 'flyin__content-data__item' },
|
|
37521
|
+
React__default['default'].createElement(
|
|
37522
|
+
'div',
|
|
37523
|
+
{ className: 'flyin__content-data__item-icon flyin__content-data__item-icon--other' },
|
|
37524
|
+
React__default['default'].createElement(Icon, { name: 'ui-else', width: 20 })
|
|
37752
37525
|
),
|
|
37753
|
-
firstSegment.metaData.seatSelection &&
|
|
37754
37526
|
React__default['default'].createElement(
|
|
37755
37527
|
'div',
|
|
37756
|
-
{ className: 'flyin__content-data__item' },
|
|
37528
|
+
{ className: 'flyin__content-data__item-content' },
|
|
37529
|
+
React__default['default'].createElement('div', { className: 'flyin__content-data__item-content-title' }, 'Other'),
|
|
37757
37530
|
React__default['default'].createElement(
|
|
37758
|
-
'
|
|
37759
|
-
{ className: 'flyin__content-data__item-
|
|
37760
|
-
|
|
37761
|
-
|
|
37531
|
+
'ul',
|
|
37532
|
+
{ className: 'flyin__content-data__item-content-description flyin__content-data__item-content-description--list' },
|
|
37533
|
+
firstSegment.metaData.other.map(function (other, index) {
|
|
37534
|
+
return React__default['default'].createElement('li', { key: 'other-'.concat(index) }, other.text);
|
|
37535
|
+
})
|
|
37536
|
+
)
|
|
37537
|
+
)
|
|
37538
|
+
)
|
|
37539
|
+
)
|
|
37540
|
+
)
|
|
37541
|
+
),
|
|
37542
|
+
React__default['default'].createElement(
|
|
37543
|
+
'div',
|
|
37544
|
+
{
|
|
37545
|
+
className: 'flyin__content-card-button',
|
|
37546
|
+
onClick: function () {
|
|
37547
|
+
var _a, _b, _c;
|
|
37548
|
+
var fareCode =
|
|
37549
|
+
(_c =
|
|
37550
|
+
(_b = (_a = flightOption.outward.segments) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0
|
|
37551
|
+
? void 0
|
|
37552
|
+
: _b.metaData) === null || _c === void 0
|
|
37553
|
+
? void 0
|
|
37554
|
+
: _c.fareCode;
|
|
37555
|
+
setSelectedOutwardFareCode(fareCode !== null && fareCode !== void 0 ? fareCode : null);
|
|
37556
|
+
}
|
|
37557
|
+
},
|
|
37558
|
+
React__default['default'].createElement(
|
|
37559
|
+
'div',
|
|
37560
|
+
{ className: 'cta '.concat(selectedOutwardFareCode === firstSegment.metaData.fareCode ? 'cta--selected' : '') },
|
|
37561
|
+
' ',
|
|
37562
|
+
selectedOutwardFareCode === firstSegment.metaData.fareCode ? 'Selected' : 'Select'
|
|
37563
|
+
)
|
|
37564
|
+
)
|
|
37565
|
+
);
|
|
37566
|
+
})
|
|
37567
|
+
)
|
|
37568
|
+
),
|
|
37569
|
+
React__default['default'].createElement(
|
|
37570
|
+
'div',
|
|
37571
|
+
{ className: 'flyin__content' },
|
|
37572
|
+
React__default['default'].createElement(
|
|
37573
|
+
'div',
|
|
37574
|
+
{ className: 'flyin__content-text-row' },
|
|
37575
|
+
React__default['default'].createElement(
|
|
37576
|
+
'div',
|
|
37577
|
+
{ className: 'flyin__content-text-icon-row' },
|
|
37578
|
+
React__default['default'].createElement('img', {
|
|
37579
|
+
src: 'https://media.tidesoftware.be/media/shared/Airlines/'.concat(
|
|
37580
|
+
(_h = getDepartureSegment(flight.return)) === null || _h === void 0 ? void 0 : _h.marketingAirlineCode,
|
|
37581
|
+
'.png?height=256'
|
|
37582
|
+
),
|
|
37583
|
+
alt: 'airline-logo',
|
|
37584
|
+
className: 'logo',
|
|
37585
|
+
'aria-hidden': 'true'
|
|
37586
|
+
}),
|
|
37587
|
+
React__default['default'].createElement(
|
|
37588
|
+
'div',
|
|
37589
|
+
{ className: 'flyin__content-text-col' },
|
|
37590
|
+
React__default['default'].createElement(
|
|
37591
|
+
'span',
|
|
37592
|
+
{ className: 'flyin__content-text-title-row' },
|
|
37593
|
+
React__default['default'].createElement('strong', null, translations.SRP.RETURN),
|
|
37594
|
+
' ',
|
|
37595
|
+
(_j = getDepartureSegment(flight === null || flight === void 0 ? void 0 : flight.return)) === null || _j === void 0
|
|
37596
|
+
? void 0
|
|
37597
|
+
: _j.departureAirportCode,
|
|
37598
|
+
' -',
|
|
37599
|
+
' ',
|
|
37600
|
+
(_k = getArrivalSegment(flight === null || flight === void 0 ? void 0 : flight.return)) === null || _k === void 0
|
|
37601
|
+
? void 0
|
|
37602
|
+
: _k.arrivalAirportCode
|
|
37603
|
+
),
|
|
37604
|
+
React__default['default'].createElement(
|
|
37605
|
+
'span',
|
|
37606
|
+
{ className: 'flyin__content-text' },
|
|
37607
|
+
timeFromDateTime(
|
|
37608
|
+
(_l = getDepartureSegment(flight === null || flight === void 0 ? void 0 : flight.return)) === null || _l === void 0
|
|
37609
|
+
? void 0
|
|
37610
|
+
: _l.departureDateTime
|
|
37611
|
+
),
|
|
37612
|
+
' -',
|
|
37613
|
+
' ',
|
|
37614
|
+
timeFromDateTime(
|
|
37615
|
+
(_m = getArrivalSegment(flight === null || flight === void 0 ? void 0 : flight.return)) === null || _m === void 0
|
|
37616
|
+
? void 0
|
|
37617
|
+
: _m.arrivalDateTime
|
|
37618
|
+
),
|
|
37619
|
+
' (',
|
|
37620
|
+
durationTicksInHoursString(flight.return.durationInTicks),
|
|
37621
|
+
',',
|
|
37622
|
+
' ',
|
|
37623
|
+
getNumberOfStopsLabel(flight.return, translations.SRP.DIRECT, translations.SRP.STOPS, translations.SRP.STOP),
|
|
37624
|
+
'), ',
|
|
37625
|
+
numberOfTravellers,
|
|
37626
|
+
' ',
|
|
37627
|
+
'travellers'
|
|
37628
|
+
)
|
|
37629
|
+
)
|
|
37630
|
+
),
|
|
37631
|
+
React__default['default'].createElement(
|
|
37632
|
+
'div',
|
|
37633
|
+
{ className: 'flyin__content-arrow-row' },
|
|
37634
|
+
React__default['default'].createElement(
|
|
37635
|
+
'div',
|
|
37636
|
+
{ className: 'flyin__content-arrow is-disabled', 'aria-disabled': 'true' },
|
|
37637
|
+
React__default['default'].createElement(Icon, {
|
|
37638
|
+
name: 'ui-arrow',
|
|
37639
|
+
className: 'flyin__content-arrow-icon',
|
|
37640
|
+
width: 16,
|
|
37641
|
+
height: 16,
|
|
37642
|
+
'aria-hidden': 'true'
|
|
37643
|
+
})
|
|
37644
|
+
),
|
|
37645
|
+
React__default['default'].createElement(
|
|
37646
|
+
'div',
|
|
37647
|
+
{ className: 'flyin__content-arrow' },
|
|
37648
|
+
React__default['default'].createElement(Icon, {
|
|
37649
|
+
name: 'ui-arrow',
|
|
37650
|
+
className: 'flyin__content-arrow-icon flyin__content-arrow-icon--forward',
|
|
37651
|
+
width: 16,
|
|
37652
|
+
height: 16,
|
|
37653
|
+
'aria-hidden': 'true'
|
|
37654
|
+
})
|
|
37655
|
+
)
|
|
37656
|
+
)
|
|
37657
|
+
)
|
|
37658
|
+
),
|
|
37659
|
+
React__default['default'].createElement(
|
|
37660
|
+
'div',
|
|
37661
|
+
{ className: 'flyin__content-cards-wrapper' },
|
|
37662
|
+
React__default['default'].createElement(
|
|
37663
|
+
'div',
|
|
37664
|
+
{ className: 'flyin__content-cards' },
|
|
37665
|
+
uniqueReturnFlights.map(function (flightOption, index) {
|
|
37666
|
+
var firstSegment = lodash.first(flightOption.return.segments);
|
|
37667
|
+
if (!firstSegment) return null;
|
|
37668
|
+
var diff = getReturnPriceDiff(firstSegment.metaData.fareCode);
|
|
37669
|
+
return React__default['default'].createElement(
|
|
37670
|
+
'div',
|
|
37671
|
+
{
|
|
37672
|
+
key: 'return-flight-option-'.concat(index),
|
|
37673
|
+
className: 'flyin__content-card '.concat(selectedReturnFareCode === firstSegment.metaData.fareCode ? 'flyin__content-card--selected' : '')
|
|
37674
|
+
},
|
|
37675
|
+
React__default['default'].createElement(
|
|
37676
|
+
'div',
|
|
37677
|
+
{ className: 'flyin__content-card-top' },
|
|
37678
|
+
React__default['default'].createElement('span', { className: 'flyin__content-card-top-tag' }, firstSegment.metaData.fareMarketingName),
|
|
37679
|
+
diff !== null &&
|
|
37680
|
+
diff != 0 &&
|
|
37681
|
+
React__default['default'].createElement(
|
|
37682
|
+
'span',
|
|
37683
|
+
{
|
|
37684
|
+
className: 'flyin__content-card-top-price '.concat(
|
|
37685
|
+
diff > 0 ? 'flyin__content-card-top-price--increase' : diff < 0 ? 'flyin__content-card-top-price--decrease' : ''
|
|
37686
|
+
)
|
|
37687
|
+
},
|
|
37688
|
+
diff > 0 ? '+\u20AC'.concat(diff) : '-\u20AC'.concat(Math.abs(diff))
|
|
37689
|
+
)
|
|
37690
|
+
),
|
|
37691
|
+
React__default['default'].createElement(
|
|
37692
|
+
'div',
|
|
37693
|
+
{ className: 'flyin__content-card-middle' },
|
|
37694
|
+
React__default['default'].createElement(
|
|
37695
|
+
'div',
|
|
37696
|
+
{ className: 'flyin__content-card-middle-rows' },
|
|
37697
|
+
React__default['default'].createElement(
|
|
37698
|
+
'div',
|
|
37699
|
+
{ className: 'flyin__content-card-middle-row' },
|
|
37700
|
+
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-left' }, 'Number of travellers'),
|
|
37701
|
+
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-right' }, numberOfTravellers)
|
|
37702
|
+
),
|
|
37703
|
+
React__default['default'].createElement(
|
|
37704
|
+
'div',
|
|
37705
|
+
{ className: 'flyin__content-card-middle-row' },
|
|
37706
|
+
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-left' }, 'Travel class'),
|
|
37707
|
+
React__default['default'].createElement(
|
|
37708
|
+
'span',
|
|
37709
|
+
{ className: 'flyin__content-card-middle-row-right' },
|
|
37710
|
+
firstSegment.metaData.fareMarketingName
|
|
37711
|
+
)
|
|
37712
|
+
),
|
|
37713
|
+
React__default['default'].createElement(
|
|
37714
|
+
'div',
|
|
37715
|
+
{ className: 'flyin__content-card-middle-row' },
|
|
37716
|
+
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-left' }, 'Booking class'),
|
|
37717
|
+
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-right' }, firstSegment.bookingClassCode)
|
|
37718
|
+
),
|
|
37719
|
+
React__default['default'].createElement(
|
|
37720
|
+
'div',
|
|
37721
|
+
{ className: 'flyin__content-card-middle-row' },
|
|
37722
|
+
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-left' }, 'Fare basis'),
|
|
37723
|
+
React__default['default'].createElement('span', { className: 'flyin__content-card-middle-row-right' }, firstSegment.metaData.fareCode)
|
|
37724
|
+
),
|
|
37725
|
+
React__default['default'].createElement(
|
|
37726
|
+
'div',
|
|
37727
|
+
{ className: 'flyin__content-data' },
|
|
37728
|
+
firstSegment.metaData.luggageCarryOn &&
|
|
37729
|
+
React__default['default'].createElement(
|
|
37730
|
+
'div',
|
|
37731
|
+
{ className: 'flyin__content-data__item' },
|
|
37732
|
+
React__default['default'].createElement(
|
|
37733
|
+
'div',
|
|
37734
|
+
{ className: 'flyin__content-data__item-icon' },
|
|
37735
|
+
React__default['default'].createElement(Icon, { name: 'ui-bag', width: 20, 'aria-hidden': 'true' })
|
|
37736
|
+
),
|
|
37737
|
+
React__default['default'].createElement(
|
|
37738
|
+
'div',
|
|
37739
|
+
{ className: 'flyin__content-data__item-content' },
|
|
37740
|
+
React__default['default'].createElement('div', { className: 'flyin__content-data__item-content-title' }, 'Carry-on luggage'),
|
|
37762
37741
|
React__default['default'].createElement(
|
|
37763
37742
|
'div',
|
|
37764
|
-
{ className: 'flyin__content-data__item-content' },
|
|
37765
|
-
|
|
37766
|
-
React__default['default'].createElement(
|
|
37767
|
-
'div',
|
|
37768
|
-
{ className: 'flyin__content-data__item-content-description' },
|
|
37769
|
-
firstSegment.metaData.seatSelection.text
|
|
37770
|
-
)
|
|
37743
|
+
{ className: 'flyin__content-data__item-content-description' },
|
|
37744
|
+
firstSegment.metaData.luggageCarryOn.text
|
|
37771
37745
|
)
|
|
37746
|
+
)
|
|
37747
|
+
),
|
|
37748
|
+
firstSegment.metaData.luggageChecked &&
|
|
37749
|
+
React__default['default'].createElement(
|
|
37750
|
+
'div',
|
|
37751
|
+
{ className: 'flyin__content-data__item' },
|
|
37752
|
+
React__default['default'].createElement(
|
|
37753
|
+
'div',
|
|
37754
|
+
{ className: 'flyin__content-data__item-icon' },
|
|
37755
|
+
React__default['default'].createElement(Icon, { name: 'ui-suitcase', width: 20 })
|
|
37772
37756
|
),
|
|
37773
|
-
firstSegment.metaData.cancel &&
|
|
37774
37757
|
React__default['default'].createElement(
|
|
37775
37758
|
'div',
|
|
37776
|
-
{ className: 'flyin__content-data__item' },
|
|
37759
|
+
{ className: 'flyin__content-data__item-content' },
|
|
37760
|
+
React__default['default'].createElement('div', { className: 'flyin__content-data__item-content-title' }, 'Checked luggage'),
|
|
37777
37761
|
React__default['default'].createElement(
|
|
37778
37762
|
'div',
|
|
37779
|
-
{ className: 'flyin__content-data__item-
|
|
37780
|
-
|
|
37781
|
-
)
|
|
37763
|
+
{ className: 'flyin__content-data__item-content-description' },
|
|
37764
|
+
firstSegment.metaData.luggageChecked.text
|
|
37765
|
+
)
|
|
37766
|
+
)
|
|
37767
|
+
),
|
|
37768
|
+
firstSegment.metaData.seatSelection &&
|
|
37769
|
+
React__default['default'].createElement(
|
|
37770
|
+
'div',
|
|
37771
|
+
{ className: 'flyin__content-data__item' },
|
|
37772
|
+
React__default['default'].createElement(
|
|
37773
|
+
'div',
|
|
37774
|
+
{ className: 'flyin__content-data__item-icon' },
|
|
37775
|
+
React__default['default'].createElement(Icon, { name: 'ui-seat', width: 20 })
|
|
37776
|
+
),
|
|
37777
|
+
React__default['default'].createElement(
|
|
37778
|
+
'div',
|
|
37779
|
+
{ className: 'flyin__content-data__item-content' },
|
|
37780
|
+
React__default['default'].createElement('div', { className: 'flyin__content-data__item-content-title' }, 'Seat selection'),
|
|
37782
37781
|
React__default['default'].createElement(
|
|
37783
37782
|
'div',
|
|
37784
|
-
{ className: 'flyin__content-data__item-content' },
|
|
37785
|
-
|
|
37786
|
-
React__default['default'].createElement(
|
|
37787
|
-
'div',
|
|
37788
|
-
{ className: 'flyin__content-data__item-content-description' },
|
|
37789
|
-
firstSegment.metaData.cancel.text
|
|
37790
|
-
)
|
|
37783
|
+
{ className: 'flyin__content-data__item-content-description' },
|
|
37784
|
+
firstSegment.metaData.seatSelection.text
|
|
37791
37785
|
)
|
|
37786
|
+
)
|
|
37787
|
+
),
|
|
37788
|
+
firstSegment.metaData.cancel &&
|
|
37789
|
+
React__default['default'].createElement(
|
|
37790
|
+
'div',
|
|
37791
|
+
{ className: 'flyin__content-data__item' },
|
|
37792
|
+
React__default['default'].createElement(
|
|
37793
|
+
'div',
|
|
37794
|
+
{ className: 'flyin__content-data__item-icon' },
|
|
37795
|
+
React__default['default'].createElement(Icon, { name: 'ui-refund', width: 20 })
|
|
37792
37796
|
),
|
|
37793
|
-
firstSegment.metaData.other &&
|
|
37794
37797
|
React__default['default'].createElement(
|
|
37795
37798
|
'div',
|
|
37796
|
-
{ className: 'flyin__content-data__item' },
|
|
37799
|
+
{ className: 'flyin__content-data__item-content' },
|
|
37800
|
+
React__default['default'].createElement('div', { className: 'flyin__content-data__item-content-title' }, 'Refund'),
|
|
37797
37801
|
React__default['default'].createElement(
|
|
37798
37802
|
'div',
|
|
37799
|
-
{ className: 'flyin__content-data__item-
|
|
37800
|
-
|
|
37801
|
-
)
|
|
37803
|
+
{ className: 'flyin__content-data__item-content-description' },
|
|
37804
|
+
firstSegment.metaData.cancel.text
|
|
37805
|
+
)
|
|
37806
|
+
)
|
|
37807
|
+
),
|
|
37808
|
+
firstSegment.metaData.other &&
|
|
37809
|
+
React__default['default'].createElement(
|
|
37810
|
+
'div',
|
|
37811
|
+
{ className: 'flyin__content-data__item' },
|
|
37812
|
+
React__default['default'].createElement(
|
|
37813
|
+
'div',
|
|
37814
|
+
{ className: 'flyin__content-data__item-icon flyin__content-data__item-icon--other' },
|
|
37815
|
+
React__default['default'].createElement(Icon, { name: 'ui-else', width: 20 })
|
|
37816
|
+
),
|
|
37817
|
+
React__default['default'].createElement(
|
|
37818
|
+
'div',
|
|
37819
|
+
{ className: 'flyin__content-data__item-content' },
|
|
37820
|
+
React__default['default'].createElement('div', { className: 'flyin__content-data__item-content-title' }, 'Other'),
|
|
37802
37821
|
React__default['default'].createElement(
|
|
37803
|
-
'
|
|
37804
|
-
{ className: 'flyin__content-data__item-content' },
|
|
37805
|
-
|
|
37806
|
-
|
|
37807
|
-
|
|
37808
|
-
{ className: 'flyin__content-data__item-content-description flyin__content-data__item-content-description--list' },
|
|
37809
|
-
firstSegment.metaData.other.map(function (other, index) {
|
|
37810
|
-
return React__default['default'].createElement('li', { key: 'other-'.concat(index) }, other.text);
|
|
37811
|
-
})
|
|
37812
|
-
)
|
|
37822
|
+
'ul',
|
|
37823
|
+
{ className: 'flyin__content-data__item-content-description flyin__content-data__item-content-description--list' },
|
|
37824
|
+
firstSegment.metaData.other.map(function (other, index) {
|
|
37825
|
+
return React__default['default'].createElement('li', { key: 'other-'.concat(index) }, other.text);
|
|
37826
|
+
})
|
|
37813
37827
|
)
|
|
37814
37828
|
)
|
|
37815
|
-
|
|
37829
|
+
)
|
|
37816
37830
|
)
|
|
37817
|
-
)
|
|
37831
|
+
)
|
|
37832
|
+
),
|
|
37833
|
+
React__default['default'].createElement(
|
|
37834
|
+
'div',
|
|
37835
|
+
{
|
|
37836
|
+
className: 'flyin__content-card-button',
|
|
37837
|
+
onClick: function () {
|
|
37838
|
+
var _a, _b, _c;
|
|
37839
|
+
var fareCode =
|
|
37840
|
+
(_c =
|
|
37841
|
+
(_b = (_a = flightOption.return.segments) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0
|
|
37842
|
+
? void 0
|
|
37843
|
+
: _b.metaData) === null || _c === void 0
|
|
37844
|
+
? void 0
|
|
37845
|
+
: _c.fareCode;
|
|
37846
|
+
setSelectedReturnFareCode(fareCode !== null && fareCode !== void 0 ? fareCode : null);
|
|
37847
|
+
}
|
|
37848
|
+
},
|
|
37818
37849
|
React__default['default'].createElement(
|
|
37819
37850
|
'div',
|
|
37820
|
-
{
|
|
37821
|
-
|
|
37822
|
-
|
|
37823
|
-
var _a, _b, _c;
|
|
37824
|
-
var fareCode =
|
|
37825
|
-
(_c =
|
|
37826
|
-
(_b = (_a = flightOption.return.segments) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0
|
|
37827
|
-
? void 0
|
|
37828
|
-
: _b.metaData) === null || _c === void 0
|
|
37829
|
-
? void 0
|
|
37830
|
-
: _c.fareCode;
|
|
37831
|
-
setSelectedReturnFareCode(fareCode !== null && fareCode !== void 0 ? fareCode : null);
|
|
37832
|
-
}
|
|
37833
|
-
},
|
|
37834
|
-
React__default['default'].createElement(
|
|
37835
|
-
'div',
|
|
37836
|
-
{ className: 'cta '.concat(selectedReturnFareCode === firstSegment.metaData.fareCode ? 'cta--selected' : '') },
|
|
37837
|
-
' ',
|
|
37838
|
-
selectedReturnFareCode === firstSegment.metaData.fareCode ? 'Selected' : 'Select'
|
|
37839
|
-
)
|
|
37851
|
+
{ className: 'cta '.concat(selectedReturnFareCode === firstSegment.metaData.fareCode ? 'cta--selected' : '') },
|
|
37852
|
+
' ',
|
|
37853
|
+
selectedReturnFareCode === firstSegment.metaData.fareCode ? 'Selected' : 'Select'
|
|
37840
37854
|
)
|
|
37841
|
-
)
|
|
37842
|
-
|
|
37843
|
-
)
|
|
37855
|
+
)
|
|
37856
|
+
);
|
|
37857
|
+
})
|
|
37844
37858
|
)
|
|
37859
|
+
)
|
|
37860
|
+
),
|
|
37861
|
+
!flightSearchDetailsLoading &&
|
|
37862
|
+
React__default['default'].createElement(
|
|
37863
|
+
'div',
|
|
37864
|
+
{ className: 'flyin__footer' },
|
|
37865
|
+
React__default['default'].createElement(
|
|
37866
|
+
'div',
|
|
37867
|
+
{ className: 'flyin__footer__price' },
|
|
37868
|
+
'Total price: \u20AC',
|
|
37869
|
+
(_o = selectedCombinationFlight === null || selectedCombinationFlight === void 0 ? void 0 : selectedCombinationFlight.price) === null || _o === void 0
|
|
37870
|
+
? void 0
|
|
37871
|
+
: _o.toFixed(2)
|
|
37845
37872
|
),
|
|
37846
|
-
selectedCombinationFlight &&
|
|
37847
|
-
!flightSearchDetailsLoading &&
|
|
37848
37873
|
React__default['default'].createElement(
|
|
37849
37874
|
'div',
|
|
37850
|
-
{ className: '
|
|
37851
|
-
React__default['default'].createElement(
|
|
37852
|
-
|
|
37853
|
-
|
|
37854
|
-
|
|
37855
|
-
|
|
37856
|
-
|
|
37857
|
-
|
|
37858
|
-
|
|
37859
|
-
|
|
37875
|
+
{ className: 'flyin__button-wrapper' },
|
|
37876
|
+
React__default['default'].createElement('button', { className: 'cta cta--select', onClick: handleConfirm }, translations.PRODUCT.BOOK_NOW)
|
|
37877
|
+
)
|
|
37878
|
+
)
|
|
37879
|
+
);
|
|
37880
|
+
};
|
|
37881
|
+
|
|
37882
|
+
var AccommodationFlyIn = function (_a) {
|
|
37883
|
+
var _b;
|
|
37884
|
+
_a.isLoading;
|
|
37885
|
+
_a.isOpen;
|
|
37886
|
+
_a.setIsOpen;
|
|
37887
|
+
var context = React.useContext(SearchResultsConfigurationContext);
|
|
37888
|
+
var language = (_b = context === null || context === void 0 ? void 0 : context.languageCode) !== null && _b !== void 0 ? _b : 'en-GB';
|
|
37889
|
+
getTranslations(language);
|
|
37890
|
+
reactRedux.useSelector(function (state) {
|
|
37891
|
+
return state.searchResults;
|
|
37892
|
+
}).selectedSearchResultId;
|
|
37893
|
+
return React__default['default'].createElement(
|
|
37894
|
+
React__default['default'].Fragment,
|
|
37895
|
+
null,
|
|
37896
|
+
React__default['default'].createElement('div', { className: 'flyin__content' }, 'TODO')
|
|
37897
|
+
);
|
|
37898
|
+
};
|
|
37899
|
+
|
|
37900
|
+
var FlyIn = function (_a) {
|
|
37901
|
+
var title = _a.title,
|
|
37902
|
+
srpType = _a.srpType,
|
|
37903
|
+
isOpen = _a.isOpen,
|
|
37904
|
+
setIsOpen = _a.setIsOpen,
|
|
37905
|
+
_b = _a.className,
|
|
37906
|
+
className = _b === void 0 ? '' : _b,
|
|
37907
|
+
onPanelRef = _a.onPanelRef;
|
|
37908
|
+
var dispatch = reactRedux.useDispatch();
|
|
37909
|
+
var onCancelSearch = useFlightSearch().onCancelSearch;
|
|
37910
|
+
var panelRef = React.useRef(null);
|
|
37911
|
+
// expose DOM node if needed
|
|
37912
|
+
React.useEffect(
|
|
37913
|
+
function () {
|
|
37914
|
+
onPanelRef === null || onPanelRef === void 0 ? void 0 : onPanelRef(panelRef.current);
|
|
37915
|
+
return function () {
|
|
37916
|
+
return onPanelRef === null || onPanelRef === void 0 ? void 0 : onPanelRef(null);
|
|
37917
|
+
};
|
|
37918
|
+
},
|
|
37919
|
+
[onPanelRef]
|
|
37920
|
+
);
|
|
37921
|
+
React.useEffect(
|
|
37922
|
+
function () {
|
|
37923
|
+
// click outside detection
|
|
37924
|
+
var handleClickOutside = function (event) {
|
|
37925
|
+
if (isOpen && panelRef.current && !panelRef.current.contains(event.target)) {
|
|
37926
|
+
handleClose();
|
|
37927
|
+
}
|
|
37928
|
+
};
|
|
37929
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
37930
|
+
return function () {
|
|
37931
|
+
return document.removeEventListener('mousedown', handleClickOutside);
|
|
37932
|
+
};
|
|
37933
|
+
},
|
|
37934
|
+
[isOpen, setIsOpen]
|
|
37935
|
+
);
|
|
37936
|
+
// body scroll lock
|
|
37937
|
+
React.useEffect(
|
|
37938
|
+
function () {
|
|
37939
|
+
document.body.style.overflow = isOpen ? 'hidden' : '';
|
|
37940
|
+
return function () {
|
|
37941
|
+
document.body.style.overflow = '';
|
|
37942
|
+
};
|
|
37943
|
+
},
|
|
37944
|
+
[isOpen]
|
|
37945
|
+
);
|
|
37946
|
+
var handleClose = function () {
|
|
37947
|
+
if (isOpen && panelRef.current) {
|
|
37948
|
+
if (srpType === 'flight') {
|
|
37949
|
+
dispatch(setSelectedFlight(null));
|
|
37950
|
+
dispatch(setSelectedFlightDetails(null));
|
|
37951
|
+
onCancelSearch();
|
|
37952
|
+
}
|
|
37953
|
+
setIsOpen(false);
|
|
37954
|
+
}
|
|
37955
|
+
};
|
|
37956
|
+
return React__default['default'].createElement(
|
|
37957
|
+
'div',
|
|
37958
|
+
{ className: 'flyin '.concat(isOpen ? 'flyin--active' : '', ' ').concat(className) },
|
|
37959
|
+
React__default['default'].createElement(
|
|
37960
|
+
'div',
|
|
37961
|
+
{ className: 'flyin__panel '.concat(isOpen ? 'flyin__panel--active' : ''), ref: panelRef },
|
|
37962
|
+
React__default['default'].createElement(
|
|
37963
|
+
'div',
|
|
37964
|
+
{ className: 'flyin__content' },
|
|
37965
|
+
React__default['default'].createElement(
|
|
37966
|
+
'div',
|
|
37967
|
+
{ className: 'flyin__content-title-row' },
|
|
37968
|
+
React__default['default'].createElement('h3', { className: 'flyin__content-title' }, title),
|
|
37860
37969
|
React__default['default'].createElement(
|
|
37861
|
-
'
|
|
37862
|
-
{
|
|
37863
|
-
|
|
37970
|
+
'span',
|
|
37971
|
+
{
|
|
37972
|
+
className: 'flyin__close',
|
|
37973
|
+
onClick: function () {
|
|
37974
|
+
return handleClose();
|
|
37975
|
+
}
|
|
37976
|
+
},
|
|
37977
|
+
React__default['default'].createElement(Icon, { name: 'ui-close', width: 30, height: 30, 'aria-hidden': 'true' })
|
|
37864
37978
|
)
|
|
37865
37979
|
)
|
|
37980
|
+
),
|
|
37981
|
+
srpType === 'flight' && React__default['default'].createElement(FlightsFlyIn, { isOpen: isOpen, setIsOpen: setIsOpen }),
|
|
37982
|
+
(srpType === 'hotel' || srpType === 'groupTour') &&
|
|
37983
|
+
React__default['default'].createElement(AccommodationFlyIn, { isLoading: true, isOpen: isOpen, setIsOpen: setIsOpen })
|
|
37866
37984
|
)
|
|
37867
37985
|
);
|
|
37868
37986
|
};
|
|
@@ -37871,11 +37989,11 @@ var HotelCard = function (_a) {
|
|
|
37871
37989
|
var result = _a.result,
|
|
37872
37990
|
translations = _a.translations;
|
|
37873
37991
|
var dispatch = reactRedux.useDispatch();
|
|
37874
|
-
var
|
|
37992
|
+
var selectedSearchResultId = reactRedux.useSelector(function (state) {
|
|
37875
37993
|
return state.searchResults;
|
|
37876
|
-
}).
|
|
37877
|
-
var handleChange = function (
|
|
37878
|
-
dispatch(
|
|
37994
|
+
}).selectedSearchResultId;
|
|
37995
|
+
var handleChange = function (productId) {
|
|
37996
|
+
dispatch(setSelectedSearchResult(productId));
|
|
37879
37997
|
};
|
|
37880
37998
|
return React__default['default'].createElement(
|
|
37881
37999
|
'div',
|
|
@@ -37960,23 +38078,18 @@ var HotelCard = function (_a) {
|
|
|
37960
38078
|
'button',
|
|
37961
38079
|
{
|
|
37962
38080
|
type: 'button',
|
|
37963
|
-
className: 'cta '.concat(
|
|
38081
|
+
className: 'cta '.concat(selectedSearchResultId === result.id ? 'cta--selected' : 'cta--select'),
|
|
37964
38082
|
onClick: function () {
|
|
37965
38083
|
return handleChange(result.id);
|
|
37966
38084
|
}
|
|
37967
38085
|
},
|
|
37968
|
-
|
|
37969
|
-
|
|
37970
|
-
|
|
37971
|
-
|
|
37972
|
-
|
|
37973
|
-
|
|
37974
|
-
|
|
37975
|
-
onClick: function () {
|
|
37976
|
-
return console.log('Clicked on customCard with id:', result.id);
|
|
37977
|
-
}
|
|
37978
|
-
},
|
|
37979
|
-
translations === null || translations === void 0 ? void 0 : translations.SRP.VIEW_DETAILS
|
|
38086
|
+
selectedSearchResultId === result.id
|
|
38087
|
+
? translations === null || translations === void 0
|
|
38088
|
+
? void 0
|
|
38089
|
+
: translations.SHARED.SELECTED
|
|
38090
|
+
: translations === null || translations === void 0
|
|
38091
|
+
? void 0
|
|
38092
|
+
: translations.SHARED.SELECT
|
|
37980
38093
|
)
|
|
37981
38094
|
)
|
|
37982
38095
|
)
|
|
@@ -38036,7 +38149,9 @@ var mapSearchResult = function (searchResult, cmsItem, languageCode, translation
|
|
|
38036
38149
|
: ((_h = cmsItem === null || cmsItem === void 0 ? void 0 : cmsItem.parentItem) === null || _h === void 0 ? void 0 : _h.name) || '',
|
|
38037
38150
|
price: formatPrice(searchResult.price, searchResult.currencyCode, languageCode),
|
|
38038
38151
|
ctaText: translations === null || translations === void 0 ? void 0 : translations.SRP.VIEW_DETAILS,
|
|
38039
|
-
days:
|
|
38152
|
+
days: ''
|
|
38153
|
+
.concat(calculateNights(searchResult.stayFromDate, searchResult.stayToDate), ' ')
|
|
38154
|
+
.concat(translations === null || translations === void 0 ? void 0 : translations.SRP.NIGHTS),
|
|
38040
38155
|
accommodation: searchResult.accommodationName,
|
|
38041
38156
|
regime: searchResult.regimeName,
|
|
38042
38157
|
stars:
|
|
@@ -38045,17 +38160,13 @@ var mapSearchResult = function (searchResult, cmsItem, languageCode, translation
|
|
|
38045
38160
|
: _k.stars) || searchResult.hotelStars
|
|
38046
38161
|
};
|
|
38047
38162
|
};
|
|
38048
|
-
var calculateNights = function (fromDate, toDate, translations) {
|
|
38049
|
-
var from = new Date(fromDate).getTime(); // returns a number
|
|
38050
|
-
var to = new Date(toDate).getTime(); // returns a number
|
|
38051
|
-
var diffTime = Math.abs(to - from);
|
|
38052
|
-
var diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
|
38053
|
-
return ''.concat(diffDays, ' ').concat(translations === null || translations === void 0 ? void 0 : translations.SRP.NIGHTS);
|
|
38054
|
-
};
|
|
38055
38163
|
var HotelAccommodationResults = function (_a) {
|
|
38056
38164
|
var _b, _c;
|
|
38057
|
-
var isLoading = _a.isLoading
|
|
38058
|
-
|
|
38165
|
+
var isLoading = _a.isLoading;
|
|
38166
|
+
var context = React.useContext(SearchResultsConfigurationContext);
|
|
38167
|
+
if (!context) {
|
|
38168
|
+
return;
|
|
38169
|
+
}
|
|
38059
38170
|
if (context.showMockup) {
|
|
38060
38171
|
return showMocukups(context);
|
|
38061
38172
|
}
|
|
@@ -38072,9 +38183,9 @@ var HotelAccommodationResults = function (_a) {
|
|
|
38072
38183
|
var _d = reactRedux.useSelector(function (state) {
|
|
38073
38184
|
return state.searchResults;
|
|
38074
38185
|
}),
|
|
38075
|
-
|
|
38186
|
+
filteredResults = _d.filteredResults,
|
|
38076
38187
|
activeTab = _d.activeTab;
|
|
38077
|
-
if (!
|
|
38188
|
+
if (!filteredResults.length) {
|
|
38078
38189
|
return React__default['default'].createElement('div', { className: 'no-results' }, translations.SRP.NO_RESULTS);
|
|
38079
38190
|
}
|
|
38080
38191
|
var cmsMap = React__default['default'].useMemo(
|
|
@@ -38098,7 +38209,7 @@ var HotelAccommodationResults = function (_a) {
|
|
|
38098
38209
|
},
|
|
38099
38210
|
[context.cmsHotelData]
|
|
38100
38211
|
);
|
|
38101
|
-
var firstResult =
|
|
38212
|
+
var firstResult = filteredResults === null || filteredResults === void 0 ? void 0 : filteredResults[0];
|
|
38102
38213
|
var firstResultDay = (firstResult === null || firstResult === void 0 ? void 0 : firstResult.fromDate)
|
|
38103
38214
|
? dateFns.format(dateFns.parseISO(firstResult.fromDate), 'd')
|
|
38104
38215
|
: null;
|
|
@@ -38129,7 +38240,7 @@ var HotelAccommodationResults = function (_a) {
|
|
|
38129
38240
|
)
|
|
38130
38241
|
)
|
|
38131
38242
|
),
|
|
38132
|
-
renderResults(
|
|
38243
|
+
renderResults(filteredResults, context, cmsMap, activeTab, translations)
|
|
38133
38244
|
);
|
|
38134
38245
|
};
|
|
38135
38246
|
var showMocukups = function (context) {
|
|
@@ -38472,12 +38583,11 @@ var RoundTripResults = function () {
|
|
|
38472
38583
|
);
|
|
38473
38584
|
};
|
|
38474
38585
|
|
|
38475
|
-
var enrichFiltersWithResults = function (results, filters) {
|
|
38586
|
+
var enrichFiltersWithResults = function (results, filters, tags) {
|
|
38476
38587
|
if (!results || results.length === 0 || !filters) {
|
|
38477
38588
|
return filters !== null && filters !== void 0 ? filters : [];
|
|
38478
38589
|
}
|
|
38479
|
-
|
|
38480
|
-
var filter = filters_1[_i];
|
|
38590
|
+
var _loop_1 = function (filter) {
|
|
38481
38591
|
if (filter.property === 'price' && (filter.min == null || filter.max == null)) {
|
|
38482
38592
|
var prices = results
|
|
38483
38593
|
.map(function (r) {
|
|
@@ -38492,6 +38602,72 @@ var enrichFiltersWithResults = function (results, filters) {
|
|
|
38492
38602
|
filter.max = Math.ceil(Math.max.apply(Math, prices));
|
|
38493
38603
|
}
|
|
38494
38604
|
}
|
|
38605
|
+
if (filter.property === 'accommodation') {
|
|
38606
|
+
var map_1 = new Map();
|
|
38607
|
+
results.forEach(function (r) {
|
|
38608
|
+
if (r.accommodationCode) {
|
|
38609
|
+
map_1.set(r.accommodationCode, {
|
|
38610
|
+
name: r.accommodationName,
|
|
38611
|
+
code: r.accommodationCode
|
|
38612
|
+
});
|
|
38613
|
+
}
|
|
38614
|
+
});
|
|
38615
|
+
console.log('map', map_1);
|
|
38616
|
+
filter.options = Array.from(map_1.values()).map(function (accommodation) {
|
|
38617
|
+
var _a;
|
|
38618
|
+
return {
|
|
38619
|
+
label: (_a = accommodation.name) !== null && _a !== void 0 ? _a : accommodation.code,
|
|
38620
|
+
value: accommodation.code,
|
|
38621
|
+
isChecked: false
|
|
38622
|
+
};
|
|
38623
|
+
});
|
|
38624
|
+
}
|
|
38625
|
+
if (filter.property === 'regime') {
|
|
38626
|
+
var map_2 = new Map();
|
|
38627
|
+
results.forEach(function (r) {
|
|
38628
|
+
if (r.regimeCode) {
|
|
38629
|
+
map_2.set(r.regimeCode, {
|
|
38630
|
+
name: r.regimeName,
|
|
38631
|
+
code: r.regimeCode
|
|
38632
|
+
});
|
|
38633
|
+
}
|
|
38634
|
+
});
|
|
38635
|
+
filter.options = Array.from(map_2.values()).map(function (regime) {
|
|
38636
|
+
var _a;
|
|
38637
|
+
return {
|
|
38638
|
+
label: (_a = regime.name) !== null && _a !== void 0 ? _a : regime.code,
|
|
38639
|
+
value: regime.code,
|
|
38640
|
+
isChecked: false
|
|
38641
|
+
};
|
|
38642
|
+
});
|
|
38643
|
+
}
|
|
38644
|
+
if (filter.property === 'theme') {
|
|
38645
|
+
var map_3 = new Map();
|
|
38646
|
+
results.forEach(function (r) {
|
|
38647
|
+
var _a;
|
|
38648
|
+
(_a = r.tagIds) === null || _a === void 0
|
|
38649
|
+
? void 0
|
|
38650
|
+
: _a.forEach(function (tagId) {
|
|
38651
|
+
var tag = tags.find(function (t) {
|
|
38652
|
+
return t.id === tagId;
|
|
38653
|
+
});
|
|
38654
|
+
if (tag && tag.id != null && tag.name != null) {
|
|
38655
|
+
map_3.set(tag.id, { name: tag.name, id: tag.id });
|
|
38656
|
+
}
|
|
38657
|
+
});
|
|
38658
|
+
});
|
|
38659
|
+
filter.options = Array.from(map_3.values()).map(function (theme) {
|
|
38660
|
+
return {
|
|
38661
|
+
label: theme.name,
|
|
38662
|
+
value: theme.id,
|
|
38663
|
+
isChecked: false
|
|
38664
|
+
};
|
|
38665
|
+
});
|
|
38666
|
+
}
|
|
38667
|
+
};
|
|
38668
|
+
for (var _i = 0, filters_1 = filters; _i < filters_1.length; _i++) {
|
|
38669
|
+
var filter = filters_1[_i];
|
|
38670
|
+
_loop_1(filter);
|
|
38495
38671
|
}
|
|
38496
38672
|
return filters;
|
|
38497
38673
|
};
|
|
@@ -40863,101 +41039,21 @@ var FlightResultsContainer = function (_a) {
|
|
|
40863
41039
|
);
|
|
40864
41040
|
};
|
|
40865
41041
|
|
|
40866
|
-
var initialFilters = [
|
|
40867
|
-
{
|
|
40868
|
-
property: 'regime',
|
|
40869
|
-
label: 'Regime',
|
|
40870
|
-
type: 'checkbox',
|
|
40871
|
-
options: [
|
|
40872
|
-
{
|
|
40873
|
-
label: 'Room only',
|
|
40874
|
-
value: ['RO', 'LO', 'OB'],
|
|
40875
|
-
isChecked: false
|
|
40876
|
-
},
|
|
40877
|
-
{
|
|
40878
|
-
label: 'Bed & Beakfast',
|
|
40879
|
-
value: ['BB', 'KO'],
|
|
40880
|
-
isChecked: false
|
|
40881
|
-
},
|
|
40882
|
-
{
|
|
40883
|
-
label: 'Half board',
|
|
40884
|
-
value: ['HB'],
|
|
40885
|
-
isChecked: false
|
|
40886
|
-
},
|
|
40887
|
-
{
|
|
40888
|
-
label: 'Full board',
|
|
40889
|
-
value: ['FB'],
|
|
40890
|
-
isChecked: false
|
|
40891
|
-
}
|
|
40892
|
-
],
|
|
40893
|
-
isFrontendFilter: false
|
|
40894
|
-
},
|
|
40895
|
-
{
|
|
40896
|
-
property: 'price',
|
|
40897
|
-
label: 'Prijs',
|
|
40898
|
-
type: 'slider',
|
|
40899
|
-
isFrontendFilter: false,
|
|
40900
|
-
min: 2244,
|
|
40901
|
-
max: 6785
|
|
40902
|
-
},
|
|
40903
|
-
{
|
|
40904
|
-
property: 'rating',
|
|
40905
|
-
label: 'Rating',
|
|
40906
|
-
type: 'star-rating',
|
|
40907
|
-
isFrontendFilter: true
|
|
40908
|
-
},
|
|
40909
|
-
{
|
|
40910
|
-
property: 'theme',
|
|
40911
|
-
label: "Thema's",
|
|
40912
|
-
type: 'toggle',
|
|
40913
|
-
options: [
|
|
40914
|
-
{
|
|
40915
|
-
label: 'Adults',
|
|
40916
|
-
value: 1,
|
|
40917
|
-
isChecked: false
|
|
40918
|
-
},
|
|
40919
|
-
{
|
|
40920
|
-
label: 'Luxury',
|
|
40921
|
-
value: 2,
|
|
40922
|
-
isChecked: false
|
|
40923
|
-
},
|
|
40924
|
-
{
|
|
40925
|
-
label: 'Welness & Spa',
|
|
40926
|
-
value: 3,
|
|
40927
|
-
isChecked: false
|
|
40928
|
-
},
|
|
40929
|
-
{
|
|
40930
|
-
label: 'familie',
|
|
40931
|
-
value: 4,
|
|
40932
|
-
isChecked: false
|
|
40933
|
-
}
|
|
40934
|
-
],
|
|
40935
|
-
isFrontendFilter: false
|
|
40936
|
-
}
|
|
40937
|
-
];
|
|
40938
41042
|
var Filters = function (_a) {
|
|
40939
41043
|
var _b;
|
|
40940
|
-
var
|
|
41044
|
+
var initialFilters = _a.initialFilters,
|
|
41045
|
+
filters = _a.filters,
|
|
40941
41046
|
isOpen = _a.isOpen,
|
|
40942
41047
|
handleSetIsOpen = _a.handleSetIsOpen,
|
|
40943
|
-
handleApplyFilters = _a.handleApplyFilters,
|
|
40944
41048
|
isLoading = _a.isLoading;
|
|
40945
41049
|
var context = React.useContext(SearchResultsConfigurationContext);
|
|
41050
|
+
if (!context || !context.showFilters) {
|
|
41051
|
+
return null;
|
|
41052
|
+
}
|
|
40946
41053
|
var translations = getTranslations((_b = context === null || context === void 0 ? void 0 : context.languageCode) !== null && _b !== void 0 ? _b : 'en-GB');
|
|
40947
41054
|
var _c = React.useState({}),
|
|
40948
41055
|
visibleFilters = _c[0],
|
|
40949
41056
|
setVisibleFilters = _c[1];
|
|
40950
|
-
var _d = React.useState([]),
|
|
40951
|
-
pendingFilters = _d[0],
|
|
40952
|
-
setPendingFilters = _d[1];
|
|
40953
|
-
React.useEffect(
|
|
40954
|
-
function () {
|
|
40955
|
-
if (initialFilters.length > 0) {
|
|
40956
|
-
setPendingFilters(initialFilters);
|
|
40957
|
-
}
|
|
40958
|
-
},
|
|
40959
|
-
[initialFilters]
|
|
40960
|
-
);
|
|
40961
41057
|
var dispatch = reactRedux.useDispatch();
|
|
40962
41058
|
var toggleFilterVisibility = function (filterId) {
|
|
40963
41059
|
setVisibleFilters(function (prev) {
|
|
@@ -40965,331 +41061,452 @@ var Filters = function (_a) {
|
|
|
40965
41061
|
return __assign(__assign({}, prev), ((_a = {}), (_a[filterId] = !prev[filterId]), _a));
|
|
40966
41062
|
});
|
|
40967
41063
|
};
|
|
40968
|
-
var updatePendingFilter = function (updatedFilter) {
|
|
40969
|
-
setPendingFilters(function (prevFilters) {
|
|
40970
|
-
var index = prevFilters.findIndex(function (f) {
|
|
40971
|
-
return f.property === updatedFilter.property;
|
|
40972
|
-
});
|
|
40973
|
-
if (index !== -1) {
|
|
40974
|
-
var newFilters = __spreadArray([], prevFilters, true);
|
|
40975
|
-
newFilters[index] = updatedFilter;
|
|
40976
|
-
return newFilters;
|
|
40977
|
-
} else {
|
|
40978
|
-
return __spreadArray(__spreadArray([], prevFilters, true), [updatedFilter], false);
|
|
40979
|
-
}
|
|
40980
|
-
});
|
|
40981
|
-
};
|
|
40982
41064
|
var handleCheckBoxFilter = function (filter, option) {
|
|
40983
|
-
|
|
41065
|
+
var updated = filters.map(function (f) {
|
|
40984
41066
|
var _a;
|
|
40985
|
-
|
|
40986
|
-
|
|
40987
|
-
|
|
40988
|
-
|
|
40989
|
-
|
|
40990
|
-
|
|
40991
|
-
|
|
40992
|
-
|
|
40993
|
-
? void 0
|
|
40994
|
-
: _a.map(function (opt) {
|
|
40995
|
-
return opt.value === option.value ? __assign(__assign({}, opt), { isChecked: !opt.isChecked }) : opt;
|
|
40996
|
-
})
|
|
40997
|
-
});
|
|
41067
|
+
if (f.property !== filter.property) return f;
|
|
41068
|
+
return __assign(__assign({}, f), {
|
|
41069
|
+
options:
|
|
41070
|
+
(_a = f.options) === null || _a === void 0
|
|
41071
|
+
? void 0
|
|
41072
|
+
: _a.map(function (opt) {
|
|
41073
|
+
return opt.value === option.value ? __assign(__assign({}, opt), { isChecked: !opt.isChecked }) : opt;
|
|
41074
|
+
})
|
|
40998
41075
|
});
|
|
40999
|
-
if (!(context === null || context === void 0 ? void 0 : context.useGlobalApplyFilterButton) && !filter.useApplyFilterButton) {
|
|
41000
|
-
dispatch(setFilters(updated));
|
|
41001
|
-
(_a = context === null || context === void 0 ? void 0 : context.onFilterChange) === null || _a === void 0 ? void 0 : _a.call(context, updated);
|
|
41002
|
-
}
|
|
41003
|
-
return updated;
|
|
41004
41076
|
});
|
|
41077
|
+
dispatch(setFilters(updated));
|
|
41005
41078
|
};
|
|
41006
|
-
var
|
|
41007
|
-
var
|
|
41008
|
-
|
|
41009
|
-
|
|
41010
|
-
|
|
41011
|
-
|
|
41012
|
-
applyFilters();
|
|
41013
|
-
}
|
|
41014
|
-
}
|
|
41015
|
-
};
|
|
41016
|
-
var handleSliderMaxChange = function (filter, value) {
|
|
41017
|
-
var _a, _b;
|
|
41018
|
-
if (value > ((_b = (_a = filter.selectedMin) !== null && _a !== void 0 ? _a : filter.min) !== null && _b !== void 0 ? _b : 0)) {
|
|
41019
|
-
var updatedFilter = __assign(__assign({}, filter), { selectedMax: value });
|
|
41020
|
-
updatePendingFilter(updatedFilter);
|
|
41021
|
-
if (!(context === null || context === void 0 ? void 0 : context.useGlobalApplyFilterButton) && !filter.useApplyFilterButton) {
|
|
41022
|
-
applyFilters();
|
|
41023
|
-
}
|
|
41024
|
-
}
|
|
41025
|
-
};
|
|
41026
|
-
var applyFilters = function () {
|
|
41027
|
-
var _a;
|
|
41028
|
-
dispatch(setFilters(pendingFilters));
|
|
41029
|
-
(_a = context === null || context === void 0 ? void 0 : context.onFilterChange) === null || _a === void 0 ? void 0 : _a.call(context, pendingFilters);
|
|
41030
|
-
handleApplyFilters();
|
|
41031
|
-
if (isOpen) {
|
|
41032
|
-
handleSetIsOpen();
|
|
41033
|
-
}
|
|
41079
|
+
var handleSliderChange = function (filter, newMin, newMax) {
|
|
41080
|
+
var updated = filters.map(function (f) {
|
|
41081
|
+
if (f.property !== filter.property) return f;
|
|
41082
|
+
return __assign(__assign({}, f), { selectedMin: newMin, selectedMax: newMax });
|
|
41083
|
+
});
|
|
41084
|
+
dispatch(setFilters(updated));
|
|
41034
41085
|
};
|
|
41035
41086
|
var handleFullReset = function () {
|
|
41036
41087
|
if (!isLoading) {
|
|
41037
|
-
setPendingFilters(initialFilters);
|
|
41038
41088
|
dispatch(resetFilters(initialFilters));
|
|
41039
41089
|
}
|
|
41040
41090
|
};
|
|
41041
|
-
var handleResetPendingChanges = function () {
|
|
41042
|
-
setPendingFilters(filters); // ← back to last applied
|
|
41043
|
-
};
|
|
41044
|
-
var hasPendingChanges = function () {
|
|
41045
|
-
return JSON.stringify(pendingFilters) !== JSON.stringify(filters);
|
|
41046
|
-
};
|
|
41047
|
-
if (!context || !context.showFilters) {
|
|
41048
|
-
return null;
|
|
41049
|
-
}
|
|
41050
41091
|
return React__default['default'].createElement(
|
|
41051
|
-
|
|
41052
|
-
|
|
41092
|
+
'div',
|
|
41093
|
+
{ className: 'search__filters--modal '.concat(isOpen ? 'is-open' : '') },
|
|
41094
|
+
React__default['default'].createElement('div', {
|
|
41095
|
+
className: 'search__filters--background',
|
|
41096
|
+
onClick: function () {
|
|
41097
|
+
return handleSetIsOpen();
|
|
41098
|
+
}
|
|
41099
|
+
}),
|
|
41053
41100
|
React__default['default'].createElement(
|
|
41054
|
-
'
|
|
41055
|
-
{
|
|
41056
|
-
|
|
41057
|
-
className: 'search__filters--background',
|
|
41101
|
+
'button',
|
|
41102
|
+
{
|
|
41103
|
+
className: 'search__filters--close',
|
|
41058
41104
|
onClick: function () {
|
|
41059
41105
|
return handleSetIsOpen();
|
|
41060
41106
|
}
|
|
41061
|
-
}
|
|
41062
|
-
React__default['default'].createElement(
|
|
41063
|
-
|
|
41064
|
-
|
|
41065
|
-
|
|
41066
|
-
|
|
41067
|
-
return handleSetIsOpen();
|
|
41068
|
-
}
|
|
41069
|
-
},
|
|
41070
|
-
React__default['default'].createElement(Icon$1, { name: 'ui-close', height: 24 })
|
|
41071
|
-
),
|
|
41107
|
+
},
|
|
41108
|
+
React__default['default'].createElement(Icon$1, { name: 'ui-close', height: 24 })
|
|
41109
|
+
),
|
|
41110
|
+
React__default['default'].createElement(
|
|
41111
|
+
'div',
|
|
41112
|
+
{ className: 'search__filters' },
|
|
41072
41113
|
React__default['default'].createElement(
|
|
41073
41114
|
'div',
|
|
41074
|
-
{ className: '
|
|
41115
|
+
{ className: 'search__filter-row search__filter__header' },
|
|
41075
41116
|
React__default['default'].createElement(
|
|
41076
41117
|
'div',
|
|
41077
|
-
{ className: 'search__filter-row
|
|
41118
|
+
{ className: 'search__filter-row-flex-title' },
|
|
41119
|
+
React__default['default'].createElement('p', { className: 'search__filter-small-title' }, translations.SRP.FILTERS)
|
|
41120
|
+
),
|
|
41121
|
+
!isLoading &&
|
|
41078
41122
|
React__default['default'].createElement(
|
|
41079
|
-
'
|
|
41080
|
-
{
|
|
41081
|
-
|
|
41082
|
-
|
|
41083
|
-
|
|
41123
|
+
'a',
|
|
41124
|
+
{
|
|
41125
|
+
className: 'search__filter-reset',
|
|
41126
|
+
onClick: function () {
|
|
41127
|
+
return handleFullReset();
|
|
41128
|
+
}
|
|
41129
|
+
},
|
|
41130
|
+
translations.SRP.RESET
|
|
41131
|
+
)
|
|
41132
|
+
),
|
|
41133
|
+
isLoading
|
|
41134
|
+
? React__default['default'].createElement(Spinner, null)
|
|
41135
|
+
: React__default['default'].createElement(
|
|
41136
|
+
React__default['default'].Fragment,
|
|
41137
|
+
null,
|
|
41084
41138
|
React__default['default'].createElement(
|
|
41085
|
-
'
|
|
41086
|
-
{
|
|
41087
|
-
|
|
41088
|
-
|
|
41089
|
-
|
|
41090
|
-
|
|
41091
|
-
|
|
41092
|
-
|
|
41093
|
-
|
|
41094
|
-
),
|
|
41095
|
-
isLoading
|
|
41096
|
-
? React__default['default'].createElement(Spinner, null)
|
|
41097
|
-
: React__default['default'].createElement(
|
|
41098
|
-
React__default['default'].Fragment,
|
|
41099
|
-
null,
|
|
41100
|
-
React__default['default'].createElement(
|
|
41101
|
-
'div',
|
|
41102
|
-
{ className: 'search__filters__group-container' },
|
|
41103
|
-
pendingFilters.map(function (filter, index) {
|
|
41104
|
-
var _a, _b;
|
|
41105
|
-
var isVisible = (_a = visibleFilters[filter.property]) !== null && _a !== void 0 ? _a : true;
|
|
41106
|
-
return React__default['default'].createElement(
|
|
41139
|
+
'div',
|
|
41140
|
+
{ className: 'search__filters__group-container' },
|
|
41141
|
+
filters.map(function (filter, index) {
|
|
41142
|
+
var _a, _b;
|
|
41143
|
+
var isVisible = (_a = visibleFilters[filter.property]) !== null && _a !== void 0 ? _a : true;
|
|
41144
|
+
return React__default['default'].createElement(
|
|
41145
|
+
'div',
|
|
41146
|
+
{ key: ''.concat(filter.property, '-').concat(index), className: 'search__filter-group' },
|
|
41147
|
+
React__default['default'].createElement(
|
|
41107
41148
|
'div',
|
|
41108
|
-
{
|
|
41149
|
+
{
|
|
41150
|
+
className: 'search__filter-row search__filter-row--underline',
|
|
41151
|
+
onClick: function () {
|
|
41152
|
+
return toggleFilterVisibility(filter.property);
|
|
41153
|
+
},
|
|
41154
|
+
role: 'button',
|
|
41155
|
+
tabIndex: 0
|
|
41156
|
+
},
|
|
41157
|
+
React__default['default'].createElement('h6', { className: 'search__filter-large-title' }, filter.label),
|
|
41109
41158
|
React__default['default'].createElement(
|
|
41110
|
-
'
|
|
41159
|
+
'svg',
|
|
41111
41160
|
{
|
|
41112
|
-
|
|
41113
|
-
|
|
41114
|
-
|
|
41115
|
-
|
|
41116
|
-
|
|
41117
|
-
tabIndex: 0
|
|
41161
|
+
id: 'search-chevron-up-icon',
|
|
41162
|
+
className: 'search__filter-chevron-icon '.concat(isVisible ? 'search__filter-chevron-icon--flipped' : '', ' '),
|
|
41163
|
+
viewBox: '0 0 10 6.063',
|
|
41164
|
+
width: 10,
|
|
41165
|
+
height: 6.063
|
|
41118
41166
|
},
|
|
41119
|
-
React__default['default'].createElement('
|
|
41120
|
-
|
|
41121
|
-
'
|
|
41122
|
-
|
|
41123
|
-
|
|
41124
|
-
|
|
41125
|
-
|
|
41126
|
-
|
|
41127
|
-
|
|
41128
|
-
|
|
41129
|
-
|
|
41130
|
-
|
|
41131
|
-
|
|
41132
|
-
|
|
41133
|
-
|
|
41134
|
-
|
|
41167
|
+
React__default['default'].createElement('path', {
|
|
41168
|
+
id: 'Path_62',
|
|
41169
|
+
'data-name': 'Path 62',
|
|
41170
|
+
d: 'M245-617.937l-5-5L241.063-624,245-620.062,248.938-624,250-622.937Z',
|
|
41171
|
+
transform: 'translate(-240 624)',
|
|
41172
|
+
fill: '#707070'
|
|
41173
|
+
})
|
|
41174
|
+
)
|
|
41175
|
+
),
|
|
41176
|
+
isVisible &&
|
|
41177
|
+
filter.type === 'checkbox' &&
|
|
41178
|
+
React__default['default'].createElement(
|
|
41179
|
+
'div',
|
|
41180
|
+
{ className: 'search__filter-rows' },
|
|
41181
|
+
filter.options &&
|
|
41182
|
+
filter.options.map(function (option, optionIndex) {
|
|
41183
|
+
return React__default['default'].createElement(
|
|
41184
|
+
'div',
|
|
41185
|
+
{ className: 'search__filter-row search__filter-row--checkbox', key: ''.concat(option.label, '-').concat(optionIndex) },
|
|
41186
|
+
React__default['default'].createElement(
|
|
41187
|
+
'div',
|
|
41188
|
+
{ className: 'checkbox' },
|
|
41189
|
+
React__default['default'].createElement(
|
|
41190
|
+
'label',
|
|
41191
|
+
{ className: 'checkbox__label' },
|
|
41192
|
+
React__default['default'].createElement('input', {
|
|
41193
|
+
type: 'checkbox',
|
|
41194
|
+
className: 'checkbox__input checkbox__input--parent',
|
|
41195
|
+
checked: option.isChecked,
|
|
41196
|
+
onChange: function (e) {
|
|
41197
|
+
return handleCheckBoxFilter(filter, option);
|
|
41198
|
+
}
|
|
41199
|
+
}),
|
|
41200
|
+
React__default['default'].createElement('span', { className: 'radiobutton__label-text' }, option.label)
|
|
41201
|
+
)
|
|
41202
|
+
)
|
|
41203
|
+
);
|
|
41135
41204
|
})
|
|
41136
|
-
)
|
|
41137
41205
|
),
|
|
41138
|
-
|
|
41139
|
-
|
|
41140
|
-
|
|
41141
|
-
|
|
41142
|
-
|
|
41143
|
-
|
|
41144
|
-
|
|
41206
|
+
isVisible &&
|
|
41207
|
+
filter.type === 'toggle' &&
|
|
41208
|
+
React__default['default'].createElement(
|
|
41209
|
+
'div',
|
|
41210
|
+
{ className: 'search__filter-rows' },
|
|
41211
|
+
(_b = filter.options) === null || _b === void 0
|
|
41212
|
+
? void 0
|
|
41213
|
+
: _b.map(function (option, optionIndex) {
|
|
41145
41214
|
return React__default['default'].createElement(
|
|
41146
41215
|
'div',
|
|
41147
|
-
{ className: 'search__filter-row
|
|
41216
|
+
{ className: 'search__filter-row', key: ''.concat(option.label, '-').concat(optionIndex) },
|
|
41217
|
+
React__default['default'].createElement('span', { className: 'search__filter-toggle-label' }, option.label),
|
|
41218
|
+
React__default['default'].createElement('div', { className: 'checkbox' }),
|
|
41148
41219
|
React__default['default'].createElement(
|
|
41149
|
-
'
|
|
41150
|
-
{ className: '
|
|
41151
|
-
React__default['default'].createElement(
|
|
41152
|
-
'
|
|
41153
|
-
|
|
41154
|
-
|
|
41155
|
-
|
|
41156
|
-
|
|
41157
|
-
|
|
41158
|
-
|
|
41159
|
-
return handleCheckBoxFilter(filter, option);
|
|
41160
|
-
}
|
|
41161
|
-
}),
|
|
41162
|
-
React__default['default'].createElement('span', { className: 'radiobutton__label-text' }, option.label)
|
|
41163
|
-
)
|
|
41220
|
+
'label',
|
|
41221
|
+
{ className: 'checkbox__label' },
|
|
41222
|
+
React__default['default'].createElement('input', {
|
|
41223
|
+
type: 'checkbox',
|
|
41224
|
+
className: 'checkbox__input',
|
|
41225
|
+
checked: option.isChecked,
|
|
41226
|
+
onChange: function () {
|
|
41227
|
+
return handleCheckBoxFilter(filter, option);
|
|
41228
|
+
}
|
|
41229
|
+
})
|
|
41164
41230
|
)
|
|
41165
41231
|
);
|
|
41166
41232
|
})
|
|
41167
|
-
),
|
|
41168
|
-
isVisible &&
|
|
41169
|
-
filter.type === 'toggle' &&
|
|
41170
|
-
React__default['default'].createElement(
|
|
41171
|
-
'div',
|
|
41172
|
-
{ className: 'search__filter-rows' },
|
|
41173
|
-
(_b = filter.options) === null || _b === void 0
|
|
41174
|
-
? void 0
|
|
41175
|
-
: _b.map(function (option, optionIndex) {
|
|
41176
|
-
return React__default['default'].createElement(
|
|
41177
|
-
'div',
|
|
41178
|
-
{ className: 'search__filter-row', key: ''.concat(option.label, '-').concat(optionIndex) },
|
|
41179
|
-
React__default['default'].createElement('span', { className: 'search__filter-toggle-label' }, option.label),
|
|
41180
|
-
React__default['default'].createElement('div', { className: 'checkbox' }),
|
|
41181
|
-
React__default['default'].createElement(
|
|
41182
|
-
'label',
|
|
41183
|
-
{ className: 'checkbox__label' },
|
|
41184
|
-
React__default['default'].createElement('input', {
|
|
41185
|
-
type: 'checkbox',
|
|
41186
|
-
className: 'checkbox__input',
|
|
41187
|
-
checked: option.isChecked,
|
|
41188
|
-
onChange: function () {
|
|
41189
|
-
return handleCheckBoxFilter(filter, option);
|
|
41190
|
-
}
|
|
41191
|
-
})
|
|
41192
|
-
)
|
|
41193
|
-
);
|
|
41194
|
-
})
|
|
41195
|
-
),
|
|
41196
|
-
isVisible &&
|
|
41197
|
-
filter &&
|
|
41198
|
-
filter.type === 'slider' &&
|
|
41199
|
-
(function () {
|
|
41200
|
-
var _a, _b, _c, _d;
|
|
41201
|
-
var min = (_a = filter.min) !== null && _a !== void 0 ? _a : 0;
|
|
41202
|
-
var max = (_b = filter.max) !== null && _b !== void 0 ? _b : 100;
|
|
41203
|
-
var selectedMin = (_c = filter.selectedMin) !== null && _c !== void 0 ? _c : min;
|
|
41204
|
-
var selectedMax = (_d = filter.selectedMax) !== null && _d !== void 0 ? _d : max;
|
|
41205
|
-
return React__default['default'].createElement(MultiRangeFilter, {
|
|
41206
|
-
min: min,
|
|
41207
|
-
max: max,
|
|
41208
|
-
selectedMin: selectedMin,
|
|
41209
|
-
selectedMax: selectedMax,
|
|
41210
|
-
valueFormatter: function (value) {
|
|
41211
|
-
return ''.concat(value);
|
|
41212
|
-
},
|
|
41213
|
-
onChange: function (newMin, newMax) {
|
|
41214
|
-
handleSliderMinChange(filter, newMin);
|
|
41215
|
-
handleSliderMaxChange(filter, newMax);
|
|
41216
|
-
}
|
|
41217
|
-
});
|
|
41218
|
-
})(),
|
|
41219
|
-
isVisible &&
|
|
41220
|
-
filter.property === 'rating' &&
|
|
41221
|
-
filter.type === 'star-rating' &&
|
|
41222
|
-
(function () {
|
|
41223
|
-
var _a;
|
|
41224
|
-
var selectedRating = (_a = filter.selectedRating) !== null && _a !== void 0 ? _a : 0;
|
|
41225
|
-
var handleRatingChange = function (rating) {
|
|
41226
|
-
var updatedFilter = __assign(__assign({}, filter), { selectedRating: rating });
|
|
41227
|
-
updatePendingFilter(updatedFilter);
|
|
41228
|
-
if (!(context === null || context === void 0 ? void 0 : context.useGlobalApplyFilterButton) && !filter.useApplyFilterButton) {
|
|
41229
|
-
applyFilters();
|
|
41230
|
-
}
|
|
41231
|
-
};
|
|
41232
|
-
return React__default['default'].createElement(
|
|
41233
|
-
'div',
|
|
41234
|
-
{ className: 'search__filter-row star-rating-filter' },
|
|
41235
|
-
[5, 4, 3, 2, 1].map(function (star) {
|
|
41236
|
-
return React__default['default'].createElement(
|
|
41237
|
-
'span',
|
|
41238
|
-
{
|
|
41239
|
-
key: star,
|
|
41240
|
-
className: 'star '.concat(star <= selectedRating ? 'filled' : ''),
|
|
41241
|
-
onClick: function () {
|
|
41242
|
-
return handleRatingChange(star);
|
|
41243
|
-
},
|
|
41244
|
-
role: 'button',
|
|
41245
|
-
tabIndex: 0,
|
|
41246
|
-
onKeyDown: function (e) {
|
|
41247
|
-
if (e.key === 'Enter' || e.key === ' ') handleRatingChange(star);
|
|
41248
|
-
}
|
|
41249
|
-
},
|
|
41250
|
-
'\u2605'
|
|
41251
|
-
);
|
|
41252
|
-
})
|
|
41253
|
-
);
|
|
41254
|
-
})()
|
|
41255
|
-
);
|
|
41256
|
-
}),
|
|
41257
|
-
context.useGlobalApplyFilterButton &&
|
|
41258
|
-
hasPendingChanges() &&
|
|
41259
|
-
React__default['default'].createElement(
|
|
41260
|
-
'div',
|
|
41261
|
-
{ className: 'search__filters__actions' },
|
|
41262
|
-
React__default['default'].createElement(
|
|
41263
|
-
'button',
|
|
41264
|
-
{
|
|
41265
|
-
className: 'cta--secondary ',
|
|
41266
|
-
onClick: function () {
|
|
41267
|
-
handleResetPendingChanges();
|
|
41268
|
-
handleSetIsOpen();
|
|
41269
|
-
},
|
|
41270
|
-
disabled: isLoading
|
|
41271
|
-
},
|
|
41272
|
-
translations.SRP.CANCEL
|
|
41273
41233
|
),
|
|
41274
|
-
|
|
41275
|
-
|
|
41276
|
-
|
|
41277
|
-
|
|
41278
|
-
|
|
41279
|
-
|
|
41234
|
+
isVisible &&
|
|
41235
|
+
filter &&
|
|
41236
|
+
filter.type === 'slider' &&
|
|
41237
|
+
(function () {
|
|
41238
|
+
var _a, _b, _c, _d;
|
|
41239
|
+
var min = (_a = filter.min) !== null && _a !== void 0 ? _a : 0;
|
|
41240
|
+
var max = (_b = filter.max) !== null && _b !== void 0 ? _b : 100;
|
|
41241
|
+
var selectedMin = (_c = filter.selectedMin) !== null && _c !== void 0 ? _c : min;
|
|
41242
|
+
var selectedMax = (_d = filter.selectedMax) !== null && _d !== void 0 ? _d : max;
|
|
41243
|
+
return React__default['default'].createElement(MultiRangeFilter, {
|
|
41244
|
+
min: min,
|
|
41245
|
+
max: max,
|
|
41246
|
+
selectedMin: selectedMin,
|
|
41247
|
+
selectedMax: selectedMax,
|
|
41248
|
+
valueFormatter: function (value) {
|
|
41249
|
+
return ''.concat(value);
|
|
41280
41250
|
},
|
|
41281
|
-
|
|
41282
|
-
|
|
41283
|
-
|
|
41284
|
-
|
|
41285
|
-
|
|
41251
|
+
onChange: function (newMin, newMax) {
|
|
41252
|
+
handleSliderChange(filter, newMin, newMax);
|
|
41253
|
+
}
|
|
41254
|
+
});
|
|
41255
|
+
})()
|
|
41256
|
+
);
|
|
41257
|
+
})
|
|
41258
|
+
)
|
|
41259
|
+
)
|
|
41260
|
+
)
|
|
41261
|
+
);
|
|
41262
|
+
};
|
|
41263
|
+
|
|
41264
|
+
var GroupTourCard = function (_a) {
|
|
41265
|
+
var _b;
|
|
41266
|
+
var result = _a.result,
|
|
41267
|
+
languageCode = _a.languageCode;
|
|
41268
|
+
var dispatch = reactRedux.useDispatch();
|
|
41269
|
+
var translations = getTranslations(languageCode !== null && languageCode !== void 0 ? languageCode : 'en-GB');
|
|
41270
|
+
var selectedSearchResultId = reactRedux.useSelector(function (state) {
|
|
41271
|
+
return state.searchResults;
|
|
41272
|
+
}).selectedSearchResultId;
|
|
41273
|
+
var genders = ((_b = result.allotment) === null || _b === void 0 ? void 0 : _b.travellerGenders) || [];
|
|
41274
|
+
var maleCount = genders.filter(function (g) {
|
|
41275
|
+
return g === 0;
|
|
41276
|
+
}).length;
|
|
41277
|
+
var femaleCount = genders.filter(function (g) {
|
|
41278
|
+
return g === 1;
|
|
41279
|
+
}).length;
|
|
41280
|
+
var otherCount = genders.filter(function (g) {
|
|
41281
|
+
return g === 2;
|
|
41282
|
+
}).length;
|
|
41283
|
+
var handleChange = function (productId) {
|
|
41284
|
+
dispatch(setSelectedSearchResult(productId));
|
|
41285
|
+
};
|
|
41286
|
+
return React__default['default'].createElement(
|
|
41287
|
+
'div',
|
|
41288
|
+
{ className: 'search__result-card' },
|
|
41289
|
+
React__default['default'].createElement(
|
|
41290
|
+
'div',
|
|
41291
|
+
{ className: 'search__result-card__allotment' },
|
|
41292
|
+
React__default['default'].createElement(
|
|
41293
|
+
'div',
|
|
41294
|
+
{ className: 'search__result-card__allotment__title__wrapper' },
|
|
41295
|
+
React__default['default'].createElement(
|
|
41296
|
+
'h3',
|
|
41297
|
+
{ className: 'search__result-card__allotment__title' },
|
|
41298
|
+
result.name,
|
|
41299
|
+
React__default['default'].createElement(
|
|
41300
|
+
'span',
|
|
41301
|
+
{ className: 'search__result-card__allotment__badge' },
|
|
41302
|
+
React__default['default'].createElement(Icon$1, { name: 'ui-circle-check', width: 14, height: 14 }),
|
|
41303
|
+
'GAR'
|
|
41304
|
+
)
|
|
41305
|
+
),
|
|
41306
|
+
React__default['default'].createElement(
|
|
41307
|
+
'div',
|
|
41308
|
+
{ className: 'search__result-card__allotment__container' },
|
|
41309
|
+
React__default['default'].createElement(
|
|
41310
|
+
'div',
|
|
41311
|
+
{ className: 'search__result-card__allotment__header' },
|
|
41312
|
+
React__default['default'].createElement(
|
|
41313
|
+
'div',
|
|
41314
|
+
{ className: 'search__result-card__allotment__wrapper' },
|
|
41315
|
+
React__default['default'].createElement(
|
|
41316
|
+
'div',
|
|
41317
|
+
{ className: 'search__result-card__allotment__date' },
|
|
41318
|
+
React__default['default'].createElement(Icon$1, { name: 'ui-plane', height: 16 }),
|
|
41319
|
+
React__default['default'].createElement(
|
|
41320
|
+
'div',
|
|
41321
|
+
{ className: 'search__result-card__allotment__date--from' },
|
|
41322
|
+
dateFns.format(new Date(result.fromDate), 'dd/MM/yyyy')
|
|
41323
|
+
)
|
|
41324
|
+
),
|
|
41325
|
+
React__default['default'].createElement(
|
|
41326
|
+
'div',
|
|
41327
|
+
{ className: 'search__result-card__allotment__info' },
|
|
41328
|
+
React__default['default'].createElement('span', null, React__default['default'].createElement(Icon$1, { name: 'ui-calendar', height: 16 })),
|
|
41329
|
+
' ',
|
|
41330
|
+
calculateDays(result.stayFromDate, result.stayToDate),
|
|
41331
|
+
' ',
|
|
41332
|
+
translations.PRODUCT.DAYS,
|
|
41333
|
+
' -',
|
|
41334
|
+
' ',
|
|
41335
|
+
React__default['default'].createElement('span', null, React__default['default'].createElement(Icon$1, { name: 'ui-moon', height: 16 })),
|
|
41336
|
+
calculateNights(result.stayFromDate, result.stayToDate),
|
|
41337
|
+
' ',
|
|
41338
|
+
translations.SRP.NIGHTS
|
|
41339
|
+
)
|
|
41340
|
+
)
|
|
41341
|
+
),
|
|
41342
|
+
result.allotment &&
|
|
41343
|
+
React__default['default'].createElement(
|
|
41344
|
+
'div',
|
|
41345
|
+
{ className: 'search__result-card__allotment__info' },
|
|
41346
|
+
React__default['default'].createElement(
|
|
41347
|
+
'span',
|
|
41348
|
+
{ className: 'search__result-card__allotment__info__group' },
|
|
41349
|
+
translations === null || translations === void 0 ? void 0 : translations.SRP.TRAVEL_GROUP
|
|
41350
|
+
),
|
|
41351
|
+
React__default['default'].createElement(
|
|
41352
|
+
'div',
|
|
41353
|
+
{ className: 'search__result-card__allotment__persons' },
|
|
41354
|
+
React__default['default'].createElement(
|
|
41355
|
+
'div',
|
|
41356
|
+
{ className: 'search__result-card__allotment__person' },
|
|
41357
|
+
React__default['default'].createElement(Icon$1, { name: 'ui-men', width: 16, height: 16 }),
|
|
41358
|
+
React__default['default'].createElement('span', null, maleCount, ' p.')
|
|
41359
|
+
),
|
|
41360
|
+
React__default['default'].createElement(
|
|
41361
|
+
'div',
|
|
41362
|
+
{ className: 'search__result-card__allotment__person' },
|
|
41363
|
+
React__default['default'].createElement(Icon$1, { name: 'ui-women', width: 16, height: 16 }),
|
|
41364
|
+
React__default['default'].createElement('span', null, femaleCount, ' p.')
|
|
41365
|
+
),
|
|
41366
|
+
React__default['default'].createElement(
|
|
41367
|
+
'div',
|
|
41368
|
+
{ className: 'search__result-card__allotment__person' },
|
|
41369
|
+
React__default['default'].createElement(Icon$1, { name: 'ui-other', width: 16, height: 16 }),
|
|
41370
|
+
React__default['default'].createElement('span', null, otherCount, ' p.')
|
|
41371
|
+
)
|
|
41286
41372
|
)
|
|
41287
41373
|
)
|
|
41374
|
+
)
|
|
41375
|
+
),
|
|
41376
|
+
React__default['default'].createElement(
|
|
41377
|
+
'div',
|
|
41378
|
+
{ className: 'search__result-card__allotment__footer' },
|
|
41379
|
+
React__default['default'].createElement(
|
|
41380
|
+
'div',
|
|
41381
|
+
{ className: 'search__result-card__allotment__price__wrapper' },
|
|
41382
|
+
React__default['default'].createElement(
|
|
41383
|
+
'div',
|
|
41384
|
+
{ className: 'search__result-card__allotment__price' },
|
|
41385
|
+
formatPrice(result.price, result.currencyCode, languageCode),
|
|
41386
|
+
' ',
|
|
41387
|
+
translations.PRODUCT.PER_PERSON
|
|
41388
|
+
)
|
|
41389
|
+
),
|
|
41390
|
+
React__default['default'].createElement(
|
|
41391
|
+
'button',
|
|
41392
|
+
{
|
|
41393
|
+
type: 'button',
|
|
41394
|
+
className: 'cta '.concat(selectedSearchResultId === result.productId ? 'cta--selected' : 'cta--select'),
|
|
41395
|
+
onClick: function () {
|
|
41396
|
+
return handleChange(result.productId);
|
|
41397
|
+
}
|
|
41398
|
+
},
|
|
41399
|
+
selectedSearchResultId === result.productId
|
|
41400
|
+
? translations === null || translations === void 0
|
|
41401
|
+
? void 0
|
|
41402
|
+
: translations.SHARED.SELECTED
|
|
41403
|
+
: translations === null || translations === void 0
|
|
41404
|
+
? void 0
|
|
41405
|
+
: translations.SHARED.SELECT
|
|
41406
|
+
)
|
|
41288
41407
|
)
|
|
41289
41408
|
)
|
|
41290
41409
|
);
|
|
41291
41410
|
};
|
|
41292
41411
|
|
|
41412
|
+
var GroupTourResults = function (_a) {
|
|
41413
|
+
var _b, _c;
|
|
41414
|
+
var isLoading = _a.isLoading;
|
|
41415
|
+
var context = React.useContext(SearchResultsConfigurationContext);
|
|
41416
|
+
if (!context) {
|
|
41417
|
+
return;
|
|
41418
|
+
}
|
|
41419
|
+
if (isLoading) {
|
|
41420
|
+
return React__default['default'].createElement(
|
|
41421
|
+
React__default['default'].Fragment,
|
|
41422
|
+
null,
|
|
41423
|
+
(_b = context.customSpinner) !== null && _b !== void 0 ? _b : React__default['default'].createElement(Spinner, null)
|
|
41424
|
+
);
|
|
41425
|
+
}
|
|
41426
|
+
var translations = getTranslations((_c = context.languageCode) !== null && _c !== void 0 ? _c : 'en-GB');
|
|
41427
|
+
var _d = reactRedux.useSelector(function (state) {
|
|
41428
|
+
return state.searchResults;
|
|
41429
|
+
}),
|
|
41430
|
+
filteredResults = _d.filteredResults;
|
|
41431
|
+
_d.activeTab;
|
|
41432
|
+
if (lodash.isEmpty(filteredResults)) {
|
|
41433
|
+
return React__default['default'].createElement('div', { className: 'no-results' }, translations.SRP.NO_RESULTS);
|
|
41434
|
+
}
|
|
41435
|
+
return React__default['default'].createElement(
|
|
41436
|
+
'div',
|
|
41437
|
+
{ className: 'search__results__cards search__results__cards--list' },
|
|
41438
|
+
filteredResults.map(function (result, index) {
|
|
41439
|
+
return React__default['default'].createElement(GroupTourCard, { key: index, result: result });
|
|
41440
|
+
})
|
|
41441
|
+
);
|
|
41442
|
+
};
|
|
41443
|
+
|
|
41444
|
+
var applyFilters = function (results, filters) {
|
|
41445
|
+
return results.filter(function (r) {
|
|
41446
|
+
return filters.every(function (filter) {
|
|
41447
|
+
var _a, _b, _c, _d;
|
|
41448
|
+
if (!filter.isFrontendFilter) return true;
|
|
41449
|
+
// ACCOMMODATION
|
|
41450
|
+
if (filter.property === 'accommodation') {
|
|
41451
|
+
var selected =
|
|
41452
|
+
(_a = filter.options) === null || _a === void 0
|
|
41453
|
+
? void 0
|
|
41454
|
+
: _a
|
|
41455
|
+
.filter(function (o) {
|
|
41456
|
+
return o.isChecked;
|
|
41457
|
+
})
|
|
41458
|
+
.map(function (o) {
|
|
41459
|
+
return o.value;
|
|
41460
|
+
});
|
|
41461
|
+
if (!selected || selected.length === 0) return true;
|
|
41462
|
+
return selected.includes(r.accommodationCode);
|
|
41463
|
+
}
|
|
41464
|
+
// REGIME
|
|
41465
|
+
if (filter.property === 'regime') {
|
|
41466
|
+
var selected =
|
|
41467
|
+
(_b = filter.options) === null || _b === void 0
|
|
41468
|
+
? void 0
|
|
41469
|
+
: _b
|
|
41470
|
+
.filter(function (o) {
|
|
41471
|
+
return o.isChecked;
|
|
41472
|
+
})
|
|
41473
|
+
.map(function (o) {
|
|
41474
|
+
return o.value;
|
|
41475
|
+
});
|
|
41476
|
+
if (!selected || selected.length === 0) return true;
|
|
41477
|
+
if (!r.regimeCode) return false;
|
|
41478
|
+
return selected.includes(r.regimeCode);
|
|
41479
|
+
}
|
|
41480
|
+
// PRICE
|
|
41481
|
+
if (filter.property === 'price') {
|
|
41482
|
+
if (filter.selectedMin != null && r.price < filter.selectedMin) return false;
|
|
41483
|
+
if (filter.selectedMax != null && r.price > filter.selectedMax) return false;
|
|
41484
|
+
return true;
|
|
41485
|
+
}
|
|
41486
|
+
// THEME
|
|
41487
|
+
if (filter.property === 'theme') {
|
|
41488
|
+
var selected_1 =
|
|
41489
|
+
(_c = filter.options) === null || _c === void 0
|
|
41490
|
+
? void 0
|
|
41491
|
+
: _c
|
|
41492
|
+
.filter(function (o) {
|
|
41493
|
+
return o.isChecked;
|
|
41494
|
+
})
|
|
41495
|
+
.map(function (o) {
|
|
41496
|
+
return o.value;
|
|
41497
|
+
});
|
|
41498
|
+
if (!selected_1 || selected_1.length === 0) return true;
|
|
41499
|
+
return (_d = r.tagIds) === null || _d === void 0
|
|
41500
|
+
? void 0
|
|
41501
|
+
: _d.some(function (tagId) {
|
|
41502
|
+
return selected_1.includes(tagId);
|
|
41503
|
+
});
|
|
41504
|
+
}
|
|
41505
|
+
return true;
|
|
41506
|
+
});
|
|
41507
|
+
});
|
|
41508
|
+
};
|
|
41509
|
+
|
|
41293
41510
|
var SearchResultsContainer = function () {
|
|
41294
41511
|
var _a;
|
|
41295
41512
|
var dispatch = reactRedux.useDispatch();
|
|
@@ -41299,29 +41516,27 @@ var SearchResultsContainer = function () {
|
|
|
41299
41516
|
return state.searchResults;
|
|
41300
41517
|
}),
|
|
41301
41518
|
results = _b.results,
|
|
41519
|
+
filteredResults = _b.filteredResults,
|
|
41302
41520
|
bookingPackageDetails = _b.bookingPackageDetails,
|
|
41303
41521
|
entry = _b.entry,
|
|
41304
41522
|
isLoading = _b.isLoading,
|
|
41305
41523
|
filters = _b.filters,
|
|
41306
41524
|
sortKey = _b.sortKey,
|
|
41307
|
-
|
|
41525
|
+
selectedSearchResultId = _b.selectedSearchResultId,
|
|
41308
41526
|
flyInIsOpen = _b.flyInIsOpen;
|
|
41309
41527
|
var isMobile = useMediaQuery('(max-width: 1200px)');
|
|
41310
|
-
var _c = React.useState(
|
|
41311
|
-
|
|
41312
|
-
|
|
41313
|
-
var _d = React.useState(
|
|
41314
|
-
|
|
41315
|
-
|
|
41316
|
-
var _e = React.useState(
|
|
41317
|
-
|
|
41318
|
-
|
|
41528
|
+
var _c = React.useState(false),
|
|
41529
|
+
initialFiltersSet = _c[0],
|
|
41530
|
+
setInitialFiltersSet = _c[1];
|
|
41531
|
+
var _d = React.useState([]),
|
|
41532
|
+
initialFilters = _d[0],
|
|
41533
|
+
setInitialFilters = _d[1];
|
|
41534
|
+
var _e = React.useState(false),
|
|
41535
|
+
filtersOpen = _e[0],
|
|
41536
|
+
setFiltersOpen = _e[1];
|
|
41319
41537
|
var _f = React.useState(false),
|
|
41320
|
-
|
|
41321
|
-
|
|
41322
|
-
var _g = React.useState(false),
|
|
41323
|
-
itineraryOpen = _g[0],
|
|
41324
|
-
setItineraryOpen = _g[1];
|
|
41538
|
+
itineraryOpen = _f[0],
|
|
41539
|
+
setItineraryOpen = _f[1];
|
|
41325
41540
|
var panelRef = React.useRef(null);
|
|
41326
41541
|
var sortByTypes = [
|
|
41327
41542
|
{ direction: 'asc', label: 'price' },
|
|
@@ -41425,7 +41640,6 @@ var SearchResultsContainer = function () {
|
|
|
41425
41640
|
var city = getNumberFromParams(params, 'location');
|
|
41426
41641
|
var hotel = getNumberFromParams(params, 'hotel');
|
|
41427
41642
|
var tagId = getNumberFromParams(params, 'tagId');
|
|
41428
|
-
// temp hardcoded params
|
|
41429
41643
|
if (!from || !to) {
|
|
41430
41644
|
console.error('Missing fromDate or toDate in query params, using default values');
|
|
41431
41645
|
return null;
|
|
@@ -41455,8 +41669,9 @@ var SearchResultsContainer = function () {
|
|
|
41455
41669
|
officeId: 1,
|
|
41456
41670
|
payload: {
|
|
41457
41671
|
catalogueIds: (_a = context.tideConnection.catalogueIds) !== null && _a !== void 0 ? _a : [],
|
|
41458
|
-
serviceType:
|
|
41459
|
-
|
|
41672
|
+
serviceType:
|
|
41673
|
+
context.type === 'hotel' || context.type === 'hotel-flight' ? 3 : context.type === 'flight' ? 7 : context.type === 'roundTrip' ? 1 : undefined,
|
|
41674
|
+
searchType: context.type === 'groupTour' ? 1 : 0,
|
|
41460
41675
|
destination: {
|
|
41461
41676
|
id: Number(destinationId),
|
|
41462
41677
|
isCountry: destinationIsCountry,
|
|
@@ -41477,13 +41692,14 @@ var SearchResultsContainer = function () {
|
|
|
41477
41692
|
// .flatMap((o) => o.value.toString()) || [],
|
|
41478
41693
|
// minPrice: filters.find((f) => f.property === 'price')?.selectedMin,
|
|
41479
41694
|
// maxPrice: filters.find((f) => f.property === 'price')?.selectedMax,
|
|
41480
|
-
useExactDates: true,
|
|
41695
|
+
useExactDates: (context === null || context === void 0 ? void 0 : context.type) === 'groupTour' ? false : true,
|
|
41481
41696
|
onlyCachedResults: false,
|
|
41482
41697
|
includeAllAllotments: true,
|
|
41483
41698
|
productIds: hotel ? [hotel] : [],
|
|
41484
41699
|
productTagIds: tagId ? [tagId] : []
|
|
41485
41700
|
}
|
|
41486
41701
|
};
|
|
41702
|
+
console.log('Built search request from query params', searchRequest);
|
|
41487
41703
|
return searchRequest;
|
|
41488
41704
|
};
|
|
41489
41705
|
var getRequestRoomsFromEntry = function (rooms) {
|
|
@@ -41530,7 +41746,7 @@ var SearchResultsContainer = function () {
|
|
|
41530
41746
|
var room = { index: i, pax: [] };
|
|
41531
41747
|
lodash.range(0, x.adults).forEach(function () {
|
|
41532
41748
|
room.pax.push({
|
|
41533
|
-
age:
|
|
41749
|
+
age: Math.floor(Math.random() * 100)
|
|
41534
41750
|
});
|
|
41535
41751
|
});
|
|
41536
41752
|
x.childAges.forEach(function (x) {
|
|
@@ -41553,17 +41769,17 @@ var SearchResultsContainer = function () {
|
|
|
41553
41769
|
// seperate Search
|
|
41554
41770
|
React.useEffect(
|
|
41555
41771
|
function () {
|
|
41556
|
-
var
|
|
41772
|
+
var runSearch = function () {
|
|
41557
41773
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
41558
|
-
var config, params, entryId, entryLight, searchRequest, rq, packageSearchResults, enrichedFilters, matching, err_1;
|
|
41559
|
-
var _a;
|
|
41560
|
-
return __generator(this, function (
|
|
41561
|
-
switch (
|
|
41774
|
+
var config, params, entryId, entryLight, searchRequest, rq, packageSearchResults, enrichedFilters, initialFilteredResults, matching, err_1;
|
|
41775
|
+
var _a, _b;
|
|
41776
|
+
return __generator(this, function (_c) {
|
|
41777
|
+
switch (_c.label) {
|
|
41562
41778
|
case 0:
|
|
41563
41779
|
dispatch(setIsLoading(true));
|
|
41564
|
-
|
|
41780
|
+
_c.label = 1;
|
|
41565
41781
|
case 1:
|
|
41566
|
-
|
|
41782
|
+
_c.trys.push([1, 6, , 7]);
|
|
41567
41783
|
if (!context) {
|
|
41568
41784
|
return [2 /*return*/];
|
|
41569
41785
|
}
|
|
@@ -41578,7 +41794,7 @@ var SearchResultsContainer = function () {
|
|
|
41578
41794
|
if (!entryId) return [3 /*break*/, 3];
|
|
41579
41795
|
return [4 /*yield*/, build.getEntryLight(config, entryId)];
|
|
41580
41796
|
case 2:
|
|
41581
|
-
entryLight =
|
|
41797
|
+
entryLight = _c.sent();
|
|
41582
41798
|
// populate itinerary store
|
|
41583
41799
|
dispatch(setEntry({ entry: entryLight }));
|
|
41584
41800
|
searchRequest = buildSearchFromEntry(entryLight);
|
|
@@ -41589,35 +41805,39 @@ var SearchResultsContainer = function () {
|
|
|
41589
41805
|
throw new Error('Invalid search parameters');
|
|
41590
41806
|
}
|
|
41591
41807
|
searchRequest = rq;
|
|
41592
|
-
|
|
41808
|
+
_c.label = 4;
|
|
41593
41809
|
case 4:
|
|
41594
41810
|
return [4 /*yield*/, build.search(config, searchRequest)];
|
|
41595
41811
|
case 5:
|
|
41596
|
-
packageSearchResults =
|
|
41812
|
+
packageSearchResults = _c.sent();
|
|
41597
41813
|
console.log('Search results', packageSearchResults);
|
|
41598
|
-
enrichedFilters = enrichFiltersWithResults(packageSearchResults, context.filters);
|
|
41814
|
+
enrichedFilters = enrichFiltersWithResults(packageSearchResults, context.filters, (_a = context.tags) !== null && _a !== void 0 ? _a : []);
|
|
41599
41815
|
if (!initialFiltersSet) {
|
|
41600
41816
|
dispatch(resetFilters(enrichedFilters));
|
|
41601
41817
|
setInitialFilters(enrichedFilters);
|
|
41602
41818
|
setInitialFiltersSet(true);
|
|
41603
41819
|
}
|
|
41604
|
-
dispatch(setResults(
|
|
41820
|
+
dispatch(setResults(packageSearchResults));
|
|
41821
|
+
initialFilteredResults = applyFilters(packageSearchResults, filters);
|
|
41822
|
+
dispatch(setFilteredResults(initialFilteredResults));
|
|
41605
41823
|
if ((packageSearchResults === null || packageSearchResults === void 0 ? void 0 : packageSearchResults.length) > 0) {
|
|
41606
41824
|
if (entryId) {
|
|
41607
41825
|
matching = packageSearchResults.find(function (r) {
|
|
41608
41826
|
return r.productId === (entry === null || entry === void 0 ? void 0 : entry.id);
|
|
41609
41827
|
});
|
|
41610
41828
|
if (matching) {
|
|
41611
|
-
dispatch(
|
|
41829
|
+
dispatch(setSelectedSearchResult(matching.productId));
|
|
41612
41830
|
}
|
|
41613
41831
|
} else {
|
|
41614
|
-
|
|
41832
|
+
if (context.type === 'hotel-flight') {
|
|
41833
|
+
dispatch(setSelectedSearchResult((_b = packageSearchResults[0]) === null || _b === void 0 ? void 0 : _b.productId));
|
|
41834
|
+
}
|
|
41615
41835
|
}
|
|
41616
41836
|
}
|
|
41617
41837
|
dispatch(setIsLoading(false));
|
|
41618
41838
|
return [3 /*break*/, 7];
|
|
41619
41839
|
case 6:
|
|
41620
|
-
err_1 =
|
|
41840
|
+
err_1 = _c.sent();
|
|
41621
41841
|
console.error('Search failed', err_1);
|
|
41622
41842
|
dispatch(setIsLoading(false));
|
|
41623
41843
|
return [3 /*break*/, 7];
|
|
@@ -41630,13 +41850,14 @@ var SearchResultsContainer = function () {
|
|
|
41630
41850
|
if (!(context === null || context === void 0 ? void 0 : context.showMockup)) {
|
|
41631
41851
|
if (
|
|
41632
41852
|
(context === null || context === void 0 ? void 0 : context.type) === 'hotel-flight' ||
|
|
41633
|
-
(context === null || context === void 0 ? void 0 : context.type) === 'hotel'
|
|
41853
|
+
(context === null || context === void 0 ? void 0 : context.type) === 'hotel' ||
|
|
41854
|
+
(context === null || context === void 0 ? void 0 : context.type) === 'groupTour'
|
|
41634
41855
|
) {
|
|
41635
|
-
|
|
41856
|
+
runSearch();
|
|
41636
41857
|
}
|
|
41637
41858
|
}
|
|
41638
41859
|
},
|
|
41639
|
-
[location.search
|
|
41860
|
+
[location.search]
|
|
41640
41861
|
);
|
|
41641
41862
|
// Seperate detailsCall
|
|
41642
41863
|
React.useEffect(
|
|
@@ -41648,7 +41869,13 @@ var SearchResultsContainer = function () {
|
|
|
41648
41869
|
return __generator(this, function (_c) {
|
|
41649
41870
|
switch (_c.label) {
|
|
41650
41871
|
case 0:
|
|
41651
|
-
if (!
|
|
41872
|
+
if (!selectedSearchResultId || !context) return [2 /*return*/];
|
|
41873
|
+
if (
|
|
41874
|
+
(context === null || context === void 0 ? void 0 : context.type) === 'hotel' ||
|
|
41875
|
+
(context === null || context === void 0 ? void 0 : context.type) === 'groupTour'
|
|
41876
|
+
) {
|
|
41877
|
+
handleFlyInToggle(true);
|
|
41878
|
+
}
|
|
41652
41879
|
_c.label = 1;
|
|
41653
41880
|
case 1:
|
|
41654
41881
|
_c.trys.push([1, 6, , 7]);
|
|
@@ -41657,7 +41884,7 @@ var SearchResultsContainer = function () {
|
|
|
41657
41884
|
apiKey: context.tideConnection.apiKey
|
|
41658
41885
|
};
|
|
41659
41886
|
selectedItem = results.find(function (r) {
|
|
41660
|
-
return r.productId ===
|
|
41887
|
+
return r.productId === selectedSearchResultId;
|
|
41661
41888
|
});
|
|
41662
41889
|
if (!selectedItem) {
|
|
41663
41890
|
// TODO: handle this case better, show an error message to the user
|
|
@@ -41735,7 +41962,14 @@ var SearchResultsContainer = function () {
|
|
|
41735
41962
|
};
|
|
41736
41963
|
fetchPackageDetails();
|
|
41737
41964
|
},
|
|
41738
|
-
[
|
|
41965
|
+
[selectedSearchResultId]
|
|
41966
|
+
);
|
|
41967
|
+
React.useEffect(
|
|
41968
|
+
function () {
|
|
41969
|
+
var filteredResults = applyFilters(results, filters);
|
|
41970
|
+
dispatch(setFilteredResults(filteredResults));
|
|
41971
|
+
},
|
|
41972
|
+
[filters, results]
|
|
41739
41973
|
);
|
|
41740
41974
|
return React__default['default'].createElement(
|
|
41741
41975
|
'div',
|
|
@@ -41753,6 +41987,7 @@ var SearchResultsContainer = function () {
|
|
|
41753
41987
|
{ tideConnection: context.tideConnection },
|
|
41754
41988
|
React__default['default'].createElement(FlightResultsContainer, { isMobile: isMobile }),
|
|
41755
41989
|
React__default['default'].createElement(FlyIn, {
|
|
41990
|
+
title: 'Select your fare',
|
|
41756
41991
|
srpType: context.type,
|
|
41757
41992
|
isOpen: flyInIsOpen,
|
|
41758
41993
|
setIsOpen: handleFlyInToggle,
|
|
@@ -41761,23 +41996,20 @@ var SearchResultsContainer = function () {
|
|
|
41761
41996
|
}
|
|
41762
41997
|
})
|
|
41763
41998
|
),
|
|
41764
|
-
(context.type === 'hotel-flight' || context.type === 'hotel' || context.type === 'roundTrip') &&
|
|
41999
|
+
(context.type === 'hotel-flight' || context.type === 'hotel' || context.type === 'groupTour' || context.type === 'roundTrip') &&
|
|
41765
42000
|
React__default['default'].createElement(
|
|
41766
42001
|
React__default['default'].Fragment,
|
|
41767
42002
|
null,
|
|
41768
42003
|
context.type != 'hotel-flight' &&
|
|
41769
42004
|
context.showFilters &&
|
|
41770
42005
|
React__default['default'].createElement(Filters, {
|
|
42006
|
+
initialFilters: initialFilters,
|
|
41771
42007
|
filters: filters,
|
|
41772
42008
|
isOpen: filtersOpen,
|
|
41773
42009
|
handleSetIsOpen: function () {
|
|
41774
42010
|
return setFiltersOpen(!filtersOpen);
|
|
41775
42011
|
},
|
|
41776
|
-
handleApplyFilters
|
|
41777
|
-
return setSearchTrigger(function (prev) {
|
|
41778
|
-
return prev + 1;
|
|
41779
|
-
});
|
|
41780
|
-
},
|
|
42012
|
+
// handleApplyFilters={() => setSearchTrigger((prev) => prev + 1)}
|
|
41781
42013
|
isLoading: isLoading
|
|
41782
42014
|
}),
|
|
41783
42015
|
context.type === 'hotel-flight' &&
|
|
@@ -41845,7 +42077,7 @@ var SearchResultsContainer = function () {
|
|
|
41845
42077
|
React__default['default'].createElement(
|
|
41846
42078
|
React__default['default'].Fragment,
|
|
41847
42079
|
null,
|
|
41848
|
-
(
|
|
42080
|
+
(filteredResults === null || filteredResults === void 0 ? void 0 : filteredResults.length) && filteredResults.length,
|
|
41849
42081
|
' ',
|
|
41850
42082
|
translations.SRP.TOTAL_RESULTS_LABEL
|
|
41851
42083
|
)
|
|
@@ -41871,6 +42103,7 @@ var SearchResultsContainer = function () {
|
|
|
41871
42103
|
{ className: 'search__results__wrapper' },
|
|
41872
42104
|
context.showTabViews && React__default['default'].createElement(TabViews, null),
|
|
41873
42105
|
context.showRoundTripResults && context.showMockup && React__default['default'].createElement(RoundTripResults, null),
|
|
42106
|
+
context.type === 'groupTour' && React__default['default'].createElement(GroupTourResults, { isLoading: isLoading }),
|
|
41874
42107
|
context.type === 'hotel-flight' &&
|
|
41875
42108
|
context.showFlightResults &&
|
|
41876
42109
|
(bookingPackageDetails === null || bookingPackageDetails === void 0 ? void 0 : bookingPackageDetails.outwardFlights) &&
|
|
@@ -41878,8 +42111,7 @@ var SearchResultsContainer = function () {
|
|
|
41878
42111
|
flights: bookingPackageDetails === null || bookingPackageDetails === void 0 ? void 0 : bookingPackageDetails.outwardFlights,
|
|
41879
42112
|
isDeparture: true
|
|
41880
42113
|
}),
|
|
41881
|
-
context.showHotelAccommodationResults &&
|
|
41882
|
-
React__default['default'].createElement(HotelAccommodationResults, { isLoading: isLoading, context: context }),
|
|
42114
|
+
context.showHotelAccommodationResults && React__default['default'].createElement(HotelAccommodationResults, { isLoading: isLoading }),
|
|
41883
42115
|
context.type === 'hotel-flight' &&
|
|
41884
42116
|
context.showFlightResults &&
|
|
41885
42117
|
(bookingPackageDetails === null || bookingPackageDetails === void 0 ? void 0 : bookingPackageDetails.returnFlights) &&
|
|
@@ -41888,7 +42120,16 @@ var SearchResultsContainer = function () {
|
|
|
41888
42120
|
isDeparture: false
|
|
41889
42121
|
})
|
|
41890
42122
|
)
|
|
41891
|
-
)
|
|
42123
|
+
),
|
|
42124
|
+
React__default['default'].createElement(FlyIn, {
|
|
42125
|
+
title: ''.concat(translations.SRP.SELECT, ' ').concat(translations.SRP.ACCOMMODATION),
|
|
42126
|
+
srpType: context.type,
|
|
42127
|
+
isOpen: flyInIsOpen,
|
|
42128
|
+
setIsOpen: handleFlyInToggle,
|
|
42129
|
+
onPanelRef: function (el) {
|
|
42130
|
+
return (panelRef.current = el);
|
|
42131
|
+
}
|
|
42132
|
+
})
|
|
41892
42133
|
)
|
|
41893
42134
|
)
|
|
41894
42135
|
)
|