@tripian/react 6.0.0 → 6.0.2

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.
@@ -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<QuestionNext>;
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: QuestionNext;
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: QuestionNext[];
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;
@@ -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 { QuestionNext } from '../../FormTemplate/FormTemplateTripNext/model';
2
+ import Model from '@tripian/model';
3
3
  interface IQuestionContext {
4
- question: QuestionNext;
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 { QuestionNext } from '../FormTemplate/FormTemplateTripNext/model';
2
+ import Model from '@tripian/model';
3
3
  interface IQuestionTemplate {
4
- question: QuestionNext;
4
+ question: Model.Question;
5
5
  answers: Array<number>;
6
6
  callbackAnswers: (answers: Array<number>) => void;
7
7
  flexDirection?: 'column' | 'row';
@@ -11,6 +11,7 @@ interface IDropdown {
11
11
  selectChange: (value: string | number, index: number) => void;
12
12
  onFocus?: () => void;
13
13
  onBlur?: () => void;
14
+ skippable?: boolean;
14
15
  }
15
16
  declare const Dropdown: React.FC<IDropdown>;
16
17
  export default Dropdown;
package/index.js CHANGED
@@ -7418,8 +7418,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
7418
7418
  var react_1 = __importStar(__webpack_require__(0));
7419
7419
  var Dropdown_scss_1 = __importDefault(__webpack_require__(560));
7420
7420
  var Dropdown = function (_a) {
7421
- var id = _a.id, options = _a.options, defaultValue = _a.defaultValue, selectChange = _a.selectChange, onFocus = _a.onFocus, onBlur = _a.onBlur;
7422
- var _b = (0, react_1.useState)(defaultValue), selection = _b[0], setSelection = _b[1];
7421
+ var id = _a.id, options = _a.options, defaultValue = _a.defaultValue, selectChange = _a.selectChange, onFocus = _a.onFocus, onBlur = _a.onBlur, _b = _a.skippable, skippable = _b === void 0 ? false : _b;
7422
+ var _c = (0, react_1.useState)(defaultValue), selection = _c[0], setSelection = _c[1];
7423
7423
  var keyOptions = options.map(function (o) { return ({
7424
7424
  key: o.key || o.value,
7425
7425
  value: o.value,
@@ -7438,7 +7438,9 @@ var Dropdown = function (_a) {
7438
7438
  }, onBlur: function () {
7439
7439
  if (onBlur)
7440
7440
  onBlur();
7441
- } }, keyOptions.map(function (option) { return (react_1.default.createElement("option", { key: option.key, value: option.value }, option.label ? option.label : option.value)); }))));
7441
+ } },
7442
+ skippable && 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: { id: 0, skippable: false, selectMultiple: false, name: '', category: model_1.default.QUESTIONS_CATEGORY.TRIP, order: 0, answers: [{ id: 0, name: '', subAnswers: [] }] },
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,15 +63824,17 @@ 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));
63831
63831
  var StepComponent = function (_a) {
63832
- var header = _a.header, defaultTip = _a.defaultTip, stepQuestions = _a.stepQuestions, stepId = _a.stepId, tripProfile = _a.tripProfile, callbackTripAnswers = _a.callbackTripAnswers;
63832
+ var /* header, */ defaultTip = _a.defaultTip, stepQuestions = _a.stepQuestions, /* stepId, */ tripProfile = _a.tripProfile, callbackTripAnswers = _a.callbackTripAnswers;
63833
63833
  var _b = (0, react_1.useState)(defaultTip), tip = _b[0], setTip = _b[1];
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,
@@ -64336,6 +64337,8 @@ var Question2 = function (_a) {
64336
64337
  var _b, _c;
64337
64338
  var changed = _a.changed, flexDirection = _a.flexDirection;
64338
64339
  var _d = (0, react_1.useContext)(QuestionContext2_1.default), questions = _d.questions, defaultAnswers = _d.defaultAnswers;
64340
+ var defaultAnswer1 = (_b = questions[0].answers.find(function (option) { return defaultAnswers.includes(option.id); })) === null || _b === void 0 ? void 0 : _b.id;
64341
+ var defaultAnswer2 = (_c = questions[1].answers.find(function (option) { return defaultAnswers.includes(option.id); })) === null || _c === void 0 ? void 0 : _c.id;
64339
64342
  var selectionChanged = function (addedOptionId, removedOptionId) {
64340
64343
  var newAnswers = __spreadArray([], defaultAnswers, true);
64341
64344
  if (removedOptionId) {
@@ -64345,13 +64348,11 @@ var Question2 = function (_a) {
64345
64348
  newAnswers.push(addedOptionId);
64346
64349
  changed(newAnswers);
64347
64350
  };
64348
- var defaultAnswer1 = (_b = questions[0].answers.find(function (option) { return defaultAnswers.includes(option.id); })) === null || _b === void 0 ? void 0 : _b.id;
64349
- var defaultAnswer2 = (_c = questions[1].answers.find(function (option) { return defaultAnswers.includes(option.id); })) === null || _c === void 0 ? void 0 : _c.id;
64350
64351
  return (react_1.default.createElement(react_1.default.Fragment, null,
64351
64352
  react_1.default.createElement("h3", { className: "mt10 mb6" }, "What type of restaurants do you prefer?"),
64352
- react_1.default.createElement("h4", { className: "mb4" }, "Lunch/Brunch"),
64353
+ react_1.default.createElement("h4", { className: "my2" }, "Lunch/Brunch"),
64353
64354
  react_1.default.createElement(SelectQuestion_1.default, { question: questions[0], defaultAnswer: defaultAnswer1, selectionChanged: selectionChanged, flexDirection: flexDirection }),
64354
- react_1.default.createElement("h4", { className: "mb4" }, "Dinner"),
64355
+ react_1.default.createElement("h4", { className: "my2" }, "Dinner"),
64355
64356
  react_1.default.createElement(SelectQuestion_1.default, { question: questions[1], defaultAnswer: defaultAnswer2, selectionChanged: selectionChanged, flexDirection: flexDirection })));
64356
64357
  };
64357
64358
  exports.default = Question2;
@@ -64395,7 +64396,7 @@ var Dropdown_1 = __importDefault(__webpack_require__(25));
64395
64396
  var SelectQuestion = function (_a) {
64396
64397
  var question = _a.question, defaultAnswer = _a.defaultAnswer, selectionChanged = _a.selectionChanged, flexDirection = _a.flexDirection;
64397
64398
  var _b = (0, react_1.useState)(defaultAnswer), answer = _b[0], setAnswer = _b[1];
64398
- var handleChange = function (value, index) {
64399
+ var handleChange = function (value) {
64399
64400
  var removedOptionId = answer;
64400
64401
  var addedOptionId = Number(value);
64401
64402
  selectionChanged(addedOptionId, removedOptionId);
@@ -64403,7 +64404,7 @@ var SelectQuestion = function (_a) {
64403
64404
  };
64404
64405
  return (react_1.default.createElement(react_1.default.Fragment, null,
64405
64406
  react_1.default.createElement("div", { style: flexDirection === 'column' ? { display: 'flex', flexDirection: 'column' } : undefined },
64406
- react_1.default.createElement(Dropdown_1.default, { defaultValue: defaultAnswer, options: question.answers.map(function (option) { return ({ value: option.id, label: option.name }); }), selectChange: handleChange }))));
64407
+ react_1.default.createElement(Dropdown_1.default, { defaultValue: defaultAnswer, options: question.answers.map(function (option) { return ({ value: option.id, label: option.name }); }), selectChange: handleChange, skippable: question.skippable }))));
64407
64408
  };
64408
64409
  exports.default = SelectQuestion;
64409
64410
 
@@ -64457,21 +64458,14 @@ var model_1 = __webpack_require__(4);
64457
64458
  var moment_1 = __importDefault(__webpack_require__(1));
64458
64459
  var react_1 = __importStar(__webpack_require__(0));
64459
64460
  var Dropdown_1 = __importDefault(__webpack_require__(25));
64461
+ // import Header from '../../../base/Header/Header';
64460
64462
  var InfoBox_1 = __importDefault(__webpack_require__(105));
64461
64463
  var Required_1 = __importDefault(__webpack_require__(345));
64462
64464
  var RSelect_1 = __importDefault(__webpack_require__(33));
64463
64465
  var DateRangePicker_1 = __importDefault(__webpack_require__(62));
64464
64466
  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
64467
  var StepDestination = function (_a) {
64474
- var tripProfile = _a.tripProfile, cities = _a.cities, setTripProfile = _a.setTripProfile, isTripEdit = _a.isTripEdit;
64468
+ var tripProfile = _a.tripProfile, cities = _a.cities, setTripProfile = _a.setTripProfile, isTripEdit = _a.isTripEdit, destinationTips = _a.destinationTips;
64475
64469
  var _b = (0, react_1.useState)(destinationTips[0]), tip = _b[0], setTip = _b[1];
64476
64470
  var startTimeOptions = (0, react_1.useMemo)(function () {
64477
64471
  var sameDay = tripProfile.arrivalDatetime.split('T')[0] === tripProfile.departureDatetime.split('T')[0];
@@ -64530,10 +64524,11 @@ var StepDestination = function (_a) {
64530
64524
  setTripProfile(newTripProfile);
64531
64525
  };
64532
64526
  var callbackCitySelect = function (selectedOption) {
64527
+ var _a;
64533
64528
  var newTripProfile = model_1.helper.deepCopy(tripProfile);
64534
64529
  if (selectedOption) {
64535
64530
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
64536
- newTripProfile.cityId = selectedOption.payload.id;
64531
+ newTripProfile.cityId = (_a = selectedOption.payload) === null || _a === void 0 ? void 0 : _a.id;
64537
64532
  // newTripProfile.accommodation = null;
64538
64533
  setTripProfile(newTripProfile);
64539
64534
  }
@@ -64635,17 +64630,10 @@ var model_1 = __webpack_require__(4);
64635
64630
  var NumberCounter_1 = __importDefault(__webpack_require__(665));
64636
64631
  var GPlacesAutocomplete2_1 = __importDefault(__webpack_require__(103));
64637
64632
  var UserCompanionSelection_1 = __importDefault(__webpack_require__(104));
64633
+ // import Header from '../../../base/Header/Header';
64638
64634
  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
64635
  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;
64636
+ 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
64637
  var _b = (0, react_1.useState)(stayAndShareTips[0]), tip = _b[0], setTip = _b[1];
64650
64638
  (0, react_1.useEffect)(function () {
64651
64639
  var currentCity = cities.find(function (city) { return city.id === tripProfile.cityId; });
@@ -67384,6 +67372,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
67384
67372
  };
67385
67373
  Object.defineProperty(exports, "__esModule", { value: true });
67386
67374
  exports.HourItem = void 0;
67375
+ /* eslint-disable react/no-array-index-key */
67387
67376
  /* eslint-disable import/no-extraneous-dependencies */
67388
67377
  var react_1 = __importStar(__webpack_require__(0));
67389
67378
  var moment_1 = __importDefault(__webpack_require__(1));
@@ -67407,7 +67396,7 @@ var OpenedHours = function (_a) {
67407
67396
  var date = planDate ? (0, moment_1.default)(planDate).format('ddd') : (0, moment_1.default)().format('ddd');
67408
67397
  var findToday = hours === null || hours === void 0 ? void 0 : hours.find(function (hour) { return hour.day === date; });
67409
67398
  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] })),
67399
+ 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
67400
  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
67401
  };
67413
67402
  exports.default = OpenedHours;