kupos-ui-components-lib 9.0.1 → 9.0.3
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/components/ServiceItem/ServiceItemDesktop.js +1 -1
- package/dist/components/ServiceItem/ServiceItemMobile.js +4 -1
- package/dist/components/ServiceItem/mobileTypes.d.ts +1 -0
- package/dist/components/ServiceItem/types.d.ts +1 -0
- package/dist/utils/CommonService.js +6 -1
- package/package.json +1 -1
- package/src/components/ServiceItem/ServiceItemDesktop.tsx +1 -1
- package/src/components/ServiceItem/ServiceItemMobile.tsx +3 -0
- package/src/components/ServiceItem/mobileTypes.ts +4 -3
- package/src/components/ServiceItem/types.ts +1 -0
- package/src/utils/CommonService.ts +5 -1
|
@@ -414,7 +414,7 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
|
|
|
414
414
|
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) > 0 && (React.createElement("div", { className: "text-[12px] text-[red] mt-1 text-center" }, "\u00A1 \u00DAltimos Asientos!")))) : null,
|
|
415
415
|
React.createElement("div", { className: "flex items-center mt-[15px] border-t border-[#eee] pt-[10px]" },
|
|
416
416
|
React.createElement("div", { className: "grid items-center gap-[2%] flex-1", style: {
|
|
417
|
-
gridTemplateColumns: "
|
|
417
|
+
gridTemplateColumns: "40% 18% 23% 23%",
|
|
418
418
|
// otherItems
|
|
419
419
|
// .map((i) => i.width)
|
|
420
420
|
// .join(" "),
|
|
@@ -84,7 +84,7 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
|
|
|
84
84
|
return item;
|
|
85
85
|
};
|
|
86
86
|
const getAmenitiesImage = (name) => {
|
|
87
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
|
|
87
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
|
|
88
88
|
switch (name) {
|
|
89
89
|
case "air_condtion.png": {
|
|
90
90
|
return (_a = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _a === void 0 ? void 0 : _a.airConditionIcon;
|
|
@@ -167,6 +167,9 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
|
|
|
167
167
|
case "headset.png": {
|
|
168
168
|
return (_2 = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _2 === void 0 ? void 0 : _2.headPhoneIcon;
|
|
169
169
|
}
|
|
170
|
+
case "allows_cancellation.png": {
|
|
171
|
+
return (_3 = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _3 === void 0 ? void 0 : _3.allowCancellationIcon;
|
|
172
|
+
}
|
|
170
173
|
default: {
|
|
171
174
|
return "";
|
|
172
175
|
}
|
|
@@ -109,6 +109,7 @@ export interface MobileServiceItemProps {
|
|
|
109
109
|
seat140Icon: string;
|
|
110
110
|
seatFallBackIcon: string;
|
|
111
111
|
headPhoneIcon?: string;
|
|
112
|
+
allowCancellationIcon?: string;
|
|
112
113
|
[key: string]: string | Record<string, string | undefined> | undefined;
|
|
113
114
|
};
|
|
114
115
|
useLottieFor?: string[];
|
|
@@ -114,6 +114,7 @@ export interface ServiceItemProps {
|
|
|
114
114
|
seat140Icon: string;
|
|
115
115
|
seatFallBackIcon: string;
|
|
116
116
|
headPhoneIcon?: string;
|
|
117
|
+
allowCancellationIcon?: string;
|
|
117
118
|
[key: string]: string | Record<string, string | undefined> | undefined;
|
|
118
119
|
};
|
|
119
120
|
useLottieFor?: string[];
|
|
@@ -42,7 +42,7 @@ const commonService = {
|
|
|
42
42
|
return `${words[0]} ${truncateWord(words[1])} ${words[2].charAt(0)}...`;
|
|
43
43
|
},
|
|
44
44
|
getAmenitiesImage: (name, serviceItem) => {
|
|
45
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
|
|
45
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
|
|
46
46
|
switch (name) {
|
|
47
47
|
case "air_condtion.png": {
|
|
48
48
|
return (_a = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _a === void 0 ? void 0 : _a.airConditionIcon;
|
|
@@ -125,6 +125,9 @@ const commonService = {
|
|
|
125
125
|
case "headset.png": {
|
|
126
126
|
return (_2 = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _2 === void 0 ? void 0 : _2.headPhoneIcon;
|
|
127
127
|
}
|
|
128
|
+
case "allows_cancellation.png": {
|
|
129
|
+
return (_3 = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _3 === void 0 ? void 0 : _3.allowCancellationIcon;
|
|
130
|
+
}
|
|
128
131
|
default: {
|
|
129
132
|
return "";
|
|
130
133
|
}
|
|
@@ -180,6 +183,8 @@ const commonService = {
|
|
|
180
183
|
return "Música";
|
|
181
184
|
case "headset":
|
|
182
185
|
return "Auriculares";
|
|
186
|
+
case "allows cancellation":
|
|
187
|
+
return "Anulación online";
|
|
183
188
|
default:
|
|
184
189
|
return rawAmenity;
|
|
185
190
|
}
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ export interface MobileServiceItemProps {
|
|
|
17
17
|
Record<string, number>?,
|
|
18
18
|
boolean?,
|
|
19
19
|
number?,
|
|
20
|
-
boolean
|
|
20
|
+
boolean?,
|
|
21
21
|
]; // [logo, rating, name, category, amenities, unknown, ratingData, unknown, unknown, unknown]
|
|
22
22
|
travel_date: string;
|
|
23
23
|
arrival_date: string;
|
|
@@ -112,6 +112,7 @@ export interface MobileServiceItemProps {
|
|
|
112
112
|
seat140Icon: string;
|
|
113
113
|
seatFallBackIcon: string;
|
|
114
114
|
headPhoneIcon?: string;
|
|
115
|
+
allowCancellationIcon?: string;
|
|
115
116
|
[key: string]: string | Record<string, string | undefined> | undefined;
|
|
116
117
|
};
|
|
117
118
|
useLottieFor?: string[];
|
|
@@ -131,11 +132,11 @@ export interface MobileServiceItemProps {
|
|
|
131
132
|
curr: {
|
|
132
133
|
service: MobileServiceItemProps["serviceItem"];
|
|
133
134
|
showTopLabel: string | boolean;
|
|
134
|
-
} | null
|
|
135
|
+
} | null,
|
|
135
136
|
) => {
|
|
136
137
|
service: MobileServiceItemProps["serviceItem"];
|
|
137
138
|
showTopLabel: string | boolean;
|
|
138
|
-
} | null)
|
|
139
|
+
} | null),
|
|
139
140
|
) => void;
|
|
140
141
|
hours?: number;
|
|
141
142
|
change_ticket_hours?: number;
|
|
@@ -128,6 +128,9 @@ const commonService = {
|
|
|
128
128
|
case "headset.png": {
|
|
129
129
|
return serviceItem?.icons?.headPhoneIcon;
|
|
130
130
|
}
|
|
131
|
+
case "allows_cancellation.png": {
|
|
132
|
+
return serviceItem?.icons?.allowCancellationIcon;
|
|
133
|
+
}
|
|
131
134
|
default: {
|
|
132
135
|
return "";
|
|
133
136
|
}
|
|
@@ -177,7 +180,6 @@ const commonService = {
|
|
|
177
180
|
return "Cinturón de seguridad";
|
|
178
181
|
case "service on board":
|
|
179
182
|
return "Servicio a bordo";
|
|
180
|
-
|
|
181
183
|
case "personal tv":
|
|
182
184
|
return "TV personal";
|
|
183
185
|
case "pet admission":
|
|
@@ -186,6 +188,8 @@ const commonService = {
|
|
|
186
188
|
return "Música";
|
|
187
189
|
case "headset":
|
|
188
190
|
return "Auriculares";
|
|
191
|
+
case "allows cancellation":
|
|
192
|
+
return "Anulación online";
|
|
189
193
|
default:
|
|
190
194
|
return rawAmenity;
|
|
191
195
|
}
|