kupos-ui-components-lib 9.9.1 → 9.9.2
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/PeruServiceItemDesktop.d.ts +1 -1
- package/dist/components/ServiceItem/PeruServiceItemDesktop.js +2 -2
- package/dist/components/ServiceItem/ServiceItemDesktop.d.ts +1 -1
- package/dist/components/ServiceItem/ServiceItemDesktop.js +30 -31
- package/dist/components/ServiceItem/ServiceItemMobile.d.ts +1 -1
- package/dist/components/ServiceItem/ServiceItemMobile.js +43 -17
- package/dist/components/ServiceItem/mobileTypes.d.ts +48 -1
- package/dist/components/ServiceItem/types.d.ts +27 -9
- package/dist/styles.css +215 -6
- package/dist/ui/ExpendedDropDown/ExpandedDropdown.d.ts +1 -2
- package/dist/ui/ExpendedDropDown/ExpandedDropdown.js +2 -4
- package/dist/ui/FeaturServiceUiMobile/FeatureServiceUiMobile.js +22 -41
- package/dist/ui/FeatureServiceUI/FeatureServiceUi.js +24 -44
- package/dist/ui/OfferBanner.d.ts +2 -0
- package/dist/ui/OfferBanner.js +19 -14
- package/dist/ui/SeatSection/SeatSection.d.ts +1 -7
- package/dist/ui/SeatSection/SeatSection.js +12 -44
- package/dist/utils/CommonService.d.ts +3 -0
- package/dist/utils/CommonService.js +18 -1
- package/package.json +1 -1
- package/src/KuposUIComponent.tsx +3 -0
- package/src/assets/images/anims/service_list/flame_anim.json +1 -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/PeruServiceItemDesktop.tsx +35 -24
- package/src/components/ServiceItem/ServiceItemDesktop.tsx +65 -53
- package/src/components/ServiceItem/ServiceItemMobile.tsx +387 -288
- package/src/components/ServiceItem/mobileTypes.ts +50 -7
- package/src/components/ServiceItem/types.ts +39 -25
- package/src/styles.css +15 -0
- package/src/ui/ExpendedDropDown/ExpandedDropdown.tsx +2 -4
- package/src/ui/FeaturServiceUiMobile/FeatureServiceUiMobile.tsx +575 -0
- package/src/ui/FeatureServiceUI/FeatureServiceUi.tsx +610 -0
- package/src/ui/OfferBanner.tsx +31 -10
- package/src/ui/SeatSection/SeatSection.tsx +21 -88
- package/src/utils/CommonService.ts +26 -1
|
@@ -46,6 +46,20 @@ export interface MobileServiceItemProps {
|
|
|
46
46
|
dp_discount_percents?: Record<string, number>;
|
|
47
47
|
dp_discounted_seats?: string[];
|
|
48
48
|
dep_validation_text?: string;
|
|
49
|
+
discount_type?: string;
|
|
50
|
+
discount_value?: number;
|
|
51
|
+
max_discount?: number;
|
|
52
|
+
discounts?: Array<{
|
|
53
|
+
id?: number;
|
|
54
|
+
name?: string;
|
|
55
|
+
send_discount_to_api?: boolean;
|
|
56
|
+
new_ui_enabled?: boolean;
|
|
57
|
+
discount?: number;
|
|
58
|
+
seatwise_breakdown?: any;
|
|
59
|
+
seat_wise_discounts?: any;
|
|
60
|
+
total_amount?: number;
|
|
61
|
+
promotional_text?: string;
|
|
62
|
+
}>;
|
|
49
63
|
metaData?: {};
|
|
50
64
|
is_tracking_enabled?: boolean;
|
|
51
65
|
show_top_label?: boolean;
|
|
@@ -121,21 +135,36 @@ export interface MobileServiceItemProps {
|
|
|
121
135
|
bombAnim?: string;
|
|
122
136
|
whiteBoardingIcon?: string;
|
|
123
137
|
downArrow?: string;
|
|
124
|
-
personIcon?: string
|
|
138
|
+
personIcon?: string
|
|
125
139
|
specialDeparture?: string;
|
|
126
140
|
fireIcon?: string;
|
|
127
141
|
directoIcon?: string;
|
|
128
|
-
whiteFireIcon?: string
|
|
129
|
-
femaleAnim?:
|
|
142
|
+
whiteFireIcon?: string
|
|
143
|
+
femaleAnim?:string
|
|
144
|
+
thunderAnim?: string
|
|
145
|
+
personsAnim?: string
|
|
146
|
+
whiteOrigin?: string,
|
|
147
|
+
whiteDestination?: string,
|
|
148
|
+
userIcon?: string,
|
|
149
|
+
|
|
150
|
+
sheildIcon?: string,
|
|
151
|
+
busIcon?: string,
|
|
152
|
+
whiteDownArrow?: string,
|
|
153
|
+
empressaIcon?: string,
|
|
154
|
+
flexibleIcon?: string,
|
|
155
|
+
listoIcon?: string,
|
|
156
|
+
precioIcon?: string,
|
|
157
|
+
confirmarIcon?: string
|
|
130
158
|
cancelTicketIcon?: string;
|
|
131
159
|
changeTicketIcon?: string;
|
|
132
160
|
petFriendlyIcon?: string;
|
|
133
|
-
womenSeatIcon?: string
|
|
161
|
+
womenSeatIcon?: string
|
|
134
162
|
[key: string]: string | Record<string, string | undefined> | undefined;
|
|
135
163
|
};
|
|
136
164
|
useLottieFor?: string[];
|
|
137
165
|
};
|
|
138
166
|
onBookButtonPress?: () => void;
|
|
167
|
+
onRemateUiButtonClick?: ()=> void;
|
|
139
168
|
terminals?: any[];
|
|
140
169
|
showDropdown?: boolean;
|
|
141
170
|
setShowDropdown?: (value: boolean) => void;
|
|
@@ -179,7 +208,7 @@ export interface MobileServiceItemProps {
|
|
|
179
208
|
seatPriceColor?: string;
|
|
180
209
|
rightGradiantColor?: string;
|
|
181
210
|
leftGradiantColor?: string;
|
|
182
|
-
discountSeatPriceColor?: string
|
|
211
|
+
discountSeatPriceColor?: string
|
|
183
212
|
};
|
|
184
213
|
isCiva?: boolean;
|
|
185
214
|
currencySign?: string;
|
|
@@ -192,12 +221,26 @@ export interface MobileServiceItemProps {
|
|
|
192
221
|
showLastSeats?: boolean;
|
|
193
222
|
removeDuplicateSeats?: boolean;
|
|
194
223
|
isLinatal?: boolean;
|
|
195
|
-
|
|
224
|
+
viewersConfig?: {
|
|
196
225
|
min: number;
|
|
197
226
|
max: number;
|
|
198
227
|
interval?: number; // ms, default 5000
|
|
199
228
|
label?: string; // e.g. "personas están viendo este viaje"
|
|
200
229
|
icon?: string; // optional icon URL
|
|
201
230
|
};
|
|
202
|
-
|
|
231
|
+
isFeatureDropDownExpand?: any;
|
|
232
|
+
setIsFeatureDropDownExpand?: (value: any) => void;
|
|
233
|
+
ticketQuantity?: number;
|
|
234
|
+
onIncreaseTicketQuantity?: (serviceItem: MobileServiceItemProps["serviceItem"]) => void;
|
|
235
|
+
onDecreaseTicketQuantity?: (serviceItem: MobileServiceItemProps["serviceItem"]) => void;
|
|
236
|
+
cityOrigin?: { value: number; label: string };
|
|
237
|
+
cityDestination?: { value: number; label: string };
|
|
238
|
+
isNewUi?: boolean
|
|
239
|
+
|
|
240
|
+
selectedTimeSlot?: string;
|
|
241
|
+
onTimeSlotChange?: (slot: string) => void;
|
|
242
|
+
isTimeDropdownOpen?: string | number | null;
|
|
243
|
+
onTimeDropdownToggle?: (id?: string | number | null) => void;
|
|
244
|
+
wowDealData?: any;
|
|
245
|
+
isFlores?: boolean;
|
|
203
246
|
}
|
|
@@ -47,6 +47,9 @@ export interface ServiceItemProps {
|
|
|
47
47
|
discount_type?: string;
|
|
48
48
|
discount_value?: number;
|
|
49
49
|
max_discount?: number;
|
|
50
|
+
discounts?: Array<{
|
|
51
|
+
new_ui_enabled?: boolean;
|
|
52
|
+
}>;
|
|
50
53
|
is_transpordo?: boolean;
|
|
51
54
|
is_train_type?: boolean;
|
|
52
55
|
operator_service_name?: string;
|
|
@@ -125,18 +128,31 @@ export interface ServiceItemProps {
|
|
|
125
128
|
seatFallBackIcon: string;
|
|
126
129
|
headPhoneIcon?: string;
|
|
127
130
|
allowCancellationIcon?: string;
|
|
128
|
-
whiteBoardingIcon?: string
|
|
129
|
-
bombJson?:
|
|
130
|
-
downArrow?:
|
|
131
|
-
personIcon?: string
|
|
132
|
-
whiteFireIcon?: string
|
|
133
|
-
fireIcon?: string
|
|
131
|
+
whiteBoardingIcon?: string
|
|
132
|
+
bombJson?:string
|
|
133
|
+
downArrow?:string
|
|
134
|
+
personIcon?: string
|
|
135
|
+
whiteFireIcon?: string
|
|
136
|
+
fireIcon?: string
|
|
134
137
|
|
|
138
|
+
whiteOrigin?: string,
|
|
139
|
+
whiteDestination?: string,
|
|
140
|
+
userIcon?: string,
|
|
141
|
+
|
|
142
|
+
sheildIcon?: string,
|
|
143
|
+
busIcon?: string,
|
|
144
|
+
whiteDownArrow?: string,
|
|
145
|
+
empressaIcon?: string,
|
|
146
|
+
flexibleIcon?: string,
|
|
147
|
+
listoIcon?: string,
|
|
148
|
+
precioIcon?: string,
|
|
149
|
+
confirmarIcon?: string
|
|
135
150
|
[key: string]: string | Record<string, string | undefined> | undefined;
|
|
136
151
|
};
|
|
137
152
|
useLottieFor?: string[];
|
|
138
153
|
};
|
|
139
154
|
onBookButtonPress?: () => void;
|
|
155
|
+
onRemateUiButtonClick?: ()=>void;
|
|
140
156
|
terminals?: any[];
|
|
141
157
|
t?: (key: string) => string;
|
|
142
158
|
serviceDetailsLoading?: boolean;
|
|
@@ -161,7 +177,7 @@ export interface ServiceItemProps {
|
|
|
161
177
|
seatPriceColor?: string;
|
|
162
178
|
rightGradiantColor?: string;
|
|
163
179
|
leftGradiantColor?: string;
|
|
164
|
-
discountSeatPriceColor?: string
|
|
180
|
+
discountSeatPriceColor?: string
|
|
165
181
|
};
|
|
166
182
|
cityOrigin?: { value: number; label: string };
|
|
167
183
|
cityDestination?: { value: number; label: string };
|
|
@@ -215,7 +231,12 @@ export interface ServiceItemProps {
|
|
|
215
231
|
isAllinBus?: boolean;
|
|
216
232
|
isExpand?: any;
|
|
217
233
|
setIsExpand?: (value: any) => void;
|
|
218
|
-
|
|
234
|
+
isFeatureDropDownExpand?: any;
|
|
235
|
+
setIsFeatureDropDownExpand?: (value: any) => void;
|
|
236
|
+
ticketQuantity?: number;
|
|
237
|
+
onIncreaseTicketQuantity?: (serviceItem: ServiceItemProps["serviceItem"]) => void;
|
|
238
|
+
onDecreaseTicketQuantity?: (serviceItem: ServiceItemProps["serviceItem"]) => void;
|
|
239
|
+
coachKey?: number
|
|
219
240
|
viewersConfig?: {
|
|
220
241
|
min: number;
|
|
221
242
|
max: number;
|
|
@@ -223,21 +244,14 @@ export interface ServiceItemProps {
|
|
|
223
244
|
label?: string; // e.g. "personas están viendo este viaje"
|
|
224
245
|
icon?: string; // optional icon URL
|
|
225
246
|
};
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
) => void;
|
|
237
|
-
onTrainButtonClick?: any;
|
|
238
|
-
showSeatSelectionError?: string | null;
|
|
239
|
-
onShowSeatSelectionError?: (serviceId: string) => void;
|
|
240
|
-
onClearSeatSelectionError?: () => void;
|
|
241
|
-
isFlores?: boolean;
|
|
242
|
-
operatorLabel?: string;
|
|
247
|
+
isNewUi?: boolean
|
|
248
|
+
showLoginModal?: any
|
|
249
|
+
isLoggedIn?: any
|
|
250
|
+
showLoginOption?: boolean
|
|
251
|
+
selectedTimeSlot?: string;
|
|
252
|
+
onTimeSlotChange?: (slot: string) => void;
|
|
253
|
+
isTimeDropdownOpen?: string | number | null;
|
|
254
|
+
onTimeDropdownToggle?: (id?: string | number | null) => void;
|
|
255
|
+
wowDealData?: any;
|
|
256
|
+
isNewUiEnabled?: boolean;
|
|
243
257
|
}
|
package/src/styles.css
CHANGED
|
@@ -93,6 +93,21 @@
|
|
|
93
93
|
display: none;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
+
/* Time slot dropdown */
|
|
97
|
+
.kupos-time-dd > summary {
|
|
98
|
+
list-style: none;
|
|
99
|
+
}
|
|
100
|
+
.kupos-time-dd > summary::-webkit-details-marker {
|
|
101
|
+
display: none;
|
|
102
|
+
}
|
|
103
|
+
.kupos-time-chevron {
|
|
104
|
+
transition: transform 200ms ease;
|
|
105
|
+
flex-shrink: 0;
|
|
106
|
+
}
|
|
107
|
+
.kupos-time-dd[open] .kupos-time-chevron {
|
|
108
|
+
transform: rotate(180deg);
|
|
109
|
+
}
|
|
110
|
+
|
|
96
111
|
.hide-scrollbar {
|
|
97
112
|
-ms-overflow-style: none;
|
|
98
113
|
scrollbar-width: none;
|
|
@@ -16,7 +16,6 @@ interface ExpandedDropdownProps {
|
|
|
16
16
|
ladiesBookedSeats?: string;
|
|
17
17
|
isDpEnabled?: boolean;
|
|
18
18
|
renderIcon?: any;
|
|
19
|
-
operatorLabel?: string;
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
function ExpandedDropdown({
|
|
@@ -29,7 +28,6 @@ function ExpandedDropdown({
|
|
|
29
28
|
ladiesBookedSeats,
|
|
30
29
|
isDpEnabled,
|
|
31
30
|
renderIcon,
|
|
32
|
-
operatorLabel,
|
|
33
31
|
}: ExpandedDropdownProps): React.ReactElement {
|
|
34
32
|
const hasPetInfo =
|
|
35
33
|
serviceItem.pet_seat_info &&
|
|
@@ -64,8 +62,8 @@ function ExpandedDropdown({
|
|
|
64
62
|
<span className="bold-text">
|
|
65
63
|
hasta {serviceItem?.change_ticket_hours || 6} horas antes
|
|
66
64
|
</span>{" "}
|
|
67
|
-
de la salida del bus. El monto será reembolsado a tu billetera
|
|
68
|
-
|
|
65
|
+
de la salida del bus. El monto será reembolsado a tu billetera
|
|
66
|
+
kupospay.
|
|
69
67
|
</span>
|
|
70
68
|
</div>
|
|
71
69
|
) : (
|