@qite/tide-components 1.0.12 → 1.0.13
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 +284 -226
- package/build/build-cjs/src/booking-wizard/types.d.ts +1 -0
- package/build/build-esm/index.js +284 -226
- package/build/build-esm/src/booking-wizard/types.d.ts +1 -0
- package/package.json +1 -1
- package/styles/components/_flight-option.scss +12 -0
- package/styles/components/_slider.scss +0 -8
package/build/build-cjs/index.js
CHANGED
|
@@ -94,6 +94,7 @@ var FLIGHTS_FORM$f = {
|
|
|
94
94
|
AIRLINES: "شركات الطيران",
|
|
95
95
|
AIRPORTS: "المطارات",
|
|
96
96
|
NUMBER_OF_STOPS: "عدد التوقفات",
|
|
97
|
+
TRAVEL_CLASS: "درجة السفر",
|
|
97
98
|
FLIGHT_OUTWARD: "رحلة الذهاب",
|
|
98
99
|
DEPARTURE_TIME: "وقت المغادرة",
|
|
99
100
|
TRAVEL_DURATION: "مدة السفر",
|
|
@@ -547,6 +548,7 @@ var FLIGHTS_FORM$e = {
|
|
|
547
548
|
AIRLINES: "Flyselskaber",
|
|
548
549
|
AIRPORTS: "Lufthavne",
|
|
549
550
|
NUMBER_OF_STOPS: "Antal stop",
|
|
551
|
+
TRAVEL_CLASS: "Rejseklasse",
|
|
550
552
|
FLIGHT_OUTWARD: "Udgående fly",
|
|
551
553
|
DEPARTURE_TIME: "Afgangstid",
|
|
552
554
|
TRAVEL_DURATION: "Rejsetid",
|
|
@@ -1000,6 +1002,7 @@ var FLIGHTS_FORM$d = {
|
|
|
1000
1002
|
AIRLINES: "Fluggesellschaften",
|
|
1001
1003
|
AIRPORTS: "Flughäfen",
|
|
1002
1004
|
NUMBER_OF_STOPS: "Anzahl der Stopps",
|
|
1005
|
+
TRAVEL_CLASS: "Reiseklasse",
|
|
1003
1006
|
FLIGHT_OUTWARD: "Hinflug",
|
|
1004
1007
|
DEPARTURE_TIME: "Abflugzeit",
|
|
1005
1008
|
TRAVEL_DURATION: "Reisedauer",
|
|
@@ -1453,6 +1456,7 @@ var FLIGHTS_FORM$c = {
|
|
|
1453
1456
|
AIRLINES: "Airlines",
|
|
1454
1457
|
AIRPORTS: "Airports",
|
|
1455
1458
|
NUMBER_OF_STOPS: "Number of stops",
|
|
1459
|
+
TRAVEL_CLASS: "Travel class",
|
|
1456
1460
|
FLIGHT_OUTWARD: "Outbound flight",
|
|
1457
1461
|
DEPARTURE_TIME: "Departure time",
|
|
1458
1462
|
TRAVEL_DURATION: "Travel duration",
|
|
@@ -1910,6 +1914,7 @@ var FLIGHTS_FORM$b = {
|
|
|
1910
1914
|
AIRLINES: "Aerolíneas",
|
|
1911
1915
|
AIRPORTS: "Aeropuertos",
|
|
1912
1916
|
NUMBER_OF_STOPS: "Número de escalas",
|
|
1917
|
+
TRAVEL_CLASS: "Clase de viaje",
|
|
1913
1918
|
FLIGHT_OUTWARD: "Vuelo de ida",
|
|
1914
1919
|
DEPARTURE_TIME: "Hora de salida",
|
|
1915
1920
|
TRAVEL_DURATION: "Duración del viaje",
|
|
@@ -2363,6 +2368,7 @@ var FLIGHTS_FORM$a = {
|
|
|
2363
2368
|
AIRLINES: "Compagnies aériennes",
|
|
2364
2369
|
AIRPORTS: "Aéroports",
|
|
2365
2370
|
NUMBER_OF_STOPS: "Nombre d'escales",
|
|
2371
|
+
TRAVEL_CLASS: "Classe de voyage",
|
|
2366
2372
|
FLIGHT_OUTWARD: "Vol aller",
|
|
2367
2373
|
DEPARTURE_TIME: "Heure de départ",
|
|
2368
2374
|
TRAVEL_DURATION: "Durée du voyage",
|
|
@@ -2820,6 +2826,7 @@ var FLIGHTS_FORM$9 = {
|
|
|
2820
2826
|
AIRLINES: "Compagnies aériennes",
|
|
2821
2827
|
AIRPORTS: "Aéroports",
|
|
2822
2828
|
NUMBER_OF_STOPS: "Nombre d'escales",
|
|
2829
|
+
TRAVEL_CLASS: "Classe de voyage",
|
|
2823
2830
|
FLIGHT_OUTWARD: "Vol aller",
|
|
2824
2831
|
DEPARTURE_TIME: "Heure de départ",
|
|
2825
2832
|
TRAVEL_DURATION: "Durée du voyage",
|
|
@@ -3273,6 +3280,7 @@ var FLIGHTS_FORM$8 = {
|
|
|
3273
3280
|
AIRLINES: "Flugfélög",
|
|
3274
3281
|
AIRPORTS: "Flugvellir",
|
|
3275
3282
|
NUMBER_OF_STOPS: "Fjöldi millilendinga",
|
|
3283
|
+
TRAVEL_CLASS: "Farrými",
|
|
3276
3284
|
FLIGHT_OUTWARD: "Brottfararflug",
|
|
3277
3285
|
DEPARTURE_TIME: "Brottfarartími",
|
|
3278
3286
|
TRAVEL_DURATION: "Ferðalagstími",
|
|
@@ -3726,6 +3734,7 @@ var FLIGHTS_FORM$7 = {
|
|
|
3726
3734
|
AIRLINES: "Compagnie aeree",
|
|
3727
3735
|
AIRPORTS: "Aeroporti",
|
|
3728
3736
|
NUMBER_OF_STOPS: "Numero di scali",
|
|
3737
|
+
TRAVEL_CLASS: "Classe di viaggio",
|
|
3729
3738
|
FLIGHT_OUTWARD: "Volo di andata",
|
|
3730
3739
|
DEPARTURE_TIME: "Orario di partenza",
|
|
3731
3740
|
TRAVEL_DURATION: "Durata del viaggio",
|
|
@@ -4179,6 +4188,7 @@ var FLIGHTS_FORM$6 = {
|
|
|
4179
4188
|
AIRLINES: "Luchtvaartmaatschappijen",
|
|
4180
4189
|
AIRPORTS: "Luchthavens",
|
|
4181
4190
|
NUMBER_OF_STOPS: "Aantal stops",
|
|
4191
|
+
TRAVEL_CLASS: "Reisklasse",
|
|
4182
4192
|
FLIGHT_OUTWARD: "Vlucht heenreis",
|
|
4183
4193
|
DEPARTURE_TIME: "Vertrektijd",
|
|
4184
4194
|
TRAVEL_DURATION: "Reisduur",
|
|
@@ -4636,6 +4646,7 @@ var FLIGHTS_FORM$5 = {
|
|
|
4636
4646
|
AIRLINES: "Luchtvaartmaatschappijen",
|
|
4637
4647
|
AIRPORTS: "Luchthavens",
|
|
4638
4648
|
NUMBER_OF_STOPS: "Aantal tussenstops",
|
|
4649
|
+
TRAVEL_CLASS: "Reisklasse",
|
|
4639
4650
|
FLIGHT_OUTWARD: "Heenvlucht",
|
|
4640
4651
|
DEPARTURE_TIME: "Vertrektijd",
|
|
4641
4652
|
TRAVEL_DURATION: "Reisduur",
|
|
@@ -5089,6 +5100,7 @@ var FLIGHTS_FORM$4 = {
|
|
|
5089
5100
|
AIRLINES: "Flyselskaper",
|
|
5090
5101
|
AIRPORTS: "Flyplasser",
|
|
5091
5102
|
NUMBER_OF_STOPS: "Antall mellomlandinger",
|
|
5103
|
+
TRAVEL_CLASS: "Reiseklasse",
|
|
5092
5104
|
FLIGHT_OUTWARD: "Utreisefly",
|
|
5093
5105
|
DEPARTURE_TIME: "Avgangstid",
|
|
5094
5106
|
TRAVEL_DURATION: "Reisetid",
|
|
@@ -5542,6 +5554,7 @@ var FLIGHTS_FORM$3 = {
|
|
|
5542
5554
|
AIRLINES: "Linie lotnicze",
|
|
5543
5555
|
AIRPORTS: "Lotniska",
|
|
5544
5556
|
NUMBER_OF_STOPS: "Liczba przesiadek",
|
|
5557
|
+
TRAVEL_CLASS: "Klasa podróży",
|
|
5545
5558
|
FLIGHT_OUTWARD: "Lot wylotowy",
|
|
5546
5559
|
DEPARTURE_TIME: "Godzina odlotu",
|
|
5547
5560
|
TRAVEL_DURATION: "Czas podróży",
|
|
@@ -5995,6 +6008,7 @@ var FLIGHTS_FORM$2 = {
|
|
|
5995
6008
|
AIRLINES: "Companhias aéreas",
|
|
5996
6009
|
AIRPORTS: "Aeroportos",
|
|
5997
6010
|
NUMBER_OF_STOPS: "Número de escalas",
|
|
6011
|
+
TRAVEL_CLASS: "Classe de viagem",
|
|
5998
6012
|
FLIGHT_OUTWARD: "Voo de ida",
|
|
5999
6013
|
DEPARTURE_TIME: "Hora de partida",
|
|
6000
6014
|
TRAVEL_DURATION: "Duração da viagem",
|
|
@@ -6448,6 +6462,7 @@ var FLIGHTS_FORM$1 = {
|
|
|
6448
6462
|
AIRLINES: "Flygbolag",
|
|
6449
6463
|
AIRPORTS: "Flygplatser",
|
|
6450
6464
|
NUMBER_OF_STOPS: "Antal mellanlandningar",
|
|
6465
|
+
TRAVEL_CLASS: "Reseklass",
|
|
6451
6466
|
FLIGHT_OUTWARD: "Utresa",
|
|
6452
6467
|
DEPARTURE_TIME: "Avgångstid",
|
|
6453
6468
|
TRAVEL_DURATION: "Restid",
|
|
@@ -6901,6 +6916,7 @@ var FLIGHTS_FORM = {
|
|
|
6901
6916
|
AIRLINES: "航空会社",
|
|
6902
6917
|
AIRPORTS: "空港",
|
|
6903
6918
|
NUMBER_OF_STOPS: "乗り継ぎ回数",
|
|
6919
|
+
TRAVEL_CLASS: "旅行クラス",
|
|
6904
6920
|
FLIGHT_OUTWARD: "往路フライト",
|
|
6905
6921
|
DEPARTURE_TIME: "出発時刻",
|
|
6906
6922
|
TRAVEL_DURATION: "所要時間",
|
|
@@ -20024,6 +20040,7 @@ const buildFilterOptions = (outwardFlights, returnFlights, translations) => {
|
|
|
20024
20040
|
const airports = [];
|
|
20025
20041
|
const airlines = [];
|
|
20026
20042
|
const numberOfStops = [];
|
|
20043
|
+
const travelClasses = [];
|
|
20027
20044
|
const outwardDeparturePeriods = [];
|
|
20028
20045
|
const returnDeparturePeriods = [];
|
|
20029
20046
|
let lowestDepartureTravelDuration = 9999;
|
|
@@ -20042,6 +20059,14 @@ const buildFilterOptions = (outwardFlights, returnFlights, translations) => {
|
|
|
20042
20059
|
isSelected: false
|
|
20043
20060
|
});
|
|
20044
20061
|
}
|
|
20062
|
+
if (firstLine.travelClass && !travelClasses.some((x) => x.value === firstLine.travelClass)) {
|
|
20063
|
+
travelClasses.push({
|
|
20064
|
+
value: firstLine.travelClass,
|
|
20065
|
+
label: firstLine.travelClass,
|
|
20066
|
+
count: 0,
|
|
20067
|
+
isSelected: false
|
|
20068
|
+
});
|
|
20069
|
+
}
|
|
20045
20070
|
}
|
|
20046
20071
|
if (!airlines.some((x) => x.value === airlineCode)) {
|
|
20047
20072
|
airlines.push({
|
|
@@ -20115,6 +20140,7 @@ const buildFilterOptions = (outwardFlights, returnFlights, translations) => {
|
|
|
20115
20140
|
airports: airports,
|
|
20116
20141
|
airlines: airlines,
|
|
20117
20142
|
numberOfStops: numberOfStops,
|
|
20143
|
+
travelClasses: travelClasses,
|
|
20118
20144
|
outward: {
|
|
20119
20145
|
departurePeriod: outwardDeparturePeriods,
|
|
20120
20146
|
travelDuration: {
|
|
@@ -20163,6 +20189,10 @@ const filterGroupedFlights = (groups, filterOptions) => {
|
|
|
20163
20189
|
const selectedNumberOfStops = filterOptions.numberOfStops.filter((x) => x.isSelected);
|
|
20164
20190
|
filteredGroups = filteredGroups.filter((x) => selectedNumberOfStops.some((y) => parseInt(y.value) === x.outward.flightLines.length - 1));
|
|
20165
20191
|
}
|
|
20192
|
+
if (filterOptions.travelClasses.some((x) => x.isSelected)) {
|
|
20193
|
+
const selectedTravelClasses = filterOptions.travelClasses.filter((x) => x.isSelected);
|
|
20194
|
+
filteredGroups = filteredGroups.filter((x) => selectedTravelClasses.some((y) => y.value === x.outward.travelClass));
|
|
20195
|
+
}
|
|
20166
20196
|
filteredGroups = filterGroupedFlightByDirection(filteredGroups, true, filterOptions.outward);
|
|
20167
20197
|
filteredGroups = filterGroupedFlightByDirection(filteredGroups, false, filterOptions.return);
|
|
20168
20198
|
return filteredGroups;
|
|
@@ -20393,6 +20423,20 @@ const FlightFilter = ({ filterOptions, resultCount, applyFilter }) => {
|
|
|
20393
20423
|
};
|
|
20394
20424
|
applyFilter(updatedFilterOptions);
|
|
20395
20425
|
};
|
|
20426
|
+
const updateTravelClassFilter = (value) => {
|
|
20427
|
+
const updatedFilterOptions = {
|
|
20428
|
+
...filterOptions,
|
|
20429
|
+
travelClasses: filterOptions.travelClasses.map((x) => {
|
|
20430
|
+
if (x.value !== value)
|
|
20431
|
+
return x;
|
|
20432
|
+
return {
|
|
20433
|
+
...x,
|
|
20434
|
+
isSelected: !x.isSelected
|
|
20435
|
+
};
|
|
20436
|
+
})
|
|
20437
|
+
};
|
|
20438
|
+
applyFilter(updatedFilterOptions);
|
|
20439
|
+
};
|
|
20396
20440
|
const updateOutwardDeparture = (period) => {
|
|
20397
20441
|
const updatedFilterOptions = {
|
|
20398
20442
|
...filterOptions,
|
|
@@ -20542,6 +20586,19 @@ const FlightFilter = ({ filterOptions, resultCount, applyFilter }) => {
|
|
|
20542
20586
|
"(",
|
|
20543
20587
|
option.count,
|
|
20544
20588
|
")"))))))))),
|
|
20589
|
+
React__default["default"].createElement("div", { className: "flight__filter__group" },
|
|
20590
|
+
React__default["default"].createElement("div", { className: "flight__filter__group__title" }, translations.FLIGHTS_FORM.TRAVEL_CLASS),
|
|
20591
|
+
React__default["default"].createElement("div", { className: "flight__filter__group__wrapper" }, filterOptions.travelClasses.map((option, k) => (React__default["default"].createElement("div", { className: "tree", key: k },
|
|
20592
|
+
React__default["default"].createElement("div", { className: "checkbox flight__filter__checkbox" },
|
|
20593
|
+
React__default["default"].createElement("label", { htmlFor: 'travel_class_' + option.value, className: "checkbox__label" },
|
|
20594
|
+
React__default["default"].createElement("input", { type: "checkbox", id: 'travel_class_' + option.value, className: "checkbox__input checkbox__input--parent", onClick: () => updateTravelClassFilter(option.value) }),
|
|
20595
|
+
React__default["default"].createElement("span", { className: "radiobutton__label-text" },
|
|
20596
|
+
option.label,
|
|
20597
|
+
" ",
|
|
20598
|
+
option.count > 0 && React__default["default"].createElement("span", { className: "amount" },
|
|
20599
|
+
"(",
|
|
20600
|
+
option.count,
|
|
20601
|
+
")"))))))))),
|
|
20545
20602
|
React__default["default"].createElement("div", { className: "flight__filter__group" },
|
|
20546
20603
|
React__default["default"].createElement("div", { className: "flight__filter__group__title" }, translations.FLIGHTS_FORM.FLIGHT_OUTWARD),
|
|
20547
20604
|
React__default["default"].createElement("div", { className: "flight__filter__group__wrapper" },
|
|
@@ -20770,7 +20827,7 @@ const FlightOption = ({ item, isSelected, currentPrice, onChange }) => {
|
|
|
20770
20827
|
React__default["default"].createElement("div", { className: "flight__flights" },
|
|
20771
20828
|
React__default["default"].createElement("div", { className: "flight__flight" },
|
|
20772
20829
|
React__default["default"].createElement("div", { className: "flight__flight__header" },
|
|
20773
|
-
React__default["default"].createElement("div", { className: "flight__status__container" }),
|
|
20830
|
+
React__default["default"].createElement("div", { className: "flight__status__container" }, item.outward.travelClass && React__default["default"].createElement("span", { className: "flight__status__badge" }, item.outward.travelClass)),
|
|
20774
20831
|
React__default["default"].createElement("div", { className: "flight__price" },
|
|
20775
20832
|
!isSelected && (React__default["default"].createElement("span", { className: buildClassName(['price', priceDifference > 0 && 'price--increase', priceDifference < 0 && 'price--decrease']) }, getPriceDifferenceText(priceDifference, currencyCode))),
|
|
20776
20833
|
React__default["default"].createElement("button", { type: "button", className: `cta ${isSelected ? 'cta--selected' : 'cta--select'}`, onClick: handleButtonClick }, isSelected ? translations.SHARED.SELECTED : translations.SHARED.SELECT)))),
|
|
@@ -22810,9 +22867,13 @@ const SummaryBookingOptionUnit = ({ unit }) => {
|
|
|
22810
22867
|
|
|
22811
22868
|
const SummaryFlight = ({ flightMetaData, header }) => {
|
|
22812
22869
|
const translations = reactRedux.useSelector(selectTranslations);
|
|
22870
|
+
const flightLines = parseFlightLines(flightMetaData);
|
|
22871
|
+
const travelClass = flightLines?.[0]?.travelClass;
|
|
22813
22872
|
return (React__default["default"].createElement("li", null,
|
|
22814
|
-
React__default["default"].createElement("h6", null,
|
|
22815
|
-
|
|
22873
|
+
React__default["default"].createElement("h6", null,
|
|
22874
|
+
header,
|
|
22875
|
+
travelClass && ` - ${travelClass}`),
|
|
22876
|
+
flightLines?.map((flightLine) => (React__default["default"].createElement("p", { key: flightLine.departureAirportIata },
|
|
22816
22877
|
flightLine.departureAirportDescription,
|
|
22817
22878
|
" (",
|
|
22818
22879
|
flightLine.departureAirportIata,
|
|
@@ -22822,9 +22883,6 @@ const SummaryFlight = ({ flightMetaData, header }) => {
|
|
|
22822
22883
|
flightLine.arrivalAirportIata,
|
|
22823
22884
|
") ",
|
|
22824
22885
|
' - ',
|
|
22825
|
-
flightLine.travelClass,
|
|
22826
|
-
" ",
|
|
22827
|
-
' - ',
|
|
22828
22886
|
flightLine.airlineCode,
|
|
22829
22887
|
flightLine.number,
|
|
22830
22888
|
React__default["default"].createElement("br", null),
|
|
@@ -32152,7 +32210,7 @@ const FlyIn = ({ srpType, isOpen, setIsOpen, className = '', onPanelRef, details
|
|
|
32152
32210
|
dispatch(setBookPackagingEntry(true));
|
|
32153
32211
|
}
|
|
32154
32212
|
};
|
|
32155
|
-
return (React__default["default"].createElement("div", { className: `flyin ${isOpen ? 'flyin--active' : ''} ${className} ${isPackageEditFlow || flyInType === 'acco-results' || flyInType === 'traject-day-activities' ? 'flyin--large' : ''} ${flyInType === 'excursion-results' || flyInType === 'excursion-details' ? 'flyin--medium' : ''}
|
|
32213
|
+
return (React__default["default"].createElement("div", { className: `flyin ${isOpen ? 'flyin--active' : ''} ${className} ${isPackageEditFlow || flyInType === 'acco-results' || flyInType === 'traject-day-activities' ? 'flyin--large' : ''} ${flyInType === 'excursion-results' || flyInType === 'excursion-details' ? 'flyin--medium' : ''}
|
|
32156
32214
|
${flyInType === 'flight-outward-results' || flyInType === 'flight-return-results' || flyInType === 'traject-flight-results' ? 'flyin--flight' : ''}` },
|
|
32157
32215
|
React__default["default"].createElement("div", { className: `flyin__panel ${isOpen ? 'flyin__panel--active' : ''}`, ref: panelRef },
|
|
32158
32216
|
React__default["default"].createElement("div", { className: "flyin__content" },
|
|
@@ -33745,20 +33803,20 @@ const buildFlightHtml = (line) => {
|
|
|
33745
33803
|
*/
|
|
33746
33804
|
const buildFallbackHtml = (item, line) => {
|
|
33747
33805
|
const details = [line?.accommodationName, line?.regimeName].filter(Boolean).join(' — ');
|
|
33748
|
-
return `
|
|
33749
|
-
<div class="itinerary-item__fallback">
|
|
33750
|
-
<h3 class="itinerary-item__fallback-title">${escapeHtml(item.title)}</h3>
|
|
33751
|
-
${line ? buildFlightHtml(line) : ''}
|
|
33752
|
-
${details ? `<p class="itinerary-item__fallback-details">${escapeHtml(details)}</p>` : ''}
|
|
33753
|
-
</div>
|
|
33806
|
+
return `
|
|
33807
|
+
<div class="itinerary-item__fallback">
|
|
33808
|
+
<h3 class="itinerary-item__fallback-title">${escapeHtml(item.title)}</h3>
|
|
33809
|
+
${line ? buildFlightHtml(line) : ''}
|
|
33810
|
+
${details ? `<p class="itinerary-item__fallback-details">${escapeHtml(details)}</p>` : ''}
|
|
33811
|
+
</div>
|
|
33754
33812
|
`;
|
|
33755
33813
|
};
|
|
33756
33814
|
const buildItineraryHtml = (itinerary, translations, lines) => {
|
|
33757
33815
|
if (!itinerary) {
|
|
33758
|
-
return `
|
|
33759
|
-
<div class="itinerary-shell">
|
|
33760
|
-
<div class="itinerary-empty">Geen reisroute beschikbaar.</div>
|
|
33761
|
-
</div>
|
|
33816
|
+
return `
|
|
33817
|
+
<div class="itinerary-shell">
|
|
33818
|
+
<div class="itinerary-empty">Geen reisroute beschikbaar.</div>
|
|
33819
|
+
</div>
|
|
33762
33820
|
`;
|
|
33763
33821
|
}
|
|
33764
33822
|
const allNodes = itinerary.nodes ?? [];
|
|
@@ -33772,70 +33830,70 @@ const buildItineraryHtml = (itinerary, translations, lines) => {
|
|
|
33772
33830
|
const hasAccommodationInCurrentNode = uniqueItems.some(isAccommodationItem);
|
|
33773
33831
|
const activeAccommodation = findAccommodationForDay(allNodes, startDay);
|
|
33774
33832
|
const accommodationBanner = !hasAccommodationInCurrentNode && activeAccommodation
|
|
33775
|
-
? `
|
|
33776
|
-
<div class="itinerary-node__accommodation-banner">
|
|
33777
|
-
Accommodatie voor deze dag: <strong>${escapeHtml(getAccommodationName(activeAccommodation))}</strong>
|
|
33778
|
-
</div>
|
|
33833
|
+
? `
|
|
33834
|
+
<div class="itinerary-node__accommodation-banner">
|
|
33835
|
+
Accommodatie voor deze dag: <strong>${escapeHtml(getAccommodationName(activeAccommodation))}</strong>
|
|
33836
|
+
</div>
|
|
33779
33837
|
`
|
|
33780
33838
|
: '';
|
|
33781
33839
|
const itemsHtml = hasItems
|
|
33782
33840
|
? uniqueItems
|
|
33783
|
-
.map((item) => `
|
|
33784
|
-
<article class="itinerary-item" data-template="${escapeHtml(item.templateName)}">
|
|
33841
|
+
.map((item) => `
|
|
33842
|
+
<article class="itinerary-item" data-template="${escapeHtml(item.templateName)}">
|
|
33785
33843
|
${hasVisibleContent(item.contents)
|
|
33786
33844
|
? item.contents
|
|
33787
|
-
: buildFallbackHtml(item, lines.find((line) => line.guid === item.itemGuid))}
|
|
33788
|
-
</article>
|
|
33845
|
+
: buildFallbackHtml(item, lines.find((line) => line.guid === item.itemGuid))}
|
|
33846
|
+
</article>
|
|
33789
33847
|
`)
|
|
33790
33848
|
.join('')
|
|
33791
33849
|
: `<div class="itinerary-node__empty">${translations.ITINERARY.NO_ITEMS}</div>`;
|
|
33792
|
-
return `
|
|
33793
|
-
<section class="itinerary-node">
|
|
33794
|
-
<header class="itinerary-node__header">
|
|
33795
|
-
|
|
33796
|
-
<div class="itinerary-node__day">
|
|
33797
|
-
<p class="itinerary-node__day-day">${day}</p>
|
|
33798
|
-
<p class="itinerary-node__day-month">${month}</p>
|
|
33799
|
-
</div>
|
|
33800
|
-
|
|
33801
|
-
<div>
|
|
33802
|
-
<h2 class="itinerary-node__title">${escapeHtml(node.title)}</h2>
|
|
33803
|
-
</div>
|
|
33804
|
-
</header>
|
|
33805
|
-
|
|
33806
|
-
<div class="itinerary-node__content">
|
|
33807
|
-
${accommodationBanner}
|
|
33808
|
-
${itemsHtml}
|
|
33809
|
-
</div>
|
|
33810
|
-
</section>
|
|
33850
|
+
return `
|
|
33851
|
+
<section class="itinerary-node">
|
|
33852
|
+
<header class="itinerary-node__header">
|
|
33853
|
+
|
|
33854
|
+
<div class="itinerary-node__day">
|
|
33855
|
+
<p class="itinerary-node__day-day">${day}</p>
|
|
33856
|
+
<p class="itinerary-node__day-month">${month}</p>
|
|
33857
|
+
</div>
|
|
33858
|
+
|
|
33859
|
+
<div>
|
|
33860
|
+
<h2 class="itinerary-node__title">${escapeHtml(node.title)}</h2>
|
|
33861
|
+
</div>
|
|
33862
|
+
</header>
|
|
33863
|
+
|
|
33864
|
+
<div class="itinerary-node__content">
|
|
33865
|
+
${accommodationBanner}
|
|
33866
|
+
${itemsHtml}
|
|
33867
|
+
</div>
|
|
33868
|
+
</section>
|
|
33811
33869
|
`;
|
|
33812
33870
|
})
|
|
33813
33871
|
.join('');
|
|
33814
33872
|
const defaultItemsHtml = itinerary.defaultItems && itinerary.defaultItems.length > 0
|
|
33815
|
-
? `
|
|
33816
|
-
<section class="itinerary-default-items">
|
|
33817
|
-
<h2 class="itinerary-default-items__title">Algemene info</h2>
|
|
33873
|
+
? `
|
|
33874
|
+
<section class="itinerary-default-items">
|
|
33875
|
+
<h2 class="itinerary-default-items__title">Algemene info</h2>
|
|
33818
33876
|
${getUniqueItems(itinerary.defaultItems)
|
|
33819
|
-
.map((item) => `
|
|
33820
|
-
<article class="itinerary-item" data-template="${escapeHtml(item.templateName)}">
|
|
33877
|
+
.map((item) => `
|
|
33878
|
+
<article class="itinerary-item" data-template="${escapeHtml(item.templateName)}">
|
|
33821
33879
|
${hasVisibleContent(item.contents)
|
|
33822
33880
|
? item.contents
|
|
33823
|
-
: buildFallbackHtml(item, lines.find((line) => line.guid === item.itemGuid))}
|
|
33824
|
-
</article>
|
|
33881
|
+
: buildFallbackHtml(item, lines.find((line) => line.guid === item.itemGuid))}
|
|
33882
|
+
</article>
|
|
33825
33883
|
`)
|
|
33826
|
-
.join('')}
|
|
33827
|
-
</section>
|
|
33884
|
+
.join('')}
|
|
33885
|
+
</section>
|
|
33828
33886
|
`
|
|
33829
33887
|
: '';
|
|
33830
|
-
return `
|
|
33831
|
-
<div class="itinerary-shell">
|
|
33832
|
-
${itinerary.title ? `<header class="itinerary-shell__header"><h1 class="itinerary-shell__title">${escapeHtml(itinerary.title)}</h1></header>` : ''}
|
|
33833
|
-
|
|
33834
|
-
<div class="itinerary-shell__content">
|
|
33835
|
-
${nodesHtml}
|
|
33836
|
-
${defaultItemsHtml}
|
|
33837
|
-
</div>
|
|
33838
|
-
</div>
|
|
33888
|
+
return `
|
|
33889
|
+
<div class="itinerary-shell">
|
|
33890
|
+
${itinerary.title ? `<header class="itinerary-shell__header"><h1 class="itinerary-shell__title">${escapeHtml(itinerary.title)}</h1></header>` : ''}
|
|
33891
|
+
|
|
33892
|
+
<div class="itinerary-shell__content">
|
|
33893
|
+
${nodesHtml}
|
|
33894
|
+
${defaultItemsHtml}
|
|
33895
|
+
</div>
|
|
33896
|
+
</div>
|
|
33839
33897
|
`;
|
|
33840
33898
|
};
|
|
33841
33899
|
const FullItinerary = ({ isLoading }) => {
|
|
@@ -33857,170 +33915,170 @@ const FullItinerary = ({ isLoading }) => {
|
|
|
33857
33915
|
}
|
|
33858
33916
|
const shadowRoot = host.shadowRoot ?? host.attachShadow({ mode: 'open' });
|
|
33859
33917
|
shadowRootRef.current = shadowRoot;
|
|
33860
|
-
shadowRoot.innerHTML = `
|
|
33861
|
-
<style>
|
|
33862
|
-
:host {
|
|
33863
|
-
all: initial;
|
|
33864
|
-
display: block;
|
|
33865
|
-
width: 100%;
|
|
33866
|
-
}
|
|
33867
|
-
|
|
33868
|
-
*,
|
|
33869
|
-
*::before,
|
|
33870
|
-
*::after {
|
|
33871
|
-
box-sizing: border-box;
|
|
33872
|
-
}
|
|
33873
|
-
|
|
33874
|
-
.itinerary-shell {
|
|
33875
|
-
width: 100%;
|
|
33876
|
-
margin: 0 auto;
|
|
33877
|
-
font-family: 'Outfit', sans-serif;
|
|
33878
|
-
color: #222;
|
|
33879
|
-
}
|
|
33880
|
-
|
|
33881
|
-
.itinerary-shell__header {
|
|
33882
|
-
margin-bottom: 24px;
|
|
33883
|
-
}
|
|
33884
|
-
|
|
33885
|
-
.itinerary-shell__title {
|
|
33886
|
-
margin: 0;
|
|
33887
|
-
font-size: 32px;
|
|
33888
|
-
line-height: 1.2;
|
|
33889
|
-
}
|
|
33890
|
-
|
|
33891
|
-
.itinerary-shell__content {
|
|
33892
|
-
display: grid;
|
|
33893
|
-
gap: 24px;
|
|
33894
|
-
}
|
|
33895
|
-
|
|
33896
|
-
.itinerary-node {
|
|
33897
|
-
border: 1px solid #e5e7eb;
|
|
33898
|
-
border-radius: 16px;
|
|
33899
|
-
overflow: hidden;
|
|
33900
|
-
background: #fff;
|
|
33901
|
-
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
|
|
33902
|
-
}
|
|
33903
|
-
|
|
33904
|
-
.itinerary-node__header {
|
|
33905
|
-
display: flex;
|
|
33906
|
-
gap: 16px;
|
|
33907
|
-
align-items: center;
|
|
33908
|
-
border-bottom: 1px solid #eef0f2;
|
|
33909
|
-
background: #fafafa;
|
|
33910
|
-
}
|
|
33911
|
-
|
|
33912
|
-
.itinerary-node__day {
|
|
33913
|
-
flex: 50px 0 0;
|
|
33914
|
-
display: flex;
|
|
33915
|
-
flex-flow: column;
|
|
33916
|
-
align-items: center;
|
|
33917
|
-
justify-content: center;
|
|
33918
|
-
background: #1f9470;
|
|
33919
|
-
color: white;
|
|
33920
|
-
border: 1.5px solid var(--tide-booking-color-secondary);
|
|
33921
|
-
}
|
|
33922
|
-
|
|
33923
|
-
.itinerary-node__day-month {
|
|
33924
|
-
margin: 0px;
|
|
33925
|
-
}
|
|
33926
|
-
|
|
33927
|
-
.itinerary-node__day-day {
|
|
33928
|
-
margin: 0px;
|
|
33929
|
-
font-weight: var(--tide-booking-search-results-label-date-month-font-weight);
|
|
33930
|
-
color: var(--tide-booking-search-results-label-date-month-color);
|
|
33931
|
-
font-size: 24px;
|
|
33932
|
-
}
|
|
33933
|
-
|
|
33934
|
-
.itinerary-node__title {
|
|
33935
|
-
margin: 0;
|
|
33936
|
-
font-size: 22px;
|
|
33937
|
-
line-height: 1.25;
|
|
33938
|
-
}
|
|
33939
|
-
|
|
33940
|
-
.itinerary-node__content {
|
|
33941
|
-
display: grid;
|
|
33942
|
-
gap: 20px;
|
|
33943
|
-
padding: 20px;
|
|
33944
|
-
}
|
|
33945
|
-
|
|
33946
|
-
.itinerary-node__accommodation-banner {
|
|
33947
|
-
padding: 12px 16px;
|
|
33948
|
-
border: 1px solid #dbeafe;
|
|
33949
|
-
border-radius: 12px;
|
|
33950
|
-
background: #eff6ff;
|
|
33951
|
-
color: #1e3a8a;
|
|
33952
|
-
font-size: 14px;
|
|
33953
|
-
line-height: 1.4;
|
|
33954
|
-
}
|
|
33955
|
-
|
|
33956
|
-
.itinerary-item {
|
|
33957
|
-
display: block;
|
|
33958
|
-
border-radius: 12px;
|
|
33959
|
-
overflow: hidden;
|
|
33960
|
-
background: #fff;
|
|
33961
|
-
}
|
|
33962
|
-
|
|
33963
|
-
/* An item whose template has no content view of its own still has to read as a service. */
|
|
33964
|
-
.itinerary-item__fallback {
|
|
33965
|
-
padding: 16px 20px;
|
|
33966
|
-
border: 1px solid #e5e7eb;
|
|
33967
|
-
border-radius: 12px;
|
|
33968
|
-
}
|
|
33969
|
-
|
|
33970
|
-
.itinerary-item__fallback-title {
|
|
33971
|
-
margin: 0;
|
|
33972
|
-
font-size: 16px;
|
|
33973
|
-
font-weight: 600;
|
|
33974
|
-
color: #111827;
|
|
33975
|
-
}
|
|
33976
|
-
|
|
33977
|
-
.itinerary-item__legs {
|
|
33978
|
-
margin: 8px 0 0;
|
|
33979
|
-
padding-left: 18px;
|
|
33980
|
-
color: #374151;
|
|
33981
|
-
}
|
|
33982
|
-
|
|
33983
|
-
.itinerary-item__legs li + li {
|
|
33984
|
-
margin-top: 4px;
|
|
33985
|
-
}
|
|
33986
|
-
|
|
33987
|
-
.itinerary-item__fallback-details {
|
|
33988
|
-
margin: 8px 0 0;
|
|
33989
|
-
color: #6b7280;
|
|
33990
|
-
}
|
|
33991
|
-
|
|
33992
|
-
.itinerary-node__empty,
|
|
33993
|
-
.itinerary-empty {
|
|
33994
|
-
padding: 20px;
|
|
33995
|
-
border: 1px dashed #d1d5db;
|
|
33996
|
-
border-radius: 12px;
|
|
33997
|
-
color: #6b7280;
|
|
33998
|
-
background: #fafafa;
|
|
33999
|
-
}
|
|
34000
|
-
|
|
34001
|
-
.itinerary-default-items {
|
|
34002
|
-
border: 1px solid #e5e7eb;
|
|
34003
|
-
border-radius: 16px;
|
|
34004
|
-
padding: 20px;
|
|
34005
|
-
background: #fff;
|
|
34006
|
-
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
|
|
34007
|
-
}
|
|
34008
|
-
|
|
34009
|
-
.itinerary-default-items__title {
|
|
34010
|
-
margin: 0 0 16px;
|
|
34011
|
-
font-size: 22px;
|
|
34012
|
-
}
|
|
34013
|
-
|
|
34014
|
-
@media (max-width: 768px) {
|
|
34015
|
-
.itinerary-shell {
|
|
34016
|
-
padding: 16px;
|
|
34017
|
-
}
|
|
34018
|
-
}
|
|
34019
|
-
|
|
34020
|
-
${itinerary?.styleSheetBody ?? ''}
|
|
34021
|
-
</style>
|
|
34022
|
-
|
|
34023
|
-
${html}
|
|
33918
|
+
shadowRoot.innerHTML = `
|
|
33919
|
+
<style>
|
|
33920
|
+
:host {
|
|
33921
|
+
all: initial;
|
|
33922
|
+
display: block;
|
|
33923
|
+
width: 100%;
|
|
33924
|
+
}
|
|
33925
|
+
|
|
33926
|
+
*,
|
|
33927
|
+
*::before,
|
|
33928
|
+
*::after {
|
|
33929
|
+
box-sizing: border-box;
|
|
33930
|
+
}
|
|
33931
|
+
|
|
33932
|
+
.itinerary-shell {
|
|
33933
|
+
width: 100%;
|
|
33934
|
+
margin: 0 auto;
|
|
33935
|
+
font-family: 'Outfit', sans-serif;
|
|
33936
|
+
color: #222;
|
|
33937
|
+
}
|
|
33938
|
+
|
|
33939
|
+
.itinerary-shell__header {
|
|
33940
|
+
margin-bottom: 24px;
|
|
33941
|
+
}
|
|
33942
|
+
|
|
33943
|
+
.itinerary-shell__title {
|
|
33944
|
+
margin: 0;
|
|
33945
|
+
font-size: 32px;
|
|
33946
|
+
line-height: 1.2;
|
|
33947
|
+
}
|
|
33948
|
+
|
|
33949
|
+
.itinerary-shell__content {
|
|
33950
|
+
display: grid;
|
|
33951
|
+
gap: 24px;
|
|
33952
|
+
}
|
|
33953
|
+
|
|
33954
|
+
.itinerary-node {
|
|
33955
|
+
border: 1px solid #e5e7eb;
|
|
33956
|
+
border-radius: 16px;
|
|
33957
|
+
overflow: hidden;
|
|
33958
|
+
background: #fff;
|
|
33959
|
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
|
|
33960
|
+
}
|
|
33961
|
+
|
|
33962
|
+
.itinerary-node__header {
|
|
33963
|
+
display: flex;
|
|
33964
|
+
gap: 16px;
|
|
33965
|
+
align-items: center;
|
|
33966
|
+
border-bottom: 1px solid #eef0f2;
|
|
33967
|
+
background: #fafafa;
|
|
33968
|
+
}
|
|
33969
|
+
|
|
33970
|
+
.itinerary-node__day {
|
|
33971
|
+
flex: 50px 0 0;
|
|
33972
|
+
display: flex;
|
|
33973
|
+
flex-flow: column;
|
|
33974
|
+
align-items: center;
|
|
33975
|
+
justify-content: center;
|
|
33976
|
+
background: #1f9470;
|
|
33977
|
+
color: white;
|
|
33978
|
+
border: 1.5px solid var(--tide-booking-color-secondary);
|
|
33979
|
+
}
|
|
33980
|
+
|
|
33981
|
+
.itinerary-node__day-month {
|
|
33982
|
+
margin: 0px;
|
|
33983
|
+
}
|
|
33984
|
+
|
|
33985
|
+
.itinerary-node__day-day {
|
|
33986
|
+
margin: 0px;
|
|
33987
|
+
font-weight: var(--tide-booking-search-results-label-date-month-font-weight);
|
|
33988
|
+
color: var(--tide-booking-search-results-label-date-month-color);
|
|
33989
|
+
font-size: 24px;
|
|
33990
|
+
}
|
|
33991
|
+
|
|
33992
|
+
.itinerary-node__title {
|
|
33993
|
+
margin: 0;
|
|
33994
|
+
font-size: 22px;
|
|
33995
|
+
line-height: 1.25;
|
|
33996
|
+
}
|
|
33997
|
+
|
|
33998
|
+
.itinerary-node__content {
|
|
33999
|
+
display: grid;
|
|
34000
|
+
gap: 20px;
|
|
34001
|
+
padding: 20px;
|
|
34002
|
+
}
|
|
34003
|
+
|
|
34004
|
+
.itinerary-node__accommodation-banner {
|
|
34005
|
+
padding: 12px 16px;
|
|
34006
|
+
border: 1px solid #dbeafe;
|
|
34007
|
+
border-radius: 12px;
|
|
34008
|
+
background: #eff6ff;
|
|
34009
|
+
color: #1e3a8a;
|
|
34010
|
+
font-size: 14px;
|
|
34011
|
+
line-height: 1.4;
|
|
34012
|
+
}
|
|
34013
|
+
|
|
34014
|
+
.itinerary-item {
|
|
34015
|
+
display: block;
|
|
34016
|
+
border-radius: 12px;
|
|
34017
|
+
overflow: hidden;
|
|
34018
|
+
background: #fff;
|
|
34019
|
+
}
|
|
34020
|
+
|
|
34021
|
+
/* An item whose template has no content view of its own still has to read as a service. */
|
|
34022
|
+
.itinerary-item__fallback {
|
|
34023
|
+
padding: 16px 20px;
|
|
34024
|
+
border: 1px solid #e5e7eb;
|
|
34025
|
+
border-radius: 12px;
|
|
34026
|
+
}
|
|
34027
|
+
|
|
34028
|
+
.itinerary-item__fallback-title {
|
|
34029
|
+
margin: 0;
|
|
34030
|
+
font-size: 16px;
|
|
34031
|
+
font-weight: 600;
|
|
34032
|
+
color: #111827;
|
|
34033
|
+
}
|
|
34034
|
+
|
|
34035
|
+
.itinerary-item__legs {
|
|
34036
|
+
margin: 8px 0 0;
|
|
34037
|
+
padding-left: 18px;
|
|
34038
|
+
color: #374151;
|
|
34039
|
+
}
|
|
34040
|
+
|
|
34041
|
+
.itinerary-item__legs li + li {
|
|
34042
|
+
margin-top: 4px;
|
|
34043
|
+
}
|
|
34044
|
+
|
|
34045
|
+
.itinerary-item__fallback-details {
|
|
34046
|
+
margin: 8px 0 0;
|
|
34047
|
+
color: #6b7280;
|
|
34048
|
+
}
|
|
34049
|
+
|
|
34050
|
+
.itinerary-node__empty,
|
|
34051
|
+
.itinerary-empty {
|
|
34052
|
+
padding: 20px;
|
|
34053
|
+
border: 1px dashed #d1d5db;
|
|
34054
|
+
border-radius: 12px;
|
|
34055
|
+
color: #6b7280;
|
|
34056
|
+
background: #fafafa;
|
|
34057
|
+
}
|
|
34058
|
+
|
|
34059
|
+
.itinerary-default-items {
|
|
34060
|
+
border: 1px solid #e5e7eb;
|
|
34061
|
+
border-radius: 16px;
|
|
34062
|
+
padding: 20px;
|
|
34063
|
+
background: #fff;
|
|
34064
|
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
|
|
34065
|
+
}
|
|
34066
|
+
|
|
34067
|
+
.itinerary-default-items__title {
|
|
34068
|
+
margin: 0 0 16px;
|
|
34069
|
+
font-size: 22px;
|
|
34070
|
+
}
|
|
34071
|
+
|
|
34072
|
+
@media (max-width: 768px) {
|
|
34073
|
+
.itinerary-shell {
|
|
34074
|
+
padding: 16px;
|
|
34075
|
+
}
|
|
34076
|
+
}
|
|
34077
|
+
|
|
34078
|
+
${itinerary?.styleSheetBody ?? ''}
|
|
34079
|
+
</style>
|
|
34080
|
+
|
|
34081
|
+
${html}
|
|
34024
34082
|
`;
|
|
34025
34083
|
}, [html, itinerary?.styleSheetBody, isLoading]);
|
|
34026
34084
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|