kupos-ui-components-lib 3.0.1 → 3.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.
@@ -139,7 +139,7 @@ const FilterBarDesktop = ({ t, serviceList, setServiceList, allSchedules, showRe
139
139
  let activeOptions = fil.options.filter((it) => it.active);
140
140
  // if (activeOptions && activeOptions.length > 0) {
141
141
  filteredRoutes = filteredRoutes.filter((it) => {
142
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
142
+ 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;
143
143
  if (activeOptions && activeOptions.length)
144
144
  for (let f of activeOptions) {
145
145
  if (f.active) {
@@ -359,6 +359,27 @@ const FilterBarDesktop = ({ t, serviceList, setServiceList, allSchedules, showRe
359
359
  }
360
360
  }
361
361
  }
362
+ else if (f.value.toLowerCase().indexOf("killa plus") > -1) {
363
+ for (let bt of it.seat_types) {
364
+ if (((_x = bt === null || bt === void 0 ? void 0 : bt.label) === null || _x === void 0 ? void 0 : _x.toLowerCase().indexOf("killa plus")) > -1) {
365
+ return true;
366
+ }
367
+ }
368
+ }
369
+ else if (f.value.toLowerCase().indexOf("inka plus") > -1) {
370
+ for (let bt of it.seat_types) {
371
+ if (((_y = bt === null || bt === void 0 ? void 0 : bt.label) === null || _y === void 0 ? void 0 : _y.toLowerCase().indexOf("inka plus")) > -1) {
372
+ return true;
373
+ }
374
+ }
375
+ }
376
+ else if (f.value.toLowerCase().indexOf("emperador") > -1) {
377
+ for (let bt of it.seat_types) {
378
+ if (((_z = bt === null || bt === void 0 ? void 0 : bt.label) === null || _z === void 0 ? void 0 : _z.toLowerCase().indexOf("emperador")) > -1) {
379
+ return true;
380
+ }
381
+ }
382
+ }
362
383
  }
363
384
  }
364
385
  else
@@ -108,7 +108,6 @@ class ServiceFilter extends React.Component {
108
108
  (option.type === "special_departure" && showSpecialDeparture) ||
109
109
  (option.type === "train_type" && showTrainType) ||
110
110
  (option.type === "amenities" && showAmenities);
111
- console.log("🚀 ~ ServiceFilter ~ renderFilterItem ~ isOpen:", isOpen);
112
111
  if ((option === null || option === void 0 ? void 0 : option.type) === "train_type" && !this.props.isTrain) {
113
112
  return null;
114
113
  }
@@ -8,7 +8,6 @@ import LottiePlayer from "../../assets/LottiePlayer";
8
8
  const SEAT_EXCEPTIONS = ["Asiento mascota"];
9
9
  function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, children, busStage, serviceDetailsLoading, cityOrigin, cityDestination, translation, orignLabel, destinationLabel, currencySign, isCiva, showRating, showLastSeats, removeArrivalTime, originIconStyle, t = (key) => key, }) {
10
10
  var _a, _b, _c, _d, _e, _f, _g;
11
- console.log("🚀 ~ ServiceItemPB ~ serviceItem:", serviceItem);
12
11
  const SvgAmenities = ({ moreAnemities, name, color, }) => {
13
12
  const amenityKey = name.toLowerCase().replace(/\s/g, "_");
14
13
  const getIconPath = () => {
@@ -455,7 +454,9 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
455
454
  React.createElement(LottiePlayer, { animationData: serviceItem.icons.promoAnim, width: "18px", height: "18px" }),
456
455
  React.createElement("span", { className: "ml-[10px]" }, serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text))),
457
456
  React.createElement("div", { className: "absolute -top-[13px] left-0 w-full flex items-center justify-end gap-[12px] pr-[15px] z-10 " },
458
- showTopLabel && (React.createElement("div", { className: `flex items-center gap-[10px] py-[5px] px-[14px] rounded-[38px] text-[13.33px] z-20`, style: { backgroundColor: !isSoldOut && colors.ratingBottomColor } },
457
+ showTopLabel && (React.createElement("div", { className: `flex items-center gap-[10px] py-[5px] px-[14px] rounded-[38px] text-[13.33px] z-20`, style: {
458
+ backgroundColor: isSoldOut ? "#ddd" : colors.ratingBottomColor,
459
+ } },
459
460
  React.createElement("div", { className: isSoldOut ? "grayscale" : "" },
460
461
  React.createElement(LottiePlayer, { animationData: serviceItem.icons.priorityStageAnim, width: "16px", height: "16px" })),
461
462
  React.createElement("div", { className: isSoldOut ? "text-white" : `text-[${colors.topLabelColor}]` }, showTopLabel))),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kupos-ui-components-lib",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
4
  "description": "A reusable UI components package",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -409,6 +409,36 @@ const FilterBarDesktop = ({
409
409
  return true;
410
410
  }
411
411
  }
412
+ } else if (
413
+ f.value.toLowerCase().indexOf("killa plus") > -1
414
+ ) {
415
+ for (let bt of it.seat_types) {
416
+ if (
417
+ bt?.label?.toLowerCase().indexOf("killa plus") > -1
418
+ ) {
419
+ return true;
420
+ }
421
+ }
422
+ } else if (
423
+ f.value.toLowerCase().indexOf("inka plus") > -1
424
+ ) {
425
+ for (let bt of it.seat_types) {
426
+ if (
427
+ bt?.label?.toLowerCase().indexOf("inka plus") > -1
428
+ ) {
429
+ return true;
430
+ }
431
+ }
432
+ } else if (
433
+ f.value.toLowerCase().indexOf("emperador") > -1
434
+ ) {
435
+ for (let bt of it.seat_types) {
436
+ if (
437
+ bt?.label?.toLowerCase().indexOf("emperador") > -1
438
+ ) {
439
+ return true;
440
+ }
441
+ }
412
442
  }
413
443
  }
414
444
  }
@@ -168,7 +168,6 @@ class ServiceFilter extends React.Component<
168
168
  (option.type === "special_departure" && showSpecialDeparture) ||
169
169
  (option.type === "train_type" && showTrainType) ||
170
170
  (option.type === "amenities" && showAmenities);
171
- console.log("🚀 ~ ServiceFilter ~ renderFilterItem ~ isOpen:", isOpen);
172
171
 
173
172
  if (option?.type === "train_type" && !this.props.isTrain) {
174
173
  return null;
@@ -30,7 +30,6 @@ function ServiceItemPB({
30
30
  originIconStyle,
31
31
  t = (key: string) => key,
32
32
  }: ServiceItemProps & { currencySign?: string }): React.ReactElement {
33
- console.log("🚀 ~ ServiceItemPB ~ serviceItem:", serviceItem);
34
33
  const SvgAmenities = ({
35
34
  moreAnemities,
36
35
  name,
@@ -989,7 +988,9 @@ function ServiceItemPB({
989
988
  {showTopLabel && (
990
989
  <div
991
990
  className={`flex items-center gap-[10px] py-[5px] px-[14px] rounded-[38px] text-[13.33px] z-20`}
992
- style={{ backgroundColor: !isSoldOut && colors.ratingBottomColor }}
991
+ style={{
992
+ backgroundColor: isSoldOut ? "#ddd" : colors.ratingBottomColor,
993
+ }}
993
994
  >
994
995
  <div className={isSoldOut ? "grayscale" : ""}>
995
996
  <LottiePlayer