@qite/tide-booking-component 1.3.2 → 1.3.4
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/.vs/ProjectSettings.json +3 -3
- package/.vs/VSWorkspaceState.json +5 -5
- package/README.md +8 -8
- package/build/build-cjs/booking-wizard/types.d.ts +1 -5
- package/build/build-cjs/index.js +58 -101
- package/build/build-esm/booking-wizard/types.d.ts +1 -5
- package/build/build-esm/index.js +58 -101
- package/package.json +75 -75
- package/rollup.config.js +23 -23
- package/src/booking-product/components/age-select.tsx +35 -35
- package/src/booking-product/components/amount-input.tsx +78 -78
- package/src/booking-product/components/date-range-picker/calendar-day.tsx +58 -58
- package/src/booking-product/components/date-range-picker/calendar.tsx +178 -178
- package/src/booking-product/components/date-range-picker/index.tsx +196 -196
- package/src/booking-product/components/dates.tsx +136 -136
- package/src/booking-product/components/footer.tsx +69 -69
- package/src/booking-product/components/header.tsx +79 -79
- package/src/booking-product/components/icon.tsx +251 -251
- package/src/booking-product/components/product.tsx +314 -314
- package/src/booking-product/components/rating.tsx +21 -21
- package/src/booking-product/components/rooms.tsx +195 -195
- package/src/booking-product/index.tsx +30 -30
- package/src/booking-product/settings-context.ts +14 -14
- package/src/booking-product/types.ts +28 -28
- package/src/booking-product/utils/api.ts +25 -25
- package/src/booking-product/utils/price.ts +29 -29
- package/src/booking-wizard/api-settings-slice.ts +24 -24
- package/src/booking-wizard/components/icon.tsx +508 -508
- package/src/booking-wizard/components/labeled-input.tsx +64 -64
- package/src/booking-wizard/components/labeled-select.tsx +69 -69
- package/src/booking-wizard/components/message.tsx +34 -34
- package/src/booking-wizard/components/multi-range-filter.tsx +113 -113
- package/src/booking-wizard/components/print-offer-button.tsx +63 -66
- package/src/booking-wizard/components/product-card.tsx +37 -37
- package/src/booking-wizard/components/step-indicator.tsx +51 -51
- package/src/booking-wizard/components/step-route.tsx +27 -27
- package/src/booking-wizard/declarations.d.ts +4 -4
- package/src/booking-wizard/features/booking/api.ts +49 -49
- package/src/booking-wizard/features/booking/booking-self-contained.tsx +389 -389
- package/src/booking-wizard/features/booking/booking-slice.ts +663 -663
- package/src/booking-wizard/features/booking/booking.tsx +361 -361
- package/src/booking-wizard/features/booking/constants.ts +16 -16
- package/src/booking-wizard/features/booking/selectors.ts +441 -441
- package/src/booking-wizard/features/confirmation/confirmation.tsx +97 -97
- package/src/booking-wizard/features/error/error.tsx +78 -78
- package/src/booking-wizard/features/flight-options/flight-filter.tsx +432 -432
- package/src/booking-wizard/features/flight-options/flight-option-flight.tsx +385 -385
- package/src/booking-wizard/features/flight-options/flight-option-modal.tsx +229 -229
- package/src/booking-wizard/features/flight-options/flight-option.tsx +81 -81
- package/src/booking-wizard/features/flight-options/flight-utils.ts +522 -516
- package/src/booking-wizard/features/flight-options/index.tsx +196 -196
- package/src/booking-wizard/features/price-details/price-details-api.ts +24 -24
- package/src/booking-wizard/features/price-details/price-details-slice.ts +178 -178
- package/src/booking-wizard/features/price-details/util.ts +155 -155
- package/src/booking-wizard/features/product-options/no-options.tsx +21 -21
- package/src/booking-wizard/features/product-options/none-option.tsx +120 -120
- package/src/booking-wizard/features/product-options/option-booking-airline-group.tsx +64 -64
- package/src/booking-wizard/features/product-options/option-booking-group.tsx +216 -216
- package/src/booking-wizard/features/product-options/option-item.tsx +317 -317
- package/src/booking-wizard/features/product-options/option-pax-card.tsx +201 -201
- package/src/booking-wizard/features/product-options/option-pax-group.tsx +175 -175
- package/src/booking-wizard/features/product-options/option-room.tsx +321 -321
- package/src/booking-wizard/features/product-options/option-unit-group.tsx +198 -198
- package/src/booking-wizard/features/product-options/option-units-card.tsx +185 -185
- package/src/booking-wizard/features/product-options/options-form.tsx +481 -563
- package/src/booking-wizard/features/room-options/index.tsx +187 -187
- package/src/booking-wizard/features/room-options/room-utils.ts +190 -190
- package/src/booking-wizard/features/room-options/room.tsx +160 -160
- package/src/booking-wizard/features/room-options/traveler-rooms.tsx +75 -75
- package/src/booking-wizard/features/sidebar/index.tsx +76 -76
- package/src/booking-wizard/features/sidebar/sidebar-flight.tsx +68 -68
- package/src/booking-wizard/features/sidebar/sidebar-util.ts +177 -177
- package/src/booking-wizard/features/sidebar/sidebar.tsx +364 -364
- package/src/booking-wizard/features/summary/summary-booking-option-pax.tsx +25 -25
- package/src/booking-wizard/features/summary/summary-booking-option-unit.tsx +25 -25
- package/src/booking-wizard/features/summary/summary-flight.tsx +39 -39
- package/src/booking-wizard/features/summary/summary-per-booking-option-group.tsx +69 -69
- package/src/booking-wizard/features/summary/summary-per-pax-option-group.tsx +63 -63
- package/src/booking-wizard/features/summary/summary-per-unit-option-group.tsx +66 -66
- package/src/booking-wizard/features/summary/summary-slice.ts +28 -28
- package/src/booking-wizard/features/summary/summary.tsx +674 -674
- package/src/booking-wizard/features/travelers-form/travelers-form-slice.ts +164 -164
- package/src/booking-wizard/features/travelers-form/travelers-form.tsx +754 -754
- package/src/booking-wizard/features/travelers-form/type-ahead-input.tsx +101 -101
- package/src/booking-wizard/features/travelers-form/validate-form.ts +245 -245
- package/src/booking-wizard/index.tsx +36 -36
- package/src/booking-wizard/settings-context.ts +62 -62
- package/src/booking-wizard/store.ts +31 -31
- package/src/booking-wizard/types.ts +279 -279
- package/src/booking-wizard/use-offer-printer.ts +117 -136
- package/src/index.ts +4 -4
- package/src/shared/components/loader.tsx +16 -16
- package/src/shared/translations/en-GB.json +237 -237
- package/src/shared/translations/fr-BE.json +238 -238
- package/src/shared/translations/nl-BE.json +237 -237
- package/src/shared/types.ts +4 -4
- package/src/shared/utils/class-util.ts +9 -9
- package/src/shared/utils/localization-util.ts +62 -62
- package/src/shared/utils/query-string-util.ts +119 -119
- package/src/shared/utils/tide-api-utils.ts +36 -36
- package/styles/booking-product-variables.scss +394 -394
- package/styles/booking-product.scss +446 -446
- package/styles/booking-wizard-variables.scss +873 -873
- package/styles/booking-wizard.scss +59 -59
- package/styles/components/_animations.scss +39 -39
- package/styles/components/_base.scss +107 -107
- package/styles/components/_booking.scss +879 -879
- package/styles/components/_button.scss +238 -238
- package/styles/components/_checkbox.scss +219 -219
- package/styles/components/_cta.scss +208 -208
- package/styles/components/_date-list.scss +41 -41
- package/styles/components/_date-range-picker.scss +225 -225
- package/styles/components/_decrement-increment.scss +35 -35
- package/styles/components/_dropdown.scss +72 -72
- package/styles/components/_flight-option.scss +1429 -1429
- package/styles/components/_form.scss +1583 -1583
- package/styles/components/_info-message.scss +71 -71
- package/styles/components/_input.scss +25 -25
- package/styles/components/_list.scss +187 -187
- package/styles/components/_loader.scss +72 -72
- package/styles/components/_mixins.scss +550 -550
- package/styles/components/_placeholders.scss +166 -166
- package/styles/components/_pricing-summary.scss +155 -155
- package/styles/components/_qsm.scss +17 -17
- package/styles/components/_radiobutton.scss +170 -170
- package/styles/components/_select-wrapper.scss +80 -80
- package/styles/components/_spinner.scss +29 -29
- package/styles/components/_step-indicators.scss +168 -168
- package/styles/components/_table.scss +81 -81
- package/styles/components/_tree.scss +530 -530
- package/styles/components/_typeahead.scss +281 -281
- package/styles/components/_variables.scss +89 -89
- package/tsconfig.json +24 -24
package/.vs/ProjectSettings.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
{
|
|
2
|
-
"CurrentProjectSetting": null
|
|
3
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"CurrentProjectSetting": null
|
|
3
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
{
|
|
2
|
-
"ExpandedNodes": [""],
|
|
3
|
-
"SelectedNode": "\\D:\\2.0. Qite\\Tide-Booking-Component\\tide-booking-component",
|
|
4
|
-
"PreviewInSolutionExplorer": false
|
|
5
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"ExpandedNodes": [""],
|
|
3
|
+
"SelectedNode": "\\D:\\2.0. Qite\\Tide-Booking-Component\\tide-booking-component",
|
|
4
|
+
"PreviewInSolutionExplorer": false
|
|
5
|
+
}
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# README
|
|
2
|
-
|
|
3
|
-
This is the unified Tide Booking Component.
|
|
4
|
-
|
|
5
|
-
## Remarks
|
|
6
|
-
|
|
7
|
-
Do not forget to sync React versions when you're doing local changes and when you try to test them in a local React project (check https://reactjs.org/warnings/invalid-hook-call-warning.html#duplicate-react).
|
|
8
|
-
If using the playground, after installing it's node modules execute the following command in the root folder `npm link ./playground/node_modules/react`
|
|
1
|
+
# README
|
|
2
|
+
|
|
3
|
+
This is the unified Tide Booking Component.
|
|
4
|
+
|
|
5
|
+
## Remarks
|
|
6
|
+
|
|
7
|
+
Do not forget to sync React versions when you're doing local changes and when you try to test them in a local React project (check https://reactjs.org/warnings/invalid-hook-call-warning.html#duplicate-react).
|
|
8
|
+
If using the playground, after installing it's node modules execute the following command in the root folder `npm link ./playground/node_modules/react`
|
|
@@ -9,12 +9,10 @@ export interface Settings {
|
|
|
9
9
|
roomOptions: {
|
|
10
10
|
isHidden?: boolean | null;
|
|
11
11
|
pathSuffix?: string | null;
|
|
12
|
-
reportPrintActionId?: number | null;
|
|
13
12
|
};
|
|
14
13
|
flightOptions: {
|
|
15
14
|
isHidden?: boolean | null;
|
|
16
15
|
pathSuffix?: string | null;
|
|
17
|
-
reportPrintActionId?: number | null;
|
|
18
16
|
};
|
|
19
17
|
options: {
|
|
20
18
|
pathSuffix: string;
|
|
@@ -22,16 +20,13 @@ export interface Settings {
|
|
|
22
20
|
};
|
|
23
21
|
travellers: {
|
|
24
22
|
pathSuffix: string;
|
|
25
|
-
reportPrintActionId?: number | null;
|
|
26
23
|
};
|
|
27
24
|
summary: {
|
|
28
25
|
pathSuffix: string;
|
|
29
26
|
checkboxes?: SummaryCheckbox[] | null;
|
|
30
|
-
reportPrintActionId?: number | null;
|
|
31
27
|
};
|
|
32
28
|
confirmation: {
|
|
33
29
|
pathSuffix: string;
|
|
34
|
-
reportPrintActionId?: number | null;
|
|
35
30
|
};
|
|
36
31
|
error: {
|
|
37
32
|
pathSuffix: string;
|
|
@@ -144,6 +139,7 @@ export interface BookingAttributes {
|
|
|
144
139
|
allotmentIds: number[];
|
|
145
140
|
includeFlights?: boolean;
|
|
146
141
|
flightRouteId?: string | null;
|
|
142
|
+
vendorConfigurationId?: number | null;
|
|
147
143
|
}
|
|
148
144
|
export interface FlightLine {
|
|
149
145
|
departureAirportIata?: string;
|
package/build/build-cjs/index.js
CHANGED
|
@@ -166,7 +166,7 @@ var PRODUCT$2 = {
|
|
|
166
166
|
NOT_AVAILABLE: "Non disponible",
|
|
167
167
|
NUMBER_OF_ROOMS: "Nombre de chambres",
|
|
168
168
|
AGE_BY_DEPARTURE_DATE: "Âge des enfants à la date de départ",
|
|
169
|
-
YEAR: "
|
|
169
|
+
YEAR: "An(s)",
|
|
170
170
|
APPLY: "Appliquer",
|
|
171
171
|
EDIT: "Modifier",
|
|
172
172
|
DEPARTURE: "Départ",
|
|
@@ -670,7 +670,7 @@ var PRODUCT = {
|
|
|
670
670
|
NOT_AVAILABLE: "Not available",
|
|
671
671
|
NUMBER_OF_ROOMS: "Number of rooms",
|
|
672
672
|
AGE_BY_DEPARTURE_DATE: "Age of children on departure date",
|
|
673
|
-
YEAR: "Year",
|
|
673
|
+
YEAR: "Year(s)",
|
|
674
674
|
APPLY: "Apply",
|
|
675
675
|
EDIT: "Edit",
|
|
676
676
|
DEPARTURE: "Departure",
|
|
@@ -7772,8 +7772,6 @@ build.update = update;
|
|
|
7772
7772
|
var validateVoucher_1 = build.validateVoucher = validateVoucher;
|
|
7773
7773
|
|
|
7774
7774
|
function buildTideClientConfig(settings) {
|
|
7775
|
-
console.log("buildTideClientConfig called with settings:", settings);
|
|
7776
|
-
console.log("process.env.REACT_APP_BOOKING_HOST:", process.env.REACT_APP_BOOKING_HOST);
|
|
7777
7775
|
var HOST = (settings === null || settings === void 0 ? void 0 : settings.apiUrl) || process.env.REACT_APP_BOOKING_HOST;
|
|
7778
7776
|
var API_KEY = (settings === null || settings === void 0 ? void 0 : settings.apiKey) || process.env.REACT_APP_BOOKING_API_KEY;
|
|
7779
7777
|
var token = selectAgentToken();
|
|
@@ -9810,7 +9808,6 @@ var fetchDetails = function (request, signal, languageCode, apiSettings) { retur
|
|
|
9810
9808
|
switch (_a.label) {
|
|
9811
9809
|
case 0:
|
|
9812
9810
|
tideClientConfig = buildTideClientConfig(apiSettings);
|
|
9813
|
-
console.log("tideClientConfig", tideClientConfig);
|
|
9814
9811
|
return [4 /*yield*/, details_1(tideClientConfig, request, signal, languageCode)];
|
|
9815
9812
|
case 1: return [2 /*return*/, _a.sent()];
|
|
9816
9813
|
}
|
|
@@ -10395,7 +10392,6 @@ var fetchPackageDetails = toolkit.createAsyncThunk("booking/details", function (
|
|
|
10395
10392
|
agentId = selectAgentId(state);
|
|
10396
10393
|
rooms = selectBookingRooms(state);
|
|
10397
10394
|
languageCode = selectLanguageCode(state);
|
|
10398
|
-
console.log("fetchPackageDetails");
|
|
10399
10395
|
if (lodash.isNil(productAttributes)) {
|
|
10400
10396
|
throw Error("productAttributes could not be found");
|
|
10401
10397
|
}
|
|
@@ -10457,10 +10453,9 @@ var fetchPackageDetails = toolkit.createAsyncThunk("booking/details", function (
|
|
|
10457
10453
|
routeId: bookingAttributes.flightRouteId,
|
|
10458
10454
|
outwardFlight: outwardFlight,
|
|
10459
10455
|
returnFlight: returnFlight,
|
|
10456
|
+
vendorConfigurationId: bookingAttributes.vendorConfigurationId,
|
|
10460
10457
|
},
|
|
10461
10458
|
};
|
|
10462
|
-
console.log("fetchPackageDetails request", request);
|
|
10463
|
-
console.log("apiSettings", state.apiSettings);
|
|
10464
10459
|
return [4 /*yield*/, packageApi.fetchDetails(request, signal, languageCode, state.apiSettings)];
|
|
10465
10460
|
case 1: return [2 /*return*/, _c.sent()];
|
|
10466
10461
|
}
|
|
@@ -10826,11 +10821,9 @@ var SettingsContext = React__default["default"].createContext({
|
|
|
10826
10821
|
basePath: "/boeken",
|
|
10827
10822
|
roomOptions: {
|
|
10828
10823
|
pathSuffix: "/",
|
|
10829
|
-
reportPrintActionId: null,
|
|
10830
10824
|
},
|
|
10831
10825
|
flightOptions: {
|
|
10832
10826
|
pathSuffix: "/vluchten",
|
|
10833
|
-
reportPrintActionId: null,
|
|
10834
10827
|
},
|
|
10835
10828
|
options: {
|
|
10836
10829
|
pathSuffix: "/opties",
|
|
@@ -10838,16 +10831,13 @@ var SettingsContext = React__default["default"].createContext({
|
|
|
10838
10831
|
},
|
|
10839
10832
|
travellers: {
|
|
10840
10833
|
pathSuffix: "/reizigers",
|
|
10841
|
-
reportPrintActionId: null,
|
|
10842
10834
|
},
|
|
10843
10835
|
summary: {
|
|
10844
10836
|
pathSuffix: "/samenvatting",
|
|
10845
10837
|
checkboxes: null,
|
|
10846
|
-
reportPrintActionId: null,
|
|
10847
10838
|
},
|
|
10848
10839
|
confirmation: {
|
|
10849
10840
|
pathSuffix: "/bevestiging",
|
|
10850
|
-
reportPrintActionId: null,
|
|
10851
10841
|
},
|
|
10852
10842
|
error: {
|
|
10853
10843
|
pathSuffix: "/mislukt",
|
|
@@ -11276,6 +11266,8 @@ var buildGroupedFlights = function (outwardFlights, returnFlights) {
|
|
|
11276
11266
|
outwardFlights.forEach(function (outwardFlight) {
|
|
11277
11267
|
if (outwardFlight.externalGuid) {
|
|
11278
11268
|
var returnFlight = returnFlights.find(function (x) { return x.externalGuid === outwardFlight.externalGuid; });
|
|
11269
|
+
if (!returnFlight)
|
|
11270
|
+
return;
|
|
11279
11271
|
pairs.push({ outward: outwardFlight, return: returnFlight });
|
|
11280
11272
|
}
|
|
11281
11273
|
else {
|
|
@@ -11288,17 +11280,20 @@ var buildGroupedFlights = function (outwardFlights, returnFlights) {
|
|
|
11288
11280
|
});
|
|
11289
11281
|
}
|
|
11290
11282
|
});
|
|
11291
|
-
var results =
|
|
11283
|
+
var results = [];
|
|
11284
|
+
pairs.forEach(function (x) {
|
|
11292
11285
|
var outwardFlightDetails = getFlightDetails(x.outward);
|
|
11293
11286
|
var returnFlightDetails = getFlightDetails(x.return);
|
|
11294
|
-
|
|
11287
|
+
if (!outwardFlightDetails || !returnFlightDetails)
|
|
11288
|
+
return;
|
|
11289
|
+
results.push({
|
|
11295
11290
|
isSelected: x.outward.isSelected && x.return.isSelected,
|
|
11296
11291
|
price: x.outward.price + x.return.price,
|
|
11297
11292
|
outward: outwardFlightDetails,
|
|
11298
11293
|
return: returnFlightDetails,
|
|
11299
11294
|
selectedOutward: x.outward,
|
|
11300
11295
|
selectedReturn: x.return,
|
|
11301
|
-
};
|
|
11296
|
+
});
|
|
11302
11297
|
});
|
|
11303
11298
|
return results;
|
|
11304
11299
|
};
|
|
@@ -11488,6 +11483,8 @@ var formatMinutes = function (minutes) {
|
|
|
11488
11483
|
return pad(hh, 2) + ":" + pad(mm, 2);
|
|
11489
11484
|
};
|
|
11490
11485
|
var getFlightDetails = function (flight) {
|
|
11486
|
+
if (flight.flightMetaData == null)
|
|
11487
|
+
return;
|
|
11491
11488
|
var firstLine = flight.flightMetaData.flightLines[0];
|
|
11492
11489
|
var lastLine = flight.flightMetaData.flightLines[flight.flightMetaData.flightLines.length - 1];
|
|
11493
11490
|
var airlineCode = flight.code.split("/")[1];
|
|
@@ -13207,14 +13204,7 @@ function useOfferPrinter(_a) {
|
|
|
13207
13204
|
cfg = buildTideClientConfig();
|
|
13208
13205
|
return [2 /*return*/, book_1(cfg, request, undefined, language)];
|
|
13209
13206
|
});
|
|
13210
|
-
}); }, [
|
|
13211
|
-
agentId,
|
|
13212
|
-
bookingPackage,
|
|
13213
|
-
getPax,
|
|
13214
|
-
language,
|
|
13215
|
-
officeId,
|
|
13216
|
-
tagIds,
|
|
13217
|
-
]);
|
|
13207
|
+
}); }, [agentId, bookingPackage, getPax, language, officeId, tagIds]);
|
|
13218
13208
|
var languageData = [
|
|
13219
13209
|
{ code: "nl-BE", tideId: 1 },
|
|
13220
13210
|
{ code: "fr-BE", tideId: 2 },
|
|
@@ -13222,7 +13212,7 @@ function useOfferPrinter(_a) {
|
|
|
13222
13212
|
];
|
|
13223
13213
|
function getTideLanguageId(code) {
|
|
13224
13214
|
var _a;
|
|
13225
|
-
return ((
|
|
13215
|
+
return ((_a = languageData.find(function (l) { return l.code === code; })) === null || _a === void 0 ? void 0 : _a.tideId) || 1;
|
|
13226
13216
|
}
|
|
13227
13217
|
var printOffer = React.useCallback(function (offer) { return __awaiter$1(_this, void 0, void 0, function () {
|
|
13228
13218
|
var cfg, req, res, buf, url;
|
|
@@ -13292,7 +13282,7 @@ var PrintOfferButton = function (_a) {
|
|
|
13292
13282
|
: stage === "printing"
|
|
13293
13283
|
? labelPrinting
|
|
13294
13284
|
: labelIdle;
|
|
13295
|
-
return (React__default["default"].createElement("button", { type:
|
|
13285
|
+
return (React__default["default"].createElement("button", { type: "button", onClick: handlePrint, disabled: disabled || loading, className: className }, label));
|
|
13296
13286
|
};
|
|
13297
13287
|
|
|
13298
13288
|
var OptionsForm = function () {
|
|
@@ -13322,9 +13312,7 @@ var OptionsForm = function () {
|
|
|
13322
13312
|
var bookingPackagePax = pax.filter(function (x) {
|
|
13323
13313
|
return room === null || room === void 0 ? void 0 : room.pax.some(function (y) { return y.id == x.id; });
|
|
13324
13314
|
});
|
|
13325
|
-
return bookingPackagePax.length > 0
|
|
13326
|
-
? bookingPackagePax
|
|
13327
|
-
: (_a = room === null || room === void 0 ? void 0 : room.pax) !== null && _a !== void 0 ? _a : [];
|
|
13315
|
+
return bookingPackagePax.length > 0 ? bookingPackagePax : (_a = room === null || room === void 0 ? void 0 : room.pax) !== null && _a !== void 0 ? _a : [];
|
|
13328
13316
|
};
|
|
13329
13317
|
var handleOnRoomChange = function (index, accommodationCode, regimeCode) {
|
|
13330
13318
|
if (!packageRooms)
|
|
@@ -13341,9 +13329,7 @@ var OptionsForm = function () {
|
|
|
13341
13329
|
return selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.requestRooms.flatMap(function (r) { return r.pax; });
|
|
13342
13330
|
};
|
|
13343
13331
|
// TAGS
|
|
13344
|
-
var packageTags = settings.hideTags
|
|
13345
|
-
? []
|
|
13346
|
-
: reactRedux.useSelector(selectPackageTags);
|
|
13332
|
+
var packageTags = settings.hideTags ? [] : reactRedux.useSelector(selectPackageTags);
|
|
13347
13333
|
var tagIds = (_a = reactRedux.useSelector(selectTagIds)) !== null && _a !== void 0 ? _a : [];
|
|
13348
13334
|
var handleSubmit = function (e) {
|
|
13349
13335
|
if (settings.skipRouter) {
|
|
@@ -13415,13 +13401,11 @@ var OptionsForm = function () {
|
|
|
13415
13401
|
var desiredReturnFlight_1 = packageDetails.returnFlights.find(function (x) { return x.entryLineGuid == returnFlight_1; });
|
|
13416
13402
|
if (desiredOutwardFlight_1 && desiredReturnFlight_1) {
|
|
13417
13403
|
dispatch(setPackage(__assign(__assign({}, packageDetails), { outwardFlights: packageDetails.outwardFlights.map(function (flight) {
|
|
13418
|
-
return __assign(__assign({}, flight), { isSelected: flight.entryLineGuid ==
|
|
13419
|
-
desiredOutwardFlight_1.entryLineGuid
|
|
13404
|
+
return __assign(__assign({}, flight), { isSelected: flight.entryLineGuid == desiredOutwardFlight_1.entryLineGuid
|
|
13420
13405
|
? true
|
|
13421
13406
|
: false });
|
|
13422
13407
|
}), returnFlights: packageDetails.returnFlights.map(function (flight) {
|
|
13423
|
-
return __assign(__assign({}, flight), { isSelected: flight.entryLineGuid ==
|
|
13424
|
-
desiredReturnFlight_1.entryLineGuid
|
|
13408
|
+
return __assign(__assign({}, flight), { isSelected: flight.entryLineGuid == desiredReturnFlight_1.entryLineGuid
|
|
13425
13409
|
? true
|
|
13426
13410
|
: false });
|
|
13427
13411
|
}) })));
|
|
@@ -13441,73 +13425,58 @@ var OptionsForm = function () {
|
|
|
13441
13425
|
var previousUrl = settings.roomOptions.isHidden
|
|
13442
13426
|
? "".concat(settings.basePath).concat(settings.flightOptions.pathSuffix, "?").concat(bookingQueryString)
|
|
13443
13427
|
: "".concat(settings.basePath).concat(settings.roomOptions.pathSuffix, "?").concat(bookingQueryString);
|
|
13444
|
-
var hasPrevious = !settings.roomOptions.isHidden ||
|
|
13445
|
-
|
|
13446
|
-
var showPackageTagsOrRoomoptions = showRoomOptions ||
|
|
13447
|
-
(packageTags && !lodash.isEmpty(packageTags));
|
|
13428
|
+
var hasPrevious = !settings.roomOptions.isHidden || !settings.flightOptions.isHidden;
|
|
13429
|
+
var showPackageTagsOrRoomoptions = showRoomOptions || (packageTags && !lodash.isEmpty(packageTags));
|
|
13448
13430
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
13449
|
-
React__default["default"].createElement("form", { className:
|
|
13431
|
+
React__default["default"].createElement("form", { className: "form", name: "booking--options", id: "booking--options", noValidate: true, onSubmit: handleSubmit },
|
|
13450
13432
|
isLoading && settings.loaderComponent,
|
|
13451
|
-
!isLoading && (React__default["default"].createElement("div", { className:
|
|
13452
|
-
showPackageTagsOrRoomoptions && (React__default["default"].createElement("div", { className:
|
|
13453
|
-
React__default["default"].createElement("div", { className:
|
|
13454
|
-
React__default["default"].createElement("div", { className:
|
|
13433
|
+
!isLoading && (React__default["default"].createElement("div", { className: "form__region" },
|
|
13434
|
+
showPackageTagsOrRoomoptions && (React__default["default"].createElement("div", { className: "form__group" },
|
|
13435
|
+
React__default["default"].createElement("div", { className: "booking-card" },
|
|
13436
|
+
React__default["default"].createElement("div", { className: "booking-card__body" },
|
|
13455
13437
|
React__default["default"].createElement("div", { className: buildClassName([
|
|
13456
13438
|
"booking-card__group",
|
|
13457
13439
|
"booking-card__group--package",
|
|
13458
13440
|
]) },
|
|
13459
|
-
showRoomOptions && (React__default["default"].createElement("span", { className:
|
|
13460
|
-
|
|
13461
|
-
|
|
13462
|
-
showRoomOptions && (React__default["default"].createElement("table", { className: 'table table--striped' },
|
|
13441
|
+
showRoomOptions && (React__default["default"].createElement("span", { className: "booking-card__tag" }, translations.OPTIONS_FORM.PACKAGE)),
|
|
13442
|
+
React__default["default"].createElement("div", { className: "booking-card__group-body" },
|
|
13443
|
+
showRoomOptions && (React__default["default"].createElement("table", { className: "table table--striped" },
|
|
13463
13444
|
React__default["default"].createElement("tbody", null, packageRooms &&
|
|
13464
13445
|
packageRooms.map(function (room) { return (React__default["default"].createElement(OptionRoom, { key: room.index, packageRoom: room, pax: getRoomPax(room.index), optionPax: optionPax, onRoomChange: handleOnRoomChange })); })))),
|
|
13465
|
-
packageTags &&
|
|
13466
|
-
|
|
13467
|
-
|
|
13468
|
-
React__default["default"].createElement("input", { type: 'checkbox', id: "tag-translation-".concat(index, "-").concat(tag.title), name: "tag-translation-".concat(index, "-").concat(tag.title), className: 'checkbox__input', checked: tagIds === null || tagIds === void 0 ? void 0 : tagIds.includes(tag.id), onChange: function (e) {
|
|
13446
|
+
packageTags && !lodash.isEmpty(packageTags) && (React__default["default"].createElement("div", { className: "booking-card__tag-translations" }, packageTags.map(function (tag, index) { return (React__default["default"].createElement("label", { key: index, htmlFor: "tag-translation-".concat(index, "-").concat(tag.title), className: "checkbox__label tag-translation" },
|
|
13447
|
+
React__default["default"].createElement("div", { className: "tag-translation-input__container" },
|
|
13448
|
+
React__default["default"].createElement("input", { type: "checkbox", id: "tag-translation-".concat(index, "-").concat(tag.title), name: "tag-translation-".concat(index, "-").concat(tag.title), className: "checkbox__input", checked: tagIds === null || tagIds === void 0 ? void 0 : tagIds.includes(tag.id), onChange: function (e) {
|
|
13469
13449
|
return handleOnTagChange(tag.id, e.target.checked);
|
|
13470
13450
|
} })),
|
|
13471
|
-
React__default["default"].createElement("span", { className:
|
|
13451
|
+
React__default["default"].createElement("span", { className: "tag-translation__title" }, tag.title),
|
|
13472
13452
|
"\u00A0",
|
|
13473
|
-
React__default["default"].createElement("span", { className:
|
|
13474
|
-
optionUnits && !lodash.isEmpty(optionUnits) && (React__default["default"].createElement("div", { className:
|
|
13475
|
-
React__default["default"].createElement("div", { className:
|
|
13476
|
-
React__default["default"].createElement("div", { className:
|
|
13477
|
-
React__default["default"].createElement("h2", { className:
|
|
13478
|
-
|
|
13479
|
-
React__default["default"].createElement("div", { className: 'booking-card__body' },
|
|
13453
|
+
React__default["default"].createElement("span", { className: "tag-translation__description" }, tag.description))); }))))))))),
|
|
13454
|
+
optionUnits && !lodash.isEmpty(optionUnits) && (React__default["default"].createElement("div", { className: "form__group" },
|
|
13455
|
+
React__default["default"].createElement("div", { className: "booking-card" },
|
|
13456
|
+
React__default["default"].createElement("div", { className: "booking-card__header" },
|
|
13457
|
+
React__default["default"].createElement("h2", { className: "booking-card__header-heading" }, translations.OPTIONS_FORM.PER_UNIT_TITLE)),
|
|
13458
|
+
React__default["default"].createElement("div", { className: "booking-card__body" },
|
|
13480
13459
|
React__default["default"].createElement(OptionUnitsCard, { units: optionUnits, onUnitsChange: handleOnUnitsChange }))))),
|
|
13481
|
-
optionPax && !lodash.isEmpty(optionPax) && (React__default["default"].createElement("div", { className:
|
|
13482
|
-
React__default["default"].createElement("div", { className:
|
|
13483
|
-
React__default["default"].createElement("div", { className:
|
|
13484
|
-
React__default["default"].createElement("h2", { className:
|
|
13485
|
-
|
|
13486
|
-
React__default["default"].createElement("div", { className: 'booking-card__body' },
|
|
13460
|
+
optionPax && !lodash.isEmpty(optionPax) && (React__default["default"].createElement("div", { className: "form__group" },
|
|
13461
|
+
React__default["default"].createElement("div", { className: "booking-card" },
|
|
13462
|
+
React__default["default"].createElement("div", { className: "booking-card__header" },
|
|
13463
|
+
React__default["default"].createElement("h2", { className: "booking-card__header-heading" }, translations.OPTIONS_FORM.PER_PAX_TITLE)),
|
|
13464
|
+
React__default["default"].createElement("div", { className: "booking-card__body" },
|
|
13487
13465
|
React__default["default"].createElement(OptionPaxCard, { pax: optionPax, onPaxChange: handleOnPaxChange, requestRoomsPax: requestRoomsPax }))))),
|
|
13488
|
-
groups && !lodash.isEmpty(groups) && (React__default["default"].createElement("div", { className:
|
|
13489
|
-
React__default["default"].createElement("div", { className:
|
|
13490
|
-
React__default["default"].createElement("div", { className:
|
|
13491
|
-
React__default["default"].createElement("h2", { className:
|
|
13492
|
-
|
|
13493
|
-
|
|
13494
|
-
React__default["default"].createElement("div", { className: 'booking-card__group booking-card__group--active' },
|
|
13466
|
+
groups && !lodash.isEmpty(groups) && (React__default["default"].createElement("div", { className: "form__group" },
|
|
13467
|
+
React__default["default"].createElement("div", { className: "booking-card" },
|
|
13468
|
+
React__default["default"].createElement("div", { className: "booking-card__header" },
|
|
13469
|
+
React__default["default"].createElement("h2", { className: "booking-card__header-heading" }, translations.OPTIONS_FORM.PER_BOOKING_TITLE)),
|
|
13470
|
+
React__default["default"].createElement("div", { className: "booking-card__body" },
|
|
13471
|
+
React__default["default"].createElement("div", { className: "booking-card__group booking-card__group--active" },
|
|
13495
13472
|
groups.map(function (group, i) { return (React__default["default"].createElement(OptionBookingGroup, { key: "".concat(group.name, "_").concat(i), group: group, firstClassName: "booking-card__group-body", secondClassName: "booking-card__group-heading", parentId: "booking_".concat(group.name), onGroupChange: handleOnGroupChange })); }), airlineGroups === null || airlineGroups === void 0 ? void 0 :
|
|
13496
13473
|
airlineGroups.map(function (group, i) { return (React__default["default"].createElement(OptionBookingAirlineGroup, { key: "".concat(group.label, "_").concat(i), airGroup: group, onGroupChange: handleOnAirlineGroupChange })); }), airportGroups === null || airportGroups === void 0 ? void 0 :
|
|
13497
13474
|
airportGroups.map(function (group, i) { return (React__default["default"].createElement(OptionBookingAirlineGroup, { key: "".concat(group.label, "_").concat(i), airGroup: group, onGroupChange: handleOnAirportGroupChange })); })))))),
|
|
13498
|
-
lodash.isEmpty(groups) &&
|
|
13499
|
-
|
|
13500
|
-
|
|
13501
|
-
|
|
13502
|
-
|
|
13503
|
-
token &&
|
|
13504
|
-
settings.options.reportPrintActionId && (React__default["default"].createElement(PrintOfferButton, { bookingPackage: packageDetails, getPax: getPax, tagIds: tagIds, printActionId: settings.options.reportPrintActionId, labelIdle: translations.PRINT_OFFER_BUTTON.LABEL_IDLE, labelCreating: translations.PRINT_OFFER_BUTTON
|
|
13505
|
-
.LABEL_CREATING, labelPrinting: translations.PRINT_OFFER_BUTTON
|
|
13506
|
-
.LABEL_PRINTING, className: 'cta spinner-button' })),
|
|
13507
|
-
React__default["default"].createElement("button", { type: 'submit', title: translations.STEPS.NEXT, disabled: isLoading, className: buildClassName([
|
|
13508
|
-
"cta",
|
|
13509
|
-
isLoading && "cta--disabled",
|
|
13510
|
-
]) }, translations.STEPS.NEXT)))));
|
|
13475
|
+
lodash.isEmpty(groups) && lodash.isEmpty(optionUnits) && lodash.isEmpty(optionPax) && (React__default["default"].createElement(NoOptions, null)))),
|
|
13476
|
+
React__default["default"].createElement("div", { className: "booking__navigator" },
|
|
13477
|
+
hasPrevious && (React__default["default"].createElement(React__default["default"].Fragment, null, settings.skipRouter ? (React__default["default"].createElement("button", { type: "button", title: translations.STEPS.PREVIOUS, onClick: function () { return goPrevious(); }, className: "cta cta--secondary" }, translations.STEPS.PREVIOUS)) : (React__default["default"].createElement(router.Link, { to: previousUrl, title: translations.STEPS.PREVIOUS, className: "cta cta--secondary" }, translations.STEPS.PREVIOUS)))),
|
|
13478
|
+
token && settings.options.reportPrintActionId && (React__default["default"].createElement(PrintOfferButton, { bookingPackage: packageDetails, getPax: getPax, tagIds: tagIds, printActionId: settings.options.reportPrintActionId, labelIdle: translations.PRINT_OFFER_BUTTON.LABEL_IDLE, labelCreating: translations.PRINT_OFFER_BUTTON.LABEL_CREATING, labelPrinting: translations.PRINT_OFFER_BUTTON.LABEL_PRINTING, className: "cta spinner-button" })),
|
|
13479
|
+
React__default["default"].createElement("button", { type: "submit", title: translations.STEPS.NEXT, disabled: isLoading, className: buildClassName(["cta", isLoading && "cta--disabled"]) }, translations.STEPS.NEXT)))));
|
|
13511
13480
|
};
|
|
13512
13481
|
|
|
13513
13482
|
var RoomOption = function (_a) {
|
|
@@ -14873,13 +14842,13 @@ var Booking = function (_a) {
|
|
|
14873
14842
|
React.useEffect(function () {
|
|
14874
14843
|
var _a;
|
|
14875
14844
|
var params = new URLSearchParams(location.search);
|
|
14876
|
-
console.log("params", params);
|
|
14877
14845
|
var startDate = getDateFromParams(params, "startDate");
|
|
14878
14846
|
var endDate = getDateFromParams(params, "endDate");
|
|
14879
14847
|
var catalog = getNumberFromParams(params, "catalog");
|
|
14880
14848
|
var rooms = getRoomsFromParams(params, "rooms");
|
|
14881
14849
|
var flight = getFlightsFromParams(params, "flight");
|
|
14882
14850
|
var flightRouteId = getStringFromParams(params, "flightRouteId");
|
|
14851
|
+
var vendorConfigurationId = getNumberFromParams(params, "vendorConfigurationId");
|
|
14883
14852
|
var allotmentName = getStringFromParams(params, "allotmentName");
|
|
14884
14853
|
var allotmentIds = getNumbersFromParams(params, "allotmentId");
|
|
14885
14854
|
var tourCode = getStringFromParams(params, "tourCode");
|
|
@@ -14906,6 +14875,7 @@ var Booking = function (_a) {
|
|
|
14906
14875
|
allotmentIds: allotmentIds,
|
|
14907
14876
|
tourCode: tourCode,
|
|
14908
14877
|
flightRouteId: flightRouteId,
|
|
14878
|
+
vendorConfigurationId: vendorConfigurationId,
|
|
14909
14879
|
}));
|
|
14910
14880
|
}
|
|
14911
14881
|
else {
|
|
@@ -14913,15 +14883,10 @@ var Booking = function (_a) {
|
|
|
14913
14883
|
}
|
|
14914
14884
|
}, [location.search, setBookingAttributes, setBookingNumber, includeFlights]);
|
|
14915
14885
|
React.useEffect(function () {
|
|
14916
|
-
console.log("isRetry", isRetry);
|
|
14917
|
-
console.log("productAttributes", productAttributes);
|
|
14918
|
-
console.log("bookingAttributes", bookingAttributes);
|
|
14919
|
-
console.log("bookingNumber", lodash.isNil(bookingNumber));
|
|
14920
14886
|
if (!productAttributes ||
|
|
14921
14887
|
!bookingAttributes ||
|
|
14922
14888
|
!lodash.isNil(bookingNumber) ||
|
|
14923
14889
|
!isRetry) {
|
|
14924
|
-
console.log("return on retry");
|
|
14925
14890
|
return;
|
|
14926
14891
|
}
|
|
14927
14892
|
// Retried
|
|
@@ -15004,21 +14969,14 @@ var Booking = function (_a) {
|
|
|
15004
14969
|
accommodationViewId,
|
|
15005
14970
|
]);
|
|
15006
14971
|
React.useEffect(function () {
|
|
15007
|
-
console.log("productAttributes", productAttributes);
|
|
15008
|
-
console.log("bookingAttributes", bookingAttributes);
|
|
15009
|
-
console.log("rooms", rooms);
|
|
15010
|
-
console.log("bookingNumber", lodash.isNil(bookingNumber));
|
|
15011
|
-
console.log("packageDetails", lodash.isNil(packageDetails));
|
|
15012
14972
|
if (!productAttributes ||
|
|
15013
14973
|
!bookingAttributes ||
|
|
15014
14974
|
!(rooms === null || rooms === void 0 ? void 0 : rooms.length) ||
|
|
15015
14975
|
!lodash.isNil(bookingNumber) ||
|
|
15016
14976
|
!lodash.isNil(packageDetails)) {
|
|
15017
|
-
console.log("return on booking attributes change");
|
|
15018
14977
|
return;
|
|
15019
14978
|
}
|
|
15020
14979
|
// Fetch data
|
|
15021
|
-
console.log("fetching package with attributes");
|
|
15022
14980
|
var promise = dispatch(fetchPackage());
|
|
15023
14981
|
return function () {
|
|
15024
14982
|
promise.abort();
|
|
@@ -15059,7 +15017,6 @@ var Booking = function (_a) {
|
|
|
15059
15017
|
|
|
15060
15018
|
var BookingWizard = function (_a) {
|
|
15061
15019
|
var productCode = _a.productCode, productName = _a.productName, thumbnailUrl = _a.thumbnailUrl, settings = _a.settings;
|
|
15062
|
-
console.log("BookingWizard rendered with settings:", settings);
|
|
15063
15020
|
return (React__default["default"].createElement(SettingsContext.Provider, { value: settings },
|
|
15064
15021
|
React__default["default"].createElement(reactRedux.Provider, { store: store },
|
|
15065
15022
|
React__default["default"].createElement(Booking, { productCode: productCode, productName: productName, thumbnailUrl: thumbnailUrl }))));
|
|
@@ -9,12 +9,10 @@ export interface Settings {
|
|
|
9
9
|
roomOptions: {
|
|
10
10
|
isHidden?: boolean | null;
|
|
11
11
|
pathSuffix?: string | null;
|
|
12
|
-
reportPrintActionId?: number | null;
|
|
13
12
|
};
|
|
14
13
|
flightOptions: {
|
|
15
14
|
isHidden?: boolean | null;
|
|
16
15
|
pathSuffix?: string | null;
|
|
17
|
-
reportPrintActionId?: number | null;
|
|
18
16
|
};
|
|
19
17
|
options: {
|
|
20
18
|
pathSuffix: string;
|
|
@@ -22,16 +20,13 @@ export interface Settings {
|
|
|
22
20
|
};
|
|
23
21
|
travellers: {
|
|
24
22
|
pathSuffix: string;
|
|
25
|
-
reportPrintActionId?: number | null;
|
|
26
23
|
};
|
|
27
24
|
summary: {
|
|
28
25
|
pathSuffix: string;
|
|
29
26
|
checkboxes?: SummaryCheckbox[] | null;
|
|
30
|
-
reportPrintActionId?: number | null;
|
|
31
27
|
};
|
|
32
28
|
confirmation: {
|
|
33
29
|
pathSuffix: string;
|
|
34
|
-
reportPrintActionId?: number | null;
|
|
35
30
|
};
|
|
36
31
|
error: {
|
|
37
32
|
pathSuffix: string;
|
|
@@ -144,6 +139,7 @@ export interface BookingAttributes {
|
|
|
144
139
|
allotmentIds: number[];
|
|
145
140
|
includeFlights?: boolean;
|
|
146
141
|
flightRouteId?: string | null;
|
|
142
|
+
vendorConfigurationId?: number | null;
|
|
147
143
|
}
|
|
148
144
|
export interface FlightLine {
|
|
149
145
|
departureAirportIata?: string;
|