kupos-ui-components-lib 10.4.65 → 10.4.66
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/ServiceItemPb.d.ts +4 -0
- package/dist/ServiceItemPb.js +486 -0
- package/dist/assets/images/anims/service_list/60_percent_anim.json +1 -0
- package/dist/assets/images/directo-icon.png +0 -0
- package/dist/components/FilterSortBar/SingleFilterSheet.d.ts +15 -0
- package/dist/components/FilterSortBar/SingleFilterSheet.js +21 -0
- package/dist/components/PaymentOptions/PaymentOptionsDesktop.d.ts +4 -0
- package/dist/components/PaymentOptions/PaymentOptionsDesktop.js +5 -0
- package/dist/components/PaymentOptions/PaymentOptionsMobile.d.ts +4 -0
- package/dist/components/PaymentOptions/PaymentOptionsMobile.js +5 -0
- package/dist/components/PaymentOptions/ResponsivePaymentOptions.d.ts +3 -0
- package/dist/components/PaymentOptions/ResponsivePaymentOptions.js +10 -0
- package/dist/components/PaymentOptions/index.d.ts +5 -0
- package/dist/components/PaymentOptions/index.js +4 -0
- package/dist/components/PaymentOptions/mobileTypes.d.ts +0 -0
- package/dist/components/PaymentOptions/mobileTypes.js +0 -0
- package/dist/components/PaymentOptions/type.d.ts +4 -0
- package/dist/components/PaymentOptions/type.js +1 -0
- package/dist/components/ServiceItem/ExpandedDropdown.d.ts +19 -0
- package/dist/components/ServiceItem/ExpandedDropdown.js +28 -0
- package/dist/components/ServiceItem/ServiceItemDesktop.d.ts +1 -1
- package/dist/components/ServiceItem/ServiceItemDesktop.js +3 -3
- package/dist/components/ServiceItem/ServiceItemDesktopPeru.d.ts +6 -0
- package/dist/components/ServiceItem/ServiceItemDesktopPeru.js +612 -0
- package/dist/components/ServiceItem/types.d.ts +1 -0
- package/dist/example.d.ts +5 -0
- package/dist/example.js +240 -0
- package/dist/styles.css +3 -0
- package/dist/ui/SeatSection/SeatSection.d.ts +2 -1
- package/dist/ui/SeatSection/SeatSection.js +15 -4
- package/dist/ui/ServiceType.d.ts +9 -0
- package/dist/ui/ServiceType.js +9 -0
- package/dist/ui/TopAmenities/PromoCountdown.d.ts +18 -0
- package/dist/ui/TopAmenities/PromoCountdown.js +55 -0
- package/package.json +1 -1
- package/src/components/ServiceItem/ServiceItemDesktop.tsx +3 -0
- package/src/components/ServiceItem/types.ts +2 -0
- package/src/ui/SeatSection/SeatSection.tsx +55 -17
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import PaymentOptionsDesktop from "./PaymentOptionsDesktop";
|
|
2
|
+
import PaymentOptionsMobile from "./PaymentOptionsMobile";
|
|
3
|
+
import ResponsivePaymentOptions from "./ResponsivePaymentOptions";
|
|
4
|
+
export { PaymentOptionsDesktop, PaymentOptionsMobile, ResponsivePaymentOptions };
|
|
5
|
+
export type { PaymentOptionsProps } from "./type";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import PaymentOptionsDesktop from "./PaymentOptionsDesktop";
|
|
2
|
+
import PaymentOptionsMobile from "./PaymentOptionsMobile";
|
|
3
|
+
import ResponsivePaymentOptions from "./ResponsivePaymentOptions";
|
|
4
|
+
export { PaymentOptionsDesktop, PaymentOptionsMobile, ResponsivePaymentOptions };
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface ExpandedDropdownProps {
|
|
3
|
+
serviceItem: {
|
|
4
|
+
pet_seat_info?: Record<string, any>;
|
|
5
|
+
is_change_ticket?: boolean;
|
|
6
|
+
is_tracking_enabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
showPromo: boolean;
|
|
9
|
+
colors: {
|
|
10
|
+
priceColor?: string;
|
|
11
|
+
};
|
|
12
|
+
grayscaleClass: string;
|
|
13
|
+
translation?: {
|
|
14
|
+
[key: string]: string;
|
|
15
|
+
};
|
|
16
|
+
getAnimationIcon: (icon: string) => any;
|
|
17
|
+
}
|
|
18
|
+
declare function ExpandedDropdown({ serviceItem, showPromo, colors, grayscaleClass, translation, getAnimationIcon, }: ExpandedDropdownProps): React.ReactElement;
|
|
19
|
+
export default ExpandedDropdown;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import LottiePlayer from "../../assets/LottiePlayer";
|
|
3
|
+
function ExpandedDropdown({ serviceItem, showPromo, colors, grayscaleClass, translation, getAnimationIcon, }) {
|
|
4
|
+
const hasPetInfo = serviceItem.pet_seat_info &&
|
|
5
|
+
Object.keys(serviceItem.pet_seat_info).length > 0;
|
|
6
|
+
return (React.createElement("div", { className: "px-[15px] pt-[26px] pb-[14px] -mt-[16px] pt-[20px] relative -z-9", style: {
|
|
7
|
+
backgroundColor: "#f5f5f5",
|
|
8
|
+
borderRadius: "0 0 10px 10px",
|
|
9
|
+
border: showPromo
|
|
10
|
+
? `1px solid ${colors.priceColor}`
|
|
11
|
+
: "1px solid #ccc",
|
|
12
|
+
borderTop: "none",
|
|
13
|
+
} },
|
|
14
|
+
React.createElement("div", { className: "flex flex-col gap-[12px] text-[13px] text-[#464647]" },
|
|
15
|
+
hasPetInfo && (React.createElement("div", { className: "flex items-center gap-[10px]" },
|
|
16
|
+
React.createElement(LottiePlayer, { animationData: getAnimationIcon("petFriendlyAnim"), width: "20px", height: "20px" }),
|
|
17
|
+
React.createElement("div", { className: "h-auto mr-[4px] text-[13px] text-[#464647] bold-text" },
|
|
18
|
+
React.createElement("span", null, translation === null || translation === void 0 ? void 0 : translation.petFriendly)))),
|
|
19
|
+
serviceItem.is_change_ticket && (React.createElement("div", { className: "flex items-center gap-[10px]" },
|
|
20
|
+
React.createElement(LottiePlayer, { animationData: getAnimationIcon("flexibleIcon"), width: "20px", height: "20px" }),
|
|
21
|
+
React.createElement("div", { className: "h-auto mr-[4px] text-[13px] text-[#464647] bold-text" },
|
|
22
|
+
React.createElement("span", null, translation === null || translation === void 0 ? void 0 : translation.flexible)))),
|
|
23
|
+
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_tracking_enabled) && (React.createElement("div", { className: `${grayscaleClass} flex items-center gap-[10px]` },
|
|
24
|
+
React.createElement(LottiePlayer, { animationData: getAnimationIcon("locationAnim"), width: "20px", height: "20px" }),
|
|
25
|
+
React.createElement("div", { className: "h-auto mr-[4px] text-[13px] text-[#464647] bold-text" },
|
|
26
|
+
React.createElement("span", null, "GPS Tracker")))))));
|
|
27
|
+
}
|
|
28
|
+
export default ExpandedDropdown;
|
|
@@ -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, isNewUi, showLoginModal, isLoggedIn, showLoginOption, isTrain, selectedSeatKey, onSeatSelect, onTrainButtonClick, showSeatSelectionError, onShowSeatSelectionError, onClearSeatSelectionError, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData, isFlores, operatorLabel, priority_stage_ids, isShowSeatIcon, showDesdeLabel, showServiceTypeUnderLogo, }: 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, isTrain, selectedSeatKey, onSeatSelect, onTrainButtonClick, showSeatSelectionError, onShowSeatSelectionError, onClearSeatSelectionError, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData, isFlores, operatorLabel, priority_stage_ids, isShowSeatIcon, showDesdeLabel, showServiceTypeUnderLogo, showSeatsWithDiscount, }: ServiceItemProps & {
|
|
4
4
|
currencySign?: string;
|
|
5
5
|
}): React.ReactElement;
|
|
6
6
|
export default ServiceItemPB;
|
|
@@ -87,7 +87,7 @@ const ANIMATION_MAP = {
|
|
|
87
87
|
kupos: flameAnimation,
|
|
88
88
|
},
|
|
89
89
|
};
|
|
90
|
-
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, isTrain, selectedSeatKey, onSeatSelect, onTrainButtonClick, showSeatSelectionError, onShowSeatSelectionError, onClearSeatSelectionError, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData, isFlores, operatorLabel, priority_stage_ids, isShowSeatIcon = false, showDesdeLabel = false, showServiceTypeUnderLogo = false, }) {
|
|
90
|
+
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, isTrain, selectedSeatKey, onSeatSelect, onTrainButtonClick, showSeatSelectionError, onShowSeatSelectionError, onClearSeatSelectionError, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData, isFlores, operatorLabel, priority_stage_ids, isShowSeatIcon = false, showDesdeLabel = false, showServiceTypeUnderLogo = false, showSeatsWithDiscount = false, }) {
|
|
91
91
|
var _a, _b, _c;
|
|
92
92
|
const handleSeatSelect = (key, price, seatKey, apiSeatType) => {
|
|
93
93
|
onClearSeatSelectionError === null || onClearSeatSelectionError === void 0 ? void 0 : onClearSeatSelectionError();
|
|
@@ -366,9 +366,9 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
|
|
|
366
366
|
backgroundColor: "#ccc",
|
|
367
367
|
} }),
|
|
368
368
|
React.createElement("div", { className: "content-center" },
|
|
369
|
-
React.createElement(SeatSection, { seatTypes: serviceItem.seat_types, serviceItem: serviceItem, availableSeats: serviceItem.available_seats, isSoldOut: isSoldOut, priceColor: colors.priceColor, dpSeatColor: colors.seatPriceColor, currencySign: currencySign, removeDuplicateSeats: removeDuplicateSeats, isPeru: isPeru, renderIcon: renderIcon, discountSeatPriceColor: colors.discountSeatPriceColor, isSeatIcon: isSeatIcon, isTrain: isTrain, selectedSeatKey: selectedSeatKey, onSeatSelect: handleSeatSelect, topLabelColor: colors.topLabelColor, tooltipColor: colors.tooltipColor, discountSeatCrossPriceColor: colors.discountSeatCrossPriceColor, isShowSeatIcon: isShowSeatIcon, showDesdeLabel: showDesdeLabel })),
|
|
369
|
+
React.createElement(SeatSection, { seatTypes: serviceItem.seat_types, serviceItem: serviceItem, availableSeats: serviceItem.available_seats, isSoldOut: isSoldOut, priceColor: colors.priceColor, dpSeatColor: colors.seatPriceColor, currencySign: currencySign, removeDuplicateSeats: removeDuplicateSeats, isPeru: isPeru, renderIcon: renderIcon, discountSeatPriceColor: colors.discountSeatPriceColor, isSeatIcon: isSeatIcon, isTrain: isTrain, selectedSeatKey: selectedSeatKey, onSeatSelect: handleSeatSelect, topLabelColor: colors.topLabelColor, tooltipColor: colors.tooltipColor, discountSeatCrossPriceColor: colors.discountSeatCrossPriceColor, isShowSeatIcon: isShowSeatIcon, showDesdeLabel: showDesdeLabel, showSeatsWithDiscount: showSeatsWithDiscount })),
|
|
370
370
|
React.createElement("div", { className: "relative" },
|
|
371
|
-
React.createElement(KuposButton, { isSoldOut: isSoldOut, isLoading: serviceDetailsLoading, buttonColor: colors.kuposButtonColor, buyLabel: translation === null || translation === void 0 ? void 0 : translation.buyButton, soldOutLabel: translation === null || translation === void 0 ? void 0 : translation.soldOutButton, soldOutIcon: renderIcon("soldOutIcon", "14px"), onClick: checkMidnight }),
|
|
371
|
+
React.createElement(KuposButton, { isSoldOut: isSoldOut, isLoading: serviceDetailsLoading, buttonColor: colors.kuposButtonColor, buyLabel: translation === null || translation === void 0 ? void 0 : translation.buyButton, soldOutLabel: translation === null || translation === void 0 ? void 0 : translation.soldOutButton, soldOutIcon: renderIcon("soldOutIcon", "14px"), onClick: checkMidnight, buttonTextColor: colors.primaryButtonTextColor }),
|
|
372
372
|
showSeatSelectionError === serviceItem.id && isTrain && (React.createElement("div", { className: "flex justify-center mr-[11px] w-[100%] right-[0px] absolute left-[0] top-[40px]" },
|
|
373
373
|
React.createElement("div", { className: "text-[9px] text-center whitespace-nowrap", style: {
|
|
374
374
|
color: colors.seatPriceColor,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ServiceItemProps } from "./types";
|
|
3
|
+
declare function ServiceItemDesktopPeru({ serviceItem, onBookButtonPress, colors, metaData, children, busStage, serviceDetailsLoading, cityOrigin, cityDestination, translation, orignLabel, destinationLabel, currencySign, isCiva, showRating, showLastSeats, removeArrivalTime, removeDuplicateSeats, originIconStyle, showAvailableSeats, isSeatIcon, isTurbus, t, }: ServiceItemProps & {
|
|
4
|
+
currencySign?: string;
|
|
5
|
+
}): React.ReactElement;
|
|
6
|
+
export default ServiceItemDesktopPeru;
|