kupos-ui-components-lib 9.0.3 → 9.0.4
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.
|
@@ -74,7 +74,7 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
|
|
|
74
74
|
React.createElement("span", { className: "min-[420]:text-[13px] text-[11px] ", style: {
|
|
75
75
|
// marginLeft: "10px",
|
|
76
76
|
color: isSoldOut ? "#bbb" : "#464647",
|
|
77
|
-
} }, type.label),
|
|
77
|
+
} }, commonService.truncateSeatLabel(type.label)),
|
|
78
78
|
React.createElement("span", { className: "min-[420]:text-[13px] text-[11px] bold-text", style: { color: isSoldOut ? "#bbb" : colors.seatPriceColor } }, (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) <= 0 && !isPeru
|
|
79
79
|
? commonService.currency(0, currencySign)
|
|
80
80
|
: commonService.currency(type.fare, currencySign))));
|
|
@@ -183,11 +183,11 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
|
|
|
183
183
|
: typeof raw === "string"
|
|
184
184
|
? raw.split("|").filter(Boolean)
|
|
185
185
|
: [];
|
|
186
|
-
const nodes = list
|
|
187
|
-
.slice(0, 2)
|
|
188
|
-
.map((am, i) => {
|
|
186
|
+
const nodes = list.slice(0, 2).map((am, i) => {
|
|
189
187
|
var _a;
|
|
190
|
-
return (React.createElement("img", { key: i, className: "amenity", height: 14, width: 14,
|
|
188
|
+
return (React.createElement("img", { key: i, className: "amenity", height: 14, width: 14,
|
|
189
|
+
// src={getAmenitiesImage(amenitiesData?.[am]?.toLowerCase())}
|
|
190
|
+
src: commonService.getAmenitiesImage((_a = amenitiesData === null || amenitiesData === void 0 ? void 0 : amenitiesData[am]) === null || _a === void 0 ? void 0 : _a.toLowerCase(), serviceItem), alt: "icon" }));
|
|
191
191
|
});
|
|
192
192
|
return nodes;
|
|
193
193
|
};
|
package/package.json
CHANGED
|
@@ -116,8 +116,8 @@ function ServiceItemMobile({
|
|
|
116
116
|
const uniqueSeats = Array.from(seatMap.values())
|
|
117
117
|
.sort((a, b) => a.fare - b.fare)
|
|
118
118
|
.slice(0, 3);
|
|
119
|
-
return uniqueSeats.map((type, i) =>
|
|
120
|
-
exceptions.includes(type.label) ? null : (
|
|
119
|
+
return uniqueSeats.map((type, i) => {
|
|
120
|
+
return exceptions.includes(type.label) ? null : (
|
|
121
121
|
<div
|
|
122
122
|
className={
|
|
123
123
|
serviceItem.seat_types?.length > 2
|
|
@@ -133,7 +133,7 @@ function ServiceItemMobile({
|
|
|
133
133
|
color: isSoldOut ? "#bbb" : "#464647",
|
|
134
134
|
}}
|
|
135
135
|
>
|
|
136
|
-
{type.label}
|
|
136
|
+
{commonService.truncateSeatLabel(type.label)}
|
|
137
137
|
</span>
|
|
138
138
|
<span
|
|
139
139
|
className={"min-[420]:text-[13px] text-[11px] bold-text"}
|
|
@@ -149,8 +149,8 @@ function ServiceItemMobile({
|
|
|
149
149
|
: commonService.currency(type.fare, currencySign)}
|
|
150
150
|
</span>
|
|
151
151
|
</div>
|
|
152
|
-
)
|
|
153
|
-
);
|
|
152
|
+
);
|
|
153
|
+
});
|
|
154
154
|
};
|
|
155
155
|
|
|
156
156
|
const getFilteredSeats = (item) => {
|
|
@@ -257,18 +257,20 @@ function ServiceItemMobile({
|
|
|
257
257
|
? raw.split("|").filter(Boolean)
|
|
258
258
|
: [];
|
|
259
259
|
|
|
260
|
-
const nodes = list
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
260
|
+
const nodes = list.slice(0, 2).map((am, i) => (
|
|
261
|
+
<img
|
|
262
|
+
key={i}
|
|
263
|
+
className="amenity"
|
|
264
|
+
height={14}
|
|
265
|
+
width={14}
|
|
266
|
+
// src={getAmenitiesImage(amenitiesData?.[am]?.toLowerCase())}
|
|
267
|
+
src={commonService.getAmenitiesImage(
|
|
268
|
+
amenitiesData?.[am]?.toLowerCase(),
|
|
269
|
+
serviceItem,
|
|
270
|
+
)}
|
|
271
|
+
alt="icon"
|
|
272
|
+
/>
|
|
273
|
+
));
|
|
272
274
|
|
|
273
275
|
return nodes;
|
|
274
276
|
};
|