kupos-ui-components-lib 4.0.4 → 4.0.6

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.
@@ -8,7 +8,7 @@ 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, removeDuplicateSeats, originIconStyle, t = (key) => key, }) {
10
10
  var _a, _b, _c, _d, _e, _f, _g;
11
- console.log("🚀 ~ ServiceItemPB ~ serviceItem:", serviceItem);
11
+ console.log("🚀 ~ ServiceItemPB ~ serviceItem:", serviceItem, metaData);
12
12
  const SvgAmenities = ({ moreAnemities, name, color, }) => {
13
13
  const amenityKey = name.toLowerCase().replace(/\s/g, "_");
14
14
  const getIconPath = () => {
@@ -25,7 +25,7 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
25
25
  }, className: `object-contain ${moreAnemities ? "w-[16px] h-[16px]" : "w-[16px] h-[16px]"}` }));
26
26
  };
27
27
  const getAmenitiesImage = (name) => {
28
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
28
+ 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, _0, _1;
29
29
  switch (name) {
30
30
  case "air_condtion.png": {
31
31
  return (_a = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _a === void 0 ? void 0 : _a.airConditionIcon;
@@ -69,7 +69,7 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
69
69
  case "frazada.png": {
70
70
  return (_p = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _p === void 0 ? void 0 : _p.frazaIcon;
71
71
  }
72
- case "blankket.png": {
72
+ case "blanket.png": {
73
73
  return (_q = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _q === void 0 ? void 0 : _q.blankketIcon;
74
74
  }
75
75
  case "cctv.png": {
@@ -90,18 +90,28 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
90
90
  case "reading_light.png": {
91
91
  return (_w = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _w === void 0 ? void 0 : _w.readingLIghtIcon;
92
92
  }
93
- case "security_belt.png": {
93
+ case "seat_belt.png": {
94
94
  return (_x = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _x === void 0 ? void 0 : _x.sercurityBeltIcon;
95
95
  }
96
96
  case "service_on_board.png": {
97
97
  return (_y = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _y === void 0 ? void 0 : _y.serviceOnBoardIcon;
98
98
  }
99
+ case "personal_tv.png": {
100
+ return (_z = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _z === void 0 ? void 0 : _z.personalTVIcon;
101
+ }
102
+ case "pet_admission.png": {
103
+ return (_0 = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _0 === void 0 ? void 0 : _0.petAdmissionIcon;
104
+ }
105
+ case "music.png": {
106
+ return (_1 = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _1 === void 0 ? void 0 : _1.musicIcon;
107
+ }
99
108
  default: {
100
109
  return "";
101
110
  }
102
111
  }
103
112
  };
104
113
  const getAmenityName = (rawAmenity) => {
114
+ console.log("🚀 ~ getAmenityName ~ rawAmenity:", rawAmenity);
105
115
  switch (rawAmenity) {
106
116
  case "mobile ticket":
107
117
  return "Ticket móvil";
@@ -125,24 +135,30 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
125
135
  return "Cortina Divisoria";
126
136
  case "frazada":
127
137
  return "Frazada";
128
- case "blankket":
138
+ case "blanket":
129
139
  return "Mantas";
130
140
  case "cctv":
131
141
  return "Cámara de seguridad";
132
- case "cup_holder":
142
+ case "cup holder":
133
143
  return "Portavasos";
134
- case "emergency_contact":
144
+ case "emergency contact":
135
145
  return "Contacto de emergencia";
136
- case "emergency_exit":
146
+ case "emergency exit":
137
147
  return "Salida de emergencia";
138
- case "fire_extinguisher":
148
+ case "fire extinguisher":
139
149
  return "Extintor de incendio";
140
- case "reading_light":
150
+ case "reading light":
141
151
  return "Luz de lectura";
142
- case "security_belt":
152
+ case "seat belt":
143
153
  return "Cinturón de seguridad";
144
- case "service_on_board":
154
+ case "service on board":
145
155
  return "Servicio a bordo";
156
+ case "personal tv":
157
+ return "TV personal";
158
+ case "pet admission":
159
+ return "Admisión de mascotas";
160
+ case "music":
161
+ return "Música";
146
162
  default:
147
163
  return rawAmenity;
148
164
  }
@@ -84,7 +84,7 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
84
84
  return item;
85
85
  };
86
86
  const getAmenitiesImage = (name) => {
87
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
87
+ 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, _0, _1;
88
88
  switch (name) {
89
89
  case "air_condtion.png": {
90
90
  return (_a = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _a === void 0 ? void 0 : _a.airConditionIcon;
@@ -128,7 +128,7 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
128
128
  case "frazada.png": {
129
129
  return (_p = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _p === void 0 ? void 0 : _p.frazaIcon;
130
130
  }
131
- case "blankket.png": {
131
+ case "blanket.png": {
132
132
  return (_q = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _q === void 0 ? void 0 : _q.blankketIcon;
133
133
  }
134
134
  case "cctv.png": {
@@ -149,12 +149,21 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
149
149
  case "reading_light.png": {
150
150
  return (_w = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _w === void 0 ? void 0 : _w.readingLIghtIcon;
151
151
  }
152
- case "security_belt.png": {
152
+ case "seat_belt.png": {
153
153
  return (_x = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _x === void 0 ? void 0 : _x.sercurityBeltIcon;
154
154
  }
155
155
  case "service_on_board.png": {
156
156
  return (_y = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _y === void 0 ? void 0 : _y.serviceOnBoardIcon;
157
157
  }
158
+ case "personal_tv.png": {
159
+ return (_z = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _z === void 0 ? void 0 : _z.personalTVIcon;
160
+ }
161
+ case "pet_admission.png": {
162
+ return (_0 = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _0 === void 0 ? void 0 : _0.petAdmissionIcon;
163
+ }
164
+ case "music.png": {
165
+ return (_1 = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _1 === void 0 ? void 0 : _1.musicIcon;
166
+ }
158
167
  default: {
159
168
  return "";
160
169
  }
@@ -101,6 +101,9 @@ export interface MobileServiceItemProps {
101
101
  sercurityBeltIcon?: string;
102
102
  serviceOnBoardIcon?: string;
103
103
  airportIcon?: string;
104
+ personalTVIcon?: string;
105
+ petAdmissionIcon?: string;
106
+ musicIcon?: string;
104
107
  [key: string]: string | Record<string, string | undefined> | undefined;
105
108
  };
106
109
  useLottieFor?: string[];
@@ -105,6 +105,9 @@ export interface ServiceItemProps {
105
105
  readingLIghtIcon?: string;
106
106
  sercurityBeltIcon?: string;
107
107
  serviceOnBoardIcon?: string;
108
+ personalTVIcon?: string;
109
+ petAdmissionIcon?: string;
110
+ musicIcon?: string;
108
111
  [key: string]: string | Record<string, string | undefined> | undefined;
109
112
  };
110
113
  useLottieFor?: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kupos-ui-components-lib",
3
- "version": "4.0.4",
3
+ "version": "4.0.6",
4
4
  "description": "A reusable UI components package",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -31,7 +31,7 @@ function ServiceItemPB({
31
31
  originIconStyle,
32
32
  t = (key: string) => key,
33
33
  }: ServiceItemProps & { currencySign?: string }): React.ReactElement {
34
- console.log("🚀 ~ ServiceItemPB ~ serviceItem:", serviceItem);
34
+ console.log("🚀 ~ ServiceItemPB ~ serviceItem:", serviceItem, metaData);
35
35
  const SvgAmenities = ({
36
36
  moreAnemities,
37
37
  name,
@@ -114,7 +114,7 @@ function ServiceItemPB({
114
114
  case "frazada.png": {
115
115
  return serviceItem?.icons?.frazaIcon;
116
116
  }
117
- case "blankket.png": {
117
+ case "blanket.png": {
118
118
  return serviceItem?.icons?.blankketIcon;
119
119
  }
120
120
  case "cctv.png": {
@@ -135,12 +135,21 @@ function ServiceItemPB({
135
135
  case "reading_light.png": {
136
136
  return serviceItem?.icons?.readingLIghtIcon;
137
137
  }
138
- case "security_belt.png": {
138
+ case "seat_belt.png": {
139
139
  return serviceItem?.icons?.sercurityBeltIcon;
140
140
  }
141
141
  case "service_on_board.png": {
142
142
  return serviceItem?.icons?.serviceOnBoardIcon;
143
143
  }
144
+ case "personal_tv.png": {
145
+ return serviceItem?.icons?.personalTVIcon;
146
+ }
147
+ case "pet_admission.png": {
148
+ return serviceItem?.icons?.petAdmissionIcon;
149
+ }
150
+ case "music.png": {
151
+ return serviceItem?.icons?.musicIcon;
152
+ }
144
153
  default: {
145
154
  return "";
146
155
  }
@@ -148,6 +157,7 @@ function ServiceItemPB({
148
157
  };
149
158
 
150
159
  const getAmenityName = (rawAmenity: string): string => {
160
+ console.log("🚀 ~ getAmenityName ~ rawAmenity:", rawAmenity);
151
161
  switch (rawAmenity) {
152
162
  case "mobile ticket":
153
163
  return "Ticket móvil";
@@ -171,24 +181,32 @@ function ServiceItemPB({
171
181
  return "Cortina Divisoria";
172
182
  case "frazada":
173
183
  return "Frazada";
174
- case "blankket":
184
+
185
+ case "blanket":
175
186
  return "Mantas";
176
187
  case "cctv":
177
188
  return "Cámara de seguridad";
178
- case "cup_holder":
189
+ case "cup holder":
179
190
  return "Portavasos";
180
- case "emergency_contact":
191
+ case "emergency contact":
181
192
  return "Contacto de emergencia";
182
- case "emergency_exit":
193
+ case "emergency exit":
183
194
  return "Salida de emergencia";
184
- case "fire_extinguisher":
195
+ case "fire extinguisher":
185
196
  return "Extintor de incendio";
186
- case "reading_light":
197
+ case "reading light":
187
198
  return "Luz de lectura";
188
- case "security_belt":
199
+ case "seat belt":
189
200
  return "Cinturón de seguridad";
190
- case "service_on_board":
201
+ case "service on board":
191
202
  return "Servicio a bordo";
203
+
204
+ case "personal tv":
205
+ return "TV personal";
206
+ case "pet admission":
207
+ return "Admisión de mascotas";
208
+ case "music":
209
+ return "Música";
192
210
  default:
193
211
  return rawAmenity;
194
212
  }
@@ -200,7 +200,7 @@ function ServiceItemMobile({
200
200
  case "frazada.png": {
201
201
  return serviceItem?.icons?.frazaIcon;
202
202
  }
203
- case "blankket.png": {
203
+ case "blanket.png": {
204
204
  return serviceItem?.icons?.blankketIcon;
205
205
  }
206
206
  case "cctv.png": {
@@ -221,12 +221,21 @@ function ServiceItemMobile({
221
221
  case "reading_light.png": {
222
222
  return serviceItem?.icons?.readingLIghtIcon;
223
223
  }
224
- case "security_belt.png": {
224
+ case "seat_belt.png": {
225
225
  return serviceItem?.icons?.sercurityBeltIcon;
226
226
  }
227
227
  case "service_on_board.png": {
228
228
  return serviceItem?.icons?.serviceOnBoardIcon;
229
229
  }
230
+ case "personal_tv.png": {
231
+ return serviceItem?.icons?.personalTVIcon;
232
+ }
233
+ case "pet_admission.png": {
234
+ return serviceItem?.icons?.petAdmissionIcon;
235
+ }
236
+ case "music.png": {
237
+ return serviceItem?.icons?.musicIcon;
238
+ }
230
239
  default: {
231
240
  return "";
232
241
  }
@@ -104,6 +104,9 @@ export interface MobileServiceItemProps {
104
104
  sercurityBeltIcon?: string;
105
105
  serviceOnBoardIcon?: string;
106
106
  airportIcon?: string;
107
+ personalTVIcon?: string;
108
+ petAdmissionIcon?: string;
109
+ musicIcon?: string;
107
110
  [key: string]: string | Record<string, string | undefined> | undefined;
108
111
  };
109
112
  useLottieFor?: string[];
@@ -107,6 +107,10 @@ export interface ServiceItemProps {
107
107
  readingLIghtIcon?: string;
108
108
  sercurityBeltIcon?: string;
109
109
  serviceOnBoardIcon?: string;
110
+ personalTVIcon?: string;
111
+ petAdmissionIcon?: string;
112
+ musicIcon?: string;
113
+
110
114
  [key: string]: string | Record<string, string | undefined> | undefined;
111
115
  };
112
116
  useLottieFor?: string[];
@@ -133,7 +137,6 @@ export interface ServiceItemProps {
133
137
  primaryButtonTextColor?: string;
134
138
  bottomStripColor?: string;
135
139
  directoColor?: string;
136
-
137
140
  seatPriceColor?: string;
138
141
  };
139
142
  cityOrigin?: { value: number; label: string };