kupos-ui-components-lib 10.4.15 → 10.4.16
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/FilterSortBar/OptionCheckboxList.js +2 -1
- package/dist/ui/FeaturServiceUiMobile/FeatureServiceUiMobile.js +0 -16
- package/dist/ui/FeatureServiceUI/FeatureServiceUi.js +0 -2
- package/dist/ui/PaymentCardMobile/PaymentCardMobile.js +2 -4
- package/package.json +1 -1
- package/src/components/FilterSortBar/OptionCheckboxList.tsx +2 -1
- package/src/ui/FeaturServiceUiMobile/FeatureServiceUiMobile.tsx +0 -16
- package/src/ui/FeatureServiceUI/FeatureServiceUi.tsx +0 -2
- package/src/ui/PaymentCardMobile/PaymentCardMobile.tsx +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { CheckboxIcon, StarIcon, TimeOfDayIcon } from "./icons";
|
|
3
|
+
import CommonService from "../../utils/CommonService";
|
|
3
4
|
const RatingLabel = ({ stars, label, starColor, icons, }) => (React.createElement("div", { className: "flex items-center gap-[1px] whitespace-nowrap" },
|
|
4
5
|
Array.from({ length: 5 }, (_, i) => (React.createElement(StarIcon, { key: i, size: 10, filled: stars != null && i < stars, color: starColor, filledSrc: icons === null || icons === void 0 ? void 0 : icons.starFilledIcon, emptySrc: icons === null || icons === void 0 ? void 0 : icons.starEmptyIcon }))),
|
|
5
6
|
React.createElement("span", { className: "ml-[6px]" }, label)));
|
|
@@ -12,7 +13,7 @@ const OptionCheckboxList = ({ options, kind, onToggle, primaryColor, starColor,
|
|
|
12
13
|
return (React.createElement("div", { key: option.id, onClick: () => onToggle(option.id), className: "flex items-center justify-between py-[12px] px-[2px] cursor-pointer text-[13px] text-[#464647] select-none [-webkit-tap-highlight-color:transparent]" },
|
|
13
14
|
kind === "rating" ? (React.createElement(RatingLabel, { stars: option.stars, label: option.label, starColor: starColor, icons: icons })) : option.icon ? (React.createElement("div", { className: "flex items-center gap-[10px]" },
|
|
14
15
|
React.createElement(TimeOfDayIcon, { variant: option.icon, size: 16, src: (_a = icons === null || icons === void 0 ? void 0 : icons.timeOfDayIcons) === null || _a === void 0 ? void 0 : _a[option.icon] }),
|
|
15
|
-
React.createElement("span", null, option.label))) : (React.createElement("span", null, option.label)),
|
|
16
|
+
React.createElement("span", null, option.label))) : (React.createElement("span", null, CommonService.capitalizeFirstLetter(option.label))),
|
|
16
17
|
React.createElement(CheckboxIcon, { checked: option.selected, color: primaryColor, spriteSrc: icons === null || icons === void 0 ? void 0 : icons.checkBoxIcon })));
|
|
17
18
|
})));
|
|
18
19
|
};
|
|
@@ -244,22 +244,6 @@ const FeatureServiceUiMobile = ({ serviceItem, showTopLabel, colors, isSoldOut,
|
|
|
244
244
|
return (React.createElement("button", { key: slot.label, type: "button", onClick: () => {
|
|
245
245
|
onTimeSlotChange === null || onTimeSlotChange === void 0 ? void 0 : onTimeSlotChange(slot.label);
|
|
246
246
|
onTimeDropdownToggle === null || onTimeDropdownToggle === void 0 ? void 0 : onTimeDropdownToggle(null);
|
|
247
|
-
// const slotServices = services.filter((s) => {
|
|
248
|
-
// const depMin = commonService.timeToMinutes(
|
|
249
|
-
// s.departure_time,
|
|
250
|
-
// );
|
|
251
|
-
// return (
|
|
252
|
-
// depMin >= slot.start && depMin < slot.end
|
|
253
|
-
// );
|
|
254
|
-
// });
|
|
255
|
-
// console.log(
|
|
256
|
-
// "Selected slot label:",
|
|
257
|
-
// slot.label,
|
|
258
|
-
// );
|
|
259
|
-
// console.log(
|
|
260
|
-
// "Services in selected slot:",
|
|
261
|
-
// slotServices,
|
|
262
|
-
// );
|
|
263
247
|
}, className: `flex w-full cursor-pointer items-center justify-between gap-[10px] border-none px-[12px] py-[9px] text-left text-[13px] ${isActive ? "bg-[#FF5C60] font-bold text-[white]" : "bg-transparent font-normal text-[#1a1a1a]"}` },
|
|
264
248
|
React.createElement("span", null, slot.label),
|
|
265
249
|
count > 0 && (React.createElement("span", { className: `text-[11px] rounded-full px-[6px] py-[2px] font-bold ${isActive
|
|
@@ -34,7 +34,6 @@ const HARDCODED_OPERATORS = [
|
|
|
34
34
|
const expandedStateMap = {};
|
|
35
35
|
const FeatureServiceUi = ({ serviceItem, showTopLabel, getAnimationIcon, cityOrigin, cityDestination, renderIcon, viewersConfig, isFeatureDropDownExpand, onToggleExpand, ticketQuantity = 1, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onBookButtonPress, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData = undefined, }) => {
|
|
36
36
|
var _a, _b, _c, _d, _e;
|
|
37
|
-
console.log("🚀 ~ FeatureServiceUi ~ selectedTimeSlot:", selectedTimeSlot);
|
|
38
37
|
// Use wow_deal services if available, otherwise fall back to serviceItem operators or hardcoded
|
|
39
38
|
const operators = ((_a = wowDealData === null || wowDealData === void 0 ? void 0 : wowDealData.services) === null || _a === void 0 ? void 0 : _a.length) > 0
|
|
40
39
|
? wowDealData.services.slice(0, 3).map((service) => ({
|
|
@@ -80,7 +79,6 @@ const FeatureServiceUi = ({ serviceItem, showTopLabel, getAnimationIcon, cityOri
|
|
|
80
79
|
// Active slot: the one matching selectedTimeSlot label, or the first available
|
|
81
80
|
const activeSlot = availableTimeSlots.find((s) => s.label === selectedTimeSlot) ||
|
|
82
81
|
availableTimeSlots[0];
|
|
83
|
-
console.log("🚀 ~ FeatureServiceUi ~ activeSlot:", activeSlot);
|
|
84
82
|
// Services that fall within the active slot, sorted by final price ascending
|
|
85
83
|
const servicesInActiveSlot = activeSlot
|
|
86
84
|
? services
|
|
@@ -325,7 +325,7 @@ export const PaymentCardMobile = (props) => {
|
|
|
325
325
|
React.createElement("div", { style: {
|
|
326
326
|
fontSize: "15px",
|
|
327
327
|
textTransform: "capitalize",
|
|
328
|
-
} }, modalSource),
|
|
328
|
+
}, className: "bold-text" }, modalSource),
|
|
329
329
|
formatSubText(modalBoardingStage, modalBoardingTime) && (React.createElement("div", { style: {
|
|
330
330
|
fontSize: "13px",
|
|
331
331
|
marginTop: "2px",
|
|
@@ -338,9 +338,8 @@ export const PaymentCardMobile = (props) => {
|
|
|
338
338
|
React.createElement("div", null,
|
|
339
339
|
React.createElement("div", { style: {
|
|
340
340
|
fontSize: "15px",
|
|
341
|
-
fontWeight: 700,
|
|
342
341
|
textTransform: "capitalize",
|
|
343
|
-
} }, modalDest),
|
|
342
|
+
}, className: "bold-text" }, modalDest),
|
|
344
343
|
formatSubText(modalDroppingStage, modalDroppingTime) && (React.createElement("div", { style: {
|
|
345
344
|
fontSize: "13px",
|
|
346
345
|
marginTop: "2px",
|
|
@@ -363,7 +362,6 @@ export const PaymentCardMobile = (props) => {
|
|
|
363
362
|
? selectedReturn[0]
|
|
364
363
|
: selectedOnward[0]).map((val, idx) => {
|
|
365
364
|
var _a, _b;
|
|
366
|
-
console.log("🚀 ~ PaymentCardMobile ~ val:", val);
|
|
367
365
|
return (React.createElement("span", { key: idx, style: {
|
|
368
366
|
display: "inline-flex",
|
|
369
367
|
alignItems: "center",
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { FilterOptionItem, FilterCategoryKind, FilterSortBarIcons } from "./types";
|
|
3
3
|
import { CheckboxIcon, StarIcon, TimeOfDayIcon } from "./icons";
|
|
4
|
+
import CommonService from "../../utils/CommonService";
|
|
4
5
|
|
|
5
6
|
interface OptionCheckboxListProps {
|
|
6
7
|
options: FilterOptionItem[];
|
|
@@ -63,7 +64,7 @@ const OptionCheckboxList = ({ options, kind, onToggle, primaryColor, starColor,
|
|
|
63
64
|
<span>{option.label}</span>
|
|
64
65
|
</div>
|
|
65
66
|
) : (
|
|
66
|
-
<span>{option.label}</span>
|
|
67
|
+
<span>{CommonService.capitalizeFirstLetter(option.label)}</span>
|
|
67
68
|
)}
|
|
68
69
|
<CheckboxIcon checked={option.selected} color={primaryColor} spriteSrc={icons?.checkBoxIcon} />
|
|
69
70
|
</div>
|
|
@@ -366,22 +366,6 @@ const FeatureServiceUiMobile = ({
|
|
|
366
366
|
onClick={() => {
|
|
367
367
|
onTimeSlotChange?.(slot.label);
|
|
368
368
|
onTimeDropdownToggle?.(null);
|
|
369
|
-
// const slotServices = services.filter((s) => {
|
|
370
|
-
// const depMin = commonService.timeToMinutes(
|
|
371
|
-
// s.departure_time,
|
|
372
|
-
// );
|
|
373
|
-
// return (
|
|
374
|
-
// depMin >= slot.start && depMin < slot.end
|
|
375
|
-
// );
|
|
376
|
-
// });
|
|
377
|
-
// console.log(
|
|
378
|
-
// "Selected slot label:",
|
|
379
|
-
// slot.label,
|
|
380
|
-
// );
|
|
381
|
-
// console.log(
|
|
382
|
-
// "Services in selected slot:",
|
|
383
|
-
// slotServices,
|
|
384
|
-
// );
|
|
385
369
|
}}
|
|
386
370
|
className={`flex w-full cursor-pointer items-center justify-between gap-[10px] border-none px-[12px] py-[9px] text-left text-[13px] ${isActive ? "bg-[#FF5C60] font-bold text-[white]" : "bg-transparent font-normal text-[#1a1a1a]"}`}
|
|
387
371
|
>
|
|
@@ -55,7 +55,6 @@ const FeatureServiceUi = ({
|
|
|
55
55
|
onTimeDropdownToggle,
|
|
56
56
|
wowDealData = undefined,
|
|
57
57
|
}) => {
|
|
58
|
-
console.log("🚀 ~ FeatureServiceUi ~ selectedTimeSlot:", selectedTimeSlot);
|
|
59
58
|
// Use wow_deal services if available, otherwise fall back to serviceItem operators or hardcoded
|
|
60
59
|
const operators =
|
|
61
60
|
wowDealData?.services?.length > 0
|
|
@@ -113,7 +112,6 @@ const FeatureServiceUi = ({
|
|
|
113
112
|
const activeSlot =
|
|
114
113
|
availableTimeSlots.find((s) => s.label === selectedTimeSlot) ||
|
|
115
114
|
availableTimeSlots[0];
|
|
116
|
-
console.log("🚀 ~ FeatureServiceUi ~ activeSlot:", activeSlot);
|
|
117
115
|
|
|
118
116
|
// Services that fall within the active slot, sorted by final price ascending
|
|
119
117
|
const servicesInActiveSlot = activeSlot
|
|
@@ -548,6 +548,7 @@ export const PaymentCardMobile: React.FC<PaymentSideBarProps> = (props) => {
|
|
|
548
548
|
fontSize: "15px",
|
|
549
549
|
textTransform: "capitalize",
|
|
550
550
|
}}
|
|
551
|
+
className="bold-text"
|
|
551
552
|
>
|
|
552
553
|
{modalSource}
|
|
553
554
|
</div>
|
|
@@ -582,9 +583,9 @@ export const PaymentCardMobile: React.FC<PaymentSideBarProps> = (props) => {
|
|
|
582
583
|
<div
|
|
583
584
|
style={{
|
|
584
585
|
fontSize: "15px",
|
|
585
|
-
fontWeight: 700,
|
|
586
586
|
textTransform: "capitalize",
|
|
587
587
|
}}
|
|
588
|
+
className="bold-text"
|
|
588
589
|
>
|
|
589
590
|
{modalDest}
|
|
590
591
|
</div>
|
|
@@ -641,7 +642,6 @@ export const PaymentCardMobile: React.FC<PaymentSideBarProps> = (props) => {
|
|
|
641
642
|
? selectedReturn[0]
|
|
642
643
|
: selectedOnward[0]
|
|
643
644
|
).map((val: any, idx: number) => {
|
|
644
|
-
console.log("🚀 ~ PaymentCardMobile ~ val:", val);
|
|
645
645
|
return (
|
|
646
646
|
<span
|
|
647
647
|
key={idx}
|