kupos-ui-components-lib 9.7.8 → 9.7.9

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 (26) hide show
  1. package/dist/KuposUIComponent.d.ts +3 -0
  2. package/dist/components/ServiceItem/PeruServiceItemDesktop.d.ts +1 -1
  3. package/dist/components/ServiceItem/PeruServiceItemDesktop.js +134 -188
  4. package/dist/components/ServiceItem/ServiceItemDesktop.d.ts +1 -1
  5. package/dist/components/ServiceItem/ServiceItemDesktop.js +15 -2
  6. package/dist/components/ServiceItem/ServiceItemMobile.d.ts +1 -1
  7. package/dist/components/ServiceItem/ServiceItemMobile.js +16 -7
  8. package/dist/components/ServiceItem/mobileTypes.d.ts +32 -0
  9. package/dist/components/ServiceItem/types.d.ts +22 -0
  10. package/dist/styles.css +221 -0
  11. package/dist/ui/FeaturServiceUiMobile/FeatureServiceUiMobile.js +9 -7
  12. package/dist/ui/FeatureServiceUI/FeatureServiceUi.js +3 -3
  13. package/dist/utils/CommonService.js +11 -1
  14. package/package.json +1 -1
  15. package/src/KuposUIComponent.tsx +3 -0
  16. package/src/assets/images/anims/service_list/thunder_icon.json +1 -0
  17. package/src/assets/images/anims/service_list/users_anim.json +1 -0
  18. package/src/components/ServiceItem/PeruServiceItemDesktop.tsx +254 -345
  19. package/src/components/ServiceItem/ServiceItemDesktop.tsx +49 -5
  20. package/src/components/ServiceItem/ServiceItemMobile.tsx +340 -286
  21. package/src/components/ServiceItem/mobileTypes.ts +29 -1
  22. package/src/components/ServiceItem/types.ts +23 -1
  23. package/src/styles.css +15 -0
  24. package/src/ui/FeaturServiceUiMobile/FeatureServiceUiMobile.tsx +525 -0
  25. package/src/ui/FeatureServiceUI/FeatureServiceUi.tsx +555 -0
  26. package/src/utils/CommonService.ts +13 -1
@@ -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];
@@ -414,12 +435,35 @@ function ServiceItemPB({
414
435
  isPeru={isPeru}
415
436
  siteType={siteType}
416
437
  isAllinBus={isAllinBus}
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}
417
448
  viewersConfig={viewersConfig}
418
- isLoggedIn={isLoggedIn}
419
- showLoginModal={showLoginModal}
420
- isExpand={isExpand}
421
- setIsExpand={setIsExpand}
422
- coachKey={coachKey}
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}
423
467
  />
424
468
  ) : (
425
469
  <div