@qite/tide-booking-component 1.4.126 → 1.4.128

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.
@@ -17759,6 +17759,7 @@ const selectCalculateDeposit = (state) => state.booking.calculateDeposit;
17759
17759
  const selectShowCommission = (state) => state.booking.showCommission;
17760
17760
  const selectIsRetry = (state) => state.booking.isRetry;
17761
17761
  const selectStartDate = (state) => state.booking.package?.options.find((x) => x.isSelected)?.fromDate;
17762
+ const selectEndDate = (state) => state.booking.package?.options.find((x) => x.isSelected)?.toDate;
17762
17763
  const selectAgents = (state) => state.booking.agents;
17763
17764
  const selectCountries = (state) => state.booking.countries;
17764
17765
  const selectProductCode = (state) => state.booking.productAttributes?.productCode;
@@ -21324,7 +21325,7 @@ const SidebarFlight = ({ title, flightMetaData, translations }) => {
21324
21325
  React__default.createElement("div", { className: "pricing-summary__value" }, translations.SIDEBAR.LUGGAGE_INCLUDED)))));
21325
21326
  };
21326
21327
 
21327
- const SharedSidebar = ({ productName, thumbnailUrl, isLoading, translations, headerComponent, travelerRooms, startDateText, endDateText, loaderComponent, departureFlightMetaData, returnFlightMetaData, accommodations, packagingAccommodations, isOnRequest, includedServiceTypes, basePrice, commission, totalPrice, includedCosts, extraCosts, deposit, basePricePerPaxType, seperateExtraPricePerPaxType, isUnavailable, agent, footerComponent }) => {
21328
+ const SharedSidebar = ({ productName, thumbnailUrl, isLoading, translations, headerComponent, travelerRooms, startDateText, endDateText, loaderComponent, departureFlightMetaData, returnFlightMetaData, accommodations, packagingAccommodations, isOnRequest, includedServiceTypes, basePrice, commission, showCommission, totalPrice, includedCosts, extraCosts, deposit, basePricePerPaxType, seperateExtraPricePerPaxType, isUnavailable, agent, footerComponent, currencyCode = 'EUR' }) => {
21328
21329
  if (!translations)
21329
21330
  return null;
21330
21331
  const [active, setActive] = useState(false);
@@ -21335,8 +21336,6 @@ const SharedSidebar = ({ productName, thumbnailUrl, isLoading, translations, hea
21335
21336
  const canShowPriceBreakdownSection = Boolean(basePrice && basePrice > 0) || !isEmpty$1(includedCosts) || !isEmpty$1(extraCosts);
21336
21337
  const canShowTotalPriceSection = Boolean(totalPrice && totalPrice > 0);
21337
21338
  const remainingAmount = Number(((totalPrice ?? 0) - (deposit ?? 0)).toFixed(2));
21338
- // TODO: Determine currency code based on the data, for now default to EUR
21339
- let currencyCode = 'EUR';
21340
21339
  return (React__default.createElement("div", { className: buildClassName(['booking__sidebar', active && 'booking__sidebar--active']) },
21341
21340
  headerComponent,
21342
21341
  React__default.createElement("div", { className: "booking__sidebar-frame" },
@@ -21466,7 +21465,7 @@ const SharedSidebar = ({ productName, thumbnailUrl, isLoading, translations, hea
21466
21465
  translations.SIDEBAR.DEPOSIT_TEXT4,
21467
21466
  React__default.createElement("strong", null, translations.SIDEBAR.DEPOSIT_TEXT5),
21468
21467
  translations.SIDEBAR.DEPOSIT_TEXT6))))) : (React__default.createElement("div", { className: "pricing-summary__group" },
21469
- agent && (React__default.createElement("div", { className: "pricing-summary__row pricing-summary__row--total-price" },
21468
+ (agent && showCommission) && (React__default.createElement("div", { className: "pricing-summary__row pricing-summary__row--total-price" },
21470
21469
  React__default.createElement("div", { className: "pricing-summary__property" },
21471
21470
  React__default.createElement("h6", { className: "pricing-summary__title" }, translations.SIDEBAR.COMMISSION)),
21472
21471
  React__default.createElement("div", { className: "pricing-summary__value" },
@@ -21482,7 +21481,7 @@ const SharedSidebar = ({ productName, thumbnailUrl, isLoading, translations, hea
21482
21481
  };
21483
21482
 
21484
21483
  const SidebarContainer = ({ productName, thumbnailUrl }) => {
21485
- const { sidebarHeaderComponent, sidebarFooterComponent, loaderComponent, showPricesPerPaxType, maxChildAge } = useContext(SettingsContext);
21484
+ const { sidebarHeaderComponent, sidebarFooterComponent, loaderComponent, showPricesPerPaxType, maxChildAge, showCommission } = useContext(SettingsContext);
21486
21485
  const bookingAttributes = useSelector(selectBookingAttributes);
21487
21486
  const selectFormRooms = useMemo(() => makeSelectFormRooms(maxChildAge), [maxChildAge]);
21488
21487
  const rooms = useSelector(selectFormRooms);
@@ -21499,7 +21498,7 @@ const SidebarContainer = ({ productName, thumbnailUrl }) => {
21499
21498
  const isUnavailable = useSelector(selectIsUnavailable) || false;
21500
21499
  const isLoading = isFetchingProductOptions || isFetchingPriceDetails;
21501
21500
  const agent = useSelector(selectAgentAdressId);
21502
- return (React__default.createElement(SharedSidebar, { productName: productName, thumbnailUrl: thumbnailUrl, isLoading: isLoading, startDateText: getDateText(bookingAttributes?.startDate), endDateText: bookingAttributes?.startDate !== bookingAttributes?.endDate ? getDateText(bookingAttributes?.endDate) : undefined, travelerRooms: travelerRooms, departureFlightMetaData: departureFlightMetaData, returnFlightMetaData: returnFlightMetaData, basePrice: useSelector(selectBasePrice), commission: useSelector(selectCommission), totalPrice: useSelector(selectTotalPrice), includedCosts: useSelector(selectSeparatePackagePriceDetails$1), extraCosts: useSelector(selectSeparateExtraPriceDetails), accommodations: accommodations, includedServiceTypes: includedServiceTypes, deposit: useSelector(selectDeposit), isOnRequest: useSelector(selectIsOnRequest), headerComponent: sidebarHeaderComponent ?? undefined, footerComponent: sidebarFooterComponent ?? undefined, loaderComponent: loaderComponent ?? undefined, isUnavailable: isUnavailable, basePricePerPaxType: showPricesPerPaxType ? useSelector(selectBasePricePerPaxType) : undefined, seperateExtraPricePerPaxType: showPricesPerPaxType ? useSelector(selectSeparateExtraPriceDetailsPerPaxType) : undefined, translations: translations, agent: agent }));
21501
+ return (React__default.createElement(SharedSidebar, { productName: productName, thumbnailUrl: thumbnailUrl, isLoading: isLoading, startDateText: getDateText(bookingAttributes?.startDate), endDateText: bookingAttributes?.startDate !== bookingAttributes?.endDate ? getDateText(bookingAttributes?.endDate) : undefined, travelerRooms: travelerRooms, departureFlightMetaData: departureFlightMetaData, returnFlightMetaData: returnFlightMetaData, basePrice: useSelector(selectBasePrice), commission: useSelector(selectCommission), showCommission: showCommission, totalPrice: useSelector(selectTotalPrice), includedCosts: useSelector(selectSeparatePackagePriceDetails$1), extraCosts: useSelector(selectSeparateExtraPriceDetails), accommodations: accommodations, includedServiceTypes: includedServiceTypes, deposit: useSelector(selectDeposit), isOnRequest: useSelector(selectIsOnRequest), headerComponent: sidebarHeaderComponent ?? undefined, footerComponent: sidebarFooterComponent ?? undefined, loaderComponent: loaderComponent ?? undefined, isUnavailable: isUnavailable, basePricePerPaxType: showPricesPerPaxType ? useSelector(selectBasePricePerPaxType) : undefined, seperateExtraPricePerPaxType: showPricesPerPaxType ? useSelector(selectSeparateExtraPriceDetailsPerPaxType) : undefined, translations: translations, agent: agent, currencyCode: useSelector(selectCurrencyCode) }));
21503
21502
  };
21504
21503
 
21505
21504
  const SummaryPerPaxOptionGroup = ({ group }) => {
@@ -21681,7 +21680,7 @@ const Summary = () => {
21681
21680
  }
21682
21681
  else {
21683
21682
  const location = window.location;
21684
- bookRequest.payload.redirectUrl = `${location.protocol}//${location.host}${settings.basePath}?${bookingQueryString}`;
21683
+ bookRequest.payload.redirectUrl = `${location.protocol}//${location.host}${settings.basePath ?? location.pathname}?${bookingQueryString}`;
21685
21684
  }
21686
21685
  }
21687
21686
  }
@@ -21997,8 +21996,9 @@ const validateForm$1 = (values, agentRequired, bookingType, translations, formFi
21997
21996
  if (isEmpty$1(adult.birthDate)) {
21998
21997
  set(errors, `rooms[${rIndex}].adults[${index}].birthDate`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.BIRTHDATE));
21999
21998
  }
22000
- else if (values.startDate) {
22001
- const age = getAge(adult.birthDate, values.startDate);
21999
+ else if (values.endDate) {
22000
+ // If you are younger than the maxChildAge at the end of the trip, you are considered a child, so we check the endDate here instead of the startDate
22001
+ const age = getAge(adult.birthDate, values.endDate);
22002
22002
  if (age <= maxChildAge) {
22003
22003
  set(errors, `rooms[${rIndex}].adults[${index}].birthDate`, formatTravelerIsNoAdult(rIndex + 1, index + 1));
22004
22004
  }
@@ -22019,8 +22019,9 @@ const validateForm$1 = (values, agentRequired, bookingType, translations, formFi
22019
22019
  if (isEmpty$1(child.birthDate)) {
22020
22020
  set(errors, `rooms[${rIndex}].children[${index}].birthDate`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.BIRTHDATE));
22021
22021
  }
22022
- else if (values.startDate) {
22023
- const age = getAge(child.birthDate, values.startDate);
22022
+ else if (values.endDate) {
22023
+ // You need to be under the maxChildAge until the end of the trip, so we check the endDate here instead of the startDate
22024
+ const age = getAge(child.birthDate, values.endDate);
22024
22025
  if (age > maxChildAge) {
22025
22026
  set(errors, `rooms[${rIndex}].children[${index}].birthDate`, formatTravelerIsNoChild(rIndex + 1, r.adults.length + index + 1));
22026
22027
  }
@@ -22244,10 +22245,11 @@ function createTraveler(traveler, followNumber, personTranslation, isCompact) {
22244
22245
  gender: ''
22245
22246
  };
22246
22247
  }
22247
- function createInitialValuesFromRooms(formRooms, startDate, agentAdressId, personTranslation, isCompact) {
22248
+ function createInitialValuesFromRooms(formRooms, startDate, endDate, agentAdressId, personTranslation, isCompact) {
22248
22249
  const followNumber = { number: 1 };
22249
22250
  const initialValues = {
22250
22251
  startDate,
22252
+ endDate,
22251
22253
  rooms: formRooms.map((room) => ({
22252
22254
  adults: room.adults.map((traveler) => createTraveler(traveler, followNumber, personTranslation, isCompact)),
22253
22255
  children: room.children.map((traveler) => createTraveler(traveler, followNumber, personTranslation, isCompact))
@@ -22297,7 +22299,7 @@ function createInitialValuesFromEditablePackagingEntry(editablePackagingEntry, a
22297
22299
  })
22298
22300
  };
22299
22301
  });
22300
- const values = createInitialValuesFromRooms(rooms.map((room) => ({ adults: room.adults, children: room.children })), editablePackagingEntry?.lines?.[0]?.from, agentAdressId);
22302
+ const values = createInitialValuesFromRooms(rooms.map((room) => ({ adults: room.adults, children: room.children })), first(editablePackagingEntry?.lines)?.from, last(editablePackagingEntry?.lines)?.to, agentAdressId);
22301
22303
  values.rooms = rooms;
22302
22304
  values.mainBookerId = pax.find((x) => x.isMainBooker)?.id ?? rooms[0]?.adults?.[0]?.id ?? -1;
22303
22305
  const address = editablePackagingEntry?.address;
@@ -22575,6 +22577,7 @@ const TravelersForm = () => {
22575
22577
  const navigate = settings.skipRouter ? () => { } : useNavigate();
22576
22578
  const bookingQueryString = useSelector(selectBookingQueryString);
22577
22579
  const startDate = useSelector(selectStartDate);
22580
+ const endDate = useSelector(selectEndDate);
22578
22581
  const selectFormRooms = useMemo(() => makeSelectFormRooms(settings.maxChildAge), [settings.maxChildAge]);
22579
22582
  const formRooms = useSelector(selectFormRooms);
22580
22583
  const bookingType = useSelector(selectBookingType);
@@ -22591,7 +22594,7 @@ const TravelersForm = () => {
22591
22594
  const useCompactForm = !!settings.travellers.compactForm && !!settings.agentAdressId;
22592
22595
  const showAllCountries = !!settings.travellers.showAllCountries;
22593
22596
  const initialValues = useSelector(selectTravelersFormValues) ??
22594
- createInitialValuesFromRooms(formRooms, startDate, agentAdressId, translations.TRAVELERS_FORM.PERSON, useCompactForm);
22597
+ createInitialValuesFromRooms(formRooms, startDate, endDate, agentAdressId, translations.TRAVELERS_FORM.PERSON, useCompactForm);
22595
22598
  const [showAgentSelection, setShowAgentSelection] = useState(!settings.agentAdressId && !settings.hideAgentSelection);
22596
22599
  const formik = useFormik({
22597
22600
  initialValues,
@@ -22608,7 +22611,12 @@ const TravelersForm = () => {
22608
22611
  navigate(`${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.summary.pathSuffix}?${bookingQueryString}`);
22609
22612
  return;
22610
22613
  }
22611
- dispatch(fetchPackage());
22614
+ if (travelersFirstStep) {
22615
+ dispatch(fetchPackage());
22616
+ }
22617
+ else {
22618
+ dispatch(fetchPriceDetails());
22619
+ }
22612
22620
  if (settings.skipRouter)
22613
22621
  dispatch(setCurrentStep$1(travelersFirstStep ? FLIGHT_OPTIONS_FORM_STEP : SUMMARY_STEP));
22614
22622
  else
@@ -22619,6 +22627,8 @@ const TravelersForm = () => {
22619
22627
  dispatch(fetchPriceDetails());
22620
22628
  }, [dispatch]);
22621
22629
  useEffect(() => {
22630
+ if (!travelersFirstStep)
22631
+ return;
22622
22632
  if (!bookingAttributes?.rooms?.length)
22623
22633
  return;
22624
22634
  if (!hasMounted) {
@@ -22643,7 +22653,7 @@ const TravelersForm = () => {
22643
22653
  }
22644
22654
  };
22645
22655
  fetchAll();
22646
- }, [bookingAttributes?.rooms, dispatch, hasMounted]);
22656
+ }, [bookingAttributes?.rooms, dispatch, hasMounted, travelersFirstStep]);
22647
22657
  const roomsQuery = useMemo(() => formik.values.rooms
22648
22658
  .map((room) => {
22649
22659
  const adults = room.adults ? room.adults.length : 0;
@@ -31009,10 +31019,10 @@ const findAccommodationForDay = (nodes, currentDay) => {
31009
31019
  };
31010
31020
  const buildItineraryHtml = (itinerary, translations) => {
31011
31021
  if (!itinerary) {
31012
- return `
31013
- <div class="itinerary-shell">
31014
- <div class="itinerary-empty">Geen reisroute beschikbaar.</div>
31015
- </div>
31022
+ return `
31023
+ <div class="itinerary-shell">
31024
+ <div class="itinerary-empty">Geen reisroute beschikbaar.</div>
31025
+ </div>
31016
31026
  `;
31017
31027
  }
31018
31028
  const allNodes = itinerary.nodes ?? [];
@@ -31026,66 +31036,66 @@ const buildItineraryHtml = (itinerary, translations) => {
31026
31036
  const hasAccommodationInCurrentNode = uniqueItems.some(isAccommodationItem);
31027
31037
  const activeAccommodation = findAccommodationForDay(allNodes, startDay);
31028
31038
  const accommodationBanner = !hasAccommodationInCurrentNode && activeAccommodation
31029
- ? `
31030
- <div class="itinerary-node__accommodation-banner">
31031
- Accommodatie voor deze dag: <strong>${escapeHtml(getAccommodationName(activeAccommodation))}</strong>
31032
- </div>
31039
+ ? `
31040
+ <div class="itinerary-node__accommodation-banner">
31041
+ Accommodatie voor deze dag: <strong>${escapeHtml(getAccommodationName(activeAccommodation))}</strong>
31042
+ </div>
31033
31043
  `
31034
31044
  : '';
31035
31045
  const itemsHtml = hasItems
31036
31046
  ? uniqueItems
31037
- .map((item) => `
31038
- <article class="itinerary-item" data-template="${escapeHtml(item.templateName)}">
31039
- ${item.contents ?? ''}
31040
- </article>
31047
+ .map((item) => `
31048
+ <article class="itinerary-item" data-template="${escapeHtml(item.templateName)}">
31049
+ ${item.contents ?? ''}
31050
+ </article>
31041
31051
  `)
31042
31052
  .join('')
31043
31053
  : `<div class="itinerary-node__empty">${translations.ITINERARY.NO_ITEMS}</div>`;
31044
- return `
31045
- <section class="itinerary-node">
31046
- <header class="itinerary-node__header">
31047
-
31048
- <div class="itinerary-node__day">
31049
- <p class="itinerary-node__day-day">${day}</p>
31050
- <p class="itinerary-node__day-month">${month}</p>
31051
- </div>
31052
-
31053
- <div>
31054
- <h2 class="itinerary-node__title">${escapeHtml(node.title)}</h2>
31055
- </div>
31056
- </header>
31057
-
31058
- <div class="itinerary-node__content">
31059
- ${accommodationBanner}
31060
- ${itemsHtml}
31061
- </div>
31062
- </section>
31054
+ return `
31055
+ <section class="itinerary-node">
31056
+ <header class="itinerary-node__header">
31057
+
31058
+ <div class="itinerary-node__day">
31059
+ <p class="itinerary-node__day-day">${day}</p>
31060
+ <p class="itinerary-node__day-month">${month}</p>
31061
+ </div>
31062
+
31063
+ <div>
31064
+ <h2 class="itinerary-node__title">${escapeHtml(node.title)}</h2>
31065
+ </div>
31066
+ </header>
31067
+
31068
+ <div class="itinerary-node__content">
31069
+ ${accommodationBanner}
31070
+ ${itemsHtml}
31071
+ </div>
31072
+ </section>
31063
31073
  `;
31064
31074
  })
31065
31075
  .join('');
31066
31076
  const defaultItemsHtml = itinerary.defaultItems && itinerary.defaultItems.length > 0
31067
- ? `
31068
- <section class="itinerary-default-items">
31069
- <h2 class="itinerary-default-items__title">Algemene info</h2>
31077
+ ? `
31078
+ <section class="itinerary-default-items">
31079
+ <h2 class="itinerary-default-items__title">Algemene info</h2>
31070
31080
  ${getUniqueItems(itinerary.defaultItems)
31071
- .map((item) => `
31072
- <article class="itinerary-item" data-template="${escapeHtml(item.templateName)}">
31073
- ${item.contents ?? ''}
31074
- </article>
31081
+ .map((item) => `
31082
+ <article class="itinerary-item" data-template="${escapeHtml(item.templateName)}">
31083
+ ${item.contents ?? ''}
31084
+ </article>
31075
31085
  `)
31076
- .join('')}
31077
- </section>
31086
+ .join('')}
31087
+ </section>
31078
31088
  `
31079
31089
  : '';
31080
- return `
31081
- <div class="itinerary-shell">
31082
- ${itinerary.title ? `<header class="itinerary-shell__header"><h1 class="itinerary-shell__title">${escapeHtml(itinerary.title)}</h1></header>` : ''}
31083
-
31084
- <div class="itinerary-shell__content">
31085
- ${nodesHtml}
31086
- ${defaultItemsHtml}
31087
- </div>
31088
- </div>
31090
+ return `
31091
+ <div class="itinerary-shell">
31092
+ ${itinerary.title ? `<header class="itinerary-shell__header"><h1 class="itinerary-shell__title">${escapeHtml(itinerary.title)}</h1></header>` : ''}
31093
+
31094
+ <div class="itinerary-shell__content">
31095
+ ${nodesHtml}
31096
+ ${defaultItemsHtml}
31097
+ </div>
31098
+ </div>
31089
31099
  `;
31090
31100
  };
31091
31101
  const FullItinerary = ({ isLoading }) => {
@@ -31105,141 +31115,141 @@ const FullItinerary = ({ isLoading }) => {
31105
31115
  }
31106
31116
  const shadowRoot = host.shadowRoot ?? host.attachShadow({ mode: 'open' });
31107
31117
  shadowRootRef.current = shadowRoot;
31108
- shadowRoot.innerHTML = `
31109
- <style>
31110
- :host {
31111
- all: initial;
31112
- display: block;
31113
- width: 100%;
31114
- }
31115
-
31116
- *,
31117
- *::before,
31118
- *::after {
31119
- box-sizing: border-box;
31120
- }
31121
-
31122
- .itinerary-shell {
31123
- width: 100%;
31124
- margin: 0 auto;
31125
- font-family: 'Outfit', sans-serif;
31126
- color: #222;
31127
- }
31128
-
31129
- .itinerary-shell__header {
31130
- margin-bottom: 24px;
31131
- }
31132
-
31133
- .itinerary-shell__title {
31134
- margin: 0;
31135
- font-size: 32px;
31136
- line-height: 1.2;
31137
- }
31138
-
31139
- .itinerary-shell__content {
31140
- display: grid;
31141
- gap: 24px;
31142
- }
31143
-
31144
- .itinerary-node {
31145
- border: 1px solid #e5e7eb;
31146
- border-radius: 16px;
31147
- overflow: hidden;
31148
- background: #fff;
31149
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
31150
- }
31151
-
31152
- .itinerary-node__header {
31153
- display: flex;
31154
- gap: 16px;
31155
- align-items: center;
31156
- border-bottom: 1px solid #eef0f2;
31157
- background: #fafafa;
31158
- }
31159
-
31160
- .itinerary-node__day {
31161
- flex: 50px 0 0;
31162
- display: flex;
31163
- flex-flow: column;
31164
- align-items: center;
31165
- justify-content: center;
31166
- background: #1f9470;
31167
- color: white;
31168
- border: 1.5px solid var(--tide-booking-color-secondary);
31169
- }
31170
-
31171
- .itinerary-node__day-month {
31172
- margin: 0px;
31173
- }
31174
-
31175
- .itinerary-node__day-day {
31176
- margin: 0px;
31177
- font-weight: var(--tide-booking-search-results-label-date-month-font-weight);
31178
- color: var(--tide-booking-search-results-label-date-month-color);
31179
- font-size: 24px;
31180
- }
31181
-
31182
- .itinerary-node__title {
31183
- margin: 0;
31184
- font-size: 22px;
31185
- line-height: 1.25;
31186
- }
31187
-
31188
- .itinerary-node__content {
31189
- display: grid;
31190
- gap: 20px;
31191
- padding: 20px;
31192
- }
31193
-
31194
- .itinerary-node__accommodation-banner {
31195
- padding: 12px 16px;
31196
- border: 1px solid #dbeafe;
31197
- border-radius: 12px;
31198
- background: #eff6ff;
31199
- color: #1e3a8a;
31200
- font-size: 14px;
31201
- line-height: 1.4;
31202
- }
31203
-
31204
- .itinerary-item {
31205
- display: block;
31206
- border-radius: 12px;
31207
- overflow: hidden;
31208
- background: #fff;
31209
- }
31210
-
31211
- .itinerary-node__empty,
31212
- .itinerary-empty {
31213
- padding: 20px;
31214
- border: 1px dashed #d1d5db;
31215
- border-radius: 12px;
31216
- color: #6b7280;
31217
- background: #fafafa;
31218
- }
31219
-
31220
- .itinerary-default-items {
31221
- border: 1px solid #e5e7eb;
31222
- border-radius: 16px;
31223
- padding: 20px;
31224
- background: #fff;
31225
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
31226
- }
31227
-
31228
- .itinerary-default-items__title {
31229
- margin: 0 0 16px;
31230
- font-size: 22px;
31231
- }
31232
-
31233
- @media (max-width: 768px) {
31234
- .itinerary-shell {
31235
- padding: 16px;
31236
- }
31237
- }
31238
-
31239
- ${itinerary?.styleSheetBody ?? ''}
31240
- </style>
31241
-
31242
- ${html}
31118
+ shadowRoot.innerHTML = `
31119
+ <style>
31120
+ :host {
31121
+ all: initial;
31122
+ display: block;
31123
+ width: 100%;
31124
+ }
31125
+
31126
+ *,
31127
+ *::before,
31128
+ *::after {
31129
+ box-sizing: border-box;
31130
+ }
31131
+
31132
+ .itinerary-shell {
31133
+ width: 100%;
31134
+ margin: 0 auto;
31135
+ font-family: 'Outfit', sans-serif;
31136
+ color: #222;
31137
+ }
31138
+
31139
+ .itinerary-shell__header {
31140
+ margin-bottom: 24px;
31141
+ }
31142
+
31143
+ .itinerary-shell__title {
31144
+ margin: 0;
31145
+ font-size: 32px;
31146
+ line-height: 1.2;
31147
+ }
31148
+
31149
+ .itinerary-shell__content {
31150
+ display: grid;
31151
+ gap: 24px;
31152
+ }
31153
+
31154
+ .itinerary-node {
31155
+ border: 1px solid #e5e7eb;
31156
+ border-radius: 16px;
31157
+ overflow: hidden;
31158
+ background: #fff;
31159
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
31160
+ }
31161
+
31162
+ .itinerary-node__header {
31163
+ display: flex;
31164
+ gap: 16px;
31165
+ align-items: center;
31166
+ border-bottom: 1px solid #eef0f2;
31167
+ background: #fafafa;
31168
+ }
31169
+
31170
+ .itinerary-node__day {
31171
+ flex: 50px 0 0;
31172
+ display: flex;
31173
+ flex-flow: column;
31174
+ align-items: center;
31175
+ justify-content: center;
31176
+ background: #1f9470;
31177
+ color: white;
31178
+ border: 1.5px solid var(--tide-booking-color-secondary);
31179
+ }
31180
+
31181
+ .itinerary-node__day-month {
31182
+ margin: 0px;
31183
+ }
31184
+
31185
+ .itinerary-node__day-day {
31186
+ margin: 0px;
31187
+ font-weight: var(--tide-booking-search-results-label-date-month-font-weight);
31188
+ color: var(--tide-booking-search-results-label-date-month-color);
31189
+ font-size: 24px;
31190
+ }
31191
+
31192
+ .itinerary-node__title {
31193
+ margin: 0;
31194
+ font-size: 22px;
31195
+ line-height: 1.25;
31196
+ }
31197
+
31198
+ .itinerary-node__content {
31199
+ display: grid;
31200
+ gap: 20px;
31201
+ padding: 20px;
31202
+ }
31203
+
31204
+ .itinerary-node__accommodation-banner {
31205
+ padding: 12px 16px;
31206
+ border: 1px solid #dbeafe;
31207
+ border-radius: 12px;
31208
+ background: #eff6ff;
31209
+ color: #1e3a8a;
31210
+ font-size: 14px;
31211
+ line-height: 1.4;
31212
+ }
31213
+
31214
+ .itinerary-item {
31215
+ display: block;
31216
+ border-radius: 12px;
31217
+ overflow: hidden;
31218
+ background: #fff;
31219
+ }
31220
+
31221
+ .itinerary-node__empty,
31222
+ .itinerary-empty {
31223
+ padding: 20px;
31224
+ border: 1px dashed #d1d5db;
31225
+ border-radius: 12px;
31226
+ color: #6b7280;
31227
+ background: #fafafa;
31228
+ }
31229
+
31230
+ .itinerary-default-items {
31231
+ border: 1px solid #e5e7eb;
31232
+ border-radius: 16px;
31233
+ padding: 20px;
31234
+ background: #fff;
31235
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
31236
+ }
31237
+
31238
+ .itinerary-default-items__title {
31239
+ margin: 0 0 16px;
31240
+ font-size: 22px;
31241
+ }
31242
+
31243
+ @media (max-width: 768px) {
31244
+ .itinerary-shell {
31245
+ padding: 16px;
31246
+ }
31247
+ }
31248
+
31249
+ ${itinerary?.styleSheetBody ?? ''}
31250
+ </style>
31251
+
31252
+ ${html}
31243
31253
  `;
31244
31254
  }, [html, itinerary?.styleSheetBody, isLoading]);
31245
31255
  return (React__default.createElement(React__default.Fragment, null,
@@ -31343,7 +31353,7 @@ const DayByDayExcursions = () => {
31343
31353
  })));
31344
31354
  };
31345
31355
 
31346
- const renderEditablePackagingEntrySummaryOptions = (editablePackagingEntry, priceDetails, translations) => {
31356
+ const renderEditablePackagingEntrySummaryOptions = (editablePackagingEntry, priceDetails, translations, currencyCode) => {
31347
31357
  const priceDetailsByProduct = groupBy(priceDetails?.details ?? [], (detail) => `${detail.productCode}|${detail.accommodationCode}`);
31348
31358
  return (editablePackagingEntry?.lines ?? []).map((line) => {
31349
31359
  const groupedPriceDetails = priceDetailsByProduct[`${line.productCode}|${line.accommodationCode}`] ?? [];
@@ -31367,7 +31377,7 @@ const renderEditablePackagingEntrySummaryOptions = (editablePackagingEntry, pric
31367
31377
  visiblePriceDetails.map((detail, index) => (React__default.createElement("li", { className: "list__item", key: `${line.guid}-price-${index}` },
31368
31378
  detail.priceDescription,
31369
31379
  ": ",
31370
- detail.total?.toLocaleString(undefined, { style: 'currency', currency: 'EUR' }))))),
31380
+ detail.total !== undefined && detail.total !== null ? formatPrice$3(detail.total, currencyCode ?? 'EUR') : '')))),
31371
31381
  React__default.createElement("p", null,
31372
31382
  "(",
31373
31383
  line.from === line.to ? (getDateText(line.from)) : (React__default.createElement(React__default.Fragment, null,
@@ -31487,7 +31497,7 @@ const WLSidebar = ({ activeSearchSeed, packagingAccoResult }) => {
31487
31497
  const separateExtraPriceDetails = priceDetails?.details.filter((pd) => !pd.isInPackage && pd.isSeparate) ?? [];
31488
31498
  const totalPrice = sum([basePrice, ...separateExtraPriceDetails.map((priceDetail) => priceDetail.price * priceDetail.amount)]);
31489
31499
  const includedCosts = selectSeparatePackagePriceDetails(priceDetails?.details.filter((pd) => pd.isInPackage) ?? []);
31490
- return (React__default.createElement(SharedSidebar, { productName: location ?? '', thumbnailUrl: accoImage ?? context.destinationImage?.url, translations: translations, travelerRooms: travelerRooms, startDateText: first(sortedLines)?.from && formatDate(new Date(first(sortedLines).from)), endDateText: last(sortedLines)?.to && formatDate(new Date(last(sortedLines).to)), isLoading: !editablePackagingEntry || !priceDetails, loaderComponent: React__default.createElement(Spinner, null), departureFlightMetaData: outboundFlightMetaData, returnFlightMetaData: returnFlightMetaData, includedServiceTypes: editablePackagingEntry.lines.map((line) => line.serviceType), packagingAccommodations: accommodationLines, basePrice: basePrice, commission: priceDetails?.commission, totalPrice: totalPrice, includedCosts: includedCosts, extraCosts: separateExtraPriceDetails, deposit: priceDetails?.deposit, isUnavailable: false, agent: context.agentId }));
31500
+ return (React__default.createElement(SharedSidebar, { productName: location ?? '', thumbnailUrl: accoImage ?? context.destinationImage?.url, translations: translations, travelerRooms: travelerRooms, startDateText: first(sortedLines)?.from && formatDate(new Date(first(sortedLines).from)), endDateText: last(sortedLines)?.to && formatDate(new Date(last(sortedLines).to)), isLoading: !editablePackagingEntry || !priceDetails, loaderComponent: React__default.createElement(Spinner, null), departureFlightMetaData: outboundFlightMetaData, returnFlightMetaData: returnFlightMetaData, includedServiceTypes: editablePackagingEntry.lines.map((line) => line.serviceType), packagingAccommodations: accommodationLines, basePrice: basePrice, commission: priceDetails?.commission, totalPrice: totalPrice, includedCosts: includedCosts, extraCosts: separateExtraPriceDetails, deposit: priceDetails?.deposit, isUnavailable: false, agent: context.agentId, currencyCode: packagingAccoResult?.currencyCode }));
31491
31501
  };
31492
31502
 
31493
31503
  const formatBirthDate = (birthDate) => {
@@ -31781,7 +31791,7 @@ const BookPackagingEntry = ({ activeSearchSeed, isLoading, isConfirmationPage })
31781
31791
  stepLabels[step])) },
31782
31792
  isConfirmationPage && isLoading && React__default.createElement(Spinner, { label: translations.SUMMARY.PROCESS_BOOKING }),
31783
31793
  currentStep === 0 && (React__default.createElement(SharedTravelersForm, { formik: formik, translations: translations, travellersSettings: travellersSettings, countries: countries, travelersFirstStep: false, isUnavailable: false, useCompactForm: false, showAgentSelection: false })),
31784
- currentStep === 1 && (React__default.createElement(SharedSummary, { translations: translations, travelerFormValues: formik.values, isSubmitting: isSubmitting, skipPayment: !context.generatePaymentUrl, userValidated: userValidated, remarks: remarks, enableVoucher: false, allowOption: false, isOffer: false, onUserValidatedChange: setUserValidated, onRemarksChange: setRemarks, onSubmit: handleSummarySubmit, renderOptions: () => renderEditablePackagingEntrySummaryOptions(editablePackagingEntry, priceDetails), renderPreviousButton: () => (React__default.createElement("button", { type: "button", title: translations.STEPS.PREVIOUS, onClick: () => dispatch(setCurrentStep(0)), className: "cta cta--secondary" }, translations.STEPS.PREVIOUS)) })),
31794
+ currentStep === 1 && (React__default.createElement(SharedSummary, { translations: translations, travelerFormValues: formik.values, isSubmitting: isSubmitting, skipPayment: !context.generatePaymentUrl, userValidated: userValidated, remarks: remarks, enableVoucher: false, allowOption: false, isOffer: false, onUserValidatedChange: setUserValidated, onRemarksChange: setRemarks, onSubmit: handleSummarySubmit, renderOptions: () => renderEditablePackagingEntrySummaryOptions(editablePackagingEntry, priceDetails, translations, selectedPackagingAccoResult?.currencyCode), renderPreviousButton: () => (React__default.createElement("button", { type: "button", title: translations.STEPS.PREVIOUS, onClick: () => dispatch(setCurrentStep(0)), className: "cta cta--secondary" }, translations.STEPS.PREVIOUS)) })),
31785
31795
  currentStep === 2 && (React__default.createElement(SharedConfirmation, { bookingNumber: bookingNumber ?? editablePackagingEntry?.dossierNumber ?? '', isOption: false, isOffer: false, translations: translations.CONFIRMATION })),
31786
31796
  currentStep === 3 && React__default.createElement("div", null))),
31787
31797
  React__default.createElement("div", { className: "backdrop", id: "backdrop" }),
@@ -35934,20 +35944,20 @@ function ItineraryMapView({ destinations: propDestinations, adults = 2, dateFrom
35934
35944
  const isStartEnd = dest.isStart || dest.isEnd;
35935
35945
  let iconHtml;
35936
35946
  if (isStartEnd) {
35937
- iconHtml = `
35938
- <div class="map-view__marker map-view__marker--plane">
35939
- <svg viewBox="0 0 576 512" fill="currentColor" width="16" height="16" xmlns="http://www.w3.org/2000/svg">
35940
- <path d="M482.3 192c34.2 0 93.7 29 93.7 64c0 36-59.5 64-93.7 64l-116.6 0L265.2 495.9c-5.7 10.1-16.3 16.1-27.8 16.1l-56.2 0c-10.6 0-18.3-10.3-15.8-20.6l49-196.3L112 288 68.8 377.6c-3 6.1-9.2 10.4-16 10.4l-2.8 0c-9.2 0-16-8.8-13.3-17.6L80 256L36.7 141.6C34 132.8 40.8 124 50 124l2.8 0c6.8 0 13 4.3 16 10.4L112 224l102.9 0-49-196.3C163.5 17.3 171.2 7 181.8 7l56.2 0c11.5 0 22.1 6 27.8 16.1L365.7 192l116.6 0z"/>
35941
- </svg>
35947
+ iconHtml = `
35948
+ <div class="map-view__marker map-view__marker--plane">
35949
+ <svg viewBox="0 0 576 512" fill="currentColor" width="16" height="16" xmlns="http://www.w3.org/2000/svg">
35950
+ <path d="M482.3 192c34.2 0 93.7 29 93.7 64c0 36-59.5 64-93.7 64l-116.6 0L265.2 495.9c-5.7 10.1-16.3 16.1-27.8 16.1l-56.2 0c-10.6 0-18.3-10.3-15.8-20.6l49-196.3L112 288 68.8 377.6c-3 6.1-9.2 10.4-16 10.4l-2.8 0c-9.2 0-16-8.8-13.3-17.6L80 256L36.7 141.6C34 132.8 40.8 124 50 124l2.8 0c6.8 0 13 4.3 16 10.4L112 224l102.9 0-49-196.3C163.5 17.3 171.2 7 181.8 7l56.2 0c11.5 0 22.1 6 27.8 16.1L365.7 192l116.6 0z"/>
35951
+ </svg>
35942
35952
  </div>`;
35943
35953
  }
35944
35954
  else {
35945
35955
  stopIndex++;
35946
35956
  const imgStyle = dest.imageUrl ? `style="background-image:url('${dest.imageUrl}')"` : '';
35947
- iconHtml = `
35948
- <div class="map-view__marker map-view__marker--stop" ${imgStyle}>
35949
- ${!dest.imageUrl ? `<span class="map-view__marker-number">${stopIndex}</span>` : ''}
35950
- <span class="map-view__marker-badge">${stopIndex}</span>
35957
+ iconHtml = `
35958
+ <div class="map-view__marker map-view__marker--stop" ${imgStyle}>
35959
+ ${!dest.imageUrl ? `<span class="map-view__marker-number">${stopIndex}</span>` : ''}
35960
+ <span class="map-view__marker-badge">${stopIndex}</span>
35951
35961
  </div>`;
35952
35962
  }
35953
35963
  const icon = L.divIcon({
@@ -256,6 +256,7 @@ export declare const selectCalculateDeposit: (state: RootState) => boolean;
256
256
  export declare const selectShowCommission: (state: RootState) => boolean | undefined;
257
257
  export declare const selectIsRetry: (state: RootState) => boolean;
258
258
  export declare const selectStartDate: (state: RootState) => string | undefined;
259
+ export declare const selectEndDate: (state: RootState) => string | undefined;
259
260
  export declare const selectAgents: (state: RootState) => import("@qite/tide-client").BookingTravelAgent[] | undefined;
260
261
  export declare const selectCountries: (state: RootState) => import("@qite/tide-client").CountryItem[] | undefined;
261
262
  export declare const selectProductCode: (state: RootState) => string | undefined;
@@ -163,6 +163,7 @@ export interface FlightInfo {
163
163
  export interface TravelersFormValues {
164
164
  rooms: TravelersFormRoomValues[];
165
165
  startDate?: string;
166
+ endDate?: string;
166
167
  mainBookerId: number;
167
168
  street: string;
168
169
  houseNumber: string;