@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
@@ -1,7 +1,7 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { Filter, SearchResult, SearchResultsConfiguration } from '../../types';
3
3
  import SearchResults from '../..';
4
- import { Footer, Navbar } from '../../../../src';
4
+ import { Footer, Navbar, PortalQsmType } from '../../../../src';
5
5
  import { TideLogo, language, languages, topLinks, navItems } from '../../../../src/content/navbar/placeholderData';
6
6
  import Icon from '../../components/icon';
7
7
 
@@ -209,7 +209,7 @@ const FlightSearchResultsSelfContained: React.FC<FlightSearchResultsSelfContaine
209
209
  };
210
210
 
211
211
  const configuration: SearchResultsConfiguration = {
212
- type: 'flight', // "hotel" or "flight" or "roundTrip"
212
+ type: PortalQsmType.Flight, // "hotel" or "flight" or "roundTrip"
213
213
  tideConnection: {
214
214
  host: 'https://tide-default3468-acceptance.tidesoftware.be',
215
215
  apiKey: 'e9b95d79-de4c-41d6-ab7e-3dd429873058',
@@ -1,7 +1,7 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { SearchResult, SearchResultsConfiguration } from '../../types';
3
3
  import SearchResults from '../..';
4
- import { Navbar, Footer } from '../../../../src';
4
+ import { Navbar, Footer, PortalQsmType } from '../../../../src';
5
5
  import { TideLogo, language, languages, topLinks, navItems } from '../../../../src/content/navbar/placeholderData';
6
6
  import Icon from '../../components/icon';
7
7
 
@@ -86,7 +86,7 @@ const HotelFlightSearchResultsSelfContained: React.FC<HotelFlightSearchResultsSe
86
86
  };
87
87
 
88
88
  const configuration: SearchResultsConfiguration = {
89
- type: 'hotel-flight',
89
+ type: PortalQsmType.AccommodationAndFlight,
90
90
  showFilters: false,
91
91
  tideConnection: {
92
92
  host: 'https://tide-default3468-acceptance.tidesoftware.be',
@@ -1,7 +1,7 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { Filter, SearchResult, SearchResultsConfiguration } from '../../types';
3
3
  import SearchResults from '../..';
4
- import { Navbar, Footer } from '../../../../src';
4
+ import { Navbar, Footer, PortalQsmType } from '../../../../src';
5
5
  import { TideLogo, language, languages, topLinks, navItems } from '../../../../src/content/navbar/placeholderData';
6
6
  import Icon from '../../components/icon';
7
7
 
@@ -126,7 +126,7 @@ const HotelSearchResultsSelfContained: React.FC<HotelSearchResultsSelfContainedP
126
126
  };
127
127
 
128
128
  const configuration: SearchResultsConfiguration = {
129
- type: 'hotel', // "hotel" or "flight" or "roundTrip"
129
+ type: PortalQsmType.Accommodation, // "hotel" or "flight" or "roundTrip"
130
130
  tideConnection: {
131
131
  host: 'https://tide-default3468-acceptance.tidesoftware.be',
132
132
  apiKey: 'e9b95d79-de4c-41d6-ab7e-3dd429873058',
@@ -1,14 +1,14 @@
1
1
  import React from 'react';
2
2
  import { SearchResultsConfiguration } from '../../types';
3
3
  import SearchResults from '../..';
4
- import { Navbar, Footer } from '../../../../src';
4
+ import { Navbar, Footer, PortalQsmType } from '../../../../src';
5
5
  import { TideLogo, language, languages, topLinks, navItems } from '../../../../src/content/navbar/placeholderData';
6
6
 
7
7
  interface RoundtripSearchResultsSelfContainedProps {}
8
8
 
9
9
  const RoundtripSearchResultsSelfContained: React.FC<RoundtripSearchResultsSelfContainedProps> = () => {
10
10
  const configuration: SearchResultsConfiguration = {
11
- type: 'roundTrip',
11
+ type: PortalQsmType.RoundTrip,
12
12
  showFilters: true,
13
13
  tideConnection: {
14
14
  host: 'https://tide-default3468-acceptance.tidesoftware.be',
@@ -1,11 +1,11 @@
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
 
5
5
  export type FlightSelectionMode = 'paired' | 'independent';
6
6
 
7
7
  export interface SearchResultsConfiguration {
8
- type: SRPType;
8
+ type: PortalQsmType;
9
9
 
10
10
  // Tide connection
11
11
  tideConnection: {
@@ -3,13 +3,13 @@ import Icon from '../icon';
3
3
  import { useFlightSearch } from '../../../search-results/components/flight/flight-search-context';
4
4
  import { useDispatch } from 'react-redux';
5
5
  import { setSelectedFlight, setSelectedFlightDetails } from '../../../search-results/store/search-results-slice';
6
- import { SRPType } from '../../types';
7
6
  import FlightsFlyIn from './flights-flyin';
8
7
  import AccommodationFlyIn from './accommodation-flyin';
8
+ import { PortalQsmType } from '../../types';
9
9
 
10
10
  type FlyInProps = {
11
11
  title: string;
12
- srpType: SRPType;
12
+ srpType: PortalQsmType;
13
13
  isOpen: boolean;
14
14
  setIsOpen: (open: boolean) => void;
15
15
  className?: string;
@@ -49,7 +49,7 @@ const FlyIn: React.FC<FlyInProps> = ({ title, srpType, isOpen, setIsOpen, classN
49
49
 
50
50
  const handleClose = () => {
51
51
  if (isOpen && panelRef.current) {
52
- if (srpType === 'flight') {
52
+ if (srpType === PortalQsmType.Flight) {
53
53
  dispatch(setSelectedFlight(null));
54
54
  dispatch(setSelectedFlightDetails(null));
55
55
  onCancelSearch();
@@ -69,8 +69,10 @@ const FlyIn: React.FC<FlyInProps> = ({ title, srpType, isOpen, setIsOpen, classN
69
69
  </span>
70
70
  </div>
71
71
  </div>
72
- {srpType === 'flight' && <FlightsFlyIn isOpen={isOpen} setIsOpen={setIsOpen} />}
73
- {(srpType === 'hotel' || srpType === 'groupTour') && <AccommodationFlyIn isLoading={true} isOpen={isOpen} setIsOpen={setIsOpen} />}
72
+ {srpType === PortalQsmType.Flight && <FlightsFlyIn isOpen={isOpen} setIsOpen={setIsOpen} />}
73
+ {(srpType === PortalQsmType.Accommodation || srpType === PortalQsmType.GroupTour) && (
74
+ <AccommodationFlyIn isLoading={true} isOpen={isOpen} setIsOpen={setIsOpen} />
75
+ )}
74
76
  </div>
75
77
  </div>
76
78
  );
@@ -1,17 +1,18 @@
1
1
  import { ReactNode } from 'react';
2
2
 
3
- export type SRPType =
4
- | 'multidestination'
5
- | 'hotel'
6
- | 'roundTrip'
7
- | 'flight'
8
- | 'hotel-flight'
9
- | 'groupTour'
10
- | 'package'
11
- | 'ticket'
12
- | 'car'
13
- | 'transfers'
14
- | 'cruises';
3
+ export enum PortalQsmType {
4
+ Multidestination = 0,
5
+ Accommodation = 1,
6
+ AccommodationAndFlight = 2,
7
+ Flight = 3,
8
+ RoundTrip = 4,
9
+ GroupTour = 5,
10
+ Package = 6,
11
+ Ticket = 7,
12
+ Car = 8,
13
+ Transfer = 9,
14
+ Cruise = 10
15
+ }
15
16
 
16
17
  export interface ApiSettingsState {
17
18
  apiUrl: string;