@qite/tide-booking-component 1.4.79 → 1.4.81

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.
Files changed (54) hide show
  1. package/build/build-cjs/index.js +826 -395
  2. package/build/build-cjs/src/booking-wizard/features/booking/api.d.ts +4 -0
  3. package/build/build-cjs/src/booking-wizard/features/booking/booking-slice.d.ts +16 -0
  4. package/build/build-cjs/src/booking-wizard/features/booking/selectors.d.ts +1 -0
  5. package/build/build-cjs/src/booking-wizard/types.d.ts +1 -0
  6. package/build/build-cjs/src/qsm/store/qsm-slice.d.ts +2 -1
  7. package/build/build-cjs/src/qsm/types.d.ts +2 -2
  8. package/build/build-cjs/src/search-results/store/search-results-slice.d.ts +10 -1
  9. package/build/build-cjs/src/search-results/types.d.ts +5 -4
  10. package/build/build-cjs/src/search-results/utils/search-results-utils.d.ts +9 -2
  11. package/build/build-cjs/src/shared/components/flyin/flyin.d.ts +1 -1
  12. package/build/build-cjs/src/shared/types.d.ts +0 -13
  13. package/build/build-esm/index.js +828 -393
  14. package/build/build-esm/src/booking-wizard/features/booking/api.d.ts +4 -0
  15. package/build/build-esm/src/booking-wizard/features/booking/booking-slice.d.ts +16 -0
  16. package/build/build-esm/src/booking-wizard/features/booking/selectors.d.ts +1 -0
  17. package/build/build-esm/src/booking-wizard/types.d.ts +1 -0
  18. package/build/build-esm/src/qsm/store/qsm-slice.d.ts +2 -1
  19. package/build/build-esm/src/qsm/types.d.ts +2 -2
  20. package/build/build-esm/src/search-results/store/search-results-slice.d.ts +10 -1
  21. package/build/build-esm/src/search-results/types.d.ts +5 -4
  22. package/build/build-esm/src/search-results/utils/search-results-utils.d.ts +9 -2
  23. package/build/build-esm/src/shared/components/flyin/flyin.d.ts +1 -1
  24. package/build/build-esm/src/shared/types.d.ts +0 -13
  25. package/package.json +2 -2
  26. package/src/booking-wizard/features/booking/api.ts +8 -2
  27. package/src/booking-wizard/features/booking/booking-slice.ts +15 -1
  28. package/src/booking-wizard/features/booking/selectors.ts +2 -0
  29. package/src/booking-wizard/features/travelers-form/travelers-form.tsx +46 -23
  30. package/src/booking-wizard/settings-context.ts +2 -1
  31. package/src/booking-wizard/types.ts +1 -0
  32. package/src/content/features/content-page/content-page-self-contained.tsx +6 -6
  33. package/src/qsm/components/QSMContainer/qsm-container.tsx +10 -2
  34. package/src/qsm/components/travel-input/index.tsx +1 -1
  35. package/src/qsm/components/travel-input-group/index.tsx +1 -1
  36. package/src/qsm/qsm-configuration-context.ts +1 -1
  37. package/src/qsm/store/qsm-slice.ts +2 -1
  38. package/src/qsm/types.ts +2 -2
  39. package/src/search-results/components/hotel/hotel-accommodation-results.tsx +97 -99
  40. package/src/search-results/components/hotel/hotel-card.tsx +33 -7
  41. package/src/search-results/components/search-results-container/flight-search-results.tsx +3 -3
  42. package/src/search-results/components/search-results-container/search-results-container.tsx +198 -42
  43. package/src/search-results/features/flights/flight-search-results-self-contained.tsx +21 -2
  44. package/src/search-results/features/hotels/hotel-flight-search-results-self-contained.tsx +21 -2
  45. package/src/search-results/features/hotels/hotel-search-results-self-contained.tsx +21 -2
  46. package/src/search-results/features/roundtrips/roundtrip-search-results-self-contained.tsx +21 -2
  47. package/src/search-results/store/search-results-slice.ts +19 -1
  48. package/src/search-results/types.ts +5 -5
  49. package/src/search-results/utils/search-results-utils.ts +185 -2
  50. package/src/shared/components/flyin/flyin.tsx +1 -1
  51. package/src/shared/types.ts +0 -14
  52. package/build/build-cjs/src/search-results/components/filters/utility.d.ts +0 -3
  53. package/build/build-esm/src/search-results/components/filters/utility.d.ts +0 -3
  54. package/src/search-results/components/filters/utility.tsx +0 -79
@@ -6681,20 +6681,6 @@ var jaJson = {
6681
6681
  SRP: SRP
6682
6682
  };
6683
6683
 
6684
- exports.PortalQsmType = void 0;
6685
- (function (PortalQsmType) {
6686
- PortalQsmType[(PortalQsmType['Multidestination'] = 0)] = 'Multidestination';
6687
- PortalQsmType[(PortalQsmType['Accommodation'] = 1)] = 'Accommodation';
6688
- PortalQsmType[(PortalQsmType['AccommodationAndFlight'] = 2)] = 'AccommodationAndFlight';
6689
- PortalQsmType[(PortalQsmType['Flight'] = 3)] = 'Flight';
6690
- PortalQsmType[(PortalQsmType['RoundTrip'] = 4)] = 'RoundTrip';
6691
- PortalQsmType[(PortalQsmType['GroupTour'] = 5)] = 'GroupTour';
6692
- PortalQsmType[(PortalQsmType['Package'] = 6)] = 'Package';
6693
- PortalQsmType[(PortalQsmType['Ticket'] = 7)] = 'Ticket';
6694
- PortalQsmType[(PortalQsmType['Car'] = 8)] = 'Car';
6695
- PortalQsmType[(PortalQsmType['Transfer'] = 9)] = 'Transfer';
6696
- PortalQsmType[(PortalQsmType['Cruise'] = 10)] = 'Cruise';
6697
- })(exports.PortalQsmType || (exports.PortalQsmType = {}));
6698
6684
  exports.DepartureRange = void 0;
6699
6685
  (function (DepartureRange) {
6700
6686
  DepartureRange[(DepartureRange['Morning'] = 0)] = 'Morning';
@@ -12717,44 +12703,44 @@ PERFORMANCE OF THIS SOFTWARE.
12717
12703
  });
12718
12704
  };
12719
12705
 
12720
- var ENDPOINT$7 = '/api/web/booking/v2';
12721
- var ENDPOINT_AVAILABLE_FLIGHTS = ENDPOINT$7 + '/available-flights';
12722
- var ENDPOINT_TRANSPORT_DATES = ENDPOINT$7 + '/transport-dates';
12723
- var ENDPOINT_PRICES = ENDPOINT$7 + '/prices';
12724
- var ENDPOINT_AVAILABLE_COUNTRIES = ENDPOINT$7 + '/available-countries';
12725
- var ENDPOINT_SEARCH = ENDPOINT$7 + '/search';
12726
- var ENDPOINT_SEARCH_WITH_ERROR_MAPPING = ENDPOINT$7 + '/search-with-error-mapping';
12706
+ var ENDPOINT$8 = '/api/web/booking/v2';
12707
+ var ENDPOINT_AVAILABLE_FLIGHTS = ENDPOINT$8 + '/available-flights';
12708
+ var ENDPOINT_TRANSPORT_DATES = ENDPOINT$8 + '/transport-dates';
12709
+ var ENDPOINT_PRICES = ENDPOINT$8 + '/prices';
12710
+ var ENDPOINT_AVAILABLE_COUNTRIES = ENDPOINT$8 + '/available-countries';
12711
+ var ENDPOINT_SEARCH = ENDPOINT$8 + '/search';
12712
+ var ENDPOINT_SEARCH_WITH_ERROR_MAPPING = ENDPOINT$8 + '/search-with-error-mapping';
12727
12713
  // const ENDPOINT_ELASTIC = `${ENDPOINT}/elastic`; // TODO
12728
- var ENDPOINT_DETAILS = ENDPOINT$7 + '/details';
12729
- var ENDPOINT_DETAILS_WL = ENDPOINT$7 + '/details-wl';
12714
+ var ENDPOINT_DETAILS = ENDPOINT$8 + '/details';
12715
+ var ENDPOINT_DETAILS_WL = ENDPOINT$8 + '/details-wl';
12730
12716
  var ENDPOINT_ENTRYLIGHT = function (code) {
12731
- return ENDPOINT$7 + '/entry-light/' + code;
12717
+ return ENDPOINT$8 + '/entry-light/' + code;
12732
12718
  };
12733
- var ENDPOINT_VALIDATE_VOUCHER = ENDPOINT$7 + '/validate-voucher';
12719
+ var ENDPOINT_VALIDATE_VOUCHER = ENDPOINT$8 + '/validate-voucher';
12734
12720
  var ENDPOINT_ALTERNATE_HOTELS = function (transactionId, optionId) {
12735
- return ENDPOINT$7 + '/details/' + transactionId + '/alternate-hotels/' + optionId;
12721
+ return ENDPOINT$8 + '/details/' + transactionId + '/alternate-hotels/' + optionId;
12736
12722
  };
12737
12723
  var ENDPOINT_ALTERNATE_FLIGHTS = function (transactionId) {
12738
- return ENDPOINT$7 + '/details/' + transactionId + '/alternate-flights';
12724
+ return ENDPOINT$8 + '/details/' + transactionId + '/alternate-flights';
12739
12725
  };
12740
- var ENDPOINT_BOOKABLE_DATES = ENDPOINT$7 + '/bookable-dates';
12741
- var ENDPOINT_PRICE_DETAILS = ENDPOINT$7 + '/price-details';
12742
- var ENDPOINT_BOOK = ENDPOINT$7 + '/book';
12743
- var ENDPOINT_UPDATE = ENDPOINT$7 + '/update';
12744
- var ENDPOINT_AGENTS = ENDPOINT$7 + '/agents';
12726
+ var ENDPOINT_BOOKABLE_DATES = ENDPOINT$8 + '/bookable-dates';
12727
+ var ENDPOINT_PRICE_DETAILS = ENDPOINT$8 + '/price-details';
12728
+ var ENDPOINT_BOOK = ENDPOINT$8 + '/book';
12729
+ var ENDPOINT_UPDATE = ENDPOINT$8 + '/update';
12730
+ var ENDPOINT_AGENTS = ENDPOINT$8 + '/agents';
12745
12731
  var ENDPOINT_AVAILABLE_ALLOTMENTS = function (eventId, productCode) {
12746
- return ENDPOINT$7 + '/get-allotment-availability/' + eventId + '/' + productCode;
12732
+ return ENDPOINT$8 + '/get-allotment-availability/' + eventId + '/' + productCode;
12747
12733
  };
12748
- var ENDPOINT_FLIGHT_POOL = ENDPOINT$7 + '/flight-pool';
12749
- var ENDPOINT_TOUR_CODES = ENDPOINT$7 + '/tourcodes';
12734
+ var ENDPOINT_FLIGHT_POOL = ENDPOINT$8 + '/flight-pool';
12735
+ var ENDPOINT_TOUR_CODES = ENDPOINT$8 + '/tourcodes';
12750
12736
  var ENDPOINT_CUSTOM_ENTRY_STATUS$1 = function (dossierNumber, customEntryStatusId) {
12751
- return ENDPOINT$7 + '/custom-entry-status/' + dossierNumber + '/' + customEntryStatusId;
12737
+ return ENDPOINT$8 + '/custom-entry-status/' + dossierNumber + '/' + customEntryStatusId;
12752
12738
  };
12753
12739
  var ENDPOINT_ENTRY_STATUS = function (dossierNumber, entryStatus) {
12754
- return ENDPOINT$7 + '/entry-status/' + dossierNumber + '/' + entryStatus;
12740
+ return ENDPOINT$8 + '/entry-status/' + dossierNumber + '/' + entryStatus;
12755
12741
  };
12756
- var ENDPOINT_ELASTIC = ENDPOINT$7 + '/elastic';
12757
- var ENDPOINT_FLIGHT_LINES = ENDPOINT$7 + '/flightlines';
12742
+ var ENDPOINT_ELASTIC = ENDPOINT$8 + '/elastic';
12743
+ var ENDPOINT_FLIGHT_LINES = ENDPOINT$8 + '/flightlines';
12758
12744
  var availableFlights = function (config, request, signal) {
12759
12745
  var url = '' + config.host + ENDPOINT_AVAILABLE_FLIGHTS;
12760
12746
  var apiKey = config.apiKey;
@@ -12894,12 +12880,12 @@ PERFORMANCE OF THIS SOFTWARE.
12894
12880
  return post(url, apiKey, body, config.token, signal, true);
12895
12881
  };
12896
12882
 
12897
- var ENDPOINT$6 = '/api/member';
12898
- var ENDPOINT_LOGIN = ENDPOINT$6 + '/login';
12899
- var ENDPOINT_LOGOUT = ENDPOINT$6 + '/logout';
12900
- var ENDPOINT_CONFIRM = ENDPOINT$6 + '/confirm';
12901
- var ENDPOINT_FORGOT_PASSWORD = ENDPOINT$6 + '/forgot-password';
12902
- var ENDPOINT_RESET_PASSWORD = ENDPOINT$6 + '/reset-password';
12883
+ var ENDPOINT$7 = '/api/member';
12884
+ var ENDPOINT_LOGIN = ENDPOINT$7 + '/login';
12885
+ var ENDPOINT_LOGOUT = ENDPOINT$7 + '/logout';
12886
+ var ENDPOINT_CONFIRM = ENDPOINT$7 + '/confirm';
12887
+ var ENDPOINT_FORGOT_PASSWORD = ENDPOINT$7 + '/forgot-password';
12888
+ var ENDPOINT_RESET_PASSWORD = ENDPOINT$7 + '/reset-password';
12903
12889
  var login = function (config, request, signal) {
12904
12890
  var url = '' + config.host + ENDPOINT_LOGIN;
12905
12891
  var apiKey = config.apiKey;
@@ -12931,8 +12917,8 @@ PERFORMANCE OF THIS SOFTWARE.
12931
12917
  return post$1(url, apiKey, body, config.token, signal);
12932
12918
  };
12933
12919
 
12934
- var ENDPOINT$5 = '/api/mollie';
12935
- var ENDPOINT_CREATE_PAYMENTS = ENDPOINT$5 + '/create-payment';
12920
+ var ENDPOINT$6 = '/api/mollie';
12921
+ var ENDPOINT_CREATE_PAYMENTS = ENDPOINT$6 + '/create-payment';
12936
12922
  /**
12937
12923
  * api/mollie/create-payment
12938
12924
  * @param request
@@ -12945,13 +12931,13 @@ PERFORMANCE OF THIS SOFTWARE.
12945
12931
  return post(url, apiKey, body, config.token, signal);
12946
12932
  };
12947
12933
 
12948
- var ENDPOINT$4 = '/api/web/search';
12949
- var ENDPOINT_COUNTRIES = ENDPOINT$4 + '/countries';
12950
- var ENDPOINT_REGIONS = ENDPOINT$4 + '/regions';
12951
- var ENDPOINT_OORDS = ENDPOINT$4 + '/oords';
12952
- var ENDPOINT_LOCATIONS$1 = ENDPOINT$4 + '/locations';
12934
+ var ENDPOINT$5 = '/api/web/search';
12935
+ var ENDPOINT_COUNTRIES = ENDPOINT$5 + '/countries';
12936
+ var ENDPOINT_REGIONS = ENDPOINT$5 + '/regions';
12937
+ var ENDPOINT_OORDS = ENDPOINT$5 + '/oords';
12938
+ var ENDPOINT_LOCATIONS$1 = ENDPOINT$5 + '/locations';
12953
12939
  var ENDPOINT_PORTAL = function (portalId) {
12954
- return ENDPOINT$4 + '/portal/' + portalId;
12940
+ return ENDPOINT$5 + '/portal/' + portalId;
12955
12941
  };
12956
12942
  var ENDPOINT_AIRPORT = '/api/web/entity/airport';
12957
12943
  /**
@@ -13113,12 +13099,12 @@ PERFORMANCE OF THIS SOFTWARE.
13113
13099
  return d instanceof Date && !isNaN(d.getTime());
13114
13100
  };
13115
13101
 
13116
- var ENDPOINT$3 = '/api/web/agent';
13117
- var ENDPOINT_GET_PRINT_ACTIONS = ENDPOINT$3 + '/print-action';
13118
- var ENDPOINT_PRINT = ENDPOINT$3 + '/print-action';
13119
- var ENDPOINT_CUSTOM_ENTRY_STATUS = ENDPOINT$3 + '/custom-entry-status';
13120
- var ENDPOINT_ENUM_ENTRY_STATUS = ENDPOINT$3 + '/enum/entry-status';
13121
- var ENDPOINT_CHANGE_ENTRY_AGENT_SURCHARGE = ENDPOINT$3 + '/entry/change-agent-surcharge';
13102
+ var ENDPOINT$4 = '/api/web/agent';
13103
+ var ENDPOINT_GET_PRINT_ACTIONS = ENDPOINT$4 + '/print-action';
13104
+ var ENDPOINT_PRINT = ENDPOINT$4 + '/print-action';
13105
+ var ENDPOINT_CUSTOM_ENTRY_STATUS = ENDPOINT$4 + '/custom-entry-status';
13106
+ var ENDPOINT_ENUM_ENTRY_STATUS = ENDPOINT$4 + '/enum/entry-status';
13107
+ var ENDPOINT_CHANGE_ENTRY_AGENT_SURCHARGE = ENDPOINT$4 + '/entry/change-agent-surcharge';
13122
13108
  /**
13123
13109
  * api/web/agent/print-action/{print-action-group}
13124
13110
  * @param config
@@ -13151,7 +13137,7 @@ PERFORMANCE OF THIS SOFTWARE.
13151
13137
  return encodeURIComponent(key) + '=' + encodeURIComponent(params[key]);
13152
13138
  })
13153
13139
  .join('&');
13154
- var url = '' + config.host + ENDPOINT$3 + '/entry/list?' + queryString;
13140
+ var url = '' + config.host + ENDPOINT$4 + '/entry/list?' + queryString;
13155
13141
  var apiKey = config.apiKey;
13156
13142
  return get(url, apiKey, config.token, signal, true);
13157
13143
  };
@@ -13162,7 +13148,7 @@ PERFORMANCE OF THIS SOFTWARE.
13162
13148
  return encodeURIComponent(key) + '=' + encodeURIComponent(params[key]);
13163
13149
  })
13164
13150
  .join('&');
13165
- var url = '' + config.host + ENDPOINT$3 + '/v2/entry/list?' + queryString;
13151
+ var url = '' + config.host + ENDPOINT$4 + '/v2/entry/list?' + queryString;
13166
13152
  var apiKey = config.apiKey;
13167
13153
  return get(url, apiKey, config.token, signal, true);
13168
13154
  };
@@ -13173,12 +13159,12 @@ PERFORMANCE OF THIS SOFTWARE.
13173
13159
  return encodeURIComponent(key) + '=' + encodeURIComponent(params[key]);
13174
13160
  })
13175
13161
  .join('&');
13176
- var url = '' + config.host + ENDPOINT$3 + '/entry/total?' + queryString;
13162
+ var url = '' + config.host + ENDPOINT$4 + '/entry/total?' + queryString;
13177
13163
  var apiKey = config.apiKey;
13178
13164
  return get(url, apiKey, config.token, signal, true);
13179
13165
  };
13180
13166
  var getEntryDetailv2 = function (config, entryId, signal) {
13181
- var url = '' + config.host + ENDPOINT$3 + '/v2/entry/detail/' + entryId;
13167
+ var url = '' + config.host + ENDPOINT$4 + '/v2/entry/detail/' + entryId;
13182
13168
  var apiKey = config.apiKey;
13183
13169
  return get(url, apiKey, config.token, signal, true);
13184
13170
  };
@@ -13189,7 +13175,7 @@ PERFORMANCE OF THIS SOFTWARE.
13189
13175
  return encodeURIComponent(key) + '=' + encodeURIComponent(params[key]);
13190
13176
  })
13191
13177
  .join('&');
13192
- var url = '' + config.host + ENDPOINT$3 + '/invoice/list?' + queryString;
13178
+ var url = '' + config.host + ENDPOINT$4 + '/invoice/list?' + queryString;
13193
13179
  var apiKey = config.apiKey;
13194
13180
  return get(url, apiKey, config.token, signal, true);
13195
13181
  };
@@ -13216,25 +13202,25 @@ PERFORMANCE OF THIS SOFTWARE.
13216
13202
  return encodeURIComponent(key) + '=' + encodeURIComponent(params[key]);
13217
13203
  })
13218
13204
  .join('&');
13219
- var url = '' + config.host + ENDPOINT$3 + '/allotment/list?' + queryString;
13205
+ var url = '' + config.host + ENDPOINT$4 + '/allotment/list?' + queryString;
13220
13206
  var apiKey = config.apiKey;
13221
13207
  return get(url, apiKey, config.token, signal, true);
13222
13208
  };
13223
13209
  var getAllotment = function (config, allotmentId, signal) {
13224
- var url = '' + config.host + ENDPOINT$3 + '/allotment/' + allotmentId;
13210
+ var url = '' + config.host + ENDPOINT$4 + '/allotment/' + allotmentId;
13225
13211
  var apiKey = config.apiKey;
13226
13212
  return get(url, apiKey, config.token, signal, true);
13227
13213
  };
13228
13214
 
13229
- var ENDPOINT$2 = '/api/web';
13230
- var ENDPOINT_CREATE_CRM_CONTACT = ENDPOINT$2 + '/crmcontact';
13231
- var ENDPOINT_CONTACT_FORM$1 = ENDPOINT$2 + '/contactform';
13232
- var ENDPOINT_CREATE_AFFILIATES = ENDPOINT$2 + '/affiliates';
13233
- var ENDPOINT_TRANSLATION_DICTIONARY = ENDPOINT$2 + '/translation-dictionary';
13234
- var ENDPOINT_BOOKING_ACCOMMODATION = ENDPOINT$2 + '/booking-accommodation';
13235
- var ENDPOINT_LOCATIONS = ENDPOINT$2 + '/entity/locations';
13215
+ var ENDPOINT$3 = '/api/web';
13216
+ var ENDPOINT_CREATE_CRM_CONTACT = ENDPOINT$3 + '/crmcontact';
13217
+ var ENDPOINT_CONTACT_FORM$1 = ENDPOINT$3 + '/contactform';
13218
+ var ENDPOINT_CREATE_AFFILIATES = ENDPOINT$3 + '/affiliates';
13219
+ var ENDPOINT_TRANSLATION_DICTIONARY = ENDPOINT$3 + '/translation-dictionary';
13220
+ var ENDPOINT_BOOKING_ACCOMMODATION = ENDPOINT$3 + '/booking-accommodation';
13221
+ var ENDPOINT_LOCATIONS = ENDPOINT$3 + '/entity/locations';
13236
13222
  var ENDPOINT_WEBSITE_CONFIGURATION = function (portalId) {
13237
- return ENDPOINT$2 + '/website/' + portalId + '/configuration';
13223
+ return ENDPOINT$3 + '/website/' + portalId + '/configuration';
13238
13224
  };
13239
13225
  /**
13240
13226
  * api/web/crmcontact
@@ -13299,9 +13285,9 @@ PERFORMANCE OF THIS SOFTWARE.
13299
13285
  return get(url, apiKey, config.token, signal, true);
13300
13286
  };
13301
13287
 
13302
- var ENDPOINT$1 = '/api/web/contact';
13303
- var ENDPOINT_CONTACT_FORM = ENDPOINT$1 + '/contact-form';
13304
- var ENDPOINT_CONTACT_HAS_TAG = ENDPOINT$1 + '/has-tag';
13288
+ var ENDPOINT$2 = '/api/web/contact';
13289
+ var ENDPOINT_CONTACT_FORM = ENDPOINT$2 + '/contact-form';
13290
+ var ENDPOINT_CONTACT_HAS_TAG = ENDPOINT$2 + '/has-tag';
13305
13291
  /**
13306
13292
  * api/web/contact/contact-form
13307
13293
  * Processes a contact form.
@@ -13323,8 +13309,8 @@ PERFORMANCE OF THIS SOFTWARE.
13323
13309
  return post$1(url, apiKey, body, config.token, signal);
13324
13310
  };
13325
13311
 
13326
- var ENDPOINT = '/api/web/file';
13327
- var ENDPOINT_FEED = ENDPOINT + '/feed';
13312
+ var ENDPOINT$1 = '/api/web/file';
13313
+ var ENDPOINT_FEED = ENDPOINT$1 + '/feed';
13328
13314
  /**
13329
13315
  * api/web/file/feed
13330
13316
  * fetch a xml from blob feed.
@@ -13353,6 +13339,16 @@ PERFORMANCE OF THIS SOFTWARE.
13353
13339
  return get$1(url, apiKey, config.token, signal);
13354
13340
  };
13355
13341
 
13342
+ var ENDPOINT = '/api/web/packaging';
13343
+ var ENDPOINT_ACCOMMODATIONS = ENDPOINT + '/accommodations';
13344
+ // MANUAL PACKAGING SEARCH
13345
+ var searchPackagingAccommodations = function (config, request, signal) {
13346
+ var url = '' + config.host + ENDPOINT_ACCOMMODATIONS;
13347
+ var apiKey = config.apiKey;
13348
+ var body = JSON.stringify(request);
13349
+ return post(url, apiKey, body, config.token, signal, true);
13350
+ };
13351
+
13356
13352
  exports.AllotmentType = AllotmentType;
13357
13353
  exports.ContactForm = ContactForm;
13358
13354
  exports.DataType = DataType;
@@ -13421,6 +13417,7 @@ PERFORMANCE OF THIS SOFTWARE.
13421
13417
  exports.searchFlightPool = searchFlightPool;
13422
13418
  exports.searchLocations = searchLocations;
13423
13419
  exports.searchOords = searchOords;
13420
+ exports.searchPackagingAccommodations = searchPackagingAccommodations;
13424
13421
  exports.searchRegions = searchRegions;
13425
13422
  exports.searchWithErrorMapping = searchWithErrorMapping;
13426
13423
  exports.setCustomEntryStatus = setCustomEntryStatus;
@@ -17509,10 +17506,25 @@ var fetchAccommodationViews$1 = function (request, signal, apiSettings) {
17509
17506
  });
17510
17507
  });
17511
17508
  };
17509
+ var fetchCountries$1 = function (signal, apiSettings) {
17510
+ return __awaiter(void 0, void 0, void 0, function () {
17511
+ var tideClientConfig;
17512
+ return __generator(this, function (_a) {
17513
+ switch (_a.label) {
17514
+ case 0:
17515
+ tideClientConfig = buildTideClientConfig(apiSettings);
17516
+ return [4 /*yield*/, build.getCountries(tideClientConfig, signal)];
17517
+ case 1:
17518
+ return [2 /*return*/, _a.sent()];
17519
+ }
17520
+ });
17521
+ });
17522
+ };
17512
17523
  var packageApi = {
17513
17524
  fetchDetails: fetchDetails,
17514
17525
  fetchAgents: fetchAgents$1,
17515
- fetchAccommodationViews: fetchAccommodationViews$1
17526
+ fetchAccommodationViews: fetchAccommodationViews$1,
17527
+ fetchCountries: fetchCountries$1
17516
17528
  };
17517
17529
 
17518
17530
  var ROOM_OPTIONS_FORM_STEP = 1;
@@ -18142,6 +18154,9 @@ var selectStartDate = function (state) {
18142
18154
  var selectAgents = function (state) {
18143
18155
  return state.booking.agents;
18144
18156
  };
18157
+ var selectCountries = function (state) {
18158
+ return state.booking.countries;
18159
+ };
18145
18160
  var selectProductCode = function (state) {
18146
18161
  var _a;
18147
18162
  return (_a = state.booking.productAttributes) === null || _a === void 0 ? void 0 : _a.productCode;
@@ -18438,7 +18453,8 @@ var initialState$5 = {
18438
18453
  translations: undefined,
18439
18454
  travelersFirstStep: false,
18440
18455
  isFetching: false,
18441
- hasMounted: false
18456
+ hasMounted: false,
18457
+ countries: undefined
18442
18458
  };
18443
18459
  var fetchPackage = toolkit.createAsyncThunk('booking/fetchPackage', function (_1, _a) {
18444
18460
  return __awaiter(void 0, [_1, _a], void 0, function (_, _b) {
@@ -18450,11 +18466,14 @@ var fetchPackage = toolkit.createAsyncThunk('booking/fetchPackage', function (_1
18450
18466
  return [4 /*yield*/, dispatch(fetchAgents())];
18451
18467
  case 1:
18452
18468
  _c.sent();
18453
- return [4 /*yield*/, dispatch(fetchPackageDetails())];
18469
+ return [4 /*yield*/, dispatch(fetchCountries())];
18454
18470
  case 2:
18455
18471
  _c.sent();
18456
- return [4 /*yield*/, dispatch(fetchAccommodationViews())];
18472
+ return [4 /*yield*/, dispatch(fetchPackageDetails())];
18457
18473
  case 3:
18474
+ _c.sent();
18475
+ return [4 /*yield*/, dispatch(fetchAccommodationViews())];
18476
+ case 4:
18458
18477
  _c.sent();
18459
18478
  dispatch(setFetchingPackage(false));
18460
18479
  return [2 /*return*/];
@@ -18462,6 +18481,23 @@ var fetchPackage = toolkit.createAsyncThunk('booking/fetchPackage', function (_1
18462
18481
  });
18463
18482
  });
18464
18483
  });
18484
+ var fetchCountries = toolkit.createAsyncThunk('booking/countries', function (_1, _a) {
18485
+ return __awaiter(void 0, [_1, _a], void 0, function (_, _b) {
18486
+ var settings;
18487
+ _b.dispatch;
18488
+ var getState = _b.getState,
18489
+ signal = _b.signal;
18490
+ return __generator(this, function (_c) {
18491
+ switch (_c.label) {
18492
+ case 0:
18493
+ settings = getState();
18494
+ return [4 /*yield*/, packageApi.fetchCountries(signal, settings.apiSettings)];
18495
+ case 1:
18496
+ return [2 /*return*/, _c.sent()];
18497
+ }
18498
+ });
18499
+ });
18500
+ });
18465
18501
  var fetchAgents = toolkit.createAsyncThunk('booking/agents', function (_1, _a) {
18466
18502
  return __awaiter(void 0, [_1, _a], void 0, function (_, _b) {
18467
18503
  var settings;
@@ -19009,6 +19045,11 @@ var bookingSlice = toolkit.createSlice({
19009
19045
  state.accommodationViews = action.payload;
19010
19046
  }
19011
19047
  });
19048
+ builder.addCase(fetchCountries.fulfilled, function (state, action) {
19049
+ if (action.payload.items) {
19050
+ state.countries = action.payload.items;
19051
+ }
19052
+ });
19012
19053
  }
19013
19054
  });
19014
19055
  var setOfficeId = ((_a$3 = bookingSlice.actions), _a$3.setOfficeId),
@@ -19069,7 +19110,8 @@ var SettingsContext = React__default['default'].createContext({
19069
19110
  },
19070
19111
  travellers: {
19071
19112
  pathSuffix: '/reizigers',
19072
- travelersFirstStep: false
19113
+ travelersFirstStep: false,
19114
+ showAllCountries: false
19073
19115
  },
19074
19116
  summary: {
19075
19117
  pathSuffix: '/samenvatting',
@@ -26765,7 +26807,7 @@ function createInitialValues(formRooms, startDate, agentAdressId, personTranslat
26765
26807
  return initialValues;
26766
26808
  }
26767
26809
  var TravelersForm = function () {
26768
- var _a, _b, _c, _d, _e, _f, _g, _h;
26810
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
26769
26811
  var dispatch = useAppDispatch();
26770
26812
  var navigate = reactRouter.useNavigate();
26771
26813
  var settings = React.useContext(SettingsContext);
@@ -26781,17 +26823,19 @@ var TravelersForm = function () {
26781
26823
  var bookingAttributes = reactRedux.useSelector(selectBookingAttributes);
26782
26824
  var isFetching = reactRedux.useSelector(selectIsFetching);
26783
26825
  var hasMounted = reactRedux.useSelector(selectHasMounted);
26826
+ var countries = reactRedux.useSelector(selectCountries);
26784
26827
  var useCompactForm = !!settings.travellers.compactForm && !!settings.agentAdressId;
26828
+ var showAllCountries = !!settings.travellers.showAllCountries;
26785
26829
  var initialValues =
26786
26830
  (_a = reactRedux.useSelector(selectTravelersFormValues)) !== null && _a !== void 0
26787
26831
  ? _a
26788
26832
  : createInitialValues(formRooms, startDate, agentAdressId, translations.TRAVELERS_FORM.PERSON, useCompactForm);
26789
- var _j = React.useState((_b = settings.agentRequired) !== null && _b !== void 0 ? _b : false),
26790
- showAgents = _j[0],
26791
- setShowAgents = _j[1];
26792
- var _k = React.useState(!settings.agentAdressId && !settings.hideAgentSelection),
26793
- showAgentSelection = _k[0],
26794
- setShowAgentSelection = _k[1];
26833
+ var _k = React.useState((_b = settings.agentRequired) !== null && _b !== void 0 ? _b : false),
26834
+ showAgents = _k[0],
26835
+ setShowAgents = _k[1];
26836
+ var _l = React.useState(!settings.agentAdressId && !settings.hideAgentSelection),
26837
+ showAgentSelection = _l[0],
26838
+ setShowAgentSelection = _l[1];
26795
26839
  var typeaheadAgents =
26796
26840
  (_c = lodash.sortBy(
26797
26841
  agents === null || agents === void 0
@@ -26807,9 +26851,9 @@ var TravelersForm = function () {
26807
26851
  )) !== null && _c !== void 0
26808
26852
  ? _c
26809
26853
  : [];
26810
- var _l = React.useState(typeaheadAgents),
26811
- filteredAgents = _l[0],
26812
- setFilteredAgents = _l[1];
26854
+ var _m = React.useState(typeaheadAgents),
26855
+ filteredAgents = _m[0],
26856
+ setFilteredAgents = _m[1];
26813
26857
  var formik$1 = useCompactForm
26814
26858
  ? formik.useFormik({
26815
26859
  initialValues: initialValues,
@@ -27065,7 +27109,7 @@ var TravelersForm = function () {
27065
27109
  return lodash.get(formik$1.errors, key) && lodash.get(formik$1.touched, key);
27066
27110
  };
27067
27111
  var getControl = function (type, value, name) {
27068
- var _a, _b, _c, _d, _e;
27112
+ var _a, _b, _c, _d, _e, _f;
27069
27113
  switch (type) {
27070
27114
  case 'gender': {
27071
27115
  return React__default['default'].createElement(GenderControl, { translations: translations, value: value, formik: formik$1, name: name });
@@ -27124,17 +27168,30 @@ var TravelersForm = function () {
27124
27168
  label: translations.TRAVELERS_FORM.SELECT_COUNTRY
27125
27169
  }
27126
27170
  ],
27127
- (_c =
27128
- (_b = (_a = settings.travellers) === null || _a === void 0 ? void 0 : _a.countries) === null || _b === void 0
27129
- ? void 0
27130
- : _b.map(function (country) {
27131
- return {
27132
- key: country.iso2,
27133
- value: country.iso2,
27134
- label: country.name
27135
- };
27136
- })) !== null && _c !== void 0
27137
- ? _c
27171
+ showAllCountries
27172
+ ? (_a =
27173
+ countries === null || countries === void 0
27174
+ ? void 0
27175
+ : countries.map(function (country) {
27176
+ return {
27177
+ key: country.iso2,
27178
+ value: country.iso2,
27179
+ label: country.name
27180
+ };
27181
+ })) !== null && _a !== void 0
27182
+ ? _a
27183
+ : []
27184
+ : (_d =
27185
+ (_c = (_b = settings.travellers) === null || _b === void 0 ? void 0 : _b.countries) === null || _c === void 0
27186
+ ? void 0
27187
+ : _c.map(function (country) {
27188
+ return {
27189
+ key: country.iso2,
27190
+ value: country.iso2,
27191
+ label: country.name
27192
+ };
27193
+ })) !== null && _d !== void 0
27194
+ ? _d
27138
27195
  : [],
27139
27196
  true
27140
27197
  )
@@ -27142,7 +27199,7 @@ var TravelersForm = function () {
27142
27199
  }
27143
27200
  case 'phone': {
27144
27201
  return React__default['default'].createElement(PhoneInput, {
27145
- countries: (_e = (_d = settings.travellers) === null || _d === void 0 ? void 0 : _d.countries) !== null && _e !== void 0 ? _e : [],
27202
+ countries: (_f = (_e = settings.travellers) === null || _e === void 0 ? void 0 : _e.countries) !== null && _f !== void 0 ? _f : [],
27146
27203
  countryIso2: formik$1.values.country,
27147
27204
  hasError: hasVisibleError('phone'),
27148
27205
  label: translations.TRAVELERS_FORM.PHONE,
@@ -27785,28 +27842,46 @@ var TravelersForm = function () {
27785
27842
  onChange: formik$1.handleChange,
27786
27843
  onBlur: formik$1.handleBlur,
27787
27844
  value: formik$1.values.country,
27788
- options: [
27789
- {
27790
- key: 'empty',
27791
- label: translations.TRAVELERS_FORM.SELECT_COUNTRY,
27792
- value: undefined
27793
- },
27794
- {
27795
- key: 'be',
27796
- value: 'be',
27797
- label: translations.TRAVELERS_FORM.COUNTRIES.BELGIUM
27798
- },
27799
- {
27800
- key: 'nl',
27801
- value: 'nl',
27802
- label: translations.TRAVELERS_FORM.COUNTRIES.NETHERLANDS
27803
- },
27804
- {
27805
- key: 'fr',
27806
- value: 'fr',
27807
- label: translations.TRAVELERS_FORM.COUNTRIES.FRANCE
27808
- }
27809
- ]
27845
+ options: __spreadArray(
27846
+ [
27847
+ {
27848
+ key: 'empty',
27849
+ value: undefined,
27850
+ label: translations.TRAVELERS_FORM.SELECT_COUNTRY
27851
+ }
27852
+ ],
27853
+ showAllCountries
27854
+ ? (_j =
27855
+ countries === null || countries === void 0
27856
+ ? void 0
27857
+ : countries.map(function (country) {
27858
+ return {
27859
+ key: country.iso2,
27860
+ value: country.iso2,
27861
+ label: country.name
27862
+ };
27863
+ })) !== null && _j !== void 0
27864
+ ? _j
27865
+ : []
27866
+ : [
27867
+ {
27868
+ key: 'be',
27869
+ value: 'be',
27870
+ label: translations.TRAVELERS_FORM.COUNTRIES.BELGIUM
27871
+ },
27872
+ {
27873
+ key: 'nl',
27874
+ value: 'nl',
27875
+ label: translations.TRAVELERS_FORM.COUNTRIES.NETHERLANDS
27876
+ },
27877
+ {
27878
+ key: 'fr',
27879
+ value: 'fr',
27880
+ label: translations.TRAVELERS_FORM.COUNTRIES.FRANCE
27881
+ }
27882
+ ],
27883
+ true
27884
+ )
27810
27885
  })
27811
27886
  )
27812
27887
  )
@@ -30412,7 +30487,7 @@ var Footer = function (_a) {
30412
30487
  };
30413
30488
 
30414
30489
  var QSMConfigurationContext = React__default['default'].createContext({
30415
- type: exports.PortalQsmType.Accommodation,
30490
+ type: build.PortalQsmType.Accommodation,
30416
30491
  searchConfigurations: [],
30417
30492
  askTravelers: false,
30418
30493
  askNationality: false,
@@ -30455,7 +30530,7 @@ var useMediaQuery = function (query) {
30455
30530
 
30456
30531
  var _a$1;
30457
30532
  var initialState$2 = {
30458
- qsmType: exports.PortalQsmType.AccommodationAndFlight,
30533
+ qsmType: build.PortalQsmType.AccommodationAndFlight,
30459
30534
  selectedOrigin: undefined,
30460
30535
  selectedDestination: undefined,
30461
30536
  selectedAirport: undefined,
@@ -31868,7 +31943,7 @@ var TravelInput = function () {
31868
31943
  babies = _b.babies,
31869
31944
  rooms = _b.rooms,
31870
31945
  qsmType = _b.qsmType;
31871
- var areTravelersInRooms = qsmType !== exports.PortalQsmType.Flight && askRooms;
31946
+ var areTravelersInRooms = qsmType !== build.PortalQsmType.Flight && askRooms;
31872
31947
  var translations = getTranslations(languageCode !== null && languageCode !== void 0 ? languageCode : 'en-GB');
31873
31948
  var getTravelerButtonClass = function (disabled) {
31874
31949
  return 'button button--increment '.concat(disabled ? 'button--disabled' : '');
@@ -32836,7 +32911,7 @@ var TravelInputGroup = function () {
32836
32911
  rooms = _c.rooms,
32837
32912
  qsmType = _c.qsmType;
32838
32913
  var translations = getTranslations(languageCode !== null && languageCode !== void 0 ? languageCode : 'en-GB');
32839
- var areTravelersInRooms = qsmType !== exports.PortalQsmType.Flight && askRooms;
32914
+ var areTravelersInRooms = qsmType !== build.PortalQsmType.Flight && askRooms;
32840
32915
  var initDone = React.useRef(false);
32841
32916
  var travelerSummary = reactRedux.useSelector(function (state) {
32842
32917
  return selectTravelerSummary(state, areTravelersInRooms);
@@ -33073,12 +33148,23 @@ var QSMContainer = function () {
33073
33148
  allowOpenJaw = _b.allowOpenJaw,
33074
33149
  searchConfigurations = _b.searchConfigurations;
33075
33150
  var translations = getTranslations(languageCode !== null && languageCode !== void 0 ? languageCode : 'en-GB');
33151
+ React.useEffect(
33152
+ function () {
33153
+ var _a;
33154
+ var defaultQsmType = (_a = lodash.first(searchConfigurations)) === null || _a === void 0 ? void 0 : _a.qsmType;
33155
+ console.log('Available search configurations:', searchConfigurations);
33156
+ if (!defaultQsmType) return;
33157
+ console.log('set default qsmType:', defaultQsmType);
33158
+ handleQsmTypeChange(defaultQsmType);
33159
+ },
33160
+ [searchConfigurations]
33161
+ );
33076
33162
  React.useEffect(
33077
33163
  function () {
33078
33164
  if (fromDate || toDate) return;
33079
33165
  var startDate = dateFns.addMonths(new Date(), 1);
33080
33166
  var endDate = dateFns.addDays(startDate, 7);
33081
- if (qsmType === exports.PortalQsmType.GroupTour) {
33167
+ if (qsmType === build.PortalQsmType.GroupTour) {
33082
33168
  startDate = new Date();
33083
33169
  endDate = dateFns.addYears(startDate, 1);
33084
33170
  }
@@ -33110,7 +33196,7 @@ var QSMContainer = function () {
33110
33196
  // Default fallback
33111
33197
  var startDate = dateFns.addMonths(now, 1);
33112
33198
  var endDate = dateFns.addDays(startDate, 7);
33113
- if (value === exports.PortalQsmType.GroupTour) {
33199
+ if (value === build.PortalQsmType.GroupTour) {
33114
33200
  startDate = now;
33115
33201
  endDate = dateFns.addYears(startDate, 1);
33116
33202
  }
@@ -33169,7 +33255,7 @@ var QSMContainer = function () {
33169
33255
  nationality: selectedNationality,
33170
33256
  tripType: tripType
33171
33257
  };
33172
- if (askRooms && qsmType !== exports.PortalQsmType.Flight) {
33258
+ if (askRooms && qsmType !== build.PortalQsmType.Flight) {
33173
33259
  payload.rooms = rooms;
33174
33260
  } else {
33175
33261
  payload.travelers = { adults: adults, kids: kids, babies: babies };
@@ -33236,47 +33322,47 @@ var QSMContainer = function () {
33236
33322
  );
33237
33323
  var qsmTypeMeta =
33238
33324
  ((_a = {}),
33239
- (_a[exports.PortalQsmType.Multidestination] = {
33325
+ (_a[build.PortalQsmType.Multidestination] = {
33240
33326
  icon: 'ui-location',
33241
33327
  label: translations.QSM.MULTIDESTINATION
33242
33328
  }),
33243
- (_a[exports.PortalQsmType.Package] = {
33329
+ (_a[build.PortalQsmType.Package] = {
33244
33330
  icon: 'ui-suitcase',
33245
33331
  label: translations.QSM.PACKAGES
33246
33332
  }),
33247
- (_a[exports.PortalQsmType.AccommodationAndFlight] = {
33333
+ (_a[build.PortalQsmType.AccommodationAndFlight] = {
33248
33334
  icon: ['ui-backforward', 'ui-bed'],
33249
33335
  label: translations.QSM.TRANSPORT_HOTEL
33250
33336
  }),
33251
- (_a[exports.PortalQsmType.Accommodation] = {
33337
+ (_a[build.PortalQsmType.Accommodation] = {
33252
33338
  icon: 'ui-bed',
33253
33339
  label: translations.QSM.ACCOMMODATION
33254
33340
  }),
33255
- (_a[exports.PortalQsmType.Flight] = {
33341
+ (_a[build.PortalQsmType.Flight] = {
33256
33342
  icon: 'ui-flight',
33257
33343
  label: translations.QSM.TRANSPORTS
33258
33344
  }),
33259
- (_a[exports.PortalQsmType.GroupTour] = {
33345
+ (_a[build.PortalQsmType.GroupTour] = {
33260
33346
  icon: 'ui-group',
33261
33347
  label: translations.QSM.GROUP_TOUR
33262
33348
  }),
33263
- (_a[exports.PortalQsmType.RoundTrip] = {
33349
+ (_a[build.PortalQsmType.RoundTrip] = {
33264
33350
  icon: 'ui-group',
33265
33351
  label: translations.QSM.ROUNDTRIP
33266
33352
  }),
33267
- (_a[exports.PortalQsmType.Ticket] = {
33353
+ (_a[build.PortalQsmType.Ticket] = {
33268
33354
  icon: 'ui-ticket',
33269
33355
  label: translations.QSM.TICKET_ONLY
33270
33356
  }),
33271
- (_a[exports.PortalQsmType.Car] = {
33357
+ (_a[build.PortalQsmType.Car] = {
33272
33358
  icon: 'ui-car',
33273
33359
  label: translations.QSM.RENT_A_CAR
33274
33360
  }),
33275
- (_a[exports.PortalQsmType.Transfer] = {
33361
+ (_a[build.PortalQsmType.Transfer] = {
33276
33362
  icon: 'ui-backforward',
33277
33363
  label: translations.QSM.TRANSFERS
33278
33364
  }),
33279
- (_a[exports.PortalQsmType.Cruise] = {
33365
+ (_a[build.PortalQsmType.Cruise] = {
33280
33366
  icon: 'ui-ship',
33281
33367
  label: translations.QSM.CRUISES
33282
33368
  }),
@@ -33319,9 +33405,9 @@ var QSMContainer = function () {
33319
33405
  React__default['default'].createElement(
33320
33406
  'div',
33321
33407
  { className: 'qsm__filter' },
33322
- (qsmType === exports.PortalQsmType.Accommodation ||
33323
- qsmType === exports.PortalQsmType.AccommodationAndFlight ||
33324
- qsmType === exports.PortalQsmType.GroupTour) &&
33408
+ (qsmType === build.PortalQsmType.Accommodation ||
33409
+ qsmType === build.PortalQsmType.AccommodationAndFlight ||
33410
+ qsmType === build.PortalQsmType.GroupTour) &&
33325
33411
  React__default['default'].createElement(
33326
33412
  'div',
33327
33413
  { className: 'radiobutton-group qsm__filter__inputgroup' },
@@ -33363,7 +33449,7 @@ var QSMContainer = function () {
33363
33449
  )
33364
33450
  )
33365
33451
  ),
33366
- qsmType === exports.PortalQsmType.Flight &&
33452
+ qsmType === build.PortalQsmType.Flight &&
33367
33453
  React__default['default'].createElement(
33368
33454
  'div',
33369
33455
  { className: 'radiobutton-group qsm__filter__inputgroup' },
@@ -33431,18 +33517,18 @@ var QSMContainer = function () {
33431
33517
  React__default['default'].createElement(
33432
33518
  'div',
33433
33519
  { className: 'qsm__filter__classgroup' },
33434
- qsmType !== exports.PortalQsmType.Accommodation &&
33435
- qsmType !== exports.PortalQsmType.Car &&
33436
- qsmType !== exports.PortalQsmType.Ticket &&
33437
- qsmType !== exports.PortalQsmType.Cruise &&
33438
- qsmType !== exports.PortalQsmType.Transfer &&
33439
- qsmType !== exports.PortalQsmType.GroupTour &&
33520
+ qsmType !== build.PortalQsmType.Accommodation &&
33521
+ qsmType !== build.PortalQsmType.Car &&
33522
+ qsmType !== build.PortalQsmType.Ticket &&
33523
+ qsmType !== build.PortalQsmType.Cruise &&
33524
+ qsmType !== build.PortalQsmType.Transfer &&
33525
+ qsmType !== build.PortalQsmType.GroupTour &&
33440
33526
  askTravelClass &&
33441
33527
  React__default['default'].createElement(TravelClassPicker, null),
33442
- qsmType !== exports.PortalQsmType.Multidestination &&
33443
- qsmType !== exports.PortalQsmType.Car &&
33444
- qsmType !== exports.PortalQsmType.Flight &&
33445
- qsmType !== exports.PortalQsmType.Transfer &&
33528
+ qsmType !== build.PortalQsmType.Multidestination &&
33529
+ qsmType !== build.PortalQsmType.Car &&
33530
+ qsmType !== build.PortalQsmType.Flight &&
33531
+ qsmType !== build.PortalQsmType.Transfer &&
33446
33532
  askTravelType &&
33447
33533
  React__default['default'].createElement(TravelTypePicker, null),
33448
33534
  askNationality && React__default['default'].createElement(TravelNationalityPicker, null)
@@ -33451,22 +33537,20 @@ var QSMContainer = function () {
33451
33537
  React__default['default'].createElement(
33452
33538
  'div',
33453
33539
  { className: 'qsm__input-group' },
33454
- (qsmType == exports.PortalQsmType.Flight || qsmType == exports.PortalQsmType.AccommodationAndFlight) &&
33540
+ (qsmType == build.PortalQsmType.Flight || qsmType == build.PortalQsmType.AccommodationAndFlight) &&
33455
33541
  originDestinationField &&
33456
33542
  React__default['default'].createElement(DoubleSearchInputGroup, {
33457
33543
  fieldConfig: originDestinationField,
33458
33544
  showReverse: originDestinationField.showReverse
33459
33545
  }),
33460
- qsmType == exports.PortalQsmType.Flight &&
33546
+ qsmType == build.PortalQsmType.Flight &&
33461
33547
  tripType == 'openjaw' &&
33462
33548
  openJawReturnDestinationField &&
33463
33549
  React__default['default'].createElement(DoubleSearchInputGroup, {
33464
33550
  fieldConfig: openJawReturnDestinationField,
33465
33551
  showReverse: openJawReturnDestinationField.showReverse
33466
33552
  }),
33467
- (qsmType == exports.PortalQsmType.Accommodation ||
33468
- qsmType == exports.PortalQsmType.AccommodationAndFlight ||
33469
- qsmType == exports.PortalQsmType.GroupTour) &&
33553
+ (qsmType == build.PortalQsmType.Accommodation || qsmType == build.PortalQsmType.AccommodationAndFlight || qsmType == build.PortalQsmType.GroupTour) &&
33470
33554
  destination &&
33471
33555
  React__default['default'].createElement(SearchInputGroup, { fieldConfig: destination }),
33472
33556
  React__default['default'].createElement(Dates, { value: dateRange, onChange: handleDateChange }),
@@ -33516,6 +33600,9 @@ var initialState$1 = {
33516
33600
  results: [],
33517
33601
  filteredResults: [],
33518
33602
  selectedSearchResultId: null,
33603
+ packagingAccoResults: [],
33604
+ filteredPackagingAccoResults: [],
33605
+ selectedPackagingAccoResultCode: null,
33519
33606
  selectedFlight: null,
33520
33607
  selectedFlightDetails: null,
33521
33608
  bookingPackageDetails: null,
@@ -33540,6 +33627,15 @@ var searchResultsSlice = toolkit.createSlice({
33540
33627
  setSelectedSearchResult: function (state, action) {
33541
33628
  state.selectedSearchResultId = action.payload;
33542
33629
  },
33630
+ setPackagingAccoResults: function (state, action) {
33631
+ state.packagingAccoResults = action.payload;
33632
+ },
33633
+ setFilteredPackagingAccoResults: function (state, action) {
33634
+ state.filteredPackagingAccoResults = action.payload;
33635
+ },
33636
+ setSelectedPackagingAccoResult: function (state, action) {
33637
+ state.selectedPackagingAccoResultCode = action.payload;
33638
+ },
33543
33639
  setSelectedFlight: function (state, action) {
33544
33640
  state.selectedFlight = action.payload;
33545
33641
  },
@@ -33606,6 +33702,9 @@ var searchResultsSlice = toolkit.createSlice({
33606
33702
  var setResults = ((_a = searchResultsSlice.actions), _a.setResults),
33607
33703
  setFilteredResults = _a.setFilteredResults,
33608
33704
  setSelectedSearchResult = _a.setSelectedSearchResult,
33705
+ setPackagingAccoResults = _a.setPackagingAccoResults,
33706
+ setFilteredPackagingAccoResults = _a.setFilteredPackagingAccoResults,
33707
+ setSelectedPackagingAccoResult = _a.setSelectedPackagingAccoResult,
33609
33708
  setSelectedFlight = _a.setSelectedFlight,
33610
33709
  setSelectedFlightDetails = _a.setSelectedFlightDetails,
33611
33710
  setBookingPackageDetails = _a.setBookingPackageDetails,
@@ -37963,7 +38062,7 @@ var FlyIn = function (_a) {
37963
38062
  );
37964
38063
  var handleClose = function () {
37965
38064
  if (isOpen && panelRef.current) {
37966
- if (srpType === exports.PortalQsmType.Flight) {
38065
+ if (srpType === build.PortalQsmType.Flight) {
37967
38066
  dispatch(setSelectedFlight(null));
37968
38067
  dispatch(setSelectedFlightDetails(null));
37969
38068
  onCancelSearch();
@@ -37996,23 +38095,65 @@ var FlyIn = function (_a) {
37996
38095
  )
37997
38096
  )
37998
38097
  ),
37999
- srpType === exports.PortalQsmType.Flight && React__default['default'].createElement(FlightsFlyIn, { isOpen: isOpen, setIsOpen: setIsOpen }),
38000
- (srpType === exports.PortalQsmType.Accommodation || srpType === exports.PortalQsmType.GroupTour) &&
38098
+ srpType === build.PortalQsmType.Flight && React__default['default'].createElement(FlightsFlyIn, { isOpen: isOpen, setIsOpen: setIsOpen }),
38099
+ (srpType === build.PortalQsmType.Accommodation || srpType === build.PortalQsmType.GroupTour) &&
38001
38100
  React__default['default'].createElement(AccommodationFlyIn, { isLoading: true, isOpen: isOpen, setIsOpen: setIsOpen })
38002
38101
  )
38003
38102
  );
38004
38103
  };
38005
38104
 
38006
38105
  var HotelCard = function (_a) {
38106
+ var _b;
38007
38107
  var result = _a.result,
38008
38108
  translations = _a.translations;
38009
38109
  var dispatch = reactRedux.useDispatch();
38010
- var selectedSearchResultId = reactRedux.useSelector(function (state) {
38110
+ var selectedPackagingAccoResultCode = reactRedux.useSelector(function (state) {
38011
38111
  return state.searchResults;
38012
- }).selectedSearchResultId;
38013
- var handleChange = function (productId) {
38014
- dispatch(setSelectedSearchResult(productId));
38112
+ }).selectedPackagingAccoResultCode;
38113
+ var handleChange = function (productCode) {
38114
+ dispatch(setSelectedPackagingAccoResult(productCode));
38015
38115
  };
38116
+ if ((_b = result.contents) === null || _b === void 0 ? void 0 : _b.length) {
38117
+ return React__default['default'].createElement(
38118
+ 'div',
38119
+ {
38120
+ key: result.id,
38121
+ className: 'search__result-card__wrapper',
38122
+ onMouseEnter: function (e) {
38123
+ return (e.currentTarget.style.transform = 'scale(1.02)');
38124
+ },
38125
+ onMouseLeave: function (e) {
38126
+ return (e.currentTarget.style.transform = 'scale(1)');
38127
+ }
38128
+ },
38129
+ React__default['default'].createElement('div', {
38130
+ dangerouslySetInnerHTML: {
38131
+ __html: result.contents
38132
+ }
38133
+ }),
38134
+ React__default['default'].createElement(
38135
+ 'div',
38136
+ { className: 'search__result-card__footer' },
38137
+ React__default['default'].createElement(
38138
+ 'button',
38139
+ {
38140
+ type: 'button',
38141
+ className: 'cta '.concat(selectedPackagingAccoResultCode === result.code ? 'cta--selected' : 'cta--select'),
38142
+ onClick: function () {
38143
+ return handleChange(result.code);
38144
+ }
38145
+ },
38146
+ selectedPackagingAccoResultCode === result.code
38147
+ ? translations === null || translations === void 0
38148
+ ? void 0
38149
+ : translations.SHARED.SELECTED
38150
+ : translations === null || translations === void 0
38151
+ ? void 0
38152
+ : translations.SHARED.SELECT
38153
+ )
38154
+ )
38155
+ );
38156
+ }
38016
38157
  return React__default['default'].createElement(
38017
38158
  'div',
38018
38159
  {
@@ -38096,12 +38237,12 @@ var HotelCard = function (_a) {
38096
38237
  'button',
38097
38238
  {
38098
38239
  type: 'button',
38099
- className: 'cta '.concat(selectedSearchResultId === result.id ? 'cta--selected' : 'cta--select'),
38240
+ className: 'cta '.concat(selectedPackagingAccoResultCode === result.code ? 'cta--selected' : 'cta--select'),
38100
38241
  onClick: function () {
38101
- return handleChange(result.id);
38242
+ return handleChange(result.code);
38102
38243
  }
38103
38244
  },
38104
- selectedSearchResultId === result.id
38245
+ selectedPackagingAccoResultCode === result.code
38105
38246
  ? translations === null || translations === void 0
38106
38247
  ? void 0
38107
38248
  : translations.SHARED.SELECTED
@@ -38116,7 +38257,7 @@ var HotelCard = function (_a) {
38116
38257
 
38117
38258
  var renderResults = function (results, context, cmsMap, activeTab, translations) {
38118
38259
  var renderedResults = results.map(function (result, index) {
38119
- var cmsItem = cmsMap.get(result.productId);
38260
+ var cmsItem = cmsMap.get(result.code);
38120
38261
  var mappedResult = mapSearchResult(result, cmsItem, context.languageCode, translations);
38121
38262
  if (
38122
38263
  (context === null || context === void 0 ? void 0 : context.showCustomCards) &&
@@ -38141,10 +38282,10 @@ var renderResults = function (results, context, cmsMap, activeTab, translations)
38141
38282
  );
38142
38283
  };
38143
38284
  var mapSearchResult = function (searchResult, cmsItem, languageCode, translations) {
38144
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
38285
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
38145
38286
  return {
38146
38287
  type: 'hotel',
38147
- id: searchResult.productId,
38288
+ code: searchResult.code,
38148
38289
  title:
38149
38290
  ((_b = (_a = cmsItem === null || cmsItem === void 0 ? void 0 : cmsItem.content) === null || _a === void 0 ? void 0 : _a.general) === null || _b === void 0
38150
38291
  ? void 0
@@ -38168,14 +38309,31 @@ var mapSearchResult = function (searchResult, cmsItem, languageCode, translation
38168
38309
  price: formatPrice(searchResult.price, searchResult.currencyCode, languageCode),
38169
38310
  ctaText: translations === null || translations === void 0 ? void 0 : translations.SRP.VIEW_DETAILS,
38170
38311
  days: ''
38171
- .concat(calculateNights(searchResult.stayFromDate, searchResult.stayToDate), ' ')
38312
+ .concat(calculateNights(new Date(searchResult.fromDate), new Date(searchResult.toDate)), ' ')
38172
38313
  .concat(translations === null || translations === void 0 ? void 0 : translations.SRP.NIGHTS),
38173
- accommodation: searchResult.accommodationName,
38174
- regime: searchResult.regimeName,
38314
+ accommodation:
38315
+ ((_l =
38316
+ (_k = (_j = lodash.first(searchResult.rooms)) === null || _j === void 0 ? void 0 : _j.options) === null || _k === void 0
38317
+ ? void 0
38318
+ : _k.find(function (x) {
38319
+ return x.isSelected;
38320
+ })) === null || _l === void 0
38321
+ ? void 0
38322
+ : _l.accommodationName) || '',
38323
+ regime:
38324
+ ((_p =
38325
+ (_o = (_m = lodash.first(searchResult.rooms)) === null || _m === void 0 ? void 0 : _m.options) === null || _o === void 0
38326
+ ? void 0
38327
+ : _o.find(function (x) {
38328
+ return x.isSelected;
38329
+ })) === null || _p === void 0
38330
+ ? void 0
38331
+ : _p.regimeName) || '',
38175
38332
  stars:
38176
- ((_k = (_j = cmsItem === null || cmsItem === void 0 ? void 0 : cmsItem.content) === null || _j === void 0 ? void 0 : _j.general) === null || _k === void 0
38333
+ (_r = (_q = cmsItem === null || cmsItem === void 0 ? void 0 : cmsItem.content) === null || _q === void 0 ? void 0 : _q.general) === null || _r === void 0
38177
38334
  ? void 0
38178
- : _k.stars) || searchResult.hotelStars
38335
+ : _r.stars,
38336
+ contents: searchResult.contents
38179
38337
  };
38180
38338
  };
38181
38339
  var HotelAccommodationResults = function (_a) {
@@ -38185,9 +38343,6 @@ var HotelAccommodationResults = function (_a) {
38185
38343
  if (!context) {
38186
38344
  return;
38187
38345
  }
38188
- if (context.showMockup) {
38189
- return showMocukups(context);
38190
- }
38191
38346
  var translations = getTranslations((_b = context === null || context === void 0 ? void 0 : context.languageCode) !== null && _b !== void 0 ? _b : 'en-GB');
38192
38347
  if (isLoading) {
38193
38348
  return React__default['default'].createElement(
@@ -38201,9 +38356,9 @@ var HotelAccommodationResults = function (_a) {
38201
38356
  var _d = reactRedux.useSelector(function (state) {
38202
38357
  return state.searchResults;
38203
38358
  }),
38204
- filteredResults = _d.filteredResults,
38359
+ filteredPackagingAccoResults = _d.filteredPackagingAccoResults,
38205
38360
  activeTab = _d.activeTab;
38206
- if (!filteredResults.length) {
38361
+ if (!filteredPackagingAccoResults.length) {
38207
38362
  return React__default['default'].createElement('div', { className: 'no-results' }, translations.SRP.NO_RESULTS);
38208
38363
  }
38209
38364
  var cmsMap = React__default['default'].useMemo(
@@ -38214,20 +38369,20 @@ var HotelAccommodationResults = function (_a) {
38214
38369
  ? void 0
38215
38370
  : _a.forEach(function (item) {
38216
38371
  var _a, _b, _c;
38217
- var id =
38372
+ var code =
38218
38373
  (_c =
38219
38374
  (_b = (_a = item === null || item === void 0 ? void 0 : item.content) === null || _a === void 0 ? void 0 : _a.general) === null || _b === void 0
38220
38375
  ? void 0
38221
38376
  : _b.product) === null || _c === void 0
38222
38377
  ? void 0
38223
- : _c.tideId;
38224
- if (id) map.set(id, item);
38378
+ : _c.code;
38379
+ if (code) map.set(code, item);
38225
38380
  });
38226
38381
  return map;
38227
38382
  },
38228
38383
  [context.cmsHotelData]
38229
38384
  );
38230
- var firstResult = filteredResults === null || filteredResults === void 0 ? void 0 : filteredResults[0];
38385
+ var firstResult = filteredPackagingAccoResults === null || filteredPackagingAccoResults === void 0 ? void 0 : filteredPackagingAccoResults[0];
38231
38386
  var firstResultDay = (firstResult === null || firstResult === void 0 ? void 0 : firstResult.fromDate)
38232
38387
  ? dateFns.format(dateFns.parseISO(firstResult.fromDate), 'd')
38233
38388
  : null;
@@ -38258,90 +38413,87 @@ var HotelAccommodationResults = function (_a) {
38258
38413
  )
38259
38414
  )
38260
38415
  ),
38261
- renderResults(filteredResults, context, cmsMap, activeTab, translations)
38416
+ renderResults(filteredPackagingAccoResults, context, cmsMap, activeTab, translations)
38262
38417
  );
38263
38418
  };
38264
- var showMocukups = function (context) {
38265
- var mockedHotelResults = [
38266
- {
38267
- type: 'hotel',
38268
- id: 2,
38269
- title: 'HTFSWILLCARL',
38270
- image: 'https://images.unsplash.com/photo-1573790387438-4da905039392?q=80&w=1925&auto=format&fit=crop',
38271
- description: '2 persoons kamer',
38272
- location: 'Tenerif, Spanje',
38273
- price: '$2244',
38274
- ctaText: 'Bekijk details',
38275
- days: '7 nights',
38276
- flightInfo: null,
38277
- accommodation: 'Hotel XYZ',
38278
- regime: 'All-inclusive',
38279
- stars: 5
38280
- },
38281
- {
38282
- type: 'hotel',
38283
- id: 3,
38284
- title: 'HTFSSOFTROCK',
38285
- image: 'https://images.unsplash.com/photo-1573790387438-4da905039392?q=80&w=1925&auto=format&fit=crop',
38286
- description: '3 persoons kamer',
38287
- location: 'Tenerif, Spanje',
38288
- price: '$2244',
38289
- ctaText: 'Bekijk details',
38290
- days: '7 nights',
38291
- flightInfo: null,
38292
- accommodation: 'Hotel ABC',
38293
- regime: 'Half-board',
38294
- stars: 4
38295
- },
38296
- {
38297
- type: 'hotel',
38298
- id: 4,
38299
- title: 'HTFSROYGAR',
38300
- image: 'https://images.unsplash.com/photo-1573790387438-4da905039392?q=80&w=1925&auto=format&fit=crop',
38301
- description: '4 persoons kamer',
38302
- location: 'Tenerif, Spanje',
38303
- price: '$2496',
38304
- ctaText: 'Bekijk details',
38305
- days: '7 nights',
38306
- flightInfo: null,
38307
- accommodation: 'Hotel DEF',
38308
- regime: 'Full-board',
38309
- stars: 5
38310
- },
38311
- {
38312
- type: 'hotel',
38313
- id: 5,
38314
- title: 'HTFSCONBEL',
38315
- image: 'https://images.unsplash.com/photo-1573790387438-4da905039392?q=80&w=1925&auto=format&fit=crop',
38316
- description: '5 persoons kamer',
38317
- location: 'Tenerif, Spanje',
38318
- price: '$6784.8',
38319
- ctaText: 'Bekijk details',
38320
- days: '7 nights',
38321
- flightInfo: null,
38322
- accommodation: 'Hotel GHI',
38323
- regime: 'All-inclusive',
38324
- stars: 5
38325
- }
38326
- ];
38327
- return React__default['default'].createElement(React__default['default'].Fragment, null, renderMockupResults(mockedHotelResults, context));
38328
- };
38329
- var renderMockupResults = function (results, context) {
38330
- var renderedResults = results.map(function (result, index) {
38331
- if (
38332
- (context === null || context === void 0 ? void 0 : context.showCustomCards) &&
38333
- (context === null || context === void 0 ? void 0 : context.customCardRenderer)
38334
- ) {
38335
- return React__default['default'].createElement(
38336
- 'div',
38337
- { key: ''.concat(result.id, '-').concat(index), className: 'search__result-card' },
38338
- context.customCardRenderer(result)
38339
- );
38340
- }
38341
- return React__default['default'].createElement(HotelCard, { key: ''.concat(result.id, '-').concat(index), result: result });
38342
- });
38343
- return React__default['default'].createElement('div', { className: 'search__results__cards' }, renderedResults);
38344
- };
38419
+ // const showMocukups = (context: any) => {
38420
+ // const mockedHotelResults = [
38421
+ // {
38422
+ // type: 'hotel',
38423
+ // id: 2,
38424
+ // title: 'HTFSWILLCARL',
38425
+ // image: 'https://images.unsplash.com/photo-1573790387438-4da905039392?q=80&w=1925&auto=format&fit=crop',
38426
+ // description: '2 persoons kamer',
38427
+ // location: 'Tenerif, Spanje',
38428
+ // price: '$2244',
38429
+ // ctaText: 'Bekijk details',
38430
+ // days: '7 nights',
38431
+ // flightInfo: null,
38432
+ // accommodation: 'Hotel XYZ',
38433
+ // regime: 'All-inclusive',
38434
+ // stars: 5
38435
+ // } as HotelResult,
38436
+ // {
38437
+ // type: 'hotel',
38438
+ // id: 3,
38439
+ // title: 'HTFSSOFTROCK',
38440
+ // image: 'https://images.unsplash.com/photo-1573790387438-4da905039392?q=80&w=1925&auto=format&fit=crop',
38441
+ // description: '3 persoons kamer',
38442
+ // location: 'Tenerif, Spanje',
38443
+ // price: '$2244',
38444
+ // ctaText: 'Bekijk details',
38445
+ // days: '7 nights',
38446
+ // flightInfo: null,
38447
+ // accommodation: 'Hotel ABC',
38448
+ // regime: 'Half-board',
38449
+ // stars: 4
38450
+ // } as HotelResult,
38451
+ // {
38452
+ // type: 'hotel',
38453
+ // id: 4,
38454
+ // title: 'HTFSROYGAR',
38455
+ // image: 'https://images.unsplash.com/photo-1573790387438-4da905039392?q=80&w=1925&auto=format&fit=crop',
38456
+ // description: '4 persoons kamer',
38457
+ // location: 'Tenerif, Spanje',
38458
+ // price: '$2496',
38459
+ // ctaText: 'Bekijk details',
38460
+ // days: '7 nights',
38461
+ // flightInfo: null,
38462
+ // accommodation: 'Hotel DEF',
38463
+ // regime: 'Full-board',
38464
+ // stars: 5
38465
+ // } as HotelResult,
38466
+ // {
38467
+ // type: 'hotel',
38468
+ // id: 5,
38469
+ // title: 'HTFSCONBEL',
38470
+ // image: 'https://images.unsplash.com/photo-1573790387438-4da905039392?q=80&w=1925&auto=format&fit=crop',
38471
+ // description: '5 persoons kamer',
38472
+ // location: 'Tenerif, Spanje',
38473
+ // price: '$6784.8',
38474
+ // ctaText: 'Bekijk details',
38475
+ // days: '7 nights',
38476
+ // flightInfo: null,
38477
+ // accommodation: 'Hotel GHI',
38478
+ // regime: 'All-inclusive',
38479
+ // stars: 5
38480
+ // } as HotelResult
38481
+ // ] as HotelResult[];
38482
+ // return <>{renderMockupResults(mockedHotelResults, context)}</>;
38483
+ // };
38484
+ // const renderMockupResults = (results: any[], context: any) => {
38485
+ // const renderedResults = results.map((result, index) => {
38486
+ // if (context?.showCustomCards && context?.customCardRenderer) {
38487
+ // return (
38488
+ // <div key={`${result.id}-${index}`} className="search__result-card">
38489
+ // {context.customCardRenderer(result)}
38490
+ // </div>
38491
+ // );
38492
+ // }
38493
+ // return <HotelCard key={`${result.id}-${index}`} result={result} />;
38494
+ // });
38495
+ // return <div className="search__results__cards">{renderedResults}</div>;
38496
+ // };
38345
38497
 
38346
38498
  var RoundTripResults = function () {
38347
38499
  return React__default['default'].createElement(
@@ -38601,91 +38753,6 @@ var RoundTripResults = function () {
38601
38753
  );
38602
38754
  };
38603
38755
 
38604
- var enrichFiltersWithResults = function (results, filters, tags) {
38605
- if (!results || results.length === 0 || !filters) {
38606
- return filters !== null && filters !== void 0 ? filters : [];
38607
- }
38608
- return filters.map(function (filter) {
38609
- var updatedFilter = __assign({}, filter);
38610
- if (filter.property === 'price' && (filter.min == null || filter.max == null)) {
38611
- var prices = results
38612
- .map(function (r) {
38613
- var _a;
38614
- return (_a = r.price) !== null && _a !== void 0 ? _a : 0;
38615
- })
38616
- .filter(function (p) {
38617
- return p > 0;
38618
- });
38619
- if (prices.length > 0) {
38620
- updatedFilter.min = Math.floor(Math.min.apply(Math, prices));
38621
- updatedFilter.max = Math.ceil(Math.max.apply(Math, prices));
38622
- }
38623
- }
38624
- if (filter.property === 'accommodation') {
38625
- var map_1 = new Map();
38626
- results.forEach(function (r) {
38627
- if (r.accommodationCode) {
38628
- map_1.set(r.accommodationCode, {
38629
- name: r.accommodationName,
38630
- code: r.accommodationCode
38631
- });
38632
- }
38633
- });
38634
- updatedFilter.options = Array.from(map_1.values()).map(function (accommodation) {
38635
- var _a;
38636
- return {
38637
- label: (_a = accommodation.name) !== null && _a !== void 0 ? _a : accommodation.code,
38638
- value: accommodation.code,
38639
- isChecked: false
38640
- };
38641
- });
38642
- }
38643
- if (filter.property === 'regime') {
38644
- var map_2 = new Map();
38645
- results.forEach(function (r) {
38646
- if (r.regimeCode) {
38647
- map_2.set(r.regimeCode, {
38648
- name: r.regimeName,
38649
- code: r.regimeCode
38650
- });
38651
- }
38652
- });
38653
- updatedFilter.options = Array.from(map_2.values()).map(function (regime) {
38654
- var _a;
38655
- return {
38656
- label: (_a = regime.name) !== null && _a !== void 0 ? _a : regime.code,
38657
- value: regime.code,
38658
- isChecked: false
38659
- };
38660
- });
38661
- }
38662
- if (filter.property === 'theme') {
38663
- var map_3 = new Map();
38664
- results.forEach(function (r) {
38665
- var _a;
38666
- (_a = r.tagIds) === null || _a === void 0
38667
- ? void 0
38668
- : _a.forEach(function (tagId) {
38669
- var tag = tags.find(function (t) {
38670
- return t.id === tagId;
38671
- });
38672
- if (tag && tag.id != null && tag.name != null) {
38673
- map_3.set(tag.id, { name: tag.name, id: tag.id });
38674
- }
38675
- });
38676
- });
38677
- updatedFilter.options = Array.from(map_3.values()).map(function (theme) {
38678
- return {
38679
- label: theme.name,
38680
- value: theme.id,
38681
- isChecked: false
38682
- };
38683
- });
38684
- }
38685
- return updatedFilter;
38686
- });
38687
- };
38688
-
38689
38756
  var ticksToMinutes = function (ticks) {
38690
38757
  return Math.floor(ticks / 600000000);
38691
38758
  };
@@ -40900,7 +40967,7 @@ var FlightResultsContainer = function (_a) {
40900
40967
  React.useEffect(
40901
40968
  function () {
40902
40969
  if (!(context === null || context === void 0 ? void 0 : context.showMockup)) {
40903
- if ((context === null || context === void 0 ? void 0 : context.type) === exports.PortalQsmType.Flight && isHubReady) {
40970
+ if ((context === null || context === void 0 ? void 0 : context.searchConfiguration.qsmType) === build.PortalQsmType.Flight && isHubReady) {
40904
40971
  onFlightSearch();
40905
40972
  }
40906
40973
  }
@@ -41040,7 +41107,7 @@ var FlightResultsContainer = function (_a) {
41040
41107
  'div',
41041
41108
  { className: 'search__results__wrapper' },
41042
41109
  flightsLoading && React__default['default'].createElement(Spinner, null),
41043
- (context === null || context === void 0 ? void 0 : context.type) == exports.PortalQsmType.Flight &&
41110
+ (context === null || context === void 0 ? void 0 : context.searchConfiguration.qsmType) == build.PortalQsmType.Flight &&
41044
41111
  (context === null || context === void 0 ? void 0 : context.showFlightAccommodationResults) &&
41045
41112
  results &&
41046
41113
  results.length > 0 &&
@@ -41453,6 +41520,165 @@ var GroupTourResults = function (_a) {
41453
41520
  );
41454
41521
  };
41455
41522
 
41523
+ var enrichFiltersWithResults = function (results, filters, tags) {
41524
+ if (!results || results.length === 0 || !filters) {
41525
+ return filters !== null && filters !== void 0 ? filters : [];
41526
+ }
41527
+ return filters.map(function (filter) {
41528
+ var updatedFilter = __assign({}, filter);
41529
+ if (filter.property === 'price' && (filter.min == null || filter.max == null)) {
41530
+ var prices = results
41531
+ .map(function (r) {
41532
+ var _a;
41533
+ return (_a = r.price) !== null && _a !== void 0 ? _a : 0;
41534
+ })
41535
+ .filter(function (p) {
41536
+ return p > 0;
41537
+ });
41538
+ if (prices.length > 0) {
41539
+ updatedFilter.min = Math.floor(Math.min.apply(Math, prices));
41540
+ updatedFilter.max = Math.ceil(Math.max.apply(Math, prices));
41541
+ }
41542
+ }
41543
+ if (filter.property === 'accommodation') {
41544
+ var map_1 = new Map();
41545
+ results.forEach(function (r) {
41546
+ if (r.accommodationCode) {
41547
+ map_1.set(r.accommodationCode, {
41548
+ name: r.accommodationName,
41549
+ code: r.accommodationCode
41550
+ });
41551
+ }
41552
+ });
41553
+ updatedFilter.options = Array.from(map_1.values()).map(function (accommodation) {
41554
+ var _a;
41555
+ return {
41556
+ label: (_a = accommodation.name) !== null && _a !== void 0 ? _a : accommodation.code,
41557
+ value: accommodation.code,
41558
+ isChecked: false
41559
+ };
41560
+ });
41561
+ }
41562
+ if (filter.property === 'regime') {
41563
+ var map_2 = new Map();
41564
+ results.forEach(function (r) {
41565
+ if (r.regimeCode) {
41566
+ map_2.set(r.regimeCode, {
41567
+ name: r.regimeName,
41568
+ code: r.regimeCode
41569
+ });
41570
+ }
41571
+ });
41572
+ updatedFilter.options = Array.from(map_2.values()).map(function (regime) {
41573
+ var _a;
41574
+ return {
41575
+ label: (_a = regime.name) !== null && _a !== void 0 ? _a : regime.code,
41576
+ value: regime.code,
41577
+ isChecked: false
41578
+ };
41579
+ });
41580
+ }
41581
+ if (filter.property === 'theme') {
41582
+ var map_3 = new Map();
41583
+ results.forEach(function (r) {
41584
+ var _a;
41585
+ (_a = r.tagIds) === null || _a === void 0
41586
+ ? void 0
41587
+ : _a.forEach(function (tagId) {
41588
+ var tag = tags.find(function (t) {
41589
+ return t.id === tagId;
41590
+ });
41591
+ if (tag && tag.id != null && tag.name != null) {
41592
+ map_3.set(tag.id, { name: tag.name, id: tag.id });
41593
+ }
41594
+ });
41595
+ });
41596
+ updatedFilter.options = Array.from(map_3.values()).map(function (theme) {
41597
+ return {
41598
+ label: theme.name,
41599
+ value: theme.id,
41600
+ isChecked: false
41601
+ };
41602
+ });
41603
+ }
41604
+ return updatedFilter;
41605
+ });
41606
+ };
41607
+ var enrichFiltersWithPackageAccoResults = function (results, filters, tags) {
41608
+ if (!results || results.length === 0 || !filters) {
41609
+ return filters !== null && filters !== void 0 ? filters : [];
41610
+ }
41611
+ return filters.map(function (filter) {
41612
+ var updatedFilter = __assign({}, filter);
41613
+ if (filter.property === 'price' && (filter.min == null || filter.max == null)) {
41614
+ var prices = results
41615
+ .map(function (r) {
41616
+ var _a;
41617
+ return (_a = r.price) !== null && _a !== void 0 ? _a : 0;
41618
+ })
41619
+ .filter(function (p) {
41620
+ return p > 0;
41621
+ });
41622
+ if (prices.length > 0) {
41623
+ updatedFilter.min = Math.floor(Math.min.apply(Math, prices));
41624
+ updatedFilter.max = Math.ceil(Math.max.apply(Math, prices));
41625
+ }
41626
+ }
41627
+ if (filter.property === 'accommodation') {
41628
+ var map_4 = new Map();
41629
+ results.forEach(function (r) {
41630
+ var rooms = lodash.flatMap(r.rooms);
41631
+ if (rooms) {
41632
+ rooms.map(function (room) {
41633
+ room.options.map(function (option) {
41634
+ if (option.accommodationCode) {
41635
+ map_4.set(option.accommodationCode, {
41636
+ name: option.accommodationName,
41637
+ code: option.accommodationCode
41638
+ });
41639
+ }
41640
+ });
41641
+ });
41642
+ }
41643
+ });
41644
+ updatedFilter.options = Array.from(map_4.values()).map(function (accommodation) {
41645
+ var _a;
41646
+ return {
41647
+ label: (_a = accommodation.name) !== null && _a !== void 0 ? _a : accommodation.code,
41648
+ value: accommodation.code,
41649
+ isChecked: false
41650
+ };
41651
+ });
41652
+ }
41653
+ if (filter.property === 'regime') {
41654
+ var map_5 = new Map();
41655
+ results.forEach(function (r) {
41656
+ var rooms = lodash.flatMap(r.rooms);
41657
+ if (rooms) {
41658
+ rooms.map(function (room) {
41659
+ room.options.map(function (option) {
41660
+ if (option.regimeCode) {
41661
+ map_5.set(option.regimeCode, {
41662
+ name: option.regimeName,
41663
+ code: option.regimeCode
41664
+ });
41665
+ }
41666
+ });
41667
+ });
41668
+ }
41669
+ });
41670
+ updatedFilter.options = Array.from(map_5.values()).map(function (regime) {
41671
+ var _a;
41672
+ return {
41673
+ label: (_a = regime.name) !== null && _a !== void 0 ? _a : regime.code,
41674
+ value: regime.code,
41675
+ isChecked: false
41676
+ };
41677
+ });
41678
+ }
41679
+ return updatedFilter;
41680
+ });
41681
+ };
41456
41682
  var applyFilters = function (results, filters) {
41457
41683
  return results.filter(function (r) {
41458
41684
  return filters.every(function (filter) {
@@ -41518,6 +41744,61 @@ var applyFilters = function (results, filters) {
41518
41744
  });
41519
41745
  });
41520
41746
  };
41747
+ var applyFiltersToPackageAccoResults = function (results, filters) {
41748
+ return results.filter(function (r) {
41749
+ return filters.every(function (filter) {
41750
+ var _a, _b;
41751
+ if (!filter.isFrontendFilter) return true;
41752
+ // ACCOMMODATION
41753
+ if (filter.property === 'accommodation') {
41754
+ var selected_2 =
41755
+ (_a = filter.options) === null || _a === void 0
41756
+ ? void 0
41757
+ : _a
41758
+ .filter(function (o) {
41759
+ return o.isChecked;
41760
+ })
41761
+ .map(function (o) {
41762
+ return o.value;
41763
+ });
41764
+ if (!selected_2 || selected_2.length === 0) return true;
41765
+ var roomOptions = r.rooms.flatMap(function (room) {
41766
+ return room.options;
41767
+ });
41768
+ return roomOptions.some(function (option) {
41769
+ return selected_2.includes(option.accommodationCode);
41770
+ });
41771
+ }
41772
+ // REGIME
41773
+ if (filter.property === 'regime') {
41774
+ var selected_3 =
41775
+ (_b = filter.options) === null || _b === void 0
41776
+ ? void 0
41777
+ : _b
41778
+ .filter(function (o) {
41779
+ return o.isChecked;
41780
+ })
41781
+ .map(function (o) {
41782
+ return o.value;
41783
+ });
41784
+ if (!selected_3 || selected_3.length === 0) return true;
41785
+ var roomOptions = r.rooms.flatMap(function (room) {
41786
+ return room.options;
41787
+ });
41788
+ return roomOptions.some(function (option) {
41789
+ return selected_3.includes(option.regimeCode);
41790
+ });
41791
+ }
41792
+ // PRICE
41793
+ if (filter.property === 'price') {
41794
+ if (filter.selectedMin != null && r.price < filter.selectedMin) return false;
41795
+ if (filter.selectedMax != null && r.price > filter.selectedMax) return false;
41796
+ return true;
41797
+ }
41798
+ return true;
41799
+ });
41800
+ });
41801
+ };
41521
41802
 
41522
41803
  var SearchResultsContainer = function () {
41523
41804
  var _a;
@@ -41615,11 +41896,12 @@ var SearchResultsContainer = function () {
41615
41896
  payload: {
41616
41897
  catalogueIds: (_a = context.tideConnection.catalogueIds) !== null && _a !== void 0 ? _a : [],
41617
41898
  serviceType:
41618
- context.type === exports.PortalQsmType.Accommodation || context.type === exports.PortalQsmType.AccommodationAndFlight
41899
+ context.searchConfiguration.qsmType === build.PortalQsmType.Accommodation ||
41900
+ context.searchConfiguration.qsmType === build.PortalQsmType.AccommodationAndFlight
41619
41901
  ? 3
41620
- : context.type === exports.PortalQsmType.Flight
41902
+ : context.searchConfiguration.qsmType === build.PortalQsmType.Flight
41621
41903
  ? 7
41622
- : context.type === exports.PortalQsmType.RoundTrip
41904
+ : context.searchConfiguration.qsmType === build.PortalQsmType.RoundTrip
41623
41905
  ? 1
41624
41906
  : 0,
41625
41907
  searchType: 0,
@@ -41689,14 +41971,15 @@ var SearchResultsContainer = function () {
41689
41971
  payload: {
41690
41972
  catalogueIds: (_a = context.tideConnection.catalogueIds) !== null && _a !== void 0 ? _a : [],
41691
41973
  serviceType:
41692
- context.type === exports.PortalQsmType.Accommodation || context.type === exports.PortalQsmType.AccommodationAndFlight
41974
+ context.searchConfiguration.qsmType === build.PortalQsmType.Accommodation ||
41975
+ context.searchConfiguration.qsmType === build.PortalQsmType.AccommodationAndFlight
41693
41976
  ? 3
41694
- : context.type === exports.PortalQsmType.Flight
41977
+ : context.searchConfiguration.qsmType === build.PortalQsmType.Flight
41695
41978
  ? 7
41696
- : context.type === exports.PortalQsmType.RoundTrip
41979
+ : context.searchConfiguration.qsmType === build.PortalQsmType.RoundTrip
41697
41980
  ? 1
41698
41981
  : undefined,
41699
- searchType: context.type === exports.PortalQsmType.GroupTour ? 1 : 0,
41982
+ searchType: context.searchConfiguration.qsmType === build.PortalQsmType.GroupTour ? 1 : 0,
41700
41983
  destination: {
41701
41984
  id: Number(destinationId),
41702
41985
  isCountry: destinationIsCountry,
@@ -41709,7 +41992,7 @@ var SearchResultsContainer = function () {
41709
41992
  toDate: to,
41710
41993
  earliestFromOffset: 0,
41711
41994
  latestToOffset: 0,
41712
- includeFlights: context.type === exports.PortalQsmType.AccommodationAndFlight ? true : false,
41995
+ includeFlights: context.searchConfiguration.qsmType === build.PortalQsmType.AccommodationAndFlight ? true : false,
41713
41996
  // regimeCodes:
41714
41997
  // filters
41715
41998
  // .find((f) => f.property === 'regime')
@@ -41717,7 +42000,7 @@ var SearchResultsContainer = function () {
41717
42000
  // .flatMap((o) => o.value.toString()) || [],
41718
42001
  // minPrice: filters.find((f) => f.property === 'price')?.selectedMin,
41719
42002
  // maxPrice: filters.find((f) => f.property === 'price')?.selectedMax,
41720
- useExactDates: (context === null || context === void 0 ? void 0 : context.type) === exports.PortalQsmType.GroupTour ? false : true,
42003
+ useExactDates: (context === null || context === void 0 ? void 0 : context.searchConfiguration.qsmType) === build.PortalQsmType.GroupTour ? false : true,
41721
42004
  onlyCachedResults: false,
41722
42005
  includeAllAllotments: true,
41723
42006
  productIds: hotel ? [hotel] : [],
@@ -41783,6 +42066,96 @@ var SearchResultsContainer = function () {
41783
42066
  });
41784
42067
  return requestRooms;
41785
42068
  };
42069
+ var buildPackagingAccommodationRequestFromQueryParams = function (params) {
42070
+ var _a, _b;
42071
+ var from = getDateFromParams(params, 'fromDate');
42072
+ var to = getDateFromParams(params, 'toDate');
42073
+ var rooms = getRoomsFromParams(params, 'rooms');
42074
+ var country = getNumberFromParams(params, 'country');
42075
+ var region = getNumberFromParams(params, 'region');
42076
+ var oord = getNumberFromParams(params, 'oord');
42077
+ var city = getNumberFromParams(params, 'location');
42078
+ var hotel = getNumberFromParams(params, 'hotel');
42079
+ var tagId = getNumberFromParams(params, 'tagId');
42080
+ var agentId = getNumberFromParams(params, 'agentId');
42081
+ if (!from || !to) {
42082
+ console.error('Missing fromDate or toDate in query params, using default values');
42083
+ return null;
42084
+ }
42085
+ if (typeof window !== 'undefined') {
42086
+ window.scrollTo(0, 0);
42087
+ }
42088
+ var destinationId = null;
42089
+ var destinationIsCountry = false;
42090
+ var destinationIsRegion = false;
42091
+ var destinationIsOord = false;
42092
+ var destinationIsLocation = false;
42093
+ if (country) {
42094
+ destinationId = country;
42095
+ destinationIsCountry = true;
42096
+ } else if (region) {
42097
+ destinationId = region;
42098
+ destinationIsRegion = true;
42099
+ } else if (oord) {
42100
+ destinationId = oord;
42101
+ destinationIsOord = true;
42102
+ } else if (city) {
42103
+ destinationId = city;
42104
+ destinationIsLocation = true;
42105
+ }
42106
+ var searchRequest = {
42107
+ officeId: 1,
42108
+ agentId: agentId !== null && agentId !== void 0 ? agentId : null,
42109
+ catalogueId: (_a = context.searchConfiguration.defaultCatalogueId) !== null && _a !== void 0 ? _a : 0,
42110
+ searchConfigurationId: context.searchConfiguration.id,
42111
+ language: (_b = context.languageCode) !== null && _b !== void 0 ? _b : 'en-GB',
42112
+ servicesType: 3, // accommodation
42113
+ fromDate: from,
42114
+ toDate: to,
42115
+ destination: {
42116
+ id: Number(destinationId),
42117
+ isCountry: destinationIsCountry,
42118
+ isRegion: destinationIsRegion,
42119
+ isOord: destinationIsOord,
42120
+ isLocation: destinationIsLocation
42121
+ },
42122
+ productCode: hotel ? hotel.toString() : '',
42123
+ rooms: getPackagingRequestRooms(rooms),
42124
+ tagIds: tagId ? [tagId] : []
42125
+ };
42126
+ console.log('Search request for packaging accommodation from query params', searchRequest);
42127
+ return searchRequest;
42128
+ };
42129
+ var getPackagingRequestRooms = function (rooms) {
42130
+ if (!rooms) {
42131
+ // Fall back to 2 adults
42132
+ var room = { index: 0, travellers: [] };
42133
+ lodash.range(0, 2).forEach(function () {
42134
+ room.travellers.push({
42135
+ age: 30
42136
+ });
42137
+ });
42138
+ return [room];
42139
+ }
42140
+ var requestRooms =
42141
+ rooms === null || rooms === void 0
42142
+ ? void 0
42143
+ : rooms.map(function (x, i) {
42144
+ var room = { index: i, travellers: [] };
42145
+ lodash.range(0, x.adults).forEach(function () {
42146
+ room.travellers.push({
42147
+ age: 30
42148
+ });
42149
+ });
42150
+ x.childAges.forEach(function (x) {
42151
+ room.travellers.push({
42152
+ age: x
42153
+ });
42154
+ });
42155
+ return room;
42156
+ });
42157
+ return requestRooms;
42158
+ };
41786
42159
  React.useEffect(
41787
42160
  function () {
41788
42161
  if (typeof document !== 'undefined') {
@@ -41854,7 +42227,7 @@ var SearchResultsContainer = function () {
41854
42227
  dispatch(setSelectedSearchResult(matching.productId));
41855
42228
  }
41856
42229
  } else {
41857
- if (context.type === exports.PortalQsmType.AccommodationAndFlight) {
42230
+ if (context.searchConfiguration.qsmType === build.PortalQsmType.AccommodationAndFlight) {
41858
42231
  dispatch(setSelectedSearchResult((_b = packageSearchResults[0]) === null || _b === void 0 ? void 0 : _b.productId));
41859
42232
  }
41860
42233
  }
@@ -41872,14 +42245,71 @@ var SearchResultsContainer = function () {
41872
42245
  });
41873
42246
  });
41874
42247
  };
42248
+ var runHotelSearch = function () {
42249
+ return __awaiter(void 0, void 0, void 0, function () {
42250
+ var config, params, searchRequest, rq, packageAccoSearchResults, enrichedFilters, initialFilteredResults, err_2;
42251
+ var _a;
42252
+ return __generator(this, function (_b) {
42253
+ switch (_b.label) {
42254
+ case 0:
42255
+ dispatch(setIsLoading(true));
42256
+ _b.label = 1;
42257
+ case 1:
42258
+ _b.trys.push([1, 3, , 4]);
42259
+ if (!context) {
42260
+ return [2 /*return*/];
42261
+ }
42262
+ config = {
42263
+ host: context.tideConnection.host,
42264
+ apiKey: context.tideConnection.apiKey
42265
+ };
42266
+ params = new URLSearchParams(location.search);
42267
+ searchRequest = void 0;
42268
+ rq = buildPackagingAccommodationRequestFromQueryParams(params);
42269
+ if (!rq) {
42270
+ throw new Error('Invalid search parameters');
42271
+ }
42272
+ searchRequest = rq;
42273
+ return [4 /*yield*/, build.searchPackagingAccommodations(config, searchRequest)];
42274
+ case 2:
42275
+ packageAccoSearchResults = _b.sent();
42276
+ console.log('package Acco SearchResults', packageAccoSearchResults);
42277
+ enrichedFilters = enrichFiltersWithPackageAccoResults(
42278
+ packageAccoSearchResults,
42279
+ context.filters,
42280
+ (_a = context.tags) !== null && _a !== void 0 ? _a : []
42281
+ );
42282
+ if (!initialFiltersSet) {
42283
+ dispatch(resetFilters(enrichedFilters));
42284
+ setInitialFilters(enrichedFilters);
42285
+ setInitialFiltersSet(true);
42286
+ }
42287
+ dispatch(setPackagingAccoResults(packageAccoSearchResults));
42288
+ initialFilteredResults = applyFiltersToPackageAccoResults(packageAccoSearchResults, filters);
42289
+ dispatch(setFilteredPackagingAccoResults(initialFilteredResults));
42290
+ dispatch(setIsLoading(false));
42291
+ return [3 /*break*/, 4];
42292
+ case 3:
42293
+ err_2 = _b.sent();
42294
+ console.error('Search failed', err_2);
42295
+ dispatch(setIsLoading(false));
42296
+ return [3 /*break*/, 4];
42297
+ case 4:
42298
+ return [2 /*return*/];
42299
+ }
42300
+ });
42301
+ });
42302
+ };
41875
42303
  if (!(context === null || context === void 0 ? void 0 : context.showMockup)) {
41876
42304
  if (
41877
- (context === null || context === void 0 ? void 0 : context.type) === exports.PortalQsmType.AccommodationAndFlight ||
41878
- (context === null || context === void 0 ? void 0 : context.type) === exports.PortalQsmType.Accommodation ||
41879
- (context === null || context === void 0 ? void 0 : context.type) === exports.PortalQsmType.GroupTour
42305
+ (context === null || context === void 0 ? void 0 : context.searchConfiguration.qsmType) === build.PortalQsmType.AccommodationAndFlight ||
42306
+ (context === null || context === void 0 ? void 0 : context.searchConfiguration.qsmType) === build.PortalQsmType.GroupTour
41880
42307
  ) {
41881
42308
  runSearch();
41882
42309
  }
42310
+ if ((context === null || context === void 0 ? void 0 : context.searchConfiguration.qsmType) === build.PortalQsmType.Accommodation) {
42311
+ runHotelSearch();
42312
+ }
41883
42313
  }
41884
42314
  },
41885
42315
  [location.search]
@@ -41889,15 +42319,15 @@ var SearchResultsContainer = function () {
41889
42319
  function () {
41890
42320
  var fetchPackageDetails = function () {
41891
42321
  return __awaiter(void 0, void 0, void 0, function () {
41892
- var config, selectedItem, params, entryId, requestRooms, rooms, detailsRequest, detailsResponse, detailsWLResponse, err_2;
42322
+ var config, selectedItem, params, entryId, requestRooms, rooms, detailsRequest, detailsResponse, detailsWLResponse, err_3;
41893
42323
  var _a, _b;
41894
42324
  return __generator(this, function (_c) {
41895
42325
  switch (_c.label) {
41896
42326
  case 0:
41897
42327
  if (!selectedSearchResultId || !context) return [2 /*return*/];
41898
42328
  if (
41899
- (context === null || context === void 0 ? void 0 : context.type) === exports.PortalQsmType.Accommodation ||
41900
- (context === null || context === void 0 ? void 0 : context.type) === exports.PortalQsmType.GroupTour
42329
+ (context === null || context === void 0 ? void 0 : context.searchConfiguration.qsmType) === build.PortalQsmType.Accommodation ||
42330
+ (context === null || context === void 0 ? void 0 : context.searchConfiguration.qsmType) === build.PortalQsmType.GroupTour
41901
42331
  ) {
41902
42332
  handleFlyInToggle(true);
41903
42333
  }
@@ -41933,7 +42363,7 @@ var SearchResultsContainer = function () {
41933
42363
  productCode: selectedItem.code,
41934
42364
  fromDate: selectedItem.fromDate,
41935
42365
  toDate: selectedItem.toDate,
41936
- includeFlights: context.type === exports.PortalQsmType.AccommodationAndFlight ? true : false,
42366
+ includeFlights: context.searchConfiguration.qsmType === build.PortalQsmType.AccommodationAndFlight ? true : false,
41937
42367
  includeHotels: true,
41938
42368
  includePaxTypes: true,
41939
42369
  checkExternalAvailability: true,
@@ -41976,8 +42406,8 @@ var SearchResultsContainer = function () {
41976
42406
  case 5:
41977
42407
  return [3 /*break*/, 7];
41978
42408
  case 6:
41979
- err_2 = _c.sent();
41980
- console.error('Failed to fetch package details', err_2);
42409
+ err_3 = _c.sent();
42410
+ console.error('Failed to fetch package details', err_3);
41981
42411
  return [3 /*break*/, 7];
41982
42412
  case 7:
41983
42413
  return [2 /*return*/];
@@ -42006,14 +42436,14 @@ var SearchResultsContainer = function () {
42006
42436
  React__default['default'].createElement(
42007
42437
  'div',
42008
42438
  { className: 'search__container' },
42009
- context.type === exports.PortalQsmType.Flight &&
42439
+ context.searchConfiguration.qsmType === build.PortalQsmType.Flight &&
42010
42440
  React__default['default'].createElement(
42011
42441
  FlightSearchProvider,
42012
42442
  { tideConnection: context.tideConnection },
42013
42443
  React__default['default'].createElement(FlightResultsContainer, { isMobile: isMobile }),
42014
42444
  React__default['default'].createElement(FlyIn, {
42015
42445
  title: 'Select your fare',
42016
- srpType: context.type,
42446
+ srpType: context.searchConfiguration.qsmType,
42017
42447
  isOpen: flyInIsOpen,
42018
42448
  setIsOpen: handleFlyInToggle,
42019
42449
  onPanelRef: function (el) {
@@ -42021,14 +42451,14 @@ var SearchResultsContainer = function () {
42021
42451
  }
42022
42452
  })
42023
42453
  ),
42024
- (context.type === exports.PortalQsmType.AccommodationAndFlight ||
42025
- context.type === exports.PortalQsmType.Accommodation ||
42026
- context.type === exports.PortalQsmType.GroupTour ||
42027
- context.type === exports.PortalQsmType.RoundTrip) &&
42454
+ (context.searchConfiguration.qsmType === build.PortalQsmType.AccommodationAndFlight ||
42455
+ context.searchConfiguration.qsmType === build.PortalQsmType.Accommodation ||
42456
+ context.searchConfiguration.qsmType === build.PortalQsmType.GroupTour ||
42457
+ context.searchConfiguration.qsmType === build.PortalQsmType.RoundTrip) &&
42028
42458
  React__default['default'].createElement(
42029
42459
  React__default['default'].Fragment,
42030
42460
  null,
42031
- context.type != exports.PortalQsmType.AccommodationAndFlight &&
42461
+ context.searchConfiguration.qsmType != build.PortalQsmType.AccommodationAndFlight &&
42032
42462
  context.showFilters &&
42033
42463
  React__default['default'].createElement(Filters, {
42034
42464
  initialFilters: initialFilters,
@@ -42040,7 +42470,7 @@ var SearchResultsContainer = function () {
42040
42470
  // handleApplyFilters={() => setSearchTrigger((prev) => prev + 1)}
42041
42471
  isLoading: isLoading
42042
42472
  }),
42043
- context.type === exports.PortalQsmType.AccommodationAndFlight &&
42473
+ context.searchConfiguration.qsmType === build.PortalQsmType.AccommodationAndFlight &&
42044
42474
  React__default['default'].createElement(Itinerary, {
42045
42475
  isOpen: itineraryOpen,
42046
42476
  handleSetIsOpen: function () {
@@ -42058,7 +42488,7 @@ var SearchResultsContainer = function () {
42058
42488
  React__default['default'].createElement(
42059
42489
  'div',
42060
42490
  { className: 'search__results__actions' },
42061
- context.type != exports.PortalQsmType.AccommodationAndFlight &&
42491
+ context.searchConfiguration.qsmType != build.PortalQsmType.AccommodationAndFlight &&
42062
42492
  context.showFilters &&
42063
42493
  React__default['default'].createElement(
42064
42494
  'div',
@@ -42071,7 +42501,7 @@ var SearchResultsContainer = function () {
42071
42501
  React__default['default'].createElement(Icon$1, { name: 'ui-filter', className: 'mobile-filters-button__icon', height: 16 }),
42072
42502
  translations.SRP.FILTERS
42073
42503
  ),
42074
- context.type === exports.PortalQsmType.AccommodationAndFlight &&
42504
+ context.searchConfiguration.qsmType === build.PortalQsmType.AccommodationAndFlight &&
42075
42505
  React__default['default'].createElement(
42076
42506
  'div',
42077
42507
  {
@@ -42131,8 +42561,9 @@ var SearchResultsContainer = function () {
42131
42561
  { className: 'search__results__wrapper' },
42132
42562
  context.showTabViews && React__default['default'].createElement(TabViews, null),
42133
42563
  context.showRoundTripResults && context.showMockup && React__default['default'].createElement(RoundTripResults, null),
42134
- context.type === exports.PortalQsmType.GroupTour && React__default['default'].createElement(GroupTourResults, { isLoading: isLoading }),
42135
- context.type === exports.PortalQsmType.AccommodationAndFlight &&
42564
+ context.searchConfiguration.qsmType === build.PortalQsmType.GroupTour &&
42565
+ React__default['default'].createElement(GroupTourResults, { isLoading: isLoading }),
42566
+ context.searchConfiguration.qsmType === build.PortalQsmType.AccommodationAndFlight &&
42136
42567
  context.showFlightResults &&
42137
42568
  (bookingPackageDetails === null || bookingPackageDetails === void 0 ? void 0 : bookingPackageDetails.outwardFlights) &&
42138
42569
  React__default['default'].createElement(FlightResults, {
@@ -42140,7 +42571,7 @@ var SearchResultsContainer = function () {
42140
42571
  isDeparture: true
42141
42572
  }),
42142
42573
  context.showHotelAccommodationResults && React__default['default'].createElement(HotelAccommodationResults, { isLoading: isLoading }),
42143
- context.type === exports.PortalQsmType.AccommodationAndFlight &&
42574
+ context.searchConfiguration.qsmType === build.PortalQsmType.AccommodationAndFlight &&
42144
42575
  context.showFlightResults &&
42145
42576
  (bookingPackageDetails === null || bookingPackageDetails === void 0 ? void 0 : bookingPackageDetails.returnFlights) &&
42146
42577
  React__default['default'].createElement(FlightResults, {
@@ -42151,7 +42582,7 @@ var SearchResultsContainer = function () {
42151
42582
  ),
42152
42583
  React__default['default'].createElement(FlyIn, {
42153
42584
  title: ''.concat(translations.SRP.SELECT, ' ').concat(translations.SRP.ACCOMMODATION),
42154
- srpType: context.type,
42585
+ srpType: context.searchConfiguration.qsmType,
42155
42586
  isOpen: flyInIsOpen,
42156
42587
  setIsOpen: handleFlyInToggle,
42157
42588
  onPanelRef: function (el) {