@qite/tide-booking-component 1.4.113 → 1.4.114

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.
@@ -41588,11 +41588,20 @@ var HotelAccommodationResults = function (_a) {
41588
41588
  function () {
41589
41589
  var shouldShowAll =
41590
41590
  (context === null || context === void 0 ? void 0 : context.searchConfiguration.qsmType) !== build.PortalQsmType.AccommodationAndFlight || isFlyIn;
41591
+ var filteredMapperResults = mappedResults;
41592
+ if (selectedPackagingAccoResult) {
41593
+ filteredMapperResults = mappedResults.filter(function (result) {
41594
+ return result.code !== selectedPackagingAccoResult.code;
41595
+ });
41596
+ }
41591
41597
  if (shouldShowAll) {
41592
- return mappedResults;
41598
+ if (isFlyIn) {
41599
+ return mappedResults;
41600
+ }
41601
+ return filteredMapperResults;
41593
41602
  }
41594
41603
  if (selectedPackagingAccoResult) {
41595
- return mappedResults
41604
+ return filteredMapperResults
41596
41605
  .filter(function (result) {
41597
41606
  return result.code !== selectedPackagingAccoResult.code;
41598
41607
  })
@@ -43196,6 +43205,13 @@ var FlyIn = function (_a) {
43196
43205
  dispatch(setSortType(newSortByType));
43197
43206
  }
43198
43207
  };
43208
+ var onHandleConfirm = function () {
43209
+ if (context === null || context === void 0 ? void 0 : context.packagingEntry) {
43210
+ handleConfirm === null || handleConfirm === void 0 ? void 0 : handleConfirm();
43211
+ } else {
43212
+ dispatch(setBookPackagingEntry(true));
43213
+ }
43214
+ };
43199
43215
  return React__default['default'].createElement(
43200
43216
  'div',
43201
43217
  {
@@ -43333,7 +43349,7 @@ var FlyIn = function (_a) {
43333
43349
  ),
43334
43350
  (srpType === build.PortalQsmType.Accommodation || srpType === build.PortalQsmType.AccommodationAndFlight) &&
43335
43351
  flyInType === 'acco-details' &&
43336
- React__default['default'].createElement(AccommodationFlyIn, { isLoading: detailsLoading, handleConfirm: handleConfirm }),
43352
+ React__default['default'].createElement(AccommodationFlyIn, { isLoading: detailsLoading, handleConfirm: onHandleConfirm }),
43337
43353
  srpType === build.PortalQsmType.AccommodationAndFlight &&
43338
43354
  (flyInType === 'flight-outward-results' || flyInType === 'flight-return-results') &&
43339
43355
  React__default['default'].createElement(PackageingFlightsFlyIn, {
@@ -44212,8 +44228,11 @@ var IndependentFlightSelection = function (_a) {
44212
44228
  [searchResults, selectedReturnKey]
44213
44229
  );
44214
44230
  var firstResultDate = uniqueOutwardFlights.length > 0 ? uniqueOutwardFlights[0].outward.segments[0].departureDateTime : null;
44231
+ var firstResultReturnDate = uniqueReturnFlights.length > 0 ? uniqueReturnFlights[0].return.segments[0].departureDateTime : null;
44215
44232
  var firstResultDay = firstResultDate ? dateFns.format(firstResultDate, 'd') : null;
44216
44233
  var firstResultMonth = firstResultDate ? dateFns.format(firstResultDate, 'MMM') : null;
44234
+ var firstResultReturnDay = firstResultReturnDate ? dateFns.format(firstResultReturnDate, 'd') : null;
44235
+ var firstResultReturnMonth = firstResultReturnDate ? dateFns.format(firstResultReturnDate, 'MMM') : null;
44217
44236
  return React__default['default'].createElement(
44218
44237
  React__default['default'].Fragment,
44219
44238
  null,
@@ -44268,7 +44287,12 @@ var IndependentFlightSelection = function (_a) {
44268
44287
  React__default['default'].createElement(
44269
44288
  'div',
44270
44289
  { className: 'search__results__label search__results__label--secondary' },
44271
- React__default['default'].createElement('div', { className: 'search__results__label__date' }),
44290
+ React__default['default'].createElement(
44291
+ 'div',
44292
+ { className: 'search__results__label__date' },
44293
+ React__default['default'].createElement('p', { className: 'search__results__label__date-date' }, firstResultReturnDay),
44294
+ React__default['default'].createElement('p', null, firstResultReturnMonth)
44295
+ ),
44272
44296
  React__default['default'].createElement(
44273
44297
  'div',
44274
44298
  { className: 'search__results__label__text' },
@@ -46736,6 +46760,83 @@ var DayByDayExcursions = function () {
46736
46760
  );
46737
46761
  };
46738
46762
 
46763
+ var renderEditablePackagingEntrySummaryOptions = function (editablePackagingEntry, priceDetails, translations) {
46764
+ var _a, _b;
46765
+ var priceDetailsByProduct = lodash.groupBy(
46766
+ (_a = priceDetails === null || priceDetails === void 0 ? void 0 : priceDetails.details) !== null && _a !== void 0 ? _a : [],
46767
+ function (detail) {
46768
+ return ''.concat(detail.productCode, '|').concat(detail.accommodationCode);
46769
+ }
46770
+ );
46771
+ return (
46772
+ (_b = editablePackagingEntry === null || editablePackagingEntry === void 0 ? void 0 : editablePackagingEntry.lines) !== null && _b !== void 0 ? _b : []
46773
+ ).map(function (line) {
46774
+ var _a, _b, _c;
46775
+ var groupedPriceDetails = (_a = priceDetailsByProduct[''.concat(line.productCode, '|').concat(line.accommodationCode)]) !== null && _a !== void 0 ? _a : [];
46776
+ var visiblePriceDetails = groupedPriceDetails.filter(function (detail) {
46777
+ return detail.showPrice || detail.isSeparate;
46778
+ });
46779
+ return React__default['default'].createElement(
46780
+ 'li',
46781
+ { key: line.guid },
46782
+ React__default['default'].createElement('h6', null, line.productName),
46783
+ React__default['default'].createElement(
46784
+ 'ul',
46785
+ null,
46786
+ React__default['default'].createElement('li', { className: 'list__item' }, lodash.compact([line.accommodationName, line.regimeName]).join(', ')),
46787
+ (_c = (_b = line.flightInformation) === null || _b === void 0 ? void 0 : _b.flightLines) === null || _c === void 0
46788
+ ? void 0
46789
+ : _c.map(function (flightLine, index) {
46790
+ var _a, _b;
46791
+ return React__default['default'].createElement(
46792
+ 'li',
46793
+ { className: 'list__item', key: ''.concat(line.guid, '-').concat(index) },
46794
+ flightLine.departureAirportCode,
46795
+ ' ',
46796
+ (_a = flightLine.departureTime) === null || _a === void 0 ? void 0 : _a.slice(0, 5),
46797
+ ' > ',
46798
+ flightLine.arrivalAirportCode,
46799
+ ' ',
46800
+ (_b = flightLine.arrivalTime) === null || _b === void 0 ? void 0 : _b.slice(0, 5),
46801
+ ' (',
46802
+ flightLine.operatingFlightNumber || ''.concat(flightLine.airlineCode).concat(flightLine.flightNumber),
46803
+ ')'
46804
+ );
46805
+ }),
46806
+ !lodash.isEmpty(visiblePriceDetails) &&
46807
+ visiblePriceDetails.map(function (detail, index) {
46808
+ var _a;
46809
+ return React__default['default'].createElement(
46810
+ 'li',
46811
+ { className: 'list__item', key: ''.concat(line.guid, '-price-').concat(index) },
46812
+ detail.priceDescription,
46813
+ ': ',
46814
+ (_a = detail.total) === null || _a === void 0 ? void 0 : _a.toLocaleString(undefined, { style: 'currency', currency: 'EUR' })
46815
+ );
46816
+ })
46817
+ ),
46818
+ React__default['default'].createElement(
46819
+ 'p',
46820
+ null,
46821
+ '(',
46822
+ line.from === line.to
46823
+ ? getDateText(line.from)
46824
+ : React__default['default'].createElement(React__default['default'].Fragment, null, getDateText(line.from), ' > ', getDateText(line.to)),
46825
+ ')'
46826
+ )
46827
+ );
46828
+ });
46829
+ };
46830
+ var getImageSrcFromHtml = function (html) {
46831
+ var _a;
46832
+ if (!html || typeof window === 'undefined') {
46833
+ return undefined;
46834
+ }
46835
+ var doc = new DOMParser().parseFromString(html, 'text/html');
46836
+ var img = doc.querySelector('img');
46837
+ return (_a = img === null || img === void 0 ? void 0 : img.getAttribute('src')) !== null && _a !== void 0 ? _a : undefined;
46838
+ };
46839
+
46739
46840
  var mapToSidebarFlightMetaData = function (entryLine) {
46740
46841
  var _a, _b;
46741
46842
  return {
@@ -46795,22 +46896,16 @@ var selectSeparatePackagePriceDetails = function (priceDetails) {
46795
46896
  return result;
46796
46897
  };
46797
46898
  var WLSidebar = function (_a) {
46798
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
46799
- var activeSearchSeed = _a.activeSearchSeed;
46899
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
46900
+ var activeSearchSeed = _a.activeSearchSeed,
46901
+ packagingAccoResult = _a.packagingAccoResult;
46800
46902
  var context = React.useContext(SearchResultsConfigurationContext);
46801
- if (!context) {
46802
- return null;
46803
- }
46804
- var translations = getTranslations((_b = context.languageCode) !== null && _b !== void 0 ? _b : 'en-GB');
46805
- var _u = reactRedux.useSelector(function (state) {
46903
+ var _4 = reactRedux.useSelector(function (state) {
46806
46904
  return state.searchResults;
46807
46905
  }),
46808
- editablePackagingEntry = _u.editablePackagingEntry,
46809
- priceDetails = _u.priceDetails;
46810
- // Map editablePackagingEntry to sidebar props (example, adjust as needed)
46811
- if (!editablePackagingEntry) {
46812
- return null;
46813
- }
46906
+ editablePackagingEntry = _4.editablePackagingEntry,
46907
+ priceDetails = _4.priceDetails;
46908
+ var translations = getTranslations((_b = context === null || context === void 0 ? void 0 : context.languageCode) !== null && _b !== void 0 ? _b : 'en-GB');
46814
46909
  var sortedLines = React.useMemo(
46815
46910
  function () {
46816
46911
  var _a;
@@ -46830,35 +46925,70 @@ var WLSidebar = function (_a) {
46830
46925
  },
46831
46926
  [editablePackagingEntry]
46832
46927
  );
46928
+ var accoImage = React.useMemo(
46929
+ function () {
46930
+ return getImageSrcFromHtml(packagingAccoResult === null || packagingAccoResult === void 0 ? void 0 : packagingAccoResult.contents);
46931
+ },
46932
+ [packagingAccoResult === null || packagingAccoResult === void 0 ? void 0 : packagingAccoResult.contents]
46933
+ );
46934
+ if (!context || !editablePackagingEntry) {
46935
+ return null;
46936
+ }
46833
46937
  var firstEntryLine = lodash.first(sortedLines);
46834
46938
  var accommodationLines = editablePackagingEntry.lines.filter(function (line) {
46835
46939
  return line.serviceType === ACCOMMODATION_SERVICE_TYPE;
46836
46940
  });
46837
46941
  var accommodationLine = (_c = lodash.first(accommodationLines)) !== null && _c !== void 0 ? _c : firstEntryLine;
46838
46942
  var location =
46839
- (_l =
46840
- (_j =
46841
- (_g =
46842
- (_e =
46843
- (_d = accommodationLine === null || accommodationLine === void 0 ? void 0 : accommodationLine.location) === null || _d === void 0
46943
+ context.searchConfiguration.qsmType === build.PortalQsmType.Accommodation
46944
+ ? (_m =
46945
+ (_k =
46946
+ (_h =
46947
+ (_f =
46948
+ (_d = packagingAccoResult === null || packagingAccoResult === void 0 ? void 0 : packagingAccoResult.name) !== null && _d !== void 0
46949
+ ? _d
46950
+ : (_e = accommodationLine === null || accommodationLine === void 0 ? void 0 : accommodationLine.location) === null || _e === void 0
46951
+ ? void 0
46952
+ : _e.name) !== null && _f !== void 0
46953
+ ? _f
46954
+ : (_g = accommodationLine === null || accommodationLine === void 0 ? void 0 : accommodationLine.oord) === null || _g === void 0
46955
+ ? void 0
46956
+ : _g.name) !== null && _h !== void 0
46957
+ ? _h
46958
+ : (_j = accommodationLine === null || accommodationLine === void 0 ? void 0 : accommodationLine.region) === null || _j === void 0
46844
46959
  ? void 0
46845
- : _d.name) !== null && _e !== void 0
46846
- ? _e
46847
- : (_f = accommodationLine === null || accommodationLine === void 0 ? void 0 : accommodationLine.oord) === null || _f === void 0
46960
+ : _j.name) !== null && _k !== void 0
46961
+ ? _k
46962
+ : (_l = accommodationLine === null || accommodationLine === void 0 ? void 0 : accommodationLine.country) === null || _l === void 0
46848
46963
  ? void 0
46849
- : _f.name) !== null && _g !== void 0
46850
- ? _g
46851
- : (_h = accommodationLine === null || accommodationLine === void 0 ? void 0 : accommodationLine.region) === null || _h === void 0
46852
- ? void 0
46853
- : _h.name) !== null && _j !== void 0
46854
- ? _j
46855
- : (_k = accommodationLine === null || accommodationLine === void 0 ? void 0 : accommodationLine.country) === null || _k === void 0
46964
+ : _l.name) !== null && _m !== void 0
46965
+ ? _m
46966
+ : (_o = firstEntryLine === null || firstEntryLine === void 0 ? void 0 : firstEntryLine.location) === null || _o === void 0
46856
46967
  ? void 0
46857
- : _k.name) !== null && _l !== void 0
46858
- ? _l
46859
- : (_m = firstEntryLine === null || firstEntryLine === void 0 ? void 0 : firstEntryLine.location) === null || _m === void 0
46968
+ : _o.name
46969
+ : (_w =
46970
+ (_u =
46971
+ (_s =
46972
+ (_q =
46973
+ (_p = accommodationLine === null || accommodationLine === void 0 ? void 0 : accommodationLine.location) === null || _p === void 0
46974
+ ? void 0
46975
+ : _p.name) !== null && _q !== void 0
46976
+ ? _q
46977
+ : (_r = accommodationLine === null || accommodationLine === void 0 ? void 0 : accommodationLine.oord) === null || _r === void 0
46978
+ ? void 0
46979
+ : _r.name) !== null && _s !== void 0
46980
+ ? _s
46981
+ : (_t = accommodationLine === null || accommodationLine === void 0 ? void 0 : accommodationLine.region) === null || _t === void 0
46982
+ ? void 0
46983
+ : _t.name) !== null && _u !== void 0
46984
+ ? _u
46985
+ : (_v = accommodationLine === null || accommodationLine === void 0 ? void 0 : accommodationLine.country) === null || _v === void 0
46986
+ ? void 0
46987
+ : _v.name) !== null && _w !== void 0
46988
+ ? _w
46989
+ : (_x = firstEntryLine === null || firstEntryLine === void 0 ? void 0 : firstEntryLine.location) === null || _x === void 0
46860
46990
  ? void 0
46861
- : _m.name;
46991
+ : _x.name;
46862
46992
  var rooms =
46863
46993
  (activeSearchSeed === null || activeSearchSeed === void 0
46864
46994
  ? void 0
@@ -46888,7 +47018,7 @@ var WLSidebar = function (_a) {
46888
47018
  var outboundFlightMetaData = outboundFlight ? mapToSidebarFlightMetaData(outboundFlight) : undefined;
46889
47019
  var returnFlightMetaData = returnFlight ? mapToSidebarFlightMetaData(returnFlight) : undefined;
46890
47020
  var basePrice = lodash.sum(
46891
- (_o =
47021
+ (_y =
46892
47022
  priceDetails === null || priceDetails === void 0
46893
47023
  ? void 0
46894
47024
  : priceDetails.details
@@ -46897,18 +47027,18 @@ var WLSidebar = function (_a) {
46897
47027
  })
46898
47028
  .map(function (pd) {
46899
47029
  return pd.price * pd.amount;
46900
- })) !== null && _o !== void 0
46901
- ? _o
47030
+ })) !== null && _y !== void 0
47031
+ ? _y
46902
47032
  : []
46903
47033
  );
46904
47034
  var separateExtraPriceDetails =
46905
- (_p =
47035
+ (_z =
46906
47036
  priceDetails === null || priceDetails === void 0
46907
47037
  ? void 0
46908
47038
  : priceDetails.details.filter(function (pd) {
46909
47039
  return !pd.isInPackage && pd.isSeparate;
46910
- })) !== null && _p !== void 0
46911
- ? _p
47040
+ })) !== null && _z !== void 0
47041
+ ? _z
46912
47042
  : [];
46913
47043
  var totalPrice = lodash.sum(
46914
47044
  __spreadArray(
@@ -46920,22 +47050,22 @@ var WLSidebar = function (_a) {
46920
47050
  )
46921
47051
  );
46922
47052
  var includedCosts = selectSeparatePackagePriceDetails(
46923
- (_q =
47053
+ (_0 =
46924
47054
  priceDetails === null || priceDetails === void 0
46925
47055
  ? void 0
46926
47056
  : priceDetails.details.filter(function (pd) {
46927
47057
  return pd.isInPackage;
46928
- })) !== null && _q !== void 0
46929
- ? _q
47058
+ })) !== null && _0 !== void 0
47059
+ ? _0
46930
47060
  : []
46931
47061
  );
46932
47062
  return React__default['default'].createElement(SharedSidebar, {
46933
47063
  productName: location !== null && location !== void 0 ? location : '',
46934
- thumbnailUrl: (_r = context.destinationImage) === null || _r === void 0 ? void 0 : _r.url,
47064
+ thumbnailUrl: accoImage !== null && accoImage !== void 0 ? accoImage : (_1 = context.destinationImage) === null || _1 === void 0 ? void 0 : _1.url,
46935
47065
  translations: translations,
46936
47066
  travelerRooms: travelerRooms,
46937
- startDateText: ((_s = lodash.first(sortedLines)) === null || _s === void 0 ? void 0 : _s.from) && formatDate(new Date(lodash.first(sortedLines).from)),
46938
- endDateText: ((_t = lodash.last(sortedLines)) === null || _t === void 0 ? void 0 : _t.to) && formatDate(new Date(lodash.last(sortedLines).to)),
47067
+ startDateText: ((_2 = lodash.first(sortedLines)) === null || _2 === void 0 ? void 0 : _2.from) && formatDate(new Date(lodash.first(sortedLines).from)),
47068
+ endDateText: ((_3 = lodash.last(sortedLines)) === null || _3 === void 0 ? void 0 : _3.to) && formatDate(new Date(lodash.last(sortedLines).to)),
46939
47069
  isLoading: !editablePackagingEntry || !priceDetails,
46940
47070
  loaderComponent: React__default['default'].createElement(Spinner, null),
46941
47071
  departureFlightMetaData: outboundFlightMetaData,
@@ -47461,74 +47591,6 @@ var SharedSummary = function (_a) {
47461
47591
  );
47462
47592
  };
47463
47593
 
47464
- var renderEditablePackagingEntrySummaryOptions = function (editablePackagingEntry, priceDetails, translations) {
47465
- var _a, _b;
47466
- var priceDetailsByProduct = lodash.groupBy(
47467
- (_a = priceDetails === null || priceDetails === void 0 ? void 0 : priceDetails.details) !== null && _a !== void 0 ? _a : [],
47468
- function (detail) {
47469
- return ''.concat(detail.productCode, '|').concat(detail.accommodationCode);
47470
- }
47471
- );
47472
- return (
47473
- (_b = editablePackagingEntry === null || editablePackagingEntry === void 0 ? void 0 : editablePackagingEntry.lines) !== null && _b !== void 0 ? _b : []
47474
- ).map(function (line) {
47475
- var _a, _b, _c;
47476
- var groupedPriceDetails = (_a = priceDetailsByProduct[''.concat(line.productCode, '|').concat(line.accommodationCode)]) !== null && _a !== void 0 ? _a : [];
47477
- var visiblePriceDetails = groupedPriceDetails.filter(function (detail) {
47478
- return detail.showPrice || detail.isSeparate;
47479
- });
47480
- return React__default['default'].createElement(
47481
- 'li',
47482
- { key: line.guid },
47483
- React__default['default'].createElement('h6', null, line.productName),
47484
- React__default['default'].createElement(
47485
- 'ul',
47486
- null,
47487
- React__default['default'].createElement('li', { className: 'list__item' }, lodash.compact([line.accommodationName, line.regimeName]).join(', ')),
47488
- (_c = (_b = line.flightInformation) === null || _b === void 0 ? void 0 : _b.flightLines) === null || _c === void 0
47489
- ? void 0
47490
- : _c.map(function (flightLine, index) {
47491
- var _a, _b;
47492
- return React__default['default'].createElement(
47493
- 'li',
47494
- { className: 'list__item', key: ''.concat(line.guid, '-').concat(index) },
47495
- flightLine.departureAirportCode,
47496
- ' ',
47497
- (_a = flightLine.departureTime) === null || _a === void 0 ? void 0 : _a.slice(0, 5),
47498
- ' > ',
47499
- flightLine.arrivalAirportCode,
47500
- ' ',
47501
- (_b = flightLine.arrivalTime) === null || _b === void 0 ? void 0 : _b.slice(0, 5),
47502
- ' (',
47503
- flightLine.operatingFlightNumber || ''.concat(flightLine.airlineCode).concat(flightLine.flightNumber),
47504
- ')'
47505
- );
47506
- }),
47507
- !lodash.isEmpty(visiblePriceDetails) &&
47508
- visiblePriceDetails.map(function (detail, index) {
47509
- var _a;
47510
- return React__default['default'].createElement(
47511
- 'li',
47512
- { className: 'list__item', key: ''.concat(line.guid, '-price-').concat(index) },
47513
- detail.priceDescription,
47514
- ': ',
47515
- (_a = detail.total) === null || _a === void 0 ? void 0 : _a.toLocaleString(undefined, { style: 'currency', currency: 'EUR' })
47516
- );
47517
- })
47518
- ),
47519
- React__default['default'].createElement(
47520
- 'p',
47521
- null,
47522
- '(',
47523
- line.from === line.to
47524
- ? getDateText(line.from)
47525
- : React__default['default'].createElement(React__default['default'].Fragment, null, getDateText(line.from), ' > ', getDateText(line.to)),
47526
- ')'
47527
- )
47528
- );
47529
- });
47530
- };
47531
-
47532
47594
  var travelerFormFields = [{ type: 'gender' }, { type: 'firstName' }, { type: 'lastName' }, { type: 'birthDate' }];
47533
47595
  var mainBookerFormFields = [
47534
47596
  { type: 'street' },
@@ -47552,6 +47614,7 @@ var travellersSettings = {
47552
47614
  var BookPackagingEntry = function (_a) {
47553
47615
  var _b;
47554
47616
  var activeSearchSeed = _a.activeSearchSeed,
47617
+ isLoading = _a.isLoading,
47555
47618
  isConfirmationPage = _a.isConfirmationPage;
47556
47619
  var context = React.useContext(SearchResultsConfigurationContext);
47557
47620
  var dispatch = reactRedux.useDispatch();
@@ -47561,7 +47624,9 @@ var BookPackagingEntry = function (_a) {
47561
47624
  editablePackagingEntry = _c.editablePackagingEntry,
47562
47625
  priceDetails = _c.priceDetails,
47563
47626
  currentStep = _c.currentStep,
47564
- bookingNumber = _c.bookingNumber;
47627
+ bookingNumber = _c.bookingNumber,
47628
+ selectedPackagingAccoResultCode = _c.selectedPackagingAccoResultCode,
47629
+ packagingAccoResults = _c.packagingAccoResults;
47565
47630
  var _d = React.useState([]),
47566
47631
  countries = _d[0],
47567
47632
  setCountries = _d[1];
@@ -47574,6 +47639,9 @@ var BookPackagingEntry = function (_a) {
47574
47639
  var _g = React.useState(false),
47575
47640
  isSubmitting = _g[0],
47576
47641
  setIsSubmitting = _g[1];
47642
+ var _h = React.useState(null),
47643
+ selectedPackagingAccoResult = _h[0],
47644
+ setSelectedPackagingAccoResult = _h[1];
47577
47645
  var translations = React.useMemo(
47578
47646
  function () {
47579
47647
  var _a;
@@ -47652,7 +47720,22 @@ var BookPackagingEntry = function (_a) {
47652
47720
  },
47653
47721
  [isConfirmationPage, dispatch]
47654
47722
  );
47655
- if (!context || !editablePackagingEntry || !priceDetails || !config) return null;
47723
+ React.useEffect(
47724
+ function () {
47725
+ var selectedPackagingAccoResult =
47726
+ packagingAccoResults === null || packagingAccoResults === void 0
47727
+ ? void 0
47728
+ : packagingAccoResults.find(function (result) {
47729
+ return result.code === selectedPackagingAccoResultCode;
47730
+ });
47731
+ if (selectedPackagingAccoResult) {
47732
+ setSelectedPackagingAccoResult(selectedPackagingAccoResult);
47733
+ }
47734
+ },
47735
+ [selectedPackagingAccoResultCode, packagingAccoResults]
47736
+ );
47737
+ if (!context || !editablePackagingEntry || !priceDetails || !config)
47738
+ return React__default['default'].createElement(Spinner, { label: translations.SUMMARY.PROCESS_BOOKING });
47656
47739
  var handleSummarySubmit = function (e) {
47657
47740
  return __awaiter(void 0, void 0, void 0, function () {
47658
47741
  var updatedEditablePackagingEntry, redirectUrl, request, bookingResponse;
@@ -47678,7 +47761,7 @@ var BookPackagingEntry = function (_a) {
47678
47761
  dispatch(setEditablePackagingEntry(updatedEditablePackagingEntry));
47679
47762
  _c.label = 1;
47680
47763
  case 1:
47681
- _c.trys.push([1, 3, 4, 5]);
47764
+ _c.trys.push([1, 3, , 4]);
47682
47765
  request = {
47683
47766
  language: (_a = context.languageCode) !== null && _a !== void 0 ? _a : 'en-GB',
47684
47767
  officeId: context.tideConnection.officeId,
@@ -47694,16 +47777,14 @@ var BookPackagingEntry = function (_a) {
47694
47777
  window.location.href = bookingResponse.paymentUrl;
47695
47778
  } else {
47696
47779
  dispatch(setCurrentStep(2));
47780
+ setIsSubmitting(false);
47697
47781
  }
47698
- return [3 /*break*/, 5];
47782
+ return [3 /*break*/, 4];
47699
47783
  case 3:
47700
47784
  _c.sent();
47701
47785
  dispatch(setCurrentStep(3));
47702
- return [3 /*break*/, 5];
47786
+ return [3 /*break*/, 4];
47703
47787
  case 4:
47704
- setIsSubmitting(false);
47705
- return [7 /*endfinally*/];
47706
- case 5:
47707
47788
  return [2 /*return*/];
47708
47789
  }
47709
47790
  });
@@ -47728,6 +47809,7 @@ var BookPackagingEntry = function (_a) {
47728
47809
  return React__default['default'].createElement(React__default['default'].Fragment, null, step + 1, '.\u00A0', stepLabels[step]);
47729
47810
  }
47730
47811
  },
47812
+ isConfirmationPage && isLoading && React__default['default'].createElement(Spinner, { label: translations.SUMMARY.PROCESS_BOOKING }),
47731
47813
  currentStep === 0 &&
47732
47814
  React__default['default'].createElement(SharedTravelersForm, {
47733
47815
  formik: formik$1,
@@ -47790,7 +47872,7 @@ var BookPackagingEntry = function (_a) {
47790
47872
  )
47791
47873
  ),
47792
47874
  React__default['default'].createElement('div', { className: 'backdrop', id: 'backdrop' }),
47793
- React__default['default'].createElement(WLSidebar, { activeSearchSeed: activeSearchSeed })
47875
+ React__default['default'].createElement(WLSidebar, { activeSearchSeed: activeSearchSeed, packagingAccoResult: selectedPackagingAccoResult })
47794
47876
  )
47795
47877
  );
47796
47878
  };
@@ -49371,7 +49453,11 @@ var SearchResultsContainer = function (_a) {
49371
49453
  'div',
49372
49454
  { className: 'search' },
49373
49455
  bookPackagingEntry
49374
- ? React__default['default'].createElement(BookPackagingEntry, { activeSearchSeed: activeSearchSeed, isConfirmationPage: isBookingConfirmation })
49456
+ ? React__default['default'].createElement(BookPackagingEntry, {
49457
+ activeSearchSeed: activeSearchSeed,
49458
+ isLoading: itineraryIsLoading || pricesAreLoading,
49459
+ isConfirmationPage: isBookingConfirmation
49460
+ })
49375
49461
  : React__default['default'].createElement(
49376
49462
  'div',
49377
49463
  { className: 'search__container' },
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { SearchSeed } from '../../types';
3
3
  interface BookPackagingEntryProps {
4
4
  activeSearchSeed: SearchSeed | null;
5
+ isLoading: boolean;
5
6
  isConfirmationPage?: boolean;
6
7
  }
7
8
  declare const BookPackagingEntry: React.FC<BookPackagingEntryProps>;
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
2
  import { SearchSeed } from '../../types';
3
+ import { PackagingAccommodationResponse } from '@qite/tide-client';
3
4
  interface WLSidebarProps {
4
5
  activeSearchSeed: SearchSeed | null;
6
+ packagingAccoResult: PackagingAccommodationResponse | null;
5
7
  }
6
8
  declare const WLSidebar: React.FC<WLSidebarProps>;
7
9
  export default WLSidebar;
@@ -1 +1,2 @@
1
1
  export declare const renderEditablePackagingEntrySummaryOptions: (editablePackagingEntry: any, priceDetails: any, translations: any) => any;
2
+ export declare const getImageSrcFromHtml: (html?: string | null) => string | undefined;