@bytebrand/fe-ui-core 4.8.52 → 4.8.54

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 (194) hide show
  1. package/media/locales/de/promoSlider.json +0 -1
  2. package/media/locales/en/promoSlider.json +0 -1
  3. package/package.json +120 -117
  4. package/source/components/AccordionWidget/AccordionWidget.styl +0 -1
  5. package/source/components/AccordionWidget/AccordionWidget.tsx +4 -8
  6. package/source/components/OfferPanel/OfferCheckboxGroup/CheckboxContainer.tsx +2 -2
  7. package/source/components/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.styl +0 -24
  8. package/source/components/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.tsx +1 -1
  9. package/source/components/OfferPanel/OfferPanel.tsx +1 -1
  10. package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.tsx +11 -23
  11. package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.tsx +0 -2
  12. package/source/components/VehicleDetailedSlider/partials/PriceData.tsx +4 -7
  13. package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.styl +0 -5
  14. package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx +1 -3
  15. package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.styl +1 -1
  16. package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.tsx +11 -24
  17. package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.styl +2 -3
  18. package/source/components/VehicleSmallCard/VehicleData/VehicleProperty/VehicleProperty.styl +1 -4
  19. package/source/components/VehicleSmallCard/VehicleData/VehicleProperty/VehicleProperty.tsx +2 -3
  20. package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.tsx +1 -1
  21. package/source/components/VehicleSmallCard/VehicleSmallCard.tsx +3 -14
  22. package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.styled.tsx +1 -4
  23. package/source/components/_common/MaterialTooltip/MaterialTooltip.tsx +3 -4
  24. package/source/components/_common/withStats/withStats.styl +0 -10
  25. package/source/components/_common/withStats/withStats.tsx +12 -3
  26. package/source/framework/DataTransformers.ts +0 -1
  27. package/source/framework/constants/common.ts +4 -8
  28. package/source/framework/types/types.ts +0 -1
  29. package/source/framework/vehiclesProps/decoratedLightProps.tsx +12 -48
  30. package/source/framework/vehiclesProps/decoratedProps.tsx +8 -35
  31. package/source/locales/data.ts +0 -3
  32. package/.husky/pre-push +0 -4
  33. package/.storybook/addons.js +0 -4
  34. package/.storybook/config.js +0 -64
  35. package/.storybook/postcss.config.js +0 -6
  36. package/.storybook/preview-head.html +0 -10
  37. package/.storybook/webpack.config.js +0 -130
  38. package/__tests__/components/Checkout/OrderOverviewItem/OrderOverviewItem.test.tsx +0 -42
  39. package/__tests__/components/Checkout/PaymentTypeCard/PaymentTypeCard.test.tsx +0 -50
  40. package/__tests__/components/Checkout/RadioGroup.test.tsx +0 -95
  41. package/__tests__/components/Checkout/ServiceCardWrapper.test.tsx +0 -53
  42. package/__tests__/components/Checkout/Switcher.test.tsx +0 -43
  43. package/__tests__/components/UserDasboardPage/sections/CheckoutSection/CheckoutSection.test.tsx +0 -613
  44. package/__tests__/components/UserDasboardPage/sections/FavoriteSection/FavoriteSection.test.tsx +0 -335
  45. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/AdditionalOrderInfo.test.tsx +0 -127
  46. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusCar.test.tsx +0 -58
  47. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusCard.test.tsx +0 -74
  48. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusSection.test.tsx +0 -62
  49. package/__tests__/components/UserDasboardPage/sections/RequestedCarsSection/RequestedCarsSection.test.tsx +0 -117
  50. package/__tests__/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.test.tsx +0 -58
  51. package/__tests__/components/VehicleSmallCard/VehicleInfo.test.tsx +0 -88
  52. package/__tests__/components/VehicleSmallCard/VehicleTitle.test.tsx +0 -91
  53. package/__tests__/components/_common/Badge/Badge.test.tsx +0 -15
  54. package/__tests__/components/_common/IconSVG/IconSVG.test.tsx +0 -23
  55. package/__tests__/components/_common/Image/Image.test.tsx +0 -82
  56. package/__tests__/components/_common/MaterialAutocomplete/MaterialAutocomplete.test.tsx +0 -49
  57. package/__tests__/components/_common/MaterialDatePicker/MaterialDatePicker.test.tsx +0 -54
  58. package/__tests__/components/_common/MaterialField/MaterialField.test.tsx +0 -58
  59. package/__tests__/components/_common/StarButton/StarButton.test.tsx +0 -46
  60. package/__tests__/mockedData/financingConfig.js +0 -202
  61. package/__tests__/mockedData/mockedPendingRequestedCar.js +0 -69
  62. package/__tests__/utils/CommonUtils/addPrefixToKeys.test.ts +0 -18
  63. package/__tests__/utils/CommonUtils/arrToObj.test.js +0 -32
  64. package/__tests__/utils/CommonUtils/checkRangeValuesOnEqual.test.ts +0 -17
  65. package/__tests__/utils/CommonUtils/fixNumber.test.ts +0 -20
  66. package/__tests__/utils/CommonUtils/formatMileage.test.ts +0 -8
  67. package/__tests__/utils/CommonUtils/getChipFilterValue.test.ts +0 -22
  68. package/__tests__/utils/CommonUtils/getFormattedNumber.test.ts +0 -19
  69. package/__tests__/utils/CommonUtils/getFormattedPrice.test.ts +0 -19
  70. package/__tests__/utils/CommonUtils/getGroupValuesForQuery.test.ts +0 -51
  71. package/__tests__/utils/CommonUtils/getOfferSliders.test.ts +0 -64
  72. package/__tests__/utils/CommonUtils/getPriceRating.test.ts +0 -26
  73. package/__tests__/utils/CommonUtils/getPriceRatingConfig.test.ts +0 -33
  74. package/__tests__/utils/CommonUtils/preloadNearbyImages.test.ts +0 -9
  75. package/__tests__/utils/CommonUtils/sliceLessThan.test.ts +0 -23
  76. package/__tests__/utils/CommonUtils/sliceMoreThan.test.ts +0 -23
  77. package/source/components/AdvantageItem/AdvantageItem.story.js +0 -23
  78. package/source/components/Alternative/Dealer.story.js +0 -32
  79. package/source/components/Alternative/Dealer.story.styl +0 -3
  80. package/source/components/Breadcrumbs/Breadcrumbs.story.js +0 -40
  81. package/source/components/Breadcrumbs/FirstInfoBlock/FirstInfoBlock.story.js +0 -45
  82. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.story.js +0 -243
  83. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.story.styl +0 -21
  84. package/source/components/Checkout/RadioCards/RadioGroupCheckout.story.js +0 -105
  85. package/source/components/Checkout/RadioCards/RadioGroupCheckout.story.styl +0 -37
  86. package/source/components/Checkout/Switcher/Switcher.story.js +0 -41
  87. package/source/components/Checkout/Switcher/Switcher.story.styl +0 -2
  88. package/source/components/CompactSearchWidget/CompactSearchWidget.story.js +0 -187
  89. package/source/components/ContactForm/ContactForm.story.js +0 -94
  90. package/source/components/ContactForm/ContactForm.story.styl +0 -0
  91. package/source/components/ContactInfo/ContactInfo.story.js +0 -58
  92. package/source/components/CustomerQuote/CustomerQuote.story.js +0 -41
  93. package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.story.js +0 -73
  94. package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.story.styl +0 -5
  95. package/source/components/FormattedNumber/FormattedNumber.story.js +0 -114
  96. package/source/components/InfoBlocks/InfoBlockWrapper.story.js +0 -101
  97. package/source/components/InfoBlocks/InfoBlockWrapper.story.styl +0 -46
  98. package/source/components/OfferPanel/AboAccordion/AboFaq/AboFaq.story.js +0 -97
  99. package/source/components/OfferPanel/OfferPanel.story.js +0 -139
  100. package/source/components/OfferPanel/RangeGroup/RangeGroup.story.js +0 -35
  101. package/source/components/OfferPanel/RangeGroup/RangeGroup.story.styl +0 -3
  102. package/source/components/PriceRating/PriceRating.story.js +0 -39
  103. package/source/components/PriceRating/PriceRating.story.styl +0 -2
  104. package/source/components/PriceRatingDetailed/PriceRatingDetailed.story.js +0 -78
  105. package/source/components/PriceRatingDetailed/PriceRatingDetailed.story.styl +0 -11
  106. package/source/components/RateSearchValue/RateSearchValue.story.js +0 -78
  107. package/source/components/RateSearchValue/RateSearchValue.story.styl +0 -2
  108. package/source/components/RateSearchWidget/RateSearchWidget.story.js +0 -57
  109. package/source/components/RateSearchWidget/RateSearchWidget.story.styl +0 -12
  110. package/source/components/SearchFilters/FiltersFactory.story.js +0 -273
  111. package/source/components/SearchPage/Filters/MakeModel/MakeModel.story.js +0 -12
  112. package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.story.js +0 -834
  113. package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.story.styl +0 -40
  114. package/source/components/SearchWidget/SearchWidget.story.js +0 -191
  115. package/source/components/SearchWidget/SearchWidget.story.styl +0 -6
  116. package/source/components/Stepper/Stepper.story.js +0 -119
  117. package/source/components/Stepper/Stepper.story.styl +0 -41
  118. package/source/components/Theme.story.js +0 -36
  119. package/source/components/Theme.story.styl +0 -85
  120. package/source/components/TickerText/TickerText.story.js +0 -17
  121. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.story.js +0 -95
  122. package/source/components/UserDashboardPage/sections/RequestedCarsSection/RequestedCarsSection.story.js +0 -97
  123. package/source/components/Vehicle/VehicleConsumption/VehicleConsumption.story.js +0 -31
  124. package/source/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.story.js +0 -247
  125. package/source/components/VehicleCompared/CompareGeneral/CompareGeneral.story.js +0 -30
  126. package/source/components/VehicleCompared/ComparePrice/ComparePrice.story.js +0 -18
  127. package/source/components/VehicleCompared/CompareTitle/CompareTitle.story.js +0 -19
  128. package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.story.js +0 -44
  129. package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.story.js +0 -120
  130. package/source/components/VehiclePromoSlider/VehiclePromoInfo/VehiclePromoInfo.story.js +0 -42
  131. package/source/components/VehiclePromoSlider/VehiclePromoSlide/VehiclePromoSlide.story.js +0 -62
  132. package/source/components/VehiclePromoSlider/VehiclePromoSlider.story.js +0 -42
  133. package/source/components/VehicleSmallCard/VehicleSmallCard.story.js +0 -412
  134. package/source/components/VehicleSmallCard/VehicleSmallCard.story.styl +0 -56
  135. package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.story.js +0 -199
  136. package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.story.styl +0 -40
  137. package/source/components/_common/Accordion/Accordion.story.js +0 -36
  138. package/source/components/_common/Badge/Badge.story.js +0 -27
  139. package/source/components/_common/Badge/Badge.story.styl +0 -5
  140. package/source/components/_common/Bubble/Bubble.story.js +0 -52
  141. package/source/components/_common/Button/Button.story.js +0 -52
  142. package/source/components/_common/Button/Button.story.styl +0 -5
  143. package/source/components/_common/ButtonOld/Button.story.js +0 -54
  144. package/source/components/_common/ButtonOld/Button.story.styl +0 -5
  145. package/source/components/_common/Checkbox/Checkbox.story.js +0 -85
  146. package/source/components/_common/Checkbox/Checkbox.story.styl +0 -14
  147. package/source/components/_common/CheckboxMaterial/CheckboxMaterial.story.js +0 -126
  148. package/source/components/_common/CheckboxMaterial/CheckboxMaterial.story.styl +0 -14
  149. package/source/components/_common/Chip/Chip.story.js +0 -43
  150. package/source/components/_common/ChipList/ChipList.story.js +0 -36
  151. package/source/components/_common/DropDown/DropDown.story.js +0 -35
  152. package/source/components/_common/ExpandablePanel/ExpandablePanel.story.js +0 -41
  153. package/source/components/_common/Histogram/Histogram.story.js +0 -51
  154. package/source/components/_common/IconSVG/IconSVG.story.js +0 -21
  155. package/source/components/_common/IconSVG/IconSVG.story.styl +0 -25
  156. package/source/components/_common/Image/Image.story.js +0 -142
  157. package/source/components/_common/Image/Image.story.styl +0 -18
  158. package/source/components/_common/ImagesSet/ImagesSet.story.js +0 -34
  159. package/source/components/_common/ImagesSet/ImagesSet.story.styl +0 -4
  160. package/source/components/_common/Loader/Loader.story.js +0 -21
  161. package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.story.js +0 -49
  162. package/source/components/_common/MaterialDatePicker/MaterialDatePicker.story.js +0 -45
  163. package/source/components/_common/MaterialDatePicker/MaterialDatePicker.story.styl +0 -6
  164. package/source/components/_common/MaterialField/MaterialField.story.js +0 -87
  165. package/source/components/_common/MaterialField/MaterialField.story.styl +0 -34
  166. package/source/components/_common/MaterialSelect/MaterialSelect.story.js +0 -52
  167. package/source/components/_common/MaterialSelect/MaterialSelect.story.styl +0 -6
  168. package/source/components/_common/MaterialStepButton/MaterialStepButton.story.js +0 -47
  169. package/source/components/_common/MaterialStepButton/MaterialStepButton.story.styl +0 -6
  170. package/source/components/_common/MaterialSwitch/MaterialSwitch.story.js +0 -17
  171. package/source/components/_common/MaterialTooltip/MaterialTooltip.story.js +0 -10
  172. package/source/components/_common/Modal/Modal.story.js +0 -37
  173. package/source/components/_common/MuiGroupedSelect/MuiGroupedSelect.story.js +0 -21
  174. package/source/components/_common/PropertySelector/PSGroup.story.js +0 -93
  175. package/source/components/_common/PropertySelector/PSGroup.story.styl +0 -25
  176. package/source/components/_common/PropertySelector/ProperySelector.story.js +0 -83
  177. package/source/components/_common/Radio/FormRadioGroup.story.js +0 -28
  178. package/source/components/_common/Radio/FormRadioGroup.story.styl +0 -2
  179. package/source/components/_common/Radio/Radio.story.js +0 -54
  180. package/source/components/_common/Radio/RadioGroup.story.js +0 -90
  181. package/source/components/_common/Radio/RadioGroup.story.styl +0 -39
  182. package/source/components/_common/Range/Range.story.js +0 -46
  183. package/source/components/_common/Range/Range.story.styl +0 -5
  184. package/source/components/_common/SliderArrow/SliderArrow.story.js +0 -18
  185. package/source/components/_common/Tabs/Tabs.story.js +0 -56
  186. package/source/components/_common/TimePicker/TimePicker.story.js +0 -37
  187. package/source/components/_common/Tooltip/Tooltip.story.js +0 -28
  188. package/source/components/_common/UserMenu/MaterialMenu.story.js +0 -73
  189. package/source/components/_common/VehicleSlider/VehicleSlider.story.js +0 -99
  190. package/source/components/_common/VehicleSlider/VehicleSlider.story.styl +0 -0
  191. package/source/components/_common/withLabel/withLabel.story.js +0 -62
  192. package/source/components/_common/withPopover/withPopover.story.js +0 -48
  193. package/source/components/_common/withPopover/withPopover.story.styl +0 -54
  194. package/source/components/_common/withStats/withStats.story.js +0 -75
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "consumptionCombined": "{{consumptionCombined}}l/100km (komb)*",
3
3
  "co2": "{{co2}}g CO2/km (komb)*",
4
- "co2Class": "CO2-Klasse {{class}} (komb)",
5
4
  "weDeliverMagdeburg": "Wir liefern Ihr Auto zu Ihnen nach Magdeburg!",
6
5
  "weDeliverToYou": "Wir liefern Ihr Auto zu Ihnen!",
7
6
  "withoutDeposit": "ohne Anzahlung",
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "consumptionCombined": "{{consumptionCombined}}/100km (comb)*",
3
3
  "co2": "{{co2}}g CO2/km (comb)*",
4
- "co2Class": "CO2-class {{class}} (comb)",
5
4
  "weDeliverMagdeburg": "We will deliver your car to Magdeburg!",
6
5
  "weDeliverToYou": "We deliver your car to you!",
7
6
  "withoutDeposit": "Without Deposit",
package/package.json CHANGED
@@ -1,117 +1,120 @@
1
- {
2
- "name": "@bytebrand/fe-ui-core",
3
- "version": "4.8.52",
4
- "description": "UI components for the auto.de project",
5
- "main": "index.ts",
6
- "module": "dist/common.js",
7
- "dependencies": {
8
- "@babel/core": "^7.17.8",
9
- "@babel/plugin-proposal-class-properties": "^7.16.7",
10
- "@babel/plugin-proposal-decorators": "^7.17.8",
11
- "@babel/plugin-transform-react-constant-elements": "^7.17.6",
12
- "@babel/preset-env": "^7.20.2",
13
- "@babel/preset-react": "^7.18.6",
14
- "@babel/preset-typescript": "^7.21.0",
15
- "@bytebrand/car-schema-selectors": "^2.0.7",
16
- "@bytebrand/fe-histoslider": "3.0.0",
17
- "@bytebrand/i18n-dictionaries": "^0.7.5",
18
- "@emotion/react": "^11.9.3",
19
- "@emotion/styled": "^11.9.3",
20
- "@mui/material": "^5.9.0",
21
- "@mui/styles": "^5.9.0",
22
- "@mui/x-date-pickers": "^5.0.0-beta.1",
23
- "classnames": "2.2.6",
24
- "d3-format": "1.4.5",
25
- "d3-scale": "^2.2.2",
26
- "date-fns": "2.29.1",
27
- "i18next": "^15.0.4",
28
- "jest": "^26.0.0",
29
- "js-cookie": "^2.2.0",
30
- "moment": "^2.29.1",
31
- "rc-slider": "^8.6.13",
32
- "react": "^17.0.2",
33
- "react-device-detect": "^2.1.2",
34
- "react-dom": "^17.0.2",
35
- "react-grid-system": "^5.0.2",
36
- "react-i18next": "9.0.4",
37
- "react-lazyload": "3.2.0",
38
- "react-scroll": "^1.7.13",
39
- "react-select": "^3.0.4",
40
- "react-slick": "^0.29.0",
41
- "slick-carousel": "1.8.1",
42
- "uuid": "^8.3.2"
43
- },
44
- "devDependencies": {
45
- "@storybook/addon-actions": "^5.1.11",
46
- "@storybook/addon-backgrounds": "^5.1.11",
47
- "@storybook/addon-centered": "^5.1.11",
48
- "@storybook/addon-info": "^5.1.11",
49
- "@storybook/addon-links": "^5.1.11",
50
- "@storybook/addons": "^5.1.11",
51
- "@storybook/react": "^5.3.21",
52
- "@testing-library/dom": "^9.0.1",
53
- "@testing-library/jest-dom": "^5.16.5",
54
- "@testing-library/react": "^11.2.6",
55
- "@types/classnames": "2.2.6",
56
- "@types/d3-format": "^1.3.1",
57
- "@types/i18next": "^12.1.0",
58
- "@types/jest": "^29.4.0",
59
- "@types/js-cookie": "^2.1.0",
60
- "@types/lodash": "^4.14.134",
61
- "@types/qs": "^6.9.7",
62
- "@types/rc-slider": "^9.3.1",
63
- "@types/react": "^17.0.2",
64
- "@types/react-dom": "^17.0.2",
65
- "@types/react-lazyload": "^2.5.0",
66
- "@types/react-scroll": "^1.8.7",
67
- "@types/react-select": "^3.0.2",
68
- "@types/react-slick": "^0.23.4 ",
69
- "@types/uuid": "^8.3.1",
70
- "autoprefixer": "^9.6.0",
71
- "babel-loader": "^8.0.6",
72
- "babel-plugin-minify-dead-code-elimination": "^0.5.0",
73
- "babel-plugin-transform-imports": "^2.0.0",
74
- "css-loader": "^3.2.0",
75
- "jest-css-modules": "^2.1.0",
76
- "jest-css-modules-transform": "^4.4.2",
77
- "jest-dom": "^4.0.0",
78
- "jest-environment-jsdom-sixteen": "^2.0.0",
79
- "jest-junit": "^15.0.0",
80
- "jest-stylus": "^0.1.2",
81
- "jest-svg-transformer": "^1.0.0",
82
- "jest-transform-stub": "^2.0.0",
83
- "lodash": "^4.17.15",
84
- "mobx": "4.6.0",
85
- "mobx-react": "5.4.3",
86
- "postcss-loader": "^3.0.0",
87
- "qs": "6.5.1",
88
- "re-resizable": "^6.0.0",
89
- "react-checkbox-tree": "^1.5.1",
90
- "react-circular-progressbar": "^2.0.4",
91
- "storybook-addon-i18next": "^1.1.0",
92
- "style-loader": "^1.0.0",
93
- "stylus": "^0.54.5",
94
- "stylus-loader": "^3.0.2",
95
- "ts-jest": "^26.0.0",
96
- "tslint": "^5.17.0",
97
- "tslint-config-airbnb": "^5.11.1",
98
- "tslint-loader": "^3.5.4",
99
- "typescript": "^3.5.1",
100
- "webpack-cli": "^3.3.6",
101
- "husky": "^9.0.11"
102
- },
103
- "resolutions": {
104
- "@types/react": "^16.8.3"
105
- },
106
- "scripts": {
107
- "storybook": "start-storybook -p 6006",
108
- "clean": "rm -rf ./dist/*.*",
109
- "build:lib": "yarn clean && webpack --config ./webpack.config.js --progress",
110
- "build:story": "build-storybook",
111
- "test": "jest --watch",
112
- "test:ci": "jest --config ./jest.config.js --collectCoverage --coverageDirectory=\"./coverage\" --ci --reporters=default --reporters=jest-junit --watchAll=false",
113
- "test:coverage": "yarn run test -- --coverage --watchAll=false || exit 0"
114
- },
115
- "author": "Maks Okhmatenko",
116
- "license": "UNLICENSED"
117
- }
1
+ {
2
+ "name": "@bytebrand/fe-ui-core",
3
+ "version": "4.8.54",
4
+ "description": "UI components for the auto.de project",
5
+ "main": "index.ts",
6
+ "module": "dist/common.js",
7
+ "dependencies": {
8
+ "@babel/core": "^7.17.8",
9
+ "@babel/plugin-proposal-class-properties": "^7.16.7",
10
+ "@babel/plugin-proposal-decorators": "^7.17.8",
11
+ "@babel/plugin-transform-react-constant-elements": "^7.17.6",
12
+ "@babel/preset-env": "^7.20.2",
13
+ "@babel/preset-react": "^7.18.6",
14
+ "@babel/preset-typescript": "^7.21.0",
15
+ "@bytebrand/car-schema-selectors": "^2.0.7",
16
+ "@bytebrand/fe-histoslider": "3.0.0",
17
+ "@bytebrand/i18n-dictionaries": "^1.5.2",
18
+ "@emotion/react": "^11.9.3",
19
+ "@emotion/styled": "^11.9.3",
20
+ "@mui/material": "^5.9.0",
21
+ "@mui/styles": "^5.9.0",
22
+ "@mui/x-date-pickers": "^5.0.0-beta.1",
23
+ "classnames": "2.2.6",
24
+ "d3-format": "1.4.5",
25
+ "d3-scale": "^2.2.2",
26
+ "date-fns": "2.29.1",
27
+ "i18next": "^15.0.4",
28
+ "jest": "^26.0.0",
29
+ "js-cookie": "^2.2.0",
30
+ "moment": "^2.29.1",
31
+ "rc-slider": "^8.6.13",
32
+ "react": "^17.0.2",
33
+ "react-device-detect": "^2.1.2",
34
+ "react-dom": "^17.0.2",
35
+ "react-grid-system": "^5.0.2",
36
+ "react-i18next": "9.0.4",
37
+ "react-lazyload": "3.2.0",
38
+ "react-scroll": "^1.7.13",
39
+ "react-select": "^3.0.4",
40
+ "react-slick": "^0.29.0",
41
+ "slick-carousel": "1.8.1",
42
+ "uuid": "^8.3.2"
43
+ },
44
+ "devDependencies": {
45
+ "@storybook/addon-actions": "^5.1.11",
46
+ "@storybook/addon-backgrounds": "^5.1.11",
47
+ "@storybook/addon-centered": "^5.1.11",
48
+ "@storybook/addon-info": "^5.1.11",
49
+ "@storybook/addon-links": "^5.1.11",
50
+ "@storybook/addons": "^5.1.11",
51
+ "@storybook/react": "^5.3.21",
52
+ "@testing-library/dom": "^9.0.1",
53
+ "@testing-library/jest-dom": "^5.16.5",
54
+ "@testing-library/react": "^11.2.6",
55
+ "@types/classnames": "2.2.6",
56
+ "@types/d3-format": "^1.3.1",
57
+ "@types/i18next": "^12.1.0",
58
+ "@types/jest": "^29.4.0",
59
+ "@types/js-cookie": "^2.1.0",
60
+ "@types/lodash": "^4.14.134",
61
+ "@types/qs": "^6.9.7",
62
+ "@types/rc-slider": "^9.3.1",
63
+ "@types/react": "^17.0.2",
64
+ "@types/react-dom": "^17.0.2",
65
+ "@types/react-lazyload": "^2.5.0",
66
+ "@types/react-scroll": "^1.8.7",
67
+ "@types/react-select": "^3.0.2",
68
+ "@types/react-slick": "^0.23.4 ",
69
+ "@types/uuid": "^8.3.1",
70
+ "autoprefixer": "^9.6.0",
71
+ "babel-loader": "^8.0.6",
72
+ "babel-plugin-minify-dead-code-elimination": "^0.5.0",
73
+ "babel-plugin-transform-imports": "^2.0.0",
74
+ "css-loader": "^3.2.0",
75
+ "jest-css-modules": "^2.1.0",
76
+ "jest-css-modules-transform": "^4.4.2",
77
+ "jest-dom": "^4.0.0",
78
+ "jest-environment-jsdom-sixteen": "^2.0.0",
79
+ "jest-junit": "^15.0.0",
80
+ "jest-stylus": "^0.1.2",
81
+ "jest-svg-transformer": "^1.0.0",
82
+ "jest-transform-stub": "^2.0.0",
83
+ "lodash": "^4.17.15",
84
+ "mobx": "4.6.0",
85
+ "mobx-react": "5.4.3",
86
+ "postcss-loader": "^3.0.0",
87
+ "qs": "6.5.1",
88
+ "re-resizable": "^6.0.0",
89
+ "react-checkbox-tree": "^1.5.1",
90
+ "react-circular-progressbar": "^2.0.4",
91
+ "storybook-addon-i18next": "^1.1.0",
92
+ "style-loader": "^1.0.0",
93
+ "stylus": "^0.54.5",
94
+ "stylus-loader": "^3.0.2",
95
+ "ts-jest": "^26.0.0",
96
+ "tslint": "^5.17.0",
97
+ "tslint-config-airbnb": "^5.11.1",
98
+ "tslint-loader": "^3.5.4",
99
+ "typescript": "^3.5.1",
100
+ "webpack-cli": "^3.3.6",
101
+ "husky": "^9.0.11"
102
+ },
103
+ "resolutions": {
104
+ "@types/react": "^16.8.3"
105
+ },
106
+ "scripts": {
107
+ "build": "true",
108
+ "prepublishOnly": "npm run build",
109
+ "prepare": "npm run build",
110
+ "storybook": "start-storybook -p 6006",
111
+ "clean": "rm -rf ./dist/*.*",
112
+ "build:lib": "yarn clean && webpack --config ./webpack.config.js --progress",
113
+ "build:story": "build-storybook",
114
+ "test": "jest --watch",
115
+ "test:ci": "jest --config ./jest.config.js --collectCoverage --coverageDirectory=\"./coverage\" --ci --reporters=default --reporters=jest-junit --watchAll=false",
116
+ "test:coverage": "yarn run test -- --coverage --watchAll=false || exit 0"
117
+ },
118
+ "author": "Maks Okhmatenko",
119
+ "license": "UNLICENSED"
120
+ }
@@ -191,7 +191,6 @@
191
191
  height: 45px
192
192
  border-bottom 1px solid $grey-e
193
193
  text-transform: none
194
- font-size: 11px
195
194
 
196
195
  +media-tablet-landscape-down()
197
196
  padding-top: 7px;
@@ -36,7 +36,7 @@ class AccordionWidget extends React.Component<IAccardionSectionProps> {
36
36
  key={i}
37
37
  description={prop.description}
38
38
  classNameIcon={styles.propertyIcon}
39
- icon={prop.icon === '' ? '' : (prop.icon || 'no-image')}
39
+ icon={prop.icon || 'no-image'}
40
40
  className={styles.accordionVehicleProp}
41
41
  />
42
42
  );
@@ -101,13 +101,9 @@ class AccordionWidget extends React.Component<IAccardionSectionProps> {
101
101
  const autoDeId = car.metaData && car.metaData.vehicleId;
102
102
  const { consumption } = car;
103
103
  const mainPropertiesList = getOverviewDetails(consumption.fuel);
104
- const mainProperties = mainPropertiesList.map((prop: string) => {
105
- const isConsumptionAlternateView = prop.startsWith('consumption') && prop.endsWith('AlternateView');
106
- return {
107
- icon: isConsumptionAlternateView ? '' : this.props.decoratedProps[prop].icon,
108
- description: this.props.decoratedProps[prop].value
109
- };
110
- });
104
+ const mainProperties = mainPropertiesList.map((prop: string) => (
105
+ { icon: this.props.decoratedProps[prop].icon, description: this.props.decoratedProps[prop].value })
106
+ );
111
107
  return (
112
108
  <div>
113
109
  {this.renderPropsBlock(mainProperties)}
@@ -21,7 +21,7 @@ export interface ICheckboxProps {
21
21
  checkboxClassName?: string;
22
22
  labelClassName?: string;
23
23
  labelPlacement?: 'end' | 'start' | 'top' | 'bottom';
24
- tooltipDescription?: React.ReactNode;
24
+ tooltipDescription?: string;
25
25
  checkboxPriceValue: any;
26
26
  tooltipPosX?: string;
27
27
  error?: boolean;
@@ -128,7 +128,7 @@ class CheckboxContainer extends React.Component<ICheckboxProps, {}> {
128
128
  {description ? (
129
129
  <span className={styles.labelContent}>
130
130
  {description}
131
- {tooltipDescription && <MaterialTooltip zindex={10000} disablePortal={false} text={tooltipDescription} className={styles.tooltipCheckbox} icon='InfoTransparent' />}
131
+ {tooltipDescription && <MaterialTooltip zindex={10000} text={tooltipDescription} className={styles.tooltipCheckbox} icon='InfoTransparent' />}
132
132
  </span>
133
133
  ) : false}
134
134
  </label>
@@ -111,30 +111,6 @@
111
111
  max-height: inherit;
112
112
  width: inherit !important
113
113
 
114
- :global
115
- .MuiTooltip-tooltip
116
- max-width: 360px !important
117
- font-size: 11px
118
- line-height: 1.45
119
- color: #4C4E64AD
120
- text-align: left
121
-
122
- b
123
- display: block
124
- margin-bottom: 6px
125
- font-size: 12px
126
- color: #1a1a1a
127
-
128
- p
129
- margin: 0 0 6px
130
-
131
- ul
132
- margin: 4px 0 0
133
- padding-left: 16px
134
-
135
- li
136
- margin-bottom: 3px
137
-
138
114
  .checkboxPrice
139
115
  align-self: center;
140
116
  color: rgba(#000000, .63);
@@ -16,7 +16,7 @@ const OfferCheckboxGroup: FC<IOfferPeriod> = ({ additionalService, transferInsta
16
16
  return (
17
17
  <div className={offerGroupClass}>
18
18
  {isAboAccordionExpanded0 && <CheckboxContainer {...additionalService } />}
19
- {priceTabIndex === 2 && <CheckboxContainer {...{ ...transferInstallments, isAboAccordionExpanded0 }} />}
19
+ <CheckboxContainer {...{ ...transferInstallments, isAboAccordionExpanded0 }} />
20
20
  </div>
21
21
  );
22
22
  };
@@ -71,7 +71,7 @@ const OfferPanel: FC<IFinancingPanel> = ({
71
71
 
72
72
  {priceTabIndex === THREE
73
73
  ? <div className={styles.aboAccordionWrapper}><AboAccordion /></div>
74
- : <div className={styles.offerCheckboxGroup}><OfferCheckboxGroup {...{ transferInstallments, additionalService, priceTabIndex }} /></div>}
74
+ : <div className={styles.offerCheckboxGroup}><OfferCheckboxGroup {...{ transferInstallments, additionalService }} /></div>}
75
75
  </>
76
76
  }
77
77
  </form>
@@ -1,4 +1,4 @@
1
- import React, { useState, useEffect, useRef, FunctionComponent } from 'react';
1
+ import React, { useState, useEffect, FunctionComponent } from 'react';
2
2
  import _get from 'lodash/get';
3
3
  import { Hidden } from 'react-grid-system';
4
4
  import PriceContent from './partials/PriceContent';
@@ -104,31 +104,19 @@ const VehicleDetailedSidebar: FunctionComponent<IVehicleDetailedSidebarProps> =
104
104
  }
105
105
  ];
106
106
 
107
- const initialDefaultAppliedForPath = useRef<string | null>(null);
108
-
109
107
  useEffect(() => {
110
108
  const getlocalStorageActiveTabCDP = localStorage.getItem('activeTabCDP');
111
- if (getlocalStorageActiveTabCDP) {
112
- const activeTab = tabsTitles.findIndex(({ title }: { title: string }) => {
113
- return title === getlocalStorageActiveTabCDP;
114
- });
115
- if (activeTab === -1) {
116
- setActiveTab(null, 0);
117
- } else {
118
- setActiveTab(null, activeTab);
119
- }
120
- localStorage.removeItem('activeTabCDP');
121
- initialDefaultAppliedForPath.current = pathname;
122
- return;
123
- }
124
- if (
125
- initialDefaultAppliedForPath.current !== pathname
126
- && _get(price, 'leasing.isActive', false)
127
- ) {
128
- setActiveTab(null, 1);
129
- initialDefaultAppliedForPath.current = pathname;
109
+ if (!getlocalStorageActiveTabCDP) return;
110
+ const activeTab = tabsTitles.findIndex(({ title }: { title: string }) => {
111
+ return title === getlocalStorageActiveTabCDP;
112
+ });
113
+ if (activeTab === -1) {
114
+ setActiveTab(null, 0);
115
+ } else {
116
+ setActiveTab(null, activeTab);
130
117
  }
131
- }, [pathname, activeTab, price]); // tslint:disable-line:align
118
+ localStorage.removeItem('activeTabCDP');
119
+ }, [pathname, activeTab]); // tslint:disable-line:align
132
120
 
133
121
  const priceProps = {
134
122
  tabsTitles,
@@ -316,7 +316,6 @@ class VehicleDetailedSlider extends Component<IProps, IState> {
316
316
  powerKW,
317
317
  powerPS,
318
318
  activeTab,
319
- financingConfig,
320
319
  onCarFavorite
321
320
  } = this.props;
322
321
  const { activeSlide } = this.state;
@@ -338,7 +337,6 @@ class VehicleDetailedSlider extends Component<IProps, IState> {
338
337
 
339
338
  const priceProps = {
340
339
  t,
341
- financingConfig,
342
340
  showNewLabel,
343
341
  showDownPayment,
344
342
  financingFirstInstallment,
@@ -9,7 +9,6 @@ interface IProps {
9
9
  showNewLabel: boolean;
10
10
  historyPriceDifference: number;
11
11
  historyPriceDifferencePerCent: number;
12
- financingConfig?: any;
13
12
  activeTab?: number;
14
13
  showDownPayment: boolean;
15
14
  financingFirstInstallment?: number | null;
@@ -18,13 +17,11 @@ interface IProps {
18
17
 
19
18
  const MIN_PERCENT = 5;
20
19
  const MIN_PRICE_DIFFERENCE = 500;
21
- const EUR = `€`;
20
+ const EUR = `\u20AC`;
22
21
 
23
22
  const PriceData: React.FunctionComponent<IProps> = ({ t, showDownPayment, showNewLabel, historyPriceDifference, historyPriceDifferencePerCent, activeTab, financingFirstInstallment, leasingFirstInstallment }) => {
24
- const showDownPaymentBadge = showDownPayment && (
25
- (activeTab === 0 && financingFirstInstallment === 0) ||
26
- (activeTab === 1 && leasingFirstInstallment === 0)
27
- );
23
+ const relevantFirstInstallment = activeTab === 0 ? financingFirstInstallment : activeTab === 1 ? leasingFirstInstallment : null;
24
+ const showZeroDownPayment = showDownPayment && relevantFirstInstallment === 0;
28
25
  return (
29
26
  <div className={styles.topWrapper}>
30
27
  {showNewLabel && <Badge type='blue' className={styles.new}>{t('slider.new')}</Badge>}
@@ -34,7 +31,7 @@ const PriceData: React.FunctionComponent<IProps> = ({ t, showDownPayment, showNe
34
31
  {` ${EUR} ${t('slider.save')}`}
35
32
  </Badge>
36
33
  )}
37
- {showDownPaymentBadge &&
34
+ {showZeroDownPayment &&
38
35
  <Badge type='lightBlue' className={styles.percentageOfFirstInstallment}>{`0${EUR} ${t('slider.firstInstallment')}`}</Badge>}
39
36
  {historyPriceDifferencePerCent >= MIN_PERCENT && (
40
37
  <Badge type='red' className={styles.priceDifferencePerCent}>
@@ -70,11 +70,6 @@
70
70
  +media-tablet-landscape-up()
71
71
  font-size: 9px;
72
72
 
73
- &.priceItemCategoryLanding,
74
- &.priceItemCategoryMain
75
- +media-tablet-landscape-up()
76
- font-size: 10px;
77
-
78
73
  & > span:hover
79
74
  background: rgba(196, 196, 196, 0.6);
80
75
 
@@ -88,9 +88,7 @@ class VehiclePriceItem extends React.Component<IVehiclePriceItemProps> {
88
88
  const priceItemCategoryClassName = classnames(
89
89
  styles.priceItemCategory,
90
90
  { [styles.priceItemCategorySearch]: vehicleComponentName === 'search' || vehicleComponentName === 'myVehicles' },
91
- { [styles.priceItemCategoryComparable]: vehicleComponentName === 'comparable' },
92
- { [styles.priceItemCategoryLanding]: vehicleComponentName === 'landing' },
93
- { [styles.priceItemCategoryMain]: vehicleComponentName === 'main' }
91
+ { [styles.priceItemCategoryComparable]: vehicleComponentName === 'comparable' || vehicleComponentName === 'landing' || vehicleComponentName === 'main' }
94
92
  );
95
93
 
96
94
  return (
@@ -12,7 +12,7 @@
12
12
  grid-area: info;
13
13
 
14
14
  & > .consumptionCombined
15
- font-size: 9px
15
+ font-size: 10px
16
16
 
17
17
  +media-tablet-landscape-down()
18
18
  padding: 0 10px;
@@ -1,7 +1,6 @@
1
1
  /* tslint:disable */
2
2
  import * as React from 'react';
3
3
  import classnames from 'classnames';
4
- import _get from 'lodash/get';
5
4
  import styles from './VehicleInfo.styl';
6
5
  import PriceRating from '../../../PriceRating/PriceRating';
7
6
  import { Visible, Hidden } from 'react-grid-system';
@@ -44,8 +43,7 @@ const VehicleInfo: React.FC<IVehicleInfoProps> = (props) => {
44
43
  consumption,
45
44
  location,
46
45
  offer,
47
- engineData,
48
- leasing
46
+ engineData
49
47
  } = props;
50
48
  const firstRegistrationDate = regDate && regDate !== 0 ? regDate : 'N/A';
51
49
 
@@ -67,8 +65,7 @@ const VehicleInfo: React.FC<IVehicleInfoProps> = (props) => {
67
65
  },
68
66
  environmentEmissions: {
69
67
  co2: environmentEmissions.co2,
70
- wltpCo2: environmentEmissions.wltpCo2,
71
- wltpEnergyEfficiencyClass: environmentEmissions.wltpEnergyEfficiencyClass
68
+ wltpCo2: environmentEmissions.wltpCo2
72
69
  },
73
70
  consumption: {
74
71
  fuel: consumption.fuel,
@@ -83,19 +80,14 @@ const VehicleInfo: React.FC<IVehicleInfoProps> = (props) => {
83
80
 
84
81
  const decoratedProps = getDecoratedProps(dataDecoratedProps, t, language);
85
82
  const renderProperty = (renderProperties: any, vehicleComponentName?: any) => {
86
- const mainPropertiesList = renderProperties(dataDecoratedProps.consumption.fuel, combineRefAlternative).map((prop: string) => {
87
- const isConsumption = decoratedProps[prop].name === 'consumptionCombined';
88
- // On non-SRL cards drop the fuel-pump icon next to the consumption row to free up space for the CO2-class line.
89
- const hideConsumptionIcon = isConsumption && vehicleComponentName !== 'search';
90
- return {
91
- icon: hideConsumptionIcon ? '' : decoratedProps[prop].icon,
92
- description: decoratedProps[prop].value,
93
- className: styles[decoratedProps[prop].name],
94
- classNameIcon: (vehicleComponentName === 'search' || 'myVehicles' || 'favorite' || 'recently') && styles.carIconSearch,
95
- smalltext: isConsumption && (vehicleComponentName !== 'search'),
96
- hybridPlugin: engineData.hybridPlugin && isConsumption && vehicleComponentName !== 'search'
97
- };
98
- });
83
+ const mainPropertiesList = renderProperties(dataDecoratedProps.consumption.fuel, combineRefAlternative).map((prop: string) => ({
84
+ icon: decoratedProps[prop].icon,
85
+ description: decoratedProps[prop].value,
86
+ className: styles[decoratedProps[prop].name],
87
+ classNameIcon: (vehicleComponentName === 'search' || 'myVehicles' || 'favorite' || 'recently') && styles.carIconSearch,
88
+ smalltext: (decoratedProps[prop].name === 'consumptionCombined') && (vehicleComponentName !== 'search'),
89
+ hybridPlugin: engineData.hybridPlugin && decoratedProps[prop].name === 'consumptionCombined' && vehicleComponentName !== 'search'
90
+ }));
99
91
 
100
92
  return mainPropertiesList.map((property: any, index: number) => (
101
93
  <VehicleProperty {...property} key={index} />
@@ -157,12 +149,7 @@ const VehicleInfo: React.FC<IVehicleInfoProps> = (props) => {
157
149
  ),
158
150
  ...routeObj,
159
151
  className: wrapClasses,
160
- onClick: () => localStorage.setItem(
161
- 'activeTabCDP',
162
- _get(leasing, 'isActive', false)
163
- ? t('vehicleProps:title.leasing')
164
- : t('vehicleProps:title.financing')
165
- ),
152
+ onClick: () => localStorage.setItem('activeTabCDP', t('vehicleProps:title.financing')),
166
153
  href: url,
167
154
  target,
168
155
  rel
@@ -62,9 +62,8 @@
62
62
  font-size: 12px;
63
63
  height: 42px;
64
64
 
65
- &.vehiclePriceTitleLanding,
66
- &.vehiclePriceTitleMain
67
- font-size: 10px;
65
+ &.vehiclePriceTitleLanding
66
+ font-size: 11px;
68
67
  height: 38px;
69
68
 
70
69
  .addOfferButton
@@ -11,7 +11,7 @@
11
11
 
12
12
  .smallProp
13
13
  span
14
- font-size: 9px !important
14
+ font-size: 10px !important
15
15
 
16
16
  .pluginVal
17
17
  span
@@ -26,8 +26,5 @@
26
26
  +media-tablet-landscape-up()
27
27
  margin-right: 10px
28
28
 
29
- .noIcon
30
- padding-left: 5px
31
-
32
29
  [class*='smallText']
33
30
  font-size:10px;
@@ -19,13 +19,12 @@ class VehicleProperty extends React.Component<IVehicleProperty, {}> {
19
19
 
20
20
  render(): React.ReactNode {
21
21
  const { className, classNameIcon, icon, description, smalltext, hybridPlugin } = this.props;
22
- const noIcon: boolean = !icon;
23
- const propertyClass: string = `${styles.carProp} ${className ? className : ''} ${smalltext ? styles.smallProp : ''} ${hybridPlugin ? styles.pluginVal : ''} ${noIcon ? styles.noIcon : ''}`;
22
+ const propertyClass: string = `${styles.carProp} ${className ? className : ''} ${smalltext ? styles.smallProp : ''} ${hybridPlugin ? styles.pluginVal : ''}`;
24
23
  const propertyClassIcon: string = `${styles.carIcon} ${classNameIcon ? classNameIcon : ''}`;
25
24
 
26
25
  return (
27
26
  <div className={propertyClass}>
28
- {!noIcon && <IconSVG className={propertyClassIcon} name={icon} customDimensions />}
27
+ <IconSVG className={propertyClassIcon} name={icon} customDimensions />
29
28
  <span>{description}</span>
30
29
  </div>
31
30
  );
@@ -48,7 +48,7 @@ const VehicleTitle: React.FC<IVehicleTitleProps> = ({
48
48
  event.preventDefault();
49
49
  event.stopPropagation();
50
50
  event.nativeEvent.stopImmediatePropagation();
51
- if (onFavoriteClick) onFavoriteClick(event, id);
51
+ onFavoriteClick(event, id);
52
52
  };
53
53
 
54
54
  const renderFavoriteIcon = (): React.ReactNode => {