kupos-ui-components-lib 9.5.7 → 9.5.10
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/assets/images/anims/service_list/succes_anim.json +1 -0
- package/dist/components/PaymentSideBar/PaymentSideBarDesktop.js +0 -1
- package/dist/components/ServiceItem/PeruServiceItemDesktop.js +4 -3
- package/dist/components/Survey/ResponsiveSurvey.d.ts +3 -0
- package/dist/components/Survey/ResponsiveSurvey.js +10 -0
- package/dist/components/Survey/SurveyDesktop.d.ts +4 -0
- package/dist/components/Survey/SurveyDesktop.js +36 -0
- package/dist/components/Survey/SurveyMobile.d.ts +4 -0
- package/dist/components/Survey/SurveyMobile.js +39 -0
- package/dist/components/Survey/index.d.ts +5 -0
- package/dist/components/Survey/index.js +4 -0
- package/dist/components/Survey/types.d.ts +18 -0
- package/dist/components/Survey/types.js +1 -0
- package/dist/ui/BottomSheet/BottomSheet.d.ts +17 -0
- package/dist/ui/BottomSheet/BottomSheet.js +77 -0
- package/dist/ui/BottomSheet/index.d.ts +2 -0
- package/dist/ui/BottomSheet/index.js +1 -0
- package/dist/ui/Modal/Modal.d.ts +17 -0
- package/dist/ui/Modal/Modal.js +46 -0
- package/dist/ui/Modal/ModalHeader.d.ts +8 -0
- package/dist/ui/Modal/ModalHeader.js +30 -0
- package/dist/ui/Modal/index.d.ts +4 -0
- package/dist/ui/Modal/index.js +2 -0
- package/dist/ui/SeatSection/SeatSection.js +50 -1
- package/dist/ui/Survey/FeedbackBanner.d.ts +7 -0
- package/dist/ui/Survey/FeedbackBanner.js +21 -0
- package/dist/ui/Survey/FeedbackTextarea.d.ts +9 -0
- package/dist/ui/Survey/FeedbackTextarea.js +53 -0
- package/dist/ui/Survey/HeartIcon.d.ts +3 -0
- package/dist/ui/Survey/HeartIcon.js +4 -0
- package/dist/ui/Survey/ScoreButtons.d.ts +10 -0
- package/dist/ui/Survey/ScoreButtons.js +45 -0
- package/dist/ui/Survey/SurveyFooter.d.ts +14 -0
- package/dist/ui/Survey/SurveyFooter.js +88 -0
- package/dist/ui/Survey/SurveyHeader.d.ts +6 -0
- package/dist/ui/Survey/SurveyHeader.js +44 -0
- package/dist/ui/Survey/ThankYouCard.d.ts +7 -0
- package/dist/ui/Survey/ThankYouCard.js +57 -0
- package/dist/ui/Survey/constants.d.ts +13 -0
- package/dist/ui/Survey/constants.js +46 -0
- package/dist/ui/Survey/index.d.ts +9 -0
- package/dist/ui/Survey/index.js +8 -0
- package/dist/ui/mobileweb/SeatSectionMobile.js +46 -3
- package/package.json +1 -1
- package/src/components/PaymentSideBar/PaymentSideBarDesktop.tsx +0 -1
- package/src/components/ServiceItem/PeruServiceItemDesktop.tsx +6 -5
- package/src/ui/SeatSection/SeatSection.tsx +98 -1
- package/src/ui/mobileweb/SeatSectionMobile.tsx +95 -1
|
@@ -349,15 +349,109 @@ function SeatSectionMobile({
|
|
|
349
349
|
? Math.round(serviceItem.discount_value)
|
|
350
350
|
: null;
|
|
351
351
|
|
|
352
|
+
const originalDpPrice = Array.isArray(serviceItem?.original_dp_price)
|
|
353
|
+
? serviceItem.original_dp_price[0]
|
|
354
|
+
: Object.values(serviceItem?.original_dp_price || {})[0];
|
|
355
|
+
const dpDiscountPercent = Array.isArray(serviceItem?.dp_discount_percents)
|
|
356
|
+
? serviceItem.dp_discount_percents[0]
|
|
357
|
+
: Object.values(serviceItem?.dp_discount_percents || {})[0];
|
|
358
|
+
const firstSeatFare = seatTypesData?.filter(
|
|
359
|
+
(item) => getFilteredSeats(item.label) && !EXCEPTIONS.includes(item.label),
|
|
360
|
+
)?.[0]?.fare;
|
|
361
|
+
|
|
362
|
+
const hasDpDiscount =
|
|
363
|
+
serviceItem?.dp_discounted_seats &&
|
|
364
|
+
serviceItem?.dp_discount_percents &&
|
|
365
|
+
originalDpPrice != null &&
|
|
366
|
+
dpDiscountPercent != null &&
|
|
367
|
+
firstSeatFare != null;
|
|
368
|
+
|
|
352
369
|
return (
|
|
353
370
|
<div className="content-center relative" style={{ width: "40%" }}>
|
|
354
|
-
{serviceItem?.is_dp_enabled ? (
|
|
371
|
+
{serviceItem?.is_dp_enabled && !originalDpPrice && !dpDiscountPercent ? (
|
|
355
372
|
<div
|
|
356
373
|
className="flex flex-col justify-between h-[2.5rem]"
|
|
357
374
|
style={{ gap: isSoldOut ? "0px" : "5px" }}
|
|
358
375
|
>
|
|
359
376
|
{renderDpSeats()}
|
|
360
377
|
</div>
|
|
378
|
+
) : hasDpDiscount ? (
|
|
379
|
+
<div className="relative grid grid-cols-[auto_auto] justify-between gap-x-[8px] ">
|
|
380
|
+
{!isNaN(Number(dpDiscountPercent)) &&
|
|
381
|
+
Number(dpDiscountPercent) > 0 && (
|
|
382
|
+
<div
|
|
383
|
+
className="absolute -top-[18px] right-[0px]"
|
|
384
|
+
style={{
|
|
385
|
+
animation: "pulse-zoom 2s ease-in-out infinite",
|
|
386
|
+
}}
|
|
387
|
+
>
|
|
388
|
+
<span
|
|
389
|
+
className="rounded-[100px] px-[8px] text-[12px] bold-text leading-[20px] text-[#fff]"
|
|
390
|
+
style={{
|
|
391
|
+
backgroundColor: tooltipBgColor,
|
|
392
|
+
}}
|
|
393
|
+
>
|
|
394
|
+
{Math.round(Number(dpDiscountPercent))}% OFF
|
|
395
|
+
</span>
|
|
396
|
+
</div>
|
|
397
|
+
)}
|
|
398
|
+
|
|
399
|
+
<span className="min-[420]:text-[13px] text-[12px] leading-[20px] text-[#c2c2c2]">
|
|
400
|
+
Antes
|
|
401
|
+
</span>
|
|
402
|
+
<span
|
|
403
|
+
className="min-[420]:text-[13px] text-[12px] leading-[20px] text-[#9f9f9f] text-right"
|
|
404
|
+
style={{
|
|
405
|
+
position: "relative",
|
|
406
|
+
display: "inline-block",
|
|
407
|
+
overflow: "hidden",
|
|
408
|
+
}}
|
|
409
|
+
>
|
|
410
|
+
{commonService.currency(Number(originalDpPrice), currencySign)}
|
|
411
|
+
<span
|
|
412
|
+
style={{
|
|
413
|
+
position: "absolute",
|
|
414
|
+
top: "35%",
|
|
415
|
+
left: "50%",
|
|
416
|
+
width: "80%",
|
|
417
|
+
height: "1px",
|
|
418
|
+
background: "#9f9f9f",
|
|
419
|
+
transform: "rotate(-12deg)",
|
|
420
|
+
transformOrigin: "center",
|
|
421
|
+
}}
|
|
422
|
+
/>
|
|
423
|
+
</span>
|
|
424
|
+
|
|
425
|
+
<span
|
|
426
|
+
className="min-[420]:text-[13px] text-[12px] leading-[24px]"
|
|
427
|
+
style={{ color: isSoldOut ? "#bbb" : "#464647" }}
|
|
428
|
+
>
|
|
429
|
+
Desde
|
|
430
|
+
</span>
|
|
431
|
+
<span
|
|
432
|
+
className="flex items-center justify-end gap-[4px] text-[14px] bold-text leading-[24px]"
|
|
433
|
+
style={{ color: isSoldOut ? "#bbb" : "#ff5964" }}
|
|
434
|
+
>
|
|
435
|
+
{serviceItem?.icons?.fireIcon ? (
|
|
436
|
+
<img
|
|
437
|
+
src={serviceItem.icons.fireIcon}
|
|
438
|
+
alt="discount"
|
|
439
|
+
className="h-[16px] w-[16px] object-contain"
|
|
440
|
+
style={{ filter: isSoldOut ? "grayscale" : "" }}
|
|
441
|
+
/>
|
|
442
|
+
) : null}
|
|
443
|
+
{commonService.discountedCurrency(
|
|
444
|
+
Number(firstSeatFare),
|
|
445
|
+
currencySign,
|
|
446
|
+
)}
|
|
447
|
+
</span>
|
|
448
|
+
|
|
449
|
+
{isSoldOut ? (
|
|
450
|
+
<span className="col-span-2 min-[420]:text-[13px] text-right text-[12px] text-[#ccc]">
|
|
451
|
+
Agotado
|
|
452
|
+
</span>
|
|
453
|
+
) : null}
|
|
454
|
+
</div>
|
|
361
455
|
) : hasDiscount && discountSeat ? (
|
|
362
456
|
<div className="relative grid grid-cols-[auto_auto] justify-between gap-x-[8px] ">
|
|
363
457
|
{discountValue != null && (
|