@tripian/react 7.1.8 → 7.2.0

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 CHANGED
@@ -74133,8 +74133,9 @@ var drivingPathLine = {
74133
74133
  strokeOpacity: 1,
74134
74134
  };
74135
74135
  var directionsRendererDefaults = {
74136
- suppressMarkers: true, // Dont add markers to route,
74136
+ suppressMarkers: true,
74137
74137
  // preserveViewport: true, // Dont set map boundry to route
74138
+ suppressBicyclingLayer: true,
74138
74139
  };
74139
74140
  var directionsRendererWalking = __assign(__assign({}, directionsRendererDefaults), { polylineOptions: walkingPathLine });
74140
74141
  var directionsRendererCycling = __assign(__assign({}, directionsRendererDefaults), { polylineOptions: cyclingPathLine });
@@ -76487,6 +76488,7 @@ var GygTourOption = function (_a) {
76487
76488
  var tourOption = _a.tourOption, availabilities = _a.availabilities, priceTotal = _a.priceTotal, adultCount = _a.adultCount, childrenCount = _a.childrenCount, bookingRequestCallback = _a.bookingRequestCallback;
76488
76489
  var _c = (0, react_1.useState)(tourOption.booking_parameter), bookingParameters = _c[0], setBookingParameters = _c[1];
76489
76490
  var _d = (0, react_1.useState)(availabilities[0].start_time), startingTime = _d[0], setStartingTime = _d[1];
76491
+ var _e = (0, react_1.useState)(), languageOption = _e[0], setLanguageOption = _e[1];
76490
76492
  var totalPrice = priceTotal;
76491
76493
  var savingRate = (_b = tourOption.price.values.special) === null || _b === void 0 ? void 0 : _b.savings;
76492
76494
  if (savingRate) {
@@ -76524,6 +76526,18 @@ var GygTourOption = function (_a) {
76524
76526
  languageOptionArray_1.push({ type: 'language_live', language: lo, label: "".concat(((_a = isoLanguages_1.default.find(function (iso) { return iso.code === lo; })) === null || _a === void 0 ? void 0 : _a.name) || '', "(Live)") });
76525
76527
  });
76526
76528
  }
76529
+ var bookingParametersIndex = bookingParameters.findIndex(function (bp) { return bp.value_1 || bp.value_2; });
76530
+ if (bookingParametersIndex < 0) {
76531
+ var newBookingParameters = model_1.helper.deepCopy(bookingParameters);
76532
+ newBookingParameters[0] = {
76533
+ mandatory: tourOption.booking_parameter[0].mandatory,
76534
+ value_1: languageOptionArray_1[0].type,
76535
+ value_2: languageOptionArray_1[0].language,
76536
+ name: 'language',
76537
+ };
76538
+ setLanguageOption(languageOptionArray_1[0].language);
76539
+ setBookingParameters(newBookingParameters);
76540
+ }
76527
76541
  return (react_1.default.createElement("div", null, tourOption.booking_parameter.map(function (bp, index) {
76528
76542
  var _a;
76529
76543
  if (bp.name === 'language') {
@@ -76535,7 +76549,7 @@ var GygTourOption = function (_a) {
76535
76549
  react_1.default.createElement(RSelect_1.default, { options: languageOptionArray_1.map(function (lg) { return ({
76536
76550
  value: lg.language,
76537
76551
  label: lg.label,
76538
- }); }), onSelectedOptionChange: function (selectedOption) {
76552
+ }); }), selectedOptionValue: languageOption, onSelectedOptionChange: function (selectedOption) {
76539
76553
  var newBookingParameters = model_1.helper.deepCopy(bookingParameters);
76540
76554
  newBookingParameters[index] = {
76541
76555
  mandatory: bp.mandatory,
@@ -76543,6 +76557,7 @@ var GygTourOption = function (_a) {
76543
76557
  value_2: selectedOption.value,
76544
76558
  name: 'language',
76545
76559
  };
76560
+ setLanguageOption(selectedOption.value);
76546
76561
  setBookingParameters(newBookingParameters);
76547
76562
  } })));
76548
76563
  }