@admin-layout/tailwind-travel-pro 12.0.16-alpha.93 → 12.2.1-alpha.0
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.
- package/lib/components/CardList.js +20 -22
- package/lib/components/CardList.js.map +1 -1
- package/lib/components/CategoriesTypeList.d.ts +2 -1
- package/lib/components/CategoriesTypeList.d.ts.map +1 -1
- package/lib/components/CategoriesTypeList.js +46 -51
- package/lib/components/CategoriesTypeList.js.map +1 -1
- package/lib/components/LazyLoadingGoogleMarker.js +15 -18
- package/lib/components/LazyLoadingGoogleMarker.js.map +1 -1
- package/lib/components/Pagination.d.ts +2 -1
- package/lib/components/Pagination.d.ts.map +1 -1
- package/lib/components/Pagination.js +15 -16
- package/lib/components/Pagination.js.map +1 -1
- package/lib/components/ParamSearchResultContainer.d.ts +1 -1
- package/lib/components/ParamSearchResultContainer.d.ts.map +1 -1
- package/lib/components/ParamSearchResultContainer.js +21 -26
- package/lib/components/ParamSearchResultContainer.js.map +1 -1
- package/lib/components/PropertyCard.d.ts +1 -1
- package/lib/components/PropertyCard.d.ts.map +1 -1
- package/lib/components/PropertyCard.js +198 -264
- package/lib/components/PropertyCard.js.map +1 -1
- package/lib/components/PropertyCardOnMap.d.ts +2 -1
- package/lib/components/PropertyCardOnMap.d.ts.map +1 -1
- package/lib/components/PropertyCardOnMap.js +67 -85
- package/lib/components/PropertyCardOnMap.js.map +1 -1
- package/lib/components/VehicleCard/PricePopover.js +39 -58
- package/lib/components/VehicleCard/PricePopover.js.map +1 -1
- package/lib/components/VehicleCard/VehicleFeature.js +13 -17
- package/lib/components/VehicleCard/VehicleFeature.js.map +1 -1
- package/lib/components/VehicleCard.js +106 -134
- package/lib/components/VehicleCard.js.map +1 -1
- package/lib/components/VehicleCardList.js +18 -19
- package/lib/components/VehicleCardList.js.map +1 -1
- package/lib/components/VehicleParamSearchResultContainer.d.ts +2 -2
- package/lib/components/VehicleParamSearchResultContainer.d.ts.map +1 -1
- package/lib/components/icons/LocationIcon.d.ts +2 -1
- package/lib/components/icons/LocationIcon.d.ts.map +1 -1
- package/lib/components/icons/LocationIcon.js +7 -8
- package/lib/components/icons/LocationIcon.js.map +1 -1
- package/lib/index.js +1 -1
- package/package.json +5 -5
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React,{useMemo,useState,useEffect,useCallback}from'react';import {BsHeart}from'@react-icons/all-files/bs/BsHeart.js';import {BsStarFill}from'@react-icons/all-files/bs/BsStarFill.js';import {FaUserAlt}from'@react-icons/all-files/fa/FaUserAlt.js';import {useTranslation}from'react-i18next';import {useLocation}from'@remix-run/react';import {Splide,SplideSlide}from'@cdmbase/react-splide';import'@splidejs/react-splide/css';import {startCase}from'lodash-es';import {renderDynamicIcon}from'@admin-layout/tailwind-design-pro/lib/helpers/DynamicIcon.js';import {useTailwindTheme}from'@admin-layout/tailwind-design-pro/lib/hooks/useTailwindTheme.js';import {config}from'../config/env-config.js';import {useGetCurrentLongLat}from'../hooks/use-get-current-lat-long.js';import {LocationIcon}from'./icons/LocationIcon.js';const DealCard = ({
|
|
2
2
|
site,
|
|
3
3
|
price
|
|
4
|
-
}) =>
|
|
5
|
-
className: "flex flex-col items-center p-2 rounded-themed"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
children: typeof price === 'number' ? price.toLocaleString() : price
|
|
12
|
-
})]
|
|
13
|
-
});
|
|
4
|
+
}) => React.createElement("div", {
|
|
5
|
+
className: "flex flex-col items-center p-2 rounded-themed"
|
|
6
|
+
}, React.createElement("span", {
|
|
7
|
+
className: "text-xs font-bold text-muted-foreground"
|
|
8
|
+
}, site), React.createElement("span", {
|
|
9
|
+
className: "text-base font-bold text-foreground"
|
|
10
|
+
}, typeof price === 'number' ? price.toLocaleString() : price));
|
|
14
11
|
function calculateDuration(checkIn, checkOut) {
|
|
15
12
|
const checkInDate = new Date(checkIn);
|
|
16
13
|
const checkOutDate = new Date(checkOut);
|
|
@@ -120,257 +117,194 @@ const PropertyCard = ({
|
|
|
120
117
|
}
|
|
121
118
|
})) : [];
|
|
122
119
|
}) : [];
|
|
123
|
-
const LikeButton = () =>
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
className: "font-medium text-foreground",
|
|
314
|
-
children: charge?.amount_rounded
|
|
315
|
-
})]
|
|
316
|
-
}), charge.details && jsx("span", {
|
|
317
|
-
className: "text-sm font-normal text-muted-foreground",
|
|
318
|
-
children: charge?.details
|
|
319
|
-
})]
|
|
320
|
-
}, index)), jsxs("div", {
|
|
321
|
-
className: "flex justify-between pt-2 border-t border-border font-bold",
|
|
322
|
-
children: [jsx("span", {
|
|
323
|
-
className: "text-foreground",
|
|
324
|
-
children: "Total discount"
|
|
325
|
-
}), jsx("span", {
|
|
326
|
-
className: "text-foreground",
|
|
327
|
-
children: item.preferences?.property?.pricing?.price?.price_breakdown?.details?.summary?.savings
|
|
328
|
-
})]
|
|
329
|
-
})]
|
|
330
|
-
})
|
|
331
|
-
})]
|
|
332
|
-
}), jsxs("div", {
|
|
333
|
-
className: "relative group",
|
|
334
|
-
children: [jsx("span", {
|
|
335
|
-
className: "text-2xl font-semibold text-right underline cursor-help text-foreground",
|
|
336
|
-
children: item.preferences?.property?.pricing?.price?.price_breakdown?.details?.summary?.total
|
|
337
|
-
}), jsxs("div", {
|
|
338
|
-
className: "hidden group-hover:block absolute top-0 right-0 transform -translate-y-full mt-2 w-[300px] shadow-themed-lg bg-card rounded-themed z-50",
|
|
339
|
-
children: [jsx("div", {
|
|
340
|
-
className: "font-bold border-b border-border p-3 text-center text-foreground",
|
|
341
|
-
children: "Price breakdown"
|
|
342
|
-
}), jsx("div", {
|
|
343
|
-
className: "p-4",
|
|
344
|
-
children: jsx("div", {
|
|
345
|
-
className: "flex flex-col space-y-2",
|
|
346
|
-
children: item.preferences?.property?.pricing?.price?.price_breakdown?.details?.charges?.items?.map((item, index) => jsxs("div", {
|
|
347
|
-
className: "flex justify-between",
|
|
348
|
-
children: [jsx("span", {
|
|
349
|
-
className: "text-foreground",
|
|
350
|
-
children: item.name
|
|
351
|
-
}), jsx("span", {
|
|
352
|
-
className: "text-foreground",
|
|
353
|
-
children: item?.amount_rounded
|
|
354
|
-
})]
|
|
355
|
-
}, index))
|
|
356
|
-
})
|
|
357
|
-
})]
|
|
358
|
-
})]
|
|
359
|
-
})]
|
|
360
|
-
}), jsxs("span", {
|
|
361
|
-
className: "text-xs text-muted-foreground text-right w-full",
|
|
362
|
-
children: [item?.preferences?.property?.pricing?.price?.price_breakdown?.details?.pricing?.basePrice?.perNight, ' ', "per ", getPriceType(item)]
|
|
363
|
-
})]
|
|
364
|
-
}), jsx("button", {
|
|
365
|
-
className: `themed-button p-2 w-full ${isRedirecting ? 'opacity-75 cursor-wait' : ''}`,
|
|
366
|
-
onClick: handleRedirect,
|
|
367
|
-
disabled: isRedirecting,
|
|
368
|
-
children: isRedirecting ? 'Loading...' : 'View deal'
|
|
369
|
-
})]
|
|
370
|
-
})]
|
|
371
|
-
})]
|
|
372
|
-
})
|
|
373
|
-
})]
|
|
374
|
-
}, item.id)
|
|
375
|
-
});
|
|
120
|
+
const LikeButton = () => React.createElement(React.Fragment, null, likeBtnLoading ? React.createElement("div", {
|
|
121
|
+
className: "w-12 h-12 border-4 border-t-primary rounded-full animate-spin border-muted"
|
|
122
|
+
}) : React.createElement("button", {
|
|
123
|
+
className: `w-10 h-10 rounded-full flex items-center justify-center ${didLike ? 'bg-primary' : 'bg-background'}`,
|
|
124
|
+
onClick: () => handleLike(item.id),
|
|
125
|
+
"aria-label": "Select as your favourite"
|
|
126
|
+
}, React.createElement(BsHeart, {
|
|
127
|
+
className: didLike ? 'text-primary-foreground' : 'text-muted-foreground',
|
|
128
|
+
fontSize: 20
|
|
129
|
+
})));
|
|
130
|
+
return React.createElement(React.Fragment, null, React.createElement("div", {
|
|
131
|
+
className: "flex flex-row p-2 relative w-[370px] max-w-[370px] h-full",
|
|
132
|
+
key: item.id,
|
|
133
|
+
onMouseEnter: () => setFocus(item.id),
|
|
134
|
+
onMouseLeave: () => setBlur(item.id),
|
|
135
|
+
...props,
|
|
136
|
+
style: {
|
|
137
|
+
width: '370px',
|
|
138
|
+
maxWidth: '370px'
|
|
139
|
+
}
|
|
140
|
+
}, item?.status === 'pending' && React.createElement(React.Fragment, null, React.createElement("div", {
|
|
141
|
+
className: "absolute w-full h-full bg-background/60 rounded-2xl"
|
|
142
|
+
}), React.createElement("div", {
|
|
143
|
+
className: "absolute left-1/2 top-1/2 transform -translate-x-1/2 translate-y-1/2 text-foreground"
|
|
144
|
+
}, React.createElement("p", {
|
|
145
|
+
className: "text-lg font-normal"
|
|
146
|
+
}, t('property.coming_soon')))), React.createElement("div", {
|
|
147
|
+
className: "w-full max-w-[100%] border border-solid border-border rounded-2xl shadow-themed-md transition-all duration-300 hover:transform hover:-translate-y-1 hover:shadow-themed-lg themed-card h-full flex flex-col"
|
|
148
|
+
}, React.createElement("div", {
|
|
149
|
+
className: "w-full flex flex-col flex-1"
|
|
150
|
+
}, React.createElement("div", {
|
|
151
|
+
className: "relative w-full rounded-xl overflow-hidden"
|
|
152
|
+
}, React.createElement("div", {
|
|
153
|
+
className: "flex justify-between items-center"
|
|
154
|
+
}, React.createElement("div", {
|
|
155
|
+
className: "z-10 absolute top-2 left-2 bg-success text-success-foreground px-3 py-1 rounded-themed text-sm font-bold shadow-themed-md"
|
|
156
|
+
}, "Breakfast included"), React.createElement("div", {
|
|
157
|
+
className: "absolute top-2.5 right-2.5 z-10"
|
|
158
|
+
}, React.createElement(LikeButton, null))), React.createElement(Splide, {
|
|
159
|
+
"aria-label": "Property Images",
|
|
160
|
+
options: {
|
|
161
|
+
type: 'slide',
|
|
162
|
+
drag: 'free',
|
|
163
|
+
perPage: 1,
|
|
164
|
+
perMove: 1,
|
|
165
|
+
lazyLoad: 'sequential',
|
|
166
|
+
wheel: true,
|
|
167
|
+
releaseWheel: true,
|
|
168
|
+
pagination: false,
|
|
169
|
+
speed: 800
|
|
170
|
+
}
|
|
171
|
+
}, images.map((image, i) => React.createElement(SplideSlide, {
|
|
172
|
+
key: 'sliderslide_' + i
|
|
173
|
+
}, React.createElement("a", {
|
|
174
|
+
href: "#",
|
|
175
|
+
onClick: handleRedirect,
|
|
176
|
+
rel: "noopener noreferrer"
|
|
177
|
+
}, React.createElement("div", {
|
|
178
|
+
className: "w-full h-full rounded-xl",
|
|
179
|
+
key: 'sliderImage_' + i
|
|
180
|
+
}, React.createElement("img", {
|
|
181
|
+
key: 'image_' + i,
|
|
182
|
+
src: image.src,
|
|
183
|
+
className: "rounded-xl h-[250px] w-full max-w-full object-cover cursor-pointer transition-all duration-500 hover:brightness-50",
|
|
184
|
+
loading: "lazy",
|
|
185
|
+
alt: `Property ${i + 1}`
|
|
186
|
+
}))))))), React.createElement("div", {
|
|
187
|
+
className: "flex flex-col flex-1 px-4 pt-4"
|
|
188
|
+
}, React.createElement("div", {
|
|
189
|
+
className: "flex flex-wrap items-center space-x-2 mb-3"
|
|
190
|
+
}, React.createElement("span", {
|
|
191
|
+
className: "text-sm font-medium text-foreground"
|
|
192
|
+
}, t('property.property_type'), ":"), types?.map((item, index) => React.createElement("span", {
|
|
193
|
+
key: index,
|
|
194
|
+
className: "bg-muted text-muted-foreground text-xs px-2 py-1 rounded-themed capitalize"
|
|
195
|
+
}, t(`property-types:${item.description}`)))), React.createElement("h3", {
|
|
196
|
+
className: "text-lg font-medium mb-3 line-clamp-2 text-foreground min-h-[3.5rem]"
|
|
197
|
+
}, item?.title), item?.address && item?.address.city && item?.address.city.state && React.createElement("div", {
|
|
198
|
+
className: "flex items-center text-sm text-muted-foreground mb-3"
|
|
199
|
+
}, React.createElement(LocationIcon, {
|
|
200
|
+
w: "16px",
|
|
201
|
+
h: "20px"
|
|
202
|
+
}), React.createElement("span", {
|
|
203
|
+
className: "truncate"
|
|
204
|
+
}, item?.address.city.name + ', ' + item?.address.city.state.name, item?.address?.number ? ' · ' + item?.address?.number : '')), displayedIcons.length > 0 && React.createElement("div", {
|
|
205
|
+
className: "flex space-x-3 mb-3"
|
|
206
|
+
}, displayedIcons), React.createElement("div", {
|
|
207
|
+
className: "flex flex-wrap space-x-2 mb-3"
|
|
208
|
+
}, item?.preferences?.property?.booking?.policy?.instantBookingEnabled && React.createElement("span", {
|
|
209
|
+
className: "bg-primary/10 text-primary px-2 py-1 rounded-themed text-xs capitalize"
|
|
210
|
+
}, t('property.instant_book')), item?.preferences?.property?.booking?.policy?.cancellation && React.createElement("span", {
|
|
211
|
+
className: "bg-success/10 text-success px-2 py-1 rounded-themed text-xs capitalize"
|
|
212
|
+
}, t('property.cancellation_policy'))), React.createElement("div", {
|
|
213
|
+
className: "flex items-center mb-4"
|
|
214
|
+
}, React.createElement(FaUserAlt, {
|
|
215
|
+
className: "text-muted-foreground"
|
|
216
|
+
}), React.createElement("span", {
|
|
217
|
+
className: "text-sm text-muted-foreground ml-2"
|
|
218
|
+
}, item?.preferences?.property?.boarding?.maxPeople, " ", t('property.guests')))), config.ENABLE_PROPERTY_PRICE_COMPARISON && React.createElement("div", {
|
|
219
|
+
className: "px-4 w-full"
|
|
220
|
+
}, React.createElement("div", {
|
|
221
|
+
className: "w-fit flex gap-4"
|
|
222
|
+
}, React.createElement("hr", {
|
|
223
|
+
className: "w-full border-t border-border"
|
|
224
|
+
}), React.createElement("div", {
|
|
225
|
+
className: "flex flex-row"
|
|
226
|
+
}, React.createElement(DealCard, {
|
|
227
|
+
site: "Vio.com",
|
|
228
|
+
price: 41387
|
|
229
|
+
}), React.createElement(DealCard, {
|
|
230
|
+
site: "Expedia.com",
|
|
231
|
+
price: 46369
|
|
232
|
+
}), React.createElement(DealCard, {
|
|
233
|
+
site: "More Deals",
|
|
234
|
+
price: 'View all'
|
|
235
|
+
})), React.createElement("hr", {
|
|
236
|
+
className: "w-full border-t border-border"
|
|
237
|
+
}))), React.createElement("div", {
|
|
238
|
+
className: "flex flex-col sm:flex-row px-4 pb-4 w-full justify-between items-start sm:items-center mt-auto"
|
|
239
|
+
}, React.createElement("div", {
|
|
240
|
+
className: "flex flex-col space-y-1 mb-3 sm:mb-0 w-full sm:w-auto"
|
|
241
|
+
}, React.createElement("div", {
|
|
242
|
+
className: "flex items-center"
|
|
243
|
+
}, React.createElement(BsStarFill, {
|
|
244
|
+
className: "text-warning w-3 h-3 mr-1"
|
|
245
|
+
}), React.createElement("span", {
|
|
246
|
+
className: "text-[0.832rem] font-bold text-muted-foreground"
|
|
247
|
+
}, item?.reviewsOverview ? item.reviewsOverview.rating : 0, " (", item.reviewsOverview ? item.reviewsOverview.ratingCount : 0, ' ', t('property.reviews'), ")")), item?.__typename && React.createElement("span", {
|
|
248
|
+
className: "text-[0.832rem] text-muted-foreground"
|
|
249
|
+
}, "Booking through ", startCase(item.__typename.replace('Property', '')))), React.createElement("div", {
|
|
250
|
+
className: "flex flex-col items-end space-y-2 w-full sm:w-auto"
|
|
251
|
+
}, React.createElement("div", {
|
|
252
|
+
className: "flex flex-col items-end space-y-1 w-full"
|
|
253
|
+
}, React.createElement("span", {
|
|
254
|
+
className: "text-[0.688rem] text-muted-foreground text-right w-full"
|
|
255
|
+
}, formattedDuration, ", ", adults + children, ' ', adults + children === 1 ? 'guest' : 'guests'), React.createElement("div", {
|
|
256
|
+
className: "flex flex-col items-end space-y-0 w-full"
|
|
257
|
+
}, item.preferences?.property?.pricing?.price?.price_breakdown?.details?.summary?.total !== item.preferences?.property?.pricing?.price?.price_breakdown?.details?.summary?.totalBeforeDiscount && React.createElement("div", {
|
|
258
|
+
className: "flex items-center group relative"
|
|
259
|
+
}, React.createElement("span", {
|
|
260
|
+
className: "text-xs text-muted-foreground"
|
|
261
|
+
}, "from"), React.createElement("span", {
|
|
262
|
+
className: "text-sm font-semibold text-muted-foreground line-through ml-1 cursor-help hover:text-foreground group-hover:text-foreground"
|
|
263
|
+
}, item.preferences?.property?.pricing?.price?.price_breakdown?.details?.summary?.totalBeforeDiscount), React.createElement("div", {
|
|
264
|
+
className: "hidden group-hover:block absolute top-0 right-0 transform -translate-y-full mt-2 w-[300px] shadow-themed-lg bg-card rounded-themed p-4 z-50"
|
|
265
|
+
}, React.createElement("div", {
|
|
266
|
+
className: "flex flex-col space-y-2"
|
|
267
|
+
}, item.preferences?.property?.pricing?.price?.price_breakdown?.details?.discounts?.items.map((charge, index) => React.createElement("div", {
|
|
268
|
+
key: index,
|
|
269
|
+
className: "flex flex-col"
|
|
270
|
+
}, React.createElement("div", {
|
|
271
|
+
className: "flex justify-between"
|
|
272
|
+
}, React.createElement("span", {
|
|
273
|
+
className: "mr-4 text-foreground"
|
|
274
|
+
}, charge.name), React.createElement("span", {
|
|
275
|
+
className: "font-medium text-foreground"
|
|
276
|
+
}, charge?.amount_rounded)), charge.details && React.createElement("span", {
|
|
277
|
+
className: "text-sm font-normal text-muted-foreground"
|
|
278
|
+
}, charge?.details))), React.createElement("div", {
|
|
279
|
+
className: "flex justify-between pt-2 border-t border-border font-bold"
|
|
280
|
+
}, React.createElement("span", {
|
|
281
|
+
className: "text-foreground"
|
|
282
|
+
}, "Total discount"), React.createElement("span", {
|
|
283
|
+
className: "text-foreground"
|
|
284
|
+
}, item.preferences?.property?.pricing?.price?.price_breakdown?.details?.summary?.savings))))), React.createElement("div", {
|
|
285
|
+
className: "relative group"
|
|
286
|
+
}, React.createElement("span", {
|
|
287
|
+
className: "text-2xl font-semibold text-right underline cursor-help text-foreground"
|
|
288
|
+
}, item.preferences?.property?.pricing?.price?.price_breakdown?.details?.summary?.total), React.createElement("div", {
|
|
289
|
+
className: "hidden group-hover:block absolute top-0 right-0 transform -translate-y-full mt-2 w-[300px] shadow-themed-lg bg-card rounded-themed z-50"
|
|
290
|
+
}, React.createElement("div", {
|
|
291
|
+
className: "font-bold border-b border-border p-3 text-center text-foreground"
|
|
292
|
+
}, "Price breakdown"), React.createElement("div", {
|
|
293
|
+
className: "p-4"
|
|
294
|
+
}, React.createElement("div", {
|
|
295
|
+
className: "flex flex-col space-y-2"
|
|
296
|
+
}, item.preferences?.property?.pricing?.price?.price_breakdown?.details?.charges?.items?.map((item, index) => React.createElement("div", {
|
|
297
|
+
key: index,
|
|
298
|
+
className: "flex justify-between"
|
|
299
|
+
}, React.createElement("span", {
|
|
300
|
+
className: "text-foreground"
|
|
301
|
+
}, item.name), React.createElement("span", {
|
|
302
|
+
className: "text-foreground"
|
|
303
|
+
}, item?.amount_rounded)))))))), React.createElement("span", {
|
|
304
|
+
className: "text-xs text-muted-foreground text-right w-full"
|
|
305
|
+
}, item?.preferences?.property?.pricing?.price?.price_breakdown?.details?.pricing?.basePrice?.perNight, ' ', "per ", getPriceType(item))), React.createElement("button", {
|
|
306
|
+
className: `themed-button p-2 w-full ${isRedirecting ? 'opacity-75 cursor-wait' : ''}`,
|
|
307
|
+
onClick: handleRedirect,
|
|
308
|
+
disabled: isRedirecting
|
|
309
|
+
}, isRedirecting ? 'Loading...' : 'View deal')))))));
|
|
376
310
|
};export{PropertyCard};//# sourceMappingURL=PropertyCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyCard.js","sources":["../../src/components/PropertyCard.tsx"],"sourcesContent":[null],"names":[
|
|
1
|
+
{"version":3,"file":"PropertyCard.js","sources":["../../src/components/PropertyCard.tsx"],"sourcesContent":[null],"names":[],"mappings":"kzBAyCS,MAAA,QAAA,GAAQ,CAAA;AACR,EAAA,IAAA;AACA,EAAA;AACT,CAAC,KAAC,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAEF,EAAA,SAAM,EAAA;AAEE,CAAA,EAAA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA;WACA,EAAA;AAMR,CAAA,EAAA,IAAA,CAAA,EAAS,KAAA,CAAA,aAAkB,CAAA,MAAiB,EAAA;AACxC,EAAA;AACA,CAAA,EAAA,OAAM,kBAAe,QAAS,CAAA,cAAU,EAAA,GAAA,KAAA,CAAA,CAAA;AACxC,SAAA,iBAAsB,CAAA,OAAM,EAAA,QAAY,EAAC;AACzC,EAAA,MAAA,WAAe,GAAC,IAAA,IAAA,CAAA,OAAA,CAAA;AACpB,EAAC,MAAA,YAAA,GAAA,IAAA,IAAA,CAAA,QAAA,CAAA;AAED,EAAA,MAAA,QAAS,GAAA,IAAc,CAAC,IAAY,CAAA,CAAA,YAAA,CAAA,OAAA,EAAA,GAAA,WAAA,CAAA,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AA,EAAA;AAIC,IAAA,SAAA,EAAA;AACA,GAAA,EAAA,CAAA,CAAA,uBAAA,CAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,QAAA,EAAA,OAAA,EAAA,MAAA,EAAA,YAAe,IAAC,KAAA,CAAA,oBACL,EAAA;;qCAcnC,CAAA,CAAA,CAAI,EAAE,KAAA,CAAA,aAAa,CAAA,KAAU,EAAA;AACzB,IAAA,SAAA,EAAA;oCACN;;AACG,GAAA,CAAA,EAAA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAKb,IAAA,SAAA,EAAA;AAgBhC,GAAE,EAAA,IAAA,EAAA,WAAA,EAAA,QAAA,EAAA,QAAA,EAAA,SAAA,EAAA,GAAA,EAAA,CAAA,CAAA,iBAAA,CAAA,CAAA,CAAA,CAAA,EAAA,MAAA,CAAA,gCAAA,IAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
type PropertyCardOnMapProps = {
|
|
2
3
|
room: any;
|
|
3
4
|
isSaved: boolean;
|
|
4
5
|
carouselOptions?: any;
|
|
5
6
|
className?: string;
|
|
6
7
|
};
|
|
7
|
-
export declare const PropertyCardOnMap: ({ room, isSaved, carouselOptions, className, ...props }: PropertyCardOnMapProps) =>
|
|
8
|
+
export declare const PropertyCardOnMap: ({ room, isSaved, carouselOptions, className, ...props }: PropertyCardOnMapProps) => React.JSX.Element;
|
|
8
9
|
export {};
|
|
9
10
|
//# sourceMappingURL=PropertyCardOnMap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyCardOnMap.d.ts","sourceRoot":"","sources":["../../src/components/PropertyCardOnMap.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PropertyCardOnMap.d.ts","sourceRoot":"","sources":["../../src/components/PropertyCardOnMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAkB5D,KAAK,sBAAsB,GAAG;IAC1B,IAAI,EAAE,GAAG,CAAC;IACV,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,yDAM/B,sBAAsB,sBAiHxB,CAAC"}
|