kupos-ui-components-lib 3.0.0 → 3.0.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.
@@ -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 = () => {
@@ -425,7 +424,7 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
425
424
  getAmenityName((_d = metaData.amenities[val]) === null || _d === void 0 ? void 0 : _d.split(".")[0].split("_").join(" ")))))) : null;
426
425
  }),
427
426
  ((_e = serviceItem.operator_details[4]) === null || _e === void 0 ? void 0 : _e.length) > 3 && (React.createElement("div", { className: "relative ml-1 cursor-pointer" },
428
- React.createElement("div", { className: "w-[16px] h-[16px] bg-gray-200 rounded-full flex justify-center text-sm font-bold group", style: { alignItems: "flex-end", marginTop: "5px" } },
427
+ React.createElement("div", { className: "w-[16px] h-[16px] bg-gray-200 rounded-full flex justify-center text-sm font-bold group", style: { alignItems: "flex-end", marginTop: "3px" } },
429
428
  React.createElement("img", { src: ((_f = serviceItem.icons) === null || _f === void 0 ? void 0 : _f.plus) ||
430
429
  "/images/icons/amenities/icon_plus.svg", className: "w-[16px] h-[16px]", alt: "plus" }),
431
430
  React.createElement("div", { className: "hidden group-hover:block absolute -top-[13px] left-[40px] z-20 pl-[10px]" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kupos-ui-components-lib",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
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,
@@ -886,7 +885,7 @@ function ServiceItemPB({
886
885
  <div className="relative ml-1 cursor-pointer">
887
886
  <div
888
887
  className="w-[16px] h-[16px] bg-gray-200 rounded-full flex justify-center text-sm font-bold group"
889
- style={{ alignItems: "flex-end", marginTop: "5px" }}
888
+ style={{ alignItems: "flex-end", marginTop: "3px" }}
890
889
  >
891
890
  <img
892
891
  src={