@qite/tide-booking-component 1.4.116 → 1.4.118

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.
@@ -43212,7 +43212,7 @@ var FlyIn = function (_a) {
43212
43212
  }
43213
43213
  };
43214
43214
  var onHandleConfirm = function () {
43215
- if (context === null || context === void 0 ? void 0 : context.packagingEntry) {
43215
+ if ((context === null || context === void 0 ? void 0 : context.packagingEntry) || srpType === build.PortalQsmType.AccommodationAndFlight) {
43216
43216
  handleConfirm === null || handleConfirm === void 0 ? void 0 : handleConfirm();
43217
43217
  } else {
43218
43218
  dispatch(setBookPackagingEntry(true));
@@ -47989,7 +47989,7 @@ var SearchResultsContainer = function (_a) {
47989
47989
  return requestRooms;
47990
47990
  };
47991
47991
  var buildSearchFromSeed = function (seed) {
47992
- var _a;
47992
+ var _a, _b;
47993
47993
  var country = seed.country;
47994
47994
  var region = seed.region;
47995
47995
  var oord = seed.oord;
@@ -48021,7 +48021,12 @@ var SearchResultsContainer = function (_a) {
48021
48021
  officeId: 1,
48022
48022
  agentId: context === null || context === void 0 ? void 0 : context.agentId,
48023
48023
  payload: {
48024
- catalogueIds: (_a = context.tideConnection.catalogueIds) !== null && _a !== void 0 ? _a : [],
48024
+ catalogueIds: context.searchConfiguration.defaultCatalogueId
48025
+ ? [context.searchConfiguration.defaultCatalogueId]
48026
+ : (_b = (_a = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _a === void 0 ? void 0 : _a.catalogueIds) !==
48027
+ null && _b !== void 0
48028
+ ? _b
48029
+ : [1],
48025
48030
  serviceType:
48026
48031
  context.searchConfiguration.qsmType === build.PortalQsmType.Accommodation ||
48027
48032
  context.searchConfiguration.qsmType === build.PortalQsmType.AccommodationAndFlight
@@ -48054,7 +48059,7 @@ var SearchResultsContainer = function (_a) {
48054
48059
  };
48055
48060
  };
48056
48061
  var buildPackagingAccommodationRequestFromSeed = function (seed, currentTransactionId) {
48057
- var _a, _b, _c, _d, _e, _f;
48062
+ var _a, _b, _c, _d, _e, _f, _g, _h;
48058
48063
  var country = seed.country;
48059
48064
  var region = seed.region;
48060
48065
  var oord = seed.oord;
@@ -48096,9 +48101,17 @@ var SearchResultsContainer = function (_a) {
48096
48101
  ? _c
48097
48102
  : 1,
48098
48103
  agentId: (_d = context === null || context === void 0 ? void 0 : context.agentId) !== null && _d !== void 0 ? _d : null,
48099
- catalogueId: (_e = context.searchConfiguration.defaultCatalogueId) !== null && _e !== void 0 ? _e : 0,
48104
+ catalogueId:
48105
+ (_g =
48106
+ (_e = context.searchConfiguration.defaultCatalogueId) !== null && _e !== void 0
48107
+ ? _e
48108
+ : lodash.first(
48109
+ (_f = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _f === void 0 ? void 0 : _f.catalogueIds
48110
+ )) !== null && _g !== void 0
48111
+ ? _g
48112
+ : 1,
48100
48113
  searchConfigurationId: context.searchConfiguration.id,
48101
- language: (_f = context.languageCode) !== null && _f !== void 0 ? _f : 'en-GB',
48114
+ language: (_h = context.languageCode) !== null && _h !== void 0 ? _h : 'en-GB',
48102
48115
  serviceType: ACCOMMODATION_SERVICE_TYPE,
48103
48116
  fromDate: seed.fromDate,
48104
48117
  toDate: seed.toDate,
@@ -48117,7 +48130,7 @@ var SearchResultsContainer = function (_a) {
48117
48130
  };
48118
48131
  };
48119
48132
  var buildPackagingFlightRequestFromSeed = function (seed, currentTransactionId) {
48120
- var _a, _b, _c, _d;
48133
+ var _a, _b, _c, _d, _e;
48121
48134
  if (typeof window !== 'undefined') {
48122
48135
  window.scrollTo(0, 0);
48123
48136
  }
@@ -48150,11 +48163,14 @@ var SearchResultsContainer = function (_a) {
48150
48163
  ? _b
48151
48164
  : 1,
48152
48165
  catalogueId:
48153
- (_d = lodash.first(
48154
- (_c = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _c === void 0 ? void 0 : _c.catalogueIds
48155
- )) !== null && _d !== void 0
48156
- ? _d
48157
- : 0,
48166
+ (_e =
48167
+ (_c = context.searchConfiguration.defaultCatalogueId) !== null && _c !== void 0
48168
+ ? _c
48169
+ : lodash.first(
48170
+ (_d = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _d === void 0 ? void 0 : _d.catalogueIds
48171
+ )) !== null && _e !== void 0
48172
+ ? _e
48173
+ : 1,
48158
48174
  departureAirportCode: seed.departureAirport,
48159
48175
  arrivalAirportCode: seed.destinationAirport,
48160
48176
  returnAirportCode: seed.returnAirport,
@@ -48800,9 +48816,9 @@ var SearchResultsContainer = function (_a) {
48800
48816
  detailSearchRequest,
48801
48817
  packageAccoSearchDetails,
48802
48818
  err_6;
48803
- var _a, _b, _c, _d, _e;
48804
- return __generator(this, function (_f) {
48805
- switch (_f.label) {
48819
+ var _a, _b, _c, _d, _e, _f, _g;
48820
+ return __generator(this, function (_h) {
48821
+ switch (_h.label) {
48806
48822
  case 0:
48807
48823
  if (!selectedPackagingAccoResultCode || !context) return [2 /*return*/];
48808
48824
  if (skipInitialPackagingAccoDetailsRef.current) {
@@ -48818,9 +48834,9 @@ var SearchResultsContainer = function (_a) {
48818
48834
  handleFlyInToggle(true);
48819
48835
  dispatch(setFlyInType('acco-details'));
48820
48836
  }
48821
- _f.label = 1;
48837
+ _h.label = 1;
48822
48838
  case 1:
48823
- _f.trys.push([1, 3, , 4]);
48839
+ _h.trys.push([1, 3, , 4]);
48824
48840
  config = {
48825
48841
  host: context.tideConnection.host,
48826
48842
  apiKey: context.tideConnection.apiKey
@@ -48863,10 +48879,18 @@ var SearchResultsContainer = function (_a) {
48863
48879
  officeId: 1,
48864
48880
  portalId: context.portalId,
48865
48881
  agentId: context.agentId,
48866
- catalogueId: (_c = context.searchConfiguration.defaultCatalogueId) !== null && _c !== void 0 ? _c : 0,
48882
+ catalogueId:
48883
+ (_e =
48884
+ (_c = context.searchConfiguration.defaultCatalogueId) !== null && _c !== void 0
48885
+ ? _c
48886
+ : lodash.first(
48887
+ (_d = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _d === void 0 ? void 0 : _d.catalogueIds
48888
+ )) !== null && _e !== void 0
48889
+ ? _e
48890
+ : 1,
48867
48891
  searchConfigurationId: context.searchConfiguration.id,
48868
48892
  vendorConfigurationId: selectedItem.vendorId,
48869
- language: (_d = context.languageCode) !== null && _d !== void 0 ? _d : 'en-GB',
48893
+ language: (_f = context.languageCode) !== null && _f !== void 0 ? _f : 'en-GB',
48870
48894
  serviceType: ACCOMMODATION_SERVICE_TYPE,
48871
48895
  fromDate: selectedItem.fromDate,
48872
48896
  toDate: selectedItem.toDate,
@@ -48881,18 +48905,18 @@ var SearchResultsContainer = function (_a) {
48881
48905
  },
48882
48906
  productCode: selectedItem.code ? selectedItem.code : '',
48883
48907
  rooms: getPackagingRequestRoomsFromBookingRooms(
48884
- (_e = seed === null || seed === void 0 ? void 0 : seed.rooms) !== null && _e !== void 0 ? _e : null
48908
+ (_g = seed === null || seed === void 0 ? void 0 : seed.rooms) !== null && _g !== void 0 ? _g : null
48885
48909
  ),
48886
48910
  tagIds: tagId ? [tagId] : []
48887
48911
  };
48888
48912
  return [4 /*yield*/, build.searchPackagingAccommodations(config, detailSearchRequest)];
48889
48913
  case 2:
48890
- packageAccoSearchDetails = _f.sent();
48914
+ packageAccoSearchDetails = _h.sent();
48891
48915
  dispatch(setPackagingAccoSearchDetails(packageAccoSearchDetails));
48892
48916
  setDetailsIsLoading(false);
48893
48917
  return [3 /*break*/, 4];
48894
48918
  case 3:
48895
- err_6 = _f.sent();
48919
+ err_6 = _h.sent();
48896
48920
  console.error('Failed to fetch package details', err_6);
48897
48921
  setDetailsIsLoading(false);
48898
48922
  return [3 /*break*/, 4];
@@ -48946,15 +48970,15 @@ var SearchResultsContainer = function (_a) {
48946
48970
  var fetchPriceDetails = function () {
48947
48971
  return __awaiter(void 0, void 0, void 0, function () {
48948
48972
  var config, request, priceDetails, err_7;
48949
- var _a, _b;
48950
- return __generator(this, function (_c) {
48951
- switch (_c.label) {
48973
+ var _a, _b, _c, _d;
48974
+ return __generator(this, function (_e) {
48975
+ switch (_e.label) {
48952
48976
  case 0:
48953
48977
  if (!context || !editablePackagingEntry || lodash.isEmpty(editablePackagingEntry.lines)) return [2 /*return*/];
48954
48978
  setPricesAreLoading(true);
48955
- _c.label = 1;
48979
+ _e.label = 1;
48956
48980
  case 1:
48957
- _c.trys.push([1, 3, , 4]);
48981
+ _e.trys.push([1, 3, , 4]);
48958
48982
  config = {
48959
48983
  host: context.tideConnection.host,
48960
48984
  apiKey: context.tideConnection.apiKey
@@ -48962,18 +48986,26 @@ var SearchResultsContainer = function (_a) {
48962
48986
  request = {
48963
48987
  language: (_a = context.languageCode) !== null && _a !== void 0 ? _a : 'en-GB',
48964
48988
  officeId: context.tideConnection.officeId,
48965
- catalogueId: (_b = context.searchConfiguration.defaultCatalogueId) !== null && _b !== void 0 ? _b : 0,
48989
+ catalogueId:
48990
+ (_d =
48991
+ (_b = context.searchConfiguration.defaultCatalogueId) !== null && _b !== void 0
48992
+ ? _b
48993
+ : lodash.first(
48994
+ (_c = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _c === void 0 ? void 0 : _c.catalogueIds
48995
+ )) !== null && _d !== void 0
48996
+ ? _d
48997
+ : 1,
48966
48998
  agentId: context.agentId,
48967
48999
  payload: editablePackagingEntry
48968
49000
  };
48969
49001
  return [4 /*yield*/, build.getPriceDetails(config, request)];
48970
49002
  case 2:
48971
- priceDetails = _c.sent();
49003
+ priceDetails = _e.sent();
48972
49004
  dispatch(setPriceDetails(priceDetails));
48973
49005
  setPricesAreLoading(false);
48974
49006
  return [3 /*break*/, 4];
48975
49007
  case 3:
48976
- err_7 = _c.sent();
49008
+ err_7 = _e.sent();
48977
49009
  console.error('Error fetching price details', err_7);
48978
49010
  setPricesAreLoading(false);
48979
49011
  return [3 /*break*/, 4];
@@ -48986,15 +49018,15 @@ var SearchResultsContainer = function (_a) {
48986
49018
  var fetchItinerary = function () {
48987
49019
  return __awaiter(void 0, void 0, void 0, function () {
48988
49020
  var config, request, itinerary, err_8;
48989
- var _a, _b;
48990
- return __generator(this, function (_c) {
48991
- switch (_c.label) {
49021
+ var _a, _b, _c, _d;
49022
+ return __generator(this, function (_e) {
49023
+ switch (_e.label) {
48992
49024
  case 0:
48993
49025
  if (!context || !context.packagingEntry || !editablePackagingEntry || lodash.isEmpty(editablePackagingEntry.lines)) return [2 /*return*/];
48994
49026
  setItineraryIsLoading(true);
48995
- _c.label = 1;
49027
+ _e.label = 1;
48996
49028
  case 1:
48997
- _c.trys.push([1, 3, , 4]);
49029
+ _e.trys.push([1, 3, , 4]);
48998
49030
  config = {
48999
49031
  host: context.tideConnection.host,
49000
49032
  apiKey: context.tideConnection.apiKey
@@ -49002,18 +49034,26 @@ var SearchResultsContainer = function (_a) {
49002
49034
  request = {
49003
49035
  language: (_a = context.languageCode) !== null && _a !== void 0 ? _a : 'en-GB',
49004
49036
  officeId: context.tideConnection.officeId,
49005
- catalogueId: (_b = context.searchConfiguration.defaultCatalogueId) !== null && _b !== void 0 ? _b : 0,
49037
+ catalogueId:
49038
+ (_d =
49039
+ (_b = context.searchConfiguration.defaultCatalogueId) !== null && _b !== void 0
49040
+ ? _b
49041
+ : lodash.first(
49042
+ (_c = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _c === void 0 ? void 0 : _c.catalogueIds
49043
+ )) !== null && _d !== void 0
49044
+ ? _d
49045
+ : 1,
49006
49046
  agentId: context.agentId,
49007
49047
  payload: editablePackagingEntry
49008
49048
  };
49009
49049
  return [4 /*yield*/, build.getItinerary(config, request)];
49010
49050
  case 2:
49011
- itinerary = _c.sent();
49051
+ itinerary = _e.sent();
49012
49052
  dispatch(setItinerary(itinerary));
49013
49053
  setItineraryIsLoading(false);
49014
49054
  return [3 /*break*/, 4];
49015
49055
  case 3:
49016
- err_8 = _c.sent();
49056
+ err_8 = _e.sent();
49017
49057
  console.error('Error fetching itinerary', err_8);
49018
49058
  setItineraryIsLoading(false);
49019
49059
  return [3 /*break*/, 4];
@@ -43045,7 +43045,7 @@ var FlyIn = function (_a) {
43045
43045
  }
43046
43046
  };
43047
43047
  var onHandleConfirm = function () {
43048
- if (context === null || context === void 0 ? void 0 : context.packagingEntry) {
43048
+ if ((context === null || context === void 0 ? void 0 : context.packagingEntry) || srpType === build.PortalQsmType.AccommodationAndFlight) {
43049
43049
  handleConfirm === null || handleConfirm === void 0 ? void 0 : handleConfirm();
43050
43050
  } else {
43051
43051
  dispatch(setBookPackagingEntry(true));
@@ -47753,7 +47753,7 @@ var SearchResultsContainer = function (_a) {
47753
47753
  return requestRooms;
47754
47754
  };
47755
47755
  var buildSearchFromSeed = function (seed) {
47756
- var _a;
47756
+ var _a, _b;
47757
47757
  var country = seed.country;
47758
47758
  var region = seed.region;
47759
47759
  var oord = seed.oord;
@@ -47785,7 +47785,12 @@ var SearchResultsContainer = function (_a) {
47785
47785
  officeId: 1,
47786
47786
  agentId: context === null || context === void 0 ? void 0 : context.agentId,
47787
47787
  payload: {
47788
- catalogueIds: (_a = context.tideConnection.catalogueIds) !== null && _a !== void 0 ? _a : [],
47788
+ catalogueIds: context.searchConfiguration.defaultCatalogueId
47789
+ ? [context.searchConfiguration.defaultCatalogueId]
47790
+ : (_b = (_a = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _a === void 0 ? void 0 : _a.catalogueIds) !==
47791
+ null && _b !== void 0
47792
+ ? _b
47793
+ : [1],
47789
47794
  serviceType:
47790
47795
  context.searchConfiguration.qsmType === build.PortalQsmType.Accommodation ||
47791
47796
  context.searchConfiguration.qsmType === build.PortalQsmType.AccommodationAndFlight
@@ -47818,7 +47823,7 @@ var SearchResultsContainer = function (_a) {
47818
47823
  };
47819
47824
  };
47820
47825
  var buildPackagingAccommodationRequestFromSeed = function (seed, currentTransactionId) {
47821
- var _a, _b, _c, _d, _e, _f;
47826
+ var _a, _b, _c, _d, _e, _f, _g, _h;
47822
47827
  var country = seed.country;
47823
47828
  var region = seed.region;
47824
47829
  var oord = seed.oord;
@@ -47860,9 +47865,16 @@ var SearchResultsContainer = function (_a) {
47860
47865
  ? _c
47861
47866
  : 1,
47862
47867
  agentId: (_d = context === null || context === void 0 ? void 0 : context.agentId) !== null && _d !== void 0 ? _d : null,
47863
- catalogueId: (_e = context.searchConfiguration.defaultCatalogueId) !== null && _e !== void 0 ? _e : 0,
47868
+ catalogueId:
47869
+ (_g =
47870
+ (_e = context.searchConfiguration.defaultCatalogueId) !== null && _e !== void 0
47871
+ ? _e
47872
+ : first((_f = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _f === void 0 ? void 0 : _f.catalogueIds)) !==
47873
+ null && _g !== void 0
47874
+ ? _g
47875
+ : 1,
47864
47876
  searchConfigurationId: context.searchConfiguration.id,
47865
- language: (_f = context.languageCode) !== null && _f !== void 0 ? _f : 'en-GB',
47877
+ language: (_h = context.languageCode) !== null && _h !== void 0 ? _h : 'en-GB',
47866
47878
  serviceType: ACCOMMODATION_SERVICE_TYPE,
47867
47879
  fromDate: seed.fromDate,
47868
47880
  toDate: seed.toDate,
@@ -47881,7 +47893,7 @@ var SearchResultsContainer = function (_a) {
47881
47893
  };
47882
47894
  };
47883
47895
  var buildPackagingFlightRequestFromSeed = function (seed, currentTransactionId) {
47884
- var _a, _b, _c, _d;
47896
+ var _a, _b, _c, _d, _e;
47885
47897
  if (typeof window !== 'undefined') {
47886
47898
  window.scrollTo(0, 0);
47887
47899
  }
@@ -47914,10 +47926,13 @@ var SearchResultsContainer = function (_a) {
47914
47926
  ? _b
47915
47927
  : 1,
47916
47928
  catalogueId:
47917
- (_d = first((_c = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _c === void 0 ? void 0 : _c.catalogueIds)) !==
47918
- null && _d !== void 0
47919
- ? _d
47920
- : 0,
47929
+ (_e =
47930
+ (_c = context.searchConfiguration.defaultCatalogueId) !== null && _c !== void 0
47931
+ ? _c
47932
+ : first((_d = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _d === void 0 ? void 0 : _d.catalogueIds)) !==
47933
+ null && _e !== void 0
47934
+ ? _e
47935
+ : 1,
47921
47936
  departureAirportCode: seed.departureAirport,
47922
47937
  arrivalAirportCode: seed.destinationAirport,
47923
47938
  returnAirportCode: seed.returnAirport,
@@ -48563,9 +48578,9 @@ var SearchResultsContainer = function (_a) {
48563
48578
  detailSearchRequest,
48564
48579
  packageAccoSearchDetails,
48565
48580
  err_6;
48566
- var _a, _b, _c, _d, _e;
48567
- return __generator(this, function (_f) {
48568
- switch (_f.label) {
48581
+ var _a, _b, _c, _d, _e, _f, _g;
48582
+ return __generator(this, function (_h) {
48583
+ switch (_h.label) {
48569
48584
  case 0:
48570
48585
  if (!selectedPackagingAccoResultCode || !context) return [2 /*return*/];
48571
48586
  if (skipInitialPackagingAccoDetailsRef.current) {
@@ -48581,9 +48596,9 @@ var SearchResultsContainer = function (_a) {
48581
48596
  handleFlyInToggle(true);
48582
48597
  dispatch(setFlyInType('acco-details'));
48583
48598
  }
48584
- _f.label = 1;
48599
+ _h.label = 1;
48585
48600
  case 1:
48586
- _f.trys.push([1, 3, , 4]);
48601
+ _h.trys.push([1, 3, , 4]);
48587
48602
  config = {
48588
48603
  host: context.tideConnection.host,
48589
48604
  apiKey: context.tideConnection.apiKey
@@ -48626,10 +48641,18 @@ var SearchResultsContainer = function (_a) {
48626
48641
  officeId: 1,
48627
48642
  portalId: context.portalId,
48628
48643
  agentId: context.agentId,
48629
- catalogueId: (_c = context.searchConfiguration.defaultCatalogueId) !== null && _c !== void 0 ? _c : 0,
48644
+ catalogueId:
48645
+ (_e =
48646
+ (_c = context.searchConfiguration.defaultCatalogueId) !== null && _c !== void 0
48647
+ ? _c
48648
+ : first(
48649
+ (_d = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _d === void 0 ? void 0 : _d.catalogueIds
48650
+ )) !== null && _e !== void 0
48651
+ ? _e
48652
+ : 1,
48630
48653
  searchConfigurationId: context.searchConfiguration.id,
48631
48654
  vendorConfigurationId: selectedItem.vendorId,
48632
- language: (_d = context.languageCode) !== null && _d !== void 0 ? _d : 'en-GB',
48655
+ language: (_f = context.languageCode) !== null && _f !== void 0 ? _f : 'en-GB',
48633
48656
  serviceType: ACCOMMODATION_SERVICE_TYPE,
48634
48657
  fromDate: selectedItem.fromDate,
48635
48658
  toDate: selectedItem.toDate,
@@ -48644,18 +48667,18 @@ var SearchResultsContainer = function (_a) {
48644
48667
  },
48645
48668
  productCode: selectedItem.code ? selectedItem.code : '',
48646
48669
  rooms: getPackagingRequestRoomsFromBookingRooms(
48647
- (_e = seed === null || seed === void 0 ? void 0 : seed.rooms) !== null && _e !== void 0 ? _e : null
48670
+ (_g = seed === null || seed === void 0 ? void 0 : seed.rooms) !== null && _g !== void 0 ? _g : null
48648
48671
  ),
48649
48672
  tagIds: tagId ? [tagId] : []
48650
48673
  };
48651
48674
  return [4 /*yield*/, build.searchPackagingAccommodations(config, detailSearchRequest)];
48652
48675
  case 2:
48653
- packageAccoSearchDetails = _f.sent();
48676
+ packageAccoSearchDetails = _h.sent();
48654
48677
  dispatch(setPackagingAccoSearchDetails(packageAccoSearchDetails));
48655
48678
  setDetailsIsLoading(false);
48656
48679
  return [3 /*break*/, 4];
48657
48680
  case 3:
48658
- err_6 = _f.sent();
48681
+ err_6 = _h.sent();
48659
48682
  console.error('Failed to fetch package details', err_6);
48660
48683
  setDetailsIsLoading(false);
48661
48684
  return [3 /*break*/, 4];
@@ -48709,15 +48732,15 @@ var SearchResultsContainer = function (_a) {
48709
48732
  var fetchPriceDetails = function () {
48710
48733
  return __awaiter(void 0, void 0, void 0, function () {
48711
48734
  var config, request, priceDetails, err_7;
48712
- var _a, _b;
48713
- return __generator(this, function (_c) {
48714
- switch (_c.label) {
48735
+ var _a, _b, _c, _d;
48736
+ return __generator(this, function (_e) {
48737
+ switch (_e.label) {
48715
48738
  case 0:
48716
48739
  if (!context || !editablePackagingEntry || isEmpty(editablePackagingEntry.lines)) return [2 /*return*/];
48717
48740
  setPricesAreLoading(true);
48718
- _c.label = 1;
48741
+ _e.label = 1;
48719
48742
  case 1:
48720
- _c.trys.push([1, 3, , 4]);
48743
+ _e.trys.push([1, 3, , 4]);
48721
48744
  config = {
48722
48745
  host: context.tideConnection.host,
48723
48746
  apiKey: context.tideConnection.apiKey
@@ -48725,18 +48748,26 @@ var SearchResultsContainer = function (_a) {
48725
48748
  request = {
48726
48749
  language: (_a = context.languageCode) !== null && _a !== void 0 ? _a : 'en-GB',
48727
48750
  officeId: context.tideConnection.officeId,
48728
- catalogueId: (_b = context.searchConfiguration.defaultCatalogueId) !== null && _b !== void 0 ? _b : 0,
48751
+ catalogueId:
48752
+ (_d =
48753
+ (_b = context.searchConfiguration.defaultCatalogueId) !== null && _b !== void 0
48754
+ ? _b
48755
+ : first(
48756
+ (_c = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _c === void 0 ? void 0 : _c.catalogueIds
48757
+ )) !== null && _d !== void 0
48758
+ ? _d
48759
+ : 1,
48729
48760
  agentId: context.agentId,
48730
48761
  payload: editablePackagingEntry
48731
48762
  };
48732
48763
  return [4 /*yield*/, build.getPriceDetails(config, request)];
48733
48764
  case 2:
48734
- priceDetails = _c.sent();
48765
+ priceDetails = _e.sent();
48735
48766
  dispatch(setPriceDetails(priceDetails));
48736
48767
  setPricesAreLoading(false);
48737
48768
  return [3 /*break*/, 4];
48738
48769
  case 3:
48739
- err_7 = _c.sent();
48770
+ err_7 = _e.sent();
48740
48771
  console.error('Error fetching price details', err_7);
48741
48772
  setPricesAreLoading(false);
48742
48773
  return [3 /*break*/, 4];
@@ -48749,15 +48780,15 @@ var SearchResultsContainer = function (_a) {
48749
48780
  var fetchItinerary = function () {
48750
48781
  return __awaiter(void 0, void 0, void 0, function () {
48751
48782
  var config, request, itinerary, err_8;
48752
- var _a, _b;
48753
- return __generator(this, function (_c) {
48754
- switch (_c.label) {
48783
+ var _a, _b, _c, _d;
48784
+ return __generator(this, function (_e) {
48785
+ switch (_e.label) {
48755
48786
  case 0:
48756
48787
  if (!context || !context.packagingEntry || !editablePackagingEntry || isEmpty(editablePackagingEntry.lines)) return [2 /*return*/];
48757
48788
  setItineraryIsLoading(true);
48758
- _c.label = 1;
48789
+ _e.label = 1;
48759
48790
  case 1:
48760
- _c.trys.push([1, 3, , 4]);
48791
+ _e.trys.push([1, 3, , 4]);
48761
48792
  config = {
48762
48793
  host: context.tideConnection.host,
48763
48794
  apiKey: context.tideConnection.apiKey
@@ -48765,18 +48796,26 @@ var SearchResultsContainer = function (_a) {
48765
48796
  request = {
48766
48797
  language: (_a = context.languageCode) !== null && _a !== void 0 ? _a : 'en-GB',
48767
48798
  officeId: context.tideConnection.officeId,
48768
- catalogueId: (_b = context.searchConfiguration.defaultCatalogueId) !== null && _b !== void 0 ? _b : 0,
48799
+ catalogueId:
48800
+ (_d =
48801
+ (_b = context.searchConfiguration.defaultCatalogueId) !== null && _b !== void 0
48802
+ ? _b
48803
+ : first(
48804
+ (_c = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _c === void 0 ? void 0 : _c.catalogueIds
48805
+ )) !== null && _d !== void 0
48806
+ ? _d
48807
+ : 1,
48769
48808
  agentId: context.agentId,
48770
48809
  payload: editablePackagingEntry
48771
48810
  };
48772
48811
  return [4 /*yield*/, build.getItinerary(config, request)];
48773
48812
  case 2:
48774
- itinerary = _c.sent();
48813
+ itinerary = _e.sent();
48775
48814
  dispatch(setItinerary(itinerary));
48776
48815
  setItineraryIsLoading(false);
48777
48816
  return [3 /*break*/, 4];
48778
48817
  case 3:
48779
- err_8 = _c.sent();
48818
+ err_8 = _e.sent();
48780
48819
  console.error('Error fetching itinerary', err_8);
48781
48820
  setItineraryIsLoading(false);
48782
48821
  return [3 /*break*/, 4];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qite/tide-booking-component",
3
- "version": "1.4.116",
3
+ "version": "1.4.118",
4
4
  "description": "React Booking wizard & Booking product component for Tide",
5
5
  "main": "build/build-cjs/index.js",
6
6
  "types": "build/build-cjs/src/index.d.ts",
@@ -266,7 +266,9 @@ const SearchResultsContainer: React.FC<SearchResultsContainerProps> = ({ onBooki
266
266
  officeId: 1,
267
267
  agentId: context?.agentId,
268
268
  payload: {
269
- catalogueIds: context!.tideConnection.catalogueIds ?? [],
269
+ catalogueIds: context!.searchConfiguration.defaultCatalogueId
270
+ ? [context!.searchConfiguration.defaultCatalogueId]
271
+ : context?.tideConnection?.catalogueIds ?? [1],
270
272
  serviceType:
271
273
  context!.searchConfiguration.qsmType === PortalQsmType.Accommodation || context!.searchConfiguration.qsmType === PortalQsmType.AccommodationAndFlight
272
274
  ? ACCOMMODATION_SERVICE_TYPE
@@ -340,7 +342,7 @@ const SearchResultsContainer: React.FC<SearchResultsContainerProps> = ({ onBooki
340
342
  transactionId: currentTransactionId,
341
343
  officeId: context?.tideConnection?.officeId ?? 1,
342
344
  agentId: context?.agentId ?? null,
343
- catalogueId: context!.searchConfiguration.defaultCatalogueId ?? 0,
345
+ catalogueId: context!.searchConfiguration.defaultCatalogueId ?? first(context?.tideConnection?.catalogueIds) ?? 1,
344
346
  searchConfigurationId: context!.searchConfiguration.id,
345
347
  language: context!.languageCode ?? 'en-GB',
346
348
  serviceType: ACCOMMODATION_SERVICE_TYPE,
@@ -372,7 +374,7 @@ const SearchResultsContainer: React.FC<SearchResultsContainerProps> = ({ onBooki
372
374
  return {
373
375
  transactionId: currentTransactionId,
374
376
  officeId: context?.tideConnection?.officeId ?? 1,
375
- catalogueId: first(context?.tideConnection?.catalogueIds) ?? 0,
377
+ catalogueId: context!.searchConfiguration.defaultCatalogueId ?? first(context?.tideConnection?.catalogueIds) ?? 1,
376
378
  departureAirportCode: seed.departureAirport,
377
379
  arrivalAirportCode: seed.destinationAirport,
378
380
  returnAirportCode: seed.returnAirport,
@@ -946,7 +948,7 @@ const SearchResultsContainer: React.FC<SearchResultsContainerProps> = ({ onBooki
946
948
  officeId: 1,
947
949
  portalId: context.portalId,
948
950
  agentId: context.agentId,
949
- catalogueId: context!.searchConfiguration.defaultCatalogueId ?? 0,
951
+ catalogueId: context!.searchConfiguration.defaultCatalogueId ?? first(context?.tideConnection?.catalogueIds) ?? 1,
950
952
  searchConfigurationId: context!.searchConfiguration.id,
951
953
  vendorConfigurationId: selectedItem.vendorId,
952
954
  language: context!.languageCode ?? 'en-GB',
@@ -1018,7 +1020,7 @@ const SearchResultsContainer: React.FC<SearchResultsContainerProps> = ({ onBooki
1018
1020
  const request = {
1019
1021
  language: context.languageCode ?? 'en-GB',
1020
1022
  officeId: context.tideConnection.officeId,
1021
- catalogueId: context.searchConfiguration.defaultCatalogueId ?? 0,
1023
+ catalogueId: context!.searchConfiguration.defaultCatalogueId ?? first(context?.tideConnection?.catalogueIds) ?? 1,
1022
1024
  agentId: context.agentId,
1023
1025
  payload: editablePackagingEntry
1024
1026
  } as PackagingRequestBase<PackagingEntry>;
@@ -1044,7 +1046,7 @@ const SearchResultsContainer: React.FC<SearchResultsContainerProps> = ({ onBooki
1044
1046
  const request = {
1045
1047
  language: context.languageCode ?? 'en-GB',
1046
1048
  officeId: context.tideConnection.officeId,
1047
- catalogueId: context.searchConfiguration.defaultCatalogueId ?? 0,
1049
+ catalogueId: context!.searchConfiguration.defaultCatalogueId ?? first(context?.tideConnection?.catalogueIds) ?? 1,
1048
1050
  agentId: context.agentId,
1049
1051
  payload: editablePackagingEntry
1050
1052
  } as PackagingRequestBase<PackagingEntry>;
@@ -127,7 +127,7 @@ const FlyIn: React.FC<FlyInProps> = ({
127
127
  };
128
128
 
129
129
  const onHandleConfirm = () => {
130
- if (context?.packagingEntry) {
130
+ if (context?.packagingEntry || srpType === PortalQsmType.AccommodationAndFlight) {
131
131
  handleConfirm?.();
132
132
  } else {
133
133
  dispatch(setBookPackagingEntry(true));