@qite/tide-components 1.0.3 → 1.0.6
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 +477 -347
- package/build/build-cjs/src/search-results/components/traject/traject-node-card.d.ts +1 -0
- package/build/build-cjs/src/search-results/components/traject/traject-results-flyin.d.ts +6 -0
- package/build/build-cjs/src/search-results/store/search-results-slice.d.ts +20 -2
- package/build/build-cjs/src/search-results/types.d.ts +1 -0
- package/build/build-cjs/src/search-results/utils/traject-utils.d.ts +7 -8
- package/build/build-cjs/src/shared/booking/travelers-form.d.ts +1 -0
- package/build/build-esm/index.js +478 -348
- package/build/build-esm/src/search-results/components/traject/traject-node-card.d.ts +1 -0
- package/build/build-esm/src/search-results/components/traject/traject-results-flyin.d.ts +6 -0
- package/build/build-esm/src/search-results/store/search-results-slice.d.ts +20 -2
- package/build/build-esm/src/search-results/types.d.ts +1 -0
- package/build/build-esm/src/search-results/utils/traject-utils.d.ts +7 -8
- package/build/build-esm/src/shared/booking/travelers-form.d.ts +1 -0
- package/package.json +2 -2
|
@@ -40,7 +40,9 @@ export interface SearchResultsState {
|
|
|
40
40
|
bookingNumber?: string;
|
|
41
41
|
/** Per-traject-node availability, keyed by the entry line guid the node maps to. */
|
|
42
42
|
trajectNodeAvailability: Record<string, TrajectNodeAvailability>;
|
|
43
|
-
|
|
43
|
+
/** Per-flight-node one-way search results, keyed by the entry line guid. */
|
|
44
|
+
trajectFlightAvailability: Record<string, TrajectFlightAvailability>;
|
|
45
|
+
trajectEditLineGuid: string | null;
|
|
44
46
|
}
|
|
45
47
|
export type TrajectNodeStatus = 'idle' | 'loading' | 'resolved' | 'unavailable';
|
|
46
48
|
export interface TrajectNodeAvailability {
|
|
@@ -50,6 +52,12 @@ export interface TrajectNodeAvailability {
|
|
|
50
52
|
selectedCode: string | null;
|
|
51
53
|
preferredUnavailable: boolean;
|
|
52
54
|
}
|
|
55
|
+
export interface TrajectFlightAvailability {
|
|
56
|
+
lineGuid: string;
|
|
57
|
+
status: TrajectNodeStatus;
|
|
58
|
+
results: PackagingFlightResponse[];
|
|
59
|
+
selectedGuid: string | null;
|
|
60
|
+
}
|
|
53
61
|
export declare const setResults: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingPackageItem[], "searchResults/setResults">, setFilteredResults: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingPackageItem[], "searchResults/setFilteredResults">, setSelectedSearchResult: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingPackageItem | null, "searchResults/setSelectedSearchResult">, setPackagingAccoResults: import("@reduxjs/toolkit").ActionCreatorWithPayload<PackagingAccommodationResponse[], "searchResults/setPackagingAccoResults">, setFilteredPackagingAccoResults: import("@reduxjs/toolkit").ActionCreatorWithPayload<PackagingAccommodationResponse[], "searchResults/setFilteredPackagingAccoResults">, setFilteredPackagingFlightResults: import("@reduxjs/toolkit").ActionCreatorWithPayload<PackagingFlightResponse[], "searchResults/setFilteredPackagingFlightResults">, setPackagingAccoSearchDetails: import("@reduxjs/toolkit").ActionCreatorWithPayload<PackagingAccommodationResponse[], "searchResults/setPackagingAccoSearchDetails">, setSelectedPackagingAccoResult: import("@reduxjs/toolkit").ActionCreatorWithPayload<string | null, "searchResults/setSelectedPackagingAccoResult">, setPackagingFlightResults: import("@reduxjs/toolkit").ActionCreatorWithPayload<PackagingFlightResponse[], "searchResults/setPackagingFlightResults">, setSelectedPackagingFlight: import("@reduxjs/toolkit").ActionCreatorWithPayload<PackagingFlightResponse | null, "searchResults/setSelectedPackagingFlight">, setSelectedFlight: import("@reduxjs/toolkit").ActionCreatorWithPayload<ExtendedFlightSearchResponseItem | null, "searchResults/setSelectedFlight">, setSelectedFlightDetails: import("@reduxjs/toolkit").ActionCreatorWithPayload<ExtendedFlightSearchResponseItem | null, "searchResults/setSelectedFlightDetails">, setBookingPackageDetails: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
54
62
|
details: BookingPackage;
|
|
55
63
|
}, "searchResults/setBookingPackageDetails">, selectFlight: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -71,6 +79,16 @@ export declare const setResults: import("@reduxjs/toolkit").ActionCreatorWithPay
|
|
|
71
79
|
}, "searchResults/setTrajectNodeAvailability">, setTrajectNodeSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
72
80
|
lineGuid: string;
|
|
73
81
|
code: string;
|
|
74
|
-
}, "searchResults/setTrajectNodeSelection">,
|
|
82
|
+
}, "searchResults/setTrajectNodeSelection">, setTrajectFlightLoading: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "searchResults/setTrajectFlightLoading">, setTrajectFlightAvailability: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
83
|
+
lineGuid: string;
|
|
84
|
+
results: PackagingFlightResponse[];
|
|
85
|
+
selectedGuid: string | null;
|
|
86
|
+
}, "searchResults/setTrajectFlightAvailability">, setTrajectFlightSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
87
|
+
lineGuid: string;
|
|
88
|
+
guid: string;
|
|
89
|
+
}, "searchResults/setTrajectFlightSelection">, setTrajectEditLineGuid: import("@reduxjs/toolkit").ActionCreatorWithPayload<string | null, "searchResults/setTrajectEditLineGuid">, updateTrajectNodeResult: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
90
|
+
lineGuid: string;
|
|
91
|
+
result: PackagingAccommodationResponse;
|
|
92
|
+
}, "searchResults/updateTrajectNodeResult">, resetTrajectAvailability: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"searchResults/resetTrajectAvailability">, updateEditableEntryLine: import("@reduxjs/toolkit").ActionCreatorWithPayload<PackagingEntryLine, "searchResults/updateEditableEntryLine">, removeEditableEntryLines: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "searchResults/removeEditableEntryLines">;
|
|
75
93
|
declare const _default: import("@reduxjs/toolkit").Reducer<SearchResultsState>;
|
|
76
94
|
export default _default;
|
|
@@ -39,6 +39,7 @@ export interface SearchResultsConfiguration {
|
|
|
39
39
|
onFlightBook?: (result: ExtendedFlightSearchResponseItem) => void;
|
|
40
40
|
packagingEntry?: PackagingEntry | null;
|
|
41
41
|
trajectEntry?: PackagingTrajectResponse | null;
|
|
42
|
+
showNonPreferredItems?: boolean;
|
|
42
43
|
generatePaymentUrl?: boolean;
|
|
43
44
|
entryStatus?: number;
|
|
44
45
|
customEntryStatusId?: number;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { PackagingAccommodationRequest, PackagingAccommodationResponse, PackagingEntry, PackagingEntryLine, PackagingFlightResponse, PackagingRoom, PackagingTrajectAlternative, PackagingTrajectNode, PackagingTrajectResponse } from '@qite/tide-client';
|
|
1
|
+
import { FlightSearchRequest, PackagingAccommodationRequest, PackagingAccommodationResponse, PackagingEntry, PackagingEntryLine, PackagingFlightResponse, PackagingRoom, PackagingTrajectAlternative, PackagingTrajectNode, PackagingTrajectResponse } from '@qite/tide-client';
|
|
2
2
|
export declare const REGULAR_TRAJECT_NODE_TYPE = 0;
|
|
3
3
|
export declare const CONNECTING_TRAJECT_NODE_TYPE = 1;
|
|
4
4
|
export interface TrajectNodeWithLine {
|
|
5
5
|
node: PackagingTrajectNode;
|
|
6
6
|
line: PackagingEntryLine;
|
|
7
|
+
lines: PackagingEntryLine[];
|
|
7
8
|
}
|
|
8
9
|
export declare const isSearchableTrajectNode: (node: PackagingTrajectNode) => boolean;
|
|
9
10
|
export declare const isTrajectFlightNode: (node: PackagingTrajectNode) => boolean;
|
|
@@ -24,10 +25,8 @@ export declare const findCandidateForResult: (node: PackagingTrajectNode, result
|
|
|
24
25
|
export declare const matchesCode: (result: PackagingAccommodationResponse, code: string) => boolean;
|
|
25
26
|
export declare const getPackagingRoomsFromEntry: (entry: PackagingEntry) => PackagingRoom[];
|
|
26
27
|
export declare const pickCheapest: (results: PackagingAccommodationResponse[]) => PackagingAccommodationResponse | null;
|
|
27
|
-
export declare const
|
|
28
|
-
export declare const
|
|
29
|
-
export declare const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
unsupported: TrajectNodeWithLine[];
|
|
33
|
-
};
|
|
28
|
+
export declare const applyResultToLines: (lines: PackagingEntryLine[], result: PackagingAccommodationResponse) => PackagingEntryLine[];
|
|
29
|
+
export declare const applyResultToLine: (line: PackagingEntryLine, result: PackagingAccommodationResponse, roomIndex?: number) => PackagingEntryLine;
|
|
30
|
+
export declare const buildTrajectFlightRequest: ({ node, line }: TrajectNodeWithLine, context: TrajectSearchContext, pax: FlightSearchRequest["pax"]) => FlightSearchRequest;
|
|
31
|
+
export declare const pickCheapestFlight: (flights: PackagingFlightResponse[]) => PackagingFlightResponse | null;
|
|
32
|
+
export declare const applyFlightToLine: (line: PackagingEntryLine, flight: PackagingFlightResponse) => PackagingEntryLine;
|
|
@@ -39,6 +39,7 @@ export interface SharedTravelersFormProps {
|
|
|
39
39
|
onBookingTypeChange?: (bookingType: string) => void;
|
|
40
40
|
}
|
|
41
41
|
export declare function isBabyAge(age?: number | null, maxBabyAge?: number): boolean;
|
|
42
|
+
export declare function formatBirthDate(birthDate?: string): string;
|
|
42
43
|
export declare function createTraveler(traveler: RoomTraveler, followNumber: {
|
|
43
44
|
number: number;
|
|
44
45
|
}, personTranslation?: string, isCompact?: boolean, maxBabyAge?: number): Traveler;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qite/tide-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "React components for Tide (booking, product availability, form, ...)",
|
|
5
5
|
"main": "build/build-cjs/index.js",
|
|
6
6
|
"types": "build/build-cjs/src/index.d.ts",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@jsonurl/jsonurl": "^1.1.4",
|
|
38
38
|
"@popperjs/core": "^2.10.2",
|
|
39
|
-
"@qite/tide-client": "^2.0.
|
|
39
|
+
"@qite/tide-client": "^2.0.15",
|
|
40
40
|
"@reduxjs/toolkit": "^2.8.2",
|
|
41
41
|
"@rollup/plugin-commonjs": "^19.0.1",
|
|
42
42
|
"@rollup/plugin-json": "^4.1.0",
|