kupos-ui-components-lib 10.4.8 → 10.4.10
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/dist/components/ServiceItem/PeruServiceItemDesktop.js +4 -4
- package/dist/components/ServiceItem/PeruServiceItemMobile.d.ts +7 -0
- package/dist/components/ServiceItem/PeruServiceItemMobile.js +233 -0
- package/dist/components/ServiceItem/ServiceItemDesktop.js +4 -4
- package/dist/components/ServiceItem/ServiceItemMobile.d.ts +1 -1
- package/dist/components/ServiceItem/ServiceItemMobile.js +3 -2
- package/dist/components/ServiceItem/mobileTypes.d.ts +1 -0
- package/dist/styles.css +9 -3
- package/dist/ui/FeatureServiceUI/FeatureServiceUi.js +2 -2
- package/dist/ui/PaymentCardMobile/PaymentCardMobile.d.ts +4 -0
- package/dist/ui/PaymentCardMobile/PaymentCardMobile.js +531 -0
- package/dist/ui/PaymentCardMobile/index.d.ts +1 -0
- package/dist/ui/PaymentCardMobile/index.js +1 -0
- package/dist/ui/PeruOfferBanner.d.ts +24 -0
- package/dist/ui/PeruOfferBanner.js +94 -0
- package/dist/ui/SeatSection/PeruSeatSection.d.ts +22 -0
- package/dist/ui/SeatSection/PeruSeatSection.js +247 -0
- package/dist/ui/SlidingModal/SlidingModal.d.ts +9 -0
- package/dist/ui/SlidingModal/SlidingModal.js +100 -0
- package/dist/ui/SlidingModal/index.d.ts +2 -0
- package/dist/ui/SlidingModal/index.js +1 -0
- package/dist/ui/mobileweb/SeatSectionMobile.js +15 -1
- package/package.json +1 -1
- package/src/components/ServiceItem/PeruServiceItemDesktop.tsx +7 -6
- package/src/components/ServiceItem/PeruServiceItemMobile.tsx +596 -0
- package/src/components/ServiceItem/ServiceItemDesktop.tsx +2 -2
- package/src/components/ServiceItem/ServiceItemMobile.tsx +44 -1
- package/src/components/ServiceItem/mobileTypes.ts +1 -0
- package/src/ui/FeatureServiceUI/FeatureServiceUi.tsx +2 -2
- package/src/ui/PeruOfferBanner.tsx +298 -0
- package/src/ui/SeatSection/PeruSeatSection.tsx +487 -0
- package/src/ui/mobileweb/SeatSectionMobile.tsx +46 -1
|
@@ -25,10 +25,10 @@ import DurationBlock from "../../ui/DurationBlock";
|
|
|
25
25
|
import PetBlock from "../../ui/PetBlock";
|
|
26
26
|
import FlexibleBlock from "../../ui/FlexibleBlock";
|
|
27
27
|
import AmenitiesBlock from "../../ui/AmenitiesBlock";
|
|
28
|
-
import
|
|
28
|
+
import PeruSeatSection from "../../ui/SeatSection/PeruSeatSection";
|
|
29
29
|
import KuposButton from "../../ui/KuposButton/KuposButton";
|
|
30
30
|
import BottomAmenities from "../../ui/BottomAmenities/BottomAmenities";
|
|
31
|
-
import
|
|
31
|
+
import PeruOfferBanner from "../../ui/PeruOfferBanner";
|
|
32
32
|
import ServiceBadges from "../../ui/ServiceBadges/ServiceBadges";
|
|
33
33
|
const SEAT_EXCEPTIONS = ["Asiento mascota"];
|
|
34
34
|
const ANIMATION_MAP = {
|
|
@@ -396,7 +396,7 @@ function PeruServiceItemDesktop({ serviceItem, onBookButtonPress, colors, metaDa
|
|
|
396
396
|
showTopLabel
|
|
397
397
|
? "mt-[30px]"
|
|
398
398
|
: "mt-[20px]"} ` },
|
|
399
|
-
((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) || hasDpEnabled) && !isSoldOut && (React.createElement(
|
|
399
|
+
((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) || hasDpEnabled) && !isSoldOut && (React.createElement(PeruOfferBanner, { offerGradient: offerGradient, isSoldOut: isSoldOut, serviceItem: serviceItem, renderIcon: renderIcon, isLoggedIn: isLoggedIn, showLoginModal: showLoginModal, viewersConfig: viewersConfig, getAnimationIcon: getAnimationIcon, showLoginOption: showLoginOption, colors: colors, coachKey: coachKey, isExpand: isExpand, isNewUiEnabled: isNewUiEnabled })),
|
|
400
400
|
React.createElement("div", { id: `service-card-${serviceItem.id}`, className: `bg-white mx-auto relative ${((hasOfferText && isNewUiEnabled) || hasDpEnabled) && !isSoldOut
|
|
401
401
|
? "z-[3] rounded-[18px]"
|
|
402
402
|
: "rounded-[10px] border border-[#ccc]"}`, style: serviceCardStyle },
|
|
@@ -458,7 +458,7 @@ function PeruServiceItemDesktop({ serviceItem, onBookButtonPress, colors, metaDa
|
|
|
458
458
|
margin: "auto",
|
|
459
459
|
} }),
|
|
460
460
|
React.createElement("div", { className: "content-center" },
|
|
461
|
-
React.createElement(
|
|
461
|
+
React.createElement(PeruSeatSection, { seatTypes: serviceItem.seat_types, serviceItem: serviceItem, availableSeats: serviceItem.available_seats, isSoldOut: isSoldOut, priceColor: colors.priceColor, currencySign: currencySign, removeDuplicateSeats: removeDuplicateSeats, renderIcon: renderIcon, discountSeatPriceColor: colors.discountSeatPriceColor, isSeatIcon: isSeatIcon })),
|
|
462
462
|
React.createElement("div", { className: "relative" },
|
|
463
463
|
React.createElement(KuposButton, { isSoldOut: isSoldOut, isLoading: serviceDetailsLoading, buttonColor: colors.kuposButtonColor, buyLabel: translation === null || translation === void 0 ? void 0 : translation.buyButton, soldOutLabel: translation === null || translation === void 0 ? void 0 : translation.soldOutButton, soldOutIcon: renderIcon("soldOutIcon", "14px"), onClick: checkMidnight }),
|
|
464
464
|
showLastSeats ? (React.createElement("div", { className: "flex justify-center mr-[11px] w-[100%] right-[0px] absolute left-[0] top-[36px]" }, (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) < 10 &&
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { MobileServiceItemProps } from "./mobileTypes";
|
|
3
|
+
interface PeruServiceItemMobileProps extends Omit<MobileServiceItemProps, 'isNewUi'> {
|
|
4
|
+
isNewUiEnabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare function PeruServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, orignLabel, destinationLabel, amenitiesData, setShowDropdown, showDropdown, isExpanded, setIsExpanded, setAmenetiesAtomValue, isCiva, currencySign, isPeru, showRating, showLastSeats, removeDuplicateSeats, isLinatal, viewersConfig, operatorLabel, isTrain, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, cityOrigin, cityDestination, isNewUiEnabled, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData, isFlores, isAllinBus, }: PeruServiceItemMobileProps): React.ReactElement;
|
|
7
|
+
export default PeruServiceItemMobile;
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import LottiePlayer from "../../assets/LottiePlayer";
|
|
3
|
+
import commonService from "../../utils/CommonService";
|
|
4
|
+
import BottomAmenitiesMobile from "../../ui/mobileweb/BottomAmenitiesMobile";
|
|
5
|
+
import DateTimeSectionMobile from "../../ui/mobileweb/DateTimeSectionMobile";
|
|
6
|
+
import ExpandedDropdownMobile from "../../ui/mobileweb/ExpandedDropdownMobile";
|
|
7
|
+
import ServiceBadgesMobile from "../../ui/mobileweb/ServiceBadgesMobile";
|
|
8
|
+
const SEAT_EXCEPTIONS = ["Asiento mascota"];
|
|
9
|
+
const exceptions = [
|
|
10
|
+
"gy",
|
|
11
|
+
".gy",
|
|
12
|
+
"GY",
|
|
13
|
+
".GY",
|
|
14
|
+
"Gy",
|
|
15
|
+
".Gy",
|
|
16
|
+
"BLANCO",
|
|
17
|
+
"blanco",
|
|
18
|
+
"asiento_mascota",
|
|
19
|
+
];
|
|
20
|
+
function PeruServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, orignLabel, destinationLabel, amenitiesData, setShowDropdown, showDropdown, isExpanded, setIsExpanded, setAmenetiesAtomValue, isCiva, currencySign, isPeru, showRating, showLastSeats, removeDuplicateSeats, isLinatal, viewersConfig, operatorLabel, isTrain, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, cityOrigin, cityDestination, isNewUiEnabled, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData, isFlores, isAllinBus, }) {
|
|
21
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
22
|
+
const isItemExpanded = serviceItem.id === isExpanded;
|
|
23
|
+
const isPetSeat = (Object.keys((_a = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.pet_seat_info) !== null && _a !== void 0 ? _a : {}) || []).length > 0;
|
|
24
|
+
let isSoldOut = serviceItem.available_seats <= 0;
|
|
25
|
+
const seats = removeDuplicateSeats
|
|
26
|
+
? ((_b = serviceItem.seat_types) === null || _b === void 0 ? void 0 : _b.filter((seat, index, self) => index === self.findIndex((s) => s.label === seat.label))) || []
|
|
27
|
+
: serviceItem.seat_types || [];
|
|
28
|
+
const discountedSeats = seats.map((seat) => (Object.assign(Object.assign({}, seat), commonService.calculateDiscountedPrice(seat.fare, serviceItem))));
|
|
29
|
+
const hasDiscount = discountedSeats.some((seat) => seat.originalPrice !== seat.discountedPrice);
|
|
30
|
+
const isLongOfferText = (((_c = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) === null || _c === void 0 ? void 0 : _c.length) || 0) > 35;
|
|
31
|
+
const hasDpEnabled = (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) === true;
|
|
32
|
+
const isDiscountBelow20 = (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.discount_value) > 0 && (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.discount_value) < 20;
|
|
33
|
+
const hasOfferText = Boolean(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) && !isDiscountBelow20;
|
|
34
|
+
const offerGradient = `linear-gradient(90deg, ${colors.rightGradiantColor || "#ff5964"} 0%, ${colors.leftGradiantColor || "#ff8842"} 100%)`;
|
|
35
|
+
const offerGradientWithOpacity = `linear-gradient(90deg, ${colors.rightGradiantColor || "#ff5964"}80 0%, ${colors.leftGradiantColor || "#ff8842"}80 100%)`;
|
|
36
|
+
const serviceCardStyle = (isNewUiEnabled || ((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) && (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.dp_discount_percents)))
|
|
37
|
+
? {
|
|
38
|
+
borderColor: isSoldOut ? "#ccc" : "transparent",
|
|
39
|
+
borderStyle: "solid",
|
|
40
|
+
borderWidth: isSoldOut ? "1px" : "3px 3px 0 3px",
|
|
41
|
+
borderRadius: "18px",
|
|
42
|
+
background: `linear-gradient(#fff, #fff) padding-box, ${isSoldOut ? offerGradientWithOpacity : offerGradient} border-box`,
|
|
43
|
+
}
|
|
44
|
+
: {};
|
|
45
|
+
const labelId = typeof serviceItem.boarding_stages === "string"
|
|
46
|
+
? serviceItem.boarding_stages.split("|")[0]
|
|
47
|
+
: "";
|
|
48
|
+
const showTopLabel = busStage &&
|
|
49
|
+
busStage[labelId] &&
|
|
50
|
+
busStage[labelId].split("|")[1] === "true" &&
|
|
51
|
+
busStage[labelId].split("|")[0];
|
|
52
|
+
const getServiceStars = (serviceItem) => {
|
|
53
|
+
try {
|
|
54
|
+
return serviceItem.operator_details && serviceItem.operator_details[1]
|
|
55
|
+
? serviceItem.operator_details[1].toFixed(1)
|
|
56
|
+
: "0.0";
|
|
57
|
+
}
|
|
58
|
+
catch (e) {
|
|
59
|
+
return "";
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
const amenities = () => {
|
|
63
|
+
var _a;
|
|
64
|
+
const raw = (_a = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.operator_details) === null || _a === void 0 ? void 0 : _a[3];
|
|
65
|
+
const list = Array.isArray(raw)
|
|
66
|
+
? raw
|
|
67
|
+
: typeof raw === "string"
|
|
68
|
+
? raw.split("|").filter(Boolean)
|
|
69
|
+
: [];
|
|
70
|
+
const nodes = list.slice(0, 2).map((am, i) => {
|
|
71
|
+
var _a;
|
|
72
|
+
return (React.createElement("img", { key: i, className: "amenity", height: 12, width: 12, src: commonService.getAmenitiesImage((_a = amenitiesData === null || amenitiesData === void 0 ? void 0 : amenitiesData[am]) === null || _a === void 0 ? void 0 : _a.toLowerCase(), serviceItem), alt: "icon" }));
|
|
73
|
+
});
|
|
74
|
+
return nodes;
|
|
75
|
+
};
|
|
76
|
+
const renderIcon = (iconKey, size = "14px", styles) => {
|
|
77
|
+
var _a;
|
|
78
|
+
const iconValue = (_a = serviceItem.icons) === null || _a === void 0 ? void 0 : _a[iconKey];
|
|
79
|
+
if (iconValue) {
|
|
80
|
+
if (typeof iconValue === "string") {
|
|
81
|
+
return (React.createElement("img", { src: iconValue, alt: iconKey, className: `${`w-[${size}] h-[${size}]`} mr-[5px]`, style: Object.assign({ filter: isSoldOut ? "grayscale" : "" }, (styles || {})) }));
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return null;
|
|
85
|
+
};
|
|
86
|
+
let isConexion = false;
|
|
87
|
+
if (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_transpordo) {
|
|
88
|
+
isConexion = true;
|
|
89
|
+
}
|
|
90
|
+
const extractStage = (stageArr, index) => {
|
|
91
|
+
const stageObj = stageArr[index];
|
|
92
|
+
const key = Object.keys(stageObj)[0];
|
|
93
|
+
return stageObj[key][0].split(", ")[0];
|
|
94
|
+
};
|
|
95
|
+
const boardingName = ((_d = serviceItem.stage_details_arr) === null || _d === void 0 ? void 0 : _d.length)
|
|
96
|
+
? extractStage(serviceItem.stage_details_arr, 0)
|
|
97
|
+
: null;
|
|
98
|
+
const dropoffName = ((_e = serviceItem.stage_details_arr) === null || _e === void 0 ? void 0 : _e.length)
|
|
99
|
+
? extractStage(serviceItem.stage_details_arr, 1)
|
|
100
|
+
: null;
|
|
101
|
+
return (React.createElement("div", { className: `relative ${!hasOfferText || !(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) ? "mb-[14px]" : showTopLabel || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ? "mb-[20px]" : "mb-[12px]"} ${(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ||
|
|
102
|
+
isConexion ||
|
|
103
|
+
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.train_type_label) === "Tren Express (Nuevo)" ||
|
|
104
|
+
showTopLabel ||
|
|
105
|
+
boardingName
|
|
106
|
+
? "mt-[20px]"
|
|
107
|
+
: "mt-[10px]"} `, style: { zIndex: 1 } },
|
|
108
|
+
React.createElement("div", { className: `z-1 ${(isNewUiEnabled ||
|
|
109
|
+
((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) && (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.dp_discount_percents))) &&
|
|
110
|
+
!isSoldOut
|
|
111
|
+
? "rounded-[18px]"
|
|
112
|
+
: "rounded-[10px] border border-[#ccc]"}`, style: Object.assign(Object.assign({}, serviceCardStyle), { backgroundColor: "#fff" }) },
|
|
113
|
+
React.createElement("div", { style: {
|
|
114
|
+
padding: "12px 12px 8px 12px",
|
|
115
|
+
marginTop: (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) && (showTopLabel || isConexion)
|
|
116
|
+
? " 10px"
|
|
117
|
+
: "",
|
|
118
|
+
} },
|
|
119
|
+
React.createElement("div", { className: "flex justify-between items-center mb-[10px]" },
|
|
120
|
+
React.createElement("div", { className: "flex items-center justify-center gap-x-4", style: {
|
|
121
|
+
marginBottom: (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) || hasDiscount ? "10px" : "",
|
|
122
|
+
} },
|
|
123
|
+
React.createElement("div", { className: `w-[115px] ${isFlores ? "" : "overflow-y-hidden"} h-[30px]` },
|
|
124
|
+
React.createElement("img", { src: serviceItem.operator_details[0], alt: "service logo", className: `w-[100px] h-auto object-contain ${isSoldOut ? "grayscale" : ""}` })),
|
|
125
|
+
isCiva ? (React.createElement("div", { className: "black-text min-[420]:text-[12px] text-[12px]" }, serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.operator_details[2])) : showRating ? (React.createElement("div", { className: "flex min-[420]:text-[13px] text-[12px] h-[22px] items-center" },
|
|
126
|
+
React.createElement("div", { className: "flex items-center" },
|
|
127
|
+
React.createElement("div", { className: "flex items-center" },
|
|
128
|
+
React.createElement("img", { src: serviceItem.icons.rating, alt: "origin", className: `w-[12px] h-[12px] mr-[4px] object-contain ${isSoldOut ? "grayscale" : ""}` }),
|
|
129
|
+
React.createElement("span", { style: { lineHeight: "normal" } }, getServiceStars(serviceItem))),
|
|
130
|
+
React.createElement("div", { className: "flex items-center cursor-pointer ", style: {
|
|
131
|
+
color: isSoldOut ? "#bbb" : "text-[#464647]",
|
|
132
|
+
} },
|
|
133
|
+
React.createElement("span", { className: "ml-[3px] min-[420]:text-[13px] text-[12px] text-ellipsis overflow-hidden whitespace-nowrap max-w-[120px]" }, serviceItem.operator_details[2]))))) : null)),
|
|
134
|
+
React.createElement(DateTimeSectionMobile, { onBookButtonPress: onBookButtonPress, isCiva: isCiva, isSoldOut: isSoldOut, isLinatal: isLinatal, isPeru: isPeru, orignLabel: orignLabel, destinationLabel: destinationLabel, originIcon: (_f = serviceItem.icons) === null || _f === void 0 ? void 0 : _f.origin, destinationIcon: (_g = serviceItem.icons) === null || _g === void 0 ? void 0 : _g.destination, travelDate: serviceItem.travel_date, arrivalDate: serviceItem.arrival_date, depTime: serviceItem.dep_time, arrTime: serviceItem.arr_time, seatTypes: serviceItem.seat_types, seatPriceColor: colors.seatPriceColor, tooltipBgColor: colors.tooltipBgColor, currencySign: currencySign, availableSeats: serviceItem.available_seats, removeDuplicateSeats: removeDuplicateSeats, serviceItem: serviceItem, showLastSeats: showLastSeats, discountSeatPriceColor: colors.discountSeatPriceColor, isTrain: isTrain }),
|
|
135
|
+
hasDiscount && (React.createElement("div", { className: "flex justify-end" }, isSoldOut ? (React.createElement("span", { className: "col-span-2 min-[420]:text-[13px] text-right text-[12px] text-[#ccc]" }, "Agotado")) : null)),
|
|
136
|
+
showLastSeats ? (React.createElement("div", { className: "flex justify-end " }, (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) < 10 &&
|
|
137
|
+
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) > 0 && (React.createElement("div", { className: "text-[10px] text-center", style: {
|
|
138
|
+
color: colors.tooltipBgColor,
|
|
139
|
+
} }, "\u00A1\u00DAltimos Asientos!")))) : null,
|
|
140
|
+
React.createElement("div", { className: "bg-[#E6E6E6] mt-[10px] mb-[8px] h-[1px]" }),
|
|
141
|
+
React.createElement(BottomAmenitiesMobile, { isSoldOut: isSoldOut, amenitiesNodes: amenities(), hoursIcon: renderIcon("hours", "14px"), duration: (_h = serviceItem.duration) === null || _h === void 0 ? void 0 : _h.toString(), isDirectTrip: serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip, directoColor: colors.directoColor, directoAnim: (_j = serviceItem.icons) === null || _j === void 0 ? void 0 : _j.directoAnim, isChangeTicket: serviceItem.is_change_ticket, isPetSeat: isPetSeat, petSeatInfo: serviceItem.pet_seat_info, petFriendlyAnim: (_k = serviceItem.icons) === null || _k === void 0 ? void 0 : _k.petFriendlyAnim, flexibleAnim: (_l = serviceItem.icons) === null || _l === void 0 ? void 0 : _l.flexibleAnim, isTrackingEnabled: serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_tracking_enabled, locationAnim: (_m = serviceItem.icons) === null || _m === void 0 ? void 0 : _m.locationAnim, downArrowIcon: (_o = serviceItem.icons) === null || _o === void 0 ? void 0 : _o.downArrow, showDropdown: isItemExpanded, setShowDropdown: () => setIsExpanded && setIsExpanded(isItemExpanded ? null : serviceItem.id), onDropdownToggle: () => {
|
|
142
|
+
setIsExpanded && setIsExpanded(isItemExpanded ? null : serviceItem.id);
|
|
143
|
+
}, isPeru: isPeru, femaleAnim: (_p = serviceItem.icons) === null || _p === void 0 ? void 0 : _p.femaleAnim, ladiesBookedSeats: serviceItem.ladies_booked_seats, isDpEnabled: serviceItem.is_dp_enabled, isTrain: isTrain })),
|
|
144
|
+
React.createElement(ServiceBadgesMobile, { showTopLabel: showTopLabel, isSoldOut: isSoldOut, colors: colors, renderIcon: renderIcon, serviceItem: serviceItem, isConexion: isConexion, isAllinBus: isAllinBus, boardingName: boardingName !== null && boardingName !== void 0 ? boardingName : undefined })),
|
|
145
|
+
hasOfferText &&
|
|
146
|
+
!isNewUiEnabled &&
|
|
147
|
+
!isSoldOut &&
|
|
148
|
+
!(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) && (React.createElement("div", { className: "px-[12px] pt-[22px] pb-[8px] relative -z-9 -mt-[15px]", style: {
|
|
149
|
+
background: colors === null || colors === void 0 ? void 0 : colors.bottomStripColor,
|
|
150
|
+
borderRadius: "0 0 14px 14px",
|
|
151
|
+
zIndex: -1,
|
|
152
|
+
} },
|
|
153
|
+
React.createElement("div", { className: "flex flex-col gap-[8px] text-[12px] min-[420px]:text-[12px] text-[#464647]", style: { lineHeight: 1.6 } },
|
|
154
|
+
React.createElement("div", { className: "flex justify-between items-center" },
|
|
155
|
+
React.createElement("div", { className: `flex ${((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) || "").length > 10 ? "items-start" : "items-center"}` },
|
|
156
|
+
React.createElement("div", { className: isLongOfferText ? "mt-[2px]" : "" },
|
|
157
|
+
React.createElement(LottiePlayer, { animationData: (_q = serviceItem.icons) === null || _q === void 0 ? void 0 : _q.promoAnim, width: "14px", height: "14px" })),
|
|
158
|
+
React.createElement("div", { className: `ml-[4px] flex-1 outline-none ${isLongOfferText ? "mt-[2px]" : ""}`, style: {
|
|
159
|
+
color: "#fff",
|
|
160
|
+
lineHeight: 1.4,
|
|
161
|
+
} },
|
|
162
|
+
React.createElement("span", { className: "whitespace-nowrap min-[380px]:text-[12px]" }, serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text))))))),
|
|
163
|
+
(isNewUiEnabled || ((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) && (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.dp_discount_percents))) && !isSoldOut && (React.createElement("div", { className: "px-[12px] pt-[22px] pb-[8px] relative -z-9 -mt-[15px]", style: {
|
|
164
|
+
background: isSoldOut
|
|
165
|
+
? offerGradientWithOpacity
|
|
166
|
+
: offerGradient,
|
|
167
|
+
borderRadius: "0 0 14px 14px",
|
|
168
|
+
zIndex: -1,
|
|
169
|
+
} },
|
|
170
|
+
React.createElement("div", { className: "flex flex-col gap-[8px] text-[12px] min-[420px]:text-[12px] text-[#464647]", style: { lineHeight: 1.6 } },
|
|
171
|
+
React.createElement("div", { className: "flex justify-between items-center" },
|
|
172
|
+
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) &&
|
|
173
|
+
Object.keys((_r = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.dp_discount_percents) !== null && _r !== void 0 ? _r : {})
|
|
174
|
+
.length === 0 &&
|
|
175
|
+
((_s = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.dp_discounted_seats) !== null && _s !== void 0 ? _s : []).length === 0 ? (React.createElement("div", { className: "flex items-center gap-[6px]" },
|
|
176
|
+
React.createElement(LottiePlayer, { animationData: (_t = serviceItem.icons) === null || _t === void 0 ? void 0 : _t.starAnimation, width: "14px", height: "14px" }),
|
|
177
|
+
React.createElement("span", { className: "text-[#fff]" }, "M\u00E1s elegido"))) : (React.createElement("div", { className: `flex ${((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) || "").length > 10 ? "items-start" : "items-center"}` },
|
|
178
|
+
React.createElement("div", { className: isLongOfferText ? "mt-[2px]" : "" }, ((_u = serviceItem.icons) === null || _u === void 0 ? void 0 : _u.bombAnim) && (React.createElement(LottiePlayer, { animationData: serviceItem.icons.bombAnim, width: "14px", height: "14px" }))),
|
|
179
|
+
React.createElement("div", { className: `ml-[4px] flex-1 outline-none ${isLongOfferText ? "mt-[2px]" : ""}`, style: {
|
|
180
|
+
color: "#fff",
|
|
181
|
+
lineHeight: 1.4,
|
|
182
|
+
} }, !isNewUiEnabled && (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) ? (React.createElement("span", { className: "whitespace-nowrap min-[380px]:text-[12px]" }, serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text)) : (React.createElement("span", { className: "whitespace-nowrap min-[380px]:text-[12px]" },
|
|
183
|
+
"Termina en\u00A0",
|
|
184
|
+
React.createElement("span", { className: "bold-text", ref: (node) => commonService.startCountdown(node, 599), style: {
|
|
185
|
+
fontVariantNumeric: "tabular-nums",
|
|
186
|
+
display: "inline-block",
|
|
187
|
+
} })))))),
|
|
188
|
+
React.createElement("div", { className: "flex flex-col items-end", style: {
|
|
189
|
+
color: "#fff",
|
|
190
|
+
} },
|
|
191
|
+
React.createElement("div", { className: "flex items-center" },
|
|
192
|
+
React.createElement("div", { className: "mr-[4px]" },
|
|
193
|
+
React.createElement(LottiePlayer, { animationData: (_v = serviceItem.icons) === null || _v === void 0 ? void 0 : _v.dotAnimation, width: "12px", height: "12px" })),
|
|
194
|
+
React.createElement("span", { className: "flex-1", style: { lineHeight: 1.4 } },
|
|
195
|
+
React.createElement("span", { className: "bold-text", ref: (node) => commonService.startViewerCount(node, viewersConfig), style: { fontVariantNumeric: "tabular-nums" } }),
|
|
196
|
+
" ",
|
|
197
|
+
React.createElement("span", null, " viendo"),
|
|
198
|
+
" |",
|
|
199
|
+
" ",
|
|
200
|
+
React.createElement("span", { className: "whitespace-nowrap" },
|
|
201
|
+
React.createElement("span", { className: "bold-text", ref: (node) => commonService.startComprandoCount(node, 4, 16), style: { fontVariantNumeric: "tabular-nums" } }),
|
|
202
|
+
" ",
|
|
203
|
+
"comprando")))))))),
|
|
204
|
+
React.createElement("div", { style: {
|
|
205
|
+
display: "grid",
|
|
206
|
+
gridTemplateRows: isItemExpanded ? "1fr" : "0fr",
|
|
207
|
+
opacity: isItemExpanded ? 1 : 0,
|
|
208
|
+
transition: "grid-template-rows 0.3s ease-in-out, opacity 0.25s ease-in-out",
|
|
209
|
+
position: "relative",
|
|
210
|
+
zIndex: hasOfferText ||
|
|
211
|
+
((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) && (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.dp_discount_percents)) ||
|
|
212
|
+
isNewUiEnabled
|
|
213
|
+
? -2
|
|
214
|
+
: -1,
|
|
215
|
+
} },
|
|
216
|
+
React.createElement("div", { style: {
|
|
217
|
+
overflow: "hidden",
|
|
218
|
+
minHeight: 0,
|
|
219
|
+
position: hasOfferText ||
|
|
220
|
+
isNewUiEnabled ||
|
|
221
|
+
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled)
|
|
222
|
+
? "relative"
|
|
223
|
+
: undefined,
|
|
224
|
+
zIndex: (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) ||
|
|
225
|
+
isNewUiEnabled ||
|
|
226
|
+
((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) && (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.dp_discount_percents))
|
|
227
|
+
? -3
|
|
228
|
+
: undefined,
|
|
229
|
+
marginTop: hasOfferText ? "-15px" : "-10px",
|
|
230
|
+
} },
|
|
231
|
+
React.createElement(ExpandedDropdownMobile, { serviceItem: serviceItem, isPeru: isPeru, petSeatInfo: serviceItem.pet_seat_info, petFriendlyAnim: (_w = serviceItem.icons) === null || _w === void 0 ? void 0 : _w.petFriendlyAnim, isSoldOut: isSoldOut, isChangeTicket: serviceItem.is_change_ticket === true, ladiesBookedSeats: serviceItem.ladies_booked_seats, isDpEnabled: serviceItem.is_dp_enabled, femaleAnim: (_x = serviceItem.icons) === null || _x === void 0 ? void 0 : _x.femaleAnim, flexibleAnim: (_y = serviceItem.icons) === null || _y === void 0 ? void 0 : _y.flexibleAnim, renderIcon: renderIcon, operatorLabel: operatorLabel })))));
|
|
232
|
+
}
|
|
233
|
+
export default PeruServiceItemMobile;
|
|
@@ -88,7 +88,7 @@ const ANIMATION_MAP = {
|
|
|
88
88
|
},
|
|
89
89
|
};
|
|
90
90
|
function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, children, busStage, serviceDetailsLoading, cityOrigin, cityDestination, translation, orignLabel, destinationLabel, currencySign, isCiva, showRating, showLastSeats, removeArrivalTime, removeDuplicateSeats, isPeruSites, showAvailableSeats, isSeatIcon, isLinatal, isPeru, t = (key) => key, siteType, isAllinBus, isExpand, setIsExpand, coachKey, viewersConfig, isNewUi, showLoginModal, isLoggedIn, showLoginOption, isTrain, selectedSeatKey, onSeatSelect, onTrainButtonClick, showSeatSelectionError, onShowSeatSelectionError, onClearSeatSelectionError, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData, isFlores, operatorLabel, }) {
|
|
91
|
-
var _a;
|
|
91
|
+
var _a, _b, _c;
|
|
92
92
|
const handleSeatSelect = (key, price, seatKey, apiSeatType) => {
|
|
93
93
|
onClearSeatSelectionError === null || onClearSeatSelectionError === void 0 ? void 0 : onClearSeatSelectionError();
|
|
94
94
|
onSeatSelect === null || onSeatSelect === void 0 ? void 0 : onSeatSelect(key, price, seatKey, apiSeatType);
|
|
@@ -129,10 +129,10 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
|
|
|
129
129
|
const isDiscountBelow20 = (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.discount_value) > 0 &&
|
|
130
130
|
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.discount_value) < 20;
|
|
131
131
|
const hasOfferText = Boolean(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) && !isDiscountBelow20;
|
|
132
|
-
|
|
132
|
+
const isNewUiEnabledPeru = ((_b = (_a = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.discounts) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.new_ui_enabled) === true;
|
|
133
133
|
const isNewUiEnabled = (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.new_ui_enabled) === true;
|
|
134
134
|
const seats = removeDuplicateSeats
|
|
135
|
-
? ((
|
|
135
|
+
? ((_c = serviceItem.seat_types) === null || _c === void 0 ? void 0 : _c.filter((seat, index, self) => index === self.findIndex((s) => s.label === seat.label))) || []
|
|
136
136
|
: serviceItem.seat_types || [];
|
|
137
137
|
const discountedSeats = seats.map((seat) => (Object.assign(Object.assign({}, seat), CommonService.calculateDiscountedPrice(seat.fare, serviceItem))));
|
|
138
138
|
const hasDiscount = discountedSeats.some((seat) => seat.originalPrice !== seat.discountedPrice);
|
|
@@ -294,7 +294,7 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
|
|
|
294
294
|
},
|
|
295
295
|
];
|
|
296
296
|
const otherItems = items.filter((i) => i.key !== "pet" && i.key !== "flexible" && !!i.condition);
|
|
297
|
-
return (React.createElement(React.Fragment, null, isPeruSites ? (React.createElement(PeruServiceItemDesktop, { serviceItem: serviceItem, onBookButtonPress: onBookButtonPress, colors: colors, metaData: metaData, children: children, busStage: busStage, serviceDetailsLoading: serviceDetailsLoading, cityOrigin: cityOrigin, cityDestination: cityDestination, translation: translation, orignLabel: orignLabel, destinationLabel: destinationLabel, currencySign: currencySign, isCiva: isCiva, showRating: showRating, showLastSeats: showLastSeats, removeArrivalTime: removeArrivalTime, removeDuplicateSeats: removeDuplicateSeats, isPeruSites: isPeruSites, t: (key) => t(key), showAvailableSeats: showAvailableSeats, isSeatIcon: isSeatIcon, isPeru: isPeru, siteType: siteType, isAllinBus: isAllinBus, viewersConfig: viewersConfig, isLoggedIn: isLoggedIn, showLoginModal: showLoginModal, isExpand: isExpand, setIsExpand: setIsExpand, coachKey: coachKey, isFlores: isFlores, isNewUiEnabled:
|
|
297
|
+
return (React.createElement(React.Fragment, null, isPeruSites ? (React.createElement(PeruServiceItemDesktop, { serviceItem: serviceItem, onBookButtonPress: onBookButtonPress, colors: colors, metaData: metaData, children: children, busStage: busStage, serviceDetailsLoading: serviceDetailsLoading, cityOrigin: cityOrigin, cityDestination: cityDestination, translation: translation, orignLabel: orignLabel, destinationLabel: destinationLabel, currencySign: currencySign, isCiva: isCiva, showRating: showRating, showLastSeats: showLastSeats, removeArrivalTime: removeArrivalTime, removeDuplicateSeats: removeDuplicateSeats, isPeruSites: isPeruSites, t: (key) => t(key), showAvailableSeats: showAvailableSeats, isSeatIcon: isSeatIcon, isPeru: isPeru, siteType: siteType, isAllinBus: isAllinBus, viewersConfig: viewersConfig, isLoggedIn: isLoggedIn, showLoginModal: showLoginModal, isExpand: isExpand, setIsExpand: setIsExpand, coachKey: coachKey, isFlores: isFlores, isNewUiEnabled: isNewUiEnabledPeru, showLoginOption: showLoginOption })) : isNewUi && !isTrain ? (React.createElement(FeatureServiceUi, { serviceItem: serviceItem, showTopLabel: showTopLabel, getAnimationIcon: getAnimationIcon, cityOrigin: cityOrigin, cityDestination: cityDestination, renderIcon: renderIcon, viewersConfig: viewersConfig, isFeatureDropDownExpand: isFeatureDropDownExpand, ticketQuantity: ticketQuantity, onIncreaseTicketQuantity: onIncreaseTicketQuantity, onDecreaseTicketQuantity: onDecreaseTicketQuantity, onBookButtonPress: onRemateUiButtonClick, onToggleExpand: () => setIsFeatureDropDownExpand &&
|
|
298
298
|
setIsFeatureDropDownExpand(isFeatureDropDownExpand === serviceItem.id ||
|
|
299
299
|
isFeatureDropDownExpand === true
|
|
300
300
|
? null
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { MobileServiceItemProps } from "./mobileTypes";
|
|
3
|
-
declare function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, orignLabel, destinationLabel, amenitiesData, setShowDropdown, showDropdown, isExpanded, setIsExpanded, setAmenetiesAtomValue, isCiva, currencySign, isPeru, showRating, showLastSeats, removeDuplicateSeats, isLinatal, viewersConfig, operatorLabel, isTrain, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, cityOrigin, cityDestination, isNewUi, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData, isFlores, isAllinBus, }: MobileServiceItemProps): React.ReactElement;
|
|
3
|
+
declare function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, orignLabel, destinationLabel, amenitiesData, setShowDropdown, showDropdown, isExpanded, setIsExpanded, setAmenetiesAtomValue, isCiva, currencySign, isPeru, showRating, showLastSeats, removeDuplicateSeats, isLinatal, viewersConfig, operatorLabel, isTrain, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, cityOrigin, cityDestination, isNewUi, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData, isFlores, isAllinBus, isPeruSite, }: MobileServiceItemProps): React.ReactElement;
|
|
4
4
|
export default ServiceItemMobile;
|
|
@@ -6,6 +6,7 @@ import DateTimeSectionMobile from "../../ui/mobileweb/DateTimeSectionMobile";
|
|
|
6
6
|
import ExpandedDropdownMobile from "../../ui/mobileweb/ExpandedDropdownMobile";
|
|
7
7
|
import ServiceBadgesMobile from "../../ui/mobileweb/ServiceBadgesMobile";
|
|
8
8
|
import FeatureServiceUiMobile from "../../ui/FeaturServiceUiMobile/FeatureServiceUiMobile";
|
|
9
|
+
import PeruServiceItemMobile from "./PeruServiceItemMobile";
|
|
9
10
|
const SEAT_EXCEPTIONS = ["Asiento mascota"];
|
|
10
11
|
const exceptions = [
|
|
11
12
|
"gy",
|
|
@@ -18,7 +19,7 @@ const exceptions = [
|
|
|
18
19
|
"blanco",
|
|
19
20
|
"asiento_mascota",
|
|
20
21
|
];
|
|
21
|
-
function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, orignLabel, destinationLabel, amenitiesData, setShowDropdown, showDropdown, isExpanded, setIsExpanded, setAmenetiesAtomValue, isCiva, currencySign, isPeru, showRating, showLastSeats, removeDuplicateSeats, isLinatal, viewersConfig, operatorLabel, isTrain, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, cityOrigin, cityDestination, isNewUi, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData, isFlores, isAllinBus, }) {
|
|
22
|
+
function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, orignLabel, destinationLabel, amenitiesData, setShowDropdown, showDropdown, isExpanded, setIsExpanded, setAmenetiesAtomValue, isCiva, currencySign, isPeru, showRating, showLastSeats, removeDuplicateSeats, isLinatal, viewersConfig, operatorLabel, isTrain, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, cityOrigin, cityDestination, isNewUi, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData, isFlores, isAllinBus, isPeruSite, }) {
|
|
22
23
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
23
24
|
const isItemExpanded = serviceItem.id === isExpanded;
|
|
24
25
|
const isPetSeat = (Object.keys(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.pet_seat_info) || []).length > 0;
|
|
@@ -102,7 +103,7 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
|
|
|
102
103
|
const dropoffName = ((_f = serviceItem.stage_details_arr) === null || _f === void 0 ? void 0 : _f.length)
|
|
103
104
|
? extractStage(serviceItem.stage_details_arr, 1)
|
|
104
105
|
: null;
|
|
105
|
-
return (React.createElement(React.Fragment, null, isNewUi && !isTrain ? (React.createElement(FeatureServiceUiMobile, { serviceItem: serviceItem, showTopLabel: showTopLabel, colors: colors, isSoldOut: isSoldOut, cityOrigin: cityOrigin, cityDestination: cityDestination, renderIcon: renderIcon, viewersConfig: viewersConfig, isFeatureDropDownExpand: isFeatureDropDownExpand, ticketQuantity: ticketQuantity, onIncreaseTicketQuantity: onIncreaseTicketQuantity, onDecreaseTicketQuantity: onDecreaseTicketQuantity, onBookButtonPress: onRemateUiButtonClick, onToggleExpand: () => setIsFeatureDropDownExpand &&
|
|
106
|
+
return (React.createElement(React.Fragment, null, isPeruSite ? (React.createElement(PeruServiceItemMobile, { serviceItem: serviceItem, onBookButtonPress: onBookButtonPress, colors: colors, busStage: busStage, orignLabel: orignLabel, destinationLabel: destinationLabel, amenitiesData: amenitiesData, setShowDropdown: setShowDropdown, showDropdown: showDropdown, isExpanded: isExpanded, setIsExpanded: setIsExpanded, setAmenetiesAtomValue: setAmenetiesAtomValue, isCiva: isCiva, currencySign: currencySign, isPeru: isPeru, showRating: showRating, showLastSeats: showLastSeats, removeDuplicateSeats: removeDuplicateSeats, isLinatal: isLinatal, viewersConfig: viewersConfig, operatorLabel: operatorLabel, isTrain: isTrain, isFeatureDropDownExpand: isFeatureDropDownExpand, setIsFeatureDropDownExpand: setIsFeatureDropDownExpand, ticketQuantity: ticketQuantity, onIncreaseTicketQuantity: onIncreaseTicketQuantity, onDecreaseTicketQuantity: onDecreaseTicketQuantity, cityOrigin: cityOrigin, cityDestination: cityDestination, isNewUiEnabled: isNewUiEnabled, onRemateUiButtonClick: onRemateUiButtonClick, selectedTimeSlot: selectedTimeSlot, onTimeSlotChange: onTimeSlotChange, isTimeDropdownOpen: isTimeDropdownOpen, onTimeDropdownToggle: onTimeDropdownToggle, wowDealData: wowDealData, isFlores: isFlores, isAllinBus: isAllinBus })) : isNewUi && !isTrain ? (React.createElement(FeatureServiceUiMobile, { serviceItem: serviceItem, showTopLabel: showTopLabel, colors: colors, isSoldOut: isSoldOut, cityOrigin: cityOrigin, cityDestination: cityDestination, renderIcon: renderIcon, viewersConfig: viewersConfig, isFeatureDropDownExpand: isFeatureDropDownExpand, ticketQuantity: ticketQuantity, onIncreaseTicketQuantity: onIncreaseTicketQuantity, onDecreaseTicketQuantity: onDecreaseTicketQuantity, onBookButtonPress: onRemateUiButtonClick, onToggleExpand: () => setIsFeatureDropDownExpand &&
|
|
106
107
|
setIsFeatureDropDownExpand(isFeatureDropDownExpand === serviceItem.id ||
|
|
107
108
|
isFeatureDropDownExpand === true
|
|
108
109
|
? null
|
package/dist/styles.css
CHANGED
|
@@ -201,6 +201,9 @@
|
|
|
201
201
|
.-mt-\[16px\] {
|
|
202
202
|
margin-top: calc(16px * -1);
|
|
203
203
|
}
|
|
204
|
+
.mt-\[0px\] {
|
|
205
|
+
margin-top: 0px;
|
|
206
|
+
}
|
|
204
207
|
.mt-\[2px\] {
|
|
205
208
|
margin-top: 2px;
|
|
206
209
|
}
|
|
@@ -1089,12 +1092,12 @@
|
|
|
1089
1092
|
.text-\[24px\] {
|
|
1090
1093
|
font-size: 24px;
|
|
1091
1094
|
}
|
|
1092
|
-
.text-\[26px\] {
|
|
1093
|
-
font-size: 26px;
|
|
1094
|
-
}
|
|
1095
1095
|
.text-\[28px\] {
|
|
1096
1096
|
font-size: 28px;
|
|
1097
1097
|
}
|
|
1098
|
+
.text-\[30px\] {
|
|
1099
|
+
font-size: 30px;
|
|
1100
|
+
}
|
|
1098
1101
|
.text-\[42px\] {
|
|
1099
1102
|
font-size: 42px;
|
|
1100
1103
|
}
|
|
@@ -1165,6 +1168,9 @@
|
|
|
1165
1168
|
.text-\[\#4a4a4a\] {
|
|
1166
1169
|
color: #4a4a4a;
|
|
1167
1170
|
}
|
|
1171
|
+
.text-\[\#6a6a6a\] {
|
|
1172
|
+
color: #6a6a6a;
|
|
1173
|
+
}
|
|
1168
1174
|
.text-\[\#9b9b9b\] {
|
|
1169
1175
|
color: #9b9b9b;
|
|
1170
1176
|
}
|
|
@@ -292,7 +292,7 @@ const FeatureServiceUi = ({ serviceItem, showTopLabel, getAnimationIcon, cityOri
|
|
|
292
292
|
// backgroundColor: "#fff",
|
|
293
293
|
border: "1px solid #363c48",
|
|
294
294
|
backgroundColor: "#1a202e",
|
|
295
|
-
padding: "
|
|
295
|
+
padding: "25px 10px",
|
|
296
296
|
} },
|
|
297
297
|
React.createElement("img", { src: op.logo, alt: op.name, onError: (e) => {
|
|
298
298
|
var _a;
|
|
@@ -333,7 +333,7 @@ const FeatureServiceUi = ({ serviceItem, showTopLabel, getAnimationIcon, cityOri
|
|
|
333
333
|
React.createElement("div", { className: "flex flex-col gap-[6px] ", style: {
|
|
334
334
|
alignItems: "center",
|
|
335
335
|
} },
|
|
336
|
-
React.createElement("span", { className: "text-[#FF8F45] bold-text text-[
|
|
336
|
+
React.createElement("span", { className: "text-[#FF8F45] bold-text text-[30px] leading-tight", style: {
|
|
337
337
|
animation: "pulse-zoom 2s ease-in-out infinite",
|
|
338
338
|
whiteSpace: "nowrap",
|
|
339
339
|
} },
|