@qite/tide-booking-component 1.4.114 → 1.4.116
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 +9 -3
- package/build/build-cjs/src/booking-wizard/types.d.ts +1 -0
- package/build/build-cjs/src/search-results/types.d.ts +1 -0
- package/build/build-esm/index.js +9 -3
- package/build/build-esm/src/booking-wizard/types.d.ts +1 -0
- package/build/build-esm/src/search-results/types.d.ts +1 -0
- package/package.json +2 -2
- package/src/booking-wizard/features/booking/booking-slice.ts +2 -1
- package/src/booking-wizard/features/booking/booking.tsx +2 -0
- package/src/booking-wizard/types.ts +1 -0
- package/src/search-results/types.ts +1 -0
- package/src/shared/components/flyin/flights-flyin.tsx +5 -2
package/build/build-cjs/index.js
CHANGED
|
@@ -20287,7 +20287,8 @@ var fetchPackageDetails = toolkit.createAsyncThunk('booking/details', function (
|
|
|
20287
20287
|
routeId: bookingAttributes.flightRouteId,
|
|
20288
20288
|
outwardFlight: outwardFlight,
|
|
20289
20289
|
returnFlight: returnFlight,
|
|
20290
|
-
vendorConfigurationId: bookingAttributes.vendorConfigurationId
|
|
20290
|
+
vendorConfigurationId: bookingAttributes.vendorConfigurationId,
|
|
20291
|
+
searchConfigurationId: bookingAttributes.searchConfigurationId
|
|
20291
20292
|
}
|
|
20292
20293
|
};
|
|
20293
20294
|
return [4 /*yield*/, packageApi.fetchDetails(request, signal, languageCode, state.apiSettings)];
|
|
@@ -29346,6 +29347,7 @@ var Booking = function (_a) {
|
|
|
29346
29347
|
var flight = getFlightsFromParams(params, 'flight');
|
|
29347
29348
|
var flightRouteId = getStringFromParams(params, 'flightRouteId');
|
|
29348
29349
|
var vendorConfigurationId = getNumberFromParams(params, 'vendorConfigurationId');
|
|
29350
|
+
var searchConfigurationId = getNumberFromParams(params, 'searchConfigurationId');
|
|
29349
29351
|
var allotmentName = getStringFromParams(params, 'allotmentName');
|
|
29350
29352
|
var allotmentIds = getNumbersFromParams(params, 'allotmentId');
|
|
29351
29353
|
var tourCode = getStringFromParams(params, 'tourCode');
|
|
@@ -29376,6 +29378,7 @@ var Booking = function (_a) {
|
|
|
29376
29378
|
tourCode: tourCode,
|
|
29377
29379
|
flightRouteId: flightRouteId,
|
|
29378
29380
|
vendorConfigurationId: vendorConfigurationId,
|
|
29381
|
+
searchConfigurationId: searchConfigurationId,
|
|
29379
29382
|
productCode: productCode,
|
|
29380
29383
|
productName: productName
|
|
29381
29384
|
};
|
|
@@ -35722,10 +35725,13 @@ var FlightsFlyIn = function (_a) {
|
|
|
35722
35725
|
return Math.round(combo.price - selectedCombinationFlight.price);
|
|
35723
35726
|
};
|
|
35724
35727
|
// TODO: go to booking page?
|
|
35725
|
-
var
|
|
35728
|
+
var onHandleConfirm = function () {
|
|
35726
35729
|
if (isOpen) {
|
|
35727
35730
|
onCancelSearch();
|
|
35728
35731
|
setIsOpen(false);
|
|
35732
|
+
if ((context === null || context === void 0 ? void 0 : context.onFlightBook) && selectedCombinationFlight) {
|
|
35733
|
+
context.onFlightBook(selectedCombinationFlight);
|
|
35734
|
+
}
|
|
35729
35735
|
}
|
|
35730
35736
|
};
|
|
35731
35737
|
return React__default['default'].createElement(
|
|
@@ -36342,7 +36348,7 @@ var FlightsFlyIn = function (_a) {
|
|
|
36342
36348
|
React__default['default'].createElement(
|
|
36343
36349
|
'div',
|
|
36344
36350
|
{ className: 'flyin__button-wrapper' },
|
|
36345
|
-
React__default['default'].createElement('button', { className: 'cta cta--select', onClick:
|
|
36351
|
+
React__default['default'].createElement('button', { className: 'cta cta--select', onClick: onHandleConfirm }, translations.PRODUCT.BOOK_NOW)
|
|
36346
36352
|
)
|
|
36347
36353
|
)
|
|
36348
36354
|
);
|
|
@@ -43,6 +43,7 @@ export interface SearchResultsConfiguration {
|
|
|
43
43
|
alt: string;
|
|
44
44
|
};
|
|
45
45
|
onBook?: (result: BookingPackage) => void;
|
|
46
|
+
onFlightBook?: (result: ExtendedFlightSearchResponseItem) => void;
|
|
46
47
|
packagingEntry?: PackagingEntry | null;
|
|
47
48
|
generatePaymentUrl?: boolean;
|
|
48
49
|
entryStatus?: number;
|
package/build/build-esm/index.js
CHANGED
|
@@ -20294,7 +20294,8 @@ var fetchPackageDetails = createAsyncThunk('booking/details', function (_1, _a)
|
|
|
20294
20294
|
routeId: bookingAttributes.flightRouteId,
|
|
20295
20295
|
outwardFlight: outwardFlight,
|
|
20296
20296
|
returnFlight: returnFlight,
|
|
20297
|
-
vendorConfigurationId: bookingAttributes.vendorConfigurationId
|
|
20297
|
+
vendorConfigurationId: bookingAttributes.vendorConfigurationId,
|
|
20298
|
+
searchConfigurationId: bookingAttributes.searchConfigurationId
|
|
20298
20299
|
}
|
|
20299
20300
|
};
|
|
20300
20301
|
return [4 /*yield*/, packageApi.fetchDetails(request, signal, languageCode, state.apiSettings)];
|
|
@@ -29265,6 +29266,7 @@ var Booking = function (_a) {
|
|
|
29265
29266
|
var flight = getFlightsFromParams(params, 'flight');
|
|
29266
29267
|
var flightRouteId = getStringFromParams(params, 'flightRouteId');
|
|
29267
29268
|
var vendorConfigurationId = getNumberFromParams(params, 'vendorConfigurationId');
|
|
29269
|
+
var searchConfigurationId = getNumberFromParams(params, 'searchConfigurationId');
|
|
29268
29270
|
var allotmentName = getStringFromParams(params, 'allotmentName');
|
|
29269
29271
|
var allotmentIds = getNumbersFromParams(params, 'allotmentId');
|
|
29270
29272
|
var tourCode = getStringFromParams(params, 'tourCode');
|
|
@@ -29295,6 +29297,7 @@ var Booking = function (_a) {
|
|
|
29295
29297
|
tourCode: tourCode,
|
|
29296
29298
|
flightRouteId: flightRouteId,
|
|
29297
29299
|
vendorConfigurationId: vendorConfigurationId,
|
|
29300
|
+
searchConfigurationId: searchConfigurationId,
|
|
29298
29301
|
productCode: productCode,
|
|
29299
29302
|
productName: productName
|
|
29300
29303
|
};
|
|
@@ -35607,10 +35610,13 @@ var FlightsFlyIn = function (_a) {
|
|
|
35607
35610
|
return Math.round(combo.price - selectedCombinationFlight.price);
|
|
35608
35611
|
};
|
|
35609
35612
|
// TODO: go to booking page?
|
|
35610
|
-
var
|
|
35613
|
+
var onHandleConfirm = function () {
|
|
35611
35614
|
if (isOpen) {
|
|
35612
35615
|
onCancelSearch();
|
|
35613
35616
|
setIsOpen(false);
|
|
35617
|
+
if ((context === null || context === void 0 ? void 0 : context.onFlightBook) && selectedCombinationFlight) {
|
|
35618
|
+
context.onFlightBook(selectedCombinationFlight);
|
|
35619
|
+
}
|
|
35614
35620
|
}
|
|
35615
35621
|
};
|
|
35616
35622
|
return React__default.createElement(
|
|
@@ -36207,7 +36213,7 @@ var FlightsFlyIn = function (_a) {
|
|
|
36207
36213
|
React__default.createElement(
|
|
36208
36214
|
'div',
|
|
36209
36215
|
{ className: 'flyin__button-wrapper' },
|
|
36210
|
-
React__default.createElement('button', { className: 'cta cta--select', onClick:
|
|
36216
|
+
React__default.createElement('button', { className: 'cta cta--select', onClick: onHandleConfirm }, translations.PRODUCT.BOOK_NOW)
|
|
36211
36217
|
)
|
|
36212
36218
|
)
|
|
36213
36219
|
);
|
|
@@ -43,6 +43,7 @@ export interface SearchResultsConfiguration {
|
|
|
43
43
|
alt: string;
|
|
44
44
|
};
|
|
45
45
|
onBook?: (result: BookingPackage) => void;
|
|
46
|
+
onFlightBook?: (result: ExtendedFlightSearchResponseItem) => void;
|
|
46
47
|
packagingEntry?: PackagingEntry | null;
|
|
47
48
|
generatePaymentUrl?: boolean;
|
|
48
49
|
entryStatus?: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qite/tide-booking-component",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.116",
|
|
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.
|
|
32
|
+
"@qite/tide-client": "^1.1.174",
|
|
33
33
|
"@reduxjs/toolkit": "^2.8.2",
|
|
34
34
|
"@rollup/plugin-commonjs": "^19.0.1",
|
|
35
35
|
"@rollup/plugin-json": "^4.1.0",
|
|
@@ -225,7 +225,8 @@ const fetchPackageDetails = createAsyncThunk('booking/details', async (_, { disp
|
|
|
225
225
|
routeId: bookingAttributes.flightRouteId,
|
|
226
226
|
outwardFlight: outwardFlight,
|
|
227
227
|
returnFlight: returnFlight,
|
|
228
|
-
vendorConfigurationId: bookingAttributes.vendorConfigurationId
|
|
228
|
+
vendorConfigurationId: bookingAttributes.vendorConfigurationId,
|
|
229
|
+
searchConfigurationId: bookingAttributes.searchConfigurationId
|
|
229
230
|
} as BookingPackageDetailsRequest
|
|
230
231
|
} as BookingPackageRequest<BookingPackageDetailsRequest>;
|
|
231
232
|
|
|
@@ -139,6 +139,7 @@ const Booking: React.FC<BookingProps> = ({ productCode, productName, thumbnailUr
|
|
|
139
139
|
const flight = getFlightsFromParams(params, 'flight');
|
|
140
140
|
const flightRouteId = getStringFromParams(params, 'flightRouteId');
|
|
141
141
|
const vendorConfigurationId = getNumberFromParams(params, 'vendorConfigurationId');
|
|
142
|
+
const searchConfigurationId = getNumberFromParams(params, 'searchConfigurationId');
|
|
142
143
|
const allotmentName = getStringFromParams(params, 'allotmentName');
|
|
143
144
|
const allotmentIds = getNumbersFromParams(params, 'allotmentId');
|
|
144
145
|
const tourCode = getStringFromParams(params, 'tourCode');
|
|
@@ -167,6 +168,7 @@ const Booking: React.FC<BookingProps> = ({ productCode, productName, thumbnailUr
|
|
|
167
168
|
tourCode,
|
|
168
169
|
flightRouteId,
|
|
169
170
|
vendorConfigurationId,
|
|
171
|
+
searchConfigurationId,
|
|
170
172
|
productCode,
|
|
171
173
|
productName
|
|
172
174
|
} as BookingAttributes;
|
|
@@ -60,6 +60,7 @@ export interface SearchResultsConfiguration {
|
|
|
60
60
|
|
|
61
61
|
destinationImage?: { url: string; alt: string };
|
|
62
62
|
onBook?: (result: BookingPackage) => void;
|
|
63
|
+
onFlightBook?: (result: ExtendedFlightSearchResponseItem) => void;
|
|
63
64
|
packagingEntry?: PackagingEntry | null;
|
|
64
65
|
|
|
65
66
|
generatePaymentUrl?: boolean;
|
|
@@ -140,10 +140,13 @@ const FlightsFlyIn: React.FC<FlightsFlyInProps> = ({ isOpen, setIsOpen }) => {
|
|
|
140
140
|
};
|
|
141
141
|
|
|
142
142
|
// TODO: go to booking page?
|
|
143
|
-
const
|
|
143
|
+
const onHandleConfirm = () => {
|
|
144
144
|
if (isOpen) {
|
|
145
145
|
onCancelSearch();
|
|
146
146
|
setIsOpen(false);
|
|
147
|
+
if (context?.onFlightBook && selectedCombinationFlight) {
|
|
148
|
+
context.onFlightBook(selectedCombinationFlight);
|
|
149
|
+
}
|
|
147
150
|
}
|
|
148
151
|
};
|
|
149
152
|
|
|
@@ -492,7 +495,7 @@ const FlightsFlyIn: React.FC<FlightsFlyInProps> = ({ isOpen, setIsOpen }) => {
|
|
|
492
495
|
{translations.SHARED.TOTAL_PRICE}: €{selectedCombinationFlight?.price?.toFixed(2)}
|
|
493
496
|
</div>
|
|
494
497
|
<div className="flyin__button-wrapper">
|
|
495
|
-
<button className="cta cta--select" onClick={
|
|
498
|
+
<button className="cta cta--select" onClick={onHandleConfirm}>
|
|
496
499
|
{translations.PRODUCT.BOOK_NOW}
|
|
497
500
|
</button>
|
|
498
501
|
</div>
|