@tripian/react 9.3.7 → 9.3.9
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.
|
@@ -19,6 +19,8 @@ interface IFormTemplateTripNext {
|
|
|
19
19
|
callbackUserCompanionAdd: (userCompoanion: Model.Companion) => void;
|
|
20
20
|
showTripModeQuestion?: boolean;
|
|
21
21
|
initialStep?: number;
|
|
22
|
+
startStep?: number;
|
|
23
|
+
onStepChange?: (stepId: number) => void;
|
|
22
24
|
stepHeaders: {
|
|
23
25
|
stepId: number;
|
|
24
26
|
header: string;
|
package/index.js
CHANGED
|
@@ -27481,12 +27481,12 @@ const DestinationSelect = ({ options, selectedOptionId, onSelectedOptionChange,
|
|
|
27481
27481
|
}
|
|
27482
27482
|
return null;
|
|
27483
27483
|
};
|
|
27484
|
-
const SafeText = ({ text }) => (react_1.default.createElement("span", { contentEditable: false, role: "presentation", suppressContentEditableWarning: true }, text.split(' ').map((part, i) => (
|
|
27484
|
+
const SafeText = ({ text }) => (react_1.default.createElement("span", { translate: "no", "data-nosnippet": true, contentEditable: false, role: "presentation", suppressContentEditableWarning: true }, text.split(' ').map((part, i) => (
|
|
27485
27485
|
// eslint-disable-next-line react/no-array-index-key
|
|
27486
|
-
react_1.default.createElement("span", { key: i },
|
|
27486
|
+
react_1.default.createElement("span", { key: i, translate: "no" },
|
|
27487
27487
|
part,
|
|
27488
|
-
|
|
27489
|
-
const formatOptionLabel = (option) => (react_1.default.createElement("div", { className: DestinationSelect_scss_1.default.optionLabel },
|
|
27488
|
+
' ')))));
|
|
27489
|
+
const formatOptionLabel = (option) => (react_1.default.createElement("div", { className: DestinationSelect_scss_1.default.optionLabel, translate: "no", "data-nosnippet": true },
|
|
27490
27490
|
react_1.default.createElement("div", { className: "h-6 w-6" },
|
|
27491
27491
|
react_1.default.createElement("svg", { viewBox: "0 0 24 24", width: "24", height: "24", stroke: "currentColor", strokeWidth: "2", fill: "none" },
|
|
27492
27492
|
react_1.default.createElement("path", { d: "M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z" }),
|
|
@@ -27561,7 +27561,7 @@ const DestinationSelect = ({ options, selectedOptionId, onSelectedOptionChange,
|
|
|
27561
27561
|
};
|
|
27562
27562
|
const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
|
|
27563
27563
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
27564
|
-
react_1.default.createElement("div", { className: "relative", style: {
|
|
27564
|
+
react_1.default.createElement("div", { className: "relative", translate: "no", "data-nosnippet": true, style: {
|
|
27565
27565
|
...(showSearchIcon ? { width: '100%' } : {}),
|
|
27566
27566
|
} },
|
|
27567
27567
|
react_1.default.createElement(react_select_1.default, { ref: selectRef, options: filteredOptions, value: selectedOption, onChange: handleChange, onInputChange: (value, meta) => {
|
|
@@ -80313,10 +80313,11 @@ const StepComponent_1 = __importDefault(__webpack_require__(872));
|
|
|
80313
80313
|
const StepDestination_1 = __importDefault(__webpack_require__(893));
|
|
80314
80314
|
const StepTravelerInfo_1 = __importDefault(__webpack_require__(895));
|
|
80315
80315
|
const Stepper_1 = __importDefault(__webpack_require__(903));
|
|
80316
|
-
const FormTemplateTripNext = ({ tripProfile, tripQuestions, cities, isTripEdit = false, callbackTripProfile, userCompanionQuestions, userCompanions, loadingCompanion, callbackUserCompanionAdd, showTripModeQuestion = false, initialStep, stepHeaders, destinationTips, questionDefaultTip, travelerInfoTips, onSubmitText, onSubmit, onCancel, t,
|
|
80316
|
+
const FormTemplateTripNext = ({ tripProfile, tripQuestions, cities, isTripEdit = false, callbackTripProfile, userCompanionQuestions, userCompanions, loadingCompanion, callbackUserCompanionAdd, showTripModeQuestion = false, initialStep, startStep, onStepChange, stepHeaders, destinationTips, questionDefaultTip, travelerInfoTips, onSubmitText, onSubmit, onCancel, t,
|
|
80317
80317
|
// AI suggestion props
|
|
80318
80318
|
showAiSuggestions, citySuggestions, onCitySuggestionsSearch, isCitySearching, onSelectSuggestedCity, onClearCitySuggestions, }) => {
|
|
80319
|
-
|
|
80319
|
+
var _a;
|
|
80320
|
+
const [stepId, setStepId] = (0, react_1.useState)((_a = startStep !== null && startStep !== void 0 ? startStep : initialStep) !== null && _a !== void 0 ? _a : -1);
|
|
80320
80321
|
const [bound, setBound] = (0, react_1.useState)();
|
|
80321
80322
|
const topRef = (0, react_1.useRef)(null);
|
|
80322
80323
|
// const tripModeQuestion = tripQuestions.find((question) => question.id === 19);
|
|
@@ -80371,6 +80372,12 @@ showAiSuggestions, citySuggestions, onCitySuggestionsSearch, isCitySearching, on
|
|
|
80371
80372
|
topRef.current.scrollIntoView({ behavior: 'smooth' });
|
|
80372
80373
|
}
|
|
80373
80374
|
}, [stepId]);
|
|
80375
|
+
// Step değiştiğinde callback çağır
|
|
80376
|
+
(0, react_1.useEffect)(() => {
|
|
80377
|
+
if (onStepChange) {
|
|
80378
|
+
onStepChange(stepId);
|
|
80379
|
+
}
|
|
80380
|
+
}, [stepId, onStepChange]);
|
|
80374
80381
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
80375
80382
|
react_1.default.createElement("div", { ref: topRef, className: FormTemplateTripNext_scss_1.default.stepsContainer },
|
|
80376
80383
|
react_1.default.createElement("div", { className: "hide-m" },
|