kupos-ui-components-lib 10.3.2 → 10.3.4
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/PaymentSideBar/PaymentSideBarDesktop.js +1 -2
- package/dist/components/PaymentSideBar/PaymentSideBarMobile.js +1 -1
- package/dist/components/ServiceItem/ServiceItemDesktop.js +2 -2
- package/dist/styles.css +2 -2
- package/dist/ui/ExpendedDropDown/ExpandedDropdown.js +0 -1
- package/dist/ui/RatingBlock.d.ts +1 -1
- package/dist/ui/RatingBlock.js +12 -10
- package/dist/ui/SeatSection/SeatSection.js +3 -1
- package/package.json +1 -1
- package/src/components/PaymentSideBar/PaymentSideBarDesktop.tsx +1 -2
- package/src/components/PaymentSideBar/PaymentSideBarMobile.tsx +1 -1
- package/src/components/ServiceItem/ServiceItemDesktop.tsx +2 -1
- package/src/ui/ExpendedDropDown/ExpandedDropdown.tsx +0 -1
- package/src/ui/RatingBlock.tsx +38 -34
- package/src/ui/SeatSection/SeatSection.tsx +3 -1
|
@@ -179,7 +179,6 @@ const renderSummaryDetailsCard = ({ serviceName, date, source, dest, boardingSta
|
|
|
179
179
|
};
|
|
180
180
|
const PaymentSideBarDesktop = ({ serviceNameOnward, serviceNameReturn, metaData, currencySign, dateOnward, dateReturn, sourceOnward, sourceReturn, destinationOnward, destinationReturn, boardingStageOnward, boardingStageReturn, droppingStageOnward, droppingStageReturn, boardingTimeOnward, boardingTimeReturn, droppingTimeOnward, droppingTimeReturn, durationOnward, durationReturn, selectSeatOnward, selectSeatReturn, journeyTypeActive, setJourneyTypeActive, translation, trainTypeOnward, trainTypeReturn, colors, trainType, icons, selectedOnward, selectedReturn, conexionChecked, conexionPassengers, returnConexionFare, conexionFare, loginData, checkWhatsappEligibility, removeDiscountAtomValue, netFare, promoCode, onPromoRemove, isAgency, agencyFee, walletMoney, virtualMoney, virtualLimit, showUsd, netFareInUsd, renderDiscount, discountAmount, walletLabel, creditosLabel, currency, customSideBarwidth, isLinatal, insuranceData, isPeru, serviceFeeDataStateValue, isOpsite, }) => {
|
|
181
181
|
var _a, _b, _c, _d, _e;
|
|
182
|
-
console.log("🚀 ~ PaymentSideBarDesktop ~ walletMoney:", walletMoney);
|
|
183
182
|
// REMOVED AM/PM DUPLICATION AND ADDED 24 HOUR TIME FORMAT IN BOARDING STAGE
|
|
184
183
|
const depTime = droppingTimeOnward || "";
|
|
185
184
|
const returnTime = droppingTimeReturn || "";
|
|
@@ -446,7 +445,7 @@ const PaymentSideBarDesktop = ({ serviceNameOnward, serviceNameReturn, metaData,
|
|
|
446
445
|
React.createElement("div", null, promoCode === null || promoCode === void 0 ? void 0 : promoCode.promoCode),
|
|
447
446
|
React.createElement("span", { className: "promo-remove", onClick: onPromoRemove },
|
|
448
447
|
React.createElement("img", { src: icons === null || icons === void 0 ? void 0 : icons.closeIcon, alt: "close", className: "w-[16px] h-[16px]" })))) : null)),
|
|
449
|
-
(serviceFeeDataStateValue === null || serviceFeeDataStateValue === void 0 ? void 0 : serviceFeeDataStateValue.total_convenience_fee_amount) && (React.createElement(PaymentItem, { label: React.createElement("div", { style: { display: "flex", alignItems: "center" } },
|
|
448
|
+
!!(serviceFeeDataStateValue === null || serviceFeeDataStateValue === void 0 ? void 0 : serviceFeeDataStateValue.total_convenience_fee_amount) && (React.createElement(PaymentItem, { label: React.createElement("div", { style: { display: "flex", alignItems: "center" } },
|
|
450
449
|
React.createElement("div", { className: "font10" }, translation === null || translation === void 0 ? void 0 : translation.serviceFeeLabel),
|
|
451
450
|
React.createElement("div", { className: "img-hover" },
|
|
452
451
|
React.createElement("img", { src: icons === null || icons === void 0 ? void 0 : icons.whatsappInfoIcon, alt: "", style: {
|
|
@@ -231,7 +231,7 @@ const PaymentSideBarMobile = ({ serviceNameOnward, serviceNameReturn, metaData,
|
|
|
231
231
|
React.createElement("div", null, promoCode === null || promoCode === void 0 ? void 0 : promoCode.promoCode),
|
|
232
232
|
React.createElement("span", { className: "promo-remove", onClick: onPromoRemove },
|
|
233
233
|
React.createElement("img", { src: icons === null || icons === void 0 ? void 0 : icons.closeIcon, alt: "close", className: "w-[16px] h-[16px]" })))) : null)),
|
|
234
|
-
(serviceFeeDataStateValue === null || serviceFeeDataStateValue === void 0 ? void 0 : serviceFeeDataStateValue.total_convenience_fee_amount) && (React.createElement(PaymentItem, { label: React.createElement("div", { style: { display: "flex", alignItems: "center" } },
|
|
234
|
+
!!(serviceFeeDataStateValue === null || serviceFeeDataStateValue === void 0 ? void 0 : serviceFeeDataStateValue.total_convenience_fee_amount) && (React.createElement(PaymentItem, { label: React.createElement("div", { style: { display: "flex", alignItems: "center" } },
|
|
235
235
|
React.createElement("div", { className: " font14 flex items-center gap-[5px]" }, translation === null || translation === void 0 ? void 0 : translation.serviceFeeLabel),
|
|
236
236
|
React.createElement("div", { className: "img-hover", onClick: () => setShowServicefeeModal(true) },
|
|
237
237
|
React.createElement("img", { src: icons === null || icons === void 0 ? void 0 : icons.whatsappInfoIcon, alt: "", style: {
|
|
@@ -314,12 +314,12 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
|
|
|
314
314
|
? "14px"
|
|
315
315
|
: "",
|
|
316
316
|
} },
|
|
317
|
-
React.createElement("div", { className: `grid text-[#464647] w-full ${isTrain ? "[grid-template-columns:
|
|
317
|
+
React.createElement("div", { className: `grid text-[#464647] w-full ${isTrain ? "[grid-template-columns:20%_27%_2.5%_27%_15.5%]" : "[grid-template-columns:20%_30%_2.5%_24%_15.5%]"} gap-x-[2%] items-center` },
|
|
318
318
|
React.createElement("div", { className: "flex flex-col gap-[5px]" },
|
|
319
319
|
React.createElement("div", null,
|
|
320
320
|
React.createElement("img", { src: serviceItem.operator_details[0], alt: "service logo", className: `h-[30px] w-[auto] ${isSoldOut ? "grayscale" : ""}` }),
|
|
321
321
|
isCiva ? (React.createElement("div", { className: "text-[13.33px] black-text ml-2" }, serviceItem.operator_details[2])) : null),
|
|
322
|
-
React.createElement(RatingBlock, { showRating: showRating, serviceItem: serviceItem, isSoldOut: isSoldOut, colors: colors, t: t, translation: translation, isPeru: isPeru })),
|
|
322
|
+
React.createElement(RatingBlock, { showRating: showRating, serviceItem: serviceItem, isSoldOut: isSoldOut, colors: colors, t: t, translation: translation, isPeru: isPeru, isTrain: isTrain })),
|
|
323
323
|
React.createElement(DateTimeSection, { serviceItem: serviceItem, isSoldOut: isSoldOut, isCiva: isCiva, isLinatal: isLinatal, removeArrivalTime: removeArrivalTime, orignLabel: orignLabel, destinationLabel: destinationLabel, busStage: busStage, metaData: metaData, colors: colors }),
|
|
324
324
|
React.createElement("div", { style: {
|
|
325
325
|
width: "1px",
|
package/dist/styles.css
CHANGED
|
@@ -572,8 +572,8 @@
|
|
|
572
572
|
.\[grid-template-columns\:14\%_40\%_0\.5\%_24\%_13\.5\%\] {
|
|
573
573
|
grid-template-columns: 14% 40% 0.5% 24% 13.5%;
|
|
574
574
|
}
|
|
575
|
-
.\[grid-template-columns\:
|
|
576
|
-
grid-template-columns:
|
|
575
|
+
.\[grid-template-columns\:20\%_27\%_2\.5\%_27\%_15\.5\%\] {
|
|
576
|
+
grid-template-columns: 20% 27% 2.5% 27% 15.5%;
|
|
577
577
|
}
|
|
578
578
|
.\[grid-template-columns\:20\%_30\%_2\.5\%_24\%_15\.5\%\] {
|
|
579
579
|
grid-template-columns: 20% 30% 2.5% 24% 15.5%;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
function ExpandedDropdown({ serviceItem, isPeru = false, translation = {}, getAnimationIcon, isChangeTicket = false, isSoldOut, ladiesBookedSeats, isDpEnabled, renderIcon, operatorLabel, }) {
|
|
3
|
-
console.log("🚀 ~ ExpandedDropdown ~ isDpEnabled:", isDpEnabled, serviceItem);
|
|
4
3
|
const hasPetInfo = serviceItem.pet_seat_info &&
|
|
5
4
|
Object.keys(serviceItem.pet_seat_info).length > 0;
|
|
6
5
|
return (React.createElement("div", { className: "px-[15px] pt-[26px] pb-[14px] -mt-[16px] pt-[35px] relative -z-9", style: {
|
package/dist/ui/RatingBlock.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare const RatingBlock: ({ showRating, serviceItem, isSoldOut, colors, t, translation, isPeru, }: any) => React.JSX.Element;
|
|
2
|
+
declare const RatingBlock: ({ showRating, serviceItem, isSoldOut, colors, t, translation, isPeru, isTrain, }: any) => React.JSX.Element;
|
|
3
3
|
export default RatingBlock;
|
package/dist/ui/RatingBlock.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import RatingHover from "../components/ServiceItem/RatingHover";
|
|
3
|
-
const RatingBlock = ({ showRating, serviceItem, isSoldOut, colors, t, translation, isPeru = false, }) =>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
React.createElement("div", { className: "
|
|
12
|
-
|
|
3
|
+
const RatingBlock = ({ showRating, serviceItem, isSoldOut, colors, t, translation, isPeru = false, isTrain = false, }) => {
|
|
4
|
+
return (React.createElement("div", { className: "flex items-center whitespace-nowrap" },
|
|
5
|
+
showRating && (React.createElement(RatingHover, { serviceItem: serviceItem, isSoldOut: isSoldOut, colors: colors, t: t, translation: translation, isPeru: isPeru })),
|
|
6
|
+
React.createElement("div", { className: "group relative ml-[10px] text-[12px]", style: {
|
|
7
|
+
marginLeft: showRating ? "6px" : "0",
|
|
8
|
+
color: isSoldOut ? "#c0c0c0" : "#464647",
|
|
9
|
+
} },
|
|
10
|
+
React.createElement("span", { className: `block max-w-[120px] cursor-pointer text-[12px] ${isPeru || isTrain ? "overflow-hidden text-ellipsis whitespace-nowrap" : ""}` }, serviceItem.operator_details[2]),
|
|
11
|
+
React.createElement("div", { className: "hidden group-hover:block absolute top-[24px] left-1/2 -translate-x-1/2 text-white p-3 rounded-[14px] whitespace-nowrap z-10 mt-2.5 w-max text-center shadow-service text-[12px]", style: { backgroundColor: colors.bottomStripColor, zIndex: "300" } },
|
|
12
|
+
React.createElement("div", { className: "tooltip-arrow absolute -top-[7px] left-1/2 -translate-x-1/2 w-0 h-0 border-l-8 border-r-8 border-b-8 border-l-transparent border-r-transparent ", style: { borderBottomColor: colors.bottomStripColor } }),
|
|
13
|
+
serviceItem.operator_details[2]))));
|
|
14
|
+
};
|
|
13
15
|
export default RatingBlock;
|
|
@@ -114,7 +114,9 @@ function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currenc
|
|
|
114
114
|
typeof val.label === "string" || typeof val.label === "number"
|
|
115
115
|
? removeDuplicateSeats && isPeru
|
|
116
116
|
? CommonService.truncateSeatLabel(val.label)
|
|
117
|
-
:
|
|
117
|
+
: isTrain
|
|
118
|
+
? CommonService.capitalize(String(val.apiSeatType))
|
|
119
|
+
: CommonService.capitalize(String(val.label))
|
|
118
120
|
: null)));
|
|
119
121
|
});
|
|
120
122
|
};
|
package/package.json
CHANGED
|
@@ -339,7 +339,6 @@ const PaymentSideBarDesktop: React.FC<PaymentSideBarProps> = ({
|
|
|
339
339
|
serviceFeeDataStateValue,
|
|
340
340
|
isOpsite,
|
|
341
341
|
}) => {
|
|
342
|
-
console.log("🚀 ~ PaymentSideBarDesktop ~ walletMoney:", walletMoney);
|
|
343
342
|
// REMOVED AM/PM DUPLICATION AND ADDED 24 HOUR TIME FORMAT IN BOARDING STAGE
|
|
344
343
|
const depTime = droppingTimeOnward || "";
|
|
345
344
|
const returnTime = droppingTimeReturn || "";
|
|
@@ -813,7 +812,7 @@ const PaymentSideBarDesktop: React.FC<PaymentSideBarProps> = ({
|
|
|
813
812
|
</>
|
|
814
813
|
)}
|
|
815
814
|
|
|
816
|
-
{serviceFeeDataStateValue?.total_convenience_fee_amount && (
|
|
815
|
+
{!!serviceFeeDataStateValue?.total_convenience_fee_amount && (
|
|
817
816
|
<PaymentItem
|
|
818
817
|
label={
|
|
819
818
|
<div style={{ display: "flex", alignItems: "center" }}>
|
|
@@ -588,7 +588,7 @@ const PaymentSideBarMobile: React.FC<PaymentSideBarProps> = ({
|
|
|
588
588
|
</>
|
|
589
589
|
)}
|
|
590
590
|
|
|
591
|
-
{serviceFeeDataStateValue?.total_convenience_fee_amount && (
|
|
591
|
+
{!!serviceFeeDataStateValue?.total_convenience_fee_amount && (
|
|
592
592
|
<PaymentItem
|
|
593
593
|
label={
|
|
594
594
|
<div style={{ display: "flex", alignItems: "center" }}>
|
|
@@ -593,7 +593,7 @@ function ServiceItemPB({
|
|
|
593
593
|
}}
|
|
594
594
|
>
|
|
595
595
|
<div
|
|
596
|
-
className={`grid text-[#464647] w-full ${isTrain ? "[grid-template-columns:
|
|
596
|
+
className={`grid text-[#464647] w-full ${isTrain ? "[grid-template-columns:20%_27%_2.5%_27%_15.5%]" : "[grid-template-columns:20%_30%_2.5%_24%_15.5%]"} gap-x-[2%] items-center`}
|
|
597
597
|
>
|
|
598
598
|
{/* OPERATOR LOGO */}
|
|
599
599
|
<div className="flex flex-col gap-[5px]">
|
|
@@ -619,6 +619,7 @@ function ServiceItemPB({
|
|
|
619
619
|
t={t}
|
|
620
620
|
translation={translation}
|
|
621
621
|
isPeru={isPeru}
|
|
622
|
+
isTrain={isTrain}
|
|
622
623
|
/>
|
|
623
624
|
</div>
|
|
624
625
|
|
|
@@ -31,7 +31,6 @@ function ExpandedDropdown({
|
|
|
31
31
|
renderIcon,
|
|
32
32
|
operatorLabel,
|
|
33
33
|
}: ExpandedDropdownProps): React.ReactElement {
|
|
34
|
-
console.log("🚀 ~ ExpandedDropdown ~ isDpEnabled:", isDpEnabled, serviceItem);
|
|
35
34
|
const hasPetInfo =
|
|
36
35
|
serviceItem.pet_seat_info &&
|
|
37
36
|
Object.keys(serviceItem.pet_seat_info).length > 0;
|
package/src/ui/RatingBlock.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import RatingHover from "../components/ServiceItem/RatingHover";
|
|
3
|
+
import commonService from "../utils/CommonService";
|
|
3
4
|
|
|
4
5
|
const RatingBlock = ({
|
|
5
6
|
showRating,
|
|
@@ -9,46 +10,49 @@ const RatingBlock = ({
|
|
|
9
10
|
t,
|
|
10
11
|
translation,
|
|
11
12
|
isPeru = false,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
// style={{ opacity: isSoldOut ? 0.5 : 1 }}
|
|
16
|
-
>
|
|
17
|
-
{showRating && (
|
|
18
|
-
<RatingHover
|
|
19
|
-
serviceItem={serviceItem}
|
|
20
|
-
isSoldOut={isSoldOut}
|
|
21
|
-
colors={colors}
|
|
22
|
-
t={t}
|
|
23
|
-
translation={translation}
|
|
24
|
-
isPeru={isPeru}
|
|
25
|
-
/>
|
|
26
|
-
)}
|
|
27
|
-
|
|
13
|
+
isTrain = false,
|
|
14
|
+
}: any) => {
|
|
15
|
+
return (
|
|
28
16
|
<div
|
|
29
|
-
className="
|
|
30
|
-
style={{
|
|
31
|
-
marginLeft: showRating ? "6px" : "0",
|
|
32
|
-
color: isSoldOut ? "#c0c0c0" : "#464647",
|
|
33
|
-
}}
|
|
17
|
+
className="flex items-center whitespace-nowrap"
|
|
18
|
+
// style={{ opacity: isSoldOut ? 0.5 : 1 }}
|
|
34
19
|
>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
20
|
+
{showRating && (
|
|
21
|
+
<RatingHover
|
|
22
|
+
serviceItem={serviceItem}
|
|
23
|
+
isSoldOut={isSoldOut}
|
|
24
|
+
colors={colors}
|
|
25
|
+
t={t}
|
|
26
|
+
translation={translation}
|
|
27
|
+
isPeru={isPeru}
|
|
28
|
+
/>
|
|
29
|
+
)}
|
|
30
|
+
|
|
40
31
|
<div
|
|
41
|
-
className="
|
|
42
|
-
style={{
|
|
32
|
+
className="group relative ml-[10px] text-[12px]"
|
|
33
|
+
style={{
|
|
34
|
+
marginLeft: showRating ? "6px" : "0",
|
|
35
|
+
color: isSoldOut ? "#c0c0c0" : "#464647",
|
|
36
|
+
}}
|
|
43
37
|
>
|
|
38
|
+
<span
|
|
39
|
+
className={`block max-w-[120px] cursor-pointer text-[12px] ${isPeru || isTrain ? "overflow-hidden text-ellipsis whitespace-nowrap" : ""}`}
|
|
40
|
+
>
|
|
41
|
+
{serviceItem.operator_details[2]}
|
|
42
|
+
</span>
|
|
44
43
|
<div
|
|
45
|
-
className="
|
|
46
|
-
style={{
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
className="hidden group-hover:block absolute top-[24px] left-1/2 -translate-x-1/2 text-white p-3 rounded-[14px] whitespace-nowrap z-10 mt-2.5 w-max text-center shadow-service text-[12px]"
|
|
45
|
+
style={{ backgroundColor: colors.bottomStripColor, zIndex: "300" }}
|
|
46
|
+
>
|
|
47
|
+
<div
|
|
48
|
+
className="tooltip-arrow absolute -top-[7px] left-1/2 -translate-x-1/2 w-0 h-0 border-l-8 border-r-8 border-b-8 border-l-transparent border-r-transparent "
|
|
49
|
+
style={{ borderBottomColor: colors.bottomStripColor }}
|
|
50
|
+
></div>
|
|
51
|
+
{serviceItem.operator_details[2]}
|
|
52
|
+
</div>
|
|
49
53
|
</div>
|
|
50
54
|
</div>
|
|
51
|
-
|
|
52
|
-
|
|
55
|
+
);
|
|
56
|
+
};
|
|
53
57
|
|
|
54
58
|
export default RatingBlock;
|
|
@@ -217,7 +217,9 @@ function SeatSection({
|
|
|
217
217
|
{typeof val.label === "string" || typeof val.label === "number"
|
|
218
218
|
? removeDuplicateSeats && isPeru
|
|
219
219
|
? CommonService.truncateSeatLabel(val.label)
|
|
220
|
-
:
|
|
220
|
+
: isTrain
|
|
221
|
+
? CommonService.capitalize(String(val.apiSeatType))
|
|
222
|
+
: CommonService.capitalize(String(val.label))
|
|
221
223
|
: null}
|
|
222
224
|
</span>
|
|
223
225
|
</div>
|