@tripian/react 5.0.2 → 5.0.5
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/index.js +9 -109
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -16293,10 +16293,12 @@ var DatePicker = function (_a) {
|
|
|
16293
16293
|
react_1.default.createElement("div", { className: "date-picker-year" },
|
|
16294
16294
|
react_1.default.createElement("select", { className: "date-picker-select", value: month.year(), onChange: function (e) { return onYearSelect(month, e.target.value); } }, years))));
|
|
16295
16295
|
};
|
|
16296
|
-
return (react_1.default.createElement(react_dates_1.SingleDatePicker, { id: "datepicker", date: date, displayFormat: "YYYY-MM-DD", hideKeyboardShortcutsPanel: true, focused: focus,
|
|
16296
|
+
return (react_1.default.createElement(react_dates_1.SingleDatePicker, { id: "datepicker", date: date, displayFormat: "YYYY-MM-DD", hideKeyboardShortcutsPanel: true, focused: focus,
|
|
16297
|
+
// orientation={smallDevice ? 'vertical' : 'horizontal'}
|
|
16298
|
+
withFullScreenPortal: smallDevice, onDateChange: function (selectedDate) {
|
|
16297
16299
|
setDate(selectedDate);
|
|
16298
16300
|
onchanged(selectedDate);
|
|
16299
|
-
}, renderMonthElement: showMonthSelection ? renderMonthElement : undefined, openDirection: openDirection, block: true, numberOfMonths:
|
|
16301
|
+
}, renderMonthElement: showMonthSelection ? renderMonthElement : undefined, openDirection: openDirection, block: true, numberOfMonths: 1, onFocusChange: function (_a) {
|
|
16300
16302
|
var focused = _a.focused;
|
|
16301
16303
|
return setFocus(focused);
|
|
16302
16304
|
}, isOutsideRange: function (day) {
|
|
@@ -44067,7 +44069,7 @@ var FormTemplateCompanion = function (_a) {
|
|
|
44067
44069
|
};
|
|
44068
44070
|
var callbackNumber = function (num) {
|
|
44069
44071
|
var newCompanionState = model_1.helper.deepCopy(userCompanion);
|
|
44070
|
-
newCompanionState.age = num
|
|
44072
|
+
newCompanionState.age = num || 1;
|
|
44071
44073
|
callbackFormTemplateCompanion(newCompanionState);
|
|
44072
44074
|
};
|
|
44073
44075
|
var userCompanionQuestionOnChange = function (selectedAnswers) {
|
|
@@ -44666,101 +44668,6 @@ var PoiInfo = function (_a) {
|
|
|
44666
44668
|
};
|
|
44667
44669
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
44668
44670
|
}, [openTours]);
|
|
44669
|
-
var offers = [
|
|
44670
|
-
{
|
|
44671
|
-
id: 135,
|
|
44672
|
-
tripianPoiId: 0,
|
|
44673
|
-
businessId: 99,
|
|
44674
|
-
title: 'Patron Çıldırdı !!!',
|
|
44675
|
-
description: '',
|
|
44676
|
-
currency: model_1.default.OFFER_CURRENCY.CAD,
|
|
44677
|
-
caption: 'Buy 2 Margheritta Pizza and get 3 free.',
|
|
44678
|
-
productName: 'Margheritta Pizza',
|
|
44679
|
-
threshold: 2,
|
|
44680
|
-
discount: 100,
|
|
44681
|
-
discountedProductCount: 3,
|
|
44682
|
-
quantity: 9999,
|
|
44683
|
-
timeframe: {
|
|
44684
|
-
start: '2022-07-19 22:13:00',
|
|
44685
|
-
end: '2022-07-20 22:13:00',
|
|
44686
|
-
},
|
|
44687
|
-
image: {
|
|
44688
|
-
id: 319,
|
|
44689
|
-
url: 'https://poi-pics.s3-eu-west-1.amazonaws.com/Place/340/845386/fa616f230a051e8384dc6bc072c8b279.jpg',
|
|
44690
|
-
},
|
|
44691
|
-
productType: {
|
|
44692
|
-
id: 2,
|
|
44693
|
-
name: model_1.default.PRODUCT_TYPE_NAME.FOOD,
|
|
44694
|
-
receiveMethod: model_1.default.OFFER_RECEIVE_METHOD.TAKEOUT,
|
|
44695
|
-
},
|
|
44696
|
-
offerType: model_1.default.OFFER_TYPE.QUANTITY,
|
|
44697
|
-
usage: 0,
|
|
44698
|
-
optIn: false,
|
|
44699
|
-
status: model_1.default.OFFER_STATUS.ACTIVE,
|
|
44700
|
-
},
|
|
44701
|
-
{
|
|
44702
|
-
id: 137,
|
|
44703
|
-
tripianPoiId: 0,
|
|
44704
|
-
businessId: 99,
|
|
44705
|
-
title: 'Patron Çıldırdı !!!',
|
|
44706
|
-
description: '',
|
|
44707
|
-
currency: model_1.default.OFFER_CURRENCY.CAD,
|
|
44708
|
-
caption: 'Get $5.00 off your purchase when you spend $50 or more.',
|
|
44709
|
-
productName: '',
|
|
44710
|
-
threshold: 50,
|
|
44711
|
-
discount: 5,
|
|
44712
|
-
discountedProductCount: 1,
|
|
44713
|
-
quantity: 9999,
|
|
44714
|
-
timeframe: {
|
|
44715
|
-
start: '2022-07-07 22:13:00',
|
|
44716
|
-
end: '2022-07-08 22:13:00',
|
|
44717
|
-
},
|
|
44718
|
-
image: {
|
|
44719
|
-
id: 319,
|
|
44720
|
-
url: 'https://poi-pics.s3-eu-west-1.amazonaws.com/Place/340/845386/fa616f230a051e8384dc6bc072c8b279.jpg',
|
|
44721
|
-
},
|
|
44722
|
-
productType: {
|
|
44723
|
-
id: 3,
|
|
44724
|
-
name: model_1.default.PRODUCT_TYPE_NAME.DRINK,
|
|
44725
|
-
receiveMethod: model_1.default.OFFER_RECEIVE_METHOD.DINEIN,
|
|
44726
|
-
},
|
|
44727
|
-
offerType: model_1.default.OFFER_TYPE.AMOUNT,
|
|
44728
|
-
usage: 0,
|
|
44729
|
-
optIn: false,
|
|
44730
|
-
status: model_1.default.OFFER_STATUS.ACTIVE,
|
|
44731
|
-
},
|
|
44732
|
-
{
|
|
44733
|
-
id: 136,
|
|
44734
|
-
tripianPoiId: 0,
|
|
44735
|
-
businessId: 99,
|
|
44736
|
-
title: 'Patron Çıldırdı !!!',
|
|
44737
|
-
description: '',
|
|
44738
|
-
currency: model_1.default.OFFER_CURRENCY.CAD,
|
|
44739
|
-
caption: 'Get 5% off any purchase of you spend $50 or more.',
|
|
44740
|
-
productName: '',
|
|
44741
|
-
threshold: 50,
|
|
44742
|
-
discount: 5,
|
|
44743
|
-
discountedProductCount: 1,
|
|
44744
|
-
quantity: 9999,
|
|
44745
|
-
timeframe: {
|
|
44746
|
-
start: '2022-07-25 22:13:00',
|
|
44747
|
-
end: '2022-07-27 22:13:00',
|
|
44748
|
-
},
|
|
44749
|
-
image: {
|
|
44750
|
-
id: 319,
|
|
44751
|
-
url: 'https://poi-pics.s3-eu-west-1.amazonaws.com/Place/340/845386/fa616f230a051e8384dc6bc072c8b279.jpg',
|
|
44752
|
-
},
|
|
44753
|
-
productType: {
|
|
44754
|
-
id: 3,
|
|
44755
|
-
name: model_1.default.PRODUCT_TYPE_NAME.DRINK,
|
|
44756
|
-
receiveMethod: model_1.default.OFFER_RECEIVE_METHOD.DINEIN,
|
|
44757
|
-
},
|
|
44758
|
-
offerType: model_1.default.OFFER_TYPE.PERCENTAGE,
|
|
44759
|
-
usage: 0,
|
|
44760
|
-
optIn: true,
|
|
44761
|
-
status: model_1.default.OFFER_STATUS.ACTIVE,
|
|
44762
|
-
},
|
|
44763
|
-
];
|
|
44764
44671
|
var ticketProviderBooking = poi.bookings.find(function (booking) { return booking.providerId === TICKET_PROVIDER_ID; });
|
|
44765
44672
|
var ticketProducts = (_b = ticketProviderBooking === null || ticketProviderBooking === void 0 ? void 0 : ticketProviderBooking.products.filter(function (product) { return product.info.includes(model_1.default.BOOKING_PRODUCT_INFO.TICKET); }).reverse()) !== null && _b !== void 0 ? _b : [];
|
|
44766
44673
|
var tourProviderBooking = poi.bookings.find(function (booking) { return booking.providerId === TOUR_PROVIDER_ID; });
|
|
@@ -44785,13 +44692,6 @@ var PoiInfo = function (_a) {
|
|
|
44785
44692
|
else if (ACTION_FLAG === POI_CARD_ACTION.REMOVE) {
|
|
44786
44693
|
actionIconClasses.push(PoiInfo_scss_1.default.removeIcon);
|
|
44787
44694
|
}
|
|
44788
|
-
var offersData;
|
|
44789
|
-
if (poi.offers && poi.offers.length > 0) {
|
|
44790
|
-
offersData = poi.offers;
|
|
44791
|
-
}
|
|
44792
|
-
else {
|
|
44793
|
-
offersData = offers;
|
|
44794
|
-
}
|
|
44795
44695
|
return (react_1.default.createElement("div", { className: PoiInfo_scss_1.default.poi },
|
|
44796
44696
|
react_1.default.createElement("div", { className: PoiInfo_scss_1.default.poiImage },
|
|
44797
44697
|
react_1.default.createElement(PoiInfoImage_1.default, { poi: poi, favorite: favorite, favoriteClick: function (fav) {
|
|
@@ -44808,13 +44708,13 @@ var PoiInfo = function (_a) {
|
|
|
44808
44708
|
addRemoveReplacePoi(poi, 1);
|
|
44809
44709
|
} })) : null),
|
|
44810
44710
|
react_1.default.createElement(PoiInfoText_1.default, { poi: poi, dayNumbers: dayNumbers, planDate: planDate, reservationUrl: reservationUrl, hideBookingButton: hideBookingButton, bookingButtonClick: bookingButtonClick }),
|
|
44811
|
-
|
|
44711
|
+
poi.offers && poi.offers.length > 0 && (react_1.default.createElement("div", { className: "col col12 px5 pb5" }, poi.offers.map(function (offer, i) {
|
|
44812
44712
|
var _a, _b;
|
|
44813
44713
|
var offerStartDate = (0, moment_1.default)((_a = offer.timeframe) === null || _a === void 0 ? void 0 : _a.start);
|
|
44814
44714
|
var offerEndDate = (0, moment_1.default)((_b = offer.timeframe) === null || _b === void 0 ? void 0 : _b.end);
|
|
44815
44715
|
var planDateTimeNow = (0, moment_1.default)(planDate);
|
|
44816
|
-
if (planDateTimeNow.
|
|
44817
|
-
var offerClaimDate_1 =
|
|
44716
|
+
if (planDateTimeNow.isBetween(offerStartDate, offerEndDate)) {
|
|
44717
|
+
var offerClaimDate_1 = (0, moment_1.default)(planDate).format('YYYY-MM-DD');
|
|
44818
44718
|
return (react_1.default.createElement("div", { key: "offer-".concat(i), className: "py2" },
|
|
44819
44719
|
react_1.default.createElement(OfferCard_1.default, { offer: offer, clicked: function (id) {
|
|
44820
44720
|
if (offerButtonClick)
|
|
@@ -62614,7 +62514,7 @@ var FormTemplateTrip2 = function (_a) {
|
|
|
62614
62514
|
var _a, _b, _c, _d;
|
|
62615
62515
|
var newTripProfile = model_1.helper.deepCopy(tripProfileState);
|
|
62616
62516
|
if (googlePlace.name === '') {
|
|
62617
|
-
|
|
62517
|
+
newTripProfile.accommodation = undefined;
|
|
62618
62518
|
}
|
|
62619
62519
|
else {
|
|
62620
62520
|
newTripProfile.accommodation = { name: (_a = googlePlace.name) !== null && _a !== void 0 ? _a : null, refID: (_b = googlePlace.place_id) !== null && _b !== void 0 ? _b : null, address: '', coordinate: { lat: 0, lng: 0 } };
|