kupos-ui-components-lib 2.0.8 → 2.0.9

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.
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { FilterBarProps } from "./tyoes";
3
- declare const FilterBarDesktop: ({ t, serviceList, setServiceList, allSchedules, showReturnTripModal, filterArrData, isBlankTicket, operatorId, filtersArray, setFiltersArray, metaData, busTerminals, setTypes, colors, icons, translation, isTrain, isPeru, hideOperator, }: FilterBarProps) => React.JSX.Element;
3
+ declare const FilterBarDesktop: ({ t, serviceList, setServiceList, allSchedules, showReturnTripModal, filterArrData, isBlankTicket, operatorId, filtersArray, setFiltersArray, metaData, busTerminals, setTypes, colors, icons, translation, isTrain, isPeru, hideOperator, setCoachLoading, setCoachKey, }: FilterBarProps) => React.JSX.Element;
4
4
  export default FilterBarDesktop;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import commonService from "../../utils/CommonService";
3
3
  import ServiceFilter from "./ServiceFilter";
4
- const FilterBarDesktop = ({ t, serviceList, setServiceList, allSchedules, showReturnTripModal, filterArrData, isBlankTicket, operatorId, filtersArray, setFiltersArray, metaData, busTerminals, setTypes, colors, icons, translation, isTrain, isPeru, hideOperator, }) => {
4
+ const FilterBarDesktop = ({ t, serviceList, setServiceList, allSchedules, showReturnTripModal, filterArrData, isBlankTicket, operatorId, filtersArray, setFiltersArray, metaData, busTerminals, setTypes, colors, icons, translation, isTrain, isPeru, hideOperator, setCoachLoading, setCoachKey, }) => {
5
5
  const filterBy = (filters) => {
6
6
  try {
7
7
  let routes = allSchedules;
@@ -472,6 +472,8 @@ const FilterBarDesktop = ({ t, serviceList, setServiceList, allSchedules, showRe
472
472
  // setFiltersArray(filters);
473
473
  // };
474
474
  const onFilterSelected = (key, i) => {
475
+ setCoachLoading(null);
476
+ setCoachKey(null);
475
477
  let filters = commonService.copyObject(filtersArray);
476
478
  filters[key].options[i].active = !filters[key].options[i].active;
477
479
  filterBy(filters);
@@ -33,4 +33,6 @@ export interface FilterBarProps {
33
33
  };
34
34
  isTrain?: boolean;
35
35
  isPeru?: boolean;
36
+ setCoachLoading?: any;
37
+ setCoachKey?: any;
36
38
  }
@@ -283,7 +283,7 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
283
283
  const onBookButtonPressHandler = () => {
284
284
  onBookButtonPress();
285
285
  };
286
- return (React.createElement("div", { className: `relative ${serviceItem.offer_text ? "mb-[60px]" : "mb-[10px]"} ${(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ||
286
+ return (React.createElement("div", { className: `relative ${serviceItem.offer_text ? "mb-[55px]" : "mb-[10px]"} ${(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ||
287
287
  (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.train_type_label) === "Tren Express (Nuevo)" ||
288
288
  showTopLabel
289
289
  ? "mt-[24px]"
package/dist/styles.css CHANGED
@@ -213,6 +213,9 @@
213
213
  .mb-\[50px\] {
214
214
  margin-bottom: 50px;
215
215
  }
216
+ .mb-\[55px\] {
217
+ margin-bottom: 55px;
218
+ }
216
219
  .mb-\[60px\] {
217
220
  margin-bottom: 60px;
218
221
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kupos-ui-components-lib",
3
- "version": "2.0.8",
3
+ "version": "2.0.9",
4
4
  "description": "A reusable UI components package",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -23,6 +23,8 @@ const FilterBarDesktop = ({
23
23
  isTrain,
24
24
  isPeru,
25
25
  hideOperator,
26
+ setCoachLoading,
27
+ setCoachKey,
26
28
  }: FilterBarProps) => {
27
29
  const filterBy = (filters) => {
28
30
  try {
@@ -528,6 +530,8 @@ const FilterBarDesktop = ({
528
530
  // };
529
531
 
530
532
  const onFilterSelected = (key: number, i: number) => {
533
+ setCoachLoading(null);
534
+ setCoachKey(null);
531
535
  let filters = commonService.copyObject(filtersArray);
532
536
  filters[key].options[i].active = !filters[key].options[i].active;
533
537
  filterBy(filters);
@@ -32,5 +32,7 @@ export interface FilterBarProps {
32
32
  translation?: { [key: string]: string };
33
33
  isTrain?: boolean;
34
34
  isPeru?: boolean;
35
+ setCoachLoading?: any;
36
+ setCoachKey?: any;
35
37
 
36
38
  }
@@ -403,7 +403,7 @@ function ServiceItemPB({
403
403
  return (
404
404
  <div
405
405
  className={`relative ${
406
- serviceItem.offer_text ? "mb-[60px]" : "mb-[10px]"
406
+ serviceItem.offer_text ? "mb-[55px]" : "mb-[10px]"
407
407
  } ${
408
408
  serviceItem?.is_direct_trip ||
409
409
  serviceItem?.train_type_label === "Tren Express (Nuevo)" ||