@admin-layout/tailwind-design-pro 11.0.4-alpha.4 → 12.0.16-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.
Files changed (316) hide show
  1. package/README.md +401 -1
  2. package/lib/cdm-locales/en/settings.json +40 -1
  3. package/lib/cdm-locales/es/settings.json +42 -3
  4. package/lib/components/LanguageMenu/LanguageMenu.d.ts.map +1 -1
  5. package/lib/components/LanguageMenu/LanguageMenu.js +8 -18
  6. package/lib/components/LanguageMenu/LanguageMenu.js.map +1 -1
  7. package/lib/components/Layout/BasicLayout/index.d.ts +1 -8
  8. package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
  9. package/lib/components/Layout/BasicLayout/index.js +140 -64
  10. package/lib/components/Layout/BasicLayout/index.js.map +1 -1
  11. package/lib/components/Layout/BasicLayout/utils.d.ts.map +1 -1
  12. package/lib/components/Layout/BasicLayout/utils.js +1 -14
  13. package/lib/components/Layout/BasicLayout/utils.js.map +1 -1
  14. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.d.ts +1 -8
  15. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.d.ts.map +1 -1
  16. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js.map +1 -1
  17. package/lib/components/Layout/GlobalFooter/Copyright.d.ts.map +1 -1
  18. package/lib/components/Layout/GlobalFooter/Footer.d.ts.map +1 -1
  19. package/lib/components/Layout/GlobalHeader/Header.d.ts +1 -14
  20. package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -1
  21. package/lib/components/Layout/GlobalHeader/Header.js +78 -53
  22. package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
  23. package/lib/components/Layout/GlobalHeader/Logo.d.ts +4 -0
  24. package/lib/components/Layout/GlobalHeader/Logo.d.ts.map +1 -0
  25. package/lib/components/Layout/GlobalHeader/Logo.js +141 -0
  26. package/lib/components/Layout/GlobalHeader/Logo.js.map +1 -0
  27. package/lib/components/Layout/GlobalHeader/MainHeader.d.ts +6 -0
  28. package/lib/components/Layout/GlobalHeader/MainHeader.d.ts.map +1 -0
  29. package/lib/components/Layout/GlobalHeader/MainHeader.js +228 -0
  30. package/lib/components/Layout/GlobalHeader/MainHeader.js.map +1 -0
  31. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.d.ts +1 -12
  32. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.d.ts.map +1 -1
  33. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js +4 -4
  34. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js.map +1 -1
  35. package/lib/components/Layout/GlobalHeader/RightContent.d.ts +2 -16
  36. package/lib/components/Layout/GlobalHeader/RightContent.d.ts.map +1 -1
  37. package/lib/components/Layout/GlobalHeader/RightContent.js +23 -0
  38. package/lib/components/Layout/GlobalHeader/RightContent.js.map +1 -0
  39. package/lib/components/Layout/GlobalHeader/RightMenu.d.ts +4 -0
  40. package/lib/components/Layout/GlobalHeader/RightMenu.d.ts.map +1 -0
  41. package/lib/components/Layout/GlobalHeader/RightMenu.js +274 -0
  42. package/lib/components/Layout/GlobalHeader/RightMenu.js.map +1 -0
  43. package/lib/components/Layout/GlobalHeader/SearchBar.d.ts +9 -0
  44. package/lib/components/Layout/GlobalHeader/SearchBar.d.ts.map +1 -0
  45. package/lib/components/Layout/GlobalHeader/SearchBar.js +118 -0
  46. package/lib/components/Layout/GlobalHeader/SearchBar.js.map +1 -0
  47. package/lib/components/Layout/GlobalHeader/index.d.ts +4 -0
  48. package/lib/components/Layout/GlobalHeader/index.d.ts.map +1 -0
  49. package/lib/components/Layout/ProTailwindLayout.d.ts +2 -0
  50. package/lib/components/Layout/ProTailwindLayout.d.ts.map +1 -1
  51. package/lib/components/Layout/ProTailwindLayout.js +7 -3
  52. package/lib/components/Layout/ProTailwindLayout.js.map +1 -1
  53. package/lib/components/Layout/Sidebar/Divider.d.ts +1 -31
  54. package/lib/components/Layout/Sidebar/Divider.d.ts.map +1 -1
  55. package/lib/components/Layout/Sidebar/Divider.js.map +1 -1
  56. package/lib/components/Layout/Sidebar/DynamicIcon.d.ts +5 -0
  57. package/lib/components/Layout/Sidebar/DynamicIcon.d.ts.map +1 -0
  58. package/lib/components/Layout/Sidebar/DynamicIcon.js +51 -0
  59. package/lib/components/Layout/Sidebar/DynamicIcon.js.map +1 -0
  60. package/lib/components/Layout/Sidebar/Sidebar.d.ts +1 -11
  61. package/lib/components/Layout/Sidebar/Sidebar.d.ts.map +1 -1
  62. package/lib/components/Layout/Sidebar/Sidebar.js +117 -78
  63. package/lib/components/Layout/Sidebar/Sidebar.js.map +1 -1
  64. package/lib/components/Layout/Sidebar/SidebarMenu.d.ts +3 -5
  65. package/lib/components/Layout/Sidebar/SidebarMenu.d.ts.map +1 -1
  66. package/lib/components/Layout/Sidebar/SidebarMenu.js +132 -45
  67. package/lib/components/Layout/Sidebar/SidebarMenu.js.map +1 -1
  68. package/lib/components/Layout/TailwindLayout.d.ts.map +1 -1
  69. package/lib/components/Layout/TailwindLayout.js +34 -14
  70. package/lib/components/Layout/TailwindLayout.js.map +1 -1
  71. package/lib/components/Layout/getPageTitle.d.ts +1 -16
  72. package/lib/components/Layout/getPageTitle.d.ts.map +1 -1
  73. package/lib/components/Layout/getPageTitle.js +1 -1
  74. package/lib/components/Layout/getPageTitle.js.map +1 -1
  75. package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts +4 -0
  76. package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts.map +1 -0
  77. package/lib/components/Layout/slot-fill/AdditionalSettings.js +7 -0
  78. package/lib/components/Layout/slot-fill/AdditionalSettings.js.map +1 -0
  79. package/lib/components/Layout/slot-fill/Footer.d.ts +1 -1
  80. package/lib/components/Layout/slot-fill/Footer.d.ts.map +1 -1
  81. package/lib/components/Layout/slot-fill/Footer.js +6 -6
  82. package/lib/components/Layout/slot-fill/Footer.js.map +1 -1
  83. package/lib/components/Layout/slot-fill/HeaderNotice.d.ts.map +1 -1
  84. package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts +3 -0
  85. package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts.map +1 -0
  86. package/lib/components/Layout/slot-fill/HeaderSearchBar.js +6 -0
  87. package/lib/components/Layout/slot-fill/HeaderSearchBar.js.map +1 -0
  88. package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts +3 -0
  89. package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts.map +1 -0
  90. package/lib/components/Layout/slot-fill/HeaderSearchButton.js +6 -0
  91. package/lib/components/Layout/slot-fill/HeaderSearchButton.js.map +1 -0
  92. package/lib/components/Layout/slot-fill/RightContent.d.ts +3 -0
  93. package/lib/components/Layout/slot-fill/RightContent.d.ts.map +1 -0
  94. package/lib/components/Layout/slot-fill/RightContent.js +6 -0
  95. package/lib/components/Layout/slot-fill/RightContent.js.map +1 -0
  96. package/lib/components/Layout/slot-fill/index.d.ts +4 -0
  97. package/lib/components/Layout/slot-fill/index.d.ts.map +1 -1
  98. package/lib/components/Layout/util.d.ts.map +1 -1
  99. package/lib/components/Layout/util.js +12 -0
  100. package/lib/components/Layout/util.js.map +1 -0
  101. package/lib/components/SettingDrawer/CheckBoxTheme.d.ts +1 -6
  102. package/lib/components/SettingDrawer/CheckBoxTheme.d.ts.map +1 -1
  103. package/lib/components/SettingDrawer/CheckBoxTheme.js +106 -31
  104. package/lib/components/SettingDrawer/CheckBoxTheme.js.map +1 -1
  105. package/lib/components/SettingDrawer/InvitationSettings.d.ts +3 -0
  106. package/lib/components/SettingDrawer/InvitationSettings.d.ts.map +1 -0
  107. package/lib/components/SettingDrawer/InvitationSettings.js +79 -0
  108. package/lib/components/SettingDrawer/InvitationSettings.js.map +1 -0
  109. package/lib/components/SettingDrawer/LayoutChange.d.ts +2 -6
  110. package/lib/components/SettingDrawer/LayoutChange.d.ts.map +1 -1
  111. package/lib/components/SettingDrawer/LayoutChange.js +84 -30
  112. package/lib/components/SettingDrawer/LayoutChange.js.map +1 -1
  113. package/lib/components/SettingDrawer/NavigationsModes.d.ts +3 -0
  114. package/lib/components/SettingDrawer/NavigationsModes.d.ts.map +1 -0
  115. package/lib/components/SettingDrawer/NavigationsModes.js +289 -0
  116. package/lib/components/SettingDrawer/NavigationsModes.js.map +1 -0
  117. package/lib/components/SettingDrawer/RegionalSettings.d.ts +1 -6
  118. package/lib/components/SettingDrawer/RegionalSettings.d.ts.map +1 -1
  119. package/lib/components/SettingDrawer/RegionalSettings.js +696 -51
  120. package/lib/components/SettingDrawer/RegionalSettings.js.map +1 -1
  121. package/lib/components/SettingDrawer/SettingDrawer.d.ts +2 -25
  122. package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
  123. package/lib/components/SettingDrawer/SettingDrawer.js +249 -113
  124. package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
  125. package/lib/components/SettingDrawer/Switch/index.d.ts +2 -8
  126. package/lib/components/SettingDrawer/Switch/index.d.ts.map +1 -1
  127. package/lib/components/SettingDrawer/Switch/index.js +17 -34
  128. package/lib/components/SettingDrawer/Switch/index.js.map +1 -1
  129. package/lib/components/SettingDrawer/ThemeColor.d.ts +1 -6
  130. package/lib/components/SettingDrawer/ThemeColor.d.ts.map +1 -1
  131. package/lib/components/SettingDrawer/ThemeColor.js +3 -0
  132. package/lib/components/SettingDrawer/ThemeColor.js.map +1 -1
  133. package/lib/components/SettingDrawer/ThemeSelector.d.ts +3 -0
  134. package/lib/components/SettingDrawer/ThemeSelector.d.ts.map +1 -0
  135. package/lib/components/SettingDrawer/ThemeSelector.js +18 -0
  136. package/lib/components/SettingDrawer/ThemeSelector.js.map +1 -0
  137. package/lib/components/SettingDrawer/WebFontsSelector.d.ts +3 -0
  138. package/lib/components/SettingDrawer/WebFontsSelector.d.ts.map +1 -0
  139. package/lib/components/SettingDrawer/WebFontsSelector.js +24 -0
  140. package/lib/components/SettingDrawer/WebFontsSelector.js.map +1 -0
  141. package/lib/components/SettingDrawer/types.d.ts +91 -0
  142. package/lib/components/SettingDrawer/types.d.ts.map +1 -0
  143. package/lib/components/UI/CardList.d.ts +61 -0
  144. package/lib/components/UI/CardList.d.ts.map +1 -0
  145. package/lib/components/UI/CardList.js +43 -0
  146. package/lib/components/UI/CardList.js.map +1 -0
  147. package/lib/components/UI/CategoriesTypeList.d.ts +29 -0
  148. package/lib/components/UI/CategoriesTypeList.d.ts.map +1 -0
  149. package/lib/components/UI/CategoriesTypeList.js +140 -0
  150. package/lib/components/UI/CategoriesTypeList.js.map +1 -0
  151. package/lib/components/UI/LazyLoadingGoogleMarker.d.ts +83 -0
  152. package/lib/components/UI/LazyLoadingGoogleMarker.d.ts.map +1 -0
  153. package/lib/components/UI/LazyLoadingGoogleMarker.js +107 -0
  154. package/lib/components/UI/LazyLoadingGoogleMarker.js.map +1 -0
  155. package/lib/components/UI/Pagination.d.ts +6 -0
  156. package/lib/components/UI/Pagination.d.ts.map +1 -0
  157. package/lib/components/UI/Pagination.js +59 -0
  158. package/lib/components/UI/Pagination.js.map +1 -0
  159. package/lib/components/UI/ParamSearchResultContainer.d.ts +99 -0
  160. package/lib/components/UI/ParamSearchResultContainer.d.ts.map +1 -0
  161. package/lib/components/UI/ParamSearchResultContainer.js +120 -0
  162. package/lib/components/UI/ParamSearchResultContainer.js.map +1 -0
  163. package/lib/components/UI/PropertyCard.d.ts +24 -0
  164. package/lib/components/UI/PropertyCard.d.ts.map +1 -0
  165. package/lib/components/UI/PropertyCard.js +417 -0
  166. package/lib/components/UI/PropertyCard.js.map +1 -0
  167. package/lib/components/UI/PropertyCardOnMap.d.ts +10 -0
  168. package/lib/components/UI/PropertyCardOnMap.d.ts.map +1 -0
  169. package/lib/components/UI/PropertyCardOnMap.js +108 -0
  170. package/lib/components/UI/PropertyCardOnMap.js.map +1 -0
  171. package/lib/components/UI/VehicleCard/PricePopover.d.ts +8 -0
  172. package/lib/components/UI/VehicleCard/PricePopover.d.ts.map +1 -0
  173. package/lib/components/UI/VehicleCard/PricePopover.js +98 -0
  174. package/lib/components/UI/VehicleCard/PricePopover.js.map +1 -0
  175. package/lib/components/UI/VehicleCard/VehicleBadge.d.ts +7 -0
  176. package/lib/components/UI/VehicleCard/VehicleBadge.d.ts.map +1 -0
  177. package/lib/components/UI/VehicleCard/VehicleFeature.d.ts +9 -0
  178. package/lib/components/UI/VehicleCard/VehicleFeature.d.ts.map +1 -0
  179. package/lib/components/UI/VehicleCard/VehicleFeature.js +23 -0
  180. package/lib/components/UI/VehicleCard/VehicleFeature.js.map +1 -0
  181. package/lib/components/UI/VehicleCard/types.d.ts +59 -0
  182. package/lib/components/UI/VehicleCard/types.d.ts.map +1 -0
  183. package/lib/components/UI/VehicleCard.d.ts +15 -0
  184. package/lib/components/UI/VehicleCard.d.ts.map +1 -0
  185. package/lib/components/UI/VehicleCard.js +166 -0
  186. package/lib/components/UI/VehicleCard.js.map +1 -0
  187. package/lib/components/UI/VehicleCardList.d.ts +14 -0
  188. package/lib/components/UI/VehicleCardList.d.ts.map +1 -0
  189. package/lib/components/UI/VehicleCardList.js +38 -0
  190. package/lib/components/UI/VehicleCardList.js.map +1 -0
  191. package/lib/components/UI/VehicleParamSearchResultContainer.d.ts +90 -0
  192. package/lib/components/UI/VehicleParamSearchResultContainer.d.ts.map +1 -0
  193. package/lib/components/UI/icons/LocationIcon.d.ts +7 -0
  194. package/lib/components/UI/icons/LocationIcon.d.ts.map +1 -0
  195. package/lib/components/UI/icons/LocationIcon.js +18 -0
  196. package/lib/components/UI/icons/LocationIcon.js.map +1 -0
  197. package/lib/components/UI/icons/index.d.ts +2 -0
  198. package/lib/components/UI/icons/index.d.ts.map +1 -0
  199. package/lib/components/UI/index.d.ts +10 -0
  200. package/lib/components/UI/index.d.ts.map +1 -0
  201. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +11 -1
  202. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts.map +1 -1
  203. package/lib/components/index.d.ts +3 -0
  204. package/lib/components/index.d.ts.map +1 -0
  205. package/lib/components/index.js +1 -0
  206. package/lib/components/index.js.map +1 -0
  207. package/lib/components/typings.d.ts +139 -49
  208. package/lib/components/typings.d.ts.map +1 -1
  209. package/lib/components/typings.js +6 -0
  210. package/lib/components/typings.js.map +1 -0
  211. package/lib/compute.d.ts.map +1 -1
  212. package/lib/compute.js +6 -4
  213. package/lib/compute.js.map +1 -1
  214. package/lib/config/analytics-config.d.ts +59 -0
  215. package/lib/config/analytics-config.d.ts.map +1 -0
  216. package/lib/config/constants.d.ts +8 -0
  217. package/lib/config/constants.d.ts.map +1 -0
  218. package/lib/config/constants.js +32 -0
  219. package/lib/config/constants.js.map +1 -0
  220. package/lib/config/env-config.d.ts +18 -0
  221. package/lib/config/env-config.d.ts.map +1 -1
  222. package/lib/config/env-config.js +76 -1
  223. package/lib/config/env-config.js.map +1 -1
  224. package/lib/config/index.d.ts +3 -0
  225. package/lib/config/index.d.ts.map +1 -0
  226. package/lib/helpers/DynamicIcon.d.ts +7 -4
  227. package/lib/helpers/DynamicIcon.d.ts.map +1 -1
  228. package/lib/helpers/DynamicIcon.js +51 -0
  229. package/lib/helpers/DynamicIcon.js.map +1 -0
  230. package/lib/hooks/index.d.ts +6 -0
  231. package/lib/hooks/index.d.ts.map +1 -0
  232. package/lib/hooks/use-get-current-lat-long.d.ts +18 -0
  233. package/lib/hooks/use-get-current-lat-long.d.ts.map +1 -0
  234. package/lib/hooks/use-get-current-lat-long.js +29 -0
  235. package/lib/hooks/use-get-current-lat-long.js.map +1 -0
  236. package/lib/hooks/useMediaQuery.d.ts +14 -0
  237. package/lib/hooks/useMediaQuery.d.ts.map +1 -0
  238. package/lib/hooks/useMediaQuery.js +48 -0
  239. package/lib/hooks/useMediaQuery.js.map +1 -0
  240. package/lib/hooks/useScrollThreshold.d.ts +12 -0
  241. package/lib/hooks/useScrollThreshold.d.ts.map +1 -0
  242. package/lib/hooks/useScrollThreshold.js +60 -0
  243. package/lib/hooks/useScrollThreshold.js.map +1 -0
  244. package/lib/hooks/useTailwindTheme.d.ts +34 -0
  245. package/lib/hooks/useTailwindTheme.d.ts.map +1 -0
  246. package/lib/hooks/useTailwindTheme.js +82 -0
  247. package/lib/hooks/useTailwindTheme.js.map +1 -0
  248. package/lib/hooks/useWindowSize.d.ts +6 -0
  249. package/lib/hooks/useWindowSize.d.ts.map +1 -0
  250. package/lib/hooks/useWindowSize.js +20 -0
  251. package/lib/hooks/useWindowSize.js.map +1 -0
  252. package/lib/icons.d.ts +16 -0
  253. package/lib/icons.d.ts.map +1 -0
  254. package/lib/icons.js +12 -0
  255. package/lib/icons.js.map +1 -0
  256. package/lib/index.d.ts +2 -3
  257. package/lib/index.d.ts.map +1 -1
  258. package/lib/index.js +1 -1
  259. package/lib/index.js.map +1 -1
  260. package/lib/machines/settingsMachine.d.ts +6 -0
  261. package/lib/machines/settingsMachine.d.ts.map +1 -0
  262. package/lib/machines/settingsMachine.js +206 -0
  263. package/lib/machines/settingsMachine.js.map +1 -0
  264. package/lib/machines/types.d.ts +174 -0
  265. package/lib/machines/types.d.ts.map +1 -0
  266. package/lib/machines/types.js +5 -0
  267. package/lib/machines/types.js.map +1 -0
  268. package/lib/middlewares/airbnbDatasourcesMiddleware.d.ts +6 -0
  269. package/lib/middlewares/airbnbDatasourcesMiddleware.d.ts.map +1 -0
  270. package/lib/middlewares/bookingCarRentalMiddleware.d.ts +6 -0
  271. package/lib/middlewares/bookingCarRentalMiddleware.d.ts.map +1 -0
  272. package/lib/middlewares/bookingDatasourcesMiddleware.d.ts +7 -0
  273. package/lib/middlewares/bookingDatasourcesMiddleware.d.ts.map +1 -0
  274. package/lib/middlewares/datasourcesMiddleware.d.ts +6 -0
  275. package/lib/middlewares/datasourcesMiddleware.d.ts.map +1 -0
  276. package/lib/middlewares/pricelineDatasourcesMiddleware.d.ts +7 -0
  277. package/lib/middlewares/pricelineDatasourcesMiddleware.d.ts.map +1 -0
  278. package/lib/module.d.ts +0 -1
  279. package/lib/module.d.ts.map +1 -1
  280. package/lib/module.js +14 -15
  281. package/lib/module.js.map +1 -1
  282. package/lib/redux/index.d.ts +2 -0
  283. package/lib/redux/index.d.ts.map +1 -0
  284. package/lib/redux/searchReducer.d.ts +42 -0
  285. package/lib/redux/searchReducer.d.ts.map +1 -0
  286. package/lib/redux/searchReducer.js +64 -0
  287. package/lib/redux/searchReducer.js.map +1 -0
  288. package/lib/routes.json +1 -0
  289. package/lib/styles/index-bk.css +443 -0
  290. package/lib/styles/index.css +667 -45
  291. package/lib/tailwindConfig.d.ts +100 -0
  292. package/lib/tailwindConfig.d.ts.map +1 -0
  293. package/lib/tailwindConfig.js +101 -0
  294. package/lib/tailwindConfig.js.map +1 -0
  295. package/lib/utils/analytics-utils.d.ts +43 -0
  296. package/lib/utils/analytics-utils.d.ts.map +1 -0
  297. package/lib/utils/analytics.d.ts +48 -0
  298. package/lib/utils/analytics.d.ts.map +1 -0
  299. package/lib/utils/formateCarData.d.ts +2 -0
  300. package/lib/utils/formateCarData.d.ts.map +1 -0
  301. package/lib/utils/menu.d.ts.map +1 -1
  302. package/lib/utils/test-utils.d.ts.map +1 -1
  303. package/lib/utils/utils/index.d.ts.map +1 -1
  304. package/package.json +7 -5
  305. package/lib/components/Layout/GlobalFooter/Copyright.js +0 -8
  306. package/lib/components/Layout/GlobalFooter/Copyright.js.map +0 -1
  307. package/lib/components/Layout/GlobalFooter/Footer.js +0 -22
  308. package/lib/components/Layout/GlobalFooter/Footer.js.map +0 -1
  309. package/lib/components/defaultSettings.d.ts +0 -4
  310. package/lib/components/defaultSettings.d.ts.map +0 -1
  311. package/lib/components/defaultSettings.js +0 -14
  312. package/lib/components/defaultSettings.js.map +0 -1
  313. package/lib/utils/index.d.ts +0 -2
  314. package/lib/utils/index.d.ts.map +0 -1
  315. package/lib/utils/index.js +0 -13
  316. package/lib/utils/index.js.map +0 -1
@@ -0,0 +1,417 @@
1
+ import {jsx,Fragment,jsxs}from'react/jsx-runtime';import {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 {WithAuthentication}from'@adminide-stack/user-auth0-browser/lib/index.component.js';import {Splide,SplideSlide}from'@cdmbase/react-splide';import {useLocation}from'@remix-run/react';import {startCase}from'lodash-es';import {useTailwindTheme}from'../../hooks/useTailwindTheme.js';import {useGetCurrentLongLat}from'../../hooks/use-get-current-lat-long.js';import {LocationIcon}from'./icons/LocationIcon.js';import {renderDynamicIcon}from'../../helpers/DynamicIcon.js';import {config}from'../../config/env-config.js';// const generateHref = async (room, from, to, adults, children) => {
2
+ // if (!room) return null;
3
+ // switch (room.__typename) {
4
+ // case 'AirbnbProperty':
5
+ // // Airbnb doesn't need API call, just construct URL directly
6
+ // return `/deep-link/property/${room.id}?redirectUrl=${encodeURIComponent(
7
+ // `https://www.airbnb.com/rooms/${room.id}?check_in=${from}&check_out=${to}&guests=${
8
+ // adults + children || 1
9
+ // }`,
10
+ // )}&partnerName=${encodeURIComponent('Airbnb.com')}&partnerLogo=${airbnbLogo}`;
11
+ // case 'BookingProperty':
12
+ // // Call Booking.com API
13
+ // try {
14
+ // const hotelDetails = await fetchBookingHotelDetails(room.id, from, to, adults, children);
15
+ // console.log('hotelDetails--->', hotelDetails);
16
+ // if (hotelDetails && hotelDetails?.data?.url) {
17
+ // return `/deep-link/property/${room.id}?redirectUrl=${encodeURIComponent(
18
+ // hotelDetails?.data?.url,
19
+ // )}&partnerName=${encodeURIComponent('Booking.com')}&partnerLogo=${bookingLogo}`;
20
+ // }
21
+ // } catch (error) {
22
+ // console.error('Error getting Booking.com URL:', error);
23
+ // }
24
+ // return null;
25
+ // case 'PricelineProperty':
26
+ // // Call Priceline API
27
+ // try {
28
+ // const pricelineDetails = await fetchPricelineHotelDetails(room.id);
29
+ // console.log('pricelineDetails--->', pricelineDetails);
30
+ // if (pricelineDetails && pricelineDetails.getHotelHotelDetails) {
31
+ // const hotelInfo = pricelineDetails.getHotelHotelDetails?.results?.hotel_data?.hotel_0;
32
+ // if (hotelInfo && hotelInfo.priceline_url) {
33
+ // return `/deep-link/property/${room.id}?redirectUrl=${encodeURIComponent(
34
+ // hotelInfo.priceline_url,
35
+ // )}&partnerName=${encodeURIComponent('Priceline.com')}&partnerLogo=${pricelineLogo}`;
36
+ // }
37
+ // }
38
+ // } catch (error) {
39
+ // console.error('Error getting Priceline URL:', error);
40
+ // }
41
+ // // If API call fails, construct a fallback URL
42
+ // const propertyId = room.metadata?.id_t;
43
+ // const cityId = room?.metadata?.city?.id || '';
44
+ // const checkInDate = typeof from === 'string' ? from : format(new Date(from), 'yyyyMMdd');
45
+ // const checkOutDate = typeof to === 'string' ? to : format(new Date(to), 'yyyyMMdd');
46
+ // const roomCount = 1;
47
+ // const adultCount = adults || 1;
48
+ // return `/deep-link/property/${room.id}?redirectUrl=${encodeURIComponent(
49
+ // `https://www.priceline.com/relax/at/${propertyId}/from/${checkInDate}/to/${checkOutDate}/rooms/${roomCount}/adults/${adultCount}?cityId=${cityId}&cur=USD&psl=${propertyId}`,
50
+ // )}&partnerName=${encodeURIComponent('Priceline.com')}&partnerLogo=${pricelineLogo}`;
51
+ // default:
52
+ // return `/property/${room.id}`;
53
+ // }
54
+ // };
55
+ const DealCard = ({
56
+ site,
57
+ price
58
+ }) => jsxs("div", {
59
+ className: "flex flex-col items-center p-2 rounded-md",
60
+ children: [jsx("span", {
61
+ className: "text-xs font-bold text-gray-700",
62
+ children: site
63
+ }), jsx("span", {
64
+ className: "text-base font-bold text-black",
65
+ children: typeof price === 'number' ? price.toLocaleString() : price
66
+ })]
67
+ });
68
+ function calculateDuration(checkIn, checkOut) {
69
+ const checkInDate = new Date(checkIn);
70
+ const checkOutDate = new Date(checkOut);
71
+ const duration = Math.ceil((checkOutDate.getTime() - checkInDate.getTime()) / (1000 * 60 * 60 * 24));
72
+ return duration;
73
+ }
74
+ function formatDuration(days) {
75
+ if (days < 7) {
76
+ return `${days} ${days === 1 ? 'day' : 'days'}`;
77
+ } else {
78
+ const weeks = Math.floor(days / 7);
79
+ const remainingDays = days % 7;
80
+ let result = `${weeks} ${weeks === 1 ? 'week' : 'weeks'}`;
81
+ if (remainingDays > 0) {
82
+ result += `, ${remainingDays} ${remainingDays === 1 ? 'day' : 'days'}`;
83
+ }
84
+ return result;
85
+ }
86
+ }
87
+ const PropertyCard = ({
88
+ item,
89
+ isSaved,
90
+ setFocus,
91
+ setBlur,
92
+ handleLike,
93
+ likeBtnLoading,
94
+ categoryTypes,
95
+ authenticated,
96
+ extraIcons = [],
97
+ ...props
98
+ }) => {
99
+ const images = useMemo(() => item?.images?.data.map(({
100
+ url
101
+ }) => ({
102
+ src: url
103
+ })), [item]);
104
+ const [didLike, setDidLike] = useState(false);
105
+ useMemo(() => item?.totalReview == 0 ? 0 : item?.totalStar / item?.totalReview || 0, [item]);
106
+ const {
107
+ isDark,
108
+ grayColor
109
+ } = useTailwindTheme();
110
+ const {
111
+ t
112
+ } = useTranslation(['common', 'property-types']);
113
+ const types = useMemo(() => categoryTypes?.filter(type => item?.types?.includes(type.id)), [item, categoryTypes]);
114
+ const {
115
+ fetchCurrentLatLong,
116
+ location} = useGetCurrentLongLat();
117
+ const locationUrl = useLocation();
118
+ const params = new URLSearchParams(locationUrl.search);
119
+ const checkIn = params.get('checkIn') || params.get('from') || '';
120
+ const checkOut = params.get('checkOut') || params.get('to') || '';
121
+ const duration = calculateDuration(checkIn, checkOut);
122
+ const formattedDuration = formatDuration(duration);
123
+ const [isRedirecting, setIsRedirecting] = useState(false);
124
+ useEffect(() => {
125
+ fetchCurrentLatLong();
126
+ }, []);
127
+ const handleRedirect = async e => {
128
+ if (e) e.preventDefault();
129
+ setIsRedirecting(true);
130
+ // Open the waiting page immediately with a temporary placeholder
131
+ const intermediateUrl = `/deep-link/property/${item.id}?redirectUrl=pending&partnerName=Loading...&partnerLogo=/images/loading.png&propertyType=${item.__typename}&checkIn=${checkIn}&checkOut=${checkOut}&adults=${adults}&children=${children}`;
132
+ window.open(intermediateUrl, '_blank');
133
+ // No need to make API calls here anymore as they will be handled by DeepLinkWaitingPage
134
+ setIsRedirecting(false);
135
+ };
136
+ const getPriceType = useCallback(room => {
137
+ const type = room.preferences?.property?.pricing?.option?.priceType;
138
+ if (type === 'HOUR') {
139
+ return t('property.hr');
140
+ }
141
+ return t('property.night');
142
+ }, [t]);
143
+ useCallback(address => {
144
+ if (!location || !address) return null;
145
+ if (typeof window !== 'undefined' && window.google && window.google.maps && window.google.maps.LatLng) {
146
+ const point1 = new window.google.maps.LatLng(location.latitude, location.longitude);
147
+ const point2 = new window.google.maps.LatLng(address.latitude_around, address.longitude_around);
148
+ if (window.google.maps.geometry && window.google.maps.geometry.spherical) {
149
+ const distance = window.google.maps.geometry.spherical.computeDistanceBetween(point1, point2);
150
+ const distanceInMiles = distance * 0.000621371;
151
+ return Math.floor(distanceInMiles);
152
+ } else {
153
+ console.error('Google Maps geometry library is not loaded.');
154
+ return null;
155
+ }
156
+ } else {
157
+ return null;
158
+ }
159
+ }, [location]);
160
+ const searchParams = new URLSearchParams(window.location.search);
161
+ const adults = parseInt(searchParams.get('adults') || '0', 10) || 1;
162
+ const children = parseInt(searchParams.get('children') || '0', 10);
163
+ const amenities = item?.preferences?.property?.amenities;
164
+ const displayedIcons = amenities ? Object.entries(amenities)?.flatMap(([key, value]) => {
165
+ const enabledAmenities = Object.entries(value ?? {})?.filter(([key1, value1]) => value1?.enable && value1?.icon);
166
+ const displayedAmenities = enabledAmenities.slice(0, 8);
167
+ return displayedAmenities.length > 0 ? displayedAmenities.map(([key1, value1]) => renderDynamicIcon({
168
+ name: value1.icon,
169
+ style: {
170
+ iconColor: grayColor,
171
+ w: '20px',
172
+ h: '20px'
173
+ }
174
+ })) : [];
175
+ }) : [];
176
+ const LikeButton = () => jsx(Fragment, {
177
+ children: likeBtnLoading ? jsx("div", {
178
+ className: "w-12 h-12 border-4 border-t-blue-500 rounded-full animate-spin border-gray-200"
179
+ }) : jsx("button", {
180
+ className: `w-7 h-9.5 rounded-full flex items-center justify-center ${didLike ? 'bg-blue-400' : isDark ? 'bg-gray-800' : 'bg-white'}`,
181
+ onClick: () => handleLike(item.id),
182
+ "aria-label": "Select as your favourite",
183
+ children: jsx(BsHeart, {
184
+ className: isDark ? 'text-white' : 'text-gray-800'
185
+ })
186
+ })
187
+ });
188
+ WithAuthentication(LikeButton);
189
+ return jsx(Fragment, {
190
+ children: jsxs("div", {
191
+ className: "flex flex-row p-2 relative w-[370px]",
192
+ onMouseEnter: () => setFocus(item.id),
193
+ onMouseLeave: () => setBlur(item.id),
194
+ ...props,
195
+ children: [item?.status === 'pending' && jsxs(Fragment, {
196
+ children: [jsx("div", {
197
+ className: "absolute w-full h-full bg-black bg-opacity-60 rounded-2xl z-10"
198
+ }), jsx("div", {
199
+ className: "absolute left-1/2 top-1/2 transform -translate-x-1/2 translate-y-1/2 text-white z-20",
200
+ children: jsx("p", {
201
+ className: "text-lg font-normal",
202
+ children: t('property.coming_soon')
203
+ })
204
+ })]
205
+ }), jsx("div", {
206
+ className: "w-full max-w-[100%] border border-solid border-gray-200 rounded-2xl shadow-md transition-all duration-300 hover:transform hover:-translate-y-1 hover:shadow-lg",
207
+ children: jsxs("div", {
208
+ className: "w-full h-full flex flex-col justify-between space-y-4",
209
+ children: [jsxs("div", {
210
+ className: "relative w-full h-full rounded-xl",
211
+ children: [jsx("div", {
212
+ className: "absolute top-2 left-2 bg-green-600 text-white px-3 py-1 rounded-md text-sm font-bold shadow-md z-10",
213
+ children: "Breakfast included"
214
+ }), jsxs(Splide, {
215
+ "aria-label": "Property Images",
216
+ options: {
217
+ type: 'slide',
218
+ drag: 'free',
219
+ perPage: 1,
220
+ perMove: 1,
221
+ lazyLoad: 'sequential',
222
+ wheel: true,
223
+ releaseWheel: true,
224
+ pagination: false,
225
+ speed: 800
226
+ },
227
+ children: [jsx("div", {
228
+ className: "absolute top-2.5 right-2.5 z-10",
229
+ children: jsx(LikeButton, {})
230
+ }), images.map((image, i) => jsx(SplideSlide, {
231
+ children: jsx("a", {
232
+ href: "#",
233
+ onClick: handleRedirect,
234
+ rel: "noopener noreferrer",
235
+ children: jsx("div", {
236
+ className: "w-full h-full rounded-xl",
237
+ children: jsx("img", {
238
+ src: image.src,
239
+ className: "rounded-xl h-[250px] w-full max-w-full object-cover cursor-pointer transition-all duration-500 hover:brightness-50",
240
+ loading: "lazy",
241
+ alt: `Property ${i + 1}`
242
+ }, 'image_' + i)
243
+ }, 'sliderImage_' + i)
244
+ })
245
+ }, 'sliderslide_' + i))]
246
+ })]
247
+ }), jsxs("div", {
248
+ className: "w-full px-4 flex flex-col pt-2",
249
+ children: [jsxs("div", {
250
+ className: "flex flex-wrap items-center space-x-2 mb-2",
251
+ children: [jsxs("span", {
252
+ className: "text-sm font-medium",
253
+ children: [t('property.property_type'), ":"]
254
+ }), types?.map((item, index) => jsx("span", {
255
+ className: "bg-gray-100 text-gray-800 text-xs px-2 py-1 rounded-full capitalize",
256
+ children: t(`property-types:${item.description}`)
257
+ }, index))]
258
+ }), jsx("h3", {
259
+ className: "text-lg font-medium mb-2 line-clamp-2",
260
+ children: item?.title
261
+ }), item?.address && item?.address.city && item?.address.city.state && jsxs("div", {
262
+ className: "flex items-center text-sm text-gray-500 mb-2",
263
+ children: [jsx(LocationIcon, {
264
+ w: "16px",
265
+ h: "20px"
266
+ }), jsxs("span", {
267
+ className: "truncate",
268
+ children: [item?.address.city.name + ', ' + item?.address.city.state.name, item?.address?.number ? ' · ' + item?.address?.number : '']
269
+ })]
270
+ }), displayedIcons.length > 0 && jsx("div", {
271
+ className: "flex space-x-3 mt-2 mb-3",
272
+ children: displayedIcons
273
+ }), jsxs("div", {
274
+ className: "flex flex-wrap space-x-2 mt-1 mb-3",
275
+ children: [item?.preferences?.property?.booking?.policy?.instantBookingEnabled && jsx("span", {
276
+ className: "bg-blue-100 text-blue-800 px-2 py-1 rounded-md text-xs capitalize",
277
+ children: t('property.instant_book')
278
+ }), item?.preferences?.property?.booking?.policy?.cancellation && jsx("span", {
279
+ className: "bg-green-100 text-green-800 px-2 py-1 rounded-md text-xs capitalize",
280
+ children: t('property.cancellation_policy')
281
+ })]
282
+ }), jsxs("div", {
283
+ className: "flex items-center mb-4",
284
+ children: [jsx(FaUserAlt, {
285
+ className: "text-gray-500"
286
+ }), jsxs("span", {
287
+ className: "text-sm text-gray-600 ml-2",
288
+ children: [item?.preferences?.property?.boarding?.maxPeople, " ", t('property.guests')]
289
+ })]
290
+ })]
291
+ }), config.ENABLE_PROPERTY_PRICE_COMPARISON && jsx("div", {
292
+ className: "px-4 w-full",
293
+ children: jsxs("div", {
294
+ className: "w-fit flex gap-4",
295
+ children: [jsx("hr", {
296
+ className: "w-full border-t border-gray-200"
297
+ }), jsxs("div", {
298
+ className: "flex flex-row",
299
+ children: [jsx(DealCard, {
300
+ site: "Vio.com",
301
+ price: 41387
302
+ }), jsx(DealCard, {
303
+ site: "Expedia.com",
304
+ price: 46369
305
+ }), jsx(DealCard, {
306
+ site: "More Deals",
307
+ price: 'View all'
308
+ })]
309
+ }), jsx("hr", {
310
+ className: "w-full border-t border-gray-200"
311
+ })]
312
+ })
313
+ }), jsxs("div", {
314
+ className: "flex flex-col sm:flex-row px-4 pb-4 w-full justify-between items-start sm:items-center",
315
+ children: [jsxs("div", {
316
+ className: "flex flex-col space-y-1 mb-3 sm:mb-0 w-full sm:w-auto",
317
+ children: [jsxs("div", {
318
+ className: "flex items-center",
319
+ children: [jsx(BsStarFill, {
320
+ className: "text-yellow-500 w-3 h-3 mr-1"
321
+ }), jsxs("span", {
322
+ className: "text-[0.832rem] font-bold text-gray-600",
323
+ children: [item?.reviewsOverview ? item.reviewsOverview.rating : 0, " (", item.reviewsOverview ? item.reviewsOverview.ratingCount : 0, ' ', t('property.reviews'), ")"]
324
+ })]
325
+ }), item?.__typename && jsxs("span", {
326
+ className: "text-[0.832rem] text-gray-500",
327
+ children: ["Booking through ", startCase(item.__typename.replace('Property', ''))]
328
+ })]
329
+ }), jsxs("div", {
330
+ className: "flex flex-col items-end space-y-2 w-full sm:w-auto",
331
+ children: [jsxs("div", {
332
+ className: "flex flex-col items-end space-y-1 w-full",
333
+ children: [jsxs("span", {
334
+ className: "text-[0.688rem] text-gray-500 text-right w-full",
335
+ children: [formattedDuration, ", ", adults + children, ' ', adults + children === 1 ? 'guest' : 'guests']
336
+ }), jsxs("div", {
337
+ className: "flex flex-col items-end space-y-0 w-full",
338
+ children: [item.preferences?.property?.pricing?.price?.price_breakdown?.details?.summary?.total !== item.preferences?.property?.pricing?.price?.price_breakdown?.details?.summary?.totalBeforeDiscount && jsxs("div", {
339
+ className: "flex items-center group relative",
340
+ children: [jsx("span", {
341
+ className: "text-xs text-gray-500",
342
+ children: "from"
343
+ }), jsx("span", {
344
+ className: "text-sm font-semibold text-gray-500 line-through ml-1 cursor-help hover:text-gray-600 group-hover:text-gray-600",
345
+ children: item.preferences?.property?.pricing?.price?.price_breakdown?.details?.summary?.totalBeforeDiscount
346
+ }), jsx("div", {
347
+ className: "hidden group-hover:block absolute top-0 right-0 transform -translate-y-full mt-2 w-[300px] shadow-lg bg-white rounded-md p-4 z-50",
348
+ children: jsxs("div", {
349
+ className: "flex flex-col space-y-2",
350
+ children: [item.preferences?.property?.pricing?.price?.price_breakdown?.details?.discounts?.items.map((charge, index) => jsxs("div", {
351
+ className: "flex flex-col",
352
+ children: [jsxs("div", {
353
+ className: "flex justify-between",
354
+ children: [jsx("span", {
355
+ className: "mr-4",
356
+ children: charge.name
357
+ }), jsx("span", {
358
+ className: "font-medium",
359
+ children: charge?.amount_rounded
360
+ })]
361
+ }), charge.details && jsx("span", {
362
+ className: "text-sm font-normal",
363
+ children: charge?.details
364
+ })]
365
+ }, index)), jsxs("div", {
366
+ className: "flex justify-between pt-2 border-t border-gray-200 font-bold",
367
+ children: [jsx("span", {
368
+ children: "Total discount"
369
+ }), jsx("span", {
370
+ children: item.preferences?.property?.pricing?.price?.price_breakdown?.details?.summary?.savings
371
+ })]
372
+ })]
373
+ })
374
+ })]
375
+ }), jsxs("div", {
376
+ className: "relative group",
377
+ children: [jsx("span", {
378
+ className: "text-2xl font-semibold text-right underline cursor-help",
379
+ children: item.preferences?.property?.pricing?.price?.price_breakdown?.details?.summary?.total
380
+ }), jsxs("div", {
381
+ className: "hidden group-hover:block absolute top-0 right-0 transform -translate-y-full mt-2 w-[300px] shadow-lg bg-white rounded-md z-50",
382
+ children: [jsx("div", {
383
+ className: "font-bold border-b border-gray-200 p-3 text-center",
384
+ children: "Price breakdown"
385
+ }), jsx("div", {
386
+ className: "p-4",
387
+ children: jsx("div", {
388
+ className: "flex flex-col space-y-2",
389
+ children: item.preferences?.property?.pricing?.price?.price_breakdown?.details?.charges?.items?.map((item, index) => jsxs("div", {
390
+ className: "flex justify-between",
391
+ children: [jsx("span", {
392
+ children: item.name
393
+ }), jsx("span", {
394
+ children: item?.amount_rounded
395
+ })]
396
+ }, index))
397
+ })
398
+ })]
399
+ })]
400
+ })]
401
+ }), jsxs("span", {
402
+ className: "text-xs text-gray-500 text-right w-full",
403
+ children: [item?.preferences?.property?.pricing?.price?.price_breakdown?.details?.pricing?.basePrice?.perNight, ' ', "per ", getPriceType(item)]
404
+ })]
405
+ }), jsx("button", {
406
+ className: `bg-blue-500 hover:bg-blue-600 text-white font-semibold py-2 px-4 rounded w-full ${isRedirecting ? 'opacity-75 cursor-wait' : ''}`,
407
+ onClick: handleRedirect,
408
+ disabled: isRedirecting,
409
+ children: isRedirecting ? 'Loading...' : 'View deal'
410
+ })]
411
+ })]
412
+ })]
413
+ })
414
+ })]
415
+ }, item.id)
416
+ });
417
+ };export{PropertyCard};//# sourceMappingURL=PropertyCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PropertyCard.js","sources":["../../../src/components/UI/PropertyCard.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":"41BAwCS;AACA;AACA;AACT;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;A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AA,YAAA,CAAA,GAAA,CAAA,UAAA,CAAY,IAAM,GAAA,EAAA,EAAA,CAAA;AAClB,EAAA,MAAA,SAAA,GAAA,IAAA,EAAA,WAAA,EAAA,QAAA,EAAA,SAAiB;AACjB,EAAA,MAAA,cAAA,GAAA,SAAA,GAAA,MAAA,CAAA,OAAO,CAAG,SAAA,CAAA,EAAA,OAAA,CAAA,CAAA,CAAA,GAAA,EAAA,KAAA,CAAA,KAAA;AACb,IAAA,MAAA,gBAAA,GAAA,MAAA,CAAA,OAAA,CAAA,KAAA,IAAA,EAEI,CAAA,EAAA,MAAA,CAAA,CAAA,CAAA,IAAA,EAAA,MAAU,CAAA,KAAA,MAAA,EAAA,MAAA,IAAA,MAAA,EAAA,IACX,CAAA;AA2HQ,IAAA,MAAA,kBAAA,GAAA,gBAAA,CAAA,KAAA,CAAA,CAAA,EAAA,CAAA,CAAA;iEACI,CAAA,CAAA,CAAA,IAAY,EAAA,MAAA,CAAA,KAAU,iBAAgB,CAAA;AACtC,MAAA,IAAA,EAAA,MAAA,CAAA,IAAA;;AAiCwB,QAAA,SAAA,EAAA,SAAA;;;AA+DxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,10 @@
1
+ import { Options } from '@cdmbase/react-splide';
2
+ type PropertyCardOnMapProps = {
3
+ room: any;
4
+ isSaved: boolean;
5
+ sliderOptions?: Options;
6
+ className?: string;
7
+ };
8
+ export declare const PropertyCardOnMap: ({ room, isSaved, sliderOptions, className, ...props }: PropertyCardOnMapProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=PropertyCardOnMap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PropertyCardOnMap.d.ts","sourceRoot":"","sources":["../../../src/components/UI/PropertyCardOnMap.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAuB,MAAM,uBAAuB,CAAC;AAIrE,KAAK,sBAAsB,GAAG;IAC1B,IAAI,EAAE,GAAG,CAAC;IACV,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,uDAM/B,sBAAsB,4CA0FxB,CAAC"}
@@ -0,0 +1,108 @@
1
+ import {jsxs,jsx}from'react/jsx-runtime';import {useMemo,useState,useEffect}from'react';import {useTranslation}from'react-i18next';import {Link}from'@remix-run/react';import {BsStarFill}from'@react-icons/all-files/bs/BsStarFill.js';import {Splide,SplideSlide}from'@cdmbase/react-splide';import {useLayoutSettings}from'@admin-layout/client';const PropertyCardOnMap = ({
2
+ room,
3
+ isSaved,
4
+ sliderOptions = {},
5
+ className = '',
6
+ ...props
7
+ }) => {
8
+ const images = useMemo(() => room?.images?.data.map(({
9
+ url
10
+ }) => ({
11
+ src: url
12
+ })), [room]);
13
+ const {
14
+ t
15
+ } = useTranslation();
16
+ const {
17
+ settings
18
+ } = useLayoutSettings();
19
+ const [star, setStar] = useState(0);
20
+ useEffect(() => {
21
+ let temp = room?.totalReview == 0 ? 0 : room?.totalStar / room?.totalReview;
22
+ setStar(temp);
23
+ }, [room?.totalReview, room?.totalStar]);
24
+ // const { color, grayColor } = useColorTheme();
25
+ return jsxs("div", {
26
+ className: `flex flex-col flex-wrap mt-4 ${className}`,
27
+ children: [jsx("div", {
28
+ className: "w-full",
29
+ children: jsxs(Splide, {
30
+ "aria-label": t('property.property_images'),
31
+ options: {
32
+ type: 'loop',
33
+ drag: 'free',
34
+ height: '230px',
35
+ perPage: 1,
36
+ perMove: 1,
37
+ wheel: true,
38
+ releaseWheel: true,
39
+ pagination: false,
40
+ speed: 500,
41
+ ...sliderOptions
42
+ },
43
+ children: [images && images.length == 0 && jsx(SplideSlide, {
44
+ children: jsx("div", {
45
+ className: "w-full h-full",
46
+ children: jsx("img", {
47
+ src: room.thumbnailUrl,
48
+ className: "w-full h-full object-cover cursor-pointer transition-all duration-500 hover:brightness-50",
49
+ loading: "lazy",
50
+ alt: room.title || 'Property'
51
+ })
52
+ })
53
+ }), images.map((image, i) => {
54
+ return jsx(SplideSlide, {
55
+ children: jsx(Link, {
56
+ to: '/property/' + room.id,
57
+ className: "w-full",
58
+ children: jsx("div", {
59
+ className: "w-full h-full",
60
+ children: jsx("img", {
61
+ src: image.src,
62
+ className: "w-full h-full object-cover cursor-pointer transition-all duration-500 hover:brightness-50",
63
+ loading: "lazy",
64
+ alt: room.title || 'Property'
65
+ })
66
+ })
67
+ })
68
+ }, 'sliderImage1_' + i);
69
+ })]
70
+ })
71
+ }), jsxs("div", {
72
+ className: "w-full flex flex-col mt-2",
73
+ children: [jsx("div", {
74
+ className: "font-semibold text-sm",
75
+ style: {
76
+ color: settings?.primaryColor
77
+ },
78
+ children: room?.title
79
+ }), jsxs("div", {
80
+ className: "flex flex-row justify-between",
81
+ children: [jsxs("div", {
82
+ className: "flex flex-col",
83
+ children: [jsx("div", {
84
+ className: "mt-1 flex text-[9px] font-semibold",
85
+ style: {
86
+ color: settings?.primaryColor
87
+ },
88
+ children: room?.address && room?.address.city && room?.address.city.state ? room?.address.city.name + ', ' + room?.address.city.state.name : ''
89
+ }), jsxs("div", {
90
+ className: "flex items-center",
91
+ children: [jsx(BsStarFill, {
92
+ className: "text-yellow-500 w-3 h-3 mr-1"
93
+ }), jsxs("span", {
94
+ className: "text-[0.832rem] font-bold",
95
+ style: {
96
+ color: settings?.secondaryColor
97
+ },
98
+ children: [room?.reviewsOverview ? room.reviewsOverview.rating : 0, " (", room.reviewsOverview ? room.reviewsOverview.ratingCount : 0, " ", t('property.reviews'), ")"]
99
+ })]
100
+ })]
101
+ }), jsx("div", {
102
+ className: "text-lg font-bold mt-auto mb-[-2px]",
103
+ children: room.preferences?.property?.pricing?.price?.price_breakdown?.details?.pricing?.finalPrice?.total
104
+ })]
105
+ })]
106
+ })]
107
+ });
108
+ };export{PropertyCardOnMap};//# sourceMappingURL=PropertyCardOnMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PropertyCardOnMap.js","sources":["../../../src/components/UI/PropertyCardOnMap.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":"0VAkBa,iBAAiB,GAAG,CAAC;AAO9B,EAAA,IAAA;AACA,EAAA,OAAA;AACA,EAAA,aAAgB,GAAA,EAAA;WAET,GAAI,EAAA;KACF;;QAEL,MAAO,GAAK,OAAE,CAAA,MAAA,IAAA,EAAA,MAAA,EAAA,IAAA,CAAA,GAAA,CAAA,CAAA;IAClB;SAEgD;IAEhD,GAAO,EAAA;AAMa,GAAA,CAAA,CAAA,EAAA,CAAA,IAAA,CAAA,CAAA;AACA,EAAA,MAAA;AACA,IAAA;AACA,GAAA,GAAA,cAAA,EAAA;AACA,EAAA,MAAA;AACA,IAAA;AACA,GAAA,GAAA,iBAAA,EAAA;AACA,EAAA,MAAA,CAAA,IAAA,EAAA,OAAA,CAAA,GAAA,QAAU,EAAE,CAAK;AACjB,EAAA,SAAA,CAAA,MAAA;AACA,IAAA,IAAA,IAAA,GAAA,IAAA,EAAA,WAAgB,IAAA,CAAA,GAAA,CAAA,GAAA,IAAA,EAAA,SAAA,GAAA,IAAA,EAAA,WAAA;;6BAgBT,EAAA,SACF,CAAA,CAAA;AAaT;AAWY,EAAA,OAAAA,IAAA,CAAA,KAAA,EAAA;6CACC;AAaD,IAAA,QAAA,EAAA,CAAAC,GAAA,CAAA,KAAA,EAAA;AAOhC,MAAE,SAAA,EAAA,QAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { CarPricing } from './types';
3
+ interface PricePopoverProps {
4
+ pricing: CarPricing;
5
+ }
6
+ declare const PricePopover: React.FC<PricePopoverProps>;
7
+ export default PricePopover;
8
+ //# sourceMappingURL=PricePopover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PricePopover.d.ts","sourceRoot":"","sources":["../../../../src/components/UI/VehicleCard/PricePopover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,UAAU,iBAAiB;IACvB,OAAO,EAAE,UAAU,CAAC;CACvB;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAyF7C,CAAC;AAEF,eAAe,YAAY,CAAC"}