@tripian/react 6.0.0 → 6.0.1
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/FormTemplateTripNext/FormTemplateTripNext.d.ts +15 -2
- package/components/FormTemplate/FormTemplateTripNext/StepComponent/QuestionComponent/QuestionComponent.d.ts +1 -2
- package/components/FormTemplate/FormTemplateTripNext/StepComponent/StepComponent.d.ts +1 -2
- package/components/FormTemplate/FormTemplateTripNext/StepDestination/StepDestination.d.ts +5 -0
- package/components/FormTemplate/FormTemplateTripNext/StepStayAndShares/StepStayAndShares.d.ts +5 -0
- package/components/QuestionTemplateNext/Context/QuestionContext.d.ts +2 -2
- package/components/QuestionTemplateNext/QuestionTemplate.d.ts +2 -2
- package/index.js +42 -54
- package/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Model from '@tripian/model';
|
|
3
|
-
import { QuestionNext } from './model';
|
|
4
3
|
/**
|
|
5
4
|
* Destinations
|
|
6
5
|
* Stay & Shares
|
|
@@ -9,7 +8,7 @@ import { QuestionNext } from './model';
|
|
|
9
8
|
*/
|
|
10
9
|
interface IFormTemplateTripNext {
|
|
11
10
|
tripProfile: Model.TripProfile;
|
|
12
|
-
tripQuestions: Array<
|
|
11
|
+
tripQuestions: Array<Model.Question>;
|
|
13
12
|
cities: Array<Model.City>;
|
|
14
13
|
isTripEdit?: boolean;
|
|
15
14
|
callbackTripProfile: (tripProfile: Model.TripProfile) => void;
|
|
@@ -18,6 +17,20 @@ interface IFormTemplateTripNext {
|
|
|
18
17
|
companionLoadingList: Array<number>;
|
|
19
18
|
callbackUserCompanionAdd: (userCompoanion: Model.Companion) => void;
|
|
20
19
|
showTripModeQuestion?: boolean;
|
|
20
|
+
stepHeaders: {
|
|
21
|
+
stepId: number;
|
|
22
|
+
header: string;
|
|
23
|
+
}[];
|
|
24
|
+
destinationTips: {
|
|
25
|
+
iconUrl: string;
|
|
26
|
+
title: string;
|
|
27
|
+
description: string;
|
|
28
|
+
}[];
|
|
29
|
+
stayAndShareTips: {
|
|
30
|
+
iconUrl: string;
|
|
31
|
+
title: string;
|
|
32
|
+
description: string;
|
|
33
|
+
}[];
|
|
21
34
|
onSubmitText: string;
|
|
22
35
|
onSubmit: () => void;
|
|
23
36
|
onCancel: () => void;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import Model from '@tripian/model';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { QuestionNext } from '../../model';
|
|
4
3
|
export interface QuestionComponentProps {
|
|
5
|
-
question:
|
|
4
|
+
question: Model.Question;
|
|
6
5
|
tripProfile: Model.TripProfile;
|
|
7
6
|
callbackTripAnswers: (answers: number[]) => void;
|
|
8
7
|
onFocused: () => void;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import Model from '@tripian/model';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { QuestionNext } from '../model';
|
|
4
3
|
export interface StepComponentProps {
|
|
5
4
|
header: string;
|
|
6
5
|
defaultTip: {
|
|
@@ -8,7 +7,7 @@ export interface StepComponentProps {
|
|
|
8
7
|
title: string;
|
|
9
8
|
description: string;
|
|
10
9
|
};
|
|
11
|
-
stepQuestions:
|
|
10
|
+
stepQuestions: Model.Question[];
|
|
12
11
|
stepId: number;
|
|
13
12
|
tripProfile: Model.TripProfile;
|
|
14
13
|
callbackTripAnswers: (answers: number[]) => void;
|
|
@@ -5,6 +5,11 @@ export interface StepDestinationProps {
|
|
|
5
5
|
cities: Array<Model.City>;
|
|
6
6
|
setTripProfile: (tripProfile: Model.TripProfile) => void;
|
|
7
7
|
isTripEdit: boolean;
|
|
8
|
+
destinationTips: {
|
|
9
|
+
iconUrl: string;
|
|
10
|
+
title: string;
|
|
11
|
+
description: string;
|
|
12
|
+
}[];
|
|
8
13
|
}
|
|
9
14
|
declare const StepDestination: React.FC<StepDestinationProps>;
|
|
10
15
|
export default StepDestination;
|
package/components/FormTemplate/FormTemplateTripNext/StepStayAndShares/StepStayAndShares.d.ts
CHANGED
|
@@ -11,6 +11,11 @@ export interface StepStayAndSharesProps {
|
|
|
11
11
|
userCompanions?: Array<Model.Companion>;
|
|
12
12
|
companionLoadingList: Array<number>;
|
|
13
13
|
callbackUserCompanionAdd: (userCompoanion: Model.Companion) => void;
|
|
14
|
+
stayAndShareTips: {
|
|
15
|
+
iconUrl: string;
|
|
16
|
+
title: string;
|
|
17
|
+
description: string;
|
|
18
|
+
}[];
|
|
14
19
|
}
|
|
15
20
|
declare const StepStayAndShares: React.FC<StepStayAndSharesProps>;
|
|
16
21
|
export default StepStayAndShares;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Model from '@tripian/model';
|
|
3
3
|
interface IQuestionContext {
|
|
4
|
-
question:
|
|
4
|
+
question: Model.Question;
|
|
5
5
|
defaultAnswers: Array<number>;
|
|
6
6
|
}
|
|
7
7
|
declare const questionContext: React.Context<IQuestionContext>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Model from '@tripian/model';
|
|
3
3
|
interface IQuestionTemplate {
|
|
4
|
-
question:
|
|
4
|
+
question: Model.Question;
|
|
5
5
|
answers: Array<number>;
|
|
6
6
|
callbackAnswers: (answers: Array<number>) => void;
|
|
7
7
|
flexDirection?: 'column' | 'row';
|
package/index.js
CHANGED
|
@@ -7438,7 +7438,9 @@ var Dropdown = function (_a) {
|
|
|
7438
7438
|
}, onBlur: function () {
|
|
7439
7439
|
if (onBlur)
|
|
7440
7440
|
onBlur();
|
|
7441
|
-
} },
|
|
7441
|
+
} },
|
|
7442
|
+
defaultValue === undefined && react_1.default.createElement("option", { value: undefined }, "Please Select"),
|
|
7443
|
+
keyOptions.map(function (option) { return (react_1.default.createElement("option", { key: option.key, value: option.value }, option.label ? option.label : option.value)); }))));
|
|
7442
7444
|
};
|
|
7443
7445
|
exports.default = Dropdown;
|
|
7444
7446
|
|
|
@@ -18760,7 +18762,20 @@ var react_1 = __importDefault(__webpack_require__(0));
|
|
|
18760
18762
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
18761
18763
|
var model_1 = __importDefault(__webpack_require__(4));
|
|
18762
18764
|
var questionContext = react_1.default.createContext({
|
|
18763
|
-
question: {
|
|
18765
|
+
question: {
|
|
18766
|
+
id: 0,
|
|
18767
|
+
skippable: false,
|
|
18768
|
+
selectMultiple: false,
|
|
18769
|
+
name: '',
|
|
18770
|
+
category: model_1.default.QUESTIONS_CATEGORY.TRIP,
|
|
18771
|
+
order: 0,
|
|
18772
|
+
title: '',
|
|
18773
|
+
theme: '',
|
|
18774
|
+
stepId: -1,
|
|
18775
|
+
iconUrl: '',
|
|
18776
|
+
description: '',
|
|
18777
|
+
answers: [{ id: 0, name: '', subAnswers: [], description: '' }],
|
|
18778
|
+
},
|
|
18764
18779
|
defaultAnswers: [0],
|
|
18765
18780
|
});
|
|
18766
18781
|
exports.default = questionContext;
|
|
@@ -45491,6 +45506,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
45491
45506
|
};
|
|
45492
45507
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45493
45508
|
var react_1 = __importDefault(__webpack_require__(0));
|
|
45509
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
45494
45510
|
var model_1 = __importStar(__webpack_require__(4));
|
|
45495
45511
|
var Price_1 = __importDefault(__webpack_require__(80));
|
|
45496
45512
|
var RatingStars_1 = __importDefault(__webpack_require__(31));
|
|
@@ -45509,6 +45525,7 @@ var TapRight_1 = __importDefault(__webpack_require__(734));
|
|
|
45509
45525
|
var Phone_1 = __importDefault(__webpack_require__(735));
|
|
45510
45526
|
var Mask_1 = __importDefault(__webpack_require__(736));
|
|
45511
45527
|
var PoiInfoText_scss_1 = __importDefault(__webpack_require__(737));
|
|
45528
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
45512
45529
|
var POI_CARD_ACTION;
|
|
45513
45530
|
(function (POI_CARD_ACTION) {
|
|
45514
45531
|
POI_CARD_ACTION[POI_CARD_ACTION["ADD"] = 0] = "ADD";
|
|
@@ -63713,33 +63730,15 @@ var StepComponent_1 = __importDefault(__webpack_require__(649));
|
|
|
63713
63730
|
var StepDestination_1 = __importDefault(__webpack_require__(662));
|
|
63714
63731
|
var StepStayAndShares_1 = __importDefault(__webpack_require__(664));
|
|
63715
63732
|
var ArrowRight_1 = __importDefault(__webpack_require__(667));
|
|
63716
|
-
var stepHeaders = [
|
|
63717
|
-
{
|
|
63718
|
-
stepId: -1,
|
|
63719
|
-
header: 'Destinations',
|
|
63720
|
-
},
|
|
63721
|
-
{
|
|
63722
|
-
stepId: 0,
|
|
63723
|
-
header: 'Stay & Shares',
|
|
63724
|
-
},
|
|
63725
|
-
{
|
|
63726
|
-
stepId: 1,
|
|
63727
|
-
header: 'Picked Informations',
|
|
63728
|
-
},
|
|
63729
|
-
{
|
|
63730
|
-
stepId: 2,
|
|
63731
|
-
header: 'Personalize tour trip',
|
|
63732
|
-
},
|
|
63733
|
-
];
|
|
63734
63733
|
var FormTemplateTripNext = function (_a) {
|
|
63735
|
-
var tripProfileInitial = _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;
|
|
63734
|
+
var tripProfileInitial = _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, stepHeaders = _a.stepHeaders, destinationTips = _a.destinationTips, stayAndShareTips = _a.stayAndShareTips, onSubmitText = _a.onSubmitText, onSubmit = _a.onSubmit, onCancel = _a.onCancel;
|
|
63736
63735
|
var _d = (0, react_1.useState)(-1), stepId = _d[0], setStepId = _d[1];
|
|
63737
63736
|
var _e = (0, react_1.useState)(tripProfileInitial), tripProfile = _e[0], setTripProfile = _e[1];
|
|
63738
63737
|
var _f = (0, react_1.useState)(), bound = _f[0], setBound = _f[1];
|
|
63739
63738
|
// const tripModeQuestion = tripQuestions.find((question) => question.id === 19);
|
|
63740
63739
|
var filteredQuestions = (0, react_1.useMemo)(function () { return (showTripModeQuestion ? tripQuestions : tripQuestions.filter(function (x) { return x.id !== 19; })); }, [tripQuestions, showTripModeQuestion]);
|
|
63741
63740
|
var stepQuestions = (0, react_1.useMemo)(function () { return filteredQuestions.filter(function (x) { return x.stepId === stepId; }).sort(function (a, b) { return a.order - b.order; }); }, [filteredQuestions, stepId]);
|
|
63742
|
-
var stepHeader = (0, react_1.useMemo)(function () { var _a; return (_a = stepHeaders.find(function (x) { return x.stepId === stepId; })) !== null && _a !== void 0 ? _a : stepHeaders[0]; }, [stepId]);
|
|
63741
|
+
var stepHeader = (0, react_1.useMemo)(function () { var _a; return (_a = stepHeaders.find(function (x) { return x.stepId === stepId; })) !== null && _a !== void 0 ? _a : stepHeaders[0]; }, [stepHeaders, stepId]);
|
|
63743
63742
|
var isNextButtonDisabled = (0, react_1.useMemo)(function () { return !tripProfile.cityId || (0, moment_1.default)(tripProfile.arrivalDatetime).utcOffset(0) < (0, moment_1.default)().utcOffset(0); }, [tripProfile.arrivalDatetime, tripProfile.cityId]);
|
|
63744
63743
|
var callbackTripAnswers = (0, react_1.useCallback)(function (answers) {
|
|
63745
63744
|
var newTripProfile = __assign({}, tripProfile);
|
|
@@ -63759,11 +63758,11 @@ var FormTemplateTripNext = function (_a) {
|
|
|
63759
63758
|
stepId === -1 && cities.length > 0 && (react_1.default.createElement(StepDestination_1.default, { tripProfile: tripProfile, cities: cities, setTripProfile: function (newTripProfile) {
|
|
63760
63759
|
setTripProfile(newTripProfile);
|
|
63761
63760
|
callbackTripProfile(newTripProfile);
|
|
63762
|
-
}, isTripEdit: isTripEdit })),
|
|
63761
|
+
}, isTripEdit: isTripEdit, destinationTips: destinationTips })),
|
|
63763
63762
|
stepId === 0 && (react_1.default.createElement(StepStayAndShares_1.default, { tripProfile: tripProfile, cities: cities, bound: bound, setBound: function (newBound) { return setBound(newBound); }, setTripProfile: function (newTripProfile) {
|
|
63764
63763
|
setTripProfile(newTripProfile);
|
|
63765
63764
|
callbackTripProfile(newTripProfile);
|
|
63766
|
-
}, callbackUserCompanionAdd: callbackUserCompanionAdd, companionLoadingList: companionLoadingList, userCompanionQuestions: userCompanionQuestions, userCompanions: userCompanions })),
|
|
63765
|
+
}, callbackUserCompanionAdd: callbackUserCompanionAdd, companionLoadingList: companionLoadingList, userCompanionQuestions: userCompanionQuestions, userCompanions: userCompanions, stayAndShareTips: stayAndShareTips })),
|
|
63767
63766
|
stepId > 0 && (react_1.default.createElement(StepComponent_1.default, { defaultTip: { title: 'Hover the areas for more info', description: 'If you close a field, we will provide you with relevant explatanions.', iconUrl: 'https://poi-pics.s3.eu-west-1.amazonaws.com/project-images/tripian-one/logo.png' }, header: stepHeader.header, stepQuestions: stepQuestions, stepId: stepId, tripProfile: tripProfile, callbackTripAnswers: callbackTripAnswers })),
|
|
63768
63767
|
react_1.default.createElement("div", { className: "row center" },
|
|
63769
63768
|
react_1.default.createElement("div", { className: "col col6" }, stepId === -1 ? (react_1.default.createElement(Button_1.default, { text: "Cancel", color: "primary", onClick: function () {
|
|
@@ -63825,6 +63824,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
63825
63824
|
};
|
|
63826
63825
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
63827
63826
|
var react_1 = __importStar(__webpack_require__(0));
|
|
63827
|
+
// import Header from '../../../base/Header/Header';
|
|
63828
63828
|
var InfoBox_1 = __importDefault(__webpack_require__(105));
|
|
63829
63829
|
var QuestionTemplate_1 = __importDefault(__webpack_require__(651));
|
|
63830
63830
|
var QuestionTemplate2_1 = __importDefault(__webpack_require__(659));
|
|
@@ -63834,6 +63834,7 @@ var StepComponent = function (_a) {
|
|
|
63834
63834
|
var onFocus = function (qId) {
|
|
63835
63835
|
var focusedQ = stepQuestions.find(function (x) { return x.id === qId; });
|
|
63836
63836
|
if (focusedQ) {
|
|
63837
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
63837
63838
|
setTip({ title: focusedQ.title, description: focusedQ.description, iconUrl: focusedQ.iconUrl });
|
|
63838
63839
|
}
|
|
63839
63840
|
};
|
|
@@ -63877,7 +63878,7 @@ var Question_1 = __importDefault(__webpack_require__(652));
|
|
|
63877
63878
|
var QuestionTemplate = function (_a) {
|
|
63878
63879
|
var question = _a.question, answers = _a.answers, callbackAnswers = _a.callbackAnswers, _b = _a.flexDirection, flexDirection = _b === void 0 ? 'row' : _b, onFocused = _a.onFocused;
|
|
63879
63880
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
63880
|
-
react_1.default.createElement("div", { key: question.id },
|
|
63881
|
+
react_1.default.createElement("div", { key: question.id, className: "col col12 col12-m p2" },
|
|
63881
63882
|
react_1.default.createElement(QuestionContext_1.default.Provider, { value: {
|
|
63882
63883
|
question: question,
|
|
63883
63884
|
defaultAnswers: answers,
|
|
@@ -64333,9 +64334,8 @@ var react_1 = __importStar(__webpack_require__(0));
|
|
|
64333
64334
|
var QuestionContext2_1 = __importDefault(__webpack_require__(348));
|
|
64334
64335
|
var SelectQuestion_1 = __importDefault(__webpack_require__(661));
|
|
64335
64336
|
var Question2 = function (_a) {
|
|
64336
|
-
var _b, _c;
|
|
64337
64337
|
var changed = _a.changed, flexDirection = _a.flexDirection;
|
|
64338
|
-
var
|
|
64338
|
+
var _b = (0, react_1.useContext)(QuestionContext2_1.default), questions = _b.questions, defaultAnswers = _b.defaultAnswers;
|
|
64339
64339
|
var selectionChanged = function (addedOptionId, removedOptionId) {
|
|
64340
64340
|
var newAnswers = __spreadArray([], defaultAnswers, true);
|
|
64341
64341
|
if (removedOptionId) {
|
|
@@ -64345,14 +64345,14 @@ var Question2 = function (_a) {
|
|
|
64345
64345
|
newAnswers.push(addedOptionId);
|
|
64346
64346
|
changed(newAnswers);
|
|
64347
64347
|
};
|
|
64348
|
-
|
|
64349
|
-
|
|
64348
|
+
// const defaultAnswer1 = questions[0].answers.find((option) => defaultAnswers.includes(option.id))?.id;
|
|
64349
|
+
// const defaultAnswer2 = questions[1].answers.find((option) => defaultAnswers.includes(option.id))?.id;
|
|
64350
64350
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
64351
64351
|
react_1.default.createElement("h3", { className: "mt10 mb6" }, "What type of restaurants do you prefer?"),
|
|
64352
|
-
react_1.default.createElement("h4", { className: "
|
|
64353
|
-
react_1.default.createElement(SelectQuestion_1.default, { question: questions[0],
|
|
64354
|
-
react_1.default.createElement("h4", { className: "
|
|
64355
|
-
react_1.default.createElement(SelectQuestion_1.default, { question: questions[1],
|
|
64352
|
+
react_1.default.createElement("h4", { className: "my2" }, "Lunch/Brunch"),
|
|
64353
|
+
react_1.default.createElement(SelectQuestion_1.default, { question: questions[0], selectionChanged: selectionChanged, flexDirection: flexDirection }),
|
|
64354
|
+
react_1.default.createElement("h4", { className: "my2" }, "Dinner"),
|
|
64355
|
+
react_1.default.createElement(SelectQuestion_1.default, { question: questions[1], selectionChanged: selectionChanged, flexDirection: flexDirection })));
|
|
64356
64356
|
};
|
|
64357
64357
|
exports.default = Question2;
|
|
64358
64358
|
|
|
@@ -64395,7 +64395,7 @@ var Dropdown_1 = __importDefault(__webpack_require__(25));
|
|
|
64395
64395
|
var SelectQuestion = function (_a) {
|
|
64396
64396
|
var question = _a.question, defaultAnswer = _a.defaultAnswer, selectionChanged = _a.selectionChanged, flexDirection = _a.flexDirection;
|
|
64397
64397
|
var _b = (0, react_1.useState)(defaultAnswer), answer = _b[0], setAnswer = _b[1];
|
|
64398
|
-
var handleChange = function (value
|
|
64398
|
+
var handleChange = function (value) {
|
|
64399
64399
|
var removedOptionId = answer;
|
|
64400
64400
|
var addedOptionId = Number(value);
|
|
64401
64401
|
selectionChanged(addedOptionId, removedOptionId);
|
|
@@ -64457,21 +64457,14 @@ var model_1 = __webpack_require__(4);
|
|
|
64457
64457
|
var moment_1 = __importDefault(__webpack_require__(1));
|
|
64458
64458
|
var react_1 = __importStar(__webpack_require__(0));
|
|
64459
64459
|
var Dropdown_1 = __importDefault(__webpack_require__(25));
|
|
64460
|
+
// import Header from '../../../base/Header/Header';
|
|
64460
64461
|
var InfoBox_1 = __importDefault(__webpack_require__(105));
|
|
64461
64462
|
var Required_1 = __importDefault(__webpack_require__(345));
|
|
64462
64463
|
var RSelect_1 = __importDefault(__webpack_require__(33));
|
|
64463
64464
|
var DateRangePicker_1 = __importDefault(__webpack_require__(62));
|
|
64464
64465
|
var StepDestination_scss_1 = __importDefault(__webpack_require__(663));
|
|
64465
|
-
var destinationTips = [
|
|
64466
|
-
{ title: 'Hover the areas for info', description: 'If you close a field, we will provide you with relevant explatanions.', iconUrl: 'https://poi-pics.s3.eu-west-1.amazonaws.com/project-images/tripian-one/logo.png' },
|
|
64467
|
-
{ title: 'Select City', description: 'If you close a field, we will provide you with relevant explatanions.', iconUrl: 'https://poi-pics.s3.eu-west-1.amazonaws.com/project-images/tripian-one/logo.png' },
|
|
64468
|
-
{ title: 'Select Start Dates', description: 'If you close a field, we will provide you with relevant explatanions.', iconUrl: 'https://poi-pics.s3.eu-west-1.amazonaws.com/project-images/tripian-one/logo.png' },
|
|
64469
|
-
{ title: 'Select End Dates', description: 'If you close a field, we will provide you with relevant explatanions.', iconUrl: 'https://poi-pics.s3.eu-west-1.amazonaws.com/project-images/tripian-one/logo.png' },
|
|
64470
|
-
{ title: 'Select arrival time', description: 'If you close a field, we will provide you with relevant explatanions.', iconUrl: 'https://poi-pics.s3.eu-west-1.amazonaws.com/project-images/tripian-one/logo.png' },
|
|
64471
|
-
{ title: 'Select depature time', description: 'If you close a field, we will provide you with relevant explatanions.', iconUrl: 'https://poi-pics.s3.eu-west-1.amazonaws.com/project-images/tripian-one/logo.png' },
|
|
64472
|
-
];
|
|
64473
64466
|
var StepDestination = function (_a) {
|
|
64474
|
-
var tripProfile = _a.tripProfile, cities = _a.cities, setTripProfile = _a.setTripProfile, isTripEdit = _a.isTripEdit;
|
|
64467
|
+
var tripProfile = _a.tripProfile, cities = _a.cities, setTripProfile = _a.setTripProfile, isTripEdit = _a.isTripEdit, destinationTips = _a.destinationTips;
|
|
64475
64468
|
var _b = (0, react_1.useState)(destinationTips[0]), tip = _b[0], setTip = _b[1];
|
|
64476
64469
|
var startTimeOptions = (0, react_1.useMemo)(function () {
|
|
64477
64470
|
var sameDay = tripProfile.arrivalDatetime.split('T')[0] === tripProfile.departureDatetime.split('T')[0];
|
|
@@ -64530,10 +64523,11 @@ var StepDestination = function (_a) {
|
|
|
64530
64523
|
setTripProfile(newTripProfile);
|
|
64531
64524
|
};
|
|
64532
64525
|
var callbackCitySelect = function (selectedOption) {
|
|
64526
|
+
var _a;
|
|
64533
64527
|
var newTripProfile = model_1.helper.deepCopy(tripProfile);
|
|
64534
64528
|
if (selectedOption) {
|
|
64535
64529
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
64536
|
-
newTripProfile.cityId = selectedOption.payload.id;
|
|
64530
|
+
newTripProfile.cityId = (_a = selectedOption.payload) === null || _a === void 0 ? void 0 : _a.id;
|
|
64537
64531
|
// newTripProfile.accommodation = null;
|
|
64538
64532
|
setTripProfile(newTripProfile);
|
|
64539
64533
|
}
|
|
@@ -64635,17 +64629,10 @@ var model_1 = __webpack_require__(4);
|
|
|
64635
64629
|
var NumberCounter_1 = __importDefault(__webpack_require__(665));
|
|
64636
64630
|
var GPlacesAutocomplete2_1 = __importDefault(__webpack_require__(103));
|
|
64637
64631
|
var UserCompanionSelection_1 = __importDefault(__webpack_require__(104));
|
|
64632
|
+
// import Header from '../../../base/Header/Header';
|
|
64638
64633
|
var InfoBox_1 = __importDefault(__webpack_require__(105));
|
|
64639
|
-
// import classes from './StepStayAndShares.scss';
|
|
64640
|
-
var stayAndShareTips = [
|
|
64641
|
-
{ title: 'Hover the areas for info', description: 'If you close a field, we will provide you with relevant explatanions.', iconUrl: 'https://poi-pics.s3.eu-west-1.amazonaws.com/project-images/tripian-one/logo.png' },
|
|
64642
|
-
{ title: 'Select Adults Number', description: 'If you close a field, we will provide you with relevant explatanions.', iconUrl: 'https://poi-pics.s3.eu-west-1.amazonaws.com/project-images/tripian-one/logo.png' },
|
|
64643
|
-
{ title: 'Select Children Number', description: 'If you close a field, we will provide you with relevant explatanions.', iconUrl: 'https://poi-pics.s3.eu-west-1.amazonaws.com/project-images/tripian-one/logo.png' },
|
|
64644
|
-
{ title: 'Where will you stay?', description: 'If you close a field, we will provide you with relevant explatanions.', iconUrl: 'https://poi-pics.s3.eu-west-1.amazonaws.com/project-images/tripian-one/logo.png' },
|
|
64645
|
-
{ title: 'Add Your Companions', description: 'If you close a field, we will provide you with relevant explatanions.', iconUrl: 'https://poi-pics.s3.eu-west-1.amazonaws.com/project-images/tripian-one/logo.png' },
|
|
64646
|
-
];
|
|
64647
64634
|
var StepStayAndShares = function (_a) {
|
|
64648
|
-
var tripProfile = _a.tripProfile, setTripProfile = _a.setTripProfile, bound = _a.bound, cities = _a.cities, setBound = _a.setBound, userCompanionQuestions = _a.userCompanionQuestions, userCompanions = _a.userCompanions, companionLoadingList = _a.companionLoadingList, callbackUserCompanionAdd = _a.callbackUserCompanionAdd;
|
|
64635
|
+
var tripProfile = _a.tripProfile, setTripProfile = _a.setTripProfile, bound = _a.bound, cities = _a.cities, setBound = _a.setBound, userCompanionQuestions = _a.userCompanionQuestions, userCompanions = _a.userCompanions, companionLoadingList = _a.companionLoadingList, callbackUserCompanionAdd = _a.callbackUserCompanionAdd, stayAndShareTips = _a.stayAndShareTips;
|
|
64649
64636
|
var _b = (0, react_1.useState)(stayAndShareTips[0]), tip = _b[0], setTip = _b[1];
|
|
64650
64637
|
(0, react_1.useEffect)(function () {
|
|
64651
64638
|
var currentCity = cities.find(function (city) { return city.id === tripProfile.cityId; });
|
|
@@ -67384,6 +67371,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
67384
67371
|
};
|
|
67385
67372
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67386
67373
|
exports.HourItem = void 0;
|
|
67374
|
+
/* eslint-disable react/no-array-index-key */
|
|
67387
67375
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
67388
67376
|
var react_1 = __importStar(__webpack_require__(0));
|
|
67389
67377
|
var moment_1 = __importDefault(__webpack_require__(1));
|
|
@@ -67407,7 +67395,7 @@ var OpenedHours = function (_a) {
|
|
|
67407
67395
|
var date = planDate ? (0, moment_1.default)(planDate).format('ddd') : (0, moment_1.default)().format('ddd');
|
|
67408
67396
|
var findToday = hours === null || hours === void 0 ? void 0 : hours.find(function (hour) { return hour.day === date; });
|
|
67409
67397
|
return (react_1.default.createElement("div", { className: OpenedHours_scss_1.default.openedHours },
|
|
67410
|
-
react_1.default.createElement("div", null, showHours ? hours.map(function (h) { return react_1.default.createElement(exports.HourItem, { hour: h, lineHeight: "35px" }); }) : react_1.default.createElement(exports.HourItem, { hour: findToday || hours[0] })),
|
|
67398
|
+
react_1.default.createElement("div", null, showHours ? hours.map(function (h, i) { return react_1.default.createElement(exports.HourItem, { key: "".concat(h.day, "-").concat(i), hour: h, lineHeight: "35px" }); }) : react_1.default.createElement(exports.HourItem, { hour: findToday || hours[0] })),
|
|
67411
67399
|
react_1.default.createElement("div", { className: OpenedHours_scss_1.default.exploreButton, role: "button", tabIndex: 0, onKeyPress: function () { }, onClick: function () { return setShowHours(!showHours); } }, showHours ? 'Close' : 'Explore')));
|
|
67412
67400
|
};
|
|
67413
67401
|
exports.default = OpenedHours;
|