kupos-ui-components-lib 9.7.5 → 9.7.7
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/KuposUIComponent.d.ts +3 -0
- package/dist/components/ServiceItem/ServiceItemDesktop.d.ts +1 -1
- package/dist/components/ServiceItem/ServiceItemDesktop.js +15 -2
- package/dist/components/ServiceItem/ServiceItemMobile.d.ts +1 -1
- package/dist/components/ServiceItem/ServiceItemMobile.js +16 -7
- package/dist/components/ServiceItem/mobileTypes.d.ts +32 -0
- package/dist/components/ServiceItem/types.d.ts +22 -0
- package/dist/styles.css +209 -0
- package/dist/ui/BottomAmenities/BottomAmenities.js +1 -1
- package/dist/ui/ExpendedDropDown/ExpandedDropdown.js +2 -2
- package/dist/ui/FeaturServiceUiMobile/FeatureServiceUiMobile.d.ts +5 -1
- package/dist/ui/FeaturServiceUiMobile/FeatureServiceUiMobile.js +40 -92
- package/dist/ui/FeatureServiceUI/FeatureServiceUi.d.ts +5 -1
- package/dist/ui/FeatureServiceUI/FeatureServiceUi.js +40 -5
- package/dist/utils/CommonService.js +11 -1
- package/package.json +1 -1
- package/src/KuposUIComponent.tsx +3 -0
- package/src/assets/images/anims/service_list/thunder_icon.json +1 -0
- package/src/assets/images/anims/service_list/users_anim.json +1 -0
- package/src/components/ServiceItem/ServiceItemDesktop.tsx +50 -0
- package/src/components/ServiceItem/ServiceItemMobile.tsx +340 -286
- package/src/components/ServiceItem/mobileTypes.ts +29 -1
- package/src/components/ServiceItem/types.ts +23 -1
- package/src/styles.css +15 -0
- package/src/ui/BottomAmenities/BottomAmenities.tsx +1 -1
- package/src/ui/ExpendedDropDown/ExpandedDropdown.tsx +2 -2
- package/src/ui/FeaturServiceUiMobile/FeatureServiceUiMobile.tsx +517 -0
- package/src/ui/FeatureServiceUI/FeatureServiceUi.tsx +554 -0
- package/src/utils/CommonService.ts +13 -1
|
@@ -15,6 +15,9 @@ interface KuposUIComponentProps {
|
|
|
15
15
|
orignLabel?: string;
|
|
16
16
|
destinationLabel?: string;
|
|
17
17
|
t?: (key: string) => string;
|
|
18
|
+
ticketQuantity?: number;
|
|
19
|
+
onIncreaseTicketQuantity?: (serviceItem: any) => void;
|
|
20
|
+
onDecreaseTicketQuantity?: (serviceItem: any) => void;
|
|
18
21
|
id?: string;
|
|
19
22
|
name?: string;
|
|
20
23
|
description?: string;
|
|
@@ -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, showLoginModal, isLoggedIn, showLoginOption, }: 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, isNewUi, showLoginModal, isLoggedIn, showLoginOption, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, }: ServiceItemProps & {
|
|
4
4
|
currencySign?: string;
|
|
5
5
|
}): React.ReactElement;
|
|
6
6
|
export default ServiceItemPB;
|
|
@@ -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";
|
|
@@ -32,6 +33,8 @@ import KuposButton from "../../ui/KuposButton/KuposButton";
|
|
|
32
33
|
import BottomAmenities from "../../ui/BottomAmenities/BottomAmenities";
|
|
33
34
|
import SeatSection from "../../ui/SeatSection/SeatSection";
|
|
34
35
|
import DateTimeSection from "../../ui/DateTimeSection/DateTimeSection";
|
|
36
|
+
import FeatureServiceUi from "../../ui/FeatureServiceUI/FeatureServiceUi";
|
|
37
|
+
import thunderAnimation from "../../assets/images/anims/service_list/thunder_icon.json";
|
|
35
38
|
import ServiceBadges from "../../ui/ServiceBadges/ServiceBadges";
|
|
36
39
|
const SEAT_EXCEPTIONS = ["Asiento mascota"];
|
|
37
40
|
const ANIMATION_MAP = {
|
|
@@ -64,6 +67,9 @@ const ANIMATION_MAP = {
|
|
|
64
67
|
bombAnimation: {
|
|
65
68
|
kupos: bombAnimation,
|
|
66
69
|
},
|
|
70
|
+
thunderAnimation: {
|
|
71
|
+
kupos: thunderAnimation,
|
|
72
|
+
},
|
|
67
73
|
dotAnimation: {
|
|
68
74
|
kupos: dotAnimation,
|
|
69
75
|
},
|
|
@@ -73,8 +79,11 @@ const ANIMATION_MAP = {
|
|
|
73
79
|
femaaleAnimation: {
|
|
74
80
|
kupos: femaleAnimation,
|
|
75
81
|
},
|
|
82
|
+
usersAnimation: {
|
|
83
|
+
kupos: usersAnimation,
|
|
84
|
+
},
|
|
76
85
|
};
|
|
77
|
-
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, showLoginOption, }) {
|
|
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, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, }) {
|
|
78
87
|
var _a;
|
|
79
88
|
const getAnimationIcon = (icon) => {
|
|
80
89
|
var _a;
|
|
@@ -243,7 +252,11 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
|
|
|
243
252
|
},
|
|
244
253
|
];
|
|
245
254
|
const otherItems = items.filter((i) => i.key !== "pet" && i.key !== "flexible" && !!i.condition);
|
|
246
|
-
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(
|
|
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: onRemateUiButtonClick, onToggleExpand: () => setIsFeatureDropDownExpand &&
|
|
256
|
+
setIsFeatureDropDownExpand(isFeatureDropDownExpand === serviceItem.id ||
|
|
257
|
+
isFeatureDropDownExpand === true
|
|
258
|
+
? null
|
|
259
|
+
: serviceItem.id), selectedTimeSlot: selectedTimeSlot, onTimeSlotChange: onTimeSlotChange, isTimeDropdownOpen: isTimeDropdownOpen, onTimeDropdownToggle: onTimeDropdownToggle })) : (React.createElement("div", { className: `relative hover:z-[150] ${hasOfferText || hasDpEnabled ? "mb-[55px]" : "mb-[10px]"} ${(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ||
|
|
247
260
|
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.train_type_label) === "Tren Express (Nuevo)" ||
|
|
248
261
|
showTopLabel
|
|
249
262
|
? "mt-[24px]"
|
|
@@ -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, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, }: 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, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, }) {
|
|
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: onRemateUiButtonClick, onToggleExpand: () => setIsFeatureDropDownExpand &&
|
|
92
|
+
setIsFeatureDropDownExpand(isFeatureDropDownExpand === serviceItem.id ||
|
|
93
|
+
isFeatureDropDownExpand === true
|
|
94
|
+
? null
|
|
95
|
+
: serviceItem.id), selectedTimeSlot: selectedTimeSlot, onTimeSlotChange: onTimeSlotChange, isTimeDropdownOpen: isTimeDropdownOpen, onTimeDropdownToggle: onTimeDropdownToggle })) : (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;
|
|
@@ -124,6 +124,19 @@ export interface MobileServiceItemProps {
|
|
|
124
124
|
directoIcon?: string;
|
|
125
125
|
whiteFireIcon?: string;
|
|
126
126
|
femaleAnim?: string;
|
|
127
|
+
thunderAnim?: string;
|
|
128
|
+
personsAnim?: string;
|
|
129
|
+
whiteOrigin?: string;
|
|
130
|
+
whiteDestination?: string;
|
|
131
|
+
userIcon?: string;
|
|
132
|
+
sheildIcon?: string;
|
|
133
|
+
busIcon?: string;
|
|
134
|
+
whiteDownArrow?: string;
|
|
135
|
+
empressaIcon?: string;
|
|
136
|
+
flexibleIcon?: string;
|
|
137
|
+
listoIcon?: string;
|
|
138
|
+
precioIcon?: string;
|
|
139
|
+
confirmarIcon?: string;
|
|
127
140
|
cancelTicketIcon?: string;
|
|
128
141
|
changeTicketIcon?: string;
|
|
129
142
|
petFriendlyIcon?: string;
|
|
@@ -133,6 +146,7 @@ export interface MobileServiceItemProps {
|
|
|
133
146
|
useLottieFor?: string[];
|
|
134
147
|
};
|
|
135
148
|
onBookButtonPress?: () => void;
|
|
149
|
+
onRemateUiButtonClick?: () => void;
|
|
136
150
|
terminals?: any[];
|
|
137
151
|
showDropdown?: boolean;
|
|
138
152
|
setShowDropdown?: (value: boolean) => void;
|
|
@@ -187,4 +201,22 @@ export interface MobileServiceItemProps {
|
|
|
187
201
|
label?: string;
|
|
188
202
|
icon?: string;
|
|
189
203
|
};
|
|
204
|
+
isFeatureDropDownExpand?: any;
|
|
205
|
+
setIsFeatureDropDownExpand?: (value: any) => void;
|
|
206
|
+
ticketQuantity?: number;
|
|
207
|
+
onIncreaseTicketQuantity?: (serviceItem: MobileServiceItemProps["serviceItem"]) => void;
|
|
208
|
+
onDecreaseTicketQuantity?: (serviceItem: MobileServiceItemProps["serviceItem"]) => void;
|
|
209
|
+
cityOrigin?: {
|
|
210
|
+
value: number;
|
|
211
|
+
label: string;
|
|
212
|
+
};
|
|
213
|
+
cityDestination?: {
|
|
214
|
+
value: number;
|
|
215
|
+
label: string;
|
|
216
|
+
};
|
|
217
|
+
isNewUi?: boolean;
|
|
218
|
+
selectedTimeSlot?: string;
|
|
219
|
+
onTimeSlotChange?: (slot: string) => void;
|
|
220
|
+
isTimeDropdownOpen?: string | number | null;
|
|
221
|
+
onTimeDropdownToggle?: (id?: string | number | null) => void;
|
|
190
222
|
}
|
|
@@ -129,11 +129,23 @@ export interface ServiceItemProps {
|
|
|
129
129
|
personIcon?: string;
|
|
130
130
|
whiteFireIcon?: string;
|
|
131
131
|
fireIcon?: string;
|
|
132
|
+
whiteOrigin?: string;
|
|
133
|
+
whiteDestination?: string;
|
|
134
|
+
userIcon?: string;
|
|
135
|
+
sheildIcon?: string;
|
|
136
|
+
busIcon?: string;
|
|
137
|
+
whiteDownArrow?: string;
|
|
138
|
+
empressaIcon?: string;
|
|
139
|
+
flexibleIcon?: string;
|
|
140
|
+
listoIcon?: string;
|
|
141
|
+
precioIcon?: string;
|
|
142
|
+
confirmarIcon?: string;
|
|
132
143
|
[key: string]: string | Record<string, string | undefined> | undefined;
|
|
133
144
|
};
|
|
134
145
|
useLottieFor?: string[];
|
|
135
146
|
};
|
|
136
147
|
onBookButtonPress?: () => void;
|
|
148
|
+
onRemateUiButtonClick?: () => void;
|
|
137
149
|
terminals?: any[];
|
|
138
150
|
t?: (key: string) => string;
|
|
139
151
|
serviceDetailsLoading?: boolean;
|
|
@@ -213,6 +225,11 @@ export interface ServiceItemProps {
|
|
|
213
225
|
isAllinBus?: boolean;
|
|
214
226
|
isExpand?: any;
|
|
215
227
|
setIsExpand?: (value: any) => void;
|
|
228
|
+
isFeatureDropDownExpand?: any;
|
|
229
|
+
setIsFeatureDropDownExpand?: (value: any) => void;
|
|
230
|
+
ticketQuantity?: number;
|
|
231
|
+
onIncreaseTicketQuantity?: (serviceItem: ServiceItemProps["serviceItem"]) => void;
|
|
232
|
+
onDecreaseTicketQuantity?: (serviceItem: ServiceItemProps["serviceItem"]) => void;
|
|
216
233
|
coachKey?: number;
|
|
217
234
|
viewersConfig?: {
|
|
218
235
|
min: number;
|
|
@@ -221,7 +238,12 @@ export interface ServiceItemProps {
|
|
|
221
238
|
label?: string;
|
|
222
239
|
icon?: string;
|
|
223
240
|
};
|
|
241
|
+
isNewUi?: boolean;
|
|
224
242
|
showLoginModal?: any;
|
|
225
243
|
isLoggedIn?: any;
|
|
226
244
|
showLoginOption?: boolean;
|
|
245
|
+
selectedTimeSlot?: string;
|
|
246
|
+
onTimeSlotChange?: (slot: string) => void;
|
|
247
|
+
isTimeDropdownOpen?: string | number | null;
|
|
248
|
+
onTimeDropdownToggle?: (id?: string | number | null) => void;
|
|
227
249
|
}
|