kupos-ui-components-lib 9.7.5 → 9.7.7
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/KuposUIComponent.d.ts +3 -0
- package/dist/components/ServiceItem/ServiceItemDesktop.d.ts +1 -1
- package/dist/components/ServiceItem/ServiceItemDesktop.js +15 -2
- package/dist/components/ServiceItem/ServiceItemMobile.d.ts +1 -1
- package/dist/components/ServiceItem/ServiceItemMobile.js +16 -7
- package/dist/components/ServiceItem/mobileTypes.d.ts +32 -0
- package/dist/components/ServiceItem/types.d.ts +22 -0
- package/dist/styles.css +209 -0
- package/dist/ui/BottomAmenities/BottomAmenities.js +1 -1
- package/dist/ui/ExpendedDropDown/ExpandedDropdown.js +2 -2
- package/dist/ui/FeaturServiceUiMobile/FeatureServiceUiMobile.d.ts +5 -1
- package/dist/ui/FeaturServiceUiMobile/FeatureServiceUiMobile.js +40 -92
- package/dist/ui/FeatureServiceUI/FeatureServiceUi.d.ts +5 -1
- package/dist/ui/FeatureServiceUI/FeatureServiceUi.js +40 -5
- package/dist/utils/CommonService.js +11 -1
- package/package.json +1 -1
- package/src/KuposUIComponent.tsx +3 -0
- package/src/assets/images/anims/service_list/thunder_icon.json +1 -0
- package/src/assets/images/anims/service_list/users_anim.json +1 -0
- package/src/components/ServiceItem/ServiceItemDesktop.tsx +50 -0
- package/src/components/ServiceItem/ServiceItemMobile.tsx +340 -286
- package/src/components/ServiceItem/mobileTypes.ts +29 -1
- package/src/components/ServiceItem/types.ts +23 -1
- package/src/styles.css +15 -0
- package/src/ui/BottomAmenities/BottomAmenities.tsx +1 -1
- package/src/ui/ExpendedDropDown/ExpandedDropdown.tsx +2 -2
- package/src/ui/FeaturServiceUiMobile/FeatureServiceUiMobile.tsx +517 -0
- package/src/ui/FeatureServiceUI/FeatureServiceUi.tsx +554 -0
- package/src/utils/CommonService.ts +13 -1
|
@@ -27,13 +27,14 @@ const HARDCODED_OPERATORS = [
|
|
|
27
27
|
seatsAvailable: "3 disponibles",
|
|
28
28
|
},
|
|
29
29
|
];
|
|
30
|
-
const FeatureServiceUiMobile = ({ serviceItem, showTopLabel, colors, isSoldOut, cityOrigin, cityDestination, renderIcon, viewersConfig, isFeatureDropDownExpand, onToggleExpand, ticketQuantity = 1, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onBookButtonPress, }) => {
|
|
31
|
-
var _a, _b, _c, _d;
|
|
30
|
+
const FeatureServiceUiMobile = ({ serviceItem, showTopLabel, colors, isSoldOut, cityOrigin, cityDestination, renderIcon, viewersConfig, isFeatureDropDownExpand, onToggleExpand, ticketQuantity = 1, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onBookButtonPress, selectedTimeSlot = TIME_SLOTS[0], onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, }) => {
|
|
31
|
+
var _a, _b, _c, _d, _e;
|
|
32
32
|
const operators = ((_a = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.operators) === null || _a === void 0 ? void 0 : _a.length) > 0
|
|
33
33
|
? serviceItem.operators
|
|
34
34
|
: HARDCODED_OPERATORS;
|
|
35
35
|
const isItemExpanded = serviceItem.id === isFeatureDropDownExpand ||
|
|
36
36
|
isFeatureDropDownExpand === true;
|
|
37
|
+
const isThisTimeDropdownOpen = isTimeDropdownOpen === serviceItem.id;
|
|
37
38
|
const canDecreaseTicketQuantity = ticketQuantity > 1;
|
|
38
39
|
const HOW_IT_WORKS_STEPS = [
|
|
39
40
|
{
|
|
@@ -120,94 +121,54 @@ const FeatureServiceUiMobile = ({ serviceItem, showTopLabel, colors, isSoldOut,
|
|
|
120
121
|
} }),
|
|
121
122
|
React.createElement("div", { className: "flex items-center gap-[6px]" },
|
|
122
123
|
React.createElement("img", { src: (_c = serviceItem.icons) === null || _c === void 0 ? void 0 : _c.whiteDestination, alt: "destination", className: `w-[14px] h-[14px] shrink-0 ${isSoldOut ? "grayscale" : ""}`, style: { opacity: isSoldOut ? 0.5 : 1 } }),
|
|
123
|
-
React.createElement("
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
React.createElement("
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
el.style.color = active
|
|
153
|
-
? "#fff"
|
|
154
|
-
: "#1a1a1a";
|
|
155
|
-
const ck = el.querySelector("[data-checkmark]");
|
|
156
|
-
if (ck)
|
|
157
|
-
ck.style.display = active
|
|
158
|
-
? "flex"
|
|
159
|
-
: "none";
|
|
160
|
-
const lbl = el.querySelector("[data-slot-label]");
|
|
161
|
-
if (lbl)
|
|
162
|
-
lbl.style.fontWeight = active
|
|
163
|
-
? "bold"
|
|
164
|
-
: "normal";
|
|
165
|
-
});
|
|
166
|
-
details.open = false;
|
|
167
|
-
}
|
|
168
|
-
}, className: "flex w-full items-center gap-[10px] px-[16px] py-[13px] text-[13px]", style: {
|
|
169
|
-
background: isFirst ? "#4169E1" : "transparent",
|
|
170
|
-
border: "none",
|
|
171
|
-
cursor: "pointer",
|
|
172
|
-
textAlign: "left",
|
|
173
|
-
color: isFirst ? "#fff" : "#1a1a1a",
|
|
174
|
-
} },
|
|
175
|
-
React.createElement("div", { "data-checkmark": "true", style: {
|
|
176
|
-
width: "16px",
|
|
177
|
-
flexShrink: 0,
|
|
178
|
-
display: isFirst ? "flex" : "none",
|
|
179
|
-
alignItems: "center",
|
|
180
|
-
justifyContent: "center",
|
|
181
|
-
} },
|
|
182
|
-
React.createElement("svg", { width: "14", height: "11", viewBox: "0 0 14 11", fill: "none" },
|
|
183
|
-
React.createElement("path", { d: "M1 5.5l3.5 4L13 1", stroke: "#fff", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }))),
|
|
184
|
-
React.createElement("span", { "data-slot-label": "true", style: {
|
|
185
|
-
fontWeight: isFirst ? "bold" : "normal",
|
|
186
|
-
} }, slot)));
|
|
187
|
-
})))))),
|
|
124
|
+
React.createElement("div", { className: "kupos-time-dd relative", tabIndex: 0, onBlur: (e) => {
|
|
125
|
+
if (!e.currentTarget.contains(e.relatedTarget)) {
|
|
126
|
+
onTimeDropdownToggle === null || onTimeDropdownToggle === void 0 ? void 0 : onTimeDropdownToggle(null);
|
|
127
|
+
}
|
|
128
|
+
}, style: { outline: "none" } },
|
|
129
|
+
React.createElement("button", { type: "button", onClick: () => onTimeDropdownToggle === null || onTimeDropdownToggle === void 0 ? void 0 : onTimeDropdownToggle(isThisTimeDropdownOpen ? null : serviceItem.id), className: "flex cursor-pointer select-none items-center gap-[6px] border-none bg-transparent p-0 bold-text text-[13px] text-[white]" },
|
|
130
|
+
React.createElement("span", null, selectedTimeSlot),
|
|
131
|
+
React.createElement("img", { src: (_d = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _d === void 0 ? void 0 : _d.downArrow, alt: "down arrow", className: `kupos-time-chevron transition-transform duration-200 ${isThisTimeDropdownOpen ? "rotate-180" : "rotate-0"}`, style: {
|
|
132
|
+
width: "12px",
|
|
133
|
+
height: "8px",
|
|
134
|
+
filter: "brightness(0) invert(1)",
|
|
135
|
+
} })),
|
|
136
|
+
isThisTimeDropdownOpen && (React.createElement(React.Fragment, null,
|
|
137
|
+
React.createElement("div", { className: "absolute left-0 top-[calc(100%+10px)]", style: {
|
|
138
|
+
zIndex: 20,
|
|
139
|
+
backgroundColor: "#fff",
|
|
140
|
+
borderRadius: "14px",
|
|
141
|
+
minWidth: "248px",
|
|
142
|
+
boxShadow: "0 8px 32px rgba(0,0,0,0.28)",
|
|
143
|
+
overflow: "hidden",
|
|
144
|
+
padding: "6px 0",
|
|
145
|
+
} }, TIME_SLOTS.map((slot) => {
|
|
146
|
+
const isActive = slot === selectedTimeSlot;
|
|
147
|
+
return (React.createElement("button", { key: slot, type: "button", onClick: () => {
|
|
148
|
+
onTimeSlotChange === null || onTimeSlotChange === void 0 ? void 0 : onTimeSlotChange(slot);
|
|
149
|
+
onTimeDropdownToggle === null || onTimeDropdownToggle === void 0 ? void 0 : onTimeDropdownToggle(null);
|
|
150
|
+
}, className: `flex w-full cursor-pointer items-center 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]"}` },
|
|
151
|
+
React.createElement("span", null, slot)));
|
|
152
|
+
})))))))),
|
|
188
153
|
React.createElement("div", { className: "border-t border-[#363c48] my-[8px]" }),
|
|
189
154
|
React.createElement("div", null,
|
|
190
155
|
React.createElement("span", { className: "text-[15px] bold-text text-[white] flex items-center justify-center mb-[10px]" }, "3 operadores compitiendo por tu compra"),
|
|
191
156
|
React.createElement("div", { className: "flex gap-[8px] text-[white]" }, operators.map((op, idx) => (React.createElement("div", { key: idx, className: "flex min-w-0 flex-col items-center justify-center gap-[8px] rounded-[8px]", style: {
|
|
192
|
-
|
|
157
|
+
height: "100px",
|
|
193
158
|
border: "1px solid #363c48",
|
|
194
159
|
backgroundColor: "#1a202e",
|
|
195
160
|
padding: "14px 10px",
|
|
196
161
|
} },
|
|
197
162
|
React.createElement("img", { src: serviceItem.operator_details[0], alt: op.name, className: `h-[24px] max-w-full object-contain ${isSoldOut ? "grayscale" : ""}` }),
|
|
198
|
-
React.createElement("span", { className: "text-[
|
|
199
|
-
React.createElement("
|
|
200
|
-
React.createElement("span", null, op === null || op === void 0 ? void 0 : op.time)),
|
|
201
|
-
React.createElement("span", { className: "text-[10px] mt-[6px]" }, op === null || op === void 0 ? void 0 : op.seatsAvailable))))),
|
|
163
|
+
React.createElement("span", { className: "text-[12px] truncate max-w-full text-center" }, serviceItem.operator_details[2]),
|
|
164
|
+
React.createElement("span", { className: "text-[11px] mt-[6px]" }, op === null || op === void 0 ? void 0 : op.seatsAvailable))))),
|
|
202
165
|
React.createElement("div", { className: "flex w-full items-center justify-center gap-[6px] text-[12px] mt-[12px]", style: {
|
|
203
166
|
border: "1px solid #363c48",
|
|
204
167
|
backgroundColor: "#1a202e",
|
|
205
168
|
padding: "4px 14px",
|
|
206
169
|
borderRadius: "24px",
|
|
207
170
|
} },
|
|
208
|
-
React.createElement(LottiePlayer, { animationData: serviceItem.icons.personsAnim,
|
|
209
|
-
// animationData={getAnimationIcon("usersAnimation")}
|
|
210
|
-
width: "18px", height: "18px" }),
|
|
171
|
+
React.createElement(LottiePlayer, { animationData: serviceItem.icons.personsAnim, width: "18px", height: "18px" }),
|
|
211
172
|
React.createElement("span", null,
|
|
212
173
|
React.createElement("span", { className: "bold-text text-[white]" },
|
|
213
174
|
" ",
|
|
@@ -227,7 +188,7 @@ const FeatureServiceUiMobile = ({ serviceItem, showTopLabel, colors, isSoldOut,
|
|
|
227
188
|
React.createElement("div", { className: "flex w-[50%] items-center justify-between", style: {
|
|
228
189
|
border: "1px solid #363c48",
|
|
229
190
|
backgroundColor: "#1a202e",
|
|
230
|
-
padding: "
|
|
191
|
+
padding: "4px 14px",
|
|
231
192
|
borderRadius: "14px",
|
|
232
193
|
} },
|
|
233
194
|
React.createElement("button", { type: "button", "aria-label": "Disminuir pasajes", disabled: !canDecreaseTicketQuantity, onClick: () => onDecreaseTicketQuantity === null || onDecreaseTicketQuantity === void 0 ? void 0 : onDecreaseTicketQuantity(serviceItem), className: `flex h-[34px] w-[34px] items-center justify-center rounded-full border-none text-[25px] leading-none text-[white] ${canDecreaseTicketQuantity
|
|
@@ -267,8 +228,8 @@ const FeatureServiceUiMobile = ({ serviceItem, showTopLabel, colors, isSoldOut,
|
|
|
267
228
|
} },
|
|
268
229
|
React.createElement(LottiePlayer, { animationData: serviceItem.icons.thunderAnim, width: "18px", height: "18px" }),
|
|
269
230
|
React.createElement("span", { className: "whitespace-nowrap" }, "\u00A1Lo quiero!")),
|
|
270
|
-
React.createElement("div", { className:
|
|
271
|
-
React.createElement("img", { src: (
|
|
231
|
+
React.createElement("div", { className: "flex justify-end mt-[10px]", onClick: onToggleExpand },
|
|
232
|
+
React.createElement("img", { src: (_e = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _e === void 0 ? void 0 : _e.downArrow, alt: "down arrow", className: `transition-transform duration-300 ease-in-out ${isItemExpanded ? "rotate-180" : ""}`, style: {
|
|
272
233
|
width: "14px",
|
|
273
234
|
height: "8px",
|
|
274
235
|
filter: "brightness(0) invert(1)",
|
|
@@ -284,20 +245,7 @@ const FeatureServiceUiMobile = ({ serviceItem, showTopLabel, colors, isSoldOut,
|
|
|
284
245
|
React.createElement(FeatureStepIcon, { icon: step.icon })),
|
|
285
246
|
React.createElement("div", { className: "flex flex-col" },
|
|
286
247
|
React.createElement("span", { className: "bold-text" }, step.name),
|
|
287
|
-
React.createElement("span", null, step.text)))
|
|
288
|
-
// <div
|
|
289
|
-
// key={step.name}
|
|
290
|
-
// className="flex flex-col items-center text-center text-[#272727]"
|
|
291
|
-
// >
|
|
292
|
-
// <FeatureStepIcon icon={step.icon} />
|
|
293
|
-
// <span className="bold-text mt-[10px] text-[12px] leading-[14px]">
|
|
294
|
-
// {step.name}
|
|
295
|
-
// </span>
|
|
296
|
-
// <span className="mt-[2px] max-w-[220px] text-[12px] leading-[14px] text-[#4a4a4a]">
|
|
297
|
-
// {step.text}
|
|
298
|
-
// </span>
|
|
299
|
-
// </div>
|
|
300
|
-
))))))),
|
|
248
|
+
React.createElement("span", null, step.text)))))))))),
|
|
301
249
|
React.createElement("div", { className: "absolute -top-[11px] left-0 w-full flex items-center justify-end gap-[12px] pr-[15px] z-10 " },
|
|
302
250
|
React.createElement("div", { className: "flex items-center gap-[6px] py-[5px] px-[14px] rounded-[38px] text-[12.5px] bg-[#FF8F45] text-white whitespace-nowrap" },
|
|
303
251
|
React.createElement("span", { className: "flex items-center" },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare const FeatureServiceUi: ({ serviceItem, showTopLabel, isSoldOut, getAnimationIcon, cityOrigin, cityDestination, renderIcon, viewersConfig, isFeatureDropDownExpand, onToggleExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onBookButtonPress, }: {
|
|
2
|
+
declare const FeatureServiceUi: ({ serviceItem, showTopLabel, isSoldOut, getAnimationIcon, cityOrigin, cityDestination, renderIcon, viewersConfig, isFeatureDropDownExpand, onToggleExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onBookButtonPress, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, }: {
|
|
3
3
|
serviceItem: any;
|
|
4
4
|
showTopLabel: any;
|
|
5
5
|
isSoldOut: any;
|
|
@@ -14,5 +14,9 @@ declare const FeatureServiceUi: ({ serviceItem, showTopLabel, isSoldOut, getAnim
|
|
|
14
14
|
onIncreaseTicketQuantity: any;
|
|
15
15
|
onDecreaseTicketQuantity: any;
|
|
16
16
|
onBookButtonPress: any;
|
|
17
|
+
selectedTimeSlot: any;
|
|
18
|
+
onTimeSlotChange: any;
|
|
19
|
+
isTimeDropdownOpen: any;
|
|
20
|
+
onTimeDropdownToggle: any;
|
|
17
21
|
}) => React.JSX.Element;
|
|
18
22
|
export default FeatureServiceUi;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import LottiePlayer from "../../assets/LottiePlayer";
|
|
3
3
|
import commonService from "../../utils/CommonService";
|
|
4
|
+
const TIME_SLOTS = [
|
|
5
|
+
"Entre 07:00 AM y 10:00 AM",
|
|
6
|
+
"Entre 11:00 AM y 14:00 AM",
|
|
7
|
+
"Entre 15:00 PM y 18:00 PM",
|
|
8
|
+
"Entre 19:00 PM y 22:00 PM",
|
|
9
|
+
];
|
|
4
10
|
const HARDCODED_OPERATORS = [
|
|
5
11
|
{
|
|
6
12
|
logo: "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4e/Turbus_logo.svg/320px-Turbus_logo.svg.png",
|
|
@@ -21,13 +27,14 @@ const HARDCODED_OPERATORS = [
|
|
|
21
27
|
seatsAvailable: "3 disponibles",
|
|
22
28
|
},
|
|
23
29
|
];
|
|
24
|
-
const FeatureServiceUi = ({ serviceItem, showTopLabel, isSoldOut, getAnimationIcon, cityOrigin, cityDestination, renderIcon, viewersConfig, isFeatureDropDownExpand, onToggleExpand, ticketQuantity = 1, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onBookButtonPress, }) => {
|
|
25
|
-
var _a, _b, _c, _d, _e;
|
|
30
|
+
const FeatureServiceUi = ({ serviceItem, showTopLabel, isSoldOut, getAnimationIcon, cityOrigin, cityDestination, renderIcon, viewersConfig, isFeatureDropDownExpand, onToggleExpand, ticketQuantity = 1, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onBookButtonPress, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, }) => {
|
|
31
|
+
var _a, _b, _c, _d, _e, _f;
|
|
26
32
|
const operators = ((_a = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.operators) === null || _a === void 0 ? void 0 : _a.length) > 0
|
|
27
33
|
? serviceItem.operators
|
|
28
34
|
: HARDCODED_OPERATORS;
|
|
29
35
|
const isItemExpanded = serviceItem.id === isFeatureDropDownExpand ||
|
|
30
36
|
isFeatureDropDownExpand === true;
|
|
37
|
+
const isThisTimeDropdownOpen = isTimeDropdownOpen === serviceItem.id;
|
|
31
38
|
const canDecreaseTicketQuantity = ticketQuantity > 1;
|
|
32
39
|
const HOW_IT_WORKS_STEPS = [
|
|
33
40
|
{
|
|
@@ -102,7 +109,7 @@ const FeatureServiceUi = ({ serviceItem, showTopLabel, isSoldOut, getAnimationIc
|
|
|
102
109
|
minWidth: "40px",
|
|
103
110
|
} }))),
|
|
104
111
|
React.createElement("div", { id: `service-card-${serviceItem.id}`, className: "bg-[#0C1421] text-white mx-auto relative rounded-[14px] p-[14px] text-[13.33px]" },
|
|
105
|
-
React.createElement("div", { className: "grid grid-cols-[
|
|
112
|
+
React.createElement("div", { className: "grid grid-cols-[25%_48%_27%] items-stretch" },
|
|
106
113
|
React.createElement("div", { className: "flex flex-col justify-between gap-[20px] my-[14px] pr-[22px]" },
|
|
107
114
|
React.createElement("div", { className: "flex flex-col gap-[8px]" },
|
|
108
115
|
React.createElement("div", { className: "flex items-center gap-[8px]" },
|
|
@@ -112,7 +119,35 @@ const FeatureServiceUi = ({ serviceItem, showTopLabel, isSoldOut, getAnimationIc
|
|
|
112
119
|
React.createElement("img", { src: (_d = serviceItem.icons) === null || _d === void 0 ? void 0 : _d.whiteDestination, alt: "destination", className: `w-[14px] h-[14px] shrink-0 ${isSoldOut ? "grayscale" : ""}`, style: { opacity: isSoldOut ? 0.5 : 1 } }),
|
|
113
120
|
React.createElement("span", { className: "text-[13px] bold-text" }, cityDestination === null || cityDestination === void 0 ? void 0 : cityDestination.label.split(",")[0]))),
|
|
114
121
|
React.createElement("div", { className: "flex flex-col gap-[8px]" },
|
|
115
|
-
React.createElement("div", { className: "
|
|
122
|
+
React.createElement("div", { className: "kupos-time-dd relative", tabIndex: 0, onBlur: (e) => {
|
|
123
|
+
if (!e.currentTarget.contains(e.relatedTarget)) {
|
|
124
|
+
onTimeDropdownToggle === null || onTimeDropdownToggle === void 0 ? void 0 : onTimeDropdownToggle(null);
|
|
125
|
+
}
|
|
126
|
+
}, style: { outline: "none" } },
|
|
127
|
+
React.createElement("button", { type: "button", onClick: () => onTimeDropdownToggle === null || onTimeDropdownToggle === void 0 ? void 0 : onTimeDropdownToggle(isThisTimeDropdownOpen ? null : serviceItem.id), className: "flex whitespace-nowrap cursor-pointer select-none items-center gap-[6px] border-none bg-transparent p-0 bold-text text-[12px] text-[white]" },
|
|
128
|
+
React.createElement("span", null, selectedTimeSlot),
|
|
129
|
+
React.createElement("img", { src: (_e = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _e === void 0 ? void 0 : _e.downArrow, alt: "down arrow", className: `kupos-time-chevron transition-transform duration-200 ${isThisTimeDropdownOpen ? "rotate-180" : "rotate-0"}`, style: {
|
|
130
|
+
width: "12px",
|
|
131
|
+
height: "8px",
|
|
132
|
+
filter: "brightness(0) invert(1)",
|
|
133
|
+
} })),
|
|
134
|
+
isThisTimeDropdownOpen && (React.createElement(React.Fragment, null,
|
|
135
|
+
React.createElement("div", { className: "absolute left-0 top-[calc(100%+10px)]", style: {
|
|
136
|
+
zIndex: 20,
|
|
137
|
+
backgroundColor: "#fff",
|
|
138
|
+
borderRadius: "14px",
|
|
139
|
+
minWidth: "248px",
|
|
140
|
+
boxShadow: "0 8px 32px rgba(0,0,0,0.28)",
|
|
141
|
+
overflow: "hidden",
|
|
142
|
+
padding: "6px 0",
|
|
143
|
+
} }, TIME_SLOTS.map((slot) => {
|
|
144
|
+
const isActive = slot === selectedTimeSlot;
|
|
145
|
+
return (React.createElement("button", { key: slot, type: "button", onClick: () => {
|
|
146
|
+
onTimeSlotChange === null || onTimeSlotChange === void 0 ? void 0 : onTimeSlotChange(slot);
|
|
147
|
+
onTimeDropdownToggle === null || onTimeDropdownToggle === void 0 ? void 0 : onTimeDropdownToggle(null);
|
|
148
|
+
}, className: `flex w-full cursor-pointer items-center 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]"}` },
|
|
149
|
+
React.createElement("span", null, slot)));
|
|
150
|
+
}))))),
|
|
116
151
|
React.createElement("div", { className: "text-[11px] bold-text" }, "Viernes 23 de mayo")),
|
|
117
152
|
React.createElement("div", { className: "flex flex-col items-start gap-[10px] text-[12px] " },
|
|
118
153
|
React.createElement("div", { className: "flex items-justify gap-[8px]" },
|
|
@@ -210,7 +245,7 @@ const FeatureServiceUi = ({ serviceItem, showTopLabel, isSoldOut, getAnimationIc
|
|
|
210
245
|
animationData: getAnimationIcon("thunderAnimation"), width: "18px", height: "18px" }),
|
|
211
246
|
React.createElement("span", { className: "whitespace-nowrap" }, "\u00A1Lo quiero!"))),
|
|
212
247
|
React.createElement("div", { className: `absolute bottom-[11px] right-[18px] cursor-pointer transition-transform duration-300 ease-in-out ${isItemExpanded ? "rotate-180" : ""}`, onClick: onToggleExpand },
|
|
213
|
-
React.createElement("img", { src: (
|
|
248
|
+
React.createElement("img", { src: (_f = serviceItem.icons) === null || _f === void 0 ? void 0 : _f.downArrow, alt: "down arrow", style: {
|
|
214
249
|
width: "14px",
|
|
215
250
|
height: "8px",
|
|
216
251
|
filter: "brightness(0) invert(1)",
|
|
@@ -296,10 +296,14 @@ const commonService = {
|
|
|
296
296
|
startViewerCount: (node, viewersConfig) => {
|
|
297
297
|
if (!node || !viewersConfig)
|
|
298
298
|
return;
|
|
299
|
+
const { min, max, interval = 5000 } = viewersConfig;
|
|
300
|
+
const configKey = `${min}-${max}-${interval}`;
|
|
301
|
+
if (node.dataset.viewerId && node.dataset.viewerConfig === configKey) {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
299
304
|
const prevId = node.dataset.viewerId;
|
|
300
305
|
if (prevId)
|
|
301
306
|
clearInterval(Number(prevId));
|
|
302
|
-
const { min, max, interval = 5000 } = viewersConfig;
|
|
303
307
|
const clamp = (v) => Math.min(max, Math.max(min, v));
|
|
304
308
|
const initialValue = Math.floor(Math.random() * (max - min + 1)) + min;
|
|
305
309
|
node.textContent = String(initialValue);
|
|
@@ -310,6 +314,7 @@ const commonService = {
|
|
|
310
314
|
node.textContent = String(clamp(Math.round(next)));
|
|
311
315
|
}, interval);
|
|
312
316
|
node.dataset.viewerId = String(id);
|
|
317
|
+
node.dataset.viewerConfig = configKey;
|
|
313
318
|
},
|
|
314
319
|
startCountdown: (node, countdownSeconds = 599) => {
|
|
315
320
|
if (!node)
|
|
@@ -339,6 +344,10 @@ const commonService = {
|
|
|
339
344
|
startComprandoCount: (node, min = 4, max = 16) => {
|
|
340
345
|
if (!node)
|
|
341
346
|
return;
|
|
347
|
+
const configKey = `${min}-${max}`;
|
|
348
|
+
if (node.dataset.comprandoId && node.dataset.comprandoConfig === configKey) {
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
342
351
|
const prevId = node.dataset.comprandoId;
|
|
343
352
|
if (prevId)
|
|
344
353
|
clearInterval(Number(prevId));
|
|
@@ -355,6 +364,7 @@ const commonService = {
|
|
|
355
364
|
node.textContent = String(next);
|
|
356
365
|
}, 5000); // Update every 5 seconds
|
|
357
366
|
node.dataset.comprandoId = String(id);
|
|
367
|
+
node.dataset.comprandoConfig = configKey;
|
|
358
368
|
},
|
|
359
369
|
};
|
|
360
370
|
export default commonService;
|
package/package.json
CHANGED
package/src/KuposUIComponent.tsx
CHANGED
|
@@ -32,6 +32,9 @@ interface KuposUIComponentProps {
|
|
|
32
32
|
orignLabel?: string;
|
|
33
33
|
destinationLabel?: string;
|
|
34
34
|
t?: (key: string) => string;
|
|
35
|
+
ticketQuantity?: number;
|
|
36
|
+
onIncreaseTicketQuantity?: (serviceItem: any) => void;
|
|
37
|
+
onDecreaseTicketQuantity?: (serviceItem: any) => void;
|
|
35
38
|
|
|
36
39
|
// New ServiceItem props
|
|
37
40
|
id?: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"nm":"t","ddd":0,"h":500,"w":500,"meta":{"g":"@lottiefiles/toolkit-js 0.33.2"},"layers":[{"ty":4,"nm":"t","sr":1,"st":60,"op":90,"ip":60,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[256.655,268,0]},"s":{"a":0,"k":[100,100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[256.655,268,0]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":89},{"s":[0],"t":90}]}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"nm":"0","it":[{"ty":"sh","bm":0,"hd":false,"nm":"ã","d":1,"ks":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-35.799,-108.024],[135.03,-108.024],[135.015,-107.976],[-35.905,-107.905]]}],"t":60},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-35.799,-108.024],[135.03,-108.024],[-48.36,108.024],[-135.03,96.72]]}],"t":66}]}},{"ty":"fl","bm":0,"hd":false,"nm":"å¡","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":60},{"s":[100],"t":61}]}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[245.351,170.024]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]},{"ty":"gr","bm":0,"hd":false,"nm":"0","it":[{"ty":"sh","bm":0,"hd":false,"nm":"ã","d":1,"ks":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-146.335,21.917],[-146.203,22.157],[-111.091,-49.844],[-111.165,-49.681]]}],"t":66},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-146.335,21.917],[66.749,49.681],[146.335,-25.815],[-111.165,-49.681]]}],"t":72}]}},{"ty":"fl","bm":0,"hd":false,"nm":"å¡","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":66},{"s":[100],"t":67}]}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[256.655,244.827]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]},{"ty":"gr","bm":0,"hd":false,"nm":"0","it":[{"ty":"sh","bm":0,"hd":false,"nm":"ã","d":1,"ks":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[85.348,-127.61],[40.195,-131.89],[134.402,-123.098]]}],"t":66},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[54.848,-47.61],[40.195,-131.89],[134.402,-123.098]]}],"t":72},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-134.402,131.89],[40.195,-131.89],[134.402,-123.098]]}],"t":78}]}},{"ty":"fl","bm":0,"hd":false,"nm":"å¡","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":72},{"s":[100],"t":73}]}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[268.588,342.11]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]}],"ind":1},{"ty":4,"nm":"t","sr":1,"st":30,"op":60,"ip":30,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[256.655,268,0]},"s":{"a":0,"k":[100,100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[256.655,268,0]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":59},{"s":[0],"t":60}]}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"nm":"0","it":[{"ty":"sh","bm":0,"hd":false,"nm":"ã","d":1,"ks":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-35.799,-108.024],[135.03,-108.024],[135.015,-107.976],[-35.905,-107.905]]}],"t":30},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-35.799,-108.024],[135.03,-108.024],[-48.36,108.024],[-135.03,96.72]]}],"t":36}]}},{"ty":"fl","bm":0,"hd":false,"nm":"å¡","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":30},{"s":[100],"t":31}]}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[245.351,170.024]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]},{"ty":"gr","bm":0,"hd":false,"nm":"0","it":[{"ty":"sh","bm":0,"hd":false,"nm":"ã","d":1,"ks":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-146.335,21.917],[-146.203,22.157],[-111.091,-49.844],[-111.165,-49.681]]}],"t":36},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-146.335,21.917],[66.749,49.681],[146.335,-25.815],[-111.165,-49.681]]}],"t":42}]}},{"ty":"fl","bm":0,"hd":false,"nm":"å¡","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":36},{"s":[100],"t":37}]}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[256.655,244.827]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]},{"ty":"gr","bm":0,"hd":false,"nm":"0","it":[{"ty":"sh","bm":0,"hd":false,"nm":"ã","d":1,"ks":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[85.348,-127.61],[40.195,-131.89],[134.402,-123.098]]}],"t":36},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[54.848,-47.61],[40.195,-131.89],[134.402,-123.098]]}],"t":42},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-134.402,131.89],[40.195,-131.89],[134.402,-123.098]]}],"t":48}]}},{"ty":"fl","bm":0,"hd":false,"nm":"å¡","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":42},{"s":[100],"t":43}]}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[268.588,342.11]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]}],"ind":2},{"ty":4,"nm":"t","sr":1,"st":0,"op":30,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[256.655,268,0]},"s":{"a":0,"k":[100,100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[256.655,268,0]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":29},{"s":[0],"t":30}]}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"nm":"0","it":[{"ty":"sh","bm":0,"hd":false,"nm":"ã","d":1,"ks":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-35.799,-108.024],[135.03,-108.024],[135.015,-107.976],[-35.905,-107.905]]}],"t":0},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-35.799,-108.024],[135.03,-108.024],[-48.36,108.024],[-135.03,96.72]]}],"t":6}]}},{"ty":"fl","bm":0,"hd":false,"nm":"å¡","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":0},{"s":[100],"t":1}]}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[245.351,170.024]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]},{"ty":"gr","bm":0,"hd":false,"nm":"0","it":[{"ty":"sh","bm":0,"hd":false,"nm":"ã","d":1,"ks":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-146.335,21.917],[-146.203,22.157],[-111.091,-49.844],[-111.165,-49.681]]}],"t":6},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-146.335,21.917],[66.749,49.681],[146.335,-25.815],[-111.165,-49.681]]}],"t":12}]}},{"ty":"fl","bm":0,"hd":false,"nm":"å¡","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":6},{"s":[100],"t":7}]}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[256.655,244.827]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]},{"ty":"gr","bm":0,"hd":false,"nm":"0","it":[{"ty":"sh","bm":0,"hd":false,"nm":"ã","d":1,"ks":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[85.348,-127.61],[40.195,-131.89],[134.402,-123.098]]}],"t":6},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[54.848,-47.61],[40.195,-131.89],[134.402,-123.098]]}],"t":12},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-134.402,131.89],[40.195,-131.89],[134.402,-123.098]]}],"t":18}]}},{"ty":"fl","bm":0,"hd":false,"nm":"å¡","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":12},{"s":[100],"t":13}]}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[268.588,342.11]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]}],"ind":3}],"v":"5.9.0","fr":30,"op":90,"ip":0,"assets":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"nm":"Main Scene","ddd":0,"h":512,"w":512,"meta":{"g":"@lottiefiles/creator@1.90.1"},"layers":[{"ty":2,"nm":"111","sr":1,"st":0,"op":150,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[54.49996512276783,38.99999128069197]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[436.62,436.62],"t":0},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[300,300],"t":58},{"s":[436.62,436.62],"t":112}]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[255.99996512276783,255.99999128069197]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[70],"t":58},{"s":[100],"t":112}]}},"refId":"111_b9bb56d2-8f3c-4772-b1ac-9caf81e5c707","ind":1}],"v":"5.7.0","fr":30,"op":114,"ip":0,"assets":[{"id":"111_b9bb56d2-8f3c-4772-b1ac-9caf81e5c707","e":1,"w":109,"h":78,"p":"data:image/png;base64,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","u":""}]}
|
|
@@ -27,6 +27,7 @@ import bombAnimation from "../../assets/images/anims/service_list/bomb.json";
|
|
|
27
27
|
import dotAnimation from "../../assets/images/anims/service_list/dot_animation.json";
|
|
28
28
|
import starAnimation from "../../assets/images/anims/service_list/star_anim.json";
|
|
29
29
|
import femaleAnimation from "../../assets/images/anims/service_list/female_anim.json";
|
|
30
|
+
import usersAnimation from "../../assets/images/anims/service_list/users_anim.json";
|
|
30
31
|
|
|
31
32
|
import RatingBlock from "../../ui/RatingBlock";
|
|
32
33
|
import DurationBlock from "../../ui/DurationBlock";
|
|
@@ -37,6 +38,9 @@ import KuposButton from "../../ui/KuposButton/KuposButton";
|
|
|
37
38
|
import BottomAmenities from "../../ui/BottomAmenities/BottomAmenities";
|
|
38
39
|
import SeatSection from "../../ui/SeatSection/SeatSection";
|
|
39
40
|
import DateTimeSection from "../../ui/DateTimeSection/DateTimeSection";
|
|
41
|
+
import FeatureServiceUi from "../../ui/FeatureServiceUI/FeatureServiceUi";
|
|
42
|
+
|
|
43
|
+
import thunderAnimation from "../../assets/images/anims/service_list/thunder_icon.json";
|
|
40
44
|
import ServiceBadges from "../../ui/ServiceBadges/ServiceBadges";
|
|
41
45
|
|
|
42
46
|
const SEAT_EXCEPTIONS = ["Asiento mascota"];
|
|
@@ -71,6 +75,9 @@ const ANIMATION_MAP: Record<string, Record<string, any>> = {
|
|
|
71
75
|
bombAnimation: {
|
|
72
76
|
kupos: bombAnimation,
|
|
73
77
|
},
|
|
78
|
+
thunderAnimation: {
|
|
79
|
+
kupos: thunderAnimation,
|
|
80
|
+
},
|
|
74
81
|
dotAnimation: {
|
|
75
82
|
kupos: dotAnimation,
|
|
76
83
|
},
|
|
@@ -80,6 +87,9 @@ const ANIMATION_MAP: Record<string, Record<string, any>> = {
|
|
|
80
87
|
femaaleAnimation: {
|
|
81
88
|
kupos: femaleAnimation,
|
|
82
89
|
},
|
|
90
|
+
usersAnimation: {
|
|
91
|
+
kupos: usersAnimation,
|
|
92
|
+
},
|
|
83
93
|
};
|
|
84
94
|
|
|
85
95
|
function ServiceItemPB({
|
|
@@ -113,9 +123,20 @@ function ServiceItemPB({
|
|
|
113
123
|
setIsExpand,
|
|
114
124
|
coachKey,
|
|
115
125
|
viewersConfig,
|
|
126
|
+
isNewUi,
|
|
116
127
|
showLoginModal,
|
|
117
128
|
isLoggedIn,
|
|
118
129
|
showLoginOption,
|
|
130
|
+
isFeatureDropDownExpand,
|
|
131
|
+
setIsFeatureDropDownExpand,
|
|
132
|
+
ticketQuantity,
|
|
133
|
+
onIncreaseTicketQuantity,
|
|
134
|
+
onDecreaseTicketQuantity,
|
|
135
|
+
onRemateUiButtonClick,
|
|
136
|
+
selectedTimeSlot,
|
|
137
|
+
onTimeSlotChange,
|
|
138
|
+
isTimeDropdownOpen,
|
|
139
|
+
onTimeDropdownToggle,
|
|
119
140
|
}: ServiceItemProps & { currencySign?: string }): React.ReactElement {
|
|
120
141
|
const getAnimationIcon = (icon: string) => {
|
|
121
142
|
const animation = ANIMATION_MAP[icon];
|
|
@@ -415,6 +436,35 @@ function ServiceItemPB({
|
|
|
415
436
|
siteType={siteType}
|
|
416
437
|
isAllinBus={isAllinBus}
|
|
417
438
|
/>
|
|
439
|
+
) : isNewUi ? (
|
|
440
|
+
<FeatureServiceUi
|
|
441
|
+
serviceItem={serviceItem}
|
|
442
|
+
showTopLabel={showTopLabel}
|
|
443
|
+
isSoldOut={isSoldOut}
|
|
444
|
+
getAnimationIcon={getAnimationIcon}
|
|
445
|
+
cityOrigin={cityOrigin}
|
|
446
|
+
cityDestination={cityDestination}
|
|
447
|
+
renderIcon={renderIcon}
|
|
448
|
+
viewersConfig={viewersConfig}
|
|
449
|
+
isFeatureDropDownExpand={isFeatureDropDownExpand}
|
|
450
|
+
ticketQuantity={ticketQuantity}
|
|
451
|
+
onIncreaseTicketQuantity={onIncreaseTicketQuantity}
|
|
452
|
+
onDecreaseTicketQuantity={onDecreaseTicketQuantity}
|
|
453
|
+
onBookButtonPress={onRemateUiButtonClick}
|
|
454
|
+
onToggleExpand={() =>
|
|
455
|
+
setIsFeatureDropDownExpand &&
|
|
456
|
+
setIsFeatureDropDownExpand(
|
|
457
|
+
isFeatureDropDownExpand === serviceItem.id ||
|
|
458
|
+
isFeatureDropDownExpand === true
|
|
459
|
+
? null
|
|
460
|
+
: serviceItem.id,
|
|
461
|
+
)
|
|
462
|
+
}
|
|
463
|
+
selectedTimeSlot={selectedTimeSlot}
|
|
464
|
+
onTimeSlotChange={onTimeSlotChange}
|
|
465
|
+
isTimeDropdownOpen={isTimeDropdownOpen}
|
|
466
|
+
onTimeDropdownToggle={onTimeDropdownToggle}
|
|
467
|
+
/>
|
|
418
468
|
) : (
|
|
419
469
|
<div
|
|
420
470
|
className={`relative hover:z-[150] ${hasOfferText || hasDpEnabled ? "mb-[55px]" : "mb-[10px]"} ${
|