@qite/tide-booking-component 1.4.74 → 1.4.76

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 (30) hide show
  1. package/build/build-cjs/index.js +148 -86
  2. package/build/build-cjs/src/qsm/store/qsm-slice.d.ts +3 -3
  3. package/build/build-cjs/src/qsm/types.d.ts +2 -2
  4. package/build/build-cjs/src/search-results/types.d.ts +2 -2
  5. package/build/build-cjs/src/shared/components/flyin/flyin.d.ts +2 -2
  6. package/build/build-cjs/src/shared/types.d.ts +13 -12
  7. package/build/build-esm/index.js +145 -86
  8. package/build/build-esm/src/qsm/store/qsm-slice.d.ts +3 -3
  9. package/build/build-esm/src/qsm/types.d.ts +2 -2
  10. package/build/build-esm/src/search-results/types.d.ts +2 -2
  11. package/build/build-esm/src/shared/components/flyin/flyin.d.ts +2 -2
  12. package/build/build-esm/src/shared/types.d.ts +13 -12
  13. package/package.json +2 -2
  14. package/src/content/features/content-page/content-page-self-contained.tsx +2 -2
  15. package/src/qsm/components/QSMContainer/qsm-container.tsx +59 -29
  16. package/src/qsm/components/travel-input/index.tsx +2 -1
  17. package/src/qsm/components/travel-input-group/index.tsx +2 -1
  18. package/src/qsm/qsm-configuration-context.ts +2 -1
  19. package/src/qsm/store/qsm-slice.ts +4 -4
  20. package/src/qsm/types.ts +2 -2
  21. package/src/search-results/components/filters/utility.tsx +10 -10
  22. package/src/search-results/components/search-results-container/flight-search-results.tsx +3 -2
  23. package/src/search-results/components/search-results-container/search-results-container.tsx +39 -18
  24. package/src/search-results/features/flights/flight-search-results-self-contained.tsx +2 -2
  25. package/src/search-results/features/hotels/hotel-flight-search-results-self-contained.tsx +2 -2
  26. package/src/search-results/features/hotels/hotel-search-results-self-contained.tsx +2 -2
  27. package/src/search-results/features/roundtrips/roundtrip-search-results-self-contained.tsx +2 -2
  28. package/src/search-results/types.ts +2 -2
  29. package/src/shared/components/flyin/flyin.tsx +7 -5
  30. package/src/shared/types.ts +13 -12
@@ -6681,6 +6681,20 @@ 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 = {}));
6684
6698
  exports.DepartureRange = void 0;
6685
6699
  (function (DepartureRange) {
6686
6700
  DepartureRange[(DepartureRange['Morning'] = 0)] = 'Morning';
@@ -6994,10 +7008,13 @@ var build = {};
6994
7008
  allotment: 2
6995
7009
  };
6996
7010
 
6997
- var AvailabilitySearchType = {
6998
- default: 0,
6999
- allotment: 1
7000
- };
7011
+ exports.AvailabilitySearchType = void 0;
7012
+ (function (AvailabilitySearchType) {
7013
+ AvailabilitySearchType[(AvailabilitySearchType['default'] = 0)] = 'default';
7014
+ AvailabilitySearchType[(AvailabilitySearchType['allotment'] = 1)] = 'allotment';
7015
+ AvailabilitySearchType[(AvailabilitySearchType['fixedDuration'] = 2)] = 'fixedDuration';
7016
+ AvailabilitySearchType[(AvailabilitySearchType['flight'] = 3)] = 'flight';
7017
+ })(exports.AvailabilitySearchType || (exports.AvailabilitySearchType = {}));
7001
7018
 
7002
7019
  var DataType = {
7003
7020
  text: 'text',
@@ -7199,6 +7216,27 @@ var build = {};
7199
7216
  sunnyCars: 20
7200
7217
  };
7201
7218
 
7219
+ exports.DateAmountType = void 0;
7220
+ (function (DateAmountType) {
7221
+ DateAmountType[(DateAmountType['days'] = 0)] = 'days';
7222
+ DateAmountType[(DateAmountType['months'] = 1)] = 'months';
7223
+ })(exports.DateAmountType || (exports.DateAmountType = {}));
7224
+
7225
+ exports.PortalQsmType = void 0;
7226
+ (function (PortalQsmType) {
7227
+ PortalQsmType[(PortalQsmType['Multidestination'] = 0)] = 'Multidestination';
7228
+ PortalQsmType[(PortalQsmType['Accommodation'] = 1)] = 'Accommodation';
7229
+ PortalQsmType[(PortalQsmType['AccommodationAndFlight'] = 2)] = 'AccommodationAndFlight';
7230
+ PortalQsmType[(PortalQsmType['Flight'] = 3)] = 'Flight';
7231
+ PortalQsmType[(PortalQsmType['RoundTrip'] = 4)] = 'RoundTrip';
7232
+ PortalQsmType[(PortalQsmType['GroupTour'] = 5)] = 'GroupTour';
7233
+ PortalQsmType[(PortalQsmType['Package'] = 6)] = 'Package';
7234
+ PortalQsmType[(PortalQsmType['Ticket'] = 7)] = 'Ticket';
7235
+ PortalQsmType[(PortalQsmType['Car'] = 8)] = 'Car';
7236
+ PortalQsmType[(PortalQsmType['Transfer'] = 9)] = 'Transfer';
7237
+ PortalQsmType[(PortalQsmType['Cruise'] = 10)] = 'Cruise';
7238
+ })(exports.PortalQsmType || (exports.PortalQsmType = {}));
7239
+
7202
7240
  /******************************************************************************
7203
7241
  Copyright (c) Microsoft Corporation.
7204
7242
 
@@ -13195,6 +13233,9 @@ PERFORMANCE OF THIS SOFTWARE.
13195
13233
  var ENDPOINT_TRANSLATION_DICTIONARY = ENDPOINT$2 + '/translation-dictionary';
13196
13234
  var ENDPOINT_BOOKING_ACCOMMODATION = ENDPOINT$2 + '/booking-accommodation';
13197
13235
  var ENDPOINT_LOCATIONS = ENDPOINT$2 + '/entity/locations';
13236
+ var ENDPOINT_WEBSITE_CONFIGURATION = function (portalId) {
13237
+ return ENDPOINT$2 + '/website/' + portalId + '/configuration';
13238
+ };
13198
13239
  /**
13199
13240
  * api/web/crmcontact
13200
13241
  * Creates a CRM contact.
@@ -13252,6 +13293,11 @@ PERFORMANCE OF THIS SOFTWARE.
13252
13293
  var body = JSON.stringify(request);
13253
13294
  return post(url, apiKey, body, config.token, signal);
13254
13295
  };
13296
+ var getWebsiteConfiguration = function (config, id, signal) {
13297
+ var url = '' + config.host + ENDPOINT_WEBSITE_CONFIGURATION(id);
13298
+ var apiKey = config.apiKey;
13299
+ return get(url, apiKey, config.token, signal, true);
13300
+ };
13255
13301
 
13256
13302
  var ENDPOINT$1 = '/api/web/contact';
13257
13303
  var ENDPOINT_CONTACT_FORM = ENDPOINT$1 + '/contact-form';
@@ -13308,7 +13354,6 @@ PERFORMANCE OF THIS SOFTWARE.
13308
13354
  };
13309
13355
 
13310
13356
  exports.AllotmentType = AllotmentType;
13311
- exports.AvailabilitySearchType = AvailabilitySearchType;
13312
13357
  exports.ContactForm = ContactForm;
13313
13358
  exports.DataType = DataType;
13314
13359
  exports.DossierType = DossierType;
@@ -13363,6 +13408,7 @@ PERFORMANCE OF THIS SOFTWARE.
13363
13408
  exports.getPortal = getPortal;
13364
13409
  exports.getPrintActions = getPrintActions;
13365
13410
  exports.getTranslationDictionary = getTranslationDictionary;
13411
+ exports.getWebsiteConfiguration = getWebsiteConfiguration;
13366
13412
  exports.login = login;
13367
13413
  exports.logout = logout;
13368
13414
  exports.priceDetails = priceDetails;
@@ -30366,7 +30412,7 @@ var Footer = function (_a) {
30366
30412
  };
30367
30413
 
30368
30414
  var QSMConfigurationContext = React__default['default'].createContext({
30369
- type: 'hotel',
30415
+ type: exports.PortalQsmType.Accommodation,
30370
30416
  askTravelers: false,
30371
30417
  askNationality: false,
30372
30418
  askTravelClass: false,
@@ -30408,7 +30454,7 @@ var useMediaQuery = function (query) {
30408
30454
 
30409
30455
  var _a$1;
30410
30456
  var initialState$2 = {
30411
- qsmType: 'hotel-flight',
30457
+ qsmType: exports.PortalQsmType.AccommodationAndFlight,
30412
30458
  selectedOrigin: undefined,
30413
30459
  selectedDestination: undefined,
30414
30460
  selectedAirport: undefined,
@@ -31821,7 +31867,7 @@ var TravelInput = function () {
31821
31867
  babies = _b.babies,
31822
31868
  rooms = _b.rooms,
31823
31869
  qsmType = _b.qsmType;
31824
- var areTravelersInRooms = qsmType !== 'flight' && askRooms;
31870
+ var areTravelersInRooms = qsmType !== exports.PortalQsmType.Flight && askRooms;
31825
31871
  var translations = getTranslations(languageCode !== null && languageCode !== void 0 ? languageCode : 'en-GB');
31826
31872
  var getTravelerButtonClass = function (disabled) {
31827
31873
  return 'button button--increment '.concat(disabled ? 'button--disabled' : '');
@@ -32789,7 +32835,7 @@ var TravelInputGroup = function () {
32789
32835
  rooms = _c.rooms,
32790
32836
  qsmType = _c.qsmType;
32791
32837
  var translations = getTranslations(languageCode !== null && languageCode !== void 0 ? languageCode : 'en-GB');
32792
- var areTravelersInRooms = qsmType !== 'flight' && askRooms;
32838
+ var areTravelersInRooms = qsmType !== exports.PortalQsmType.Flight && askRooms;
32793
32839
  var initDone = React.useRef(false);
32794
32840
  var travelerSummary = reactRedux.useSelector(function (state) {
32795
32841
  return selectTravelerSummary(state, areTravelersInRooms);
@@ -33029,7 +33075,7 @@ var QSMContainer = function () {
33029
33075
  if (fromDate || toDate) return;
33030
33076
  var startDate = dateFns.addMonths(new Date(), 1);
33031
33077
  var endDate = dateFns.addDays(startDate, 7);
33032
- if (qsmType === 'groupTour') {
33078
+ if (qsmType === exports.PortalQsmType.GroupTour) {
33033
33079
  startDate = new Date();
33034
33080
  endDate = dateFns.addYears(startDate, 1);
33035
33081
  }
@@ -33059,7 +33105,7 @@ var QSMContainer = function () {
33059
33105
  dispatch(setSelectedQsmType(value));
33060
33106
  var startDate = dateFns.addMonths(new Date(), 1);
33061
33107
  var endDate = dateFns.addDays(startDate, 7);
33062
- if (value === 'groupTour') {
33108
+ if (value === exports.PortalQsmType.GroupTour) {
33063
33109
  startDate = new Date();
33064
33110
  endDate = dateFns.addYears(startDate, 1);
33065
33111
  }
@@ -33096,7 +33142,7 @@ var QSMContainer = function () {
33096
33142
  nationality: selectedNationality,
33097
33143
  tripType: tripType
33098
33144
  };
33099
- if (askRooms && qsmType !== 'flight') {
33145
+ if (askRooms && qsmType !== exports.PortalQsmType.Flight) {
33100
33146
  payload.rooms = rooms;
33101
33147
  } else {
33102
33148
  payload.travelers = { adults: adults, kids: kids, babies: babies };
@@ -33174,9 +33220,9 @@ var QSMContainer = function () {
33174
33220
  'button',
33175
33221
  {
33176
33222
  type: 'button',
33177
- className: 'qsm__tab '.concat(qsmType == 'multidestination' ? 'qsm__tab--active' : ''),
33223
+ className: 'qsm__tab '.concat(qsmType == exports.PortalQsmType.Multidestination ? 'qsm__tab--active' : ''),
33178
33224
  onClick: function () {
33179
- return handleQsmTypeChange('multidestination');
33225
+ return handleQsmTypeChange(exports.PortalQsmType.Multidestination);
33180
33226
  }
33181
33227
  },
33182
33228
  React__default['default'].createElement(
@@ -33190,9 +33236,9 @@ var QSMContainer = function () {
33190
33236
  'button',
33191
33237
  {
33192
33238
  type: 'button',
33193
- className: 'qsm__tab '.concat(qsmType == 'package' ? 'qsm__tab--active' : ''),
33239
+ className: 'qsm__tab '.concat(qsmType == exports.PortalQsmType.Package ? 'qsm__tab--active' : ''),
33194
33240
  onClick: function () {
33195
- return handleQsmTypeChange('package');
33241
+ return handleQsmTypeChange(exports.PortalQsmType.Package);
33196
33242
  }
33197
33243
  },
33198
33244
  React__default['default'].createElement(
@@ -33206,9 +33252,9 @@ var QSMContainer = function () {
33206
33252
  'button',
33207
33253
  {
33208
33254
  type: 'button',
33209
- className: 'qsm__tab '.concat(qsmType == 'hotel-flight' ? 'qsm__tab--active' : ''),
33255
+ className: 'qsm__tab '.concat(qsmType == exports.PortalQsmType.AccommodationAndFlight ? 'qsm__tab--active' : ''),
33210
33256
  onClick: function () {
33211
- return handleQsmTypeChange('hotel-flight');
33257
+ return handleQsmTypeChange(exports.PortalQsmType.AccommodationAndFlight);
33212
33258
  }
33213
33259
  },
33214
33260
  React__default['default'].createElement(
@@ -33224,9 +33270,9 @@ var QSMContainer = function () {
33224
33270
  'button',
33225
33271
  {
33226
33272
  type: 'button',
33227
- className: 'qsm__tab '.concat(qsmType == 'hotel' ? 'qsm__tab--active' : ''),
33273
+ className: 'qsm__tab '.concat(qsmType == exports.PortalQsmType.Accommodation ? 'qsm__tab--active' : ''),
33228
33274
  onClick: function () {
33229
- return handleQsmTypeChange('hotel');
33275
+ return handleQsmTypeChange(exports.PortalQsmType.Accommodation);
33230
33276
  }
33231
33277
  },
33232
33278
  React__default['default'].createElement(
@@ -33240,9 +33286,9 @@ var QSMContainer = function () {
33240
33286
  'button',
33241
33287
  {
33242
33288
  type: 'button',
33243
- className: 'qsm__tab '.concat(qsmType == 'flight' ? 'qsm__tab--active' : ''),
33289
+ className: 'qsm__tab '.concat(qsmType == exports.PortalQsmType.Flight ? 'qsm__tab--active' : ''),
33244
33290
  onClick: function () {
33245
- return handleQsmTypeChange('flight');
33291
+ return handleQsmTypeChange(exports.PortalQsmType.Flight);
33246
33292
  }
33247
33293
  },
33248
33294
  React__default['default'].createElement(
@@ -33256,9 +33302,9 @@ var QSMContainer = function () {
33256
33302
  'button',
33257
33303
  {
33258
33304
  type: 'button',
33259
- className: 'qsm__tab '.concat(qsmType == 'groupTour' ? 'qsm__tab--active' : ''),
33305
+ className: 'qsm__tab '.concat(qsmType == exports.PortalQsmType.GroupTour ? 'qsm__tab--active' : ''),
33260
33306
  onClick: function () {
33261
- return handleQsmTypeChange('groupTour');
33307
+ return handleQsmTypeChange(exports.PortalQsmType.GroupTour);
33262
33308
  }
33263
33309
  },
33264
33310
  React__default['default'].createElement(
@@ -33272,9 +33318,9 @@ var QSMContainer = function () {
33272
33318
  'button',
33273
33319
  {
33274
33320
  type: 'button',
33275
- className: 'qsm__tab '.concat(qsmType == 'ticket' ? 'qsm__tab--active' : ''),
33321
+ className: 'qsm__tab '.concat(qsmType == exports.PortalQsmType.Ticket ? 'qsm__tab--active' : ''),
33276
33322
  onClick: function () {
33277
- return handleQsmTypeChange('ticket');
33323
+ return handleQsmTypeChange(exports.PortalQsmType.Ticket);
33278
33324
  }
33279
33325
  },
33280
33326
  React__default['default'].createElement(
@@ -33288,9 +33334,9 @@ var QSMContainer = function () {
33288
33334
  'button',
33289
33335
  {
33290
33336
  type: 'button',
33291
- className: 'qsm__tab '.concat(qsmType == 'car' ? 'qsm__tab--active' : ''),
33337
+ className: 'qsm__tab '.concat(qsmType == exports.PortalQsmType.Car ? 'qsm__tab--active' : ''),
33292
33338
  onClick: function () {
33293
- return handleQsmTypeChange('car');
33339
+ return handleQsmTypeChange(exports.PortalQsmType.Car);
33294
33340
  }
33295
33341
  },
33296
33342
  React__default['default'].createElement(
@@ -33304,9 +33350,9 @@ var QSMContainer = function () {
33304
33350
  'button',
33305
33351
  {
33306
33352
  type: 'button',
33307
- className: 'qsm__tab '.concat(qsmType == 'transfers' ? 'qsm__tab--active' : ''),
33353
+ className: 'qsm__tab '.concat(qsmType == exports.PortalQsmType.Transfer ? 'qsm__tab--active' : ''),
33308
33354
  onClick: function () {
33309
- return handleQsmTypeChange('transfers');
33355
+ return handleQsmTypeChange(exports.PortalQsmType.Transfer);
33310
33356
  }
33311
33357
  },
33312
33358
  React__default['default'].createElement(
@@ -33320,9 +33366,9 @@ var QSMContainer = function () {
33320
33366
  'button',
33321
33367
  {
33322
33368
  type: 'button',
33323
- className: 'qsm__tab '.concat(qsmType == 'cruises' ? 'qsm__tab--active' : ''),
33369
+ className: 'qsm__tab '.concat(qsmType == exports.PortalQsmType.Cruise ? 'qsm__tab--active' : ''),
33324
33370
  onClick: function () {
33325
- return handleQsmTypeChange('cruises');
33371
+ return handleQsmTypeChange(exports.PortalQsmType.Cruise);
33326
33372
  }
33327
33373
  },
33328
33374
  React__default['default'].createElement(
@@ -33336,7 +33382,9 @@ var QSMContainer = function () {
33336
33382
  React__default['default'].createElement(
33337
33383
  'div',
33338
33384
  { className: 'qsm__filter' },
33339
- (qsmType === 'hotel' || qsmType === 'hotel-flight' || qsmType === 'groupTour') &&
33385
+ (qsmType === exports.PortalQsmType.Accommodation ||
33386
+ qsmType === exports.PortalQsmType.AccommodationAndFlight ||
33387
+ qsmType === exports.PortalQsmType.GroupTour) &&
33340
33388
  React__default['default'].createElement(
33341
33389
  'div',
33342
33390
  { className: 'radiobutton-group qsm__filter__inputgroup' },
@@ -33378,7 +33426,7 @@ var QSMContainer = function () {
33378
33426
  )
33379
33427
  )
33380
33428
  ),
33381
- qsmType === 'flight' &&
33429
+ qsmType === exports.PortalQsmType.Flight &&
33382
33430
  React__default['default'].createElement(
33383
33431
  'div',
33384
33432
  { className: 'radiobutton-group qsm__filter__inputgroup' },
@@ -33446,18 +33494,18 @@ var QSMContainer = function () {
33446
33494
  React__default['default'].createElement(
33447
33495
  'div',
33448
33496
  { className: 'qsm__filter__classgroup' },
33449
- qsmType !== 'hotel' &&
33450
- qsmType !== 'car' &&
33451
- qsmType !== 'ticket' &&
33452
- qsmType !== 'cruises' &&
33453
- qsmType !== 'transfers' &&
33454
- qsmType !== 'groupTour' &&
33497
+ qsmType !== exports.PortalQsmType.Accommodation &&
33498
+ qsmType !== exports.PortalQsmType.Car &&
33499
+ qsmType !== exports.PortalQsmType.Ticket &&
33500
+ qsmType !== exports.PortalQsmType.Cruise &&
33501
+ qsmType !== exports.PortalQsmType.Transfer &&
33502
+ qsmType !== exports.PortalQsmType.GroupTour &&
33455
33503
  askTravelClass &&
33456
33504
  React__default['default'].createElement(TravelClassPicker, null),
33457
- qsmType !== 'multidestination' &&
33458
- qsmType !== 'car' &&
33459
- qsmType !== 'flight' &&
33460
- qsmType !== 'transfers' &&
33505
+ qsmType !== exports.PortalQsmType.Multidestination &&
33506
+ qsmType !== exports.PortalQsmType.Car &&
33507
+ qsmType !== exports.PortalQsmType.Flight &&
33508
+ qsmType !== exports.PortalQsmType.Transfer &&
33461
33509
  askTravelType &&
33462
33510
  React__default['default'].createElement(TravelTypePicker, null),
33463
33511
  askNationality && React__default['default'].createElement(TravelNationalityPicker, null)
@@ -33466,20 +33514,22 @@ var QSMContainer = function () {
33466
33514
  React__default['default'].createElement(
33467
33515
  'div',
33468
33516
  { className: 'qsm__input-group' },
33469
- (qsmType == 'flight' || qsmType == 'hotel-flight') &&
33517
+ (qsmType == exports.PortalQsmType.Flight || qsmType == exports.PortalQsmType.AccommodationAndFlight) &&
33470
33518
  originDestinationField &&
33471
33519
  React__default['default'].createElement(DoubleSearchInputGroup, {
33472
33520
  fieldConfig: originDestinationField,
33473
33521
  showReverse: originDestinationField.showReverse
33474
33522
  }),
33475
- qsmType == 'flight' &&
33523
+ qsmType == exports.PortalQsmType.Flight &&
33476
33524
  tripType == 'openjaw' &&
33477
33525
  openJawReturnDestinationField &&
33478
33526
  React__default['default'].createElement(DoubleSearchInputGroup, {
33479
33527
  fieldConfig: openJawReturnDestinationField,
33480
33528
  showReverse: openJawReturnDestinationField.showReverse
33481
33529
  }),
33482
- (qsmType == 'hotel' || qsmType == 'hotel-flight' || qsmType == 'groupTour') &&
33530
+ (qsmType == exports.PortalQsmType.Accommodation ||
33531
+ qsmType == exports.PortalQsmType.AccommodationAndFlight ||
33532
+ qsmType == exports.PortalQsmType.GroupTour) &&
33483
33533
  destination &&
33484
33534
  React__default['default'].createElement(SearchInputGroup, { fieldConfig: destination }),
33485
33535
  React__default['default'].createElement(Dates, { value: dateRange, onChange: handleDateChange }),
@@ -37976,7 +38026,7 @@ var FlyIn = function (_a) {
37976
38026
  );
37977
38027
  var handleClose = function () {
37978
38028
  if (isOpen && panelRef.current) {
37979
- if (srpType === 'flight') {
38029
+ if (srpType === exports.PortalQsmType.Flight) {
37980
38030
  dispatch(setSelectedFlight(null));
37981
38031
  dispatch(setSelectedFlightDetails(null));
37982
38032
  onCancelSearch();
@@ -38009,8 +38059,8 @@ var FlyIn = function (_a) {
38009
38059
  )
38010
38060
  )
38011
38061
  ),
38012
- srpType === 'flight' && React__default['default'].createElement(FlightsFlyIn, { isOpen: isOpen, setIsOpen: setIsOpen }),
38013
- (srpType === 'hotel' || srpType === 'groupTour') &&
38062
+ srpType === exports.PortalQsmType.Flight && React__default['default'].createElement(FlightsFlyIn, { isOpen: isOpen, setIsOpen: setIsOpen }),
38063
+ (srpType === exports.PortalQsmType.Accommodation || srpType === exports.PortalQsmType.GroupTour) &&
38014
38064
  React__default['default'].createElement(AccommodationFlyIn, { isLoading: true, isOpen: isOpen, setIsOpen: setIsOpen })
38015
38065
  )
38016
38066
  );
@@ -38618,7 +38668,8 @@ var enrichFiltersWithResults = function (results, filters, tags) {
38618
38668
  if (!results || results.length === 0 || !filters) {
38619
38669
  return filters !== null && filters !== void 0 ? filters : [];
38620
38670
  }
38621
- var _loop_1 = function (filter) {
38671
+ return filters.map(function (filter) {
38672
+ var updatedFilter = __assign({}, filter);
38622
38673
  if (filter.property === 'price' && (filter.min == null || filter.max == null)) {
38623
38674
  var prices = results
38624
38675
  .map(function (r) {
@@ -38629,8 +38680,8 @@ var enrichFiltersWithResults = function (results, filters, tags) {
38629
38680
  return p > 0;
38630
38681
  });
38631
38682
  if (prices.length > 0) {
38632
- filter.min = Math.floor(Math.min.apply(Math, prices));
38633
- filter.max = Math.ceil(Math.max.apply(Math, prices));
38683
+ updatedFilter.min = Math.floor(Math.min.apply(Math, prices));
38684
+ updatedFilter.max = Math.ceil(Math.max.apply(Math, prices));
38634
38685
  }
38635
38686
  }
38636
38687
  if (filter.property === 'accommodation') {
@@ -38643,8 +38694,7 @@ var enrichFiltersWithResults = function (results, filters, tags) {
38643
38694
  });
38644
38695
  }
38645
38696
  });
38646
- console.log('map', map_1);
38647
- filter.options = Array.from(map_1.values()).map(function (accommodation) {
38697
+ updatedFilter.options = Array.from(map_1.values()).map(function (accommodation) {
38648
38698
  var _a;
38649
38699
  return {
38650
38700
  label: (_a = accommodation.name) !== null && _a !== void 0 ? _a : accommodation.code,
@@ -38663,7 +38713,7 @@ var enrichFiltersWithResults = function (results, filters, tags) {
38663
38713
  });
38664
38714
  }
38665
38715
  });
38666
- filter.options = Array.from(map_2.values()).map(function (regime) {
38716
+ updatedFilter.options = Array.from(map_2.values()).map(function (regime) {
38667
38717
  var _a;
38668
38718
  return {
38669
38719
  label: (_a = regime.name) !== null && _a !== void 0 ? _a : regime.code,
@@ -38687,7 +38737,7 @@ var enrichFiltersWithResults = function (results, filters, tags) {
38687
38737
  }
38688
38738
  });
38689
38739
  });
38690
- filter.options = Array.from(map_3.values()).map(function (theme) {
38740
+ updatedFilter.options = Array.from(map_3.values()).map(function (theme) {
38691
38741
  return {
38692
38742
  label: theme.name,
38693
38743
  value: theme.id,
@@ -38695,12 +38745,8 @@ var enrichFiltersWithResults = function (results, filters, tags) {
38695
38745
  };
38696
38746
  });
38697
38747
  }
38698
- };
38699
- for (var _i = 0, filters_1 = filters; _i < filters_1.length; _i++) {
38700
- var filter = filters_1[_i];
38701
- _loop_1(filter);
38702
- }
38703
- return filters;
38748
+ return updatedFilter;
38749
+ });
38704
38750
  };
38705
38751
 
38706
38752
  var ticksToMinutes = function (ticks) {
@@ -40917,7 +40963,7 @@ var FlightResultsContainer = function (_a) {
40917
40963
  React.useEffect(
40918
40964
  function () {
40919
40965
  if (!(context === null || context === void 0 ? void 0 : context.showMockup)) {
40920
- if ((context === null || context === void 0 ? void 0 : context.type) === 'flight' && isHubReady) {
40966
+ if ((context === null || context === void 0 ? void 0 : context.type) === exports.PortalQsmType.Flight && isHubReady) {
40921
40967
  onFlightSearch();
40922
40968
  }
40923
40969
  }
@@ -41057,7 +41103,7 @@ var FlightResultsContainer = function (_a) {
41057
41103
  'div',
41058
41104
  { className: 'search__results__wrapper' },
41059
41105
  flightsLoading && React__default['default'].createElement(Spinner, null),
41060
- (context === null || context === void 0 ? void 0 : context.type) == 'flight' &&
41106
+ (context === null || context === void 0 ? void 0 : context.type) == exports.PortalQsmType.Flight &&
41061
41107
  (context === null || context === void 0 ? void 0 : context.showFlightAccommodationResults) &&
41062
41108
  results &&
41063
41109
  results.length > 0 &&
@@ -41631,7 +41677,14 @@ var SearchResultsContainer = function () {
41631
41677
  officeId: 1,
41632
41678
  payload: {
41633
41679
  catalogueIds: (_a = context.tideConnection.catalogueIds) !== null && _a !== void 0 ? _a : [],
41634
- serviceType: context.type === 'hotel' || context.type === 'hotel-flight' ? 3 : context.type === 'flight' ? 7 : context.type === 'roundTrip' ? 1 : 0,
41680
+ serviceType:
41681
+ context.type === exports.PortalQsmType.Accommodation || context.type === exports.PortalQsmType.AccommodationAndFlight
41682
+ ? 3
41683
+ : context.type === exports.PortalQsmType.Flight
41684
+ ? 7
41685
+ : context.type === exports.PortalQsmType.RoundTrip
41686
+ ? 1
41687
+ : 0,
41635
41688
  searchType: 0,
41636
41689
  destination: {
41637
41690
  id: Number(destinationId),
@@ -41699,8 +41752,14 @@ var SearchResultsContainer = function () {
41699
41752
  payload: {
41700
41753
  catalogueIds: (_a = context.tideConnection.catalogueIds) !== null && _a !== void 0 ? _a : [],
41701
41754
  serviceType:
41702
- context.type === 'hotel' || context.type === 'hotel-flight' ? 3 : context.type === 'flight' ? 7 : context.type === 'roundTrip' ? 1 : undefined,
41703
- searchType: context.type === 'groupTour' ? 1 : 0,
41755
+ context.type === exports.PortalQsmType.Accommodation || context.type === exports.PortalQsmType.AccommodationAndFlight
41756
+ ? 3
41757
+ : context.type === exports.PortalQsmType.Flight
41758
+ ? 7
41759
+ : context.type === exports.PortalQsmType.RoundTrip
41760
+ ? 1
41761
+ : undefined,
41762
+ searchType: context.type === exports.PortalQsmType.GroupTour ? 1 : 0,
41704
41763
  destination: {
41705
41764
  id: Number(destinationId),
41706
41765
  isCountry: destinationIsCountry,
@@ -41713,7 +41772,7 @@ var SearchResultsContainer = function () {
41713
41772
  toDate: to,
41714
41773
  earliestFromOffset: 0,
41715
41774
  latestToOffset: 0,
41716
- includeFlights: context.type === 'hotel-flight' ? true : false,
41775
+ includeFlights: context.type === exports.PortalQsmType.AccommodationAndFlight ? true : false,
41717
41776
  // regimeCodes:
41718
41777
  // filters
41719
41778
  // .find((f) => f.property === 'regime')
@@ -41721,7 +41780,7 @@ var SearchResultsContainer = function () {
41721
41780
  // .flatMap((o) => o.value.toString()) || [],
41722
41781
  // minPrice: filters.find((f) => f.property === 'price')?.selectedMin,
41723
41782
  // maxPrice: filters.find((f) => f.property === 'price')?.selectedMax,
41724
- useExactDates: (context === null || context === void 0 ? void 0 : context.type) === 'groupTour' ? false : true,
41783
+ useExactDates: (context === null || context === void 0 ? void 0 : context.type) === exports.PortalQsmType.GroupTour ? false : true,
41725
41784
  onlyCachedResults: false,
41726
41785
  includeAllAllotments: true,
41727
41786
  productIds: hotel ? [hotel] : [],
@@ -41858,7 +41917,7 @@ var SearchResultsContainer = function () {
41858
41917
  dispatch(setSelectedSearchResult(matching.productId));
41859
41918
  }
41860
41919
  } else {
41861
- if (context.type === 'hotel-flight') {
41920
+ if (context.type === exports.PortalQsmType.AccommodationAndFlight) {
41862
41921
  dispatch(setSelectedSearchResult((_b = packageSearchResults[0]) === null || _b === void 0 ? void 0 : _b.productId));
41863
41922
  }
41864
41923
  }
@@ -41878,9 +41937,9 @@ var SearchResultsContainer = function () {
41878
41937
  };
41879
41938
  if (!(context === null || context === void 0 ? void 0 : context.showMockup)) {
41880
41939
  if (
41881
- (context === null || context === void 0 ? void 0 : context.type) === 'hotel-flight' ||
41882
- (context === null || context === void 0 ? void 0 : context.type) === 'hotel' ||
41883
- (context === null || context === void 0 ? void 0 : context.type) === 'groupTour'
41940
+ (context === null || context === void 0 ? void 0 : context.type) === exports.PortalQsmType.AccommodationAndFlight ||
41941
+ (context === null || context === void 0 ? void 0 : context.type) === exports.PortalQsmType.Accommodation ||
41942
+ (context === null || context === void 0 ? void 0 : context.type) === exports.PortalQsmType.GroupTour
41884
41943
  ) {
41885
41944
  runSearch();
41886
41945
  }
@@ -41900,8 +41959,8 @@ var SearchResultsContainer = function () {
41900
41959
  case 0:
41901
41960
  if (!selectedSearchResultId || !context) return [2 /*return*/];
41902
41961
  if (
41903
- (context === null || context === void 0 ? void 0 : context.type) === 'hotel' ||
41904
- (context === null || context === void 0 ? void 0 : context.type) === 'groupTour'
41962
+ (context === null || context === void 0 ? void 0 : context.type) === exports.PortalQsmType.Accommodation ||
41963
+ (context === null || context === void 0 ? void 0 : context.type) === exports.PortalQsmType.GroupTour
41905
41964
  ) {
41906
41965
  handleFlyInToggle(true);
41907
41966
  }
@@ -41937,7 +41996,7 @@ var SearchResultsContainer = function () {
41937
41996
  productCode: selectedItem.code,
41938
41997
  fromDate: selectedItem.fromDate,
41939
41998
  toDate: selectedItem.toDate,
41940
- includeFlights: context.type === 'hotel-flight' ? true : false,
41999
+ includeFlights: context.type === exports.PortalQsmType.AccommodationAndFlight ? true : false,
41941
42000
  includeHotels: true,
41942
42001
  includePaxTypes: true,
41943
42002
  checkExternalAvailability: true,
@@ -42010,7 +42069,7 @@ var SearchResultsContainer = function () {
42010
42069
  React__default['default'].createElement(
42011
42070
  'div',
42012
42071
  { className: 'search__container' },
42013
- context.type === 'flight' &&
42072
+ context.type === exports.PortalQsmType.Flight &&
42014
42073
  React__default['default'].createElement(
42015
42074
  FlightSearchProvider,
42016
42075
  { tideConnection: context.tideConnection },
@@ -42025,11 +42084,14 @@ var SearchResultsContainer = function () {
42025
42084
  }
42026
42085
  })
42027
42086
  ),
42028
- (context.type === 'hotel-flight' || context.type === 'hotel' || context.type === 'groupTour' || context.type === 'roundTrip') &&
42087
+ (context.type === exports.PortalQsmType.AccommodationAndFlight ||
42088
+ context.type === exports.PortalQsmType.Accommodation ||
42089
+ context.type === exports.PortalQsmType.GroupTour ||
42090
+ context.type === exports.PortalQsmType.RoundTrip) &&
42029
42091
  React__default['default'].createElement(
42030
42092
  React__default['default'].Fragment,
42031
42093
  null,
42032
- context.type != 'hotel-flight' &&
42094
+ context.type != exports.PortalQsmType.AccommodationAndFlight &&
42033
42095
  context.showFilters &&
42034
42096
  React__default['default'].createElement(Filters, {
42035
42097
  initialFilters: initialFilters,
@@ -42041,7 +42103,7 @@ var SearchResultsContainer = function () {
42041
42103
  // handleApplyFilters={() => setSearchTrigger((prev) => prev + 1)}
42042
42104
  isLoading: isLoading
42043
42105
  }),
42044
- context.type === 'hotel-flight' &&
42106
+ context.type === exports.PortalQsmType.AccommodationAndFlight &&
42045
42107
  React__default['default'].createElement(Itinerary, {
42046
42108
  isOpen: itineraryOpen,
42047
42109
  handleSetIsOpen: function () {
@@ -42059,7 +42121,7 @@ var SearchResultsContainer = function () {
42059
42121
  React__default['default'].createElement(
42060
42122
  'div',
42061
42123
  { className: 'search__results__actions' },
42062
- context.type != 'hotel-flight' &&
42124
+ context.type != exports.PortalQsmType.AccommodationAndFlight &&
42063
42125
  context.showFilters &&
42064
42126
  React__default['default'].createElement(
42065
42127
  'div',
@@ -42072,7 +42134,7 @@ var SearchResultsContainer = function () {
42072
42134
  React__default['default'].createElement(Icon$1, { name: 'ui-filter', className: 'mobile-filters-button__icon', height: 16 }),
42073
42135
  translations.SRP.FILTERS
42074
42136
  ),
42075
- context.type === 'hotel-flight' &&
42137
+ context.type === exports.PortalQsmType.AccommodationAndFlight &&
42076
42138
  React__default['default'].createElement(
42077
42139
  'div',
42078
42140
  {
@@ -42132,8 +42194,8 @@ var SearchResultsContainer = function () {
42132
42194
  { className: 'search__results__wrapper' },
42133
42195
  context.showTabViews && React__default['default'].createElement(TabViews, null),
42134
42196
  context.showRoundTripResults && context.showMockup && React__default['default'].createElement(RoundTripResults, null),
42135
- context.type === 'groupTour' && React__default['default'].createElement(GroupTourResults, { isLoading: isLoading }),
42136
- context.type === 'hotel-flight' &&
42197
+ context.type === exports.PortalQsmType.GroupTour && React__default['default'].createElement(GroupTourResults, { isLoading: isLoading }),
42198
+ context.type === exports.PortalQsmType.AccommodationAndFlight &&
42137
42199
  context.showFlightResults &&
42138
42200
  (bookingPackageDetails === null || bookingPackageDetails === void 0 ? void 0 : bookingPackageDetails.outwardFlights) &&
42139
42201
  React__default['default'].createElement(FlightResults, {
@@ -42141,7 +42203,7 @@ var SearchResultsContainer = function () {
42141
42203
  isDeparture: true
42142
42204
  }),
42143
42205
  context.showHotelAccommodationResults && React__default['default'].createElement(HotelAccommodationResults, { isLoading: isLoading }),
42144
- context.type === 'hotel-flight' &&
42206
+ context.type === exports.PortalQsmType.AccommodationAndFlight &&
42145
42207
  context.showFlightResults &&
42146
42208
  (bookingPackageDetails === null || bookingPackageDetails === void 0 ? void 0 : bookingPackageDetails.returnFlights) &&
42147
42209
  React__default['default'].createElement(FlightResults, {
@@ -1,8 +1,8 @@
1
1
  import { MobileFilterType, Room, TravelerType, TypeaheadOption } from '../types';
2
2
  import { ReactNode } from 'react';
3
- import { TravelType, TravelClass, SRPType } from '../../shared/types';
3
+ import { TravelType, TravelClass, PortalQsmType } from '../../shared/types';
4
4
  export interface QSMState {
5
- qsmType?: SRPType;
5
+ qsmType?: PortalQsmType;
6
6
  selectedOrigin?: string;
7
7
  selectedDestination?: string;
8
8
  selectedAirport?: string;
@@ -48,7 +48,7 @@ export interface QSMState {
48
48
  rooms: Room[];
49
49
  [key: string]: any;
50
50
  }
51
- export declare const setSelectedQsmType: import('@reduxjs/toolkit').ActionCreatorWithPayload<SRPType, 'qsm/setSelectedQsmType'>,
51
+ export declare const setSelectedQsmType: import('@reduxjs/toolkit').ActionCreatorWithPayload<PortalQsmType, 'qsm/setSelectedQsmType'>,
52
52
  setOrigin: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, 'qsm/setOrigin'>,
53
53
  setDestination: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, 'qsm/setDestination'>,
54
54
  setAirport: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, 'qsm/setAirport'>,
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
- import { SRPType, TravelClass, TravelType } from '../shared/types';
2
+ import { PortalQsmType, TravelClass, TravelType } from '../shared/types';
3
3
  export interface QSMConfiguration {
4
- type?: SRPType;
4
+ type?: PortalQsmType;
5
5
  askRooms?: boolean;
6
6
  askTravelType?: boolean;
7
7
  allowOneWay?: boolean;