@qite/tide-booking-component 1.4.44 → 1.4.45
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 +104 -25
- package/build/build-cjs/{booking-product → src/booking-product}/components/date-range-picker/index.d.ts +1 -0
- package/build/build-cjs/{booking-wizard → src/booking-wizard}/types.d.ts +1 -0
- package/build/build-esm/index.js +104 -25
- package/build/build-esm/{booking-product → src/booking-product}/components/date-range-picker/index.d.ts +1 -0
- package/build/build-esm/{booking-wizard → src/booking-wizard}/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/booking-wizard/features/confirmation/confirmation.tsx +10 -7
- package/src/booking-wizard/features/error/error.tsx +1 -1
- package/src/booking-wizard/features/flight-options/index.tsx +3 -3
- package/src/booking-wizard/features/product-options/options-form.tsx +4 -4
- package/src/booking-wizard/features/room-options/index.tsx +2 -2
- package/src/booking-wizard/features/summary/summary.tsx +4 -4
- package/src/booking-wizard/features/travelers-form/travelers-form.tsx +4 -4
- package/src/booking-wizard/settings-context.ts +1 -0
- package/src/booking-wizard/types.ts +1 -0
- /package/build/build-cjs/{booking-wizard → src/booking-wizard}/features/confirmation/confirmation.d.ts +0 -0
- /package/build/build-cjs/{booking-wizard → src/booking-wizard}/features/error/error.d.ts +0 -0
- /package/build/build-cjs/{booking-wizard → src/booking-wizard}/features/flight-options/index.d.ts +0 -0
- /package/build/build-cjs/{booking-wizard → src/booking-wizard}/features/product-options/options-form.d.ts +0 -0
- /package/build/build-cjs/{booking-wizard → src/booking-wizard}/features/room-options/index.d.ts +0 -0
- /package/build/build-cjs/{booking-wizard → src/booking-wizard}/features/summary/summary.d.ts +0 -0
- /package/build/build-cjs/{booking-wizard → src/booking-wizard}/features/travelers-form/travelers-form.d.ts +0 -0
- /package/build/build-cjs/{booking-wizard → src/booking-wizard}/settings-context.d.ts +0 -0
- /package/build/build-esm/{booking-wizard → src/booking-wizard}/features/confirmation/confirmation.d.ts +0 -0
- /package/build/build-esm/{booking-wizard → src/booking-wizard}/features/error/error.d.ts +0 -0
- /package/build/build-esm/{booking-wizard → src/booking-wizard}/features/flight-options/index.d.ts +0 -0
- /package/build/build-esm/{booking-wizard → src/booking-wizard}/features/product-options/options-form.d.ts +0 -0
- /package/build/build-esm/{booking-wizard → src/booking-wizard}/features/room-options/index.d.ts +0 -0
- /package/build/build-esm/{booking-wizard → src/booking-wizard}/features/summary/summary.d.ts +0 -0
- /package/build/build-esm/{booking-wizard → src/booking-wizard}/features/travelers-form/travelers-form.d.ts +0 -0
- /package/build/build-esm/{booking-wizard → src/booking-wizard}/settings-context.d.ts +0 -0
package/build/build-cjs/index.js
CHANGED
|
@@ -18233,6 +18233,7 @@ var SettingsContext = React__default['default'].createContext({
|
|
|
18233
18233
|
affiliateSlug: undefined,
|
|
18234
18234
|
productPath: '/',
|
|
18235
18235
|
basePath: '/boeken',
|
|
18236
|
+
skipBasePathInRouting: false,
|
|
18236
18237
|
roomOptions: {
|
|
18237
18238
|
pathSuffix: '/'
|
|
18238
18239
|
},
|
|
@@ -18973,13 +18974,23 @@ var Confirmation = function () {
|
|
|
18973
18974
|
var bookingNumber = reactRedux.useSelector(selectBookingNumber);
|
|
18974
18975
|
var bookingQueryString = reactRedux.useSelector(selectBookingQueryString);
|
|
18975
18976
|
var isOption = reactRedux.useSelector(selectIsOption);
|
|
18976
|
-
|
|
18977
|
-
|
|
18978
|
-
|
|
18979
|
-
|
|
18980
|
-
|
|
18981
|
-
|
|
18982
|
-
|
|
18977
|
+
React.useEffect(
|
|
18978
|
+
function () {
|
|
18979
|
+
if (!bookingNumber) {
|
|
18980
|
+
if (settings.skipRouter) {
|
|
18981
|
+
dispatch(setCurrentStep(OPTIONS_FORM_STEP));
|
|
18982
|
+
} else {
|
|
18983
|
+
navigate(
|
|
18984
|
+
''
|
|
18985
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
18986
|
+
.concat(settings.error.pathSuffix, '?')
|
|
18987
|
+
.concat(bookingQueryString)
|
|
18988
|
+
);
|
|
18989
|
+
}
|
|
18990
|
+
}
|
|
18991
|
+
},
|
|
18992
|
+
[bookingNumber]
|
|
18993
|
+
);
|
|
18983
18994
|
var translations = reactRedux.useSelector(selectTranslations);
|
|
18984
18995
|
var encodedMailSubject = encodeURI(translations.CONFIRMATION.MAIL_SUBJECT);
|
|
18985
18996
|
var titleText = isOption
|
|
@@ -19064,7 +19075,7 @@ var Error$1 = function () {
|
|
|
19064
19075
|
var navigate = reactRouter.useNavigate();
|
|
19065
19076
|
var settings = React.useContext(SettingsContext);
|
|
19066
19077
|
var bookingQueryString = reactRedux.useSelector(selectBookingQueryString);
|
|
19067
|
-
var tryAgainUrl = ''.concat(settings.basePath, '?').concat(bookingQueryString);
|
|
19078
|
+
var tryAgainUrl = ''.concat(!settings.skipBasePathInRouting ? settings.basePath : '', '?').concat(bookingQueryString);
|
|
19068
19079
|
var handleClick = function (e) {
|
|
19069
19080
|
e.preventDefault();
|
|
19070
19081
|
if (settings.skipRouter) {
|
|
@@ -20710,9 +20721,19 @@ var FlightOptionsForm = function () {
|
|
|
20710
20721
|
dispatch(setCurrentStep(ROOM_OPTIONS_FORM_STEP));
|
|
20711
20722
|
} else {
|
|
20712
20723
|
if (settings.roomOptions.isHidden) {
|
|
20713
|
-
navigate(
|
|
20724
|
+
navigate(
|
|
20725
|
+
''
|
|
20726
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
20727
|
+
.concat(settings.options.pathSuffix, '?')
|
|
20728
|
+
.concat(bookingQueryString)
|
|
20729
|
+
);
|
|
20714
20730
|
} else {
|
|
20715
|
-
navigate(
|
|
20731
|
+
navigate(
|
|
20732
|
+
''
|
|
20733
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
20734
|
+
.concat(settings.roomOptions.pathSuffix, '?')
|
|
20735
|
+
.concat(bookingQueryString)
|
|
20736
|
+
);
|
|
20716
20737
|
}
|
|
20717
20738
|
}
|
|
20718
20739
|
e.preventDefault();
|
|
@@ -20852,7 +20873,10 @@ var FlightOptionsForm = function () {
|
|
|
20852
20873
|
? React__default['default'].createElement(
|
|
20853
20874
|
Link,
|
|
20854
20875
|
{
|
|
20855
|
-
to: ''
|
|
20876
|
+
to: ''
|
|
20877
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
20878
|
+
.concat(settings.travellers.pathSuffix, '?')
|
|
20879
|
+
.concat(bookingQueryString),
|
|
20856
20880
|
title: translations.STEPS.PREVIOUS,
|
|
20857
20881
|
className: 'cta cta--secondary'
|
|
20858
20882
|
},
|
|
@@ -22827,9 +22851,19 @@ var OptionsForm = function () {
|
|
|
22827
22851
|
}
|
|
22828
22852
|
} else {
|
|
22829
22853
|
if (travelersFirstStep) {
|
|
22830
|
-
navigate(
|
|
22854
|
+
navigate(
|
|
22855
|
+
''
|
|
22856
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
22857
|
+
.concat(settings.summary.pathSuffix, '?')
|
|
22858
|
+
.concat(bookingQueryString)
|
|
22859
|
+
);
|
|
22831
22860
|
} else {
|
|
22832
|
-
navigate(
|
|
22861
|
+
navigate(
|
|
22862
|
+
''
|
|
22863
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
22864
|
+
.concat(settings.travellers.pathSuffix, '?')
|
|
22865
|
+
.concat(bookingQueryString)
|
|
22866
|
+
);
|
|
22833
22867
|
}
|
|
22834
22868
|
}
|
|
22835
22869
|
e.preventDefault();
|
|
@@ -22928,8 +22962,14 @@ var OptionsForm = function () {
|
|
|
22928
22962
|
}
|
|
22929
22963
|
};
|
|
22930
22964
|
var previousUrl = settings.roomOptions.isHidden
|
|
22931
|
-
? ''
|
|
22932
|
-
|
|
22965
|
+
? ''
|
|
22966
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
22967
|
+
.concat(settings.flightOptions.pathSuffix, '?')
|
|
22968
|
+
.concat(bookingQueryString)
|
|
22969
|
+
: ''
|
|
22970
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
22971
|
+
.concat(settings.roomOptions.pathSuffix, '?')
|
|
22972
|
+
.concat(bookingQueryString);
|
|
22933
22973
|
var hasPrevious = !settings.roomOptions.isHidden || !settings.flightOptions.isHidden;
|
|
22934
22974
|
var showPackageTagsOrRoomoptions = showRoomOptions || (packageTags && !lodash.isEmpty(packageTags));
|
|
22935
22975
|
return React__default['default'].createElement(
|
|
@@ -23376,7 +23416,12 @@ var RoomOptionsForm = function () {
|
|
|
23376
23416
|
if (settings.skipRouter) {
|
|
23377
23417
|
dispatch(setCurrentStep(OPTIONS_FORM_STEP));
|
|
23378
23418
|
} else {
|
|
23379
|
-
navigate(
|
|
23419
|
+
navigate(
|
|
23420
|
+
''
|
|
23421
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
23422
|
+
.concat(settings.options.pathSuffix, '?')
|
|
23423
|
+
.concat(bookingQueryString)
|
|
23424
|
+
);
|
|
23380
23425
|
}
|
|
23381
23426
|
e.preventDefault();
|
|
23382
23427
|
};
|
|
@@ -23453,7 +23498,10 @@ var RoomOptionsForm = function () {
|
|
|
23453
23498
|
: React__default['default'].createElement(
|
|
23454
23499
|
Link,
|
|
23455
23500
|
{
|
|
23456
|
-
to: ''
|
|
23501
|
+
to: ''
|
|
23502
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
23503
|
+
.concat(settings.flightOptions.pathSuffix, '?')
|
|
23504
|
+
.concat(bookingQueryString),
|
|
23457
23505
|
title: translations.STEPS.PREVIOUS,
|
|
23458
23506
|
className: 'cta cta--secondary'
|
|
23459
23507
|
},
|
|
@@ -24293,7 +24341,7 @@ var Summary = function () {
|
|
|
24293
24341
|
if (settings.skipRouter) {
|
|
24294
24342
|
dispatch(setCurrentStep(TRAVELERS_FORM_STEP));
|
|
24295
24343
|
} else {
|
|
24296
|
-
navigate(''.concat(settings.basePath, '?').concat(bookingQueryString));
|
|
24344
|
+
navigate(''.concat(!settings.skipBasePathInRouting ? settings.basePath : '', '?').concat(bookingQueryString));
|
|
24297
24345
|
}
|
|
24298
24346
|
}
|
|
24299
24347
|
var rooms = reactRedux.useSelector(selectRooms);
|
|
@@ -24364,7 +24412,12 @@ var Summary = function () {
|
|
|
24364
24412
|
if (settings.skipRouter) {
|
|
24365
24413
|
dispatch(setCurrentStep(CONFIRMATION_STEP));
|
|
24366
24414
|
} else {
|
|
24367
|
-
navigate(
|
|
24415
|
+
navigate(
|
|
24416
|
+
''
|
|
24417
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
24418
|
+
.concat(settings.confirmation.pathSuffix, '?')
|
|
24419
|
+
.concat(bookingQueryString)
|
|
24420
|
+
);
|
|
24368
24421
|
}
|
|
24369
24422
|
}
|
|
24370
24423
|
return [3 /*break*/, 5];
|
|
@@ -24373,7 +24426,12 @@ var Summary = function () {
|
|
|
24373
24426
|
if (settings.skipRouter) {
|
|
24374
24427
|
dispatch(setCurrentStep(ERROR_STEP));
|
|
24375
24428
|
} else {
|
|
24376
|
-
navigate(
|
|
24429
|
+
navigate(
|
|
24430
|
+
''
|
|
24431
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
24432
|
+
.concat(settings.error.pathSuffix, '?')
|
|
24433
|
+
.concat(bookingQueryString)
|
|
24434
|
+
);
|
|
24377
24435
|
}
|
|
24378
24436
|
return [3 /*break*/, 5];
|
|
24379
24437
|
case 4:
|
|
@@ -25039,7 +25097,10 @@ var Summary = function () {
|
|
|
25039
25097
|
: React__default['default'].createElement(
|
|
25040
25098
|
Link,
|
|
25041
25099
|
{
|
|
25042
|
-
to: ''
|
|
25100
|
+
to: ''
|
|
25101
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
25102
|
+
.concat(settings.travellers.pathSuffix, '?')
|
|
25103
|
+
.concat(bookingQueryString),
|
|
25043
25104
|
title: translations.STEPS.PREVIOUS,
|
|
25044
25105
|
className: 'cta cta--secondary'
|
|
25045
25106
|
},
|
|
@@ -25708,7 +25769,12 @@ var TravelersForm = function () {
|
|
|
25708
25769
|
if (settings.skipRouter) {
|
|
25709
25770
|
dispatch(setCurrentStep(SUMMARY_STEP));
|
|
25710
25771
|
} else {
|
|
25711
|
-
navigate(
|
|
25772
|
+
navigate(
|
|
25773
|
+
''
|
|
25774
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
25775
|
+
.concat(settings.summary.pathSuffix, '?')
|
|
25776
|
+
.concat(bookingQueryString)
|
|
25777
|
+
);
|
|
25712
25778
|
}
|
|
25713
25779
|
}
|
|
25714
25780
|
})
|
|
@@ -25735,9 +25801,19 @@ var TravelersForm = function () {
|
|
|
25735
25801
|
}
|
|
25736
25802
|
} else {
|
|
25737
25803
|
if (travelersFirstStep) {
|
|
25738
|
-
navigate(
|
|
25804
|
+
navigate(
|
|
25805
|
+
''
|
|
25806
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
25807
|
+
.concat(settings.flightOptions.pathSuffix, '?')
|
|
25808
|
+
.concat(bookingQueryString)
|
|
25809
|
+
);
|
|
25739
25810
|
} else {
|
|
25740
|
-
navigate(
|
|
25811
|
+
navigate(
|
|
25812
|
+
''
|
|
25813
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
25814
|
+
.concat(settings.summary.pathSuffix, '?')
|
|
25815
|
+
.concat(bookingQueryString)
|
|
25816
|
+
);
|
|
25741
25817
|
}
|
|
25742
25818
|
}
|
|
25743
25819
|
}
|
|
@@ -26840,7 +26916,10 @@ var TravelersForm = function () {
|
|
|
26840
26916
|
? React__default['default'].createElement(
|
|
26841
26917
|
Link,
|
|
26842
26918
|
{
|
|
26843
|
-
to: ''
|
|
26919
|
+
to: ''
|
|
26920
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
26921
|
+
.concat(settings.options.pathSuffix, '?')
|
|
26922
|
+
.concat(bookingQueryString),
|
|
26844
26923
|
title: translations.STEPS.PREVIOUS,
|
|
26845
26924
|
className: 'cta cta--secondary'
|
|
26846
26925
|
},
|
package/build/build-esm/index.js
CHANGED
|
@@ -18239,6 +18239,7 @@ var SettingsContext = React__default.createContext({
|
|
|
18239
18239
|
affiliateSlug: undefined,
|
|
18240
18240
|
productPath: '/',
|
|
18241
18241
|
basePath: '/boeken',
|
|
18242
|
+
skipBasePathInRouting: false,
|
|
18242
18243
|
roomOptions: {
|
|
18243
18244
|
pathSuffix: '/'
|
|
18244
18245
|
},
|
|
@@ -18959,13 +18960,23 @@ var Confirmation = function () {
|
|
|
18959
18960
|
var bookingNumber = useSelector(selectBookingNumber);
|
|
18960
18961
|
var bookingQueryString = useSelector(selectBookingQueryString);
|
|
18961
18962
|
var isOption = useSelector(selectIsOption);
|
|
18962
|
-
|
|
18963
|
-
|
|
18964
|
-
|
|
18965
|
-
|
|
18966
|
-
|
|
18967
|
-
|
|
18968
|
-
|
|
18963
|
+
useEffect(
|
|
18964
|
+
function () {
|
|
18965
|
+
if (!bookingNumber) {
|
|
18966
|
+
if (settings.skipRouter) {
|
|
18967
|
+
dispatch(setCurrentStep(OPTIONS_FORM_STEP));
|
|
18968
|
+
} else {
|
|
18969
|
+
navigate(
|
|
18970
|
+
''
|
|
18971
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
18972
|
+
.concat(settings.error.pathSuffix, '?')
|
|
18973
|
+
.concat(bookingQueryString)
|
|
18974
|
+
);
|
|
18975
|
+
}
|
|
18976
|
+
}
|
|
18977
|
+
},
|
|
18978
|
+
[bookingNumber]
|
|
18979
|
+
);
|
|
18969
18980
|
var translations = useSelector(selectTranslations);
|
|
18970
18981
|
var encodedMailSubject = encodeURI(translations.CONFIRMATION.MAIL_SUBJECT);
|
|
18971
18982
|
var titleText = isOption
|
|
@@ -19046,7 +19057,7 @@ var Error$1 = function () {
|
|
|
19046
19057
|
var navigate = useNavigate();
|
|
19047
19058
|
var settings = useContext(SettingsContext);
|
|
19048
19059
|
var bookingQueryString = useSelector(selectBookingQueryString);
|
|
19049
|
-
var tryAgainUrl = ''.concat(settings.basePath, '?').concat(bookingQueryString);
|
|
19060
|
+
var tryAgainUrl = ''.concat(!settings.skipBasePathInRouting ? settings.basePath : '', '?').concat(bookingQueryString);
|
|
19050
19061
|
var handleClick = function (e) {
|
|
19051
19062
|
e.preventDefault();
|
|
19052
19063
|
if (settings.skipRouter) {
|
|
@@ -20674,9 +20685,19 @@ var FlightOptionsForm = function () {
|
|
|
20674
20685
|
dispatch(setCurrentStep(ROOM_OPTIONS_FORM_STEP));
|
|
20675
20686
|
} else {
|
|
20676
20687
|
if (settings.roomOptions.isHidden) {
|
|
20677
|
-
navigate(
|
|
20688
|
+
navigate(
|
|
20689
|
+
''
|
|
20690
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
20691
|
+
.concat(settings.options.pathSuffix, '?')
|
|
20692
|
+
.concat(bookingQueryString)
|
|
20693
|
+
);
|
|
20678
20694
|
} else {
|
|
20679
|
-
navigate(
|
|
20695
|
+
navigate(
|
|
20696
|
+
''
|
|
20697
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
20698
|
+
.concat(settings.roomOptions.pathSuffix, '?')
|
|
20699
|
+
.concat(bookingQueryString)
|
|
20700
|
+
);
|
|
20680
20701
|
}
|
|
20681
20702
|
}
|
|
20682
20703
|
e.preventDefault();
|
|
@@ -20812,7 +20833,10 @@ var FlightOptionsForm = function () {
|
|
|
20812
20833
|
? React__default.createElement(
|
|
20813
20834
|
Link,
|
|
20814
20835
|
{
|
|
20815
|
-
to: ''
|
|
20836
|
+
to: ''
|
|
20837
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
20838
|
+
.concat(settings.travellers.pathSuffix, '?')
|
|
20839
|
+
.concat(bookingQueryString),
|
|
20816
20840
|
title: translations.STEPS.PREVIOUS,
|
|
20817
20841
|
className: 'cta cta--secondary'
|
|
20818
20842
|
},
|
|
@@ -22779,9 +22803,19 @@ var OptionsForm = function () {
|
|
|
22779
22803
|
}
|
|
22780
22804
|
} else {
|
|
22781
22805
|
if (travelersFirstStep) {
|
|
22782
|
-
navigate(
|
|
22806
|
+
navigate(
|
|
22807
|
+
''
|
|
22808
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
22809
|
+
.concat(settings.summary.pathSuffix, '?')
|
|
22810
|
+
.concat(bookingQueryString)
|
|
22811
|
+
);
|
|
22783
22812
|
} else {
|
|
22784
|
-
navigate(
|
|
22813
|
+
navigate(
|
|
22814
|
+
''
|
|
22815
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
22816
|
+
.concat(settings.travellers.pathSuffix, '?')
|
|
22817
|
+
.concat(bookingQueryString)
|
|
22818
|
+
);
|
|
22785
22819
|
}
|
|
22786
22820
|
}
|
|
22787
22821
|
e.preventDefault();
|
|
@@ -22880,8 +22914,14 @@ var OptionsForm = function () {
|
|
|
22880
22914
|
}
|
|
22881
22915
|
};
|
|
22882
22916
|
var previousUrl = settings.roomOptions.isHidden
|
|
22883
|
-
? ''
|
|
22884
|
-
|
|
22917
|
+
? ''
|
|
22918
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
22919
|
+
.concat(settings.flightOptions.pathSuffix, '?')
|
|
22920
|
+
.concat(bookingQueryString)
|
|
22921
|
+
: ''
|
|
22922
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
22923
|
+
.concat(settings.roomOptions.pathSuffix, '?')
|
|
22924
|
+
.concat(bookingQueryString);
|
|
22885
22925
|
var hasPrevious = !settings.roomOptions.isHidden || !settings.flightOptions.isHidden;
|
|
22886
22926
|
var showPackageTagsOrRoomoptions = showRoomOptions || (packageTags && !isEmpty(packageTags));
|
|
22887
22927
|
return React__default.createElement(
|
|
@@ -23328,7 +23368,12 @@ var RoomOptionsForm = function () {
|
|
|
23328
23368
|
if (settings.skipRouter) {
|
|
23329
23369
|
dispatch(setCurrentStep(OPTIONS_FORM_STEP));
|
|
23330
23370
|
} else {
|
|
23331
|
-
navigate(
|
|
23371
|
+
navigate(
|
|
23372
|
+
''
|
|
23373
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
23374
|
+
.concat(settings.options.pathSuffix, '?')
|
|
23375
|
+
.concat(bookingQueryString)
|
|
23376
|
+
);
|
|
23332
23377
|
}
|
|
23333
23378
|
e.preventDefault();
|
|
23334
23379
|
};
|
|
@@ -23405,7 +23450,10 @@ var RoomOptionsForm = function () {
|
|
|
23405
23450
|
: React__default.createElement(
|
|
23406
23451
|
Link,
|
|
23407
23452
|
{
|
|
23408
|
-
to: ''
|
|
23453
|
+
to: ''
|
|
23454
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
23455
|
+
.concat(settings.flightOptions.pathSuffix, '?')
|
|
23456
|
+
.concat(bookingQueryString),
|
|
23409
23457
|
title: translations.STEPS.PREVIOUS,
|
|
23410
23458
|
className: 'cta cta--secondary'
|
|
23411
23459
|
},
|
|
@@ -24242,7 +24290,7 @@ var Summary = function () {
|
|
|
24242
24290
|
if (settings.skipRouter) {
|
|
24243
24291
|
dispatch(setCurrentStep(TRAVELERS_FORM_STEP));
|
|
24244
24292
|
} else {
|
|
24245
|
-
navigate(''.concat(settings.basePath, '?').concat(bookingQueryString));
|
|
24293
|
+
navigate(''.concat(!settings.skipBasePathInRouting ? settings.basePath : '', '?').concat(bookingQueryString));
|
|
24246
24294
|
}
|
|
24247
24295
|
}
|
|
24248
24296
|
var rooms = useSelector(selectRooms);
|
|
@@ -24313,7 +24361,12 @@ var Summary = function () {
|
|
|
24313
24361
|
if (settings.skipRouter) {
|
|
24314
24362
|
dispatch(setCurrentStep(CONFIRMATION_STEP));
|
|
24315
24363
|
} else {
|
|
24316
|
-
navigate(
|
|
24364
|
+
navigate(
|
|
24365
|
+
''
|
|
24366
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
24367
|
+
.concat(settings.confirmation.pathSuffix, '?')
|
|
24368
|
+
.concat(bookingQueryString)
|
|
24369
|
+
);
|
|
24317
24370
|
}
|
|
24318
24371
|
}
|
|
24319
24372
|
return [3 /*break*/, 5];
|
|
@@ -24322,7 +24375,12 @@ var Summary = function () {
|
|
|
24322
24375
|
if (settings.skipRouter) {
|
|
24323
24376
|
dispatch(setCurrentStep(ERROR_STEP));
|
|
24324
24377
|
} else {
|
|
24325
|
-
navigate(
|
|
24378
|
+
navigate(
|
|
24379
|
+
''
|
|
24380
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
24381
|
+
.concat(settings.error.pathSuffix, '?')
|
|
24382
|
+
.concat(bookingQueryString)
|
|
24383
|
+
);
|
|
24326
24384
|
}
|
|
24327
24385
|
return [3 /*break*/, 5];
|
|
24328
24386
|
case 4:
|
|
@@ -24973,7 +25031,10 @@ var Summary = function () {
|
|
|
24973
25031
|
: React__default.createElement(
|
|
24974
25032
|
Link,
|
|
24975
25033
|
{
|
|
24976
|
-
to: ''
|
|
25034
|
+
to: ''
|
|
25035
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
25036
|
+
.concat(settings.travellers.pathSuffix, '?')
|
|
25037
|
+
.concat(bookingQueryString),
|
|
24977
25038
|
title: translations.STEPS.PREVIOUS,
|
|
24978
25039
|
className: 'cta cta--secondary'
|
|
24979
25040
|
},
|
|
@@ -25631,7 +25692,12 @@ var TravelersForm = function () {
|
|
|
25631
25692
|
if (settings.skipRouter) {
|
|
25632
25693
|
dispatch(setCurrentStep(SUMMARY_STEP));
|
|
25633
25694
|
} else {
|
|
25634
|
-
navigate(
|
|
25695
|
+
navigate(
|
|
25696
|
+
''
|
|
25697
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
25698
|
+
.concat(settings.summary.pathSuffix, '?')
|
|
25699
|
+
.concat(bookingQueryString)
|
|
25700
|
+
);
|
|
25635
25701
|
}
|
|
25636
25702
|
}
|
|
25637
25703
|
})
|
|
@@ -25658,9 +25724,19 @@ var TravelersForm = function () {
|
|
|
25658
25724
|
}
|
|
25659
25725
|
} else {
|
|
25660
25726
|
if (travelersFirstStep) {
|
|
25661
|
-
navigate(
|
|
25727
|
+
navigate(
|
|
25728
|
+
''
|
|
25729
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
25730
|
+
.concat(settings.flightOptions.pathSuffix, '?')
|
|
25731
|
+
.concat(bookingQueryString)
|
|
25732
|
+
);
|
|
25662
25733
|
} else {
|
|
25663
|
-
navigate(
|
|
25734
|
+
navigate(
|
|
25735
|
+
''
|
|
25736
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
25737
|
+
.concat(settings.summary.pathSuffix, '?')
|
|
25738
|
+
.concat(bookingQueryString)
|
|
25739
|
+
);
|
|
25664
25740
|
}
|
|
25665
25741
|
}
|
|
25666
25742
|
}
|
|
@@ -26745,7 +26821,10 @@ var TravelersForm = function () {
|
|
|
26745
26821
|
? React__default.createElement(
|
|
26746
26822
|
Link,
|
|
26747
26823
|
{
|
|
26748
|
-
to: ''
|
|
26824
|
+
to: ''
|
|
26825
|
+
.concat(!settings.skipBasePathInRouting ? settings.basePath : '')
|
|
26826
|
+
.concat(settings.options.pathSuffix, '?')
|
|
26827
|
+
.concat(bookingQueryString),
|
|
26749
26828
|
title: translations.STEPS.PREVIOUS,
|
|
26750
26829
|
className: 'cta cta--secondary'
|
|
26751
26830
|
},
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useContext } from 'react';
|
|
1
|
+
import React, { useContext, useEffect } from 'react';
|
|
2
2
|
import { selectBookingNumber, selectBookingQueryString, selectIsOption, selectTranslations } from '../booking/selectors';
|
|
3
3
|
|
|
4
4
|
import Message from '../../components/message';
|
|
@@ -10,6 +10,7 @@ import { setCurrentStep } from '../booking/booking-slice';
|
|
|
10
10
|
import { OPTIONS_FORM_STEP } from '../booking/constants';
|
|
11
11
|
import { format } from '../../../shared/utils/localization-util';
|
|
12
12
|
import { useNavigate } from 'react-router';
|
|
13
|
+
import { book } from '@qite/tide-client';
|
|
13
14
|
|
|
14
15
|
interface ConfirmationProps {}
|
|
15
16
|
|
|
@@ -22,13 +23,15 @@ const Confirmation: React.FC<ConfirmationProps> = () => {
|
|
|
22
23
|
const bookingQueryString = useSelector(selectBookingQueryString);
|
|
23
24
|
const isOption = useSelector(selectIsOption);
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
if (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
if (!bookingNumber) {
|
|
28
|
+
if (settings.skipRouter) {
|
|
29
|
+
dispatch(setCurrentStep(OPTIONS_FORM_STEP));
|
|
30
|
+
} else {
|
|
31
|
+
navigate(`${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.error.pathSuffix}?${bookingQueryString}`);
|
|
32
|
+
}
|
|
30
33
|
}
|
|
31
|
-
}
|
|
34
|
+
}, [bookingNumber]);
|
|
32
35
|
|
|
33
36
|
const translations = useSelector(selectTranslations);
|
|
34
37
|
const encodedMailSubject = encodeURI(translations.CONFIRMATION.MAIL_SUBJECT);
|
|
@@ -17,7 +17,7 @@ const Error: React.FC<ErrorProps> = () => {
|
|
|
17
17
|
const settings = useContext(SettingsContext);
|
|
18
18
|
const bookingQueryString = useSelector(selectBookingQueryString);
|
|
19
19
|
|
|
20
|
-
const tryAgainUrl = `${settings.basePath}?${bookingQueryString}`;
|
|
20
|
+
const tryAgainUrl = `${!settings.skipBasePathInRouting ? settings.basePath : ''}?${bookingQueryString}`;
|
|
21
21
|
|
|
22
22
|
const handleClick: React.MouseEventHandler<HTMLAnchorElement> = (e) => {
|
|
23
23
|
e.preventDefault();
|
|
@@ -46,9 +46,9 @@ const FlightOptionsForm: React.FC<FlightOptionsFormProps> = () => {
|
|
|
46
46
|
dispatch(setCurrentStep(ROOM_OPTIONS_FORM_STEP));
|
|
47
47
|
} else {
|
|
48
48
|
if (settings.roomOptions.isHidden) {
|
|
49
|
-
navigate(`${settings.basePath}${settings.options.pathSuffix}?${bookingQueryString}`);
|
|
49
|
+
navigate(`${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.options.pathSuffix}?${bookingQueryString}`);
|
|
50
50
|
} else {
|
|
51
|
-
navigate(`${settings.basePath}${settings.roomOptions.pathSuffix}?${bookingQueryString}`);
|
|
51
|
+
navigate(`${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.roomOptions.pathSuffix}?${bookingQueryString}`);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -148,7 +148,7 @@ const FlightOptionsForm: React.FC<FlightOptionsFormProps> = () => {
|
|
|
148
148
|
</button>
|
|
149
149
|
) : travelersFirstStep ? (
|
|
150
150
|
<Link
|
|
151
|
-
to={`${settings.basePath}${settings.travellers.pathSuffix}?${bookingQueryString}`}
|
|
151
|
+
to={`${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.travellers.pathSuffix}?${bookingQueryString}`}
|
|
152
152
|
title={translations.STEPS.PREVIOUS}
|
|
153
153
|
className="cta cta--secondary">
|
|
154
154
|
{translations.STEPS.PREVIOUS}
|
|
@@ -121,9 +121,9 @@ const OptionsForm: React.FC<OptionsFormProps> = () => {
|
|
|
121
121
|
}
|
|
122
122
|
} else {
|
|
123
123
|
if (travelersFirstStep) {
|
|
124
|
-
navigate(`${settings.basePath}${settings.summary.pathSuffix}?${bookingQueryString}`);
|
|
124
|
+
navigate(`${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.summary.pathSuffix}?${bookingQueryString}`);
|
|
125
125
|
} else {
|
|
126
|
-
navigate(`${settings.basePath}${settings.travellers.pathSuffix}?${bookingQueryString}`);
|
|
126
|
+
navigate(`${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.travellers.pathSuffix}?${bookingQueryString}`);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
|
|
@@ -223,8 +223,8 @@ const OptionsForm: React.FC<OptionsFormProps> = () => {
|
|
|
223
223
|
};
|
|
224
224
|
|
|
225
225
|
const previousUrl = settings.roomOptions.isHidden
|
|
226
|
-
? `${settings.basePath}${settings.flightOptions.pathSuffix}?${bookingQueryString}`
|
|
227
|
-
: `${settings.basePath}${settings.roomOptions.pathSuffix}?${bookingQueryString}`;
|
|
226
|
+
? `${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.flightOptions.pathSuffix}?${bookingQueryString}`
|
|
227
|
+
: `${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.roomOptions.pathSuffix}?${bookingQueryString}`;
|
|
228
228
|
const hasPrevious = !settings.roomOptions.isHidden || !settings.flightOptions.isHidden;
|
|
229
229
|
const showPackageTagsOrRoomoptions = showRoomOptions || (packageTags && !isEmpty(packageTags));
|
|
230
230
|
|
|
@@ -45,7 +45,7 @@ const RoomOptionsForm: React.FC<RoomOptionsFormProps> = () => {
|
|
|
45
45
|
if (settings.skipRouter) {
|
|
46
46
|
dispatch(setCurrentStep(OPTIONS_FORM_STEP));
|
|
47
47
|
} else {
|
|
48
|
-
navigate(`${settings.basePath}${settings.options.pathSuffix}?${bookingQueryString}`);
|
|
48
|
+
navigate(`${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.options.pathSuffix}?${bookingQueryString}`);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
e.preventDefault();
|
|
@@ -112,7 +112,7 @@ const RoomOptionsForm: React.FC<RoomOptionsFormProps> = () => {
|
|
|
112
112
|
</button>
|
|
113
113
|
) : (
|
|
114
114
|
<Link
|
|
115
|
-
to={`${settings.basePath}${settings.flightOptions.pathSuffix}?${bookingQueryString}`}
|
|
115
|
+
to={`${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.flightOptions.pathSuffix}?${bookingQueryString}`}
|
|
116
116
|
title={translations.STEPS.PREVIOUS}
|
|
117
117
|
className="cta cta--secondary">
|
|
118
118
|
{translations.STEPS.PREVIOUS}
|
|
@@ -74,7 +74,7 @@ const Summary: React.FC<SummaryProps> = () => {
|
|
|
74
74
|
if (settings.skipRouter) {
|
|
75
75
|
dispatch(setCurrentStep(TRAVELERS_FORM_STEP));
|
|
76
76
|
} else {
|
|
77
|
-
navigate(`${settings.basePath}?${bookingQueryString}`);
|
|
77
|
+
navigate(`${!settings.skipBasePathInRouting ? settings.basePath : ''}?${bookingQueryString}`);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
|
|
@@ -136,14 +136,14 @@ const Summary: React.FC<SummaryProps> = () => {
|
|
|
136
136
|
if (settings.skipRouter) {
|
|
137
137
|
dispatch(setCurrentStep(CONFIRMATION_STEP));
|
|
138
138
|
} else {
|
|
139
|
-
navigate(`${settings.basePath}${settings.confirmation.pathSuffix}?${bookingQueryString}`);
|
|
139
|
+
navigate(`${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.confirmation.pathSuffix}?${bookingQueryString}`);
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
} catch (error) {
|
|
143
143
|
if (settings.skipRouter) {
|
|
144
144
|
dispatch(setCurrentStep(ERROR_STEP));
|
|
145
145
|
} else {
|
|
146
|
-
navigate(`${settings.basePath}${settings.error.pathSuffix}?${bookingQueryString}`);
|
|
146
|
+
navigate(`${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.error.pathSuffix}?${bookingQueryString}`);
|
|
147
147
|
}
|
|
148
148
|
} finally {
|
|
149
149
|
setIsSubmitting(false);
|
|
@@ -530,7 +530,7 @@ const Summary: React.FC<SummaryProps> = () => {
|
|
|
530
530
|
</button>
|
|
531
531
|
) : (
|
|
532
532
|
<Link
|
|
533
|
-
to={`${settings.basePath}${settings.travellers.pathSuffix}?${bookingQueryString}`}
|
|
533
|
+
to={`${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.travellers.pathSuffix}?${bookingQueryString}`}
|
|
534
534
|
title={translations.STEPS.PREVIOUS}
|
|
535
535
|
className="cta cta--secondary">
|
|
536
536
|
{translations.STEPS.PREVIOUS}
|
|
@@ -132,7 +132,7 @@ const TravelersForm: React.FC<TravelersFormProps> = () => {
|
|
|
132
132
|
if (settings.skipRouter) {
|
|
133
133
|
dispatch(setCurrentStep(SUMMARY_STEP));
|
|
134
134
|
} else {
|
|
135
|
-
navigate(`${settings.basePath}${settings.summary.pathSuffix}?${bookingQueryString}`);
|
|
135
|
+
navigate(`${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.summary.pathSuffix}?${bookingQueryString}`);
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
})
|
|
@@ -152,9 +152,9 @@ const TravelersForm: React.FC<TravelersFormProps> = () => {
|
|
|
152
152
|
}
|
|
153
153
|
} else {
|
|
154
154
|
if (travelersFirstStep) {
|
|
155
|
-
navigate(`${settings.basePath}${settings.flightOptions.pathSuffix}?${bookingQueryString}`);
|
|
155
|
+
navigate(`${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.flightOptions.pathSuffix}?${bookingQueryString}`);
|
|
156
156
|
} else {
|
|
157
|
-
navigate(`${settings.basePath}${settings.summary.pathSuffix}?${bookingQueryString}`);
|
|
157
|
+
navigate(`${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.summary.pathSuffix}?${bookingQueryString}`);
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
}
|
|
@@ -1061,7 +1061,7 @@ const TravelersForm: React.FC<TravelersFormProps> = () => {
|
|
|
1061
1061
|
</button>
|
|
1062
1062
|
) : !travelersFirstStep ? (
|
|
1063
1063
|
<Link
|
|
1064
|
-
to={`${settings.basePath}${settings.options.pathSuffix}?${bookingQueryString}`}
|
|
1064
|
+
to={`${!settings.skipBasePathInRouting ? settings.basePath : ''}${settings.options.pathSuffix}?${bookingQueryString}`}
|
|
1065
1065
|
title={translations.STEPS.PREVIOUS}
|
|
1066
1066
|
className="cta cta--secondary">
|
|
1067
1067
|
{translations.STEPS.PREVIOUS}
|
|
File without changes
|
|
File without changes
|
/package/build/build-cjs/{booking-wizard → src/booking-wizard}/features/flight-options/index.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/build/build-cjs/{booking-wizard → src/booking-wizard}/features/room-options/index.d.ts
RENAMED
|
File without changes
|
/package/build/build-cjs/{booking-wizard → src/booking-wizard}/features/summary/summary.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/build/build-esm/{booking-wizard → src/booking-wizard}/features/flight-options/index.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/build/build-esm/{booking-wizard → src/booking-wizard}/features/room-options/index.d.ts
RENAMED
|
File without changes
|
/package/build/build-esm/{booking-wizard → src/booking-wizard}/features/summary/summary.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|