kupos-ui-components-lib 8.0.5 → 8.0.7

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.
Files changed (37) hide show
  1. package/dist/components/FilterBar/FilterBarDesktop.js +0 -55
  2. package/dist/components/FilterBar/ServiceFilter.js +2 -3
  3. package/dist/components/ServiceItem/ServiceItemDesktop.js +65 -404
  4. package/dist/index.d.ts +1 -2
  5. package/dist/index.js +5 -6
  6. package/dist/styles.css +22 -160
  7. package/dist/ui/AmenitiesBlock.d.ts +12 -0
  8. package/dist/ui/AmenitiesBlock.js +78 -0
  9. package/dist/ui/DurationBlock.d.ts +9 -0
  10. package/dist/ui/DurationBlock.js +11 -0
  11. package/dist/ui/FlexibleBlock.d.ts +9 -0
  12. package/dist/ui/FlexibleBlock.js +24 -0
  13. package/dist/ui/PetBlock.d.ts +8 -0
  14. package/dist/ui/PetBlock.js +17 -0
  15. package/dist/ui/RatingBlock.d.ts +10 -0
  16. package/dist/ui/RatingBlock.js +9 -0
  17. package/dist/ui/StagesTooltip.d.ts +12 -0
  18. package/dist/ui/StagesTooltip.js +59 -0
  19. package/dist/utils/CommonService.d.ts +5 -0
  20. package/dist/utils/CommonService.js +170 -217
  21. package/package.json +1 -1
  22. package/src/components/FilterBar/FilterBarDesktop.tsx +1 -57
  23. package/src/components/FilterBar/ServiceFilter.tsx +2 -3
  24. package/src/components/ServiceItem/ServiceItemDesktop.tsx +190 -1013
  25. package/src/index.ts +22 -12
  26. package/src/styles.css +46 -43
  27. package/src/ui/AmenitiesBlock.tsx +176 -0
  28. package/src/ui/DurationBlock.tsx +32 -0
  29. package/src/ui/FlexibleBlock.tsx +45 -0
  30. package/src/ui/PetBlock.tsx +34 -0
  31. package/src/ui/RatingBlock.tsx +35 -0
  32. package/src/ui/StagesTooltip.tsx +118 -0
  33. package/src/utils/CommonService.ts +174 -233
  34. package/src/ServiceItemPb.tsx +0 -1048
  35. package/src/dummyData.json +0 -73
  36. package/src/example.tsx +0 -348
  37. package/src/lottie-player.d.ts +0 -0
@@ -135,29 +135,6 @@ const FilterBarDesktop = ({ t, serviceList, setServiceList, allSchedules, showRe
135
135
  // }
136
136
  }
137
137
  if (isPeru) {
138
- // if (fil.type == "seat_types") {
139
- // let activeOptions = fil.options.filter((it) => it.active);
140
- // filteredRoutes = filteredRoutes.filter((it) => {
141
- // if (activeOptions && activeOptions.length) {
142
- // // Check if ANY of the active filter options match ANY seat type
143
- // for (let f of activeOptions) {
144
- // if (f.active) {
145
- // const filterValue = f.value.toLowerCase();
146
- // // Check if this filter value appears in any seat type label
147
- // const hasMatchingSeatType = it.seat_types.some(
148
- // (bt) => bt?.label?.toLowerCase().indexOf(filterValue) > -1
149
- // );
150
- // if (hasMatchingSeatType) {
151
- // return true;
152
- // }
153
- // }
154
- // }
155
- // return false;
156
- // } else {
157
- // return true;
158
- // }
159
- // });
160
- // }
161
138
  if (fil.type === "seat_types") {
162
139
  const activeOptions = fil.options.filter((it) => it.active);
163
140
  filteredRoutes = filteredRoutes.filter((route) => {
@@ -175,29 +152,6 @@ const FilterBarDesktop = ({ t, serviceList, setServiceList, allSchedules, showRe
175
152
  }
176
153
  }
177
154
  else {
178
- // if (fil.type == "seat_types") {
179
- // let activeOptions = fil.options.filter((it) => it.active);
180
- // filteredRoutes = filteredRoutes.filter((it) => {
181
- // if (activeOptions && activeOptions.length) {
182
- // // Check if ANY of the active filter options match ANY seat type
183
- // for (let f of activeOptions) {
184
- // if (f.active) {
185
- // const filterValue = f.value.toLowerCase();
186
- // // Check if this filter value appears in any seat type label
187
- // const hasMatchingSeatType = it.seat_types.some(
188
- // (bt) => bt?.label?.toLowerCase().indexOf(filterValue) > -1
189
- // );
190
- // if (hasMatchingSeatType) {
191
- // return true;
192
- // }
193
- // }
194
- // }
195
- // return false;
196
- // } else {
197
- // return true;
198
- // }
199
- // });
200
- // }
201
155
  if (fil.type === "seat_types") {
202
156
  const activeOptions = fil.options.filter((it) => it.active);
203
157
  filteredRoutes = filteredRoutes.filter((route) => {
@@ -216,21 +170,12 @@ const FilterBarDesktop = ({ t, serviceList, setServiceList, allSchedules, showRe
216
170
  }
217
171
  }
218
172
  routes = filteredRoutes;
219
- // this.setState({
220
- // serviceList: routes,
221
- // });
222
173
  setServiceList(routes);
223
174
  }
224
175
  catch (e) {
225
176
  console.log(e);
226
177
  }
227
178
  };
228
- // const onFilterSelected = (option, key: number, i: number) => {
229
- // let filters = commonService.copyObject(filtersArray);
230
- // filters[key].options[i].active = !filters[key].options[i].active;
231
- // filterBy(filters);
232
- // setFiltersArray(filters);
233
- // };
234
179
  const onFilterSelected = (key, i) => {
235
180
  setCoachLoading(null);
236
181
  setCoachKey(null);
@@ -243,9 +243,8 @@ class ServiceFilter extends React.Component {
243
243
  React.createElement("span", { style: {
244
244
  textTransform: option.type !== "time" ? "capitalize" : "none",
245
245
  } }, option.type === "time"
246
- ? label.charAt(0).toUpperCase() +
247
- label.slice(1).toLowerCase()
248
- : label.toLowerCase())));
246
+ ? commonService.formatTimeLabel(label)
247
+ : commonService.formatDefaultLabel(label))));
249
248
  }))));
250
249
  }
251
250
  render() {