kupos-ui-components-lib 9.3.9 → 9.4.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/dist/components/ServiceItem/ServiceItemDesktop.d.ts +1 -1
- package/dist/components/ServiceItem/ServiceItemDesktop.js +36 -34
- package/dist/components/ServiceItem/ServiceItemMobile.js +20 -25
- package/dist/components/ServiceItem/mobileTypes.d.ts +2 -0
- package/dist/components/ServiceItem/types.d.ts +4 -0
- package/dist/styles.css +29 -2
- package/dist/ui/KuposButton/KuposButton.js +2 -1
- package/dist/ui/SeatSection/SeatSection.d.ts +2 -1
- package/dist/ui/SeatSection/SeatSection.js +57 -8
- package/dist/ui/ServiceBadges/ServiceBadges.js +1 -1
- package/dist/ui/mobileweb/DateTimeSectionMobile.d.ts +2 -1
- package/dist/ui/mobileweb/DateTimeSectionMobile.js +2 -2
- package/dist/ui/mobileweb/SeatSectionMobile.d.ts +2 -1
- package/dist/ui/mobileweb/SeatSectionMobile.js +32 -2
- package/dist/ui/mobileweb/ServiceBadgesMobile.js +1 -1
- package/package.json +1 -1
- package/src/components/ServiceItem/ServiceItemDesktop.tsx +74 -47
- package/src/components/ServiceItem/ServiceItemMobile.tsx +67 -66
- package/src/components/ServiceItem/mobileTypes.ts +2 -0
- package/src/components/ServiceItem/types.ts +5 -0
- package/src/ui/KuposButton/KuposButton.tsx +7 -2
- package/src/ui/SeatSection/SeatSection.tsx +83 -7
- package/src/ui/ServiceBadges/ServiceBadges.tsx +1 -1
- package/src/ui/mobileweb/DateTimeSectionMobile.tsx +3 -0
- package/src/ui/mobileweb/SeatSectionMobile.tsx +95 -1
- package/src/ui/mobileweb/ServiceBadgesMobile.tsx +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ServiceItemProps } from "./types";
|
|
3
|
-
declare 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, siteType, isAllinBus, isExpand, setIsExpand, coachKey, viewersConfig, }: ServiceItemProps & {
|
|
3
|
+
declare 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, siteType, isAllinBus, isExpand, setIsExpand, coachKey, viewersConfig, showLoginModal, isLoggedIn, }: ServiceItemProps & {
|
|
4
4
|
currencySign?: string;
|
|
5
5
|
}): React.ReactElement;
|
|
6
6
|
export default ServiceItemPB;
|
|
@@ -66,7 +66,7 @@ const ANIMATION_MAP = {
|
|
|
66
66
|
kupos: dotAnimation,
|
|
67
67
|
},
|
|
68
68
|
};
|
|
69
|
-
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, }) {
|
|
69
|
+
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, showLoginModal, isLoggedIn, }) {
|
|
70
70
|
var _a;
|
|
71
71
|
const getAnimationIcon = (icon) => {
|
|
72
72
|
var _a;
|
|
@@ -108,13 +108,14 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
|
|
|
108
108
|
const discountedSeats = seats.map((seat) => (Object.assign(Object.assign({}, seat), CommonService.calculateDiscountedPrice(seat.fare, serviceItem))));
|
|
109
109
|
const hasDiscount = discountedSeats.some((seat) => seat.originalPrice !== seat.discountedPrice);
|
|
110
110
|
const offerGradient = `linear-gradient(90deg, ${colors.rightGradiantColor || "#ff5964"} 0%, ${colors.leftGradiantColor || "#ff8842"} 100%)`;
|
|
111
|
-
const serviceCardStyle = hasOfferText
|
|
111
|
+
const serviceCardStyle = hasOfferText || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled)
|
|
112
112
|
? {
|
|
113
113
|
borderColor: "transparent",
|
|
114
114
|
borderStyle: "solid",
|
|
115
|
-
borderWidth: "
|
|
115
|
+
borderWidth: "3px 3px 0 3px",
|
|
116
116
|
borderRadius: isItemExpanded || coachKey ? "18px 18px 0 0" : "18px",
|
|
117
117
|
background: `linear-gradient(#fff, #fff) padding-box, ${offerGradient} border-box`,
|
|
118
|
+
zIndex: 2,
|
|
118
119
|
}
|
|
119
120
|
: {};
|
|
120
121
|
const renderIcon = (iconKey, size = "14px") => {
|
|
@@ -230,12 +231,12 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
|
|
|
230
231
|
},
|
|
231
232
|
];
|
|
232
233
|
const otherItems = items.filter((i) => i.key !== "pet" && i.key !== "flexible" && !!i.condition);
|
|
233
|
-
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 })) : (React.createElement("div", { className: `relative ${hasOfferText ? "mb-[55px]" : "mb-[10px]"} ${(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ||
|
|
234
|
+
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 })) : (React.createElement("div", { className: `relative ${hasOfferText || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) ? "mb-[55px]" : "mb-[10px]"} ${(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ||
|
|
234
235
|
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.train_type_label) === "Tren Express (Nuevo)" ||
|
|
235
236
|
showTopLabel
|
|
236
237
|
? "mt-[24px]"
|
|
237
238
|
: "mt-[20px]"} ` },
|
|
238
|
-
React.createElement("div", { id: `service-card-${serviceItem.id}`, className: `bg-white mx-auto relative ${hasOfferText
|
|
239
|
+
React.createElement("div", { id: `service-card-${serviceItem.id}`, className: `bg-white mx-auto relative ${hasOfferText || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled)
|
|
239
240
|
? "rounded-[18px]"
|
|
240
241
|
: "rounded-[10px] border border-[#ccc]"}`, style: serviceCardStyle },
|
|
241
242
|
React.createElement("div", { className: " pt-[20px]", style: {
|
|
@@ -257,13 +258,13 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
|
|
|
257
258
|
backgroundColor: "#ccc",
|
|
258
259
|
} }),
|
|
259
260
|
React.createElement("div", { className: "content-center" },
|
|
260
|
-
React.createElement(SeatSection, { seatTypes: serviceItem.seat_types, serviceItem: serviceItem, availableSeats: serviceItem.available_seats, isSoldOut: isSoldOut, priceColor: colors.priceColor, currencySign: currencySign, removeDuplicateSeats: removeDuplicateSeats, isPeru: isPeru, renderIcon: renderIcon })),
|
|
261
|
+
React.createElement(SeatSection, { seatTypes: serviceItem.seat_types, serviceItem: serviceItem, availableSeats: serviceItem.available_seats, isSoldOut: isSoldOut, priceColor: colors.priceColor, dpSeatColor: colors.seatPriceColor, currencySign: currencySign, removeDuplicateSeats: removeDuplicateSeats, isPeru: isPeru, renderIcon: renderIcon })),
|
|
261
262
|
React.createElement("div", { className: "relative" },
|
|
262
263
|
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 }),
|
|
263
|
-
showLastSeats ? (React.createElement("div", { className: "flex justify-center mr-[11px] w-[100%] right-[0px]",
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
264
|
+
showLastSeats ? (React.createElement("div", { className: "flex justify-center mr-[11px] w-[100%] right-[0px] absolute left-[0] top-[40px]" }, (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) < 10 &&
|
|
265
|
+
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) > 0 && (React.createElement("div", { className: "text-[12px] mt-1 text-center", style: {
|
|
266
|
+
color: colors.seatPriceColor,
|
|
267
|
+
} }, "\u00A1\u00DAltimos Asientos!")))) : null)),
|
|
267
268
|
React.createElement(BottomAmenities, { otherItems: otherItems, serviceItem: serviceItem, grayscaleClass: grayscaleClass, isSoldOut: isSoldOut, isItemExpanded: isItemExpanded, colors: colors, translation: translation, getAnimationIcon: getAnimationIcon, downArrowIcon: renderIcon("downArrow", "10px"), onToggleExpand: () => setIsExpand &&
|
|
268
269
|
setIsExpand(isItemExpanded ? null : serviceItem.id), isPeru: isPeru }))),
|
|
269
270
|
isPeru ? null : (React.createElement("div", { style: {
|
|
@@ -272,54 +273,55 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
|
|
|
272
273
|
opacity: isItemExpanded ? 1 : 0,
|
|
273
274
|
transition: "grid-template-rows 0.3s ease-in-out, opacity 0.25s ease-in-out",
|
|
274
275
|
position: "relative",
|
|
275
|
-
zIndex:
|
|
276
|
+
zIndex: 1,
|
|
276
277
|
} },
|
|
277
|
-
React.createElement("div", { style: Object.assign({ overflow: "hidden", minHeight: 0, marginTop: "-10px" }, (hasOfferText
|
|
278
|
+
React.createElement("div", { style: Object.assign({ overflow: "hidden", minHeight: 0, marginTop: "-10px" }, (hasOfferText || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled)
|
|
278
279
|
? {
|
|
279
|
-
borderLeft: "
|
|
280
|
-
borderRight: "
|
|
280
|
+
borderLeft: "3px solid #ff5964",
|
|
281
|
+
borderRight: "3px solid #ff8842",
|
|
281
282
|
borderRadius: "0 0 18px 18px",
|
|
282
283
|
boxSizing: "border-box",
|
|
283
284
|
}
|
|
284
285
|
: {})) },
|
|
285
286
|
React.createElement(ExpandedDropdown, { serviceItem: serviceItem, isPeru: isPeru, translation: translation, getAnimationIcon: getAnimationIcon, isChangeTicket: serviceItem.is_change_ticket === true })))),
|
|
286
287
|
children,
|
|
287
|
-
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) && (React.createElement("div", { className: "text-white p-[10px_15px] text-left w-full flex items-center absolute -bottom-[36px] pt-[50px]
|
|
288
|
+
((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled)) && (React.createElement("div", { className: "text-white p-[10px_15px] text-left w-full flex items-center absolute -bottom-[36px] pt-[50px] rounded-b-[14px] text-[14px]", style: {
|
|
288
289
|
background: offerGradient,
|
|
289
290
|
opacity: isSoldOut ? 0.5 : 1,
|
|
290
291
|
} },
|
|
291
292
|
React.createElement("div", { className: "flex justify-between items-center w-full" },
|
|
292
|
-
React.createElement("div", { className: "flex items-center " },
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
293
|
+
React.createElement("div", { className: "flex items-center " }, (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) ? (React.createElement("div", { className: "flex items-center gap-[3px]" },
|
|
294
|
+
renderIcon("whiteFireIcon", "14px"),
|
|
295
|
+
React.createElement("span", null, "Servicio popular entre los usuarios"))) : (React.createElement("div", { className: "flex items-center" },
|
|
296
|
+
React.createElement(LottiePlayer, { animationData: getAnimationIcon("bombAnimation"), width: "18px", height: "18px" }),
|
|
297
|
+
React.createElement("div", { className: "flex items-center mt-[2px]" },
|
|
298
|
+
React.createElement("span", { className: "bold-text ml-[6px]" },
|
|
299
|
+
((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) || "").length > 30
|
|
300
|
+
? ((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) || "").slice(0, 30) +
|
|
301
|
+
"..."
|
|
302
|
+
: (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) || "",
|
|
301
303
|
" ",
|
|
302
|
-
"
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
304
|
+
isLoggedIn ? null : (React.createElement("span", { onClick: showLoginModal, className: "cursor-pointer" }, "registro")),
|
|
305
|
+
" ",
|
|
306
|
+
"\u00A0"),
|
|
307
|
+
" ",
|
|
308
|
+
"| Termina en\u00A0",
|
|
309
|
+
React.createElement("span", { className: "bold-text text-end", ref: (node) => CommonService.startCountdown(node, 599), style: {
|
|
310
|
+
fontVariantNumeric: "tabular-nums",
|
|
311
|
+
display: "inline-block",
|
|
312
|
+
} }))))),
|
|
308
313
|
React.createElement("div", { className: "flex items-center" },
|
|
309
314
|
React.createElement(LottiePlayer, { animationData: getAnimationIcon("dotAnimation"), width: "12px", height: "12px" }),
|
|
310
315
|
React.createElement("span", { className: "ml-[6px]" },
|
|
311
316
|
React.createElement("span", { className: "bold-text", ref: (node) => CommonService.startViewerCount(node, viewersConfig), style: { fontVariantNumeric: "tabular-nums" } }),
|
|
312
317
|
" ",
|
|
313
|
-
React.createElement("span", { className: "bold-text" }, "personas"),
|
|
314
|
-
" ",
|
|
315
318
|
React.createElement("span", null,
|
|
316
319
|
" ",
|
|
317
320
|
(viewersConfig === null || viewersConfig === void 0 ? void 0 : viewersConfig.label) || " viendo",
|
|
318
321
|
" |",
|
|
319
322
|
" ",
|
|
320
323
|
React.createElement("span", { className: "" },
|
|
321
|
-
"Quedan pocos
|
|
322
|
-
" ",
|
|
324
|
+
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) ? null : "Quedan pocos • ",
|
|
323
325
|
React.createElement("span", { className: "bold-text", ref: (node) => CommonService.startComprandoCount(node, 4, 16), style: { fontVariantNumeric: "tabular-nums" } }),
|
|
324
326
|
" ",
|
|
325
327
|
"comprando"))))))),
|
|
@@ -30,7 +30,7 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
|
|
|
30
30
|
const isLongOfferText = (((_b = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) === null || _b === void 0 ? void 0 : _b.length) || 0) > 35;
|
|
31
31
|
const hasOfferText = Boolean(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text);
|
|
32
32
|
const offerGradient = `linear-gradient(90deg, ${colors.rightGradiantColor || "#ff5964"} 0%, ${colors.leftGradiantColor || "#ff8842"} 100%)`;
|
|
33
|
-
const serviceCardStyle = hasOfferText
|
|
33
|
+
const serviceCardStyle = hasOfferText || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled)
|
|
34
34
|
? {
|
|
35
35
|
borderColor: "transparent",
|
|
36
36
|
borderStyle: "solid",
|
|
@@ -86,38 +86,36 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
|
|
|
86
86
|
if (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_transpordo) {
|
|
87
87
|
isConexion = true;
|
|
88
88
|
}
|
|
89
|
-
return (React.createElement("div", { className: `relative ${!serviceItem.offer_text ? "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) ||
|
|
89
|
+
return (React.createElement("div", { className: `relative ${!serviceItem.offer_text || !(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) ||
|
|
90
90
|
isConexion ||
|
|
91
91
|
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.train_type_label) === "Tren Express (Nuevo)" ||
|
|
92
92
|
showTopLabel
|
|
93
93
|
? "mt-[20px]"
|
|
94
94
|
: "mt-[10px]"} `, style: { backgroundColor: "#fff", zIndex: 1 } },
|
|
95
|
-
React.createElement("div", { className: `bg-white z-1 ${hasOfferText
|
|
95
|
+
React.createElement("div", { className: `bg-white z-1 ${hasOfferText || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled)
|
|
96
96
|
? "rounded-[18px]"
|
|
97
97
|
: "rounded-[10px] border border-[#ccc]"}`, style: serviceCardStyle },
|
|
98
98
|
React.createElement("div", { style: { padding: "12px 12px 8px 12px" } },
|
|
99
99
|
React.createElement("div", { className: "flex justify-between items-center mb-[10px]" },
|
|
100
|
-
React.createElement("div", { className: "flex items-center
|
|
100
|
+
React.createElement("div", { className: "flex items-center justify-center gap-x-4", style: {
|
|
101
101
|
marginBottom: (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) || hasDiscount ? "10px" : "",
|
|
102
102
|
} },
|
|
103
|
-
React.createElement("div", { className: "w-[
|
|
104
|
-
React.createElement("img", { src: serviceItem.operator_details[0], alt: "service logo", className: `w-[100px] h-auto object-contain
|
|
105
|
-
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]
|
|
103
|
+
React.createElement("div", { className: "w-[115px] overflow-y-hidden h-[22px]" },
|
|
104
|
+
React.createElement("img", { src: serviceItem.operator_details[0], alt: "service logo", className: `w-[100px] h-auto object-contain ${isSoldOut ? "grayscale" : ""}` })),
|
|
105
|
+
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" },
|
|
106
106
|
React.createElement("div", { className: "flex items-center" },
|
|
107
107
|
React.createElement("div", { className: "flex items-center" },
|
|
108
108
|
React.createElement("img", { src: serviceItem.icons.rating, alt: "origin", className: `w-[12px] h-[12px] mr-[4px] object-contain ${isSoldOut ? "grayscale" : ""}` }),
|
|
109
109
|
React.createElement("span", { style: { lineHeight: "normal" } }, getServiceStars(serviceItem))),
|
|
110
110
|
React.createElement("div", { className: "flex items-center cursor-pointer ", style: { color: isSoldOut ? "#bbb" : "text-[#464647]" } },
|
|
111
|
-
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),
|
|
112
|
-
|
|
113
|
-
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) > 0 && (React.createElement("div", { className: "text-[10px] text-[#464647] text-center" }, "\u00A1 \u00DAltimos Asientos!")))) : null),
|
|
114
|
-
React.createElement(DateTimeSectionMobile, { onBookButtonPress: onBookButtonPress, isCiva: isCiva, isSoldOut: isSoldOut, isLinatal: isLinatal, isPeru: isPeru, orignLabel: orignLabel, destinationLabel: destinationLabel, originIcon: (_c = serviceItem.icons) === null || _c === void 0 ? void 0 : _c.origin, destinationIcon: (_d = serviceItem.icons) === null || _d === void 0 ? void 0 : _d.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 }),
|
|
111
|
+
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)),
|
|
112
|
+
React.createElement(DateTimeSectionMobile, { onBookButtonPress: onBookButtonPress, isCiva: isCiva, isSoldOut: isSoldOut, isLinatal: isLinatal, isPeru: isPeru, orignLabel: orignLabel, destinationLabel: destinationLabel, originIcon: (_c = serviceItem.icons) === null || _c === void 0 ? void 0 : _c.origin, destinationIcon: (_d = serviceItem.icons) === null || _d === void 0 ? void 0 : _d.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 }),
|
|
115
113
|
React.createElement("div", { className: "bg-[#E6E6E6] mt-[10px] mb-[8px] h-[1px]" }),
|
|
116
114
|
React.createElement(BottomAmenitiesMobile, { isSoldOut: isSoldOut, amenitiesNodes: amenities(), hoursIcon: renderIcon("hours", "14px"), duration: (_e = serviceItem.duration) === null || _e === void 0 ? void 0 : _e.toString(), isDirectTrip: serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip, directoColor: colors.directoColor, directoAnim: serviceItem.icons.directoAnim, isChangeTicket: serviceItem.is_change_ticket, isPetSeat: isPetSeat, petSeatInfo: serviceItem.pet_seat_info, petFriendlyAnim: serviceItem.icons.petFriendlyAnim, flexibleAnim: serviceItem.icons.flexibleAnim, isTrackingEnabled: serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_tracking_enabled, locationAnim: serviceItem.icons.locationAnim, downArrowIcon: serviceItem.icons.downArrow, showDropdown: isItemExpanded, setShowDropdown: () => setIsExpanded(isItemExpanded ? null : serviceItem.id), onDropdownToggle: () => {
|
|
117
115
|
setIsExpanded(isItemExpanded ? null : serviceItem.id);
|
|
118
116
|
}, isPeru: isPeru })),
|
|
119
117
|
React.createElement(ServiceBadgesMobile, { showTopLabel: showTopLabel, isSoldOut: isSoldOut, colors: colors, renderIcon: renderIcon, serviceItem: serviceItem, isConexion: isConexion })),
|
|
120
|
-
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) && (React.createElement("div", { className: "px-[12px] pt-[22px] pb-[8px] relative -z-9 -mt-[15px]", style: {
|
|
118
|
+
((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) || (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: {
|
|
121
119
|
background: isSoldOut ? "#ccc" : offerGradient,
|
|
122
120
|
opacity: isSoldOut ? 0.5 : 1,
|
|
123
121
|
borderRadius: "0 0 14px 14px",
|
|
@@ -125,7 +123,9 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
|
|
|
125
123
|
} },
|
|
126
124
|
React.createElement("div", { className: "flex flex-col gap-[8px] text-[12px] min-[420px]:text-[12px] text-[#464647]", style: { lineHeight: 1.6 } },
|
|
127
125
|
React.createElement("div", { className: "flex justify-between items-center" },
|
|
128
|
-
|
|
126
|
+
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) ? (React.createElement("div", { className: "flex items-center" },
|
|
127
|
+
renderIcon("whiteFireIcon", "14px"),
|
|
128
|
+
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"}` },
|
|
129
129
|
React.createElement("div", { className: isLongOfferText ? "mt-[2px]" : "" },
|
|
130
130
|
React.createElement(LottiePlayer, { animationData: serviceItem.icons.bombAnim, width: "14px", height: "14px" })),
|
|
131
131
|
React.createElement("div", { className: `ml-[4px] flex-1 outline-none ${isLongOfferText ? "mt-[2px]" : ""}`, style: {
|
|
@@ -137,7 +137,7 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
|
|
|
137
137
|
React.createElement("span", { className: "bold-text", ref: (node) => commonService.startCountdown(node, 599), style: {
|
|
138
138
|
fontVariantNumeric: "tabular-nums",
|
|
139
139
|
display: "inline-block",
|
|
140
|
-
} })))),
|
|
140
|
+
} }))))),
|
|
141
141
|
React.createElement("div", { className: "flex flex-col items-end", style: {
|
|
142
142
|
color: "#fff",
|
|
143
143
|
} },
|
|
@@ -148,25 +148,20 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
|
|
|
148
148
|
React.createElement("span", { className: "flex-1", style: { lineHeight: 1.4 } },
|
|
149
149
|
React.createElement("span", { className: "bold-text", ref: (node) => commonService.startViewerCount(node, viewersConfig), style: { fontVariantNumeric: "tabular-nums" } }),
|
|
150
150
|
" ",
|
|
151
|
-
React.createElement("span",
|
|
151
|
+
React.createElement("span", null, " viendo"),
|
|
152
|
+
" |",
|
|
152
153
|
" ",
|
|
153
|
-
React.createElement("span",
|
|
154
|
+
React.createElement("span", { className: "whitespace-nowrap" },
|
|
155
|
+
React.createElement("span", { className: "bold-text", ref: (node) => commonService.startComprandoCount(node, 4, 16), style: { fontVariantNumeric: "tabular-nums" } }),
|
|
154
156
|
" ",
|
|
155
|
-
"
|
|
156
|
-
React.createElement("div", { className: "flex items-center" },
|
|
157
|
-
React.createElement("span", { className: "whitespace-nowrap" },
|
|
158
|
-
"Quedan pocos \u2022",
|
|
159
|
-
" ",
|
|
160
|
-
React.createElement("span", { className: "bold-text", ref: (node) => commonService.startComprandoCount(node, 4, 16), style: { fontVariantNumeric: "tabular-nums" } }),
|
|
161
|
-
" ",
|
|
162
|
-
"comprando"))))))),
|
|
157
|
+
"comprando")))))))),
|
|
163
158
|
React.createElement("div", { style: {
|
|
164
159
|
display: "grid",
|
|
165
160
|
gridTemplateRows: isItemExpanded ? "1fr" : "0fr",
|
|
166
161
|
opacity: isItemExpanded ? 1 : 0,
|
|
167
162
|
transition: "grid-template-rows 0.3s ease-in-out, opacity 0.25s ease-in-out",
|
|
168
163
|
position: "relative",
|
|
169
|
-
zIndex: (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) ? -2 : -1,
|
|
164
|
+
zIndex: (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) ? -2 : -1,
|
|
170
165
|
} },
|
|
171
166
|
React.createElement("div", { style: {
|
|
172
167
|
overflow: "hidden",
|
|
@@ -34,6 +34,7 @@ export interface MobileServiceItemProps {
|
|
|
34
34
|
change_ticket_hours?: number;
|
|
35
35
|
duration?: number;
|
|
36
36
|
train_type_label?: string;
|
|
37
|
+
is_dp_enabled?: boolean;
|
|
37
38
|
offer_text?: string;
|
|
38
39
|
is_direct_trip?: boolean;
|
|
39
40
|
is_train_type?: boolean;
|
|
@@ -117,6 +118,7 @@ export interface MobileServiceItemProps {
|
|
|
117
118
|
specialDeparture?: string;
|
|
118
119
|
fireIcon?: string;
|
|
119
120
|
directoIcon?: string;
|
|
121
|
+
whiteFireIcon?: string;
|
|
120
122
|
[key: string]: string | Record<string, string | undefined> | undefined;
|
|
121
123
|
};
|
|
122
124
|
useLottieFor?: string[];
|
|
@@ -38,6 +38,7 @@ export interface ServiceItemProps {
|
|
|
38
38
|
train_type_label?: string;
|
|
39
39
|
offer_text?: string;
|
|
40
40
|
is_direct_trip?: boolean;
|
|
41
|
+
is_dp_enabled?: boolean;
|
|
41
42
|
is_transpordo?: boolean;
|
|
42
43
|
is_train_type?: boolean;
|
|
43
44
|
operator_service_name?: string;
|
|
@@ -119,6 +120,7 @@ export interface ServiceItemProps {
|
|
|
119
120
|
bombJson?: string;
|
|
120
121
|
downArrow?: string;
|
|
121
122
|
personIcon?: string;
|
|
123
|
+
whiteFireIcon?: string;
|
|
122
124
|
[key: string]: string | Record<string, string | undefined> | undefined;
|
|
123
125
|
};
|
|
124
126
|
useLottieFor?: string[];
|
|
@@ -210,4 +212,6 @@ export interface ServiceItemProps {
|
|
|
210
212
|
label?: string;
|
|
211
213
|
icon?: string;
|
|
212
214
|
};
|
|
215
|
+
showLoginModal?: any;
|
|
216
|
+
isLoggedIn?: any;
|
|
213
217
|
}
|
package/dist/styles.css
CHANGED
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
.-top-\[8px\] {
|
|
28
28
|
top: calc(8px * -1);
|
|
29
29
|
}
|
|
30
|
-
.-top-\[
|
|
31
|
-
top: calc(
|
|
30
|
+
.-top-\[10px\] {
|
|
31
|
+
top: calc(10px * -1);
|
|
32
32
|
}
|
|
33
33
|
.-top-\[11px\] {
|
|
34
34
|
top: calc(11px * -1);
|
|
@@ -51,6 +51,9 @@
|
|
|
51
51
|
.top-\[30px\] {
|
|
52
52
|
top: 30px;
|
|
53
53
|
}
|
|
54
|
+
.top-\[40px\] {
|
|
55
|
+
top: 40px;
|
|
56
|
+
}
|
|
54
57
|
.top-\[88\%\] {
|
|
55
58
|
top: 88%;
|
|
56
59
|
}
|
|
@@ -69,18 +72,27 @@
|
|
|
69
72
|
.-bottom-\[36px\] {
|
|
70
73
|
bottom: calc(36px * -1);
|
|
71
74
|
}
|
|
75
|
+
.bottom-\[85\%\] {
|
|
76
|
+
bottom: 85%;
|
|
77
|
+
}
|
|
72
78
|
.-left-\[7px\] {
|
|
73
79
|
left: calc(7px * -1);
|
|
74
80
|
}
|
|
75
81
|
.-left-\[8px\] {
|
|
76
82
|
left: calc(8px * -1);
|
|
77
83
|
}
|
|
84
|
+
.-left-\[20px\] {
|
|
85
|
+
left: calc(20px * -1);
|
|
86
|
+
}
|
|
78
87
|
.-left-\[30px\] {
|
|
79
88
|
left: calc(30px * -1);
|
|
80
89
|
}
|
|
81
90
|
.left-1\/2 {
|
|
82
91
|
left: calc(1/2 * 100%);
|
|
83
92
|
}
|
|
93
|
+
.left-\[0\] {
|
|
94
|
+
left: 0;
|
|
95
|
+
}
|
|
84
96
|
.left-\[11\%\] {
|
|
85
97
|
left: 11%;
|
|
86
98
|
}
|
|
@@ -309,6 +321,9 @@
|
|
|
309
321
|
.h-\[20px\] {
|
|
310
322
|
height: 20px;
|
|
311
323
|
}
|
|
324
|
+
.h-\[22px\] {
|
|
325
|
+
height: 22px;
|
|
326
|
+
}
|
|
312
327
|
.h-\[24px\] {
|
|
313
328
|
height: 24px;
|
|
314
329
|
}
|
|
@@ -372,6 +387,9 @@
|
|
|
372
387
|
.w-\[100px\] {
|
|
373
388
|
width: 100px;
|
|
374
389
|
}
|
|
390
|
+
.w-\[115px\] {
|
|
391
|
+
width: 115px;
|
|
392
|
+
}
|
|
375
393
|
.w-\[120px\] {
|
|
376
394
|
width: 120px;
|
|
377
395
|
}
|
|
@@ -451,6 +469,9 @@
|
|
|
451
469
|
.\[grid-template-columns\:22\%_28\%_2\.5\%_24\%_15\.5\%\] {
|
|
452
470
|
grid-template-columns: 22% 28% 2.5% 24% 15.5%;
|
|
453
471
|
}
|
|
472
|
+
.grid-cols-2 {
|
|
473
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
474
|
+
}
|
|
454
475
|
.grid-cols-\[0\.8fr_auto_26\%_1fr\] {
|
|
455
476
|
grid-template-columns: 0.8fr auto 26% 1fr;
|
|
456
477
|
}
|
|
@@ -502,6 +523,9 @@
|
|
|
502
523
|
.gap-\[2px\] {
|
|
503
524
|
gap: 2px;
|
|
504
525
|
}
|
|
526
|
+
.gap-\[3px\] {
|
|
527
|
+
gap: 3px;
|
|
528
|
+
}
|
|
505
529
|
.gap-\[3rem\] {
|
|
506
530
|
gap: 3rem;
|
|
507
531
|
}
|
|
@@ -925,6 +949,9 @@
|
|
|
925
949
|
.capitalize {
|
|
926
950
|
text-transform: capitalize;
|
|
927
951
|
}
|
|
952
|
+
.normal-case {
|
|
953
|
+
text-transform: none;
|
|
954
|
+
}
|
|
928
955
|
.uppercase {
|
|
929
956
|
text-transform: uppercase;
|
|
930
957
|
}
|
|
@@ -8,6 +8,7 @@ function KuposButton({ isSoldOut, isLoading, buttonColor, buyLabel, soldOutLabel
|
|
|
8
8
|
} },
|
|
9
9
|
React.createElement("span", { className: "min-w-[75px] flex justify-center items-center bold-text uppercase gap-[5px]" },
|
|
10
10
|
isSoldOut ? soldOutIcon : null,
|
|
11
|
-
isLoading ? (React.createElement("span", { className: "loader-circle" })) : !isSoldOut ? (buyLabel) : (soldOutLabel))
|
|
11
|
+
isLoading ? (React.createElement("span", { className: "loader-circle" })) : !isSoldOut ? (React.createElement("span", { className: "normal-case" }, buyLabel.charAt(0).toUpperCase() + buyLabel.slice(1).toLowerCase())) : (React.createElement("span", { className: "normal-case" }, soldOutLabel.charAt(0).toUpperCase() +
|
|
12
|
+
soldOutLabel.slice(1).toLowerCase())))));
|
|
12
13
|
}
|
|
13
14
|
export default KuposButton;
|
|
@@ -9,11 +9,12 @@ interface SeatSectionProps {
|
|
|
9
9
|
availableSeats: number;
|
|
10
10
|
isSoldOut: boolean;
|
|
11
11
|
priceColor?: string;
|
|
12
|
+
dpSeatColor?: string;
|
|
12
13
|
currencySign?: string;
|
|
13
14
|
removeDuplicateSeats?: boolean;
|
|
14
15
|
isPeru?: boolean;
|
|
15
16
|
serviceItem?: any;
|
|
16
17
|
renderIcon?: (iconKey: string, size?: string) => React.ReactNode;
|
|
17
18
|
}
|
|
18
|
-
declare function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currencySign, removeDuplicateSeats, isPeru, serviceItem, renderIcon, }: SeatSectionProps): React.ReactElement;
|
|
19
|
+
declare function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currencySign, removeDuplicateSeats, isPeru, serviceItem, renderIcon, dpSeatColor, }: SeatSectionProps): React.ReactElement;
|
|
19
20
|
export default SeatSection;
|
|
@@ -54,7 +54,7 @@ function getUniqueSeats(seatTypes) {
|
|
|
54
54
|
function getNumberOfSeats(seatTypes) {
|
|
55
55
|
return seatTypes.filter((val) => !SEAT_EXCEPTIONS.includes(val.label)).length;
|
|
56
56
|
}
|
|
57
|
-
function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currencySign, removeDuplicateSeats, isPeru, serviceItem, renderIcon, }) {
|
|
57
|
+
function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currencySign, removeDuplicateSeats, isPeru, serviceItem, renderIcon, dpSeatColor, }) {
|
|
58
58
|
const uniqueSeats = getUniqueSeats(seatTypes);
|
|
59
59
|
const sortedSeatTypes = getSortedSeatTypes(seatTypes);
|
|
60
60
|
const numberOfSeats = getNumberOfSeats(seatTypes);
|
|
@@ -116,14 +116,63 @@ function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currenc
|
|
|
116
116
|
}
|
|
117
117
|
return renderSeatNames();
|
|
118
118
|
};
|
|
119
|
+
if (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) {
|
|
120
|
+
const dpSeats = (removeDuplicateSeats ? uniqueSeats : sortedSeatTypes).filter((s) => !SEAT_EXCEPTIONS.includes(s.label));
|
|
121
|
+
const lowestFare = dpSeats.length > 0 ? Math.min(...dpSeats.map((s) => Number(s.price))) : 0;
|
|
122
|
+
return (React.createElement("div", { className: "flex items-center justify-between text-[13.33px] " },
|
|
123
|
+
React.createElement("div", null,
|
|
124
|
+
React.createElement("span", { className: "text-[13.33px] font-normal leading-[24px] text-[#464647]" }, "Desde")),
|
|
125
|
+
React.createElement("div", null,
|
|
126
|
+
React.createElement("span", { className: "flex items-center gap-[6px] text-[22px] bold-text leading-[30px] relative", style: { color: isSoldOut ? "#c0c0c0" : dpSeatColor } },
|
|
127
|
+
React.createElement("div", { className: "absolute bottom-[85%]" },
|
|
128
|
+
React.createElement("span", { className: "rounded-[100px] bg-[#ff5964] px-[6px] w-fit text-[12px] bold-text leading-[20px] text-white", style: {
|
|
129
|
+
animation: "pulse-zoom 2s ease-in-out infinite",
|
|
130
|
+
whiteSpace: "nowrap",
|
|
131
|
+
color: dpSeatColor,
|
|
132
|
+
} }, "Mejor precio")),
|
|
133
|
+
React.createElement("div", { className: "absolute -left-[20px]" }, renderIcon("fireIcon", "16px")),
|
|
134
|
+
availableSeats <= 0
|
|
135
|
+
? CommonService.currency(0, currencySign)
|
|
136
|
+
: CommonService.discountedCurrency(lowestFare, currencySign))))
|
|
137
|
+
// <div className="flex items-center justify-between text-[13.33px]">
|
|
138
|
+
// <span className="text-[13.33px] font-normal leading-[24px] text-[#464647]">
|
|
139
|
+
// Desde
|
|
140
|
+
// </span>
|
|
141
|
+
// <div className="flex flex-col items-center gap-[2px]">
|
|
142
|
+
// <span
|
|
143
|
+
// className="rounded-[100px] bg-[#ff5964] px-[6px] w-fit text-[12px] bold-text leading-[20px] text-white"
|
|
144
|
+
// style={{
|
|
145
|
+
// animation: "pulse-zoom 2s ease-in-out infinite",
|
|
146
|
+
// whiteSpace: "nowrap",
|
|
147
|
+
// color: dpSeatColor,
|
|
148
|
+
// }}
|
|
149
|
+
// >
|
|
150
|
+
// Mejor precio
|
|
151
|
+
// </span>
|
|
152
|
+
// <span
|
|
153
|
+
// className="flex items-center gap-[6px] text-[22px] bold-text leading-[30px] relative"
|
|
154
|
+
// style={{ color: isSoldOut ? "#c0c0c0" : dpSeatColor }}
|
|
155
|
+
// >
|
|
156
|
+
// <div className="absolute -left-[20px]">
|
|
157
|
+
// {renderIcon("fireIcon", "16px")}
|
|
158
|
+
// </div>
|
|
159
|
+
// {availableSeats <= 0
|
|
160
|
+
// ? CommonService.currency(0, currencySign)
|
|
161
|
+
// : CommonService.discountedCurrency(lowestFare, currencySign)}
|
|
162
|
+
// </span>
|
|
163
|
+
// </div>
|
|
164
|
+
// </div>
|
|
165
|
+
);
|
|
166
|
+
}
|
|
119
167
|
if (hasDiscount && discountSeat) {
|
|
120
|
-
return (React.createElement("div", { className: "grid
|
|
168
|
+
return (React.createElement("div", { className: "grid grid-cols-2 items-center text-[13.33px] relative" },
|
|
121
169
|
React.createElement("div", { className: "col-start-1 row-start-2 flex items-center" },
|
|
122
|
-
React.createElement("span", { className: "text-[13.33px] font-normal leading-[22px] text-[#
|
|
123
|
-
React.createElement("div", { className: "col-start-1 row-start-3 flex h-[
|
|
124
|
-
React.createElement("span", { className: "text-[13.33px] font-normal leading-[
|
|
125
|
-
React.createElement("div", { className: "col-start-2 row-start-1 flex items-center justify-center absolute", style: { top: "-22px",
|
|
170
|
+
React.createElement("span", { className: "text-[13.33px] font-normal leading-[22px] text-[#ccc]" }, "Antes")),
|
|
171
|
+
React.createElement("div", { className: "col-start-1 row-start-3 flex h-[20px] items-end" },
|
|
172
|
+
React.createElement("span", { className: "text-[13.33px] font-normal leading-[20px] text-[#464647]" }, "Desde")),
|
|
173
|
+
React.createElement("div", { className: "col-start-2 row-start-1 flex items-center justify-center absolute", style: { top: "-22px", left: "50%", transform: "translateX(-50%)" } }, discountValue != null && (React.createElement("span", { className: "rounded-[100px] bg-[#ff5964] px-[6px] text-[12px] bold-text leading-[20px] text-white", style: {
|
|
126
174
|
animation: "pulse-zoom 2s ease-in-out infinite",
|
|
175
|
+
whiteSpace: "nowrap",
|
|
127
176
|
} },
|
|
128
177
|
discountValue,
|
|
129
178
|
"% OFF"))),
|
|
@@ -142,9 +191,9 @@ function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currenc
|
|
|
142
191
|
transform: "rotate(-10deg)",
|
|
143
192
|
transformOrigin: "center",
|
|
144
193
|
} }))),
|
|
145
|
-
React.createElement("div", { className: "col-start-2 row-start-3 flex h-[30px] items-end justify-center" },
|
|
194
|
+
React.createElement("div", { className: "col-start-2 row-start-3 flex h-[30px] items-end justify-center relative" },
|
|
146
195
|
React.createElement("span", { className: "flex items-center gap-[6px] text-[22px] bold-text leading-[30px]", style: { color: isSoldOut ? "#c0c0c0" : "#ff5964" } },
|
|
147
|
-
renderIcon("fireIcon", "16px"),
|
|
196
|
+
React.createElement("div", { className: "absolute -left-[8px]" }, renderIcon("fireIcon", "16px")),
|
|
148
197
|
availableSeats <= 0
|
|
149
198
|
? CommonService.currency(0, currencySign)
|
|
150
199
|
: CommonService.discountedCurrency(discountSeat.discountedPrice, currencySign)))));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
const ServiceBadges = ({ showTopLabel, isSoldOut, colors, renderIcon, translation, serviceItem, }) => {
|
|
3
|
-
return (React.createElement("div", { className: "absolute -top-[
|
|
3
|
+
return (React.createElement("div", { className: "absolute -top-[10px] left-0 w-full flex items-center justify-end gap-[12px] pr-[22px] z-10" },
|
|
4
4
|
showTopLabel && (React.createElement("div", { className: `flex items-center gap-[10px] py-[4px] px-[14px] rounded-[38px] text-[12.5px] z-10`, style: {
|
|
5
5
|
backgroundColor: "#fff",
|
|
6
6
|
border: `1px solid ${colors.topLabelColor}`,
|
|
@@ -20,6 +20,7 @@ interface DateTimeSectionMobileProps {
|
|
|
20
20
|
removeDuplicateSeats?: boolean;
|
|
21
21
|
serviceItem?: any;
|
|
22
22
|
tooltipBgColor?: string;
|
|
23
|
+
showLastSeats?: boolean;
|
|
23
24
|
}
|
|
24
|
-
declare function DateTimeSectionMobile({ onBookButtonPress, isCiva, isSoldOut, isLinatal, isPeru, orignLabel, destinationLabel, originIcon, destinationIcon, travelDate, arrivalDate, depTime, arrTime, seatTypes, seatPriceColor, currencySign, availableSeats, removeDuplicateSeats, serviceItem, tooltipBgColor, }: DateTimeSectionMobileProps): React.ReactElement;
|
|
25
|
+
declare function DateTimeSectionMobile({ onBookButtonPress, isCiva, isSoldOut, isLinatal, isPeru, orignLabel, destinationLabel, originIcon, destinationIcon, travelDate, arrivalDate, depTime, arrTime, seatTypes, seatPriceColor, currencySign, availableSeats, removeDuplicateSeats, serviceItem, tooltipBgColor, showLastSeats, }: DateTimeSectionMobileProps): React.ReactElement;
|
|
25
26
|
export default DateTimeSectionMobile;
|
|
@@ -31,7 +31,7 @@ const TimeRow = ({ label, icon, alt, date, timeContent, isSoldOut, }) => (React.
|
|
|
31
31
|
React.createElement("span", { className: "cursor-pointer black-text" }, DateService.getServiceItemDate(date)),
|
|
32
32
|
React.createElement("div", { className: "absolute left-[50%]" }, "\u2022"),
|
|
33
33
|
React.createElement("div", { className: "font-[900] relative black-text" }, timeContent)))));
|
|
34
|
-
function DateTimeSectionMobile({ onBookButtonPress, isCiva, isSoldOut, isLinatal, isPeru, orignLabel, destinationLabel, originIcon, destinationIcon, travelDate, arrivalDate, depTime, arrTime, seatTypes, seatPriceColor, currencySign, availableSeats, removeDuplicateSeats, serviceItem, tooltipBgColor, }) {
|
|
34
|
+
function DateTimeSectionMobile({ onBookButtonPress, isCiva, isSoldOut, isLinatal, isPeru, orignLabel, destinationLabel, originIcon, destinationIcon, travelDate, arrivalDate, depTime, arrTime, seatTypes, seatPriceColor, currencySign, availableSeats, removeDuplicateSeats, serviceItem, tooltipBgColor, showLastSeats, }) {
|
|
35
35
|
const { cleaned: cleanedDepTime, hasAM, hasPM } = getCleanedDepTime(depTime);
|
|
36
36
|
const depTimeContent = isLinatal ? (React.createElement("div", null,
|
|
37
37
|
React.createElement("span", null,
|
|
@@ -52,6 +52,6 @@ function DateTimeSectionMobile({ onBookButtonPress, isCiva, isSoldOut, isLinatal
|
|
|
52
52
|
backgroundColor: "#ccc",
|
|
53
53
|
margin: "auto",
|
|
54
54
|
} }),
|
|
55
|
-
React.createElement(SeatSectionMobile, { seatTypes: seatTypes, isSoldOut: isSoldOut, isPeru: isPeru, seatPriceColor: seatPriceColor, currencySign: currencySign, availableSeats: availableSeats, removeDuplicateSeats: removeDuplicateSeats, serviceItem: serviceItem, tooltipBgColor: tooltipBgColor })));
|
|
55
|
+
React.createElement(SeatSectionMobile, { seatTypes: seatTypes, isSoldOut: isSoldOut, isPeru: isPeru, seatPriceColor: seatPriceColor, currencySign: currencySign, availableSeats: availableSeats, removeDuplicateSeats: removeDuplicateSeats, serviceItem: serviceItem, tooltipBgColor: tooltipBgColor, showLastSeats: showLastSeats })));
|
|
56
56
|
}
|
|
57
57
|
export default DateTimeSectionMobile;
|
|
@@ -14,6 +14,7 @@ interface SeatSectionMobileProps {
|
|
|
14
14
|
removeDuplicateSeats?: boolean;
|
|
15
15
|
serviceItem?: any;
|
|
16
16
|
tooltipBgColor?: string;
|
|
17
|
+
showLastSeats?: boolean;
|
|
17
18
|
}
|
|
18
|
-
declare function SeatSectionMobile({ seatTypes: seatTypesData, isSoldOut, isPeru, seatPriceColor, currencySign, availableSeats, removeDuplicateSeats, serviceItem, tooltipBgColor, }: SeatSectionMobileProps): React.ReactElement;
|
|
19
|
+
declare function SeatSectionMobile({ seatTypes: seatTypesData, isSoldOut, isPeru, seatPriceColor, currencySign, availableSeats, removeDuplicateSeats, serviceItem, tooltipBgColor, showLastSeats, }: SeatSectionMobileProps): React.ReactElement;
|
|
19
20
|
export default SeatSectionMobile;
|