kupos-ui-components-lib 9.7.1 → 9.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/images/anims/service_list/users_anim.json +1 -0
- package/dist/components/ServiceItem/ServiceItemDesktop.js +5 -1
- package/dist/components/ServiceItem/ServiceItemMobile.d.ts +1 -1
- package/dist/components/ServiceItem/ServiceItemMobile.js +16 -7
- package/dist/components/ServiceItem/mobileTypes.d.ts +27 -0
- package/dist/components/ServiceItem/types.d.ts +5 -0
- package/dist/styles.css +18 -6
- package/dist/ui/FeaturServiceUiMobile/FeatureServiceUiMobile.d.ts +18 -0
- package/dist/ui/FeaturServiceUiMobile/FeatureServiceUiMobile.js +233 -0
- package/dist/ui/FeatureServiceUI/FeatureServiceUi.d.ts +1 -2
- package/dist/ui/FeatureServiceUI/FeatureServiceUi.js +55 -69
- package/dist/ui/SeatSection/SeatSection.js +1 -1
- package/package.json +1 -1
- package/src/assets/images/anims/service_list/users_anim.json +1 -0
- package/src/components/ServiceItem/ServiceItemDesktop.tsx +4 -1
- package/src/components/ServiceItem/ServiceItemMobile.tsx +331 -286
- package/src/components/ServiceItem/mobileTypes.ts +22 -0
- package/src/components/ServiceItem/types.ts +6 -1
- package/src/ui/FeaturServiceUiMobile/FeatureServiceUiMobile.tsx +790 -0
- package/src/ui/FeatureServiceUI/FeatureServiceUi.tsx +56 -201
- package/src/ui/SeatSection/SeatSection.tsx +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"nm":"Main Scene","ddd":0,"h":512,"w":512,"meta":{"g":"@lottiefiles/creator@1.90.1"},"layers":[{"ty":2,"nm":"111","sr":1,"st":0,"op":150,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[54.49996512276783,38.99999128069197]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[436.62,436.62],"t":0},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[300,300],"t":58},{"s":[436.62,436.62],"t":112}]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[255.99996512276783,255.99999128069197]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[70],"t":58},{"s":[100],"t":112}]}},"refId":"111_b9bb56d2-8f3c-4772-b1ac-9caf81e5c707","ind":1}],"v":"5.7.0","fr":30,"op":114,"ip":0,"assets":[{"id":"111_b9bb56d2-8f3c-4772-b1ac-9caf81e5c707","e":1,"w":109,"h":78,"p":"data:image/png;base64,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","u":""}]}
|
|
@@ -23,6 +23,7 @@ import bombAnimation from "../../assets/images/anims/service_list/bomb.json";
|
|
|
23
23
|
import dotAnimation from "../../assets/images/anims/service_list/dot_animation.json";
|
|
24
24
|
import starAnimation from "../../assets/images/anims/service_list/star_anim.json";
|
|
25
25
|
import femaleAnimation from "../../assets/images/anims/service_list/female_anim.json";
|
|
26
|
+
import usersAnimation from "../../assets/images/anims/service_list/users_anim.json";
|
|
26
27
|
import RatingBlock from "../../ui/RatingBlock";
|
|
27
28
|
import DurationBlock from "../../ui/DurationBlock";
|
|
28
29
|
import PetBlock from "../../ui/PetBlock";
|
|
@@ -78,6 +79,9 @@ const ANIMATION_MAP = {
|
|
|
78
79
|
femaaleAnimation: {
|
|
79
80
|
kupos: femaleAnimation,
|
|
80
81
|
},
|
|
82
|
+
usersAnimation: {
|
|
83
|
+
kupos: usersAnimation,
|
|
84
|
+
},
|
|
81
85
|
};
|
|
82
86
|
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, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, }) {
|
|
83
87
|
var _a;
|
|
@@ -248,7 +252,7 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
|
|
|
248
252
|
},
|
|
249
253
|
];
|
|
250
254
|
const otherItems = items.filter((i) => i.key !== "pet" && i.key !== "flexible" && !!i.condition);
|
|
251
|
-
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 })) : isNewUi ? (React.createElement(FeatureServiceUi, { serviceItem: serviceItem, showTopLabel: showTopLabel,
|
|
255
|
+
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 })) : isNewUi ? (React.createElement(FeatureServiceUi, { serviceItem: serviceItem, showTopLabel: showTopLabel, isSoldOut: isSoldOut, getAnimationIcon: getAnimationIcon, cityOrigin: cityOrigin, cityDestination: cityDestination, renderIcon: renderIcon, viewersConfig: viewersConfig, isFeatureDropDownExpand: isFeatureDropDownExpand, ticketQuantity: ticketQuantity, onIncreaseTicketQuantity: onIncreaseTicketQuantity, onDecreaseTicketQuantity: onDecreaseTicketQuantity, onBookButtonPress: onBookButtonPress, onToggleExpand: () => setIsFeatureDropDownExpand &&
|
|
252
256
|
setIsFeatureDropDownExpand(isFeatureDropDownExpand === serviceItem.id ||
|
|
253
257
|
isFeatureDropDownExpand === true
|
|
254
258
|
? 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, }: 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, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, cityOrigin, cityDestination, isNewUi, }: MobileServiceItemProps): React.ReactElement;
|
|
4
4
|
export default ServiceItemMobile;
|
|
@@ -5,6 +5,7 @@ import BottomAmenitiesMobile from "../../ui/mobileweb/BottomAmenitiesMobile";
|
|
|
5
5
|
import DateTimeSectionMobile from "../../ui/mobileweb/DateTimeSectionMobile";
|
|
6
6
|
import ExpandedDropdownMobile from "../../ui/mobileweb/ExpandedDropdownMobile";
|
|
7
7
|
import ServiceBadgesMobile from "../../ui/mobileweb/ServiceBadgesMobile";
|
|
8
|
+
import FeatureServiceUiMobile from "../../ui/FeaturServiceUiMobile/FeatureServiceUiMobile";
|
|
8
9
|
const SEAT_EXCEPTIONS = ["Asiento mascota"];
|
|
9
10
|
const exceptions = [
|
|
10
11
|
"gy",
|
|
@@ -17,7 +18,7 @@ const exceptions = [
|
|
|
17
18
|
"blanco",
|
|
18
19
|
"asiento_mascota",
|
|
19
20
|
];
|
|
20
|
-
function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, orignLabel, destinationLabel, amenitiesData, setShowDropdown, showDropdown, isExpanded, setIsExpanded, setAmenetiesAtomValue, isCiva, currencySign, isPeru, showRating, showLastSeats, removeDuplicateSeats, isLinatal, viewersConfig, }) {
|
|
21
|
+
function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, orignLabel, destinationLabel, amenitiesData, setShowDropdown, showDropdown, isExpanded, setIsExpanded, setAmenetiesAtomValue, isCiva, currencySign, isPeru, showRating, showLastSeats, removeDuplicateSeats, isLinatal, viewersConfig, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, cityOrigin, cityDestination, isNewUi, }) {
|
|
21
22
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
22
23
|
const isItemExpanded = serviceItem.id === isExpanded;
|
|
23
24
|
const isPetSeat = (Object.keys(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.pet_seat_info) || []).length > 0;
|
|
@@ -87,7 +88,11 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
|
|
|
87
88
|
if (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_transpordo) {
|
|
88
89
|
isConexion = true;
|
|
89
90
|
}
|
|
90
|
-
return (React.createElement(
|
|
91
|
+
return (React.createElement(React.Fragment, null, isNewUi ? (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: onBookButtonPress, onToggleExpand: () => setIsFeatureDropDownExpand &&
|
|
92
|
+
setIsFeatureDropDownExpand(isFeatureDropDownExpand === serviceItem.id ||
|
|
93
|
+
isFeatureDropDownExpand === true
|
|
94
|
+
? null
|
|
95
|
+
: serviceItem.id) })) : (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) ||
|
|
91
96
|
isConexion ||
|
|
92
97
|
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.train_type_label) === "Tren Express (Nuevo)" ||
|
|
93
98
|
showTopLabel
|
|
@@ -108,7 +113,9 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
|
|
|
108
113
|
React.createElement("div", { className: "flex items-center" },
|
|
109
114
|
React.createElement("img", { src: serviceItem.icons.rating, alt: "origin", className: `w-[12px] h-[12px] mr-[4px] object-contain ${isSoldOut ? "grayscale" : ""}` }),
|
|
110
115
|
React.createElement("span", { style: { lineHeight: "normal" } }, getServiceStars(serviceItem))),
|
|
111
|
-
React.createElement("div", { className: "flex items-center cursor-pointer ", style: {
|
|
116
|
+
React.createElement("div", { className: "flex items-center cursor-pointer ", style: {
|
|
117
|
+
color: isSoldOut ? "#bbb" : "text-[#464647]",
|
|
118
|
+
} },
|
|
112
119
|
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)),
|
|
113
120
|
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, discountSeatPriceColor: colors.discountSeatPriceColor }),
|
|
114
121
|
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)),
|
|
@@ -123,7 +130,9 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
|
|
|
123
130
|
React.createElement(ServiceBadgesMobile, { showTopLabel: showTopLabel, isSoldOut: isSoldOut, colors: colors, renderIcon: renderIcon, serviceItem: serviceItem, isConexion: isConexion })),
|
|
124
131
|
((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled)) &&
|
|
125
132
|
!isSoldOut && (React.createElement("div", { className: "px-[12px] pt-[22px] pb-[8px] relative -z-9 -mt-[15px]", style: {
|
|
126
|
-
background: isSoldOut
|
|
133
|
+
background: isSoldOut
|
|
134
|
+
? offerGradientWithOpacity
|
|
135
|
+
: offerGradient,
|
|
127
136
|
// opacity: isSoldOut ? 0.5 : 1,
|
|
128
137
|
borderRadius: "0 0 14px 14px",
|
|
129
138
|
zIndex: -1,
|
|
@@ -131,8 +140,8 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
|
|
|
131
140
|
React.createElement("div", { className: "flex flex-col gap-[8px] text-[12px] min-[420px]:text-[12px] text-[#464647]", style: { lineHeight: 1.6 } },
|
|
132
141
|
React.createElement("div", { className: "flex justify-between items-center" },
|
|
133
142
|
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) &&
|
|
134
|
-
Object.keys((_f = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.dp_discount_percents) !== null && _f !== void 0 ? _f : {})
|
|
135
|
-
0 &&
|
|
143
|
+
Object.keys((_f = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.dp_discount_percents) !== null && _f !== void 0 ? _f : {})
|
|
144
|
+
.length === 0 &&
|
|
136
145
|
((_g = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.dp_discounted_seats) !== null && _g !== void 0 ? _g : []).length === 0 ? (React.createElement("div", { className: "flex items-center gap-[6px]" },
|
|
137
146
|
React.createElement(LottiePlayer, { animationData: serviceItem.icons.starAnimation, width: "14px", height: "14px" }),
|
|
138
147
|
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"}` },
|
|
@@ -180,6 +189,6 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
|
|
|
180
189
|
zIndex: (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) ? -3 : undefined,
|
|
181
190
|
marginTop: (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) ? "-15px" : "-10px",
|
|
182
191
|
} },
|
|
183
|
-
React.createElement(ExpandedDropdownMobile, { serviceItem: serviceItem, isPeru: isPeru, petSeatInfo: serviceItem.pet_seat_info, petFriendlyAnim: serviceItem.icons.petFriendlyAnim, isSoldOut: isSoldOut, isChangeTicket: serviceItem.is_change_ticket === true, ladiesBookedSeats: serviceItem.ladies_booked_seats, isDpEnabled: serviceItem.is_dp_enabled, femaleAnim: serviceItem.icons.femaleAnim, flexibleAnim: serviceItem.icons.flexibleAnim, renderIcon: renderIcon })))));
|
|
192
|
+
React.createElement(ExpandedDropdownMobile, { serviceItem: serviceItem, isPeru: isPeru, petSeatInfo: serviceItem.pet_seat_info, petFriendlyAnim: serviceItem.icons.petFriendlyAnim, isSoldOut: isSoldOut, isChangeTicket: serviceItem.is_change_ticket === true, ladiesBookedSeats: serviceItem.ladies_booked_seats, isDpEnabled: serviceItem.is_dp_enabled, femaleAnim: serviceItem.icons.femaleAnim, flexibleAnim: serviceItem.icons.flexibleAnim, renderIcon: renderIcon })))))));
|
|
184
193
|
}
|
|
185
194
|
export default ServiceItemMobile;
|
|
@@ -125,6 +125,19 @@ export interface MobileServiceItemProps {
|
|
|
125
125
|
whiteFireIcon?: string;
|
|
126
126
|
femaleAnim?: string;
|
|
127
127
|
cancelTicketIcon?: string;
|
|
128
|
+
thunderAnim?: string;
|
|
129
|
+
personsAnim?: string;
|
|
130
|
+
whiteOrigin?: string;
|
|
131
|
+
whiteDestination?: string;
|
|
132
|
+
userIcon?: string;
|
|
133
|
+
sheildIcon?: string;
|
|
134
|
+
busIcon?: string;
|
|
135
|
+
whiteDownArrow?: string;
|
|
136
|
+
empressaIcon?: string;
|
|
137
|
+
flexibleIcon?: string;
|
|
138
|
+
listoIcon?: string;
|
|
139
|
+
precioIcon?: string;
|
|
140
|
+
confirmarIcon?: string;
|
|
128
141
|
[key: string]: string | Record<string, string | undefined> | undefined;
|
|
129
142
|
};
|
|
130
143
|
useLottieFor?: string[];
|
|
@@ -184,4 +197,18 @@ export interface MobileServiceItemProps {
|
|
|
184
197
|
label?: string;
|
|
185
198
|
icon?: string;
|
|
186
199
|
};
|
|
200
|
+
isFeatureDropDownExpand?: any;
|
|
201
|
+
setIsFeatureDropDownExpand?: (value: any) => void;
|
|
202
|
+
ticketQuantity?: number;
|
|
203
|
+
onIncreaseTicketQuantity?: (serviceItem: MobileServiceItemProps["serviceItem"]) => void;
|
|
204
|
+
onDecreaseTicketQuantity?: (serviceItem: MobileServiceItemProps["serviceItem"]) => void;
|
|
205
|
+
cityOrigin?: {
|
|
206
|
+
value: number;
|
|
207
|
+
label: string;
|
|
208
|
+
};
|
|
209
|
+
cityDestination?: {
|
|
210
|
+
value: number;
|
|
211
|
+
label: string;
|
|
212
|
+
};
|
|
213
|
+
isNewUi?: boolean;
|
|
187
214
|
}
|
|
@@ -135,6 +135,11 @@ export interface ServiceItemProps {
|
|
|
135
135
|
sheildIcon?: string;
|
|
136
136
|
busIcon?: string;
|
|
137
137
|
whiteDownArrow?: string;
|
|
138
|
+
empressaIcon?: string;
|
|
139
|
+
flexibleIcon?: string;
|
|
140
|
+
listoIcon?: string;
|
|
141
|
+
precioIcon?: string;
|
|
142
|
+
confirmarIcon?: string;
|
|
138
143
|
[key: string]: string | Record<string, string | undefined> | undefined;
|
|
139
144
|
};
|
|
140
145
|
useLottieFor?: string[];
|
package/dist/styles.css
CHANGED
|
@@ -174,6 +174,9 @@
|
|
|
174
174
|
.m-\[auto\] {
|
|
175
175
|
margin: auto;
|
|
176
176
|
}
|
|
177
|
+
.mx-\[10px\] {
|
|
178
|
+
margin-inline: 10px;
|
|
179
|
+
}
|
|
177
180
|
.mx-auto {
|
|
178
181
|
margin-inline: auto;
|
|
179
182
|
}
|
|
@@ -207,6 +210,9 @@
|
|
|
207
210
|
.mt-\[10px\] {
|
|
208
211
|
margin-top: 10px;
|
|
209
212
|
}
|
|
213
|
+
.mt-\[12px\] {
|
|
214
|
+
margin-top: 12px;
|
|
215
|
+
}
|
|
210
216
|
.mt-\[13px\] {
|
|
211
217
|
margin-top: 13px;
|
|
212
218
|
}
|
|
@@ -396,9 +402,6 @@
|
|
|
396
402
|
.w-\[20px\] {
|
|
397
403
|
width: 20px;
|
|
398
404
|
}
|
|
399
|
-
.w-\[30px\] {
|
|
400
|
-
width: 30px;
|
|
401
|
-
}
|
|
402
405
|
.w-\[34px\] {
|
|
403
406
|
width: 34px;
|
|
404
407
|
}
|
|
@@ -584,6 +587,9 @@
|
|
|
584
587
|
.gap-\[2px\] {
|
|
585
588
|
gap: 2px;
|
|
586
589
|
}
|
|
590
|
+
.gap-\[3px\] {
|
|
591
|
+
gap: 3px;
|
|
592
|
+
}
|
|
587
593
|
.gap-\[3rem\] {
|
|
588
594
|
gap: 3rem;
|
|
589
595
|
}
|
|
@@ -987,6 +993,12 @@
|
|
|
987
993
|
.text-\[14px\] {
|
|
988
994
|
font-size: 14px;
|
|
989
995
|
}
|
|
996
|
+
.text-\[15px\] {
|
|
997
|
+
font-size: 15px;
|
|
998
|
+
}
|
|
999
|
+
.text-\[16px\] {
|
|
1000
|
+
font-size: 16px;
|
|
1001
|
+
}
|
|
990
1002
|
.text-\[17\.33px\] {
|
|
991
1003
|
font-size: 17.33px;
|
|
992
1004
|
}
|
|
@@ -1076,9 +1088,6 @@
|
|
|
1076
1088
|
.text-\[\#666\] {
|
|
1077
1089
|
color: #666;
|
|
1078
1090
|
}
|
|
1079
|
-
.text-\[\#171717\] {
|
|
1080
|
-
color: #171717;
|
|
1081
|
-
}
|
|
1082
1091
|
.text-\[\#272727\] {
|
|
1083
1092
|
color: #272727;
|
|
1084
1093
|
}
|
|
@@ -1106,6 +1115,9 @@
|
|
|
1106
1115
|
.text-\[red\] {
|
|
1107
1116
|
color: red;
|
|
1108
1117
|
}
|
|
1118
|
+
.text-\[white\] {
|
|
1119
|
+
color: white;
|
|
1120
|
+
}
|
|
1109
1121
|
.capitalize {
|
|
1110
1122
|
text-transform: capitalize;
|
|
1111
1123
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const FeatureServiceUiMobile: ({ serviceItem, showTopLabel, colors, isSoldOut, cityOrigin, cityDestination, renderIcon, viewersConfig, isFeatureDropDownExpand, onToggleExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onBookButtonPress, }: {
|
|
3
|
+
serviceItem: any;
|
|
4
|
+
showTopLabel: any;
|
|
5
|
+
colors: any;
|
|
6
|
+
isSoldOut: any;
|
|
7
|
+
cityOrigin: any;
|
|
8
|
+
cityDestination: any;
|
|
9
|
+
renderIcon: any;
|
|
10
|
+
viewersConfig: any;
|
|
11
|
+
isFeatureDropDownExpand: any;
|
|
12
|
+
onToggleExpand: any;
|
|
13
|
+
ticketQuantity?: number;
|
|
14
|
+
onIncreaseTicketQuantity: any;
|
|
15
|
+
onDecreaseTicketQuantity: any;
|
|
16
|
+
onBookButtonPress: any;
|
|
17
|
+
}) => React.JSX.Element;
|
|
18
|
+
export default FeatureServiceUiMobile;
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import LottiePlayer from "../../assets/LottiePlayer";
|
|
3
|
+
import commonService from "../../utils/CommonService";
|
|
4
|
+
const HARDCODED_OPERATORS = [
|
|
5
|
+
{
|
|
6
|
+
logo: "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4e/Turbus_logo.svg/320px-Turbus_logo.svg.png",
|
|
7
|
+
name: "Turbus",
|
|
8
|
+
time: "7:00 am",
|
|
9
|
+
seatsAvailable: "3 disponibles",
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
logo: "https://upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Pullman_Bus_logo.svg/320px-Pullman_Bus_logo.svg.png",
|
|
13
|
+
name: "Pullmanbus",
|
|
14
|
+
time: "8:00 am",
|
|
15
|
+
seatsAvailable: "5 disponibles",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
logo: "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4e/Turbus_logo.svg/320px-Turbus_logo.svg.png",
|
|
19
|
+
name: "Expreso Santa C...",
|
|
20
|
+
time: "9:00 am",
|
|
21
|
+
seatsAvailable: "3 disponibles",
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
const HARDCODED_COUNTDOWN = "09:55";
|
|
25
|
+
const HOW_IT_WORKS_STEPS = [
|
|
26
|
+
{
|
|
27
|
+
icon: "flexible",
|
|
28
|
+
name: "1. Salida flexible",
|
|
29
|
+
text: "Viajas en un horario entre las 07:00 y las 10:00 AM del día elegido.",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
icon: "bus",
|
|
33
|
+
name: "2. Empresa asignada",
|
|
34
|
+
text: "Una de las empresas disponibles confirma tu viaje una vez pagado.",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
icon: "price",
|
|
38
|
+
name: "3. Precio garantizado",
|
|
39
|
+
text: "Al seleccionar este servicio aseguras el precio reducido.",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
icon: "ticket",
|
|
43
|
+
name: "4. ¡Listo!",
|
|
44
|
+
text: "Recibe todos los detalles de tu viaje al instante tras la compra.",
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
const FeatureServiceUiMobile = ({ serviceItem, showTopLabel, colors, isSoldOut, cityOrigin, cityDestination, renderIcon, viewersConfig, isFeatureDropDownExpand, onToggleExpand, ticketQuantity = 1, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onBookButtonPress, }) => {
|
|
48
|
+
var _a, _b, _c, _d;
|
|
49
|
+
const operators = ((_a = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.operators) === null || _a === void 0 ? void 0 : _a.length) > 0
|
|
50
|
+
? serviceItem.operators
|
|
51
|
+
: HARDCODED_OPERATORS;
|
|
52
|
+
const isItemExpanded = serviceItem.id === isFeatureDropDownExpand ||
|
|
53
|
+
isFeatureDropDownExpand === true;
|
|
54
|
+
const canDecreaseTicketQuantity = ticketQuantity > 1;
|
|
55
|
+
const HOW_IT_WORKS_STEPS = [
|
|
56
|
+
{
|
|
57
|
+
icon: "flexible",
|
|
58
|
+
name: "1. Salida flexible",
|
|
59
|
+
text: "Viajas en un horario entre las 07:00 y las 10:00 AM del día elegido.",
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
icon: "bus",
|
|
63
|
+
name: "2. Empresa asignada",
|
|
64
|
+
text: "Una de las empresas disponibles confirma tu viaje una vez pagado.",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
icon: "price",
|
|
68
|
+
name: "3. Precio garantizado",
|
|
69
|
+
text: "Al seleccionar este servicio aseguras el precio reducido.",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
icon: "ticket",
|
|
73
|
+
name: "4. ¡Listo!",
|
|
74
|
+
text: "Recibe todos los detalles de tu viaje al instante tras la compra.",
|
|
75
|
+
},
|
|
76
|
+
];
|
|
77
|
+
const FeatureStepIcon = ({ icon }) => {
|
|
78
|
+
switch (icon) {
|
|
79
|
+
case "flexible":
|
|
80
|
+
return renderIcon("flexibleIcon", "20px");
|
|
81
|
+
case "bus":
|
|
82
|
+
return renderIcon("empressaIcon", "20px");
|
|
83
|
+
case "price":
|
|
84
|
+
return renderIcon("precioIcon", "20px");
|
|
85
|
+
default:
|
|
86
|
+
return renderIcon("listoIcon", "20px");
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
return (React.createElement("div", {
|
|
90
|
+
// ${
|
|
91
|
+
// serviceItem.offer_text ? "mb-[55px]" : "mb-[10px]"
|
|
92
|
+
// }
|
|
93
|
+
className: `relative mb-[10px]
|
|
94
|
+
${(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ||
|
|
95
|
+
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.train_type_label) === "Tren Express (Nuevo)" ||
|
|
96
|
+
showTopLabel
|
|
97
|
+
? "mt-[24px]"
|
|
98
|
+
: "mt-[20px]"}` },
|
|
99
|
+
React.createElement("div", { className: "", style: {
|
|
100
|
+
border: "1px solid #c0c0c0",
|
|
101
|
+
padding: "12px",
|
|
102
|
+
borderRadius: "14px",
|
|
103
|
+
} },
|
|
104
|
+
React.createElement("div", { id: `service-card-${serviceItem.id}`, className: "bg-[#0C1421] text-white mx-auto relative rounded-[14px] p-[14px] text-[13.33px]" },
|
|
105
|
+
React.createElement("div", { className: "flex flex-col gap-[10px]" },
|
|
106
|
+
React.createElement("div", { className: "flex justify-between items-center text-[white]" },
|
|
107
|
+
React.createElement("div", { className: "flex flex-col gap-[8px]" },
|
|
108
|
+
React.createElement("div", { className: "flex items-center gap-[8px]" },
|
|
109
|
+
React.createElement("img", { src: (_b = serviceItem.icons) === null || _b === void 0 ? void 0 : _b.whiteOrigin, alt: "origin", className: `w-[14px] h-[14px] shrink-0 ${isSoldOut ? "grayscale" : ""}` }),
|
|
110
|
+
React.createElement("span", { className: "text-[13px] bold-text" }, cityOrigin === null || cityOrigin === void 0 ? void 0 : cityOrigin.label.split(",")[0])),
|
|
111
|
+
React.createElement("div", { className: "flex items-center gap-[8px]" },
|
|
112
|
+
React.createElement("img", { src: (_c = serviceItem.icons) === null || _c === void 0 ? void 0 : _c.whiteDestination, alt: "destination", className: `w-[14px] h-[14px] shrink-0 ${isSoldOut ? "grayscale" : ""}`, style: { opacity: isSoldOut ? 0.5 : 1 } }),
|
|
113
|
+
React.createElement("span", { className: "text-[13px] bold-text" }, cityDestination === null || cityDestination === void 0 ? void 0 : cityDestination.label.split(",")[0]))),
|
|
114
|
+
React.createElement("div", { className: "flex flex-col justify-end gap-[12px] relative mb-[16px]" },
|
|
115
|
+
React.createElement("div", { className: "flex flex-col gap-[3px] items-end" },
|
|
116
|
+
React.createElement("span", { className: "text-[#FF8F45] bold-text text-[16px] leading-tight", style: {
|
|
117
|
+
animation: "pulse-zoom 2s ease-in-out infinite",
|
|
118
|
+
whiteSpace: "nowrap",
|
|
119
|
+
} }, "60% OFF"),
|
|
120
|
+
React.createElement("span", { className: "text-[13.33px] font-normal leading-[20px] text-[#9f9f9f] relative", style: { position: "relative" } },
|
|
121
|
+
"$10.000",
|
|
122
|
+
React.createElement("span", { style: {
|
|
123
|
+
position: "absolute",
|
|
124
|
+
left: "-2px",
|
|
125
|
+
top: "50%",
|
|
126
|
+
width: "calc(100% + 4px)",
|
|
127
|
+
height: "1px",
|
|
128
|
+
backgroundColor: "#FF5C60",
|
|
129
|
+
transform: "rotate(-10deg)",
|
|
130
|
+
transformOrigin: "center",
|
|
131
|
+
} })),
|
|
132
|
+
React.createElement("span", { className: "text-white bold-text text-[22px] leading-none" }, `$${(4000 * ticketQuantity).toLocaleString()}`)))),
|
|
133
|
+
React.createElement("div", null,
|
|
134
|
+
React.createElement("div", { className: "flex items-center text-[white]" },
|
|
135
|
+
React.createElement("span", null, "Vie, 04/11"),
|
|
136
|
+
React.createElement("span", { className: "h-[20px] flex items-center justify-center mx-[10px]" }, "\u2022"),
|
|
137
|
+
React.createElement("span", null, "07:00 AM - 10:00 AM")),
|
|
138
|
+
React.createElement("div", { style: {
|
|
139
|
+
// height: "80px",
|
|
140
|
+
border: "1px solid #363c48",
|
|
141
|
+
backgroundColor: "#1a202e",
|
|
142
|
+
padding: "14px 10px",
|
|
143
|
+
borderRadius: "14px",
|
|
144
|
+
marginTop: "14px",
|
|
145
|
+
} },
|
|
146
|
+
React.createElement("div", { className: "flex flex-col justify-center items-center text-[white]" },
|
|
147
|
+
React.createElement("span", { className: "text-[15px] bold-text" }, "3 operadores compitiendo por tu compra"),
|
|
148
|
+
React.createElement("span", { className: "mt-[8px]" }, "Empresa a confirmar despu\u00E9s de tu pago")),
|
|
149
|
+
React.createElement("div", { className: "grid w-full grid-cols-3 items-stretch gap-[14px] mb-[12px] mt-[12px] text-[white]" }, operators.map((op, idx) => (React.createElement("div", { key: idx, className: "flex min-w-0 flex-col items-center justify-center gap-[8px] rounded-[8px]", style: {
|
|
150
|
+
// height: "80px",
|
|
151
|
+
border: "1px solid #363c48",
|
|
152
|
+
backgroundColor: "#1a202e",
|
|
153
|
+
padding: "14px 10px",
|
|
154
|
+
} },
|
|
155
|
+
React.createElement("img", { src: serviceItem.operator_details[0], alt: op.name, className: `h-[24px] max-w-full object-contain ${isSoldOut ? "grayscale" : ""}` }),
|
|
156
|
+
React.createElement("span", { className: "text-[11px] truncate max-w-full text-center" }, serviceItem.operator_details[2]),
|
|
157
|
+
React.createElement("div", { className: "bg-[#FF8F45] text-[12px] font-bold px-[10px] py-[4px] rounded-[4px] bold-text whitespace-nowrap" },
|
|
158
|
+
React.createElement("span", null, op === null || op === void 0 ? void 0 : op.time)),
|
|
159
|
+
React.createElement("span", { className: "text-[10px] mt-[6px]" }, op === null || op === void 0 ? void 0 : op.seatsAvailable))))),
|
|
160
|
+
React.createElement("div", { className: "flex items-center gap-[4px]" },
|
|
161
|
+
renderIcon("sheildIcon", "14px"),
|
|
162
|
+
React.createElement("span", { className: "text-[white]" }, "Tu asiento confirmado al instante.")))),
|
|
163
|
+
React.createElement("div", null,
|
|
164
|
+
React.createElement("div", { className: "mt-[4px] flex flex-col items-center gap-[8px]" },
|
|
165
|
+
React.createElement("span", { className: "text-[12px] text-[white]" }, "\u00BFCu\u00E1ntos pasajes quieres?"),
|
|
166
|
+
React.createElement("div", { className: "flex w-full items-center justify-between", style: {
|
|
167
|
+
border: "1px solid #363c48",
|
|
168
|
+
backgroundColor: "#1a202e",
|
|
169
|
+
padding: "6px 14px",
|
|
170
|
+
borderRadius: "14px",
|
|
171
|
+
} },
|
|
172
|
+
React.createElement("button", { type: "button", "aria-label": "Disminuir pasajes", disabled: !canDecreaseTicketQuantity, onClick: () => onDecreaseTicketQuantity === null || onDecreaseTicketQuantity === void 0 ? void 0 : onDecreaseTicketQuantity(serviceItem), className: `flex h-[34px] w-[34px] items-center justify-center rounded-full border-none text-[25px] leading-none text-[white] ${canDecreaseTicketQuantity
|
|
173
|
+
? "cursor-pointer bg-[#2d374d]"
|
|
174
|
+
: "cursor-not-allowed bg-[#222b3d] opacity-50"}` }, "-"),
|
|
175
|
+
React.createElement("span", { className: "bold-text text-[20px] text-[white]" }, ticketQuantity),
|
|
176
|
+
React.createElement("button", { type: "button", "aria-label": "Aumentar pasajes", onClick: () => onIncreaseTicketQuantity === null || onIncreaseTicketQuantity === void 0 ? void 0 : onIncreaseTicketQuantity(serviceItem), className: "flex h-[34px] w-[34px] cursor-pointer items-center justify-center rounded-full border-none bg-[#2d374d] text-[25px] leading-none text-[white]" }, "+")),
|
|
177
|
+
React.createElement("button", { type: "button", onClick: onBookButtonPress, className: "flex items-center gap-[6px] px-[20px] py-[10px] rounded-[16px] text-[white] bold-text text-[13px] mt-[4px] justify-center border-none cursor-pointer", style: {
|
|
178
|
+
backgroundColor: "#FF5C60",
|
|
179
|
+
animation: "pulse-zoom 2s ease-in-out infinite",
|
|
180
|
+
whiteSpace: "nowrap",
|
|
181
|
+
width: "100%",
|
|
182
|
+
} },
|
|
183
|
+
React.createElement(LottiePlayer, { animationData: serviceItem.icons.thunderAnim, width: "18px", height: "18px" }),
|
|
184
|
+
React.createElement("span", { className: "whitespace-nowrap" }, "\u00A1Lo quiero!")))),
|
|
185
|
+
React.createElement("div", { className: "flex justify-between items-center" },
|
|
186
|
+
React.createElement("div", { className: "flex items-center" },
|
|
187
|
+
React.createElement(LottiePlayer, { animationData: serviceItem.icons.dotAnimation, width: "12px", height: "12px" }),
|
|
188
|
+
React.createElement("span", { className: "ml-[5px]" },
|
|
189
|
+
React.createElement("span", { className: "bold-text text-[white]" },
|
|
190
|
+
" ",
|
|
191
|
+
React.createElement("span", { className: "bold-text", ref: (node) => commonService.startViewerCount(node, viewersConfig), style: {
|
|
192
|
+
fontVariantNumeric: "tabular-nums",
|
|
193
|
+
} }),
|
|
194
|
+
" "),
|
|
195
|
+
" ",
|
|
196
|
+
React.createElement("span", { className: "text-[white]" }, "viendo |"),
|
|
197
|
+
" ",
|
|
198
|
+
React.createElement("span", { className: "bold-text text-[white]", ref: (node) => commonService.startComprandoCount(node, 4, 16), style: { fontVariantNumeric: "tabular-nums" } }),
|
|
199
|
+
" ",
|
|
200
|
+
React.createElement("span", { className: "text-[white]" }, "han comprado"))),
|
|
201
|
+
React.createElement("div", { className: `transition-transform duration-300 ease-in-out ${isItemExpanded ? "rotate-180" : ""}`, onClick: onToggleExpand },
|
|
202
|
+
React.createElement("img", { src: (_d = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _d === void 0 ? void 0 : _d.downArrow, alt: "down arrow", style: {
|
|
203
|
+
width: "14px",
|
|
204
|
+
height: "8px",
|
|
205
|
+
filter: "brightness(0) invert(1)",
|
|
206
|
+
} }))))),
|
|
207
|
+
isItemExpanded && (React.createElement("div", { className: "flex flex-col gap-[10px]", style: {
|
|
208
|
+
opacity: isItemExpanded ? 1 : 0,
|
|
209
|
+
transition: "opacity 250ms ease-in-out",
|
|
210
|
+
} },
|
|
211
|
+
React.createElement("div", { className: ` text-[12px] ${isItemExpanded ? "pt-[14px] pb-[6px]" : "py-0"}`, style: { transition: "padding 300ms ease-in-out" } },
|
|
212
|
+
React.createElement("span", { className: "bold-text" }, "\u00BFC\u00F3mo funciona?"),
|
|
213
|
+
React.createElement("div", { className: "flex flex-col" }, HOW_IT_WORKS_STEPS.map((step) => (React.createElement("div", { className: "flex items-start gap-[8px] mt-[10px]" },
|
|
214
|
+
React.createElement("div", null,
|
|
215
|
+
React.createElement(FeatureStepIcon, { icon: step.icon })),
|
|
216
|
+
React.createElement("div", { className: "flex flex-col" },
|
|
217
|
+
React.createElement("span", { className: "bold-text" }, step.name),
|
|
218
|
+
React.createElement("span", null, step.text)))
|
|
219
|
+
// <div
|
|
220
|
+
// key={step.name}
|
|
221
|
+
// className="flex flex-col items-center text-center text-[#272727]"
|
|
222
|
+
// >
|
|
223
|
+
// <FeatureStepIcon icon={step.icon} />
|
|
224
|
+
// <span className="bold-text mt-[10px] text-[12px] leading-[14px]">
|
|
225
|
+
// {step.name}
|
|
226
|
+
// </span>
|
|
227
|
+
// <span className="mt-[2px] max-w-[220px] text-[12px] leading-[14px] text-[#4a4a4a]">
|
|
228
|
+
// {step.text}
|
|
229
|
+
// </span>
|
|
230
|
+
// </div>
|
|
231
|
+
)))))))));
|
|
232
|
+
};
|
|
233
|
+
export default FeatureServiceUiMobile;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare const FeatureServiceUi: ({ serviceItem, showTopLabel,
|
|
2
|
+
declare const FeatureServiceUi: ({ serviceItem, showTopLabel, isSoldOut, getAnimationIcon, cityOrigin, cityDestination, renderIcon, viewersConfig, isFeatureDropDownExpand, onToggleExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onBookButtonPress, }: {
|
|
3
3
|
serviceItem: any;
|
|
4
4
|
showTopLabel: any;
|
|
5
|
-
colors: any;
|
|
6
5
|
isSoldOut: any;
|
|
7
6
|
getAnimationIcon: any;
|
|
8
7
|
cityOrigin: any;
|