@bytebrand/fe-ui-core 4.2.245 → 4.2.247

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 (1059) hide show
  1. package/.editorconfig +10 -10
  2. package/.gitlab-ci.yml +62 -62
  3. package/.storybook/addons.js +4 -4
  4. package/.storybook/config.js +64 -64
  5. package/.storybook/postcss.config.js +6 -6
  6. package/.storybook/preview-head.html +9 -9
  7. package/.storybook/webpack.config.js +130 -130
  8. package/__tests__/components/Checkout/OrderOverviewItem/OrderOverviewItem.test.tsx +42 -42
  9. package/__tests__/components/Checkout/PaymentTypeCard/PaymentTypeCard.test.tsx +49 -49
  10. package/__tests__/components/Checkout/RadioGroup.test.tsx +95 -95
  11. package/__tests__/components/Checkout/ServiceCardWrapper.test.tsx +53 -53
  12. package/__tests__/components/Checkout/Switcher.test.tsx +43 -43
  13. package/__tests__/components/UserDasboardPage/sections/CheckoutSection/CheckoutSection.test.tsx +613 -613
  14. package/__tests__/components/UserDasboardPage/sections/FavoriteSection/FavoriteSection.test.tsx +335 -335
  15. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/AdditionalOrderInfo.test.tsx +127 -127
  16. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusCar.test.tsx +58 -58
  17. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusCard.test.tsx +74 -74
  18. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusSection.test.tsx +62 -62
  19. package/__tests__/components/UserDasboardPage/sections/RequestedCarsSection/RequestedCarsSection.test.tsx +117 -117
  20. package/__tests__/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.test.tsx +58 -58
  21. package/__tests__/components/VehicleSmallCard/VehicleInfo.test.tsx +87 -87
  22. package/__tests__/components/VehicleSmallCard/VehicleTitle.test.tsx +90 -90
  23. package/__tests__/components/_common/Badge/Badge.test.tsx +15 -15
  24. package/__tests__/components/_common/IconSVG/IconSVG.test.tsx +22 -22
  25. package/__tests__/components/_common/Image/Image.test.tsx +82 -82
  26. package/__tests__/components/_common/MaterialAutocomplete/MaterialAutocomplete.test.tsx +48 -48
  27. package/__tests__/components/_common/MaterialDatePicker/MaterialDatePicker.test.tsx +54 -54
  28. package/__tests__/components/_common/MaterialField/MaterialField.test.tsx +58 -58
  29. package/__tests__/components/_common/StarButton/StarButton.test.tsx +45 -45
  30. package/__tests__/mockedData/financingConfig.js +201 -201
  31. package/__tests__/mockedData/mockedPendingRequestedCar.js +68 -68
  32. package/__tests__/utils/CommonUtils/addPrefixToKeys.test.ts +18 -18
  33. package/__tests__/utils/CommonUtils/arrToObj.test.js +32 -32
  34. package/__tests__/utils/CommonUtils/checkRangeValuesOnEqual.test.ts +16 -16
  35. package/__tests__/utils/CommonUtils/fixNumber.test.ts +19 -19
  36. package/__tests__/utils/CommonUtils/formatMileage.test.ts +8 -8
  37. package/__tests__/utils/CommonUtils/getChipFilterValue.test.ts +22 -22
  38. package/__tests__/utils/CommonUtils/getFormattedNumber.test.ts +18 -18
  39. package/__tests__/utils/CommonUtils/getFormattedPrice.test.ts +19 -19
  40. package/__tests__/utils/CommonUtils/getGroupValuesForQuery.test.ts +51 -51
  41. package/__tests__/utils/CommonUtils/getOfferSliders.test.ts +63 -63
  42. package/__tests__/utils/CommonUtils/getPriceRating.test.ts +26 -26
  43. package/__tests__/utils/CommonUtils/getPriceRatingConfig.test.ts +33 -33
  44. package/__tests__/utils/CommonUtils/preloadNearbyImages.test.ts +8 -8
  45. package/__tests__/utils/CommonUtils/sliceLessThan.test.ts +23 -23
  46. package/__tests__/utils/CommonUtils/sliceMoreThan.test.ts +23 -23
  47. package/common.ts +164 -164
  48. package/feWpComponents.ts +25 -25
  49. package/index.ts +4 -4
  50. package/jest.config.js +43 -43
  51. package/landing.ts +38 -38
  52. package/media/images/advantages/advantage_cart.svg +4 -4
  53. package/media/images/advantages/advantage_check.svg +4 -4
  54. package/media/images/advantages/advantage_like.svg +10 -10
  55. package/media/images/advantages/advantage_secure.svg +6 -6
  56. package/media/images/check-blue.svg +40 -40
  57. package/media/images/raiting-star.svg +3 -3
  58. package/media/images/raiting-stars-min.svg +7 -7
  59. package/media/images/refresh-button.svg +49 -49
  60. package/media/images/slider-arrow-big.svg +11 -11
  61. package/media/images/user-icon.svg +16 -16
  62. package/media/locales/de/promoSlider.json +25 -25
  63. package/media/locales/en/promoSlider.json +25 -25
  64. package/media/svg/common/arrow_breadcrumps.svg +3 -3
  65. package/media/svg/common/home.svg +8 -8
  66. package/media/svg/common/whyAutodeIconSet-F.svg +9 -9
  67. package/media/svg/common/whyAutodeIconSet-G.svg +8 -8
  68. package/media/svg/common/whyAutodeIconSet-Q.svg +6 -6
  69. package/media/svg/common/whyAutodeIconSet-R.svg +9 -9
  70. package/media/svg/infoBlocks/whyAutodeIconSet-F.svg +9 -9
  71. package/media/svg/infoBlocks/whyAutodeIconSet-G.svg +8 -8
  72. package/media/svg/infoBlocks/whyAutodeIconSet-Q.svg +6 -6
  73. package/media/svg/infoBlocks/whyAutodeIconSet-R.svg +9 -9
  74. package/media/svg/usp/icon1.svg +16 -16
  75. package/media/svg/usp/icon2.svg +13 -13
  76. package/media/svg/usp/icon3.svg +10 -10
  77. package/media/svg/usp/icon4.svg +14 -14
  78. package/package.json +126 -126
  79. package/profile.ts +1 -1
  80. package/setupTests.js +7 -7
  81. package/source/components/AccardionSection/AccardionSection.styl +45 -45
  82. package/source/components/AccardionSection/AccardionSection.tsx +47 -47
  83. package/source/components/AccordionWidget/AccordionWidget.styl +205 -205
  84. package/source/components/AccordionWidget/AccordionWidget.tsx +223 -223
  85. package/source/components/AdvantageItem/AdvantageItem.story.js +23 -23
  86. package/source/components/AdvantageItem/AdvantageItem.styl +47 -47
  87. package/source/components/AdvantageItem/AdvantageItem.tsx +26 -26
  88. package/source/components/Alternative/Dealer.story.js +31 -31
  89. package/source/components/Alternative/Dealer.story.styl +2 -2
  90. package/source/components/Alternative/DealerInfo.styl +116 -116
  91. package/source/components/Alternative/DealerInfo.tsx +171 -171
  92. package/source/components/Breadcrumbs/Breadcrumbs.story.js +40 -40
  93. package/source/components/Breadcrumbs/Breadcrumbs.styl +136 -136
  94. package/source/components/Breadcrumbs/Breadcrumbs.tsx +93 -93
  95. package/source/components/Breadcrumbs/FirstInfoBlock/FirstInfoBlock.story.js +45 -45
  96. package/source/components/Breadcrumbs/FirstInfoBlock/FirstInfoBlock.styl +54 -54
  97. package/source/components/Breadcrumbs/FirstInfoBlock/FirstInfoBlock.tsx +17 -17
  98. package/source/components/Checkout/CheckoutStepper/CheckoutStepper.styl +34 -34
  99. package/source/components/Checkout/CheckoutStepper/CheckoutStepper.tsx +69 -69
  100. package/source/components/Checkout/CheckoutStepper/CheckoutStepperClasses.js +173 -173
  101. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.story.js +243 -243
  102. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.story.styl +20 -20
  103. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.styl +36 -36
  104. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.tsx +53 -53
  105. package/source/components/Checkout/RadioCards/AdditionalServiceCard/ServiceCardWrapper.styl +201 -201
  106. package/source/components/Checkout/RadioCards/AdditionalServiceCard/ServiceCardWrapper.tsx +212 -212
  107. package/source/components/Checkout/RadioCards/ContentCard/AdditionalServiceContent.styl +30 -30
  108. package/source/components/Checkout/RadioCards/ContentCard/AdditionalServiceContent.tsx +62 -62
  109. package/source/components/Checkout/RadioCards/ContentCard/VehicleDeliveryContent.styl +73 -73
  110. package/source/components/Checkout/RadioCards/ContentCard/VehicleDeliveryContent.tsx +61 -61
  111. package/source/components/Checkout/RadioCards/PaymentTypeCard/PaymentTypeCard.styl +193 -193
  112. package/source/components/Checkout/RadioCards/PaymentTypeCard/PaymentTypeCard.tsx +181 -181
  113. package/source/components/Checkout/RadioCards/RadioCheckout.styl +158 -158
  114. package/source/components/Checkout/RadioCards/RadioCheckout.tsx +178 -178
  115. package/source/components/Checkout/RadioCards/RadioGroupCheckout.story.js +105 -105
  116. package/source/components/Checkout/RadioCards/RadioGroupCheckout.story.styl +37 -37
  117. package/source/components/Checkout/Switcher/Switcher.story.js +41 -41
  118. package/source/components/Checkout/Switcher/Switcher.story.styl +1 -1
  119. package/source/components/Checkout/Switcher/Switcher.styled.tsx +53 -53
  120. package/source/components/Checkout/Switcher/Switcher.tsx +48 -48
  121. package/source/components/CompactSearchWidget/CompactSearchFields/CompactSearchFields.styl +176 -176
  122. package/source/components/CompactSearchWidget/CompactSearchFields/CompactSearchFields.tsx +477 -477
  123. package/source/components/CompactSearchWidget/CompactSearchWidget.story.js +187 -187
  124. package/source/components/CompactSearchWidget/CompactSearchWidget.styl +43 -43
  125. package/source/components/CompactSearchWidget/CompactSearchWidget.tsx +165 -165
  126. package/source/components/ContactForm/ContactForm.story.js +93 -93
  127. package/source/components/ContactForm/ContactForm.styl +260 -260
  128. package/source/components/ContactForm/ContactForm.tsx +588 -588
  129. package/source/components/ContactForm/WpContactForm.tsx +287 -287
  130. package/source/components/ContactInfo/ContactInfo.story.js +58 -58
  131. package/source/components/ContactInfo/ContactInfo.styl +22 -22
  132. package/source/components/ContactInfo/ContactInfo.tsx +161 -161
  133. package/source/components/ContactInfo/TemporaryTranslation.ts +11 -11
  134. package/source/components/CustomerQuote/CustomerQuote.story.js +41 -41
  135. package/source/components/CustomerQuote/CustomerQuote.styl +79 -79
  136. package/source/components/CustomerQuote/CustomerQuote.tsx +68 -68
  137. package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.story.js +73 -73
  138. package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.story.styl +4 -4
  139. package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.styl +46 -46
  140. package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.tsx +79 -79
  141. package/source/components/CustomerQuotesSlider/SliderArrow.tsx +20 -20
  142. package/source/components/FormattedNumber/FormattedNumber.story.js +114 -114
  143. package/source/components/FormattedNumber/FormattedNumber.styl +1 -1
  144. package/source/components/FormattedNumber/FormattedNumber.tsx +90 -90
  145. package/source/components/ImageSettings/EditableOptionsTable/CustomCheckbox/CustomCheckbox.styl +7 -7
  146. package/source/components/ImageSettings/EditableOptionsTable/CustomCheckbox/CustomCheckbox.tsx +30 -30
  147. package/source/components/ImageSettings/EditableOptionsTable/EditableOptionsTable.styl +122 -122
  148. package/source/components/ImageSettings/EditableOptionsTable/EditableOptionsTable.tsx +199 -199
  149. package/source/components/ImageSettings/EditableOptionsTable/ImageIcon/ImageIcon.styl +3 -3
  150. package/source/components/ImageSettings/EditableOptionsTable/ImageIcon/ImageIcon.tsx +15 -15
  151. package/source/components/ImageSettings/OptionsTable/OptionsTable.styl +47 -47
  152. package/source/components/ImageSettings/OptionsTable/OptionsTable.tsx +122 -122
  153. package/source/components/ImageSettings/PricePlan/PricePlan.styl +63 -63
  154. package/source/components/ImageSettings/PricePlan/PricePlan.tsx +32 -32
  155. package/source/components/ImageSettings/index.ts +42 -42
  156. package/source/components/ImageSettings/story.js +1212 -1212
  157. package/source/components/InfoBlocks/FirstInfoBlock/FirstInfoBlock.styl +33 -33
  158. package/source/components/InfoBlocks/FirstInfoBlock/FirstInfoBlock.tsx +48 -48
  159. package/source/components/InfoBlocks/FirstInfoBlock/FirstInfoBlockItem/FirstInfoBlockItem.styl +66 -66
  160. package/source/components/InfoBlocks/FirstInfoBlock/FirstInfoBlockItem/FirstInfoBlockItem.tsx +21 -21
  161. package/source/components/InfoBlocks/InfoBlockWrapper/InfoBlockWrapper.styl +41 -41
  162. package/source/components/InfoBlocks/InfoBlockWrapper/InfoBlockWrapper.tsx +45 -45
  163. package/source/components/InfoBlocks/InfoBlockWrapper.story.js +101 -101
  164. package/source/components/InfoBlocks/InfoBlockWrapper.story.styl +45 -45
  165. package/source/components/InfoBlocks/PricingToolBlock/PricingTool.styl +6 -6
  166. package/source/components/InfoBlocks/PricingToolBlock/PricingTool.tsx +29 -29
  167. package/source/components/InfoBlocks/PricingToolBlock/PricingToolBlock.styl +45 -45
  168. package/source/components/InfoBlocks/PricingToolBlock/PricingToolBlock.tsx +81 -81
  169. package/source/components/InfoBlocks/ServicesBlock/ServiceBlockItem.styl +47 -47
  170. package/source/components/InfoBlocks/ServicesBlock/ServiceBlockItem.tsx +25 -25
  171. package/source/components/OfferDetailedSection/OfferDetailedSection.styl +31 -31
  172. package/source/components/OfferDetailedSection/OfferDetailedSection.tsx +100 -100
  173. package/source/components/OfferDetailedSection/partials/PanelConfig.styl +131 -131
  174. package/source/components/OfferDetailedSection/partials/PanelConfig.tsx +121 -121
  175. package/source/components/OfferPanel/AboAccordion/AboAccordion.styl +24 -24
  176. package/source/components/OfferPanel/AboAccordion/AboAccordion.tsx +128 -128
  177. package/source/components/OfferPanel/AboAccordion/AboColorOptions/AboColorOptions.styl +11 -11
  178. package/source/components/OfferPanel/AboAccordion/AboColorOptions/AboColorOptions.tsx +35 -35
  179. package/source/components/OfferPanel/AboAccordion/AboFaq/AboFaq.story.js +97 -97
  180. package/source/components/OfferPanel/AboAccordion/AboFaq/AboFaq.styl +20 -20
  181. package/source/components/OfferPanel/AboAccordion/AboFaq/AboFaq.tsx +25 -25
  182. package/source/components/OfferPanel/AboAccordion/AboIncludedServices/AboIncludedServices.styl +13 -13
  183. package/source/components/OfferPanel/AboAccordion/AboIncludedServices/AboIncludedServices.tsx +39 -39
  184. package/source/components/OfferPanel/MuiOfferPeriod/MuiOfferPeriod.theme.tsx +25 -25
  185. package/source/components/OfferPanel/MuiOfferPeriod/MuiOfferPeriod.tsx +73 -73
  186. package/source/components/OfferPanel/OfferCheckboxGroup/CheckboxContainer.tsx +140 -140
  187. package/source/components/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.styl +120 -120
  188. package/source/components/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.tsx +24 -24
  189. package/source/components/OfferPanel/OfferPanel.story.js +139 -139
  190. package/source/components/OfferPanel/OfferPanel.styl +193 -193
  191. package/source/components/OfferPanel/OfferPanel.tsx +81 -81
  192. package/source/components/OfferPanel/OfferPeriod/OfferPeriod.styl +24 -24
  193. package/source/components/OfferPanel/OfferPeriod/OfferPeriod.tsx +45 -45
  194. package/source/components/OfferPanel/RangeGroup/RangeGroup.story.js +35 -35
  195. package/source/components/OfferPanel/RangeGroup/RangeGroup.story.styl +2 -2
  196. package/source/components/OfferPanel/RangeGroup/RangeGroup.tsx +39 -39
  197. package/source/components/PriceRating/PriceRating.story.js +39 -39
  198. package/source/components/PriceRating/PriceRating.story.styl +1 -1
  199. package/source/components/PriceRating/PriceRating.styl +47 -47
  200. package/source/components/PriceRating/PriceRating.tsx +64 -64
  201. package/source/components/PriceRatingDetailed/PriceRatingDetailed.story.js +78 -78
  202. package/source/components/PriceRatingDetailed/PriceRatingDetailed.story.styl +11 -11
  203. package/source/components/PriceRatingDetailed/PriceRatingDetailed.styl +120 -120
  204. package/source/components/PriceRatingDetailed/PriceRatingDetailed.tsx +191 -191
  205. package/source/components/RateSearchValue/RateSearchValue.story.js +78 -78
  206. package/source/components/RateSearchValue/RateSearchValue.story.styl +1 -1
  207. package/source/components/RateSearchValue/RateSearchValue.styl +22 -22
  208. package/source/components/RateSearchValue/RateSearchValue.tsx +55 -55
  209. package/source/components/RateSearchWidget/RateSearchWidget.story.js +57 -57
  210. package/source/components/RateSearchWidget/RateSearchWidget.story.styl +12 -12
  211. package/source/components/RateSearchWidget/RateSearchWidget.styl +106 -106
  212. package/source/components/RateSearchWidget/RateSearchWidget.tsx +163 -163
  213. package/source/components/SearchFilters/FiltersFactory.story.js +273 -273
  214. package/source/components/SearchFilters/FiltersFactory.tsx +85 -85
  215. package/source/components/SearchFilters/Slider.styl +66 -66
  216. package/source/components/SearchFilters/common/Color/Color.styl +29 -29
  217. package/source/components/SearchFilters/common/Color/Color.tsx +60 -60
  218. package/source/components/SearchFilters/common/FilterBlock/FilterBlock.styl +39 -39
  219. package/source/components/SearchFilters/common/FilterBlock/FilterBlock.styled.tsx +28 -28
  220. package/source/components/SearchFilters/common/FilterBlock/FilterBlock.tsx +54 -54
  221. package/source/components/SearchFilters/common/FilterBlock/FilterBlockFactory.tsx +151 -151
  222. package/source/components/SearchFilters/common/RangeControlled/RangeControlled.tsx +155 -155
  223. package/source/components/SearchFilters/filters/AlternativeID.styl +98 -98
  224. package/source/components/SearchFilters/filters/AlternativeID.tsx +67 -67
  225. package/source/components/SearchFilters/filters/Consumption.styl +41 -41
  226. package/source/components/SearchFilters/filters/Consumption.tsx +52 -52
  227. package/source/components/SearchFilters/filters/Cost.styl +43 -43
  228. package/source/components/SearchFilters/filters/Cost.tsx +112 -112
  229. package/source/components/SearchFilters/filters/CubicCapacity.styl +30 -30
  230. package/source/components/SearchFilters/filters/CubicCapacity.tsx +134 -134
  231. package/source/components/SearchFilters/filters/Damaged.styl +1 -1
  232. package/source/components/SearchFilters/filters/Damaged.tsx +40 -40
  233. package/source/components/SearchFilters/filters/Doors.styl +18 -18
  234. package/source/components/SearchFilters/filters/Doors.tsx +113 -113
  235. package/source/components/SearchFilters/filters/DriveType.styl +22 -22
  236. package/source/components/SearchFilters/filters/DriveType.tsx +72 -72
  237. package/source/components/SearchFilters/filters/EmissionClass.tsx +35 -35
  238. package/source/components/SearchFilters/filters/EmissionSticker.styl +46 -46
  239. package/source/components/SearchFilters/filters/EmissionSticker.tsx +52 -52
  240. package/source/components/SearchFilters/filters/FirstRegistration.tsx +96 -96
  241. package/source/components/SearchFilters/filters/Fuel.styl +27 -27
  242. package/source/components/SearchFilters/filters/Fuel.tsx +75 -75
  243. package/source/components/SearchFilters/filters/Highlights.styl +38 -38
  244. package/source/components/SearchFilters/filters/Highlights.tsx +69 -69
  245. package/source/components/SearchFilters/filters/ImagesCount.tsx +66 -66
  246. package/source/components/SearchFilters/filters/InteriorColor.styl +29 -29
  247. package/source/components/SearchFilters/filters/InteriorColor.tsx +71 -71
  248. package/source/components/SearchFilters/filters/InteriorMaterial.styl +28 -28
  249. package/source/components/SearchFilters/filters/InteriorMaterial.tsx +72 -72
  250. package/source/components/SearchFilters/filters/MakeModel.styl +106 -106
  251. package/source/components/SearchFilters/filters/MakeModel.tsx +164 -164
  252. package/source/components/SearchFilters/filters/Mileage.tsx +108 -108
  253. package/source/components/SearchFilters/filters/OwnerID.styl +14 -14
  254. package/source/components/SearchFilters/filters/OwnerID.tsx +65 -65
  255. package/source/components/SearchFilters/filters/Owners.styl +23 -23
  256. package/source/components/SearchFilters/filters/Owners.tsx +72 -72
  257. package/source/components/SearchFilters/filters/Power.tsx +176 -176
  258. package/source/components/SearchFilters/filters/PriceDifference.tsx +67 -67
  259. package/source/components/SearchFilters/filters/Rate.styl +34 -34
  260. package/source/components/SearchFilters/filters/Rate.tsx +53 -53
  261. package/source/components/SearchFilters/filters/Seats.styl +31 -31
  262. package/source/components/SearchFilters/filters/Seats.tsx +53 -53
  263. package/source/components/SearchFilters/filters/StateOptions.styl +16 -16
  264. package/source/components/SearchFilters/filters/StateOptions.tsx +57 -57
  265. package/source/components/SearchFilters/filters/StateOptionsNew.styl +23 -23
  266. package/source/components/SearchFilters/filters/StateOptionsNew.tsx +72 -72
  267. package/source/components/SearchFilters/filters/Transmission.styl +20 -20
  268. package/source/components/SearchFilters/filters/Transmission.tsx +71 -71
  269. package/source/components/SearchFilters/filters/commonFilters.styl +93 -93
  270. package/source/components/SearchPage/ChipFilter/ChipFilter.styl +45 -45
  271. package/source/components/SearchPage/ChipFilter/ChipFilter.tsx +21 -21
  272. package/source/components/SearchPage/DropDown/DropDown.styl +99 -99
  273. package/source/components/SearchPage/DropDown/DropDown.tsx +52 -52
  274. package/source/components/SearchPage/DropDown/MultiDropDown.tsx +84 -84
  275. package/source/components/SearchPage/DropDown/index.ts +8 -8
  276. package/source/components/SearchPage/Filters/HistogramSlider.styl +77 -77
  277. package/source/components/SearchPage/Filters/MakeModel/MakeModel.story.js +11 -11
  278. package/source/components/SearchPage/Filters/MakeModel/MakeModel.styl +95 -95
  279. package/source/components/SearchPage/Filters/MakeModel/MakeModel.tsx +152 -152
  280. package/source/components/SearchPage/Pagination/Pagination.styl +95 -95
  281. package/source/components/SearchPage/Pagination/Pagination.tsx +89 -89
  282. package/source/components/SearchPage/SearchChips/SearchChips.styl +52 -52
  283. package/source/components/SearchPage/SearchChips/SearchChips.tsx +76 -76
  284. package/source/components/SearchPage/SearchTopBar/SearchTopBar.styl +109 -109
  285. package/source/components/SearchPage/SearchTopBar/SearchTopBar.tsx +116 -116
  286. package/source/components/SearchPageMobile/FiltersContainer/FiltersContainer.styl +44 -44
  287. package/source/components/SearchPageMobile/FiltersContainer/FiltersContainer.tsx +162 -162
  288. package/source/components/SearchPageMobile/FiltersDetailed/BodyType.styl +47 -47
  289. package/source/components/SearchPageMobile/FiltersDetailed/BodyType.tsx +85 -85
  290. package/source/components/SearchPageMobile/FiltersDetailed/Consumption.styl +48 -48
  291. package/source/components/SearchPageMobile/FiltersDetailed/Consumption.tsx +76 -76
  292. package/source/components/SearchPageMobile/FiltersDetailed/Doors.styl +52 -52
  293. package/source/components/SearchPageMobile/FiltersDetailed/Doors.tsx +103 -103
  294. package/source/components/SearchPageMobile/FiltersDetailed/FirstRegistration.tsx +69 -69
  295. package/source/components/SearchPageMobile/FiltersDetailed/Fuel.styl +31 -31
  296. package/source/components/SearchPageMobile/FiltersDetailed/Fuel.tsx +83 -83
  297. package/source/components/SearchPageMobile/FiltersDetailed/HistogramSlider.styl +100 -100
  298. package/source/components/SearchPageMobile/FiltersDetailed/MakeModel.styl +95 -95
  299. package/source/components/SearchPageMobile/FiltersDetailed/MakeModel.tsx +171 -171
  300. package/source/components/SearchPageMobile/FiltersDetailed/MakeModelExclude.styl +112 -112
  301. package/source/components/SearchPageMobile/FiltersDetailed/MakeModelExclude.tsx +122 -122
  302. package/source/components/SearchPageMobile/FiltersDetailed/Mileage.tsx +80 -80
  303. package/source/components/SearchPageMobile/FiltersDetailed/Power.tsx +116 -116
  304. package/source/components/SearchPageMobile/FiltersDetailed/Price.tsx +129 -129
  305. package/source/components/SearchPageMobile/FiltersDetailed/Rate.tsx +252 -252
  306. package/source/components/SearchPageMobile/FiltersDetailed/Seats.styl +41 -41
  307. package/source/components/SearchPageMobile/FiltersDetailed/Seats.tsx +85 -85
  308. package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.story.js +834 -834
  309. package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.story.styl +40 -40
  310. package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.styl +37 -37
  311. package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.tsx +130 -130
  312. package/source/components/SearchWidget/ColorWidget/BodyColorWidget.styl +54 -54
  313. package/source/components/SearchWidget/ColorWidget/BodyColorWidget.tsx +122 -122
  314. package/source/components/SearchWidget/DriveTransmissionWidget/DriveTransmissionWidget.styl +17 -17
  315. package/source/components/SearchWidget/DriveTransmissionWidget/DriveTransmissionWidget.tsx +36 -36
  316. package/source/components/SearchWidget/EnvironmentWidget/DetailedEnvironmentWidget.styl +25 -25
  317. package/source/components/SearchWidget/EnvironmentWidget/DetailedEnvironmentWidget.tsx +126 -126
  318. package/source/components/SearchWidget/EnvironmentWidget/EnvironmentWidget.styl +54 -54
  319. package/source/components/SearchWidget/EnvironmentWidget/EnvironmentWidget.tsx +173 -173
  320. package/source/components/SearchWidget/HighlightsWidget/HighlightsWidget.styl +39 -39
  321. package/source/components/SearchWidget/HighlightsWidget/HighlightsWidget.tsx +99 -99
  322. package/source/components/SearchWidget/InteriorWidget/DetailedInteriorWidget.tsx +44 -44
  323. package/source/components/SearchWidget/InteriorWidget/InteriorWidget.styl +28 -28
  324. package/source/components/SearchWidget/InteriorWidget/InteriorWidget.tsx +42 -42
  325. package/source/components/SearchWidget/OfferDetalisWidget/OfferDetailsWidgetMobile.tsx +59 -59
  326. package/source/components/SearchWidget/SearchWidget.story.js +191 -191
  327. package/source/components/SearchWidget/SearchWidget.story.styl +5 -5
  328. package/source/components/SearchWidget/SearchWidget.styl +196 -196
  329. package/source/components/SearchWidget/SearchWidget.tsx +208 -208
  330. package/source/components/SearchWidget/StateWidget/StateWidget.styl +57 -57
  331. package/source/components/SearchWidget/StateWidget/StateWidget.tsx +106 -106
  332. package/source/components/SearchWidget/SuperAdminWidget/SuperAdminWidget.styl +10 -10
  333. package/source/components/SearchWidget/SuperAdminWidget/SuperAdminWidget.tsx +64 -64
  334. package/source/components/SearchWidget/partials/BuyCar/BuyCar.styl +19 -19
  335. package/source/components/SearchWidget/partials/BuyCar/BuyCar.tsx +162 -162
  336. package/source/components/SearchWidget/partials/DropDown/DropDown.styl +70 -70
  337. package/source/components/SearchWidget/partials/DropDown/DropDown.tsx +36 -36
  338. package/source/components/SearchWidget/partials/DropDown/MultiDropDown.tsx +76 -76
  339. package/source/components/SearchWidget/partials/DropDown/index.ts +7 -7
  340. package/source/components/SearchWidget/partials/DropDownGroup/DropDownGroup.styl +48 -48
  341. package/source/components/SearchWidget/partials/DropDownGroup/DropDownGroup.tsx +101 -101
  342. package/source/components/SearchWidget/partials/FastSearch/FastSearch.tsx +55 -55
  343. package/source/components/SearchWidget/partials/MakerFilter/MakerFilter.styl +8 -8
  344. package/source/components/SearchWidget/partials/MakerFilter/MakerFilter.tsx +69 -69
  345. package/source/components/SearchWidget/partials/PanelFilter/Item.tsx +43 -43
  346. package/source/components/SearchWidget/partials/PanelFilter/PanelFilter.styl +32 -32
  347. package/source/components/SearchWidget/partials/PanelFilter/PanelFilter.tsx +53 -53
  348. package/source/components/SearchWidget/partials/TabPanel/TabPanel.tsx +29 -29
  349. package/source/components/SearchWidget/partials/Tabs/Tab.tsx +20 -20
  350. package/source/components/SearchWidget/partials/Tabs/Tabs.styl +27 -27
  351. package/source/components/SearchWidget/partials/Tabs/Tabs.tsx +69 -69
  352. package/source/components/SearchWidget/partials/Tabs/index.ts +7 -7
  353. package/source/components/SearchWidgetsMobile/BasicDataWidgetMobile/BasicDataWidgetMobile.styl +91 -91
  354. package/source/components/SearchWidgetsMobile/BasicDataWidgetMobile/BasicDataWidgetMobile.tsx +219 -219
  355. package/source/components/SearchWidgetsMobile/EngineTransDriveWidget/EngineTransDriveWidget.styl +47 -47
  356. package/source/components/SearchWidgetsMobile/EngineTransDriveWidget/EngineTransDriveWidget.tsx +126 -126
  357. package/source/components/SearchWidgetsMobile/EquipmentsWidget/EquipmentsWidget.styl +62 -62
  358. package/source/components/SearchWidgetsMobile/EquipmentsWidget/EquipmentsWidget.styled.tsx +38 -38
  359. package/source/components/SearchWidgetsMobile/EquipmentsWidget/EquipmentsWidget.tsx +294 -294
  360. package/source/components/SearchWidgetsMobile/EquipmentsWidget/EquipmentsWidgetCategory.tsx +50 -50
  361. package/source/components/SearchWidgetsMobile/HighlightsWidgetMobile/HighlightsWidgetMobile.styl +50 -50
  362. package/source/components/SearchWidgetsMobile/HighlightsWidgetMobile/HighlightsWidgetMobile.tsx +96 -96
  363. package/source/components/SearchWidgetsMobile/InteriorWidget/InteriorWidget.styl +30 -30
  364. package/source/components/SearchWidgetsMobile/InteriorWidget/InteriorWidget.tsx +33 -33
  365. package/source/components/SearchWidgetsMobile/InteriorWidget/InteriorWidgetMobile.tsx +44 -44
  366. package/source/components/SearchWidgetsMobile/SafetyWidget/SafetyWidget.styl +45 -45
  367. package/source/components/SearchWidgetsMobile/SafetyWidget/SafetyWidget.tsx +149 -149
  368. package/source/components/SearchWidgetsMobile/StateWidget/StateWidget.styl +59 -59
  369. package/source/components/SearchWidgetsMobile/StateWidget/StateWidget.tsx +172 -172
  370. package/source/components/SearchWidgetsMobile/index.ts +18 -18
  371. package/source/components/Stepper/Step/Step.styl +46 -46
  372. package/source/components/Stepper/Step/Step.tsx +44 -44
  373. package/source/components/Stepper/Stepper.story.js +119 -119
  374. package/source/components/Stepper/Stepper.story.styl +41 -41
  375. package/source/components/Stepper/Stepper.styl +10 -10
  376. package/source/components/Stepper/Stepper.tsx +68 -68
  377. package/source/components/Stepper/StepsDivider/StepsDivider.styl +15 -15
  378. package/source/components/Stepper/StepsDivider/StepsDivider.tsx +23 -23
  379. package/source/components/Theme.story.js +36 -36
  380. package/source/components/Theme.story.styl +85 -85
  381. package/source/components/TickerText/TickerText.story.js +17 -17
  382. package/source/components/TickerText/TickerText.styl +43 -43
  383. package/source/components/TickerText/TickerText.tsx +24 -24
  384. package/source/components/UserDashboardPage/sections/CheckoutSection/CheckoutSection.styl +38 -38
  385. package/source/components/UserDashboardPage/sections/CheckoutSection/CheckoutSection.tsx +120 -120
  386. package/source/components/UserDashboardPage/sections/FavoriteSection/FavoriteSection.styl +21 -21
  387. package/source/components/UserDashboardPage/sections/FavoriteSection/FavoriteSection.tsx +84 -84
  388. package/source/components/UserDashboardPage/sections/OrderStatusSection/AdditionalOrderInfo.styl +100 -100
  389. package/source/components/UserDashboardPage/sections/OrderStatusSection/AdditionalOrderInfo.tsx +90 -90
  390. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusCar.tsx +149 -149
  391. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusCard.styl +53 -53
  392. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusCard.tsx +41 -41
  393. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.story.js +95 -95
  394. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.styl +166 -166
  395. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.tsx +263 -263
  396. package/source/components/UserDashboardPage/sections/RequestedCarsSection/RequestedCarsSection.story.js +97 -97
  397. package/source/components/UserDashboardPage/sections/RequestedCarsSection/RequestedCarsSection.styl +144 -144
  398. package/source/components/UserDashboardPage/sections/RequestedCarsSection/RequestedCarsSection.tsx +124 -124
  399. package/source/components/UserDashboardPage/sections/RequestedCarsSection/SupportSection.styl +46 -46
  400. package/source/components/UserDashboardPage/sections/RequestedCarsSection/SupportSection.tsx +32 -32
  401. package/source/components/Vehicle/VehicleConsumption/VehicleConsumption.styl +10 -10
  402. package/source/components/Vehicle/VehicleConsumption/VehicleConsumption.tsx +44 -44
  403. package/source/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.story.js +247 -247
  404. package/source/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.styl +148 -148
  405. package/source/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.tsx +163 -163
  406. package/source/components/VehicleCompared/CompareGeneral/CompareGeneral.story.js +30 -30
  407. package/source/components/VehicleCompared/CompareGeneral/CompareGeneral.styl +49 -49
  408. package/source/components/VehicleCompared/CompareGeneral/CompareGeneral.tsx +55 -55
  409. package/source/components/VehicleCompared/ComparePrice/ComparePrice.story.js +18 -18
  410. package/source/components/VehicleCompared/ComparePrice/ComparePrice.styl +17 -17
  411. package/source/components/VehicleCompared/ComparePrice/ComparePrice.tsx +33 -33
  412. package/source/components/VehicleCompared/CompareTitle/CompareTitle.story.js +19 -19
  413. package/source/components/VehicleCompared/CompareTitle/CompareTitle.styl +38 -38
  414. package/source/components/VehicleCompared/CompareTitle/CompareTitle.tsx +32 -32
  415. package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.story.js +44 -44
  416. package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.styl +36 -36
  417. package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.tsx +208 -208
  418. package/source/components/VehicleDetailedSidebar/partials/Price.styl +27 -27
  419. package/source/components/VehicleDetailedSidebar/partials/Price.tsx +41 -41
  420. package/source/components/VehicleDetailedSidebar/partials/PriceContent.styl +123 -123
  421. package/source/components/VehicleDetailedSidebar/partials/PriceContent.tsx +128 -128
  422. package/source/components/VehicleDetailedSidebar/partials/Properties.styl +53 -53
  423. package/source/components/VehicleDetailedSidebar/partials/Properties.tsx +117 -117
  424. package/source/components/VehicleDetailedSidebar/partials/Title.styl +35 -35
  425. package/source/components/VehicleDetailedSidebar/partials/Title.tsx +33 -33
  426. package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.story.js +120 -120
  427. package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.styl +146 -146
  428. package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.tsx +376 -377
  429. package/source/components/VehicleDetailedSlider/partials/MobileStast.tsx +61 -61
  430. package/source/components/VehicleDetailedSlider/partials/MobileStats.styl +71 -71
  431. package/source/components/VehicleDetailedSlider/partials/PriceData.styl +50 -50
  432. package/source/components/VehicleDetailedSlider/partials/PriceData.tsx +44 -44
  433. package/source/components/VehicleDetailedSlider/partials/Stats.styl +80 -80
  434. package/source/components/VehicleDetailedSlider/partials/Stats.tsx +62 -62
  435. package/source/components/VehicleDetailedSlider/partials/Title.styl +44 -44
  436. package/source/components/VehicleDetailedSlider/partials/Title.tsx +36 -36
  437. package/source/components/VehiclePromoSlider/VehiclePromoInfo/VehiclePromoInfo.story.js +42 -42
  438. package/source/components/VehiclePromoSlider/VehiclePromoInfo/VehiclePromoInfo.styl +298 -298
  439. package/source/components/VehiclePromoSlider/VehiclePromoInfo/VehiclePromoInfo.tsx +201 -201
  440. package/source/components/VehiclePromoSlider/VehiclePromoSlide/VehiclePromoSlide.story.js +62 -62
  441. package/source/components/VehiclePromoSlider/VehiclePromoSlide/VehiclePromoSlide.styl +263 -263
  442. package/source/components/VehiclePromoSlider/VehiclePromoSlide/VehiclePromoSlide.tsx +141 -141
  443. package/source/components/VehiclePromoSlider/VehiclePromoSlider.story.js +42 -42
  444. package/source/components/VehiclePromoSlider/VehiclePromoSlider.styl +122 -122
  445. package/source/components/VehiclePromoSlider/VehiclePromoSlider.tsx +111 -111
  446. package/source/components/VehiclePromoSlider/cars.js +220 -220
  447. package/source/components/VehicleSmallCard/SeoText/SeoText.styl +8 -8
  448. package/source/components/VehicleSmallCard/SeoText/SeoText.tsx +16 -16
  449. package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.styl +162 -162
  450. package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx +190 -190
  451. package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.styl +218 -218
  452. package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.tsx +154 -154
  453. package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.styl +164 -164
  454. package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.tsx +288 -288
  455. package/source/components/VehicleSmallCard/VehicleData/VehicleProperty/VehicleProperty.styl +21 -21
  456. package/source/components/VehicleSmallCard/VehicleData/VehicleProperty/VehicleProperty.tsx +32 -32
  457. package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.styl +135 -135
  458. package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.tsx +91 -91
  459. package/source/components/VehicleSmallCard/VehicleSmallCard.story.js +412 -412
  460. package/source/components/VehicleSmallCard/VehicleSmallCard.story.styl +55 -55
  461. package/source/components/VehicleSmallCard/VehicleSmallCard.styl +244 -244
  462. package/source/components/VehicleSmallCard/VehicleSmallCard.tsx +404 -404
  463. package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.story.js +199 -199
  464. package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.story.styl +40 -40
  465. package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.styl +150 -150
  466. package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.tsx +185 -185
  467. package/source/components/_common/Accordion/Accordion.story.js +36 -36
  468. package/source/components/_common/Accordion/Accordion.styl +2 -2
  469. package/source/components/_common/Accordion/Accordion.tsx +132 -132
  470. package/source/components/_common/Accordion/AccordionTitle/AccordionTitle.styl +49 -49
  471. package/source/components/_common/Accordion/AccordionTitle/AccordionTitle.tsx +33 -33
  472. package/source/components/_common/AccordionWrapper/AccordionItem/AccordionItem.styl +34 -34
  473. package/source/components/_common/AccordionWrapper/AccordionItem/AccordionItem.tsx +64 -64
  474. package/source/components/_common/AccordionWrapper/AccordionWrapper.tsx +34 -34
  475. package/source/components/_common/Badge/Badge.story.js +27 -27
  476. package/source/components/_common/Badge/Badge.story.styl +5 -5
  477. package/source/components/_common/Badge/Badge.styl +44 -44
  478. package/source/components/_common/Badge/Badge.tsx +25 -25
  479. package/source/components/_common/BodyTypeIcons/Audi.tsx +9 -9
  480. package/source/components/_common/BodyTypeIcons/Bmw.tsx +860 -860
  481. package/source/components/_common/BodyTypeIcons/Ford.tsx +31 -31
  482. package/source/components/_common/BodyTypeIcons/IconsConfig.tsx +44 -44
  483. package/source/components/_common/BodyTypeIcons/IconsConfigCompact.tsx +30 -30
  484. package/source/components/_common/BodyTypeIcons/Mazda.tsx +44 -44
  485. package/source/components/_common/BodyTypeIcons/MercedesBenz.tsx +38 -38
  486. package/source/components/_common/BodyTypeIcons/Opel.tsx +19 -19
  487. package/source/components/_common/BodyTypeIcons/Search.tsx +19 -19
  488. package/source/components/_common/BodyTypeIcons/SelectorCategoryCombi.tsx +68 -68
  489. package/source/components/_common/BodyTypeIcons/SelectorCategoryCompact.tsx +20 -20
  490. package/source/components/_common/BodyTypeIcons/SelectorCategoryConvertible.tsx +68 -68
  491. package/source/components/_common/BodyTypeIcons/SelectorCategoryCoupe.tsx +60 -60
  492. package/source/components/_common/BodyTypeIcons/SelectorCategoryMinibus.tsx +64 -64
  493. package/source/components/_common/BodyTypeIcons/SelectorCategorySedan.tsx +69 -69
  494. package/source/components/_common/BodyTypeIcons/SelectorCategorySuv.tsx +77 -77
  495. package/source/components/_common/BodyTypeIcons/SelectorCategoryTransporter.tsx +68 -68
  496. package/source/components/_common/BodyTypeIcons/SelectorCategoryVan.tsx +72 -72
  497. package/source/components/_common/BodyTypeIcons/Volkswagen.tsx +330 -330
  498. package/source/components/_common/BodyTypeIcons/index.ts +17 -17
  499. package/source/components/_common/Bubble/Bubble.story.js +52 -52
  500. package/source/components/_common/Bubble/Bubble.styl +53 -53
  501. package/source/components/_common/Bubble/Bubble.tsx +37 -37
  502. package/source/components/_common/Button/Button.story.js +52 -52
  503. package/source/components/_common/Button/Button.story.styl +5 -5
  504. package/source/components/_common/Button/Button.styl +12 -12
  505. package/source/components/_common/Button/Button.styled.tsx +51 -51
  506. package/source/components/_common/Button/Button.tsx +79 -79
  507. package/source/components/_common/ButtonOld/Button.story.js +54 -54
  508. package/source/components/_common/ButtonOld/Button.story.styl +5 -5
  509. package/source/components/_common/ButtonOld/Button.styl +65 -65
  510. package/source/components/_common/ButtonOld/Button.tsx +84 -84
  511. package/source/components/_common/Checkbox/Checkbox.story.js +85 -85
  512. package/source/components/_common/Checkbox/Checkbox.story.styl +14 -14
  513. package/source/components/_common/Checkbox/Checkbox.styl +119 -119
  514. package/source/components/_common/Checkbox/Checkbox.tsx +151 -151
  515. package/source/components/_common/Checkbox/FormCheckbox.styl +22 -22
  516. package/source/components/_common/Checkbox/FormCheckbox.tsx +86 -86
  517. package/source/components/_common/Checkbox/index.js +4 -4
  518. package/source/components/_common/CheckboxMaterial/CheckboxMaterial.story.js +126 -126
  519. package/source/components/_common/CheckboxMaterial/CheckboxMaterial.story.styl +14 -14
  520. package/source/components/_common/CheckboxMaterial/CheckboxMaterial.styl +155 -155
  521. package/source/components/_common/CheckboxMaterial/CheckboxMaterial.tsx +210 -210
  522. package/source/components/_common/Chip/Chip.story.js +43 -43
  523. package/source/components/_common/Chip/Chip.styl +69 -69
  524. package/source/components/_common/Chip/Chip.tsx +38 -38
  525. package/source/components/_common/ChipList/ChipList.story.js +36 -36
  526. package/source/components/_common/ChipList/ChipList.styl +80 -80
  527. package/source/components/_common/ChipList/ChipList.tsx +58 -58
  528. package/source/components/_common/Co2Widget/CO2Efficiency.styl +114 -114
  529. package/source/components/_common/Co2Widget/CO2Efficiency.tsx +49 -49
  530. package/source/components/_common/Divider/Divider.styl +8 -8
  531. package/source/components/_common/Divider/Divider.tsx +16 -16
  532. package/source/components/_common/DoorSelector/DoorSelector.styl +35 -35
  533. package/source/components/_common/DoorSelector/DoorSelector.tsx +39 -39
  534. package/source/components/_common/DropDown/DropDown.story.js +35 -35
  535. package/source/components/_common/DropDown/DropDown.styl +129 -129
  536. package/source/components/_common/DropDown/DropDown.tsx +111 -111
  537. package/source/components/_common/DropDown/DropDownComponents.tsx +53 -53
  538. package/source/components/_common/DropDown/DropDownGroup.styl +20 -20
  539. package/source/components/_common/DropDown/DropDownGroup.tsx +136 -136
  540. package/source/components/_common/DropDown/FormDropDown.styl +35 -35
  541. package/source/components/_common/DropDown/FormDropDown.tsx +53 -53
  542. package/source/components/_common/DropDown/MultiDropDown.tsx +84 -84
  543. package/source/components/_common/DropDown/index.ts +7 -7
  544. package/source/components/_common/ExpandablePanel/ExpandablePanel.story.js +41 -41
  545. package/source/components/_common/ExpandablePanel/ExpandablePanel.styl +19 -19
  546. package/source/components/_common/ExpandablePanel/ExpandablePanel.tsx +88 -88
  547. package/source/components/_common/ExpansionPanel/ExpansionPanel.styl +36 -36
  548. package/source/components/_common/ExpansionPanel/ExpansionPanel.styled.tsx +28 -28
  549. package/source/components/_common/ExpansionPanel/ExpansionPanel.tsx +99 -99
  550. package/source/components/_common/FilterLabel/FilterLabel.styl +25 -25
  551. package/source/components/_common/FilterLabel/FilterLabel.tsx +27 -27
  552. package/source/components/_common/Histogram/Histogram.story.js +51 -51
  553. package/source/components/_common/IconContainer/IconContainer.styl +23 -23
  554. package/source/components/_common/IconContainer/IconContainer.tsx +34 -34
  555. package/source/components/_common/IconSVG/IconSVG.story.js +21 -21
  556. package/source/components/_common/IconSVG/IconSVG.story.styl +25 -25
  557. package/source/components/_common/IconSVG/IconSVG.tsx +30 -30
  558. package/source/components/_common/IconSVG/IconSVGConfig.tsx +768 -768
  559. package/source/components/_common/IconSVG/SVG/AboPartner.tsx +16 -16
  560. package/source/components/_common/IconSVG/SVG/ArrowQuotes.tsx +22 -22
  561. package/source/components/_common/IconSVG/SVG/CloseIcon.tsx +17 -17
  562. package/source/components/_common/IconSVG/SVG/CloseIconSelect.tsx +18 -18
  563. package/source/components/_common/IconSVG/SVG/ClosedLockIcon.tsx +18 -18
  564. package/source/components/_common/IconSVG/SVG/DealerCheckIcon.tsx +18 -18
  565. package/source/components/_common/IconSVG/SVG/DealerPopoverMail.tsx +21 -21
  566. package/source/components/_common/IconSVG/SVG/DealerPopoverPhone.tsx +21 -21
  567. package/source/components/_common/IconSVG/SVG/GrayPhoneIcon.tsx +22 -22
  568. package/source/components/_common/IconSVG/SVG/InternetIcon.tsx +18 -18
  569. package/source/components/_common/IconSVG/SVG/WhiteEnvelopeIcon.tsx +21 -21
  570. package/source/components/_common/IconSVG/SVG/bodyType/Cabrio.tsx +23 -23
  571. package/source/components/_common/IconSVG/SVG/bodyType/Coupe.tsx +22 -22
  572. package/source/components/_common/IconSVG/SVG/bodyType/Minibus.tsx +22 -22
  573. package/source/components/_common/IconSVG/SVG/bodyType/Other.tsx +25 -25
  574. package/source/components/_common/IconSVG/SVG/bodyType/Sedan.tsx +22 -22
  575. package/source/components/_common/IconSVG/SVG/bodyType/SelectorCategoryCombi.tsx +68 -68
  576. package/source/components/_common/IconSVG/SVG/bodyType/SelectorCategoryCompact.tsx +20 -20
  577. package/source/components/_common/IconSVG/SVG/bodyType/SelectorCategoryConvertible.tsx +68 -68
  578. package/source/components/_common/IconSVG/SVG/bodyType/SelectorCategoryCoupe.tsx +60 -60
  579. package/source/components/_common/IconSVG/SVG/bodyType/SelectorCategoryMinibus.tsx +64 -64
  580. package/source/components/_common/IconSVG/SVG/bodyType/SelectorCategoryOther.tsx +60 -60
  581. package/source/components/_common/IconSVG/SVG/bodyType/SelectorCategorySedan.tsx +69 -69
  582. package/source/components/_common/IconSVG/SVG/bodyType/SelectorCategorySuv.tsx +77 -77
  583. package/source/components/_common/IconSVG/SVG/bodyType/SelectorCategoryTransporter.tsx +68 -68
  584. package/source/components/_common/IconSVG/SVG/bodyType/SelectorCategoryVan.tsx +72 -72
  585. package/source/components/_common/IconSVG/SVG/bodyType/Small.tsx +23 -23
  586. package/source/components/_common/IconSVG/SVG/bodyType/Suv.tsx +23 -23
  587. package/source/components/_common/IconSVG/SVG/bodyType/Van.tsx +23 -23
  588. package/source/components/_common/IconSVG/SVG/bodyType/Wagon.tsx +23 -23
  589. package/source/components/_common/IconSVG/SVG/common/AddIcon.tsx +16 -16
  590. package/source/components/_common/IconSVG/SVG/common/AddPlus.tsx +16 -16
  591. package/source/components/_common/IconSVG/SVG/common/AddressDashboard.tsx +29 -29
  592. package/source/components/_common/IconSVG/SVG/common/AddressIcon.tsx +20 -20
  593. package/source/components/_common/IconSVG/SVG/common/ArrowDetailedAccordionBlue.tsx +26 -26
  594. package/source/components/_common/IconSVG/SVG/common/ArrowDownBlue.tsx +21 -21
  595. package/source/components/_common/IconSVG/SVG/common/ArrowSelect.tsx +23 -23
  596. package/source/components/_common/IconSVG/SVG/common/ArrowStepDown.tsx +18 -18
  597. package/source/components/_common/IconSVG/SVG/common/Autocheck.tsx +19 -19
  598. package/source/components/_common/IconSVG/SVG/common/AutodeLogo.tsx +36 -36
  599. package/source/components/_common/IconSVG/SVG/common/Avatar.tsx +17 -17
  600. package/source/components/_common/IconSVG/SVG/common/BellGray.tsx +19 -19
  601. package/source/components/_common/IconSVG/SVG/common/BigInfoTransparent.tsx +13 -13
  602. package/source/components/_common/IconSVG/SVG/common/Browse.tsx +20 -20
  603. package/source/components/_common/IconSVG/SVG/common/Calendar.tsx +24 -24
  604. package/source/components/_common/IconSVG/SVG/common/CallbackDashboard.tsx +30 -30
  605. package/source/components/_common/IconSVG/SVG/common/Camera.tsx +17 -17
  606. package/source/components/_common/IconSVG/SVG/common/Car.tsx +16 -16
  607. package/source/components/_common/IconSVG/SVG/common/CarBody.tsx +19 -19
  608. package/source/components/_common/IconSVG/SVG/common/CarFront.tsx +43 -43
  609. package/source/components/_common/IconSVG/SVG/common/CarInspectionCheck.tsx +21 -21
  610. package/source/components/_common/IconSVG/SVG/common/CarInspectionScheme0.tsx +32 -32
  611. package/source/components/_common/IconSVG/SVG/common/CarInspectionScheme1.tsx +53 -53
  612. package/source/components/_common/IconSVG/SVG/common/CarInspectionScheme2.tsx +52 -52
  613. package/source/components/_common/IconSVG/SVG/common/CarInspectionScheme3.tsx +32 -32
  614. package/source/components/_common/IconSVG/SVG/common/CarInspectionScheme4.tsx +32 -32
  615. package/source/components/_common/IconSVG/SVG/common/CarInspectionScheme5.tsx +32 -32
  616. package/source/components/_common/IconSVG/SVG/common/CarInspectionScheme6.tsx +32 -32
  617. package/source/components/_common/IconSVG/SVG/common/CarInspectionSchemeGeneral copy.tsx +24 -24
  618. package/source/components/_common/IconSVG/SVG/common/CarInspectionSchemeGeneral.tsx +24 -24
  619. package/source/components/_common/IconSVG/SVG/common/CheckBlue.tsx +18 -18
  620. package/source/components/_common/IconSVG/SVG/common/CheckGreen.tsx +22 -22
  621. package/source/components/_common/IconSVG/SVG/common/CheckMark.tsx +16 -16
  622. package/source/components/_common/IconSVG/SVG/common/CheckWhite.tsx +19 -19
  623. package/source/components/_common/IconSVG/SVG/common/Chevron.tsx +17 -17
  624. package/source/components/_common/IconSVG/SVG/common/CircledCheckmark.tsx +25 -25
  625. package/source/components/_common/IconSVG/SVG/common/Clock.tsx +18 -18
  626. package/source/components/_common/IconSVG/SVG/common/Close.tsx +19 -19
  627. package/source/components/_common/IconSVG/SVG/common/CloseGrey.tsx +22 -22
  628. package/source/components/_common/IconSVG/SVG/common/ContactEmail.tsx +21 -21
  629. package/source/components/_common/IconSVG/SVG/common/ContactPhone.tsx +28 -28
  630. package/source/components/_common/IconSVG/SVG/common/CopyIcon copy.tsx +22 -22
  631. package/source/components/_common/IconSVG/SVG/common/CopyIcon.tsx +22 -22
  632. package/source/components/_common/IconSVG/SVG/common/CopyIconForDealer.tsx +21 -21
  633. package/source/components/_common/IconSVG/SVG/common/DashboardIcon.tsx +20 -20
  634. package/source/components/_common/IconSVG/SVG/common/DashboardQuestionMark.tsx +20 -20
  635. package/source/components/_common/IconSVG/SVG/common/DealersIcon.tsx +20 -20
  636. package/source/components/_common/IconSVG/SVG/common/DeleteCircle.tsx +31 -31
  637. package/source/components/_common/IconSVG/SVG/common/DeleteV1Icon.tsx +18 -18
  638. package/source/components/_common/IconSVG/SVG/common/DeliveryDashboard.tsx +25 -25
  639. package/source/components/_common/IconSVG/SVG/common/DeliveryMail.tsx +24 -24
  640. package/source/components/_common/IconSVG/SVG/common/Discount100De.tsx +18 -18
  641. package/source/components/_common/IconSVG/SVG/common/Discount100En.tsx +19 -19
  642. package/source/components/_common/IconSVG/SVG/common/Discount66De.tsx +28 -28
  643. package/source/components/_common/IconSVG/SVG/common/Discount66En.tsx +20 -20
  644. package/source/components/_common/IconSVG/SVG/common/DoneIcon.tsx +18 -18
  645. package/source/components/_common/IconSVG/SVG/common/EditCircle.tsx +32 -32
  646. package/source/components/_common/IconSVG/SVG/common/EditPriceIcon.tsx +20 -20
  647. package/source/components/_common/IconSVG/SVG/common/EuroCurrency.tsx +18 -18
  648. package/source/components/_common/IconSVG/SVG/common/Export.tsx +20 -20
  649. package/source/components/_common/IconSVG/SVG/common/Eye.tsx +17 -17
  650. package/source/components/_common/IconSVG/SVG/common/EyeCatch.tsx +19 -19
  651. package/source/components/_common/IconSVG/SVG/common/FavoritesIcon.tsx +20 -20
  652. package/source/components/_common/IconSVG/SVG/common/FilterRange.tsx +16 -16
  653. package/source/components/_common/IconSVG/SVG/common/FilterToolBlack.tsx +23 -23
  654. package/source/components/_common/IconSVG/SVG/common/FlagDe.tsx +21 -21
  655. package/source/components/_common/IconSVG/SVG/common/FlagEn.tsx +43 -43
  656. package/source/components/_common/IconSVG/SVG/common/GrayEnvelopeIcon.tsx +19 -19
  657. package/source/components/_common/IconSVG/SVG/common/HamburgerMenuIcon.tsx +18 -18
  658. package/source/components/_common/IconSVG/SVG/common/HandingOverDashboard.tsx +32 -32
  659. package/source/components/_common/IconSVG/SVG/common/ImageSettingsIcon.tsx +20 -20
  660. package/source/components/_common/IconSVG/SVG/common/Info.tsx +16 -16
  661. package/source/components/_common/IconSVG/SVG/common/InfoIcon.tsx +17 -17
  662. package/source/components/_common/IconSVG/SVG/common/InfoTransparent.tsx +18 -18
  663. package/source/components/_common/IconSVG/SVG/common/LogoutIcon.tsx +20 -20
  664. package/source/components/_common/IconSVG/SVG/common/MagnifyingGlass.tsx +31 -31
  665. package/source/components/_common/IconSVG/SVG/common/MenuArrow.tsx +16 -16
  666. package/source/components/_common/IconSVG/SVG/common/MenuGrey.tsx +22 -22
  667. package/source/components/_common/IconSVG/SVG/common/MobileDeLogo.tsx +108 -108
  668. package/source/components/_common/IconSVG/SVG/common/MyOrderIcon.tsx +20 -20
  669. package/source/components/_common/IconSVG/SVG/common/MyVehiclesIcon.tsx +20 -20
  670. package/source/components/_common/IconSVG/SVG/common/NewFlagDe.tsx +25 -25
  671. package/source/components/_common/IconSVG/SVG/common/NewFlagEn.tsx +34 -34
  672. package/source/components/_common/IconSVG/SVG/common/OrderReceivedDashboard.tsx +27 -27
  673. package/source/components/_common/IconSVG/SVG/common/Package.tsx +30 -30
  674. package/source/components/_common/IconSVG/SVG/common/Phone.tsx +18 -18
  675. package/source/components/_common/IconSVG/SVG/common/PhoneGrey.tsx +22 -22
  676. package/source/components/_common/IconSVG/SVG/common/PickupDashboard.tsx +30 -30
  677. package/source/components/_common/IconSVG/SVG/common/Picture.tsx +24 -24
  678. package/source/components/_common/IconSVG/SVG/common/Pictures.tsx +32 -32
  679. package/source/components/_common/IconSVG/SVG/common/Plus.tsx +16 -16
  680. package/source/components/_common/IconSVG/SVG/common/PlusNew.tsx +16 -16
  681. package/source/components/_common/IconSVG/SVG/common/PreparationDashboard.tsx +29 -29
  682. package/source/components/_common/IconSVG/SVG/common/ProfileDashboard.tsx +24 -24
  683. package/source/components/_common/IconSVG/SVG/common/ProfileIcon.tsx +17 -17
  684. package/source/components/_common/IconSVG/SVG/common/Question.tsx +19 -19
  685. package/source/components/_common/IconSVG/SVG/common/QuestionBold.tsx +25 -25
  686. package/source/components/_common/IconSVG/SVG/common/RegistrationDashboard.tsx +31 -31
  687. package/source/components/_common/IconSVG/SVG/common/SavedSearchsIcon.tsx +20 -20
  688. package/source/components/_common/IconSVG/SVG/common/Search.tsx +19 -19
  689. package/source/components/_common/IconSVG/SVG/common/SearchGrey.tsx +22 -22
  690. package/source/components/_common/IconSVG/SVG/common/SettingPenIcon.tsx +20 -20
  691. package/source/components/_common/IconSVG/SVG/common/Share.tsx +16 -16
  692. package/source/components/_common/IconSVG/SVG/common/ShoppingCart.tsx +18 -18
  693. package/source/components/_common/IconSVG/SVG/common/SliderArrow.tsx +21 -21
  694. package/source/components/_common/IconSVG/SVG/common/SliderEye.tsx +17 -17
  695. package/source/components/_common/IconSVG/SVG/common/SortUpDownArrows.tsx +18 -18
  696. package/source/components/_common/IconSVG/SVG/common/Speedometer.tsx +23 -23
  697. package/source/components/_common/IconSVG/SVG/common/Star.tsx +20 -20
  698. package/source/components/_common/IconSVG/SVG/common/StarNew.tsx +16 -16
  699. package/source/components/_common/IconSVG/SVG/common/StarOutline.tsx +20 -20
  700. package/source/components/_common/IconSVG/SVG/common/StarRoundedCorners.tsx +18 -18
  701. package/source/components/_common/IconSVG/SVG/common/Stats.tsx +17 -17
  702. package/source/components/_common/IconSVG/SVG/common/Step1.tsx +21 -21
  703. package/source/components/_common/IconSVG/SVG/common/Step2.tsx +20 -20
  704. package/source/components/_common/IconSVG/SVG/common/Step3.tsx +21 -21
  705. package/source/components/_common/IconSVG/SVG/common/SupportCallbackIcon.tsx +20 -20
  706. package/source/components/_common/IconSVG/SVG/common/Telephone.tsx +22 -22
  707. package/source/components/_common/IconSVG/SVG/common/Time.tsx +17 -17
  708. package/source/components/_common/IconSVG/SVG/common/Timetable.tsx +18 -18
  709. package/source/components/_common/IconSVG/SVG/common/Trash.tsx +22 -22
  710. package/source/components/_common/IconSVG/SVG/common/TrashRed.tsx +23 -23
  711. package/source/components/_common/IconSVG/SVG/common/Upload.tsx +17 -17
  712. package/source/components/_common/IconSVG/SVG/common/UserGrey.tsx +22 -22
  713. package/source/components/_common/IconSVG/SVG/common/UserProfileIcon.tsx +20 -20
  714. package/source/components/_common/IconSVG/SVG/common/ValidateFailure.tsx +21 -21
  715. package/source/components/_common/IconSVG/SVG/common/ValidateSuccess.tsx +21 -21
  716. package/source/components/_common/IconSVG/SVG/common/WarningTriangle.tsx +20 -20
  717. package/source/components/_common/IconSVG/SVG/common/WhiteArrowUp.tsx +21 -21
  718. package/source/components/_common/IconSVG/SVG/common/WhiteKey.tsx +21 -21
  719. package/source/components/_common/IconSVG/SVG/common/WhitePeople.tsx +23 -23
  720. package/source/components/_common/IconSVG/SVG/common/WhiteTick.tsx +19 -19
  721. package/source/components/_common/IconSVG/SVG/flags/AT.tsx +19 -19
  722. package/source/components/_common/IconSVG/SVG/flags/BE.tsx +20 -20
  723. package/source/components/_common/IconSVG/SVG/flags/BG.tsx +20 -20
  724. package/source/components/_common/IconSVG/SVG/flags/CH.tsx +22 -22
  725. package/source/components/_common/IconSVG/SVG/flags/CZ.tsx +18 -18
  726. package/source/components/_common/IconSVG/SVG/flags/DE.tsx +18 -18
  727. package/source/components/_common/IconSVG/SVG/flags/DK.tsx +18 -18
  728. package/source/components/_common/IconSVG/SVG/flags/ES.tsx +2585 -2585
  729. package/source/components/_common/IconSVG/SVG/flags/FI.tsx +18 -18
  730. package/source/components/_common/IconSVG/SVG/flags/FR.tsx +20 -20
  731. package/source/components/_common/IconSVG/SVG/flags/GB.tsx +26 -26
  732. package/source/components/_common/IconSVG/SVG/flags/HR.tsx +135 -135
  733. package/source/components/_common/IconSVG/SVG/flags/HU.tsx +20 -20
  734. package/source/components/_common/IconSVG/SVG/flags/IT.tsx +20 -20
  735. package/source/components/_common/IconSVG/SVG/flags/LI.tsx +106 -106
  736. package/source/components/_common/IconSVG/SVG/flags/LU.tsx +18 -18
  737. package/source/components/_common/IconSVG/SVG/flags/NL.tsx +18 -18
  738. package/source/components/_common/IconSVG/SVG/flags/NO.tsx +20 -20
  739. package/source/components/_common/IconSVG/SVG/flags/PL.tsx +19 -19
  740. package/source/components/_common/IconSVG/SVG/flags/RO.tsx +20 -20
  741. package/source/components/_common/IconSVG/SVG/flags/RU.tsx +20 -20
  742. package/source/components/_common/IconSVG/SVG/flags/SE.tsx +20 -20
  743. package/source/components/_common/IconSVG/SVG/flags/SI.tsx +54 -54
  744. package/source/components/_common/IconSVG/SVG/flags/SK.tsx +34 -34
  745. package/source/components/_common/IconSVG/SVG/flags/UA.tsx +19 -19
  746. package/source/components/_common/IconSVG/SVG/infoBlocks/14DaysReturnPolicy.tsx +18 -18
  747. package/source/components/_common/IconSVG/SVG/infoBlocks/AlertInfo.tsx +19 -19
  748. package/source/components/_common/IconSVG/SVG/infoBlocks/Autocheck.tsx +19 -19
  749. package/source/components/_common/IconSVG/SVG/infoBlocks/CheckTheStory.tsx +22 -22
  750. package/source/components/_common/IconSVG/SVG/infoBlocks/CustomerServiceWhite.tsx +16 -16
  751. package/source/components/_common/IconSVG/SVG/infoBlocks/Guarantee.tsx +16 -16
  752. package/source/components/_common/IconSVG/SVG/infoBlocks/OrderWhite.tsx +13 -13
  753. package/source/components/_common/IconSVG/SVG/infoBlocks/PriceGuarantee.tsx +19 -19
  754. package/source/components/_common/IconSVG/SVG/infoBlocks/PriceGuaranteeWhite.tsx +17 -17
  755. package/source/components/_common/IconSVG/SVG/infoBlocks/TransportAndDelivery.tsx +21 -21
  756. package/source/components/_common/IconSVG/SVG/infoBlocks/Warranty.tsx +23 -23
  757. package/source/components/_common/IconSVG/SVG/popower/Mail.tsx +18 -18
  758. package/source/components/_common/IconSVG/SVG/popower/Phone.tsx +19 -19
  759. package/source/components/_common/IconSVG/SVG/popower/Schedule.tsx +18 -18
  760. package/source/components/_common/IconSVG/SVG/searchWidgets/drive/AAllWheelDrive.tsx +26 -26
  761. package/source/components/_common/IconSVG/SVG/searchWidgets/drive/AllWheelDrive.tsx +26 -26
  762. package/source/components/_common/IconSVG/SVG/searchWidgets/drive/FrontWheelDrive.tsx +25 -25
  763. package/source/components/_common/IconSVG/SVG/searchWidgets/drive/OtherWheelDrive.tsx +26 -26
  764. package/source/components/_common/IconSVG/SVG/searchWidgets/drive/RearWheelDrive.tsx +25 -25
  765. package/source/components/_common/IconSVG/SVG/searchWidgets/fuel/FuelDiesel.tsx +18 -18
  766. package/source/components/_common/IconSVG/SVG/searchWidgets/fuel/FuelElectrical.tsx +19 -19
  767. package/source/components/_common/IconSVG/SVG/searchWidgets/fuel/FuelElectricalDiesel.tsx +34 -34
  768. package/source/components/_common/IconSVG/SVG/searchWidgets/fuel/FuelElectricalPetrol.tsx +20 -20
  769. package/source/components/_common/IconSVG/SVG/searchWidgets/fuel/FuelEthanol.tsx +53 -53
  770. package/source/components/_common/IconSVG/SVG/searchWidgets/fuel/FuelHydrogen.tsx +24 -24
  771. package/source/components/_common/IconSVG/SVG/searchWidgets/fuel/FuelLpg.tsx +24 -24
  772. package/source/components/_common/IconSVG/SVG/searchWidgets/fuel/FuelNaturalGas.tsx +23 -23
  773. package/source/components/_common/IconSVG/SVG/searchWidgets/fuel/FuelOther.tsx +28 -28
  774. package/source/components/_common/IconSVG/SVG/searchWidgets/fuel/FuelPetrol.tsx +18 -18
  775. package/source/components/_common/IconSVG/SVG/settings/Account.tsx +17 -17
  776. package/source/components/_common/IconSVG/SVG/settings/DataUsage.tsx +17 -17
  777. package/source/components/_common/IconSVG/SVG/settings/MarketResearch.tsx +17 -17
  778. package/source/components/_common/IconSVG/SVG/settings/Newsletter.tsx +17 -17
  779. package/source/components/_common/IconSVG/SVG/settings/RemoveEye.tsx +17 -17
  780. package/source/components/_common/IconSVG/SVG/settings/RemoveEyeOff.tsx +17 -17
  781. package/source/components/_common/IconSVG/SVG/settings/Security.tsx +17 -17
  782. package/source/components/_common/IconSVG/SVG/settings/Warning.tsx +17 -17
  783. package/source/components/_common/IconSVG/SVG/slider/360.tsx +23 -23
  784. package/source/components/_common/IconSVG/SVG/slider/360New.tsx +20 -20
  785. package/source/components/_common/IconSVG/SVG/slider/Checked.tsx +19 -19
  786. package/source/components/_common/IconSVG/SVG/slider/DiscountRibbon.tsx +51 -51
  787. package/source/components/_common/IconSVG/SVG/slider/DiscountRibbonMobile.tsx +47 -47
  788. package/source/components/_common/IconSVG/SVG/slider/DiscountRibbonNew.tsx +29 -29
  789. package/source/components/_common/IconSVG/SVG/slider/Easy.tsx +19 -19
  790. package/source/components/_common/IconSVG/SVG/slider/Fullscreen.tsx +16 -16
  791. package/source/components/_common/IconSVG/SVG/slider/FullscreenWindow.tsx +23 -23
  792. package/source/components/_common/IconSVG/SVG/slider/Safe.tsx +19 -19
  793. package/source/components/_common/IconSVG/SVG/slider/ToBuy.tsx +19 -19
  794. package/source/components/_common/IconSVG/SVG/slider/YoutubeButton.tsx +26 -26
  795. package/source/components/_common/IconSVG/SVG/slider/ZoomIn.tsx +21 -21
  796. package/source/components/_common/IconSVG/SVG/slider/ZoomOut.tsx +21 -21
  797. package/source/components/_common/IconSVG/SVG/social/AndroidLogo.tsx +18 -18
  798. package/source/components/_common/IconSVG/SVG/social/Apple.tsx +19 -19
  799. package/source/components/_common/IconSVG/SVG/social/FacebookF.tsx +19 -19
  800. package/source/components/_common/IconSVG/SVG/social/GooglePlusG.tsx +19 -19
  801. package/source/components/_common/IconSVG/SVG/social/Instagram.tsx +17 -17
  802. package/source/components/_common/IconSVG/SVG/social/Pinterest.tsx +19 -19
  803. package/source/components/_common/IconSVG/SVG/social/SharingInterface.tsx +21 -21
  804. package/source/components/_common/IconSVG/SVG/social/Twitter.tsx +19 -19
  805. package/source/components/_common/IconSVG/SVG/social/Youtube.tsx +19 -19
  806. package/source/components/_common/IconSVG/SVG/vehicle/AboIcon.tsx +11 -11
  807. package/source/components/_common/IconSVG/SVG/vehicle/Abs.tsx +24 -24
  808. package/source/components/_common/IconSVG/SVG/vehicle/AirCond.tsx +34 -34
  809. package/source/components/_common/IconSVG/SVG/vehicle/Airbag.tsx +21 -21
  810. package/source/components/_common/IconSVG/SVG/vehicle/AuxiliaryHeating.tsx +23 -23
  811. package/source/components/_common/IconSVG/SVG/vehicle/Bluetooth.tsx +22 -22
  812. package/source/components/_common/IconSVG/SVG/vehicle/BuyIcon.tsx +15 -15
  813. package/source/components/_common/IconSVG/SVG/vehicle/CarAvailability.tsx +22 -22
  814. package/source/components/_common/IconSVG/SVG/vehicle/CarInspectionCheck.tsx +21 -21
  815. package/source/components/_common/IconSVG/SVG/vehicle/CarInspectionCross.tsx +21 -21
  816. package/source/components/_common/IconSVG/SVG/vehicle/CheckoutChecked.tsx +15 -15
  817. package/source/components/_common/IconSVG/SVG/vehicle/Co2.tsx +24 -24
  818. package/source/components/_common/IconSVG/SVG/vehicle/CruiseControl.tsx +25 -25
  819. package/source/components/_common/IconSVG/SVG/vehicle/Date.tsx +21 -21
  820. package/source/components/_common/IconSVG/SVG/vehicle/Delivery.tsx +12 -12
  821. package/source/components/_common/IconSVG/SVG/vehicle/Diesel.tsx +28 -28
  822. package/source/components/_common/IconSVG/SVG/vehicle/Display.tsx +25 -25
  823. package/source/components/_common/IconSVG/SVG/vehicle/Done.tsx +11 -11
  824. package/source/components/_common/IconSVG/SVG/vehicle/Door.tsx +19 -19
  825. package/source/components/_common/IconSVG/SVG/vehicle/DoubleDone.tsx +18 -18
  826. package/source/components/_common/IconSVG/SVG/vehicle/EditIcon.tsx +11 -11
  827. package/source/components/_common/IconSVG/SVG/vehicle/EmergencyBrakeAssistant.tsx +27 -27
  828. package/source/components/_common/IconSVG/SVG/vehicle/Eps.tsx +24 -24
  829. package/source/components/_common/IconSVG/SVG/vehicle/Esp.tsx +24 -24
  830. package/source/components/_common/IconSVG/SVG/vehicle/FinancingIcon.tsx +20 -20
  831. package/source/components/_common/IconSVG/SVG/vehicle/FuelConsumption.tsx +20 -20
  832. package/source/components/_common/IconSVG/SVG/vehicle/Fueling.tsx +22 -22
  833. package/source/components/_common/IconSVG/SVG/vehicle/FullDrive.tsx +24 -24
  834. package/source/components/_common/IconSVG/SVG/vehicle/GasElectric.tsx +28 -28
  835. package/source/components/_common/IconSVG/SVG/vehicle/HandsFreePhoneSystem.tsx +24 -24
  836. package/source/components/_common/IconSVG/SVG/vehicle/Kw.tsx +23 -23
  837. package/source/components/_common/IconSVG/SVG/vehicle/LastCrawledAt.tsx +22 -22
  838. package/source/components/_common/IconSVG/SVG/vehicle/LeasingIcon.tsx +14 -14
  839. package/source/components/_common/IconSVG/SVG/vehicle/Led.tsx +24 -24
  840. package/source/components/_common/IconSVG/SVG/vehicle/LightSensor.tsx +22 -22
  841. package/source/components/_common/IconSVG/SVG/vehicle/LinkAlternative.tsx +15 -15
  842. package/source/components/_common/IconSVG/SVG/vehicle/Location.tsx +17 -17
  843. package/source/components/_common/IconSVG/SVG/vehicle/MinusIcon.tsx +11 -11
  844. package/source/components/_common/IconSVG/SVG/vehicle/Mirror.tsx +19 -19
  845. package/source/components/_common/IconSVG/SVG/vehicle/Navigation.tsx +27 -27
  846. package/source/components/_common/IconSVG/SVG/vehicle/NewCar.tsx +21 -21
  847. package/source/components/_common/IconSVG/SVG/vehicle/NoImage.tsx +17 -17
  848. package/source/components/_common/IconSVG/SVG/vehicle/Owner.tsx +18 -18
  849. package/source/components/_common/IconSVG/SVG/vehicle/PanoramicRoof.tsx +23 -23
  850. package/source/components/_common/IconSVG/SVG/vehicle/ParkingAssistants.tsx +24 -24
  851. package/source/components/_common/IconSVG/SVG/vehicle/PickYourself.tsx +18 -18
  852. package/source/components/_common/IconSVG/SVG/vehicle/PlusIcon.tsx +11 -11
  853. package/source/components/_common/IconSVG/SVG/vehicle/Power.tsx +21 -21
  854. package/source/components/_common/IconSVG/SVG/vehicle/Ps.tsx +19 -19
  855. package/source/components/_common/IconSVG/SVG/vehicle/Question.tsx +24 -24
  856. package/source/components/_common/IconSVG/SVG/vehicle/Seats.tsx +21 -21
  857. package/source/components/_common/IconSVG/SVG/vehicle/SeatsHeating.tsx +26 -26
  858. package/source/components/_common/IconSVG/SVG/vehicle/SelectorGearboxAutomatic.tsx +24 -24
  859. package/source/components/_common/IconSVG/SVG/vehicle/SelectorGearboxManualShift.tsx +19 -19
  860. package/source/components/_common/IconSVG/SVG/vehicle/SelectorGearboxOther.tsx +24 -24
  861. package/source/components/_common/IconSVG/SVG/vehicle/SelectorGearboxSemiAutomatic.tsx +30 -30
  862. package/source/components/_common/IconSVG/SVG/vehicle/SelectorInteriorTypeAlcantara.tsx +225 -225
  863. package/source/components/_common/IconSVG/SVG/vehicle/SelectorInteriorTypeFabric.tsx +29 -29
  864. package/source/components/_common/IconSVG/SVG/vehicle/SelectorInteriorTypeFullLeather.tsx +29 -29
  865. package/source/components/_common/IconSVG/SVG/vehicle/SelectorInteriorTypeOther.tsx +26 -26
  866. package/source/components/_common/IconSVG/SVG/vehicle/SelectorInteriorTypePartLeather.tsx +142 -142
  867. package/source/components/_common/IconSVG/SVG/vehicle/SelectorInteriorTypeSyntheticLeather.tsx +27 -27
  868. package/source/components/_common/IconSVG/SVG/vehicle/SelectorInteriorTypeVelours.tsx +39 -39
  869. package/source/components/_common/IconSVG/SVG/vehicle/Shield.tsx +39 -39
  870. package/source/components/_common/IconSVG/SVG/vehicle/Speedometer.tsx +17 -17
  871. package/source/components/_common/IconSVG/SVG/vehicle/StartStopSystem.tsx +30 -30
  872. package/source/components/_common/IconSVG/SVG/vehicle/Stop.tsx +25 -25
  873. package/source/components/_common/IconSVG/SVG/vehicle/TickMark.tsx +21 -21
  874. package/source/components/_common/IconSVG/SVG/vehicle/TrafficSignRecognition.tsx +29 -29
  875. package/source/components/_common/IconSVG/SVG/vehicle/TrailerCoupling.tsx +24 -24
  876. package/source/components/_common/IconSVG/SVG/vehicle/Transmission.tsx +27 -27
  877. package/source/components/_common/IconSVG/SVG/vehicle/Wheel.tsx +43 -43
  878. package/source/components/_common/IconSVG/SVG/vehicle/Wipers.tsx +22 -22
  879. package/source/components/_common/IconSVG/SVG/vehicle/Wrench.tsx +17 -17
  880. package/source/components/_common/Image/Image.story.js +142 -142
  881. package/source/components/_common/Image/Image.story.styl +18 -18
  882. package/source/components/_common/Image/Image.styl +109 -109
  883. package/source/components/_common/Image/Image.tsx +302 -302
  884. package/source/components/_common/ImagesSet/ImagesSet.story.js +34 -34
  885. package/source/components/_common/ImagesSet/ImagesSet.story.styl +3 -3
  886. package/source/components/_common/ImagesSet/ImagesSet.styl +27 -27
  887. package/source/components/_common/ImagesSet/ImagesSet.tsx +76 -76
  888. package/source/components/_common/Loader/Loader.story.js +21 -21
  889. package/source/components/_common/Loader/Loader.styl +39 -39
  890. package/source/components/_common/Loader/Loader.tsx +32 -32
  891. package/source/components/_common/MagnifyGlass/MagnifyGlass.styl +33 -33
  892. package/source/components/_common/MagnifyGlass/MagnifyGlass.tsx +213 -213
  893. package/source/components/_common/MaterialAccordion/MaterialAccordion.tsx +141 -141
  894. package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.story.js +49 -49
  895. package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.styled.tsx +71 -71
  896. package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.tsx +40 -40
  897. package/source/components/_common/MaterialAutocomplete/MaterialAutocomplete.styled.tsx +204 -204
  898. package/source/components/_common/MaterialAutocomplete/MaterialAutocomplete.tsx +248 -248
  899. package/source/components/_common/MaterialDatePicker/MaterialDatePicker.story.js +45 -45
  900. package/source/components/_common/MaterialDatePicker/MaterialDatePicker.story.styl +5 -5
  901. package/source/components/_common/MaterialDatePicker/MaterialDatePicker.styled.tsx +20 -20
  902. package/source/components/_common/MaterialDatePicker/MaterialDatePicker.tsx +112 -112
  903. package/source/components/_common/MaterialField/MaterialField.story.js +87 -87
  904. package/source/components/_common/MaterialField/MaterialField.story.styl +33 -33
  905. package/source/components/_common/MaterialField/MaterialField.styled.tsx +52 -52
  906. package/source/components/_common/MaterialField/MaterialField.tsx +129 -129
  907. package/source/components/_common/MaterialSelect/MaterialSelect.story.js +52 -52
  908. package/source/components/_common/MaterialSelect/MaterialSelect.story.styl +5 -5
  909. package/source/components/_common/MaterialSelect/MaterialSelect.styled.tsx +123 -123
  910. package/source/components/_common/MaterialSelect/MaterialSelect.tsx +222 -222
  911. package/source/components/_common/MaterialStepButton/MaterialStepButton.story.js +47 -47
  912. package/source/components/_common/MaterialStepButton/MaterialStepButton.story.styl +5 -5
  913. package/source/components/_common/MaterialStepButton/MaterialStepButton.styl +32 -32
  914. package/source/components/_common/MaterialStepButton/MaterialStepButton.tsx +61 -61
  915. package/source/components/_common/MaterialSwitch/MaterialSwitch.story.js +17 -17
  916. package/source/components/_common/MaterialSwitch/MaterialSwitch.styled.tsx +5 -5
  917. package/source/components/_common/MaterialSwitch/MaterialSwitch.tsx +37 -37
  918. package/source/components/_common/MaterialTooltip/MaterialTooltip.story.js +10 -10
  919. package/source/components/_common/MaterialTooltip/MaterialTooltip.styled.tsx +24 -24
  920. package/source/components/_common/MaterialTooltip/MaterialTooltip.tsx +87 -87
  921. package/source/components/_common/Modal/CookieModal.tsx +49 -49
  922. package/source/components/_common/Modal/Modal.story.js +37 -37
  923. package/source/components/_common/Modal/Modal.styled.tsx +15 -15
  924. package/source/components/_common/Modal/Modal.tsx +24 -24
  925. package/source/components/_common/Modal/ModalsConfig.tsx +23 -23
  926. package/source/components/_common/Modal/modals/ManageCookieModal/ManageCookieModal.styl +86 -86
  927. package/source/components/_common/Modal/modals/ManageCookieModal/ManageCookieModal.tsx +184 -184
  928. package/source/components/_common/Modal/modals/PreviewCookieModal/PreviewCookieModal.styl +66 -66
  929. package/source/components/_common/Modal/modals/PreviewCookieModal/PreviewCookieModal.tsx +51 -51
  930. package/source/components/_common/Modal/modals/TestModal.tsx +7 -7
  931. package/source/components/_common/MuiDropDown/MuiDropDown.tsx +93 -93
  932. package/source/components/_common/MuiGroupedSelect/MuiGroupedSelect.story.js +21 -21
  933. package/source/components/_common/MuiGroupedSelect/MuiGroupedSelect.tsx +87 -87
  934. package/source/components/_common/OfferRequestButtonWrapper/OfferRequestButtonWrapper.styl +119 -119
  935. package/source/components/_common/OfferRequestButtonWrapper/OfferRequestButtonWrapper.styled.tsx +23 -23
  936. package/source/components/_common/OfferRequestButtonWrapper/OfferRequestButtonWrapper.tsx +122 -122
  937. package/source/components/_common/PropertySelector/PSGroup.story.js +93 -93
  938. package/source/components/_common/PropertySelector/PSGroup.story.styl +25 -25
  939. package/source/components/_common/PropertySelector/PSGroup.styl +5 -5
  940. package/source/components/_common/PropertySelector/PSGroup.tsx +98 -98
  941. package/source/components/_common/PropertySelector/PropertySelector.styl +139 -139
  942. package/source/components/_common/PropertySelector/PropertySelector.tsx +100 -100
  943. package/source/components/_common/PropertySelector/ProperySelector.story.js +83 -83
  944. package/source/components/_common/Radio/FormRadioGroup.story.js +28 -28
  945. package/source/components/_common/Radio/FormRadioGroup.story.styl +2 -2
  946. package/source/components/_common/Radio/FormRadioGroup.styl +22 -22
  947. package/source/components/_common/Radio/FormRadioGroup.tsx +77 -77
  948. package/source/components/_common/Radio/Radio.story.js +54 -54
  949. package/source/components/_common/Radio/Radio.styl +115 -115
  950. package/source/components/_common/Radio/Radio.tsx +141 -141
  951. package/source/components/_common/Radio/RadioGroup.story.js +90 -90
  952. package/source/components/_common/Radio/RadioGroup.story.styl +39 -39
  953. package/source/components/_common/Radio/RadioGroup.styl +5 -5
  954. package/source/components/_common/Radio/RadioGroup.tsx +65 -65
  955. package/source/components/_common/Range/Range.story.js +46 -46
  956. package/source/components/_common/Range/Range.story.styl +4 -4
  957. package/source/components/_common/Range/Range.styl +71 -71
  958. package/source/components/_common/Range/Range.tsx +87 -87
  959. package/source/components/_common/Skeleton/SkeletonItem.styl +80 -80
  960. package/source/components/_common/Skeleton/SkeletonItem.tsx +80 -80
  961. package/source/components/_common/Skeleton/SkeletonSearchItem.styl +123 -123
  962. package/source/components/_common/Skeleton/SkeletonSearchItem.tsx +92 -92
  963. package/source/components/_common/Slider/Slider.styl +2 -2
  964. package/source/components/_common/Slider/Slider.tsx +130 -130
  965. package/source/components/_common/SliderArrow/SliderArrow.story.js +18 -18
  966. package/source/components/_common/SliderArrow/SliderArrow.styl +32 -32
  967. package/source/components/_common/SliderArrow/SliderArrow.tsx +36 -36
  968. package/source/components/_common/StarButton/StarButton.styl +39 -39
  969. package/source/components/_common/StarButton/StarButton.tsx +31 -31
  970. package/source/components/_common/Tabs/TabPanel.tsx +28 -28
  971. package/source/components/_common/Tabs/Tabs.story.js +55 -55
  972. package/source/components/_common/Tabs/Tabs.styl +40 -40
  973. package/source/components/_common/Tabs/Tabs.tsx +44 -44
  974. package/source/components/_common/TextAreaField/TextAreaField.styl +47 -47
  975. package/source/components/_common/TextAreaField/TextAreaField.tsx +74 -74
  976. package/source/components/_common/TextField/TextField.styl +37 -37
  977. package/source/components/_common/TextField/TextField.tsx +77 -77
  978. package/source/components/_common/TimePicker/TimePicker.story.js +37 -37
  979. package/source/components/_common/TimePicker/TimePicker.styl +22 -22
  980. package/source/components/_common/TimePicker/TimePicker.tsx +155 -155
  981. package/source/components/_common/Tooltip/Tooltip.story.js +28 -28
  982. package/source/components/_common/Tooltip/Tooltip.styl +117 -117
  983. package/source/components/_common/Tooltip/Tooltip.tsx +62 -62
  984. package/source/components/_common/UserMenu/MaterialMenu.story.js +73 -73
  985. package/source/components/_common/UserMenu/MaterialMenu.styled.tsx +84 -84
  986. package/source/components/_common/UserMenu/MaterialMenu.tsx +101 -101
  987. package/source/components/_common/UserMenu/MaterialMenuItem.tsx +76 -76
  988. package/source/components/_common/UserMenu/NestedMenu.tsx +59 -59
  989. package/source/components/_common/Usp/Usp.styl +78 -78
  990. package/source/components/_common/Usp/Usp.tsx +30 -30
  991. package/source/components/_common/VehicleSlider/VehicleSlider.story.js +99 -99
  992. package/source/components/_common/VehicleSlider/VehicleSlider.styl +62 -62
  993. package/source/components/_common/VehicleSlider/VehicleSlider.tsx +125 -125
  994. package/source/components/_common/VehicleSlider/VehicleSliderForSRL.tsx +175 -175
  995. package/source/components/_common/withLabel/withLabel.story.js +62 -62
  996. package/source/components/_common/withLabel/withLabel.styl +33 -33
  997. package/source/components/_common/withLabel/withLabel.tsx +44 -44
  998. package/source/components/_common/withPopover/withPopover.story.js +48 -48
  999. package/source/components/_common/withPopover/withPopover.story.styl +53 -53
  1000. package/source/components/_common/withPopover/withPopover.styl +3 -3
  1001. package/source/components/_common/withPopover/withPopover.tsx +88 -88
  1002. package/source/components/_common/withStats/withStats.story.js +75 -75
  1003. package/source/components/_common/withStats/withStats.styl +153 -153
  1004. package/source/components/_common/withStats/withStats.tsx +182 -182
  1005. package/source/components/containers/DasboardSection/DashboardSection.styl +14 -14
  1006. package/source/components/containers/DasboardSection/DashboardSection.tsx +23 -23
  1007. package/source/components/containers/SearchPage/FiltersContainer/FiltersContainer.styl +67 -67
  1008. package/source/components/containers/SearchPage/FiltersContainer/FiltersContainer.tsx +463 -463
  1009. package/source/framework/DataTransformers.ts +80 -80
  1010. package/source/framework/constants/RateSearchWidget.ts +15 -15
  1011. package/source/framework/constants/Search.ts +290 -290
  1012. package/source/framework/constants/SearchWidget.ts +108 -108
  1013. package/source/framework/constants/app.ts +223 -223
  1014. package/source/framework/constants/cars.ts +36 -36
  1015. package/source/framework/constants/common.ts +112 -112
  1016. package/source/framework/constants/data.ts +52 -52
  1017. package/source/framework/constants/filters.ts +11 -11
  1018. package/source/framework/constants/highlights.ts +165 -165
  1019. package/source/framework/constants/price.ts +9 -9
  1020. package/source/framework/constants/queryBuilder.ts +4 -4
  1021. package/source/framework/constants/selectors.ts +38 -38
  1022. package/source/framework/constants.ts +116 -116
  1023. package/source/framework/data.ts +6 -6
  1024. package/source/framework/factories/BreadcrumbsFactory.tsx +285 -285
  1025. package/source/framework/factories/FactoryTypes.d.ts +30 -30
  1026. package/source/framework/factories/FilterFactory.ts +364 -364
  1027. package/source/framework/factories/ModalsFactory.tsx +11 -11
  1028. package/source/framework/hooks/useModal.ts +13 -13
  1029. package/source/framework/schemes/AggregationScheme.ts +73 -73
  1030. package/source/framework/types/types.ts +351 -351
  1031. package/source/framework/utils/CommonUtils.ts +634 -634
  1032. package/source/framework/utils/CookieUtils.ts +61 -61
  1033. package/source/framework/utils/DateUtils.ts +101 -101
  1034. package/source/framework/utils/FiltersUtils.ts +234 -234
  1035. package/source/framework/utils/RequestUtils.ts +20 -20
  1036. package/source/framework/utils/StyledComponent.ts +2 -2
  1037. package/source/framework/vehiclesProps/cbdSelectors.ts +117 -117
  1038. package/source/framework/vehiclesProps/decoratedLightProps.tsx +345 -345
  1039. package/source/framework/vehiclesProps/decoratedProps.tsx +1057 -1057
  1040. package/source/framework/vehiclesProps/equipment.ts +129 -129
  1041. package/source/framework/vehiclesProps/highlights.ts +54 -54
  1042. package/source/framework/vehiclesProps/vehicleDetails.ts +329 -329
  1043. package/source/globals.d.ts +18 -18
  1044. package/source/locales/SearchDetailedPage.ts +205 -205
  1045. package/source/locales/SearchPage.ts +224 -224
  1046. package/source/locales/cbd.ts +719 -719
  1047. package/source/locales/common.ts +109 -109
  1048. package/source/locales/data.ts +1078 -1078
  1049. package/source/locales/priceRating.ts +10 -10
  1050. package/source/locales/sortingOptions.ts +21 -21
  1051. package/source/theme/colors.styl +46 -46
  1052. package/source/theme/mixins.styl +93 -93
  1053. package/source/theme/priceReviewColors.styl +12 -12
  1054. package/source/theme/selector_colors.styl +61 -61
  1055. package/source/theme/slider.global.styl +3 -3
  1056. package/source/theme/theme.styl +136 -136
  1057. package/tsconfig.json +65 -65
  1058. package/tslint.json +38 -38
  1059. package/utils.ts +59 -59
@@ -1,1057 +1,1057 @@
1
- import * as React from 'react';
2
- import { isNull } from 'util';
3
- import moment from 'moment';
4
-
5
- import Icon from '../../components/_common/IconContainer/IconContainer';
6
- import CO2Efficiency from '../../components/_common/Co2Widget/CO2Efficiency';
7
- import { formatTimestamp } from '../utils/DateUtils';
8
- import { formatMileage } from '../utils/CommonUtils';
9
- import { EMISSION_STICKERS_ICONS, WP_EMISSION_STICKERS_ICONS } from '../constants/Search';
10
- import { DELIVERY_PERIODS_EXTRA } from '../constants';
11
- import { IDecoratedProp, ICar } from '../types/types';
12
-
13
- const formatDeliveryPeriod = (t: (key: string, options?: object) => string, deliveryPeriod: string) => {
14
- const count: number = +DELIVERY_PERIODS_EXTRA.find((period: any) => period.value === deliveryPeriod).label;
15
- // months until delivery date unrounded (float)
16
- const monthsTo: number = moment.utc().diff(moment.utc().subtract(count, 'd'), 'M', true);
17
- return Math.round(monthsTo) > 1
18
- ? t('vehicleProps:value.deliveryPeriodMonths', { count: Math.round(monthsTo) })
19
- : t('vehicleProps:value.deliveryPeriodDays', { count });
20
- };
21
-
22
- const isPropDefined = (prop: any) => {
23
- const type = typeof prop;
24
- if (type === 'string') {
25
- return prop.indexOf('other') === -1
26
- && prop.indexOf('unknown') === -1;
27
- }
28
- return !isNull(prop) && type !== 'undefined';
29
- };
30
-
31
- const isCheckedBatteryTime = (prop: any, t: (key: string, options?: object) => string) => {
32
- switch (prop) {
33
- case 'selector_batteryCharchingDurationMinutes':
34
- return 'min';
35
- break;
36
- case 'selector_batteryCharchingDurationHours':
37
- return 'h';
38
- break;
39
- default:
40
- return t('vehicleProps:value.na');
41
- }
42
- };
43
-
44
- export const getPowerLabel = (powerKW: number, powerPS: number): string => {
45
- const powerKWlabel = !!powerKW ? `${powerKW} kW ` : '';
46
- const powerPSlabel = !!powerPS ? `${!!powerKW ? '(' : ''}${powerPS} PS${!!powerKW ? ')' : ''}` : '';
47
- const powerKWpowerPS = `${powerKWlabel}${powerPSlabel}`;
48
-
49
- return powerKWpowerPS;
50
- };
51
- const wrapValue = (value:string): React.ReactNode => {
52
- const regex = /-?\d+(\,\d+)?/; // match any digit
53
- const matches = value.match(regex); // get an array of all digits found
54
-
55
- if (matches && matches.length > 0) { // If at least one number is found in the input string
56
- const index = value.indexOf(matches[0]) + matches[0].length;
57
- const beforeText = value.slice(0, index);
58
- const afterText = value.slice(index);
59
-
60
- return (
61
- <>
62
- {beforeText}
63
- <span className='smallText'>{afterText}</span>
64
- </>
65
- ); // Return a JSX element with a span wrapper around the text after the number
66
- }
67
- return <>{value}</>; // If no numbers are found in the input string, return the original string without any modification
68
- };
69
-
70
- const getDecoratedProps = (
71
- car: ICar, // @TODO should have a proper interface
72
- t: (key: string, options?: object) => string,
73
- language: string = 'en',
74
- simplifiedLabels: boolean = false // shortened labels for repsonsive layout (see 'power')
75
- ): IDecoratedProp => {
76
- const {
77
- offer = {},
78
- // countryName,
79
- mainData: {
80
- firstRegistration = '',
81
- mileage = '',
82
- numberOfPreviousOwners = '',
83
- doors = '',
84
- usageType = '',
85
- countryVersion = '',
86
- condition = '',
87
- damaged = '',
88
- category = '',
89
- seats = '',
90
- nonSmokerVehicle = '',
91
- make = '',
92
- model = ''
93
- } = {}
94
- } = car;
95
- const props: any = {
96
- makeModel: {
97
- title: t('vehicleProps:title.makeModel'),
98
- get value() { return `${make} ${model}`; }
99
- },
100
- mileage: {
101
- title: t('vehicleProps:title.mileage'),
102
- icon: 'speed',
103
- get value() {
104
- return Number.isFinite(parseInt(mileage, 10))
105
- ? t('vehicleProps:value.mileage', { mileage: formatMileage(mileage) })
106
- : t('vehicleProps:value.na');
107
- }
108
- },
109
-
110
- firstRegistration: {
111
- title: t('vehicleProps:title.firstRegistration'),
112
- icon: 'date',
113
- get value() {
114
- return Number.isFinite(firstRegistration)
115
- ? formatTimestamp({ timestamp: firstRegistration, format: 'MM/YYYY' })
116
- : t('vehicleProps:value.na');
117
- }
118
- },
119
-
120
- numberOfPreviousOwners: {
121
- title: t('vehicleProps:title.numberOfPreviousOwners'),
122
- icon: 'owner',
123
- get value() {
124
- return Number.isFinite(numberOfPreviousOwners)
125
- ? t('vehicleProps:value.vehicleOwners', { count: numberOfPreviousOwners })
126
- : t('vehicleProps:value.na');
127
- }
128
- },
129
-
130
- doorsOnly: {
131
- icon: 'door',
132
- get value() {
133
- if (doors > 0) {
134
- return t('vehicleProps:value.doorsOnly', { doors });
135
- }
136
-
137
- return t('vehicleProps:value.na');
138
- }
139
- },
140
-
141
- usageType: {
142
- icon: 'new',
143
- get value() {
144
- if (condition === 'selector_condition_new') return t('vehicleProps:value.newCar');
145
- return isPropDefined(usageType) ? t(`cbd:${usageType}`) : t('cbd:selector_condition_used');
146
- }
147
- },
148
-
149
- gearbox: {
150
- get icon() {
151
- const gearbox = car.driveSuspension.gearbox;
152
- return isPropDefined(gearbox) ? car.driveSuspension.gearbox : 'selector_gearbox_manualShift';
153
- },
154
- get value() {
155
- const gearbox = car.driveSuspension.gearbox;
156
- return isPropDefined(gearbox) ? t(`cbd:${gearbox}`) : t('vehicleProps:value.na');
157
- }
158
- },
159
-
160
- power: {
161
- title: t('vehicleProps:title.power'),
162
- icon: 'ps',
163
- get value() {
164
- const { powerKW, powerPS } = car.engineData;
165
-
166
- if (Number.isFinite(powerKW) && Number.isFinite(powerPS)) {
167
- return simplifiedLabels
168
- ? t('vehicleProps:value.powerPS', { powerPS })
169
- : t('vehicleProps:value.power', { powerKW, powerPS });
170
- }
171
-
172
- return t('vehicleProps:value.na');
173
- }
174
- },
175
-
176
- powerAlternateView: {
177
- title: t('vehicleProps:title.power'),
178
- icon: 'kw',
179
- get value() {
180
- const { powerKW, powerPS } = car.engineData;
181
- return Number.isFinite(powerKW) && Number.isFinite(powerPS)
182
- ? t('vehicleProps:value.powerAlternateView', { powerKW, powerPS })
183
- : t('vehicleProps:value.na');
184
- }
185
- },
186
-
187
- fuel: {
188
- title: t('vehicleProps:title.fuel'),
189
- get icon() { return car.consumption.fuel; },
190
- get value() {
191
- const fuel = car.consumption.fuel;
192
- return isPropDefined(fuel) ? t(`cbd:${fuel}`) : t('vehicleProps:value.na');
193
- }
194
- },
195
-
196
- accidentDamaged: {
197
- title: t('cbd:mainData_accidentDamaged'),
198
- icon: 'wrench',
199
- get value() {
200
- return damaged ? t('vehicleProps:value.damaged') : t('vehicleProps:value.accidentFree');
201
- }
202
- },
203
-
204
- co2: {
205
- icon: 'co2',
206
- get value() {
207
- const co2 = car.environmentEmissions.co2;
208
- return Number.isFinite(co2)
209
- ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
210
- : t('vehicleProps:value.na');
211
- }
212
- },
213
-
214
- cylinders: {
215
- title: t('vehicleProps:title.cylinders'),
216
- get value() {
217
- const { engineLocation } = car.engineData;
218
- const cylinders = parseInt(car.engineData.cylinders, 10);
219
- return Number.isFinite(cylinders)
220
- ? (engineLocation ? `${cylinders} / ${t(`cbd:${engineLocation}`)}` : cylinders)
221
- : t('vehicleProps:value.na');
222
- }
223
- },
224
-
225
- plugIn: {
226
- title: 'Plug-In',
227
- get value() {
228
- const { hybridPlugin } = car.engineData;
229
- return hybridPlugin ? t(`cbd:selector_hybridPlugin_yes`) : t('cbd:selector_hybridPlugin_no');
230
- }
231
- },
232
-
233
- cubicCapacity: {
234
- title: t('vehicleProps:title.cubicCapacity'),
235
- get value() {
236
- const cubicCapacity = car.engineData.cubicCapacity;
237
- return Number.isFinite(cubicCapacity)
238
- ? t('vehicleProps:value.cubicCapacity', { cubicCapacity: cubicCapacity.toLocaleString(language) })
239
- : t('vehicleProps:value.na');
240
- }
241
- },
242
-
243
- torque: {
244
- title: t('vehicleProps:title.torque'),
245
- get value() {
246
- const torque = car.engineData.torque;
247
- return torque
248
- ? t('vehicleProps:value.torque', { torque })
249
- : t('vehicleProps:value.na');
250
- }
251
- },
252
-
253
- acceleration: {
254
- title: t('vehicleProps:title.acceleration'),
255
- get value() {
256
- const acceleration = car.engineData.acceleration100;
257
- return isPropDefined(acceleration)
258
- ? (t('vehicleProps:value.acceleration', { seconds: acceleration }))
259
- : t('vehicleProps:value.na');
260
- }
261
- },
262
-
263
- topSpeed: {
264
- title: t('vehicleProps:title.topSpeed'),
265
- get value() {
266
- const topSpeed = car.engineData.highSpeed;
267
- return isPropDefined(topSpeed)
268
- ? (t('vehicleProps:value.topSpeed', { mileage: topSpeed }))
269
- : t('vehicleProps:value.na');
270
- }
271
- },
272
-
273
- transmission: {
274
- title: t('vehicleProps:title.transmission'),
275
- get value() {
276
- const gearbox = car.driveSuspension.gearbox;
277
- return isPropDefined(gearbox) ? t(`cbd:${gearbox}`) : t('vehicleProps:value.na');
278
- }
279
- },
280
-
281
- driveType: {
282
- title: t('vehicleProps:title.driveType'),
283
- get icon() {
284
- const driveType = car.driveSuspension.driveType;
285
- return isPropDefined(driveType) ? car.driveSuspension.driveType : 'selector_driveType_frontWheelDrive';
286
- },
287
- get value() {
288
- const driveType = car.driveSuspension.driveType;
289
- return isPropDefined(driveType) ? t(`cbd:${driveType}`) : t('vehicleProps:value.na');
290
- }
291
- },
292
-
293
- fuelCapacity: {
294
- title: t('vehicleProps:title.fuelCapacity'),
295
- get value() {
296
- const fuelCapacity = car.sizeVolumeWeight && car.sizeVolumeWeight.fuelCapacity;
297
- return Number.isFinite(fuelCapacity)
298
- ? t('vehicleProps:value.fuelCapacity', { capacity: fuelCapacity.toLocaleString(language) })
299
- : t('vehicleProps:value.na');
300
- }
301
- },
302
-
303
- batteryCapacity: {
304
- title: t('vehicleProps:title.batteryCapacityTitle'),
305
- get value() {
306
- const batteryCapacity = car.battery && car.battery.batteryCapacity;
307
- return batteryCapacity && Number.isFinite(batteryCapacity)
308
- ? t('vehicleProps:value.batteryCapacity', { batteryCapacity: batteryCapacity.toLocaleString(language) })
309
- : t('vehicleProps:value.na');
310
- }
311
- },
312
-
313
- chargingDuration230V: {
314
- title: t('vehicleProps:title.chargingDuration230V'),
315
- get value() {
316
- const batteryChargingDuration230VSelect = car.battery && car.battery.batteryChargingDuration230VSelect;
317
- const batteryChargingDuration230VHour = car.battery && car.battery.batteryChargingDuration230VHour;
318
- const batteryCharchingDuration230VMinutesHours = car.battery && car.battery.batteryCharchingDuration230VMinutesHours;
319
-
320
- return batteryChargingDuration230VSelect
321
- ? `${batteryChargingDuration230VHour ? `${batteryChargingDuration230VHour} ${isCheckedBatteryTime(batteryCharchingDuration230VMinutesHours, t)}` : ''} ${batteryChargingDuration230VSelect}`
322
- : t('vehicleProps:value.na');
323
- }
324
- },
325
- chargingDurationMaxSpeed: {
326
- title: t('vehicleProps:title.chargingDurationMaxSpeed'),
327
- get value() {
328
- const batteryChargingDurationMaxSelect = car.battery && car.battery.batteryChargingDurationMaxSelect;
329
- const batteryChargingDurationMaxHour = car.battery && car.battery.batteryChargingDurationMaxHour;
330
- const batteryCharchingDurationMaxSelectMinutesHours = car.battery && car.battery.batteryCharchingDurationMaxSelectMinutesHours;
331
-
332
- return batteryChargingDurationMaxSelect
333
- ? `${batteryChargingDurationMaxHour ? `${batteryChargingDurationMaxHour} ${isCheckedBatteryTime(batteryCharchingDurationMaxSelectMinutesHours, t)}` : ''} ${batteryChargingDurationMaxSelect}`
334
- : t('vehicleProps:value.na');
335
- }
336
- },
337
- batteryChargerType: {
338
- title: t('vehicleProps:title.batteryChargerType'),
339
- get value() {
340
- const batteryChargerType = car.battery && car.battery.batteryChargerType;
341
-
342
- return isPropDefined(batteryChargerType)
343
- ? batteryChargerType.map((item: any) => t(`cbd:${item}`)).join('\n')
344
- : t('vehicleProps:value.na');
345
- }
346
- },
347
- hsn: {
348
- title: 'HSN',
349
- get value() {
350
- const hsn = car.metaData.hsn;
351
- return isPropDefined(hsn) ? hsn : t('vehicleProps:value.na');
352
- }
353
- },
354
-
355
- tsn: {
356
- title: 'TSN',
357
- get value() {
358
- const tsn = car.metaData.tsn;
359
- return isPropDefined(tsn) ? tsn : t('vehicleProps:value.na');
360
- }
361
- },
362
-
363
- category: {
364
- title: t('vehicleProps:title.category'),
365
- get value() {
366
- return isPropDefined(category) ? t(`cbd:${category}`) : t('vehicleProps:value.na');
367
- }
368
- },
369
-
370
- length: {
371
- title: t('vehicleProps:title.length'),
372
- get value() {
373
- const length = car.sizeVolumeWeight && car.sizeVolumeWeight.length;
374
- return Number.isFinite(length)
375
- ? t('vehicleProps:value.length', { size: length.toLocaleString(language) })
376
- : t('vehicleProps:value.na');
377
- }
378
- },
379
-
380
- width: {
381
- title: t('vehicleProps:title.width'),
382
- get value() {
383
- const width = car.sizeVolumeWeight && car.sizeVolumeWeight.width;
384
- return Number.isFinite(width)
385
- ? t('vehicleProps:value.width', { size: width.toLocaleString(language) })
386
- : t('vehicleProps:value.na');
387
- }
388
- },
389
-
390
- height: {
391
- title: t('vehicleProps:title.height'),
392
- get value() {
393
- const height = car.sizeVolumeWeight && car.sizeVolumeWeight.height;
394
- return Number.isFinite(height)
395
- ? t('vehicleProps:value.height', { size: height.toLocaleString(language) })
396
- : t('vehicleProps:value.na');
397
- }
398
- },
399
-
400
- base: {
401
- title: t('vehicleProps:title.base'),
402
- get value() {
403
- const wheelBase = car.driveSuspension.wheelBase;
404
- return Number.isFinite(wheelBase)
405
- ? t('vehicleProps:value.base', { size: wheelBase.toLocaleString(language) })
406
- : t('vehicleProps:value.na');
407
- }
408
- },
409
-
410
- capacityLoad: {
411
- title: t('vehicleProps:title.loadingVolume'),
412
- get value() {
413
- const completeCapacity = car.sizeVolumeWeight && car.sizeVolumeWeight.completeCapacity;
414
- return Number.isFinite(completeCapacity)
415
- ? t('vehicleProps:value.capacityLoad', { capacity: completeCapacity.toLocaleString(language) })
416
- : t('vehicleProps:value.na');
417
- }
418
- },
419
-
420
- bootCapacity: {
421
- title: t('vehicleProps:title.bootCapacity'),
422
- get value() {
423
- const cargoCapacity = car.sizeVolumeWeight && car.sizeVolumeWeight.cargoCapacity;
424
- return Number.isFinite(cargoCapacity)
425
- ? t('vehicleProps:value.bootCapacity', { capacity: cargoCapacity.toLocaleString(language) })
426
- : t('vehicleProps:value.na');
427
- }
428
- },
429
-
430
- doors: {
431
- title: t('vehicleProps:title.doors'),
432
- get value() { return doors > 0 ? doors : t('vehicleProps:value.na'); }
433
- },
434
-
435
- seats: {
436
- title: t('vehicleProps:title.seats'),
437
- get value() { return seats > 0 ? seats : t('vehicleProps:value.na'); }
438
- },
439
-
440
- tare: {
441
- title: t('vehicleProps:title.tare'),
442
- get value() {
443
- const emptyWeight = car.sizeVolumeWeight && car.sizeVolumeWeight.emptyWeight;
444
- return Number.isFinite(emptyWeight)
445
- ? t('vehicleProps:value.tareWeight', { weight: (emptyWeight).toLocaleString(language) })
446
- : t('vehicleProps:value.na');
447
- }
448
- },
449
-
450
- maximumWeight: {
451
- title: t('vehicleProps:title.maximumWeight'),
452
- get value() {
453
- const cargoCapacity = car.sizeVolumeWeight && car.sizeVolumeWeight.cargoCapacity;
454
- return Number.isFinite(cargoCapacity)
455
- ? t('vehicleProps:value.maximumWeightCapacity', { capacity: cargoCapacity.toLocaleString(language) })
456
- : t('vehicleProps:value.na');
457
- }
458
- },
459
-
460
- trailerWeightBraked: {
461
- title: t('vehicleProps:title.trailerLoadBraked'),
462
- get value() {
463
- const trailerWeightBraked = car.sizeVolumeWeight && car.sizeVolumeWeight.trailerWeightBraked;
464
- return Number.isFinite(trailerWeightBraked)
465
- ? t('vehicleProps:value.weight', { weight: trailerWeightBraked.toLocaleString(language) })
466
- : t('vehicleProps:value.na');
467
- }
468
- },
469
-
470
- trailerWeightUnbraked: {
471
- title: t('vehicleProps:title.trailerLoadUnbraked'),
472
- get value() {
473
- const trailerWeightUnbraked = car.sizeVolumeWeight && car.sizeVolumeWeight.trailerWeightUnbraked;
474
- return Number.isFinite(trailerWeightUnbraked)
475
- ? t('vehicleProps:value.weight', { weight: trailerWeightUnbraked.toLocaleString(language) })
476
- : t('vehicleProps:value.na');
477
- }
478
- },
479
-
480
- consumptionInner: {
481
- icon: 'fuelConsumption',
482
- title: t('vehicleProps:title.consumptionInner'),
483
- get value() {
484
- const consumptionInner = car.consumption.consumptionInner;
485
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
486
- const translatedUnit = t(`cbd:${consumptionUnit}`);
487
- return Number.isFinite(consumptionInner)
488
- ? t('vehicleProps:value.consumption', { consumption: consumptionInner.toLocaleString(language), unit: translatedUnit })
489
- : t('vehicleProps:value.na');
490
- }
491
- },
492
-
493
- consumptionPowerInner: {
494
- icon: 'fuelConsumption',
495
- title: t('vehicleProps:title.consumptionPowerInner'),
496
- get value() {
497
- const consumptionPowerInner = car.consumption.consumptionInner;
498
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
499
- const translatedUnit = t(`cbd:${consumptionUnit}`);
500
- return Number.isFinite(consumptionPowerInner)
501
- ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerInner.toLocaleString(language), unit: translatedUnit })
502
- : t('vehicleProps:value.na');
503
- }
504
- },
505
-
506
- consumptionPowerHybridInner: {
507
- icon: 'fuelConsumption',
508
- title: t('vehicleProps:title.consumptionPowerInner'),
509
- get value() {
510
- const consumptionPowerInner = car.consumption.consumptionPowerInner;
511
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
512
- const translatedUnit = t(`cbd:${consumptionUnit}`);
513
- return Number.isFinite(consumptionPowerInner)
514
- ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerInner.toLocaleString(language), unit: translatedUnit })
515
- : t('vehicleProps:value.na');
516
- }
517
- },
518
-
519
- consumptionHydrogenInner: {
520
- icon: 'fuelConsumption',
521
- title: t('vehicleProps:title.consumptionHydrogenInner'),
522
- get value() {
523
- const consumptionHydrogenInner = car.consumption.consumptionInner;
524
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
525
- const translatedUnit = t(`cbd:${consumptionUnit}`);
526
- return Number.isFinite(consumptionHydrogenInner)
527
- ? t('vehicleProps:value.consumptionGas', { consumption: consumptionHydrogenInner.toLocaleString(language), unit: translatedUnit })
528
- : t('vehicleProps:value.na');
529
- }
530
- },
531
- consumptionGasInner: {
532
- icon: 'fuelConsumption',
533
- title: t('vehicleProps:title.consumptionGasInner'),
534
- get value() {
535
- const consumptionGasInner = car.consumption.consumptionInner;
536
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
537
- const translatedUnit = t(`cbd:${consumptionUnit}`);
538
- return Number.isFinite(consumptionGasInner)
539
- ? t('vehicleProps:value.consumptionGas', { consumption: consumptionGasInner.toLocaleString(language), unit: translatedUnit })
540
- : t('vehicleProps:value.na');
541
- }
542
- },
543
-
544
- consumptionOuter: {
545
- icon: 'fuelConsumption',
546
- title: t('vehicleProps:title.consumptionOuter'),
547
- get value() {
548
- const consumptionOuter = car.consumption.consumptionOuter;
549
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
550
- const translatedUnit = t(`cbd:${consumptionUnit}`);
551
- return Number.isFinite(consumptionOuter)
552
- ? t('vehicleProps:value.consumption', { consumption: consumptionOuter.toLocaleString(language), unit: translatedUnit })
553
- : t('vehicleProps:value.na');
554
- }
555
- },
556
-
557
- consumptionPowerOuter: {
558
- icon: 'fuelConsumption',
559
- title: t('vehicleProps:title.consumptionPowerOuter'),
560
- get value() {
561
- const consumptionPowerOuter = car.consumption.consumptionOuter;
562
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
563
- const translatedUnit = t(`cbd:${consumptionUnit}`);
564
- return Number.isFinite(consumptionPowerOuter)
565
- ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerOuter.toLocaleString(language), unit: translatedUnit })
566
- : t('vehicleProps:value.na');
567
- }
568
- },
569
-
570
- consumptionPowerHybridOuter: {
571
- icon: 'fuelConsumption',
572
- title: t('vehicleProps:title.consumptionPowerOuter'),
573
- get value() {
574
- const consumptionPowerOuter = car.consumption.consumptionPowerOuter;
575
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
576
- const translatedUnit = t(`cbd:${consumptionUnit}`);
577
- return Number.isFinite(consumptionPowerOuter)
578
- ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerOuter.toLocaleString(language), unit: translatedUnit })
579
- : t('vehicleProps:value.na');
580
- }
581
- },
582
-
583
- consumptionHydrogenOuter: {
584
- icon: 'fuelConsumption',
585
- title: t('vehicleProps:title.consumptionHydrogenOuter'),
586
- get value() {
587
- const consumptionHydrogenOuter = car.consumption.consumptionOuter;
588
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
589
- const translatedUnit = t(`cbd:${consumptionUnit}`);
590
- return Number.isFinite(consumptionHydrogenOuter)
591
- ? t('vehicleProps:value.consumptionGas', { consumption: consumptionHydrogenOuter.toLocaleString(language), unit: translatedUnit })
592
- : t('vehicleProps:value.na');
593
- }
594
- },
595
-
596
- consumptionGasOuter: {
597
- icon: 'fuelConsumption',
598
- title: t('vehicleProps:title.consumptionGasOuter'),
599
- get value() {
600
- const consumptionGasOuter = car.consumption.consumptionOuter;
601
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
602
- const translatedUnit = t(`cbd:${consumptionUnit}`);
603
- return Number.isFinite(consumptionGasOuter)
604
- ? t('vehicleProps:value.consumptionGas', { consumption: consumptionGasOuter.toLocaleString(language), unit: translatedUnit })
605
- : t('vehicleProps:value.na');
606
- }
607
- },
608
-
609
- consumptionCombined: {
610
- icon: 'fuelConsumption',
611
- title: t('vehicleProps:title.сonsumptionCombined'),
612
- get value() {
613
- const consumptionCombined = car.consumption.consumptionCombined;
614
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
615
- const translatedUnit = t(`cbd:${consumptionUnit}`);
616
- return Number.isFinite(consumptionCombined)
617
- ? t('vehicleProps:value.consumption', { consumption: consumptionCombined.toLocaleString(language), unit: translatedUnit })
618
- : t('vehicleProps:value.na');
619
- }
620
- },
621
-
622
- consumptionPowerCombined: {
623
- icon: 'fuelConsumption',
624
- title: t('vehicleProps:title.consumptionPowerCombined'),
625
- get value() {
626
- const consumptionPowerCombined = car.consumption.consumptionCombined;
627
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
628
- const translatedUnit = t(`cbd:${consumptionUnit}`);
629
- return Number.isFinite(consumptionPowerCombined)
630
- ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
631
- : t('vehicleProps:value.na');
632
- }
633
- },
634
-
635
- consumptionPowerHybridCombined: {
636
- icon: 'fuelConsumption',
637
- title: t('vehicleProps:title.consumptionPowerCombined'),
638
- get value() {
639
- const consumptionPowerCombined = car.consumption.consumptionPowerCombined;
640
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
641
- const translatedUnit = t(`cbd:${consumptionUnit}`);
642
- return Number.isFinite(consumptionPowerCombined)
643
- ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
644
- : t('vehicleProps:value.na');
645
- }
646
- },
647
-
648
- consumptionHydrogenCombined: {
649
- icon: 'fuelConsumption',
650
- title: t('vehicleProps:title.consumptionHydrogenCombined'),
651
- get value() {
652
- const consumptionHydrogenCombined = car.consumption.consumptionCombined;
653
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
654
- const translatedUnit = t(`cbd:${consumptionUnit}`);
655
- return Number.isFinite(consumptionHydrogenCombined)
656
- ? t('vehicleProps:value.consumptionGas', { consumption: consumptionHydrogenCombined.toLocaleString(language), unit: translatedUnit })
657
- : t('vehicleProps:value.na');
658
- }
659
- },
660
-
661
- consumptionGasCombined: {
662
- icon: 'fuelConsumption',
663
- title: t('vehicleProps:title.consumptionGasCombined'),
664
- get value() {
665
- const consumptionGasCombined = car.consumption.consumptionCombined;
666
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
667
- const translatedUnit = t(`cbd:${consumptionUnit}`);
668
- return Number.isFinite(consumptionGasCombined)
669
- ? t('vehicleProps:value.consumptionGas', { consumption: consumptionGasCombined.toLocaleString(language), unit: translatedUnit })
670
- : t('vehicleProps:value.na');
671
- }
672
- },
673
-
674
- consumptionCombinedAlternateView: {
675
- icon: 'fuelConsumption',
676
- get value() {
677
- const consumptionCombined = car.consumption.consumptionCombined;
678
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
679
- const translatedUnit = t(`cbd:${consumptionUnit}`);
680
-
681
- const co2 = car.environmentEmissions.co2;
682
-
683
- const consumptionValue = Number.isFinite(consumptionCombined)
684
- ? t('vehicleProps:value.consumptionCombined', { consumption: consumptionCombined.toLocaleString(language), unit: translatedUnit })
685
- : t('vehicleProps:value.na');
686
-
687
- const co2Value = Number.isFinite(co2)
688
- ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
689
- : t('vehicleProps:value.na');
690
-
691
- return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}</>;
692
- }
693
- },
694
- consumptionPowerCombinedAlternateView: {
695
- icon: 'fuelConsumption',
696
- title: t('vehicleProps:title.consumptionPowerCombined'),
697
- get value() {
698
- const consumptionPowerCombined = car.consumption.consumptionCombined;
699
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
700
- const translatedUnit = t(`cbd:${consumptionUnit}`);
701
- const co2 = car.environmentEmissions.co2;
702
-
703
- const consumptionValue = Number.isFinite(consumptionPowerCombined)
704
- ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
705
- : t('vehicleProps:value.na');
706
-
707
- const co2Value = Number.isFinite(co2)
708
- ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
709
- : t('vehicleProps:value.na');
710
-
711
- return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}</>;
712
- }
713
- },
714
- consumptionHydrogenCombinedAlternateView: {
715
- icon: 'fuelConsumption',
716
- title: t('vehicleProps:title.consumptionHydrogenCombined'),
717
- get value() {
718
- const consumptionHydrogenCombined = car.consumption.consumptionCombined;
719
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
720
- const translatedUnit = t(`cbd:${consumptionUnit}`);
721
- const co2 = car.environmentEmissions.co2;
722
-
723
- const consumptionValue = Number.isFinite(consumptionHydrogenCombined)
724
- ? t('vehicleProps:value.consumptionGas', { consumption: consumptionHydrogenCombined.toLocaleString(language), unit: translatedUnit })
725
- : t('vehicleProps:value.na');
726
-
727
- const co2Value = Number.isFinite(co2)
728
- ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
729
- : t('vehicleProps:value.na');
730
-
731
- return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}</>;
732
- }
733
- },
734
- consumptionGasCombinedAlternateView: {
735
- icon: 'fuelConsumption',
736
- title: t('vehicleProps:title.consumptionGasCombined'),
737
- get value() {
738
- const consumptionGasCombined = car.consumption.consumptionCombined;
739
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
740
- const translatedUnit = t(`cbd:${consumptionUnit}`);
741
-
742
- const co2 = car.environmentEmissions.co2;
743
-
744
- const consumptionValue = Number.isFinite(consumptionGasCombined)
745
- ? t('vehicleProps:value.consumptionGas', { consumption: consumptionGasCombined.toLocaleString(language), unit: translatedUnit })
746
- : t('vehicleProps:value.na');
747
-
748
- const co2Value = Number.isFinite(co2)
749
- ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
750
- : t('vehicleProps:value.na');
751
-
752
- return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}</>;
753
- }
754
- },
755
-
756
- consumptionCombinedHybridAlternateView: {
757
- icon: 'fuelConsumption',
758
- get value() {
759
- const consumptionCombined = +car.consumption.consumptionCombined;
760
- const consumptionPowerCombined = +car.consumption.consumptionPowerCombined;
761
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
762
- const translatedUnit = t(`cbd:${consumptionUnit}`);
763
-
764
- const consumptionPowerCombinedContent = t('vehicleProps:value.consumptionPowerCombined', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit });
765
- const consumptionCombinedContent = t('vehicleProps:value.consumptionCombined', { consumption: consumptionCombined.toLocaleString(language), unit: translatedUnit });
766
-
767
- const co2 = car.environmentEmissions.co2;
768
- const co2Value = Number.isFinite(co2)
769
- ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
770
- : t('vehicleProps:value.na');
771
- const hybridPlugin = car.engineData.hybridPlugin;
772
- return Number.isFinite(consumptionCombined) && Number.isFinite(consumptionPowerCombined)
773
- ? <React.Fragment>
774
- {consumptionPowerCombined && hybridPlugin ? wrapValue(consumptionPowerCombinedContent) : ''}
775
- {consumptionPowerCombined && hybridPlugin ? <br /> : ''}
776
- {wrapValue(consumptionCombinedContent)} <br />
777
- {wrapValue(co2Value)}
778
- </React.Fragment>
779
- : t('vehicleProps:value.na');
780
- }
781
- },
782
-
783
- rangeHydrogen: {
784
- title: t('vehicleProps:title.rangeHydrogen'),
785
- get value() {
786
- const { rangeHydrogen } = car.engineData;
787
- return Number.isFinite(rangeHydrogen)
788
- ? t('vehicleProps:value.batteryRangeElectric', { consumption: rangeHydrogen.toLocaleString(language) })
789
- : t('vehicleProps:value.na');
790
- }
791
- },
792
- batteryRangeElectric: {
793
- title: t('vehicleProps:title.batteryRangeElectric'),
794
- get value() {
795
- const batteryRangeElectric = car.battery && car.battery.batteryRangeElectric;
796
- return Number.isFinite(batteryRangeElectric)
797
- ? t('vehicleProps:value.batteryRangeElectric', { consumption: batteryRangeElectric.toLocaleString(language) })
798
- : t('vehicleProps:value.na');
799
- }
800
- },
801
-
802
- c02: {
803
- title: t('vehicleProps:title.co2'),
804
- get value() {
805
- const c02 = car.environmentEmissions.co2;
806
- return Number.isFinite(c02)
807
- ? t('vehicleProps:value.co2', { co2: c02.toLocaleString(language) })
808
- : t('vehicleProps:value.na');
809
- }
810
- },
811
-
812
- consumptionAndCo2: {
813
- title: t('vehicleProps:title.consumptionAndCo2'),
814
- get value() {
815
- const consumptionPowerCombined = car.consumption.consumptionCombined;
816
- const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
817
- const translatedUnit = t(`cbd:${consumptionUnit}`);
818
- const co2 = car.environmentEmissions.co2;
819
- const consumptionValue = Number.isFinite(consumptionPowerCombined)
820
- ? t('vehicleProps:value.consumptionCombined', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
821
- : t('vehicleProps:value.na');
822
- const co2Value = Number.isFinite(co2)
823
- ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
824
- : t('vehicleProps:value.na');
825
-
826
- return `${consumptionValue} | ${co2Value}`;
827
- }
828
- },
829
- emissionClass: {
830
- title: t('vehicleProps:title.emissionClass'),
831
- get value() {
832
- const emissionClass = car.environmentEmissions.emissionClass;
833
- return isPropDefined(emissionClass) ? t(`cbd:${emissionClass}`) : t('vehicleProps:value.na');
834
- }
835
- },
836
-
837
- emissionSticker: {
838
- title: t('vehicleProps:title.emissionsSticker'),
839
- get value() {
840
- const emissionSticker = car.environmentEmissions.emissionSticker;
841
- let icon = null;
842
- const size = 25;
843
-
844
- if (emissionSticker !== 'selector_emissionSticker_no') {
845
- icon = EMISSION_STICKERS_ICONS[emissionSticker];
846
- }
847
-
848
- return icon ? <Icon src={icon} width={size} height={size} /> : t('vehicleProps:value.na');
849
- }
850
- },
851
-
852
- wpEmissionSticker: {
853
- title: t('vehicleProps:title.emissionsSticker'),
854
- get value() {
855
- const emissionSticker = car.environmentEmissions.emissionSticker;
856
- let icon = null;
857
- const size = 25;
858
-
859
- if (emissionSticker !== 'selector_emissionSticker_no') {
860
- icon = WP_EMISSION_STICKERS_ICONS[emissionSticker];
861
- }
862
-
863
- return icon ? <Icon src={icon} width={size} height={size} /> : t('vehicleProps:value.na');
864
- }
865
- },
866
-
867
- energyEfficiencyClass: {
868
- title: t('vehicleProps:title.energyEfficiencyClass'),
869
- subTitle: t('vehicleProps:title.subTitle'),
870
- get value() {
871
- const level = car.environmentEmissions.energyEfficiencyClass;
872
- return isPropDefined(level) ? <CO2Efficiency level={level} t={t} /> : t('vehicleProps:value.na');
873
- }
874
- },
875
-
876
- offerAvailability: {
877
- title: t('vehicleProps:title.offerAvailability'),
878
- icon: 'carAvailability',
879
- get value() {
880
- const offerAvailabilityMode = offer.availabilityMode;
881
- const offerAvailabilityTimestamp = offer.availabilityFrom;
882
- const humanViewTime = moment.unix(offerAvailabilityTimestamp).format('DD.MM.YYYY');
883
- let offerAvailability: string;
884
-
885
- switch (offerAvailabilityMode) {
886
- case 'selector_availabilityMode_always':
887
- offerAvailability = t(`cbd:${offerAvailabilityMode}`);
888
- break;
889
-
890
- case 'selector_availabilityMode_fromDate':
891
- if (offer.deliveryPeriod != null && offer.deliveryPeriod !== 'selector_unknown') {
892
- offerAvailability = formatDeliveryPeriod(t, offer.deliveryPeriod);
893
- break;
894
- }
895
-
896
- if (moment.utc(offerAvailabilityTimestamp, 'X').isBefore()) {
897
- offerAvailability = t('cbd:selector_availabilityMode_always');
898
- } else {
899
- offerAvailability = t('vehicleProps:value.fromDate', { date: humanViewTime });
900
- }
901
- break;
902
-
903
- default:
904
- if (!offerAvailabilityMode && !firstRegistration && !mileage) offerAvailability = t('vehicleProps:value.onRequest');
905
- else offerAvailability = null;
906
- }
907
- return isPropDefined(offerAvailability) ? offerAvailability : t('vehicleProps:value.na');
908
- }
909
- },
910
-
911
- lastTechnicalService: {
912
- title: t('vehicleProps:title.lastTechnicalService'),
913
- get value() {
914
- const lastTechnicalService = car.careService.lastTechnicalService;
915
- return Number.isFinite(lastTechnicalService)
916
- ? formatTimestamp({ timestamp: lastTechnicalService, format: 'MM/YYYY' })
917
- : t('vehicleProps:value.na');
918
- }
919
- },
920
-
921
- generalInspection: {
922
- title: t('vehicleProps:title.generalInspection'),
923
- get value() {
924
- const generalInspection = car.careService.generalInspection;
925
- if (car.offer.newHuAu) {
926
- return t('vehicleProps:value.new');
927
- // tslint:disable-next-line:no-else-after-return
928
- }else {
929
- return Number.isFinite(generalInspection)
930
- ? formatTimestamp({ timestamp: generalInspection, format: 'MM/YYYY' })
931
- : t('vehicleProps:value.na');
932
- }
933
- }
934
- },
935
-
936
- condition: {
937
- title: t('vehicleProps:title.сondition'),
938
- get value() {
939
- return isPropDefined(condition)
940
- ? t(`cbd:${condition}`)
941
- : t('vehicleProps:value.na');
942
- }
943
- },
944
-
945
- numberOfPreviousOwnersSimple: {
946
- title: t('vehicleProps:title.numberOfPreviousOwners'),
947
- get value() {
948
- return Number.isFinite(numberOfPreviousOwners)
949
- ? numberOfPreviousOwners
950
- : t('vehicleProps:value.na');
951
- }
952
- },
953
-
954
- guarantee: {
955
- title: t('vehicleProps:title.guarantee'),
956
- get value() {
957
- const guarantee = car.offer.warranty;
958
- return isPropDefined(guarantee)
959
- ? (guarantee ? t('vehicleProps:value.yes') : t('vehicleProps:value.no'))
960
- : t('vehicleProps:value.na');
961
- }
962
- },
963
-
964
- maintenanceGuide: {
965
- title: t('vehicleProps:title.maintenanceGuide'),
966
- get value() {
967
- const fullserviceHistory = car.careService.fullServiceHistory;
968
- return isPropDefined(fullserviceHistory)
969
- ? (fullserviceHistory ? t('vehicleProps:value.yes') : t('vehicleProps:value.no'))
970
- : t('vehicleProps:value.na');
971
- }
972
- },
973
-
974
- nonSmokerVehicle: {
975
- title: t('vehicleProps:title.nonSmokingVehicle'),
976
- get value() {
977
- return isPropDefined(nonSmokerVehicle)
978
- ? (nonSmokerVehicle ? t('vehicleProps:value.yes') : t('vehicleProps:value.no'))
979
- : t('vehicleProps:value.na');
980
- }
981
- },
982
-
983
- manufacturerColorName: {
984
- title: t('vehicleProps:title.manufacturerColorName'),
985
- get value() {
986
- const color = car.exterior.manufacturerColorName;
987
-
988
- if (typeof color !== 'string' || color === '') {
989
- return t('vehicleProps:value.na');
990
- }
991
-
992
- return color[0].toUpperCase() + color.slice(1);
993
- }
994
- },
995
-
996
- exteriorColor: {
997
- title: t('vehicleProps:title.colour'),
998
- get value() {
999
- const exteriorColor = car.exterior.exteriorColor;
1000
- return isPropDefined(exteriorColor)
1001
- ? t(`cbd:${exteriorColor.replace('exterior_', '')}`)
1002
- : t('vehicleProps:value.na');
1003
- }
1004
- },
1005
-
1006
- appointmentsColor: {
1007
- title: t('vehicleProps:title.appointmentsColor'),
1008
- get value() {
1009
- const interiorColor = car.interior.interiorColor;
1010
- return isPropDefined(interiorColor)
1011
- ? t(`cbd:${interiorColor.replace('interior_', '')}`)
1012
- : t('vehicleProps:value.na');
1013
- }
1014
- },
1015
-
1016
- interiorType: {
1017
- title: t('vehicleProps:title.interiorType'),
1018
- get value() {
1019
- const interiorType = car.interior.interiorType;
1020
- return isPropDefined(interiorType)
1021
- ? t(`cbd:${interiorType}`)
1022
- : t('vehicleProps:value.na');
1023
- }
1024
- },
1025
- signOfUse : {
1026
- title: t('vehicleProps:title.signsOfUse'),
1027
- isVisible: mileage > 100, // tslint:disable-line
1028
- isLongTitle: true,
1029
- get value() {
1030
- return t('vehicleProps:value.yes');
1031
- }
1032
- },
1033
- countryVersion : {
1034
- title: t('vehicleProps:title.countryVersion'),
1035
- get value() {
1036
- const countryName = car.countryActive[language];
1037
- if (!countryVersion) return t('vehicleProps:value.na');
1038
- switch (countryVersion) {
1039
- case 'de':
1040
- return t('vehicleProps:value.countryDEversion');
1041
- break;
1042
- case 'eu':
1043
- return t('vehicleProps:value.countryEUversion');
1044
- break;
1045
- case 'at':
1046
- return t('vehicleProps:value.countryATversion');
1047
- break;
1048
- default:
1049
- return t('vehicleProps:value.countryVersionName', { countryName });
1050
- }
1051
- }
1052
- }
1053
- };
1054
- return props;
1055
- };
1056
-
1057
- export default getDecoratedProps;
1
+ import * as React from 'react';
2
+ import { isNull } from 'util';
3
+ import moment from 'moment';
4
+
5
+ import Icon from '../../components/_common/IconContainer/IconContainer';
6
+ import CO2Efficiency from '../../components/_common/Co2Widget/CO2Efficiency';
7
+ import { formatTimestamp } from '../utils/DateUtils';
8
+ import { formatMileage } from '../utils/CommonUtils';
9
+ import { EMISSION_STICKERS_ICONS, WP_EMISSION_STICKERS_ICONS } from '../constants/Search';
10
+ import { DELIVERY_PERIODS_EXTRA } from '../constants';
11
+ import { IDecoratedProp, ICar } from '../types/types';
12
+
13
+ const formatDeliveryPeriod = (t: (key: string, options?: object) => string, deliveryPeriod: string) => {
14
+ const count: number = +DELIVERY_PERIODS_EXTRA.find((period: any) => period.value === deliveryPeriod).label;
15
+ // months until delivery date unrounded (float)
16
+ const monthsTo: number = moment.utc().diff(moment.utc().subtract(count, 'd'), 'M', true);
17
+ return Math.round(monthsTo) > 1
18
+ ? t('vehicleProps:value.deliveryPeriodMonths', { count: Math.round(monthsTo) })
19
+ : t('vehicleProps:value.deliveryPeriodDays', { count });
20
+ };
21
+
22
+ const isPropDefined = (prop: any) => {
23
+ const type = typeof prop;
24
+ if (type === 'string') {
25
+ return prop.indexOf('other') === -1
26
+ && prop.indexOf('unknown') === -1;
27
+ }
28
+ return !isNull(prop) && type !== 'undefined';
29
+ };
30
+
31
+ const isCheckedBatteryTime = (prop: any, t: (key: string, options?: object) => string) => {
32
+ switch (prop) {
33
+ case 'selector_batteryCharchingDurationMinutes':
34
+ return 'min';
35
+ break;
36
+ case 'selector_batteryCharchingDurationHours':
37
+ return 'h';
38
+ break;
39
+ default:
40
+ return t('vehicleProps:value.na');
41
+ }
42
+ };
43
+
44
+ export const getPowerLabel = (powerKW: number, powerPS: number): string => {
45
+ const powerKWlabel = !!powerKW ? `${powerKW} kW ` : '';
46
+ const powerPSlabel = !!powerPS ? `${!!powerKW ? '(' : ''}${powerPS} PS${!!powerKW ? ')' : ''}` : '';
47
+ const powerKWpowerPS = `${powerKWlabel}${powerPSlabel}`;
48
+
49
+ return powerKWpowerPS;
50
+ };
51
+ const wrapValue = (value:string): React.ReactNode => {
52
+ const regex = /-?\d+(\,\d+)?/; // match any digit
53
+ const matches = value.match(regex); // get an array of all digits found
54
+
55
+ if (matches && matches.length > 0) { // If at least one number is found in the input string
56
+ const index = value.indexOf(matches[0]) + matches[0].length;
57
+ const beforeText = value.slice(0, index);
58
+ const afterText = value.slice(index);
59
+
60
+ return (
61
+ <>
62
+ {beforeText}
63
+ <span className='smallText'>{afterText}</span>
64
+ </>
65
+ ); // Return a JSX element with a span wrapper around the text after the number
66
+ }
67
+ return <>{value}</>; // If no numbers are found in the input string, return the original string without any modification
68
+ };
69
+
70
+ const getDecoratedProps = (
71
+ car: ICar, // @TODO should have a proper interface
72
+ t: (key: string, options?: object) => string,
73
+ language: string = 'en',
74
+ simplifiedLabels: boolean = false // shortened labels for repsonsive layout (see 'power')
75
+ ): IDecoratedProp => {
76
+ const {
77
+ offer = {},
78
+ // countryName,
79
+ mainData: {
80
+ firstRegistration = '',
81
+ mileage = '',
82
+ numberOfPreviousOwners = '',
83
+ doors = '',
84
+ usageType = '',
85
+ countryVersion = '',
86
+ condition = '',
87
+ damaged = '',
88
+ category = '',
89
+ seats = '',
90
+ nonSmokerVehicle = '',
91
+ make = '',
92
+ model = ''
93
+ } = {}
94
+ } = car;
95
+ const props: any = {
96
+ makeModel: {
97
+ title: t('vehicleProps:title.makeModel'),
98
+ get value() { return `${make} ${model}`; }
99
+ },
100
+ mileage: {
101
+ title: t('vehicleProps:title.mileage'),
102
+ icon: 'speed',
103
+ get value() {
104
+ return Number.isFinite(parseInt(mileage, 10))
105
+ ? t('vehicleProps:value.mileage', { mileage: formatMileage(mileage) })
106
+ : t('vehicleProps:value.na');
107
+ }
108
+ },
109
+
110
+ firstRegistration: {
111
+ title: t('vehicleProps:title.firstRegistration'),
112
+ icon: 'date',
113
+ get value() {
114
+ return Number.isFinite(firstRegistration)
115
+ ? formatTimestamp({ timestamp: firstRegistration, format: 'MM/YYYY' })
116
+ : t('vehicleProps:value.na');
117
+ }
118
+ },
119
+
120
+ numberOfPreviousOwners: {
121
+ title: t('vehicleProps:title.numberOfPreviousOwners'),
122
+ icon: 'owner',
123
+ get value() {
124
+ return Number.isFinite(numberOfPreviousOwners)
125
+ ? t('vehicleProps:value.vehicleOwners', { count: numberOfPreviousOwners })
126
+ : t('vehicleProps:value.na');
127
+ }
128
+ },
129
+
130
+ doorsOnly: {
131
+ icon: 'door',
132
+ get value() {
133
+ if (doors > 0) {
134
+ return t('vehicleProps:value.doorsOnly', { doors });
135
+ }
136
+
137
+ return t('vehicleProps:value.na');
138
+ }
139
+ },
140
+
141
+ usageType: {
142
+ icon: 'new',
143
+ get value() {
144
+ if (condition === 'selector_condition_new') return t('vehicleProps:value.newCar');
145
+ return isPropDefined(usageType) ? t(`cbd:${usageType}`) : t('cbd:selector_condition_used');
146
+ }
147
+ },
148
+
149
+ gearbox: {
150
+ get icon() {
151
+ const gearbox = car.driveSuspension.gearbox;
152
+ return isPropDefined(gearbox) ? car.driveSuspension.gearbox : 'selector_gearbox_manualShift';
153
+ },
154
+ get value() {
155
+ const gearbox = car.driveSuspension.gearbox;
156
+ return isPropDefined(gearbox) ? t(`cbd:${gearbox}`) : t('vehicleProps:value.na');
157
+ }
158
+ },
159
+
160
+ power: {
161
+ title: t('vehicleProps:title.power'),
162
+ icon: 'ps',
163
+ get value() {
164
+ const { powerKW, powerPS } = car.engineData;
165
+
166
+ if (Number.isFinite(powerKW) && Number.isFinite(powerPS)) {
167
+ return simplifiedLabels
168
+ ? t('vehicleProps:value.powerPS', { powerPS })
169
+ : t('vehicleProps:value.power', { powerKW, powerPS });
170
+ }
171
+
172
+ return t('vehicleProps:value.na');
173
+ }
174
+ },
175
+
176
+ powerAlternateView: {
177
+ title: t('vehicleProps:title.power'),
178
+ icon: 'kw',
179
+ get value() {
180
+ const { powerKW, powerPS } = car.engineData;
181
+ return Number.isFinite(powerKW) && Number.isFinite(powerPS)
182
+ ? t('vehicleProps:value.powerAlternateView', { powerKW, powerPS })
183
+ : t('vehicleProps:value.na');
184
+ }
185
+ },
186
+
187
+ fuel: {
188
+ title: t('vehicleProps:title.fuel'),
189
+ get icon() { return car.consumption.fuel; },
190
+ get value() {
191
+ const fuel = car.consumption.fuel;
192
+ return isPropDefined(fuel) ? t(`cbd:${fuel}`) : t('vehicleProps:value.na');
193
+ }
194
+ },
195
+
196
+ accidentDamaged: {
197
+ title: t('cbd:mainData_accidentDamaged'),
198
+ icon: 'wrench',
199
+ get value() {
200
+ return damaged ? t('vehicleProps:value.damaged') : t('vehicleProps:value.accidentFree');
201
+ }
202
+ },
203
+
204
+ co2: {
205
+ icon: 'co2',
206
+ get value() {
207
+ const co2 = car.environmentEmissions.co2;
208
+ return Number.isFinite(co2)
209
+ ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
210
+ : t('vehicleProps:value.na');
211
+ }
212
+ },
213
+
214
+ cylinders: {
215
+ title: t('vehicleProps:title.cylinders'),
216
+ get value() {
217
+ const { engineLocation } = car.engineData;
218
+ const cylinders = parseInt(car.engineData.cylinders, 10);
219
+ return Number.isFinite(cylinders)
220
+ ? (engineLocation ? `${cylinders} / ${t(`cbd:${engineLocation}`)}` : cylinders)
221
+ : t('vehicleProps:value.na');
222
+ }
223
+ },
224
+
225
+ plugIn: {
226
+ title: 'Plug-In',
227
+ get value() {
228
+ const { hybridPlugin } = car.engineData;
229
+ return hybridPlugin ? t(`cbd:selector_hybridPlugin_yes`) : t('cbd:selector_hybridPlugin_no');
230
+ }
231
+ },
232
+
233
+ cubicCapacity: {
234
+ title: t('vehicleProps:title.cubicCapacity'),
235
+ get value() {
236
+ const cubicCapacity = car.engineData.cubicCapacity;
237
+ return Number.isFinite(cubicCapacity)
238
+ ? t('vehicleProps:value.cubicCapacity', { cubicCapacity: cubicCapacity.toLocaleString(language) })
239
+ : t('vehicleProps:value.na');
240
+ }
241
+ },
242
+
243
+ torque: {
244
+ title: t('vehicleProps:title.torque'),
245
+ get value() {
246
+ const torque = car.engineData.torque;
247
+ return torque
248
+ ? t('vehicleProps:value.torque', { torque })
249
+ : t('vehicleProps:value.na');
250
+ }
251
+ },
252
+
253
+ acceleration: {
254
+ title: t('vehicleProps:title.acceleration'),
255
+ get value() {
256
+ const acceleration = car.engineData.acceleration100;
257
+ return isPropDefined(acceleration)
258
+ ? (t('vehicleProps:value.acceleration', { seconds: acceleration }))
259
+ : t('vehicleProps:value.na');
260
+ }
261
+ },
262
+
263
+ topSpeed: {
264
+ title: t('vehicleProps:title.topSpeed'),
265
+ get value() {
266
+ const topSpeed = car.engineData.highSpeed;
267
+ return isPropDefined(topSpeed)
268
+ ? (t('vehicleProps:value.topSpeed', { mileage: topSpeed }))
269
+ : t('vehicleProps:value.na');
270
+ }
271
+ },
272
+
273
+ transmission: {
274
+ title: t('vehicleProps:title.transmission'),
275
+ get value() {
276
+ const gearbox = car.driveSuspension.gearbox;
277
+ return isPropDefined(gearbox) ? t(`cbd:${gearbox}`) : t('vehicleProps:value.na');
278
+ }
279
+ },
280
+
281
+ driveType: {
282
+ title: t('vehicleProps:title.driveType'),
283
+ get icon() {
284
+ const driveType = car.driveSuspension.driveType;
285
+ return isPropDefined(driveType) ? car.driveSuspension.driveType : 'selector_driveType_frontWheelDrive';
286
+ },
287
+ get value() {
288
+ const driveType = car.driveSuspension.driveType;
289
+ return isPropDefined(driveType) ? t(`cbd:${driveType}`) : t('vehicleProps:value.na');
290
+ }
291
+ },
292
+
293
+ fuelCapacity: {
294
+ title: t('vehicleProps:title.fuelCapacity'),
295
+ get value() {
296
+ const fuelCapacity = car.sizeVolumeWeight && car.sizeVolumeWeight.fuelCapacity;
297
+ return Number.isFinite(fuelCapacity)
298
+ ? t('vehicleProps:value.fuelCapacity', { capacity: fuelCapacity.toLocaleString(language) })
299
+ : t('vehicleProps:value.na');
300
+ }
301
+ },
302
+
303
+ batteryCapacity: {
304
+ title: t('vehicleProps:title.batteryCapacityTitle'),
305
+ get value() {
306
+ const batteryCapacity = car.battery && car.battery.batteryCapacity;
307
+ return batteryCapacity && Number.isFinite(batteryCapacity)
308
+ ? t('vehicleProps:value.batteryCapacity', { batteryCapacity: batteryCapacity.toLocaleString(language) })
309
+ : t('vehicleProps:value.na');
310
+ }
311
+ },
312
+
313
+ chargingDuration230V: {
314
+ title: t('vehicleProps:title.chargingDuration230V'),
315
+ get value() {
316
+ const batteryChargingDuration230VSelect = car.battery && car.battery.batteryChargingDuration230VSelect;
317
+ const batteryChargingDuration230VHour = car.battery && car.battery.batteryChargingDuration230VHour;
318
+ const batteryCharchingDuration230VMinutesHours = car.battery && car.battery.batteryCharchingDuration230VMinutesHours;
319
+
320
+ return batteryChargingDuration230VSelect
321
+ ? `${batteryChargingDuration230VHour ? `${batteryChargingDuration230VHour} ${isCheckedBatteryTime(batteryCharchingDuration230VMinutesHours, t)}` : ''} ${batteryChargingDuration230VSelect}`
322
+ : t('vehicleProps:value.na');
323
+ }
324
+ },
325
+ chargingDurationMaxSpeed: {
326
+ title: t('vehicleProps:title.chargingDurationMaxSpeed'),
327
+ get value() {
328
+ const batteryChargingDurationMaxSelect = car.battery && car.battery.batteryChargingDurationMaxSelect;
329
+ const batteryChargingDurationMaxHour = car.battery && car.battery.batteryChargingDurationMaxHour;
330
+ const batteryCharchingDurationMaxSelectMinutesHours = car.battery && car.battery.batteryCharchingDurationMaxSelectMinutesHours;
331
+
332
+ return batteryChargingDurationMaxSelect
333
+ ? `${batteryChargingDurationMaxHour ? `${batteryChargingDurationMaxHour} ${isCheckedBatteryTime(batteryCharchingDurationMaxSelectMinutesHours, t)}` : ''} ${batteryChargingDurationMaxSelect}`
334
+ : t('vehicleProps:value.na');
335
+ }
336
+ },
337
+ batteryChargerType: {
338
+ title: t('vehicleProps:title.batteryChargerType'),
339
+ get value() {
340
+ const batteryChargerType = car.battery && car.battery.batteryChargerType;
341
+
342
+ return isPropDefined(batteryChargerType)
343
+ ? batteryChargerType.map((item: any) => t(`cbd:${item}`)).join('\n')
344
+ : t('vehicleProps:value.na');
345
+ }
346
+ },
347
+ hsn: {
348
+ title: 'HSN',
349
+ get value() {
350
+ const hsn = car.metaData.hsn;
351
+ return isPropDefined(hsn) ? hsn : t('vehicleProps:value.na');
352
+ }
353
+ },
354
+
355
+ tsn: {
356
+ title: 'TSN',
357
+ get value() {
358
+ const tsn = car.metaData.tsn;
359
+ return isPropDefined(tsn) ? tsn : t('vehicleProps:value.na');
360
+ }
361
+ },
362
+
363
+ category: {
364
+ title: t('vehicleProps:title.category'),
365
+ get value() {
366
+ return isPropDefined(category) ? t(`cbd:${category}`) : t('vehicleProps:value.na');
367
+ }
368
+ },
369
+
370
+ length: {
371
+ title: t('vehicleProps:title.length'),
372
+ get value() {
373
+ const length = car.sizeVolumeWeight && car.sizeVolumeWeight.length;
374
+ return Number.isFinite(length)
375
+ ? t('vehicleProps:value.length', { size: length.toLocaleString(language) })
376
+ : t('vehicleProps:value.na');
377
+ }
378
+ },
379
+
380
+ width: {
381
+ title: t('vehicleProps:title.width'),
382
+ get value() {
383
+ const width = car.sizeVolumeWeight && car.sizeVolumeWeight.width;
384
+ return Number.isFinite(width)
385
+ ? t('vehicleProps:value.width', { size: width.toLocaleString(language) })
386
+ : t('vehicleProps:value.na');
387
+ }
388
+ },
389
+
390
+ height: {
391
+ title: t('vehicleProps:title.height'),
392
+ get value() {
393
+ const height = car.sizeVolumeWeight && car.sizeVolumeWeight.height;
394
+ return Number.isFinite(height)
395
+ ? t('vehicleProps:value.height', { size: height.toLocaleString(language) })
396
+ : t('vehicleProps:value.na');
397
+ }
398
+ },
399
+
400
+ base: {
401
+ title: t('vehicleProps:title.base'),
402
+ get value() {
403
+ const wheelBase = car.driveSuspension.wheelBase;
404
+ return Number.isFinite(wheelBase)
405
+ ? t('vehicleProps:value.base', { size: wheelBase.toLocaleString(language) })
406
+ : t('vehicleProps:value.na');
407
+ }
408
+ },
409
+
410
+ capacityLoad: {
411
+ title: t('vehicleProps:title.loadingVolume'),
412
+ get value() {
413
+ const completeCapacity = car.sizeVolumeWeight && car.sizeVolumeWeight.completeCapacity;
414
+ return Number.isFinite(completeCapacity)
415
+ ? t('vehicleProps:value.capacityLoad', { capacity: completeCapacity.toLocaleString(language) })
416
+ : t('vehicleProps:value.na');
417
+ }
418
+ },
419
+
420
+ bootCapacity: {
421
+ title: t('vehicleProps:title.bootCapacity'),
422
+ get value() {
423
+ const cargoCapacity = car.sizeVolumeWeight && car.sizeVolumeWeight.cargoCapacity;
424
+ return Number.isFinite(cargoCapacity)
425
+ ? t('vehicleProps:value.bootCapacity', { capacity: cargoCapacity.toLocaleString(language) })
426
+ : t('vehicleProps:value.na');
427
+ }
428
+ },
429
+
430
+ doors: {
431
+ title: t('vehicleProps:title.doors'),
432
+ get value() { return doors > 0 ? doors : t('vehicleProps:value.na'); }
433
+ },
434
+
435
+ seats: {
436
+ title: t('vehicleProps:title.seats'),
437
+ get value() { return seats > 0 ? seats : t('vehicleProps:value.na'); }
438
+ },
439
+
440
+ tare: {
441
+ title: t('vehicleProps:title.tare'),
442
+ get value() {
443
+ const emptyWeight = car.sizeVolumeWeight && car.sizeVolumeWeight.emptyWeight;
444
+ return Number.isFinite(emptyWeight)
445
+ ? t('vehicleProps:value.tareWeight', { weight: (emptyWeight).toLocaleString(language) })
446
+ : t('vehicleProps:value.na');
447
+ }
448
+ },
449
+
450
+ maximumWeight: {
451
+ title: t('vehicleProps:title.maximumWeight'),
452
+ get value() {
453
+ const cargoCapacity = car.sizeVolumeWeight && car.sizeVolumeWeight.cargoCapacity;
454
+ return Number.isFinite(cargoCapacity)
455
+ ? t('vehicleProps:value.maximumWeightCapacity', { capacity: cargoCapacity.toLocaleString(language) })
456
+ : t('vehicleProps:value.na');
457
+ }
458
+ },
459
+
460
+ trailerWeightBraked: {
461
+ title: t('vehicleProps:title.trailerLoadBraked'),
462
+ get value() {
463
+ const trailerWeightBraked = car.sizeVolumeWeight && car.sizeVolumeWeight.trailerWeightBraked;
464
+ return Number.isFinite(trailerWeightBraked)
465
+ ? t('vehicleProps:value.weight', { weight: trailerWeightBraked.toLocaleString(language) })
466
+ : t('vehicleProps:value.na');
467
+ }
468
+ },
469
+
470
+ trailerWeightUnbraked: {
471
+ title: t('vehicleProps:title.trailerLoadUnbraked'),
472
+ get value() {
473
+ const trailerWeightUnbraked = car.sizeVolumeWeight && car.sizeVolumeWeight.trailerWeightUnbraked;
474
+ return Number.isFinite(trailerWeightUnbraked)
475
+ ? t('vehicleProps:value.weight', { weight: trailerWeightUnbraked.toLocaleString(language) })
476
+ : t('vehicleProps:value.na');
477
+ }
478
+ },
479
+
480
+ consumptionInner: {
481
+ icon: 'fuelConsumption',
482
+ title: t('vehicleProps:title.consumptionInner'),
483
+ get value() {
484
+ const consumptionInner = car.consumption.consumptionInner;
485
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
486
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
487
+ return Number.isFinite(consumptionInner)
488
+ ? t('vehicleProps:value.consumption', { consumption: consumptionInner.toLocaleString(language), unit: translatedUnit })
489
+ : t('vehicleProps:value.na');
490
+ }
491
+ },
492
+
493
+ consumptionPowerInner: {
494
+ icon: 'fuelConsumption',
495
+ title: t('vehicleProps:title.consumptionPowerInner'),
496
+ get value() {
497
+ const consumptionPowerInner = car.consumption.consumptionInner;
498
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
499
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
500
+ return Number.isFinite(consumptionPowerInner)
501
+ ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerInner.toLocaleString(language), unit: translatedUnit })
502
+ : t('vehicleProps:value.na');
503
+ }
504
+ },
505
+
506
+ consumptionPowerHybridInner: {
507
+ icon: 'fuelConsumption',
508
+ title: t('vehicleProps:title.consumptionPowerInner'),
509
+ get value() {
510
+ const consumptionPowerInner = car.consumption.consumptionPowerInner;
511
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
512
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
513
+ return Number.isFinite(consumptionPowerInner)
514
+ ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerInner.toLocaleString(language), unit: translatedUnit })
515
+ : t('vehicleProps:value.na');
516
+ }
517
+ },
518
+
519
+ consumptionHydrogenInner: {
520
+ icon: 'fuelConsumption',
521
+ title: t('vehicleProps:title.consumptionHydrogenInner'),
522
+ get value() {
523
+ const consumptionHydrogenInner = car.consumption.consumptionInner;
524
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
525
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
526
+ return Number.isFinite(consumptionHydrogenInner)
527
+ ? t('vehicleProps:value.consumptionGas', { consumption: consumptionHydrogenInner.toLocaleString(language), unit: translatedUnit })
528
+ : t('vehicleProps:value.na');
529
+ }
530
+ },
531
+ consumptionGasInner: {
532
+ icon: 'fuelConsumption',
533
+ title: t('vehicleProps:title.consumptionGasInner'),
534
+ get value() {
535
+ const consumptionGasInner = car.consumption.consumptionInner;
536
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
537
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
538
+ return Number.isFinite(consumptionGasInner)
539
+ ? t('vehicleProps:value.consumptionGas', { consumption: consumptionGasInner.toLocaleString(language), unit: translatedUnit })
540
+ : t('vehicleProps:value.na');
541
+ }
542
+ },
543
+
544
+ consumptionOuter: {
545
+ icon: 'fuelConsumption',
546
+ title: t('vehicleProps:title.consumptionOuter'),
547
+ get value() {
548
+ const consumptionOuter = car.consumption.consumptionOuter;
549
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
550
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
551
+ return Number.isFinite(consumptionOuter)
552
+ ? t('vehicleProps:value.consumption', { consumption: consumptionOuter.toLocaleString(language), unit: translatedUnit })
553
+ : t('vehicleProps:value.na');
554
+ }
555
+ },
556
+
557
+ consumptionPowerOuter: {
558
+ icon: 'fuelConsumption',
559
+ title: t('vehicleProps:title.consumptionPowerOuter'),
560
+ get value() {
561
+ const consumptionPowerOuter = car.consumption.consumptionOuter;
562
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
563
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
564
+ return Number.isFinite(consumptionPowerOuter)
565
+ ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerOuter.toLocaleString(language), unit: translatedUnit })
566
+ : t('vehicleProps:value.na');
567
+ }
568
+ },
569
+
570
+ consumptionPowerHybridOuter: {
571
+ icon: 'fuelConsumption',
572
+ title: t('vehicleProps:title.consumptionPowerOuter'),
573
+ get value() {
574
+ const consumptionPowerOuter = car.consumption.consumptionPowerOuter;
575
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
576
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
577
+ return Number.isFinite(consumptionPowerOuter)
578
+ ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerOuter.toLocaleString(language), unit: translatedUnit })
579
+ : t('vehicleProps:value.na');
580
+ }
581
+ },
582
+
583
+ consumptionHydrogenOuter: {
584
+ icon: 'fuelConsumption',
585
+ title: t('vehicleProps:title.consumptionHydrogenOuter'),
586
+ get value() {
587
+ const consumptionHydrogenOuter = car.consumption.consumptionOuter;
588
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
589
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
590
+ return Number.isFinite(consumptionHydrogenOuter)
591
+ ? t('vehicleProps:value.consumptionGas', { consumption: consumptionHydrogenOuter.toLocaleString(language), unit: translatedUnit })
592
+ : t('vehicleProps:value.na');
593
+ }
594
+ },
595
+
596
+ consumptionGasOuter: {
597
+ icon: 'fuelConsumption',
598
+ title: t('vehicleProps:title.consumptionGasOuter'),
599
+ get value() {
600
+ const consumptionGasOuter = car.consumption.consumptionOuter;
601
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
602
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
603
+ return Number.isFinite(consumptionGasOuter)
604
+ ? t('vehicleProps:value.consumptionGas', { consumption: consumptionGasOuter.toLocaleString(language), unit: translatedUnit })
605
+ : t('vehicleProps:value.na');
606
+ }
607
+ },
608
+
609
+ consumptionCombined: {
610
+ icon: 'fuelConsumption',
611
+ title: t('vehicleProps:title.сonsumptionCombined'),
612
+ get value() {
613
+ const consumptionCombined = car.consumption.consumptionCombined;
614
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
615
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
616
+ return Number.isFinite(consumptionCombined)
617
+ ? t('vehicleProps:value.consumption', { consumption: consumptionCombined.toLocaleString(language), unit: translatedUnit })
618
+ : t('vehicleProps:value.na');
619
+ }
620
+ },
621
+
622
+ consumptionPowerCombined: {
623
+ icon: 'fuelConsumption',
624
+ title: t('vehicleProps:title.consumptionPowerCombined'),
625
+ get value() {
626
+ const consumptionPowerCombined = car.consumption.consumptionCombined;
627
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
628
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
629
+ return Number.isFinite(consumptionPowerCombined)
630
+ ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
631
+ : t('vehicleProps:value.na');
632
+ }
633
+ },
634
+
635
+ consumptionPowerHybridCombined: {
636
+ icon: 'fuelConsumption',
637
+ title: t('vehicleProps:title.consumptionPowerCombined'),
638
+ get value() {
639
+ const consumptionPowerCombined = car.consumption.consumptionPowerCombined;
640
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
641
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
642
+ return Number.isFinite(consumptionPowerCombined)
643
+ ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
644
+ : t('vehicleProps:value.na');
645
+ }
646
+ },
647
+
648
+ consumptionHydrogenCombined: {
649
+ icon: 'fuelConsumption',
650
+ title: t('vehicleProps:title.consumptionHydrogenCombined'),
651
+ get value() {
652
+ const consumptionHydrogenCombined = car.consumption.consumptionCombined;
653
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
654
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
655
+ return Number.isFinite(consumptionHydrogenCombined)
656
+ ? t('vehicleProps:value.consumptionGas', { consumption: consumptionHydrogenCombined.toLocaleString(language), unit: translatedUnit })
657
+ : t('vehicleProps:value.na');
658
+ }
659
+ },
660
+
661
+ consumptionGasCombined: {
662
+ icon: 'fuelConsumption',
663
+ title: t('vehicleProps:title.consumptionGasCombined'),
664
+ get value() {
665
+ const consumptionGasCombined = car.consumption.consumptionCombined;
666
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
667
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
668
+ return Number.isFinite(consumptionGasCombined)
669
+ ? t('vehicleProps:value.consumptionGas', { consumption: consumptionGasCombined.toLocaleString(language), unit: translatedUnit })
670
+ : t('vehicleProps:value.na');
671
+ }
672
+ },
673
+
674
+ consumptionCombinedAlternateView: {
675
+ icon: 'fuelConsumption',
676
+ get value() {
677
+ const consumptionCombined = car.consumption.consumptionCombined;
678
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
679
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
680
+
681
+ const co2 = car.environmentEmissions.co2;
682
+
683
+ const consumptionValue = Number.isFinite(consumptionCombined)
684
+ ? t('vehicleProps:value.consumptionCombined', { consumption: consumptionCombined.toLocaleString(language), unit: translatedUnit })
685
+ : t('vehicleProps:value.na');
686
+
687
+ const co2Value = Number.isFinite(co2)
688
+ ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
689
+ : t('vehicleProps:value.na');
690
+
691
+ return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}</>;
692
+ }
693
+ },
694
+ consumptionPowerCombinedAlternateView: {
695
+ icon: 'fuelConsumption',
696
+ title: t('vehicleProps:title.consumptionPowerCombined'),
697
+ get value() {
698
+ const consumptionPowerCombined = car.consumption.consumptionCombined;
699
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
700
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
701
+ const co2 = car.environmentEmissions.co2;
702
+
703
+ const consumptionValue = Number.isFinite(consumptionPowerCombined)
704
+ ? t('vehicleProps:value.consumptionPower', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
705
+ : t('vehicleProps:value.na');
706
+
707
+ const co2Value = Number.isFinite(co2)
708
+ ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
709
+ : t('vehicleProps:value.na');
710
+
711
+ return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}</>;
712
+ }
713
+ },
714
+ consumptionHydrogenCombinedAlternateView: {
715
+ icon: 'fuelConsumption',
716
+ title: t('vehicleProps:title.consumptionHydrogenCombined'),
717
+ get value() {
718
+ const consumptionHydrogenCombined = car.consumption.consumptionCombined;
719
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
720
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
721
+ const co2 = car.environmentEmissions.co2;
722
+
723
+ const consumptionValue = Number.isFinite(consumptionHydrogenCombined)
724
+ ? t('vehicleProps:value.consumptionGas', { consumption: consumptionHydrogenCombined.toLocaleString(language), unit: translatedUnit })
725
+ : t('vehicleProps:value.na');
726
+
727
+ const co2Value = Number.isFinite(co2)
728
+ ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
729
+ : t('vehicleProps:value.na');
730
+
731
+ return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}</>;
732
+ }
733
+ },
734
+ consumptionGasCombinedAlternateView: {
735
+ icon: 'fuelConsumption',
736
+ title: t('vehicleProps:title.consumptionGasCombined'),
737
+ get value() {
738
+ const consumptionGasCombined = car.consumption.consumptionCombined;
739
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
740
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
741
+
742
+ const co2 = car.environmentEmissions.co2;
743
+
744
+ const consumptionValue = Number.isFinite(consumptionGasCombined)
745
+ ? t('vehicleProps:value.consumptionGas', { consumption: consumptionGasCombined.toLocaleString(language), unit: translatedUnit })
746
+ : t('vehicleProps:value.na');
747
+
748
+ const co2Value = Number.isFinite(co2)
749
+ ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
750
+ : t('vehicleProps:value.na');
751
+
752
+ return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}</>;
753
+ }
754
+ },
755
+
756
+ consumptionCombinedHybridAlternateView: {
757
+ icon: 'fuelConsumption',
758
+ get value() {
759
+ const consumptionCombined = +car.consumption.consumptionCombined;
760
+ const consumptionPowerCombined = +car.consumption.consumptionPowerCombined;
761
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
762
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
763
+
764
+ const consumptionPowerCombinedContent = t('vehicleProps:value.consumptionPowerCombined', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit });
765
+ const consumptionCombinedContent = t('vehicleProps:value.consumptionCombined', { consumption: consumptionCombined.toLocaleString(language), unit: translatedUnit });
766
+
767
+ const co2 = car.environmentEmissions.co2;
768
+ const co2Value = Number.isFinite(co2)
769
+ ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
770
+ : t('vehicleProps:value.na');
771
+ const hybridPlugin = car.engineData.hybridPlugin;
772
+ return Number.isFinite(consumptionCombined) && Number.isFinite(consumptionPowerCombined)
773
+ ? <React.Fragment>
774
+ {consumptionPowerCombined && hybridPlugin ? wrapValue(consumptionPowerCombinedContent) : ''}
775
+ {consumptionPowerCombined && hybridPlugin ? <br /> : ''}
776
+ {wrapValue(consumptionCombinedContent)} <br />
777
+ {wrapValue(co2Value)}
778
+ </React.Fragment>
779
+ : t('vehicleProps:value.na');
780
+ }
781
+ },
782
+
783
+ rangeHydrogen: {
784
+ title: t('vehicleProps:title.rangeHydrogen'),
785
+ get value() {
786
+ const { rangeHydrogen } = car.engineData;
787
+ return Number.isFinite(rangeHydrogen)
788
+ ? t('vehicleProps:value.batteryRangeElectric', { consumption: rangeHydrogen.toLocaleString(language) })
789
+ : t('vehicleProps:value.na');
790
+ }
791
+ },
792
+ batteryRangeElectric: {
793
+ title: t('vehicleProps:title.batteryRangeElectric'),
794
+ get value() {
795
+ const batteryRangeElectric = car.battery && car.battery.batteryRangeElectric;
796
+ return Number.isFinite(batteryRangeElectric)
797
+ ? t('vehicleProps:value.batteryRangeElectric', { consumption: batteryRangeElectric.toLocaleString(language) })
798
+ : t('vehicleProps:value.na');
799
+ }
800
+ },
801
+
802
+ c02: {
803
+ title: t('vehicleProps:title.co2'),
804
+ get value() {
805
+ const c02 = car.environmentEmissions.co2;
806
+ return Number.isFinite(c02)
807
+ ? t('vehicleProps:value.co2', { co2: c02.toLocaleString(language) })
808
+ : t('vehicleProps:value.na');
809
+ }
810
+ },
811
+
812
+ consumptionAndCo2: {
813
+ title: t('vehicleProps:title.consumptionAndCo2'),
814
+ get value() {
815
+ const consumptionPowerCombined = car.consumption.consumptionCombined;
816
+ const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
817
+ const translatedUnit = t(`cbd:${consumptionUnit}`);
818
+ const co2 = car.environmentEmissions.co2;
819
+ const consumptionValue = Number.isFinite(consumptionPowerCombined)
820
+ ? t('vehicleProps:value.consumptionCombined', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
821
+ : t('vehicleProps:value.na');
822
+ const co2Value = Number.isFinite(co2)
823
+ ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
824
+ : t('vehicleProps:value.na');
825
+
826
+ return `${consumptionValue} | ${co2Value}`;
827
+ }
828
+ },
829
+ emissionClass: {
830
+ title: t('vehicleProps:title.emissionClass'),
831
+ get value() {
832
+ const emissionClass = car.environmentEmissions.emissionClass;
833
+ return isPropDefined(emissionClass) ? t(`cbd:${emissionClass}`) : t('vehicleProps:value.na');
834
+ }
835
+ },
836
+
837
+ emissionSticker: {
838
+ title: t('vehicleProps:title.emissionsSticker'),
839
+ get value() {
840
+ const emissionSticker = car.environmentEmissions.emissionSticker;
841
+ let icon = null;
842
+ const size = 25;
843
+
844
+ if (emissionSticker !== 'selector_emissionSticker_no') {
845
+ icon = EMISSION_STICKERS_ICONS[emissionSticker];
846
+ }
847
+
848
+ return icon ? <Icon src={icon} width={size} height={size} /> : t('vehicleProps:value.na');
849
+ }
850
+ },
851
+
852
+ wpEmissionSticker: {
853
+ title: t('vehicleProps:title.emissionsSticker'),
854
+ get value() {
855
+ const emissionSticker = car.environmentEmissions.emissionSticker;
856
+ let icon = null;
857
+ const size = 25;
858
+
859
+ if (emissionSticker !== 'selector_emissionSticker_no') {
860
+ icon = WP_EMISSION_STICKERS_ICONS[emissionSticker];
861
+ }
862
+
863
+ return icon ? <Icon src={icon} width={size} height={size} /> : t('vehicleProps:value.na');
864
+ }
865
+ },
866
+
867
+ energyEfficiencyClass: {
868
+ title: t('vehicleProps:title.energyEfficiencyClass'),
869
+ subTitle: t('vehicleProps:title.subTitle'),
870
+ get value() {
871
+ const level = car.environmentEmissions.energyEfficiencyClass;
872
+ return isPropDefined(level) ? <CO2Efficiency level={level} t={t} /> : t('vehicleProps:value.na');
873
+ }
874
+ },
875
+
876
+ offerAvailability: {
877
+ title: t('vehicleProps:title.offerAvailability'),
878
+ icon: 'carAvailability',
879
+ get value() {
880
+ const offerAvailabilityMode = offer.availabilityMode;
881
+ const offerAvailabilityTimestamp = offer.availabilityFrom;
882
+ const humanViewTime = moment.unix(offerAvailabilityTimestamp).format('DD.MM.YYYY');
883
+ let offerAvailability: string;
884
+
885
+ switch (offerAvailabilityMode) {
886
+ case 'selector_availabilityMode_always':
887
+ offerAvailability = t(`cbd:${offerAvailabilityMode}`);
888
+ break;
889
+
890
+ case 'selector_availabilityMode_fromDate':
891
+ if (offer.deliveryPeriod != null && offer.deliveryPeriod !== 'selector_unknown') {
892
+ offerAvailability = formatDeliveryPeriod(t, offer.deliveryPeriod);
893
+ break;
894
+ }
895
+
896
+ if (moment.utc(offerAvailabilityTimestamp, 'X').isBefore()) {
897
+ offerAvailability = t('cbd:selector_availabilityMode_always');
898
+ } else {
899
+ offerAvailability = t('vehicleProps:value.fromDate', { date: humanViewTime });
900
+ }
901
+ break;
902
+
903
+ default:
904
+ if (!offerAvailabilityMode && !firstRegistration && !mileage) offerAvailability = t('vehicleProps:value.onRequest');
905
+ else offerAvailability = null;
906
+ }
907
+ return isPropDefined(offerAvailability) ? offerAvailability : t('vehicleProps:value.na');
908
+ }
909
+ },
910
+
911
+ lastTechnicalService: {
912
+ title: t('vehicleProps:title.lastTechnicalService'),
913
+ get value() {
914
+ const lastTechnicalService = car.careService.lastTechnicalService;
915
+ return Number.isFinite(lastTechnicalService)
916
+ ? formatTimestamp({ timestamp: lastTechnicalService, format: 'MM/YYYY' })
917
+ : t('vehicleProps:value.na');
918
+ }
919
+ },
920
+
921
+ generalInspection: {
922
+ title: t('vehicleProps:title.generalInspection'),
923
+ get value() {
924
+ const generalInspection = car.careService.generalInspection;
925
+ if (car.offer.newHuAu) {
926
+ return t('vehicleProps:value.new');
927
+ // tslint:disable-next-line:no-else-after-return
928
+ }else {
929
+ return Number.isFinite(generalInspection)
930
+ ? formatTimestamp({ timestamp: generalInspection, format: 'MM/YYYY' })
931
+ : t('vehicleProps:value.na');
932
+ }
933
+ }
934
+ },
935
+
936
+ condition: {
937
+ title: t('vehicleProps:title.сondition'),
938
+ get value() {
939
+ return isPropDefined(condition)
940
+ ? t(`cbd:${condition}`)
941
+ : t('vehicleProps:value.na');
942
+ }
943
+ },
944
+
945
+ numberOfPreviousOwnersSimple: {
946
+ title: t('vehicleProps:title.numberOfPreviousOwners'),
947
+ get value() {
948
+ return Number.isFinite(numberOfPreviousOwners)
949
+ ? numberOfPreviousOwners
950
+ : t('vehicleProps:value.na');
951
+ }
952
+ },
953
+
954
+ guarantee: {
955
+ title: t('vehicleProps:title.guarantee'),
956
+ get value() {
957
+ const guarantee = car.offer.warranty;
958
+ return isPropDefined(guarantee)
959
+ ? (guarantee ? t('vehicleProps:value.yes') : t('vehicleProps:value.no'))
960
+ : t('vehicleProps:value.na');
961
+ }
962
+ },
963
+
964
+ maintenanceGuide: {
965
+ title: t('vehicleProps:title.maintenanceGuide'),
966
+ get value() {
967
+ const fullserviceHistory = car.careService.fullServiceHistory;
968
+ return isPropDefined(fullserviceHistory)
969
+ ? (fullserviceHistory ? t('vehicleProps:value.yes') : t('vehicleProps:value.no'))
970
+ : t('vehicleProps:value.na');
971
+ }
972
+ },
973
+
974
+ nonSmokerVehicle: {
975
+ title: t('vehicleProps:title.nonSmokingVehicle'),
976
+ get value() {
977
+ return isPropDefined(nonSmokerVehicle)
978
+ ? (nonSmokerVehicle ? t('vehicleProps:value.yes') : t('vehicleProps:value.no'))
979
+ : t('vehicleProps:value.na');
980
+ }
981
+ },
982
+
983
+ manufacturerColorName: {
984
+ title: t('vehicleProps:title.manufacturerColorName'),
985
+ get value() {
986
+ const color = car.exterior.manufacturerColorName;
987
+
988
+ if (typeof color !== 'string' || color === '') {
989
+ return t('vehicleProps:value.na');
990
+ }
991
+
992
+ return color[0].toUpperCase() + color.slice(1);
993
+ }
994
+ },
995
+
996
+ exteriorColor: {
997
+ title: t('vehicleProps:title.colour'),
998
+ get value() {
999
+ const exteriorColor = car.exterior.exteriorColor;
1000
+ return isPropDefined(exteriorColor)
1001
+ ? t(`cbd:${exteriorColor.replace('exterior_', '')}`)
1002
+ : t('vehicleProps:value.na');
1003
+ }
1004
+ },
1005
+
1006
+ appointmentsColor: {
1007
+ title: t('vehicleProps:title.appointmentsColor'),
1008
+ get value() {
1009
+ const interiorColor = car.interior.interiorColor;
1010
+ return isPropDefined(interiorColor)
1011
+ ? t(`cbd:${interiorColor.replace('interior_', '')}`)
1012
+ : t('vehicleProps:value.na');
1013
+ }
1014
+ },
1015
+
1016
+ interiorType: {
1017
+ title: t('vehicleProps:title.interiorType'),
1018
+ get value() {
1019
+ const interiorType = car.interior.interiorType;
1020
+ return isPropDefined(interiorType)
1021
+ ? t(`cbd:${interiorType}`)
1022
+ : t('vehicleProps:value.na');
1023
+ }
1024
+ },
1025
+ signOfUse : {
1026
+ title: t('vehicleProps:title.signsOfUse'),
1027
+ isVisible: mileage > 100, // tslint:disable-line
1028
+ isLongTitle: true,
1029
+ get value() {
1030
+ return t('vehicleProps:value.yes');
1031
+ }
1032
+ },
1033
+ countryVersion : {
1034
+ title: t('vehicleProps:title.countryVersion'),
1035
+ get value() {
1036
+ const countryName = car.countryActive[language];
1037
+ if (!countryVersion) return t('vehicleProps:value.na');
1038
+ switch (countryVersion) {
1039
+ case 'de':
1040
+ return t('vehicleProps:value.countryDEversion');
1041
+ break;
1042
+ case 'eu':
1043
+ return t('vehicleProps:value.countryEUversion');
1044
+ break;
1045
+ case 'at':
1046
+ return t('vehicleProps:value.countryATversion');
1047
+ break;
1048
+ default:
1049
+ return t('vehicleProps:value.countryVersionName', { countryName });
1050
+ }
1051
+ }
1052
+ }
1053
+ };
1054
+ return props;
1055
+ };
1056
+
1057
+ export default getDecoratedProps;