@bytebrand/fe-ui-core 4.2.79 → 4.2.81

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 (1056) hide show
  1. package/.editorconfig +10 -10
  2. package/.gitlab-ci.yml +34 -0
  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/PaymentTypeCard/PaymentTypeCard.test.tsx +49 -49
  9. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/AdditionalOrderInfo.test.tsx +127 -127
  10. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusCar.test.tsx +58 -58
  11. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusCard.test.tsx +74 -74
  12. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusSection.test.tsx +62 -62
  13. package/__tests__/components/UserDasboardPage/sections/RequestedCarsSection/RequestedCarsSection.test.tsx +116 -116
  14. package/__tests__/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.test.tsx +58 -58
  15. package/__tests__/components/VehicleSmallCard/VehicleInfo.test.tsx +87 -87
  16. package/__tests__/components/VehicleSmallCard/VehicleTitle.test.tsx +90 -90
  17. package/__tests__/components/_common/Badge/Badge.test.tsx +15 -15
  18. package/__tests__/components/_common/IconSVG/IconSVG.test.tsx +22 -22
  19. package/__tests__/components/_common/Image/Image.test.tsx +82 -82
  20. package/__tests__/components/_common/MaterialAutocomplete/MaterialAutocomplete.test.tsx +48 -48
  21. package/__tests__/components/_common/MaterialField/MaterialField.test.tsx +58 -58
  22. package/__tests__/components/_common/StarButton/StarButton.test.tsx +45 -45
  23. package/__tests__/mockedData/financingConfig.js +201 -201
  24. package/__tests__/mockedData/mockedPendingRequestedCar.js +68 -68
  25. package/__tests__/utils/CommonUtils/addPrefixToKeys.test.ts +18 -18
  26. package/__tests__/utils/CommonUtils/arrToObj.test.js +32 -32
  27. package/__tests__/utils/CommonUtils/checkRangeValuesOnEqual.test.ts +16 -16
  28. package/__tests__/utils/CommonUtils/fixNumber.test.ts +19 -19
  29. package/__tests__/utils/CommonUtils/formatMileage.test.ts +8 -8
  30. package/__tests__/utils/CommonUtils/getChipFilterValue.test.ts +22 -22
  31. package/__tests__/utils/CommonUtils/getFormattedNumber.test.ts +18 -18
  32. package/__tests__/utils/CommonUtils/getFormattedPrice.test.ts +19 -19
  33. package/__tests__/utils/CommonUtils/getGroupValuesForQuery.test.ts +51 -51
  34. package/__tests__/utils/CommonUtils/getOfferSliders.test.ts +61 -61
  35. package/__tests__/utils/CommonUtils/getPriceRating.test.ts +26 -26
  36. package/__tests__/utils/CommonUtils/getPriceRatingConfig.test.ts +33 -33
  37. package/__tests__/utils/CommonUtils/preloadNearbyImages.test.ts +8 -8
  38. package/__tests__/utils/CommonUtils/sliceLessThan.test.ts +23 -23
  39. package/__tests__/utils/CommonUtils/sliceMoreThan.test.ts +23 -23
  40. package/common.ts +160 -162
  41. package/feWpComponents.ts +25 -25
  42. package/index.ts +4 -4
  43. package/jest.config.js +42 -42
  44. package/landing.ts +38 -38
  45. package/media/images/advantages/advantage_cart.svg +4 -4
  46. package/media/images/advantages/advantage_check.svg +4 -4
  47. package/media/images/advantages/advantage_like.svg +10 -10
  48. package/media/images/advantages/advantage_secure.svg +6 -6
  49. package/media/images/check-blue.svg +40 -40
  50. package/media/images/raiting-star.svg +3 -3
  51. package/media/images/raiting-stars-min.svg +7 -7
  52. package/media/images/refresh-button.svg +49 -49
  53. package/media/images/slider-arrow-big.svg +11 -11
  54. package/media/images/user-icon.svg +16 -16
  55. package/media/locales/de/promoSlider.json +25 -25
  56. package/media/locales/en/promoSlider.json +25 -25
  57. package/media/svg/common/arrow_breadcrumps.svg +3 -3
  58. package/media/svg/common/home.svg +8 -8
  59. package/media/svg/common/whyAutodeIconSet-F.svg +9 -9
  60. package/media/svg/common/whyAutodeIconSet-G.svg +8 -8
  61. package/media/svg/common/whyAutodeIconSet-Q.svg +6 -6
  62. package/media/svg/common/whyAutodeIconSet-R.svg +9 -9
  63. package/media/svg/infoBlocks/whyAutodeIconSet-F.svg +9 -9
  64. package/media/svg/infoBlocks/whyAutodeIconSet-G.svg +8 -8
  65. package/media/svg/infoBlocks/whyAutodeIconSet-Q.svg +6 -6
  66. package/media/svg/infoBlocks/whyAutodeIconSet-R.svg +9 -9
  67. package/media/svg/usp/icon1.svg +16 -16
  68. package/media/svg/usp/icon2.svg +13 -13
  69. package/media/svg/usp/icon3.svg +10 -10
  70. package/media/svg/usp/icon4.svg +14 -14
  71. package/package.json +124 -123
  72. package/profile.ts +1 -1
  73. package/setupTests.js +7 -7
  74. package/source/components/AccardionSection/AccardionSection.styl +45 -45
  75. package/source/components/AccardionSection/AccardionSection.tsx +47 -47
  76. package/source/components/AccordionWidget/AccordionWidget.styl +205 -205
  77. package/source/components/AccordionWidget/AccordionWidget.tsx +225 -225
  78. package/source/components/AdvantageItem/AdvantageItem.story.js +23 -23
  79. package/source/components/AdvantageItem/AdvantageItem.styl +47 -47
  80. package/source/components/AdvantageItem/AdvantageItem.tsx +26 -26
  81. package/source/components/Alternative/Dealer.story.js +31 -31
  82. package/source/components/Alternative/Dealer.story.styl +2 -2
  83. package/source/components/Alternative/DealerInfo.styl +116 -116
  84. package/source/components/Alternative/DealerInfo.tsx +171 -171
  85. package/source/components/Breadcrumbs/Breadcrumbs.story.js +40 -40
  86. package/source/components/Breadcrumbs/Breadcrumbs.styl +136 -136
  87. package/source/components/Breadcrumbs/Breadcrumbs.tsx +93 -93
  88. package/source/components/Breadcrumbs/FirstInfoBlock/FirstInfoBlock.story.js +45 -45
  89. package/source/components/Breadcrumbs/FirstInfoBlock/FirstInfoBlock.styl +54 -54
  90. package/source/components/Breadcrumbs/FirstInfoBlock/FirstInfoBlock.tsx +17 -17
  91. package/source/components/Checkout/CheckoutStepper/CheckoutStepper.styl +221 -221
  92. package/source/components/Checkout/CheckoutStepper/CheckoutStepper.tsx +70 -70
  93. package/source/components/Checkout/CheckoutStepper/CheckoutStepperClasses.js +173 -173
  94. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.story.js +243 -243
  95. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.story.styl +20 -20
  96. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.styl +36 -36
  97. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.tsx +53 -53
  98. package/source/components/Checkout/RadioCards/AdditionalServiceCard/ServiceCardWrapper.styl +201 -201
  99. package/source/components/Checkout/RadioCards/AdditionalServiceCard/ServiceCardWrapper.tsx +212 -212
  100. package/source/components/Checkout/RadioCards/ContentCard/AdditionalServiceContent.styl +30 -30
  101. package/source/components/Checkout/RadioCards/ContentCard/AdditionalServiceContent.tsx +62 -62
  102. package/source/components/Checkout/RadioCards/ContentCard/VehicleDeliveryContent.styl +73 -73
  103. package/source/components/Checkout/RadioCards/ContentCard/VehicleDeliveryContent.tsx +61 -61
  104. package/source/components/Checkout/RadioCards/PaymentTypeCard/PaymentTypeCard.styl +193 -193
  105. package/source/components/Checkout/RadioCards/PaymentTypeCard/PaymentTypeCard.tsx +181 -181
  106. package/source/components/Checkout/RadioCards/RadioCheckout.styl +158 -158
  107. package/source/components/Checkout/RadioCards/RadioCheckout.tsx +178 -178
  108. package/source/components/Checkout/RadioCards/RadioGroupCheckout.story.js +105 -105
  109. package/source/components/Checkout/RadioCards/RadioGroupCheckout.story.styl +37 -37
  110. package/source/components/Checkout/Switcher/Switcher.story.js +41 -41
  111. package/source/components/Checkout/Switcher/Switcher.story.styl +1 -1
  112. package/source/components/Checkout/Switcher/Switcher.styled.tsx +53 -53
  113. package/source/components/Checkout/Switcher/Switcher.tsx +48 -48
  114. package/source/components/CompactSearchWidget/CompactSearchFields/CompactSearchFields.styl +176 -176
  115. package/source/components/CompactSearchWidget/CompactSearchFields/CompactSearchFields.tsx +477 -477
  116. package/source/components/CompactSearchWidget/CompactSearchWidget.story.js +187 -187
  117. package/source/components/CompactSearchWidget/CompactSearchWidget.styl +43 -43
  118. package/source/components/CompactSearchWidget/CompactSearchWidget.tsx +165 -165
  119. package/source/components/ContactForm/ContactForm.story.js +93 -93
  120. package/source/components/ContactForm/ContactForm.styl +260 -260
  121. package/source/components/ContactForm/ContactForm.tsx +588 -588
  122. package/source/components/ContactForm/WpContactForm.tsx +287 -287
  123. package/source/components/ContactInfo/ContactInfo.story.js +58 -58
  124. package/source/components/ContactInfo/ContactInfo.styl +22 -22
  125. package/source/components/ContactInfo/ContactInfo.tsx +161 -161
  126. package/source/components/ContactInfo/TemporaryTranslation.ts +11 -11
  127. package/source/components/CustomerQuote/CustomerQuote.story.js +41 -41
  128. package/source/components/CustomerQuote/CustomerQuote.styl +79 -79
  129. package/source/components/CustomerQuote/CustomerQuote.tsx +68 -68
  130. package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.story.js +73 -73
  131. package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.story.styl +4 -4
  132. package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.styl +46 -46
  133. package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.tsx +79 -79
  134. package/source/components/CustomerQuotesSlider/SliderArrow.tsx +20 -20
  135. package/source/components/FormattedNumber/FormattedNumber.story.js +114 -114
  136. package/source/components/FormattedNumber/FormattedNumber.styl +1 -1
  137. package/source/components/FormattedNumber/FormattedNumber.tsx +91 -91
  138. package/source/components/ImageSettings/EditableOptionsTable/CustomCheckbox/CustomCheckbox.styl +7 -7
  139. package/source/components/ImageSettings/EditableOptionsTable/CustomCheckbox/CustomCheckbox.tsx +30 -30
  140. package/source/components/ImageSettings/EditableOptionsTable/EditableOptionsTable.styl +122 -122
  141. package/source/components/ImageSettings/EditableOptionsTable/EditableOptionsTable.tsx +199 -199
  142. package/source/components/ImageSettings/EditableOptionsTable/ImageIcon/ImageIcon.styl +3 -3
  143. package/source/components/ImageSettings/EditableOptionsTable/ImageIcon/ImageIcon.tsx +15 -15
  144. package/source/components/ImageSettings/OptionsTable/OptionsTable.styl +47 -47
  145. package/source/components/ImageSettings/OptionsTable/OptionsTable.tsx +122 -122
  146. package/source/components/ImageSettings/PricePlan/PricePlan.styl +63 -63
  147. package/source/components/ImageSettings/PricePlan/PricePlan.tsx +32 -32
  148. package/source/components/ImageSettings/index.ts +42 -42
  149. package/source/components/ImageSettings/story.js +1212 -1212
  150. package/source/components/InfoBlocks/FirstInfoBlock/FirstInfoBlock.styl +33 -33
  151. package/source/components/InfoBlocks/FirstInfoBlock/FirstInfoBlock.tsx +48 -48
  152. package/source/components/InfoBlocks/FirstInfoBlock/FirstInfoBlockItem/FirstInfoBlockItem.styl +68 -68
  153. package/source/components/InfoBlocks/FirstInfoBlock/FirstInfoBlockItem/FirstInfoBlockItem.tsx +21 -21
  154. package/source/components/InfoBlocks/InfoBlockWrapper/InfoBlockWrapper.styl +41 -41
  155. package/source/components/InfoBlocks/InfoBlockWrapper/InfoBlockWrapper.tsx +45 -45
  156. package/source/components/InfoBlocks/InfoBlockWrapper.story.js +101 -101
  157. package/source/components/InfoBlocks/InfoBlockWrapper.story.styl +45 -45
  158. package/source/components/InfoBlocks/PricingToolBlock/PricingTool.styl +6 -6
  159. package/source/components/InfoBlocks/PricingToolBlock/PricingTool.tsx +29 -29
  160. package/source/components/InfoBlocks/PricingToolBlock/PricingToolBlock.styl +45 -45
  161. package/source/components/InfoBlocks/PricingToolBlock/PricingToolBlock.tsx +81 -81
  162. package/source/components/InfoBlocks/ServicesBlock/ServiceBlockItem.styl +47 -47
  163. package/source/components/InfoBlocks/ServicesBlock/ServiceBlockItem.tsx +25 -25
  164. package/source/components/OfferDetailedSection/OfferDetailedSection.styl +31 -31
  165. package/source/components/OfferDetailedSection/OfferDetailedSection.tsx +100 -100
  166. package/source/components/OfferDetailedSection/partials/PanelConfig.styl +131 -127
  167. package/source/components/OfferDetailedSection/partials/PanelConfig.tsx +124 -124
  168. package/source/components/OfferPanel/AboAccordion/AboAccordion.styl +24 -24
  169. package/source/components/OfferPanel/AboAccordion/AboAccordion.tsx +128 -128
  170. package/source/components/OfferPanel/AboAccordion/AboColorOptions/AboColorOptions.styl +11 -11
  171. package/source/components/OfferPanel/AboAccordion/AboColorOptions/AboColorOptions.tsx +35 -35
  172. package/source/components/OfferPanel/AboAccordion/AboFaq/AboFaq.story.js +97 -97
  173. package/source/components/OfferPanel/AboAccordion/AboFaq/AboFaq.styl +20 -20
  174. package/source/components/OfferPanel/AboAccordion/AboFaq/AboFaq.tsx +25 -25
  175. package/source/components/OfferPanel/AboAccordion/AboIncludedServices/AboIncludedServices.styl +13 -13
  176. package/source/components/OfferPanel/AboAccordion/AboIncludedServices/AboIncludedServices.tsx +39 -39
  177. package/source/components/OfferPanel/MuiOfferPeriod/MuiOfferPeriod.theme.js +29 -29
  178. package/source/components/OfferPanel/MuiOfferPeriod/MuiOfferPeriod.tsx +49 -49
  179. package/source/components/OfferPanel/OfferCheckboxGroup/CheckboxContainer.tsx +146 -146
  180. package/source/components/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.styl +120 -123
  181. package/source/components/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.tsx +24 -24
  182. package/source/components/OfferPanel/OfferPanel.story.js +139 -139
  183. package/source/components/OfferPanel/OfferPanel.styl +194 -192
  184. package/source/components/OfferPanel/OfferPanel.tsx +81 -81
  185. package/source/components/OfferPanel/OfferPeriod/OfferPeriod.styl +24 -24
  186. package/source/components/OfferPanel/OfferPeriod/OfferPeriod.tsx +49 -49
  187. package/source/components/OfferPanel/RangeGroup/RangeGroup.story.js +35 -35
  188. package/source/components/OfferPanel/RangeGroup/RangeGroup.story.styl +2 -2
  189. package/source/components/OfferPanel/RangeGroup/RangeGroup.tsx +37 -37
  190. package/source/components/PriceRating/PriceRating.story.js +39 -39
  191. package/source/components/PriceRating/PriceRating.story.styl +1 -1
  192. package/source/components/PriceRating/PriceRating.styl +47 -47
  193. package/source/components/PriceRating/PriceRating.tsx +64 -64
  194. package/source/components/PriceRatingDetailed/PriceRatingDetailed.story.js +78 -78
  195. package/source/components/PriceRatingDetailed/PriceRatingDetailed.story.styl +11 -11
  196. package/source/components/PriceRatingDetailed/PriceRatingDetailed.styl +120 -120
  197. package/source/components/PriceRatingDetailed/PriceRatingDetailed.tsx +187 -187
  198. package/source/components/RateSearchValue/RateSearchValue.story.js +78 -78
  199. package/source/components/RateSearchValue/RateSearchValue.story.styl +1 -1
  200. package/source/components/RateSearchValue/RateSearchValue.styl +22 -22
  201. package/source/components/RateSearchValue/RateSearchValue.tsx +55 -55
  202. package/source/components/RateSearchWidget/RateSearchWidget.story.js +57 -57
  203. package/source/components/RateSearchWidget/RateSearchWidget.story.styl +12 -12
  204. package/source/components/RateSearchWidget/RateSearchWidget.styl +106 -106
  205. package/source/components/RateSearchWidget/RateSearchWidget.tsx +163 -163
  206. package/source/components/SearchFilters/FiltersFactory.story.js +273 -273
  207. package/source/components/SearchFilters/FiltersFactory.tsx +85 -85
  208. package/source/components/SearchFilters/Slider.styl +66 -66
  209. package/source/components/SearchFilters/common/Color/Color.styl +29 -29
  210. package/source/components/SearchFilters/common/Color/Color.tsx +60 -60
  211. package/source/components/SearchFilters/common/FilterBlock/FilterBlock.styl +39 -39
  212. package/source/components/SearchFilters/common/FilterBlock/FilterBlock.styled.tsx +28 -28
  213. package/source/components/SearchFilters/common/FilterBlock/FilterBlock.tsx +54 -54
  214. package/source/components/SearchFilters/common/FilterBlock/FilterBlockFactory.tsx +151 -151
  215. package/source/components/SearchFilters/common/RangeControlled/RangeControlled.tsx +155 -155
  216. package/source/components/SearchFilters/filters/AlternativeID.styl +98 -98
  217. package/source/components/SearchFilters/filters/AlternativeID.tsx +79 -79
  218. package/source/components/SearchFilters/filters/Consumption.styl +41 -41
  219. package/source/components/SearchFilters/filters/Consumption.tsx +52 -52
  220. package/source/components/SearchFilters/filters/Cost.styl +43 -43
  221. package/source/components/SearchFilters/filters/Cost.tsx +112 -112
  222. package/source/components/SearchFilters/filters/CubicCapacity.styl +30 -30
  223. package/source/components/SearchFilters/filters/CubicCapacity.tsx +134 -134
  224. package/source/components/SearchFilters/filters/Damaged.styl +1 -1
  225. package/source/components/SearchFilters/filters/Damaged.tsx +40 -40
  226. package/source/components/SearchFilters/filters/Doors.styl +18 -18
  227. package/source/components/SearchFilters/filters/Doors.tsx +113 -113
  228. package/source/components/SearchFilters/filters/DriveType.styl +22 -22
  229. package/source/components/SearchFilters/filters/DriveType.tsx +72 -72
  230. package/source/components/SearchFilters/filters/EmissionClass.tsx +35 -35
  231. package/source/components/SearchFilters/filters/EmissionSticker.styl +46 -46
  232. package/source/components/SearchFilters/filters/EmissionSticker.tsx +52 -52
  233. package/source/components/SearchFilters/filters/FirstRegistration.tsx +97 -97
  234. package/source/components/SearchFilters/filters/Fuel.styl +27 -27
  235. package/source/components/SearchFilters/filters/Fuel.tsx +75 -75
  236. package/source/components/SearchFilters/filters/Highlights.styl +38 -38
  237. package/source/components/SearchFilters/filters/Highlights.tsx +69 -69
  238. package/source/components/SearchFilters/filters/ImagesCount.tsx +66 -66
  239. package/source/components/SearchFilters/filters/InteriorColor.styl +29 -29
  240. package/source/components/SearchFilters/filters/InteriorColor.tsx +71 -71
  241. package/source/components/SearchFilters/filters/InteriorMaterial.styl +28 -28
  242. package/source/components/SearchFilters/filters/InteriorMaterial.tsx +71 -71
  243. package/source/components/SearchFilters/filters/MakeModel.styl +106 -106
  244. package/source/components/SearchFilters/filters/MakeModel.tsx +164 -164
  245. package/source/components/SearchFilters/filters/Mileage.tsx +108 -108
  246. package/source/components/SearchFilters/filters/OwnerID.styl +14 -14
  247. package/source/components/SearchFilters/filters/OwnerID.tsx +65 -65
  248. package/source/components/SearchFilters/filters/Owners.styl +23 -23
  249. package/source/components/SearchFilters/filters/Owners.tsx +72 -72
  250. package/source/components/SearchFilters/filters/Power.tsx +157 -157
  251. package/source/components/SearchFilters/filters/PriceDifference.tsx +67 -67
  252. package/source/components/SearchFilters/filters/Rate.styl +34 -34
  253. package/source/components/SearchFilters/filters/Rate.tsx +53 -53
  254. package/source/components/SearchFilters/filters/Seats.styl +31 -31
  255. package/source/components/SearchFilters/filters/Seats.tsx +53 -53
  256. package/source/components/SearchFilters/filters/StateOptions.styl +16 -16
  257. package/source/components/SearchFilters/filters/StateOptions.tsx +58 -58
  258. package/source/components/SearchFilters/filters/StateOptionsNew.styl +23 -23
  259. package/source/components/SearchFilters/filters/StateOptionsNew.tsx +72 -72
  260. package/source/components/SearchFilters/filters/Transmission.styl +20 -20
  261. package/source/components/SearchFilters/filters/Transmission.tsx +71 -71
  262. package/source/components/SearchFilters/filters/commonFilters.styl +93 -93
  263. package/source/components/SearchPage/ChipFilter/ChipFilter.styl +45 -45
  264. package/source/components/SearchPage/ChipFilter/ChipFilter.tsx +21 -21
  265. package/source/components/SearchPage/DropDown/DropDown.styl +99 -99
  266. package/source/components/SearchPage/DropDown/DropDown.tsx +52 -52
  267. package/source/components/SearchPage/DropDown/MultiDropDown.tsx +84 -84
  268. package/source/components/SearchPage/DropDown/index.ts +8 -8
  269. package/source/components/SearchPage/Filters/HistogramSlider.styl +77 -77
  270. package/source/components/SearchPage/Filters/MakeModel/MakeModel.story.js +11 -11
  271. package/source/components/SearchPage/Filters/MakeModel/MakeModel.styl +95 -95
  272. package/source/components/SearchPage/Filters/MakeModel/MakeModel.tsx +152 -152
  273. package/source/components/SearchPage/Pagination/Pagination.styl +95 -95
  274. package/source/components/SearchPage/Pagination/Pagination.tsx +89 -89
  275. package/source/components/SearchPage/SearchChips/SearchChips.styl +52 -52
  276. package/source/components/SearchPage/SearchChips/SearchChips.tsx +76 -76
  277. package/source/components/SearchPage/SearchTopBar/SearchTopBar.styl +109 -109
  278. package/source/components/SearchPage/SearchTopBar/SearchTopBar.tsx +116 -116
  279. package/source/components/SearchPageMobile/FiltersContainer/FiltersContainer.styl +44 -44
  280. package/source/components/SearchPageMobile/FiltersContainer/FiltersContainer.tsx +162 -162
  281. package/source/components/SearchPageMobile/FiltersDetailed/BodyType.styl +47 -47
  282. package/source/components/SearchPageMobile/FiltersDetailed/BodyType.tsx +85 -85
  283. package/source/components/SearchPageMobile/FiltersDetailed/Consumption.styl +48 -48
  284. package/source/components/SearchPageMobile/FiltersDetailed/Consumption.tsx +76 -76
  285. package/source/components/SearchPageMobile/FiltersDetailed/Doors.styl +52 -52
  286. package/source/components/SearchPageMobile/FiltersDetailed/Doors.tsx +103 -103
  287. package/source/components/SearchPageMobile/FiltersDetailed/FirstRegistration.tsx +69 -69
  288. package/source/components/SearchPageMobile/FiltersDetailed/Fuel.styl +31 -31
  289. package/source/components/SearchPageMobile/FiltersDetailed/Fuel.tsx +83 -83
  290. package/source/components/SearchPageMobile/FiltersDetailed/HistogramSlider.styl +100 -100
  291. package/source/components/SearchPageMobile/FiltersDetailed/MakeModel.styl +95 -95
  292. package/source/components/SearchPageMobile/FiltersDetailed/MakeModel.tsx +171 -171
  293. package/source/components/SearchPageMobile/FiltersDetailed/MakeModelExclude.styl +112 -112
  294. package/source/components/SearchPageMobile/FiltersDetailed/MakeModelExclude.tsx +122 -122
  295. package/source/components/SearchPageMobile/FiltersDetailed/Mileage.tsx +80 -80
  296. package/source/components/SearchPageMobile/FiltersDetailed/Power.tsx +116 -116
  297. package/source/components/SearchPageMobile/FiltersDetailed/Price.tsx +129 -129
  298. package/source/components/SearchPageMobile/FiltersDetailed/Rate.tsx +252 -252
  299. package/source/components/SearchPageMobile/FiltersDetailed/Seats.styl +41 -41
  300. package/source/components/SearchPageMobile/FiltersDetailed/Seats.tsx +85 -85
  301. package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.story.js +834 -834
  302. package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.story.styl +40 -40
  303. package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.styl +37 -37
  304. package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.tsx +130 -130
  305. package/source/components/SearchWidget/ColorWidget/BodyColorWidget.styl +54 -54
  306. package/source/components/SearchWidget/ColorWidget/BodyColorWidget.tsx +122 -122
  307. package/source/components/SearchWidget/DriveTransmissionWidget/DriveTransmissionWidget.styl +17 -17
  308. package/source/components/SearchWidget/DriveTransmissionWidget/DriveTransmissionWidget.tsx +36 -36
  309. package/source/components/SearchWidget/EnvironmentWidget/DetailedEnvironmentWidget.styl +25 -25
  310. package/source/components/SearchWidget/EnvironmentWidget/DetailedEnvironmentWidget.tsx +126 -126
  311. package/source/components/SearchWidget/EnvironmentWidget/EnvironmentWidget.styl +54 -54
  312. package/source/components/SearchWidget/EnvironmentWidget/EnvironmentWidget.tsx +173 -173
  313. package/source/components/SearchWidget/HighlightsWidget/HighlightsWidget.styl +39 -39
  314. package/source/components/SearchWidget/HighlightsWidget/HighlightsWidget.tsx +99 -99
  315. package/source/components/SearchWidget/InteriorWidget/DetailedInteriorWidget.tsx +44 -44
  316. package/source/components/SearchWidget/InteriorWidget/InteriorWidget.styl +28 -28
  317. package/source/components/SearchWidget/InteriorWidget/InteriorWidget.tsx +42 -42
  318. package/source/components/SearchWidget/OfferDetalisWidget/OfferDetailsWidgetMobile.tsx +59 -59
  319. package/source/components/SearchWidget/SearchWidget.story.js +191 -191
  320. package/source/components/SearchWidget/SearchWidget.story.styl +5 -5
  321. package/source/components/SearchWidget/SearchWidget.styl +196 -196
  322. package/source/components/SearchWidget/SearchWidget.tsx +208 -208
  323. package/source/components/SearchWidget/StateWidget/StateWidget.styl +57 -57
  324. package/source/components/SearchWidget/StateWidget/StateWidget.tsx +107 -107
  325. package/source/components/SearchWidget/SuperAdminWidget/SuperAdminWidget.styl +10 -10
  326. package/source/components/SearchWidget/SuperAdminWidget/SuperAdminWidget.tsx +64 -64
  327. package/source/components/SearchWidget/partials/BuyCar/BuyCar.styl +19 -19
  328. package/source/components/SearchWidget/partials/BuyCar/BuyCar.tsx +162 -162
  329. package/source/components/SearchWidget/partials/DropDown/DropDown.styl +70 -70
  330. package/source/components/SearchWidget/partials/DropDown/DropDown.tsx +36 -36
  331. package/source/components/SearchWidget/partials/DropDown/MultiDropDown.tsx +76 -76
  332. package/source/components/SearchWidget/partials/DropDown/index.ts +7 -7
  333. package/source/components/SearchWidget/partials/DropDownGroup/DropDownGroup.styl +48 -48
  334. package/source/components/SearchWidget/partials/DropDownGroup/DropDownGroup.tsx +101 -101
  335. package/source/components/SearchWidget/partials/FastSearch/FastSearch.tsx +55 -55
  336. package/source/components/SearchWidget/partials/MakerFilter/MakerFilter.styl +8 -8
  337. package/source/components/SearchWidget/partials/MakerFilter/MakerFilter.tsx +69 -69
  338. package/source/components/SearchWidget/partials/PanelFilter/Item.tsx +43 -43
  339. package/source/components/SearchWidget/partials/PanelFilter/PanelFilter.styl +32 -32
  340. package/source/components/SearchWidget/partials/PanelFilter/PanelFilter.tsx +53 -53
  341. package/source/components/SearchWidget/partials/TabPanel/TabPanel.tsx +29 -29
  342. package/source/components/SearchWidget/partials/Tabs/Tab.tsx +20 -20
  343. package/source/components/SearchWidget/partials/Tabs/Tabs.styl +27 -27
  344. package/source/components/SearchWidget/partials/Tabs/Tabs.tsx +69 -69
  345. package/source/components/SearchWidget/partials/Tabs/index.ts +7 -7
  346. package/source/components/SearchWidgetsMobile/BasicDataWidgetMobile/BasicDataWidgetMobile.styl +91 -91
  347. package/source/components/SearchWidgetsMobile/BasicDataWidgetMobile/BasicDataWidgetMobile.tsx +219 -219
  348. package/source/components/SearchWidgetsMobile/EngineTransDriveWidget/EngineTransDriveWidget.styl +47 -47
  349. package/source/components/SearchWidgetsMobile/EngineTransDriveWidget/EngineTransDriveWidget.tsx +126 -126
  350. package/source/components/SearchWidgetsMobile/EquipmentsWidget/EquipmentsWidget.styl +62 -62
  351. package/source/components/SearchWidgetsMobile/EquipmentsWidget/EquipmentsWidget.styled.tsx +38 -38
  352. package/source/components/SearchWidgetsMobile/EquipmentsWidget/EquipmentsWidget.tsx +294 -294
  353. package/source/components/SearchWidgetsMobile/EquipmentsWidget/EquipmentsWidgetCategory.tsx +50 -50
  354. package/source/components/SearchWidgetsMobile/HighlightsWidgetMobile/HighlightsWidgetMobile.styl +50 -50
  355. package/source/components/SearchWidgetsMobile/HighlightsWidgetMobile/HighlightsWidgetMobile.tsx +96 -96
  356. package/source/components/SearchWidgetsMobile/InteriorWidget/InteriorWidget.styl +30 -30
  357. package/source/components/SearchWidgetsMobile/InteriorWidget/InteriorWidget.tsx +33 -33
  358. package/source/components/SearchWidgetsMobile/InteriorWidget/InteriorWidgetMobile.tsx +44 -44
  359. package/source/components/SearchWidgetsMobile/SafetyWidget/SafetyWidget.styl +45 -45
  360. package/source/components/SearchWidgetsMobile/SafetyWidget/SafetyWidget.tsx +149 -149
  361. package/source/components/SearchWidgetsMobile/StateWidget/StateWidget.styl +59 -59
  362. package/source/components/SearchWidgetsMobile/StateWidget/StateWidget.tsx +172 -172
  363. package/source/components/SearchWidgetsMobile/index.ts +18 -18
  364. package/source/components/Stepper/Step/Step.styl +46 -46
  365. package/source/components/Stepper/Step/Step.tsx +44 -44
  366. package/source/components/Stepper/Stepper.story.js +119 -119
  367. package/source/components/Stepper/Stepper.story.styl +41 -41
  368. package/source/components/Stepper/Stepper.styl +10 -10
  369. package/source/components/Stepper/Stepper.tsx +67 -67
  370. package/source/components/Stepper/StepsDivider/StepsDivider.styl +15 -15
  371. package/source/components/Stepper/StepsDivider/StepsDivider.tsx +23 -23
  372. package/source/components/Theme.story.js +36 -36
  373. package/source/components/Theme.story.styl +85 -85
  374. package/source/components/TickerText/TickerText.story.js +17 -17
  375. package/source/components/TickerText/TickerText.styl +43 -43
  376. package/source/components/TickerText/TickerText.tsx +24 -24
  377. package/source/components/UserDashboardPage/sections/OrderStatusSection/AdditionalOrderInfo.styl +90 -90
  378. package/source/components/UserDashboardPage/sections/OrderStatusSection/AdditionalOrderInfo.tsx +90 -90
  379. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusCar.tsx +130 -130
  380. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusCard.styl +53 -53
  381. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusCard.tsx +41 -41
  382. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.story.js +95 -95
  383. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.styl +166 -166
  384. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.tsx +181 -181
  385. package/source/components/UserDashboardPage/sections/RequestedCarsSection/RequestedCarsSection.story.js +97 -97
  386. package/source/components/UserDashboardPage/sections/RequestedCarsSection/RequestedCarsSection.styl +144 -144
  387. package/source/components/UserDashboardPage/sections/RequestedCarsSection/RequestedCarsSection.tsx +126 -126
  388. package/source/components/UserDashboardPage/sections/RequestedCarsSection/SupportSection.styl +46 -46
  389. package/source/components/UserDashboardPage/sections/RequestedCarsSection/SupportSection.tsx +32 -32
  390. package/source/components/Vehicle/VehicleConsumption/VehicleConsumption.styl +10 -10
  391. package/source/components/Vehicle/VehicleConsumption/VehicleConsumption.tsx +44 -44
  392. package/source/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.story.js +247 -247
  393. package/source/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.styl +148 -148
  394. package/source/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.tsx +137 -137
  395. package/source/components/VehicleCompared/CompareGeneral/CompareGeneral.story.js +30 -30
  396. package/source/components/VehicleCompared/CompareGeneral/CompareGeneral.styl +49 -49
  397. package/source/components/VehicleCompared/CompareGeneral/CompareGeneral.tsx +55 -55
  398. package/source/components/VehicleCompared/ComparePrice/ComparePrice.story.js +18 -18
  399. package/source/components/VehicleCompared/ComparePrice/ComparePrice.styl +17 -17
  400. package/source/components/VehicleCompared/ComparePrice/ComparePrice.tsx +33 -33
  401. package/source/components/VehicleCompared/CompareTitle/CompareTitle.story.js +19 -19
  402. package/source/components/VehicleCompared/CompareTitle/CompareTitle.styl +38 -38
  403. package/source/components/VehicleCompared/CompareTitle/CompareTitle.tsx +32 -32
  404. package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.story.js +44 -44
  405. package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.styl +28 -28
  406. package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.tsx +168 -168
  407. package/source/components/VehicleDetailedSidebar/partials/Price.styl +22 -22
  408. package/source/components/VehicleDetailedSidebar/partials/Price.tsx +40 -40
  409. package/source/components/VehicleDetailedSidebar/partials/PriceContent.styl +113 -113
  410. package/source/components/VehicleDetailedSidebar/partials/PriceContent.tsx +123 -123
  411. package/source/components/VehicleDetailedSidebar/partials/Properties.styl +53 -53
  412. package/source/components/VehicleDetailedSidebar/partials/Properties.tsx +117 -117
  413. package/source/components/VehicleDetailedSidebar/partials/Title.styl +35 -35
  414. package/source/components/VehicleDetailedSidebar/partials/Title.tsx +33 -33
  415. package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.story.js +120 -120
  416. package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.styl +102 -102
  417. package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.tsx +296 -296
  418. package/source/components/VehicleDetailedSlider/partials/MobileStast.tsx +61 -61
  419. package/source/components/VehicleDetailedSlider/partials/MobileStats.styl +71 -71
  420. package/source/components/VehicleDetailedSlider/partials/PriceData.styl +48 -48
  421. package/source/components/VehicleDetailedSlider/partials/PriceData.tsx +37 -37
  422. package/source/components/VehicleDetailedSlider/partials/Stats.styl +80 -80
  423. package/source/components/VehicleDetailedSlider/partials/Stats.tsx +62 -62
  424. package/source/components/VehicleDetailedSlider/partials/Title.styl +44 -44
  425. package/source/components/VehicleDetailedSlider/partials/Title.tsx +36 -36
  426. package/source/components/VehiclePromoSlider/VehiclePromoInfo/VehiclePromoInfo.story.js +42 -42
  427. package/source/components/VehiclePromoSlider/VehiclePromoInfo/VehiclePromoInfo.styl +298 -298
  428. package/source/components/VehiclePromoSlider/VehiclePromoInfo/VehiclePromoInfo.tsx +201 -201
  429. package/source/components/VehiclePromoSlider/VehiclePromoSlide/VehiclePromoSlide.story.js +62 -62
  430. package/source/components/VehiclePromoSlider/VehiclePromoSlide/VehiclePromoSlide.styl +263 -263
  431. package/source/components/VehiclePromoSlider/VehiclePromoSlide/VehiclePromoSlide.tsx +141 -141
  432. package/source/components/VehiclePromoSlider/VehiclePromoSlider.story.js +42 -42
  433. package/source/components/VehiclePromoSlider/VehiclePromoSlider.styl +122 -122
  434. package/source/components/VehiclePromoSlider/VehiclePromoSlider.tsx +111 -111
  435. package/source/components/VehiclePromoSlider/cars.js +220 -220
  436. package/source/components/VehicleSmallCard/SeoText/SeoText.styl +8 -8
  437. package/source/components/VehicleSmallCard/SeoText/SeoText.tsx +16 -16
  438. package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.styl +162 -162
  439. package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx +188 -188
  440. package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.styl +218 -218
  441. package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.tsx +153 -153
  442. package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.styl +129 -129
  443. package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.tsx +282 -282
  444. package/source/components/VehicleSmallCard/VehicleData/VehicleProperty/VehicleProperty.styl +21 -21
  445. package/source/components/VehicleSmallCard/VehicleData/VehicleProperty/VehicleProperty.tsx +32 -32
  446. package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.styl +126 -126
  447. package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.tsx +90 -90
  448. package/source/components/VehicleSmallCard/VehicleSmallCard.story.js +412 -412
  449. package/source/components/VehicleSmallCard/VehicleSmallCard.story.styl +55 -55
  450. package/source/components/VehicleSmallCard/VehicleSmallCard.styl +242 -242
  451. package/source/components/VehicleSmallCard/VehicleSmallCard.tsx +408 -408
  452. package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.story.js +199 -199
  453. package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.story.styl +40 -40
  454. package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.styl +150 -150
  455. package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.tsx +185 -185
  456. package/source/components/_common/Accordion/Accordion.story.js +36 -36
  457. package/source/components/_common/Accordion/Accordion.styl +2 -2
  458. package/source/components/_common/Accordion/Accordion.tsx +132 -132
  459. package/source/components/_common/Accordion/AccordionTitle/AccordionTitle.styl +49 -49
  460. package/source/components/_common/Accordion/AccordionTitle/AccordionTitle.tsx +33 -33
  461. package/source/components/_common/AccordionWrapper/AccordionItem/AccordionItem.styl +34 -34
  462. package/source/components/_common/AccordionWrapper/AccordionItem/AccordionItem.tsx +64 -64
  463. package/source/components/_common/AccordionWrapper/AccordionWrapper.tsx +34 -34
  464. package/source/components/_common/Badge/Badge.story.js +27 -27
  465. package/source/components/_common/Badge/Badge.story.styl +5 -5
  466. package/source/components/_common/Badge/Badge.styl +41 -41
  467. package/source/components/_common/Badge/Badge.tsx +25 -25
  468. package/source/components/_common/BodyTypeIcons/Audi.tsx +9 -9
  469. package/source/components/_common/BodyTypeIcons/Bmw.tsx +860 -860
  470. package/source/components/_common/BodyTypeIcons/Ford.tsx +31 -31
  471. package/source/components/_common/BodyTypeIcons/IconsConfig.tsx +44 -44
  472. package/source/components/_common/BodyTypeIcons/IconsConfigCompact.tsx +30 -30
  473. package/source/components/_common/BodyTypeIcons/Mazda.tsx +44 -44
  474. package/source/components/_common/BodyTypeIcons/MercedesBenz.tsx +38 -38
  475. package/source/components/_common/BodyTypeIcons/Opel.tsx +19 -19
  476. package/source/components/_common/BodyTypeIcons/Search.tsx +19 -19
  477. package/source/components/_common/BodyTypeIcons/SelectorCategoryCombi.tsx +68 -68
  478. package/source/components/_common/BodyTypeIcons/SelectorCategoryCompact.tsx +20 -20
  479. package/source/components/_common/BodyTypeIcons/SelectorCategoryConvertible.tsx +68 -68
  480. package/source/components/_common/BodyTypeIcons/SelectorCategoryCoupe.tsx +60 -60
  481. package/source/components/_common/BodyTypeIcons/SelectorCategoryMinibus.tsx +64 -64
  482. package/source/components/_common/BodyTypeIcons/SelectorCategorySedan.tsx +69 -69
  483. package/source/components/_common/BodyTypeIcons/SelectorCategorySuv.tsx +77 -77
  484. package/source/components/_common/BodyTypeIcons/SelectorCategoryTransporter.tsx +68 -68
  485. package/source/components/_common/BodyTypeIcons/SelectorCategoryVan.tsx +72 -72
  486. package/source/components/_common/BodyTypeIcons/Volkswagen.tsx +330 -330
  487. package/source/components/_common/BodyTypeIcons/index.ts +17 -17
  488. package/source/components/_common/Bubble/Bubble.story.js +52 -52
  489. package/source/components/_common/Bubble/Bubble.styl +53 -53
  490. package/source/components/_common/Bubble/Bubble.tsx +37 -37
  491. package/source/components/_common/Button/Button.story.js +52 -52
  492. package/source/components/_common/Button/Button.story.styl +5 -5
  493. package/source/components/_common/Button/Button.styl +12 -12
  494. package/source/components/_common/Button/Button.styled.tsx +51 -51
  495. package/source/components/_common/Button/Button.tsx +78 -78
  496. package/source/components/_common/ButtonOld/Button.story.js +54 -54
  497. package/source/components/_common/ButtonOld/Button.story.styl +5 -5
  498. package/source/components/_common/ButtonOld/Button.styl +65 -65
  499. package/source/components/_common/ButtonOld/Button.tsx +84 -84
  500. package/source/components/_common/Checkbox/Checkbox.story.js +85 -85
  501. package/source/components/_common/Checkbox/Checkbox.story.styl +14 -14
  502. package/source/components/_common/Checkbox/Checkbox.styl +119 -119
  503. package/source/components/_common/Checkbox/Checkbox.tsx +151 -151
  504. package/source/components/_common/Checkbox/FormCheckbox.styl +22 -22
  505. package/source/components/_common/Checkbox/FormCheckbox.tsx +86 -54
  506. package/source/components/_common/Checkbox/index.js +4 -4
  507. package/source/components/_common/CheckboxMaterial/CheckboxMaterial.story.js +126 -136
  508. package/source/components/_common/CheckboxMaterial/CheckboxMaterial.story.styl +14 -14
  509. package/source/components/_common/CheckboxMaterial/CheckboxMaterial.styl +155 -155
  510. package/source/components/_common/CheckboxMaterial/CheckboxMaterial.tsx +210 -210
  511. package/source/components/_common/Chip/Chip.story.js +43 -43
  512. package/source/components/_common/Chip/Chip.styl +69 -69
  513. package/source/components/_common/Chip/Chip.tsx +40 -40
  514. package/source/components/_common/ChipList/ChipList.story.js +36 -36
  515. package/source/components/_common/ChipList/ChipList.styl +80 -80
  516. package/source/components/_common/ChipList/ChipList.tsx +58 -58
  517. package/source/components/_common/Co2Widget/CO2Efficiency.styl +114 -114
  518. package/source/components/_common/Co2Widget/CO2Efficiency.tsx +49 -49
  519. package/source/components/_common/Divider/Divider.styl +8 -8
  520. package/source/components/_common/Divider/Divider.tsx +16 -16
  521. package/source/components/_common/DoorSelector/DoorSelector.styl +35 -35
  522. package/source/components/_common/DoorSelector/DoorSelector.tsx +39 -39
  523. package/source/components/_common/DropDown/DropDown.story.js +35 -35
  524. package/source/components/_common/DropDown/DropDown.styl +129 -129
  525. package/source/components/_common/DropDown/DropDown.tsx +111 -111
  526. package/source/components/_common/DropDown/DropDownComponents.tsx +53 -53
  527. package/source/components/_common/DropDown/DropDownGroup.styl +20 -20
  528. package/source/components/_common/DropDown/DropDownGroup.tsx +136 -136
  529. package/source/components/_common/DropDown/FormDropDown.styl +35 -35
  530. package/source/components/_common/DropDown/FormDropDown.tsx +53 -52
  531. package/source/components/_common/DropDown/MultiDropDown.tsx +84 -84
  532. package/source/components/_common/DropDown/index.ts +7 -7
  533. package/source/components/_common/ExpandablePanel/ExpandablePanel.story.js +41 -41
  534. package/source/components/_common/ExpandablePanel/ExpandablePanel.styl +19 -19
  535. package/source/components/_common/ExpandablePanel/ExpandablePanel.tsx +88 -88
  536. package/source/components/_common/ExpansionPanel/ExpansionPanel.styl +36 -36
  537. package/source/components/_common/ExpansionPanel/ExpansionPanel.styled.tsx +28 -28
  538. package/source/components/_common/ExpansionPanel/ExpansionPanel.tsx +99 -99
  539. package/source/components/_common/FilterLabel/FilterLabel.styl +25 -25
  540. package/source/components/_common/FilterLabel/FilterLabel.tsx +27 -27
  541. package/source/components/_common/Histogram/Histogram.story.js +51 -51
  542. package/source/components/_common/IconContainer/IconContainer.styl +23 -23
  543. package/source/components/_common/IconContainer/IconContainer.tsx +34 -34
  544. package/source/components/_common/IconSVG/IconSVG.story.js +21 -21
  545. package/source/components/_common/IconSVG/IconSVG.story.styl +25 -25
  546. package/source/components/_common/IconSVG/IconSVG.tsx +30 -30
  547. package/source/components/_common/IconSVG/IconSVGConfig.tsx +766 -766
  548. package/source/components/_common/IconSVG/SVG/AboPartner.tsx +16 -16
  549. package/source/components/_common/IconSVG/SVG/ArrowQuotes.tsx +22 -22
  550. package/source/components/_common/IconSVG/SVG/CloseIcon.tsx +17 -17
  551. package/source/components/_common/IconSVG/SVG/CloseIconSelect.tsx +18 -18
  552. package/source/components/_common/IconSVG/SVG/ClosedLockIcon.tsx +18 -18
  553. package/source/components/_common/IconSVG/SVG/DealerCheckIcon.tsx +18 -18
  554. package/source/components/_common/IconSVG/SVG/DealerPopoverMail.tsx +21 -21
  555. package/source/components/_common/IconSVG/SVG/DealerPopoverPhone.tsx +21 -21
  556. package/source/components/_common/IconSVG/SVG/GrayPhoneIcon.tsx +22 -22
  557. package/source/components/_common/IconSVG/SVG/InternetIcon.tsx +18 -18
  558. package/source/components/_common/IconSVG/SVG/WhiteEnvelopeIcon.tsx +21 -21
  559. package/source/components/_common/IconSVG/SVG/bodyType/Cabrio.tsx +23 -23
  560. package/source/components/_common/IconSVG/SVG/bodyType/Coupe.tsx +22 -22
  561. package/source/components/_common/IconSVG/SVG/bodyType/Minibus.tsx +22 -22
  562. package/source/components/_common/IconSVG/SVG/bodyType/Other.tsx +25 -25
  563. package/source/components/_common/IconSVG/SVG/bodyType/Sedan.tsx +22 -22
  564. package/source/components/_common/IconSVG/SVG/bodyType/SelectorCategoryCombi.tsx +68 -68
  565. package/source/components/_common/IconSVG/SVG/bodyType/SelectorCategoryCompact.tsx +20 -20
  566. package/source/components/_common/IconSVG/SVG/bodyType/SelectorCategoryConvertible.tsx +68 -68
  567. package/source/components/_common/IconSVG/SVG/bodyType/SelectorCategoryCoupe.tsx +60 -60
  568. package/source/components/_common/IconSVG/SVG/bodyType/SelectorCategoryMinibus.tsx +64 -64
  569. package/source/components/_common/IconSVG/SVG/bodyType/SelectorCategoryOther.tsx +60 -60
  570. package/source/components/_common/IconSVG/SVG/bodyType/SelectorCategorySedan.tsx +69 -69
  571. package/source/components/_common/IconSVG/SVG/bodyType/SelectorCategorySuv.tsx +77 -77
  572. package/source/components/_common/IconSVG/SVG/bodyType/SelectorCategoryTransporter.tsx +68 -68
  573. package/source/components/_common/IconSVG/SVG/bodyType/SelectorCategoryVan.tsx +72 -72
  574. package/source/components/_common/IconSVG/SVG/bodyType/Small.tsx +23 -23
  575. package/source/components/_common/IconSVG/SVG/bodyType/Suv.tsx +23 -23
  576. package/source/components/_common/IconSVG/SVG/bodyType/Van.tsx +23 -23
  577. package/source/components/_common/IconSVG/SVG/bodyType/Wagon.tsx +23 -23
  578. package/source/components/_common/IconSVG/SVG/common/AddIcon.tsx +16 -16
  579. package/source/components/_common/IconSVG/SVG/common/AddPlus.tsx +16 -16
  580. package/source/components/_common/IconSVG/SVG/common/AddressDashboard.tsx +29 -29
  581. package/source/components/_common/IconSVG/SVG/common/AddressIcon.tsx +20 -20
  582. package/source/components/_common/IconSVG/SVG/common/ArrowDetailedAccordionBlue.tsx +26 -26
  583. package/source/components/_common/IconSVG/SVG/common/ArrowDownBlue.tsx +21 -21
  584. package/source/components/_common/IconSVG/SVG/common/ArrowSelect.tsx +23 -23
  585. package/source/components/_common/IconSVG/SVG/common/ArrowStepDown.tsx +18 -18
  586. package/source/components/_common/IconSVG/SVG/common/Autocheck.tsx +19 -19
  587. package/source/components/_common/IconSVG/SVG/common/AutodeLogo.tsx +36 -36
  588. package/source/components/_common/IconSVG/SVG/common/Avatar.tsx +17 -17
  589. package/source/components/_common/IconSVG/SVG/common/BellGray.tsx +19 -19
  590. package/source/components/_common/IconSVG/SVG/common/BigInfoTransparent.tsx +13 -13
  591. package/source/components/_common/IconSVG/SVG/common/Browse.tsx +20 -20
  592. package/source/components/_common/IconSVG/SVG/common/Calendar.tsx +24 -24
  593. package/source/components/_common/IconSVG/SVG/common/CallbackDashboard.tsx +30 -30
  594. package/source/components/_common/IconSVG/SVG/common/Camera.tsx +17 -17
  595. package/source/components/_common/IconSVG/SVG/common/Car.tsx +16 -16
  596. package/source/components/_common/IconSVG/SVG/common/CarBody.tsx +19 -19
  597. package/source/components/_common/IconSVG/SVG/common/CarFront.tsx +43 -43
  598. package/source/components/_common/IconSVG/SVG/common/CarInspectionCheck.tsx +21 -21
  599. package/source/components/_common/IconSVG/SVG/common/CarInspectionScheme0.tsx +32 -32
  600. package/source/components/_common/IconSVG/SVG/common/CarInspectionScheme1.tsx +53 -53
  601. package/source/components/_common/IconSVG/SVG/common/CarInspectionScheme2.tsx +52 -52
  602. package/source/components/_common/IconSVG/SVG/common/CarInspectionScheme3.tsx +32 -32
  603. package/source/components/_common/IconSVG/SVG/common/CarInspectionScheme4.tsx +32 -32
  604. package/source/components/_common/IconSVG/SVG/common/CarInspectionScheme5.tsx +32 -32
  605. package/source/components/_common/IconSVG/SVG/common/CarInspectionScheme6.tsx +32 -32
  606. package/source/components/_common/IconSVG/SVG/common/CarInspectionSchemeGeneral copy.tsx +24 -24
  607. package/source/components/_common/IconSVG/SVG/common/CarInspectionSchemeGeneral.tsx +24 -24
  608. package/source/components/_common/IconSVG/SVG/common/CheckBlue.tsx +18 -18
  609. package/source/components/_common/IconSVG/SVG/common/CheckGreen.tsx +22 -22
  610. package/source/components/_common/IconSVG/SVG/common/CheckMark.tsx +16 -16
  611. package/source/components/_common/IconSVG/SVG/common/CheckWhite.tsx +19 -19
  612. package/source/components/_common/IconSVG/SVG/common/Chevron.tsx +17 -17
  613. package/source/components/_common/IconSVG/SVG/common/CircledCheckmark.tsx +25 -25
  614. package/source/components/_common/IconSVG/SVG/common/Clock.tsx +18 -18
  615. package/source/components/_common/IconSVG/SVG/common/Close.tsx +19 -19
  616. package/source/components/_common/IconSVG/SVG/common/CloseGrey.tsx +22 -22
  617. package/source/components/_common/IconSVG/SVG/common/ContactEmail.tsx +21 -21
  618. package/source/components/_common/IconSVG/SVG/common/ContactPhone.tsx +28 -28
  619. package/source/components/_common/IconSVG/SVG/common/CopyIcon copy.tsx +22 -22
  620. package/source/components/_common/IconSVG/SVG/common/CopyIcon.tsx +22 -22
  621. package/source/components/_common/IconSVG/SVG/common/CopyIconForDealer.tsx +21 -21
  622. package/source/components/_common/IconSVG/SVG/common/DashboardIcon.tsx +20 -20
  623. package/source/components/_common/IconSVG/SVG/common/DashboardQuestionMark.tsx +20 -20
  624. package/source/components/_common/IconSVG/SVG/common/DealersIcon.tsx +20 -20
  625. package/source/components/_common/IconSVG/SVG/common/DeleteCircle.tsx +31 -31
  626. package/source/components/_common/IconSVG/SVG/common/DeleteV1Icon.tsx +18 -18
  627. package/source/components/_common/IconSVG/SVG/common/DeliveryDashboard.tsx +25 -25
  628. package/source/components/_common/IconSVG/SVG/common/DeliveryMail.tsx +24 -24
  629. package/source/components/_common/IconSVG/SVG/common/Discount100De.tsx +18 -18
  630. package/source/components/_common/IconSVG/SVG/common/Discount100En.tsx +19 -19
  631. package/source/components/_common/IconSVG/SVG/common/Discount66De.tsx +28 -28
  632. package/source/components/_common/IconSVG/SVG/common/Discount66En.tsx +20 -20
  633. package/source/components/_common/IconSVG/SVG/common/DoneIcon.tsx +18 -18
  634. package/source/components/_common/IconSVG/SVG/common/EditCircle.tsx +32 -32
  635. package/source/components/_common/IconSVG/SVG/common/EditPriceIcon.tsx +20 -20
  636. package/source/components/_common/IconSVG/SVG/common/EuroCurrency.tsx +18 -18
  637. package/source/components/_common/IconSVG/SVG/common/Export.tsx +20 -20
  638. package/source/components/_common/IconSVG/SVG/common/Eye.tsx +17 -17
  639. package/source/components/_common/IconSVG/SVG/common/EyeCatch.tsx +19 -19
  640. package/source/components/_common/IconSVG/SVG/common/FavoritesIcon.tsx +20 -20
  641. package/source/components/_common/IconSVG/SVG/common/FilterRange.tsx +16 -16
  642. package/source/components/_common/IconSVG/SVG/common/FilterToolBlack.tsx +23 -23
  643. package/source/components/_common/IconSVG/SVG/common/FlagDe.tsx +21 -21
  644. package/source/components/_common/IconSVG/SVG/common/FlagEn.tsx +43 -43
  645. package/source/components/_common/IconSVG/SVG/common/GrayEnvelopeIcon.tsx +19 -19
  646. package/source/components/_common/IconSVG/SVG/common/HamburgerMenuIcon.tsx +18 -18
  647. package/source/components/_common/IconSVG/SVG/common/HandingOverDashboard.tsx +32 -32
  648. package/source/components/_common/IconSVG/SVG/common/ImageSettingsIcon.tsx +20 -20
  649. package/source/components/_common/IconSVG/SVG/common/Info.tsx +16 -16
  650. package/source/components/_common/IconSVG/SVG/common/InfoIcon.tsx +17 -17
  651. package/source/components/_common/IconSVG/SVG/common/InfoTransparent.tsx +18 -18
  652. package/source/components/_common/IconSVG/SVG/common/LogoutIcon.tsx +20 -20
  653. package/source/components/_common/IconSVG/SVG/common/MagnifyingGlass.tsx +31 -31
  654. package/source/components/_common/IconSVG/SVG/common/MenuArrow.tsx +16 -16
  655. package/source/components/_common/IconSVG/SVG/common/MenuGrey.tsx +22 -22
  656. package/source/components/_common/IconSVG/SVG/common/MobileDeLogo.tsx +108 -108
  657. package/source/components/_common/IconSVG/SVG/common/MyOrderIcon.tsx +20 -20
  658. package/source/components/_common/IconSVG/SVG/common/MyVehiclesIcon.tsx +20 -20
  659. package/source/components/_common/IconSVG/SVG/common/NewFlagDe.tsx +25 -25
  660. package/source/components/_common/IconSVG/SVG/common/NewFlagEn.tsx +34 -34
  661. package/source/components/_common/IconSVG/SVG/common/OrderReceivedDashboard.tsx +27 -27
  662. package/source/components/_common/IconSVG/SVG/common/Package.tsx +30 -30
  663. package/source/components/_common/IconSVG/SVG/common/Phone.tsx +18 -18
  664. package/source/components/_common/IconSVG/SVG/common/PhoneGrey.tsx +22 -22
  665. package/source/components/_common/IconSVG/SVG/common/PickupDashboard.tsx +30 -30
  666. package/source/components/_common/IconSVG/SVG/common/Picture.tsx +24 -24
  667. package/source/components/_common/IconSVG/SVG/common/Pictures.tsx +32 -32
  668. package/source/components/_common/IconSVG/SVG/common/Plus.tsx +16 -16
  669. package/source/components/_common/IconSVG/SVG/common/PlusNew.tsx +16 -16
  670. package/source/components/_common/IconSVG/SVG/common/PreparationDashboard.tsx +29 -29
  671. package/source/components/_common/IconSVG/SVG/common/ProfileDashboard.tsx +24 -24
  672. package/source/components/_common/IconSVG/SVG/common/ProfileIcon.tsx +17 -17
  673. package/source/components/_common/IconSVG/SVG/common/Question.tsx +19 -19
  674. package/source/components/_common/IconSVG/SVG/common/QuestionBold.tsx +25 -25
  675. package/source/components/_common/IconSVG/SVG/common/RegistrationDashboard.tsx +31 -31
  676. package/source/components/_common/IconSVG/SVG/common/SavedSearchsIcon.tsx +20 -20
  677. package/source/components/_common/IconSVG/SVG/common/Search.tsx +19 -19
  678. package/source/components/_common/IconSVG/SVG/common/SearchGrey.tsx +22 -22
  679. package/source/components/_common/IconSVG/SVG/common/SettingPenIcon.tsx +20 -20
  680. package/source/components/_common/IconSVG/SVG/common/Share.tsx +16 -16
  681. package/source/components/_common/IconSVG/SVG/common/ShoppingCart.tsx +18 -18
  682. package/source/components/_common/IconSVG/SVG/common/SliderArrow.tsx +21 -21
  683. package/source/components/_common/IconSVG/SVG/common/SliderEye.tsx +17 -17
  684. package/source/components/_common/IconSVG/SVG/common/SortUpDownArrows.tsx +18 -18
  685. package/source/components/_common/IconSVG/SVG/common/Speedometer.tsx +23 -23
  686. package/source/components/_common/IconSVG/SVG/common/Star.tsx +20 -20
  687. package/source/components/_common/IconSVG/SVG/common/StarNew.tsx +16 -16
  688. package/source/components/_common/IconSVG/SVG/common/StarOutline.tsx +20 -20
  689. package/source/components/_common/IconSVG/SVG/common/StarRoundedCorners.tsx +18 -18
  690. package/source/components/_common/IconSVG/SVG/common/Stats.tsx +17 -17
  691. package/source/components/_common/IconSVG/SVG/common/Step1.tsx +21 -21
  692. package/source/components/_common/IconSVG/SVG/common/Step2.tsx +20 -20
  693. package/source/components/_common/IconSVG/SVG/common/Step3.tsx +21 -21
  694. package/source/components/_common/IconSVG/SVG/common/SupportCallbackIcon.tsx +20 -20
  695. package/source/components/_common/IconSVG/SVG/common/Telephone.tsx +22 -22
  696. package/source/components/_common/IconSVG/SVG/common/Time.tsx +17 -17
  697. package/source/components/_common/IconSVG/SVG/common/Timetable.tsx +18 -18
  698. package/source/components/_common/IconSVG/SVG/common/Trash.tsx +22 -22
  699. package/source/components/_common/IconSVG/SVG/common/TrashRed.tsx +23 -23
  700. package/source/components/_common/IconSVG/SVG/common/Upload.tsx +17 -17
  701. package/source/components/_common/IconSVG/SVG/common/UserGrey.tsx +22 -22
  702. package/source/components/_common/IconSVG/SVG/common/UserProfileIcon.tsx +20 -20
  703. package/source/components/_common/IconSVG/SVG/common/ValidateFailure.tsx +21 -21
  704. package/source/components/_common/IconSVG/SVG/common/ValidateSuccess.tsx +21 -21
  705. package/source/components/_common/IconSVG/SVG/common/WarningTriangle.tsx +20 -20
  706. package/source/components/_common/IconSVG/SVG/common/WhiteArrowUp.tsx +21 -21
  707. package/source/components/_common/IconSVG/SVG/common/WhiteKey.tsx +21 -21
  708. package/source/components/_common/IconSVG/SVG/common/WhitePeople.tsx +23 -23
  709. package/source/components/_common/IconSVG/SVG/common/WhiteTick.tsx +19 -19
  710. package/source/components/_common/IconSVG/SVG/flags/AT.tsx +19 -19
  711. package/source/components/_common/IconSVG/SVG/flags/BE.tsx +20 -20
  712. package/source/components/_common/IconSVG/SVG/flags/BG.tsx +20 -20
  713. package/source/components/_common/IconSVG/SVG/flags/CH.tsx +22 -22
  714. package/source/components/_common/IconSVG/SVG/flags/CZ.tsx +18 -18
  715. package/source/components/_common/IconSVG/SVG/flags/DE.tsx +18 -18
  716. package/source/components/_common/IconSVG/SVG/flags/DK.tsx +18 -18
  717. package/source/components/_common/IconSVG/SVG/flags/ES.tsx +2585 -2585
  718. package/source/components/_common/IconSVG/SVG/flags/FI.tsx +18 -18
  719. package/source/components/_common/IconSVG/SVG/flags/FR.tsx +20 -20
  720. package/source/components/_common/IconSVG/SVG/flags/GB.tsx +26 -26
  721. package/source/components/_common/IconSVG/SVG/flags/HR.tsx +135 -135
  722. package/source/components/_common/IconSVG/SVG/flags/HU.tsx +20 -20
  723. package/source/components/_common/IconSVG/SVG/flags/IT.tsx +20 -20
  724. package/source/components/_common/IconSVG/SVG/flags/LI.tsx +106 -106
  725. package/source/components/_common/IconSVG/SVG/flags/LU.tsx +18 -18
  726. package/source/components/_common/IconSVG/SVG/flags/NL.tsx +18 -18
  727. package/source/components/_common/IconSVG/SVG/flags/NO.tsx +20 -20
  728. package/source/components/_common/IconSVG/SVG/flags/PL.tsx +19 -19
  729. package/source/components/_common/IconSVG/SVG/flags/RO.tsx +20 -20
  730. package/source/components/_common/IconSVG/SVG/flags/RU.tsx +20 -20
  731. package/source/components/_common/IconSVG/SVG/flags/SE.tsx +20 -20
  732. package/source/components/_common/IconSVG/SVG/flags/SI.tsx +54 -54
  733. package/source/components/_common/IconSVG/SVG/flags/SK.tsx +35 -35
  734. package/source/components/_common/IconSVG/SVG/flags/UA.tsx +19 -19
  735. package/source/components/_common/IconSVG/SVG/infoBlocks/14DaysReturnPolicy.tsx +18 -18
  736. package/source/components/_common/IconSVG/SVG/infoBlocks/AlertInfo.tsx +19 -19
  737. package/source/components/_common/IconSVG/SVG/infoBlocks/Autocheck.tsx +19 -19
  738. package/source/components/_common/IconSVG/SVG/infoBlocks/CheckTheStory.tsx +22 -22
  739. package/source/components/_common/IconSVG/SVG/infoBlocks/CustomerServiceWhite.tsx +16 -16
  740. package/source/components/_common/IconSVG/SVG/infoBlocks/Guarantee.tsx +16 -16
  741. package/source/components/_common/IconSVG/SVG/infoBlocks/OrderWhite.tsx +13 -13
  742. package/source/components/_common/IconSVG/SVG/infoBlocks/PriceGuarantee.tsx +19 -19
  743. package/source/components/_common/IconSVG/SVG/infoBlocks/PriceGuaranteeWhite.tsx +17 -17
  744. package/source/components/_common/IconSVG/SVG/infoBlocks/TransportAndDelivery.tsx +21 -21
  745. package/source/components/_common/IconSVG/SVG/infoBlocks/Warranty.tsx +23 -23
  746. package/source/components/_common/IconSVG/SVG/popower/Mail.tsx +18 -18
  747. package/source/components/_common/IconSVG/SVG/popower/Phone.tsx +19 -19
  748. package/source/components/_common/IconSVG/SVG/popower/Schedule.tsx +18 -18
  749. package/source/components/_common/IconSVG/SVG/searchWidgets/drive/AAllWheelDrive.tsx +26 -26
  750. package/source/components/_common/IconSVG/SVG/searchWidgets/drive/AllWheelDrive.tsx +26 -26
  751. package/source/components/_common/IconSVG/SVG/searchWidgets/drive/FrontWheelDrive.tsx +25 -25
  752. package/source/components/_common/IconSVG/SVG/searchWidgets/drive/OtherWheelDrive.tsx +26 -26
  753. package/source/components/_common/IconSVG/SVG/searchWidgets/drive/RearWheelDrive.tsx +25 -25
  754. package/source/components/_common/IconSVG/SVG/searchWidgets/fuel/FuelDiesel.tsx +18 -18
  755. package/source/components/_common/IconSVG/SVG/searchWidgets/fuel/FuelElectrical.tsx +19 -19
  756. package/source/components/_common/IconSVG/SVG/searchWidgets/fuel/FuelElectricalDiesel.tsx +34 -34
  757. package/source/components/_common/IconSVG/SVG/searchWidgets/fuel/FuelElectricalPetrol.tsx +20 -20
  758. package/source/components/_common/IconSVG/SVG/searchWidgets/fuel/FuelEthanol.tsx +53 -53
  759. package/source/components/_common/IconSVG/SVG/searchWidgets/fuel/FuelHydrogen.tsx +24 -24
  760. package/source/components/_common/IconSVG/SVG/searchWidgets/fuel/FuelLpg.tsx +24 -24
  761. package/source/components/_common/IconSVG/SVG/searchWidgets/fuel/FuelNaturalGas.tsx +23 -23
  762. package/source/components/_common/IconSVG/SVG/searchWidgets/fuel/FuelOther.tsx +28 -28
  763. package/source/components/_common/IconSVG/SVG/searchWidgets/fuel/FuelPetrol.tsx +18 -18
  764. package/source/components/_common/IconSVG/SVG/settings/Account.tsx +17 -17
  765. package/source/components/_common/IconSVG/SVG/settings/DataUsage.tsx +17 -17
  766. package/source/components/_common/IconSVG/SVG/settings/MarketResearch.tsx +17 -17
  767. package/source/components/_common/IconSVG/SVG/settings/Newsletter.tsx +17 -17
  768. package/source/components/_common/IconSVG/SVG/settings/RemoveEye.tsx +17 -17
  769. package/source/components/_common/IconSVG/SVG/settings/RemoveEyeOff.tsx +17 -17
  770. package/source/components/_common/IconSVG/SVG/settings/Security.tsx +17 -17
  771. package/source/components/_common/IconSVG/SVG/settings/Warning.tsx +17 -17
  772. package/source/components/_common/IconSVG/SVG/slider/360.tsx +23 -23
  773. package/source/components/_common/IconSVG/SVG/slider/360New.tsx +20 -20
  774. package/source/components/_common/IconSVG/SVG/slider/Checked.tsx +19 -19
  775. package/source/components/_common/IconSVG/SVG/slider/DiscountRibbon.tsx +51 -51
  776. package/source/components/_common/IconSVG/SVG/slider/DiscountRibbonMobile.tsx +47 -47
  777. package/source/components/_common/IconSVG/SVG/slider/DiscountRibbonNew.tsx +29 -29
  778. package/source/components/_common/IconSVG/SVG/slider/Easy.tsx +19 -19
  779. package/source/components/_common/IconSVG/SVG/slider/Fullscreen.tsx +16 -16
  780. package/source/components/_common/IconSVG/SVG/slider/FullscreenWindow.tsx +23 -23
  781. package/source/components/_common/IconSVG/SVG/slider/Safe.tsx +19 -19
  782. package/source/components/_common/IconSVG/SVG/slider/ToBuy.tsx +19 -19
  783. package/source/components/_common/IconSVG/SVG/slider/ZoomIn.tsx +21 -21
  784. package/source/components/_common/IconSVG/SVG/slider/ZoomOut.tsx +21 -21
  785. package/source/components/_common/IconSVG/SVG/social/AndroidLogo.tsx +18 -18
  786. package/source/components/_common/IconSVG/SVG/social/Apple.tsx +19 -19
  787. package/source/components/_common/IconSVG/SVG/social/FacebookF.tsx +19 -19
  788. package/source/components/_common/IconSVG/SVG/social/GooglePlusG.tsx +19 -19
  789. package/source/components/_common/IconSVG/SVG/social/Instagram.tsx +17 -17
  790. package/source/components/_common/IconSVG/SVG/social/Pinterest.tsx +19 -19
  791. package/source/components/_common/IconSVG/SVG/social/SharingInterface.tsx +21 -21
  792. package/source/components/_common/IconSVG/SVG/social/Twitter.tsx +19 -19
  793. package/source/components/_common/IconSVG/SVG/social/Youtube.tsx +19 -19
  794. package/source/components/_common/IconSVG/SVG/vehicle/AboIcon.tsx +11 -11
  795. package/source/components/_common/IconSVG/SVG/vehicle/Abs.tsx +24 -24
  796. package/source/components/_common/IconSVG/SVG/vehicle/AirCond.tsx +34 -34
  797. package/source/components/_common/IconSVG/SVG/vehicle/Airbag.tsx +21 -21
  798. package/source/components/_common/IconSVG/SVG/vehicle/AuxiliaryHeating.tsx +23 -23
  799. package/source/components/_common/IconSVG/SVG/vehicle/Bluetooth.tsx +22 -22
  800. package/source/components/_common/IconSVG/SVG/vehicle/BuyIcon.tsx +15 -15
  801. package/source/components/_common/IconSVG/SVG/vehicle/CarAvailability.tsx +22 -22
  802. package/source/components/_common/IconSVG/SVG/vehicle/CarInspectionCheck.tsx +21 -21
  803. package/source/components/_common/IconSVG/SVG/vehicle/CarInspectionCross.tsx +21 -21
  804. package/source/components/_common/IconSVG/SVG/vehicle/CheckoutChecked.tsx +15 -15
  805. package/source/components/_common/IconSVG/SVG/vehicle/Co2.tsx +24 -24
  806. package/source/components/_common/IconSVG/SVG/vehicle/CruiseControl.tsx +25 -25
  807. package/source/components/_common/IconSVG/SVG/vehicle/Date.tsx +21 -21
  808. package/source/components/_common/IconSVG/SVG/vehicle/Delivery.tsx +12 -12
  809. package/source/components/_common/IconSVG/SVG/vehicle/Diesel.tsx +28 -28
  810. package/source/components/_common/IconSVG/SVG/vehicle/Display.tsx +25 -25
  811. package/source/components/_common/IconSVG/SVG/vehicle/Done.tsx +11 -11
  812. package/source/components/_common/IconSVG/SVG/vehicle/Door.tsx +19 -19
  813. package/source/components/_common/IconSVG/SVG/vehicle/DoubleDone.tsx +18 -18
  814. package/source/components/_common/IconSVG/SVG/vehicle/EditIcon.tsx +11 -11
  815. package/source/components/_common/IconSVG/SVG/vehicle/EmergencyBrakeAssistant.tsx +27 -27
  816. package/source/components/_common/IconSVG/SVG/vehicle/Eps.tsx +24 -24
  817. package/source/components/_common/IconSVG/SVG/vehicle/Esp.tsx +24 -24
  818. package/source/components/_common/IconSVG/SVG/vehicle/FinancingIcon.tsx +20 -20
  819. package/source/components/_common/IconSVG/SVG/vehicle/FuelConsumption.tsx +20 -20
  820. package/source/components/_common/IconSVG/SVG/vehicle/Fueling.tsx +22 -22
  821. package/source/components/_common/IconSVG/SVG/vehicle/FullDrive.tsx +24 -24
  822. package/source/components/_common/IconSVG/SVG/vehicle/GasElectric.tsx +28 -28
  823. package/source/components/_common/IconSVG/SVG/vehicle/HandsFreePhoneSystem.tsx +24 -24
  824. package/source/components/_common/IconSVG/SVG/vehicle/Kw.tsx +23 -23
  825. package/source/components/_common/IconSVG/SVG/vehicle/LastCrawledAt.tsx +22 -22
  826. package/source/components/_common/IconSVG/SVG/vehicle/LeasingIcon.tsx +14 -14
  827. package/source/components/_common/IconSVG/SVG/vehicle/Led.tsx +24 -24
  828. package/source/components/_common/IconSVG/SVG/vehicle/LightSensor.tsx +22 -22
  829. package/source/components/_common/IconSVG/SVG/vehicle/LinkAlternative.tsx +15 -15
  830. package/source/components/_common/IconSVG/SVG/vehicle/Location.tsx +17 -17
  831. package/source/components/_common/IconSVG/SVG/vehicle/MinusIcon.tsx +11 -11
  832. package/source/components/_common/IconSVG/SVG/vehicle/Mirror.tsx +19 -19
  833. package/source/components/_common/IconSVG/SVG/vehicle/Navigation.tsx +27 -27
  834. package/source/components/_common/IconSVG/SVG/vehicle/NewCar.tsx +21 -21
  835. package/source/components/_common/IconSVG/SVG/vehicle/NoImage.tsx +17 -17
  836. package/source/components/_common/IconSVG/SVG/vehicle/Owner.tsx +18 -18
  837. package/source/components/_common/IconSVG/SVG/vehicle/PanoramicRoof.tsx +23 -23
  838. package/source/components/_common/IconSVG/SVG/vehicle/ParkingAssistants.tsx +24 -24
  839. package/source/components/_common/IconSVG/SVG/vehicle/PickYourself.tsx +18 -18
  840. package/source/components/_common/IconSVG/SVG/vehicle/PlusIcon.tsx +11 -11
  841. package/source/components/_common/IconSVG/SVG/vehicle/Power.tsx +21 -21
  842. package/source/components/_common/IconSVG/SVG/vehicle/Ps.tsx +19 -19
  843. package/source/components/_common/IconSVG/SVG/vehicle/Question.tsx +24 -24
  844. package/source/components/_common/IconSVG/SVG/vehicle/Seats.tsx +21 -21
  845. package/source/components/_common/IconSVG/SVG/vehicle/SeatsHeating.tsx +26 -26
  846. package/source/components/_common/IconSVG/SVG/vehicle/SelectorGearboxAutomatic.tsx +24 -24
  847. package/source/components/_common/IconSVG/SVG/vehicle/SelectorGearboxManualShift.tsx +19 -19
  848. package/source/components/_common/IconSVG/SVG/vehicle/SelectorGearboxOther.tsx +24 -24
  849. package/source/components/_common/IconSVG/SVG/vehicle/SelectorGearboxSemiAutomatic.tsx +30 -30
  850. package/source/components/_common/IconSVG/SVG/vehicle/SelectorInteriorTypeAlcantara.tsx +225 -225
  851. package/source/components/_common/IconSVG/SVG/vehicle/SelectorInteriorTypeFabric.tsx +29 -29
  852. package/source/components/_common/IconSVG/SVG/vehicle/SelectorInteriorTypeFullLeather.tsx +29 -29
  853. package/source/components/_common/IconSVG/SVG/vehicle/SelectorInteriorTypeOther.tsx +26 -26
  854. package/source/components/_common/IconSVG/SVG/vehicle/SelectorInteriorTypePartLeather.tsx +142 -142
  855. package/source/components/_common/IconSVG/SVG/vehicle/SelectorInteriorTypeSyntheticLeather.tsx +27 -27
  856. package/source/components/_common/IconSVG/SVG/vehicle/SelectorInteriorTypeVelours.tsx +39 -39
  857. package/source/components/_common/IconSVG/SVG/vehicle/Shield.tsx +39 -39
  858. package/source/components/_common/IconSVG/SVG/vehicle/Speedometer.tsx +17 -17
  859. package/source/components/_common/IconSVG/SVG/vehicle/StartStopSystem.tsx +30 -30
  860. package/source/components/_common/IconSVG/SVG/vehicle/Stop.tsx +25 -25
  861. package/source/components/_common/IconSVG/SVG/vehicle/TickMark.tsx +21 -21
  862. package/source/components/_common/IconSVG/SVG/vehicle/TrafficSignRecognition.tsx +29 -29
  863. package/source/components/_common/IconSVG/SVG/vehicle/TrailerCoupling.tsx +24 -24
  864. package/source/components/_common/IconSVG/SVG/vehicle/Transmission.tsx +27 -27
  865. package/source/components/_common/IconSVG/SVG/vehicle/Wheel.tsx +43 -43
  866. package/source/components/_common/IconSVG/SVG/vehicle/Wipers.tsx +22 -22
  867. package/source/components/_common/IconSVG/SVG/vehicle/Wrench.tsx +17 -17
  868. package/source/components/_common/Image/Image.story.js +142 -142
  869. package/source/components/_common/Image/Image.story.styl +18 -18
  870. package/source/components/_common/Image/Image.styl +109 -109
  871. package/source/components/_common/Image/Image.tsx +302 -302
  872. package/source/components/_common/ImagesSet/ImagesSet.story.js +34 -34
  873. package/source/components/_common/ImagesSet/ImagesSet.story.styl +3 -3
  874. package/source/components/_common/ImagesSet/ImagesSet.styl +27 -27
  875. package/source/components/_common/ImagesSet/ImagesSet.tsx +76 -76
  876. package/source/components/_common/Loader/Loader.story.js +21 -21
  877. package/source/components/_common/Loader/Loader.styl +39 -39
  878. package/source/components/_common/Loader/Loader.tsx +32 -32
  879. package/source/components/_common/MagnifyGlass/MagnifyGlass.styl +33 -33
  880. package/source/components/_common/MagnifyGlass/MagnifyGlass.tsx +213 -213
  881. package/source/components/_common/MaterialAccordion/MaterialAccordion.tsx +149 -149
  882. package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.story.js +49 -49
  883. package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.styled.tsx +71 -71
  884. package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.tsx +40 -40
  885. package/source/components/_common/MaterialAutocomplete/MaterialAutocomplete.styled.tsx +204 -204
  886. package/source/components/_common/MaterialAutocomplete/MaterialAutocomplete.tsx +248 -248
  887. package/source/components/_common/MaterialDatePicker/MaterialDatePicker.story.js +45 -45
  888. package/source/components/_common/MaterialDatePicker/MaterialDatePicker.story.styl +5 -5
  889. package/source/components/_common/MaterialDatePicker/MaterialDatePicker.styled.tsx +21 -21
  890. package/source/components/_common/MaterialDatePicker/MaterialDatePicker.tsx +112 -112
  891. package/source/components/_common/MaterialField/MaterialField.story.js +87 -87
  892. package/source/components/_common/MaterialField/MaterialField.story.styl +33 -33
  893. package/source/components/_common/MaterialField/MaterialField.styled.tsx +52 -52
  894. package/source/components/_common/MaterialField/MaterialField.tsx +129 -129
  895. package/source/components/_common/MaterialSelect/MaterialSelect.story.js +52 -52
  896. package/source/components/_common/MaterialSelect/MaterialSelect.story.styl +5 -5
  897. package/source/components/_common/MaterialSelect/MaterialSelect.styled.tsx +126 -126
  898. package/source/components/_common/MaterialSelect/MaterialSelect.tsx +222 -222
  899. package/source/components/_common/MaterialStepButton/MaterialStepButton.story.js +47 -47
  900. package/source/components/_common/MaterialStepButton/MaterialStepButton.story.styl +5 -5
  901. package/source/components/_common/MaterialStepButton/MaterialStepButton.styl +32 -32
  902. package/source/components/_common/MaterialStepButton/MaterialStepButton.tsx +61 -61
  903. package/source/components/_common/MaterialSwitch/MaterialSwitch.story.js +17 -17
  904. package/source/components/_common/MaterialSwitch/MaterialSwitch.styled.tsx +5 -5
  905. package/source/components/_common/MaterialSwitch/MaterialSwitch.tsx +35 -35
  906. package/source/components/_common/MaterialTooltip/MaterialTooltip.story.js +10 -10
  907. package/source/components/_common/MaterialTooltip/MaterialTooltip.styled.tsx +24 -24
  908. package/source/components/_common/MaterialTooltip/MaterialTooltip.tsx +87 -87
  909. package/source/components/_common/Modal/CookieModal.tsx +40 -40
  910. package/source/components/_common/Modal/Modal.story.js +37 -37
  911. package/source/components/_common/Modal/Modal.styled.tsx +13 -13
  912. package/source/components/_common/Modal/Modal.tsx +27 -27
  913. package/source/components/_common/Modal/ModalsConfig.tsx +19 -19
  914. package/source/components/_common/Modal/modals/ManageCookieModal/ManageCookieModal.styl +67 -67
  915. package/source/components/_common/Modal/modals/ManageCookieModal/ManageCookieModal.tsx +147 -147
  916. package/source/components/_common/Modal/modals/PreviewCookieModal/PreviewCookieModal.styl +44 -44
  917. package/source/components/_common/Modal/modals/PreviewCookieModal/PreviewCookieModal.tsx +33 -33
  918. package/source/components/_common/Modal/modals/TestModal.tsx +7 -7
  919. package/source/components/_common/MuiDropDown/MuiDropDown.tsx +93 -93
  920. package/source/components/_common/MuiGroupedSelect/MuiGroupedSelect.story.js +21 -21
  921. package/source/components/_common/MuiGroupedSelect/MuiGroupedSelect.tsx +87 -87
  922. package/source/components/_common/OfferRequestButtonWrapper/OfferRequestButtonWrapper.styl +119 -119
  923. package/source/components/_common/OfferRequestButtonWrapper/OfferRequestButtonWrapper.styled.tsx +23 -23
  924. package/source/components/_common/OfferRequestButtonWrapper/OfferRequestButtonWrapper.tsx +114 -114
  925. package/source/components/_common/PropertySelector/PSGroup.story.js +93 -93
  926. package/source/components/_common/PropertySelector/PSGroup.story.styl +25 -25
  927. package/source/components/_common/PropertySelector/PSGroup.styl +5 -5
  928. package/source/components/_common/PropertySelector/PSGroup.tsx +98 -98
  929. package/source/components/_common/PropertySelector/PropertySelector.styl +139 -139
  930. package/source/components/_common/PropertySelector/PropertySelector.tsx +100 -100
  931. package/source/components/_common/PropertySelector/ProperySelector.story.js +83 -83
  932. package/source/components/_common/Radio/FormRadioGroup.story.js +28 -28
  933. package/source/components/_common/Radio/FormRadioGroup.story.styl +2 -2
  934. package/source/components/_common/Radio/FormRadioGroup.styl +22 -22
  935. package/source/components/_common/Radio/FormRadioGroup.tsx +77 -52
  936. package/source/components/_common/Radio/Radio.story.js +54 -54
  937. package/source/components/_common/Radio/Radio.styl +115 -115
  938. package/source/components/_common/Radio/Radio.tsx +141 -141
  939. package/source/components/_common/Radio/RadioGroup.story.js +90 -90
  940. package/source/components/_common/Radio/RadioGroup.story.styl +39 -39
  941. package/source/components/_common/Radio/RadioGroup.styl +5 -5
  942. package/source/components/_common/Radio/RadioGroup.tsx +65 -65
  943. package/source/components/_common/Range/Range.story.js +46 -46
  944. package/source/components/_common/Range/Range.story.styl +4 -4
  945. package/source/components/_common/Range/Range.styl +71 -71
  946. package/source/components/_common/Range/Range.tsx +69 -69
  947. package/source/components/_common/Skeleton/SkeletonItem.styl +80 -80
  948. package/source/components/_common/Skeleton/SkeletonItem.tsx +80 -80
  949. package/source/components/_common/Skeleton/SkeletonSearchItem.styl +123 -123
  950. package/source/components/_common/Skeleton/SkeletonSearchItem.tsx +92 -92
  951. package/source/components/_common/Slider/Slider.styl +2 -2
  952. package/source/components/_common/Slider/Slider.tsx +130 -130
  953. package/source/components/_common/SliderArrow/SliderArrow.story.js +18 -18
  954. package/source/components/_common/SliderArrow/SliderArrow.styl +32 -32
  955. package/source/components/_common/SliderArrow/SliderArrow.tsx +36 -36
  956. package/source/components/_common/StarButton/StarButton.styl +39 -39
  957. package/source/components/_common/StarButton/StarButton.tsx +31 -31
  958. package/source/components/_common/Tabs/TabPanel.tsx +28 -28
  959. package/source/components/_common/Tabs/Tabs.story.js +55 -55
  960. package/source/components/_common/Tabs/Tabs.styl +40 -40
  961. package/source/components/_common/Tabs/Tabs.tsx +44 -44
  962. package/source/components/_common/TextAreaField/TextAreaField.styl +47 -47
  963. package/source/components/_common/TextAreaField/TextAreaField.tsx +74 -74
  964. package/source/components/_common/TextField/TextField.styl +37 -37
  965. package/source/components/_common/TextField/TextField.tsx +77 -77
  966. package/source/components/_common/TimePicker/TimePicker.story.js +37 -37
  967. package/source/components/_common/TimePicker/TimePicker.styl +22 -22
  968. package/source/components/_common/TimePicker/TimePicker.tsx +155 -155
  969. package/source/components/_common/Tooltip/Tooltip.story.js +28 -28
  970. package/source/components/_common/Tooltip/Tooltip.styl +117 -117
  971. package/source/components/_common/Tooltip/Tooltip.tsx +62 -62
  972. package/source/components/_common/UserMenu/MaterialMenu.story.js +73 -73
  973. package/source/components/_common/UserMenu/MaterialMenu.styled.tsx +85 -85
  974. package/source/components/_common/UserMenu/MaterialMenu.tsx +101 -101
  975. package/source/components/_common/UserMenu/MaterialMenuItem.tsx +54 -54
  976. package/source/components/_common/UserMenu/NestedMenu.tsx +59 -59
  977. package/source/components/_common/Usp/Usp.styl +78 -78
  978. package/source/components/_common/Usp/Usp.tsx +30 -30
  979. package/source/components/_common/VehicleSlider/VehicleSlider.story.js +99 -99
  980. package/source/components/_common/VehicleSlider/VehicleSlider.styl +62 -62
  981. package/source/components/_common/VehicleSlider/VehicleSlider.tsx +125 -125
  982. package/source/components/_common/VehicleSlider/VehicleSliderForSRL.tsx +175 -167
  983. package/source/components/_common/withLabel/withLabel.story.js +62 -62
  984. package/source/components/_common/withLabel/withLabel.styl +33 -33
  985. package/source/components/_common/withLabel/withLabel.tsx +44 -44
  986. package/source/components/_common/withPopover/withPopover.story.js +48 -48
  987. package/source/components/_common/withPopover/withPopover.story.styl +53 -53
  988. package/source/components/_common/withPopover/withPopover.styl +3 -3
  989. package/source/components/_common/withPopover/withPopover.tsx +88 -88
  990. package/source/components/_common/withStats/withStats.story.js +75 -75
  991. package/source/components/_common/withStats/withStats.styl +150 -150
  992. package/source/components/_common/withStats/withStats.tsx +179 -179
  993. package/source/components/containers/DasboardSection/DashboardSection.styl +14 -14
  994. package/source/components/containers/DasboardSection/DashboardSection.tsx +23 -23
  995. package/source/components/containers/SearchPage/FiltersContainer/FiltersContainer.styl +54 -54
  996. package/source/components/containers/SearchPage/FiltersContainer/FiltersContainer.tsx +426 -426
  997. package/source/framework/DataTransformers.ts +80 -80
  998. package/source/framework/constants/RateSearchWidget.ts +15 -15
  999. package/source/framework/constants/Search.ts +290 -290
  1000. package/source/framework/constants/SearchWidget.ts +108 -108
  1001. package/source/framework/constants/app.ts +223 -223
  1002. package/source/framework/constants/cars.ts +36 -36
  1003. package/source/framework/constants/common.ts +83 -82
  1004. package/source/framework/constants/data.ts +52 -52
  1005. package/source/framework/constants/filters.ts +11 -11
  1006. package/source/framework/constants/highlights.ts +165 -165
  1007. package/source/framework/constants/price.ts +9 -9
  1008. package/source/framework/constants/queryBuilder.ts +4 -4
  1009. package/source/framework/constants/selectors.ts +38 -38
  1010. package/source/framework/constants.ts +116 -116
  1011. package/source/framework/data.ts +6 -6
  1012. package/source/framework/factories/BreadcrumbsFactory.tsx +285 -285
  1013. package/source/framework/factories/FactoryTypes.d.ts +30 -30
  1014. package/source/framework/factories/FilterFactory.ts +364 -364
  1015. package/source/framework/factories/ModalsFactory.tsx +11 -11
  1016. package/source/framework/hooks/useModal.ts +13 -13
  1017. package/source/framework/schemes/AggregationScheme.ts +73 -73
  1018. package/source/framework/types/types.ts +344 -344
  1019. package/source/framework/utils/CommonUtils.ts +604 -595
  1020. package/source/framework/utils/CookieUtils.ts +61 -61
  1021. package/source/framework/utils/DateUtils.ts +93 -93
  1022. package/source/framework/utils/FiltersUtils.ts +234 -234
  1023. package/source/framework/utils/RequestUtils.ts +20 -20
  1024. package/source/framework/utils/StyledComponent.ts +2 -2
  1025. package/source/framework/vehiclesProps/cbdSelectors.ts +117 -117
  1026. package/source/framework/vehiclesProps/decoratedLightProps.tsx +345 -345
  1027. package/source/framework/vehiclesProps/decoratedProps.tsx +1057 -1057
  1028. package/source/framework/vehiclesProps/equipment.ts +129 -129
  1029. package/source/framework/vehiclesProps/highlights.ts +54 -54
  1030. package/source/framework/vehiclesProps/vehicleDetails.ts +329 -329
  1031. package/source/globals.d.ts +18 -18
  1032. package/source/locales/SearchDetailedPage.ts +205 -205
  1033. package/source/locales/SearchPage.ts +224 -224
  1034. package/source/locales/cbd.ts +719 -719
  1035. package/source/locales/common.ts +109 -109
  1036. package/source/locales/data.ts +1078 -1078
  1037. package/source/locales/priceRating.ts +10 -10
  1038. package/source/locales/sortingOptions.ts +21 -21
  1039. package/source/theme/colors.styl +46 -46
  1040. package/source/theme/mixins.styl +93 -93
  1041. package/source/theme/priceReviewColors.styl +12 -12
  1042. package/source/theme/selector_colors.styl +61 -61
  1043. package/source/theme/slider.global.styl +3 -3
  1044. package/source/theme/theme.styl +136 -136
  1045. package/tsconfig.json +65 -65
  1046. package/tslint.json +39 -39
  1047. package/utils.ts +57 -57
  1048. package/source/components/_common/CheckboxMaterial/FormCheckboxMaterial.styl +0 -22
  1049. package/source/components/_common/CheckboxMaterial/FormCheckboxMaterial.tsx +0 -50
  1050. package/source/components/_common/PropertySelector/FormPSGroup.story.js +0 -36
  1051. package/source/components/_common/PropertySelector/FormPSGroup.story.styl +0 -5
  1052. package/source/components/_common/PropertySelector/FormPSGroup.styl +0 -22
  1053. package/source/components/_common/PropertySelector/FormPSGroup.tsx +0 -54
  1054. package/source/components/_common/TextField/FormTextField.story.js +0 -21
  1055. package/source/components/_common/TextField/FormTextField.styl +0 -35
  1056. package/source/components/_common/TextField/FormTextField.tsx +0 -54
@@ -1,596 +1,605 @@
1
- import qs from 'qs';
2
- import _get from 'lodash/get';
3
- import { formatLocale as d3formatLocale } from 'd3-format';
4
- import Cookies from 'js-cookie';
5
- import {
6
- FIRST_REGISTRATION, MANUFACTURER, MILEAGE, MODEL, BODY_TYPE, PRICE, RATE,
7
- DROP_DOWN_GROUP, RATE_DEFAULT, MMS_GROUPS_KEY, MMS_GROUP_FIELDS
8
- } from '../constants/SearchWidget';
9
- import { priceRatings, priceRatingConfig } from '../constants/price';
10
- import { GOOGLE_BUNDLE_COOKIES, HUNDRED } from '../constants/common';
11
- import { offers } from '../constants';
12
- import { FILTERS_IN_TITLE, MANUFACTURER_KEY, MAX_FILTERS_IN_TITLE, MODEL_KEY } from '../constants/Search';
13
- import { SearchPage as SearchPageTranslate } from '../../locales/data';
14
-
15
- const PRICE_DEFAULT = DROP_DOWN_GROUP[PRICE].defaultValue;
16
-
17
- declare global {
18
- // tslint:disable-next-line:interface-name
19
- interface Window {
20
- grantHotjarCookieConsent?: () => void;
21
- grantCookieConsent?: (list: string[]) => void;
22
- allowGoogle?: () => void;
23
- }
24
- }
25
-
26
- export const formatMileage = (millage: number | string) => {
27
- return millage.toLocaleString('en-US').replace(/,/g, '.');
28
- };
29
-
30
- export const getFormattedNumber = (num: number) => Number.isFinite(num) ? num.toLocaleString('de-DE') : null;
31
-
32
- export const numberWithDot = (value: number | string) => {
33
- switch (value) {
34
- case 'any':
35
- return value;
36
- case 'beliebig':
37
- return value;
38
- default: return getFormattedNumber(+value);
39
- }
40
- };
41
-
42
- export const arrToObj = (arr: string[]): { [key: string]: boolean } => {
43
- if (!Array.isArray(arr)) return {};
44
- return arr.reduce(
45
- (obj: { [key: string]: boolean }, el: string) => { obj[el] = true; return obj; }, {}
46
- );
47
- };
48
-
49
- export const addPrefixToKeys = (obj: { [key: string]: any }, prefix: string) => {
50
- const result: { [key: string]: any } = {};
51
- Object.keys(obj).reduce((_, key) => {
52
- result[`${prefix}_${key}`] = obj[key];
53
- return result;
54
- }, result); // tslint:disable-line:align
55
- return result;
56
- };
57
-
58
- // function return list of filter for inject in title
59
- export const filtersInTitle = (filters: any) => {
60
- const result: any[] = [];
61
- const pushInResult = (value: any) => {
62
- if (result.length < MAX_FILTERS_IN_TITLE && value) {
63
- result.push(value);
64
- }
65
- };
66
-
67
- FILTERS_IN_TITLE.forEach((filter: string) => {
68
- if (filter === MMS_GROUPS_KEY) {
69
- filters.get(filter).forEach((MmsObject: any) => {
70
- pushInResult(MmsObject[MANUFACTURER_KEY].value);
71
- pushInResult(MmsObject[MODEL_KEY].value);
72
- });
73
- } else {
74
- filters.get(filter).value.forEach((value: string) => {
75
- pushInResult(value);
76
- });
77
- }
78
- });
79
- return result;
80
- };
81
-
82
- export const changeLocation = (path: string) =>
83
- window.location.href = `${window.location.origin}/${path}`;
84
-
85
- export const checkRangeValuesOnEqual = (defaultValues: any, filterValues: any) => {
86
- const keys = Object.keys(defaultValues);
87
- let valuesIsEqual = true;
88
- for (let i = 0; i < keys.length; i += 1) {
89
- const period = keys[i];
90
-
91
- if (filterValues[period] !== defaultValues[period]) {
92
- valuesIsEqual = false;
93
- break;
94
- }
95
- }
96
-
97
- return valuesIsEqual;
98
- };
99
-
100
- export interface ICarImage {
101
- url?: string;
102
- imageUrlSmall?: string;
103
- imageUrlMedium?: string;
104
- imageUrlLarge?: string;
105
- }
106
-
107
- export const preloadNearbyImages = (images: ICarImage[], activeIndex: number, imageUrlSize: 'imageUrlSmall' | 'imageUrlMedium' | 'imageUrlLarge') => {
108
- const imagesCount = Array.isArray(images) ? images.length : 0;
109
- const imageSize = imageUrlSize;
110
-
111
- const inMemoryPrevImage = new Image();
112
- const inMemoryNextImage = new Image();
113
-
114
- if (!!imagesCount) {
115
- const prevIndex = (activeIndex - 1 % imagesCount + imagesCount) % imagesCount;
116
- const nextIndex = (activeIndex + 1 % imagesCount + imagesCount) % imagesCount;
117
-
118
- inMemoryPrevImage.src = images[prevIndex][imageSize];
119
- inMemoryNextImage.src = images[nextIndex][imageSize];
120
- }
121
- };
122
-
123
- export const getGroupValuesForQuery = (groups: any) => {
124
- const arr: any = [];
125
- groups.map((group: any) => {
126
- const groupObj: any = {};
127
-
128
- Object.keys(group).forEach((key: string) => {
129
- const item = group[key];
130
- if (item.value) {
131
- groupObj[key] = item.value;
132
- }
133
- });
134
- if (Object.keys(groupObj).length) {
135
- arr.push(groupObj);
136
- }
137
- });
138
- return arr;
139
- };
140
-
141
- export const buildBodyForRequest = (state: any) => {
142
- const query: any = {
143
- filters: {
144
- absolutValues: {
145
- mmsGroup0: {}
146
- },
147
- noAbsolutValues: {},
148
- rangeValues: {}
149
- }
150
- };
151
-
152
- Object.keys(state).sort().forEach((key: string) => {
153
- const value = state[key];
154
-
155
- if (!value) return;
156
-
157
- if (key === MANUFACTURER && value.value) {
158
- query.filters.absolutValues.mmsGroup0.mainData_make = value.value;
159
- }
160
-
161
- if (key === MODEL && value.value) {
162
- if (value.isSeries) {
163
- query.filters.absolutValues.mmsGroup0.mainData_series = value.value;
164
- } else {
165
- query.filters.absolutValues.mmsGroup0.mainData_model = value.value;
166
- }
167
- }
168
-
169
- if (key === BODY_TYPE && value.length) {
170
- query.filters.noAbsolutValues[BODY_TYPE] = value;
171
- }
172
-
173
- if (key === FIRST_REGISTRATION && value.value) {
174
- query.filters.rangeValues['mainData_firstRegistrationYear'] = { from: value.value };
175
- }
176
-
177
- if (key === MILEAGE && value.value) {
178
- query.filters.rangeValues['mainData_mileage'] = { to: value.value };
179
- }
180
-
181
- if (key === PRICE) {
182
- const valueIsEqual = checkRangeValuesOnEqual(PRICE_DEFAULT, value);
183
-
184
- if (!valueIsEqual) {
185
- // check value in from / to. If we have - add it
186
- Object.keys(value).map((key: string) => {
187
- if (value[key]) {
188
- if (!query.filters.rangeValues['price_currentSalesPrice']) {
189
- query.filters.rangeValues['price_currentSalesPrice'] = {};
190
- }
191
-
192
- query.filters.rangeValues['price_currentSalesPrice'][key] = value[key];
193
- }
194
- });
195
- }
196
- }
197
-
198
- if (key === RATE) {
199
- const isRateDefault = checkRangeValuesOnEqual(RATE_DEFAULT, value);
200
-
201
- if (!isRateDefault) {
202
- query.filters.rangeValues['price_currentSalesPrice'] = { from: 1000, to: 2000 };
203
- }
204
- }
205
- });
206
-
207
- return query;
208
- };
209
-
210
- export const buildQueryForSearch = (filters: any) => {
211
- const query: { [key: string]: any } = {};
212
- const MMS_GROUP: any = {};
213
-
214
- Object.keys(filters).forEach((filter: string) => {
215
- const filterValue = filters[filter];
216
-
217
- if (filterValue && filterValue.value) {
218
- if (MMS_GROUP_FIELDS.indexOf(filter) !== -1) {
219
- MMS_GROUP[filter] = filterValue.value;
220
-
221
- if (filterValue.isSeries) {
222
- MMS_GROUP.SERIES = filterValue.value;
223
- }
224
- }
225
- }
226
-
227
- if (filterValue === PRICE) {
228
- const defaultValue = DROP_DOWN_GROUP[filter].defaultValue;
229
- const valueIsDefault = filter === PRICE ? checkRangeValuesOnEqual(defaultValue, filterValue) : filterValue === defaultValue;
230
-
231
- if (!valueIsDefault) {// check value in from / to. If we have - add it
232
- Object.keys(filterValue).map((key: string) => {
233
- if (filterValue[key]) {
234
- if (!query.filters.rangeValues['price_currentSalesPrice']) {
235
- query.filters.rangeValues['price_currentSalesPrice'] = {};
236
- }
237
-
238
- query.filters.rangeValues['price_currentSalesPrice'][key] = filterValue[key];
239
- }
240
- });
241
- }
242
- }
243
-
244
- if (filter === PRICE) {
245
- const valueIsDefault = checkRangeValuesOnEqual(PRICE_DEFAULT, filterValue);
246
-
247
- if (!valueIsDefault) {
248
- query[PRICE] = { from: '', to: '' };
249
- query[PRICE].from = _get(filterValue, 'from', '');
250
- query[PRICE].to = _get(filterValue, 'to', '');
251
- }
252
- }
253
-
254
- if (filter === RATE) {
255
- const isRateDefault = checkRangeValuesOnEqual(RATE_DEFAULT, filterValue);
256
-
257
- if (!isRateDefault) {
258
- query[RATE] = filterValue;
259
- }
260
- }
261
-
262
- if (filter === MILEAGE) {
263
- const defaultValue = DROP_DOWN_GROUP[filter].defaultValue;
264
- if (filterValue !== defaultValue) {
265
- query[MILEAGE] = { from: '', to: '' };
266
- query[MILEAGE].from = _get(filterValue, 'from', '');
267
- query[MILEAGE].to = _get(filterValue, 'to', '') || _get(filterValue, 'value', '');
268
- }
269
- }
270
-
271
- if (filter === FIRST_REGISTRATION) {
272
- const defaultValue = DROP_DOWN_GROUP[filter].defaultValue;
273
- if (filterValue !== defaultValue) {
274
- query[FIRST_REGISTRATION] = { from: '', to: '' };
275
- query[FIRST_REGISTRATION].from = _get(filterValue, 'from', '') || _get(filterValue, 'value', '');
276
- query[FIRST_REGISTRATION].to = _get(filterValue, 'to', '');
277
- }
278
- }
279
-
280
- if (filter === BODY_TYPE) {
281
- const defaultValue = DROP_DOWN_GROUP[filter].defaultValue;
282
-
283
- if (filterValue.length && filterValue !== defaultValue) {
284
- query[BODY_TYPE] = [];
285
-
286
- filterValue.map((bodyTypeSelector: string) => {
287
- query[BODY_TYPE].push(bodyTypeSelector);
288
- });
289
- }
290
- }
291
- });
292
-
293
- if (Object.keys(MMS_GROUP).length) {
294
- query[MMS_GROUPS_KEY] = [];
295
- query[MMS_GROUPS_KEY].push(MMS_GROUP);
296
- }
297
-
298
- return qs.stringify(query, { encode: false });
299
- };
300
-
301
- export const sliceLessThan = (array: number[], to: any): number[] => {
302
- const value = Number(to);
303
- return value && Number.isFinite(value)
304
- ? array.filter((val: number) => val <= value)
305
- : array;
306
- };
307
-
308
- export const sliceMoreThan = (array: number[], from: any): number[] => {
309
- const value = Number(from);
310
- return value && Number.isFinite(value)
311
- ? array.filter((val: number) => val >= value)
312
- : array;
313
- };
314
-
315
- export const getFormattedPrice = (price: number, format = '$,.0f', currency = '', currencyPrefix = ''): string => {
316
- if (!Number.isFinite(price)) return '-';
317
- const groupingNum = 3;
318
- return d3formatLocale({
319
- decimal: ',',
320
- thousands: '.',
321
- currency: [currencyPrefix, currency],
322
- grouping: [groupingNum]
323
- }).format(format)(price);
324
- };
325
-
326
-
327
- export const getPriceRatingConfig = (currentPrice: number, pricePredicted: number) => { // tslint:disable-line
328
- const round = (value: number) => {
329
- return Number.isFinite(pricePredicted)
330
- ? Math.round((pricePredicted * (1 + (value / 100))) / 100) * 100 // tslint:disable-line
331
- : '???';
332
- };
333
-
334
- if (currentPrice === 0) {
335
- console.log('Empty current price');
336
- }
337
-
338
- return Object.keys(priceRatingConfig).reduce((acc: any, key: any) => {
339
- const { min, max } = priceRatingConfig[key];
340
- return { ...acc, [key]: { min: round(min), max: round(max) } };
341
- }, {}); // tslint:disable-line
342
- };
343
-
344
- export const getPriceRating = (currentSalesPrice: number, predictablePrice: number) => {
345
- const isCorrectCurrentSalesPrice = Number.isFinite(Number.parseFloat(`${currentSalesPrice}`));
346
- const isCorrectPredictablePrice = Number.isFinite(Number.parseFloat(`${predictablePrice}`));
347
-
348
- if (!isCorrectCurrentSalesPrice || !isCorrectPredictablePrice) return 0;
349
-
350
- const ratingConfig = getPriceRatingConfig(currentSalesPrice, predictablePrice);
351
-
352
- for (const key of Object.keys(ratingConfig)) {
353
- const { min, max } = ratingConfig[key];
354
- const TOP_PRICE = 5;
355
- if (key === 'highPrice' && currentSalesPrice === max) return 1;
356
- if (key === 'topPrice' && currentSalesPrice <= min) return TOP_PRICE;
357
- if (currentSalesPrice >= min && currentSalesPrice < max) return priceRatings.indexOf(key);
358
- }
359
-
360
- return 0;
361
- };
362
-
363
- export const fixNumber = (num: number | string) => {
364
- const isNum = typeof num === 'number' ? num : parseFloat(num);
365
- return Math.round(isNum * HUNDRED) / HUNDRED;
366
- };
367
-
368
- export const getOfferSliders = (financingConfig: any, t: (key: string, options?: object) => string, priceTabIndex: null | number, componentType: string) => {
369
- const offerObj = offers[+priceTabIndex];
370
- const offerConfig = financingConfig[offerObj.name];
371
- const currentSalesPrice =
372
- financingConfig.common ?
373
- financingConfig.common.currentSalesPrice :
374
- financingConfig.currentSalesPrice; // TODO: fix deprecated. Correct is "financingConfig.common.currentSalesPrice"
375
- return offerObj.sliders
376
- .map((slider: any, index) => {
377
- if (componentType === 'checkout' && index === 1 && priceTabIndex === 0) return; // remove checkout annual mileage for financing
378
- if (slider.name === 'firstInstallment') slider.max = offerConfig.firstInstallmentMax || currentSalesPrice;
379
- slider.value = offerConfig[slider.name];
380
- slider.unitName = t(`modals:financing.${slider.unit}`);
381
- slider.caption = t(`modals:financing.${slider.name}`);
382
- return slider;
383
- }).filter(Boolean);
384
- };
385
-
386
- export const checkWebpFeature = async () => {
387
- // If the browser doesn't has the method createImageBitmap, you can't display webp format
388
- if (!self.createImageBitmap) return false;
389
-
390
- // Base64 representation of a white point image
391
- const webpData = 'data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoCAAEAAQAcJaQAA3AA/v3AgAA=';
392
-
393
- // Retrieve the Image in Blob Format
394
- const blob = await fetch(webpData).then(r => r.blob());
395
-
396
- // If the createImageBitmap method succeeds, return true, otherwise false
397
- return createImageBitmap(blob).then(() => true, () => false);
398
- };
399
-
400
- export const getSupportedImageFormat = (IMAGE_URL: string, vehicleID: string, imageIdentifier: string, size: 'small' | 'medium' | 'large', webpFeature: boolean) => {
401
- if (!imageIdentifier) return null;
402
-
403
- const vehicleImageURL = `${IMAGE_URL}/${vehicleID}/${imageIdentifier}`;
404
-
405
- return webpFeature ? `${vehicleImageURL}/${size}-cached.webp` : `${vehicleImageURL}/${size}-cached.jpeg`;
406
- };
407
-
408
- export function getChipFilterValue(
409
- chip: any,
410
- t: (key: string, options?: object) => string = (phrase: string, _?: object) => _get(SearchPageTranslate(chip), phrase.replace(':', '.'), phrase),
411
- language: string = 'de'
412
- ) {
413
- let filterValue: string;
414
- let title: string;
415
- let from: string;
416
- let to: string;
417
- const chipFilterKey = chip.filterKey || chip.key; // we may have different key naming for landing or main
418
- const chipFilterValue = chip.filterValue || chip.value; // we may have different key naming for landing or main
419
- switch (chipFilterKey) {
420
- case 'MANUFACTURER':
421
- case 'MODEL':
422
- case 'SUB_MODEL':
423
- case 'SERIES':
424
- filterValue = chipFilterValue;
425
- break;
426
-
427
- case 'MANUFACTURER_EXCLUDE':
428
- case 'MODEL_EXCLUDE':
429
- title = t(`SearchPage:filters.${chipFilterKey.toLocaleLowerCase()}`);
430
- filterValue = `${title} ${chipFilterValue}`;
431
- break;
432
-
433
- case 'FIRST_REGISTRATION':
434
- title = t(`SearchPage:filters.${chipFilterKey.toLocaleLowerCase()}`);
435
- from = chipFilterValue.from ? `${t('SearchPage:filters.from')} ${chipFilterValue.from} ` : '';
436
- to = chipFilterValue.to ? `${t('SearchPage:filters.to')} ${chipFilterValue.to}` : '';
437
- filterValue = `${title} ${from} ${to}`;
438
- break;
439
-
440
- case 'PRICE':
441
- case 'PRICE_DIFFERENCE':
442
- case 'MILEAGE':
443
- case 'EMISSION_CO2':
444
- case 'POWER':
445
- case 'IMAGES_COUNT':
446
- title = t(`SearchPage:filters.${chipFilterKey.toLocaleLowerCase()}`);
447
- from = chipFilterValue.from ? `${t('SearchPage:filters.from')} ${getFormattedPrice(+chipFilterValue.from)} ` : '';
448
- to = chipFilterValue.to ? `${t('SearchPage:filters.to')} ${getFormattedPrice(+chipFilterValue.to)}` : '';
449
- const type = chipFilterValue.type ? ` ${chipFilterValue.type}` : '';
450
- filterValue = `${title} ${from} ${to}${type}`;
451
- break;
452
-
453
- case 'DOORS':
454
- case 'OWNERS':
455
- filterValue = t(`SearchPage:filters.${chipFilterValue}`);
456
- break;
457
-
458
- case 'SEATS':
459
- case 'CUBIC_CAPACITY':
460
- title = t(`SearchPage:filters.${chipFilterKey.toLocaleLowerCase()}`);
461
- const fromTo = `${chipFilterValue.from} - ${chipFilterValue.to}`;
462
- filterValue = `${title} ${fromTo}`;
463
- break;
464
-
465
- case 'CONSUMPTION':
466
- const fromValue = Number(chipFilterValue.from).toLocaleString(language);
467
- const toValue = Number(chipFilterValue.to).toLocaleString(language);
468
- const newFromValue: any = (fromValue === 'NaN') ? '1' : fromValue;
469
- const newToValue: any = (toValue === 'NaN') ? '18' : toValue;
470
- const fromToWithInfo = `${newFromValue} - ${newToValue}`;
471
- filterValue = t(`SearchPage:filtersChips.${chipFilterKey.toLocaleLowerCase()}`, { value: fromToWithInfo });
472
- break;
473
-
474
- case 'ONLINE_SINCE':
475
- filterValue = t(`SearchPage:filters.${chipFilterValue}`);
476
- break;
477
-
478
- case 'GENERAL_INSPECTION':
479
- filterValue = t(`SearchPage:filtersChips.generalInspection`, { month: t(`SearchPage:filters.${chipFilterValue}`) });
480
- break;
481
-
482
- case 'RATE':
483
- const { monthlyInstallmentFrom, monthlyInstallmentTo, firstInstallment, paybackPeriod } = chipFilterValue;
484
- const rowValues: any = { monthlyInstallmentFrom, monthlyInstallmentTo, firstInstallment, paybackPeriod };
485
- const values: string[][] = [
486
- ['monthlyInstallmentFrom', 'monthlyInstallmentTo'],
487
- ['firstInstallment', 'paybackPeriod']
488
- ].map((fields: string[]) => fields
489
- .map((field: string) => {
490
- const rowValue = rowValues[field];
491
- const value = Number.isFinite(+rowValue) ? getFormattedPrice(+rowValue) : rowValue;
492
- return +rowValue ? t(`SearchPage:filtersChips.${field}Chip`, { value }) : null;
493
- })
494
- .filter((item: any) => !!item)
495
- );
496
- const rateValue = `${t('SearchPage:filtersChips.rateChip')} ${values[0].length ? values[0].join(' ') : t('SearchPage:filtersChips.any')}`;
497
- filterValue = `${rateValue}, ${values[1].join(', ')}`;
498
- break;
499
-
500
- default:
501
- filterValue = t(`cbd:${chipFilterValue}`);
502
- }
503
- return filterValue;
504
- }
505
-
506
- function getUtmQueryParameter() {
507
- const query = window.location.search;
508
-
509
- if (!query) { return; }
510
-
511
- const queryString = /^[?]/.test(query) ? query.slice(1) : query;
512
-
513
- const result = queryString.split('&').reduce(
514
- (params: any, param: string) => {
515
- const [key, value] = param.split('=');
516
-
517
- if (!/^source|^campaign|^medium|^content|^term|^reference|^gclid|^adgroupid|^keyword/.test(key)) { return params; }
518
-
519
- params[key] = value ? decodeURIComponent(value.replace(/\+/g, ' ')) : '';
520
-
521
- return params;
522
- },
523
- {}
524
- ); // eslint-disable-line indent,@typescript-eslint/indent
525
-
526
- return result;
527
- }
528
-
529
- export function setUtmParameters() {
530
- const marketing = getUtmQueryParameter();
531
-
532
- if (!marketing) return;
533
-
534
- if (!Object.keys(marketing).length) { return; }
535
-
536
- const expiresDate = new Date();
537
- expiresDate.setDate(expiresDate.getDate() + 1);
538
-
539
- const parsedUrl = new URL(window.location.href);
540
- const domain = parsedUrl.hostname.split('.').slice(-2).join('.');
541
-
542
- document.cookie = `marketing=${JSON.stringify(marketing)};expires=${expiresDate};domain=.${domain};path=/`;
543
- }
544
-
545
- export const updateCookieList = () => {
546
- let cookieConsentList = Object.keys(GOOGLE_BUNDLE_COOKIES);
547
- let isHomeGoogleGranted = true; // home page google cookie
548
- let isHotjarGranted = true;
549
- const cookieConfig = JSON.parse(localStorage.getItem('cookieConfig')) || {};
550
-
551
- const parsedUrl = new URL(window.location.href);
552
- const domain = parsedUrl.hostname.split('.').slice(-2).join('.');
553
- Object.keys(cookieConfig).forEach((group: string) => {
554
- cookieConfig[group].forEach((cookie: string) => {
555
- Cookies.remove(cookie, { domain, path: '/' }); // manually remove selected cookies
556
- // google
557
- if (cookieConsentList.includes(cookie)) {
558
- cookieConsentList = cookieConsentList.filter(i => i !== cookie); // deny google cookie consent for _gcl_au, _ga, _gid, _gat_UA-31842-13, etc
559
-
560
- isHomeGoogleGranted = false;
561
- } else if (cookie === 'hotjar') isHotjarGranted = false;
562
- });
563
- });
564
- // grant google cookies
565
- if (typeof window.grantCookieConsent === 'function') {
566
- // const { marketing, analytics } = cookieConfig;
567
-
568
- // if (marketing && marketing.length) { // if marketing disable then enable analytics_storage
569
- // cookieConsentList = [...cookieConsentList, 'analytics_storage'];
570
- // }
571
-
572
- // if (analytics && analytics.length) { // if analytics disable then enable ad_storage
573
- // cookieConsentList = [...cookieConsentList, 'ad_storage'];
574
- // }
575
-
576
- window.grantCookieConsent(cookieConsentList);
577
- };
578
- if (isHomeGoogleGranted && typeof window.allowGoogle === 'function') {
579
- window.allowGoogle();
580
- }
581
-
582
- // grant Hotjar cookies
583
- if (isHotjarGranted && typeof window.grantHotjarCookieConsent === 'function') window.grantHotjarCookieConsent();
584
- };
585
-
586
- // function returns decimal part of number with 2 digits
587
- export const getCents = (value: number, prefix?: string, postfix?: string): string => {
588
- if (!Number.isFinite(value)) return '';
589
- const roundedValue = Math.floor(value);
590
- const result = value.toFixed(2).toString().replace(`${roundedValue}.`, '');
591
- return `${prefix}${result}${postfix}`;
592
- };
593
-
594
- export const priceParse = (value: any) => {
595
- return !!value ? Number.parseFloat(value) : null;
1
+ import qs from 'qs';
2
+ import _get from 'lodash/get';
3
+ import { formatLocale as d3formatLocale } from 'd3-format';
4
+ import Cookies from 'js-cookie';
5
+ import {
6
+ FIRST_REGISTRATION, MANUFACTURER, MILEAGE, MODEL, BODY_TYPE, PRICE, RATE,
7
+ DROP_DOWN_GROUP, RATE_DEFAULT, MMS_GROUPS_KEY, MMS_GROUP_FIELDS
8
+ } from '../constants/SearchWidget';
9
+ import { priceRatings, priceRatingConfig } from '../constants/price';
10
+ import { GOOGLE_BUNDLE_COOKIES, HUNDRED } from '../constants/common';
11
+ import { offers } from '../constants';
12
+ import { FILTERS_IN_TITLE, MANUFACTURER_KEY, MAX_FILTERS_IN_TITLE, MODEL_KEY } from '../constants/Search';
13
+ import { SearchPage as SearchPageTranslate } from '../../locales/data';
14
+
15
+ const PRICE_DEFAULT = DROP_DOWN_GROUP[PRICE].defaultValue;
16
+
17
+ declare global {
18
+ // tslint:disable-next-line:interface-name
19
+ interface Window {
20
+ grantHotjarCookieConsent?: () => void;
21
+ grantCookieConsentClarity?: () => void;
22
+ grantCookieConsentMicrosoft?: () => void;
23
+ grantCookieConsent?: (list: string[]) => void;
24
+ allowGoogle?: () => void;
25
+ }
26
+ }
27
+
28
+ export const formatMileage = (millage: number | string) => {
29
+ return millage.toLocaleString('en-US').replace(/,/g, '.');
30
+ };
31
+
32
+ export const getFormattedNumber = (num: number) => Number.isFinite(num) ? num.toLocaleString('de-DE') : null;
33
+
34
+ export const numberWithDot = (value: number | string) => {
35
+ switch (value) {
36
+ case 'any':
37
+ return value;
38
+ case 'beliebig':
39
+ return value;
40
+ default: return getFormattedNumber(+value);
41
+ }
42
+ };
43
+
44
+ export const arrToObj = (arr: string[]): { [key: string]: boolean } => {
45
+ if (!Array.isArray(arr)) return {};
46
+ return arr.reduce(
47
+ (obj: { [key: string]: boolean }, el: string) => { obj[el] = true; return obj; }, {}
48
+ );
49
+ };
50
+
51
+ export const addPrefixToKeys = (obj: { [key: string]: any }, prefix: string) => {
52
+ const result: { [key: string]: any } = {};
53
+ Object.keys(obj).reduce((_, key) => {
54
+ result[`${prefix}_${key}`] = obj[key];
55
+ return result;
56
+ }, result); // tslint:disable-line:align
57
+ return result;
58
+ };
59
+
60
+ // function return list of filter for inject in title
61
+ export const filtersInTitle = (filters: any) => {
62
+ const result: any[] = [];
63
+ const pushInResult = (value: any) => {
64
+ if (result.length < MAX_FILTERS_IN_TITLE && value) {
65
+ result.push(value);
66
+ }
67
+ };
68
+
69
+ FILTERS_IN_TITLE.forEach((filter: string) => {
70
+ if (filter === MMS_GROUPS_KEY) {
71
+ filters.get(filter).forEach((MmsObject: any) => {
72
+ pushInResult(MmsObject[MANUFACTURER_KEY].value);
73
+ pushInResult(MmsObject[MODEL_KEY].value);
74
+ });
75
+ } else {
76
+ filters.get(filter).value.forEach((value: string) => {
77
+ pushInResult(value);
78
+ });
79
+ }
80
+ });
81
+ return result;
82
+ };
83
+
84
+ export const changeLocation = (path: string) =>
85
+ window.location.href = `${window.location.origin}/${path}`;
86
+
87
+ export const checkRangeValuesOnEqual = (defaultValues: any, filterValues: any) => {
88
+ const keys = Object.keys(defaultValues);
89
+ let valuesIsEqual = true;
90
+ for (let i = 0; i < keys.length; i += 1) {
91
+ const period = keys[i];
92
+
93
+ if (filterValues[period] !== defaultValues[period]) {
94
+ valuesIsEqual = false;
95
+ break;
96
+ }
97
+ }
98
+
99
+ return valuesIsEqual;
100
+ };
101
+
102
+ export interface ICarImage {
103
+ url?: string;
104
+ imageUrlSmall?: string;
105
+ imageUrlMedium?: string;
106
+ imageUrlLarge?: string;
107
+ }
108
+
109
+ export const preloadNearbyImages = (images: ICarImage[], activeIndex: number, imageUrlSize: 'imageUrlSmall' | 'imageUrlMedium' | 'imageUrlLarge') => {
110
+ const imagesCount = Array.isArray(images) ? images.length : 0;
111
+ const imageSize = imageUrlSize;
112
+
113
+ const inMemoryPrevImage = new Image();
114
+ const inMemoryNextImage = new Image();
115
+
116
+ if (!!imagesCount) {
117
+ const prevIndex = (activeIndex - 1 % imagesCount + imagesCount) % imagesCount;
118
+ const nextIndex = (activeIndex + 1 % imagesCount + imagesCount) % imagesCount;
119
+
120
+ inMemoryPrevImage.src = images[prevIndex][imageSize];
121
+ inMemoryNextImage.src = images[nextIndex][imageSize];
122
+ }
123
+ };
124
+
125
+ export const getGroupValuesForQuery = (groups: any) => {
126
+ const arr: any = [];
127
+ groups.map((group: any) => {
128
+ const groupObj: any = {};
129
+
130
+ Object.keys(group).forEach((key: string) => {
131
+ const item = group[key];
132
+ if (item.value) {
133
+ groupObj[key] = item.value;
134
+ }
135
+ });
136
+ if (Object.keys(groupObj).length) {
137
+ arr.push(groupObj);
138
+ }
139
+ });
140
+ return arr;
141
+ };
142
+
143
+ export const buildBodyForRequest = (state: any) => {
144
+ const query: any = {
145
+ filters: {
146
+ absolutValues: {
147
+ mmsGroup0: {}
148
+ },
149
+ noAbsolutValues: {},
150
+ rangeValues: {}
151
+ }
152
+ };
153
+
154
+ Object.keys(state).sort().forEach((key: string) => {
155
+ const value = state[key];
156
+
157
+ if (!value) return;
158
+
159
+ if (key === MANUFACTURER && value.value) {
160
+ query.filters.absolutValues.mmsGroup0.mainData_make = value.value;
161
+ }
162
+
163
+ if (key === MODEL && value.value) {
164
+ if (value.isSeries) {
165
+ query.filters.absolutValues.mmsGroup0.mainData_series = value.value;
166
+ } else {
167
+ query.filters.absolutValues.mmsGroup0.mainData_model = value.value;
168
+ }
169
+ }
170
+
171
+ if (key === BODY_TYPE && value.length) {
172
+ query.filters.noAbsolutValues[BODY_TYPE] = value;
173
+ }
174
+
175
+ if (key === FIRST_REGISTRATION && value.value) {
176
+ query.filters.rangeValues['mainData_firstRegistrationYear'] = { from: value.value };
177
+ }
178
+
179
+ if (key === MILEAGE && value.value) {
180
+ query.filters.rangeValues['mainData_mileage'] = { to: value.value };
181
+ }
182
+
183
+ if (key === PRICE) {
184
+ const valueIsEqual = checkRangeValuesOnEqual(PRICE_DEFAULT, value);
185
+
186
+ if (!valueIsEqual) {
187
+ // check value in from / to. If we have - add it
188
+ Object.keys(value).map((key: string) => {
189
+ if (value[key]) {
190
+ if (!query.filters.rangeValues['price_currentSalesPrice']) {
191
+ query.filters.rangeValues['price_currentSalesPrice'] = {};
192
+ }
193
+
194
+ query.filters.rangeValues['price_currentSalesPrice'][key] = value[key];
195
+ }
196
+ });
197
+ }
198
+ }
199
+
200
+ if (key === RATE) {
201
+ const isRateDefault = checkRangeValuesOnEqual(RATE_DEFAULT, value);
202
+
203
+ if (!isRateDefault) {
204
+ query.filters.rangeValues['price_currentSalesPrice'] = { from: 1000, to: 2000 };
205
+ }
206
+ }
207
+ });
208
+
209
+ return query;
210
+ };
211
+
212
+ export const buildQueryForSearch = (filters: any) => {
213
+ const query: { [key: string]: any } = {};
214
+ const MMS_GROUP: any = {};
215
+
216
+ Object.keys(filters).forEach((filter: string) => {
217
+ const filterValue = filters[filter];
218
+
219
+ if (filterValue && filterValue.value) {
220
+ if (MMS_GROUP_FIELDS.indexOf(filter) !== -1) {
221
+ MMS_GROUP[filter] = filterValue.value;
222
+
223
+ if (filterValue.isSeries) {
224
+ MMS_GROUP.SERIES = filterValue.value;
225
+ }
226
+ }
227
+ }
228
+
229
+ if (filterValue === PRICE) {
230
+ const defaultValue = DROP_DOWN_GROUP[filter].defaultValue;
231
+ const valueIsDefault = filter === PRICE ? checkRangeValuesOnEqual(defaultValue, filterValue) : filterValue === defaultValue;
232
+
233
+ if (!valueIsDefault) {// check value in from / to. If we have - add it
234
+ Object.keys(filterValue).map((key: string) => {
235
+ if (filterValue[key]) {
236
+ if (!query.filters.rangeValues['price_currentSalesPrice']) {
237
+ query.filters.rangeValues['price_currentSalesPrice'] = {};
238
+ }
239
+
240
+ query.filters.rangeValues['price_currentSalesPrice'][key] = filterValue[key];
241
+ }
242
+ });
243
+ }
244
+ }
245
+
246
+ if (filter === PRICE) {
247
+ const valueIsDefault = checkRangeValuesOnEqual(PRICE_DEFAULT, filterValue);
248
+
249
+ if (!valueIsDefault) {
250
+ query[PRICE] = { from: '', to: '' };
251
+ query[PRICE].from = _get(filterValue, 'from', '');
252
+ query[PRICE].to = _get(filterValue, 'to', '');
253
+ }
254
+ }
255
+
256
+ if (filter === RATE) {
257
+ const isRateDefault = checkRangeValuesOnEqual(RATE_DEFAULT, filterValue);
258
+
259
+ if (!isRateDefault) {
260
+ query[RATE] = filterValue;
261
+ }
262
+ }
263
+
264
+ if (filter === MILEAGE) {
265
+ const defaultValue = DROP_DOWN_GROUP[filter].defaultValue;
266
+ if (filterValue !== defaultValue) {
267
+ query[MILEAGE] = { from: '', to: '' };
268
+ query[MILEAGE].from = _get(filterValue, 'from', '');
269
+ query[MILEAGE].to = _get(filterValue, 'to', '') || _get(filterValue, 'value', '');
270
+ }
271
+ }
272
+
273
+ if (filter === FIRST_REGISTRATION) {
274
+ const defaultValue = DROP_DOWN_GROUP[filter].defaultValue;
275
+ if (filterValue !== defaultValue) {
276
+ query[FIRST_REGISTRATION] = { from: '', to: '' };
277
+ query[FIRST_REGISTRATION].from = _get(filterValue, 'from', '') || _get(filterValue, 'value', '');
278
+ query[FIRST_REGISTRATION].to = _get(filterValue, 'to', '');
279
+ }
280
+ }
281
+
282
+ if (filter === BODY_TYPE) {
283
+ const defaultValue = DROP_DOWN_GROUP[filter].defaultValue;
284
+
285
+ if (filterValue.length && filterValue !== defaultValue) {
286
+ query[BODY_TYPE] = [];
287
+
288
+ filterValue.map((bodyTypeSelector: string) => {
289
+ query[BODY_TYPE].push(bodyTypeSelector);
290
+ });
291
+ }
292
+ }
293
+ });
294
+
295
+ if (Object.keys(MMS_GROUP).length) {
296
+ query[MMS_GROUPS_KEY] = [];
297
+ query[MMS_GROUPS_KEY].push(MMS_GROUP);
298
+ }
299
+
300
+ return qs.stringify(query, { encode: false });
301
+ };
302
+
303
+ export const sliceLessThan = (array: number[], to: any): number[] => {
304
+ const value = Number(to);
305
+ return value && Number.isFinite(value)
306
+ ? array.filter((val: number) => val <= value)
307
+ : array;
308
+ };
309
+
310
+ export const sliceMoreThan = (array: number[], from: any): number[] => {
311
+ const value = Number(from);
312
+ return value && Number.isFinite(value)
313
+ ? array.filter((val: number) => val >= value)
314
+ : array;
315
+ };
316
+
317
+ export const getFormattedPrice = (price: number, format = '$,.0f', currency = '', currencyPrefix = ''): string => {
318
+ if (!Number.isFinite(price)) return '-';
319
+ const groupingNum = 3;
320
+ return d3formatLocale({
321
+ decimal: ',',
322
+ thousands: '.',
323
+ currency: [currencyPrefix, currency],
324
+ grouping: [groupingNum]
325
+ }).format(format)(price);
326
+ };
327
+
328
+
329
+ export const getPriceRatingConfig = (currentPrice: number, pricePredicted: number) => { // tslint:disable-line
330
+ const round = (value: number) => {
331
+ return Number.isFinite(pricePredicted)
332
+ ? Math.round((pricePredicted * (1 + (value / 100))) / 100) * 100 // tslint:disable-line
333
+ : '???';
334
+ };
335
+
336
+ if (currentPrice === 0) {
337
+ console.log('Empty current price');
338
+ }
339
+
340
+ return Object.keys(priceRatingConfig).reduce((acc: any, key: any) => {
341
+ const { min, max } = priceRatingConfig[key];
342
+ return { ...acc, [key]: { min: round(min), max: round(max) } };
343
+ }, {}); // tslint:disable-line
344
+ };
345
+
346
+ export const getPriceRating = (currentSalesPrice: number, predictablePrice: number) => {
347
+ const isCorrectCurrentSalesPrice = Number.isFinite(Number.parseFloat(`${currentSalesPrice}`));
348
+ const isCorrectPredictablePrice = Number.isFinite(Number.parseFloat(`${predictablePrice}`));
349
+
350
+ if (!isCorrectCurrentSalesPrice || !isCorrectPredictablePrice) return 0;
351
+
352
+ const ratingConfig = getPriceRatingConfig(currentSalesPrice, predictablePrice);
353
+
354
+ for (const key of Object.keys(ratingConfig)) {
355
+ const { min, max } = ratingConfig[key];
356
+ const TOP_PRICE = 5;
357
+ if (key === 'highPrice' && currentSalesPrice === max) return 1;
358
+ if (key === 'topPrice' && currentSalesPrice <= min) return TOP_PRICE;
359
+ if (currentSalesPrice >= min && currentSalesPrice < max) return priceRatings.indexOf(key);
360
+ }
361
+
362
+ return 0;
363
+ };
364
+
365
+ export const fixNumber = (num: number | string) => {
366
+ const isNum = typeof num === 'number' ? num : parseFloat(num);
367
+ return Math.round(isNum * HUNDRED) / HUNDRED;
368
+ };
369
+
370
+ export const getOfferSliders = (financingConfig: any, t: (key: string, options?: object) => string, priceTabIndex: null | number, componentType: string) => {
371
+ const offerObj = offers[+priceTabIndex];
372
+ const offerConfig = financingConfig[offerObj.name];
373
+ const currentSalesPrice =
374
+ financingConfig.common ?
375
+ financingConfig.common.currentSalesPrice :
376
+ financingConfig.currentSalesPrice; // TODO: fix deprecated. Correct is "financingConfig.common.currentSalesPrice"
377
+ return offerObj.sliders
378
+ .map((slider: any, index) => {
379
+ if (componentType === 'checkout' && index === 1 && priceTabIndex === 0) return; // remove checkout annual mileage for financing
380
+ if (slider.name === 'firstInstallment') slider.max = offerConfig.firstInstallmentMax || currentSalesPrice;
381
+ slider.value = offerConfig[slider.name];
382
+ slider.unitName = t(`modals:financing.${slider.unit}`);
383
+ slider.caption = t(`modals:financing.${slider.name}`);
384
+ return slider;
385
+ }).filter(Boolean);
386
+ };
387
+
388
+ export const checkWebpFeature = async () => {
389
+ // If the browser doesn't has the method createImageBitmap, you can't display webp format
390
+ if (!self.createImageBitmap) return false;
391
+
392
+ // Base64 representation of a white point image
393
+ const webpData = 'data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoCAAEAAQAcJaQAA3AA/v3AgAA=';
394
+
395
+ // Retrieve the Image in Blob Format
396
+ const blob = await fetch(webpData).then(r => r.blob());
397
+
398
+ // If the createImageBitmap method succeeds, return true, otherwise false
399
+ return createImageBitmap(blob).then(() => true, () => false);
400
+ };
401
+
402
+ export const getSupportedImageFormat = (IMAGE_URL: string, vehicleID: string, imageIdentifier: string, size: 'small' | 'medium' | 'large', webpFeature: boolean) => {
403
+ if (!imageIdentifier) return null;
404
+
405
+ const vehicleImageURL = `${IMAGE_URL}/${vehicleID}/${imageIdentifier}`;
406
+
407
+ return webpFeature ? `${vehicleImageURL}/${size}-cached.webp` : `${vehicleImageURL}/${size}-cached.jpeg`;
408
+ };
409
+
410
+ export function getChipFilterValue(
411
+ chip: any,
412
+ t: (key: string, options?: object) => string = (phrase: string, _?: object) => _get(SearchPageTranslate(chip), phrase.replace(':', '.'), phrase),
413
+ language: string = 'de'
414
+ ) {
415
+ let filterValue: string;
416
+ let title: string;
417
+ let from: string;
418
+ let to: string;
419
+ const chipFilterKey = chip.filterKey || chip.key; // we may have different key naming for landing or main
420
+ const chipFilterValue = chip.filterValue || chip.value; // we may have different key naming for landing or main
421
+ switch (chipFilterKey) {
422
+ case 'MANUFACTURER':
423
+ case 'MODEL':
424
+ case 'SUB_MODEL':
425
+ case 'SERIES':
426
+ filterValue = chipFilterValue;
427
+ break;
428
+
429
+ case 'MANUFACTURER_EXCLUDE':
430
+ case 'MODEL_EXCLUDE':
431
+ title = t(`SearchPage:filters.${chipFilterKey.toLocaleLowerCase()}`);
432
+ filterValue = `${title} ${chipFilterValue}`;
433
+ break;
434
+
435
+ case 'FIRST_REGISTRATION':
436
+ title = t(`SearchPage:filters.${chipFilterKey.toLocaleLowerCase()}`);
437
+ from = chipFilterValue.from ? `${t('SearchPage:filters.from')} ${chipFilterValue.from} ` : '';
438
+ to = chipFilterValue.to ? `${t('SearchPage:filters.to')} ${chipFilterValue.to}` : '';
439
+ filterValue = `${title} ${from} ${to}`;
440
+ break;
441
+
442
+ case 'PRICE':
443
+ case 'PRICE_DIFFERENCE':
444
+ case 'MILEAGE':
445
+ case 'EMISSION_CO2':
446
+ case 'POWER':
447
+ case 'IMAGES_COUNT':
448
+ title = t(`SearchPage:filters.${chipFilterKey.toLocaleLowerCase()}`);
449
+ from = chipFilterValue.from ? `${t('SearchPage:filters.from')} ${getFormattedPrice(+chipFilterValue.from)} ` : '';
450
+ to = chipFilterValue.to ? `${t('SearchPage:filters.to')} ${getFormattedPrice(+chipFilterValue.to)}` : '';
451
+ const type = chipFilterValue.type ? ` ${chipFilterValue.type}` : '';
452
+ filterValue = `${title} ${from} ${to}${type}`;
453
+ break;
454
+
455
+ case 'DOORS':
456
+ case 'OWNERS':
457
+ filterValue = t(`SearchPage:filters.${chipFilterValue}`);
458
+ break;
459
+
460
+ case 'SEATS':
461
+ case 'CUBIC_CAPACITY':
462
+ title = t(`SearchPage:filters.${chipFilterKey.toLocaleLowerCase()}`);
463
+ const fromTo = `${chipFilterValue.from} - ${chipFilterValue.to}`;
464
+ filterValue = `${title} ${fromTo}`;
465
+ break;
466
+
467
+ case 'CONSUMPTION':
468
+ const fromValue = Number(chipFilterValue.from).toLocaleString(language);
469
+ const toValue = Number(chipFilterValue.to).toLocaleString(language);
470
+ const newFromValue: any = (fromValue === 'NaN') ? '1' : fromValue;
471
+ const newToValue: any = (toValue === 'NaN') ? '18' : toValue;
472
+ const fromToWithInfo = `${newFromValue} - ${newToValue}`;
473
+ filterValue = t(`SearchPage:filtersChips.${chipFilterKey.toLocaleLowerCase()}`, { value: fromToWithInfo });
474
+ break;
475
+
476
+ case 'ONLINE_SINCE':
477
+ filterValue = t(`SearchPage:filters.${chipFilterValue}`);
478
+ break;
479
+
480
+ case 'GENERAL_INSPECTION':
481
+ filterValue = t(`SearchPage:filtersChips.generalInspection`, { month: t(`SearchPage:filters.${chipFilterValue}`) });
482
+ break;
483
+
484
+ case 'RATE':
485
+ const { monthlyInstallmentFrom, monthlyInstallmentTo, firstInstallment, paybackPeriod } = chipFilterValue;
486
+ const rowValues: any = { monthlyInstallmentFrom, monthlyInstallmentTo, firstInstallment, paybackPeriod };
487
+ const values: string[][] = [
488
+ ['monthlyInstallmentFrom', 'monthlyInstallmentTo'],
489
+ ['firstInstallment', 'paybackPeriod']
490
+ ].map((fields: string[]) => fields
491
+ .map((field: string) => {
492
+ const rowValue = rowValues[field];
493
+ const value = Number.isFinite(+rowValue) ? getFormattedPrice(+rowValue) : rowValue;
494
+ return +rowValue ? t(`SearchPage:filtersChips.${field}Chip`, { value }) : null;
495
+ })
496
+ .filter((item: any) => !!item)
497
+ );
498
+ const rateValue = `${t('SearchPage:filtersChips.rateChip')} ${values[0].length ? values[0].join(' ') : t('SearchPage:filtersChips.any')}`;
499
+ filterValue = `${rateValue}, ${values[1].join(', ')}`;
500
+ break;
501
+
502
+ default:
503
+ filterValue = t(`cbd:${chipFilterValue}`);
504
+ }
505
+ return filterValue;
506
+ }
507
+
508
+ function getUtmQueryParameter() {
509
+ const query = window.location.search;
510
+
511
+ if (!query) { return; }
512
+
513
+ const queryString = /^[?]/.test(query) ? query.slice(1) : query;
514
+
515
+ const result = queryString.split('&').reduce(
516
+ (params: any, param: string) => {
517
+ const [key, value] = param.split('=');
518
+
519
+ if (!/^source|^campaign|^medium|^content|^term|^reference|^gclid|^adgroupid|^keyword/.test(key)) { return params; }
520
+
521
+ params[key] = value ? decodeURIComponent(value.replace(/\+/g, ' ')) : '';
522
+
523
+ return params;
524
+ },
525
+ {}
526
+ ); // eslint-disable-line indent,@typescript-eslint/indent
527
+
528
+ return result;
529
+ }
530
+
531
+ export function setUtmParameters() {
532
+ const marketing = getUtmQueryParameter();
533
+
534
+ if (!marketing) return;
535
+
536
+ if (!Object.keys(marketing).length) { return; }
537
+
538
+ const expiresDate = new Date();
539
+ expiresDate.setDate(expiresDate.getDate() + 1);
540
+
541
+ const parsedUrl = new URL(window.location.href);
542
+ const domain = parsedUrl.hostname.split('.').slice(-2).join('.');
543
+
544
+ document.cookie = `marketing=${JSON.stringify(marketing)};expires=${expiresDate};domain=.${domain};path=/`;
545
+ }
546
+
547
+ export const updateCookieList = () => {
548
+ let cookieConsentList = Object.keys(GOOGLE_BUNDLE_COOKIES);
549
+ let isHomeGoogleGranted = true; // home page google cookie
550
+ let isMicrosoftGranted = true; // Microsoft _uetvid _uetsid
551
+ let isMicrosoftClarity = true; // Microsoft Clarity _clck _clsk
552
+ let isHotjarGranted = true;
553
+ const cookieConfig = JSON.parse(localStorage.getItem('cookieConfig')) || {};
554
+
555
+ const parsedUrl = new URL(window.location.href);
556
+ const domain = parsedUrl.hostname.split('.').slice(-2).join('.');
557
+ Object.keys(cookieConfig).forEach((group: string) => {
558
+ cookieConfig[group].forEach((cookie: string) => {
559
+ Cookies.remove(cookie, { domain, path: '/' }); // manually remove selected cookies
560
+ // google
561
+ if (cookieConsentList.includes(cookie)) {
562
+ cookieConsentList = cookieConsentList.filter(i => i !== cookie); // deny google cookie consent for _gcl_au, _ga, _gid, _gat_UA-31842-13, etc
563
+
564
+ isHomeGoogleGranted = false;
565
+ }
566
+ else if (cookie === 'hotjar') isHotjarGranted = false;
567
+ else if (cookie === '_uetvid' || cookie === '_uetsid') isMicrosoftGranted = false;
568
+ else if (cookie === '_clck' || cookie === '_clsk') isMicrosoftClarity = false;
569
+ });
570
+ });
571
+ // grant google cookies
572
+ if (typeof window.grantCookieConsent === 'function')
573
+ window.grantCookieConsent(cookieConsentList);
574
+
575
+ // grant Microsoft cookies
576
+ if (isMicrosoftGranted && typeof window.grantCookieConsentMicrosoft === 'function') {
577
+ window.grantCookieConsentMicrosoft();
578
+ }
579
+
580
+ // grant Microsoft Clarity cookies
581
+ if (isMicrosoftClarity && typeof window.grantCookieConsentClarity === 'function') {
582
+ window.grantCookieConsentClarity();
583
+ }
584
+
585
+ if (isHomeGoogleGranted && typeof window.allowGoogle === 'function') {
586
+ window.allowGoogle();
587
+ }
588
+
589
+ // grant Hotjar cookies
590
+ if (isHotjarGranted && typeof window.grantHotjarCookieConsent === 'function') {
591
+ window.grantHotjarCookieConsent();
592
+ }
593
+ };
594
+
595
+ // function returns decimal part of number with 2 digits
596
+ export const getCents = (value: number, prefix?: string, postfix?: string): string => {
597
+ if (!Number.isFinite(value)) return '';
598
+ const roundedValue = Math.floor(value);
599
+ const result = value.toFixed(2).toString().replace(`${roundedValue}.`, '');
600
+ return `${prefix}${result}${postfix}`;
601
+ };
602
+
603
+ export const priceParse = (value: any) => {
604
+ return !!value ? Number.parseFloat(value) : null;
596
605
  };