@qite/tide-booking-component 1.4.48 → 1.4.50
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.
- package/build/build-cjs/index.js +13 -13
- package/build/build-cjs/src/index.d.ts +2 -0
- package/build/build-cjs/src/qsm/components/item-picker/index.d.ts +2 -1
- package/build/build-cjs/src/qsm/store/qsm-slice.d.ts +2 -1
- package/build/build-cjs/src/qsm/types.d.ts +1 -10
- package/build/build-cjs/src/search-results/components/item-picker/index.d.ts +3 -2
- package/build/build-cjs/src/search-results/types.d.ts +0 -8
- package/build/build-cjs/src/shared/types.d.ts +11 -0
- package/build/build-esm/index.js +3 -3
- package/build/build-esm/src/index.d.ts +2 -0
- package/build/build-esm/src/qsm/components/item-picker/index.d.ts +2 -1
- package/build/build-esm/src/qsm/store/qsm-slice.d.ts +2 -1
- package/build/build-esm/src/qsm/types.d.ts +1 -10
- package/build/build-esm/src/search-results/components/item-picker/index.d.ts +3 -2
- package/build/build-esm/src/search-results/types.d.ts +0 -8
- package/build/build-esm/src/shared/types.d.ts +11 -0
- package/package.json +2 -1
- package/src/index.ts +2 -0
- package/src/qsm/components/item-picker/index.tsx +2 -1
- package/src/qsm/store/qsm-slice.ts +2 -1
- package/src/qsm/types.ts +1 -12
- package/src/search-results/components/item-picker/index.tsx +3 -2
- package/src/search-results/components/search-results-container/flight-search-results.tsx +3 -3
- package/src/search-results/types.ts +0 -10
- package/src/shared/types.ts +14 -0
package/build/build-cjs/index.js
CHANGED
|
@@ -5881,13 +5881,13 @@ var jaJson = {
|
|
|
5881
5881
|
SRP: SRP
|
|
5882
5882
|
};
|
|
5883
5883
|
|
|
5884
|
-
|
|
5884
|
+
exports.DepartureRange = void 0;
|
|
5885
5885
|
(function (DepartureRange) {
|
|
5886
5886
|
DepartureRange[(DepartureRange['Morning'] = 0)] = 'Morning';
|
|
5887
5887
|
DepartureRange[(DepartureRange['Afternoon'] = 1)] = 'Afternoon';
|
|
5888
5888
|
DepartureRange[(DepartureRange['Evening'] = 2)] = 'Evening';
|
|
5889
5889
|
DepartureRange[(DepartureRange['Night'] = 3)] = 'Night';
|
|
5890
|
-
})(DepartureRange || (DepartureRange = {}));
|
|
5890
|
+
})(exports.DepartureRange || (exports.DepartureRange = {}));
|
|
5891
5891
|
|
|
5892
5892
|
var formatPrice = function (price, currencyCode, locale) {
|
|
5893
5893
|
if (locale === void 0) {
|
|
@@ -6049,20 +6049,20 @@ var minutesToHoursString = function (totalMinutes) {
|
|
|
6049
6049
|
};
|
|
6050
6050
|
var rangeFromDateTimeInMinutes = function (dateTime) {
|
|
6051
6051
|
if (!dateTime) {
|
|
6052
|
-
return DepartureRange.Morning;
|
|
6052
|
+
return exports.DepartureRange.Morning;
|
|
6053
6053
|
}
|
|
6054
6054
|
var date = new Date(dateTime);
|
|
6055
6055
|
var hours = date.getHours();
|
|
6056
6056
|
var minutes = hours * 60 + date.getMinutes();
|
|
6057
6057
|
switch (true) {
|
|
6058
6058
|
case minutes >= 300 && minutes < 720:
|
|
6059
|
-
return DepartureRange.Morning;
|
|
6059
|
+
return exports.DepartureRange.Morning;
|
|
6060
6060
|
case minutes >= 720 && minutes < 1080:
|
|
6061
|
-
return DepartureRange.Afternoon;
|
|
6061
|
+
return exports.DepartureRange.Afternoon;
|
|
6062
6062
|
case minutes >= 1080 && minutes < 1440:
|
|
6063
|
-
return DepartureRange.Evening;
|
|
6063
|
+
return exports.DepartureRange.Evening;
|
|
6064
6064
|
default:
|
|
6065
|
-
return DepartureRange.Night;
|
|
6065
|
+
return exports.DepartureRange.Night;
|
|
6066
6066
|
}
|
|
6067
6067
|
};
|
|
6068
6068
|
|
|
@@ -35273,13 +35273,13 @@ var getNumberOfStopsLabel = function (flight, directLabel, stopsLabel, stopLabel
|
|
|
35273
35273
|
};
|
|
35274
35274
|
var getDepartureRangeName = function (translations, range) {
|
|
35275
35275
|
switch (range) {
|
|
35276
|
-
case DepartureRange.Morning:
|
|
35276
|
+
case exports.DepartureRange.Morning:
|
|
35277
35277
|
return translations.FLIGHTS_FORM.MORNING_DEPARTURE;
|
|
35278
|
-
case DepartureRange.Afternoon:
|
|
35278
|
+
case exports.DepartureRange.Afternoon:
|
|
35279
35279
|
return translations.FLIGHTS_FORM.AFTERNOON_DEPARTURE;
|
|
35280
|
-
case DepartureRange.Evening:
|
|
35280
|
+
case exports.DepartureRange.Evening:
|
|
35281
35281
|
return translations.FLIGHTS_FORM.EVENING_DEPARTURE;
|
|
35282
|
-
case DepartureRange.Night:
|
|
35282
|
+
case exports.DepartureRange.Night:
|
|
35283
35283
|
return translations.FLIGHTS_FORM.NIGHT_DEPARTURE;
|
|
35284
35284
|
default:
|
|
35285
35285
|
return '';
|
|
@@ -39654,8 +39654,8 @@ var FlightFilters = function (_a) {
|
|
|
39654
39654
|
};
|
|
39655
39655
|
|
|
39656
39656
|
var selectionTypes = [
|
|
39657
|
-
{ label: 'Independent Selection', code: 'independent' },
|
|
39658
|
-
{ label: 'Paired Selection', code: 'paired' }
|
|
39657
|
+
{ id: 0, label: 'Independent Selection', code: 'independent' },
|
|
39658
|
+
{ id: 1, label: 'Paired Selection', code: 'paired' }
|
|
39659
39659
|
];
|
|
39660
39660
|
var FlightResultsContainer = function (_a) {
|
|
39661
39661
|
var _b, _c;
|
|
@@ -11,4 +11,6 @@ export * from './content/header/types';
|
|
|
11
11
|
export * from './content/footer/types';
|
|
12
12
|
export * from './content/image-card-grid/types';
|
|
13
13
|
export * from './search-results/types';
|
|
14
|
+
export * from './qsm/types';
|
|
15
|
+
export * from './shared/types';
|
|
14
16
|
export { BookingProduct, BookingWizard, QSM, SearchResults, Navbar, Header, Footer, ImageCardGrid };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Nationality
|
|
2
|
+
import { Nationality } from '../../types';
|
|
3
|
+
import { TravelClass, TravelType } from '../../../shared/types';
|
|
3
4
|
interface ItemPickerProps {
|
|
4
5
|
items: TravelType[] | TravelClass[] | Nationality[];
|
|
5
6
|
selection: string | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { MobileFilterType, Room, TravelerType,
|
|
1
|
+
import { MobileFilterType, Room, TravelerType, TypeaheadOption, QsmType } from '../types';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { TravelType, TravelClass } from '../../shared/types';
|
|
3
4
|
export interface QSMState {
|
|
4
5
|
qsmType?: QsmType;
|
|
5
6
|
selectedOrigin?: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { TravelClass, TravelType } from '../shared/types';
|
|
2
3
|
export interface QSMConfiguration {
|
|
3
4
|
type?: QsmType;
|
|
4
5
|
askRooms?: boolean;
|
|
@@ -78,16 +79,6 @@ export interface Room {
|
|
|
78
79
|
kids: number;
|
|
79
80
|
babies: number;
|
|
80
81
|
}
|
|
81
|
-
export interface TravelType {
|
|
82
|
-
id: number;
|
|
83
|
-
label: string;
|
|
84
|
-
icon?: ReactNode;
|
|
85
|
-
}
|
|
86
|
-
export interface TravelClass {
|
|
87
|
-
id: number;
|
|
88
|
-
label: string;
|
|
89
|
-
icon?: ReactNode;
|
|
90
|
-
}
|
|
91
82
|
export interface Nationality {
|
|
92
83
|
id: number;
|
|
93
84
|
label: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { SortByType,
|
|
2
|
+
import { SortByType, SortingOption } from '../../types';
|
|
3
|
+
import { TravelClass, TravelType } from '../../../shared/types';
|
|
3
4
|
interface ItemPickerProps {
|
|
4
|
-
items: TravelType[] | TravelClass[] | SortByType[];
|
|
5
|
+
items: TravelType[] | TravelClass[] | SortByType[] | SortingOption[];
|
|
5
6
|
selection: string | undefined;
|
|
6
7
|
selectedSortByType?: SortByType;
|
|
7
8
|
label: string;
|
|
@@ -100,14 +100,6 @@ export interface Tag {
|
|
|
100
100
|
icon: ReactNode;
|
|
101
101
|
label: string;
|
|
102
102
|
}
|
|
103
|
-
export interface TravelType {
|
|
104
|
-
label: string;
|
|
105
|
-
icon?: ReactNode;
|
|
106
|
-
}
|
|
107
|
-
export interface TravelClass {
|
|
108
|
-
label: string;
|
|
109
|
-
icon?: ReactNode;
|
|
110
|
-
}
|
|
111
103
|
export interface SortingOption {
|
|
112
104
|
key: 'price-asc' | 'price-desc' | 'departure-date' | 'duration-asc' | 'duration-desc' | 'rating-asc' | 'rating-desc';
|
|
113
105
|
label: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
export interface ApiSettingsState {
|
|
2
3
|
apiUrl: string;
|
|
3
4
|
apiKey: string;
|
|
@@ -8,3 +9,13 @@ export declare enum DepartureRange {
|
|
|
8
9
|
Evening = 2,
|
|
9
10
|
Night = 3
|
|
10
11
|
}
|
|
12
|
+
export interface TravelType {
|
|
13
|
+
id: number;
|
|
14
|
+
label: string;
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export interface TravelClass {
|
|
18
|
+
id: number;
|
|
19
|
+
label: string;
|
|
20
|
+
icon?: ReactNode;
|
|
21
|
+
}
|
package/build/build-esm/index.js
CHANGED
|
@@ -39389,8 +39389,8 @@ var FlightFilters = function (_a) {
|
|
|
39389
39389
|
};
|
|
39390
39390
|
|
|
39391
39391
|
var selectionTypes = [
|
|
39392
|
-
{ label: 'Independent Selection', code: 'independent' },
|
|
39393
|
-
{ label: 'Paired Selection', code: 'paired' }
|
|
39392
|
+
{ id: 0, label: 'Independent Selection', code: 'independent' },
|
|
39393
|
+
{ id: 1, label: 'Paired Selection', code: 'paired' }
|
|
39394
39394
|
];
|
|
39395
39395
|
var FlightResultsContainer = function (_a) {
|
|
39396
39396
|
var _b, _c;
|
|
@@ -44144,4 +44144,4 @@ var signalR = /*#__PURE__*/ _mergeNamespaces(
|
|
|
44144
44144
|
[signalR$1]
|
|
44145
44145
|
);
|
|
44146
44146
|
|
|
44147
|
-
export { BookingProduct, BookingWizard, Footer, Header, ImageCardGrid, Navbar, QSM, SearchResults };
|
|
44147
|
+
export { BookingProduct, BookingWizard, DepartureRange, Footer, Header, ImageCardGrid, Navbar, QSM, SearchResults };
|
|
@@ -11,4 +11,6 @@ export * from './content/header/types';
|
|
|
11
11
|
export * from './content/footer/types';
|
|
12
12
|
export * from './content/image-card-grid/types';
|
|
13
13
|
export * from './search-results/types';
|
|
14
|
+
export * from './qsm/types';
|
|
15
|
+
export * from './shared/types';
|
|
14
16
|
export { BookingProduct, BookingWizard, QSM, SearchResults, Navbar, Header, Footer, ImageCardGrid };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Nationality
|
|
2
|
+
import { Nationality } from '../../types';
|
|
3
|
+
import { TravelClass, TravelType } from '../../../shared/types';
|
|
3
4
|
interface ItemPickerProps {
|
|
4
5
|
items: TravelType[] | TravelClass[] | Nationality[];
|
|
5
6
|
selection: string | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { MobileFilterType, Room, TravelerType,
|
|
1
|
+
import { MobileFilterType, Room, TravelerType, TypeaheadOption, QsmType } from '../types';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { TravelType, TravelClass } from '../../shared/types';
|
|
3
4
|
export interface QSMState {
|
|
4
5
|
qsmType?: QsmType;
|
|
5
6
|
selectedOrigin?: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { TravelClass, TravelType } from '../shared/types';
|
|
2
3
|
export interface QSMConfiguration {
|
|
3
4
|
type?: QsmType;
|
|
4
5
|
askRooms?: boolean;
|
|
@@ -78,16 +79,6 @@ export interface Room {
|
|
|
78
79
|
kids: number;
|
|
79
80
|
babies: number;
|
|
80
81
|
}
|
|
81
|
-
export interface TravelType {
|
|
82
|
-
id: number;
|
|
83
|
-
label: string;
|
|
84
|
-
icon?: ReactNode;
|
|
85
|
-
}
|
|
86
|
-
export interface TravelClass {
|
|
87
|
-
id: number;
|
|
88
|
-
label: string;
|
|
89
|
-
icon?: ReactNode;
|
|
90
|
-
}
|
|
91
82
|
export interface Nationality {
|
|
92
83
|
id: number;
|
|
93
84
|
label: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { SortByType,
|
|
2
|
+
import { SortByType, SortingOption } from '../../types';
|
|
3
|
+
import { TravelClass, TravelType } from '../../../shared/types';
|
|
3
4
|
interface ItemPickerProps {
|
|
4
|
-
items: TravelType[] | TravelClass[] | SortByType[];
|
|
5
|
+
items: TravelType[] | TravelClass[] | SortByType[] | SortingOption[];
|
|
5
6
|
selection: string | undefined;
|
|
6
7
|
selectedSortByType?: SortByType;
|
|
7
8
|
label: string;
|
|
@@ -100,14 +100,6 @@ export interface Tag {
|
|
|
100
100
|
icon: ReactNode;
|
|
101
101
|
label: string;
|
|
102
102
|
}
|
|
103
|
-
export interface TravelType {
|
|
104
|
-
label: string;
|
|
105
|
-
icon?: ReactNode;
|
|
106
|
-
}
|
|
107
|
-
export interface TravelClass {
|
|
108
|
-
label: string;
|
|
109
|
-
icon?: ReactNode;
|
|
110
|
-
}
|
|
111
103
|
export interface SortingOption {
|
|
112
104
|
key: 'price-asc' | 'price-desc' | 'departure-date' | 'duration-asc' | 'duration-desc' | 'rating-asc' | 'rating-desc';
|
|
113
105
|
label: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
export interface ApiSettingsState {
|
|
2
3
|
apiUrl: string;
|
|
3
4
|
apiKey: string;
|
|
@@ -8,3 +9,13 @@ export declare enum DepartureRange {
|
|
|
8
9
|
Evening = 2,
|
|
9
10
|
Night = 3
|
|
10
11
|
}
|
|
12
|
+
export interface TravelType {
|
|
13
|
+
id: number;
|
|
14
|
+
label: string;
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export interface TravelClass {
|
|
18
|
+
id: number;
|
|
19
|
+
label: string;
|
|
20
|
+
icon?: ReactNode;
|
|
21
|
+
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qite/tide-booking-component",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.50",
|
|
4
4
|
"description": "React Booking wizard & Booking product component for Tide",
|
|
5
5
|
"main": "build/build-cjs/index.js",
|
|
6
|
+
"types": "build/build-cjs/src/index.d.ts",
|
|
6
7
|
"module": "build/build-esm/index.js",
|
|
7
8
|
"scripts": {
|
|
8
9
|
"start": "rollup -c -w",
|
package/src/index.ts
CHANGED
|
@@ -12,5 +12,7 @@ export * from './content/header/types';
|
|
|
12
12
|
export * from './content/footer/types';
|
|
13
13
|
export * from './content/image-card-grid/types';
|
|
14
14
|
export * from './search-results/types';
|
|
15
|
+
export * from './qsm/types';
|
|
16
|
+
export * from './shared/types';
|
|
15
17
|
|
|
16
18
|
export { BookingProduct, BookingWizard, QSM, SearchResults, Navbar, Header, Footer, ImageCardGrid };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { useDispatch } from 'react-redux';
|
|
3
|
-
import { Nationality
|
|
3
|
+
import { Nationality } from '../../types';
|
|
4
|
+
import { TravelClass, TravelType } from '../../../shared/types';
|
|
4
5
|
|
|
5
6
|
interface ItemPickerProps {
|
|
6
7
|
items: TravelType[] | TravelClass[] | Nationality[];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { createSlice, PayloadAction } from '@reduxjs/toolkit';
|
|
2
2
|
|
|
3
|
-
import { MobileFilterType, Room, TravelerType,
|
|
3
|
+
import { MobileFilterType, Room, TravelerType, TypeaheadOption, QsmType } from '../types';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
|
+
import { TravelType, TravelClass } from '../../shared/types';
|
|
5
6
|
|
|
6
7
|
export interface QSMState {
|
|
7
8
|
qsmType?: QsmType;
|
package/src/qsm/types.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { TravelClass, TravelType } from '../shared/types';
|
|
2
3
|
|
|
3
4
|
export interface QSMConfiguration {
|
|
4
5
|
type?: QsmType;
|
|
@@ -106,18 +107,6 @@ export interface Room {
|
|
|
106
107
|
babies: number;
|
|
107
108
|
}
|
|
108
109
|
|
|
109
|
-
export interface TravelType {
|
|
110
|
-
id: number;
|
|
111
|
-
label: string;
|
|
112
|
-
icon?: ReactNode;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export interface TravelClass {
|
|
116
|
-
id: number;
|
|
117
|
-
label: string;
|
|
118
|
-
icon?: ReactNode;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
110
|
export interface Nationality {
|
|
122
111
|
id: number;
|
|
123
112
|
label: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
-
import { SortByType,
|
|
2
|
+
import { SortByType, SortingOption } from '../../types';
|
|
3
|
+
import { TravelClass, TravelType } from '../../../shared/types';
|
|
3
4
|
|
|
4
5
|
interface ItemPickerProps {
|
|
5
|
-
items: TravelType[] | TravelClass[] | SortByType[];
|
|
6
|
+
items: TravelType[] | TravelClass[] | SortByType[] | SortingOption[];
|
|
6
7
|
selection: string | undefined;
|
|
7
8
|
selectedSortByType?: SortByType;
|
|
8
9
|
label: string;
|
|
@@ -16,9 +16,9 @@ interface FlightResultsContainerProps {
|
|
|
16
16
|
isMobile: boolean;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
const selectionTypes: { label: string; code: FlightSelectionMode }[] = [
|
|
20
|
-
{ label: 'Independent Selection', code: 'independent' },
|
|
21
|
-
{ label: 'Paired Selection', code: 'paired' }
|
|
19
|
+
const selectionTypes: { id: number; label: string; code: FlightSelectionMode }[] = [
|
|
20
|
+
{ id: 0, label: 'Independent Selection', code: 'independent' },
|
|
21
|
+
{ id: 1, label: 'Paired Selection', code: 'paired' }
|
|
22
22
|
];
|
|
23
23
|
|
|
24
24
|
const FlightResultsContainer: React.FC<FlightResultsContainerProps> = ({ isMobile }) => {
|
|
@@ -131,16 +131,6 @@ export interface Tag {
|
|
|
131
131
|
label: string;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
export interface TravelType {
|
|
135
|
-
label: string;
|
|
136
|
-
icon?: ReactNode;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export interface TravelClass {
|
|
140
|
-
label: string;
|
|
141
|
-
icon?: ReactNode;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
134
|
export interface SortingOption {
|
|
145
135
|
key: 'price-asc' | 'price-desc' | 'departure-date' | 'duration-asc' | 'duration-desc' | 'rating-asc' | 'rating-desc';
|
|
146
136
|
label: string;
|
package/src/shared/types.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
1
3
|
export interface ApiSettingsState {
|
|
2
4
|
apiUrl: string;
|
|
3
5
|
apiKey: string;
|
|
@@ -9,3 +11,15 @@ export enum DepartureRange {
|
|
|
9
11
|
Evening = 2,
|
|
10
12
|
Night = 3
|
|
11
13
|
}
|
|
14
|
+
|
|
15
|
+
export interface TravelType {
|
|
16
|
+
id: number;
|
|
17
|
+
label: string;
|
|
18
|
+
icon?: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface TravelClass {
|
|
22
|
+
id: number;
|
|
23
|
+
label: string;
|
|
24
|
+
icon?: ReactNode;
|
|
25
|
+
}
|