@qite/tide-booking-component 1.4.75 → 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 (29) hide show
  1. package/build/build-cjs/index.js +102 -68
  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 +99 -68
  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/search-results-container/flight-search-results.tsx +3 -2
  22. package/src/search-results/components/search-results-container/search-results-container.tsx +39 -18
  23. package/src/search-results/features/flights/flight-search-results-self-contained.tsx +2 -2
  24. package/src/search-results/features/hotels/hotel-flight-search-results-self-contained.tsx +2 -2
  25. package/src/search-results/features/hotels/hotel-search-results-self-contained.tsx +2 -2
  26. package/src/search-results/features/roundtrips/roundtrip-search-results-self-contained.tsx +2 -2
  27. package/src/search-results/types.ts +2 -2
  28. package/src/shared/components/flyin/flyin.tsx +7 -5
  29. package/src/shared/types.ts +13 -12
@@ -6712,6 +6712,20 @@ var jaJson = {
6712
6712
  SRP: SRP
6713
6713
  };
6714
6714
 
6715
+ var PortalQsmType;
6716
+ (function (PortalQsmType) {
6717
+ PortalQsmType[(PortalQsmType['Multidestination'] = 0)] = 'Multidestination';
6718
+ PortalQsmType[(PortalQsmType['Accommodation'] = 1)] = 'Accommodation';
6719
+ PortalQsmType[(PortalQsmType['AccommodationAndFlight'] = 2)] = 'AccommodationAndFlight';
6720
+ PortalQsmType[(PortalQsmType['Flight'] = 3)] = 'Flight';
6721
+ PortalQsmType[(PortalQsmType['RoundTrip'] = 4)] = 'RoundTrip';
6722
+ PortalQsmType[(PortalQsmType['GroupTour'] = 5)] = 'GroupTour';
6723
+ PortalQsmType[(PortalQsmType['Package'] = 6)] = 'Package';
6724
+ PortalQsmType[(PortalQsmType['Ticket'] = 7)] = 'Ticket';
6725
+ PortalQsmType[(PortalQsmType['Car'] = 8)] = 'Car';
6726
+ PortalQsmType[(PortalQsmType['Transfer'] = 9)] = 'Transfer';
6727
+ PortalQsmType[(PortalQsmType['Cruise'] = 10)] = 'Cruise';
6728
+ })(PortalQsmType || (PortalQsmType = {}));
6715
6729
  var DepartureRange;
6716
6730
  (function (DepartureRange) {
6717
6731
  DepartureRange[(DepartureRange['Morning'] = 0)] = 'Morning';
@@ -30285,7 +30299,7 @@ var Footer = function (_a) {
30285
30299
  };
30286
30300
 
30287
30301
  var QSMConfigurationContext = React__default.createContext({
30288
- type: 'hotel',
30302
+ type: PortalQsmType.Accommodation,
30289
30303
  askTravelers: false,
30290
30304
  askNationality: false,
30291
30305
  askTravelClass: false,
@@ -30327,7 +30341,7 @@ var useMediaQuery = function (query) {
30327
30341
 
30328
30342
  var _a$1;
30329
30343
  var initialState$2 = {
30330
- qsmType: 'hotel-flight',
30344
+ qsmType: PortalQsmType.AccommodationAndFlight,
30331
30345
  selectedOrigin: undefined,
30332
30346
  selectedDestination: undefined,
30333
30347
  selectedAirport: undefined,
@@ -31730,7 +31744,7 @@ var TravelInput = function () {
31730
31744
  babies = _b.babies,
31731
31745
  rooms = _b.rooms,
31732
31746
  qsmType = _b.qsmType;
31733
- var areTravelersInRooms = qsmType !== 'flight' && askRooms;
31747
+ var areTravelersInRooms = qsmType !== PortalQsmType.Flight && askRooms;
31734
31748
  var translations = getTranslations(languageCode !== null && languageCode !== void 0 ? languageCode : 'en-GB');
31735
31749
  var getTravelerButtonClass = function (disabled) {
31736
31750
  return 'button button--increment '.concat(disabled ? 'button--disabled' : '');
@@ -32686,7 +32700,7 @@ var TravelInputGroup = function () {
32686
32700
  rooms = _c.rooms,
32687
32701
  qsmType = _c.qsmType;
32688
32702
  var translations = getTranslations(languageCode !== null && languageCode !== void 0 ? languageCode : 'en-GB');
32689
- var areTravelersInRooms = qsmType !== 'flight' && askRooms;
32703
+ var areTravelersInRooms = qsmType !== PortalQsmType.Flight && askRooms;
32690
32704
  var initDone = useRef(false);
32691
32705
  var travelerSummary = useSelector(function (state) {
32692
32706
  return selectTravelerSummary(state, areTravelersInRooms);
@@ -32926,7 +32940,7 @@ var QSMContainer = function () {
32926
32940
  if (fromDate || toDate) return;
32927
32941
  var startDate = addMonths(new Date(), 1);
32928
32942
  var endDate = addDays(startDate, 7);
32929
- if (qsmType === 'groupTour') {
32943
+ if (qsmType === PortalQsmType.GroupTour) {
32930
32944
  startDate = new Date();
32931
32945
  endDate = addYears(startDate, 1);
32932
32946
  }
@@ -32956,7 +32970,7 @@ var QSMContainer = function () {
32956
32970
  dispatch(setSelectedQsmType(value));
32957
32971
  var startDate = addMonths(new Date(), 1);
32958
32972
  var endDate = addDays(startDate, 7);
32959
- if (value === 'groupTour') {
32973
+ if (value === PortalQsmType.GroupTour) {
32960
32974
  startDate = new Date();
32961
32975
  endDate = addYears(startDate, 1);
32962
32976
  }
@@ -32993,7 +33007,7 @@ var QSMContainer = function () {
32993
33007
  nationality: selectedNationality,
32994
33008
  tripType: tripType
32995
33009
  };
32996
- if (askRooms && qsmType !== 'flight') {
33010
+ if (askRooms && qsmType !== PortalQsmType.Flight) {
32997
33011
  payload.rooms = rooms;
32998
33012
  } else {
32999
33013
  payload.travelers = { adults: adults, kids: kids, babies: babies };
@@ -33071,9 +33085,9 @@ var QSMContainer = function () {
33071
33085
  'button',
33072
33086
  {
33073
33087
  type: 'button',
33074
- className: 'qsm__tab '.concat(qsmType == 'multidestination' ? 'qsm__tab--active' : ''),
33088
+ className: 'qsm__tab '.concat(qsmType == PortalQsmType.Multidestination ? 'qsm__tab--active' : ''),
33075
33089
  onClick: function () {
33076
- return handleQsmTypeChange('multidestination');
33090
+ return handleQsmTypeChange(PortalQsmType.Multidestination);
33077
33091
  }
33078
33092
  },
33079
33093
  React__default.createElement('span', { className: 'qsm__tab__icons' }, React__default.createElement(Icon$2, { name: 'ui-location', height: 16 })),
@@ -33083,9 +33097,9 @@ var QSMContainer = function () {
33083
33097
  'button',
33084
33098
  {
33085
33099
  type: 'button',
33086
- className: 'qsm__tab '.concat(qsmType == 'package' ? 'qsm__tab--active' : ''),
33100
+ className: 'qsm__tab '.concat(qsmType == PortalQsmType.Package ? 'qsm__tab--active' : ''),
33087
33101
  onClick: function () {
33088
- return handleQsmTypeChange('package');
33102
+ return handleQsmTypeChange(PortalQsmType.Package);
33089
33103
  }
33090
33104
  },
33091
33105
  React__default.createElement('span', { className: 'qsm__tab__icons' }, React__default.createElement(Icon$2, { name: 'ui-suitcase', height: 16 })),
@@ -33095,9 +33109,9 @@ var QSMContainer = function () {
33095
33109
  'button',
33096
33110
  {
33097
33111
  type: 'button',
33098
- className: 'qsm__tab '.concat(qsmType == 'hotel-flight' ? 'qsm__tab--active' : ''),
33112
+ className: 'qsm__tab '.concat(qsmType == PortalQsmType.AccommodationAndFlight ? 'qsm__tab--active' : ''),
33099
33113
  onClick: function () {
33100
- return handleQsmTypeChange('hotel-flight');
33114
+ return handleQsmTypeChange(PortalQsmType.AccommodationAndFlight);
33101
33115
  }
33102
33116
  },
33103
33117
  React__default.createElement(
@@ -33113,9 +33127,9 @@ var QSMContainer = function () {
33113
33127
  'button',
33114
33128
  {
33115
33129
  type: 'button',
33116
- className: 'qsm__tab '.concat(qsmType == 'hotel' ? 'qsm__tab--active' : ''),
33130
+ className: 'qsm__tab '.concat(qsmType == PortalQsmType.Accommodation ? 'qsm__tab--active' : ''),
33117
33131
  onClick: function () {
33118
- return handleQsmTypeChange('hotel');
33132
+ return handleQsmTypeChange(PortalQsmType.Accommodation);
33119
33133
  }
33120
33134
  },
33121
33135
  React__default.createElement('span', { className: 'qsm__tab__icons' }, React__default.createElement(Icon$2, { name: 'ui-bed', height: 16 })),
@@ -33125,9 +33139,9 @@ var QSMContainer = function () {
33125
33139
  'button',
33126
33140
  {
33127
33141
  type: 'button',
33128
- className: 'qsm__tab '.concat(qsmType == 'flight' ? 'qsm__tab--active' : ''),
33142
+ className: 'qsm__tab '.concat(qsmType == PortalQsmType.Flight ? 'qsm__tab--active' : ''),
33129
33143
  onClick: function () {
33130
- return handleQsmTypeChange('flight');
33144
+ return handleQsmTypeChange(PortalQsmType.Flight);
33131
33145
  }
33132
33146
  },
33133
33147
  React__default.createElement('span', { className: 'qsm__tab__icons' }, React__default.createElement(Icon$2, { name: 'ui-flight', height: 16 })),
@@ -33137,9 +33151,9 @@ var QSMContainer = function () {
33137
33151
  'button',
33138
33152
  {
33139
33153
  type: 'button',
33140
- className: 'qsm__tab '.concat(qsmType == 'groupTour' ? 'qsm__tab--active' : ''),
33154
+ className: 'qsm__tab '.concat(qsmType == PortalQsmType.GroupTour ? 'qsm__tab--active' : ''),
33141
33155
  onClick: function () {
33142
- return handleQsmTypeChange('groupTour');
33156
+ return handleQsmTypeChange(PortalQsmType.GroupTour);
33143
33157
  }
33144
33158
  },
33145
33159
  React__default.createElement('span', { className: 'qsm__tab__icons' }, React__default.createElement(Icon$2, { name: 'ui-group', height: 16 })),
@@ -33149,9 +33163,9 @@ var QSMContainer = function () {
33149
33163
  'button',
33150
33164
  {
33151
33165
  type: 'button',
33152
- className: 'qsm__tab '.concat(qsmType == 'ticket' ? 'qsm__tab--active' : ''),
33166
+ className: 'qsm__tab '.concat(qsmType == PortalQsmType.Ticket ? 'qsm__tab--active' : ''),
33153
33167
  onClick: function () {
33154
- return handleQsmTypeChange('ticket');
33168
+ return handleQsmTypeChange(PortalQsmType.Ticket);
33155
33169
  }
33156
33170
  },
33157
33171
  React__default.createElement('span', { className: 'qsm__tab__icons' }, React__default.createElement(Icon$2, { name: 'ui-ticket', height: 16 })),
@@ -33161,9 +33175,9 @@ var QSMContainer = function () {
33161
33175
  'button',
33162
33176
  {
33163
33177
  type: 'button',
33164
- className: 'qsm__tab '.concat(qsmType == 'car' ? 'qsm__tab--active' : ''),
33178
+ className: 'qsm__tab '.concat(qsmType == PortalQsmType.Car ? 'qsm__tab--active' : ''),
33165
33179
  onClick: function () {
33166
- return handleQsmTypeChange('car');
33180
+ return handleQsmTypeChange(PortalQsmType.Car);
33167
33181
  }
33168
33182
  },
33169
33183
  React__default.createElement('span', { className: 'qsm__tab__icons' }, React__default.createElement(Icon$2, { name: 'ui-car', height: 16 })),
@@ -33173,9 +33187,9 @@ var QSMContainer = function () {
33173
33187
  'button',
33174
33188
  {
33175
33189
  type: 'button',
33176
- className: 'qsm__tab '.concat(qsmType == 'transfers' ? 'qsm__tab--active' : ''),
33190
+ className: 'qsm__tab '.concat(qsmType == PortalQsmType.Transfer ? 'qsm__tab--active' : ''),
33177
33191
  onClick: function () {
33178
- return handleQsmTypeChange('transfers');
33192
+ return handleQsmTypeChange(PortalQsmType.Transfer);
33179
33193
  }
33180
33194
  },
33181
33195
  React__default.createElement('span', { className: 'qsm__tab__icons' }, React__default.createElement(Icon$2, { name: 'ui-backforward', height: 16 })),
@@ -33185,9 +33199,9 @@ var QSMContainer = function () {
33185
33199
  'button',
33186
33200
  {
33187
33201
  type: 'button',
33188
- className: 'qsm__tab '.concat(qsmType == 'cruises' ? 'qsm__tab--active' : ''),
33202
+ className: 'qsm__tab '.concat(qsmType == PortalQsmType.Cruise ? 'qsm__tab--active' : ''),
33189
33203
  onClick: function () {
33190
- return handleQsmTypeChange('cruises');
33204
+ return handleQsmTypeChange(PortalQsmType.Cruise);
33191
33205
  }
33192
33206
  },
33193
33207
  React__default.createElement('span', { className: 'qsm__tab__icons' }, React__default.createElement(Icon$2, { name: 'ui-ship', height: 16 })),
@@ -33197,7 +33211,7 @@ var QSMContainer = function () {
33197
33211
  React__default.createElement(
33198
33212
  'div',
33199
33213
  { className: 'qsm__filter' },
33200
- (qsmType === 'hotel' || qsmType === 'hotel-flight' || qsmType === 'groupTour') &&
33214
+ (qsmType === PortalQsmType.Accommodation || qsmType === PortalQsmType.AccommodationAndFlight || qsmType === PortalQsmType.GroupTour) &&
33201
33215
  React__default.createElement(
33202
33216
  'div',
33203
33217
  { className: 'radiobutton-group qsm__filter__inputgroup' },
@@ -33239,7 +33253,7 @@ var QSMContainer = function () {
33239
33253
  )
33240
33254
  )
33241
33255
  ),
33242
- qsmType === 'flight' &&
33256
+ qsmType === PortalQsmType.Flight &&
33243
33257
  React__default.createElement(
33244
33258
  'div',
33245
33259
  { className: 'radiobutton-group qsm__filter__inputgroup' },
@@ -33307,18 +33321,18 @@ var QSMContainer = function () {
33307
33321
  React__default.createElement(
33308
33322
  'div',
33309
33323
  { className: 'qsm__filter__classgroup' },
33310
- qsmType !== 'hotel' &&
33311
- qsmType !== 'car' &&
33312
- qsmType !== 'ticket' &&
33313
- qsmType !== 'cruises' &&
33314
- qsmType !== 'transfers' &&
33315
- qsmType !== 'groupTour' &&
33324
+ qsmType !== PortalQsmType.Accommodation &&
33325
+ qsmType !== PortalQsmType.Car &&
33326
+ qsmType !== PortalQsmType.Ticket &&
33327
+ qsmType !== PortalQsmType.Cruise &&
33328
+ qsmType !== PortalQsmType.Transfer &&
33329
+ qsmType !== PortalQsmType.GroupTour &&
33316
33330
  askTravelClass &&
33317
33331
  React__default.createElement(TravelClassPicker, null),
33318
- qsmType !== 'multidestination' &&
33319
- qsmType !== 'car' &&
33320
- qsmType !== 'flight' &&
33321
- qsmType !== 'transfers' &&
33332
+ qsmType !== PortalQsmType.Multidestination &&
33333
+ qsmType !== PortalQsmType.Car &&
33334
+ qsmType !== PortalQsmType.Flight &&
33335
+ qsmType !== PortalQsmType.Transfer &&
33322
33336
  askTravelType &&
33323
33337
  React__default.createElement(TravelTypePicker, null),
33324
33338
  askNationality && React__default.createElement(TravelNationalityPicker, null)
@@ -33327,17 +33341,17 @@ var QSMContainer = function () {
33327
33341
  React__default.createElement(
33328
33342
  'div',
33329
33343
  { className: 'qsm__input-group' },
33330
- (qsmType == 'flight' || qsmType == 'hotel-flight') &&
33344
+ (qsmType == PortalQsmType.Flight || qsmType == PortalQsmType.AccommodationAndFlight) &&
33331
33345
  originDestinationField &&
33332
33346
  React__default.createElement(DoubleSearchInputGroup, { fieldConfig: originDestinationField, showReverse: originDestinationField.showReverse }),
33333
- qsmType == 'flight' &&
33347
+ qsmType == PortalQsmType.Flight &&
33334
33348
  tripType == 'openjaw' &&
33335
33349
  openJawReturnDestinationField &&
33336
33350
  React__default.createElement(DoubleSearchInputGroup, {
33337
33351
  fieldConfig: openJawReturnDestinationField,
33338
33352
  showReverse: openJawReturnDestinationField.showReverse
33339
33353
  }),
33340
- (qsmType == 'hotel' || qsmType == 'hotel-flight' || qsmType == 'groupTour') &&
33354
+ (qsmType == PortalQsmType.Accommodation || qsmType == PortalQsmType.AccommodationAndFlight || qsmType == PortalQsmType.GroupTour) &&
33341
33355
  destination &&
33342
33356
  React__default.createElement(SearchInputGroup, { fieldConfig: destination }),
33343
33357
  React__default.createElement(Dates, { value: dateRange, onChange: handleDateChange }),
@@ -37790,7 +37804,7 @@ var FlyIn = function (_a) {
37790
37804
  );
37791
37805
  var handleClose = function () {
37792
37806
  if (isOpen && panelRef.current) {
37793
- if (srpType === 'flight') {
37807
+ if (srpType === PortalQsmType.Flight) {
37794
37808
  dispatch(setSelectedFlight(null));
37795
37809
  dispatch(setSelectedFlightDetails(null));
37796
37810
  onCancelSearch();
@@ -37823,8 +37837,8 @@ var FlyIn = function (_a) {
37823
37837
  )
37824
37838
  )
37825
37839
  ),
37826
- srpType === 'flight' && React__default.createElement(FlightsFlyIn, { isOpen: isOpen, setIsOpen: setIsOpen }),
37827
- (srpType === 'hotel' || srpType === 'groupTour') &&
37840
+ srpType === PortalQsmType.Flight && React__default.createElement(FlightsFlyIn, { isOpen: isOpen, setIsOpen: setIsOpen }),
37841
+ (srpType === PortalQsmType.Accommodation || srpType === PortalQsmType.GroupTour) &&
37828
37842
  React__default.createElement(AccommodationFlyIn, { isLoading: true, isOpen: isOpen, setIsOpen: setIsOpen })
37829
37843
  )
37830
37844
  );
@@ -40650,7 +40664,7 @@ var FlightResultsContainer = function (_a) {
40650
40664
  useEffect(
40651
40665
  function () {
40652
40666
  if (!(context === null || context === void 0 ? void 0 : context.showMockup)) {
40653
- if ((context === null || context === void 0 ? void 0 : context.type) === 'flight' && isHubReady) {
40667
+ if ((context === null || context === void 0 ? void 0 : context.type) === PortalQsmType.Flight && isHubReady) {
40654
40668
  onFlightSearch();
40655
40669
  }
40656
40670
  }
@@ -40790,7 +40804,7 @@ var FlightResultsContainer = function (_a) {
40790
40804
  'div',
40791
40805
  { className: 'search__results__wrapper' },
40792
40806
  flightsLoading && React__default.createElement(Spinner, null),
40793
- (context === null || context === void 0 ? void 0 : context.type) == 'flight' &&
40807
+ (context === null || context === void 0 ? void 0 : context.type) == PortalQsmType.Flight &&
40794
40808
  (context === null || context === void 0 ? void 0 : context.showFlightAccommodationResults) &&
40795
40809
  results &&
40796
40810
  results.length > 0 &&
@@ -41364,7 +41378,14 @@ var SearchResultsContainer = function () {
41364
41378
  officeId: 1,
41365
41379
  payload: {
41366
41380
  catalogueIds: (_a = context.tideConnection.catalogueIds) !== null && _a !== void 0 ? _a : [],
41367
- serviceType: context.type === 'hotel' || context.type === 'hotel-flight' ? 3 : context.type === 'flight' ? 7 : context.type === 'roundTrip' ? 1 : 0,
41381
+ serviceType:
41382
+ context.type === PortalQsmType.Accommodation || context.type === PortalQsmType.AccommodationAndFlight
41383
+ ? 3
41384
+ : context.type === PortalQsmType.Flight
41385
+ ? 7
41386
+ : context.type === PortalQsmType.RoundTrip
41387
+ ? 1
41388
+ : 0,
41368
41389
  searchType: 0,
41369
41390
  destination: {
41370
41391
  id: Number(destinationId),
@@ -41432,8 +41453,14 @@ var SearchResultsContainer = function () {
41432
41453
  payload: {
41433
41454
  catalogueIds: (_a = context.tideConnection.catalogueIds) !== null && _a !== void 0 ? _a : [],
41434
41455
  serviceType:
41435
- context.type === 'hotel' || context.type === 'hotel-flight' ? 3 : context.type === 'flight' ? 7 : context.type === 'roundTrip' ? 1 : undefined,
41436
- searchType: context.type === 'groupTour' ? 1 : 0,
41456
+ context.type === PortalQsmType.Accommodation || context.type === PortalQsmType.AccommodationAndFlight
41457
+ ? 3
41458
+ : context.type === PortalQsmType.Flight
41459
+ ? 7
41460
+ : context.type === PortalQsmType.RoundTrip
41461
+ ? 1
41462
+ : undefined,
41463
+ searchType: context.type === PortalQsmType.GroupTour ? 1 : 0,
41437
41464
  destination: {
41438
41465
  id: Number(destinationId),
41439
41466
  isCountry: destinationIsCountry,
@@ -41446,7 +41473,7 @@ var SearchResultsContainer = function () {
41446
41473
  toDate: to,
41447
41474
  earliestFromOffset: 0,
41448
41475
  latestToOffset: 0,
41449
- includeFlights: context.type === 'hotel-flight' ? true : false,
41476
+ includeFlights: context.type === PortalQsmType.AccommodationAndFlight ? true : false,
41450
41477
  // regimeCodes:
41451
41478
  // filters
41452
41479
  // .find((f) => f.property === 'regime')
@@ -41454,7 +41481,7 @@ var SearchResultsContainer = function () {
41454
41481
  // .flatMap((o) => o.value.toString()) || [],
41455
41482
  // minPrice: filters.find((f) => f.property === 'price')?.selectedMin,
41456
41483
  // maxPrice: filters.find((f) => f.property === 'price')?.selectedMax,
41457
- useExactDates: (context === null || context === void 0 ? void 0 : context.type) === 'groupTour' ? false : true,
41484
+ useExactDates: (context === null || context === void 0 ? void 0 : context.type) === PortalQsmType.GroupTour ? false : true,
41458
41485
  onlyCachedResults: false,
41459
41486
  includeAllAllotments: true,
41460
41487
  productIds: hotel ? [hotel] : [],
@@ -41591,7 +41618,7 @@ var SearchResultsContainer = function () {
41591
41618
  dispatch(setSelectedSearchResult(matching.productId));
41592
41619
  }
41593
41620
  } else {
41594
- if (context.type === 'hotel-flight') {
41621
+ if (context.type === PortalQsmType.AccommodationAndFlight) {
41595
41622
  dispatch(setSelectedSearchResult((_b = packageSearchResults[0]) === null || _b === void 0 ? void 0 : _b.productId));
41596
41623
  }
41597
41624
  }
@@ -41611,9 +41638,9 @@ var SearchResultsContainer = function () {
41611
41638
  };
41612
41639
  if (!(context === null || context === void 0 ? void 0 : context.showMockup)) {
41613
41640
  if (
41614
- (context === null || context === void 0 ? void 0 : context.type) === 'hotel-flight' ||
41615
- (context === null || context === void 0 ? void 0 : context.type) === 'hotel' ||
41616
- (context === null || context === void 0 ? void 0 : context.type) === 'groupTour'
41641
+ (context === null || context === void 0 ? void 0 : context.type) === PortalQsmType.AccommodationAndFlight ||
41642
+ (context === null || context === void 0 ? void 0 : context.type) === PortalQsmType.Accommodation ||
41643
+ (context === null || context === void 0 ? void 0 : context.type) === PortalQsmType.GroupTour
41617
41644
  ) {
41618
41645
  runSearch();
41619
41646
  }
@@ -41633,8 +41660,8 @@ var SearchResultsContainer = function () {
41633
41660
  case 0:
41634
41661
  if (!selectedSearchResultId || !context) return [2 /*return*/];
41635
41662
  if (
41636
- (context === null || context === void 0 ? void 0 : context.type) === 'hotel' ||
41637
- (context === null || context === void 0 ? void 0 : context.type) === 'groupTour'
41663
+ (context === null || context === void 0 ? void 0 : context.type) === PortalQsmType.Accommodation ||
41664
+ (context === null || context === void 0 ? void 0 : context.type) === PortalQsmType.GroupTour
41638
41665
  ) {
41639
41666
  handleFlyInToggle(true);
41640
41667
  }
@@ -41670,7 +41697,7 @@ var SearchResultsContainer = function () {
41670
41697
  productCode: selectedItem.code,
41671
41698
  fromDate: selectedItem.fromDate,
41672
41699
  toDate: selectedItem.toDate,
41673
- includeFlights: context.type === 'hotel-flight' ? true : false,
41700
+ includeFlights: context.type === PortalQsmType.AccommodationAndFlight ? true : false,
41674
41701
  includeHotels: true,
41675
41702
  includePaxTypes: true,
41676
41703
  checkExternalAvailability: true,
@@ -41743,7 +41770,7 @@ var SearchResultsContainer = function () {
41743
41770
  React__default.createElement(
41744
41771
  'div',
41745
41772
  { className: 'search__container' },
41746
- context.type === 'flight' &&
41773
+ context.type === PortalQsmType.Flight &&
41747
41774
  React__default.createElement(
41748
41775
  FlightSearchProvider,
41749
41776
  { tideConnection: context.tideConnection },
@@ -41758,11 +41785,14 @@ var SearchResultsContainer = function () {
41758
41785
  }
41759
41786
  })
41760
41787
  ),
41761
- (context.type === 'hotel-flight' || context.type === 'hotel' || context.type === 'groupTour' || context.type === 'roundTrip') &&
41788
+ (context.type === PortalQsmType.AccommodationAndFlight ||
41789
+ context.type === PortalQsmType.Accommodation ||
41790
+ context.type === PortalQsmType.GroupTour ||
41791
+ context.type === PortalQsmType.RoundTrip) &&
41762
41792
  React__default.createElement(
41763
41793
  React__default.Fragment,
41764
41794
  null,
41765
- context.type != 'hotel-flight' &&
41795
+ context.type != PortalQsmType.AccommodationAndFlight &&
41766
41796
  context.showFilters &&
41767
41797
  React__default.createElement(Filters, {
41768
41798
  initialFilters: initialFilters,
@@ -41774,7 +41804,7 @@ var SearchResultsContainer = function () {
41774
41804
  // handleApplyFilters={() => setSearchTrigger((prev) => prev + 1)}
41775
41805
  isLoading: isLoading
41776
41806
  }),
41777
- context.type === 'hotel-flight' &&
41807
+ context.type === PortalQsmType.AccommodationAndFlight &&
41778
41808
  React__default.createElement(Itinerary, {
41779
41809
  isOpen: itineraryOpen,
41780
41810
  handleSetIsOpen: function () {
@@ -41792,7 +41822,7 @@ var SearchResultsContainer = function () {
41792
41822
  React__default.createElement(
41793
41823
  'div',
41794
41824
  { className: 'search__results__actions' },
41795
- context.type != 'hotel-flight' &&
41825
+ context.type != PortalQsmType.AccommodationAndFlight &&
41796
41826
  context.showFilters &&
41797
41827
  React__default.createElement(
41798
41828
  'div',
@@ -41805,7 +41835,7 @@ var SearchResultsContainer = function () {
41805
41835
  React__default.createElement(Icon$1, { name: 'ui-filter', className: 'mobile-filters-button__icon', height: 16 }),
41806
41836
  translations.SRP.FILTERS
41807
41837
  ),
41808
- context.type === 'hotel-flight' &&
41838
+ context.type === PortalQsmType.AccommodationAndFlight &&
41809
41839
  React__default.createElement(
41810
41840
  'div',
41811
41841
  {
@@ -41865,8 +41895,8 @@ var SearchResultsContainer = function () {
41865
41895
  { className: 'search__results__wrapper' },
41866
41896
  context.showTabViews && React__default.createElement(TabViews, null),
41867
41897
  context.showRoundTripResults && context.showMockup && React__default.createElement(RoundTripResults, null),
41868
- context.type === 'groupTour' && React__default.createElement(GroupTourResults, { isLoading: isLoading }),
41869
- context.type === 'hotel-flight' &&
41898
+ context.type === PortalQsmType.GroupTour && React__default.createElement(GroupTourResults, { isLoading: isLoading }),
41899
+ context.type === PortalQsmType.AccommodationAndFlight &&
41870
41900
  context.showFlightResults &&
41871
41901
  (bookingPackageDetails === null || bookingPackageDetails === void 0 ? void 0 : bookingPackageDetails.outwardFlights) &&
41872
41902
  React__default.createElement(FlightResults, {
@@ -41874,7 +41904,7 @@ var SearchResultsContainer = function () {
41874
41904
  isDeparture: true
41875
41905
  }),
41876
41906
  context.showHotelAccommodationResults && React__default.createElement(HotelAccommodationResults, { isLoading: isLoading }),
41877
- context.type === 'hotel-flight' &&
41907
+ context.type === PortalQsmType.AccommodationAndFlight &&
41878
41908
  context.showFlightResults &&
41879
41909
  (bookingPackageDetails === null || bookingPackageDetails === void 0 ? void 0 : bookingPackageDetails.returnFlights) &&
41880
41910
  React__default.createElement(FlightResults, {
@@ -49315,6 +49345,7 @@ export {
49315
49345
  Login,
49316
49346
  Navbar,
49317
49347
  PhotoGallery,
49348
+ PortalQsmType,
49318
49349
  QSM,
49319
49350
  SearchResults,
49320
49351
  Slider
@@ -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;
@@ -1,9 +1,9 @@
1
1
  import { FlightSearchResponseItem } from '@qite/tide-client';
2
2
  import { ReactNode } from 'react';
3
- import { SRPType } from '../shared/types';
3
+ import { PortalQsmType } from '../shared/types';
4
4
  export type FlightSelectionMode = 'paired' | 'independent';
5
5
  export interface SearchResultsConfiguration {
6
- type: SRPType;
6
+ type: PortalQsmType;
7
7
  tideConnection: {
8
8
  host: string;
9
9
  apiKey: string;
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- import { SRPType } from '../../types';
2
+ import { PortalQsmType } from '../../types';
3
3
  type FlyInProps = {
4
4
  title: string;
5
- srpType: SRPType;
5
+ srpType: PortalQsmType;
6
6
  isOpen: boolean;
7
7
  setIsOpen: (open: boolean) => void;
8
8
  className?: string;
@@ -1,16 +1,17 @@
1
1
  import { ReactNode } from 'react';
2
- export type SRPType =
3
- | 'multidestination'
4
- | 'hotel'
5
- | 'roundTrip'
6
- | 'flight'
7
- | 'hotel-flight'
8
- | 'groupTour'
9
- | 'package'
10
- | 'ticket'
11
- | 'car'
12
- | 'transfers'
13
- | 'cruises';
2
+ export declare enum PortalQsmType {
3
+ Multidestination = 0,
4
+ Accommodation = 1,
5
+ AccommodationAndFlight = 2,
6
+ Flight = 3,
7
+ RoundTrip = 4,
8
+ GroupTour = 5,
9
+ Package = 6,
10
+ Ticket = 7,
11
+ Car = 8,
12
+ Transfer = 9,
13
+ Cruise = 10
14
+ }
14
15
  export interface ApiSettingsState {
15
16
  apiUrl: string;
16
17
  apiKey: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qite/tide-booking-component",
3
- "version": "1.4.75",
3
+ "version": "1.4.76",
4
4
  "description": "React Booking wizard & Booking product component for Tide",
5
5
  "main": "build/build-cjs/index.js",
6
6
  "types": "build/build-cjs/src/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "devDependencies": {
30
30
  "@jsonurl/jsonurl": "^1.1.4",
31
31
  "@popperjs/core": "^2.10.2",
32
- "@qite/tide-client": "^1.1.145",
32
+ "@qite/tide-client": "^1.1.146",
33
33
  "@reduxjs/toolkit": "^2.8.2",
34
34
  "@rollup/plugin-commonjs": "^19.0.1",
35
35
  "@rollup/plugin-json": "^4.1.0",
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Navbar } from '../../../../src';
2
+ import { Navbar, PortalQsmType } from '../../../../src';
3
3
  import { TideLogo, language, languages, topLinks, navItems } from '../../../../src/content/navbar/placeholderData';
4
4
  import Icon from '../../components/icon';
5
5
  import ContactForm from '../../components/contact';
@@ -53,7 +53,7 @@ const travelClasses = [
53
53
  ];
54
54
 
55
55
  let configuration: QSMConfiguration = {
56
- type: 'hotel',
56
+ type: PortalQsmType.Accommodation,
57
57
  askTravelers: true,
58
58
  askNationality: true,
59
59
  askTravelClass: true,