kupos-ui-components-lib 9.5.8 → 9.6.0

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