kupos-ui-components-lib 10.3.2 → 10.3.3
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 +1 -1
- package/dist/ui/ExpendedDropDown/ExpandedDropdown.js +0 -1
- package/dist/ui/RatingBlock.d.ts +1 -1
- package/dist/ui/RatingBlock.js +15 -10
- 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 +1 -0
- package/src/ui/ExpendedDropDown/ExpandedDropdown.tsx +0 -1
- package/src/ui/RatingBlock.tsx +43 -34
|
@@ -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: {
|
|
@@ -319,7 +319,7 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
|
|
|
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",
|
|
@@ -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,18 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import RatingHover from "../components/ServiceItem/RatingHover";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
React.createElement("div", { className: "
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
React.createElement("
|
|
12
|
-
|
|
3
|
+
import commonService from "../utils/CommonService";
|
|
4
|
+
const RatingBlock = ({ showRating, serviceItem, isSoldOut, colors, t, translation, isPeru = false, isTrain = false, }) => {
|
|
5
|
+
return (React.createElement("div", { className: "flex items-center whitespace-nowrap" },
|
|
6
|
+
showRating && (React.createElement(RatingHover, { serviceItem: serviceItem, isSoldOut: isSoldOut, colors: colors, t: t, translation: translation, isPeru: isPeru })),
|
|
7
|
+
React.createElement("div", { className: "group relative ml-[10px] text-[12px]", style: {
|
|
8
|
+
marginLeft: showRating ? "6px" : "0",
|
|
9
|
+
color: isSoldOut ? "#c0c0c0" : "#464647",
|
|
10
|
+
} },
|
|
11
|
+
React.createElement("span", { className: `block max-w-[120px] cursor-pointer text-[12px] ${isPeru || isTrain ? "overflow-hidden text-ellipsis whitespace-nowrap" : ""}` }, isTrain
|
|
12
|
+
? commonService.truncateSeatLabel(serviceItem.operator_details[2], 14)
|
|
13
|
+
: commonService.capitalize(serviceItem.operator_details[2])),
|
|
14
|
+
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" } },
|
|
15
|
+
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 } }),
|
|
16
|
+
serviceItem.operator_details[2]))));
|
|
17
|
+
};
|
|
13
18
|
export default RatingBlock;
|
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" }}>
|
|
@@ -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,54 @@ 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
|
+
{isTrain
|
|
42
|
+
? commonService.truncateSeatLabel(
|
|
43
|
+
serviceItem.operator_details[2],
|
|
44
|
+
14,
|
|
45
|
+
)
|
|
46
|
+
: commonService.capitalize(serviceItem.operator_details[2])}
|
|
47
|
+
</span>
|
|
44
48
|
<div
|
|
45
|
-
className="
|
|
46
|
-
style={{
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
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]"
|
|
50
|
+
style={{ backgroundColor: colors.bottomStripColor, zIndex: "300" }}
|
|
51
|
+
>
|
|
52
|
+
<div
|
|
53
|
+
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 "
|
|
54
|
+
style={{ borderBottomColor: colors.bottomStripColor }}
|
|
55
|
+
></div>
|
|
56
|
+
{serviceItem.operator_details[2]}
|
|
57
|
+
</div>
|
|
49
58
|
</div>
|
|
50
59
|
</div>
|
|
51
|
-
|
|
52
|
-
|
|
60
|
+
);
|
|
61
|
+
};
|
|
53
62
|
|
|
54
63
|
export default RatingBlock;
|