kupos-ui-components-lib 10.3.4 → 10.3.5

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.
@@ -3,6 +3,7 @@ interface SeatType {
3
3
  label: string;
4
4
  key?: string;
5
5
  fare: number;
6
+ api_seat_type?: string;
6
7
  }
7
8
  interface SeatSectionMobileProps {
8
9
  seatTypes: SeatType[];
@@ -131,7 +131,9 @@ function SeatSectionMobile({ seatTypes: seatTypesData, isSoldOut, isPeru, seatPr
131
131
  return uniqueSeats.map((type, i) => (React.createElement(SeatRow, { key: i, type: type, index: i, displayLabel: commonService.truncateSeatLabel(type.label), fare: getFare(type.fare), isSoldOut: isSoldOut, seatPriceColor: seatPriceColor, hasMultipleTypes: hasMultipleTypes, textSize: "text-[11px]", isTrain: isTrain })));
132
132
  }
133
133
  const filteredSeats = (_a = seatTypesData === null || seatTypesData === void 0 ? void 0 : seatTypesData.filter((item) => getFilteredSeats(item.label))) === null || _a === void 0 ? void 0 : _a.sort((a, b) => a.fare - b.fare);
134
- return (_b = (isTrain ? filteredSeats : filteredSeats === null || filteredSeats === void 0 ? void 0 : filteredSeats.slice(0, 2))) === null || _b === void 0 ? void 0 : _b.map((type, i) => (React.createElement(SeatRow, { key: i, type: type, index: i, displayLabel: type.label, fare: getFare(type.fare), isSoldOut: isSoldOut, seatPriceColor: seatPriceColor, hasMultipleTypes: hasMultipleTypes, textSize: "text-[12px]", isTrain: isTrain })));
134
+ return (_b = (isTrain ? filteredSeats : filteredSeats === null || filteredSeats === void 0 ? void 0 : filteredSeats.slice(0, 2))) === null || _b === void 0 ? void 0 : _b.map((type, i) => {
135
+ return (React.createElement(SeatRow, { key: i, type: type, index: i, displayLabel: isTrain ? type.api_seat_type : type.label, fare: getFare(type.fare), isSoldOut: isSoldOut, seatPriceColor: seatPriceColor, hasMultipleTypes: hasMultipleTypes, textSize: "text-[12px]", isTrain: isTrain }));
136
+ });
135
137
  };
136
138
  const seats = removeDuplicateSeats
137
139
  ? getUniqueSeats(seatTypesData, 3)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kupos-ui-components-lib",
3
- "version": "10.3.4",
3
+ "version": "10.3.5",
4
4
  "description": "A reusable UI components package",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -17,6 +17,7 @@ interface SeatType {
17
17
  label: string;
18
18
  key?: string;
19
19
  fare: number;
20
+ api_seat_type?: string;
20
21
  }
21
22
 
22
23
  interface SeatSectionMobileProps {
@@ -345,20 +346,22 @@ function SeatSectionMobile({
345
346
  ?.sort((a, b) => a.fare - b.fare);
346
347
 
347
348
  return (isTrain ? filteredSeats : filteredSeats?.slice(0, 2))?.map(
348
- (type, i) => (
349
- <SeatRow
350
- key={i}
351
- type={type}
352
- index={i}
353
- displayLabel={type.label}
354
- fare={getFare(type.fare)}
355
- isSoldOut={isSoldOut}
356
- seatPriceColor={seatPriceColor}
357
- hasMultipleTypes={hasMultipleTypes}
358
- textSize="text-[12px]"
359
- isTrain={isTrain}
360
- />
361
- ),
349
+ (type, i) => {
350
+ return (
351
+ <SeatRow
352
+ key={i}
353
+ type={type}
354
+ index={i}
355
+ displayLabel={isTrain ? type.api_seat_type : type.label}
356
+ fare={getFare(type.fare)}
357
+ isSoldOut={isSoldOut}
358
+ seatPriceColor={seatPriceColor}
359
+ hasMultipleTypes={hasMultipleTypes}
360
+ textSize="text-[12px]"
361
+ isTrain={isTrain}
362
+ />
363
+ );
364
+ },
362
365
  );
363
366
  };
364
367