@tripian/react 5.0.19 → 5.0.20
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/components/FormTemplate/FormTemplateTrip2/FormTemplateTrip2.d.ts +1 -0
- package/components/base/SideNavigation/SideNavigation.d.ts +1 -0
- package/img/ab923f844cc549da1bd6dbba32135c67.png +0 -0
- package/img/d2c299a4cd238f11337883211938d307.png +0 -0
- package/index.js +25 -23
- package/index.js.map +1 -1
- package/min.css +1 -1
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ interface IFormTemplateTrip2 {
|
|
|
10
10
|
userCompanions?: Array<Model.Companion>;
|
|
11
11
|
companionLoadingList: Array<number>;
|
|
12
12
|
callbackUserCompanionAdd: (userCompoanion: Model.Companion) => void;
|
|
13
|
+
showTripModeQuestion?: boolean;
|
|
13
14
|
onSubmitText: string;
|
|
14
15
|
onSubmit: () => void;
|
|
15
16
|
onCancel: () => void;
|
|
Binary file
|
|
Binary file
|
package/index.js
CHANGED
|
@@ -62612,10 +62612,10 @@ var UserCompanionSelection_1 = __importDefault(__webpack_require__(333));
|
|
|
62612
62612
|
var QuestionTemplate2_1 = __importDefault(__webpack_require__(334));
|
|
62613
62613
|
var Button_1 = __importDefault(__webpack_require__(6));
|
|
62614
62614
|
var FormTemplateTrip2 = function (_a) {
|
|
62615
|
-
var tripProfile = _a.tripProfile, tripQuestions = _a.tripQuestions, cities = _a.cities, _b = _a.isTripEdit, isTripEdit = _b === void 0 ? false : _b, callbackTripProfile = _a.callbackTripProfile, userCompanionQuestions = _a.userCompanionQuestions, userCompanions = _a.userCompanions, companionLoadingList = _a.companionLoadingList, callbackUserCompanionAdd = _a.callbackUserCompanionAdd, onSubmitText = _a.onSubmitText, onSubmit = _a.onSubmit, onCancel = _a.onCancel;
|
|
62616
|
-
var
|
|
62617
|
-
var
|
|
62618
|
-
var
|
|
62615
|
+
var tripProfile = _a.tripProfile, tripQuestions = _a.tripQuestions, cities = _a.cities, _b = _a.isTripEdit, isTripEdit = _b === void 0 ? false : _b, callbackTripProfile = _a.callbackTripProfile, userCompanionQuestions = _a.userCompanionQuestions, userCompanions = _a.userCompanions, companionLoadingList = _a.companionLoadingList, callbackUserCompanionAdd = _a.callbackUserCompanionAdd, _c = _a.showTripModeQuestion, showTripModeQuestion = _c === void 0 ? false : _c, onSubmitText = _a.onSubmitText, onSubmit = _a.onSubmit, onCancel = _a.onCancel;
|
|
62616
|
+
var _d = (0, react_1.useState)(1), pageState = _d[0], setPageState = _d[1];
|
|
62617
|
+
var _e = (0, react_1.useState)(tripProfile), tripProfileState = _e[0], setTripProfileState = _e[1];
|
|
62618
|
+
var _f = (0, react_1.useState)(), bound = _f[0], setBound = _f[1];
|
|
62619
62619
|
// const [placeText, setPlaceText] = useState<string>(tripProfile.accommodation_address || '');
|
|
62620
62620
|
// const paceOptions = Object.entries(Model.TRIP_PROFILE_PACE).map(([key, value]) => ({ label: key, value }));
|
|
62621
62621
|
var startTimeOptions = (0, react_1.useMemo)(function () {
|
|
@@ -62759,6 +62759,7 @@ var FormTemplateTrip2 = function (_a) {
|
|
|
62759
62759
|
var isNextButtonDisabled = !tripProfile.cityId || (0, moment_1.default)(tripProfile.arrivalDatetime).utcOffset(0) < (0, moment_1.default)().utcOffset(0);
|
|
62760
62760
|
var exploreQuestion = tripQuestions.find(function (question) { return question.id === 6; });
|
|
62761
62761
|
var restaurantsQuestions = tripQuestions.filter(function (question) { return question.id === 11 || question.id === 1111; });
|
|
62762
|
+
var tripModeQuestion = tripQuestions.find(function (question) { return question.id === 19; });
|
|
62762
62763
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
62763
62764
|
react_1.default.createElement("div", { className: FormTemplateTrip2_scss_1.default.wsteps },
|
|
62764
62765
|
react_1.default.createElement("ul", { role: "tablist" },
|
|
@@ -62823,9 +62824,11 @@ var FormTemplateTrip2 = function (_a) {
|
|
|
62823
62824
|
react_1.default.createElement(UserCompanionSelection_1.default, { selectedCompanionIds: tripProfileState.companionIds, userCompanionQuestions: userCompanionQuestions, userCompanions: userCompanions, companionLoadingList: companionLoadingList, callbackUserCompanionAdd: callbackUserCompanionAdd, userCompanionSelectionCallBack: userCompanionSelectionCallBack }))),
|
|
62824
62825
|
react_1.default.createElement("div", { className: "row ".concat(page3Class) },
|
|
62825
62826
|
tripQuestions
|
|
62826
|
-
.filter(function (q) { return q.id !== 6 && q.id !== 11 && q.id !== 1111; })
|
|
62827
|
+
.filter(function (q) { return q.id !== 6 && q.id !== 11 && q.id !== 1111 && q.id !== 19; })
|
|
62827
62828
|
.map(function (question) { return (react_1.default.createElement("div", { key: question.id, className: "col col12" },
|
|
62828
62829
|
react_1.default.createElement(QuestionTemplate_1.default, { question: question, answers: tripProfileState.answers, callbackAnswers: callbackTripAnswers }))); }),
|
|
62830
|
+
showTripModeQuestion && tripModeQuestion && (react_1.default.createElement("div", { key: tripModeQuestion.id, className: "col col12 my5" },
|
|
62831
|
+
react_1.default.createElement(QuestionTemplate_1.default, { question: tripModeQuestion, answers: tripProfileState.answers, callbackAnswers: callbackTripAnswers }))),
|
|
62829
62832
|
restaurantsQuestions.length > 0 ? (react_1.default.createElement("div", { key: restaurantsQuestions[0].id, className: "col col12 my5" },
|
|
62830
62833
|
react_1.default.createElement(QuestionTemplate2_1.default, { questions: restaurantsQuestions, answers: tripProfileState.answers, callbackAnswers: callbackTripAnswers }))) : null),
|
|
62831
62834
|
react_1.default.createElement("div", { className: "row ".concat(page4Class) }, exploreQuestion ? (react_1.default.createElement("div", { className: "col col12" },
|
|
@@ -65389,20 +65392,17 @@ var PoiOfferRefCard = function (_a) {
|
|
|
65389
65392
|
react_1.default.createElement("div", { className: PoiOfferRefCard_scss_1.default.poiRefCardImg },
|
|
65390
65393
|
react_1.default.createElement(ImgLazy_1.default, { src: PoiImage, alt: poi.name, x: 84, y: 84 })),
|
|
65391
65394
|
react_1.default.createElement("div", { className: PoiOfferRefCard_scss_1.default.refCardInfo },
|
|
65392
|
-
react_1.default.createElement("div", { className: PoiOfferRefCard_scss_1.default.poiRefCardName }, poi.name),
|
|
65393
|
-
|
|
65394
|
-
|
|
65395
|
-
|
|
65396
|
-
|
|
65397
|
-
|
|
65398
|
-
|
|
65399
|
-
|
|
65400
|
-
|
|
65401
|
-
|
|
65402
|
-
|
|
65403
|
-
(0, moment_1.default)((_c = offer === null || offer === void 0 ? void 0 : offer.timeframe) === null || _c === void 0 ? void 0 : _c.end).format('DD MMMM h:mm A')))),
|
|
65404
|
-
(offer === null || offer === void 0 ? void 0 : offer.caption) && react_1.default.createElement("div", null, offer === null || offer === void 0 ? void 0 : offer.caption)),
|
|
65405
|
-
react_1.default.createElement("div", { className: PoiOfferRefCard_scss_1.default.poiOfferRefCardReceiveMethod }, offer === null || offer === void 0 ? void 0 : offer.productType.receiveMethod)))))));
|
|
65395
|
+
react_1.default.createElement("div", { className: PoiOfferRefCard_scss_1.default.poiRefCardName }, poi.name)),
|
|
65396
|
+
react_1.default.createElement("div", { className: PoiOfferRefCard_scss_1.default.offerDetails },
|
|
65397
|
+
react_1.default.createElement("div", { className: PoiOfferRefCard_scss_1.default.poiOfferCardTimeFrame }, (offer === null || offer === void 0 ? void 0 : offer.optInClaimDate) && isMyOffer ? (react_1.default.createElement("span", null,
|
|
65398
|
+
"Claim Date: ",
|
|
65399
|
+
(0, moment_1.default)(offer.optInClaimDate).format('DD MMMM h:mm A'))) : (react_1.default.createElement("span", null,
|
|
65400
|
+
"From: ",
|
|
65401
|
+
(0, moment_1.default)((_b = offer === null || offer === void 0 ? void 0 : offer.timeframe) === null || _b === void 0 ? void 0 : _b.start).format('DD MMMM h:mm A'),
|
|
65402
|
+
"\u00A0 To: ",
|
|
65403
|
+
(0, moment_1.default)((_c = offer === null || offer === void 0 ? void 0 : offer.timeframe) === null || _c === void 0 ? void 0 : _c.end).format('DD MMMM h:mm A')))),
|
|
65404
|
+
(offer === null || offer === void 0 ? void 0 : offer.caption) && react_1.default.createElement("div", { className: PoiOfferRefCard_scss_1.default.poiOfferRefCardCaption }, offer === null || offer === void 0 ? void 0 : offer.caption),
|
|
65405
|
+
react_1.default.createElement("div", { className: PoiOfferRefCard_scss_1.default.poiOfferRefCardReceiveMethod }, offer === null || offer === void 0 ? void 0 : offer.productType.receiveMethod))))));
|
|
65406
65406
|
};
|
|
65407
65407
|
exports.default = PoiOfferRefCard;
|
|
65408
65408
|
|
|
@@ -65412,7 +65412,7 @@ exports.default = PoiOfferRefCard;
|
|
|
65412
65412
|
/***/ (function(module, exports, __webpack_require__) {
|
|
65413
65413
|
|
|
65414
65414
|
// extracted by mini-css-extract-plugin
|
|
65415
|
-
module.exports = {"poiRefCard":"components-PoiOfferRefCard-PoiOfferRefCard__poiRefCard--25w5A","poiRefCardImg":"components-PoiOfferRefCard-PoiOfferRefCard__poiRefCardImg--1V1ge","refCardInfo":"components-PoiOfferRefCard-PoiOfferRefCard__refCardInfo--1UQxW","PoiRefCardContent":"components-PoiOfferRefCard-PoiOfferRefCard__PoiRefCardContent--3jI9A","refCardPartOfDay":"components-PoiOfferRefCard-PoiOfferRefCard__refCardPartOfDay--1RhDs","poiRefCardName":"components-PoiOfferRefCard-PoiOfferRefCard__poiRefCardName--3DLKR","offerDetails":"components-PoiOfferRefCard-PoiOfferRefCard__offerDetails--Lz6rV","poiOfferRefCardReceiveMethod":"components-PoiOfferRefCard-PoiOfferRefCard__poiOfferRefCardReceiveMethod--29s6w","poiOfferCardTimeFrame":"components-PoiOfferRefCard-PoiOfferRefCard__poiOfferCardTimeFrame--1Bq19","poiOfferCardTimeFrameStart":"components-PoiOfferRefCard-PoiOfferRefCard__poiOfferCardTimeFrameStart--SGJQ1","button":"components-PoiOfferRefCard-PoiOfferRefCard__button--3J8aI"};
|
|
65415
|
+
module.exports = {"poiRefCard":"components-PoiOfferRefCard-PoiOfferRefCard__poiRefCard--25w5A","poiRefCardImg":"components-PoiOfferRefCard-PoiOfferRefCard__poiRefCardImg--1V1ge","refCardInfo":"components-PoiOfferRefCard-PoiOfferRefCard__refCardInfo--1UQxW","PoiRefCardContent":"components-PoiOfferRefCard-PoiOfferRefCard__PoiRefCardContent--3jI9A","refCardPartOfDay":"components-PoiOfferRefCard-PoiOfferRefCard__refCardPartOfDay--1RhDs","poiRefCardName":"components-PoiOfferRefCard-PoiOfferRefCard__poiRefCardName--3DLKR","offerDetails":"components-PoiOfferRefCard-PoiOfferRefCard__offerDetails--Lz6rV","poiOfferRefCardReceiveMethod":"components-PoiOfferRefCard-PoiOfferRefCard__poiOfferRefCardReceiveMethod--29s6w","poiOfferCardTimeFrame":"components-PoiOfferRefCard-PoiOfferRefCard__poiOfferCardTimeFrame--1Bq19","poiOfferCardTimeFrameStart":"components-PoiOfferRefCard-PoiOfferRefCard__poiOfferCardTimeFrameStart--SGJQ1","poiOfferRefCardCaption":"components-PoiOfferRefCard-PoiOfferRefCard__poiOfferRefCardCaption--Seol_","button":"components-PoiOfferRefCard-PoiOfferRefCard__button--3J8aI"};
|
|
65416
65416
|
|
|
65417
65417
|
/***/ }),
|
|
65418
65418
|
/* 686 */
|
|
@@ -65622,7 +65622,7 @@ var react_1 = __importDefault(__webpack_require__(0));
|
|
|
65622
65622
|
var SideNavigation_scss_1 = __importDefault(__webpack_require__(695));
|
|
65623
65623
|
var CloseIconButton_1 = __importDefault(__webpack_require__(25));
|
|
65624
65624
|
var SideNavigation = function (_a) {
|
|
65625
|
-
var title = _a.title, menuItems = _a.menuItems, closed = _a.closed, _b = _a.open, open = _b === void 0 ? false : _b;
|
|
65625
|
+
var title = _a.title, menuItems = _a.menuItems, closed = _a.closed, _b = _a.open, open = _b === void 0 ? false : _b, _c = _a.showBbButton, showBbButton = _c === void 0 ? false : _c;
|
|
65626
65626
|
var overlayClicked = function (event) {
|
|
65627
65627
|
event.stopPropagation();
|
|
65628
65628
|
closed();
|
|
@@ -65660,7 +65660,9 @@ var SideNavigation = function (_a) {
|
|
|
65660
65660
|
react_1.default.createElement("button", { className: SideNavigation_scss_1.default.button, key: menuItem.title, type: "button", onClick: function () {
|
|
65661
65661
|
closed();
|
|
65662
65662
|
menuItem.onClick();
|
|
65663
|
-
} }, menuItem.title))); }))
|
|
65663
|
+
} }, menuItem.title))); })),
|
|
65664
|
+
showBbButton && (react_1.default.createElement("a", { className: SideNavigation_scss_1.default.bbHomeLink, href: "https://bookbarbados.com/", target: "_blank" },
|
|
65665
|
+
react_1.default.createElement("div", { className: SideNavigation_scss_1.default.bbHomeLinkImg }))))));
|
|
65664
65666
|
};
|
|
65665
65667
|
exports.default = SideNavigation;
|
|
65666
65668
|
|
|
@@ -65670,7 +65672,7 @@ exports.default = SideNavigation;
|
|
|
65670
65672
|
/***/ (function(module, exports, __webpack_require__) {
|
|
65671
65673
|
|
|
65672
65674
|
// extracted by mini-css-extract-plugin
|
|
65673
|
-
module.exports = {"sidenavOverlay":"components-base-SideNavigation-SideNavigation__sidenavOverlay--3tk5E","sidenavOverlayOpen":"components-base-SideNavigation-SideNavigation__sidenavOverlayOpen--3T_Ag","sidenav":"components-base-SideNavigation-SideNavigation__sidenav--1Uyu2","sidenavOpen":"components-base-SideNavigation-SideNavigation__sidenavOpen--OHm0j","image":"components-base-SideNavigation-SideNavigation__image--XH9Pd","closeIcon":"components-base-SideNavigation-SideNavigation__closeIcon--1BPBS","close":"components-base-SideNavigation-SideNavigation__close--3kfKC","button":"components-base-SideNavigation-SideNavigation__button--xn9Zn","links":"components-base-SideNavigation-SideNavigation__links--1UTrt","modal":"components-base-SideNavigation-SideNavigation__modal--2Yb3q"};
|
|
65675
|
+
module.exports = {"sidenavOverlay":"components-base-SideNavigation-SideNavigation__sidenavOverlay--3tk5E","sidenavOverlayOpen":"components-base-SideNavigation-SideNavigation__sidenavOverlayOpen--3T_Ag","sidenav":"components-base-SideNavigation-SideNavigation__sidenav--1Uyu2","sidenavOpen":"components-base-SideNavigation-SideNavigation__sidenavOpen--OHm0j","image":"components-base-SideNavigation-SideNavigation__image--XH9Pd","closeIcon":"components-base-SideNavigation-SideNavigation__closeIcon--1BPBS","close":"components-base-SideNavigation-SideNavigation__close--3kfKC","button":"components-base-SideNavigation-SideNavigation__button--xn9Zn","links":"components-base-SideNavigation-SideNavigation__links--1UTrt","modal":"components-base-SideNavigation-SideNavigation__modal--2Yb3q","bbHomeLink":"components-base-SideNavigation-SideNavigation__bbHomeLink--1wdmP","bbHomeLinkImg":"components-base-SideNavigation-SideNavigation__bbHomeLinkImg--36-5J"};
|
|
65674
65676
|
|
|
65675
65677
|
/***/ }),
|
|
65676
65678
|
/* 696 */
|