kupos-ui-components-lib 10.2.6 → 10.2.8
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.js +1 -1
- package/dist/components/ServiceItem/ServiceItemMobile.js +2 -2
- package/dist/ui/BottomAmenities/BottomAmenities.js +1 -1
- package/dist/ui/mobileweb/BottomAmenitiesMobile.d.ts +2 -1
- package/dist/ui/mobileweb/BottomAmenitiesMobile.js +2 -2
- package/package.json +1 -1
- package/src/components/ServiceItem/ServiceItemDesktop.tsx +1 -1
- package/src/components/ServiceItem/ServiceItemMobile.tsx +2 -1
- package/src/ui/BottomAmenities/BottomAmenities.tsx +1 -1
- package/src/ui/mobileweb/BottomAmenitiesMobile.tsx +3 -1
|
@@ -289,7 +289,7 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
|
|
|
289
289
|
},
|
|
290
290
|
];
|
|
291
291
|
const otherItems = items.filter((i) => i.key !== "pet" && i.key !== "flexible" && !!i.condition);
|
|
292
|
-
return (React.createElement(React.Fragment, null, isPeruSites ? (React.createElement(PeruServiceItemDesktop, { serviceItem: serviceItem, onBookButtonPress: onBookButtonPress, colors: colors, metaData: metaData, children: children, busStage: busStage, serviceDetailsLoading: serviceDetailsLoading, cityOrigin: cityOrigin, cityDestination: cityDestination, translation: translation, orignLabel: orignLabel, destinationLabel: destinationLabel, currencySign: currencySign, isCiva: isCiva, showRating: showRating, showLastSeats: showLastSeats, removeArrivalTime: removeArrivalTime, removeDuplicateSeats: removeDuplicateSeats, isPeruSites: isPeruSites, t: (key) => t(key), showAvailableSeats: showAvailableSeats, isSeatIcon: isSeatIcon, isPeru: isPeru, siteType: siteType, isAllinBus: isAllinBus, viewersConfig: viewersConfig, isLoggedIn: isLoggedIn, showLoginModal: showLoginModal, isExpand: isExpand, setIsExpand: setIsExpand, coachKey: coachKey, isFlores: isFlores, isNewUiEnabled: isNewUiEnabled, showLoginOption: showLoginOption })) : isNewUi ? (React.createElement(FeatureServiceUi, { serviceItem: serviceItem, showTopLabel: showTopLabel, getAnimationIcon: getAnimationIcon, cityOrigin: cityOrigin, cityDestination: cityDestination, renderIcon: renderIcon, viewersConfig: viewersConfig, isFeatureDropDownExpand: isFeatureDropDownExpand, ticketQuantity: ticketQuantity, onIncreaseTicketQuantity: onIncreaseTicketQuantity, onDecreaseTicketQuantity: onDecreaseTicketQuantity, onBookButtonPress: onRemateUiButtonClick, onToggleExpand: () => setIsFeatureDropDownExpand &&
|
|
292
|
+
return (React.createElement(React.Fragment, null, isPeruSites ? (React.createElement(PeruServiceItemDesktop, { serviceItem: serviceItem, onBookButtonPress: onBookButtonPress, colors: colors, metaData: metaData, children: children, busStage: busStage, serviceDetailsLoading: serviceDetailsLoading, cityOrigin: cityOrigin, cityDestination: cityDestination, translation: translation, orignLabel: orignLabel, destinationLabel: destinationLabel, currencySign: currencySign, isCiva: isCiva, showRating: showRating, showLastSeats: showLastSeats, removeArrivalTime: removeArrivalTime, removeDuplicateSeats: removeDuplicateSeats, isPeruSites: isPeruSites, t: (key) => t(key), showAvailableSeats: showAvailableSeats, isSeatIcon: isSeatIcon, isPeru: isPeru, siteType: siteType, isAllinBus: isAllinBus, viewersConfig: viewersConfig, isLoggedIn: isLoggedIn, showLoginModal: showLoginModal, isExpand: isExpand, setIsExpand: setIsExpand, coachKey: coachKey, isFlores: isFlores, isNewUiEnabled: isNewUiEnabled, showLoginOption: showLoginOption })) : isNewUi && !isTrain ? (React.createElement(FeatureServiceUi, { serviceItem: serviceItem, showTopLabel: showTopLabel, getAnimationIcon: getAnimationIcon, cityOrigin: cityOrigin, cityDestination: cityDestination, renderIcon: renderIcon, viewersConfig: viewersConfig, isFeatureDropDownExpand: isFeatureDropDownExpand, ticketQuantity: ticketQuantity, onIncreaseTicketQuantity: onIncreaseTicketQuantity, onDecreaseTicketQuantity: onDecreaseTicketQuantity, onBookButtonPress: onRemateUiButtonClick, onToggleExpand: () => setIsFeatureDropDownExpand &&
|
|
293
293
|
setIsFeatureDropDownExpand(isFeatureDropDownExpand === serviceItem.id ||
|
|
294
294
|
isFeatureDropDownExpand === true
|
|
295
295
|
? null
|
|
@@ -100,7 +100,7 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
|
|
|
100
100
|
const dropoffName = ((_f = serviceItem.stage_details_arr) === null || _f === void 0 ? void 0 : _f.length)
|
|
101
101
|
? extractStage(serviceItem.stage_details_arr, 1)
|
|
102
102
|
: null;
|
|
103
|
-
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 &&
|
|
103
|
+
return (React.createElement(React.Fragment, null, isNewUi && !isTrain ? (React.createElement(FeatureServiceUiMobile, { serviceItem: serviceItem, showTopLabel: showTopLabel, colors: colors, isSoldOut: isSoldOut, cityOrigin: cityOrigin, cityDestination: cityDestination, renderIcon: renderIcon, viewersConfig: viewersConfig, isFeatureDropDownExpand: isFeatureDropDownExpand, ticketQuantity: ticketQuantity, onIncreaseTicketQuantity: onIncreaseTicketQuantity, onDecreaseTicketQuantity: onDecreaseTicketQuantity, onBookButtonPress: onRemateUiButtonClick, onToggleExpand: () => setIsFeatureDropDownExpand &&
|
|
104
104
|
setIsFeatureDropDownExpand(isFeatureDropDownExpand === serviceItem.id ||
|
|
105
105
|
isFeatureDropDownExpand === true
|
|
106
106
|
? null
|
|
@@ -146,7 +146,7 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
|
|
|
146
146
|
React.createElement("div", { className: "bg-[#E6E6E6] mt-[10px] mb-[8px] h-[1px]" }),
|
|
147
147
|
React.createElement(BottomAmenitiesMobile, { isSoldOut: isSoldOut, amenitiesNodes: amenities(), hoursIcon: renderIcon("hours", "14px"), duration: (_j = serviceItem.duration) === null || _j === void 0 ? void 0 : _j.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: () => {
|
|
148
148
|
setIsExpanded(isItemExpanded ? null : serviceItem.id);
|
|
149
|
-
}, isPeru: isPeru, femaleAnim: serviceItem.icons.femaleAnim, ladiesBookedSeats: serviceItem.ladies_booked_seats, isDpEnabled: serviceItem.is_dp_enabled })),
|
|
149
|
+
}, isPeru: isPeru, femaleAnim: serviceItem.icons.femaleAnim, ladiesBookedSeats: serviceItem.ladies_booked_seats, isDpEnabled: serviceItem.is_dp_enabled, isTrain: isTrain })),
|
|
150
150
|
React.createElement(ServiceBadgesMobile, { showTopLabel: showTopLabel, isSoldOut: isSoldOut, colors: colors, renderIcon: renderIcon, serviceItem: serviceItem, isConexion: isConexion, isAllinBus: isAllinBus, boardingName: boardingName })),
|
|
151
151
|
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) &&
|
|
152
152
|
!isNewUiEnabled &&
|
|
@@ -24,6 +24,6 @@ function BottomAmenities({ otherItems, serviceItem, grayscaleClass, isSoldOut, i
|
|
|
24
24
|
String(serviceItem.ladies_booked_seats).trim() !== "" &&
|
|
25
25
|
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) === true && (React.createElement(FemaleBlock, { translation: translation, getAnimationIcon: getAnimationIcon, colors: colors, serviceItem: serviceItem, isSoldOut: isSoldOut })),
|
|
26
26
|
hasPetInfo && (React.createElement(PetBlock, { translation: translation, getAnimationIcon: getAnimationIcon, colors: colors, isSoldOut: isSoldOut })),
|
|
27
|
-
isPeru ? null : (React.createElement("div", { className: `flex items-center cursor-pointer ml-[4px] transition-transform duration-300 w-[14px] h-[14px] ${isItemExpanded ? "rotate-180" : ""}`, onClick: onToggleExpand }, downArrowIcon)))));
|
|
27
|
+
isPeru || isTrain ? null : (React.createElement("div", { className: `flex items-center cursor-pointer ml-[4px] transition-transform duration-300 w-[14px] h-[14px] ${isItemExpanded ? "rotate-180" : ""}`, onClick: onToggleExpand }, downArrowIcon)))));
|
|
28
28
|
}
|
|
29
29
|
export default BottomAmenities;
|
|
@@ -23,6 +23,7 @@ interface BottomAmenitiesMobileProps {
|
|
|
23
23
|
femaleAnim?: any;
|
|
24
24
|
ladiesBookedSeats?: string;
|
|
25
25
|
isDpEnabled?: boolean;
|
|
26
|
+
isTrain?: boolean;
|
|
26
27
|
}
|
|
27
|
-
declare function BottomAmenitiesMobile({ isSoldOut, amenitiesNodes, hoursIcon, duration, isDirectTrip, directoColor, directoAnim, isChangeTicket, isPetSeat, petSeatInfo, petFriendlyAnim, flexibleAnim, isTrackingEnabled, locationAnim, downArrowIcon, showDropdown, setShowDropdown, onDropdownToggle, isItemExpanded, isPeru, femaleAnim, ladiesBookedSeats, isDpEnabled, }: BottomAmenitiesMobileProps): React.ReactElement;
|
|
28
|
+
declare function BottomAmenitiesMobile({ isSoldOut, amenitiesNodes, hoursIcon, duration, isDirectTrip, directoColor, directoAnim, isChangeTicket, isPetSeat, petSeatInfo, petFriendlyAnim, flexibleAnim, isTrackingEnabled, locationAnim, downArrowIcon, showDropdown, setShowDropdown, onDropdownToggle, isItemExpanded, isPeru, femaleAnim, ladiesBookedSeats, isDpEnabled, isTrain, }: BottomAmenitiesMobileProps): React.ReactElement;
|
|
28
29
|
export default BottomAmenitiesMobile;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import LottiePlayer from "../../assets/LottiePlayer";
|
|
3
3
|
import DateService from "../../utils/DateService";
|
|
4
|
-
function BottomAmenitiesMobile({ isSoldOut, amenitiesNodes, hoursIcon, duration, isDirectTrip, directoColor, directoAnim, isChangeTicket, isPetSeat, petSeatInfo, petFriendlyAnim, flexibleAnim, isTrackingEnabled, locationAnim, downArrowIcon, showDropdown, setShowDropdown, onDropdownToggle, isItemExpanded, isPeru, femaleAnim, ladiesBookedSeats, isDpEnabled, }) {
|
|
4
|
+
function BottomAmenitiesMobile({ isSoldOut, amenitiesNodes, hoursIcon, duration, isDirectTrip, directoColor, directoAnim, isChangeTicket, isPetSeat, petSeatInfo, petFriendlyAnim, flexibleAnim, isTrackingEnabled, locationAnim, downArrowIcon, showDropdown, setShowDropdown, onDropdownToggle, isItemExpanded, isPeru, femaleAnim, ladiesBookedSeats, isDpEnabled, isTrain, }) {
|
|
5
5
|
return (React.createElement("div", { className: `${"flex justify-between items-center items-center "}` },
|
|
6
6
|
React.createElement("div", { className: "w-[55%] flex justify-between items-center" },
|
|
7
7
|
React.createElement("div", { style: { opacity: isSoldOut ? 0.5 : 1 } }, amenitiesNodes),
|
|
@@ -33,7 +33,7 @@ function BottomAmenitiesMobile({ isSoldOut, amenitiesNodes, hoursIcon, duration,
|
|
|
33
33
|
isTrackingEnabled && (React.createElement("div", { className: "flex items-center mr-[10px]" },
|
|
34
34
|
React.createElement("div", { className: `h-auto mr-[4px] min-[420]:text-[13px] text-[11px] text-[#464647] ${isSoldOut ? "grayscale" : ""}` },
|
|
35
35
|
React.createElement(LottiePlayer, { animationData: locationAnim, width: "16px", height: "16px" }))))))),
|
|
36
|
-
isPeru ? null : (React.createElement("div", { onClick: onDropdownToggle },
|
|
36
|
+
isPeru || isTrain ? null : (React.createElement("div", { onClick: onDropdownToggle },
|
|
37
37
|
React.createElement("img", { src: downArrowIcon, alt: "icon", width: 14, height: 14, className: `${showDropdown ? "rotate-180" : ""} transition-transform duration-300` }))))));
|
|
38
38
|
}
|
|
39
39
|
export default BottomAmenitiesMobile;
|
package/package.json
CHANGED
|
@@ -194,7 +194,7 @@ function ServiceItemMobile({
|
|
|
194
194
|
|
|
195
195
|
return (
|
|
196
196
|
<>
|
|
197
|
-
{isNewUi ? (
|
|
197
|
+
{isNewUi && !isTrain ? (
|
|
198
198
|
<FeatureServiceUiMobile
|
|
199
199
|
serviceItem={serviceItem}
|
|
200
200
|
showTopLabel={showTopLabel}
|
|
@@ -394,6 +394,7 @@ function ServiceItemMobile({
|
|
|
394
394
|
femaleAnim={serviceItem.icons.femaleAnim}
|
|
395
395
|
ladiesBookedSeats={serviceItem.ladies_booked_seats}
|
|
396
396
|
isDpEnabled={serviceItem.is_dp_enabled}
|
|
397
|
+
isTrain={isTrain}
|
|
397
398
|
/>
|
|
398
399
|
</div>
|
|
399
400
|
|
|
@@ -115,7 +115,7 @@ function BottomAmenities({
|
|
|
115
115
|
|
|
116
116
|
{/* DOWN ARROW ICON */}
|
|
117
117
|
{/* {showDownArrow ? ( */}
|
|
118
|
-
{isPeru ? null : (
|
|
118
|
+
{isPeru || isTrain ? null : (
|
|
119
119
|
<div
|
|
120
120
|
className={`flex items-center cursor-pointer ml-[4px] transition-transform duration-300 w-[14px] h-[14px] ${isItemExpanded ? "rotate-180" : ""}`}
|
|
121
121
|
onClick={onToggleExpand}
|
|
@@ -26,6 +26,7 @@ interface BottomAmenitiesMobileProps {
|
|
|
26
26
|
femaleAnim?: any;
|
|
27
27
|
ladiesBookedSeats?: string;
|
|
28
28
|
isDpEnabled?: boolean;
|
|
29
|
+
isTrain?: boolean;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
function BottomAmenitiesMobile({
|
|
@@ -52,6 +53,7 @@ function BottomAmenitiesMobile({
|
|
|
52
53
|
femaleAnim,
|
|
53
54
|
ladiesBookedSeats,
|
|
54
55
|
isDpEnabled,
|
|
56
|
+
isTrain,
|
|
55
57
|
}: BottomAmenitiesMobileProps): React.ReactElement {
|
|
56
58
|
return (
|
|
57
59
|
<div className={`${"flex justify-between items-center items-center "}`}>
|
|
@@ -178,7 +180,7 @@ function BottomAmenitiesMobile({
|
|
|
178
180
|
</div>
|
|
179
181
|
)}
|
|
180
182
|
</div>
|
|
181
|
-
{isPeru ? null : (
|
|
183
|
+
{isPeru || isTrain ? null : (
|
|
182
184
|
<div onClick={onDropdownToggle}>
|
|
183
185
|
<img
|
|
184
186
|
src={downArrowIcon}
|