@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.
@@ -17788,6 +17788,7 @@ const selectCalculateDeposit = (state) => state.booking.calculateDeposit;
17788
17788
  const selectShowCommission = (state) => state.booking.showCommission;
17789
17789
  const selectIsRetry = (state) => state.booking.isRetry;
17790
17790
  const selectStartDate = (state) => state.booking.package?.options.find((x) => x.isSelected)?.fromDate;
17791
+ const selectEndDate = (state) => state.booking.package?.options.find((x) => x.isSelected)?.toDate;
17791
17792
  const selectAgents = (state) => state.booking.agents;
17792
17793
  const selectCountries = (state) => state.booking.countries;
17793
17794
  const selectProductCode = (state) => state.booking.productAttributes?.productCode;
@@ -21353,7 +21354,7 @@ const SidebarFlight = ({ title, flightMetaData, translations }) => {
21353
21354
  React__default["default"].createElement("div", { className: "pricing-summary__value" }, translations.SIDEBAR.LUGGAGE_INCLUDED)))));
21354
21355
  };
21355
21356
 
21356
- 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 }) => {
21357
+ 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' }) => {
21357
21358
  if (!translations)
21358
21359
  return null;
21359
21360
  const [active, setActive] = React.useState(false);
@@ -21364,8 +21365,6 @@ const SharedSidebar = ({ productName, thumbnailUrl, isLoading, translations, hea
21364
21365
  const canShowPriceBreakdownSection = Boolean(basePrice && basePrice > 0) || !lodash.isEmpty(includedCosts) || !lodash.isEmpty(extraCosts);
21365
21366
  const canShowTotalPriceSection = Boolean(totalPrice && totalPrice > 0);
21366
21367
  const remainingAmount = Number(((totalPrice ?? 0) - (deposit ?? 0)).toFixed(2));
21367
- // TODO: Determine currency code based on the data, for now default to EUR
21368
- let currencyCode = 'EUR';
21369
21368
  return (React__default["default"].createElement("div", { className: buildClassName(['booking__sidebar', active && 'booking__sidebar--active']) },
21370
21369
  headerComponent,
21371
21370
  React__default["default"].createElement("div", { className: "booking__sidebar-frame" },
@@ -21495,7 +21494,7 @@ const SharedSidebar = ({ productName, thumbnailUrl, isLoading, translations, hea
21495
21494
  translations.SIDEBAR.DEPOSIT_TEXT4,
21496
21495
  React__default["default"].createElement("strong", null, translations.SIDEBAR.DEPOSIT_TEXT5),
21497
21496
  translations.SIDEBAR.DEPOSIT_TEXT6))))) : (React__default["default"].createElement("div", { className: "pricing-summary__group" },
21498
- agent && (React__default["default"].createElement("div", { className: "pricing-summary__row pricing-summary__row--total-price" },
21497
+ (agent && showCommission) && (React__default["default"].createElement("div", { className: "pricing-summary__row pricing-summary__row--total-price" },
21499
21498
  React__default["default"].createElement("div", { className: "pricing-summary__property" },
21500
21499
  React__default["default"].createElement("h6", { className: "pricing-summary__title" }, translations.SIDEBAR.COMMISSION)),
21501
21500
  React__default["default"].createElement("div", { className: "pricing-summary__value" },
@@ -21511,7 +21510,7 @@ const SharedSidebar = ({ productName, thumbnailUrl, isLoading, translations, hea
21511
21510
  };
21512
21511
 
21513
21512
  const SidebarContainer = ({ productName, thumbnailUrl }) => {
21514
- const { sidebarHeaderComponent, sidebarFooterComponent, loaderComponent, showPricesPerPaxType, maxChildAge } = React.useContext(SettingsContext);
21513
+ const { sidebarHeaderComponent, sidebarFooterComponent, loaderComponent, showPricesPerPaxType, maxChildAge, showCommission } = React.useContext(SettingsContext);
21515
21514
  const bookingAttributes = reactRedux.useSelector(selectBookingAttributes);
21516
21515
  const selectFormRooms = React.useMemo(() => makeSelectFormRooms(maxChildAge), [maxChildAge]);
21517
21516
  const rooms = reactRedux.useSelector(selectFormRooms);
@@ -21528,7 +21527,7 @@ const SidebarContainer = ({ productName, thumbnailUrl }) => {
21528
21527
  const isUnavailable = reactRedux.useSelector(selectIsUnavailable) || false;
21529
21528
  const isLoading = isFetchingProductOptions || isFetchingPriceDetails;
21530
21529
  const agent = reactRedux.useSelector(selectAgentAdressId);
21531
- return (React__default["default"].createElement(SharedSidebar, { productName: productName, thumbnailUrl: thumbnailUrl, isLoading: isLoading, startDateText: getDateText(bookingAttributes?.startDate), endDateText: bookingAttributes?.startDate !== bookingAttributes?.endDate ? getDateText(bookingAttributes?.endDate) : undefined, travelerRooms: travelerRooms, departureFlightMetaData: departureFlightMetaData, returnFlightMetaData: returnFlightMetaData, basePrice: reactRedux.useSelector(selectBasePrice), commission: reactRedux.useSelector(selectCommission), totalPrice: reactRedux.useSelector(selectTotalPrice), includedCosts: reactRedux.useSelector(selectSeparatePackagePriceDetails$1), extraCosts: reactRedux.useSelector(selectSeparateExtraPriceDetails), accommodations: accommodations, includedServiceTypes: includedServiceTypes, deposit: reactRedux.useSelector(selectDeposit), isOnRequest: reactRedux.useSelector(selectIsOnRequest), headerComponent: sidebarHeaderComponent ?? undefined, footerComponent: sidebarFooterComponent ?? undefined, loaderComponent: loaderComponent ?? undefined, isUnavailable: isUnavailable, basePricePerPaxType: showPricesPerPaxType ? reactRedux.useSelector(selectBasePricePerPaxType) : undefined, seperateExtraPricePerPaxType: showPricesPerPaxType ? reactRedux.useSelector(selectSeparateExtraPriceDetailsPerPaxType) : undefined, translations: translations, agent: agent }));
21530
+ return (React__default["default"].createElement(SharedSidebar, { productName: productName, thumbnailUrl: thumbnailUrl, isLoading: isLoading, startDateText: getDateText(bookingAttributes?.startDate), endDateText: bookingAttributes?.startDate !== bookingAttributes?.endDate ? getDateText(bookingAttributes?.endDate) : undefined, travelerRooms: travelerRooms, departureFlightMetaData: departureFlightMetaData, returnFlightMetaData: returnFlightMetaData, basePrice: reactRedux.useSelector(selectBasePrice), commission: reactRedux.useSelector(selectCommission), showCommission: showCommission, totalPrice: reactRedux.useSelector(selectTotalPrice), includedCosts: reactRedux.useSelector(selectSeparatePackagePriceDetails$1), extraCosts: reactRedux.useSelector(selectSeparateExtraPriceDetails), accommodations: accommodations, includedServiceTypes: includedServiceTypes, deposit: reactRedux.useSelector(selectDeposit), isOnRequest: reactRedux.useSelector(selectIsOnRequest), headerComponent: sidebarHeaderComponent ?? undefined, footerComponent: sidebarFooterComponent ?? undefined, loaderComponent: loaderComponent ?? undefined, isUnavailable: isUnavailable, basePricePerPaxType: showPricesPerPaxType ? reactRedux.useSelector(selectBasePricePerPaxType) : undefined, seperateExtraPricePerPaxType: showPricesPerPaxType ? reactRedux.useSelector(selectSeparateExtraPriceDetailsPerPaxType) : undefined, translations: translations, agent: agent, currencyCode: reactRedux.useSelector(selectCurrencyCode) }));
21532
21531
  };
21533
21532
 
21534
21533
  const SummaryPerPaxOptionGroup = ({ group }) => {
@@ -21710,7 +21709,7 @@ const Summary = () => {
21710
21709
  }
21711
21710
  else {
21712
21711
  const location = window.location;
21713
- bookRequest.payload.redirectUrl = `${location.protocol}//${location.host}${settings.basePath}?${bookingQueryString}`;
21712
+ bookRequest.payload.redirectUrl = `${location.protocol}//${location.host}${settings.basePath ?? location.pathname}?${bookingQueryString}`;
21714
21713
  }
21715
21714
  }
21716
21715
  }
@@ -22026,8 +22025,9 @@ const validateForm$1 = (values, agentRequired, bookingType, translations, formFi
22026
22025
  if (lodash.isEmpty(adult.birthDate)) {
22027
22026
  lodash.set(errors, `rooms[${rIndex}].adults[${index}].birthDate`, formatTravelerField(rIndex + 1, index + 1, translations.TRAVELERS_FORM.BIRTHDATE));
22028
22027
  }
22029
- else if (values.startDate) {
22030
- const age = getAge(adult.birthDate, values.startDate);
22028
+ else if (values.endDate) {
22029
+ // 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
22030
+ const age = getAge(adult.birthDate, values.endDate);
22031
22031
  if (age <= maxChildAge) {
22032
22032
  lodash.set(errors, `rooms[${rIndex}].adults[${index}].birthDate`, formatTravelerIsNoAdult(rIndex + 1, index + 1));
22033
22033
  }
@@ -22048,8 +22048,9 @@ const validateForm$1 = (values, agentRequired, bookingType, translations, formFi
22048
22048
  if (lodash.isEmpty(child.birthDate)) {
22049
22049
  lodash.set(errors, `rooms[${rIndex}].children[${index}].birthDate`, formatTravelerField(rIndex + 1, r.adults.length + index + 1, translations.TRAVELERS_FORM.BIRTHDATE));
22050
22050
  }
22051
- else if (values.startDate) {
22052
- const age = getAge(child.birthDate, values.startDate);
22051
+ else if (values.endDate) {
22052
+ // You need to be under the maxChildAge until the end of the trip, so we check the endDate here instead of the startDate
22053
+ const age = getAge(child.birthDate, values.endDate);
22053
22054
  if (age > maxChildAge) {
22054
22055
  lodash.set(errors, `rooms[${rIndex}].children[${index}].birthDate`, formatTravelerIsNoChild(rIndex + 1, r.adults.length + index + 1));
22055
22056
  }
@@ -22273,10 +22274,11 @@ function createTraveler(traveler, followNumber, personTranslation, isCompact) {
22273
22274
  gender: ''
22274
22275
  };
22275
22276
  }
22276
- function createInitialValuesFromRooms(formRooms, startDate, agentAdressId, personTranslation, isCompact) {
22277
+ function createInitialValuesFromRooms(formRooms, startDate, endDate, agentAdressId, personTranslation, isCompact) {
22277
22278
  const followNumber = { number: 1 };
22278
22279
  const initialValues = {
22279
22280
  startDate,
22281
+ endDate,
22280
22282
  rooms: formRooms.map((room) => ({
22281
22283
  adults: room.adults.map((traveler) => createTraveler(traveler, followNumber, personTranslation, isCompact)),
22282
22284
  children: room.children.map((traveler) => createTraveler(traveler, followNumber, personTranslation, isCompact))
@@ -22326,7 +22328,7 @@ function createInitialValuesFromEditablePackagingEntry(editablePackagingEntry, a
22326
22328
  })
22327
22329
  };
22328
22330
  });
22329
- const values = createInitialValuesFromRooms(rooms.map((room) => ({ adults: room.adults, children: room.children })), editablePackagingEntry?.lines?.[0]?.from, agentAdressId);
22331
+ const values = createInitialValuesFromRooms(rooms.map((room) => ({ adults: room.adults, children: room.children })), lodash.first(editablePackagingEntry?.lines)?.from, lodash.last(editablePackagingEntry?.lines)?.to, agentAdressId);
22330
22332
  values.rooms = rooms;
22331
22333
  values.mainBookerId = pax.find((x) => x.isMainBooker)?.id ?? rooms[0]?.adults?.[0]?.id ?? -1;
22332
22334
  const address = editablePackagingEntry?.address;
@@ -22604,6 +22606,7 @@ const TravelersForm = () => {
22604
22606
  const navigate = settings.skipRouter ? () => { } : reactRouter.useNavigate();
22605
22607
  const bookingQueryString = reactRedux.useSelector(selectBookingQueryString);
22606
22608
  const startDate = reactRedux.useSelector(selectStartDate);
22609
+ const endDate = reactRedux.useSelector(selectEndDate);
22607
22610
  const selectFormRooms = React.useMemo(() => makeSelectFormRooms(settings.maxChildAge), [settings.maxChildAge]);
22608
22611
  const formRooms = reactRedux.useSelector(selectFormRooms);
22609
22612
  const bookingType = reactRedux.useSelector(selectBookingType);
@@ -22620,7 +22623,7 @@ const TravelersForm = () => {
22620
22623
  const useCompactForm = !!settings.travellers.compactForm && !!settings.agentAdressId;
22621
22624
  const showAllCountries = !!settings.travellers.showAllCountries;
22622
22625
  const initialValues = reactRedux.useSelector(selectTravelersFormValues) ??
22623
- createInitialValuesFromRooms(formRooms, startDate, agentAdressId, translations.TRAVELERS_FORM.PERSON, useCompactForm);
22626
+ createInitialValuesFromRooms(formRooms, startDate, endDate, agentAdressId, translations.TRAVELERS_FORM.PERSON, useCompactForm);
22624
22627
  const [showAgentSelection, setShowAgentSelection] = React.useState(!settings.agentAdressId && !settings.hideAgentSelection);
22625
22628
  const formik$1 = formik.useFormik({
22626
22629
  initialValues,
@@ -22637,7 +22640,12 @@ const TravelersForm = () => {
22637
22640
  navigate(`${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.summary.pathSuffix}?${bookingQueryString}`);
22638
22641
  return;
22639
22642
  }
22640
- dispatch(fetchPackage());
22643
+ if (travelersFirstStep) {
22644
+ dispatch(fetchPackage());
22645
+ }
22646
+ else {
22647
+ dispatch(fetchPriceDetails());
22648
+ }
22641
22649
  if (settings.skipRouter)
22642
22650
  dispatch(setCurrentStep$1(travelersFirstStep ? FLIGHT_OPTIONS_FORM_STEP : SUMMARY_STEP));
22643
22651
  else
@@ -22648,6 +22656,8 @@ const TravelersForm = () => {
22648
22656
  dispatch(fetchPriceDetails());
22649
22657
  }, [dispatch]);
22650
22658
  React.useEffect(() => {
22659
+ if (!travelersFirstStep)
22660
+ return;
22651
22661
  if (!bookingAttributes?.rooms?.length)
22652
22662
  return;
22653
22663
  if (!hasMounted) {
@@ -22672,7 +22682,7 @@ const TravelersForm = () => {
22672
22682
  }
22673
22683
  };
22674
22684
  fetchAll();
22675
- }, [bookingAttributes?.rooms, dispatch, hasMounted]);
22685
+ }, [bookingAttributes?.rooms, dispatch, hasMounted, travelersFirstStep]);
22676
22686
  const roomsQuery = React.useMemo(() => formik$1.values.rooms
22677
22687
  .map((room) => {
22678
22688
  const adults = room.adults ? room.adults.length : 0;
@@ -31038,10 +31048,10 @@ const findAccommodationForDay = (nodes, currentDay) => {
31038
31048
  };
31039
31049
  const buildItineraryHtml = (itinerary, translations) => {
31040
31050
  if (!itinerary) {
31041
- return `
31042
- <div class="itinerary-shell">
31043
- <div class="itinerary-empty">Geen reisroute beschikbaar.</div>
31044
- </div>
31051
+ return `
31052
+ <div class="itinerary-shell">
31053
+ <div class="itinerary-empty">Geen reisroute beschikbaar.</div>
31054
+ </div>
31045
31055
  `;
31046
31056
  }
31047
31057
  const allNodes = itinerary.nodes ?? [];
@@ -31055,66 +31065,66 @@ const buildItineraryHtml = (itinerary, translations) => {
31055
31065
  const hasAccommodationInCurrentNode = uniqueItems.some(isAccommodationItem);
31056
31066
  const activeAccommodation = findAccommodationForDay(allNodes, startDay);
31057
31067
  const accommodationBanner = !hasAccommodationInCurrentNode && activeAccommodation
31058
- ? `
31059
- <div class="itinerary-node__accommodation-banner">
31060
- Accommodatie voor deze dag: <strong>${escapeHtml(getAccommodationName(activeAccommodation))}</strong>
31061
- </div>
31068
+ ? `
31069
+ <div class="itinerary-node__accommodation-banner">
31070
+ Accommodatie voor deze dag: <strong>${escapeHtml(getAccommodationName(activeAccommodation))}</strong>
31071
+ </div>
31062
31072
  `
31063
31073
  : '';
31064
31074
  const itemsHtml = hasItems
31065
31075
  ? uniqueItems
31066
- .map((item) => `
31067
- <article class="itinerary-item" data-template="${escapeHtml(item.templateName)}">
31068
- ${item.contents ?? ''}
31069
- </article>
31076
+ .map((item) => `
31077
+ <article class="itinerary-item" data-template="${escapeHtml(item.templateName)}">
31078
+ ${item.contents ?? ''}
31079
+ </article>
31070
31080
  `)
31071
31081
  .join('')
31072
31082
  : `<div class="itinerary-node__empty">${translations.ITINERARY.NO_ITEMS}</div>`;
31073
- return `
31074
- <section class="itinerary-node">
31075
- <header class="itinerary-node__header">
31076
-
31077
- <div class="itinerary-node__day">
31078
- <p class="itinerary-node__day-day">${day}</p>
31079
- <p class="itinerary-node__day-month">${month}</p>
31080
- </div>
31081
-
31082
- <div>
31083
- <h2 class="itinerary-node__title">${escapeHtml(node.title)}</h2>
31084
- </div>
31085
- </header>
31086
-
31087
- <div class="itinerary-node__content">
31088
- ${accommodationBanner}
31089
- ${itemsHtml}
31090
- </div>
31091
- </section>
31083
+ return `
31084
+ <section class="itinerary-node">
31085
+ <header class="itinerary-node__header">
31086
+
31087
+ <div class="itinerary-node__day">
31088
+ <p class="itinerary-node__day-day">${day}</p>
31089
+ <p class="itinerary-node__day-month">${month}</p>
31090
+ </div>
31091
+
31092
+ <div>
31093
+ <h2 class="itinerary-node__title">${escapeHtml(node.title)}</h2>
31094
+ </div>
31095
+ </header>
31096
+
31097
+ <div class="itinerary-node__content">
31098
+ ${accommodationBanner}
31099
+ ${itemsHtml}
31100
+ </div>
31101
+ </section>
31092
31102
  `;
31093
31103
  })
31094
31104
  .join('');
31095
31105
  const defaultItemsHtml = itinerary.defaultItems && itinerary.defaultItems.length > 0
31096
- ? `
31097
- <section class="itinerary-default-items">
31098
- <h2 class="itinerary-default-items__title">Algemene info</h2>
31106
+ ? `
31107
+ <section class="itinerary-default-items">
31108
+ <h2 class="itinerary-default-items__title">Algemene info</h2>
31099
31109
  ${getUniqueItems(itinerary.defaultItems)
31100
- .map((item) => `
31101
- <article class="itinerary-item" data-template="${escapeHtml(item.templateName)}">
31102
- ${item.contents ?? ''}
31103
- </article>
31110
+ .map((item) => `
31111
+ <article class="itinerary-item" data-template="${escapeHtml(item.templateName)}">
31112
+ ${item.contents ?? ''}
31113
+ </article>
31104
31114
  `)
31105
- .join('')}
31106
- </section>
31115
+ .join('')}
31116
+ </section>
31107
31117
  `
31108
31118
  : '';
31109
- return `
31110
- <div class="itinerary-shell">
31111
- ${itinerary.title ? `<header class="itinerary-shell__header"><h1 class="itinerary-shell__title">${escapeHtml(itinerary.title)}</h1></header>` : ''}
31112
-
31113
- <div class="itinerary-shell__content">
31114
- ${nodesHtml}
31115
- ${defaultItemsHtml}
31116
- </div>
31117
- </div>
31119
+ return `
31120
+ <div class="itinerary-shell">
31121
+ ${itinerary.title ? `<header class="itinerary-shell__header"><h1 class="itinerary-shell__title">${escapeHtml(itinerary.title)}</h1></header>` : ''}
31122
+
31123
+ <div class="itinerary-shell__content">
31124
+ ${nodesHtml}
31125
+ ${defaultItemsHtml}
31126
+ </div>
31127
+ </div>
31118
31128
  `;
31119
31129
  };
31120
31130
  const FullItinerary = ({ isLoading }) => {
@@ -31134,141 +31144,141 @@ const FullItinerary = ({ isLoading }) => {
31134
31144
  }
31135
31145
  const shadowRoot = host.shadowRoot ?? host.attachShadow({ mode: 'open' });
31136
31146
  shadowRootRef.current = shadowRoot;
31137
- shadowRoot.innerHTML = `
31138
- <style>
31139
- :host {
31140
- all: initial;
31141
- display: block;
31142
- width: 100%;
31143
- }
31144
-
31145
- *,
31146
- *::before,
31147
- *::after {
31148
- box-sizing: border-box;
31149
- }
31150
-
31151
- .itinerary-shell {
31152
- width: 100%;
31153
- margin: 0 auto;
31154
- font-family: 'Outfit', sans-serif;
31155
- color: #222;
31156
- }
31157
-
31158
- .itinerary-shell__header {
31159
- margin-bottom: 24px;
31160
- }
31161
-
31162
- .itinerary-shell__title {
31163
- margin: 0;
31164
- font-size: 32px;
31165
- line-height: 1.2;
31166
- }
31167
-
31168
- .itinerary-shell__content {
31169
- display: grid;
31170
- gap: 24px;
31171
- }
31172
-
31173
- .itinerary-node {
31174
- border: 1px solid #e5e7eb;
31175
- border-radius: 16px;
31176
- overflow: hidden;
31177
- background: #fff;
31178
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
31179
- }
31180
-
31181
- .itinerary-node__header {
31182
- display: flex;
31183
- gap: 16px;
31184
- align-items: center;
31185
- border-bottom: 1px solid #eef0f2;
31186
- background: #fafafa;
31187
- }
31188
-
31189
- .itinerary-node__day {
31190
- flex: 50px 0 0;
31191
- display: flex;
31192
- flex-flow: column;
31193
- align-items: center;
31194
- justify-content: center;
31195
- background: #1f9470;
31196
- color: white;
31197
- border: 1.5px solid var(--tide-booking-color-secondary);
31198
- }
31199
-
31200
- .itinerary-node__day-month {
31201
- margin: 0px;
31202
- }
31203
-
31204
- .itinerary-node__day-day {
31205
- margin: 0px;
31206
- font-weight: var(--tide-booking-search-results-label-date-month-font-weight);
31207
- color: var(--tide-booking-search-results-label-date-month-color);
31208
- font-size: 24px;
31209
- }
31210
-
31211
- .itinerary-node__title {
31212
- margin: 0;
31213
- font-size: 22px;
31214
- line-height: 1.25;
31215
- }
31216
-
31217
- .itinerary-node__content {
31218
- display: grid;
31219
- gap: 20px;
31220
- padding: 20px;
31221
- }
31222
-
31223
- .itinerary-node__accommodation-banner {
31224
- padding: 12px 16px;
31225
- border: 1px solid #dbeafe;
31226
- border-radius: 12px;
31227
- background: #eff6ff;
31228
- color: #1e3a8a;
31229
- font-size: 14px;
31230
- line-height: 1.4;
31231
- }
31232
-
31233
- .itinerary-item {
31234
- display: block;
31235
- border-radius: 12px;
31236
- overflow: hidden;
31237
- background: #fff;
31238
- }
31239
-
31240
- .itinerary-node__empty,
31241
- .itinerary-empty {
31242
- padding: 20px;
31243
- border: 1px dashed #d1d5db;
31244
- border-radius: 12px;
31245
- color: #6b7280;
31246
- background: #fafafa;
31247
- }
31248
-
31249
- .itinerary-default-items {
31250
- border: 1px solid #e5e7eb;
31251
- border-radius: 16px;
31252
- padding: 20px;
31253
- background: #fff;
31254
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
31255
- }
31256
-
31257
- .itinerary-default-items__title {
31258
- margin: 0 0 16px;
31259
- font-size: 22px;
31260
- }
31261
-
31262
- @media (max-width: 768px) {
31263
- .itinerary-shell {
31264
- padding: 16px;
31265
- }
31266
- }
31267
-
31268
- ${itinerary?.styleSheetBody ?? ''}
31269
- </style>
31270
-
31271
- ${html}
31147
+ shadowRoot.innerHTML = `
31148
+ <style>
31149
+ :host {
31150
+ all: initial;
31151
+ display: block;
31152
+ width: 100%;
31153
+ }
31154
+
31155
+ *,
31156
+ *::before,
31157
+ *::after {
31158
+ box-sizing: border-box;
31159
+ }
31160
+
31161
+ .itinerary-shell {
31162
+ width: 100%;
31163
+ margin: 0 auto;
31164
+ font-family: 'Outfit', sans-serif;
31165
+ color: #222;
31166
+ }
31167
+
31168
+ .itinerary-shell__header {
31169
+ margin-bottom: 24px;
31170
+ }
31171
+
31172
+ .itinerary-shell__title {
31173
+ margin: 0;
31174
+ font-size: 32px;
31175
+ line-height: 1.2;
31176
+ }
31177
+
31178
+ .itinerary-shell__content {
31179
+ display: grid;
31180
+ gap: 24px;
31181
+ }
31182
+
31183
+ .itinerary-node {
31184
+ border: 1px solid #e5e7eb;
31185
+ border-radius: 16px;
31186
+ overflow: hidden;
31187
+ background: #fff;
31188
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
31189
+ }
31190
+
31191
+ .itinerary-node__header {
31192
+ display: flex;
31193
+ gap: 16px;
31194
+ align-items: center;
31195
+ border-bottom: 1px solid #eef0f2;
31196
+ background: #fafafa;
31197
+ }
31198
+
31199
+ .itinerary-node__day {
31200
+ flex: 50px 0 0;
31201
+ display: flex;
31202
+ flex-flow: column;
31203
+ align-items: center;
31204
+ justify-content: center;
31205
+ background: #1f9470;
31206
+ color: white;
31207
+ border: 1.5px solid var(--tide-booking-color-secondary);
31208
+ }
31209
+
31210
+ .itinerary-node__day-month {
31211
+ margin: 0px;
31212
+ }
31213
+
31214
+ .itinerary-node__day-day {
31215
+ margin: 0px;
31216
+ font-weight: var(--tide-booking-search-results-label-date-month-font-weight);
31217
+ color: var(--tide-booking-search-results-label-date-month-color);
31218
+ font-size: 24px;
31219
+ }
31220
+
31221
+ .itinerary-node__title {
31222
+ margin: 0;
31223
+ font-size: 22px;
31224
+ line-height: 1.25;
31225
+ }
31226
+
31227
+ .itinerary-node__content {
31228
+ display: grid;
31229
+ gap: 20px;
31230
+ padding: 20px;
31231
+ }
31232
+
31233
+ .itinerary-node__accommodation-banner {
31234
+ padding: 12px 16px;
31235
+ border: 1px solid #dbeafe;
31236
+ border-radius: 12px;
31237
+ background: #eff6ff;
31238
+ color: #1e3a8a;
31239
+ font-size: 14px;
31240
+ line-height: 1.4;
31241
+ }
31242
+
31243
+ .itinerary-item {
31244
+ display: block;
31245
+ border-radius: 12px;
31246
+ overflow: hidden;
31247
+ background: #fff;
31248
+ }
31249
+
31250
+ .itinerary-node__empty,
31251
+ .itinerary-empty {
31252
+ padding: 20px;
31253
+ border: 1px dashed #d1d5db;
31254
+ border-radius: 12px;
31255
+ color: #6b7280;
31256
+ background: #fafafa;
31257
+ }
31258
+
31259
+ .itinerary-default-items {
31260
+ border: 1px solid #e5e7eb;
31261
+ border-radius: 16px;
31262
+ padding: 20px;
31263
+ background: #fff;
31264
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
31265
+ }
31266
+
31267
+ .itinerary-default-items__title {
31268
+ margin: 0 0 16px;
31269
+ font-size: 22px;
31270
+ }
31271
+
31272
+ @media (max-width: 768px) {
31273
+ .itinerary-shell {
31274
+ padding: 16px;
31275
+ }
31276
+ }
31277
+
31278
+ ${itinerary?.styleSheetBody ?? ''}
31279
+ </style>
31280
+
31281
+ ${html}
31272
31282
  `;
31273
31283
  }, [html, itinerary?.styleSheetBody, isLoading]);
31274
31284
  return (React__default["default"].createElement(React__default["default"].Fragment, null,
@@ -31372,7 +31382,7 @@ const DayByDayExcursions = () => {
31372
31382
  })));
31373
31383
  };
31374
31384
 
31375
- const renderEditablePackagingEntrySummaryOptions = (editablePackagingEntry, priceDetails, translations) => {
31385
+ const renderEditablePackagingEntrySummaryOptions = (editablePackagingEntry, priceDetails, translations, currencyCode) => {
31376
31386
  const priceDetailsByProduct = lodash.groupBy(priceDetails?.details ?? [], (detail) => `${detail.productCode}|${detail.accommodationCode}`);
31377
31387
  return (editablePackagingEntry?.lines ?? []).map((line) => {
31378
31388
  const groupedPriceDetails = priceDetailsByProduct[`${line.productCode}|${line.accommodationCode}`] ?? [];
@@ -31396,7 +31406,7 @@ const renderEditablePackagingEntrySummaryOptions = (editablePackagingEntry, pric
31396
31406
  visiblePriceDetails.map((detail, index) => (React__default["default"].createElement("li", { className: "list__item", key: `${line.guid}-price-${index}` },
31397
31407
  detail.priceDescription,
31398
31408
  ": ",
31399
- detail.total?.toLocaleString(undefined, { style: 'currency', currency: 'EUR' }))))),
31409
+ detail.total !== undefined && detail.total !== null ? formatPrice$3(detail.total, currencyCode ?? 'EUR') : '')))),
31400
31410
  React__default["default"].createElement("p", null,
31401
31411
  "(",
31402
31412
  line.from === line.to ? (getDateText(line.from)) : (React__default["default"].createElement(React__default["default"].Fragment, null,
@@ -31516,7 +31526,7 @@ const WLSidebar = ({ activeSearchSeed, packagingAccoResult }) => {
31516
31526
  const separateExtraPriceDetails = priceDetails?.details.filter((pd) => !pd.isInPackage && pd.isSeparate) ?? [];
31517
31527
  const totalPrice = lodash.sum([basePrice, ...separateExtraPriceDetails.map((priceDetail) => priceDetail.price * priceDetail.amount)]);
31518
31528
  const includedCosts = selectSeparatePackagePriceDetails(priceDetails?.details.filter((pd) => pd.isInPackage) ?? []);
31519
- return (React__default["default"].createElement(SharedSidebar, { productName: location ?? '', thumbnailUrl: accoImage ?? context.destinationImage?.url, translations: translations, travelerRooms: travelerRooms, startDateText: lodash.first(sortedLines)?.from && formatDate(new Date(lodash.first(sortedLines).from)), endDateText: lodash.last(sortedLines)?.to && formatDate(new Date(lodash.last(sortedLines).to)), isLoading: !editablePackagingEntry || !priceDetails, loaderComponent: React__default["default"].createElement(Spinner, null), departureFlightMetaData: outboundFlightMetaData, returnFlightMetaData: returnFlightMetaData, includedServiceTypes: editablePackagingEntry.lines.map((line) => line.serviceType), packagingAccommodations: accommodationLines, basePrice: basePrice, commission: priceDetails?.commission, totalPrice: totalPrice, includedCosts: includedCosts, extraCosts: separateExtraPriceDetails, deposit: priceDetails?.deposit, isUnavailable: false, agent: context.agentId }));
31529
+ return (React__default["default"].createElement(SharedSidebar, { productName: location ?? '', thumbnailUrl: accoImage ?? context.destinationImage?.url, translations: translations, travelerRooms: travelerRooms, startDateText: lodash.first(sortedLines)?.from && formatDate(new Date(lodash.first(sortedLines).from)), endDateText: lodash.last(sortedLines)?.to && formatDate(new Date(lodash.last(sortedLines).to)), isLoading: !editablePackagingEntry || !priceDetails, loaderComponent: React__default["default"].createElement(Spinner, null), departureFlightMetaData: outboundFlightMetaData, returnFlightMetaData: returnFlightMetaData, includedServiceTypes: editablePackagingEntry.lines.map((line) => line.serviceType), packagingAccommodations: accommodationLines, basePrice: basePrice, commission: priceDetails?.commission, totalPrice: totalPrice, includedCosts: includedCosts, extraCosts: separateExtraPriceDetails, deposit: priceDetails?.deposit, isUnavailable: false, agent: context.agentId, currencyCode: packagingAccoResult?.currencyCode }));
31520
31530
  };
31521
31531
 
31522
31532
  const formatBirthDate = (birthDate) => {
@@ -31810,7 +31820,7 @@ const BookPackagingEntry = ({ activeSearchSeed, isLoading, isConfirmationPage })
31810
31820
  stepLabels[step])) },
31811
31821
  isConfirmationPage && isLoading && React__default["default"].createElement(Spinner, { label: translations.SUMMARY.PROCESS_BOOKING }),
31812
31822
  currentStep === 0 && (React__default["default"].createElement(SharedTravelersForm, { formik: formik$1, translations: translations, travellersSettings: travellersSettings, countries: countries, travelersFirstStep: false, isUnavailable: false, useCompactForm: false, showAgentSelection: false })),
31813
- currentStep === 1 && (React__default["default"].createElement(SharedSummary, { translations: translations, travelerFormValues: formik$1.values, isSubmitting: isSubmitting, skipPayment: !context.generatePaymentUrl, userValidated: userValidated, remarks: remarks, enableVoucher: false, allowOption: false, isOffer: false, onUserValidatedChange: setUserValidated, onRemarksChange: setRemarks, onSubmit: handleSummarySubmit, renderOptions: () => renderEditablePackagingEntrySummaryOptions(editablePackagingEntry, priceDetails), renderPreviousButton: () => (React__default["default"].createElement("button", { type: "button", title: translations.STEPS.PREVIOUS, onClick: () => dispatch(setCurrentStep(0)), className: "cta cta--secondary" }, translations.STEPS.PREVIOUS)) })),
31823
+ currentStep === 1 && (React__default["default"].createElement(SharedSummary, { translations: translations, travelerFormValues: formik$1.values, isSubmitting: isSubmitting, skipPayment: !context.generatePaymentUrl, userValidated: userValidated, remarks: remarks, enableVoucher: false, allowOption: false, isOffer: false, onUserValidatedChange: setUserValidated, onRemarksChange: setRemarks, onSubmit: handleSummarySubmit, renderOptions: () => renderEditablePackagingEntrySummaryOptions(editablePackagingEntry, priceDetails, translations, selectedPackagingAccoResult?.currencyCode), renderPreviousButton: () => (React__default["default"].createElement("button", { type: "button", title: translations.STEPS.PREVIOUS, onClick: () => dispatch(setCurrentStep(0)), className: "cta cta--secondary" }, translations.STEPS.PREVIOUS)) })),
31814
31824
  currentStep === 2 && (React__default["default"].createElement(SharedConfirmation, { bookingNumber: bookingNumber ?? editablePackagingEntry?.dossierNumber ?? '', isOption: false, isOffer: false, translations: translations.CONFIRMATION })),
31815
31825
  currentStep === 3 && React__default["default"].createElement("div", null))),
31816
31826
  React__default["default"].createElement("div", { className: "backdrop", id: "backdrop" }),
@@ -35963,20 +35973,20 @@ function ItineraryMapView({ destinations: propDestinations, adults = 2, dateFrom
35963
35973
  const isStartEnd = dest.isStart || dest.isEnd;
35964
35974
  let iconHtml;
35965
35975
  if (isStartEnd) {
35966
- iconHtml = `
35967
- <div class="map-view__marker map-view__marker--plane">
35968
- <svg viewBox="0 0 576 512" fill="currentColor" width="16" height="16" xmlns="http://www.w3.org/2000/svg">
35969
- <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"/>
35970
- </svg>
35976
+ iconHtml = `
35977
+ <div class="map-view__marker map-view__marker--plane">
35978
+ <svg viewBox="0 0 576 512" fill="currentColor" width="16" height="16" xmlns="http://www.w3.org/2000/svg">
35979
+ <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"/>
35980
+ </svg>
35971
35981
  </div>`;
35972
35982
  }
35973
35983
  else {
35974
35984
  stopIndex++;
35975
35985
  const imgStyle = dest.imageUrl ? `style="background-image:url('${dest.imageUrl}')"` : '';
35976
- iconHtml = `
35977
- <div class="map-view__marker map-view__marker--stop" ${imgStyle}>
35978
- ${!dest.imageUrl ? `<span class="map-view__marker-number">${stopIndex}</span>` : ''}
35979
- <span class="map-view__marker-badge">${stopIndex}</span>
35986
+ iconHtml = `
35987
+ <div class="map-view__marker map-view__marker--stop" ${imgStyle}>
35988
+ ${!dest.imageUrl ? `<span class="map-view__marker-number">${stopIndex}</span>` : ''}
35989
+ <span class="map-view__marker-badge">${stopIndex}</span>
35980
35990
  </div>`;
35981
35991
  }
35982
35992
  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;