kupos-ui-components-lib 9.9.3 → 9.9.6
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/PeruServiceItemDesktop.d.ts +1 -1
- package/dist/components/ServiceItem/PeruServiceItemDesktop.js +156 -176
- package/dist/components/ServiceItem/ServiceItemDesktop.d.ts +1 -1
- package/dist/components/ServiceItem/ServiceItemDesktop.js +28 -12
- package/dist/components/ServiceItem/ServiceItemMobile.d.ts +1 -1
- package/dist/components/ServiceItem/ServiceItemMobile.js +43 -17
- package/dist/components/ServiceItem/mobileTypes.d.ts +48 -1
- package/dist/components/ServiceItem/types.d.ts +27 -1
- package/dist/styles.css +219 -13
- package/dist/ui/ExpendedDropDown/ExpandedDropdown.d.ts +1 -2
- package/dist/ui/ExpendedDropDown/ExpandedDropdown.js +2 -4
- package/dist/ui/FeatureServiceUI/FeatureServiceUi.js +19 -4
- package/dist/ui/OfferBanner.d.ts +2 -0
- package/dist/ui/OfferBanner.js +22 -15
- package/dist/ui/SeatSection/SeatSection.js +3 -3
- package/dist/utils/CommonService.d.ts +3 -0
- package/dist/utils/CommonService.js +18 -1
- package/package.json +1 -1
- package/src/KuposUIComponent.tsx +3 -0
- package/src/assets/images/anims/service_list/flame_anim.json +1 -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/PeruServiceItemDesktop.tsx +404 -277
- package/src/components/ServiceItem/ServiceItemDesktop.tsx +71 -8
- package/src/components/ServiceItem/ServiceItemMobile.tsx +387 -288
- package/src/components/ServiceItem/mobileTypes.ts +50 -7
- package/src/components/ServiceItem/types.ts +32 -1
- package/src/styles.css +15 -0
- package/src/ui/ExpendedDropDown/ExpandedDropdown.tsx +2 -4
- package/src/ui/FeaturServiceUiMobile/FeatureServiceUiMobile.tsx +575 -0
- package/src/ui/FeatureServiceUI/FeatureServiceUi.tsx +634 -0
- package/src/ui/OfferBanner.tsx +71 -43
- package/src/ui/SeatSection/SeatSection.tsx +3 -3
- package/src/utils/CommonService.ts +26 -1
|
@@ -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,21 +18,22 @@ 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
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
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, wowDealData, isFlores, }) {
|
|
22
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
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;
|
|
25
|
+
const isNewUiEnabled = ((_b = (_a = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.discounts) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.new_ui_enabled) === true;
|
|
24
26
|
let isSoldOut = serviceItem.available_seats <= 0;
|
|
25
27
|
const seats = removeDuplicateSeats
|
|
26
|
-
? ((
|
|
28
|
+
? ((_c = serviceItem.seat_types) === null || _c === void 0 ? void 0 : _c.filter((seat, index, self) => index === self.findIndex((s) => s.label === seat.label))) || []
|
|
27
29
|
: serviceItem.seat_types || [];
|
|
28
30
|
const discountedSeats = seats.map((seat) => (Object.assign(Object.assign({}, seat), commonService.calculateDiscountedPrice(seat.fare, serviceItem))));
|
|
29
31
|
const hasDiscount = discountedSeats.some((seat) => seat.originalPrice !== seat.discountedPrice);
|
|
30
|
-
const isLongOfferText = (((
|
|
32
|
+
const isLongOfferText = (((_d = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) === null || _d === void 0 ? void 0 : _d.length) || 0) > 35;
|
|
31
33
|
const hasOfferText = Boolean(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text);
|
|
32
34
|
const offerGradient = `linear-gradient(90deg, ${colors.rightGradiantColor || "#ff5964"} 0%, ${colors.leftGradiantColor || "#ff8842"} 100%)`;
|
|
33
35
|
const offerGradientWithOpacity = `linear-gradient(90deg, ${colors.rightGradiantColor || "#ff5964"}80 0%, ${colors.leftGradiantColor || "#ff8842"}80 100%)`;
|
|
34
|
-
const serviceCardStyle = hasOfferText || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled)
|
|
36
|
+
const serviceCardStyle = (hasOfferText && isNewUiEnabled) || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled)
|
|
35
37
|
? {
|
|
36
38
|
borderColor: isSoldOut ? "#ccc" : "transparent",
|
|
37
39
|
borderStyle: "solid",
|
|
@@ -87,13 +89,17 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
|
|
|
87
89
|
if (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_transpordo) {
|
|
88
90
|
isConexion = true;
|
|
89
91
|
}
|
|
90
|
-
return (React.createElement(
|
|
92
|
+
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 &&
|
|
93
|
+
setIsFeatureDropDownExpand(isFeatureDropDownExpand === serviceItem.id ||
|
|
94
|
+
isFeatureDropDownExpand === true
|
|
95
|
+
? null
|
|
96
|
+
: serviceItem.id), selectedTimeSlot: selectedTimeSlot, onTimeSlotChange: onTimeSlotChange, isTimeDropdownOpen: isTimeDropdownOpen, onTimeDropdownToggle: onTimeDropdownToggle, wowDealData: wowDealData })) : (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
97
|
isConexion ||
|
|
92
98
|
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.train_type_label) === "Tren Express (Nuevo)" ||
|
|
93
99
|
showTopLabel
|
|
94
100
|
? "mt-[20px]"
|
|
95
101
|
: "mt-[10px]"} `, style: { zIndex: 1 } },
|
|
96
|
-
React.createElement("div", { className: `z-1 ${(hasOfferText || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled)) && !isSoldOut
|
|
102
|
+
React.createElement("div", { className: `z-1 ${((hasOfferText && isNewUiEnabled) || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled)) && !isSoldOut
|
|
97
103
|
? "rounded-[18px]"
|
|
98
104
|
: "rounded-[10px] border border-[#ccc]"}`, style: Object.assign(Object.assign({}, serviceCardStyle), { backgroundColor: "#fff" }) },
|
|
99
105
|
React.createElement("div", { style: { padding: "12px 12px 8px 12px" } },
|
|
@@ -101,29 +107,49 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
|
|
|
101
107
|
React.createElement("div", { className: "flex items-center justify-center gap-x-4", style: {
|
|
102
108
|
marginBottom: (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) || hasDiscount ? "10px" : "",
|
|
103
109
|
} },
|
|
104
|
-
React.createElement("div", { className:
|
|
110
|
+
React.createElement("div", { className: `w-[115px] ${isFlores ? "" : "overflow-y-hidden"} h-[22px]` },
|
|
105
111
|
React.createElement("img", { src: serviceItem.operator_details[0], alt: "service logo", className: `w-[100px] h-auto object-contain ${isSoldOut ? "grayscale" : ""}` })),
|
|
106
112
|
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" },
|
|
107
113
|
React.createElement("div", { className: "flex items-center" },
|
|
108
114
|
React.createElement("div", { className: "flex items-center" },
|
|
109
115
|
React.createElement("img", { src: serviceItem.icons.rating, alt: "origin", className: `w-[12px] h-[12px] mr-[4px] object-contain ${isSoldOut ? "grayscale" : ""}` }),
|
|
110
116
|
React.createElement("span", { style: { lineHeight: "normal" } }, getServiceStars(serviceItem))),
|
|
111
|
-
React.createElement("div", { className: "flex items-center cursor-pointer ", style: {
|
|
117
|
+
React.createElement("div", { className: "flex items-center cursor-pointer ", style: {
|
|
118
|
+
color: isSoldOut ? "#bbb" : "text-[#464647]",
|
|
119
|
+
} },
|
|
112
120
|
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
|
-
React.createElement(DateTimeSectionMobile, { onBookButtonPress: onBookButtonPress, isCiva: isCiva, isSoldOut: isSoldOut, isLinatal: isLinatal, isPeru: isPeru, orignLabel: orignLabel, destinationLabel: destinationLabel, originIcon: (
|
|
121
|
+
React.createElement(DateTimeSectionMobile, { onBookButtonPress: onBookButtonPress, isCiva: isCiva, isSoldOut: isSoldOut, isLinatal: isLinatal, isPeru: isPeru, orignLabel: orignLabel, destinationLabel: destinationLabel, originIcon: (_e = serviceItem.icons) === null || _e === void 0 ? void 0 : _e.origin, destinationIcon: (_f = serviceItem.icons) === null || _f === void 0 ? void 0 : _f.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
122
|
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)),
|
|
115
123
|
showLastSeats ? (React.createElement("div", { className: "flex justify-end " }, (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) < 10 &&
|
|
116
124
|
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) > 0 && (React.createElement("div", { className: "text-[10px] text-center", style: {
|
|
117
125
|
color: colors.tooltipBgColor,
|
|
118
126
|
} }, "\u00A1\u00DAltimos Asientos!")))) : null,
|
|
119
127
|
React.createElement("div", { className: "bg-[#E6E6E6] mt-[10px] mb-[8px] h-[1px]" }),
|
|
120
|
-
React.createElement(BottomAmenitiesMobile, { isSoldOut: isSoldOut, amenitiesNodes: amenities(), hoursIcon: renderIcon("hours", "14px"), duration: (
|
|
128
|
+
React.createElement(BottomAmenitiesMobile, { isSoldOut: isSoldOut, amenitiesNodes: amenities(), hoursIcon: renderIcon("hours", "14px"), duration: (_g = serviceItem.duration) === null || _g === void 0 ? void 0 : _g.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: () => {
|
|
121
129
|
setIsExpanded(isItemExpanded ? null : serviceItem.id);
|
|
122
130
|
}, isPeru: isPeru, femaleAnim: serviceItem.icons.femaleAnim, ladiesBookedSeats: serviceItem.ladies_booked_seats, isDpEnabled: serviceItem.is_dp_enabled })),
|
|
123
131
|
React.createElement(ServiceBadgesMobile, { showTopLabel: showTopLabel, isSoldOut: isSoldOut, colors: colors, renderIcon: renderIcon, serviceItem: serviceItem, isConexion: isConexion })),
|
|
124
|
-
((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text)
|
|
132
|
+
(((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) && !isNewUiEnabled)) &&
|
|
125
133
|
!isSoldOut && (React.createElement("div", { className: "px-[12px] pt-[22px] pb-[8px] relative -z-9 -mt-[15px]", style: {
|
|
126
|
-
background:
|
|
134
|
+
background: colors === null || colors === void 0 ? void 0 : colors.bottomStripColor,
|
|
135
|
+
borderRadius: "0 0 14px 14px",
|
|
136
|
+
zIndex: -1,
|
|
137
|
+
} },
|
|
138
|
+
React.createElement("div", { className: "flex flex-col gap-[8px] text-[12px] min-[420px]:text-[12px] text-[#464647]", style: { lineHeight: 1.6 } },
|
|
139
|
+
React.createElement("div", { className: "flex justify-between items-center" },
|
|
140
|
+
React.createElement("div", { className: `flex ${((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) || "").length > 10 ? "items-start" : "items-center"}` },
|
|
141
|
+
React.createElement("div", { className: isLongOfferText ? "mt-[2px]" : "" },
|
|
142
|
+
React.createElement(LottiePlayer, { animationData: serviceItem.icons.promoAnim, width: "14px", height: "14px" })),
|
|
143
|
+
React.createElement("div", { className: `ml-[4px] flex-1 outline-none ${isLongOfferText ? "mt-[2px]" : ""}`, style: {
|
|
144
|
+
color: "#fff",
|
|
145
|
+
lineHeight: 1.4,
|
|
146
|
+
} },
|
|
147
|
+
React.createElement("span", { className: "whitespace-nowrap min-[380px]:text-[12px]" }, serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text))))))),
|
|
148
|
+
(((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) && isNewUiEnabled) || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled)) &&
|
|
149
|
+
!isSoldOut && (React.createElement("div", { className: "px-[12px] pt-[22px] pb-[8px] relative -z-9 -mt-[15px]", style: {
|
|
150
|
+
background: isSoldOut
|
|
151
|
+
? offerGradientWithOpacity
|
|
152
|
+
: offerGradient,
|
|
127
153
|
// opacity: isSoldOut ? 0.5 : 1,
|
|
128
154
|
borderRadius: "0 0 14px 14px",
|
|
129
155
|
zIndex: -1,
|
|
@@ -131,9 +157,9 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
|
|
|
131
157
|
React.createElement("div", { className: "flex flex-col gap-[8px] text-[12px] min-[420px]:text-[12px] text-[#464647]", style: { lineHeight: 1.6 } },
|
|
132
158
|
React.createElement("div", { className: "flex justify-between items-center" },
|
|
133
159
|
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) &&
|
|
134
|
-
Object.keys((
|
|
135
|
-
0 &&
|
|
136
|
-
((
|
|
160
|
+
Object.keys((_h = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.dp_discount_percents) !== null && _h !== void 0 ? _h : {})
|
|
161
|
+
.length === 0 &&
|
|
162
|
+
((_j = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.dp_discounted_seats) !== null && _j !== void 0 ? _j : []).length === 0 ? (React.createElement("div", { className: "flex items-center gap-[6px]" },
|
|
137
163
|
React.createElement(LottiePlayer, { animationData: serviceItem.icons.starAnimation, width: "14px", height: "14px" }),
|
|
138
164
|
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"}` },
|
|
139
165
|
React.createElement("div", { className: isLongOfferText ? "mt-[2px]" : "" },
|
|
@@ -180,6 +206,6 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
|
|
|
180
206
|
zIndex: (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) ? -3 : undefined,
|
|
181
207
|
marginTop: (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) ? "-15px" : "-10px",
|
|
182
208
|
} },
|
|
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
|
|
209
|
+
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
210
|
}
|
|
185
211
|
export default ServiceItemMobile;
|
|
@@ -43,6 +43,20 @@ export interface MobileServiceItemProps {
|
|
|
43
43
|
dp_discount_percents?: Record<string, number>;
|
|
44
44
|
dp_discounted_seats?: string[];
|
|
45
45
|
dep_validation_text?: string;
|
|
46
|
+
discount_type?: string;
|
|
47
|
+
discount_value?: number;
|
|
48
|
+
max_discount?: number;
|
|
49
|
+
discounts?: Array<{
|
|
50
|
+
id?: number;
|
|
51
|
+
name?: string;
|
|
52
|
+
send_discount_to_api?: boolean;
|
|
53
|
+
new_ui_enabled?: boolean;
|
|
54
|
+
discount?: number;
|
|
55
|
+
seatwise_breakdown?: any;
|
|
56
|
+
seat_wise_discounts?: any;
|
|
57
|
+
total_amount?: number;
|
|
58
|
+
promotional_text?: string;
|
|
59
|
+
}>;
|
|
46
60
|
metaData?: {};
|
|
47
61
|
is_tracking_enabled?: boolean;
|
|
48
62
|
show_top_label?: boolean;
|
|
@@ -124,6 +138,19 @@ export interface MobileServiceItemProps {
|
|
|
124
138
|
directoIcon?: string;
|
|
125
139
|
whiteFireIcon?: string;
|
|
126
140
|
femaleAnim?: string;
|
|
141
|
+
thunderAnim?: string;
|
|
142
|
+
personsAnim?: string;
|
|
143
|
+
whiteOrigin?: string;
|
|
144
|
+
whiteDestination?: string;
|
|
145
|
+
userIcon?: string;
|
|
146
|
+
sheildIcon?: string;
|
|
147
|
+
busIcon?: string;
|
|
148
|
+
whiteDownArrow?: string;
|
|
149
|
+
empressaIcon?: string;
|
|
150
|
+
flexibleIcon?: string;
|
|
151
|
+
listoIcon?: string;
|
|
152
|
+
precioIcon?: string;
|
|
153
|
+
confirmarIcon?: string;
|
|
127
154
|
cancelTicketIcon?: string;
|
|
128
155
|
changeTicketIcon?: string;
|
|
129
156
|
petFriendlyIcon?: string;
|
|
@@ -133,6 +160,7 @@ export interface MobileServiceItemProps {
|
|
|
133
160
|
useLottieFor?: string[];
|
|
134
161
|
};
|
|
135
162
|
onBookButtonPress?: () => void;
|
|
163
|
+
onRemateUiButtonClick?: () => void;
|
|
136
164
|
terminals?: any[];
|
|
137
165
|
showDropdown?: boolean;
|
|
138
166
|
setShowDropdown?: (value: boolean) => void;
|
|
@@ -187,5 +215,24 @@ export interface MobileServiceItemProps {
|
|
|
187
215
|
label?: string;
|
|
188
216
|
icon?: string;
|
|
189
217
|
};
|
|
190
|
-
|
|
218
|
+
isFeatureDropDownExpand?: any;
|
|
219
|
+
setIsFeatureDropDownExpand?: (value: any) => void;
|
|
220
|
+
ticketQuantity?: number;
|
|
221
|
+
onIncreaseTicketQuantity?: (serviceItem: MobileServiceItemProps["serviceItem"]) => void;
|
|
222
|
+
onDecreaseTicketQuantity?: (serviceItem: MobileServiceItemProps["serviceItem"]) => void;
|
|
223
|
+
cityOrigin?: {
|
|
224
|
+
value: number;
|
|
225
|
+
label: string;
|
|
226
|
+
};
|
|
227
|
+
cityDestination?: {
|
|
228
|
+
value: number;
|
|
229
|
+
label: string;
|
|
230
|
+
};
|
|
231
|
+
isNewUi?: boolean;
|
|
232
|
+
selectedTimeSlot?: string;
|
|
233
|
+
onTimeSlotChange?: (slot: string) => void;
|
|
234
|
+
isTimeDropdownOpen?: string | number | null;
|
|
235
|
+
onTimeDropdownToggle?: (id?: string | number | null) => void;
|
|
236
|
+
wowDealData?: any;
|
|
237
|
+
isFlores?: boolean;
|
|
191
238
|
}
|
|
@@ -45,6 +45,9 @@ export interface ServiceItemProps {
|
|
|
45
45
|
discount_type?: string;
|
|
46
46
|
discount_value?: number;
|
|
47
47
|
max_discount?: number;
|
|
48
|
+
discounts?: Array<{
|
|
49
|
+
new_ui_enabled?: boolean;
|
|
50
|
+
}>;
|
|
48
51
|
is_transpordo?: boolean;
|
|
49
52
|
is_train_type?: boolean;
|
|
50
53
|
operator_service_name?: string;
|
|
@@ -129,11 +132,23 @@ export interface ServiceItemProps {
|
|
|
129
132
|
personIcon?: string;
|
|
130
133
|
whiteFireIcon?: string;
|
|
131
134
|
fireIcon?: string;
|
|
135
|
+
whiteOrigin?: string;
|
|
136
|
+
whiteDestination?: string;
|
|
137
|
+
userIcon?: string;
|
|
138
|
+
sheildIcon?: string;
|
|
139
|
+
busIcon?: string;
|
|
140
|
+
whiteDownArrow?: string;
|
|
141
|
+
empressaIcon?: string;
|
|
142
|
+
flexibleIcon?: string;
|
|
143
|
+
listoIcon?: string;
|
|
144
|
+
precioIcon?: string;
|
|
145
|
+
confirmarIcon?: string;
|
|
132
146
|
[key: string]: string | Record<string, string | undefined> | undefined;
|
|
133
147
|
};
|
|
134
148
|
useLottieFor?: string[];
|
|
135
149
|
};
|
|
136
150
|
onBookButtonPress?: () => void;
|
|
151
|
+
onRemateUiButtonClick?: () => void;
|
|
137
152
|
terminals?: any[];
|
|
138
153
|
t?: (key: string) => string;
|
|
139
154
|
serviceDetailsLoading?: boolean;
|
|
@@ -213,6 +228,11 @@ export interface ServiceItemProps {
|
|
|
213
228
|
isAllinBus?: boolean;
|
|
214
229
|
isExpand?: any;
|
|
215
230
|
setIsExpand?: (value: any) => void;
|
|
231
|
+
isFeatureDropDownExpand?: any;
|
|
232
|
+
setIsFeatureDropDownExpand?: (value: any) => void;
|
|
233
|
+
ticketQuantity?: number;
|
|
234
|
+
onIncreaseTicketQuantity?: (serviceItem: ServiceItemProps["serviceItem"]) => void;
|
|
235
|
+
onDecreaseTicketQuantity?: (serviceItem: ServiceItemProps["serviceItem"]) => void;
|
|
216
236
|
coachKey?: number;
|
|
217
237
|
viewersConfig?: {
|
|
218
238
|
min: number;
|
|
@@ -221,9 +241,15 @@ export interface ServiceItemProps {
|
|
|
221
241
|
label?: string;
|
|
222
242
|
icon?: string;
|
|
223
243
|
};
|
|
244
|
+
isNewUi?: boolean;
|
|
224
245
|
showLoginModal?: any;
|
|
225
246
|
isLoggedIn?: any;
|
|
226
247
|
showLoginOption?: boolean;
|
|
248
|
+
selectedTimeSlot?: string;
|
|
249
|
+
onTimeSlotChange?: (slot: string) => void;
|
|
250
|
+
isTimeDropdownOpen?: string | number | null;
|
|
251
|
+
onTimeDropdownToggle?: (id?: string | number | null) => void;
|
|
252
|
+
wowDealData?: any;
|
|
253
|
+
isNewUiEnabled?: boolean;
|
|
227
254
|
isFlores?: boolean;
|
|
228
|
-
operatorLabel?: string;
|
|
229
255
|
}
|